rem
stringlengths 0
477k
| add
stringlengths 0
313k
| context
stringlengths 6
599k
| meta
stringlengths 141
403
|
---|---|---|---|
if (!areFieldsSet)
|
if (! areFieldsSet)
|
protected void complete() { if (!isTimeSet) computeTime(); if (!areFieldsSet) computeFields(); }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/c65f6a6914005749230b8f31c6890448761cd6f4/Calendar.java/buggy/core/src/classpath/java/java/util/Calendar.java
|
protected Calendar(TimeZone zone, Locale locale)
|
protected Calendar()
|
protected Calendar(TimeZone zone, Locale locale) { this.zone = zone; lenient = true; ResourceBundle rb = getBundle(locale); firstDayOfWeek = ((Integer) rb.getObject("firstDayOfWeek")).intValue(); minimalDaysInFirstWeek = ((Integer) rb.getObject("minimalDaysInFirstWeek")).intValue(); }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/c65f6a6914005749230b8f31c6890448761cd6f4/Calendar.java/buggy/core/src/classpath/java/java/util/Calendar.java
|
this.zone = zone; lenient = true; ResourceBundle rb = getBundle(locale); firstDayOfWeek = ((Integer) rb.getObject("firstDayOfWeek")).intValue(); minimalDaysInFirstWeek = ((Integer) rb.getObject("minimalDaysInFirstWeek")).intValue();
|
this(TimeZone.getDefault(), Locale.getDefault());
|
protected Calendar(TimeZone zone, Locale locale) { this.zone = zone; lenient = true; ResourceBundle rb = getBundle(locale); firstDayOfWeek = ((Integer) rb.getObject("firstDayOfWeek")).intValue(); minimalDaysInFirstWeek = ((Integer) rb.getObject("minimalDaysInFirstWeek")).intValue(); }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/c65f6a6914005749230b8f31c6890448761cd6f4/Calendar.java/buggy/core/src/classpath/java/java/util/Calendar.java
|
if (!isTimeSet)
|
if (! isTimeSet)
|
public long getTimeInMillis() { if (!isTimeSet) computeTime(); return time; }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/c65f6a6914005749230b8f31c6890448761cd6f4/Calendar.java/buggy/core/src/classpath/java/java/util/Calendar.java
|
Calendar tmp = (Calendar)clone();
|
Calendar tmp = (Calendar) clone();
|
public int getActualMaximum(int field) { Calendar tmp = (Calendar)clone(); // To avoid restoring state int max = tmp.getLeastMaximum(field); int end = tmp.getMaximum(field); tmp.set(field, max); for (; max < end; max++) { tmp.add(field, 1); if (tmp.get(field) != max + 1) break; } return max; }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/c65f6a6914005749230b8f31c6890448761cd6f4/Calendar.java/buggy/core/src/classpath/java/java/util/Calendar.java
|
Calendar tmp = (Calendar)clone();
|
Calendar tmp = (Calendar) clone();
|
public int getActualMinimum(int field) { Calendar tmp = (Calendar)clone(); // To avoid restoring state int min = tmp.getGreatestMinimum(field); int end = tmp.getMinimum(field); tmp.set(field, min); for (; min > end; min--) { tmp.add(field, -1); // Try to get smaller if (tmp.get(field) != min - 1) break; // Done if not successful } return min; }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/c65f6a6914005749230b8f31c6890448761cd6f4/Calendar.java/buggy/core/src/classpath/java/java/util/Calendar.java
|
public int getActualMinimum(int field) { Calendar tmp = (Calendar)clone(); // To avoid restoring state int min = tmp.getGreatestMinimum(field); int end = tmp.getMinimum(field); tmp.set(field, min); for (; min > end; min--) { tmp.add(field, -1); // Try to get smaller if (tmp.get(field) != min - 1) break; // Done if not successful } return min; }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/c65f6a6914005749230b8f31c6890448761cd6f4/Calendar.java/buggy/core/src/classpath/java/java/util/Calendar.java
|
||
protected void repaintCellFocus() { }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/963ae61676e8c35a9e0998e0b7de1f942db82a26/BasicListUI.java/clean/core/src/classpath/javax/javax/swing/plaf/basic/BasicListUI.java
|
||
public void valueChanged(ListSelectionEvent e) { }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/963ae61676e8c35a9e0998e0b7de1f942db82a26/BasicListUI.java/clean/core/src/classpath/javax/javax/swing/plaf/basic/BasicListUI.java
|
||
int index = BasicListUI.this.locationToIndex(list, click);
|
int index = locationToIndex(list, click);
|
public void mouseClicked(MouseEvent event) { Point click = event.getPoint(); int index = BasicListUI.this.locationToIndex(list, click); if (index == -1) return; if (event.isShiftDown()) { if (BasicListUI.this.list.getSelectionMode() == ListSelectionModel.SINGLE_SELECTION) BasicListUI.this.list.setSelectedIndex(index); else if (BasicListUI.this.list.getSelectionMode() == ListSelectionModel.SINGLE_INTERVAL_SELECTION) // COMPAT: the IBM VM is compatible with the following line of code. // However, compliance with Sun's VM would correspond to replacing // getAnchorSelectionIndex() with getLeadSelectionIndex().This is // both unnatural and contradictory to the way they handle other // similar UI interactions. BasicListUI.this.list.setSelectionInterval (BasicListUI.this.list.getAnchorSelectionIndex(), index); else // COMPAT: both Sun and IBM are compatible instead with: // BasicListUI.this.list.setSelectionInterval // (BasicListUI.this.list.getLeadSelectionIndex(),index); // Note that for IBM this is contradictory to what they did in // the above situation for SINGLE_INTERVAL_SELECTION. // The most natural thing to do is the following: BasicListUI.this.list.getSelectionModel(). setLeadSelectionIndex(index); } else if (event.isControlDown()) { if (BasicListUI.this.list.getSelectionMode() == ListSelectionModel.SINGLE_SELECTION) BasicListUI.this.list.setSelectedIndex(index); else if (BasicListUI.this.list.isSelectedIndex(index)) BasicListUI.this.list.removeSelectionInterval(index,index); else BasicListUI.this.list.addSelectionInterval(index,index); } else BasicListUI.this.list.setSelectedIndex(index); BasicListUI.this.list.ensureIndexIsVisible (BasicListUI.this.list.getLeadSelectionIndex()); }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/963ae61676e8c35a9e0998e0b7de1f942db82a26/BasicListUI.java/clean/core/src/classpath/javax/javax/swing/plaf/basic/BasicListUI.java
|
if (BasicListUI.this.list.getSelectionMode() == ListSelectionModel.SINGLE_SELECTION) BasicListUI.this.list.setSelectedIndex(index); else if (BasicListUI.this.list.getSelectionMode() ==
|
if (list.getSelectionMode() == ListSelectionModel.SINGLE_SELECTION) list.setSelectedIndex(index); else if (list.getSelectionMode() ==
|
public void mouseClicked(MouseEvent event) { Point click = event.getPoint(); int index = BasicListUI.this.locationToIndex(list, click); if (index == -1) return; if (event.isShiftDown()) { if (BasicListUI.this.list.getSelectionMode() == ListSelectionModel.SINGLE_SELECTION) BasicListUI.this.list.setSelectedIndex(index); else if (BasicListUI.this.list.getSelectionMode() == ListSelectionModel.SINGLE_INTERVAL_SELECTION) // COMPAT: the IBM VM is compatible with the following line of code. // However, compliance with Sun's VM would correspond to replacing // getAnchorSelectionIndex() with getLeadSelectionIndex().This is // both unnatural and contradictory to the way they handle other // similar UI interactions. BasicListUI.this.list.setSelectionInterval (BasicListUI.this.list.getAnchorSelectionIndex(), index); else // COMPAT: both Sun and IBM are compatible instead with: // BasicListUI.this.list.setSelectionInterval // (BasicListUI.this.list.getLeadSelectionIndex(),index); // Note that for IBM this is contradictory to what they did in // the above situation for SINGLE_INTERVAL_SELECTION. // The most natural thing to do is the following: BasicListUI.this.list.getSelectionModel(). setLeadSelectionIndex(index); } else if (event.isControlDown()) { if (BasicListUI.this.list.getSelectionMode() == ListSelectionModel.SINGLE_SELECTION) BasicListUI.this.list.setSelectedIndex(index); else if (BasicListUI.this.list.isSelectedIndex(index)) BasicListUI.this.list.removeSelectionInterval(index,index); else BasicListUI.this.list.addSelectionInterval(index,index); } else BasicListUI.this.list.setSelectedIndex(index); BasicListUI.this.list.ensureIndexIsVisible (BasicListUI.this.list.getLeadSelectionIndex()); }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/963ae61676e8c35a9e0998e0b7de1f942db82a26/BasicListUI.java/clean/core/src/classpath/javax/javax/swing/plaf/basic/BasicListUI.java
|
BasicListUI.this.list.setSelectionInterval (BasicListUI.this.list.getAnchorSelectionIndex(), index);
|
list.setSelectionInterval(list.getAnchorSelectionIndex(), index);
|
public void mouseClicked(MouseEvent event) { Point click = event.getPoint(); int index = BasicListUI.this.locationToIndex(list, click); if (index == -1) return; if (event.isShiftDown()) { if (BasicListUI.this.list.getSelectionMode() == ListSelectionModel.SINGLE_SELECTION) BasicListUI.this.list.setSelectedIndex(index); else if (BasicListUI.this.list.getSelectionMode() == ListSelectionModel.SINGLE_INTERVAL_SELECTION) // COMPAT: the IBM VM is compatible with the following line of code. // However, compliance with Sun's VM would correspond to replacing // getAnchorSelectionIndex() with getLeadSelectionIndex().This is // both unnatural and contradictory to the way they handle other // similar UI interactions. BasicListUI.this.list.setSelectionInterval (BasicListUI.this.list.getAnchorSelectionIndex(), index); else // COMPAT: both Sun and IBM are compatible instead with: // BasicListUI.this.list.setSelectionInterval // (BasicListUI.this.list.getLeadSelectionIndex(),index); // Note that for IBM this is contradictory to what they did in // the above situation for SINGLE_INTERVAL_SELECTION. // The most natural thing to do is the following: BasicListUI.this.list.getSelectionModel(). setLeadSelectionIndex(index); } else if (event.isControlDown()) { if (BasicListUI.this.list.getSelectionMode() == ListSelectionModel.SINGLE_SELECTION) BasicListUI.this.list.setSelectedIndex(index); else if (BasicListUI.this.list.isSelectedIndex(index)) BasicListUI.this.list.removeSelectionInterval(index,index); else BasicListUI.this.list.addSelectionInterval(index,index); } else BasicListUI.this.list.setSelectedIndex(index); BasicListUI.this.list.ensureIndexIsVisible (BasicListUI.this.list.getLeadSelectionIndex()); }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/963ae61676e8c35a9e0998e0b7de1f942db82a26/BasicListUI.java/clean/core/src/classpath/javax/javax/swing/plaf/basic/BasicListUI.java
|
public void mouseClicked(MouseEvent event) { Point click = event.getPoint(); int index = BasicListUI.this.locationToIndex(list, click); if (index == -1) return; if (event.isShiftDown()) { if (BasicListUI.this.list.getSelectionMode() == ListSelectionModel.SINGLE_SELECTION) BasicListUI.this.list.setSelectedIndex(index); else if (BasicListUI.this.list.getSelectionMode() == ListSelectionModel.SINGLE_INTERVAL_SELECTION) // COMPAT: the IBM VM is compatible with the following line of code. // However, compliance with Sun's VM would correspond to replacing // getAnchorSelectionIndex() with getLeadSelectionIndex().This is // both unnatural and contradictory to the way they handle other // similar UI interactions. BasicListUI.this.list.setSelectionInterval (BasicListUI.this.list.getAnchorSelectionIndex(), index); else // COMPAT: both Sun and IBM are compatible instead with: // BasicListUI.this.list.setSelectionInterval // (BasicListUI.this.list.getLeadSelectionIndex(),index); // Note that for IBM this is contradictory to what they did in // the above situation for SINGLE_INTERVAL_SELECTION. // The most natural thing to do is the following: BasicListUI.this.list.getSelectionModel(). setLeadSelectionIndex(index); } else if (event.isControlDown()) { if (BasicListUI.this.list.getSelectionMode() == ListSelectionModel.SINGLE_SELECTION) BasicListUI.this.list.setSelectedIndex(index); else if (BasicListUI.this.list.isSelectedIndex(index)) BasicListUI.this.list.removeSelectionInterval(index,index); else BasicListUI.this.list.addSelectionInterval(index,index); } else BasicListUI.this.list.setSelectedIndex(index); BasicListUI.this.list.ensureIndexIsVisible (BasicListUI.this.list.getLeadSelectionIndex()); }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/963ae61676e8c35a9e0998e0b7de1f942db82a26/BasicListUI.java/clean/core/src/classpath/javax/javax/swing/plaf/basic/BasicListUI.java
|
||
BasicListUI.this.list.getSelectionModel(). setLeadSelectionIndex(index);
|
if (list.isSelectedIndex(list.getAnchorSelectionIndex())) list.getSelectionModel().setLeadSelectionIndex(index); else list.addSelectionInterval(list.getAnchorSelectionIndex(), index);
|
public void mouseClicked(MouseEvent event) { Point click = event.getPoint(); int index = BasicListUI.this.locationToIndex(list, click); if (index == -1) return; if (event.isShiftDown()) { if (BasicListUI.this.list.getSelectionMode() == ListSelectionModel.SINGLE_SELECTION) BasicListUI.this.list.setSelectedIndex(index); else if (BasicListUI.this.list.getSelectionMode() == ListSelectionModel.SINGLE_INTERVAL_SELECTION) // COMPAT: the IBM VM is compatible with the following line of code. // However, compliance with Sun's VM would correspond to replacing // getAnchorSelectionIndex() with getLeadSelectionIndex().This is // both unnatural and contradictory to the way they handle other // similar UI interactions. BasicListUI.this.list.setSelectionInterval (BasicListUI.this.list.getAnchorSelectionIndex(), index); else // COMPAT: both Sun and IBM are compatible instead with: // BasicListUI.this.list.setSelectionInterval // (BasicListUI.this.list.getLeadSelectionIndex(),index); // Note that for IBM this is contradictory to what they did in // the above situation for SINGLE_INTERVAL_SELECTION. // The most natural thing to do is the following: BasicListUI.this.list.getSelectionModel(). setLeadSelectionIndex(index); } else if (event.isControlDown()) { if (BasicListUI.this.list.getSelectionMode() == ListSelectionModel.SINGLE_SELECTION) BasicListUI.this.list.setSelectedIndex(index); else if (BasicListUI.this.list.isSelectedIndex(index)) BasicListUI.this.list.removeSelectionInterval(index,index); else BasicListUI.this.list.addSelectionInterval(index,index); } else BasicListUI.this.list.setSelectedIndex(index); BasicListUI.this.list.ensureIndexIsVisible (BasicListUI.this.list.getLeadSelectionIndex()); }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/963ae61676e8c35a9e0998e0b7de1f942db82a26/BasicListUI.java/clean/core/src/classpath/javax/javax/swing/plaf/basic/BasicListUI.java
|
if (BasicListUI.this.list.getSelectionMode() == ListSelectionModel.SINGLE_SELECTION) BasicListUI.this.list.setSelectedIndex(index); else if (BasicListUI.this.list.isSelectedIndex(index)) BasicListUI.this.list.removeSelectionInterval(index,index);
|
if (list.getSelectionMode() == ListSelectionModel.SINGLE_SELECTION) list.setSelectedIndex(index); else if (list.isSelectedIndex(index)) list.removeSelectionInterval(index,index);
|
public void mouseClicked(MouseEvent event) { Point click = event.getPoint(); int index = BasicListUI.this.locationToIndex(list, click); if (index == -1) return; if (event.isShiftDown()) { if (BasicListUI.this.list.getSelectionMode() == ListSelectionModel.SINGLE_SELECTION) BasicListUI.this.list.setSelectedIndex(index); else if (BasicListUI.this.list.getSelectionMode() == ListSelectionModel.SINGLE_INTERVAL_SELECTION) // COMPAT: the IBM VM is compatible with the following line of code. // However, compliance with Sun's VM would correspond to replacing // getAnchorSelectionIndex() with getLeadSelectionIndex().This is // both unnatural and contradictory to the way they handle other // similar UI interactions. BasicListUI.this.list.setSelectionInterval (BasicListUI.this.list.getAnchorSelectionIndex(), index); else // COMPAT: both Sun and IBM are compatible instead with: // BasicListUI.this.list.setSelectionInterval // (BasicListUI.this.list.getLeadSelectionIndex(),index); // Note that for IBM this is contradictory to what they did in // the above situation for SINGLE_INTERVAL_SELECTION. // The most natural thing to do is the following: BasicListUI.this.list.getSelectionModel(). setLeadSelectionIndex(index); } else if (event.isControlDown()) { if (BasicListUI.this.list.getSelectionMode() == ListSelectionModel.SINGLE_SELECTION) BasicListUI.this.list.setSelectedIndex(index); else if (BasicListUI.this.list.isSelectedIndex(index)) BasicListUI.this.list.removeSelectionInterval(index,index); else BasicListUI.this.list.addSelectionInterval(index,index); } else BasicListUI.this.list.setSelectedIndex(index); BasicListUI.this.list.ensureIndexIsVisible (BasicListUI.this.list.getLeadSelectionIndex()); }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/963ae61676e8c35a9e0998e0b7de1f942db82a26/BasicListUI.java/clean/core/src/classpath/javax/javax/swing/plaf/basic/BasicListUI.java
|
BasicListUI.this.list.addSelectionInterval(index,index);
|
list.addSelectionInterval(index,index);
|
public void mouseClicked(MouseEvent event) { Point click = event.getPoint(); int index = BasicListUI.this.locationToIndex(list, click); if (index == -1) return; if (event.isShiftDown()) { if (BasicListUI.this.list.getSelectionMode() == ListSelectionModel.SINGLE_SELECTION) BasicListUI.this.list.setSelectedIndex(index); else if (BasicListUI.this.list.getSelectionMode() == ListSelectionModel.SINGLE_INTERVAL_SELECTION) // COMPAT: the IBM VM is compatible with the following line of code. // However, compliance with Sun's VM would correspond to replacing // getAnchorSelectionIndex() with getLeadSelectionIndex().This is // both unnatural and contradictory to the way they handle other // similar UI interactions. BasicListUI.this.list.setSelectionInterval (BasicListUI.this.list.getAnchorSelectionIndex(), index); else // COMPAT: both Sun and IBM are compatible instead with: // BasicListUI.this.list.setSelectionInterval // (BasicListUI.this.list.getLeadSelectionIndex(),index); // Note that for IBM this is contradictory to what they did in // the above situation for SINGLE_INTERVAL_SELECTION. // The most natural thing to do is the following: BasicListUI.this.list.getSelectionModel(). setLeadSelectionIndex(index); } else if (event.isControlDown()) { if (BasicListUI.this.list.getSelectionMode() == ListSelectionModel.SINGLE_SELECTION) BasicListUI.this.list.setSelectedIndex(index); else if (BasicListUI.this.list.isSelectedIndex(index)) BasicListUI.this.list.removeSelectionInterval(index,index); else BasicListUI.this.list.addSelectionInterval(index,index); } else BasicListUI.this.list.setSelectedIndex(index); BasicListUI.this.list.ensureIndexIsVisible (BasicListUI.this.list.getLeadSelectionIndex()); }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/963ae61676e8c35a9e0998e0b7de1f942db82a26/BasicListUI.java/clean/core/src/classpath/javax/javax/swing/plaf/basic/BasicListUI.java
|
BasicListUI.this.list.setSelectedIndex(index);
|
list.setSelectedIndex(index);
|
public void mouseClicked(MouseEvent event) { Point click = event.getPoint(); int index = BasicListUI.this.locationToIndex(list, click); if (index == -1) return; if (event.isShiftDown()) { if (BasicListUI.this.list.getSelectionMode() == ListSelectionModel.SINGLE_SELECTION) BasicListUI.this.list.setSelectedIndex(index); else if (BasicListUI.this.list.getSelectionMode() == ListSelectionModel.SINGLE_INTERVAL_SELECTION) // COMPAT: the IBM VM is compatible with the following line of code. // However, compliance with Sun's VM would correspond to replacing // getAnchorSelectionIndex() with getLeadSelectionIndex().This is // both unnatural and contradictory to the way they handle other // similar UI interactions. BasicListUI.this.list.setSelectionInterval (BasicListUI.this.list.getAnchorSelectionIndex(), index); else // COMPAT: both Sun and IBM are compatible instead with: // BasicListUI.this.list.setSelectionInterval // (BasicListUI.this.list.getLeadSelectionIndex(),index); // Note that for IBM this is contradictory to what they did in // the above situation for SINGLE_INTERVAL_SELECTION. // The most natural thing to do is the following: BasicListUI.this.list.getSelectionModel(). setLeadSelectionIndex(index); } else if (event.isControlDown()) { if (BasicListUI.this.list.getSelectionMode() == ListSelectionModel.SINGLE_SELECTION) BasicListUI.this.list.setSelectedIndex(index); else if (BasicListUI.this.list.isSelectedIndex(index)) BasicListUI.this.list.removeSelectionInterval(index,index); else BasicListUI.this.list.addSelectionInterval(index,index); } else BasicListUI.this.list.setSelectedIndex(index); BasicListUI.this.list.ensureIndexIsVisible (BasicListUI.this.list.getLeadSelectionIndex()); }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/963ae61676e8c35a9e0998e0b7de1f942db82a26/BasicListUI.java/clean/core/src/classpath/javax/javax/swing/plaf/basic/BasicListUI.java
|
BasicListUI.this.list.ensureIndexIsVisible (BasicListUI.this.list.getLeadSelectionIndex());
|
list.ensureIndexIsVisible(list.getLeadSelectionIndex());
|
public void mouseClicked(MouseEvent event) { Point click = event.getPoint(); int index = BasicListUI.this.locationToIndex(list, click); if (index == -1) return; if (event.isShiftDown()) { if (BasicListUI.this.list.getSelectionMode() == ListSelectionModel.SINGLE_SELECTION) BasicListUI.this.list.setSelectedIndex(index); else if (BasicListUI.this.list.getSelectionMode() == ListSelectionModel.SINGLE_INTERVAL_SELECTION) // COMPAT: the IBM VM is compatible with the following line of code. // However, compliance with Sun's VM would correspond to replacing // getAnchorSelectionIndex() with getLeadSelectionIndex().This is // both unnatural and contradictory to the way they handle other // similar UI interactions. BasicListUI.this.list.setSelectionInterval (BasicListUI.this.list.getAnchorSelectionIndex(), index); else // COMPAT: both Sun and IBM are compatible instead with: // BasicListUI.this.list.setSelectionInterval // (BasicListUI.this.list.getLeadSelectionIndex(),index); // Note that for IBM this is contradictory to what they did in // the above situation for SINGLE_INTERVAL_SELECTION. // The most natural thing to do is the following: BasicListUI.this.list.getSelectionModel(). setLeadSelectionIndex(index); } else if (event.isControlDown()) { if (BasicListUI.this.list.getSelectionMode() == ListSelectionModel.SINGLE_SELECTION) BasicListUI.this.list.setSelectedIndex(index); else if (BasicListUI.this.list.isSelectedIndex(index)) BasicListUI.this.list.removeSelectionInterval(index,index); else BasicListUI.this.list.addSelectionInterval(index,index); } else BasicListUI.this.list.setSelectedIndex(index); BasicListUI.this.list.ensureIndexIsVisible (BasicListUI.this.list.getLeadSelectionIndex()); }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/963ae61676e8c35a9e0998e0b7de1f942db82a26/BasicListUI.java/clean/core/src/classpath/javax/javax/swing/plaf/basic/BasicListUI.java
|
public void mouseDragged(MouseEvent event) { }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/963ae61676e8c35a9e0998e0b7de1f942db82a26/BasicListUI.java/clean/core/src/classpath/javax/javax/swing/plaf/basic/BasicListUI.java
|
||
public void mouseEntered(MouseEvent event) { }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/963ae61676e8c35a9e0998e0b7de1f942db82a26/BasicListUI.java/clean/core/src/classpath/javax/javax/swing/plaf/basic/BasicListUI.java
|
||
public void mouseExited(MouseEvent event) { }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/963ae61676e8c35a9e0998e0b7de1f942db82a26/BasicListUI.java/clean/core/src/classpath/javax/javax/swing/plaf/basic/BasicListUI.java
|
||
public void mouseMoved(MouseEvent event) { }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/963ae61676e8c35a9e0998e0b7de1f942db82a26/BasicListUI.java/clean/core/src/classpath/javax/javax/swing/plaf/basic/BasicListUI.java
|
||
public void mousePressed(MouseEvent event) { }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/963ae61676e8c35a9e0998e0b7de1f942db82a26/BasicListUI.java/clean/core/src/classpath/javax/javax/swing/plaf/basic/BasicListUI.java
|
||
public void mouseReleased(MouseEvent event) { }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/963ae61676e8c35a9e0998e0b7de1f942db82a26/BasicListUI.java/clean/core/src/classpath/javax/javax/swing/plaf/basic/BasicListUI.java
|
||
UIDefaults defaults = UIManager.getLookAndFeelDefaults(); InputMap focusInputMap = (InputMap)defaults.get("List.focusInputMap"); InputMapUIResource parentInputMap = new InputMapUIResource(); ActionMap parentActionMap = new ActionMap(); action = new ListAction(); Object keys[] = focusInputMap.allKeys(); for (int i = 0; i < keys.length; i++) { parentInputMap.put(KeyStroke.getKeyStroke (((KeyStroke)keys[i]).getKeyCode(), convertModifiers (((KeyStroke)keys[i]).getModifiers())), (String)focusInputMap.get((KeyStroke)keys[i])); parentInputMap.put(KeyStroke.getKeyStroke (((KeyStroke)keys[i]).getKeyCode(), ((KeyStroke)keys[i]).getModifiers()), (String)focusInputMap.get((KeyStroke)keys[i])); parentActionMap.put ((String)focusInputMap.get((KeyStroke)keys[i]), new ActionListenerProxy (action, (String)focusInputMap.get((KeyStroke)keys[i]))); } parentInputMap.setParent(list.getInputMap().getParent()); parentActionMap.setParent(list.getActionMap().getParent()); list.getInputMap().setParent(parentInputMap); list.getActionMap().setParent(parentActionMap);
|
protected void installKeyboardActions() { }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/963ae61676e8c35a9e0998e0b7de1f942db82a26/BasicListUI.java/clean/core/src/classpath/javax/javax/swing/plaf/basic/BasicListUI.java
|
|
keyListener = new KeyHandler();
|
protected void installListeners() { if (focusListener == null) focusListener = createFocusListener(); list.addFocusListener(focusListener); if (listDataListener == null) listDataListener = createListDataListener(); list.getModel().addListDataListener(listDataListener); if (listSelectionListener == null) listSelectionListener = createListSelectionListener(); list.addListSelectionListener(listSelectionListener); if (mouseInputListener == null) mouseInputListener = createMouseInputListener(); list.addMouseListener(mouseInputListener); list.addMouseMotionListener(mouseInputListener); if (propertyChangeListener == null) propertyChangeListener = createPropertyChangeListener(); list.addPropertyChangeListener(propertyChangeListener); // FIXME: Are these two really needed? At least they are not documented. keyListener = new KeyHandler(); list.addComponentListener(componentListener); componentListener = new ComponentHandler(); list.addKeyListener(keyListener); }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/963ae61676e8c35a9e0998e0b7de1f942db82a26/BasicListUI.java/clean/core/src/classpath/javax/javax/swing/plaf/basic/BasicListUI.java
|
|
list.addKeyListener(keyListener);
|
protected void installListeners() { if (focusListener == null) focusListener = createFocusListener(); list.addFocusListener(focusListener); if (listDataListener == null) listDataListener = createListDataListener(); list.getModel().addListDataListener(listDataListener); if (listSelectionListener == null) listSelectionListener = createListSelectionListener(); list.addListSelectionListener(listSelectionListener); if (mouseInputListener == null) mouseInputListener = createMouseInputListener(); list.addMouseListener(mouseInputListener); list.addMouseMotionListener(mouseInputListener); if (propertyChangeListener == null) propertyChangeListener = createPropertyChangeListener(); list.addPropertyChangeListener(propertyChangeListener); // FIXME: Are these two really needed? At least they are not documented. keyListener = new KeyHandler(); list.addComponentListener(componentListener); componentListener = new ComponentHandler(); list.addKeyListener(keyListener); }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/963ae61676e8c35a9e0998e0b7de1f942db82a26/BasicListUI.java/clean/core/src/classpath/javax/javax/swing/plaf/basic/BasicListUI.java
|
|
int index = list.getSelectedIndex();
|
int index = list.getSelectionModel().getLeadSelectionIndex(); if (index < list.getModel().getSize() - 1) {
|
protected void selectNextIndex() { int index = list.getSelectedIndex(); index++; list.setSelectedIndex(index); list.ensureIndexIsVisible(index); }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/963ae61676e8c35a9e0998e0b7de1f942db82a26/BasicListUI.java/clean/core/src/classpath/javax/javax/swing/plaf/basic/BasicListUI.java
|
}
|
protected void selectNextIndex() { int index = list.getSelectedIndex(); index++; list.setSelectedIndex(index); list.ensureIndexIsVisible(index); }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/963ae61676e8c35a9e0998e0b7de1f942db82a26/BasicListUI.java/clean/core/src/classpath/javax/javax/swing/plaf/basic/BasicListUI.java
|
|
int index = list.getSelectedIndex();
|
int index = list.getSelectionModel().getLeadSelectionIndex(); if (index > 0) {
|
protected void selectPreviousIndex() { int index = list.getSelectedIndex(); index--; list.setSelectedIndex(index); list.ensureIndexIsVisible(index); }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/963ae61676e8c35a9e0998e0b7de1f942db82a26/BasicListUI.java/clean/core/src/classpath/javax/javax/swing/plaf/basic/BasicListUI.java
|
}
|
protected void selectPreviousIndex() { int index = list.getSelectedIndex(); index--; list.setSelectedIndex(index); list.ensureIndexIsVisible(index); }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/963ae61676e8c35a9e0998e0b7de1f942db82a26/BasicListUI.java/clean/core/src/classpath/javax/javax/swing/plaf/basic/BasicListUI.java
|
|
protected void uninstallKeyboardActions() { }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/963ae61676e8c35a9e0998e0b7de1f942db82a26/BasicListUI.java/clean/core/src/classpath/javax/javax/swing/plaf/basic/BasicListUI.java
|
||
list.removeKeyListener(keyListener);
|
protected void uninstallListeners() { list.removeFocusListener(focusListener); list.getModel().removeListDataListener(listDataListener); list.removeListSelectionListener(listSelectionListener); list.removeMouseListener(mouseInputListener); list.removeKeyListener(keyListener); list.removeMouseMotionListener(mouseInputListener); list.removePropertyChangeListener(propertyChangeListener); }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/963ae61676e8c35a9e0998e0b7de1f942db82a26/BasicListUI.java/clean/core/src/classpath/javax/javax/swing/plaf/basic/BasicListUI.java
|
|
public boolean existsAtPos(int lastPos) { ScreenField sf = null; // from 14.6.12 for Start of Field Order 5940 function manual // examine the format table for an entry that begins at the current // starting address plus 1. for (int x = 0;x < sizeFields; x++) { sf = screenFields[x]; if (lastPos == sf.startPos()) { currentField = sf; return true; } } return false;// return fieldPlane[lastPos]; }
|
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/bcfd5ba28d22d8100110257f977fd7c577f652c2/ScreenFields.java/clean/tn5250j/src/org/tn5250j/ScreenFields.java
|
||
(sb.charAt(len) < ' ' || sb.charAt(len) >= '\uff20' )) {
|
(sb.charAt(len) < ' ' || sb.charAt(len) >= '\uff20')) { if (sb.charAt(len) == 0x1C && sf.isDupEnabled()) break;
|
protected void readFormatTable(ByteArrayOutputStream baosp,int readType, CodePage codePage) { ScreenField sf; boolean isSigned = false; char c; if (masterMDT) { StringBuffer sb = new StringBuffer(); for (int x = 0; x < sizeFields; x++) { isSigned = false; sf = screenFields[x]; if (sf.mdt || (readType == CMD_READ_INPUT_FIELDS)) { sb.setLength(0); sb.append(sf.getText()); if (readType == CMD_READ_MDT_FIELDS || readType == CMD_READ_MDT_IMMEDIATE_ALT) { int len = sb.length() - 1; // we strip out all '\u0020' and less while (len >= 0 &&// (sb.charAt(len) <= ' ' || sb.charAt(len) >= '\uff20' )) { (sb.charAt(len) < ' ' || sb.charAt(len) >= '\uff20' )) { sb.deleteCharAt(len--); } }// System.out.println("field " + sf.toString());// System.out.println(">" + sb.toString() + "<");// System.out.println(" field is all nulls"); if (sf.isSignedNumeric() && sb.length() > 0 && sb.charAt(sb.length() - 1) == '-') { isSigned = true; sb.setLength(sb.length() - 1); } int len3 = sb.length(); if (len3 > 0 || (readType == CMD_READ_MDT_FIELDS || readType == CMD_READ_MDT_IMMEDIATE_ALT)) { if ((readType == CMD_READ_MDT_FIELDS || readType == CMD_READ_MDT_IMMEDIATE_ALT)) { baosp.write(17); // start of field data baosp.write(sf.startRow()+1); baosp.write(sf.startCol()+1); }// int len = sb.length(); for (int k = 0; k < len3; k++) { c = sb.charAt(k); // here we have to check for special instances of the // characters in the string field. Attribute bytes // are encoded with an offset of \uff00 // This is a hack !!!!!!!!!!! // See ScreenField object for a description if (c < ' ' || c >= '\uff20') { // if it is an offset attribute byte we just pass // it straight on to the output stream if (c >= '\uff20' && c <= '\uff3f') { baosp.write(c - '\uff00'); } else baosp.write(codePage.getEBCDIC(' ')); } else { if (isSigned && k == len3 - 1) { baosp.write(0xd0 | (0x0f & c)); } else baosp.write(codePage.uni2ebcdic(c)); } } } } } } }
|
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/bcfd5ba28d22d8100110257f977fd7c577f652c2/ScreenFields.java/clean/tn5250j/src/org/tn5250j/ScreenFields.java
|
baosp.write(codePage.getEBCDIC(' '));
|
if (c == 0x1C) baosp.write(c); else baosp.write(codePage.getEBCDIC(' '));
|
protected void readFormatTable(ByteArrayOutputStream baosp,int readType, CodePage codePage) { ScreenField sf; boolean isSigned = false; char c; if (masterMDT) { StringBuffer sb = new StringBuffer(); for (int x = 0; x < sizeFields; x++) { isSigned = false; sf = screenFields[x]; if (sf.mdt || (readType == CMD_READ_INPUT_FIELDS)) { sb.setLength(0); sb.append(sf.getText()); if (readType == CMD_READ_MDT_FIELDS || readType == CMD_READ_MDT_IMMEDIATE_ALT) { int len = sb.length() - 1; // we strip out all '\u0020' and less while (len >= 0 &&// (sb.charAt(len) <= ' ' || sb.charAt(len) >= '\uff20' )) { (sb.charAt(len) < ' ' || sb.charAt(len) >= '\uff20' )) { sb.deleteCharAt(len--); } }// System.out.println("field " + sf.toString());// System.out.println(">" + sb.toString() + "<");// System.out.println(" field is all nulls"); if (sf.isSignedNumeric() && sb.length() > 0 && sb.charAt(sb.length() - 1) == '-') { isSigned = true; sb.setLength(sb.length() - 1); } int len3 = sb.length(); if (len3 > 0 || (readType == CMD_READ_MDT_FIELDS || readType == CMD_READ_MDT_IMMEDIATE_ALT)) { if ((readType == CMD_READ_MDT_FIELDS || readType == CMD_READ_MDT_IMMEDIATE_ALT)) { baosp.write(17); // start of field data baosp.write(sf.startRow()+1); baosp.write(sf.startCol()+1); }// int len = sb.length(); for (int k = 0; k < len3; k++) { c = sb.charAt(k); // here we have to check for special instances of the // characters in the string field. Attribute bytes // are encoded with an offset of \uff00 // This is a hack !!!!!!!!!!! // See ScreenField object for a description if (c < ' ' || c >= '\uff20') { // if it is an offset attribute byte we just pass // it straight on to the output stream if (c >= '\uff20' && c <= '\uff3f') { baosp.write(c - '\uff00'); } else baosp.write(codePage.getEBCDIC(' ')); } else { if (isSigned && k == len3 - 1) { baosp.write(0xd0 | (0x0f & c)); } else baosp.write(codePage.uni2ebcdic(c)); } } } } } } }
|
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/bcfd5ba28d22d8100110257f977fd7c577f652c2/ScreenFields.java/clean/tn5250j/src/org/tn5250j/ScreenFields.java
|
super ("UTF-8", null);
|
super ("UTF-8", new String[] { /* These names are provided by * http: */ "ibm-1208", "ibm-1209", "ibm-5304", "ibm-5305", "windows-65001", "cp1208", "UTF8" });
|
UTF_8 () { super ("UTF-8", null); }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/d7e10284742ade2934a1d2f7548145b029098f79/UTF_8.java/buggy/core/src/classpath/gnu/gnu/java/nio/charset/UTF_8.java
|
catch (ThreadDeath death) { return; }
|
public void run() { while (true) { try { AWTEvent evt = queue.getNextEvent(); if (isInterrupted ()) { // We are interrupted when we should finish executing return; } KeyboardFocusManager manager; manager = KeyboardFocusManager.getCurrentKeyboardFocusManager (); // Try to dispatch this event to the current keyboard focus // manager. It will dispatch all FocusEvents, all // WindowEvents related to focus, and all KeyEvents, // returning true. Otherwise, it returns false and we // dispatch the event normally. if (!manager.dispatchEvent (evt)) queue.dispatchEvent(evt); } catch (InterruptedException ie) { // We are interrupted when we should finish executing return; } catch (Throwable x) { System.err.println("Exception during event dispatch:"); x.printStackTrace(System.err); } } }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/cdb624bf4a3742cc4374523f5c6856a06dcd8f92/EventDispatchThread.java/clean/core/src/classpath/java/java/awt/EventDispatchThread.java
|
|
public void connect(org.omg.CORBA.Object object, byte[] key)
|
public void connect(org.omg.CORBA.Object object)
|
public void connect(org.omg.CORBA.Object object, byte[] key) { int a_port = getFreePort(); Connected_objects.cObject ref = connected_objects.add(key, object, a_port, null); IOR ior = createIOR(ref); prepareObject(object, ior); if (running) startService(ior); }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/532aa8373b9f9f2198c3b86393ccf0246b4150d2/OrbFunctional.java/clean/core/src/classpath/gnu/gnu/CORBA/OrbFunctional.java
|
Connected_objects.cObject ref = connected_objects.add(key, object, a_port, null);
|
Connected_objects.cObject ref = connected_objects.add(object, a_port);
|
public void connect(org.omg.CORBA.Object object, byte[] key) { int a_port = getFreePort(); Connected_objects.cObject ref = connected_objects.add(key, object, a_port, null); IOR ior = createIOR(ref); prepareObject(object, ior); if (running) startService(ior); }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/532aa8373b9f9f2198c3b86393ccf0246b4150d2/OrbFunctional.java/clean/core/src/classpath/gnu/gnu/CORBA/OrbFunctional.java
|
try { ior.Internet.host = InetAddress.getLocalHost().getHostAddress();
|
ior.Internet.host = CollocatedOrbs.localHost;
|
protected IOR createIOR(Connected_objects.cObject ref) throws BAD_OPERATION { IOR ior = new IOR(); ior.key = ref.key; ior.Internet.port = ref.port; if (ref.object instanceof ObjectImpl) { ObjectImpl imp = (ObjectImpl) ref.object; if (imp._ids().length > 0) ior.Id = imp._ids() [ 0 ]; } if (ior.Id == null) ior.Id = ref.object.getClass().getName(); try { ior.Internet.host = InetAddress.getLocalHost().getHostAddress(); ior.Internet.port = ref.port; } catch (UnknownHostException ex) { throw new BAD_OPERATION("Cannot resolve the local host address"); } return ior; }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/532aa8373b9f9f2198c3b86393ccf0246b4150d2/OrbFunctional.java/clean/core/src/classpath/gnu/gnu/CORBA/OrbFunctional.java
|
} catch (UnknownHostException ex) { throw new BAD_OPERATION("Cannot resolve the local host address"); }
|
protected IOR createIOR(Connected_objects.cObject ref) throws BAD_OPERATION { IOR ior = new IOR(); ior.key = ref.key; ior.Internet.port = ref.port; if (ref.object instanceof ObjectImpl) { ObjectImpl imp = (ObjectImpl) ref.object; if (imp._ids().length > 0) ior.Id = imp._ids() [ 0 ]; } if (ior.Id == null) ior.Id = ref.object.getClass().getName(); try { ior.Internet.host = InetAddress.getLocalHost().getHostAddress(); ior.Internet.port = ref.port; } catch (UnknownHostException ex) { throw new BAD_OPERATION("Cannot resolve the local host address"); } return ior; }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/532aa8373b9f9f2198c3b86393ccf0246b4150d2/OrbFunctional.java/clean/core/src/classpath/gnu/gnu/CORBA/OrbFunctional.java
|
|
}
|
public org.omg.CORBA.Object ior_to_object(IOR ior) { org.omg.CORBA.Object object = find_local_object(ior); if (object == null) { ObjectImpl impl = StubLocator.search(this, ior); try { if (impl._get_delegate() == null) impl._set_delegate(new IorDelegate(this, ior)); } catch (BAD_OPERATION ex) { // Some colaborants may throw this exception // in response to the attempt to get the unset delegate. impl._set_delegate(new IorDelegate(this, ior)); } object = impl; // TODO remove commented out code below. // connected_objects.add(ior.key, impl, ior.Internet.port, null); } return object; }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/532aa8373b9f9f2198c3b86393ccf0246b4150d2/OrbFunctional.java/clean/core/src/classpath/gnu/gnu/CORBA/OrbFunctional.java
|
|
if (!subserver.isAlive())
|
if (! subserver.isAlive())
|
public void run() { running = true; // Instantiate the port server for each socket. Iterator iter = connected_objects.entrySet().iterator(); Map.Entry m; Connected_objects.cObject obj; while (iter.hasNext()) { m = (Map.Entry) iter.next(); obj = (Connected_objects.cObject) m.getValue(); portServer subserver; if (obj.identity == null) { subserver = new portServer(obj.port); portServers.add(subserver); } else subserver = (portServer) identities.get(obj.identity); if (!subserver.isAlive()) { // Reuse the current thread for the last portServer. if (!iter.hasNext()) { // Discard the iterator, eliminating lock checks. iter = null; subserver.run(); return; } else subserver.start(); } } }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/532aa8373b9f9f2198c3b86393ccf0246b4150d2/OrbFunctional.java/clean/core/src/classpath/gnu/gnu/CORBA/OrbFunctional.java
|
if (!iter.hasNext())
|
if (! iter.hasNext())
|
public void run() { running = true; // Instantiate the port server for each socket. Iterator iter = connected_objects.entrySet().iterator(); Map.Entry m; Connected_objects.cObject obj; while (iter.hasNext()) { m = (Map.Entry) iter.next(); obj = (Connected_objects.cObject) m.getValue(); portServer subserver; if (obj.identity == null) { subserver = new portServer(obj.port); portServers.add(subserver); } else subserver = (portServer) identities.get(obj.identity); if (!subserver.isAlive()) { // Reuse the current thread for the last portServer. if (!iter.hasNext()) { // Discard the iterator, eliminating lock checks. iter = null; subserver.run(); return; } else subserver.start(); } } }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/532aa8373b9f9f2198c3b86393ccf0246b4150d2/OrbFunctional.java/clean/core/src/classpath/gnu/gnu/CORBA/OrbFunctional.java
|
finally { CollocatedOrbs.unregisterOrb(this); } }
|
public void run() { running = true; // Instantiate the port server for each socket. Iterator iter = connected_objects.entrySet().iterator(); Map.Entry m; Connected_objects.cObject obj; while (iter.hasNext()) { m = (Map.Entry) iter.next(); obj = (Connected_objects.cObject) m.getValue(); portServer subserver; if (obj.identity == null) { subserver = new portServer(obj.port); portServers.add(subserver); } else subserver = (portServer) identities.get(obj.identity); if (!subserver.isAlive()) { // Reuse the current thread for the last portServer. if (!iter.hasNext()) { // Discard the iterator, eliminating lock checks. iter = null; subserver.run(); return; } else subserver.start(); } } }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/532aa8373b9f9f2198c3b86393ccf0246b4150d2/OrbFunctional.java/clean/core/src/classpath/gnu/gnu/CORBA/OrbFunctional.java
|
|
SystemException ex )
|
SystemException ex)
|
public static void writeSystemException(OutputStream output, SystemException ex ) { String exIDL = toIDL(ex.getClass().getName()); output.write_string(exIDL); output.write_ulong(ex.minor); CompletionStatusHelper.write(output, ex.completed); }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/44e3ea509d80974dab547c4d1cf8c070d32bac86/ObjectCreator.java/buggy/core/src/classpath/gnu/gnu/CORBA/ObjectCreator.java
|
String exIDL = toIDL(ex.getClass().getName());
|
String exIDL = getRepositoryId(ex.getClass());
|
public static void writeSystemException(OutputStream output, SystemException ex ) { String exIDL = toIDL(ex.getClass().getName()); output.write_string(exIDL); output.write_ulong(ex.minor); CompletionStatusHelper.write(output, ex.completed); }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/44e3ea509d80974dab547c4d1cf8c070d32bac86/ObjectCreator.java/buggy/core/src/classpath/gnu/gnu/CORBA/ObjectCreator.java
|
return Class.forName(toClassName(idl) + suffix).newInstance();
|
return Class.forName(toClassName(JAVA_PREFIX, idl) + suffix) .newInstance();
|
public static java.lang.Object createObject(String idl, String suffix) { try { return Class.forName(toClassName(idl) + suffix).newInstance(); } catch (Exception ex) { return null; } }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/664d51c10013e4cacae28aeda82d586ac5b4250c/ObjectCreator.java/clean/core/src/classpath/gnu/gnu/CORBA/ObjectCreator.java
|
}
|
public static java.lang.Object createObject(String idl, String suffix) { try { return Class.forName(toClassName(idl) + suffix).newInstance(); } catch (Exception ex) { return null; } }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/664d51c10013e4cacae28aeda82d586ac5b4250c/ObjectCreator.java/clean/core/src/classpath/gnu/gnu/CORBA/ObjectCreator.java
|
|
String cl = toClassName(idl);
|
String cl = toClassName(JAVA_PREFIX, idl);
|
public static SystemException createSystemException(String idl, int minor, CompletionStatus completed ) { try { String cl = toClassName(idl); Class exClass = Class.forName(cl); Constructor constructor = exClass.getConstructor(new Class[] { String.class, int.class, CompletionStatus.class } ); Object exception = constructor.newInstance(new Object[] { " Remote exception " + idl + ", minor " + minor + ", " + completed + ".", new Integer(minor), completed } ); return (SystemException) exception; } catch (Exception ex) { ex.printStackTrace(); return new UNKNOWN("Unsupported system exception", minor, completed); } }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/664d51c10013e4cacae28aeda82d586ac5b4250c/ObjectCreator.java/clean/core/src/classpath/gnu/gnu/CORBA/ObjectCreator.java
|
protected static String toClassName(String IDL)
|
protected static String toClassName(String prefix, String IDL)
|
protected static String toClassName(String IDL) { String s = IDL; int a = s.indexOf(':') + 1; int b = s.lastIndexOf(':'); s = IDL.substring(a, b); if (s.startsWith(OMG_PREFIX)) s = JAVA_PREFIX + s.substring(OMG_PREFIX.length()); return s.replace('/', '.'); }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/664d51c10013e4cacae28aeda82d586ac5b4250c/ObjectCreator.java/clean/core/src/classpath/gnu/gnu/CORBA/ObjectCreator.java
|
s = JAVA_PREFIX + s.substring(OMG_PREFIX.length());
|
s = prefix + s.substring(OMG_PREFIX.length());
|
protected static String toClassName(String IDL) { String s = IDL; int a = s.indexOf(':') + 1; int b = s.lastIndexOf(':'); s = IDL.substring(a, b); if (s.startsWith(OMG_PREFIX)) s = JAVA_PREFIX + s.substring(OMG_PREFIX.length()); return s.replace('/', '.'); }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/664d51c10013e4cacae28aeda82d586ac5b4250c/ObjectCreator.java/clean/core/src/classpath/gnu/gnu/CORBA/ObjectCreator.java
|
if (response.getCodeClass() == 3 && getInstanceFollowRedirects()) {
|
if (isRedirect(response) && getInstanceFollowRedirects()) { InputStream body = response.getBody(); if (body != null) { byte[] ignore = new byte[1024]; while (true) { int n = body.read(ignore, 0, ignore.length); if (n == -1) break; } }
|
public void connect() throws IOException { if (connected) { return; } String protocol = url.getProtocol(); boolean secure = "https".equals(protocol); String host = url.getHost(); int port = url.getPort(); if (port < 0) { port = secure ? HTTPConnection.HTTPS_PORT : HTTPConnection.HTTP_PORT; } String file = url.getFile(); String username = url.getUserInfo(); String password = null; if (username != null) { int ci = username.indexOf(':'); if (ci != -1) { password = username.substring(ci + 1); username = username.substring(0, ci); } } final Credentials creds = (username == null) ? null : new Credentials (username, password); boolean retry; do { retry = false; if (connection == null) { connection = getConnection(host, port, secure); if (secure) { SSLSocketFactory factory = getSSLSocketFactory(); HostnameVerifier verifier = getHostnameVerifier(); if (factory != null) { connection.setSSLSocketFactory(factory); } connection.addHandshakeCompletedListener(this); // TODO verifier } } if (proxyHostname != null) { if (proxyPort < 0) { proxyPort = secure ? HTTPConnection.HTTPS_PORT : HTTPConnection.HTTP_PORT; } connection.setProxy(proxyHostname, proxyPort); } try { request = connection.newRequest(method, file); if (!keepAlive) { request.setHeader("Connection", "close"); } if (agent != null) { request.setHeader("User-Agent", agent); } request.getHeaders().putAll(requestHeaders); if (requestSink != null) { byte[] content = requestSink.toByteArray(); RequestBodyWriter writer = new ByteArrayRequestBodyWriter(content); request.setRequestBodyWriter(writer); } if (creds != null) { request.setAuthenticator(new Authenticator() { public Credentials getCredentials(String realm, int attempts) { return (attempts < 2) ? creds : null; } }); } response = request.dispatch(); } catch (IOException ioe) { if (connection.useCount > 0) { // Connection re-use failed: Try a new connection. try { connection.close(); } catch (IOException _) { // Ignore. } connection = null; retry = true; continue; } else { // First time the connection was used: Hard failure. throw ioe; } } if (response.getCodeClass() == 3 && getInstanceFollowRedirects()) { // Follow redirect String location = response.getHeader("Location"); if (location != null) { String connectionUri = connection.getURI(); int start = connectionUri.length(); if (location.startsWith(connectionUri) && location.charAt(start) == '/') { file = location.substring(start); retry = true; } else if (location.startsWith("http:")) { connection.close(); connection = null; secure = false; start = 7; int end = location.indexOf('/', start); host = location.substring(start, end); int ci = host.lastIndexOf(':'); if (ci != -1) { port = Integer.parseInt(host.substring (ci + 1)); host = host.substring(0, ci); } else { port = HTTPConnection.HTTP_PORT; } file = location.substring(end); retry = true; } else if (location.startsWith("https:")) { connection.close(); connection = null; secure = true; start = 8; int end = location.indexOf('/', start); host = location.substring(start, end); int ci = host.lastIndexOf(':'); if (ci != -1) { port = Integer.parseInt(host.substring (ci + 1)); host = host.substring(0, ci); } else { port = HTTPConnection.HTTPS_PORT; } file = location.substring(end); retry = true; } else if (location.length() > 0) { // Malformed absolute URI, treat as file part of URI if (location.charAt(0) == '/') { // Absolute path file = location; } else { // Relative path int lsi = file.lastIndexOf('/'); file = (lsi == -1) ? "/" : file.substring(0, lsi + 1); file += location; } retry = true; } } } else { responseSink = response.getBody(); if (response.getCode() == 404) { errorSink = responseSink; throw new FileNotFoundException(url.toString()); } } } while (retry); connected = true; }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/fd7e81b5c6d5963539719dfde9d197c68890c201/HTTPURLConnection.java/clean/core/src/classpath/gnu/gnu/java/net/protocol/http/HTTPURLConnection.java
|
focusColor = getFocusColor(); selectColor = getSelectColor(); disabledTextColor = getDisabledTextColor();
|
public MetalToggleButtonUI() { super(); }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/c4eda97e6e5feb8e7650d83d5066d85580f1249c/MetalToggleButtonUI.java/clean/core/src/classpath/javax/javax/swing/plaf/metal/MetalToggleButtonUI.java
|
|
public AddressPcEntry(int pc, int offset) {
|
public AddressPcEntry(VmMethod method, int pc, int offset) { this.method = method;
|
public AddressPcEntry(int pc, int offset) { this.pc = pc; this.offset = offset; }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ed15438ffd2660dd945871e91d68689a27418753/VmAddressMap.java/buggy/core/src/core/org/jnode/vm/classmgr/VmAddressMap.java
|
public void add(int pc, int offset) {
|
public void add(VmMethod method, int pc, int offset) {
|
public void add(int pc, int offset) { if (table != null) { throw new RuntimeException( "Address table is locked"); } final AddressPcEntry entry = new AddressPcEntry(pc, offset); if (list == null) { list = entry; } else { // Sort on offset (from low to high) if (offset < list.offset) { entry.next = list; list = entry; } else { AddressPcEntry p = list; while ((p.next != null) && (offset > p.next.offset)) { p = p.next; } entry.next = p.next; p.next = entry; } } }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ed15438ffd2660dd945871e91d68689a27418753/VmAddressMap.java/buggy/core/src/core/org/jnode/vm/classmgr/VmAddressMap.java
|
final AddressPcEntry entry = new AddressPcEntry(pc, offset);
|
final AddressPcEntry entry = new AddressPcEntry(method, pc, offset);
|
public void add(int pc, int offset) { if (table != null) { throw new RuntimeException( "Address table is locked"); } final AddressPcEntry entry = new AddressPcEntry(pc, offset); if (list == null) { list = entry; } else { // Sort on offset (from low to high) if (offset < list.offset) { entry.next = list; list = entry; } else { AddressPcEntry p = list; while ((p.next != null) && (offset > p.next.offset)) { p = p.next; } entry.next = p.next; p.next = entry; } } }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ed15438ffd2660dd945871e91d68689a27418753/VmAddressMap.java/buggy/core/src/core/org/jnode/vm/classmgr/VmAddressMap.java
|
final int[] table = new int[ count * 2];
|
final int[] table = new int[ count * 3]; this.methodTable = (VmMethod[]) methods.toArray(new VmMethod[ methods .size()]);
|
final void lock() { AddressPcEntry p = list; int count = 0; while (p != null) { count++; p = p.next; } final int[] table = new int[ count * 2]; p = list; int i = 0; int lastOffset = -1; while (p != null) { table[ i + 0] = p.pc; table[ i + 1] = p.offset; if (p.offset < lastOffset) { throw new VirtualMachineError( "unordered offset found"); } lastOffset = p.offset; i += 2; p = p.next; } this.table = table; this.list = null; }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ed15438ffd2660dd945871e91d68689a27418753/VmAddressMap.java/buggy/core/src/core/org/jnode/vm/classmgr/VmAddressMap.java
|
table[ i + 0] = p.pc; table[ i + 1] = p.offset;
|
table[ i + 0] = methods.indexOf(p.method); table[ i + 1] = p.pc; table[ i + 2] = p.offset;
|
final void lock() { AddressPcEntry p = list; int count = 0; while (p != null) { count++; p = p.next; } final int[] table = new int[ count * 2]; p = list; int i = 0; int lastOffset = -1; while (p != null) { table[ i + 0] = p.pc; table[ i + 1] = p.offset; if (p.offset < lastOffset) { throw new VirtualMachineError( "unordered offset found"); } lastOffset = p.offset; i += 2; p = p.next; } this.table = table; this.list = null; }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ed15438ffd2660dd945871e91d68689a27418753/VmAddressMap.java/buggy/core/src/core/org/jnode/vm/classmgr/VmAddressMap.java
|
i += 2;
|
i += 3;
|
final void lock() { AddressPcEntry p = list; int count = 0; while (p != null) { count++; p = p.next; } final int[] table = new int[ count * 2]; p = list; int i = 0; int lastOffset = -1; while (p != null) { table[ i + 0] = p.pc; table[ i + 1] = p.offset; if (p.offset < lastOffset) { throw new VirtualMachineError( "unordered offset found"); } lastOffset = p.offset; i += 2; p = p.next; } this.table = table; this.list = null; }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ed15438ffd2660dd945871e91d68689a27418753/VmAddressMap.java/buggy/core/src/core/org/jnode/vm/classmgr/VmAddressMap.java
|
for (int i = 0; i < table.length; i += 2) { final int pc = table[ i + 0]; final int offset = table[ i + 1];
|
for (int i = 0; i < table.length; i += 3) { final int methodIdx = table[ i + 0]; final int pc = table[ i + 1]; final int offset = table[ i + 2];
|
public void writeTo(PrintStream out) { for (int i = 0; i < table.length; i += 2) { final int pc = table[ i + 0]; final int offset = table[ i + 1]; out.println("PC[" + pc + "]\t0x" + NumberUtils.hex(offset)); } }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ed15438ffd2660dd945871e91d68689a27418753/VmAddressMap.java/buggy/core/src/core/org/jnode/vm/classmgr/VmAddressMap.java
|
out.println("PC[" + pc + "]\t0x" + NumberUtils.hex(offset));
|
out.println(methodTable[ methodIdx].getName() + ", pc[" + pc + "]\t0x" + NumberUtils.hex(offset));
|
public void writeTo(PrintStream out) { for (int i = 0; i < table.length; i += 2) { final int pc = table[ i + 0]; final int offset = table[ i + 1]; out.println("PC[" + pc + "]\t0x" + NumberUtils.hex(offset)); } }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ed15438ffd2660dd945871e91d68689a27418753/VmAddressMap.java/buggy/core/src/core/org/jnode/vm/classmgr/VmAddressMap.java
|
if (a0 < 0) {
|
if (a0 == 0) {
|
public static int const0(int a0, int a1) { int l0 = 0; if (a0 < 0) { l0 = -1; } if (a0 > 0) { l0 = 1; } return l0; }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/73a8acca7b333d0ca17760b5347d2ca2b416eede/IRTest.java/buggy/core/src/core/org/jnode/vm/compiler/ir/IRTest.java
|
private static void generateCode(AbstractX86Stream os, String className) throws MalformedURLException, ClassNotFoundException { VmByteCode code = loadByteCode(className); X86CodeGenerator x86cg = new X86CodeGenerator(os, code.getLength()); IRControlFlowGraph cfg = new IRControlFlowGraph(code); IRGenerator irg = new IRGenerator(cfg); BytecodeParser.parse(code, irg); BootableArrayList quads = irg.getQuadList(); int n = quads.size(); BootableHashMap liveVariables = new BootableHashMap(); for (int i=0; i<n; i+=1) { Quad quad = (Quad) quads.get(i); quad.doPass2(liveVariables); } Collection lv = liveVariables.values(); n = lv.size(); LiveRange[] liveRanges = new LiveRange[n]; Iterator it = lv.iterator(); for (int i=0; i<n; i+=1) { Variable v = (Variable) it.next(); liveRanges[i] = new LiveRange(v); } Arrays.sort(liveRanges); LinearScanAllocator lsa = new LinearScanAllocator(liveRanges); lsa.allocate(); x86cg.setArgumentVariables(irg.getVariables(), irg.getNoArgs()); x86cg.setSpilledVariables(lsa.getSpilledVariables()); x86cg.emitHeader(); n = quads.size(); for (int i=0; i<n; i+=1) { Quad quad = (Quad) quads.get(i); if (!quad.isDeadCode()) { quad.generateCode(x86cg); } } }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/73a8acca7b333d0ca17760b5347d2ca2b416eede/IRTest.java/buggy/core/src/core/org/jnode/vm/compiler/ir/IRTest.java
|
||
if ("const1".equals(method.getName())) {
|
if ("terniary".equals(method.getName())) {
|
private static VmByteCode loadByteCode(String className) throws MalformedURLException, ClassNotFoundException { VmSystemClassLoader vmc = new VmSystemClassLoader(new File(".").toURL(), new VmX86Architecture()); VmType type = vmc.loadClass(className, true); VmMethod arithMethod = null; int nMethods = type.getNoDeclaredMethods(); for (int i=0; i<nMethods; i+=1) { VmMethod method = type.getDeclaredMethod(i); if ("const1".equals(method.getName())) { arithMethod = method; break; } } VmByteCode code = arithMethod.getBytecode(); return code; }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/73a8acca7b333d0ca17760b5347d2ca2b416eede/IRTest.java/buggy/core/src/core/org/jnode/vm/compiler/ir/IRTest.java
|
if (toAppend != null && toAppend.length() > 0) revalidate();
|
public void append(String toAppend) { try { getDocument().insertString(getText().length(), toAppend, null); } catch (BadLocationException exception) { /* This shouldn't happen in theory -- but, if it does... */ throw new RuntimeException("Unexpected exception occurred.", exception); } }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/JTextArea.java/buggy/core/src/classpath/javax/javax/swing/JTextArea.java
|
|
doc.insertString(start, text, null);
|
doc.insertString(start, text, null);
|
public void replaceRange(String text, int start, int end) { Document doc = getDocument(); if (start > end || start < doc.getStartPosition().getOffset() || end >= doc.getEndPosition().getOffset()) throw new IllegalArgumentException(); try { doc.remove(start, end - start); doc.insertString(start, text, null); } catch (BadLocationException e) { // This cannot happen as we check offset above. } }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/JTextArea.java/buggy/core/src/classpath/javax/javax/swing/JTextArea.java
|
return VMSecurityManager.currentClassLoader();
|
Class cl = currentLoadedClass(); return cl != null ? cl.getClassLoader() : null;
|
protected ClassLoader currentClassLoader() { return VMSecurityManager.currentClassLoader(); }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/c65f6a6914005749230b8f31c6890448761cd6f4/SecurityManager.java/buggy/core/src/classpath/java/java/lang/SecurityManager.java
|
return VMSecurityManager.getClassContext();
|
Class[] stack1 = VMStackWalker.getClassContext(); Class[] stack2 = new Class[stack1.length - 1]; System.arraycopy(stack1, 1, stack2, 0, stack1.length - 1); return stack2;
|
protected Class[] getClassContext() { return VMSecurityManager.getClassContext(); }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/c65f6a6914005749230b8f31c6890448761cd6f4/SecurityManager.java/buggy/core/src/classpath/java/java/lang/SecurityManager.java
|
int type = getDataType( locator ); if (type != DOUBLE_DATA_TYPE) { throw new SetDataException ("The target dataCell is not a String"); }
|
public void appendData (Locator locator, String stringValue) throws SetDataException { String strData; try { strData = getStringData(locator); strData += stringValue; } catch (NoDataException e) { strData = stringValue; } setData(locator, strData); }
|
4483 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4483/d284017971f28316bf9f32adc32913baed323bfc/DataCube.java/clean/src/gov/nasa/gsfc/adc/xdf/DataCube.java
|
|
} else if (type == SHORT_DATA_TYPE) { longDataArray.set(longIndex+1, new short [shortAxisSize]); } else if (type == LONG_DATA_TYPE) { longDataArray.set(longIndex+1, new long [shortAxisSize]);
|
private void checkDataArrayBounds (int longIndex, int shortIndex, int type) throws SetDataException { if (shortIndex < 0 || longIndex < 0) { throw new SetDataException("Cant set data: passed locator/axes dont belong to this array?"); } // Does the location exist yet? If not, create the primative arrays // that lie along the short axis // int shortAxisSize = getShortAxis().getLength(); int shortAxisSize = parentArray.getShortAxisSize(); if (shortAxisSize < 1) { shortAxisSize = 1; } // is the long array too small? if (longDataArray.size() < (longIndex+1)) { int maxDeclLongArraySize = getMaxLongArraySize(); // should be held in private var int expandSize = longIndex > maxDeclLongArraySize ? longIndex : maxDeclLongArraySize; expandSize *= expandFactor; // add in additional amount to prevent us from doing this too much expandLongArray(expandSize); } // is the short array too small? has it been init'd even yet? // we perform checks here.. if (longDataArray.get(longIndex) == null) { // init/create the short array longDataArray.set( longIndex, new byte[shortAxisSize]); if (type == DOUBLE_DATA_TYPE) { longDataArray.set(longIndex+1, new double [shortAxisSize]); } else if (type == INT_DATA_TYPE) { longDataArray.set(longIndex+1, new int [shortAxisSize]); } else if (type == BYTE_DATA_TYPE) { longDataArray.set(longIndex+1, new byte [shortAxisSize]); } else if (type == SHORT_DATA_TYPE) { longDataArray.set(longIndex+1, new short [shortAxisSize]); } else if (type == LONG_DATA_TYPE) { longDataArray.set(longIndex+1, new long [shortAxisSize]); } else if (type == STRING_DATA_TYPE) { longDataArray.set(longIndex+1, new String [shortAxisSize]); } } else { int currentShortAxisSize = getLongDataArraySize(longIndex, type); // requested short axis location not exist? if (currentShortAxisSize <= shortIndex) { // should flag the user that need to add AxisValue first if (shortIndex > shortAxisSize) { throw new SetDataException("Error: axis lacks an AxisValue at location requested in setData()."); } else { // add in short axis location to local short array(s) int newsize = shortIndex+1; // need to add one for case of 1-D newsize *= expandFactor; // expand short axis by expandFactor // Log.debugln("Expanding short array at longIndex:"+longIndex+" to "+newsize); longDataArray.set(longIndex, expandArray((byte []) longDataArray.get(longIndex), newsize)); if (type == DOUBLE_DATA_TYPE) { longDataArray.set(longIndex+1, expandArray((double[]) longDataArray.get(longIndex+1), newsize)); } else if (type == INT_DATA_TYPE) { longDataArray.set(longIndex+1, expandArray((int[]) longDataArray.get(longIndex+1), newsize)); } else if (type == BYTE_DATA_TYPE) { longDataArray.set(longIndex+1, expandArray((byte[]) longDataArray.get(longIndex+1), newsize)); } else if (type == SHORT_DATA_TYPE) { longDataArray.set(longIndex+1, expandArray((short[]) longDataArray.get(longIndex+1), newsize)); } else if (type == LONG_DATA_TYPE) { longDataArray.set(longIndex+1, expandArray((long []) longDataArray.get(longIndex+1), newsize)); } else if (type == STRING_DATA_TYPE) { longDataArray.set(longIndex+1, expandArray((String []) longDataArray.get(longIndex+1), newsize)); } } } } }
|
4483 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4483/d284017971f28316bf9f32adc32913baed323bfc/DataCube.java/clean/src/gov/nasa/gsfc/adc/xdf/DataCube.java
|
|
} else if (type == SHORT_DATA_TYPE) { longDataArray.set(longIndex+1, expandArray((short[]) longDataArray.get(longIndex+1), newsize)); } else if (type == LONG_DATA_TYPE) { longDataArray.set(longIndex+1, expandArray((long []) longDataArray.get(longIndex+1), newsize));
|
private void checkDataArrayBounds (int longIndex, int shortIndex, int type) throws SetDataException { if (shortIndex < 0 || longIndex < 0) { throw new SetDataException("Cant set data: passed locator/axes dont belong to this array?"); } // Does the location exist yet? If not, create the primative arrays // that lie along the short axis // int shortAxisSize = getShortAxis().getLength(); int shortAxisSize = parentArray.getShortAxisSize(); if (shortAxisSize < 1) { shortAxisSize = 1; } // is the long array too small? if (longDataArray.size() < (longIndex+1)) { int maxDeclLongArraySize = getMaxLongArraySize(); // should be held in private var int expandSize = longIndex > maxDeclLongArraySize ? longIndex : maxDeclLongArraySize; expandSize *= expandFactor; // add in additional amount to prevent us from doing this too much expandLongArray(expandSize); } // is the short array too small? has it been init'd even yet? // we perform checks here.. if (longDataArray.get(longIndex) == null) { // init/create the short array longDataArray.set( longIndex, new byte[shortAxisSize]); if (type == DOUBLE_DATA_TYPE) { longDataArray.set(longIndex+1, new double [shortAxisSize]); } else if (type == INT_DATA_TYPE) { longDataArray.set(longIndex+1, new int [shortAxisSize]); } else if (type == BYTE_DATA_TYPE) { longDataArray.set(longIndex+1, new byte [shortAxisSize]); } else if (type == SHORT_DATA_TYPE) { longDataArray.set(longIndex+1, new short [shortAxisSize]); } else if (type == LONG_DATA_TYPE) { longDataArray.set(longIndex+1, new long [shortAxisSize]); } else if (type == STRING_DATA_TYPE) { longDataArray.set(longIndex+1, new String [shortAxisSize]); } } else { int currentShortAxisSize = getLongDataArraySize(longIndex, type); // requested short axis location not exist? if (currentShortAxisSize <= shortIndex) { // should flag the user that need to add AxisValue first if (shortIndex > shortAxisSize) { throw new SetDataException("Error: axis lacks an AxisValue at location requested in setData()."); } else { // add in short axis location to local short array(s) int newsize = shortIndex+1; // need to add one for case of 1-D newsize *= expandFactor; // expand short axis by expandFactor // Log.debugln("Expanding short array at longIndex:"+longIndex+" to "+newsize); longDataArray.set(longIndex, expandArray((byte []) longDataArray.get(longIndex), newsize)); if (type == DOUBLE_DATA_TYPE) { longDataArray.set(longIndex+1, expandArray((double[]) longDataArray.get(longIndex+1), newsize)); } else if (type == INT_DATA_TYPE) { longDataArray.set(longIndex+1, expandArray((int[]) longDataArray.get(longIndex+1), newsize)); } else if (type == BYTE_DATA_TYPE) { longDataArray.set(longIndex+1, expandArray((byte[]) longDataArray.get(longIndex+1), newsize)); } else if (type == SHORT_DATA_TYPE) { longDataArray.set(longIndex+1, expandArray((short[]) longDataArray.get(longIndex+1), newsize)); } else if (type == LONG_DATA_TYPE) { longDataArray.set(longIndex+1, expandArray((long []) longDataArray.get(longIndex+1), newsize)); } else if (type == STRING_DATA_TYPE) { longDataArray.set(longIndex+1, expandArray((String []) longDataArray.get(longIndex+1), newsize)); } } } } }
|
4483 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4483/d284017971f28316bf9f32adc32913baed323bfc/DataCube.java/clean/src/gov/nasa/gsfc/adc/xdf/DataCube.java
|
|
protected Object clone() throws CloneNotSupportedException { DataCube cloneObj = (DataCube) super.clone(); synchronized (this) { synchronized (cloneObj) { cloneObj.longDataArray = deepCopy(this.longDataArray, dimension); } } return cloneObj; }
|
4483 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4483/d284017971f28316bf9f32adc32913baed323bfc/DataCube.java/clean/src/gov/nasa/gsfc/adc/xdf/DataCube.java
|
||
public Object getData (Locator locator) throws NoDataException
|
public Object getData (Locator locator) throws NoDataException, IllegalArgumentException
|
public Object getData (Locator locator) throws NoDataException { int longIndex = parentArray.getLongArrayIndex(locator); int shortIndex = parentArray.getShortArrayIndex(locator); try { if (java.lang.reflect.Array.getByte(longDataArray.get(longIndex), shortIndex) !=1) throw new NoDataException(); //the location we try to access contains noDataValue return java.lang.reflect.Array.get(longDataArray.get(longIndex+1), shortIndex); } catch (Exception e) { //the location we try to access is not allocated, //i.e., no data in the cell throw new NoDataException(); } }
|
4483 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4483/d284017971f28316bf9f32adc32913baed323bfc/DataCube.java/clean/src/gov/nasa/gsfc/adc/xdf/DataCube.java
|
} catch (Exception e) {
|
} catch (IllegalArgumentException iae) { throw new IllegalArgumentException(); } catch (Exception e) {
|
public Object getData (Locator locator) throws NoDataException { int longIndex = parentArray.getLongArrayIndex(locator); int shortIndex = parentArray.getShortArrayIndex(locator); try { if (java.lang.reflect.Array.getByte(longDataArray.get(longIndex), shortIndex) !=1) throw new NoDataException(); //the location we try to access contains noDataValue return java.lang.reflect.Array.get(longDataArray.get(longIndex+1), shortIndex); } catch (Exception e) { //the location we try to access is not allocated, //i.e., no data in the cell throw new NoDataException(); } }
|
4483 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4483/d284017971f28316bf9f32adc32913baed323bfc/DataCube.java/clean/src/gov/nasa/gsfc/adc/xdf/DataCube.java
|
throws NoDataException
|
throws NoDataException, IllegalArgumentException
|
public double getDoubleData (Locator locator) throws NoDataException { int longIndex = parentArray.getLongArrayIndex(locator); int shortIndex = parentArray.getShortArrayIndex(locator); try { if (java.lang.reflect.Array.getByte(longDataArray.get(longIndex), shortIndex) !=1) throw new NoDataException(); //the location we try to access contains noDataValue return java.lang.reflect.Array.getDouble(longDataArray.get(longIndex+1), shortIndex); } catch (Exception e) { //the location we try to access is not allocated, //i.e., no data in the cell throw new NoDataException(); } }
|
4483 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4483/d284017971f28316bf9f32adc32913baed323bfc/DataCube.java/clean/src/gov/nasa/gsfc/adc/xdf/DataCube.java
|
} catch (Exception e) {
|
} catch (IllegalArgumentException iae) { throw new IllegalArgumentException(); } catch (Exception e) {
|
public double getDoubleData (Locator locator) throws NoDataException { int longIndex = parentArray.getLongArrayIndex(locator); int shortIndex = parentArray.getShortArrayIndex(locator); try { if (java.lang.reflect.Array.getByte(longDataArray.get(longIndex), shortIndex) !=1) throw new NoDataException(); //the location we try to access contains noDataValue return java.lang.reflect.Array.getDouble(longDataArray.get(longIndex+1), shortIndex); } catch (Exception e) { //the location we try to access is not allocated, //i.e., no data in the cell throw new NoDataException(); } }
|
4483 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4483/d284017971f28316bf9f32adc32913baed323bfc/DataCube.java/clean/src/gov/nasa/gsfc/adc/xdf/DataCube.java
|
} else if (type == SHORT_DATA_TYPE) { size = ((short []) longDataArray.get(longIndex+1)).length; } else if (type == LONG_DATA_TYPE) { size = ((long []) longDataArray.get(longIndex+1)).length;
|
private int getLongDataArraySize (int longIndex, int type) { int size = 0; if (type == DOUBLE_DATA_TYPE) { size = ((double[]) longDataArray.get(longIndex+1)).length; } else if (type == INT_DATA_TYPE) { size = ((int []) longDataArray.get(longIndex+1)).length; } else if (type == BYTE_DATA_TYPE) { size = ((byte []) longDataArray.get(longIndex+1)).length; } else if (type == SHORT_DATA_TYPE) { size = ((short []) longDataArray.get(longIndex+1)).length; } else if (type == LONG_DATA_TYPE) { size = ((long []) longDataArray.get(longIndex+1)).length; } else if (type == STRING_DATA_TYPE) { size = ((String []) longDataArray.get(longIndex+1)).length; } return size; }
|
4483 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4483/d284017971f28316bf9f32adc32913baed323bfc/DataCube.java/clean/src/gov/nasa/gsfc/adc/xdf/DataCube.java
|
|
JLabel fieldsLabel = new JLabel(LangTool.getString("xtfr.labelFields"));
|
fieldsLabel = new JLabel(LangTool.getString("xtfr.labelFields"));
|
private void initXTFRInfo() { // create some reusable borders and layouts BorderLayout borderLayout = new BorderLayout(); Border emptyBorder = BorderFactory.createEmptyBorder(10, 10, 0, 10); // main panel JPanel mp = new JPanel(); mp.setLayout(borderLayout); // system panel JPanel sp = new JPanel(); sp.setLayout(new BorderLayout()); sp.setBorder(emptyBorder); // host panel for as400 as400p = new JPanel(); as400p.setBorder( BorderFactory.createTitledBorder( LangTool.getString("xtfr.labelAS400"))); as400p.setLayout(new GridBagLayout()); JLabel snpLabel = new JLabel(LangTool.getString("xtfr.labelSystemName")); systemName = new JTextField(vt.getHostName()); systemName.setColumns(30); gbc = new GridBagConstraints(); gbc.gridx = 0; gbc.gridy =0; gbc.anchor = GridBagConstraints.WEST; gbc.insets = new Insets(5, 10, 5, 5); as400p.add(snpLabel, gbc); gbc = new GridBagConstraints(); gbc.gridx = 1; gbc.gridy = 0; gbc.gridwidth = 2; gbc.anchor = GridBagConstraints.WEST; gbc.insets = new Insets(5, 5, 5, 10); as400p.add(systemName,gbc); JLabel hfnpLabel = new JLabel(LangTool.getString("xtfr.labelHostFile")); gbc = new GridBagConstraints(); gbc.gridx = 0; gbc.gridy = 1; gbc.anchor = GridBagConstraints.WEST; gbc.insets = new Insets(5, 10, 5, 5); as400p.add(hfnpLabel, gbc); hostFile = new JTextField(); hostFile.setColumns(30); gbc = new GridBagConstraints(); gbc.gridx = 1; gbc.gridy = 1; gbc.gridwidth = 2; gbc.anchor = GridBagConstraints.WEST; gbc.insets = new Insets(5, 5, 5, 10); as400p.add(hostFile, gbc); JLabel idpLabel = new JLabel(LangTool.getString("xtfr.labelUserId")); gbc = new GridBagConstraints(); gbc.gridx = 0; gbc.gridy = 2; gbc.anchor = GridBagConstraints.WEST; gbc.insets = new Insets(5, 10, 5, 5); as400p.add(idpLabel, gbc); user = new JTextField(); user.setColumns(15); gbc = new GridBagConstraints(); gbc.gridx = 1; gbc.gridy = 2; gbc.anchor = GridBagConstraints.WEST; gbc.insets = new Insets(5, 5, 5, 5); as400p.add(user, gbc); // password panel JLabel pwpLabel = new JLabel(LangTool.getString("xtfr.labelPassword")); gbc = new GridBagConstraints(); gbc.gridx = 0; gbc.gridy = 3; gbc.anchor = GridBagConstraints.WEST; gbc.insets = new Insets(5, 10, 5, 5); as400p.add(pwpLabel, gbc); password = new JPasswordField(); password.setColumns(15); gbc = new GridBagConstraints(); gbc.gridx = 1; gbc.gridy = 3; gbc.anchor = GridBagConstraints.WEST; gbc.insets = new Insets(5, 5, 5, 5); as400p.add(password, gbc); // Query Wizard useQuery = new JCheckBox(LangTool.getString("xtfr.labelUseQuery")); useQuery.addItemListener(this); gbc = new GridBagConstraints(); gbc.gridx = 0; gbc.gridy = 4; gbc.anchor = GridBagConstraints.WEST; gbc.insets = new Insets(5, 10, 5, 5); as400p.add(useQuery, gbc); //query button queryWizard = new JButton(LangTool.getString("xtfr.labelQueryWizard")); queryWizard.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(ActionEvent e) { startWizard(); } }); queryWizard.setEnabled(false); gbc = new GridBagConstraints(); gbc.gridx = 1; gbc.gridy = 4; gbc.anchor = GridBagConstraints.WEST; gbc.fill = GridBagConstraints.HORIZONTAL; gbc.insets = new Insets(0, 5, 0, 5); as400p.add(queryWizard, gbc); // Field Selection panel JLabel fieldsLabel = new JLabel(LangTool.getString("xtfr.labelFields")); gbc = new GridBagConstraints(); gbc.gridx = 0; gbc.gridy = 5; gbc.anchor = GridBagConstraints.WEST; gbc.insets = new Insets(5, 10, 5, 5); as400p.add(fieldsLabel, gbc); allFields = new JRadioButton(LangTool.getString("xtfr.labelAllFields")); allFields.setSelected(true); gbc = new GridBagConstraints(); gbc.gridx = 1; gbc.gridy = 5; gbc.anchor = GridBagConstraints.CENTER; gbc.insets = new Insets(0, 5, 0, 5); as400p.add(allFields, gbc); selectedFields = new JRadioButton(LangTool.getString("xtfr.labelSelectedFields")); gbc = new GridBagConstraints(); gbc.gridx = 2; gbc.gridy = 5; gbc.anchor = GridBagConstraints.CENTER; gbc.insets = new Insets(0, 5, 0, 10); as400p.add(selectedFields, gbc); ButtonGroup fieldGroup = new ButtonGroup(); fieldGroup.add(allFields); fieldGroup.add(selectedFields); // Field Text Description panel JLabel textDescLabel = new JLabel(LangTool.getString("xtfr.labelTxtDesc")); gbc = new GridBagConstraints(); gbc.gridx = 0; gbc.gridy = 6; gbc.anchor = GridBagConstraints.WEST; gbc.insets = new Insets(5, 10, 5, 5); as400p.add(textDescLabel, gbc); txtDesc = new JRadioButton(LangTool.getString("xtfr.labelTxtDescFull")); txtDesc.setSelected(true); gbc = new GridBagConstraints(); gbc.gridx = 1; gbc.gridy = 6; gbc.anchor = GridBagConstraints.CENTER; gbc.insets = new Insets(0, 5, 5, 5); as400p.add(txtDesc, gbc); intDesc = new JRadioButton(LangTool.getString("xtfr.labelTxtDescInt")); gbc = new GridBagConstraints(); gbc.gridx = 2; gbc.gridy = 6; gbc.anchor = GridBagConstraints.CENTER; gbc.insets = new Insets(0, 5, 5, 10); as400p.add(intDesc, gbc); ButtonGroup txtDescGroup = new ButtonGroup(); txtDescGroup.add(txtDesc); txtDescGroup.add(intDesc); // pc panel for pc information JPanel pcp = new JPanel(new GridBagLayout()); pcp.setBorder( BorderFactory.createTitledBorder( LangTool.getString("xtfr.labelpc"))); JLabel pffLabel = new JLabel(LangTool.getString("xtfr.labelFileFormat")); gbc = new GridBagConstraints(); gbc.gridx = 0; gbc.gridy = 0; gbc.anchor = GridBagConstraints.WEST; gbc.insets = new Insets(5, 10, 5, 5); pcp.add(pffLabel, gbc); fileFormat = new JComboBox(); fileFormat.setPreferredSize(new Dimension(220, 25)); fileFormat.addItem(htmlFilter.getDescription()); fileFormat.addItem(OOFilter.getDescription()); fileFormat.addItem(ExcelFilter.getDescription()); fileFormat.addItem(KSpreadFilter.getDescription()); fileFormat.addItem(DelimitedFilter.getDescription()); fileFormat.addItem(FixedWidthFilter.getDescription()); fileFormat.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { JComboBox cb = (JComboBox) e.getSource(); filter = getFilterByDescription(); if (filter.getOutputFilterInstance().isCustomizable()) customize.setEnabled(true); else customize.setEnabled(false); } }); gbc = new GridBagConstraints(); gbc.gridx = 1; gbc.gridy = 0; gbc.anchor = GridBagConstraints.WEST; gbc.insets = new Insets(0, 5, 0, 5); pcp.add(fileFormat, gbc); customize = new JButton(LangTool.getString("xtfr.labelCustomize")); customize.setPreferredSize(new Dimension(110, 25)); customize.setActionCommand("CUSTOMIZE"); customize.addActionListener(this); gbc = new GridBagConstraints(); gbc.gridx = 2; gbc.gridy = 0; gbc.anchor = GridBagConstraints.WEST; gbc.insets = new Insets(0, 5, 0, 10); pcp.add(customize, gbc); // now make sure we set the customizable button enabled or not // depending on the filter. fileFormat.setSelectedIndex(0); JLabel pcpLabel = new JLabel(LangTool.getString("xtfr.labelPCFile")); gbc = new GridBagConstraints(); gbc.gridx = 0; gbc.gridy = 1; gbc.anchor = GridBagConstraints.WEST; gbc.insets = new Insets(5, 10, 5, 5); pcp.add(pcpLabel, gbc); localFile = new JTextField(); localFile.setColumns(15); gbc = new GridBagConstraints(); gbc.gridx = 1; gbc.gridy = 1; gbc.anchor = GridBagConstraints.WEST; gbc.fill = GridBagConstraints.HORIZONTAL; gbc.insets = new Insets(0, 5, 0, 5); pcp.add(localFile, gbc); JButton browsePC = new JButton(LangTool.getString("xtfr.labelPCBrowse")); browsePC.setActionCommand("BROWSEPC"); browsePC.addActionListener(this); browsePC.setPreferredSize(new Dimension(110, 25)); gbc = new GridBagConstraints(); gbc.gridx = 2; gbc.gridy = 1; gbc.anchor = GridBagConstraints.WEST; gbc.fill = GridBagConstraints.HORIZONTAL; gbc.insets = new Insets(0, 5, 0, 10); pcp.add(browsePC, gbc); decimalSeparator = new JComboBox(); decimalSeparator.setPreferredSize(new Dimension(220, 25)); decimalSeparator.addItem(LangTool.getString("xtfr.period")); decimalSeparator.addItem(LangTool.getString("xtfr.comma")); // obtain the decimal separator for the machine locale DecimalFormat formatter = (DecimalFormat) NumberFormat.getInstance(Locale.getDefault()); if (formatter.getDecimalFormatSymbols().getDecimalSeparator() == '.') decimalSeparator.setSelectedIndex(0); else decimalSeparator.setSelectedIndex(1); gbc = new GridBagConstraints(); gbc.gridx = 0; gbc.gridy = 2; gbc.anchor = GridBagConstraints.WEST; gbc.insets = new Insets(5, 10, 10, 5); pcp.add(new JLabel(LangTool.getString("xtfr.labelDecimal")), gbc); gbc = new GridBagConstraints(); gbc.gridx = 1; gbc.gridy = 2; gbc.anchor = GridBagConstraints.WEST; gbc.fill = GridBagConstraints.HORIZONTAL; gbc.insets = new Insets(0, 5, 5, 5); pcp.add(decimalSeparator, gbc); sp.add(as400p, BorderLayout.NORTH); sp.add(pcp, BorderLayout.SOUTH); // options panel JPanel op = new JPanel(new FlowLayout(FlowLayout.CENTER, 10, 10)); JButton xtfrButton = new JButton(LangTool.getString("xtfr.labelXTFR")); xtfrButton.addActionListener(this); xtfrButton.setActionCommand("XTFR"); op.add(xtfrButton); JButton emailButton = new JButton(LangTool.getString("xtfr.labelXTFREmail")); emailButton.addActionListener(this); emailButton.setActionCommand("EMAIL"); op.add(emailButton); mp.add(sp, BorderLayout.CENTER); mp.add(op, BorderLayout.SOUTH); this.getContentPane().add(mp, BorderLayout.CENTER); // this.setModal(false); // this.setModal(true); this.setTitle(LangTool.getString("xtfr.title")); initXTFRFields(); // pack it and center it on the screen pack(); 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); //QueryPanel when Use Query selected as400QueryP = new JPanel(); as400QueryP.setLayout(new BorderLayout()); queryStatement = new JTextArea(5, 40); JScrollPane scrollPane = new JScrollPane(queryStatement); queryStatement.setLineWrap(true); as400QueryP.add(scrollPane, BorderLayout.CENTER); as400FieldP = new JPanel(); AlignLayout as400fLayout = new AlignLayout(); as400FieldP.setLayout(as400fLayout); // now show the world what we can do show(); }
|
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/57450b8f025865c21497e968647e9f326c0a2834/XTFRFile.java/clean/tn5250j/src/org/tn5250j/tools/XTFRFile.java
|
JLabel textDescLabel =
|
textDescLabel =
|
private void initXTFRInfo() { // create some reusable borders and layouts BorderLayout borderLayout = new BorderLayout(); Border emptyBorder = BorderFactory.createEmptyBorder(10, 10, 0, 10); // main panel JPanel mp = new JPanel(); mp.setLayout(borderLayout); // system panel JPanel sp = new JPanel(); sp.setLayout(new BorderLayout()); sp.setBorder(emptyBorder); // host panel for as400 as400p = new JPanel(); as400p.setBorder( BorderFactory.createTitledBorder( LangTool.getString("xtfr.labelAS400"))); as400p.setLayout(new GridBagLayout()); JLabel snpLabel = new JLabel(LangTool.getString("xtfr.labelSystemName")); systemName = new JTextField(vt.getHostName()); systemName.setColumns(30); gbc = new GridBagConstraints(); gbc.gridx = 0; gbc.gridy =0; gbc.anchor = GridBagConstraints.WEST; gbc.insets = new Insets(5, 10, 5, 5); as400p.add(snpLabel, gbc); gbc = new GridBagConstraints(); gbc.gridx = 1; gbc.gridy = 0; gbc.gridwidth = 2; gbc.anchor = GridBagConstraints.WEST; gbc.insets = new Insets(5, 5, 5, 10); as400p.add(systemName,gbc); JLabel hfnpLabel = new JLabel(LangTool.getString("xtfr.labelHostFile")); gbc = new GridBagConstraints(); gbc.gridx = 0; gbc.gridy = 1; gbc.anchor = GridBagConstraints.WEST; gbc.insets = new Insets(5, 10, 5, 5); as400p.add(hfnpLabel, gbc); hostFile = new JTextField(); hostFile.setColumns(30); gbc = new GridBagConstraints(); gbc.gridx = 1; gbc.gridy = 1; gbc.gridwidth = 2; gbc.anchor = GridBagConstraints.WEST; gbc.insets = new Insets(5, 5, 5, 10); as400p.add(hostFile, gbc); JLabel idpLabel = new JLabel(LangTool.getString("xtfr.labelUserId")); gbc = new GridBagConstraints(); gbc.gridx = 0; gbc.gridy = 2; gbc.anchor = GridBagConstraints.WEST; gbc.insets = new Insets(5, 10, 5, 5); as400p.add(idpLabel, gbc); user = new JTextField(); user.setColumns(15); gbc = new GridBagConstraints(); gbc.gridx = 1; gbc.gridy = 2; gbc.anchor = GridBagConstraints.WEST; gbc.insets = new Insets(5, 5, 5, 5); as400p.add(user, gbc); // password panel JLabel pwpLabel = new JLabel(LangTool.getString("xtfr.labelPassword")); gbc = new GridBagConstraints(); gbc.gridx = 0; gbc.gridy = 3; gbc.anchor = GridBagConstraints.WEST; gbc.insets = new Insets(5, 10, 5, 5); as400p.add(pwpLabel, gbc); password = new JPasswordField(); password.setColumns(15); gbc = new GridBagConstraints(); gbc.gridx = 1; gbc.gridy = 3; gbc.anchor = GridBagConstraints.WEST; gbc.insets = new Insets(5, 5, 5, 5); as400p.add(password, gbc); // Query Wizard useQuery = new JCheckBox(LangTool.getString("xtfr.labelUseQuery")); useQuery.addItemListener(this); gbc = new GridBagConstraints(); gbc.gridx = 0; gbc.gridy = 4; gbc.anchor = GridBagConstraints.WEST; gbc.insets = new Insets(5, 10, 5, 5); as400p.add(useQuery, gbc); //query button queryWizard = new JButton(LangTool.getString("xtfr.labelQueryWizard")); queryWizard.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(ActionEvent e) { startWizard(); } }); queryWizard.setEnabled(false); gbc = new GridBagConstraints(); gbc.gridx = 1; gbc.gridy = 4; gbc.anchor = GridBagConstraints.WEST; gbc.fill = GridBagConstraints.HORIZONTAL; gbc.insets = new Insets(0, 5, 0, 5); as400p.add(queryWizard, gbc); // Field Selection panel JLabel fieldsLabel = new JLabel(LangTool.getString("xtfr.labelFields")); gbc = new GridBagConstraints(); gbc.gridx = 0; gbc.gridy = 5; gbc.anchor = GridBagConstraints.WEST; gbc.insets = new Insets(5, 10, 5, 5); as400p.add(fieldsLabel, gbc); allFields = new JRadioButton(LangTool.getString("xtfr.labelAllFields")); allFields.setSelected(true); gbc = new GridBagConstraints(); gbc.gridx = 1; gbc.gridy = 5; gbc.anchor = GridBagConstraints.CENTER; gbc.insets = new Insets(0, 5, 0, 5); as400p.add(allFields, gbc); selectedFields = new JRadioButton(LangTool.getString("xtfr.labelSelectedFields")); gbc = new GridBagConstraints(); gbc.gridx = 2; gbc.gridy = 5; gbc.anchor = GridBagConstraints.CENTER; gbc.insets = new Insets(0, 5, 0, 10); as400p.add(selectedFields, gbc); ButtonGroup fieldGroup = new ButtonGroup(); fieldGroup.add(allFields); fieldGroup.add(selectedFields); // Field Text Description panel JLabel textDescLabel = new JLabel(LangTool.getString("xtfr.labelTxtDesc")); gbc = new GridBagConstraints(); gbc.gridx = 0; gbc.gridy = 6; gbc.anchor = GridBagConstraints.WEST; gbc.insets = new Insets(5, 10, 5, 5); as400p.add(textDescLabel, gbc); txtDesc = new JRadioButton(LangTool.getString("xtfr.labelTxtDescFull")); txtDesc.setSelected(true); gbc = new GridBagConstraints(); gbc.gridx = 1; gbc.gridy = 6; gbc.anchor = GridBagConstraints.CENTER; gbc.insets = new Insets(0, 5, 5, 5); as400p.add(txtDesc, gbc); intDesc = new JRadioButton(LangTool.getString("xtfr.labelTxtDescInt")); gbc = new GridBagConstraints(); gbc.gridx = 2; gbc.gridy = 6; gbc.anchor = GridBagConstraints.CENTER; gbc.insets = new Insets(0, 5, 5, 10); as400p.add(intDesc, gbc); ButtonGroup txtDescGroup = new ButtonGroup(); txtDescGroup.add(txtDesc); txtDescGroup.add(intDesc); // pc panel for pc information JPanel pcp = new JPanel(new GridBagLayout()); pcp.setBorder( BorderFactory.createTitledBorder( LangTool.getString("xtfr.labelpc"))); JLabel pffLabel = new JLabel(LangTool.getString("xtfr.labelFileFormat")); gbc = new GridBagConstraints(); gbc.gridx = 0; gbc.gridy = 0; gbc.anchor = GridBagConstraints.WEST; gbc.insets = new Insets(5, 10, 5, 5); pcp.add(pffLabel, gbc); fileFormat = new JComboBox(); fileFormat.setPreferredSize(new Dimension(220, 25)); fileFormat.addItem(htmlFilter.getDescription()); fileFormat.addItem(OOFilter.getDescription()); fileFormat.addItem(ExcelFilter.getDescription()); fileFormat.addItem(KSpreadFilter.getDescription()); fileFormat.addItem(DelimitedFilter.getDescription()); fileFormat.addItem(FixedWidthFilter.getDescription()); fileFormat.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { JComboBox cb = (JComboBox) e.getSource(); filter = getFilterByDescription(); if (filter.getOutputFilterInstance().isCustomizable()) customize.setEnabled(true); else customize.setEnabled(false); } }); gbc = new GridBagConstraints(); gbc.gridx = 1; gbc.gridy = 0; gbc.anchor = GridBagConstraints.WEST; gbc.insets = new Insets(0, 5, 0, 5); pcp.add(fileFormat, gbc); customize = new JButton(LangTool.getString("xtfr.labelCustomize")); customize.setPreferredSize(new Dimension(110, 25)); customize.setActionCommand("CUSTOMIZE"); customize.addActionListener(this); gbc = new GridBagConstraints(); gbc.gridx = 2; gbc.gridy = 0; gbc.anchor = GridBagConstraints.WEST; gbc.insets = new Insets(0, 5, 0, 10); pcp.add(customize, gbc); // now make sure we set the customizable button enabled or not // depending on the filter. fileFormat.setSelectedIndex(0); JLabel pcpLabel = new JLabel(LangTool.getString("xtfr.labelPCFile")); gbc = new GridBagConstraints(); gbc.gridx = 0; gbc.gridy = 1; gbc.anchor = GridBagConstraints.WEST; gbc.insets = new Insets(5, 10, 5, 5); pcp.add(pcpLabel, gbc); localFile = new JTextField(); localFile.setColumns(15); gbc = new GridBagConstraints(); gbc.gridx = 1; gbc.gridy = 1; gbc.anchor = GridBagConstraints.WEST; gbc.fill = GridBagConstraints.HORIZONTAL; gbc.insets = new Insets(0, 5, 0, 5); pcp.add(localFile, gbc); JButton browsePC = new JButton(LangTool.getString("xtfr.labelPCBrowse")); browsePC.setActionCommand("BROWSEPC"); browsePC.addActionListener(this); browsePC.setPreferredSize(new Dimension(110, 25)); gbc = new GridBagConstraints(); gbc.gridx = 2; gbc.gridy = 1; gbc.anchor = GridBagConstraints.WEST; gbc.fill = GridBagConstraints.HORIZONTAL; gbc.insets = new Insets(0, 5, 0, 10); pcp.add(browsePC, gbc); decimalSeparator = new JComboBox(); decimalSeparator.setPreferredSize(new Dimension(220, 25)); decimalSeparator.addItem(LangTool.getString("xtfr.period")); decimalSeparator.addItem(LangTool.getString("xtfr.comma")); // obtain the decimal separator for the machine locale DecimalFormat formatter = (DecimalFormat) NumberFormat.getInstance(Locale.getDefault()); if (formatter.getDecimalFormatSymbols().getDecimalSeparator() == '.') decimalSeparator.setSelectedIndex(0); else decimalSeparator.setSelectedIndex(1); gbc = new GridBagConstraints(); gbc.gridx = 0; gbc.gridy = 2; gbc.anchor = GridBagConstraints.WEST; gbc.insets = new Insets(5, 10, 10, 5); pcp.add(new JLabel(LangTool.getString("xtfr.labelDecimal")), gbc); gbc = new GridBagConstraints(); gbc.gridx = 1; gbc.gridy = 2; gbc.anchor = GridBagConstraints.WEST; gbc.fill = GridBagConstraints.HORIZONTAL; gbc.insets = new Insets(0, 5, 5, 5); pcp.add(decimalSeparator, gbc); sp.add(as400p, BorderLayout.NORTH); sp.add(pcp, BorderLayout.SOUTH); // options panel JPanel op = new JPanel(new FlowLayout(FlowLayout.CENTER, 10, 10)); JButton xtfrButton = new JButton(LangTool.getString("xtfr.labelXTFR")); xtfrButton.addActionListener(this); xtfrButton.setActionCommand("XTFR"); op.add(xtfrButton); JButton emailButton = new JButton(LangTool.getString("xtfr.labelXTFREmail")); emailButton.addActionListener(this); emailButton.setActionCommand("EMAIL"); op.add(emailButton); mp.add(sp, BorderLayout.CENTER); mp.add(op, BorderLayout.SOUTH); this.getContentPane().add(mp, BorderLayout.CENTER); // this.setModal(false); // this.setModal(true); this.setTitle(LangTool.getString("xtfr.title")); initXTFRFields(); // pack it and center it on the screen pack(); 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); //QueryPanel when Use Query selected as400QueryP = new JPanel(); as400QueryP.setLayout(new BorderLayout()); queryStatement = new JTextArea(5, 40); JScrollPane scrollPane = new JScrollPane(queryStatement); queryStatement.setLineWrap(true); as400QueryP.add(scrollPane, BorderLayout.CENTER); as400FieldP = new JPanel(); AlignLayout as400fLayout = new AlignLayout(); as400FieldP.setLayout(as400fLayout); // now show the world what we can do show(); }
|
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/57450b8f025865c21497e968647e9f326c0a2834/XTFRFile.java/clean/tn5250j/src/org/tn5250j/tools/XTFRFile.java
|
queryStatement = new JTextArea(5, 40);
|
queryStatement = new JTextArea(2, 40);
|
private void initXTFRInfo() { // create some reusable borders and layouts BorderLayout borderLayout = new BorderLayout(); Border emptyBorder = BorderFactory.createEmptyBorder(10, 10, 0, 10); // main panel JPanel mp = new JPanel(); mp.setLayout(borderLayout); // system panel JPanel sp = new JPanel(); sp.setLayout(new BorderLayout()); sp.setBorder(emptyBorder); // host panel for as400 as400p = new JPanel(); as400p.setBorder( BorderFactory.createTitledBorder( LangTool.getString("xtfr.labelAS400"))); as400p.setLayout(new GridBagLayout()); JLabel snpLabel = new JLabel(LangTool.getString("xtfr.labelSystemName")); systemName = new JTextField(vt.getHostName()); systemName.setColumns(30); gbc = new GridBagConstraints(); gbc.gridx = 0; gbc.gridy =0; gbc.anchor = GridBagConstraints.WEST; gbc.insets = new Insets(5, 10, 5, 5); as400p.add(snpLabel, gbc); gbc = new GridBagConstraints(); gbc.gridx = 1; gbc.gridy = 0; gbc.gridwidth = 2; gbc.anchor = GridBagConstraints.WEST; gbc.insets = new Insets(5, 5, 5, 10); as400p.add(systemName,gbc); JLabel hfnpLabel = new JLabel(LangTool.getString("xtfr.labelHostFile")); gbc = new GridBagConstraints(); gbc.gridx = 0; gbc.gridy = 1; gbc.anchor = GridBagConstraints.WEST; gbc.insets = new Insets(5, 10, 5, 5); as400p.add(hfnpLabel, gbc); hostFile = new JTextField(); hostFile.setColumns(30); gbc = new GridBagConstraints(); gbc.gridx = 1; gbc.gridy = 1; gbc.gridwidth = 2; gbc.anchor = GridBagConstraints.WEST; gbc.insets = new Insets(5, 5, 5, 10); as400p.add(hostFile, gbc); JLabel idpLabel = new JLabel(LangTool.getString("xtfr.labelUserId")); gbc = new GridBagConstraints(); gbc.gridx = 0; gbc.gridy = 2; gbc.anchor = GridBagConstraints.WEST; gbc.insets = new Insets(5, 10, 5, 5); as400p.add(idpLabel, gbc); user = new JTextField(); user.setColumns(15); gbc = new GridBagConstraints(); gbc.gridx = 1; gbc.gridy = 2; gbc.anchor = GridBagConstraints.WEST; gbc.insets = new Insets(5, 5, 5, 5); as400p.add(user, gbc); // password panel JLabel pwpLabel = new JLabel(LangTool.getString("xtfr.labelPassword")); gbc = new GridBagConstraints(); gbc.gridx = 0; gbc.gridy = 3; gbc.anchor = GridBagConstraints.WEST; gbc.insets = new Insets(5, 10, 5, 5); as400p.add(pwpLabel, gbc); password = new JPasswordField(); password.setColumns(15); gbc = new GridBagConstraints(); gbc.gridx = 1; gbc.gridy = 3; gbc.anchor = GridBagConstraints.WEST; gbc.insets = new Insets(5, 5, 5, 5); as400p.add(password, gbc); // Query Wizard useQuery = new JCheckBox(LangTool.getString("xtfr.labelUseQuery")); useQuery.addItemListener(this); gbc = new GridBagConstraints(); gbc.gridx = 0; gbc.gridy = 4; gbc.anchor = GridBagConstraints.WEST; gbc.insets = new Insets(5, 10, 5, 5); as400p.add(useQuery, gbc); //query button queryWizard = new JButton(LangTool.getString("xtfr.labelQueryWizard")); queryWizard.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(ActionEvent e) { startWizard(); } }); queryWizard.setEnabled(false); gbc = new GridBagConstraints(); gbc.gridx = 1; gbc.gridy = 4; gbc.anchor = GridBagConstraints.WEST; gbc.fill = GridBagConstraints.HORIZONTAL; gbc.insets = new Insets(0, 5, 0, 5); as400p.add(queryWizard, gbc); // Field Selection panel JLabel fieldsLabel = new JLabel(LangTool.getString("xtfr.labelFields")); gbc = new GridBagConstraints(); gbc.gridx = 0; gbc.gridy = 5; gbc.anchor = GridBagConstraints.WEST; gbc.insets = new Insets(5, 10, 5, 5); as400p.add(fieldsLabel, gbc); allFields = new JRadioButton(LangTool.getString("xtfr.labelAllFields")); allFields.setSelected(true); gbc = new GridBagConstraints(); gbc.gridx = 1; gbc.gridy = 5; gbc.anchor = GridBagConstraints.CENTER; gbc.insets = new Insets(0, 5, 0, 5); as400p.add(allFields, gbc); selectedFields = new JRadioButton(LangTool.getString("xtfr.labelSelectedFields")); gbc = new GridBagConstraints(); gbc.gridx = 2; gbc.gridy = 5; gbc.anchor = GridBagConstraints.CENTER; gbc.insets = new Insets(0, 5, 0, 10); as400p.add(selectedFields, gbc); ButtonGroup fieldGroup = new ButtonGroup(); fieldGroup.add(allFields); fieldGroup.add(selectedFields); // Field Text Description panel JLabel textDescLabel = new JLabel(LangTool.getString("xtfr.labelTxtDesc")); gbc = new GridBagConstraints(); gbc.gridx = 0; gbc.gridy = 6; gbc.anchor = GridBagConstraints.WEST; gbc.insets = new Insets(5, 10, 5, 5); as400p.add(textDescLabel, gbc); txtDesc = new JRadioButton(LangTool.getString("xtfr.labelTxtDescFull")); txtDesc.setSelected(true); gbc = new GridBagConstraints(); gbc.gridx = 1; gbc.gridy = 6; gbc.anchor = GridBagConstraints.CENTER; gbc.insets = new Insets(0, 5, 5, 5); as400p.add(txtDesc, gbc); intDesc = new JRadioButton(LangTool.getString("xtfr.labelTxtDescInt")); gbc = new GridBagConstraints(); gbc.gridx = 2; gbc.gridy = 6; gbc.anchor = GridBagConstraints.CENTER; gbc.insets = new Insets(0, 5, 5, 10); as400p.add(intDesc, gbc); ButtonGroup txtDescGroup = new ButtonGroup(); txtDescGroup.add(txtDesc); txtDescGroup.add(intDesc); // pc panel for pc information JPanel pcp = new JPanel(new GridBagLayout()); pcp.setBorder( BorderFactory.createTitledBorder( LangTool.getString("xtfr.labelpc"))); JLabel pffLabel = new JLabel(LangTool.getString("xtfr.labelFileFormat")); gbc = new GridBagConstraints(); gbc.gridx = 0; gbc.gridy = 0; gbc.anchor = GridBagConstraints.WEST; gbc.insets = new Insets(5, 10, 5, 5); pcp.add(pffLabel, gbc); fileFormat = new JComboBox(); fileFormat.setPreferredSize(new Dimension(220, 25)); fileFormat.addItem(htmlFilter.getDescription()); fileFormat.addItem(OOFilter.getDescription()); fileFormat.addItem(ExcelFilter.getDescription()); fileFormat.addItem(KSpreadFilter.getDescription()); fileFormat.addItem(DelimitedFilter.getDescription()); fileFormat.addItem(FixedWidthFilter.getDescription()); fileFormat.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { JComboBox cb = (JComboBox) e.getSource(); filter = getFilterByDescription(); if (filter.getOutputFilterInstance().isCustomizable()) customize.setEnabled(true); else customize.setEnabled(false); } }); gbc = new GridBagConstraints(); gbc.gridx = 1; gbc.gridy = 0; gbc.anchor = GridBagConstraints.WEST; gbc.insets = new Insets(0, 5, 0, 5); pcp.add(fileFormat, gbc); customize = new JButton(LangTool.getString("xtfr.labelCustomize")); customize.setPreferredSize(new Dimension(110, 25)); customize.setActionCommand("CUSTOMIZE"); customize.addActionListener(this); gbc = new GridBagConstraints(); gbc.gridx = 2; gbc.gridy = 0; gbc.anchor = GridBagConstraints.WEST; gbc.insets = new Insets(0, 5, 0, 10); pcp.add(customize, gbc); // now make sure we set the customizable button enabled or not // depending on the filter. fileFormat.setSelectedIndex(0); JLabel pcpLabel = new JLabel(LangTool.getString("xtfr.labelPCFile")); gbc = new GridBagConstraints(); gbc.gridx = 0; gbc.gridy = 1; gbc.anchor = GridBagConstraints.WEST; gbc.insets = new Insets(5, 10, 5, 5); pcp.add(pcpLabel, gbc); localFile = new JTextField(); localFile.setColumns(15); gbc = new GridBagConstraints(); gbc.gridx = 1; gbc.gridy = 1; gbc.anchor = GridBagConstraints.WEST; gbc.fill = GridBagConstraints.HORIZONTAL; gbc.insets = new Insets(0, 5, 0, 5); pcp.add(localFile, gbc); JButton browsePC = new JButton(LangTool.getString("xtfr.labelPCBrowse")); browsePC.setActionCommand("BROWSEPC"); browsePC.addActionListener(this); browsePC.setPreferredSize(new Dimension(110, 25)); gbc = new GridBagConstraints(); gbc.gridx = 2; gbc.gridy = 1; gbc.anchor = GridBagConstraints.WEST; gbc.fill = GridBagConstraints.HORIZONTAL; gbc.insets = new Insets(0, 5, 0, 10); pcp.add(browsePC, gbc); decimalSeparator = new JComboBox(); decimalSeparator.setPreferredSize(new Dimension(220, 25)); decimalSeparator.addItem(LangTool.getString("xtfr.period")); decimalSeparator.addItem(LangTool.getString("xtfr.comma")); // obtain the decimal separator for the machine locale DecimalFormat formatter = (DecimalFormat) NumberFormat.getInstance(Locale.getDefault()); if (formatter.getDecimalFormatSymbols().getDecimalSeparator() == '.') decimalSeparator.setSelectedIndex(0); else decimalSeparator.setSelectedIndex(1); gbc = new GridBagConstraints(); gbc.gridx = 0; gbc.gridy = 2; gbc.anchor = GridBagConstraints.WEST; gbc.insets = new Insets(5, 10, 10, 5); pcp.add(new JLabel(LangTool.getString("xtfr.labelDecimal")), gbc); gbc = new GridBagConstraints(); gbc.gridx = 1; gbc.gridy = 2; gbc.anchor = GridBagConstraints.WEST; gbc.fill = GridBagConstraints.HORIZONTAL; gbc.insets = new Insets(0, 5, 5, 5); pcp.add(decimalSeparator, gbc); sp.add(as400p, BorderLayout.NORTH); sp.add(pcp, BorderLayout.SOUTH); // options panel JPanel op = new JPanel(new FlowLayout(FlowLayout.CENTER, 10, 10)); JButton xtfrButton = new JButton(LangTool.getString("xtfr.labelXTFR")); xtfrButton.addActionListener(this); xtfrButton.setActionCommand("XTFR"); op.add(xtfrButton); JButton emailButton = new JButton(LangTool.getString("xtfr.labelXTFREmail")); emailButton.addActionListener(this); emailButton.setActionCommand("EMAIL"); op.add(emailButton); mp.add(sp, BorderLayout.CENTER); mp.add(op, BorderLayout.SOUTH); this.getContentPane().add(mp, BorderLayout.CENTER); // this.setModal(false); // this.setModal(true); this.setTitle(LangTool.getString("xtfr.title")); initXTFRFields(); // pack it and center it on the screen pack(); 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); //QueryPanel when Use Query selected as400QueryP = new JPanel(); as400QueryP.setLayout(new BorderLayout()); queryStatement = new JTextArea(5, 40); JScrollPane scrollPane = new JScrollPane(queryStatement); queryStatement.setLineWrap(true); as400QueryP.add(scrollPane, BorderLayout.CENTER); as400FieldP = new JPanel(); AlignLayout as400fLayout = new AlignLayout(); as400FieldP.setLayout(as400fLayout); // now show the world what we can do show(); }
|
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/57450b8f025865c21497e968647e9f326c0a2834/XTFRFile.java/clean/tn5250j/src/org/tn5250j/tools/XTFRFile.java
|
as400FieldP = new JPanel(); AlignLayout as400fLayout = new AlignLayout(); as400FieldP.setLayout(as400fLayout);
|
private void initXTFRInfo() { // create some reusable borders and layouts BorderLayout borderLayout = new BorderLayout(); Border emptyBorder = BorderFactory.createEmptyBorder(10, 10, 0, 10); // main panel JPanel mp = new JPanel(); mp.setLayout(borderLayout); // system panel JPanel sp = new JPanel(); sp.setLayout(new BorderLayout()); sp.setBorder(emptyBorder); // host panel for as400 as400p = new JPanel(); as400p.setBorder( BorderFactory.createTitledBorder( LangTool.getString("xtfr.labelAS400"))); as400p.setLayout(new GridBagLayout()); JLabel snpLabel = new JLabel(LangTool.getString("xtfr.labelSystemName")); systemName = new JTextField(vt.getHostName()); systemName.setColumns(30); gbc = new GridBagConstraints(); gbc.gridx = 0; gbc.gridy =0; gbc.anchor = GridBagConstraints.WEST; gbc.insets = new Insets(5, 10, 5, 5); as400p.add(snpLabel, gbc); gbc = new GridBagConstraints(); gbc.gridx = 1; gbc.gridy = 0; gbc.gridwidth = 2; gbc.anchor = GridBagConstraints.WEST; gbc.insets = new Insets(5, 5, 5, 10); as400p.add(systemName,gbc); JLabel hfnpLabel = new JLabel(LangTool.getString("xtfr.labelHostFile")); gbc = new GridBagConstraints(); gbc.gridx = 0; gbc.gridy = 1; gbc.anchor = GridBagConstraints.WEST; gbc.insets = new Insets(5, 10, 5, 5); as400p.add(hfnpLabel, gbc); hostFile = new JTextField(); hostFile.setColumns(30); gbc = new GridBagConstraints(); gbc.gridx = 1; gbc.gridy = 1; gbc.gridwidth = 2; gbc.anchor = GridBagConstraints.WEST; gbc.insets = new Insets(5, 5, 5, 10); as400p.add(hostFile, gbc); JLabel idpLabel = new JLabel(LangTool.getString("xtfr.labelUserId")); gbc = new GridBagConstraints(); gbc.gridx = 0; gbc.gridy = 2; gbc.anchor = GridBagConstraints.WEST; gbc.insets = new Insets(5, 10, 5, 5); as400p.add(idpLabel, gbc); user = new JTextField(); user.setColumns(15); gbc = new GridBagConstraints(); gbc.gridx = 1; gbc.gridy = 2; gbc.anchor = GridBagConstraints.WEST; gbc.insets = new Insets(5, 5, 5, 5); as400p.add(user, gbc); // password panel JLabel pwpLabel = new JLabel(LangTool.getString("xtfr.labelPassword")); gbc = new GridBagConstraints(); gbc.gridx = 0; gbc.gridy = 3; gbc.anchor = GridBagConstraints.WEST; gbc.insets = new Insets(5, 10, 5, 5); as400p.add(pwpLabel, gbc); password = new JPasswordField(); password.setColumns(15); gbc = new GridBagConstraints(); gbc.gridx = 1; gbc.gridy = 3; gbc.anchor = GridBagConstraints.WEST; gbc.insets = new Insets(5, 5, 5, 5); as400p.add(password, gbc); // Query Wizard useQuery = new JCheckBox(LangTool.getString("xtfr.labelUseQuery")); useQuery.addItemListener(this); gbc = new GridBagConstraints(); gbc.gridx = 0; gbc.gridy = 4; gbc.anchor = GridBagConstraints.WEST; gbc.insets = new Insets(5, 10, 5, 5); as400p.add(useQuery, gbc); //query button queryWizard = new JButton(LangTool.getString("xtfr.labelQueryWizard")); queryWizard.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(ActionEvent e) { startWizard(); } }); queryWizard.setEnabled(false); gbc = new GridBagConstraints(); gbc.gridx = 1; gbc.gridy = 4; gbc.anchor = GridBagConstraints.WEST; gbc.fill = GridBagConstraints.HORIZONTAL; gbc.insets = new Insets(0, 5, 0, 5); as400p.add(queryWizard, gbc); // Field Selection panel JLabel fieldsLabel = new JLabel(LangTool.getString("xtfr.labelFields")); gbc = new GridBagConstraints(); gbc.gridx = 0; gbc.gridy = 5; gbc.anchor = GridBagConstraints.WEST; gbc.insets = new Insets(5, 10, 5, 5); as400p.add(fieldsLabel, gbc); allFields = new JRadioButton(LangTool.getString("xtfr.labelAllFields")); allFields.setSelected(true); gbc = new GridBagConstraints(); gbc.gridx = 1; gbc.gridy = 5; gbc.anchor = GridBagConstraints.CENTER; gbc.insets = new Insets(0, 5, 0, 5); as400p.add(allFields, gbc); selectedFields = new JRadioButton(LangTool.getString("xtfr.labelSelectedFields")); gbc = new GridBagConstraints(); gbc.gridx = 2; gbc.gridy = 5; gbc.anchor = GridBagConstraints.CENTER; gbc.insets = new Insets(0, 5, 0, 10); as400p.add(selectedFields, gbc); ButtonGroup fieldGroup = new ButtonGroup(); fieldGroup.add(allFields); fieldGroup.add(selectedFields); // Field Text Description panel JLabel textDescLabel = new JLabel(LangTool.getString("xtfr.labelTxtDesc")); gbc = new GridBagConstraints(); gbc.gridx = 0; gbc.gridy = 6; gbc.anchor = GridBagConstraints.WEST; gbc.insets = new Insets(5, 10, 5, 5); as400p.add(textDescLabel, gbc); txtDesc = new JRadioButton(LangTool.getString("xtfr.labelTxtDescFull")); txtDesc.setSelected(true); gbc = new GridBagConstraints(); gbc.gridx = 1; gbc.gridy = 6; gbc.anchor = GridBagConstraints.CENTER; gbc.insets = new Insets(0, 5, 5, 5); as400p.add(txtDesc, gbc); intDesc = new JRadioButton(LangTool.getString("xtfr.labelTxtDescInt")); gbc = new GridBagConstraints(); gbc.gridx = 2; gbc.gridy = 6; gbc.anchor = GridBagConstraints.CENTER; gbc.insets = new Insets(0, 5, 5, 10); as400p.add(intDesc, gbc); ButtonGroup txtDescGroup = new ButtonGroup(); txtDescGroup.add(txtDesc); txtDescGroup.add(intDesc); // pc panel for pc information JPanel pcp = new JPanel(new GridBagLayout()); pcp.setBorder( BorderFactory.createTitledBorder( LangTool.getString("xtfr.labelpc"))); JLabel pffLabel = new JLabel(LangTool.getString("xtfr.labelFileFormat")); gbc = new GridBagConstraints(); gbc.gridx = 0; gbc.gridy = 0; gbc.anchor = GridBagConstraints.WEST; gbc.insets = new Insets(5, 10, 5, 5); pcp.add(pffLabel, gbc); fileFormat = new JComboBox(); fileFormat.setPreferredSize(new Dimension(220, 25)); fileFormat.addItem(htmlFilter.getDescription()); fileFormat.addItem(OOFilter.getDescription()); fileFormat.addItem(ExcelFilter.getDescription()); fileFormat.addItem(KSpreadFilter.getDescription()); fileFormat.addItem(DelimitedFilter.getDescription()); fileFormat.addItem(FixedWidthFilter.getDescription()); fileFormat.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { JComboBox cb = (JComboBox) e.getSource(); filter = getFilterByDescription(); if (filter.getOutputFilterInstance().isCustomizable()) customize.setEnabled(true); else customize.setEnabled(false); } }); gbc = new GridBagConstraints(); gbc.gridx = 1; gbc.gridy = 0; gbc.anchor = GridBagConstraints.WEST; gbc.insets = new Insets(0, 5, 0, 5); pcp.add(fileFormat, gbc); customize = new JButton(LangTool.getString("xtfr.labelCustomize")); customize.setPreferredSize(new Dimension(110, 25)); customize.setActionCommand("CUSTOMIZE"); customize.addActionListener(this); gbc = new GridBagConstraints(); gbc.gridx = 2; gbc.gridy = 0; gbc.anchor = GridBagConstraints.WEST; gbc.insets = new Insets(0, 5, 0, 10); pcp.add(customize, gbc); // now make sure we set the customizable button enabled or not // depending on the filter. fileFormat.setSelectedIndex(0); JLabel pcpLabel = new JLabel(LangTool.getString("xtfr.labelPCFile")); gbc = new GridBagConstraints(); gbc.gridx = 0; gbc.gridy = 1; gbc.anchor = GridBagConstraints.WEST; gbc.insets = new Insets(5, 10, 5, 5); pcp.add(pcpLabel, gbc); localFile = new JTextField(); localFile.setColumns(15); gbc = new GridBagConstraints(); gbc.gridx = 1; gbc.gridy = 1; gbc.anchor = GridBagConstraints.WEST; gbc.fill = GridBagConstraints.HORIZONTAL; gbc.insets = new Insets(0, 5, 0, 5); pcp.add(localFile, gbc); JButton browsePC = new JButton(LangTool.getString("xtfr.labelPCBrowse")); browsePC.setActionCommand("BROWSEPC"); browsePC.addActionListener(this); browsePC.setPreferredSize(new Dimension(110, 25)); gbc = new GridBagConstraints(); gbc.gridx = 2; gbc.gridy = 1; gbc.anchor = GridBagConstraints.WEST; gbc.fill = GridBagConstraints.HORIZONTAL; gbc.insets = new Insets(0, 5, 0, 10); pcp.add(browsePC, gbc); decimalSeparator = new JComboBox(); decimalSeparator.setPreferredSize(new Dimension(220, 25)); decimalSeparator.addItem(LangTool.getString("xtfr.period")); decimalSeparator.addItem(LangTool.getString("xtfr.comma")); // obtain the decimal separator for the machine locale DecimalFormat formatter = (DecimalFormat) NumberFormat.getInstance(Locale.getDefault()); if (formatter.getDecimalFormatSymbols().getDecimalSeparator() == '.') decimalSeparator.setSelectedIndex(0); else decimalSeparator.setSelectedIndex(1); gbc = new GridBagConstraints(); gbc.gridx = 0; gbc.gridy = 2; gbc.anchor = GridBagConstraints.WEST; gbc.insets = new Insets(5, 10, 10, 5); pcp.add(new JLabel(LangTool.getString("xtfr.labelDecimal")), gbc); gbc = new GridBagConstraints(); gbc.gridx = 1; gbc.gridy = 2; gbc.anchor = GridBagConstraints.WEST; gbc.fill = GridBagConstraints.HORIZONTAL; gbc.insets = new Insets(0, 5, 5, 5); pcp.add(decimalSeparator, gbc); sp.add(as400p, BorderLayout.NORTH); sp.add(pcp, BorderLayout.SOUTH); // options panel JPanel op = new JPanel(new FlowLayout(FlowLayout.CENTER, 10, 10)); JButton xtfrButton = new JButton(LangTool.getString("xtfr.labelXTFR")); xtfrButton.addActionListener(this); xtfrButton.setActionCommand("XTFR"); op.add(xtfrButton); JButton emailButton = new JButton(LangTool.getString("xtfr.labelXTFREmail")); emailButton.addActionListener(this); emailButton.setActionCommand("EMAIL"); op.add(emailButton); mp.add(sp, BorderLayout.CENTER); mp.add(op, BorderLayout.SOUTH); this.getContentPane().add(mp, BorderLayout.CENTER); // this.setModal(false); // this.setModal(true); this.setTitle(LangTool.getString("xtfr.title")); initXTFRFields(); // pack it and center it on the screen pack(); 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); //QueryPanel when Use Query selected as400QueryP = new JPanel(); as400QueryP.setLayout(new BorderLayout()); queryStatement = new JTextArea(5, 40); JScrollPane scrollPane = new JScrollPane(queryStatement); queryStatement.setLineWrap(true); as400QueryP.add(scrollPane, BorderLayout.CENTER); as400FieldP = new JPanel(); AlignLayout as400fLayout = new AlignLayout(); as400FieldP.setLayout(as400fLayout); // now show the world what we can do show(); }
|
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/57450b8f025865c21497e968647e9f326c0a2834/XTFRFile.java/clean/tn5250j/src/org/tn5250j/tools/XTFRFile.java
|
|
as400p.remove(as400FieldP); as400p.add(as400QueryP, BorderLayout.SOUTH);
|
as400p.remove(fieldsLabel); as400p.remove(allFields); as400p.remove(selectedFields); as400p.remove(textDescLabel); as400p.remove(txtDesc); as400p.remove(intDesc); gbc = new GridBagConstraints(); gbc.gridx = 0; gbc.gridy = 5; gbc.gridheight = 2; gbc.gridwidth = 3; gbc.fill = GridBagConstraints.BOTH; gbc.anchor = GridBagConstraints.WEST; gbc.insets = new Insets(5, 10, 10, 10); as400p.add(as400QueryP, gbc);
|
public void itemStateChanged(ItemEvent e) { Object source = e.getItemSelectable(); if (source == useQuery) { if (useQuery.isSelected()) { queryWizard.setEnabled(true); as400p.remove(as400FieldP); as400p.add(as400QueryP, BorderLayout.SOUTH); } else { queryWizard.setEnabled(false); as400p.remove(as400QueryP); as400p.add(as400FieldP, BorderLayout.SOUTH); } this.validate(); this.repaint(); } }
|
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/57450b8f025865c21497e968647e9f326c0a2834/XTFRFile.java/clean/tn5250j/src/org/tn5250j/tools/XTFRFile.java
|
as400p.add(as400FieldP, BorderLayout.SOUTH);
|
gbc = new GridBagConstraints(); gbc.gridx = 0; gbc.gridy = 5; gbc.anchor = GridBagConstraints.WEST; gbc.insets = new Insets(5, 10, 5, 5); as400p.add(fieldsLabel, gbc); allFields.setSelected(true); gbc = new GridBagConstraints(); gbc.gridx = 1; gbc.gridy = 5; gbc.anchor = GridBagConstraints.CENTER; gbc.insets = new Insets(0, 5, 0, 5); as400p.add(allFields, gbc); gbc = new GridBagConstraints(); gbc.gridx = 2; gbc.gridy = 5; gbc.anchor = GridBagConstraints.CENTER; gbc.insets = new Insets(0, 5, 0, 10); as400p.add(selectedFields, gbc); gbc = new GridBagConstraints(); gbc.gridx = 0; gbc.gridy = 6; gbc.anchor = GridBagConstraints.WEST; gbc.insets = new Insets(5, 10, 5, 5); as400p.add(textDescLabel, gbc); txtDesc.setSelected(true); gbc = new GridBagConstraints(); gbc.gridx = 1; gbc.gridy = 6; gbc.anchor = GridBagConstraints.CENTER; gbc.insets = new Insets(0, 5, 5, 5); as400p.add(txtDesc, gbc); gbc = new GridBagConstraints(); gbc.gridx = 2; gbc.gridy = 6; gbc.anchor = GridBagConstraints.CENTER; gbc.insets = new Insets(0, 5, 5, 10); as400p.add(intDesc, gbc);
|
public void itemStateChanged(ItemEvent e) { Object source = e.getItemSelectable(); if (source == useQuery) { if (useQuery.isSelected()) { queryWizard.setEnabled(true); as400p.remove(as400FieldP); as400p.add(as400QueryP, BorderLayout.SOUTH); } else { queryWizard.setEnabled(false); as400p.remove(as400QueryP); as400p.add(as400FieldP, BorderLayout.SOUTH); } this.validate(); this.repaint(); } }
|
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/57450b8f025865c21497e968647e9f326c0a2834/XTFRFile.java/clean/tn5250j/src/org/tn5250j/tools/XTFRFile.java
|
moveToFront();
|
public void show() { if (! isVisible()) { moveToFront(); super.show(); JDesktopPane pane = getDesktopPane(); if (pane != null) pane.setSelectedFrame(this); else { try { setSelected(true); } catch (PropertyVetoException e) { // Do nothing. if they don't want to be selected. } } if (isFirstTimeVisible) { isFirstTimeVisible = false; fireInternalFrameEvent(InternalFrameEvent.INTERNAL_FRAME_OPENED); } } }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/a78ab2f492456918e4f5c52be600854882e139fc/JInternalFrame.java/clean/core/src/classpath/javax/javax/swing/JInternalFrame.java
|
|
cloneObj.fieldGroupOwnedHash.add(iter.next());
|
cloneObj.fieldGroupOwnedHash.add(((Group)iter.next()).clone());
|
public Object clone() throws CloneNotSupportedException { FieldAxis cloneObj = (FieldAxis) super.clone(); synchronized (this.fieldGroupOwnedHash) { synchronized(cloneObj.fieldGroupOwnedHash) { cloneObj.fieldGroupOwnedHash = Collections.synchronizedSet(new HashSet(this.fieldGroupOwnedHash.size())); Iterator iter = this.fieldGroupOwnedHash.iterator(); while (iter.hasNext()) { cloneObj.fieldGroupOwnedHash.add(iter.next()); } } } return cloneObj; }
|
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
|
private EmptyEnumeration() {
|
private EmptyEnumeration() {
|
private EmptyEnumeration() { }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/b5af1a0dd02ba16d1f4f4556ab34fa51c2db060d/EmptyEnumeration.java/clean/core/src/classpath/gnu/gnu/java/util/EmptyEnumeration.java
|
public static EmptyEnumeration getInstance() {
|
public static EmptyEnumeration getInstance() {
|
public static EmptyEnumeration getInstance() { return instance; }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/b5af1a0dd02ba16d1f4f4556ab34fa51c2db060d/EmptyEnumeration.java/clean/core/src/classpath/gnu/gnu/java/util/EmptyEnumeration.java
|
public boolean hasMoreElements() {
|
public boolean hasMoreElements() {
|
public boolean hasMoreElements() { return false; }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/b5af1a0dd02ba16d1f4f4556ab34fa51c2db060d/EmptyEnumeration.java/clean/core/src/classpath/gnu/gnu/java/util/EmptyEnumeration.java
|
public Object nextElement() {
|
public Object nextElement() {
|
public Object nextElement() { throw new NoSuchElementException(); }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/b5af1a0dd02ba16d1f4f4556ab34fa51c2db060d/EmptyEnumeration.java/clean/core/src/classpath/gnu/gnu/java/util/EmptyEnumeration.java
|
darkShadowColor = MetalLookAndFeel.getControlDarkShadow(); highlightColor = MetalLookAndFeel.getControlHighlight();
|
public MetalSliderUI() { super(null); filledSlider = UIManager.getBoolean(SLIDER_FILL); }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/045a5b41cdfa747889101d3993040acf89788bc4/MetalSliderUI.java/buggy/core/src/classpath/javax/javax/swing/plaf/metal/MetalSliderUI.java
|
|
return super.createPropertyChangeListener(slider);
|
return new MetalPropertyListener();
|
protected PropertyChangeListener createPropertyChangeListener(JSlider slider) { // TODO: try to figure out why it might be necessary to override this // method as is done in Sun's implementation return super.createPropertyChangeListener(slider); }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/045a5b41cdfa747889101d3993040acf89788bc4/MetalSliderUI.java/buggy/core/src/classpath/javax/javax/swing/plaf/metal/MetalSliderUI.java
|
if (instances == null) instances = new HashMap(); Object o = instances.get(component); MetalSliderUI instance; if (o == null) { instance = new MetalSliderUI(); instances.put(component, instance); } else instance = (MetalSliderUI) o; return instance;
|
return new MetalSliderUI();
|
public static ComponentUI createUI(JComponent component) { if (instances == null) instances = new HashMap(); Object o = instances.get(component); MetalSliderUI instance; if (o == null) { instance = new MetalSliderUI(); instances.put(component, instance); } else instance = (MetalSliderUI) o; return instance; }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/045a5b41cdfa747889101d3993040acf89788bc4/MetalSliderUI.java/buggy/core/src/classpath/javax/javax/swing/plaf/metal/MetalSliderUI.java
|
protected int getThumbOverhang() { // TODO: figure out what this is used for return 0; }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/045a5b41cdfa747889101d3993040acf89788bc4/MetalSliderUI.java/buggy/core/src/classpath/javax/javax/swing/plaf/metal/MetalSliderUI.java
|
||
g.setColor(new Color(153, 153, 204));
|
if (slider.isEnabled()) g.setColor(MetalLookAndFeel.getPrimaryControlShadow()); else g.setColor(MetalLookAndFeel.getControlDisabled());
|
protected void paintMajorTickForHorizSlider(Graphics g, Rectangle tickBounds, int x) { // Note the incoming 'g' has a translation in place to get us to the // start of the tick rect already... // TODO: get color from UIManager... g.setColor(new Color(153, 153, 204)); g.drawLine(x, TICK_BUFFER, x, TICK_BUFFER + tickLength); }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/045a5b41cdfa747889101d3993040acf89788bc4/MetalSliderUI.java/buggy/core/src/classpath/javax/javax/swing/plaf/metal/MetalSliderUI.java
|
g.setColor(new Color(153, 153, 204));
|
if (slider.isEnabled()) g.setColor(MetalLookAndFeel.getPrimaryControlShadow()); else g.setColor(MetalLookAndFeel.getControlDisabled());
|
protected void paintMajorTickForVertSlider(Graphics g, Rectangle tickBounds, int y) { // Note the incoming 'g' has a translation in place to get us to the // start of the tick rect already... // TODO: get color from UIManager... g.setColor(new Color(153, 153, 204)); g.drawLine(TICK_BUFFER - 1, y, TICK_BUFFER - 1 + tickLength, y); }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/045a5b41cdfa747889101d3993040acf89788bc4/MetalSliderUI.java/buggy/core/src/classpath/javax/javax/swing/plaf/metal/MetalSliderUI.java
|
g.setColor(new Color(153, 153, 204));
|
if (slider.isEnabled()) g.setColor(MetalLookAndFeel.getPrimaryControlShadow()); else g.setColor(MetalLookAndFeel.getControlDisabled());
|
protected void paintMinorTickForHorizSlider(Graphics g, Rectangle tickBounds, int x) { // Note the incoming 'g' has a translation in place to get us to the // start of the tick rect already... // TODO: get color from UIManager... g.setColor(new Color(153, 153, 204)); g.drawLine(x, TICK_BUFFER, x, TICK_BUFFER + tickLength / 2); }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/045a5b41cdfa747889101d3993040acf89788bc4/MetalSliderUI.java/buggy/core/src/classpath/javax/javax/swing/plaf/metal/MetalSliderUI.java
|
g.setColor(new Color(153, 153, 204));
|
if (slider.isEnabled()) g.setColor(MetalLookAndFeel.getPrimaryControlShadow()); else g.setColor(MetalLookAndFeel.getControlDisabled());
|
protected void paintMinorTickForVertSlider(Graphics g, Rectangle tickBounds, int y) { // Note the incoming 'g' has a translation in place to get us to the // start of the tick rect already... // TODO: get color from UIManager... g.setColor(new Color(153, 153, 204)); g.drawLine(TICK_BUFFER - 1, y, TICK_BUFFER - 1 + tickLength / 2, y); }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/045a5b41cdfa747889101d3993040acf89788bc4/MetalSliderUI.java/buggy/core/src/classpath/javax/javax/swing/plaf/metal/MetalSliderUI.java
|
int xPos = xPositionForValue(slider.getValue()); int x = (slider.getInverted() ? xPos : trackRect.x); int w = (slider.getInverted() ? trackX + trackW - xPos : xPos - trackRect.x); g.setColor(MetalLookAndFeel.getControlShadow()); g.fillRect(x + 1, trackY + 1, w - 3, getTrackWidth() - 3); if (slider.isEnabled()) { g.setColor(MetalLookAndFeel.getControl()); g.drawLine(x + 1, trackY + 1, x + w - 3, trackY + 1); g.drawLine(x + 1, trackY + 1, x + 1, trackY + getTrackWidth() - 3); }
|
public void paintTrack(Graphics g) { if (slider.getOrientation() == JSlider.HORIZONTAL) { if (filledSlider) { // TODO: fill the track } BasicGraphicsUtils.drawEtchedRect(g, trackRect.x, trackRect.y + (trackRect.height - getTrackWidth()) / 2, trackRect.width - 1, getTrackWidth(), Color.darkGray, Color.gray, Color.darkGray, Color.white); } else { if (filledSlider) { // TODO: fill the track } BasicGraphicsUtils.drawEtchedRect(g, trackRect.x + (trackRect.width - getTrackWidth()) / 2, trackRect.y, getTrackWidth(), trackRect.height - 1, Color.darkGray, Color.gray, Color.darkGray, Color.white); } }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/045a5b41cdfa747889101d3993040acf89788bc4/MetalSliderUI.java/buggy/core/src/classpath/javax/javax/swing/plaf/metal/MetalSliderUI.java
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.