rem
stringlengths 0
477k
| add
stringlengths 0
313k
| context
stringlengths 6
599k
| meta
stringlengths 141
403
|
---|---|---|---|
protected void installKeyboardActions() { }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/963ae61676e8c35a9e0998e0b7de1f942db82a26/BasicTableHeaderUI.java/buggy/core/src/classpath/javax/javax/swing/plaf/basic/BasicTableHeaderUI.java
|
||
protected void uninstallKeyboardActions() { }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/963ae61676e8c35a9e0998e0b7de1f942db82a26/BasicTableHeaderUI.java/buggy/core/src/classpath/javax/javax/swing/plaf/basic/BasicTableHeaderUI.java
|
||
attribHash.put("fieldList", new XMLAttribute(Collections.synchronizedList(new ArrayList(super.sDefaultDataArraySize)), Constants.LIST_TYPE));
|
attribHash.put("fieldList", new XMLAttribute(Collections.synchronizedList(new ArrayList(Specification.getInstance().getDefaultDataArraySize())), Constants.LIST_TYPE));
|
private void init() { classXDFNodeName = "fieldAxis"; // order matters! these are in *reverse* order of their // occurence in the XDF DTD attribOrder.add(0,"fieldList"); attribOrder.add(0,"axisIdRef"); attribOrder.add(0,"axisId"); attribOrder.add(0,"align"); //not sure what it is??? attribOrder.add(0,"description"); attribOrder.add(0,"name"); //set up the attribute hashtable key with the default initial value //set the minimum array size(essentially the size of the axis) attribHash.put("fieldList", new XMLAttribute(Collections.synchronizedList(new ArrayList(super.sDefaultDataArraySize)), Constants.LIST_TYPE)); attribHash.put("axisIdRef", new XMLAttribute(null, Constants.STRING_TYPE)); attribHash.put("axisId", new XMLAttribute(null, Constants.STRING_TYPE)); attribHash.put("align", new XMLAttribute(null, Constants.STRING_TYPE)); //double check?? attribHash.put("description", new XMLAttribute(null, Constants.STRING_TYPE)); attribHash.put("name", new XMLAttribute(null, Constants.STRING_TYPE)); length = 0; }
|
4483 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4483/1e7f6912855beedfa6f64bcbc5bc675d9beedbae/FieldAxis.java/buggy/src/gov/nasa/gsfc/adc/xdf/FieldAxis.java
|
int nread = read(onebytebuffer, 0, 1);
|
int nread = read(onebytebuffer, 0, 1);
|
public int read() throws IOException { int nread = read(onebytebuffer, 0, 1); //read one byte if (nread > 0) return onebytebuffer[0] & 0xff; return -1; }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/cdb624bf4a3742cc4374523f5c6856a06dcd8f92/InflaterInputStream.java/buggy/core/src/classpath/java/java/util/zip/InflaterInputStream.java
|
public int read() throws IOException { int nread = read(onebytebuffer, 0, 1); //read one byte if (nread > 0) return onebytebuffer[0] & 0xff; return -1; }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/cdb624bf4a3742cc4374523f5c6856a06dcd8f92/InflaterInputStream.java/buggy/core/src/classpath/java/java/util/zip/InflaterInputStream.java
|
||
protected AccessibleJComboBox() { }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/963ae61676e8c35a9e0998e0b7de1f942db82a26/JComboBox.java/clean/core/src/classpath/javax/javax/swing/JComboBox.java
|
||
public void addAccessibleSelection(int value0) { }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/963ae61676e8c35a9e0998e0b7de1f942db82a26/JComboBox.java/clean/core/src/classpath/javax/javax/swing/JComboBox.java
|
||
public void clearAccessibleSelection() { }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/963ae61676e8c35a9e0998e0b7de1f942db82a26/JComboBox.java/clean/core/src/classpath/javax/javax/swing/JComboBox.java
|
||
public void removeAccessibleSelection(int value0) { }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/963ae61676e8c35a9e0998e0b7de1f942db82a26/JComboBox.java/clean/core/src/classpath/javax/javax/swing/JComboBox.java
|
||
public void selectAllAccessibleSelection() { }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/963ae61676e8c35a9e0998e0b7de1f942db82a26/JComboBox.java/clean/core/src/classpath/javax/javax/swing/JComboBox.java
|
||
if (e.getKeyCode() == KeyEvent.VK_TAB) setPopupVisible(false); else if (keySelectionManager != null) { int i = keySelectionManager.selectionForKey(e.getKeyChar(), getModel()); if (i >= 0) setSelectedIndex(i); else super.processKeyEvent(e); } else super.processKeyEvent(e);
|
public void processKeyEvent(KeyEvent e) { }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/963ae61676e8c35a9e0998e0b7de1f942db82a26/JComboBox.java/clean/core/src/classpath/javax/javax/swing/JComboBox.java
|
|
if (newSelection != null)
|
protected void selectedItemChanged() { // Fire ItemEvent to indicated that previously selected item is now // deselected if (selectedItemReminder != null) fireItemStateChanged(new ItemEvent(this, ItemEvent.ITEM_STATE_CHANGED, selectedItemReminder, ItemEvent.DESELECTED)); // Fire ItemEvent to indicate that new item is selected Object newSelection = getSelectedItem(); fireItemStateChanged(new ItemEvent(this, ItemEvent.ITEM_STATE_CHANGED, newSelection, ItemEvent.SELECTED)); // Fire Action Event to JComboBox's registered listeners fireActionEvent(); selectedItemReminder = newSelection; }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/963ae61676e8c35a9e0998e0b7de1f942db82a26/JComboBox.java/clean/core/src/classpath/javax/javax/swing/JComboBox.java
|
|
keySelectionManager = aManager;
|
public void setKeySelectionManager(KeySelectionManager aManager) { }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/963ae61676e8c35a9e0998e0b7de1f942db82a26/JComboBox.java/clean/core/src/classpath/javax/javax/swing/JComboBox.java
|
|
selectedItemReminder = newDataModel.getSelectedItem();
|
public void setModel(ComboBoxModel newDataModel) { // dataModel is null if it this method is called from inside the constructors. if (dataModel != null) { // Prevents unneccessary updates. if (dataModel == newDataModel) return; // Removes itself (as DataListener) from the to-be-replaced model. dataModel.removeListDataListener(this); } /* Adds itself as a DataListener to the new model. * It is intentioned that this operation will fail with a NullPointerException if the * caller delivered a null argument. */ newDataModel.addListDataListener(this); // Stores old data model for event notification. ComboBoxModel oldDataModel = dataModel; dataModel = newDataModel; // Notifies the listeners of the model change. firePropertyChange("model", oldDataModel, dataModel); }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/963ae61676e8c35a9e0998e0b7de1f942db82a26/JComboBox.java/clean/core/src/classpath/javax/javax/swing/JComboBox.java
|
|
public void checkAccess(ThreadGroup g)
|
public void checkAccess(Thread thread)
|
public void checkAccess(ThreadGroup g) { if (g.getParent() != null) checkPermission(new RuntimePermission("modifyThreadGroup")); }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/68a6301301378680519f2b146daec37812a1bc22/SecurityManager.java/buggy/core/src/classpath/java/java/lang/SecurityManager.java
|
if (g.getParent() != null) checkPermission(new RuntimePermission("modifyThreadGroup")); }
|
if (thread.getThreadGroup() != null && thread.getThreadGroup().getParent() != null) checkPermission(new RuntimePermission("modifyThread")); }
|
public void checkAccess(ThreadGroup g) { if (g.getParent() != null) checkPermission(new RuntimePermission("modifyThreadGroup")); }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/68a6301301378680519f2b146daec37812a1bc22/SecurityManager.java/buggy/core/src/classpath/java/java/lang/SecurityManager.java
|
screen.setVT(vt);
|
public Session5250 (Properties props, String configurationResource, String sessionName, SessionConfig config) { propFileName = config.getConfigurationResource(); sesConfig = config; this.configurationResource = configurationResource; this.sessionName = sessionName; sesProps = props; sce = new SessionChangeEvent(this); if (sesProps.containsKey(SESSION_HEART_BEAT)) heartBeat = true; screen = new Screen5250(); screen.setVT(vt); }
|
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/5dae090be90e3c47e6b08166695e0bdc8919713c/Session5250.java/buggy/tn5250j/src/org/tn5250j/Session5250.java
|
|
return vt.isConnected();
|
if (vt == null) return false; else return vt.isConnected();
|
public boolean isConnected() { return vt.isConnected(); }
|
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/5dae090be90e3c47e6b08166695e0bdc8919713c/Session5250.java/buggy/tn5250j/src/org/tn5250j/Session5250.java
|
throws NotImplementedException
|
public String getSystemDisplayName(File f) throws NotImplementedException { // FIXME: Implement; return null; }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ff4d557efcee4a2c3a25a9cac2252bc626fb10fe/UnixFileSystemView.java/buggy/core/src/classpath/javax/javax/swing/filechooser/UnixFileSystemView.java
|
|
return null;
|
String name = null; if (f != null) { if (isRoot(f)) name = f.getAbsolutePath(); else { try { String path = f.getCanonicalPath(); name = path.substring(path.lastIndexOf(File.separator) + 1); } catch (IOException e) { name = f.getName(); } } } return name;
|
public String getSystemDisplayName(File f) throws NotImplementedException { // FIXME: Implement; return null; }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ff4d557efcee4a2c3a25a9cac2252bc626fb10fe/UnixFileSystemView.java/buggy/core/src/classpath/javax/javax/swing/filechooser/UnixFileSystemView.java
|
return(selectedCheckbox);
|
return getCurrent ();
|
getSelectedCheckbox(){ return(selectedCheckbox);}
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/b5af1a0dd02ba16d1f4f4556ab34fa51c2db060d/CheckboxGroup.java/clean/core/src/classpath/java/java/awt/CheckboxGroup.java
|
setSelectedCheckbox(selectedCheckbox);
|
if (this.selectedCheckbox != null) { if (this.selectedCheckbox.getCheckboxGroup() != this) return; this.selectedCheckbox.setState(false); } this.selectedCheckbox = selectedCheckbox; if (selectedCheckbox != null) selectedCheckbox.setState(true);
|
setCurrent(Checkbox selectedCheckbox){ setSelectedCheckbox(selectedCheckbox);}
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/b5af1a0dd02ba16d1f4f4556ab34fa51c2db060d/CheckboxGroup.java/clean/core/src/classpath/java/java/awt/CheckboxGroup.java
|
if (this.selectedCheckbox != null) { if (this.selectedCheckbox.getCheckboxGroup() != this) return; this.selectedCheckbox.setState(false); } this.selectedCheckbox = selectedCheckbox; if (selectedCheckbox != null) selectedCheckbox.setState(true);
|
setCurrent (selectedCheckbox);
|
setSelectedCheckbox(Checkbox selectedCheckbox){ if (this.selectedCheckbox != null) { if (this.selectedCheckbox.getCheckboxGroup() != this) return; this.selectedCheckbox.setState(false); } this.selectedCheckbox = selectedCheckbox; if (selectedCheckbox != null) selectedCheckbox.setState(true);}
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/b5af1a0dd02ba16d1f4f4556ab34fa51c2db060d/CheckboxGroup.java/clean/core/src/classpath/java/java/awt/CheckboxGroup.java
|
setText(s);
|
FontMetrics fm = getToolkit().getFontMetrics(list.getFont()); int strWidth = SwingUtilities.computeStringWidth(fm, s); int cbWidth = getSize().width; if (cbWidth != 0 && strWidth > cbWidth) { char[] str = s.toCharArray(); int currWidth = 0; int i = 0; String postStr = "... "; cbWidth -= SwingUtilities.computeStringWidth(fm, postStr); while (i < str.length && currWidth < cbWidth) { ++i; currWidth = SwingUtilities.computeStringWidth(fm, new String(str, 0, i)); } setText(new String(str, 0, i) + postStr); } else setText(s);
|
public Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus) { String s = value.toString(); setText(s); setOpaque(true); UIDefaults defaults = UIManager.getLookAndFeelDefaults(); if (isSelected) { setBackground(list.getSelectionBackground()); setForeground(list.getSelectionForeground()); } else { setBackground(list.getBackground()); setForeground(list.getForeground()); } setEnabled(list.isEnabled()); setFont(list.getFont()); // Use focusCellHighlightBorder when renderer has focus and // noFocusBorder otherwise if (cellHasFocus) setBorder(UIManager.getBorder("List.focusCellHighlightBorder")); else setBorder(noFocusBorder); return this; }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/BasicComboBoxRenderer.java/clean/core/src/classpath/javax/javax/swing/plaf/basic/BasicComboBoxRenderer.java
|
UIDefaults defaults = UIManager.getLookAndFeelDefaults(); if (isSelected)
|
if (isSelected || cellHasFocus)
|
public Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus) { String s = value.toString(); setText(s); setOpaque(true); UIDefaults defaults = UIManager.getLookAndFeelDefaults(); if (isSelected) { setBackground(list.getSelectionBackground()); setForeground(list.getSelectionForeground()); } else { setBackground(list.getBackground()); setForeground(list.getForeground()); } setEnabled(list.isEnabled()); setFont(list.getFont()); // Use focusCellHighlightBorder when renderer has focus and // noFocusBorder otherwise if (cellHasFocus) setBorder(UIManager.getBorder("List.focusCellHighlightBorder")); else setBorder(noFocusBorder); return this; }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/BasicComboBoxRenderer.java/clean/core/src/classpath/javax/javax/swing/plaf/basic/BasicComboBoxRenderer.java
|
setBackground(list.getSelectionBackground()); setForeground(list.getSelectionForeground());
|
setBackground(list.getSelectionBackground()); setForeground(list.getSelectionForeground());
|
public Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus) { String s = value.toString(); setText(s); setOpaque(true); UIDefaults defaults = UIManager.getLookAndFeelDefaults(); if (isSelected) { setBackground(list.getSelectionBackground()); setForeground(list.getSelectionForeground()); } else { setBackground(list.getBackground()); setForeground(list.getForeground()); } setEnabled(list.isEnabled()); setFont(list.getFont()); // Use focusCellHighlightBorder when renderer has focus and // noFocusBorder otherwise if (cellHasFocus) setBorder(UIManager.getBorder("List.focusCellHighlightBorder")); else setBorder(noFocusBorder); return this; }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/BasicComboBoxRenderer.java/clean/core/src/classpath/javax/javax/swing/plaf/basic/BasicComboBoxRenderer.java
|
setBackground(list.getBackground()); setForeground(list.getForeground());
|
setBackground(list.getBackground()); setForeground(list.getForeground());
|
public Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus) { String s = value.toString(); setText(s); setOpaque(true); UIDefaults defaults = UIManager.getLookAndFeelDefaults(); if (isSelected) { setBackground(list.getSelectionBackground()); setForeground(list.getSelectionForeground()); } else { setBackground(list.getBackground()); setForeground(list.getForeground()); } setEnabled(list.isEnabled()); setFont(list.getFont()); // Use focusCellHighlightBorder when renderer has focus and // noFocusBorder otherwise if (cellHasFocus) setBorder(UIManager.getBorder("List.focusCellHighlightBorder")); else setBorder(noFocusBorder); return this; }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/BasicComboBoxRenderer.java/clean/core/src/classpath/javax/javax/swing/plaf/basic/BasicComboBoxRenderer.java
|
if (cellHasFocus) setBorder(UIManager.getBorder("List.focusCellHighlightBorder")); else setBorder(noFocusBorder);
|
public Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus) { String s = value.toString(); setText(s); setOpaque(true); UIDefaults defaults = UIManager.getLookAndFeelDefaults(); if (isSelected) { setBackground(list.getSelectionBackground()); setForeground(list.getSelectionForeground()); } else { setBackground(list.getBackground()); setForeground(list.getForeground()); } setEnabled(list.isEnabled()); setFont(list.getFont()); // Use focusCellHighlightBorder when renderer has focus and // noFocusBorder otherwise if (cellHasFocus) setBorder(UIManager.getBorder("List.focusCellHighlightBorder")); else setBorder(noFocusBorder); return this; }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/BasicComboBoxRenderer.java/clean/core/src/classpath/javax/javax/swing/plaf/basic/BasicComboBoxRenderer.java
|
|
if(isRootDirectory(path)) return path;
|
if(isRootDirectory(path)) return path;
|
public static final String toCanonicalForm(String path) { if(isRootDirectory(path)) return path; //FDy: ClassPath bug fix for root (from JNode team) /*?? if(path.indexOf('.') < 0 && path.indexOf("..") < 0) return path; */ String tmppath = path.replace('/', separatorChar); StringBuffer canonpath; // We found it'll be more efficient and easy to handle to // return a lowercased canonical path if(isWindows) tmppath = tmppath.toLowerCase(); int i; if ((i = beginWithRootPathPrefix(tmppath)) == 0 ) return path; /* The original "canonpath = new StringBuffer(tmppath.substring(0, i))" isn't very efficient because StringBuffer's ensureCapacity_unsynchronized will fail definitely each time and will enlarge buffer and copy contents. . */ canonpath = new StringBuffer(INITIAL_MAX_PATH); canonpath.append(tmppath.substring(0, i)); tmppath = tmppath.substring(i); // pathdepth==0 indicates there're only root path in the buffer int pathdepth = 0; StringTokenizer st = new StringTokenizer(tmppath, separator); // Traverse each element of the path, handling "." and ".." // Should handle "~" too? if (st.hasMoreTokens()) do { String s = st.nextToken(); // Handle "." or an empty element. if (s.equals(".") || s.equals("")) continue; // Handle ".." by deleting the last element from the path if (s.equals("..")) { if (pathdepth == 0) continue; // Strip of trailing separator canonpath.setLength(canonpath.length() - 1/*separator.length()*/); String tmpstr = canonpath.toString(); int idx = tmpstr.lastIndexOf(separator); if ((idx == -1) || ((idx + 1/*separator.length()*/) > tmpstr.length())) //throw new IOException("Can't happen error"); return path; // Shouldn't happen canonpath.setLength(idx + 1/*separator.length()*/); pathdepth--; continue; } canonpath.append(s); pathdepth++; //now it's more than root path if (st.hasMoreTokens()) canonpath.append(separator); } while (st.hasMoreTokens()); if (endWithSeparator(path)) canonpath.append(separator); String tmpstr = canonpath.toString(); //if (pathdepth > 0 && endWithSeparator(tmpstr) ) // tmpstr = tmpstr.substring(0, tmpstr.length() - 1/*separator.length()*/); return tmpstr; }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ac2fb396ecf670bdfbe381de2c1ee5d32fcf8d00/PlatformHelper.java/clean/core/src/classpath/gnu/gnu/java/io/PlatformHelper.java
|
{ new SecureRandom ().nextBytes(buffer);
|
getDefaultPRNG().nextBytes(buffer);
|
private void nextRandomBytes(byte[] buffer) { if (rnd != null) { rnd.nextBytes(buffer); } else { new SecureRandom ().nextBytes(buffer); } }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/5806c07c3eeedb0f4f92b9fbacf30c0f55915c25/DSSKeyPairGenerator.java/clean/core/src/classpath/gnu/gnu/java/security/key/dss/DSSKeyPairGenerator.java
|
}
|
private void nextRandomBytes(byte[] buffer) { if (rnd != null) { rnd.nextBytes(buffer); } else { new SecureRandom ().nextBytes(buffer); } }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/5806c07c3eeedb0f4f92b9fbacf30c0f55915c25/DSSKeyPairGenerator.java/clean/core/src/classpath/gnu/gnu/java/security/key/dss/DSSKeyPairGenerator.java
|
|
}
|
public void setup(Map attributes) { // find out the modulus length Integer l = (Integer) attributes.get(MODULUS_LENGTH); L = (l == null ? DEFAULT_MODULUS_LENGTH : l.intValue()); if ((L % 64) != 0 || L < 512 || L > 1024) throw new IllegalArgumentException(MODULUS_LENGTH); // should we use the default pre-computed params? Boolean useDefaults = (Boolean) attributes.get(USE_DEFAULTS); if (useDefaults == null) { useDefaults = Boolean.TRUE; } // are we given a set of DSA params or we shall use/generate our own? DSAParameterSpec params = (DSAParameterSpec) attributes.get(DSS_PARAMETERS); if (params != null) { p = params.getP(); q = params.getQ(); g = params.getG(); } else if (useDefaults.equals(Boolean.TRUE)) { switch (L) { case 512: p = KEY_PARAMS_512.getP(); q = KEY_PARAMS_512.getQ(); g = KEY_PARAMS_512.getG(); break; case 768: p = KEY_PARAMS_768.getP(); q = KEY_PARAMS_768.getQ(); g = KEY_PARAMS_768.getG(); break; case 1024: p = KEY_PARAMS_1024.getP(); q = KEY_PARAMS_1024.getQ(); g = KEY_PARAMS_1024.getG(); break; default: p = null; q = null; g = null; } } else { p = null; q = null; g = null; } // do we have a SecureRandom, or should we use our own? rnd = (SecureRandom) attributes.get(SOURCE_OF_RANDOMNESS); // set the seed-key byte[] kb = new byte[20]; // we need 160 bits of randomness nextRandomBytes(kb); XKEY = new BigInteger(1, kb).setBit(159).setBit(0); }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/5806c07c3eeedb0f4f92b9fbacf30c0f55915c25/DSSKeyPairGenerator.java/clean/core/src/classpath/gnu/gnu/java/security/key/dss/DSSKeyPairGenerator.java
|
|
final VmStackFrame[] getVmStackTrace(Address argFrame, Address ip, int limit) {
|
final VmStackFrame[] getVmStackTrace(Address frame, Address ip, int limit) {
|
final VmStackFrame[] getVmStackTrace(Address argFrame, Address ip, int limit) { final Address frame = argFrame; Address f = frame; int count = 0; while (isValid(f) && (count < limit)) { count++; f = getPrevious(f); } if ((f != null) && !isStackBottom(f) && (count < limit)) { Unsafe.debug("Corrupted stack!, st.length="); Unsafe.debug(count); Unsafe.debug(" f.magic="); //Unsafe.die(); } final VmStackFrame[] stack = new VmStackFrame[count]; f = frame; for (int i = 0; i < count; i++) { stack[i] = new VmStackFrame(f, this, ip); // Subtract 1, because the return address is directly after // the location where the previous frame was executing. ip = stack[i].getReturnAddress().add(-1); f = getPrevious(f); } return stack; }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/8f674dc620388d2013aaf9ed54e97f8ee02b418d/VmStackReader.java/clean/core/src/core/org/jnode/vm/VmStackReader.java
|
final Address frame = argFrame; Address f = frame;
|
final VmStackFrameEnumerator sfEnum = new VmStackFrameEnumerator(this, frame, ip);
|
final VmStackFrame[] getVmStackTrace(Address argFrame, Address ip, int limit) { final Address frame = argFrame; Address f = frame; int count = 0; while (isValid(f) && (count < limit)) { count++; f = getPrevious(f); } if ((f != null) && !isStackBottom(f) && (count < limit)) { Unsafe.debug("Corrupted stack!, st.length="); Unsafe.debug(count); Unsafe.debug(" f.magic="); //Unsafe.die(); } final VmStackFrame[] stack = new VmStackFrame[count]; f = frame; for (int i = 0; i < count; i++) { stack[i] = new VmStackFrame(f, this, ip); // Subtract 1, because the return address is directly after // the location where the previous frame was executing. ip = stack[i].getReturnAddress().add(-1); f = getPrevious(f); } return stack; }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/8f674dc620388d2013aaf9ed54e97f8ee02b418d/VmStackReader.java/clean/core/src/core/org/jnode/vm/VmStackReader.java
|
while (isValid(f) && (count < limit)) {
|
while (sfEnum.isValid() && (count < limit)) {
|
final VmStackFrame[] getVmStackTrace(Address argFrame, Address ip, int limit) { final Address frame = argFrame; Address f = frame; int count = 0; while (isValid(f) && (count < limit)) { count++; f = getPrevious(f); } if ((f != null) && !isStackBottom(f) && (count < limit)) { Unsafe.debug("Corrupted stack!, st.length="); Unsafe.debug(count); Unsafe.debug(" f.magic="); //Unsafe.die(); } final VmStackFrame[] stack = new VmStackFrame[count]; f = frame; for (int i = 0; i < count; i++) { stack[i] = new VmStackFrame(f, this, ip); // Subtract 1, because the return address is directly after // the location where the previous frame was executing. ip = stack[i].getReturnAddress().add(-1); f = getPrevious(f); } return stack; }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/8f674dc620388d2013aaf9ed54e97f8ee02b418d/VmStackReader.java/clean/core/src/core/org/jnode/vm/VmStackReader.java
|
f = getPrevious(f);
|
sfEnum.next();
|
final VmStackFrame[] getVmStackTrace(Address argFrame, Address ip, int limit) { final Address frame = argFrame; Address f = frame; int count = 0; while (isValid(f) && (count < limit)) { count++; f = getPrevious(f); } if ((f != null) && !isStackBottom(f) && (count < limit)) { Unsafe.debug("Corrupted stack!, st.length="); Unsafe.debug(count); Unsafe.debug(" f.magic="); //Unsafe.die(); } final VmStackFrame[] stack = new VmStackFrame[count]; f = frame; for (int i = 0; i < count; i++) { stack[i] = new VmStackFrame(f, this, ip); // Subtract 1, because the return address is directly after // the location where the previous frame was executing. ip = stack[i].getReturnAddress().add(-1); f = getPrevious(f); } return stack; }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/8f674dc620388d2013aaf9ed54e97f8ee02b418d/VmStackReader.java/clean/core/src/core/org/jnode/vm/VmStackReader.java
|
if ((f != null) && !isStackBottom(f) && (count < limit)) { Unsafe.debug("Corrupted stack!, st.length="); Unsafe.debug(count); Unsafe.debug(" f.magic="); }
|
final VmStackFrame[] getVmStackTrace(Address argFrame, Address ip, int limit) { final Address frame = argFrame; Address f = frame; int count = 0; while (isValid(f) && (count < limit)) { count++; f = getPrevious(f); } if ((f != null) && !isStackBottom(f) && (count < limit)) { Unsafe.debug("Corrupted stack!, st.length="); Unsafe.debug(count); Unsafe.debug(" f.magic="); //Unsafe.die(); } final VmStackFrame[] stack = new VmStackFrame[count]; f = frame; for (int i = 0; i < count; i++) { stack[i] = new VmStackFrame(f, this, ip); // Subtract 1, because the return address is directly after // the location where the previous frame was executing. ip = stack[i].getReturnAddress().add(-1); f = getPrevious(f); } return stack; }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/8f674dc620388d2013aaf9ed54e97f8ee02b418d/VmStackReader.java/clean/core/src/core/org/jnode/vm/VmStackReader.java
|
|
f = frame;
|
sfEnum.reset(frame, ip);
|
final VmStackFrame[] getVmStackTrace(Address argFrame, Address ip, int limit) { final Address frame = argFrame; Address f = frame; int count = 0; while (isValid(f) && (count < limit)) { count++; f = getPrevious(f); } if ((f != null) && !isStackBottom(f) && (count < limit)) { Unsafe.debug("Corrupted stack!, st.length="); Unsafe.debug(count); Unsafe.debug(" f.magic="); //Unsafe.die(); } final VmStackFrame[] stack = new VmStackFrame[count]; f = frame; for (int i = 0; i < count; i++) { stack[i] = new VmStackFrame(f, this, ip); // Subtract 1, because the return address is directly after // the location where the previous frame was executing. ip = stack[i].getReturnAddress().add(-1); f = getPrevious(f); } return stack; }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/8f674dc620388d2013aaf9ed54e97f8ee02b418d/VmStackReader.java/clean/core/src/core/org/jnode/vm/VmStackReader.java
|
stack[i] = new VmStackFrame(f, this, ip); ip = stack[i].getReturnAddress().add(-1); f = getPrevious(f);
|
stack[i] = new VmStackFrame(sfEnum.getMethod(), sfEnum.getProgramCounter()); sfEnum.next();
|
final VmStackFrame[] getVmStackTrace(Address argFrame, Address ip, int limit) { final Address frame = argFrame; Address f = frame; int count = 0; while (isValid(f) && (count < limit)) { count++; f = getPrevious(f); } if ((f != null) && !isStackBottom(f) && (count < limit)) { Unsafe.debug("Corrupted stack!, st.length="); Unsafe.debug(count); Unsafe.debug(" f.magic="); //Unsafe.die(); } final VmStackFrame[] stack = new VmStackFrame[count]; f = frame; for (int i = 0; i < count; i++) { stack[i] = new VmStackFrame(f, this, ip); // Subtract 1, because the return address is directly after // the location where the previous frame was executing. ip = stack[i].getReturnAddress().add(-1); f = getPrevious(f); } return stack; }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/8f674dc620388d2013aaf9ed54e97f8ee02b418d/VmStackReader.java/clean/core/src/core/org/jnode/vm/VmStackReader.java
|
public ISO9660FileSystem(Device device, boolean readOnly) throws FileSystemException { super(device, readOnly); try { volume = new ISO9660Volume(getApi()); } catch (IOException e) { throw new FileSystemException(e); } }
|
public ISO9660FileSystem(Device device, boolean readOnly) throws FileSystemException { super(device, readOnly); try { volume = new ISO9660Volume(getApi()); } catch (IOException e) { throw new FileSystemException(e); } }
|
public ISO9660FileSystem(Device device, boolean readOnly) throws FileSystemException { super(device, readOnly); //byte[] buff = new byte[ISO9660FileSystem.DefaultLBNSize]; try { volume = new ISO9660Volume(getApi()); } catch (IOException e) { throw new FileSystemException(e); } }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/aa324658a8e5c25a895787936a31595462ad8442/ISO9660FileSystem.java/buggy/fs/src/fs/org/jnode/fs/iso9660/ISO9660FileSystem.java
|
}
|
if (isReadOnly()) { } else { } }
|
public void flush() throws IOException { //TODO: perhaps nothing todo (always readOnly ?) }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/aa324658a8e5c25a895787936a31595462ad8442/ISO9660FileSystem.java/buggy/fs/src/fs/org/jnode/fs/iso9660/ISO9660FileSystem.java
|
public FSEntry getRootEntry() throws IOException { return new ISO9660Entry(volume.getVolumeDescriptor().getRootDirectoryEntry()); }
|
public FSEntry getRootEntry() throws IOException { return new ISO9660Entry(this, volume.getVolumeDescriptor() .getRootDirectoryEntry()); }
|
public FSEntry getRootEntry() throws IOException { return new ISO9660Entry(volume.getVolumeDescriptor().getRootDirectoryEntry()); }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/aa324658a8e5c25a895787936a31595462ad8442/ISO9660FileSystem.java/buggy/fs/src/fs/org/jnode/fs/iso9660/ISO9660FileSystem.java
|
return this.volume; }
|
return this.volume; }
|
public ISO9660Volume getVolume() { return this.volume; }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/aa324658a8e5c25a895787936a31595462ad8442/ISO9660FileSystem.java/buggy/fs/src/fs/org/jnode/fs/iso9660/ISO9660FileSystem.java
|
private Raster createCompatibleRaster(Raster raster) {
|
private Raster createCompatibleRaster(Raster raster, ColorModel model) {
|
private Raster createCompatibleRaster(Raster raster) { //todo fix gif images (index color model?), optimize final ColorModel dst_model = surface.getColorModel(); final int[] samples = new int[4]; final int w = raster.getWidth(); final int h = raster.getHeight(); final WritableRaster dst_raster = dst_model.createCompatibleWritableRaster(w, h); for (int y = 0; y < h; y++) { for (int x = 0; x < w; x++) { raster.getPixel(x, y, samples); dst_raster.setPixel(x, y, samples); } } return dst_raster; }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/558542f2f668a53027929612941782dbdbb712e1/AbstractSurfaceGraphics.java/clean/gui/src/awt/org/jnode/awt/util/AbstractSurfaceGraphics.java
|
private Raster createCompatibleRaster(Raster raster) { //todo fix gif images (index color model?), optimize final ColorModel dst_model = surface.getColorModel(); final int[] samples = new int[4]; final int w = raster.getWidth(); final int h = raster.getHeight(); final WritableRaster dst_raster = dst_model.createCompatibleWritableRaster(w, h); for (int y = 0; y < h; y++) { for (int x = 0; x < w; x++) { raster.getPixel(x, y, samples); dst_raster.setPixel(x, y, samples); } } return dst_raster; }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/558542f2f668a53027929612941782dbdbb712e1/AbstractSurfaceGraphics.java/clean/gui/src/awt/org/jnode/awt/util/AbstractSurfaceGraphics.java
|
||
for (int y = 0; y < h; y++) { for (int x = 0; x < w; x++) { raster.getPixel(x, y, samples); dst_raster.setPixel(x, y, samples);
|
if(dst_model instanceof DirectColorModel) if(model instanceof ComponentColorModel){ for (int y = 0; y < h; y++) for (int x = 0; x < w; x++) dst_raster.setPixel(x, y, raster.getPixel(x, y, samples)); } else if(model instanceof IndexColorModel){ final IndexColorModel icm = (IndexColorModel) model; for (int y = 0; y < h; y++) for (int x = 0; x < w; x++){ int sample = raster.getSample(x, y, 0); samples[0] = icm.getRed(sample); samples[1] = icm.getGreen(sample); samples[2] = icm.getBlue(sample); samples[3] = icm.getAlpha(sample); dst_raster.setPixel(x, y, samples); } } else { log.error("Unimplemented raster conversion"); return raster;
|
private Raster createCompatibleRaster(Raster raster) { //todo fix gif images (index color model?), optimize final ColorModel dst_model = surface.getColorModel(); final int[] samples = new int[4]; final int w = raster.getWidth(); final int h = raster.getHeight(); final WritableRaster dst_raster = dst_model.createCompatibleWritableRaster(w, h); for (int y = 0; y < h; y++) { for (int x = 0; x < w; x++) { raster.getPixel(x, y, samples); dst_raster.setPixel(x, y, samples); } } return dst_raster; }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/558542f2f668a53027929612941782dbdbb712e1/AbstractSurfaceGraphics.java/clean/gui/src/awt/org/jnode/awt/util/AbstractSurfaceGraphics.java
|
return dst_raster;
|
return dst_raster;
|
private Raster createCompatibleRaster(Raster raster) { //todo fix gif images (index color model?), optimize final ColorModel dst_model = surface.getColorModel(); final int[] samples = new int[4]; final int w = raster.getWidth(); final int h = raster.getHeight(); final WritableRaster dst_raster = dst_model.createCompatibleWritableRaster(w, h); for (int y = 0; y < h; y++) { for (int x = 0; x < w; x++) { raster.getPixel(x, y, samples); dst_raster.setPixel(x, y, samples); } } return dst_raster; }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/558542f2f668a53027929612941782dbdbb712e1/AbstractSurfaceGraphics.java/clean/gui/src/awt/org/jnode/awt/util/AbstractSurfaceGraphics.java
|
final Raster raster = ((BufferedImage) image).getRaster();
|
final BufferedImage b_image = (BufferedImage) image; final Raster raster = b_image.getRaster();
|
private Raster getCompatibleRaster(Image image) throws InterruptedException { final ColorModel dstModel = surface.getColorModel(); if (image instanceof BufferedImage) { // We have a direct raster final Raster raster = ((BufferedImage) image).getRaster(); if (dstModel.isCompatibleRaster(raster)) { // Raster is compatible, return without changes return raster; } else { // Convert it into a compatible raster return createCompatibleRaster(raster); } } else if (image instanceof RenderedImage) { // We have a direct raster final Raster raster = ((RenderedImage) image).getData(); if (dstModel.isCompatibleRaster(raster)) { // Raster is compatible, return without changes return raster; } else { // Convert it into a compatible raster return createCompatibleRaster(raster); } } else { // Convert it to a raster final PixelGrabber grabber = new PixelGrabber(image, 0, 0, -1, -1, true); if (grabber.grabPixels()) { final int w = grabber.getWidth(); final int h = grabber.getHeight(); final WritableRaster raster = dstModel.createCompatibleWritableRaster(w, h); final int[] pixels = (int[]) grabber.getPixels(); Object dataElems = null; for (int y = 0; y < h; y++) { final int ofsY = y * w; for (int x = 0; x < w; x++) { final int rgb = pixels[ofsY + x]; dataElems = dstModel.getDataElements(rgb, dataElems); raster.setDataElements(x, y, dataElems); } } return raster; } else { throw new IllegalArgumentException("Cannot grab pixels"); } } }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/558542f2f668a53027929612941782dbdbb712e1/AbstractSurfaceGraphics.java/clean/gui/src/awt/org/jnode/awt/util/AbstractSurfaceGraphics.java
|
return createCompatibleRaster(raster);
|
return createCompatibleRaster(raster, b_image.getColorModel());
|
private Raster getCompatibleRaster(Image image) throws InterruptedException { final ColorModel dstModel = surface.getColorModel(); if (image instanceof BufferedImage) { // We have a direct raster final Raster raster = ((BufferedImage) image).getRaster(); if (dstModel.isCompatibleRaster(raster)) { // Raster is compatible, return without changes return raster; } else { // Convert it into a compatible raster return createCompatibleRaster(raster); } } else if (image instanceof RenderedImage) { // We have a direct raster final Raster raster = ((RenderedImage) image).getData(); if (dstModel.isCompatibleRaster(raster)) { // Raster is compatible, return without changes return raster; } else { // Convert it into a compatible raster return createCompatibleRaster(raster); } } else { // Convert it to a raster final PixelGrabber grabber = new PixelGrabber(image, 0, 0, -1, -1, true); if (grabber.grabPixels()) { final int w = grabber.getWidth(); final int h = grabber.getHeight(); final WritableRaster raster = dstModel.createCompatibleWritableRaster(w, h); final int[] pixels = (int[]) grabber.getPixels(); Object dataElems = null; for (int y = 0; y < h; y++) { final int ofsY = y * w; for (int x = 0; x < w; x++) { final int rgb = pixels[ofsY + x]; dataElems = dstModel.getDataElements(rgb, dataElems); raster.setDataElements(x, y, dataElems); } } return raster; } else { throw new IllegalArgumentException("Cannot grab pixels"); } } }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/558542f2f668a53027929612941782dbdbb712e1/AbstractSurfaceGraphics.java/clean/gui/src/awt/org/jnode/awt/util/AbstractSurfaceGraphics.java
|
final Raster raster = ((RenderedImage) image).getData();
|
final RenderedImage r_image = (RenderedImage) image; final Raster raster = r_image.getData();
|
private Raster getCompatibleRaster(Image image) throws InterruptedException { final ColorModel dstModel = surface.getColorModel(); if (image instanceof BufferedImage) { // We have a direct raster final Raster raster = ((BufferedImage) image).getRaster(); if (dstModel.isCompatibleRaster(raster)) { // Raster is compatible, return without changes return raster; } else { // Convert it into a compatible raster return createCompatibleRaster(raster); } } else if (image instanceof RenderedImage) { // We have a direct raster final Raster raster = ((RenderedImage) image).getData(); if (dstModel.isCompatibleRaster(raster)) { // Raster is compatible, return without changes return raster; } else { // Convert it into a compatible raster return createCompatibleRaster(raster); } } else { // Convert it to a raster final PixelGrabber grabber = new PixelGrabber(image, 0, 0, -1, -1, true); if (grabber.grabPixels()) { final int w = grabber.getWidth(); final int h = grabber.getHeight(); final WritableRaster raster = dstModel.createCompatibleWritableRaster(w, h); final int[] pixels = (int[]) grabber.getPixels(); Object dataElems = null; for (int y = 0; y < h; y++) { final int ofsY = y * w; for (int x = 0; x < w; x++) { final int rgb = pixels[ofsY + x]; dataElems = dstModel.getDataElements(rgb, dataElems); raster.setDataElements(x, y, dataElems); } } return raster; } else { throw new IllegalArgumentException("Cannot grab pixels"); } } }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/558542f2f668a53027929612941782dbdbb712e1/AbstractSurfaceGraphics.java/clean/gui/src/awt/org/jnode/awt/util/AbstractSurfaceGraphics.java
|
return createCompatibleRaster(raster);
|
return createCompatibleRaster(raster, r_image.getColorModel());
|
private Raster getCompatibleRaster(Image image) throws InterruptedException { final ColorModel dstModel = surface.getColorModel(); if (image instanceof BufferedImage) { // We have a direct raster final Raster raster = ((BufferedImage) image).getRaster(); if (dstModel.isCompatibleRaster(raster)) { // Raster is compatible, return without changes return raster; } else { // Convert it into a compatible raster return createCompatibleRaster(raster); } } else if (image instanceof RenderedImage) { // We have a direct raster final Raster raster = ((RenderedImage) image).getData(); if (dstModel.isCompatibleRaster(raster)) { // Raster is compatible, return without changes return raster; } else { // Convert it into a compatible raster return createCompatibleRaster(raster); } } else { // Convert it to a raster final PixelGrabber grabber = new PixelGrabber(image, 0, 0, -1, -1, true); if (grabber.grabPixels()) { final int w = grabber.getWidth(); final int h = grabber.getHeight(); final WritableRaster raster = dstModel.createCompatibleWritableRaster(w, h); final int[] pixels = (int[]) grabber.getPixels(); Object dataElems = null; for (int y = 0; y < h; y++) { final int ofsY = y * w; for (int x = 0; x < w; x++) { final int rgb = pixels[ofsY + x]; dataElems = dstModel.getDataElements(rgb, dataElems); raster.setDataElements(x, y, dataElems); } } return raster; } else { throw new IllegalArgumentException("Cannot grab pixels"); } } }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/558542f2f668a53027929612941782dbdbb712e1/AbstractSurfaceGraphics.java/clean/gui/src/awt/org/jnode/awt/util/AbstractSurfaceGraphics.java
|
if (p.offset < lastOffset) { throw new VirtualMachineError(
|
if (p.offset < lastOffset) { throw new InternalError(
|
final void lock() { AddressPcEntry p = list; int count = 0; final ArrayList methods = new ArrayList(); while (p != null) { count++; final VmMethod m = p.method; if (!methods.contains(m)) { methods.add(m); } p = p.next; } final int[] table = new int[ count * 3]; this.methodTable = (VmMethod[]) methods.toArray(new VmMethod[ methods .size()]); p = list; int i = 0; int lastOffset = -1; while (p != null) { table[ i + 0] = methods.indexOf(p.method); table[ i + 1] = p.pc; table[ i + 2] = p.offset; if (p.offset < lastOffset) { throw new VirtualMachineError( "unordered offset found"); } lastOffset = p.offset; i += 3; p = p.next; } this.table = table; this.list = null; }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/b2ed890086e708f00d163f3e8514bfa8b353f662/VmAddressMap.java/buggy/core/src/core/org/jnode/vm/classmgr/VmAddressMap.java
|
if (lowerBound < 1) throw new IllegalArgumentException("lowerBound may not be less than 1");
|
public JobMediaSheetsSupported(int lowerBound, int upperBound) { super(lowerBound, upperBound); }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/a78ab2f492456918e4f5c52be600854882e139fc/JobMediaSheetsSupported.java/clean/core/src/classpath/javax/javax/print/attribute/standard/JobMediaSheetsSupported.java
|
|
workR.setBounds(r,c,getCol(ePos),getRow(ePos));
|
workR.setBounds(r,c,c2,r2);
|
protected final void copyMe() { Clipboard cb = Toolkit.getDefaultToolkit().getSystemClipboard(); StringBuffer s = new StringBuffer(); if (!gui.rubberband.isAreaSelected()) workR.setBounds(0,0,numCols,numRows); else { // lets get the bounding area using a rectangle that we have already // allocated gui.rubberband.getBoundingArea(workR); // get starting row and column int sPos = getRowColFromPoint(workR.x , workR.y ); // get the width and height int ePos = getRowColFromPoint(workR.width , workR.height ); int r = getRow(sPos); int c = getCol(sPos); workR.setBounds(r,c,getCol(ePos),getRow(ePos)); gui.rubberband.reset(); gui.repaint(); } System.out.println("Copying"); System.out.println(workR); // loop through all the screen characters to send them to the clip board int m = workR.x; int i = 0; int t = 0; while (workR.height-- > 0) { t = workR.width; i = workR.y; while (t-- > 0) { // only copy printable characters (in this case >= ' ') char c = screen[getPos(m,i)].getChar(); if (c >= ' ' && !screen[getPos(m,i)].nonDisplay) s.append(c); else s.append(' '); i++; } s.append('\n'); m++; } StringSelection contents = new StringSelection(s.toString()); cb.setContents(contents, null); }
|
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/e95e8529e0583c40804063baff9fc99787c4f55b/Screen5250.java/buggy/tn5250j/src/org/tn5250j/Screen5250.java
|
if (tArea.contains(x,y)) {
|
public int getRowColFromPoint (int x, int y) { // is x,y in the drawing area // x is left to right and y is top to bottom if (tArea.contains(x,y)) {// int cols = (numCols - ((((fmWidth * numCols) - x) / fmWidth)));// System.out.println(cols); return getPos((numRows - ((((fmHeight * (numRows)) - y) / fmHeight))), (numCols - ((((fmWidth * (numCols)) - x) / fmWidth))) ); } return 0; }
|
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/e95e8529e0583c40804063baff9fc99787c4f55b/Screen5250.java/buggy/tn5250j/src/org/tn5250j/Screen5250.java
|
|
return getPos((numRows - ((((fmHeight * (numRows)) - y) / fmHeight))), (numCols - ((((fmWidth * (numCols)) - x) / fmWidth))) );
|
public int getRowColFromPoint (int x, int y) { // is x,y in the drawing area // x is left to right and y is top to bottom if (tArea.contains(x,y)) {// int cols = (numCols - ((((fmWidth * numCols) - x) / fmWidth)));// System.out.println(cols); return getPos((numRows - ((((fmHeight * (numRows)) - y) / fmHeight))), (numCols - ((((fmWidth * (numCols)) - x) / fmWidth))) ); } return 0; }
|
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/e95e8529e0583c40804063baff9fc99787c4f55b/Screen5250.java/buggy/tn5250j/src/org/tn5250j/Screen5250.java
|
|
}
|
if (x > tArea.getMaxX()) x = (int)tArea.getMaxX() - 1; if (y > tArea.getMaxY()) y = (int)tArea.getMaxY() - 1; if (x < tArea.getMinX()) x = 0; if (y < tArea.getMinY()) y = 0;
|
public int getRowColFromPoint (int x, int y) { // is x,y in the drawing area // x is left to right and y is top to bottom if (tArea.contains(x,y)) {// int cols = (numCols - ((((fmWidth * numCols) - x) / fmWidth)));// System.out.println(cols); return getPos((numRows - ((((fmHeight * (numRows)) - y) / fmHeight))), (numCols - ((((fmWidth * (numCols)) - x) / fmWidth))) ); } return 0; }
|
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/e95e8529e0583c40804063baff9fc99787c4f55b/Screen5250.java/buggy/tn5250j/src/org/tn5250j/Screen5250.java
|
return 0;
|
int s = fmWidth * numCols; int t = s - x; int u = t / fmWidth; int v = numCols - u; int s0 = y / fmHeight; int s1 = x / fmWidth; return getPos(s0, s1 );
|
public int getRowColFromPoint (int x, int y) { // is x,y in the drawing area // x is left to right and y is top to bottom if (tArea.contains(x,y)) {// int cols = (numCols - ((((fmWidth * numCols) - x) / fmWidth)));// System.out.println(cols); return getPos((numRows - ((((fmHeight * (numRows)) - y) / fmHeight))), (numCols - ((((fmWidth * (numCols)) - x) / fmWidth))) ); } return 0; }
|
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/e95e8529e0583c40804063baff9fc99787c4f55b/Screen5250.java/buggy/tn5250j/src/org/tn5250j/Screen5250.java
|
pos -= (numCols + 1);
|
public void moveCursor (MouseEvent e) { if(!keyboardLocked) { int pos = getRowColFromPoint(e.getX(),e.getY());// System.out.println((getRow(pos)) + "," + (getCol(pos)));// System.out.println(e.getX() + "," + e.getY()+ "," + fmWidth+ "," + fmHeight); if (pos == 0) return ; // because getRowColFromPoint returns offset of 1,1 we need to // translate to offset 0,0 pos -= (numCols + 1); int g = screen[pos].getWhichGUI(); // lets check for hot spots if (g >= ScreenChar.BUTTON_LEFT && g <= ScreenChar.BUTTON_LAST) { StringBuffer aid = new StringBuffer(); boolean aidFlag = true; switch (g) { case ScreenChar.BUTTON_RIGHT: case ScreenChar.BUTTON_MIDDLE: while (screen[--pos].getWhichGUI() != ScreenChar.BUTTON_LEFT) { } case ScreenChar.BUTTON_LEFT: if (screen[pos].getChar() == 'F') { pos++; } else aidFlag=false; if (screen[pos+1].getChar() != '=' && screen[pos+1].getChar() != '.' && screen[pos+1].getChar() != '/' ) {// System.out.println(" Hotspot clicked!!! we will send characters " +// screen[pos].getChar() +// screen[pos+1].getChar()); aid.append(screen[pos].getChar()); aid.append(screen[pos + 1].getChar()); } else {// System.out.println(" Hotspot clicked!!! we will send character " +// screen[pos].getChar());// aid.append(screen[pos].getChar()); } break; } if (aidFlag) { switch (g) { case ScreenChar.BUTTON_LEFT_UP: case ScreenChar.BUTTON_MIDDLE_UP: case ScreenChar.BUTTON_RIGHT_UP: case ScreenChar.BUTTON_ONE_UP: case ScreenChar.BUTTON_SB_UP: case ScreenChar.BUTTON_SB_GUIDE: gui.sendAidKey(tnvt.AID_ROLL_UP); break; case ScreenChar.BUTTON_LEFT_DN: case ScreenChar.BUTTON_MIDDLE_DN: case ScreenChar.BUTTON_RIGHT_DN: case ScreenChar.BUTTON_ONE_DN: case ScreenChar.BUTTON_SB_DN: case ScreenChar.BUTTON_SB_THUMB: gui.sendAidKey(tnvt.AID_ROLL_DOWN); break; case ScreenChar.BUTTON_LEFT_EB: case ScreenChar.BUTTON_MIDDLE_EB: case ScreenChar.BUTTON_RIGHT_EB: System.out.println("Send to external Browser"); break; default: int aidKey = Integer.parseInt(aid.toString()); if (aidKey >= 1 && aidKey <= 12) gui.sendAidKey(0x30 + aidKey); if (aidKey >= 13 && aidKey <= 24) gui.sendAidKey(0xB0 + (aidKey - 12)); } } else { if (screenFields.getCurrentField() != null) { int xPos = screenFields.getCurrentField().startPos(); for (int x = 0; x < aid.length(); x++) {// System.out.println(sr + "," + (sc + x) + " " + aid.charAt(x)); screen[xPos + x].setChar(aid.charAt(x)); }// System.out.println(aid); screenFields.setCurrentFieldMDT(); gui.sendAidKey(tnvt.AID_ENTER); } } } else { if (gui.rubberband.isAreaSelected()) { gui.rubberband.reset(); gui.repaint(); } goto_XY(pos); isInField(lastPos); } } gui.requestFocus(); }
|
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/e95e8529e0583c40804063baff9fc99787c4f55b/Screen5250.java/buggy/tn5250j/src/org/tn5250j/Screen5250.java
|
|
protected synchronized void paintComponent2(Graphics2D g2) {
|
protected void paintComponent2(Graphics2D g2) {
|
protected synchronized void paintComponent2(Graphics2D g2) { Rectangle r = g2.getClipBounds(); g2.setColor(colorBg);// System.out.println("PaintComponent " + r); g2.fillRect(r.x,r.y,r.width,r.height); int sPos = getRowColFromPoint(r.x, r.y); // fix me here int er = (numRows - ((((fmHeight * (numRows + 1)) - ((r.y + r.height) + fmHeight)) / fmHeight))); int ec = (numCols - ((((fmWidth * (numCols + 1)) - ((r.x + r.width) + fmWidth)) / fmWidth))); int sr = getRow(sPos); int c = getCol(sPos); er--; ec--;// System.out.println(sr + "," + c + "," + er + "," + ec); workR.setBounds(sr,c,ec,er); int rows = er - sr; int cols = 0; int lr = workR.x; int lc = 0; lr = sPos; while (rows-- >= 0) { cols = ec - c; lc = lr; while (cols-- >= 0) { screen[lc++].drawChar(g2); } lr += numCols; } }
|
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/e95e8529e0583c40804063baff9fc99787c4f55b/Screen5250.java/buggy/tn5250j/src/org/tn5250j/Screen5250.java
|
screen[lc++].drawChar(g2);
|
if (lc >= 0 && lc < lenScreen) screen[lc++].drawChar(g2);
|
protected synchronized void paintComponent2(Graphics2D g2) { Rectangle r = g2.getClipBounds(); g2.setColor(colorBg);// System.out.println("PaintComponent " + r); g2.fillRect(r.x,r.y,r.width,r.height); int sPos = getRowColFromPoint(r.x, r.y); // fix me here int er = (numRows - ((((fmHeight * (numRows + 1)) - ((r.y + r.height) + fmHeight)) / fmHeight))); int ec = (numCols - ((((fmWidth * (numCols + 1)) - ((r.x + r.width) + fmWidth)) / fmWidth))); int sr = getRow(sPos); int c = getCol(sPos); er--; ec--;// System.out.println(sr + "," + c + "," + er + "," + ec); workR.setBounds(sr,c,ec,er); int rows = er - sr; int cols = 0; int lr = workR.x; int lc = 0; lr = sPos; while (rows-- >= 0) { cols = ec - c; lc = lr; while (cols-- >= 0) { screen[lc++].drawChar(g2); } lr += numCols; } }
|
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/e95e8529e0583c40804063baff9fc99787c4f55b/Screen5250.java/buggy/tn5250j/src/org/tn5250j/Screen5250.java
|
protected void paintComponent3(Graphics g) {// System.out.println("paint from screen"); Graphics2D g2 = (Graphics2D)g;// Rectangle r = g.getClipBounds(); g2.setColor(colorBg); g2.fillRect(0,0,gui.getWidth(),gui.getHeight()); bi.drawImageBuffer(g2);// g2.drawImage(bi.getImageBuffer(),null,0,0); }
|
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/e95e8529e0583c40804063baff9fc99787c4f55b/Screen5250.java/buggy/tn5250j/src/org/tn5250j/Screen5250.java
|
||
resetError();
|
setCursorActive(false); simulateMnemonic(getMnemonicValue("[reset]")); setCursorActive(true);
|
public void sendKeys(String text) {// if (text == null) {// return;// } if (isStatusErrorCode() && !resetRequired) { resetError();// if (!cursorActive)// setCursorOn(); } if (keyboardLocked) { if(text.equals("[reset]") || text.equals("[sysreq]") || text.equals("[attn]")) { simulateMnemonic(getMnemonicValue(text)); } else { if (isStatusErrorCode()) { Toolkit.getDefaultToolkit().beep(); return; } keysBuffered = true; setKBIndicatorOn(); if(bufferedKeys == null){ bufferedKeys = text; return; } else { bufferedKeys += text; return; } } } else { if (keysBuffered) { if (bufferedKeys != null) { text = bufferedKeys + text; }// if (text.length() == 0) { keysBuffered = false; setKBIndicatorOff();// } bufferedKeys = null; } // check to see if position is in a field and if it is then change // current field to that field isInField(lastPos,true); if (text.length() == 1 && !text.equals("[") && !text.equals("]")) {// setCursorOff2(); setCursorActive(false); simulateKeyStroke(text.charAt(0)); setCursorActive(true);// setCursorOn2();// System.out.println(" text one"); } else { strokenizer.setKeyStrokes(text); String s; boolean done = false;// setCursorOff2(); setCursorActive(false); while (!done) {// while (strokenizer.hasMoreKeyStrokes() && !keyboardLocked &&// !isStatusErrorCode() && !done) { if (strokenizer.hasMoreKeyStrokes()) { s = strokenizer.nextKeyStroke(); if (s.length() == 1) {// setCursorOn();// if (!keysBuffered) {// System.out.println(" s two" + s);// setCursorOn();// }// try { new Thread().sleep(400);} catch (InterruptedException ie) {} simulateKeyStroke(s.charAt(0));// System.out.println(" s two " + s + " " + cursorActive);// if (cursorActive && !keysBuffered) {// System.out.println(" s two" + s);// setCursorOn();// } } else { if (s != null) { simulateMnemonic(getMnemonicValue(s));// if (!cursorActive && !keysBuffered) {// System.out.println(" m one");// setCursorOn();// } } else System.out.println(" send keys mnemonic " + s); } if (keyboardLocked) { bufferedKeys = strokenizer.getUnprocessedKeyStroked(); if (bufferedKeys != null) { keysBuffered = true; setKBIndicatorOn(); } done = true; } } else {// setCursorActive(true);// setCursorOn(); done = true; } } setCursorActive(true); } } }
|
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/e95e8529e0583c40804063baff9fc99787c4f55b/Screen5250.java/buggy/tn5250j/src/org/tn5250j/Screen5250.java
|
setCursorActive(true);
|
public void sendKeys(String text) {// if (text == null) {// return;// } if (isStatusErrorCode() && !resetRequired) { resetError();// if (!cursorActive)// setCursorOn(); } if (keyboardLocked) { if(text.equals("[reset]") || text.equals("[sysreq]") || text.equals("[attn]")) { simulateMnemonic(getMnemonicValue(text)); } else { if (isStatusErrorCode()) { Toolkit.getDefaultToolkit().beep(); return; } keysBuffered = true; setKBIndicatorOn(); if(bufferedKeys == null){ bufferedKeys = text; return; } else { bufferedKeys += text; return; } } } else { if (keysBuffered) { if (bufferedKeys != null) { text = bufferedKeys + text; }// if (text.length() == 0) { keysBuffered = false; setKBIndicatorOff();// } bufferedKeys = null; } // check to see if position is in a field and if it is then change // current field to that field isInField(lastPos,true); if (text.length() == 1 && !text.equals("[") && !text.equals("]")) {// setCursorOff2(); setCursorActive(false); simulateKeyStroke(text.charAt(0)); setCursorActive(true);// setCursorOn2();// System.out.println(" text one"); } else { strokenizer.setKeyStrokes(text); String s; boolean done = false;// setCursorOff2(); setCursorActive(false); while (!done) {// while (strokenizer.hasMoreKeyStrokes() && !keyboardLocked &&// !isStatusErrorCode() && !done) { if (strokenizer.hasMoreKeyStrokes()) { s = strokenizer.nextKeyStroke(); if (s.length() == 1) {// setCursorOn();// if (!keysBuffered) {// System.out.println(" s two" + s);// setCursorOn();// }// try { new Thread().sleep(400);} catch (InterruptedException ie) {} simulateKeyStroke(s.charAt(0));// System.out.println(" s two " + s + " " + cursorActive);// if (cursorActive && !keysBuffered) {// System.out.println(" s two" + s);// setCursorOn();// } } else { if (s != null) { simulateMnemonic(getMnemonicValue(s));// if (!cursorActive && !keysBuffered) {// System.out.println(" m one");// setCursorOn();// } } else System.out.println(" send keys mnemonic " + s); } if (keyboardLocked) { bufferedKeys = strokenizer.getUnprocessedKeyStroked(); if (bufferedKeys != null) { keysBuffered = true; setKBIndicatorOn(); } done = true; } } else {// setCursorActive(true);// setCursorOn(); done = true; } } setCursorActive(true); } } }
|
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/e95e8529e0583c40804063baff9fc99787c4f55b/Screen5250.java/buggy/tn5250j/src/org/tn5250j/Screen5250.java
|
|
int pos = getRowColFromPoint(end.x,end.y) - (numCols + 1);
|
int pos = getRowColFromPoint(end.x,end.y);
|
public Point translateEnd(Point end) { // because getRowColFromPoint returns position offset as 1,1 we need // to translate as offset 0,0 int pos = getRowColFromPoint(end.x,end.y) - (numCols + 1); int x = screen[pos].x + fmWidth - 1; int y = screen[pos].y + fmHeight - 1;// System.out.println(" ex = " + x + " sx = " + rubberband.getStartPoint().x); end.setLocation(x,y); return end; }
|
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/e95e8529e0583c40804063baff9fc99787c4f55b/Screen5250.java/buggy/tn5250j/src/org/tn5250j/Screen5250.java
|
int x = screen[pos].x + fmWidth - 1; int y = screen[pos].y + fmHeight - 1;
|
int x = screen[pos].x + fmWidth - 1; int y = screen[pos].y + fmHeight - 1;
|
public Point translateEnd(Point end) { // because getRowColFromPoint returns position offset as 1,1 we need // to translate as offset 0,0 int pos = getRowColFromPoint(end.x,end.y) - (numCols + 1); int x = screen[pos].x + fmWidth - 1; int y = screen[pos].y + fmHeight - 1;// System.out.println(" ex = " + x + " sx = " + rubberband.getStartPoint().x); end.setLocation(x,y); return end; }
|
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/e95e8529e0583c40804063baff9fc99787c4f55b/Screen5250.java/buggy/tn5250j/src/org/tn5250j/Screen5250.java
|
end.setLocation(x,y);
|
end.setLocation(x,y);
|
public Point translateEnd(Point end) { // because getRowColFromPoint returns position offset as 1,1 we need // to translate as offset 0,0 int pos = getRowColFromPoint(end.x,end.y) - (numCols + 1); int x = screen[pos].x + fmWidth - 1; int y = screen[pos].y + fmHeight - 1;// System.out.println(" ex = " + x + " sx = " + rubberband.getStartPoint().x); end.setLocation(x,y); return end; }
|
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/e95e8529e0583c40804063baff9fc99787c4f55b/Screen5250.java/buggy/tn5250j/src/org/tn5250j/Screen5250.java
|
int pos = getRowColFromPoint(start.x,start.y) - (numCols + 1);
|
int pos = getRowColFromPoint(start.x,start.y);
|
public Point translateStart(Point start) { // because getRowColFromPoint returns position offset as 1,1 we need // to translate as offset 0,0 int pos = getRowColFromPoint(start.x,start.y) - (numCols + 1); start.setLocation(screen[pos].x,screen[pos].y); return start; }
|
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/e95e8529e0583c40804063baff9fc99787c4f55b/Screen5250.java/buggy/tn5250j/src/org/tn5250j/Screen5250.java
|
public void updateDirty() { Rectangle r = new Rectangle(dirty); // update the image updateImage(r); // update dirty to show that we have already painted that region of the // screen so do not do it again. dirty.setBounds(dirty.x,dirty.height,dirty.width,(int)(tArea.getHeight() - dirty.height)); }
|
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/e95e8529e0583c40804063baff9fc99787c4f55b/Screen5250.java/buggy/tn5250j/src/org/tn5250j/Screen5250.java
|
||
if (gui.isVisible() && height > 0 && width > 0) { bi.drawImageBuffer(gg2d,x,y,width,height);
|
if (gui.isVisible()) { if (height > 0 && width > 0) { bi.drawImageBuffer(gg2d,x,y,width,height); } else { }
|
protected synchronized void updateImage(int x, int y , int width, int height) { if (gg2d == null) { gg2d = (Graphics2D)gui.getGraphics();// System.out.println("was null"); } if (bi == null || gg2d == null) return; g2d.setClip(x,y,width,height); if (!cursorActive && x + width <= bi.getWidth(null) && y + height <= (bi.getHeight(null) - fmWidth)) { paintComponent2(g2d); } // fix for jdk1.4 - found this while testing under jdk1.4 // if the height and or the width are equal to zero we skip the // the updating of the image. if (gui.isVisible() && height > 0 && width > 0) { bi.drawImageBuffer(gg2d,x,y,width,height); } }
|
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/e95e8529e0583c40804063baff9fc99787c4f55b/Screen5250.java/buggy/tn5250j/src/org/tn5250j/Screen5250.java
|
pack();
|
pack();
|
private void centerMe() { pack(); //Center the window Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize(); Dimension frameSize = getSize(); if (frameSize.height > screenSize.height) frameSize.height = screenSize.height; if (frameSize.width > screenSize.width) frameSize.width = screenSize.width; setLocation((screenSize.width - frameSize.width) / 2, (screenSize.height - frameSize.height) / 2); }
|
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/587af9e9ad98a6fc095602838327da784630b619/SMTPConfig.java/buggy/tn5250j/src/org/tn5250j/mailtools/SMTPConfig.java
|
Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize(); Dimension frameSize = getSize(); if (frameSize.height > screenSize.height) frameSize.height = screenSize.height; if (frameSize.width > screenSize.width) frameSize.width = screenSize.width;
|
Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize(); Dimension frameSize = getSize(); if (frameSize.height > screenSize.height) frameSize.height = screenSize.height; if (frameSize.width > screenSize.width) frameSize.width = screenSize.width;
|
private void centerMe() { pack(); //Center the window Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize(); Dimension frameSize = getSize(); if (frameSize.height > screenSize.height) frameSize.height = screenSize.height; if (frameSize.width > screenSize.width) frameSize.width = screenSize.width; setLocation((screenSize.width - frameSize.width) / 2, (screenSize.height - frameSize.height) / 2); }
|
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/587af9e9ad98a6fc095602838327da784630b619/SMTPConfig.java/buggy/tn5250j/src/org/tn5250j/mailtools/SMTPConfig.java
|
setLocation((screenSize.width - frameSize.width) / 2, (screenSize.height - frameSize.height) / 2);
|
setLocation( (screenSize.width - frameSize.width) / 2, (screenSize.height - frameSize.height) / 2);
|
private void centerMe() { pack(); //Center the window Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize(); Dimension frameSize = getSize(); if (frameSize.height > screenSize.height) frameSize.height = screenSize.height; if (frameSize.width > screenSize.width) frameSize.width = screenSize.width; setLocation((screenSize.width - frameSize.width) / 2, (screenSize.height - frameSize.height) / 2); }
|
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/587af9e9ad98a6fc095602838327da784630b619/SMTPConfig.java/buggy/tn5250j/src/org/tn5250j/mailtools/SMTPConfig.java
|
}
|
}
|
private void centerMe() { pack(); //Center the window Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize(); Dimension frameSize = getSize(); if (frameSize.height > screenSize.height) frameSize.height = screenSize.height; if (frameSize.width > screenSize.width) frameSize.width = screenSize.width; setLocation((screenSize.width - frameSize.width) / 2, (screenSize.height - frameSize.height) / 2); }
|
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/587af9e9ad98a6fc095602838327da784630b619/SMTPConfig.java/buggy/tn5250j/src/org/tn5250j/mailtools/SMTPConfig.java
|
setTitle(LangTool.getString("em.configTitle")); mainPanel.setLayout(borderLayout1); labelHost.setText(LangTool.getString("em.labelHost")); fieldHost.setColumns(20); labelPort.setText(LangTool.getString("em.labelPort")); fieldPort.setColumns(5); labelFrom.setText(LangTool.getString("em.labelFrom")); fieldFrom.setColumns(20); optDone.setText(LangTool.getString("em.optDone")); optDone.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(ActionEvent e) { optDone_actionPerformed(e); } });
|
setTitle(LangTool.getString("em.configTitle")); mainPanel.setLayout(borderLayout1); labelHost.setText(LangTool.getString("em.labelHost")); fieldHost.setColumns(20); labelPort.setText(LangTool.getString("em.labelPort")); fieldPort.setColumns(3); labelDefault.setText(LangTool.getString("em.labelDefault")); labelName.setText(LangTool.getString("em.labelName")); fieldName.setColumns(20); labelFrom.setText(LangTool.getString("em.labelFrom")); fieldFrom.setColumns(20); optDone.setPreferredSize(new Dimension(100, 27)); optDone.setText(LangTool.getString("em.optDone")); optDone.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(ActionEvent e) { optDone_actionPerformed(e); } });
|
void jbInit() throws Exception { setTitle(LangTool.getString("em.configTitle")); mainPanel.setLayout(borderLayout1); labelHost.setText(LangTool.getString("em.labelHost")); fieldHost.setColumns(20); labelPort.setText(LangTool.getString("em.labelPort")); fieldPort.setColumns(5); labelFrom.setText(LangTool.getString("em.labelFrom")); fieldFrom.setColumns(20); optDone.setText(LangTool.getString("em.optDone")); optDone.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(ActionEvent e) { optDone_actionPerformed(e); } }); optCancel.setText(LangTool.getString("em.optCancelLabel")); optCancel.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(ActionEvent e) { optCancel_actionPerformed(e); } }); labelFileName.setText(LangTool.getString("em.labelFileName")); fieldFileName.setText("tn5250j.txt"); fieldFileName.setColumns(20); optionsPanel.add(optDone, null); optionsPanel.add(optCancel, null); getContentPane().add(mainPanel); mainPanel.add(configPanel, BorderLayout.CENTER); configPanel.add(labelHost, null); mainPanel.add(optionsPanel, BorderLayout.SOUTH); configPanel.add(fieldHost, null); configPanel.add(labelPort, null); configPanel.add(fieldPort, null); configPanel.add(labelFrom, null); configPanel.add(fieldFrom, null); configPanel.add(labelFileName, null); configPanel.add(fieldFileName, null); configPanel.setLayout(alignLayout); if (loadConfig(null)) { setProperties(); } centerMe(); }
|
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/587af9e9ad98a6fc095602838327da784630b619/SMTPConfig.java/buggy/tn5250j/src/org/tn5250j/mailtools/SMTPConfig.java
|
optCancel.setText(LangTool.getString("em.optCancelLabel")); optCancel.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(ActionEvent e) { optCancel_actionPerformed(e); } });
|
optCancel.setPreferredSize(new Dimension(100, 27)); optCancel.setText(LangTool.getString("em.optCancelLabel")); optCancel.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(ActionEvent e) { optCancel_actionPerformed(e); } });
|
void jbInit() throws Exception { setTitle(LangTool.getString("em.configTitle")); mainPanel.setLayout(borderLayout1); labelHost.setText(LangTool.getString("em.labelHost")); fieldHost.setColumns(20); labelPort.setText(LangTool.getString("em.labelPort")); fieldPort.setColumns(5); labelFrom.setText(LangTool.getString("em.labelFrom")); fieldFrom.setColumns(20); optDone.setText(LangTool.getString("em.optDone")); optDone.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(ActionEvent e) { optDone_actionPerformed(e); } }); optCancel.setText(LangTool.getString("em.optCancelLabel")); optCancel.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(ActionEvent e) { optCancel_actionPerformed(e); } }); labelFileName.setText(LangTool.getString("em.labelFileName")); fieldFileName.setText("tn5250j.txt"); fieldFileName.setColumns(20); optionsPanel.add(optDone, null); optionsPanel.add(optCancel, null); getContentPane().add(mainPanel); mainPanel.add(configPanel, BorderLayout.CENTER); configPanel.add(labelHost, null); mainPanel.add(optionsPanel, BorderLayout.SOUTH); configPanel.add(fieldHost, null); configPanel.add(labelPort, null); configPanel.add(fieldPort, null); configPanel.add(labelFrom, null); configPanel.add(fieldFrom, null); configPanel.add(labelFileName, null); configPanel.add(fieldFileName, null); configPanel.setLayout(alignLayout); if (loadConfig(null)) { setProperties(); } centerMe(); }
|
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/587af9e9ad98a6fc095602838327da784630b619/SMTPConfig.java/buggy/tn5250j/src/org/tn5250j/mailtools/SMTPConfig.java
|
labelFileName.setText(LangTool.getString("em.labelFileName")); fieldFileName.setText("tn5250j.txt"); fieldFileName.setColumns(20); optionsPanel.add(optDone, null); optionsPanel.add(optCancel, null); getContentPane().add(mainPanel);
|
labelFileName.setText(LangTool.getString("em.labelFileName")); fieldFileName.setText("tn5250j.txt"); fieldFileName.setColumns(20);
|
void jbInit() throws Exception { setTitle(LangTool.getString("em.configTitle")); mainPanel.setLayout(borderLayout1); labelHost.setText(LangTool.getString("em.labelHost")); fieldHost.setColumns(20); labelPort.setText(LangTool.getString("em.labelPort")); fieldPort.setColumns(5); labelFrom.setText(LangTool.getString("em.labelFrom")); fieldFrom.setColumns(20); optDone.setText(LangTool.getString("em.optDone")); optDone.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(ActionEvent e) { optDone_actionPerformed(e); } }); optCancel.setText(LangTool.getString("em.optCancelLabel")); optCancel.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(ActionEvent e) { optCancel_actionPerformed(e); } }); labelFileName.setText(LangTool.getString("em.labelFileName")); fieldFileName.setText("tn5250j.txt"); fieldFileName.setColumns(20); optionsPanel.add(optDone, null); optionsPanel.add(optCancel, null); getContentPane().add(mainPanel); mainPanel.add(configPanel, BorderLayout.CENTER); configPanel.add(labelHost, null); mainPanel.add(optionsPanel, BorderLayout.SOUTH); configPanel.add(fieldHost, null); configPanel.add(labelPort, null); configPanel.add(fieldPort, null); configPanel.add(labelFrom, null); configPanel.add(fieldFrom, null); configPanel.add(labelFileName, null); configPanel.add(fieldFileName, null); configPanel.setLayout(alignLayout); if (loadConfig(null)) { setProperties(); } centerMe(); }
|
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/587af9e9ad98a6fc095602838327da784630b619/SMTPConfig.java/buggy/tn5250j/src/org/tn5250j/mailtools/SMTPConfig.java
|
mainPanel.add(configPanel, BorderLayout.CENTER); configPanel.add(labelHost, null); mainPanel.add(optionsPanel, BorderLayout.SOUTH); configPanel.add(fieldHost, null); configPanel.add(labelPort, null); configPanel.add(fieldPort, null); configPanel.add(labelFrom, null); configPanel.add(fieldFrom, null); configPanel.add(labelFileName, null); configPanel.add(fieldFileName, null); configPanel.setLayout(alignLayout);
|
gbc = new GridBagConstraints(); gbc.gridx = 0; gbc.gridy = 0; gbc.insets = new Insets(10, 10, 5, 5); gbc.anchor = GridBagConstraints.WEST; configPanel.add(labelHost, gbc); gbc = new GridBagConstraints(); gbc.gridx = 1; gbc.gridy = 0; gbc.gridwidth = 2; gbc.insets = new Insets(10, 5, 5, 10); gbc.anchor = GridBagConstraints.WEST; configPanel.add(fieldHost, gbc); gbc = new GridBagConstraints(); gbc.gridx = 0; gbc.gridy = 1; gbc.insets = new Insets(5, 10, 5, 5); gbc.anchor = GridBagConstraints.WEST; configPanel.add(labelPort, gbc); gbc = new GridBagConstraints(); gbc.gridx = 1; gbc.gridy = 1; gbc.insets = new Insets(5, 5, 5, 5); gbc.anchor = GridBagConstraints.WEST; configPanel.add(fieldPort, gbc); gbc = new GridBagConstraints(); gbc.gridx = 2; gbc.gridy = 1; gbc.insets = new Insets(5, 15, 5, 10); gbc.anchor = GridBagConstraints.WEST; configPanel.add(labelDefault, gbc); gbc = new GridBagConstraints(); gbc.gridx = 0; gbc.gridy = 2; gbc.insets = new Insets(5, 10, 5, 5); gbc.anchor = GridBagConstraints.WEST; configPanel.add(labelName, gbc); gbc = new GridBagConstraints(); gbc.gridx = 1; gbc.gridy = 2; gbc.gridwidth = 2; gbc.insets = new Insets(5, 5, 5, 10); gbc.anchor = GridBagConstraints.WEST; configPanel.add(fieldName, gbc); gbc = new GridBagConstraints(); gbc.gridx = 0; gbc.gridy = 3; gbc.insets = new Insets(5, 10, 5, 5); gbc.anchor = GridBagConstraints.WEST; configPanel.add(labelFrom, gbc); gbc.gridx = 1; gbc.gridy = 3; gbc.gridwidth = 2; gbc.insets = new Insets(5, 5, 5, 10); gbc.anchor = GridBagConstraints.WEST; configPanel.add(fieldFrom, gbc); gbc.gridx = 0; gbc.gridy = 4; gbc.gridwidth = 1; gbc.insets = new Insets(5, 10, 0, 5); gbc.anchor = GridBagConstraints.WEST; configPanel.add(labelFileName, gbc); gbc.gridx = 1; gbc.gridy = 4; gbc.gridwidth = 2; gbc.insets = new Insets(5, 5, 0, 10); gbc.anchor = GridBagConstraints.WEST; configPanel.add(fieldFileName, gbc);
|
void jbInit() throws Exception { setTitle(LangTool.getString("em.configTitle")); mainPanel.setLayout(borderLayout1); labelHost.setText(LangTool.getString("em.labelHost")); fieldHost.setColumns(20); labelPort.setText(LangTool.getString("em.labelPort")); fieldPort.setColumns(5); labelFrom.setText(LangTool.getString("em.labelFrom")); fieldFrom.setColumns(20); optDone.setText(LangTool.getString("em.optDone")); optDone.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(ActionEvent e) { optDone_actionPerformed(e); } }); optCancel.setText(LangTool.getString("em.optCancelLabel")); optCancel.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(ActionEvent e) { optCancel_actionPerformed(e); } }); labelFileName.setText(LangTool.getString("em.labelFileName")); fieldFileName.setText("tn5250j.txt"); fieldFileName.setColumns(20); optionsPanel.add(optDone, null); optionsPanel.add(optCancel, null); getContentPane().add(mainPanel); mainPanel.add(configPanel, BorderLayout.CENTER); configPanel.add(labelHost, null); mainPanel.add(optionsPanel, BorderLayout.SOUTH); configPanel.add(fieldHost, null); configPanel.add(labelPort, null); configPanel.add(fieldPort, null); configPanel.add(labelFrom, null); configPanel.add(fieldFrom, null); configPanel.add(labelFileName, null); configPanel.add(fieldFileName, null); configPanel.setLayout(alignLayout); if (loadConfig(null)) { setProperties(); } centerMe(); }
|
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/587af9e9ad98a6fc095602838327da784630b619/SMTPConfig.java/buggy/tn5250j/src/org/tn5250j/mailtools/SMTPConfig.java
|
if (loadConfig(null)) {
|
mainPanel.add(configPanel, BorderLayout.NORTH); optionsPanel.add(optDone); optionsPanel.add(optCancel); mainPanel.add(optionsPanel, BorderLayout.SOUTH);
|
void jbInit() throws Exception { setTitle(LangTool.getString("em.configTitle")); mainPanel.setLayout(borderLayout1); labelHost.setText(LangTool.getString("em.labelHost")); fieldHost.setColumns(20); labelPort.setText(LangTool.getString("em.labelPort")); fieldPort.setColumns(5); labelFrom.setText(LangTool.getString("em.labelFrom")); fieldFrom.setColumns(20); optDone.setText(LangTool.getString("em.optDone")); optDone.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(ActionEvent e) { optDone_actionPerformed(e); } }); optCancel.setText(LangTool.getString("em.optCancelLabel")); optCancel.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(ActionEvent e) { optCancel_actionPerformed(e); } }); labelFileName.setText(LangTool.getString("em.labelFileName")); fieldFileName.setText("tn5250j.txt"); fieldFileName.setColumns(20); optionsPanel.add(optDone, null); optionsPanel.add(optCancel, null); getContentPane().add(mainPanel); mainPanel.add(configPanel, BorderLayout.CENTER); configPanel.add(labelHost, null); mainPanel.add(optionsPanel, BorderLayout.SOUTH); configPanel.add(fieldHost, null); configPanel.add(labelPort, null); configPanel.add(fieldPort, null); configPanel.add(labelFrom, null); configPanel.add(fieldFrom, null); configPanel.add(labelFileName, null); configPanel.add(fieldFileName, null); configPanel.setLayout(alignLayout); if (loadConfig(null)) { setProperties(); } centerMe(); }
|
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/587af9e9ad98a6fc095602838327da784630b619/SMTPConfig.java/buggy/tn5250j/src/org/tn5250j/mailtools/SMTPConfig.java
|
setProperties();
|
getContentPane().add(mainPanel);
|
void jbInit() throws Exception { setTitle(LangTool.getString("em.configTitle")); mainPanel.setLayout(borderLayout1); labelHost.setText(LangTool.getString("em.labelHost")); fieldHost.setColumns(20); labelPort.setText(LangTool.getString("em.labelPort")); fieldPort.setColumns(5); labelFrom.setText(LangTool.getString("em.labelFrom")); fieldFrom.setColumns(20); optDone.setText(LangTool.getString("em.optDone")); optDone.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(ActionEvent e) { optDone_actionPerformed(e); } }); optCancel.setText(LangTool.getString("em.optCancelLabel")); optCancel.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(ActionEvent e) { optCancel_actionPerformed(e); } }); labelFileName.setText(LangTool.getString("em.labelFileName")); fieldFileName.setText("tn5250j.txt"); fieldFileName.setColumns(20); optionsPanel.add(optDone, null); optionsPanel.add(optCancel, null); getContentPane().add(mainPanel); mainPanel.add(configPanel, BorderLayout.CENTER); configPanel.add(labelHost, null); mainPanel.add(optionsPanel, BorderLayout.SOUTH); configPanel.add(fieldHost, null); configPanel.add(labelPort, null); configPanel.add(fieldPort, null); configPanel.add(labelFrom, null); configPanel.add(fieldFrom, null); configPanel.add(labelFileName, null); configPanel.add(fieldFileName, null); configPanel.setLayout(alignLayout); if (loadConfig(null)) { setProperties(); } centerMe(); }
|
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/587af9e9ad98a6fc095602838327da784630b619/SMTPConfig.java/buggy/tn5250j/src/org/tn5250j/mailtools/SMTPConfig.java
|
}
|
if (loadConfig(null)) {
|
void jbInit() throws Exception { setTitle(LangTool.getString("em.configTitle")); mainPanel.setLayout(borderLayout1); labelHost.setText(LangTool.getString("em.labelHost")); fieldHost.setColumns(20); labelPort.setText(LangTool.getString("em.labelPort")); fieldPort.setColumns(5); labelFrom.setText(LangTool.getString("em.labelFrom")); fieldFrom.setColumns(20); optDone.setText(LangTool.getString("em.optDone")); optDone.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(ActionEvent e) { optDone_actionPerformed(e); } }); optCancel.setText(LangTool.getString("em.optCancelLabel")); optCancel.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(ActionEvent e) { optCancel_actionPerformed(e); } }); labelFileName.setText(LangTool.getString("em.labelFileName")); fieldFileName.setText("tn5250j.txt"); fieldFileName.setColumns(20); optionsPanel.add(optDone, null); optionsPanel.add(optCancel, null); getContentPane().add(mainPanel); mainPanel.add(configPanel, BorderLayout.CENTER); configPanel.add(labelHost, null); mainPanel.add(optionsPanel, BorderLayout.SOUTH); configPanel.add(fieldHost, null); configPanel.add(labelPort, null); configPanel.add(fieldPort, null); configPanel.add(labelFrom, null); configPanel.add(fieldFrom, null); configPanel.add(labelFileName, null); configPanel.add(fieldFileName, null); configPanel.setLayout(alignLayout); if (loadConfig(null)) { setProperties(); } centerMe(); }
|
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/587af9e9ad98a6fc095602838327da784630b619/SMTPConfig.java/buggy/tn5250j/src/org/tn5250j/mailtools/SMTPConfig.java
|
centerMe();
|
setProperties();
|
void jbInit() throws Exception { setTitle(LangTool.getString("em.configTitle")); mainPanel.setLayout(borderLayout1); labelHost.setText(LangTool.getString("em.labelHost")); fieldHost.setColumns(20); labelPort.setText(LangTool.getString("em.labelPort")); fieldPort.setColumns(5); labelFrom.setText(LangTool.getString("em.labelFrom")); fieldFrom.setColumns(20); optDone.setText(LangTool.getString("em.optDone")); optDone.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(ActionEvent e) { optDone_actionPerformed(e); } }); optCancel.setText(LangTool.getString("em.optCancelLabel")); optCancel.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(ActionEvent e) { optCancel_actionPerformed(e); } }); labelFileName.setText(LangTool.getString("em.labelFileName")); fieldFileName.setText("tn5250j.txt"); fieldFileName.setColumns(20); optionsPanel.add(optDone, null); optionsPanel.add(optCancel, null); getContentPane().add(mainPanel); mainPanel.add(configPanel, BorderLayout.CENTER); configPanel.add(labelHost, null); mainPanel.add(optionsPanel, BorderLayout.SOUTH); configPanel.add(fieldHost, null); configPanel.add(labelPort, null); configPanel.add(fieldPort, null); configPanel.add(labelFrom, null); configPanel.add(fieldFrom, null); configPanel.add(labelFileName, null); configPanel.add(fieldFileName, null); configPanel.setLayout(alignLayout); if (loadConfig(null)) { setProperties(); } centerMe(); }
|
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/587af9e9ad98a6fc095602838327da784630b619/SMTPConfig.java/buggy/tn5250j/src/org/tn5250j/mailtools/SMTPConfig.java
|
}
|
} centerMe(); }
|
void jbInit() throws Exception { setTitle(LangTool.getString("em.configTitle")); mainPanel.setLayout(borderLayout1); labelHost.setText(LangTool.getString("em.labelHost")); fieldHost.setColumns(20); labelPort.setText(LangTool.getString("em.labelPort")); fieldPort.setColumns(5); labelFrom.setText(LangTool.getString("em.labelFrom")); fieldFrom.setColumns(20); optDone.setText(LangTool.getString("em.optDone")); optDone.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(ActionEvent e) { optDone_actionPerformed(e); } }); optCancel.setText(LangTool.getString("em.optCancelLabel")); optCancel.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(ActionEvent e) { optCancel_actionPerformed(e); } }); labelFileName.setText(LangTool.getString("em.labelFileName")); fieldFileName.setText("tn5250j.txt"); fieldFileName.setColumns(20); optionsPanel.add(optDone, null); optionsPanel.add(optCancel, null); getContentPane().add(mainPanel); mainPanel.add(configPanel, BorderLayout.CENTER); configPanel.add(labelHost, null); mainPanel.add(optionsPanel, BorderLayout.SOUTH); configPanel.add(fieldHost, null); configPanel.add(labelPort, null); configPanel.add(fieldPort, null); configPanel.add(labelFrom, null); configPanel.add(fieldFrom, null); configPanel.add(labelFileName, null); configPanel.add(fieldFileName, null); configPanel.setLayout(alignLayout); if (loadConfig(null)) { setProperties(); } centerMe(); }
|
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/587af9e9ad98a6fc095602838327da784630b619/SMTPConfig.java/buggy/tn5250j/src/org/tn5250j/mailtools/SMTPConfig.java
|
optDone_actionPerformed(e); }
|
optDone_actionPerformed(e); }
|
public void actionPerformed(ActionEvent e) { optDone_actionPerformed(e); }
|
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/587af9e9ad98a6fc095602838327da784630b619/SMTPConfig.java/buggy/tn5250j/src/org/tn5250j/mailtools/SMTPConfig.java
|
optCancel_actionPerformed(e); }
|
optCancel_actionPerformed(e); }
|
public void actionPerformed(ActionEvent e) { optCancel_actionPerformed(e); }
|
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/587af9e9ad98a6fc095602838327da784630b619/SMTPConfig.java/buggy/tn5250j/src/org/tn5250j/mailtools/SMTPConfig.java
|
SMTPProperties = ConfigureFactory.getInstance().getProperties("smtp", smtpFileName);
|
SMTPProperties = ConfigureFactory.getInstance().getProperties("smtp", smtpFileName);
|
private boolean loadConfig(String name) throws Exception { SMTPProperties = ConfigureFactory.getInstance().getProperties("smtp", smtpFileName); if (SMTPProperties.size() > 0) return true; else return false; }
|
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/587af9e9ad98a6fc095602838327da784630b619/SMTPConfig.java/buggy/tn5250j/src/org/tn5250j/mailtools/SMTPConfig.java
|
if (SMTPProperties.size() > 0) return true; else return false; }
|
if (SMTPProperties.size() > 0) return true; else return false; }
|
private boolean loadConfig(String name) throws Exception { SMTPProperties = ConfigureFactory.getInstance().getProperties("smtp", smtpFileName); if (SMTPProperties.size() > 0) return true; else return false; }
|
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/587af9e9ad98a6fc095602838327da784630b619/SMTPConfig.java/buggy/tn5250j/src/org/tn5250j/mailtools/SMTPConfig.java
|
this.setVisible(false);
|
this.setVisible(false);
|
void optCancel_actionPerformed(ActionEvent e) { this.setVisible(false); }
|
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/587af9e9ad98a6fc095602838327da784630b619/SMTPConfig.java/buggy/tn5250j/src/org/tn5250j/mailtools/SMTPConfig.java
|
}
|
}
|
void optCancel_actionPerformed(ActionEvent e) { this.setVisible(false); }
|
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/587af9e9ad98a6fc095602838327da784630b619/SMTPConfig.java/buggy/tn5250j/src/org/tn5250j/mailtools/SMTPConfig.java
|
SMTPProperties.setProperty("mail.smtp.host",fieldHost.getText()); SMTPProperties.setProperty("mail.smtp.port",fieldPort.getText()); SMTPProperties.setProperty("mail.smtp.from",fieldFrom.getText());
|
SMTPProperties.setProperty("mail.smtp.host", fieldHost.getText()); SMTPProperties.setProperty("mail.smtp.port", fieldPort.getText()); SMTPProperties.setProperty("mail.smtp.from", fieldFrom.getText()); SMTPProperties.setProperty("mail.smtp.realname", fieldName.getText());
|
void optDone_actionPerformed(ActionEvent e) { SMTPProperties.setProperty("mail.smtp.host",fieldHost.getText()); SMTPProperties.setProperty("mail.smtp.port",fieldPort.getText()); SMTPProperties.setProperty("mail.smtp.from",fieldFrom.getText()); // file name SMTPProperties.setProperty("fileName",fieldFileName.getText()); for (Enumeration x = SMTPProperties.propertyNames();x.hasMoreElements();) System.out.println(SMTPProperties.get(x.nextElement())); ConfigureFactory.getInstance().saveSettings("smtp", smtpFileName, "------ SMTP Defaults --------"); this.setVisible(false); }
|
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/587af9e9ad98a6fc095602838327da784630b619/SMTPConfig.java/buggy/tn5250j/src/org/tn5250j/mailtools/SMTPConfig.java
|
SMTPProperties.setProperty("fileName",fieldFileName.getText());
|
SMTPProperties.setProperty("fileName", fieldFileName.getText());
|
void optDone_actionPerformed(ActionEvent e) { SMTPProperties.setProperty("mail.smtp.host",fieldHost.getText()); SMTPProperties.setProperty("mail.smtp.port",fieldPort.getText()); SMTPProperties.setProperty("mail.smtp.from",fieldFrom.getText()); // file name SMTPProperties.setProperty("fileName",fieldFileName.getText()); for (Enumeration x = SMTPProperties.propertyNames();x.hasMoreElements();) System.out.println(SMTPProperties.get(x.nextElement())); ConfigureFactory.getInstance().saveSettings("smtp", smtpFileName, "------ SMTP Defaults --------"); this.setVisible(false); }
|
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/587af9e9ad98a6fc095602838327da784630b619/SMTPConfig.java/buggy/tn5250j/src/org/tn5250j/mailtools/SMTPConfig.java
|
for (Enumeration x = SMTPProperties.propertyNames();x.hasMoreElements();) System.out.println(SMTPProperties.get(x.nextElement()));
|
for (Enumeration x = SMTPProperties.propertyNames(); x.hasMoreElements(); ) System.out.println(SMTPProperties.get(x.nextElement()));
|
void optDone_actionPerformed(ActionEvent e) { SMTPProperties.setProperty("mail.smtp.host",fieldHost.getText()); SMTPProperties.setProperty("mail.smtp.port",fieldPort.getText()); SMTPProperties.setProperty("mail.smtp.from",fieldFrom.getText()); // file name SMTPProperties.setProperty("fileName",fieldFileName.getText()); for (Enumeration x = SMTPProperties.propertyNames();x.hasMoreElements();) System.out.println(SMTPProperties.get(x.nextElement())); ConfigureFactory.getInstance().saveSettings("smtp", smtpFileName, "------ SMTP Defaults --------"); this.setVisible(false); }
|
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/587af9e9ad98a6fc095602838327da784630b619/SMTPConfig.java/buggy/tn5250j/src/org/tn5250j/mailtools/SMTPConfig.java
|
ConfigureFactory.getInstance().saveSettings("smtp", smtpFileName, "------ SMTP Defaults --------"); this.setVisible(false);
|
ConfigureFactory.getInstance().saveSettings( "smtp", smtpFileName, "------ SMTP Defaults --------"); this.setVisible(false);
|
void optDone_actionPerformed(ActionEvent e) { SMTPProperties.setProperty("mail.smtp.host",fieldHost.getText()); SMTPProperties.setProperty("mail.smtp.port",fieldPort.getText()); SMTPProperties.setProperty("mail.smtp.from",fieldFrom.getText()); // file name SMTPProperties.setProperty("fileName",fieldFileName.getText()); for (Enumeration x = SMTPProperties.propertyNames();x.hasMoreElements();) System.out.println(SMTPProperties.get(x.nextElement())); ConfigureFactory.getInstance().saveSettings("smtp", smtpFileName, "------ SMTP Defaults --------"); this.setVisible(false); }
|
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/587af9e9ad98a6fc095602838327da784630b619/SMTPConfig.java/buggy/tn5250j/src/org/tn5250j/mailtools/SMTPConfig.java
|
}
|
}
|
void optDone_actionPerformed(ActionEvent e) { SMTPProperties.setProperty("mail.smtp.host",fieldHost.getText()); SMTPProperties.setProperty("mail.smtp.port",fieldPort.getText()); SMTPProperties.setProperty("mail.smtp.from",fieldFrom.getText()); // file name SMTPProperties.setProperty("fileName",fieldFileName.getText()); for (Enumeration x = SMTPProperties.propertyNames();x.hasMoreElements();) System.out.println(SMTPProperties.get(x.nextElement())); ConfigureFactory.getInstance().saveSettings("smtp", smtpFileName, "------ SMTP Defaults --------"); this.setVisible(false); }
|
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/587af9e9ad98a6fc095602838327da784630b619/SMTPConfig.java/buggy/tn5250j/src/org/tn5250j/mailtools/SMTPConfig.java
|
private void setProperties() { // mail.smtp.host= Fill in the host name or ip address of your SMTP // mail server. // // mail.smtp.port= Fill in the port to use to connect // // mail.smtp.from= This is the e-mail address from. For example I would // place kjpou@hotmail.com here as follows: // // mail.smtp.from=kjpou@hotmail.com fieldHost.setText(SMTPProperties.getProperty("mail.smtp.host")); fieldPort.setText(SMTPProperties.getProperty("mail.smtp.port")); fieldFrom.setText(SMTPProperties.getProperty("mail.smtp.from")); // file name fieldFileName.setText(SMTPProperties.getProperty("fileName")); }
|
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/587af9e9ad98a6fc095602838327da784630b619/SMTPConfig.java/buggy/tn5250j/src/org/tn5250j/mailtools/SMTPConfig.java
|
||
fieldHost.setText(SMTPProperties.getProperty("mail.smtp.host")); fieldPort.setText(SMTPProperties.getProperty("mail.smtp.port")); fieldFrom.setText(SMTPProperties.getProperty("mail.smtp.from"));
|
fieldHost.setText(SMTPProperties.getProperty("mail.smtp.host")); fieldPort.setText(SMTPProperties.getProperty("mail.smtp.port")); fieldFrom.setText(SMTPProperties.getProperty("mail.smtp.from")); fieldName.setText(SMTPProperties.getProperty("mail.smtp.realname"));
|
private void setProperties() { // mail.smtp.host= Fill in the host name or ip address of your SMTP // mail server. // // mail.smtp.port= Fill in the port to use to connect // // mail.smtp.from= This is the e-mail address from. For example I would // place kjpou@hotmail.com here as follows: // // mail.smtp.from=kjpou@hotmail.com fieldHost.setText(SMTPProperties.getProperty("mail.smtp.host")); fieldPort.setText(SMTPProperties.getProperty("mail.smtp.port")); fieldFrom.setText(SMTPProperties.getProperty("mail.smtp.from")); // file name fieldFileName.setText(SMTPProperties.getProperty("fileName")); }
|
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/587af9e9ad98a6fc095602838327da784630b619/SMTPConfig.java/buggy/tn5250j/src/org/tn5250j/mailtools/SMTPConfig.java
|
fieldFileName.setText(SMTPProperties.getProperty("fileName"));
|
fieldFileName.setText(SMTPProperties.getProperty("fileName"));
|
private void setProperties() { // mail.smtp.host= Fill in the host name or ip address of your SMTP // mail server. // // mail.smtp.port= Fill in the port to use to connect // // mail.smtp.from= This is the e-mail address from. For example I would // place kjpou@hotmail.com here as follows: // // mail.smtp.from=kjpou@hotmail.com fieldHost.setText(SMTPProperties.getProperty("mail.smtp.host")); fieldPort.setText(SMTPProperties.getProperty("mail.smtp.port")); fieldFrom.setText(SMTPProperties.getProperty("mail.smtp.from")); // file name fieldFileName.setText(SMTPProperties.getProperty("fileName")); }
|
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/587af9e9ad98a6fc095602838327da784630b619/SMTPConfig.java/buggy/tn5250j/src/org/tn5250j/mailtools/SMTPConfig.java
|
}
|
}
|
private void setProperties() { // mail.smtp.host= Fill in the host name or ip address of your SMTP // mail server. // // mail.smtp.port= Fill in the port to use to connect // // mail.smtp.from= This is the e-mail address from. For example I would // place kjpou@hotmail.com here as follows: // // mail.smtp.from=kjpou@hotmail.com fieldHost.setText(SMTPProperties.getProperty("mail.smtp.host")); fieldPort.setText(SMTPProperties.getProperty("mail.smtp.port")); fieldFrom.setText(SMTPProperties.getProperty("mail.smtp.from")); // file name fieldFileName.setText(SMTPProperties.getProperty("fileName")); }
|
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/587af9e9ad98a6fc095602838327da784630b619/SMTPConfig.java/buggy/tn5250j/src/org/tn5250j/mailtools/SMTPConfig.java
|
bad.minor = Minor.Any;
|
public static DynAny[] extract(Any any) { try { return ((DynAnySeqHolder) any.extract_Streamable()).value; } catch (ClassCastException cex) { BAD_OPERATION bad = new BAD_OPERATION("DynAnySeq expected"); bad.initCause(cex); throw bad; } }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/44e3ea509d80974dab547c4d1cf8c070d32bac86/DynAnySeqHelper.java/buggy/core/src/classpath/org/org/omg/DynamicAny/DynAnySeqHelper.java
|
|
addPropertyChangeListener(new ValuePropertyHandler(dialog));
|
public JDialog createDialog(Component parentComponent, String title) { Frame toUse = getFrameForComponent(parentComponent); if (toUse == null) toUse = getRootFrame(); JDialog dialog = new JDialog(toUse, title); inputValue = UNINITIALIZED_VALUE; value = UNINITIALIZED_VALUE; dialog.getContentPane().add(this); dialog.setModal(true); dialog.setResizable(false); dialog.pack(); dialog.setLocationRelativeTo(parentComponent); return dialog; }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ff4d557efcee4a2c3a25a9cac2252bc626fb10fe/JOptionPane.java/clean/core/src/classpath/javax/javax/swing/JOptionPane.java
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.