rem
stringlengths
0
477k
add
stringlengths
0
313k
context
stringlengths
6
599k
meta
stringlengths
141
403
if (runCount > tabRuns.length) expandTabRunsArray();
protected void calculateTabRects(int tabPlacement, int tabCount) { if (tabCount == 0) return; FontMetrics fm = getFontMetrics(); SwingUtilities.calculateInnerArea(tabPane, calcRect); Insets tabAreaInsets = getTabAreaInsets(tabPlacement); Insets insets = tabPane.getInsets(); int runs = 1; int start = 0; int top = 0; if (tabPlacement == SwingConstants.TOP || tabPlacement == SwingConstants.BOTTOM) { int maxHeight = calculateMaxTabHeight(tabPlacement); calcRect.width -= tabAreaInsets.left + tabAreaInsets.right; start = tabAreaInsets.left + insets.left; int width = 0; int runWidth = start; top = insets.top + tabAreaInsets.top; for (int i = 0; i < tabCount; i++) { width = calculateTabWidth(tabPlacement, i, fm); rects[i] = new Rectangle(runWidth, top, width, maxHeight); runWidth += width; } tabAreaRect.width = tabPane.getWidth() - insets.left - insets.right; tabAreaRect.height = runs * maxTabHeight - (runs - 1) * tabRunOverlay + tabAreaInsets.top + tabAreaInsets.bottom; contentRect.width = tabAreaRect.width; contentRect.height = tabPane.getHeight() - insets.top - insets.bottom - tabAreaRect.height; contentRect.x = insets.left; tabAreaRect.x = insets.left; if (tabPlacement == SwingConstants.BOTTOM) { contentRect.y = insets.top; tabAreaRect.y = contentRect.y + contentRect.height; } else { tabAreaRect.y = insets.top; contentRect.y = tabAreaRect.y + tabAreaRect.height; } } else { int maxWidth = calculateMaxTabWidth(tabPlacement); calcRect.height -= tabAreaInsets.top + tabAreaInsets.bottom; int height = 0; start = tabAreaInsets.top + insets.top; int runHeight = start; int fontHeight = fm.getHeight(); top = insets.left + tabAreaInsets.left; for (int i = 0; i < tabCount; i++) { height = calculateTabHeight(tabPlacement, i, fontHeight); rects[i] = new Rectangle(top, runHeight, maxWidth, height); runHeight += height; } tabAreaRect.width = runs * maxTabWidth - (runs - 1) * tabRunOverlay + tabAreaInsets.left + tabAreaInsets.right; tabAreaRect.height = tabPane.getHeight() - insets.top - insets.bottom; tabAreaRect.y = insets.top; contentRect.width = tabPane.getWidth() - insets.left - insets.right - tabAreaRect.width; contentRect.height = tabAreaRect.height; contentRect.y = insets.top; if (tabPlacement == SwingConstants.LEFT) { tabAreaRect.x = insets.left; contentRect.x = tabAreaRect.x + tabAreaRect.width; } else { contentRect.x = insets.left; tabAreaRect.x = contentRect.x + contentRect.width; } } runCount = runs; padSelectedTab(tabPlacement, tabPane.getSelectedIndex()); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/49ad2f4c3e74f0a8e99b839c938a312898850fa0/BasicTabbedPaneUI.java/buggy/core/src/classpath/javax/javax/swing/plaf/basic/BasicTabbedPaneUI.java
if (tabCount > runCount) runCount = tabCount;
protected void paintTabArea(Graphics g, int tabPlacement, int selectedIndex) { Rectangle ir = new Rectangle(); Rectangle tr = new Rectangle(); boolean isScroll = tabPane.getTabLayoutPolicy() == JTabbedPane.SCROLL_TAB_LAYOUT; // Please note: the ordering of the painting is important. // we WANT to paint the outermost run first and then work our way in. int tabCount = tabPane.getTabCount(); int currRun = 1; if (tabCount > runCount) runCount = tabCount; if (tabCount < 1) return; if (runCount > 1) currRun = 0; for (int i = 0; i < runCount; i++) { int first = lastTabInRun(tabCount, getPreviousTabRun(currRun)) + 1; if (isScroll) first = currentScrollLocation; else if (first == tabCount) first = 0; int last = lastTabInRun(tabCount, currRun); if (isScroll) { for (int k = first; k < tabCount; k++) { if (rects[k].x + rects[k].width - rects[first].x > viewport .getWidth()) { last = k; break; } } } for (int j = first; j <= last; j++) { if (j != selectedIndex || isScroll) paintTab(g, tabPlacement, rects, j, ir, tr); } currRun = getPreviousTabRun(currRun); } if (! isScroll) paintTab(g, tabPlacement, rects, selectedIndex, ir, tr); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/49ad2f4c3e74f0a8e99b839c938a312898850fa0/BasicTabbedPaneUI.java/buggy/core/src/classpath/javax/javax/swing/plaf/basic/BasicTabbedPaneUI.java
public int getCol(int pos) { int col = pos % (getCols()); if (col > 0) return col; else return 0; }
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/bcfd5ba28d22d8100110257f977fd7c577f652c2/Screen5250.java/clean/tn5250j/src/org/tn5250j/Screen5250.java
public int getRow(int pos) { int row = pos / numCols; if (row < 0) { row = lastPos / numCols; } if (row > lenScreen - 1) row = lenScreen - 1; return row; }
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/bcfd5ba28d22d8100110257f977fd7c577f652c2/Screen5250.java/clean/tn5250j/src/org/tn5250j/Screen5250.java
if (pendingInsert) {
if (pendingInsert && homePos > 0) {
public void goHome() { // now we try to move to first input field according to // 14.6 WRITE TO DISPLAY Command // If the WTD command is valid, after the command is processed, // the cursor moves to one of three locations: // - The location set by an insert cursor order (unless control // character byte 1, bit 1 is equal to B'1'.) // - The start of the first non-bypass input field defined in the // format table // - A default starting address of row 1 column 1. if (pendingInsert) { goto_XY(getRow(homePos),getCol(homePos)); isInField(); // we now check if we are in a field } else { if(!gotoField(1)) { homePos = getPos(1,1); goto_XY(1,1); isInField(0,0); // we now check if we are in a field } else { homePos = getPos(getCurrentRow(),getCurrentCol()); } } }
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/bcfd5ba28d22d8100110257f977fd7c577f652c2/Screen5250.java/clean/tn5250j/src/org/tn5250j/Screen5250.java
restriction = new Rectangle(0,0);
void jbInit() throws Exception { if (!appProps.containsKey("font")) { font = new Font("dialoginput",Font.BOLD,14); appProps.setProperty("font","dialoginput"); } else { font = new Font(getStringProperty("font"),Font.PLAIN,14); } gui.setFont(font); lastAttr = 32; // default number of rows and columns numRows = 24; numCols = 80; goto_XY(1,1); // set initial cursor position errorLineNum = numRows; updateCursorLoc = false; FontRenderContext frc = new FontRenderContext(font.getTransform(),true,true); lm = font.getLineMetrics("Wy",frc); fmWidth = (int)font.getStringBounds("W",frc).getWidth() + 1; fmHeight = (int)(font.getStringBounds("g",frc).getHeight() + lm.getDescent() + lm.getLeading()); keyboardLocked = true; checkOffScreenImage(); lenScreen = numRows * numCols; screen = new ScreenChar[lenScreen]; for (int y = 0;y < lenScreen; y++) { screen[y] = new ScreenChar(this); screen[y].setCharAndAttr(' ',initAttr,false); screen[y].setRowCol(getRow(y),getCol(y)); } screenFields = new ScreenFields(this); strokenizer = new KeyStrokenizer(); }
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/bcfd5ba28d22d8100110257f977fd7c577f652c2/Screen5250.java/clean/tn5250j/src/org/tn5250j/Screen5250.java
if (resetAttr)
if (resetAttr) {
public void propertyChange(PropertyChangeEvent pce) { String pn = pce.getPropertyName(); boolean resetAttr = false; if (pn.equals("colorBg")) { colorBg = (Color)pce.getNewValue(); resetAttr = true; } if (pn.equals("colorBlue")) { colorBlue = (Color)pce.getNewValue(); resetAttr = true; } if (pn.equals("colorTurq")) { colorTurq = (Color)pce.getNewValue(); resetAttr = true; } if (pn.equals("colorRed")) { colorRed = (Color)pce.getNewValue(); resetAttr = true; } if (pn.equals("colorWhite")) { colorWhite = (Color)pce.getNewValue(); resetAttr = true; } if (pn.equals("colorYellow")) { colorYellow = (Color)pce.getNewValue(); resetAttr = true; } if (pn.equals("colorGreen")) { colorGreen = (Color)pce.getNewValue(); resetAttr = true; } if (pn.equals("colorPink")) { colorPink = (Color)pce.getNewValue(); resetAttr = true; } if (pn.equals("colorGUIField")) { colorGUIField = (Color)pce.getNewValue(); resetAttr = true; } if (pn.equals("colorCursor")) { colorCursor = (Color)pce.getNewValue(); resetAttr = true; } if (pn.equals("colorSep")) { colorSep = (Color)pce.getNewValue(); resetAttr = true; } if (pn.equals("colorHexAttr")) { colorHexAttr = (Color)pce.getNewValue(); resetAttr = true; } if (pn.equals("cursorSize")) { if (pce.getNewValue().equals("Full")) cursorSize = 2; if (pce.getNewValue().equals("Half")) cursorSize = 1; if (pce.getNewValue().equals("Line")) cursorSize = 0; } if (pn.equals("crossHair")) { if (pce.getNewValue().equals("None")) crossHair = 0; if (pce.getNewValue().equals("Horz")) crossHair = 1; if (pce.getNewValue().equals("Vert")) crossHair = 2; if (pce.getNewValue().equals("Both")) crossHair = 3; } if (pn.equals("colSeparator")) { if (pce.getNewValue().equals("Line")) colSepLine = 0; if (pce.getNewValue().equals("ShortLine")) colSepLine = 1; if (pce.getNewValue().equals("Dot")) colSepLine = 2; } if (pn.equals("showAttr")) { if (pce.getNewValue().equals("Hex")) showHex = true; else showHex= false; } if (pn.equals("guiInterface")) { if (pce.getNewValue().equals("Yes")) guiInterface = true; else guiInterface = false; } if (pn.equals("guiShowUnderline")) { if (pce.getNewValue().equals("Yes")) guiShowUnderline = true; else guiShowUnderline = false; } if (pn.equals("hotspots")) { if (pce.getNewValue().equals("Yes")) hotSpots = true; else hotSpots = false; } if (pn.equals("hsMore")) { hsMore.setLength(0); hsMore.append((String)pce.getNewValue()); } if (pn.equals("hsBottom")) { hsBottom.setLength(0); hsBottom.append((String)pce.getNewValue()); } if (pn.equals("font")) { font = new Font((String)pce.getNewValue(),Font.PLAIN,14); updateFont = true; } if (pn.equals("fontScaleHeight")) {// try { sfh = Float.parseFloat((String)pce.getNewValue()); updateFont = true;// } } if (pn.equals("fontScaleWidth")) {// try { sfw = Float.parseFloat((String)pce.getNewValue()); updateFont = true;// } } if (pn.equals("fontPointSize")) {// try { ps132 = Float.parseFloat((String)pce.getNewValue()); updateFont = true;// } } if (updateFont) { Rectangle r = gui.getDrawingBounds(); resizeScreenArea(r.width,r.height); updateFont = false; } if (resetAttr) for (int y = 0;y < lenScreen; y++) { screen[y].setAttribute(screen[y].getCharAttr()); } gui.repaint(); gui.revalidate(); }
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/bcfd5ba28d22d8100110257f977fd7c577f652c2/Screen5250.java/clean/tn5250j/src/org/tn5250j/Screen5250.java
bi.drawOIA(fmWidth,fmHeight,numRows,numCols,font,colorBg,colorBlue); }
public void propertyChange(PropertyChangeEvent pce) { String pn = pce.getPropertyName(); boolean resetAttr = false; if (pn.equals("colorBg")) { colorBg = (Color)pce.getNewValue(); resetAttr = true; } if (pn.equals("colorBlue")) { colorBlue = (Color)pce.getNewValue(); resetAttr = true; } if (pn.equals("colorTurq")) { colorTurq = (Color)pce.getNewValue(); resetAttr = true; } if (pn.equals("colorRed")) { colorRed = (Color)pce.getNewValue(); resetAttr = true; } if (pn.equals("colorWhite")) { colorWhite = (Color)pce.getNewValue(); resetAttr = true; } if (pn.equals("colorYellow")) { colorYellow = (Color)pce.getNewValue(); resetAttr = true; } if (pn.equals("colorGreen")) { colorGreen = (Color)pce.getNewValue(); resetAttr = true; } if (pn.equals("colorPink")) { colorPink = (Color)pce.getNewValue(); resetAttr = true; } if (pn.equals("colorGUIField")) { colorGUIField = (Color)pce.getNewValue(); resetAttr = true; } if (pn.equals("colorCursor")) { colorCursor = (Color)pce.getNewValue(); resetAttr = true; } if (pn.equals("colorSep")) { colorSep = (Color)pce.getNewValue(); resetAttr = true; } if (pn.equals("colorHexAttr")) { colorHexAttr = (Color)pce.getNewValue(); resetAttr = true; } if (pn.equals("cursorSize")) { if (pce.getNewValue().equals("Full")) cursorSize = 2; if (pce.getNewValue().equals("Half")) cursorSize = 1; if (pce.getNewValue().equals("Line")) cursorSize = 0; } if (pn.equals("crossHair")) { if (pce.getNewValue().equals("None")) crossHair = 0; if (pce.getNewValue().equals("Horz")) crossHair = 1; if (pce.getNewValue().equals("Vert")) crossHair = 2; if (pce.getNewValue().equals("Both")) crossHair = 3; } if (pn.equals("colSeparator")) { if (pce.getNewValue().equals("Line")) colSepLine = 0; if (pce.getNewValue().equals("ShortLine")) colSepLine = 1; if (pce.getNewValue().equals("Dot")) colSepLine = 2; } if (pn.equals("showAttr")) { if (pce.getNewValue().equals("Hex")) showHex = true; else showHex= false; } if (pn.equals("guiInterface")) { if (pce.getNewValue().equals("Yes")) guiInterface = true; else guiInterface = false; } if (pn.equals("guiShowUnderline")) { if (pce.getNewValue().equals("Yes")) guiShowUnderline = true; else guiShowUnderline = false; } if (pn.equals("hotspots")) { if (pce.getNewValue().equals("Yes")) hotSpots = true; else hotSpots = false; } if (pn.equals("hsMore")) { hsMore.setLength(0); hsMore.append((String)pce.getNewValue()); } if (pn.equals("hsBottom")) { hsBottom.setLength(0); hsBottom.append((String)pce.getNewValue()); } if (pn.equals("font")) { font = new Font((String)pce.getNewValue(),Font.PLAIN,14); updateFont = true; } if (pn.equals("fontScaleHeight")) {// try { sfh = Float.parseFloat((String)pce.getNewValue()); updateFont = true;// } } if (pn.equals("fontScaleWidth")) {// try { sfw = Float.parseFloat((String)pce.getNewValue()); updateFont = true;// } } if (pn.equals("fontPointSize")) {// try { ps132 = Float.parseFloat((String)pce.getNewValue()); updateFont = true;// } } if (updateFont) { Rectangle r = gui.getDrawingBounds(); resizeScreenArea(r.width,r.height); updateFont = false; } if (resetAttr) for (int y = 0;y < lenScreen; y++) { screen[y].setAttribute(screen[y].getCharAttr()); } gui.repaint(); gui.revalidate(); }
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/bcfd5ba28d22d8100110257f977fd7c577f652c2/Screen5250.java/clean/tn5250j/src/org/tn5250j/Screen5250.java
public void sendKeys(String text) { if (keyboardLocked) { if(text.equals("[reset]") || text.equals("[sysreq]") || text.equals("[attn]")) { bufferedKeys = ""; keysBuffered = false; setKBIndicatorOff(); simulateMnemonic(getMnemonicValue(text)); } else { keysBuffered = true; setKBIndicatorOn(); if(bufferedKeys == null){ bufferedKeys = text; return; } else { bufferedKeys += text; return; } } } else { if (keysBuffered) { text = bufferedKeys + text; keysBuffered = false; setKBIndicatorOff(); bufferedKeys = ""; } // check to see if position is in a field and if it is then change // current field to that field isInField(lastPos,true); if (text.length() == 1 && !text.equals("[") && !text.equals("]")) { simulateKeyStroke(text.charAt(0)); } else { strokenizer.setKeyStrokes(text); String s; boolean done = false; while (strokenizer.hasMoreKeyStrokes() && !done) { s = strokenizer.nextKeyStroke(); if (s.length() == 1) { simulateKeyStroke(s.charAt(0)); } else { if (s != null) simulateMnemonic(getMnemonicValue(s)); else System.out.println(" mnemonic " + s); } if (keyboardLocked) { bufferedKeys = strokenizer.getUnprocessedKeyStroked(); if (bufferedKeys != null) { keysBuffered = true; setKBIndicatorOn(); } done = true; } } } } }
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/bcfd5ba28d22d8100110257f977fd7c577f652c2/Screen5250.java/clean/tn5250j/src/org/tn5250j/Screen5250.java
goto_XY(icX,icY);
public void setPendingInsert(boolean flag, int icX, int icY) { pendingInsert = flag; if (pendingInsert) { homePos = getPos(icX,icY); } }
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/bcfd5ba28d22d8100110257f977fd7c577f652c2/Screen5250.java/clean/tn5250j/src/org/tn5250j/Screen5250.java
case DUP_FIELD : if (screenFields.getCurrentField() != null && screenFields.withinCurrentField(lastPos) && !screenFields.isCurrentFieldBypassField()) { if (screenFields.isCurrentFieldDupEnabled()) { setCursorOff(); resetDirty(lastPos); screenFields.getCurrentField().setFieldChar(lastPos,(char)0x1C); screenFields.setCurrentFieldMDT(); gotoFieldNext(); updateDirty(); setCursorOn(); simulated = true; } else { displayError(ERR_DUP_KEY_NOT_ALLOWED); } } else { displayError(ERR_CURSOR_PROTECTED); } break; case NEW_LINE : if (screenFields.getSize() > 0) { int startRow = getRow(lastPos) + 1; int startPos = lastPos; boolean isthere = false; setCursorOff(); if (startRow == getRows()) startRow = 0; goto_XY(++startRow,1); if (!isInField() && screenFields.getCurrentField() != null && !screenFields.isCurrentFieldBypassField()) { while (!isInField() && screenFields.getCurrentField() != null && !screenFields.isCurrentFieldBypassField()) { advancePos(); if (lastPos == startPos) { goto_XY(startPos); break; } } } setCursorOn(); } simulated = true; break;
protected boolean simulateMnemonic(int mnem){ boolean simulated = false; switch (mnem) { case AID_CLEAR : case AID_ENTER : case AID_PF1 : case AID_PF2 : case AID_PF3 : case AID_PF4 : case AID_PF5 : case AID_PF6 : case AID_PF7 : case AID_PF8 : case AID_PF9 : case AID_PF10 : case AID_PF11 : case AID_PF12 : case AID_PF13 : case AID_PF14 : case AID_PF15 : case AID_PF16 : case AID_PF17 : case AID_PF18 : case AID_PF19 : case AID_PF20 : case AID_PF21 : case AID_PF22 : case AID_PF23 : case AID_PF24 : case AID_ROLL_DOWN : case AID_ROLL_UP : case AID_ROLL_LEFT : case AID_ROLL_RIGHT : sendAid(mnem); simulated = true; break; case AID_HELP : sessionVT.sendHelpRequest(); simulated = true; break; case AID_PRINT : sessionVT.hostPrint(1); simulated = true; break; case BACK_SPACE : if (screenFields.getCurrentField() != null && screenFields.withinCurrentField(lastPos) && !screenFields.isCurrentFieldBypassField()) { if (screenFields.getCurrentField().startPos() == lastPos) displayError(ERR_CURSOR_PROTECTED); else { setCursorOff(); screenFields.getCurrentField().getKeyPos(lastPos); screenFields.getCurrentField().changePos(-1); resetDirty(screenFields.getCurrentField().getCurrentPos()); shiftLeft(screenFields.getCurrentField().getCurrentPos()); updateDirty(); setCursorOn(); screenFields.setCurrentFieldMDT(); simulated = true; } } else { displayError(ERR_CURSOR_PROTECTED); } break; case BACK_TAB : if (screenFields.getCurrentField() != null && screenFields.isCurrentFieldHighlightedEntry()) { resetDirty(screenFields.getCurrentField().startPos); gotoFieldPrev(); updateDirty(); } else gotoFieldPrev(); if (screenFields.isCurrentFieldContinued()) { do { gotoFieldPrev(); } while (screenFields.isCurrentFieldContinuedMiddle() || screenFields.isCurrentFieldContinuedLast()); } isInField(lastPos); simulated = true; break; case UP : case MARK_UP : process_XY(lastPos - numCols); simulated = true; break; case DOWN : case MARK_DOWN : process_XY(lastPos + numCols); simulated = true; break; case LEFT : case MARK_LEFT : process_XY(lastPos - 1); simulated = true; break; case RIGHT : case MARK_RIGHT : process_XY(lastPos + 1); simulated = true; break; case NEXTWORD : gotoNextWord(); simulated = true; break; case PREVWORD : gotoPrevWord(); simulated = true; break; case DELETE : if (screenFields.getCurrentField() != null && screenFields.withinCurrentField(lastPos) && !screenFields.isCurrentFieldBypassField()) { setCursorOff(); resetDirty(lastPos); screenFields.getCurrentField().getKeyPos(lastPos); shiftLeft(screenFields.getCurrentFieldPos()); screenFields.setCurrentFieldMDT(); updateDirty(); setCursorOn(); simulated = true; } else { displayError(ERR_CURSOR_PROTECTED); } break; case TAB : if (screenFields.getCurrentField() != null && !screenFields.isCurrentFieldContinued()) { if (screenFields.isCurrentFieldHighlightedEntry()) { resetDirty(screenFields.getCurrentField().startPos); gotoFieldNext(); updateDirty(); } else gotoFieldNext(); } else { do { gotoFieldNext(); } while (screenFields.getCurrentField() != null && (screenFields.isCurrentFieldContinuedMiddle() || screenFields.isCurrentFieldContinuedLast())); } isInField(lastPos); simulated = true; break; case EOF : if (screenFields.getCurrentField() != null && screenFields.withinCurrentField(lastPos) && !screenFields.isCurrentFieldBypassField()) { int where = endOfField(screenFields.getCurrentField().startPos(),true); if (where > 0) { goto_XY((where / numCols) + 1,(where % numCols) + 1); } simulated = true; } else { displayError(ERR_CURSOR_PROTECTED); } resetDirty(lastPos); break; case ERASE_EOF : if (screenFields.getCurrentField() != null && screenFields.withinCurrentField(lastPos) && !screenFields.isCurrentFieldBypassField()) { setCursorOff(); int where = lastPos; resetDirty(lastPos); if (fieldExit()) { screenFields.setCurrentFieldMDT(); if (!screenFields.isCurrentFieldContinued()) { gotoFieldNext(); } else { do { gotoFieldNext(); if (screenFields.isCurrentFieldContinued()) fieldExit(); } while (screenFields.isCurrentFieldContinuedMiddle() || screenFields.isCurrentFieldContinuedLast()); } } updateDirty(); goto_XY(where); setCursorOn(); simulated = true; } else { displayError(ERR_CURSOR_PROTECTED); } break; case ERASE_FIELD : if (screenFields.getCurrentField() != null && screenFields.withinCurrentField(lastPos) && !screenFields.isCurrentFieldBypassField()) { setCursorOff(); int where = lastPos; lastPos = screenFields.getCurrentField().startPos(); resetDirty(lastPos); if (fieldExit()) { screenFields.setCurrentFieldMDT(); if (!screenFields.isCurrentFieldContinued()) { gotoFieldNext(); } else { do { gotoFieldNext(); if (screenFields.isCurrentFieldContinued()) fieldExit(); } while (screenFields.isCurrentFieldContinuedMiddle() || screenFields.isCurrentFieldContinuedLast()); } } updateDirty(); goto_XY(where); setCursorOn(); simulated = true; } else { displayError(ERR_CURSOR_PROTECTED); } break; case INSERT : setCursorOff(); // we toggle it insertMode = insertMode ? false : true; setCursorOn(); break; case HOME : // position to the home position set if (lastPos + numCols + 1 != homePos) { goto_XY(homePos - numCols - 1); // now check if we are in a field isInField(lastPos); } else gotoField(1); break; case KEYPAD_0 : simulated = simulateKeyStroke('0'); break; case KEYPAD_1 : simulated = simulateKeyStroke('1'); break; case KEYPAD_2 : simulated = simulateKeyStroke('2'); break; case KEYPAD_3 : simulated = simulateKeyStroke('3'); break; case KEYPAD_4 : simulated = simulateKeyStroke('4'); break; case KEYPAD_5 : simulated = simulateKeyStroke('5'); break; case KEYPAD_6 : simulated = simulateKeyStroke('6'); break; case KEYPAD_7 : simulated = simulateKeyStroke('7'); break; case KEYPAD_8 : simulated = simulateKeyStroke('8'); break; case KEYPAD_9 : simulated = simulateKeyStroke('9'); break; case KEYPAD_PERIOD : simulated = simulateKeyStroke('.'); break; case KEYPAD_COMMA : simulated = simulateKeyStroke(','); break; case KEYPAD_MINUS : if (screenFields.getCurrentField() != null && screenFields.withinCurrentField(lastPos) && !screenFields.isCurrentFieldBypassField()) { int s = screenFields.getCurrentField().getFieldShift(); if (s == 3 || s == 5 || s == 7) { screen[lastPos].setChar('-'); resetDirty(lastPos); advancePos(); if (fieldExit()) { screenFields.setCurrentFieldMDT(); if (!screenFields.isCurrentFieldContinued()) { gotoFieldNext(); } else { do { gotoFieldNext(); } while (screenFields.isCurrentFieldContinuedMiddle() || screenFields.isCurrentFieldContinuedLast()); } simulated = true; updateDirty(); if (screenFields.isCurrentFieldAutoEnter()) sendAid(AID_ENTER); } } else { displayError(ERR_FIELD_MINUS); } } else { displayError(ERR_CURSOR_PROTECTED); } break; case FIELD_EXIT : if (screenFields.getCurrentField() != null && screenFields.withinCurrentField(lastPos) && !screenFields.isCurrentFieldBypassField()) { setCursorOff(); resetDirty(lastPos); if (fieldExit()) { screenFields.setCurrentFieldMDT(); if (!screenFields.isCurrentFieldContinued()) { gotoFieldNext(); } else { do { gotoFieldNext(); if (screenFields.isCurrentFieldContinued()) fieldExit(); } while (screenFields.isCurrentFieldContinuedMiddle() || screenFields.isCurrentFieldContinuedLast()); } } updateDirty(); setCursorOn(); simulated = true; if (screenFields.isCurrentFieldAutoEnter()) sendAid(AID_ENTER); } else { displayError(ERR_CURSOR_PROTECTED); } break; case FIELD_PLUS : if (screenFields.getCurrentField() != null && screenFields.withinCurrentField(lastPos) && !screenFields.isCurrentFieldBypassField()) { setCursorOff(); resetDirty(lastPos); if (fieldExit()) { screenFields.setCurrentFieldMDT(); if (!screenFields.isCurrentFieldContinued()) { gotoFieldNext(); } else { do { gotoFieldNext(); } while (screenFields.isCurrentFieldContinuedMiddle() || screenFields.isCurrentFieldContinuedLast()); } } updateDirty(); setCursorOn(); simulated = true; if (screenFields.isCurrentFieldAutoEnter()) sendAid(AID_ENTER); } else { displayError(ERR_CURSOR_PROTECTED); } break; case FIELD_MINUS : if (screenFields.getCurrentField() != null && screenFields.withinCurrentField(lastPos) && !screenFields.isCurrentFieldBypassField()) { int s = screenFields.getCurrentField().getFieldShift(); if (s == 3 || s == 5 || s == 7) { setCursorOff(); screen[lastPos].setChar('-'); resetDirty(lastPos); advancePos(); if (fieldExit()) { screenFields.setCurrentFieldMDT(); if (!screenFields.isCurrentFieldContinued()) { gotoFieldNext(); } else { do { gotoFieldNext(); } while (screenFields.isCurrentFieldContinuedMiddle() || screenFields.isCurrentFieldContinuedLast()); } } updateDirty(); setCursorOn(); simulated = true; if (screenFields.isCurrentFieldAutoEnter()) sendAid(AID_ENTER); } else { displayError(ERR_FIELD_MINUS); } } else { displayError(ERR_CURSOR_PROTECTED); } break; case BOF : if (screenFields.getCurrentField() != null && screenFields.withinCurrentField(lastPos) && !screenFields.isCurrentFieldBypassField()) { int where = screenFields.getCurrentField().startPos(); if (where > 0) { goto_XY(where); } simulated = true; } else { displayError(ERR_CURSOR_PROTECTED); } resetDirty(lastPos); break; case SYSREQ : sessionVT.systemRequest(); simulated = true; break; case RESET : if (isStatusErrorCode()) { restoreErrorLine(); setStatus(STATUS_ERROR_CODE,STATUS_VALUE_OFF,""); isInField(lastPos); updateDirty(); } setKBIndicatorOff(); simulated = true; break; case COPY : copyMe(); break; case PASTE : pasteMe(false); break; case ATTN : sessionVT.sendAttentionKey(); simulated = true; break; default : System.out.println(" Mnemonic not supported " + mnem); break; } return simulated; }
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/bcfd5ba28d22d8100110257f977fd7c577f652c2/Screen5250.java/clean/tn5250j/src/org/tn5250j/Screen5250.java
ClassLoader cl = VMSecurityManager.currentClassLoader(); return cl != null ? cl.getPackage(name) : null;
ClassLoader cl = VMStackWalker.getCallingClassLoader(); return cl != null ? cl.getPackage(name) : VMClassLoader.getPackage(name);
public static Package getPackage(String name) { // Get the caller's classloader ClassLoader cl = VMSecurityManager.currentClassLoader(); return cl != null ? cl.getPackage(name) : null; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/c65f6a6914005749230b8f31c6890448761cd6f4/Package.java/clean/core/src/classpath/java/java/lang/Package.java
Class c = VMSecurityManager.getClassContext()[1]; ClassLoader cl = c.getClassLoader(); return cl != null ? cl.getPackages() : new Package[0];
ClassLoader cl = VMStackWalker.getCallingClassLoader(); return cl != null ? cl.getPackages() : VMClassLoader.getPackages();
public static Package[] getPackages() { // Get the caller's classloader Class c = VMSecurityManager.getClassContext()[1]; ClassLoader cl = c.getClassLoader(); // Sun's implementation returns the packages loaded by the bootstrap // classloader if cl is null, but right now our bootstrap classloader // does not create any Packages. return cl != null ? cl.getPackages() : new Package[0]; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/c65f6a6914005749230b8f31c6890448761cd6f4/Package.java/clean/core/src/classpath/java/java/lang/Package.java
breaker.setText(s.toString());
breaker.setText(s);
public static final int getBreakLocation(Segment s, FontMetrics metrics, int x0, int x, TabExpander e, int startOffset) { int mark = Utilities.getTabbedTextOffset(s, metrics, x0, x, e, startOffset); BreakIterator breaker = BreakIterator.getWordInstance(); breaker.setText(s.toString()); // If mark is equal to the end of the string, just use that position if (mark == s.count) return mark; // Try to find a word boundary previous to the mark at which we // can break the text int preceding = breaker.preceding(mark + 1); if (preceding != 0) return preceding; else // If preceding is 0 we couldn't find a suitable word-boundary so // just break it on the character boundary return mark; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/70a2876c99036463feada99a37295405c146f49b/Utilities.java/clean/core/src/classpath/javax/javax/swing/text/Utilities.java
if (Math.abs(offsX-x) < Math.abs(offsXNext-x))
if (Math.abs(offsX-x) <= Math.abs(offsXNext-x))
public static final int getPositionAbove(JTextComponent c, int offset, int x) throws BadLocationException { int offs = getRowStart(c, offset); if(offs == -1) return -1; // Effectively calculates the y value of the previous line. Point pt = c.modelToView(offs-1).getLocation(); pt.x = x; // Calculate a simple fitting offset. offs = c.viewToModel(pt); // Find out the real x positions of the calculated character and its // neighbour. int offsX = c.modelToView(offs).getLocation().x; int offsXNext = c.modelToView(offs+1).getLocation().x; // Chose the one which is nearer to us and return its offset. if (Math.abs(offsX-x) < Math.abs(offsXNext-x)) return offs; else return offs+1; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/70a2876c99036463feada99a37295405c146f49b/Utilities.java/clean/core/src/classpath/javax/javax/swing/text/Utilities.java
if (Math.abs(offsX-x) < Math.abs(offsXNext-x))
if (Math.abs(offsX-x) <= Math.abs(offsXNext-x))
public static final int getPositionBelow(JTextComponent c, int offset, int x) throws BadLocationException { int offs = getRowEnd(c, offset); if(offs == -1) return -1; // Effectively calculates the y value of the previous line. Point pt = c.modelToView(offs+1).getLocation(); pt.x = x; // Calculate a simple fitting offset. offs = c.viewToModel(pt); if (offs == c.getDocument().getLength()) return offs; // Find out the real x positions of the calculated character and its // neighbour. int offsX = c.modelToView(offs).getLocation().x; int offsXNext = c.modelToView(offs+1).getLocation().x; // Chose the one which is nearer to us and return its offset. if (Math.abs(offsX-x) < Math.abs(offsXNext-x)) return offs; else return offs+1; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/70a2876c99036463feada99a37295405c146f49b/Utilities.java/clean/core/src/classpath/javax/javax/swing/text/Utilities.java
if (listeners != null) { int size = listeners.size(); for (int i = 0; i < size; i++) { FTPStatusListener target =
if (listeners != null) { int size = listeners.size(); for (int i = 0; i < size; i++) { FTPStatusListener target =
private void fireCommandEvent() { if (listeners != null) { int size = listeners.size(); for (int i = 0; i < size; i++) { FTPStatusListener target = (FTPStatusListener)listeners.elementAt(i); target.commandStatusReceived(status); } } }
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/b424408b7c5f668455972e5e401cbeda3a3ff25a/FTP5250Prot.java/buggy/tn5250j/src/org/tn5250j/tools/FTP5250Prot.java
target.commandStatusReceived(status); } }
target.commandStatusReceived(status); } }
private void fireCommandEvent() { if (listeners != null) { int size = listeners.size(); for (int i = 0; i < size; i++) { FTPStatusListener target = (FTPStatusListener)listeners.elementAt(i); target.commandStatusReceived(status); } } }
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/b424408b7c5f668455972e5e401cbeda3a3ff25a/FTP5250Prot.java/buggy/tn5250j/src/org/tn5250j/tools/FTP5250Prot.java
if (listeners != null) { int size = listeners.size(); for (int i = 0; i < size; i++) { FTPStatusListener target =
if (listeners != null) { int size = listeners.size(); for (int i = 0; i < size; i++) { FTPStatusListener target =
private void fireInfoEvent() { if (listeners != null) { int size = listeners.size(); for (int i = 0; i < size; i++) { FTPStatusListener target = (FTPStatusListener)listeners.elementAt(i); target.fileInfoReceived(status); } } }
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/b424408b7c5f668455972e5e401cbeda3a3ff25a/FTP5250Prot.java/buggy/tn5250j/src/org/tn5250j/tools/FTP5250Prot.java
target.fileInfoReceived(status); } }
target.fileInfoReceived(status); } }
private void fireInfoEvent() { if (listeners != null) { int size = listeners.size(); for (int i = 0; i < size; i++) { FTPStatusListener target = (FTPStatusListener)listeners.elementAt(i); target.fileInfoReceived(status); } } }
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/b424408b7c5f668455972e5e401cbeda3a3ff25a/FTP5250Prot.java/buggy/tn5250j/src/org/tn5250j/tools/FTP5250Prot.java
if (listeners != null) { int size = listeners.size(); for (int i = 0; i < size; i++) { FTPStatusListener target =
if (listeners != null) { int size = listeners.size(); for (int i = 0; i < size; i++) { FTPStatusListener target =
private void fireStatusEvent() { if (listeners != null) { int size = listeners.size(); for (int i = 0; i < size; i++) { FTPStatusListener target = (FTPStatusListener)listeners.elementAt(i); target.statusReceived(status); } } }
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/b424408b7c5f668455972e5e401cbeda3a3ff25a/FTP5250Prot.java/buggy/tn5250j/src/org/tn5250j/tools/FTP5250Prot.java
target.statusReceived(status); } }
target.statusReceived(status); } }
private void fireStatusEvent() { if (listeners != null) { int size = listeners.size(); for (int i = 0; i < size; i++) { FTPStatusListener target = (FTPStatusListener)listeners.elementAt(i); target.statusReceived(status); } } }
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/b424408b7c5f668455972e5e401cbeda3a3ff25a/FTP5250Prot.java/buggy/tn5250j/src/org/tn5250j/tools/FTP5250Prot.java
System.out.println(tFile.substring(0,memberOffset));
protected boolean getFileInfo(String tFile, boolean useInternal) { int memberOffset = tFile.indexOf("."); String file2 = null; String member2 = null; if (memberOffset > 0) { System.out.println(tFile.substring(0,memberOffset)); file2 = tFile.substring(0,memberOffset); member2 = tFile.substring(memberOffset + 1); } else { file2 = tFile; } final String file = file2; final String member = member2; final boolean internal = useInternal; Runnable getInfo = new Runnable () { // set the thread to run. public void run() { executeCommand("RCMD","dspffd FILE(" + file + ") OUTPUT(*OUTFILE) " + "OUTFILE(QTEMP/FFD) "); if (lastResponse.startsWith("2")) { if (loadFFD(internal)) { if (lastResponse.startsWith("2")) { if (getMbrInfo(file,member)) { fireInfoEvent(); } } } } } }; Thread infoThread = new Thread(getInfo); infoThread.start(); return true; }
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/b424408b7c5f668455972e5e401cbeda3a3ff25a/FTP5250Prot.java/buggy/tn5250j/src/org/tn5250j/tools/FTP5250Prot.java
if (member == null && fileSize == 0) { fileSize = packed2int(abyte0,345,5); status.setFileLength(fileSize); member = sb.toString(); } else { if (sb.toString().equalsIgnoreCase(member)) { fileSize = packed2int(abyte0,345,5); status.setFileLength(fileSize);
members.add(new MemberInfo(sb.toString(),packed2int(abyte0,345,5)));
private boolean getMbrSize(String member) { boolean flag = true; if(ftpOutputStream == null) { printFTPInfo("Not connected to any server!"); return false; } if(!loggedIn) { printFTPInfo("Login was not successful! Aborting!"); return false; } Socket socket = null; DataInputStream datainputstream = null; executeCommand("TYPE","I"); String remoteFile = "QTEMP/FML"; try { socket = createPassiveSocket("RETR " + remoteFile); if(socket != null) { datainputstream = new DataInputStream(socket.getInputStream()); byte abyte0[] = new byte[858]; int c = 0; int kj = 0; int len = 0; StringBuffer sb = new StringBuffer(10); printFTPInfo("<----------------- Member Information ---------------->"); for(int j = 0; j != -1 && !aborted;) { j = datainputstream.read(); if(j == -1) break; c ++; abyte0[len++] = (byte)j; if (len == abyte0.length) { sb.setLength(0); // the offset for member name MBNAME is 164 with offset of 1 but // we have to offset the buffer by 0 which makes it 164 - 1 // or 163 for (int f = 0;f < 10; f++) { sb.append(vt.getASCIIChar(abyte0[163 + f] & 0xff)); } printFTPInfo(sb + " " + packed2int(abyte0,345,5)); if (member == null && fileSize == 0) { // get current number of records fileSize = packed2int(abyte0,345,5); status.setFileLength(fileSize); member = sb.toString(); } else { if (sb.toString().equalsIgnoreCase(member)) { // get current number of records fileSize = packed2int(abyte0,345,5); status.setFileLength(fileSize); } else { fileSize = packed2int(abyte0,345,5); status.setFileLength(fileSize); } } len =0; } } printFTPInfo("Member list Transfer complete!"); } else flag = false; } catch(Exception _ex) { printFTPInfo("Error! " + _ex); return false; } finally { try { socket.close(); } catch(Exception _ex) { } try { datainputstream.close(); } catch(Exception _ex) { } } parseResponse(); return flag; }
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/b424408b7c5f668455972e5e401cbeda3a3ff25a/FTP5250Prot.java/buggy/tn5250j/src/org/tn5250j/tools/FTP5250Prot.java
} else { fileSize = packed2int(abyte0,345,5); status.setFileLength(fileSize); } }
private boolean getMbrSize(String member) { boolean flag = true; if(ftpOutputStream == null) { printFTPInfo("Not connected to any server!"); return false; } if(!loggedIn) { printFTPInfo("Login was not successful! Aborting!"); return false; } Socket socket = null; DataInputStream datainputstream = null; executeCommand("TYPE","I"); String remoteFile = "QTEMP/FML"; try { socket = createPassiveSocket("RETR " + remoteFile); if(socket != null) { datainputstream = new DataInputStream(socket.getInputStream()); byte abyte0[] = new byte[858]; int c = 0; int kj = 0; int len = 0; StringBuffer sb = new StringBuffer(10); printFTPInfo("<----------------- Member Information ---------------->"); for(int j = 0; j != -1 && !aborted;) { j = datainputstream.read(); if(j == -1) break; c ++; abyte0[len++] = (byte)j; if (len == abyte0.length) { sb.setLength(0); // the offset for member name MBNAME is 164 with offset of 1 but // we have to offset the buffer by 0 which makes it 164 - 1 // or 163 for (int f = 0;f < 10; f++) { sb.append(vt.getASCIIChar(abyte0[163 + f] & 0xff)); } printFTPInfo(sb + " " + packed2int(abyte0,345,5)); if (member == null && fileSize == 0) { // get current number of records fileSize = packed2int(abyte0,345,5); status.setFileLength(fileSize); member = sb.toString(); } else { if (sb.toString().equalsIgnoreCase(member)) { // get current number of records fileSize = packed2int(abyte0,345,5); status.setFileLength(fileSize); } else { fileSize = packed2int(abyte0,345,5); status.setFileLength(fileSize); } } len =0; } } printFTPInfo("Member list Transfer complete!"); } else flag = false; } catch(Exception _ex) { printFTPInfo("Error! " + _ex); return false; } finally { try { socket.close(); } catch(Exception _ex) { } try { datainputstream.close(); } catch(Exception _ex) { } } parseResponse(); return flag; }
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/b424408b7c5f668455972e5e401cbeda3a3ff25a/FTP5250Prot.java/buggy/tn5250j/src/org/tn5250j/tools/FTP5250Prot.java
SecurityManager sm = System.getSecurityManager(); if (sm != null) sm.checkAccept(impl.getInetAddress().getHostAddress(), impl.getLocalPort());
public Socket accept() throws IOException { SecurityManager sm = System.getSecurityManager(); if (sm != null) sm.checkAccept(impl.getInetAddress().getHostAddress(), impl.getLocalPort()); Socket socket = new Socket(); try { implAccept(socket); } catch (IOException e) { try { socket.close(); } catch (IOException e2) { // Ignore. } throw e; } return socket; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/fd7e81b5c6d5963539719dfde9d197c68890c201/ServerSocket.java/buggy/core/src/classpath/java/java/net/ServerSocket.java
public Gui5250(SessionConfig config) { propFileName = config.getConfigurationResource(); sesConfig = config; enableEvents(AWTEvent.WINDOW_EVENT_MASK | AWTEvent.KEY_EVENT_MASK); try { jbInit(); } catch(Exception e) { e.printStackTrace(); }
public Gui5250 () {
public Gui5250(SessionConfig config) { propFileName = config.getConfigurationResource(); sesConfig = config; enableEvents(AWTEvent.WINDOW_EVENT_MASK | AWTEvent.KEY_EVENT_MASK); try { jbInit(); } catch(Exception e) { e.printStackTrace(); } }
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/0686de448db01a9cc1b09cae982858a4d418dae8/Gui5250.java/buggy/tn5250j/src/org/tn5250j/Gui5250.java
public void internalFrameActivated(InternalFrameEvent event) { }
public void internalFrameActivated(InternalFrameEvent event) { }
public void internalFrameActivated(InternalFrameEvent event) { } // internalFrameActivated()
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/963ae61676e8c35a9e0998e0b7de1f942db82a26/InternalFrameAdapter.java/buggy/core/src/classpath/javax/javax/swing/event/InternalFrameAdapter.java
public void internalFrameClosed(InternalFrameEvent event) { }
public void internalFrameClosed(InternalFrameEvent event) { }
public void internalFrameClosed(InternalFrameEvent event) { } // internalFrameClosed()
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/963ae61676e8c35a9e0998e0b7de1f942db82a26/InternalFrameAdapter.java/buggy/core/src/classpath/javax/javax/swing/event/InternalFrameAdapter.java
public void internalFrameClosing(InternalFrameEvent event) { }
public void internalFrameClosing(InternalFrameEvent event) { }
public void internalFrameClosing(InternalFrameEvent event) { } // internalFrameClosing()
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/963ae61676e8c35a9e0998e0b7de1f942db82a26/InternalFrameAdapter.java/buggy/core/src/classpath/javax/javax/swing/event/InternalFrameAdapter.java
public void internalFrameDeactivated(InternalFrameEvent event) { }
public void internalFrameDeactivated(InternalFrameEvent event) { }
public void internalFrameDeactivated(InternalFrameEvent event) { } // internalFrameDeactivated()
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/963ae61676e8c35a9e0998e0b7de1f942db82a26/InternalFrameAdapter.java/buggy/core/src/classpath/javax/javax/swing/event/InternalFrameAdapter.java
public void internalFrameDeiconified(InternalFrameEvent event) { }
public void internalFrameDeiconified(InternalFrameEvent event) { }
public void internalFrameDeiconified(InternalFrameEvent event) { } // internalFrameDeiconified()
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/963ae61676e8c35a9e0998e0b7de1f942db82a26/InternalFrameAdapter.java/buggy/core/src/classpath/javax/javax/swing/event/InternalFrameAdapter.java
public void internalFrameIconified(InternalFrameEvent event) { }
public void internalFrameIconified(InternalFrameEvent event) { }
public void internalFrameIconified(InternalFrameEvent event) { } // internalFrameIconified()
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/963ae61676e8c35a9e0998e0b7de1f942db82a26/InternalFrameAdapter.java/buggy/core/src/classpath/javax/javax/swing/event/InternalFrameAdapter.java
public void internalFrameOpened(InternalFrameEvent event) { }
public void internalFrameOpened(InternalFrameEvent event) { }
public void internalFrameOpened(InternalFrameEvent event) { } // internalFrameOpened()
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/963ae61676e8c35a9e0998e0b7de1f942db82a26/InternalFrameAdapter.java/buggy/core/src/classpath/javax/javax/swing/event/InternalFrameAdapter.java
public Bus(Bus parent) { this.parent = parent; this.parentDevice = null;
Bus() { this.parent = null; this.parentDevice = null;
public Bus(Bus parent) { this.parent = parent; this.parentDevice = null; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/51e4aed2205f326c2698e2154ea7f83ae5dfc2b6/Bus.java/buggy/core/src/driver/org/jnode/driver/Bus.java
public DeviceException(String s) { super(s);
public DeviceException() { super();
public DeviceException(String s) { super(s); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/51e4aed2205f326c2698e2154ea7f83ae5dfc2b6/DeviceException.java/buggy/core/src/driver/org/jnode/driver/DeviceException.java
private FloatItem(int kind, Register reg, int offsetToFP, float value) { super(kind, reg, offsetToFP); this.value = value;
FloatItem(ItemFactory factory) { super(factory);
private FloatItem(int kind, Register reg, int offsetToFP, float value) { super(kind, reg, offsetToFP); this.value = value; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/e304bedac9ab86f88bdb27ffd782a9777505c449/FloatItem.java/clean/core/src/core/org/jnode/vm/x86/compiler/l1a/FloatItem.java
return createConst(getValue());
return factory.createFConst(getValue());
protected WordItem cloneConstant() { return createConst(getValue()); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/e304bedac9ab86f88bdb27ffd782a9777505c449/FloatItem.java/clean/core/src/core/org/jnode/vm/x86/compiler/l1a/FloatItem.java
simulateMnemonic(getMnemonicValue(text));
public void sendKeys(String text) { if (keyboardLocked) { if(text.equals("[reset]") || text.equals("[sysreq]") || text.equals("[attn]")) { bufferedKeys = ""; keysBuffered = false; } else { keysBuffered = true; if(bufferedKeys == null){ bufferedKeys = text; return; } else { bufferedKeys += text; return; } } } else { if (keysBuffered) { text = bufferedKeys + text; keysBuffered = false; bufferedKeys = ""; } // check to see if position is in a field and if it is then change // current field to that field isInField(lastPos,true); if (text.length() == 1 && !text.equals("[") && !text.equals("]")) { simulateKeyStroke(text.charAt(0)); } else { strokenizer.setKeyStrokes(text); String s; boolean done = false; while (strokenizer.hasMoreKeyStrokes() && !done) { s = strokenizer.nextKeyStroke(); if (s.length() == 1) { simulateKeyStroke(s.charAt(0)); } else { if (s != null) simulateMnemonic(getMnemonicValue(s)); else System.out.println(" mnemonic " + s); } if (keyboardLocked) { bufferedKeys = strokenizer.getUnprocessedKeyStroked(); if (bufferedKeys != null) keysBuffered = true; done = true; } } } } }
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/99debc0e39981c309029bd7389a7d7c50837d87b/Screen5250.java/clean/tn5250j/src/org/tn5250j/Screen5250.java
Graphics2D g2d = getWritingArea();
public void setStatus(byte attr,byte value,String s) { Graphics2D g2d = getWritingArea(); statusString = s; if (g2d == null) return; try { g2d.setColor(colorBg); g2d.fill(sArea); float Y = ((int)sArea.getY() + fmHeight)- (lm.getLeading() + lm.getDescent()); switch (attr) { case STATUS_SYSTEM: if (value == STATUS_VALUE_ON) { statusXSystem =true; g2d.setColor(colorWhite); if (s != null) g2d.drawString(s,(float)sArea.getX(),Y); else g2d.drawString(xSystem,(float)sArea.getX(),Y); } else statusXSystem = false; break; case STATUS_ERROR_CODE: if (value == STATUS_VALUE_ON) { g2d.setColor(colorRed); if (s != null) g2d.drawString(s,(float)sArea.getX(),Y); else g2d.drawString(xError,(float)sArea.getX(),Y); statusErrorCode = true; setKeyboardLocked(true); Toolkit.getDefaultToolkit().beep(); } else { statusErrorCode = false; setKeyboardLocked(false); homePos = saveHomePos; saveHomePos = 0; pendingInsert = false; } break; } updateImage(sArea.getBounds()); g2d.dispose(); } catch (Exception e) { System.out.println(" setStatus " + e.getMessage()); } }
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/99debc0e39981c309029bd7389a7d7c50837d87b/Screen5250.java/clean/tn5250j/src/org/tn5250j/Screen5250.java
if (g2d == null) return; try { g2d.setColor(colorBg); g2d.fill(sArea);
bi.setStatus(attr,value,s, fmWidth, fmHeight, lm, font, colorBg, colorRed, colorWhite);
public void setStatus(byte attr,byte value,String s) { Graphics2D g2d = getWritingArea(); statusString = s; if (g2d == null) return; try { g2d.setColor(colorBg); g2d.fill(sArea); float Y = ((int)sArea.getY() + fmHeight)- (lm.getLeading() + lm.getDescent()); switch (attr) { case STATUS_SYSTEM: if (value == STATUS_VALUE_ON) { statusXSystem =true; g2d.setColor(colorWhite); if (s != null) g2d.drawString(s,(float)sArea.getX(),Y); else g2d.drawString(xSystem,(float)sArea.getX(),Y); } else statusXSystem = false; break; case STATUS_ERROR_CODE: if (value == STATUS_VALUE_ON) { g2d.setColor(colorRed); if (s != null) g2d.drawString(s,(float)sArea.getX(),Y); else g2d.drawString(xError,(float)sArea.getX(),Y); statusErrorCode = true; setKeyboardLocked(true); Toolkit.getDefaultToolkit().beep(); } else { statusErrorCode = false; setKeyboardLocked(false); homePos = saveHomePos; saveHomePos = 0; pendingInsert = false; } break; } updateImage(sArea.getBounds()); g2d.dispose(); } catch (Exception e) { System.out.println(" setStatus " + e.getMessage()); } }
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/99debc0e39981c309029bd7389a7d7c50837d87b/Screen5250.java/clean/tn5250j/src/org/tn5250j/Screen5250.java
float Y = ((int)sArea.getY() + fmHeight)- (lm.getLeading() + lm.getDescent()); switch (attr) {
switch (attr) {
public void setStatus(byte attr,byte value,String s) { Graphics2D g2d = getWritingArea(); statusString = s; if (g2d == null) return; try { g2d.setColor(colorBg); g2d.fill(sArea); float Y = ((int)sArea.getY() + fmHeight)- (lm.getLeading() + lm.getDescent()); switch (attr) { case STATUS_SYSTEM: if (value == STATUS_VALUE_ON) { statusXSystem =true; g2d.setColor(colorWhite); if (s != null) g2d.drawString(s,(float)sArea.getX(),Y); else g2d.drawString(xSystem,(float)sArea.getX(),Y); } else statusXSystem = false; break; case STATUS_ERROR_CODE: if (value == STATUS_VALUE_ON) { g2d.setColor(colorRed); if (s != null) g2d.drawString(s,(float)sArea.getX(),Y); else g2d.drawString(xError,(float)sArea.getX(),Y); statusErrorCode = true; setKeyboardLocked(true); Toolkit.getDefaultToolkit().beep(); } else { statusErrorCode = false; setKeyboardLocked(false); homePos = saveHomePos; saveHomePos = 0; pendingInsert = false; } break; } updateImage(sArea.getBounds()); g2d.dispose(); } catch (Exception e) { System.out.println(" setStatus " + e.getMessage()); } }
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/99debc0e39981c309029bd7389a7d7c50837d87b/Screen5250.java/clean/tn5250j/src/org/tn5250j/Screen5250.java
case STATUS_SYSTEM: if (value == STATUS_VALUE_ON) { statusXSystem =true; g2d.setColor(colorWhite);
case STATUS_SYSTEM: if (value == STATUS_VALUE_ON) { statusXSystem =true; } else statusXSystem = false; break;
public void setStatus(byte attr,byte value,String s) { Graphics2D g2d = getWritingArea(); statusString = s; if (g2d == null) return; try { g2d.setColor(colorBg); g2d.fill(sArea); float Y = ((int)sArea.getY() + fmHeight)- (lm.getLeading() + lm.getDescent()); switch (attr) { case STATUS_SYSTEM: if (value == STATUS_VALUE_ON) { statusXSystem =true; g2d.setColor(colorWhite); if (s != null) g2d.drawString(s,(float)sArea.getX(),Y); else g2d.drawString(xSystem,(float)sArea.getX(),Y); } else statusXSystem = false; break; case STATUS_ERROR_CODE: if (value == STATUS_VALUE_ON) { g2d.setColor(colorRed); if (s != null) g2d.drawString(s,(float)sArea.getX(),Y); else g2d.drawString(xError,(float)sArea.getX(),Y); statusErrorCode = true; setKeyboardLocked(true); Toolkit.getDefaultToolkit().beep(); } else { statusErrorCode = false; setKeyboardLocked(false); homePos = saveHomePos; saveHomePos = 0; pendingInsert = false; } break; } updateImage(sArea.getBounds()); g2d.dispose(); } catch (Exception e) { System.out.println(" setStatus " + e.getMessage()); } }
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/99debc0e39981c309029bd7389a7d7c50837d87b/Screen5250.java/clean/tn5250j/src/org/tn5250j/Screen5250.java
if (s != null) g2d.drawString(s,(float)sArea.getX(),Y); else g2d.drawString(xSystem,(float)sArea.getX(),Y); } else statusXSystem = false; break; case STATUS_ERROR_CODE: if (value == STATUS_VALUE_ON) { g2d.setColor(colorRed); if (s != null) g2d.drawString(s,(float)sArea.getX(),Y); else g2d.drawString(xError,(float)sArea.getX(),Y); statusErrorCode = true; setKeyboardLocked(true); Toolkit.getDefaultToolkit().beep(); } else { statusErrorCode = false; setKeyboardLocked(false); homePos = saveHomePos; saveHomePos = 0; pendingInsert = false; } break; } updateImage(sArea.getBounds()); g2d.dispose(); } catch (Exception e) { System.out.println(" setStatus " + e.getMessage());
case STATUS_ERROR_CODE: if (value == STATUS_VALUE_ON) { statusErrorCode = true; setKeyboardLocked(true); Toolkit.getDefaultToolkit().beep(); } else { statusErrorCode = false; setKeyboardLocked(false); homePos = saveHomePos; saveHomePos = 0; pendingInsert = false; } break;
public void setStatus(byte attr,byte value,String s) { Graphics2D g2d = getWritingArea(); statusString = s; if (g2d == null) return; try { g2d.setColor(colorBg); g2d.fill(sArea); float Y = ((int)sArea.getY() + fmHeight)- (lm.getLeading() + lm.getDescent()); switch (attr) { case STATUS_SYSTEM: if (value == STATUS_VALUE_ON) { statusXSystem =true; g2d.setColor(colorWhite); if (s != null) g2d.drawString(s,(float)sArea.getX(),Y); else g2d.drawString(xSystem,(float)sArea.getX(),Y); } else statusXSystem = false; break; case STATUS_ERROR_CODE: if (value == STATUS_VALUE_ON) { g2d.setColor(colorRed); if (s != null) g2d.drawString(s,(float)sArea.getX(),Y); else g2d.drawString(xError,(float)sArea.getX(),Y); statusErrorCode = true; setKeyboardLocked(true); Toolkit.getDefaultToolkit().beep(); } else { statusErrorCode = false; setKeyboardLocked(false); homePos = saveHomePos; saveHomePos = 0; pendingInsert = false; } break; } updateImage(sArea.getBounds()); g2d.dispose(); } catch (Exception e) { System.out.println(" setStatus " + e.getMessage()); } }
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/99debc0e39981c309029bd7389a7d7c50837d87b/Screen5250.java/clean/tn5250j/src/org/tn5250j/Screen5250.java
updateImage(sArea.getBounds());
public void setStatus(byte attr,byte value,String s) { Graphics2D g2d = getWritingArea(); statusString = s; if (g2d == null) return; try { g2d.setColor(colorBg); g2d.fill(sArea); float Y = ((int)sArea.getY() + fmHeight)- (lm.getLeading() + lm.getDescent()); switch (attr) { case STATUS_SYSTEM: if (value == STATUS_VALUE_ON) { statusXSystem =true; g2d.setColor(colorWhite); if (s != null) g2d.drawString(s,(float)sArea.getX(),Y); else g2d.drawString(xSystem,(float)sArea.getX(),Y); } else statusXSystem = false; break; case STATUS_ERROR_CODE: if (value == STATUS_VALUE_ON) { g2d.setColor(colorRed); if (s != null) g2d.drawString(s,(float)sArea.getX(),Y); else g2d.drawString(xError,(float)sArea.getX(),Y); statusErrorCode = true; setKeyboardLocked(true); Toolkit.getDefaultToolkit().beep(); } else { statusErrorCode = false; setKeyboardLocked(false); homePos = saveHomePos; saveHomePos = 0; pendingInsert = false; } break; } updateImage(sArea.getBounds()); g2d.dispose(); } catch (Exception e) { System.out.println(" setStatus " + e.getMessage()); } }
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/99debc0e39981c309029bd7389a7d7c50837d87b/Screen5250.java/clean/tn5250j/src/org/tn5250j/Screen5250.java
protected void resolve()
protected void resolve(PluginRegistryModel registry)
protected void resolve() throws PluginException { if (getDeclaringPluginDescriptor().getPluginRegistry().getPluginDescriptor(plugin) == null) { throw new PluginException("Unknown plugin " + plugin + " in import of " + getDeclaringPluginDescriptor().getId()); } }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/a4bc60fa9952eee4e8b6801b3a5736f52717054a/PluginPrerequisiteModel.java/clean/core/src/core/org/jnode/plugin/model/PluginPrerequisiteModel.java
if (getDeclaringPluginDescriptor().getPluginRegistry().getPluginDescriptor(plugin) == null) {
if (registry.getPluginDescriptor(plugin) == null) {
protected void resolve() throws PluginException { if (getDeclaringPluginDescriptor().getPluginRegistry().getPluginDescriptor(plugin) == null) { throw new PluginException("Unknown plugin " + plugin + " in import of " + getDeclaringPluginDescriptor().getId()); } }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/a4bc60fa9952eee4e8b6801b3a5736f52717054a/PluginPrerequisiteModel.java/clean/core/src/core/org/jnode/plugin/model/PluginPrerequisiteModel.java
protected void unresolve() throws PluginException {
protected void unresolve(PluginRegistryModel registry) throws PluginException {
protected void unresolve() throws PluginException { // Nothing to do }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/a4bc60fa9952eee4e8b6801b3a5736f52717054a/PluginPrerequisiteModel.java/clean/core/src/core/org/jnode/plugin/model/PluginPrerequisiteModel.java
int value = layoutManager.getInitialLocation(jc.getInsets()); if (layoutManager.components[0] != null) value += layoutManager.minimumSizeOfComponent(0);
int value = layoutManager.getInitialLocation(jc.getInsets()) - layoutManager.getAvailableSize(jc.getSize(), jc.getInsets()) + splitPane.getDividerSize(); if (layoutManager.components[1] != null) value += layoutManager.minimumSizeOfComponent(1);
public int getMinimumDividerLocation(JSplitPane jc) { int value = layoutManager.getInitialLocation(jc.getInsets()); if (layoutManager.components[0] != null) value += layoutManager.minimumSizeOfComponent(0); return value; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/f7b0a77266671350e38451a50ce054282a5860ef/BasicSplitPaneUI.java/buggy/core/src/classpath/javax/javax/swing/plaf/basic/BasicSplitPaneUI.java
Hashtable table;
String property;
public static String getLocalizedString(Locale inLocale, String key, String name, boolean checkEnglish, boolean checkRoot) { String localizedString; Hashtable table; if (key.equals("")) return ""; /* Localize to inLocale */ try { table = (Hashtable) ResourceBundle.getBundle("gnu.java.locale.LocaleInformation", inLocale).getObject(name); localizedString = (String) table.get(key); } catch (MissingResourceException exception) { localizedString = null; } /* Localize to default locale */ if (localizedString == null) { try { ResourceBundle bundle; bundle = ResourceBundle.getBundle("gnu.java.locale.LocaleInformation"); table = (Hashtable) bundle.getObject(name); localizedString = (String) table.get(key); } catch (MissingResourceException exception) { localizedString = null; } } /* Localize to English */ if (localizedString == null && checkEnglish) { try { table = (Hashtable) ResourceBundle.getBundle("gnu.java.locale.LocaleInformation", Locale.ENGLISH).getObject(name); localizedString= (String) table.get(key); } catch (MissingResourceException exception) { localizedString = null; } } /* Return unlocalized version */ if (localizedString == null && checkRoot) { try { table = (Hashtable) ResourceBundle.getBundle("gnu.java.locale.LocaleInformation", new Locale("","","")).getObject(name); localizedString= (String) table.get(key); } catch (MissingResourceException exception) { localizedString = null; } } /* Return original input string */ if (localizedString == null) { localizedString = key; } return localizedString; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/68a6301301378680519f2b146daec37812a1bc22/LocaleHelper.java/buggy/core/src/classpath/gnu/gnu/java/locale/LocaleHelper.java
table = (Hashtable)
localizedString =
public static String getLocalizedString(Locale inLocale, String key, String name, boolean checkEnglish, boolean checkRoot) { String localizedString; Hashtable table; if (key.equals("")) return ""; /* Localize to inLocale */ try { table = (Hashtable) ResourceBundle.getBundle("gnu.java.locale.LocaleInformation", inLocale).getObject(name); localizedString = (String) table.get(key); } catch (MissingResourceException exception) { localizedString = null; } /* Localize to default locale */ if (localizedString == null) { try { ResourceBundle bundle; bundle = ResourceBundle.getBundle("gnu.java.locale.LocaleInformation"); table = (Hashtable) bundle.getObject(name); localizedString = (String) table.get(key); } catch (MissingResourceException exception) { localizedString = null; } } /* Localize to English */ if (localizedString == null && checkEnglish) { try { table = (Hashtable) ResourceBundle.getBundle("gnu.java.locale.LocaleInformation", Locale.ENGLISH).getObject(name); localizedString= (String) table.get(key); } catch (MissingResourceException exception) { localizedString = null; } } /* Return unlocalized version */ if (localizedString == null && checkRoot) { try { table = (Hashtable) ResourceBundle.getBundle("gnu.java.locale.LocaleInformation", new Locale("","","")).getObject(name); localizedString= (String) table.get(key); } catch (MissingResourceException exception) { localizedString = null; } } /* Return original input string */ if (localizedString == null) { localizedString = key; } return localizedString; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/68a6301301378680519f2b146daec37812a1bc22/LocaleHelper.java/buggy/core/src/classpath/gnu/gnu/java/locale/LocaleHelper.java
inLocale).getObject(name); localizedString = (String) table.get(key);
inLocale).getString(property);
public static String getLocalizedString(Locale inLocale, String key, String name, boolean checkEnglish, boolean checkRoot) { String localizedString; Hashtable table; if (key.equals("")) return ""; /* Localize to inLocale */ try { table = (Hashtable) ResourceBundle.getBundle("gnu.java.locale.LocaleInformation", inLocale).getObject(name); localizedString = (String) table.get(key); } catch (MissingResourceException exception) { localizedString = null; } /* Localize to default locale */ if (localizedString == null) { try { ResourceBundle bundle; bundle = ResourceBundle.getBundle("gnu.java.locale.LocaleInformation"); table = (Hashtable) bundle.getObject(name); localizedString = (String) table.get(key); } catch (MissingResourceException exception) { localizedString = null; } } /* Localize to English */ if (localizedString == null && checkEnglish) { try { table = (Hashtable) ResourceBundle.getBundle("gnu.java.locale.LocaleInformation", Locale.ENGLISH).getObject(name); localizedString= (String) table.get(key); } catch (MissingResourceException exception) { localizedString = null; } } /* Return unlocalized version */ if (localizedString == null && checkRoot) { try { table = (Hashtable) ResourceBundle.getBundle("gnu.java.locale.LocaleInformation", new Locale("","","")).getObject(name); localizedString= (String) table.get(key); } catch (MissingResourceException exception) { localizedString = null; } } /* Return original input string */ if (localizedString == null) { localizedString = key; } return localizedString; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/68a6301301378680519f2b146daec37812a1bc22/LocaleHelper.java/buggy/core/src/classpath/gnu/gnu/java/locale/LocaleHelper.java
table = (Hashtable) bundle.getObject(name); localizedString = (String) table.get(key);
localizedString = bundle.getString(property);
public static String getLocalizedString(Locale inLocale, String key, String name, boolean checkEnglish, boolean checkRoot) { String localizedString; Hashtable table; if (key.equals("")) return ""; /* Localize to inLocale */ try { table = (Hashtable) ResourceBundle.getBundle("gnu.java.locale.LocaleInformation", inLocale).getObject(name); localizedString = (String) table.get(key); } catch (MissingResourceException exception) { localizedString = null; } /* Localize to default locale */ if (localizedString == null) { try { ResourceBundle bundle; bundle = ResourceBundle.getBundle("gnu.java.locale.LocaleInformation"); table = (Hashtable) bundle.getObject(name); localizedString = (String) table.get(key); } catch (MissingResourceException exception) { localizedString = null; } } /* Localize to English */ if (localizedString == null && checkEnglish) { try { table = (Hashtable) ResourceBundle.getBundle("gnu.java.locale.LocaleInformation", Locale.ENGLISH).getObject(name); localizedString= (String) table.get(key); } catch (MissingResourceException exception) { localizedString = null; } } /* Return unlocalized version */ if (localizedString == null && checkRoot) { try { table = (Hashtable) ResourceBundle.getBundle("gnu.java.locale.LocaleInformation", new Locale("","","")).getObject(name); localizedString= (String) table.get(key); } catch (MissingResourceException exception) { localizedString = null; } } /* Return original input string */ if (localizedString == null) { localizedString = key; } return localizedString; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/68a6301301378680519f2b146daec37812a1bc22/LocaleHelper.java/buggy/core/src/classpath/gnu/gnu/java/locale/LocaleHelper.java
table = (Hashtable)
localizedString =
public static String getLocalizedString(Locale inLocale, String key, String name, boolean checkEnglish, boolean checkRoot) { String localizedString; Hashtable table; if (key.equals("")) return ""; /* Localize to inLocale */ try { table = (Hashtable) ResourceBundle.getBundle("gnu.java.locale.LocaleInformation", inLocale).getObject(name); localizedString = (String) table.get(key); } catch (MissingResourceException exception) { localizedString = null; } /* Localize to default locale */ if (localizedString == null) { try { ResourceBundle bundle; bundle = ResourceBundle.getBundle("gnu.java.locale.LocaleInformation"); table = (Hashtable) bundle.getObject(name); localizedString = (String) table.get(key); } catch (MissingResourceException exception) { localizedString = null; } } /* Localize to English */ if (localizedString == null && checkEnglish) { try { table = (Hashtable) ResourceBundle.getBundle("gnu.java.locale.LocaleInformation", Locale.ENGLISH).getObject(name); localizedString= (String) table.get(key); } catch (MissingResourceException exception) { localizedString = null; } } /* Return unlocalized version */ if (localizedString == null && checkRoot) { try { table = (Hashtable) ResourceBundle.getBundle("gnu.java.locale.LocaleInformation", new Locale("","","")).getObject(name); localizedString= (String) table.get(key); } catch (MissingResourceException exception) { localizedString = null; } } /* Return original input string */ if (localizedString == null) { localizedString = key; } return localizedString; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/68a6301301378680519f2b146daec37812a1bc22/LocaleHelper.java/buggy/core/src/classpath/gnu/gnu/java/locale/LocaleHelper.java
Locale.ENGLISH).getObject(name); localizedString= (String) table.get(key);
Locale.ENGLISH).getString(property);
public static String getLocalizedString(Locale inLocale, String key, String name, boolean checkEnglish, boolean checkRoot) { String localizedString; Hashtable table; if (key.equals("")) return ""; /* Localize to inLocale */ try { table = (Hashtable) ResourceBundle.getBundle("gnu.java.locale.LocaleInformation", inLocale).getObject(name); localizedString = (String) table.get(key); } catch (MissingResourceException exception) { localizedString = null; } /* Localize to default locale */ if (localizedString == null) { try { ResourceBundle bundle; bundle = ResourceBundle.getBundle("gnu.java.locale.LocaleInformation"); table = (Hashtable) bundle.getObject(name); localizedString = (String) table.get(key); } catch (MissingResourceException exception) { localizedString = null; } } /* Localize to English */ if (localizedString == null && checkEnglish) { try { table = (Hashtable) ResourceBundle.getBundle("gnu.java.locale.LocaleInformation", Locale.ENGLISH).getObject(name); localizedString= (String) table.get(key); } catch (MissingResourceException exception) { localizedString = null; } } /* Return unlocalized version */ if (localizedString == null && checkRoot) { try { table = (Hashtable) ResourceBundle.getBundle("gnu.java.locale.LocaleInformation", new Locale("","","")).getObject(name); localizedString= (String) table.get(key); } catch (MissingResourceException exception) { localizedString = null; } } /* Return original input string */ if (localizedString == null) { localizedString = key; } return localizedString; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/68a6301301378680519f2b146daec37812a1bc22/LocaleHelper.java/buggy/core/src/classpath/gnu/gnu/java/locale/LocaleHelper.java
table = (Hashtable)
localizedString =
public static String getLocalizedString(Locale inLocale, String key, String name, boolean checkEnglish, boolean checkRoot) { String localizedString; Hashtable table; if (key.equals("")) return ""; /* Localize to inLocale */ try { table = (Hashtable) ResourceBundle.getBundle("gnu.java.locale.LocaleInformation", inLocale).getObject(name); localizedString = (String) table.get(key); } catch (MissingResourceException exception) { localizedString = null; } /* Localize to default locale */ if (localizedString == null) { try { ResourceBundle bundle; bundle = ResourceBundle.getBundle("gnu.java.locale.LocaleInformation"); table = (Hashtable) bundle.getObject(name); localizedString = (String) table.get(key); } catch (MissingResourceException exception) { localizedString = null; } } /* Localize to English */ if (localizedString == null && checkEnglish) { try { table = (Hashtable) ResourceBundle.getBundle("gnu.java.locale.LocaleInformation", Locale.ENGLISH).getObject(name); localizedString= (String) table.get(key); } catch (MissingResourceException exception) { localizedString = null; } } /* Return unlocalized version */ if (localizedString == null && checkRoot) { try { table = (Hashtable) ResourceBundle.getBundle("gnu.java.locale.LocaleInformation", new Locale("","","")).getObject(name); localizedString= (String) table.get(key); } catch (MissingResourceException exception) { localizedString = null; } } /* Return original input string */ if (localizedString == null) { localizedString = key; } return localizedString; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/68a6301301378680519f2b146daec37812a1bc22/LocaleHelper.java/buggy/core/src/classpath/gnu/gnu/java/locale/LocaleHelper.java
new Locale("","","")).getObject(name); localizedString= (String) table.get(key);
new Locale("","","") ).getString(property);
public static String getLocalizedString(Locale inLocale, String key, String name, boolean checkEnglish, boolean checkRoot) { String localizedString; Hashtable table; if (key.equals("")) return ""; /* Localize to inLocale */ try { table = (Hashtable) ResourceBundle.getBundle("gnu.java.locale.LocaleInformation", inLocale).getObject(name); localizedString = (String) table.get(key); } catch (MissingResourceException exception) { localizedString = null; } /* Localize to default locale */ if (localizedString == null) { try { ResourceBundle bundle; bundle = ResourceBundle.getBundle("gnu.java.locale.LocaleInformation"); table = (Hashtable) bundle.getObject(name); localizedString = (String) table.get(key); } catch (MissingResourceException exception) { localizedString = null; } } /* Localize to English */ if (localizedString == null && checkEnglish) { try { table = (Hashtable) ResourceBundle.getBundle("gnu.java.locale.LocaleInformation", Locale.ENGLISH).getObject(name); localizedString= (String) table.get(key); } catch (MissingResourceException exception) { localizedString = null; } } /* Return unlocalized version */ if (localizedString == null && checkRoot) { try { table = (Hashtable) ResourceBundle.getBundle("gnu.java.locale.LocaleInformation", new Locale("","","")).getObject(name); localizedString= (String) table.get(key); } catch (MissingResourceException exception) { localizedString = null; } } /* Return original input string */ if (localizedString == null) { localizedString = key; } return localizedString; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/68a6301301378680519f2b146daec37812a1bc22/LocaleHelper.java/buggy/core/src/classpath/gnu/gnu/java/locale/LocaleHelper.java
Map.Entry e = (Map.Entry) it.next();
Map.Entry e = (Map.Entry) it2.next();
private void encodeDer() { ArrayList name = new ArrayList(components.size()); for (Iterator it = components.iterator(); it.hasNext(); ) { Map m = (Map) it.next(); if (m.isEmpty()) continue; Set rdn = new HashSet(); for (Iterator it2 = m.entrySet().iterator(); it2.hasNext(); ) { Map.Entry e = (Map.Entry) it.next(); ArrayList atav = new ArrayList(2); atav.add(new DERValue(DER.OBJECT_IDENTIFIER, e.getKey())); atav.add(new DERValue(DER.UTF8_STRING, e.getValue())); rdn.add(new DERValue(DER.SEQUENCE|DER.CONSTRUCTED, atav)); } name.add(new DERValue(DER.SET|DER.CONSTRUCTED, rdn)); } DERValue val = new DERValue(DER.SEQUENCE|DER.CONSTRUCTED, name); encoded = val.getEncoded(); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/f7b0a77266671350e38451a50ce054282a5860ef/X500Principal.java/clean/core/src/classpath/javax/javax/security/auth/x500/X500Principal.java
if (sep == -1) break;
private void parseString(String str) throws IOException { Reader in = new StringReader(str); while (true) { String key = readAttributeType(in); if (key == null) break; String value = readAttributeValue(in); putComponent(key, value); if (sep == ',') newRelativeDistinguishedName(); } }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/f7b0a77266671350e38451a50ce054282a5860ef/X500Principal.java/clean/core/src/classpath/javax/javax/security/auth/x500/X500Principal.java
throw new EOFException();
throw new EOFException("partial name read: " + buf);
private String readAttributeType(Reader in) throws IOException { StringBuffer buf = new StringBuffer(); int ch; while ((ch = in.read()) != '=') { if (ch == -1) { if (buf.length() > 0) throw new EOFException(); return null; } if (ch > 127) throw new IOException("Invalid char: " + (char) ch); if (Character.isLetterOrDigit((char) ch) || ch == '-' || ch == '.') buf.append((char) ch); else throw new IOException("Invalid char: " + (char) ch); } return buf.toString(); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/f7b0a77266671350e38451a50ce054282a5860ef/X500Principal.java/clean/core/src/classpath/javax/javax/security/auth/x500/X500Principal.java
throw new EOFException();
sep = -1; return buf.toString ();
private String readAttributeValue(Reader in) throws IOException { StringBuffer buf = new StringBuffer(); int ch = in.read(); if (ch == '#') { while (true) { ch = in.read(); if (('a' <= ch && ch <= 'f') || ('A' <= ch && ch <= 'F') || Character.isDigit((char) ch)) buf.append((char) ch); else if (ch == '+' || ch == ',') { sep = ch; String hex = buf.toString(); return new String(toByteArray(hex)); } else throw new IOException("illegal character: " + (char) ch); } } else if (ch == '"') { while (true) { ch = in.read(); if (ch == '"') break; else if (ch == '\\') { ch = in.read(); if (ch == -1) throw new EOFException(); if (('a' <= ch && ch <= 'f') || ('A' <= ch && ch <= 'F') || Character.isDigit((char) ch)) { int i = Character.digit((char) ch, 16) << 4; ch = in.read(); if (!(('a' <= ch && ch <= 'f') || ('A' <= ch && ch <= 'F') || Character.isDigit((char) ch))) throw new IOException("illegal hex char"); i |= Character.digit((char) ch, 16); buf.append((char) i); } else buf.append((char) ch); } else buf.append((char) ch); } sep = in.read(); if (sep != '+' || sep != ',') throw new IOException("illegal character: " + (char) ch); return buf.toString(); } else { while (true) { switch (ch) { case '+': case ',': sep = ch; return buf.toString(); case '\\': ch = in.read(); if (ch == -1) throw new EOFException(); if (('a' <= ch && ch <= 'f') || ('A' <= ch && ch <= 'F') || Character.isDigit((char) ch)) { int i = Character.digit((char) ch, 16) << 4; ch = in.read(); if (!(('a' <= ch && ch <= 'f') || ('A' <= ch && ch <= 'F') || Character.isDigit((char) ch))) throw new IOException("illegal hex char"); i |= Character.digit((char) ch, 16); buf.append((char) i); } else buf.append((char) ch); break; case '=': case '<': case '>': case '#': case ';': throw new IOException("illegal character: " + (char) ch); case -1: throw new EOFException(); default: buf.append((char) ch); } } } }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/f7b0a77266671350e38451a50ce054282a5860ef/X500Principal.java/clean/core/src/classpath/javax/javax/security/auth/x500/X500Principal.java
ch = in.read ();
private String readAttributeValue(Reader in) throws IOException { StringBuffer buf = new StringBuffer(); int ch = in.read(); if (ch == '#') { while (true) { ch = in.read(); if (('a' <= ch && ch <= 'f') || ('A' <= ch && ch <= 'F') || Character.isDigit((char) ch)) buf.append((char) ch); else if (ch == '+' || ch == ',') { sep = ch; String hex = buf.toString(); return new String(toByteArray(hex)); } else throw new IOException("illegal character: " + (char) ch); } } else if (ch == '"') { while (true) { ch = in.read(); if (ch == '"') break; else if (ch == '\\') { ch = in.read(); if (ch == -1) throw new EOFException(); if (('a' <= ch && ch <= 'f') || ('A' <= ch && ch <= 'F') || Character.isDigit((char) ch)) { int i = Character.digit((char) ch, 16) << 4; ch = in.read(); if (!(('a' <= ch && ch <= 'f') || ('A' <= ch && ch <= 'F') || Character.isDigit((char) ch))) throw new IOException("illegal hex char"); i |= Character.digit((char) ch, 16); buf.append((char) i); } else buf.append((char) ch); } else buf.append((char) ch); } sep = in.read(); if (sep != '+' || sep != ',') throw new IOException("illegal character: " + (char) ch); return buf.toString(); } else { while (true) { switch (ch) { case '+': case ',': sep = ch; return buf.toString(); case '\\': ch = in.read(); if (ch == -1) throw new EOFException(); if (('a' <= ch && ch <= 'f') || ('A' <= ch && ch <= 'F') || Character.isDigit((char) ch)) { int i = Character.digit((char) ch, 16) << 4; ch = in.read(); if (!(('a' <= ch && ch <= 'f') || ('A' <= ch && ch <= 'F') || Character.isDigit((char) ch))) throw new IOException("illegal hex char"); i |= Character.digit((char) ch, 16); buf.append((char) i); } else buf.append((char) ch); break; case '=': case '<': case '>': case '#': case ';': throw new IOException("illegal character: " + (char) ch); case -1: throw new EOFException(); default: buf.append((char) ch); } } } }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/f7b0a77266671350e38451a50ce054282a5860ef/X500Principal.java/clean/core/src/classpath/javax/javax/security/auth/x500/X500Principal.java
DTD getDTD() { return super.dtd; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/c4eda97e6e5feb8e7650d83d5066d85580f1249c/ParserDelegator.java/clean/core/src/classpath/javax/javax/swing/text/html/parser/ParserDelegator.java
public AccessibleJList() { }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/963ae61676e8c35a9e0998e0b7de1f942db82a26/JList.java/clean/core/src/classpath/javax/javax/swing/JList.java
return null;
return new AccessibleJList();
public AccessibleContext getAccessibleContext() { return null; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/963ae61676e8c35a9e0998e0b7de1f942db82a26/JList.java/clean/core/src/classpath/javax/javax/swing/JList.java
Object obj = filelist.getSelectedValue();
Object obj = new String(parentPath + entry.getText());
public void actionPerformed(ActionEvent e) { Object obj = filelist.getSelectedValue(); if (obj != null) { File f = filechooser.getFileSystemView().createFileObject(obj .toString()); if (filechooser.isTraversable(f) && filechooser.getFileSelectionMode() == JFileChooser.FILES_ONLY) filechooser.setCurrentDirectory(f); else { filechooser.setSelectedFile(f); filechooser.approveSelection(); closeDialog(); } } }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/045a5b41cdfa747889101d3993040acf89788bc4/BasicFileChooserUI.java/clean/core/src/classpath/javax/javax/swing/plaf/basic/BasicFileChooserUI.java
File f = filechooser.getFileSystemView().createFileObject(obj .toString()); if (filechooser.isTraversable(f) && filechooser.getFileSelectionMode() == JFileChooser.FILES_ONLY)
File f = filechooser.getFileSystemView().createFileObject( obj.toString()); if (filechooser.isTraversable(f) && filechooser.isDirectorySelectionEnabled())
public void actionPerformed(ActionEvent e) { Object obj = filelist.getSelectedValue(); if (obj != null) { File f = filechooser.getFileSystemView().createFileObject(obj .toString()); if (filechooser.isTraversable(f) && filechooser.getFileSelectionMode() == JFileChooser.FILES_ONLY) filechooser.setCurrentDirectory(f); else { filechooser.setSelectedFile(f); filechooser.approveSelection(); closeDialog(); } } }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/045a5b41cdfa747889101d3993040acf89788bc4/BasicFileChooserUI.java/clean/core/src/classpath/javax/javax/swing/plaf/basic/BasicFileChooserUI.java
File f = fsv.createFileObject(list.getSelectedValue().toString());
String path = list.getSelectedValue().toString(); File f = fsv.createFileObject(path);
public void mouseClicked(MouseEvent e) { if (list.getSelectedValue() == null) return; FileSystemView fsv = filechooser.getFileSystemView(); if (timer.isRunning() && list.getSelectedValue().toString().equals(lastSelected.toString())) { File f = fsv.createFileObject(lastSelected.toString()); timer.stop(); if (filechooser.isTraversable(f)) { filechooser.setCurrentDirectory(f); filechooser.rescanCurrentDirectory(); } else { filechooser.setSelectedFile(f); filechooser.approveSelection(); closeDialog(); } } else { File f = fsv.createFileObject(list.getSelectedValue().toString()); if (filechooser.isTraversable(f)) { setDirectorySelected(true); setDirectory(f); } else { setDirectorySelected(false); setDirectory(null); } lastSelected = list.getSelectedValue().toString(); timer.restart(); } }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/045a5b41cdfa747889101d3993040acf89788bc4/BasicFileChooserUI.java/clean/core/src/classpath/javax/javax/swing/plaf/basic/BasicFileChooserUI.java
lastSelected = list.getSelectedValue().toString();
lastSelected = path; parentPath = path.substring(0, path.lastIndexOf("/") + 1); entry.setText(path.substring(path.lastIndexOf("/") + 1));
public void mouseClicked(MouseEvent e) { if (list.getSelectedValue() == null) return; FileSystemView fsv = filechooser.getFileSystemView(); if (timer.isRunning() && list.getSelectedValue().toString().equals(lastSelected.toString())) { File f = fsv.createFileObject(lastSelected.toString()); timer.stop(); if (filechooser.isTraversable(f)) { filechooser.setCurrentDirectory(f); filechooser.rescanCurrentDirectory(); } else { filechooser.setSelectedFile(f); filechooser.approveSelection(); closeDialog(); } } else { File f = fsv.createFileObject(list.getSelectedValue().toString()); if (filechooser.isTraversable(f)) { setDirectorySelected(true); setDirectory(f); } else { setDirectorySelected(false); setDirectory(null); } lastSelected = list.getSelectedValue().toString(); timer.restart(); } }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/045a5b41cdfa747889101d3993040acf89788bc4/BasicFileChooserUI.java/clean/core/src/classpath/javax/javax/swing/plaf/basic/BasicFileChooserUI.java
if (e.getPropertyName().equals(JFileChooser.SELECTED_FILE_CHANGED_PROPERTY))
if (e.getPropertyName().equals( JFileChooser.SELECTED_FILE_CHANGED_PROPERTY))
public PropertyChangeListener createPropertyChangeListener(JFileChooser fc) { return new PropertyChangeListener() { public void propertyChange(PropertyChangeEvent e) { // FIXME: Multiple file selection waiting on JList multiple selection bug. if (e.getPropertyName().equals(JFileChooser.SELECTED_FILE_CHANGED_PROPERTY)) { if (filechooser.getSelectedFile() == null) setFileName(null); else setFileName(filechooser.getSelectedFile().toString()); int index = -1; File file = filechooser.getSelectedFile(); for (index = 0; index < model.getSize(); index++) if (((File) model.getElementAt(index)).equals(file)) break; if (index == -1) return; filelist.setSelectedIndex(index); filelist.ensureIndexIsVisible(index); filelist.revalidate(); filelist.repaint(); } else if (e.getPropertyName().equals(JFileChooser.DIRECTORY_CHANGED_PROPERTY)) { filelist.clearSelection(); filelist.revalidate(); filelist.repaint(); setDirectorySelected(false); setDirectory(filechooser.getCurrentDirectory()); boxEntries(); } else if (e.getPropertyName().equals(JFileChooser.CHOOSABLE_FILE_FILTER_CHANGED_PROPERTY) || e.getPropertyName().equals(JFileChooser.FILE_FILTER_CHANGED_PROPERTY)) filterEntries(); else if (e.getPropertyName().equals(JFileChooser.DIALOG_TYPE_CHANGED_PROPERTY) || e.getPropertyName().equals(JFileChooser.DIALOG_TITLE_CHANGED_PROPERTY)) { Window owner = SwingUtilities.windowForComponent(filechooser); if (owner instanceof JDialog) ((JDialog) owner).setTitle(getDialogTitle(filechooser)); accept.setText(getApproveButtonText(filechooser)); accept.setToolTipText(getApproveButtonToolTipText(filechooser)); accept.setMnemonic(getApproveButtonMnemonic(filechooser)); } else if (e.getPropertyName().equals(JFileChooser.APPROVE_BUTTON_TEXT_CHANGED_PROPERTY)) accept.setText(getApproveButtonText(filechooser)); else if (e.getPropertyName().equals(JFileChooser.APPROVE_BUTTON_TOOL_TIP_TEXT_CHANGED_PROPERTY)) accept.setToolTipText(getApproveButtonToolTipText(filechooser)); else if (e.getPropertyName().equals(JFileChooser.APPROVE_BUTTON_MNEMONIC_CHANGED_PROPERTY)) accept.setMnemonic(getApproveButtonMnemonic(filechooser)); else if (e.getPropertyName().equals(JFileChooser.CONTROL_BUTTONS_ARE_SHOWN_CHANGED_PROPERTY)) { if (filechooser.getControlButtonsAreShown()) { GridBagConstraints c = new GridBagConstraints(); c.gridy = 1; bottomPanel.add(filters, c); c.fill = GridBagConstraints.BOTH; c.gridy = 2; c.anchor = GridBagConstraints.EAST; bottomPanel.add(closePanel, c); bottomPanel.revalidate(); bottomPanel.repaint(); bottomPanel.doLayout(); } else bottomPanel.remove(closePanel); } else if (e.getPropertyName().equals(JFileChooser.ACCEPT_ALL_FILE_FILTER_USED_CHANGED_PROPERTY)) { if (filechooser.isAcceptAllFileFilterUsed()) filechooser.addChoosableFileFilter(getAcceptAllFileFilter(filechooser)); else filechooser.removeChoosableFileFilter(getAcceptAllFileFilter(filechooser)); } else if (e.getPropertyName().equals(JFileChooser.ACCESSORY_CHANGED_PROPERTY)) { JComponent old = (JComponent) e.getOldValue(); if (old != null) getAccessoryPanel().remove(old); JComponent newval = (JComponent) e.getNewValue(); if (newval != null) getAccessoryPanel().add(newval); } if (e.getPropertyName().equals(JFileChooser.DIRECTORY_CHANGED_PROPERTY) || e.getPropertyName().equals(JFileChooser.FILE_FILTER_CHANGED_PROPERTY) || e.getPropertyName().equals(JFileChooser.FILE_HIDING_CHANGED_PROPERTY)) rescanCurrentDirectory(filechooser); filechooser.revalidate(); filechooser.repaint(); } }; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/045a5b41cdfa747889101d3993040acf89788bc4/BasicFileChooserUI.java/clean/core/src/classpath/javax/javax/swing/plaf/basic/BasicFileChooserUI.java
else if (e.getPropertyName().equals(JFileChooser.DIRECTORY_CHANGED_PROPERTY))
else if (e.getPropertyName().equals( JFileChooser.DIRECTORY_CHANGED_PROPERTY))
public PropertyChangeListener createPropertyChangeListener(JFileChooser fc) { return new PropertyChangeListener() { public void propertyChange(PropertyChangeEvent e) { // FIXME: Multiple file selection waiting on JList multiple selection bug. if (e.getPropertyName().equals(JFileChooser.SELECTED_FILE_CHANGED_PROPERTY)) { if (filechooser.getSelectedFile() == null) setFileName(null); else setFileName(filechooser.getSelectedFile().toString()); int index = -1; File file = filechooser.getSelectedFile(); for (index = 0; index < model.getSize(); index++) if (((File) model.getElementAt(index)).equals(file)) break; if (index == -1) return; filelist.setSelectedIndex(index); filelist.ensureIndexIsVisible(index); filelist.revalidate(); filelist.repaint(); } else if (e.getPropertyName().equals(JFileChooser.DIRECTORY_CHANGED_PROPERTY)) { filelist.clearSelection(); filelist.revalidate(); filelist.repaint(); setDirectorySelected(false); setDirectory(filechooser.getCurrentDirectory()); boxEntries(); } else if (e.getPropertyName().equals(JFileChooser.CHOOSABLE_FILE_FILTER_CHANGED_PROPERTY) || e.getPropertyName().equals(JFileChooser.FILE_FILTER_CHANGED_PROPERTY)) filterEntries(); else if (e.getPropertyName().equals(JFileChooser.DIALOG_TYPE_CHANGED_PROPERTY) || e.getPropertyName().equals(JFileChooser.DIALOG_TITLE_CHANGED_PROPERTY)) { Window owner = SwingUtilities.windowForComponent(filechooser); if (owner instanceof JDialog) ((JDialog) owner).setTitle(getDialogTitle(filechooser)); accept.setText(getApproveButtonText(filechooser)); accept.setToolTipText(getApproveButtonToolTipText(filechooser)); accept.setMnemonic(getApproveButtonMnemonic(filechooser)); } else if (e.getPropertyName().equals(JFileChooser.APPROVE_BUTTON_TEXT_CHANGED_PROPERTY)) accept.setText(getApproveButtonText(filechooser)); else if (e.getPropertyName().equals(JFileChooser.APPROVE_BUTTON_TOOL_TIP_TEXT_CHANGED_PROPERTY)) accept.setToolTipText(getApproveButtonToolTipText(filechooser)); else if (e.getPropertyName().equals(JFileChooser.APPROVE_BUTTON_MNEMONIC_CHANGED_PROPERTY)) accept.setMnemonic(getApproveButtonMnemonic(filechooser)); else if (e.getPropertyName().equals(JFileChooser.CONTROL_BUTTONS_ARE_SHOWN_CHANGED_PROPERTY)) { if (filechooser.getControlButtonsAreShown()) { GridBagConstraints c = new GridBagConstraints(); c.gridy = 1; bottomPanel.add(filters, c); c.fill = GridBagConstraints.BOTH; c.gridy = 2; c.anchor = GridBagConstraints.EAST; bottomPanel.add(closePanel, c); bottomPanel.revalidate(); bottomPanel.repaint(); bottomPanel.doLayout(); } else bottomPanel.remove(closePanel); } else if (e.getPropertyName().equals(JFileChooser.ACCEPT_ALL_FILE_FILTER_USED_CHANGED_PROPERTY)) { if (filechooser.isAcceptAllFileFilterUsed()) filechooser.addChoosableFileFilter(getAcceptAllFileFilter(filechooser)); else filechooser.removeChoosableFileFilter(getAcceptAllFileFilter(filechooser)); } else if (e.getPropertyName().equals(JFileChooser.ACCESSORY_CHANGED_PROPERTY)) { JComponent old = (JComponent) e.getOldValue(); if (old != null) getAccessoryPanel().remove(old); JComponent newval = (JComponent) e.getNewValue(); if (newval != null) getAccessoryPanel().add(newval); } if (e.getPropertyName().equals(JFileChooser.DIRECTORY_CHANGED_PROPERTY) || e.getPropertyName().equals(JFileChooser.FILE_FILTER_CHANGED_PROPERTY) || e.getPropertyName().equals(JFileChooser.FILE_HIDING_CHANGED_PROPERTY)) rescanCurrentDirectory(filechooser); filechooser.revalidate(); filechooser.repaint(); } }; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/045a5b41cdfa747889101d3993040acf89788bc4/BasicFileChooserUI.java/clean/core/src/classpath/javax/javax/swing/plaf/basic/BasicFileChooserUI.java
else if (e.getPropertyName().equals(JFileChooser.CHOOSABLE_FILE_FILTER_CHANGED_PROPERTY) || e.getPropertyName().equals(JFileChooser.FILE_FILTER_CHANGED_PROPERTY))
else if (e.getPropertyName().equals( JFileChooser.CHOOSABLE_FILE_FILTER_CHANGED_PROPERTY) || e.getPropertyName().equals( JFileChooser.FILE_FILTER_CHANGED_PROPERTY))
public PropertyChangeListener createPropertyChangeListener(JFileChooser fc) { return new PropertyChangeListener() { public void propertyChange(PropertyChangeEvent e) { // FIXME: Multiple file selection waiting on JList multiple selection bug. if (e.getPropertyName().equals(JFileChooser.SELECTED_FILE_CHANGED_PROPERTY)) { if (filechooser.getSelectedFile() == null) setFileName(null); else setFileName(filechooser.getSelectedFile().toString()); int index = -1; File file = filechooser.getSelectedFile(); for (index = 0; index < model.getSize(); index++) if (((File) model.getElementAt(index)).equals(file)) break; if (index == -1) return; filelist.setSelectedIndex(index); filelist.ensureIndexIsVisible(index); filelist.revalidate(); filelist.repaint(); } else if (e.getPropertyName().equals(JFileChooser.DIRECTORY_CHANGED_PROPERTY)) { filelist.clearSelection(); filelist.revalidate(); filelist.repaint(); setDirectorySelected(false); setDirectory(filechooser.getCurrentDirectory()); boxEntries(); } else if (e.getPropertyName().equals(JFileChooser.CHOOSABLE_FILE_FILTER_CHANGED_PROPERTY) || e.getPropertyName().equals(JFileChooser.FILE_FILTER_CHANGED_PROPERTY)) filterEntries(); else if (e.getPropertyName().equals(JFileChooser.DIALOG_TYPE_CHANGED_PROPERTY) || e.getPropertyName().equals(JFileChooser.DIALOG_TITLE_CHANGED_PROPERTY)) { Window owner = SwingUtilities.windowForComponent(filechooser); if (owner instanceof JDialog) ((JDialog) owner).setTitle(getDialogTitle(filechooser)); accept.setText(getApproveButtonText(filechooser)); accept.setToolTipText(getApproveButtonToolTipText(filechooser)); accept.setMnemonic(getApproveButtonMnemonic(filechooser)); } else if (e.getPropertyName().equals(JFileChooser.APPROVE_BUTTON_TEXT_CHANGED_PROPERTY)) accept.setText(getApproveButtonText(filechooser)); else if (e.getPropertyName().equals(JFileChooser.APPROVE_BUTTON_TOOL_TIP_TEXT_CHANGED_PROPERTY)) accept.setToolTipText(getApproveButtonToolTipText(filechooser)); else if (e.getPropertyName().equals(JFileChooser.APPROVE_BUTTON_MNEMONIC_CHANGED_PROPERTY)) accept.setMnemonic(getApproveButtonMnemonic(filechooser)); else if (e.getPropertyName().equals(JFileChooser.CONTROL_BUTTONS_ARE_SHOWN_CHANGED_PROPERTY)) { if (filechooser.getControlButtonsAreShown()) { GridBagConstraints c = new GridBagConstraints(); c.gridy = 1; bottomPanel.add(filters, c); c.fill = GridBagConstraints.BOTH; c.gridy = 2; c.anchor = GridBagConstraints.EAST; bottomPanel.add(closePanel, c); bottomPanel.revalidate(); bottomPanel.repaint(); bottomPanel.doLayout(); } else bottomPanel.remove(closePanel); } else if (e.getPropertyName().equals(JFileChooser.ACCEPT_ALL_FILE_FILTER_USED_CHANGED_PROPERTY)) { if (filechooser.isAcceptAllFileFilterUsed()) filechooser.addChoosableFileFilter(getAcceptAllFileFilter(filechooser)); else filechooser.removeChoosableFileFilter(getAcceptAllFileFilter(filechooser)); } else if (e.getPropertyName().equals(JFileChooser.ACCESSORY_CHANGED_PROPERTY)) { JComponent old = (JComponent) e.getOldValue(); if (old != null) getAccessoryPanel().remove(old); JComponent newval = (JComponent) e.getNewValue(); if (newval != null) getAccessoryPanel().add(newval); } if (e.getPropertyName().equals(JFileChooser.DIRECTORY_CHANGED_PROPERTY) || e.getPropertyName().equals(JFileChooser.FILE_FILTER_CHANGED_PROPERTY) || e.getPropertyName().equals(JFileChooser.FILE_HIDING_CHANGED_PROPERTY)) rescanCurrentDirectory(filechooser); filechooser.revalidate(); filechooser.repaint(); } }; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/045a5b41cdfa747889101d3993040acf89788bc4/BasicFileChooserUI.java/clean/core/src/classpath/javax/javax/swing/plaf/basic/BasicFileChooserUI.java
else if (e.getPropertyName().equals(JFileChooser.DIALOG_TYPE_CHANGED_PROPERTY) || e.getPropertyName().equals(JFileChooser.DIALOG_TITLE_CHANGED_PROPERTY))
else if (e.getPropertyName().equals( JFileChooser.DIALOG_TYPE_CHANGED_PROPERTY) || e.getPropertyName().equals( JFileChooser.DIALOG_TITLE_CHANGED_PROPERTY))
public PropertyChangeListener createPropertyChangeListener(JFileChooser fc) { return new PropertyChangeListener() { public void propertyChange(PropertyChangeEvent e) { // FIXME: Multiple file selection waiting on JList multiple selection bug. if (e.getPropertyName().equals(JFileChooser.SELECTED_FILE_CHANGED_PROPERTY)) { if (filechooser.getSelectedFile() == null) setFileName(null); else setFileName(filechooser.getSelectedFile().toString()); int index = -1; File file = filechooser.getSelectedFile(); for (index = 0; index < model.getSize(); index++) if (((File) model.getElementAt(index)).equals(file)) break; if (index == -1) return; filelist.setSelectedIndex(index); filelist.ensureIndexIsVisible(index); filelist.revalidate(); filelist.repaint(); } else if (e.getPropertyName().equals(JFileChooser.DIRECTORY_CHANGED_PROPERTY)) { filelist.clearSelection(); filelist.revalidate(); filelist.repaint(); setDirectorySelected(false); setDirectory(filechooser.getCurrentDirectory()); boxEntries(); } else if (e.getPropertyName().equals(JFileChooser.CHOOSABLE_FILE_FILTER_CHANGED_PROPERTY) || e.getPropertyName().equals(JFileChooser.FILE_FILTER_CHANGED_PROPERTY)) filterEntries(); else if (e.getPropertyName().equals(JFileChooser.DIALOG_TYPE_CHANGED_PROPERTY) || e.getPropertyName().equals(JFileChooser.DIALOG_TITLE_CHANGED_PROPERTY)) { Window owner = SwingUtilities.windowForComponent(filechooser); if (owner instanceof JDialog) ((JDialog) owner).setTitle(getDialogTitle(filechooser)); accept.setText(getApproveButtonText(filechooser)); accept.setToolTipText(getApproveButtonToolTipText(filechooser)); accept.setMnemonic(getApproveButtonMnemonic(filechooser)); } else if (e.getPropertyName().equals(JFileChooser.APPROVE_BUTTON_TEXT_CHANGED_PROPERTY)) accept.setText(getApproveButtonText(filechooser)); else if (e.getPropertyName().equals(JFileChooser.APPROVE_BUTTON_TOOL_TIP_TEXT_CHANGED_PROPERTY)) accept.setToolTipText(getApproveButtonToolTipText(filechooser)); else if (e.getPropertyName().equals(JFileChooser.APPROVE_BUTTON_MNEMONIC_CHANGED_PROPERTY)) accept.setMnemonic(getApproveButtonMnemonic(filechooser)); else if (e.getPropertyName().equals(JFileChooser.CONTROL_BUTTONS_ARE_SHOWN_CHANGED_PROPERTY)) { if (filechooser.getControlButtonsAreShown()) { GridBagConstraints c = new GridBagConstraints(); c.gridy = 1; bottomPanel.add(filters, c); c.fill = GridBagConstraints.BOTH; c.gridy = 2; c.anchor = GridBagConstraints.EAST; bottomPanel.add(closePanel, c); bottomPanel.revalidate(); bottomPanel.repaint(); bottomPanel.doLayout(); } else bottomPanel.remove(closePanel); } else if (e.getPropertyName().equals(JFileChooser.ACCEPT_ALL_FILE_FILTER_USED_CHANGED_PROPERTY)) { if (filechooser.isAcceptAllFileFilterUsed()) filechooser.addChoosableFileFilter(getAcceptAllFileFilter(filechooser)); else filechooser.removeChoosableFileFilter(getAcceptAllFileFilter(filechooser)); } else if (e.getPropertyName().equals(JFileChooser.ACCESSORY_CHANGED_PROPERTY)) { JComponent old = (JComponent) e.getOldValue(); if (old != null) getAccessoryPanel().remove(old); JComponent newval = (JComponent) e.getNewValue(); if (newval != null) getAccessoryPanel().add(newval); } if (e.getPropertyName().equals(JFileChooser.DIRECTORY_CHANGED_PROPERTY) || e.getPropertyName().equals(JFileChooser.FILE_FILTER_CHANGED_PROPERTY) || e.getPropertyName().equals(JFileChooser.FILE_HIDING_CHANGED_PROPERTY)) rescanCurrentDirectory(filechooser); filechooser.revalidate(); filechooser.repaint(); } }; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/045a5b41cdfa747889101d3993040acf89788bc4/BasicFileChooserUI.java/clean/core/src/classpath/javax/javax/swing/plaf/basic/BasicFileChooserUI.java
else if (e.getPropertyName().equals(JFileChooser.APPROVE_BUTTON_TEXT_CHANGED_PROPERTY))
else if (e.getPropertyName().equals( JFileChooser.APPROVE_BUTTON_TEXT_CHANGED_PROPERTY))
public PropertyChangeListener createPropertyChangeListener(JFileChooser fc) { return new PropertyChangeListener() { public void propertyChange(PropertyChangeEvent e) { // FIXME: Multiple file selection waiting on JList multiple selection bug. if (e.getPropertyName().equals(JFileChooser.SELECTED_FILE_CHANGED_PROPERTY)) { if (filechooser.getSelectedFile() == null) setFileName(null); else setFileName(filechooser.getSelectedFile().toString()); int index = -1; File file = filechooser.getSelectedFile(); for (index = 0; index < model.getSize(); index++) if (((File) model.getElementAt(index)).equals(file)) break; if (index == -1) return; filelist.setSelectedIndex(index); filelist.ensureIndexIsVisible(index); filelist.revalidate(); filelist.repaint(); } else if (e.getPropertyName().equals(JFileChooser.DIRECTORY_CHANGED_PROPERTY)) { filelist.clearSelection(); filelist.revalidate(); filelist.repaint(); setDirectorySelected(false); setDirectory(filechooser.getCurrentDirectory()); boxEntries(); } else if (e.getPropertyName().equals(JFileChooser.CHOOSABLE_FILE_FILTER_CHANGED_PROPERTY) || e.getPropertyName().equals(JFileChooser.FILE_FILTER_CHANGED_PROPERTY)) filterEntries(); else if (e.getPropertyName().equals(JFileChooser.DIALOG_TYPE_CHANGED_PROPERTY) || e.getPropertyName().equals(JFileChooser.DIALOG_TITLE_CHANGED_PROPERTY)) { Window owner = SwingUtilities.windowForComponent(filechooser); if (owner instanceof JDialog) ((JDialog) owner).setTitle(getDialogTitle(filechooser)); accept.setText(getApproveButtonText(filechooser)); accept.setToolTipText(getApproveButtonToolTipText(filechooser)); accept.setMnemonic(getApproveButtonMnemonic(filechooser)); } else if (e.getPropertyName().equals(JFileChooser.APPROVE_BUTTON_TEXT_CHANGED_PROPERTY)) accept.setText(getApproveButtonText(filechooser)); else if (e.getPropertyName().equals(JFileChooser.APPROVE_BUTTON_TOOL_TIP_TEXT_CHANGED_PROPERTY)) accept.setToolTipText(getApproveButtonToolTipText(filechooser)); else if (e.getPropertyName().equals(JFileChooser.APPROVE_BUTTON_MNEMONIC_CHANGED_PROPERTY)) accept.setMnemonic(getApproveButtonMnemonic(filechooser)); else if (e.getPropertyName().equals(JFileChooser.CONTROL_BUTTONS_ARE_SHOWN_CHANGED_PROPERTY)) { if (filechooser.getControlButtonsAreShown()) { GridBagConstraints c = new GridBagConstraints(); c.gridy = 1; bottomPanel.add(filters, c); c.fill = GridBagConstraints.BOTH; c.gridy = 2; c.anchor = GridBagConstraints.EAST; bottomPanel.add(closePanel, c); bottomPanel.revalidate(); bottomPanel.repaint(); bottomPanel.doLayout(); } else bottomPanel.remove(closePanel); } else if (e.getPropertyName().equals(JFileChooser.ACCEPT_ALL_FILE_FILTER_USED_CHANGED_PROPERTY)) { if (filechooser.isAcceptAllFileFilterUsed()) filechooser.addChoosableFileFilter(getAcceptAllFileFilter(filechooser)); else filechooser.removeChoosableFileFilter(getAcceptAllFileFilter(filechooser)); } else if (e.getPropertyName().equals(JFileChooser.ACCESSORY_CHANGED_PROPERTY)) { JComponent old = (JComponent) e.getOldValue(); if (old != null) getAccessoryPanel().remove(old); JComponent newval = (JComponent) e.getNewValue(); if (newval != null) getAccessoryPanel().add(newval); } if (e.getPropertyName().equals(JFileChooser.DIRECTORY_CHANGED_PROPERTY) || e.getPropertyName().equals(JFileChooser.FILE_FILTER_CHANGED_PROPERTY) || e.getPropertyName().equals(JFileChooser.FILE_HIDING_CHANGED_PROPERTY)) rescanCurrentDirectory(filechooser); filechooser.revalidate(); filechooser.repaint(); } }; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/045a5b41cdfa747889101d3993040acf89788bc4/BasicFileChooserUI.java/clean/core/src/classpath/javax/javax/swing/plaf/basic/BasicFileChooserUI.java
else if (e.getPropertyName().equals(JFileChooser.APPROVE_BUTTON_TOOL_TIP_TEXT_CHANGED_PROPERTY))
else if (e.getPropertyName().equals( JFileChooser.APPROVE_BUTTON_TOOL_TIP_TEXT_CHANGED_PROPERTY))
public PropertyChangeListener createPropertyChangeListener(JFileChooser fc) { return new PropertyChangeListener() { public void propertyChange(PropertyChangeEvent e) { // FIXME: Multiple file selection waiting on JList multiple selection bug. if (e.getPropertyName().equals(JFileChooser.SELECTED_FILE_CHANGED_PROPERTY)) { if (filechooser.getSelectedFile() == null) setFileName(null); else setFileName(filechooser.getSelectedFile().toString()); int index = -1; File file = filechooser.getSelectedFile(); for (index = 0; index < model.getSize(); index++) if (((File) model.getElementAt(index)).equals(file)) break; if (index == -1) return; filelist.setSelectedIndex(index); filelist.ensureIndexIsVisible(index); filelist.revalidate(); filelist.repaint(); } else if (e.getPropertyName().equals(JFileChooser.DIRECTORY_CHANGED_PROPERTY)) { filelist.clearSelection(); filelist.revalidate(); filelist.repaint(); setDirectorySelected(false); setDirectory(filechooser.getCurrentDirectory()); boxEntries(); } else if (e.getPropertyName().equals(JFileChooser.CHOOSABLE_FILE_FILTER_CHANGED_PROPERTY) || e.getPropertyName().equals(JFileChooser.FILE_FILTER_CHANGED_PROPERTY)) filterEntries(); else if (e.getPropertyName().equals(JFileChooser.DIALOG_TYPE_CHANGED_PROPERTY) || e.getPropertyName().equals(JFileChooser.DIALOG_TITLE_CHANGED_PROPERTY)) { Window owner = SwingUtilities.windowForComponent(filechooser); if (owner instanceof JDialog) ((JDialog) owner).setTitle(getDialogTitle(filechooser)); accept.setText(getApproveButtonText(filechooser)); accept.setToolTipText(getApproveButtonToolTipText(filechooser)); accept.setMnemonic(getApproveButtonMnemonic(filechooser)); } else if (e.getPropertyName().equals(JFileChooser.APPROVE_BUTTON_TEXT_CHANGED_PROPERTY)) accept.setText(getApproveButtonText(filechooser)); else if (e.getPropertyName().equals(JFileChooser.APPROVE_BUTTON_TOOL_TIP_TEXT_CHANGED_PROPERTY)) accept.setToolTipText(getApproveButtonToolTipText(filechooser)); else if (e.getPropertyName().equals(JFileChooser.APPROVE_BUTTON_MNEMONIC_CHANGED_PROPERTY)) accept.setMnemonic(getApproveButtonMnemonic(filechooser)); else if (e.getPropertyName().equals(JFileChooser.CONTROL_BUTTONS_ARE_SHOWN_CHANGED_PROPERTY)) { if (filechooser.getControlButtonsAreShown()) { GridBagConstraints c = new GridBagConstraints(); c.gridy = 1; bottomPanel.add(filters, c); c.fill = GridBagConstraints.BOTH; c.gridy = 2; c.anchor = GridBagConstraints.EAST; bottomPanel.add(closePanel, c); bottomPanel.revalidate(); bottomPanel.repaint(); bottomPanel.doLayout(); } else bottomPanel.remove(closePanel); } else if (e.getPropertyName().equals(JFileChooser.ACCEPT_ALL_FILE_FILTER_USED_CHANGED_PROPERTY)) { if (filechooser.isAcceptAllFileFilterUsed()) filechooser.addChoosableFileFilter(getAcceptAllFileFilter(filechooser)); else filechooser.removeChoosableFileFilter(getAcceptAllFileFilter(filechooser)); } else if (e.getPropertyName().equals(JFileChooser.ACCESSORY_CHANGED_PROPERTY)) { JComponent old = (JComponent) e.getOldValue(); if (old != null) getAccessoryPanel().remove(old); JComponent newval = (JComponent) e.getNewValue(); if (newval != null) getAccessoryPanel().add(newval); } if (e.getPropertyName().equals(JFileChooser.DIRECTORY_CHANGED_PROPERTY) || e.getPropertyName().equals(JFileChooser.FILE_FILTER_CHANGED_PROPERTY) || e.getPropertyName().equals(JFileChooser.FILE_HIDING_CHANGED_PROPERTY)) rescanCurrentDirectory(filechooser); filechooser.revalidate(); filechooser.repaint(); } }; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/045a5b41cdfa747889101d3993040acf89788bc4/BasicFileChooserUI.java/clean/core/src/classpath/javax/javax/swing/plaf/basic/BasicFileChooserUI.java
else if (e.getPropertyName().equals(JFileChooser.APPROVE_BUTTON_MNEMONIC_CHANGED_PROPERTY))
else if (e.getPropertyName().equals( JFileChooser.APPROVE_BUTTON_MNEMONIC_CHANGED_PROPERTY))
public PropertyChangeListener createPropertyChangeListener(JFileChooser fc) { return new PropertyChangeListener() { public void propertyChange(PropertyChangeEvent e) { // FIXME: Multiple file selection waiting on JList multiple selection bug. if (e.getPropertyName().equals(JFileChooser.SELECTED_FILE_CHANGED_PROPERTY)) { if (filechooser.getSelectedFile() == null) setFileName(null); else setFileName(filechooser.getSelectedFile().toString()); int index = -1; File file = filechooser.getSelectedFile(); for (index = 0; index < model.getSize(); index++) if (((File) model.getElementAt(index)).equals(file)) break; if (index == -1) return; filelist.setSelectedIndex(index); filelist.ensureIndexIsVisible(index); filelist.revalidate(); filelist.repaint(); } else if (e.getPropertyName().equals(JFileChooser.DIRECTORY_CHANGED_PROPERTY)) { filelist.clearSelection(); filelist.revalidate(); filelist.repaint(); setDirectorySelected(false); setDirectory(filechooser.getCurrentDirectory()); boxEntries(); } else if (e.getPropertyName().equals(JFileChooser.CHOOSABLE_FILE_FILTER_CHANGED_PROPERTY) || e.getPropertyName().equals(JFileChooser.FILE_FILTER_CHANGED_PROPERTY)) filterEntries(); else if (e.getPropertyName().equals(JFileChooser.DIALOG_TYPE_CHANGED_PROPERTY) || e.getPropertyName().equals(JFileChooser.DIALOG_TITLE_CHANGED_PROPERTY)) { Window owner = SwingUtilities.windowForComponent(filechooser); if (owner instanceof JDialog) ((JDialog) owner).setTitle(getDialogTitle(filechooser)); accept.setText(getApproveButtonText(filechooser)); accept.setToolTipText(getApproveButtonToolTipText(filechooser)); accept.setMnemonic(getApproveButtonMnemonic(filechooser)); } else if (e.getPropertyName().equals(JFileChooser.APPROVE_BUTTON_TEXT_CHANGED_PROPERTY)) accept.setText(getApproveButtonText(filechooser)); else if (e.getPropertyName().equals(JFileChooser.APPROVE_BUTTON_TOOL_TIP_TEXT_CHANGED_PROPERTY)) accept.setToolTipText(getApproveButtonToolTipText(filechooser)); else if (e.getPropertyName().equals(JFileChooser.APPROVE_BUTTON_MNEMONIC_CHANGED_PROPERTY)) accept.setMnemonic(getApproveButtonMnemonic(filechooser)); else if (e.getPropertyName().equals(JFileChooser.CONTROL_BUTTONS_ARE_SHOWN_CHANGED_PROPERTY)) { if (filechooser.getControlButtonsAreShown()) { GridBagConstraints c = new GridBagConstraints(); c.gridy = 1; bottomPanel.add(filters, c); c.fill = GridBagConstraints.BOTH; c.gridy = 2; c.anchor = GridBagConstraints.EAST; bottomPanel.add(closePanel, c); bottomPanel.revalidate(); bottomPanel.repaint(); bottomPanel.doLayout(); } else bottomPanel.remove(closePanel); } else if (e.getPropertyName().equals(JFileChooser.ACCEPT_ALL_FILE_FILTER_USED_CHANGED_PROPERTY)) { if (filechooser.isAcceptAllFileFilterUsed()) filechooser.addChoosableFileFilter(getAcceptAllFileFilter(filechooser)); else filechooser.removeChoosableFileFilter(getAcceptAllFileFilter(filechooser)); } else if (e.getPropertyName().equals(JFileChooser.ACCESSORY_CHANGED_PROPERTY)) { JComponent old = (JComponent) e.getOldValue(); if (old != null) getAccessoryPanel().remove(old); JComponent newval = (JComponent) e.getNewValue(); if (newval != null) getAccessoryPanel().add(newval); } if (e.getPropertyName().equals(JFileChooser.DIRECTORY_CHANGED_PROPERTY) || e.getPropertyName().equals(JFileChooser.FILE_FILTER_CHANGED_PROPERTY) || e.getPropertyName().equals(JFileChooser.FILE_HIDING_CHANGED_PROPERTY)) rescanCurrentDirectory(filechooser); filechooser.revalidate(); filechooser.repaint(); } }; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/045a5b41cdfa747889101d3993040acf89788bc4/BasicFileChooserUI.java/clean/core/src/classpath/javax/javax/swing/plaf/basic/BasicFileChooserUI.java
else if (e.getPropertyName().equals(JFileChooser.CONTROL_BUTTONS_ARE_SHOWN_CHANGED_PROPERTY))
else if (e.getPropertyName().equals( JFileChooser.CONTROL_BUTTONS_ARE_SHOWN_CHANGED_PROPERTY))
public PropertyChangeListener createPropertyChangeListener(JFileChooser fc) { return new PropertyChangeListener() { public void propertyChange(PropertyChangeEvent e) { // FIXME: Multiple file selection waiting on JList multiple selection bug. if (e.getPropertyName().equals(JFileChooser.SELECTED_FILE_CHANGED_PROPERTY)) { if (filechooser.getSelectedFile() == null) setFileName(null); else setFileName(filechooser.getSelectedFile().toString()); int index = -1; File file = filechooser.getSelectedFile(); for (index = 0; index < model.getSize(); index++) if (((File) model.getElementAt(index)).equals(file)) break; if (index == -1) return; filelist.setSelectedIndex(index); filelist.ensureIndexIsVisible(index); filelist.revalidate(); filelist.repaint(); } else if (e.getPropertyName().equals(JFileChooser.DIRECTORY_CHANGED_PROPERTY)) { filelist.clearSelection(); filelist.revalidate(); filelist.repaint(); setDirectorySelected(false); setDirectory(filechooser.getCurrentDirectory()); boxEntries(); } else if (e.getPropertyName().equals(JFileChooser.CHOOSABLE_FILE_FILTER_CHANGED_PROPERTY) || e.getPropertyName().equals(JFileChooser.FILE_FILTER_CHANGED_PROPERTY)) filterEntries(); else if (e.getPropertyName().equals(JFileChooser.DIALOG_TYPE_CHANGED_PROPERTY) || e.getPropertyName().equals(JFileChooser.DIALOG_TITLE_CHANGED_PROPERTY)) { Window owner = SwingUtilities.windowForComponent(filechooser); if (owner instanceof JDialog) ((JDialog) owner).setTitle(getDialogTitle(filechooser)); accept.setText(getApproveButtonText(filechooser)); accept.setToolTipText(getApproveButtonToolTipText(filechooser)); accept.setMnemonic(getApproveButtonMnemonic(filechooser)); } else if (e.getPropertyName().equals(JFileChooser.APPROVE_BUTTON_TEXT_CHANGED_PROPERTY)) accept.setText(getApproveButtonText(filechooser)); else if (e.getPropertyName().equals(JFileChooser.APPROVE_BUTTON_TOOL_TIP_TEXT_CHANGED_PROPERTY)) accept.setToolTipText(getApproveButtonToolTipText(filechooser)); else if (e.getPropertyName().equals(JFileChooser.APPROVE_BUTTON_MNEMONIC_CHANGED_PROPERTY)) accept.setMnemonic(getApproveButtonMnemonic(filechooser)); else if (e.getPropertyName().equals(JFileChooser.CONTROL_BUTTONS_ARE_SHOWN_CHANGED_PROPERTY)) { if (filechooser.getControlButtonsAreShown()) { GridBagConstraints c = new GridBagConstraints(); c.gridy = 1; bottomPanel.add(filters, c); c.fill = GridBagConstraints.BOTH; c.gridy = 2; c.anchor = GridBagConstraints.EAST; bottomPanel.add(closePanel, c); bottomPanel.revalidate(); bottomPanel.repaint(); bottomPanel.doLayout(); } else bottomPanel.remove(closePanel); } else if (e.getPropertyName().equals(JFileChooser.ACCEPT_ALL_FILE_FILTER_USED_CHANGED_PROPERTY)) { if (filechooser.isAcceptAllFileFilterUsed()) filechooser.addChoosableFileFilter(getAcceptAllFileFilter(filechooser)); else filechooser.removeChoosableFileFilter(getAcceptAllFileFilter(filechooser)); } else if (e.getPropertyName().equals(JFileChooser.ACCESSORY_CHANGED_PROPERTY)) { JComponent old = (JComponent) e.getOldValue(); if (old != null) getAccessoryPanel().remove(old); JComponent newval = (JComponent) e.getNewValue(); if (newval != null) getAccessoryPanel().add(newval); } if (e.getPropertyName().equals(JFileChooser.DIRECTORY_CHANGED_PROPERTY) || e.getPropertyName().equals(JFileChooser.FILE_FILTER_CHANGED_PROPERTY) || e.getPropertyName().equals(JFileChooser.FILE_HIDING_CHANGED_PROPERTY)) rescanCurrentDirectory(filechooser); filechooser.revalidate(); filechooser.repaint(); } }; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/045a5b41cdfa747889101d3993040acf89788bc4/BasicFileChooserUI.java/clean/core/src/classpath/javax/javax/swing/plaf/basic/BasicFileChooserUI.java
else if (e.getPropertyName().equals(JFileChooser.ACCEPT_ALL_FILE_FILTER_USED_CHANGED_PROPERTY))
else if (e.getPropertyName().equals( JFileChooser.ACCEPT_ALL_FILE_FILTER_USED_CHANGED_PROPERTY))
public PropertyChangeListener createPropertyChangeListener(JFileChooser fc) { return new PropertyChangeListener() { public void propertyChange(PropertyChangeEvent e) { // FIXME: Multiple file selection waiting on JList multiple selection bug. if (e.getPropertyName().equals(JFileChooser.SELECTED_FILE_CHANGED_PROPERTY)) { if (filechooser.getSelectedFile() == null) setFileName(null); else setFileName(filechooser.getSelectedFile().toString()); int index = -1; File file = filechooser.getSelectedFile(); for (index = 0; index < model.getSize(); index++) if (((File) model.getElementAt(index)).equals(file)) break; if (index == -1) return; filelist.setSelectedIndex(index); filelist.ensureIndexIsVisible(index); filelist.revalidate(); filelist.repaint(); } else if (e.getPropertyName().equals(JFileChooser.DIRECTORY_CHANGED_PROPERTY)) { filelist.clearSelection(); filelist.revalidate(); filelist.repaint(); setDirectorySelected(false); setDirectory(filechooser.getCurrentDirectory()); boxEntries(); } else if (e.getPropertyName().equals(JFileChooser.CHOOSABLE_FILE_FILTER_CHANGED_PROPERTY) || e.getPropertyName().equals(JFileChooser.FILE_FILTER_CHANGED_PROPERTY)) filterEntries(); else if (e.getPropertyName().equals(JFileChooser.DIALOG_TYPE_CHANGED_PROPERTY) || e.getPropertyName().equals(JFileChooser.DIALOG_TITLE_CHANGED_PROPERTY)) { Window owner = SwingUtilities.windowForComponent(filechooser); if (owner instanceof JDialog) ((JDialog) owner).setTitle(getDialogTitle(filechooser)); accept.setText(getApproveButtonText(filechooser)); accept.setToolTipText(getApproveButtonToolTipText(filechooser)); accept.setMnemonic(getApproveButtonMnemonic(filechooser)); } else if (e.getPropertyName().equals(JFileChooser.APPROVE_BUTTON_TEXT_CHANGED_PROPERTY)) accept.setText(getApproveButtonText(filechooser)); else if (e.getPropertyName().equals(JFileChooser.APPROVE_BUTTON_TOOL_TIP_TEXT_CHANGED_PROPERTY)) accept.setToolTipText(getApproveButtonToolTipText(filechooser)); else if (e.getPropertyName().equals(JFileChooser.APPROVE_BUTTON_MNEMONIC_CHANGED_PROPERTY)) accept.setMnemonic(getApproveButtonMnemonic(filechooser)); else if (e.getPropertyName().equals(JFileChooser.CONTROL_BUTTONS_ARE_SHOWN_CHANGED_PROPERTY)) { if (filechooser.getControlButtonsAreShown()) { GridBagConstraints c = new GridBagConstraints(); c.gridy = 1; bottomPanel.add(filters, c); c.fill = GridBagConstraints.BOTH; c.gridy = 2; c.anchor = GridBagConstraints.EAST; bottomPanel.add(closePanel, c); bottomPanel.revalidate(); bottomPanel.repaint(); bottomPanel.doLayout(); } else bottomPanel.remove(closePanel); } else if (e.getPropertyName().equals(JFileChooser.ACCEPT_ALL_FILE_FILTER_USED_CHANGED_PROPERTY)) { if (filechooser.isAcceptAllFileFilterUsed()) filechooser.addChoosableFileFilter(getAcceptAllFileFilter(filechooser)); else filechooser.removeChoosableFileFilter(getAcceptAllFileFilter(filechooser)); } else if (e.getPropertyName().equals(JFileChooser.ACCESSORY_CHANGED_PROPERTY)) { JComponent old = (JComponent) e.getOldValue(); if (old != null) getAccessoryPanel().remove(old); JComponent newval = (JComponent) e.getNewValue(); if (newval != null) getAccessoryPanel().add(newval); } if (e.getPropertyName().equals(JFileChooser.DIRECTORY_CHANGED_PROPERTY) || e.getPropertyName().equals(JFileChooser.FILE_FILTER_CHANGED_PROPERTY) || e.getPropertyName().equals(JFileChooser.FILE_HIDING_CHANGED_PROPERTY)) rescanCurrentDirectory(filechooser); filechooser.revalidate(); filechooser.repaint(); } }; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/045a5b41cdfa747889101d3993040acf89788bc4/BasicFileChooserUI.java/clean/core/src/classpath/javax/javax/swing/plaf/basic/BasicFileChooserUI.java
else if (e.getPropertyName().equals(JFileChooser.ACCESSORY_CHANGED_PROPERTY))
else if (e.getPropertyName().equals( JFileChooser.ACCESSORY_CHANGED_PROPERTY))
public PropertyChangeListener createPropertyChangeListener(JFileChooser fc) { return new PropertyChangeListener() { public void propertyChange(PropertyChangeEvent e) { // FIXME: Multiple file selection waiting on JList multiple selection bug. if (e.getPropertyName().equals(JFileChooser.SELECTED_FILE_CHANGED_PROPERTY)) { if (filechooser.getSelectedFile() == null) setFileName(null); else setFileName(filechooser.getSelectedFile().toString()); int index = -1; File file = filechooser.getSelectedFile(); for (index = 0; index < model.getSize(); index++) if (((File) model.getElementAt(index)).equals(file)) break; if (index == -1) return; filelist.setSelectedIndex(index); filelist.ensureIndexIsVisible(index); filelist.revalidate(); filelist.repaint(); } else if (e.getPropertyName().equals(JFileChooser.DIRECTORY_CHANGED_PROPERTY)) { filelist.clearSelection(); filelist.revalidate(); filelist.repaint(); setDirectorySelected(false); setDirectory(filechooser.getCurrentDirectory()); boxEntries(); } else if (e.getPropertyName().equals(JFileChooser.CHOOSABLE_FILE_FILTER_CHANGED_PROPERTY) || e.getPropertyName().equals(JFileChooser.FILE_FILTER_CHANGED_PROPERTY)) filterEntries(); else if (e.getPropertyName().equals(JFileChooser.DIALOG_TYPE_CHANGED_PROPERTY) || e.getPropertyName().equals(JFileChooser.DIALOG_TITLE_CHANGED_PROPERTY)) { Window owner = SwingUtilities.windowForComponent(filechooser); if (owner instanceof JDialog) ((JDialog) owner).setTitle(getDialogTitle(filechooser)); accept.setText(getApproveButtonText(filechooser)); accept.setToolTipText(getApproveButtonToolTipText(filechooser)); accept.setMnemonic(getApproveButtonMnemonic(filechooser)); } else if (e.getPropertyName().equals(JFileChooser.APPROVE_BUTTON_TEXT_CHANGED_PROPERTY)) accept.setText(getApproveButtonText(filechooser)); else if (e.getPropertyName().equals(JFileChooser.APPROVE_BUTTON_TOOL_TIP_TEXT_CHANGED_PROPERTY)) accept.setToolTipText(getApproveButtonToolTipText(filechooser)); else if (e.getPropertyName().equals(JFileChooser.APPROVE_BUTTON_MNEMONIC_CHANGED_PROPERTY)) accept.setMnemonic(getApproveButtonMnemonic(filechooser)); else if (e.getPropertyName().equals(JFileChooser.CONTROL_BUTTONS_ARE_SHOWN_CHANGED_PROPERTY)) { if (filechooser.getControlButtonsAreShown()) { GridBagConstraints c = new GridBagConstraints(); c.gridy = 1; bottomPanel.add(filters, c); c.fill = GridBagConstraints.BOTH; c.gridy = 2; c.anchor = GridBagConstraints.EAST; bottomPanel.add(closePanel, c); bottomPanel.revalidate(); bottomPanel.repaint(); bottomPanel.doLayout(); } else bottomPanel.remove(closePanel); } else if (e.getPropertyName().equals(JFileChooser.ACCEPT_ALL_FILE_FILTER_USED_CHANGED_PROPERTY)) { if (filechooser.isAcceptAllFileFilterUsed()) filechooser.addChoosableFileFilter(getAcceptAllFileFilter(filechooser)); else filechooser.removeChoosableFileFilter(getAcceptAllFileFilter(filechooser)); } else if (e.getPropertyName().equals(JFileChooser.ACCESSORY_CHANGED_PROPERTY)) { JComponent old = (JComponent) e.getOldValue(); if (old != null) getAccessoryPanel().remove(old); JComponent newval = (JComponent) e.getNewValue(); if (newval != null) getAccessoryPanel().add(newval); } if (e.getPropertyName().equals(JFileChooser.DIRECTORY_CHANGED_PROPERTY) || e.getPropertyName().equals(JFileChooser.FILE_FILTER_CHANGED_PROPERTY) || e.getPropertyName().equals(JFileChooser.FILE_HIDING_CHANGED_PROPERTY)) rescanCurrentDirectory(filechooser); filechooser.revalidate(); filechooser.repaint(); } }; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/045a5b41cdfa747889101d3993040acf89788bc4/BasicFileChooserUI.java/clean/core/src/classpath/javax/javax/swing/plaf/basic/BasicFileChooserUI.java
|| e.getPropertyName().equals(JFileChooser.FILE_FILTER_CHANGED_PROPERTY) || e.getPropertyName().equals(JFileChooser.FILE_HIDING_CHANGED_PROPERTY))
|| e.getPropertyName().equals( JFileChooser.FILE_FILTER_CHANGED_PROPERTY) || e.getPropertyName().equals( JFileChooser.FILE_HIDING_CHANGED_PROPERTY))
public PropertyChangeListener createPropertyChangeListener(JFileChooser fc) { return new PropertyChangeListener() { public void propertyChange(PropertyChangeEvent e) { // FIXME: Multiple file selection waiting on JList multiple selection bug. if (e.getPropertyName().equals(JFileChooser.SELECTED_FILE_CHANGED_PROPERTY)) { if (filechooser.getSelectedFile() == null) setFileName(null); else setFileName(filechooser.getSelectedFile().toString()); int index = -1; File file = filechooser.getSelectedFile(); for (index = 0; index < model.getSize(); index++) if (((File) model.getElementAt(index)).equals(file)) break; if (index == -1) return; filelist.setSelectedIndex(index); filelist.ensureIndexIsVisible(index); filelist.revalidate(); filelist.repaint(); } else if (e.getPropertyName().equals(JFileChooser.DIRECTORY_CHANGED_PROPERTY)) { filelist.clearSelection(); filelist.revalidate(); filelist.repaint(); setDirectorySelected(false); setDirectory(filechooser.getCurrentDirectory()); boxEntries(); } else if (e.getPropertyName().equals(JFileChooser.CHOOSABLE_FILE_FILTER_CHANGED_PROPERTY) || e.getPropertyName().equals(JFileChooser.FILE_FILTER_CHANGED_PROPERTY)) filterEntries(); else if (e.getPropertyName().equals(JFileChooser.DIALOG_TYPE_CHANGED_PROPERTY) || e.getPropertyName().equals(JFileChooser.DIALOG_TITLE_CHANGED_PROPERTY)) { Window owner = SwingUtilities.windowForComponent(filechooser); if (owner instanceof JDialog) ((JDialog) owner).setTitle(getDialogTitle(filechooser)); accept.setText(getApproveButtonText(filechooser)); accept.setToolTipText(getApproveButtonToolTipText(filechooser)); accept.setMnemonic(getApproveButtonMnemonic(filechooser)); } else if (e.getPropertyName().equals(JFileChooser.APPROVE_BUTTON_TEXT_CHANGED_PROPERTY)) accept.setText(getApproveButtonText(filechooser)); else if (e.getPropertyName().equals(JFileChooser.APPROVE_BUTTON_TOOL_TIP_TEXT_CHANGED_PROPERTY)) accept.setToolTipText(getApproveButtonToolTipText(filechooser)); else if (e.getPropertyName().equals(JFileChooser.APPROVE_BUTTON_MNEMONIC_CHANGED_PROPERTY)) accept.setMnemonic(getApproveButtonMnemonic(filechooser)); else if (e.getPropertyName().equals(JFileChooser.CONTROL_BUTTONS_ARE_SHOWN_CHANGED_PROPERTY)) { if (filechooser.getControlButtonsAreShown()) { GridBagConstraints c = new GridBagConstraints(); c.gridy = 1; bottomPanel.add(filters, c); c.fill = GridBagConstraints.BOTH; c.gridy = 2; c.anchor = GridBagConstraints.EAST; bottomPanel.add(closePanel, c); bottomPanel.revalidate(); bottomPanel.repaint(); bottomPanel.doLayout(); } else bottomPanel.remove(closePanel); } else if (e.getPropertyName().equals(JFileChooser.ACCEPT_ALL_FILE_FILTER_USED_CHANGED_PROPERTY)) { if (filechooser.isAcceptAllFileFilterUsed()) filechooser.addChoosableFileFilter(getAcceptAllFileFilter(filechooser)); else filechooser.removeChoosableFileFilter(getAcceptAllFileFilter(filechooser)); } else if (e.getPropertyName().equals(JFileChooser.ACCESSORY_CHANGED_PROPERTY)) { JComponent old = (JComponent) e.getOldValue(); if (old != null) getAccessoryPanel().remove(old); JComponent newval = (JComponent) e.getNewValue(); if (newval != null) getAccessoryPanel().add(newval); } if (e.getPropertyName().equals(JFileChooser.DIRECTORY_CHANGED_PROPERTY) || e.getPropertyName().equals(JFileChooser.FILE_FILTER_CHANGED_PROPERTY) || e.getPropertyName().equals(JFileChooser.FILE_HIDING_CHANGED_PROPERTY)) rescanCurrentDirectory(filechooser); filechooser.revalidate(); filechooser.repaint(); } }; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/045a5b41cdfa747889101d3993040acf89788bc4/BasicFileChooserUI.java/clean/core/src/classpath/javax/javax/swing/plaf/basic/BasicFileChooserUI.java
if (e.getPropertyName().equals(JFileChooser.SELECTED_FILE_CHANGED_PROPERTY))
if (e.getPropertyName().equals( JFileChooser.SELECTED_FILE_CHANGED_PROPERTY))
public void propertyChange(PropertyChangeEvent e) { // FIXME: Multiple file selection waiting on JList multiple selection bug. if (e.getPropertyName().equals(JFileChooser.SELECTED_FILE_CHANGED_PROPERTY)) { if (filechooser.getSelectedFile() == null) setFileName(null); else setFileName(filechooser.getSelectedFile().toString()); int index = -1; File file = filechooser.getSelectedFile(); for (index = 0; index < model.getSize(); index++) if (((File) model.getElementAt(index)).equals(file)) break; if (index == -1) return; filelist.setSelectedIndex(index); filelist.ensureIndexIsVisible(index); filelist.revalidate(); filelist.repaint(); } else if (e.getPropertyName().equals(JFileChooser.DIRECTORY_CHANGED_PROPERTY)) { filelist.clearSelection(); filelist.revalidate(); filelist.repaint(); setDirectorySelected(false); setDirectory(filechooser.getCurrentDirectory()); boxEntries(); } else if (e.getPropertyName().equals(JFileChooser.CHOOSABLE_FILE_FILTER_CHANGED_PROPERTY) || e.getPropertyName().equals(JFileChooser.FILE_FILTER_CHANGED_PROPERTY)) filterEntries(); else if (e.getPropertyName().equals(JFileChooser.DIALOG_TYPE_CHANGED_PROPERTY) || e.getPropertyName().equals(JFileChooser.DIALOG_TITLE_CHANGED_PROPERTY)) { Window owner = SwingUtilities.windowForComponent(filechooser); if (owner instanceof JDialog) ((JDialog) owner).setTitle(getDialogTitle(filechooser)); accept.setText(getApproveButtonText(filechooser)); accept.setToolTipText(getApproveButtonToolTipText(filechooser)); accept.setMnemonic(getApproveButtonMnemonic(filechooser)); } else if (e.getPropertyName().equals(JFileChooser.APPROVE_BUTTON_TEXT_CHANGED_PROPERTY)) accept.setText(getApproveButtonText(filechooser)); else if (e.getPropertyName().equals(JFileChooser.APPROVE_BUTTON_TOOL_TIP_TEXT_CHANGED_PROPERTY)) accept.setToolTipText(getApproveButtonToolTipText(filechooser)); else if (e.getPropertyName().equals(JFileChooser.APPROVE_BUTTON_MNEMONIC_CHANGED_PROPERTY)) accept.setMnemonic(getApproveButtonMnemonic(filechooser)); else if (e.getPropertyName().equals(JFileChooser.CONTROL_BUTTONS_ARE_SHOWN_CHANGED_PROPERTY)) { if (filechooser.getControlButtonsAreShown()) { GridBagConstraints c = new GridBagConstraints(); c.gridy = 1; bottomPanel.add(filters, c); c.fill = GridBagConstraints.BOTH; c.gridy = 2; c.anchor = GridBagConstraints.EAST; bottomPanel.add(closePanel, c); bottomPanel.revalidate(); bottomPanel.repaint(); bottomPanel.doLayout(); } else bottomPanel.remove(closePanel); } else if (e.getPropertyName().equals(JFileChooser.ACCEPT_ALL_FILE_FILTER_USED_CHANGED_PROPERTY)) { if (filechooser.isAcceptAllFileFilterUsed()) filechooser.addChoosableFileFilter(getAcceptAllFileFilter(filechooser)); else filechooser.removeChoosableFileFilter(getAcceptAllFileFilter(filechooser)); } else if (e.getPropertyName().equals(JFileChooser.ACCESSORY_CHANGED_PROPERTY)) { JComponent old = (JComponent) e.getOldValue(); if (old != null) getAccessoryPanel().remove(old); JComponent newval = (JComponent) e.getNewValue(); if (newval != null) getAccessoryPanel().add(newval); } if (e.getPropertyName().equals(JFileChooser.DIRECTORY_CHANGED_PROPERTY) || e.getPropertyName().equals(JFileChooser.FILE_FILTER_CHANGED_PROPERTY) || e.getPropertyName().equals(JFileChooser.FILE_HIDING_CHANGED_PROPERTY)) rescanCurrentDirectory(filechooser); filechooser.revalidate(); filechooser.repaint(); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/045a5b41cdfa747889101d3993040acf89788bc4/BasicFileChooserUI.java/clean/core/src/classpath/javax/javax/swing/plaf/basic/BasicFileChooserUI.java
else if (e.getPropertyName().equals(JFileChooser.DIRECTORY_CHANGED_PROPERTY))
else if (e.getPropertyName().equals( JFileChooser.DIRECTORY_CHANGED_PROPERTY))
public void propertyChange(PropertyChangeEvent e) { // FIXME: Multiple file selection waiting on JList multiple selection bug. if (e.getPropertyName().equals(JFileChooser.SELECTED_FILE_CHANGED_PROPERTY)) { if (filechooser.getSelectedFile() == null) setFileName(null); else setFileName(filechooser.getSelectedFile().toString()); int index = -1; File file = filechooser.getSelectedFile(); for (index = 0; index < model.getSize(); index++) if (((File) model.getElementAt(index)).equals(file)) break; if (index == -1) return; filelist.setSelectedIndex(index); filelist.ensureIndexIsVisible(index); filelist.revalidate(); filelist.repaint(); } else if (e.getPropertyName().equals(JFileChooser.DIRECTORY_CHANGED_PROPERTY)) { filelist.clearSelection(); filelist.revalidate(); filelist.repaint(); setDirectorySelected(false); setDirectory(filechooser.getCurrentDirectory()); boxEntries(); } else if (e.getPropertyName().equals(JFileChooser.CHOOSABLE_FILE_FILTER_CHANGED_PROPERTY) || e.getPropertyName().equals(JFileChooser.FILE_FILTER_CHANGED_PROPERTY)) filterEntries(); else if (e.getPropertyName().equals(JFileChooser.DIALOG_TYPE_CHANGED_PROPERTY) || e.getPropertyName().equals(JFileChooser.DIALOG_TITLE_CHANGED_PROPERTY)) { Window owner = SwingUtilities.windowForComponent(filechooser); if (owner instanceof JDialog) ((JDialog) owner).setTitle(getDialogTitle(filechooser)); accept.setText(getApproveButtonText(filechooser)); accept.setToolTipText(getApproveButtonToolTipText(filechooser)); accept.setMnemonic(getApproveButtonMnemonic(filechooser)); } else if (e.getPropertyName().equals(JFileChooser.APPROVE_BUTTON_TEXT_CHANGED_PROPERTY)) accept.setText(getApproveButtonText(filechooser)); else if (e.getPropertyName().equals(JFileChooser.APPROVE_BUTTON_TOOL_TIP_TEXT_CHANGED_PROPERTY)) accept.setToolTipText(getApproveButtonToolTipText(filechooser)); else if (e.getPropertyName().equals(JFileChooser.APPROVE_BUTTON_MNEMONIC_CHANGED_PROPERTY)) accept.setMnemonic(getApproveButtonMnemonic(filechooser)); else if (e.getPropertyName().equals(JFileChooser.CONTROL_BUTTONS_ARE_SHOWN_CHANGED_PROPERTY)) { if (filechooser.getControlButtonsAreShown()) { GridBagConstraints c = new GridBagConstraints(); c.gridy = 1; bottomPanel.add(filters, c); c.fill = GridBagConstraints.BOTH; c.gridy = 2; c.anchor = GridBagConstraints.EAST; bottomPanel.add(closePanel, c); bottomPanel.revalidate(); bottomPanel.repaint(); bottomPanel.doLayout(); } else bottomPanel.remove(closePanel); } else if (e.getPropertyName().equals(JFileChooser.ACCEPT_ALL_FILE_FILTER_USED_CHANGED_PROPERTY)) { if (filechooser.isAcceptAllFileFilterUsed()) filechooser.addChoosableFileFilter(getAcceptAllFileFilter(filechooser)); else filechooser.removeChoosableFileFilter(getAcceptAllFileFilter(filechooser)); } else if (e.getPropertyName().equals(JFileChooser.ACCESSORY_CHANGED_PROPERTY)) { JComponent old = (JComponent) e.getOldValue(); if (old != null) getAccessoryPanel().remove(old); JComponent newval = (JComponent) e.getNewValue(); if (newval != null) getAccessoryPanel().add(newval); } if (e.getPropertyName().equals(JFileChooser.DIRECTORY_CHANGED_PROPERTY) || e.getPropertyName().equals(JFileChooser.FILE_FILTER_CHANGED_PROPERTY) || e.getPropertyName().equals(JFileChooser.FILE_HIDING_CHANGED_PROPERTY)) rescanCurrentDirectory(filechooser); filechooser.revalidate(); filechooser.repaint(); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/045a5b41cdfa747889101d3993040acf89788bc4/BasicFileChooserUI.java/clean/core/src/classpath/javax/javax/swing/plaf/basic/BasicFileChooserUI.java
else if (e.getPropertyName().equals(JFileChooser.CHOOSABLE_FILE_FILTER_CHANGED_PROPERTY) || e.getPropertyName().equals(JFileChooser.FILE_FILTER_CHANGED_PROPERTY))
else if (e.getPropertyName().equals( JFileChooser.CHOOSABLE_FILE_FILTER_CHANGED_PROPERTY) || e.getPropertyName().equals( JFileChooser.FILE_FILTER_CHANGED_PROPERTY))
public void propertyChange(PropertyChangeEvent e) { // FIXME: Multiple file selection waiting on JList multiple selection bug. if (e.getPropertyName().equals(JFileChooser.SELECTED_FILE_CHANGED_PROPERTY)) { if (filechooser.getSelectedFile() == null) setFileName(null); else setFileName(filechooser.getSelectedFile().toString()); int index = -1; File file = filechooser.getSelectedFile(); for (index = 0; index < model.getSize(); index++) if (((File) model.getElementAt(index)).equals(file)) break; if (index == -1) return; filelist.setSelectedIndex(index); filelist.ensureIndexIsVisible(index); filelist.revalidate(); filelist.repaint(); } else if (e.getPropertyName().equals(JFileChooser.DIRECTORY_CHANGED_PROPERTY)) { filelist.clearSelection(); filelist.revalidate(); filelist.repaint(); setDirectorySelected(false); setDirectory(filechooser.getCurrentDirectory()); boxEntries(); } else if (e.getPropertyName().equals(JFileChooser.CHOOSABLE_FILE_FILTER_CHANGED_PROPERTY) || e.getPropertyName().equals(JFileChooser.FILE_FILTER_CHANGED_PROPERTY)) filterEntries(); else if (e.getPropertyName().equals(JFileChooser.DIALOG_TYPE_CHANGED_PROPERTY) || e.getPropertyName().equals(JFileChooser.DIALOG_TITLE_CHANGED_PROPERTY)) { Window owner = SwingUtilities.windowForComponent(filechooser); if (owner instanceof JDialog) ((JDialog) owner).setTitle(getDialogTitle(filechooser)); accept.setText(getApproveButtonText(filechooser)); accept.setToolTipText(getApproveButtonToolTipText(filechooser)); accept.setMnemonic(getApproveButtonMnemonic(filechooser)); } else if (e.getPropertyName().equals(JFileChooser.APPROVE_BUTTON_TEXT_CHANGED_PROPERTY)) accept.setText(getApproveButtonText(filechooser)); else if (e.getPropertyName().equals(JFileChooser.APPROVE_BUTTON_TOOL_TIP_TEXT_CHANGED_PROPERTY)) accept.setToolTipText(getApproveButtonToolTipText(filechooser)); else if (e.getPropertyName().equals(JFileChooser.APPROVE_BUTTON_MNEMONIC_CHANGED_PROPERTY)) accept.setMnemonic(getApproveButtonMnemonic(filechooser)); else if (e.getPropertyName().equals(JFileChooser.CONTROL_BUTTONS_ARE_SHOWN_CHANGED_PROPERTY)) { if (filechooser.getControlButtonsAreShown()) { GridBagConstraints c = new GridBagConstraints(); c.gridy = 1; bottomPanel.add(filters, c); c.fill = GridBagConstraints.BOTH; c.gridy = 2; c.anchor = GridBagConstraints.EAST; bottomPanel.add(closePanel, c); bottomPanel.revalidate(); bottomPanel.repaint(); bottomPanel.doLayout(); } else bottomPanel.remove(closePanel); } else if (e.getPropertyName().equals(JFileChooser.ACCEPT_ALL_FILE_FILTER_USED_CHANGED_PROPERTY)) { if (filechooser.isAcceptAllFileFilterUsed()) filechooser.addChoosableFileFilter(getAcceptAllFileFilter(filechooser)); else filechooser.removeChoosableFileFilter(getAcceptAllFileFilter(filechooser)); } else if (e.getPropertyName().equals(JFileChooser.ACCESSORY_CHANGED_PROPERTY)) { JComponent old = (JComponent) e.getOldValue(); if (old != null) getAccessoryPanel().remove(old); JComponent newval = (JComponent) e.getNewValue(); if (newval != null) getAccessoryPanel().add(newval); } if (e.getPropertyName().equals(JFileChooser.DIRECTORY_CHANGED_PROPERTY) || e.getPropertyName().equals(JFileChooser.FILE_FILTER_CHANGED_PROPERTY) || e.getPropertyName().equals(JFileChooser.FILE_HIDING_CHANGED_PROPERTY)) rescanCurrentDirectory(filechooser); filechooser.revalidate(); filechooser.repaint(); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/045a5b41cdfa747889101d3993040acf89788bc4/BasicFileChooserUI.java/clean/core/src/classpath/javax/javax/swing/plaf/basic/BasicFileChooserUI.java
else if (e.getPropertyName().equals(JFileChooser.DIALOG_TYPE_CHANGED_PROPERTY) || e.getPropertyName().equals(JFileChooser.DIALOG_TITLE_CHANGED_PROPERTY))
else if (e.getPropertyName().equals( JFileChooser.DIALOG_TYPE_CHANGED_PROPERTY) || e.getPropertyName().equals( JFileChooser.DIALOG_TITLE_CHANGED_PROPERTY))
public void propertyChange(PropertyChangeEvent e) { // FIXME: Multiple file selection waiting on JList multiple selection bug. if (e.getPropertyName().equals(JFileChooser.SELECTED_FILE_CHANGED_PROPERTY)) { if (filechooser.getSelectedFile() == null) setFileName(null); else setFileName(filechooser.getSelectedFile().toString()); int index = -1; File file = filechooser.getSelectedFile(); for (index = 0; index < model.getSize(); index++) if (((File) model.getElementAt(index)).equals(file)) break; if (index == -1) return; filelist.setSelectedIndex(index); filelist.ensureIndexIsVisible(index); filelist.revalidate(); filelist.repaint(); } else if (e.getPropertyName().equals(JFileChooser.DIRECTORY_CHANGED_PROPERTY)) { filelist.clearSelection(); filelist.revalidate(); filelist.repaint(); setDirectorySelected(false); setDirectory(filechooser.getCurrentDirectory()); boxEntries(); } else if (e.getPropertyName().equals(JFileChooser.CHOOSABLE_FILE_FILTER_CHANGED_PROPERTY) || e.getPropertyName().equals(JFileChooser.FILE_FILTER_CHANGED_PROPERTY)) filterEntries(); else if (e.getPropertyName().equals(JFileChooser.DIALOG_TYPE_CHANGED_PROPERTY) || e.getPropertyName().equals(JFileChooser.DIALOG_TITLE_CHANGED_PROPERTY)) { Window owner = SwingUtilities.windowForComponent(filechooser); if (owner instanceof JDialog) ((JDialog) owner).setTitle(getDialogTitle(filechooser)); accept.setText(getApproveButtonText(filechooser)); accept.setToolTipText(getApproveButtonToolTipText(filechooser)); accept.setMnemonic(getApproveButtonMnemonic(filechooser)); } else if (e.getPropertyName().equals(JFileChooser.APPROVE_BUTTON_TEXT_CHANGED_PROPERTY)) accept.setText(getApproveButtonText(filechooser)); else if (e.getPropertyName().equals(JFileChooser.APPROVE_BUTTON_TOOL_TIP_TEXT_CHANGED_PROPERTY)) accept.setToolTipText(getApproveButtonToolTipText(filechooser)); else if (e.getPropertyName().equals(JFileChooser.APPROVE_BUTTON_MNEMONIC_CHANGED_PROPERTY)) accept.setMnemonic(getApproveButtonMnemonic(filechooser)); else if (e.getPropertyName().equals(JFileChooser.CONTROL_BUTTONS_ARE_SHOWN_CHANGED_PROPERTY)) { if (filechooser.getControlButtonsAreShown()) { GridBagConstraints c = new GridBagConstraints(); c.gridy = 1; bottomPanel.add(filters, c); c.fill = GridBagConstraints.BOTH; c.gridy = 2; c.anchor = GridBagConstraints.EAST; bottomPanel.add(closePanel, c); bottomPanel.revalidate(); bottomPanel.repaint(); bottomPanel.doLayout(); } else bottomPanel.remove(closePanel); } else if (e.getPropertyName().equals(JFileChooser.ACCEPT_ALL_FILE_FILTER_USED_CHANGED_PROPERTY)) { if (filechooser.isAcceptAllFileFilterUsed()) filechooser.addChoosableFileFilter(getAcceptAllFileFilter(filechooser)); else filechooser.removeChoosableFileFilter(getAcceptAllFileFilter(filechooser)); } else if (e.getPropertyName().equals(JFileChooser.ACCESSORY_CHANGED_PROPERTY)) { JComponent old = (JComponent) e.getOldValue(); if (old != null) getAccessoryPanel().remove(old); JComponent newval = (JComponent) e.getNewValue(); if (newval != null) getAccessoryPanel().add(newval); } if (e.getPropertyName().equals(JFileChooser.DIRECTORY_CHANGED_PROPERTY) || e.getPropertyName().equals(JFileChooser.FILE_FILTER_CHANGED_PROPERTY) || e.getPropertyName().equals(JFileChooser.FILE_HIDING_CHANGED_PROPERTY)) rescanCurrentDirectory(filechooser); filechooser.revalidate(); filechooser.repaint(); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/045a5b41cdfa747889101d3993040acf89788bc4/BasicFileChooserUI.java/clean/core/src/classpath/javax/javax/swing/plaf/basic/BasicFileChooserUI.java
else if (e.getPropertyName().equals(JFileChooser.APPROVE_BUTTON_TEXT_CHANGED_PROPERTY))
else if (e.getPropertyName().equals( JFileChooser.APPROVE_BUTTON_TEXT_CHANGED_PROPERTY))
public void propertyChange(PropertyChangeEvent e) { // FIXME: Multiple file selection waiting on JList multiple selection bug. if (e.getPropertyName().equals(JFileChooser.SELECTED_FILE_CHANGED_PROPERTY)) { if (filechooser.getSelectedFile() == null) setFileName(null); else setFileName(filechooser.getSelectedFile().toString()); int index = -1; File file = filechooser.getSelectedFile(); for (index = 0; index < model.getSize(); index++) if (((File) model.getElementAt(index)).equals(file)) break; if (index == -1) return; filelist.setSelectedIndex(index); filelist.ensureIndexIsVisible(index); filelist.revalidate(); filelist.repaint(); } else if (e.getPropertyName().equals(JFileChooser.DIRECTORY_CHANGED_PROPERTY)) { filelist.clearSelection(); filelist.revalidate(); filelist.repaint(); setDirectorySelected(false); setDirectory(filechooser.getCurrentDirectory()); boxEntries(); } else if (e.getPropertyName().equals(JFileChooser.CHOOSABLE_FILE_FILTER_CHANGED_PROPERTY) || e.getPropertyName().equals(JFileChooser.FILE_FILTER_CHANGED_PROPERTY)) filterEntries(); else if (e.getPropertyName().equals(JFileChooser.DIALOG_TYPE_CHANGED_PROPERTY) || e.getPropertyName().equals(JFileChooser.DIALOG_TITLE_CHANGED_PROPERTY)) { Window owner = SwingUtilities.windowForComponent(filechooser); if (owner instanceof JDialog) ((JDialog) owner).setTitle(getDialogTitle(filechooser)); accept.setText(getApproveButtonText(filechooser)); accept.setToolTipText(getApproveButtonToolTipText(filechooser)); accept.setMnemonic(getApproveButtonMnemonic(filechooser)); } else if (e.getPropertyName().equals(JFileChooser.APPROVE_BUTTON_TEXT_CHANGED_PROPERTY)) accept.setText(getApproveButtonText(filechooser)); else if (e.getPropertyName().equals(JFileChooser.APPROVE_BUTTON_TOOL_TIP_TEXT_CHANGED_PROPERTY)) accept.setToolTipText(getApproveButtonToolTipText(filechooser)); else if (e.getPropertyName().equals(JFileChooser.APPROVE_BUTTON_MNEMONIC_CHANGED_PROPERTY)) accept.setMnemonic(getApproveButtonMnemonic(filechooser)); else if (e.getPropertyName().equals(JFileChooser.CONTROL_BUTTONS_ARE_SHOWN_CHANGED_PROPERTY)) { if (filechooser.getControlButtonsAreShown()) { GridBagConstraints c = new GridBagConstraints(); c.gridy = 1; bottomPanel.add(filters, c); c.fill = GridBagConstraints.BOTH; c.gridy = 2; c.anchor = GridBagConstraints.EAST; bottomPanel.add(closePanel, c); bottomPanel.revalidate(); bottomPanel.repaint(); bottomPanel.doLayout(); } else bottomPanel.remove(closePanel); } else if (e.getPropertyName().equals(JFileChooser.ACCEPT_ALL_FILE_FILTER_USED_CHANGED_PROPERTY)) { if (filechooser.isAcceptAllFileFilterUsed()) filechooser.addChoosableFileFilter(getAcceptAllFileFilter(filechooser)); else filechooser.removeChoosableFileFilter(getAcceptAllFileFilter(filechooser)); } else if (e.getPropertyName().equals(JFileChooser.ACCESSORY_CHANGED_PROPERTY)) { JComponent old = (JComponent) e.getOldValue(); if (old != null) getAccessoryPanel().remove(old); JComponent newval = (JComponent) e.getNewValue(); if (newval != null) getAccessoryPanel().add(newval); } if (e.getPropertyName().equals(JFileChooser.DIRECTORY_CHANGED_PROPERTY) || e.getPropertyName().equals(JFileChooser.FILE_FILTER_CHANGED_PROPERTY) || e.getPropertyName().equals(JFileChooser.FILE_HIDING_CHANGED_PROPERTY)) rescanCurrentDirectory(filechooser); filechooser.revalidate(); filechooser.repaint(); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/045a5b41cdfa747889101d3993040acf89788bc4/BasicFileChooserUI.java/clean/core/src/classpath/javax/javax/swing/plaf/basic/BasicFileChooserUI.java
else if (e.getPropertyName().equals(JFileChooser.APPROVE_BUTTON_TOOL_TIP_TEXT_CHANGED_PROPERTY))
else if (e.getPropertyName().equals( JFileChooser.APPROVE_BUTTON_TOOL_TIP_TEXT_CHANGED_PROPERTY))
public void propertyChange(PropertyChangeEvent e) { // FIXME: Multiple file selection waiting on JList multiple selection bug. if (e.getPropertyName().equals(JFileChooser.SELECTED_FILE_CHANGED_PROPERTY)) { if (filechooser.getSelectedFile() == null) setFileName(null); else setFileName(filechooser.getSelectedFile().toString()); int index = -1; File file = filechooser.getSelectedFile(); for (index = 0; index < model.getSize(); index++) if (((File) model.getElementAt(index)).equals(file)) break; if (index == -1) return; filelist.setSelectedIndex(index); filelist.ensureIndexIsVisible(index); filelist.revalidate(); filelist.repaint(); } else if (e.getPropertyName().equals(JFileChooser.DIRECTORY_CHANGED_PROPERTY)) { filelist.clearSelection(); filelist.revalidate(); filelist.repaint(); setDirectorySelected(false); setDirectory(filechooser.getCurrentDirectory()); boxEntries(); } else if (e.getPropertyName().equals(JFileChooser.CHOOSABLE_FILE_FILTER_CHANGED_PROPERTY) || e.getPropertyName().equals(JFileChooser.FILE_FILTER_CHANGED_PROPERTY)) filterEntries(); else if (e.getPropertyName().equals(JFileChooser.DIALOG_TYPE_CHANGED_PROPERTY) || e.getPropertyName().equals(JFileChooser.DIALOG_TITLE_CHANGED_PROPERTY)) { Window owner = SwingUtilities.windowForComponent(filechooser); if (owner instanceof JDialog) ((JDialog) owner).setTitle(getDialogTitle(filechooser)); accept.setText(getApproveButtonText(filechooser)); accept.setToolTipText(getApproveButtonToolTipText(filechooser)); accept.setMnemonic(getApproveButtonMnemonic(filechooser)); } else if (e.getPropertyName().equals(JFileChooser.APPROVE_BUTTON_TEXT_CHANGED_PROPERTY)) accept.setText(getApproveButtonText(filechooser)); else if (e.getPropertyName().equals(JFileChooser.APPROVE_BUTTON_TOOL_TIP_TEXT_CHANGED_PROPERTY)) accept.setToolTipText(getApproveButtonToolTipText(filechooser)); else if (e.getPropertyName().equals(JFileChooser.APPROVE_BUTTON_MNEMONIC_CHANGED_PROPERTY)) accept.setMnemonic(getApproveButtonMnemonic(filechooser)); else if (e.getPropertyName().equals(JFileChooser.CONTROL_BUTTONS_ARE_SHOWN_CHANGED_PROPERTY)) { if (filechooser.getControlButtonsAreShown()) { GridBagConstraints c = new GridBagConstraints(); c.gridy = 1; bottomPanel.add(filters, c); c.fill = GridBagConstraints.BOTH; c.gridy = 2; c.anchor = GridBagConstraints.EAST; bottomPanel.add(closePanel, c); bottomPanel.revalidate(); bottomPanel.repaint(); bottomPanel.doLayout(); } else bottomPanel.remove(closePanel); } else if (e.getPropertyName().equals(JFileChooser.ACCEPT_ALL_FILE_FILTER_USED_CHANGED_PROPERTY)) { if (filechooser.isAcceptAllFileFilterUsed()) filechooser.addChoosableFileFilter(getAcceptAllFileFilter(filechooser)); else filechooser.removeChoosableFileFilter(getAcceptAllFileFilter(filechooser)); } else if (e.getPropertyName().equals(JFileChooser.ACCESSORY_CHANGED_PROPERTY)) { JComponent old = (JComponent) e.getOldValue(); if (old != null) getAccessoryPanel().remove(old); JComponent newval = (JComponent) e.getNewValue(); if (newval != null) getAccessoryPanel().add(newval); } if (e.getPropertyName().equals(JFileChooser.DIRECTORY_CHANGED_PROPERTY) || e.getPropertyName().equals(JFileChooser.FILE_FILTER_CHANGED_PROPERTY) || e.getPropertyName().equals(JFileChooser.FILE_HIDING_CHANGED_PROPERTY)) rescanCurrentDirectory(filechooser); filechooser.revalidate(); filechooser.repaint(); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/045a5b41cdfa747889101d3993040acf89788bc4/BasicFileChooserUI.java/clean/core/src/classpath/javax/javax/swing/plaf/basic/BasicFileChooserUI.java
else if (e.getPropertyName().equals(JFileChooser.APPROVE_BUTTON_MNEMONIC_CHANGED_PROPERTY))
else if (e.getPropertyName().equals( JFileChooser.APPROVE_BUTTON_MNEMONIC_CHANGED_PROPERTY))
public void propertyChange(PropertyChangeEvent e) { // FIXME: Multiple file selection waiting on JList multiple selection bug. if (e.getPropertyName().equals(JFileChooser.SELECTED_FILE_CHANGED_PROPERTY)) { if (filechooser.getSelectedFile() == null) setFileName(null); else setFileName(filechooser.getSelectedFile().toString()); int index = -1; File file = filechooser.getSelectedFile(); for (index = 0; index < model.getSize(); index++) if (((File) model.getElementAt(index)).equals(file)) break; if (index == -1) return; filelist.setSelectedIndex(index); filelist.ensureIndexIsVisible(index); filelist.revalidate(); filelist.repaint(); } else if (e.getPropertyName().equals(JFileChooser.DIRECTORY_CHANGED_PROPERTY)) { filelist.clearSelection(); filelist.revalidate(); filelist.repaint(); setDirectorySelected(false); setDirectory(filechooser.getCurrentDirectory()); boxEntries(); } else if (e.getPropertyName().equals(JFileChooser.CHOOSABLE_FILE_FILTER_CHANGED_PROPERTY) || e.getPropertyName().equals(JFileChooser.FILE_FILTER_CHANGED_PROPERTY)) filterEntries(); else if (e.getPropertyName().equals(JFileChooser.DIALOG_TYPE_CHANGED_PROPERTY) || e.getPropertyName().equals(JFileChooser.DIALOG_TITLE_CHANGED_PROPERTY)) { Window owner = SwingUtilities.windowForComponent(filechooser); if (owner instanceof JDialog) ((JDialog) owner).setTitle(getDialogTitle(filechooser)); accept.setText(getApproveButtonText(filechooser)); accept.setToolTipText(getApproveButtonToolTipText(filechooser)); accept.setMnemonic(getApproveButtonMnemonic(filechooser)); } else if (e.getPropertyName().equals(JFileChooser.APPROVE_BUTTON_TEXT_CHANGED_PROPERTY)) accept.setText(getApproveButtonText(filechooser)); else if (e.getPropertyName().equals(JFileChooser.APPROVE_BUTTON_TOOL_TIP_TEXT_CHANGED_PROPERTY)) accept.setToolTipText(getApproveButtonToolTipText(filechooser)); else if (e.getPropertyName().equals(JFileChooser.APPROVE_BUTTON_MNEMONIC_CHANGED_PROPERTY)) accept.setMnemonic(getApproveButtonMnemonic(filechooser)); else if (e.getPropertyName().equals(JFileChooser.CONTROL_BUTTONS_ARE_SHOWN_CHANGED_PROPERTY)) { if (filechooser.getControlButtonsAreShown()) { GridBagConstraints c = new GridBagConstraints(); c.gridy = 1; bottomPanel.add(filters, c); c.fill = GridBagConstraints.BOTH; c.gridy = 2; c.anchor = GridBagConstraints.EAST; bottomPanel.add(closePanel, c); bottomPanel.revalidate(); bottomPanel.repaint(); bottomPanel.doLayout(); } else bottomPanel.remove(closePanel); } else if (e.getPropertyName().equals(JFileChooser.ACCEPT_ALL_FILE_FILTER_USED_CHANGED_PROPERTY)) { if (filechooser.isAcceptAllFileFilterUsed()) filechooser.addChoosableFileFilter(getAcceptAllFileFilter(filechooser)); else filechooser.removeChoosableFileFilter(getAcceptAllFileFilter(filechooser)); } else if (e.getPropertyName().equals(JFileChooser.ACCESSORY_CHANGED_PROPERTY)) { JComponent old = (JComponent) e.getOldValue(); if (old != null) getAccessoryPanel().remove(old); JComponent newval = (JComponent) e.getNewValue(); if (newval != null) getAccessoryPanel().add(newval); } if (e.getPropertyName().equals(JFileChooser.DIRECTORY_CHANGED_PROPERTY) || e.getPropertyName().equals(JFileChooser.FILE_FILTER_CHANGED_PROPERTY) || e.getPropertyName().equals(JFileChooser.FILE_HIDING_CHANGED_PROPERTY)) rescanCurrentDirectory(filechooser); filechooser.revalidate(); filechooser.repaint(); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/045a5b41cdfa747889101d3993040acf89788bc4/BasicFileChooserUI.java/clean/core/src/classpath/javax/javax/swing/plaf/basic/BasicFileChooserUI.java
else if (e.getPropertyName().equals(JFileChooser.CONTROL_BUTTONS_ARE_SHOWN_CHANGED_PROPERTY))
else if (e.getPropertyName().equals( JFileChooser.CONTROL_BUTTONS_ARE_SHOWN_CHANGED_PROPERTY))
public void propertyChange(PropertyChangeEvent e) { // FIXME: Multiple file selection waiting on JList multiple selection bug. if (e.getPropertyName().equals(JFileChooser.SELECTED_FILE_CHANGED_PROPERTY)) { if (filechooser.getSelectedFile() == null) setFileName(null); else setFileName(filechooser.getSelectedFile().toString()); int index = -1; File file = filechooser.getSelectedFile(); for (index = 0; index < model.getSize(); index++) if (((File) model.getElementAt(index)).equals(file)) break; if (index == -1) return; filelist.setSelectedIndex(index); filelist.ensureIndexIsVisible(index); filelist.revalidate(); filelist.repaint(); } else if (e.getPropertyName().equals(JFileChooser.DIRECTORY_CHANGED_PROPERTY)) { filelist.clearSelection(); filelist.revalidate(); filelist.repaint(); setDirectorySelected(false); setDirectory(filechooser.getCurrentDirectory()); boxEntries(); } else if (e.getPropertyName().equals(JFileChooser.CHOOSABLE_FILE_FILTER_CHANGED_PROPERTY) || e.getPropertyName().equals(JFileChooser.FILE_FILTER_CHANGED_PROPERTY)) filterEntries(); else if (e.getPropertyName().equals(JFileChooser.DIALOG_TYPE_CHANGED_PROPERTY) || e.getPropertyName().equals(JFileChooser.DIALOG_TITLE_CHANGED_PROPERTY)) { Window owner = SwingUtilities.windowForComponent(filechooser); if (owner instanceof JDialog) ((JDialog) owner).setTitle(getDialogTitle(filechooser)); accept.setText(getApproveButtonText(filechooser)); accept.setToolTipText(getApproveButtonToolTipText(filechooser)); accept.setMnemonic(getApproveButtonMnemonic(filechooser)); } else if (e.getPropertyName().equals(JFileChooser.APPROVE_BUTTON_TEXT_CHANGED_PROPERTY)) accept.setText(getApproveButtonText(filechooser)); else if (e.getPropertyName().equals(JFileChooser.APPROVE_BUTTON_TOOL_TIP_TEXT_CHANGED_PROPERTY)) accept.setToolTipText(getApproveButtonToolTipText(filechooser)); else if (e.getPropertyName().equals(JFileChooser.APPROVE_BUTTON_MNEMONIC_CHANGED_PROPERTY)) accept.setMnemonic(getApproveButtonMnemonic(filechooser)); else if (e.getPropertyName().equals(JFileChooser.CONTROL_BUTTONS_ARE_SHOWN_CHANGED_PROPERTY)) { if (filechooser.getControlButtonsAreShown()) { GridBagConstraints c = new GridBagConstraints(); c.gridy = 1; bottomPanel.add(filters, c); c.fill = GridBagConstraints.BOTH; c.gridy = 2; c.anchor = GridBagConstraints.EAST; bottomPanel.add(closePanel, c); bottomPanel.revalidate(); bottomPanel.repaint(); bottomPanel.doLayout(); } else bottomPanel.remove(closePanel); } else if (e.getPropertyName().equals(JFileChooser.ACCEPT_ALL_FILE_FILTER_USED_CHANGED_PROPERTY)) { if (filechooser.isAcceptAllFileFilterUsed()) filechooser.addChoosableFileFilter(getAcceptAllFileFilter(filechooser)); else filechooser.removeChoosableFileFilter(getAcceptAllFileFilter(filechooser)); } else if (e.getPropertyName().equals(JFileChooser.ACCESSORY_CHANGED_PROPERTY)) { JComponent old = (JComponent) e.getOldValue(); if (old != null) getAccessoryPanel().remove(old); JComponent newval = (JComponent) e.getNewValue(); if (newval != null) getAccessoryPanel().add(newval); } if (e.getPropertyName().equals(JFileChooser.DIRECTORY_CHANGED_PROPERTY) || e.getPropertyName().equals(JFileChooser.FILE_FILTER_CHANGED_PROPERTY) || e.getPropertyName().equals(JFileChooser.FILE_HIDING_CHANGED_PROPERTY)) rescanCurrentDirectory(filechooser); filechooser.revalidate(); filechooser.repaint(); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/045a5b41cdfa747889101d3993040acf89788bc4/BasicFileChooserUI.java/clean/core/src/classpath/javax/javax/swing/plaf/basic/BasicFileChooserUI.java
else if (e.getPropertyName().equals(JFileChooser.ACCEPT_ALL_FILE_FILTER_USED_CHANGED_PROPERTY))
else if (e.getPropertyName().equals( JFileChooser.ACCEPT_ALL_FILE_FILTER_USED_CHANGED_PROPERTY))
public void propertyChange(PropertyChangeEvent e) { // FIXME: Multiple file selection waiting on JList multiple selection bug. if (e.getPropertyName().equals(JFileChooser.SELECTED_FILE_CHANGED_PROPERTY)) { if (filechooser.getSelectedFile() == null) setFileName(null); else setFileName(filechooser.getSelectedFile().toString()); int index = -1; File file = filechooser.getSelectedFile(); for (index = 0; index < model.getSize(); index++) if (((File) model.getElementAt(index)).equals(file)) break; if (index == -1) return; filelist.setSelectedIndex(index); filelist.ensureIndexIsVisible(index); filelist.revalidate(); filelist.repaint(); } else if (e.getPropertyName().equals(JFileChooser.DIRECTORY_CHANGED_PROPERTY)) { filelist.clearSelection(); filelist.revalidate(); filelist.repaint(); setDirectorySelected(false); setDirectory(filechooser.getCurrentDirectory()); boxEntries(); } else if (e.getPropertyName().equals(JFileChooser.CHOOSABLE_FILE_FILTER_CHANGED_PROPERTY) || e.getPropertyName().equals(JFileChooser.FILE_FILTER_CHANGED_PROPERTY)) filterEntries(); else if (e.getPropertyName().equals(JFileChooser.DIALOG_TYPE_CHANGED_PROPERTY) || e.getPropertyName().equals(JFileChooser.DIALOG_TITLE_CHANGED_PROPERTY)) { Window owner = SwingUtilities.windowForComponent(filechooser); if (owner instanceof JDialog) ((JDialog) owner).setTitle(getDialogTitle(filechooser)); accept.setText(getApproveButtonText(filechooser)); accept.setToolTipText(getApproveButtonToolTipText(filechooser)); accept.setMnemonic(getApproveButtonMnemonic(filechooser)); } else if (e.getPropertyName().equals(JFileChooser.APPROVE_BUTTON_TEXT_CHANGED_PROPERTY)) accept.setText(getApproveButtonText(filechooser)); else if (e.getPropertyName().equals(JFileChooser.APPROVE_BUTTON_TOOL_TIP_TEXT_CHANGED_PROPERTY)) accept.setToolTipText(getApproveButtonToolTipText(filechooser)); else if (e.getPropertyName().equals(JFileChooser.APPROVE_BUTTON_MNEMONIC_CHANGED_PROPERTY)) accept.setMnemonic(getApproveButtonMnemonic(filechooser)); else if (e.getPropertyName().equals(JFileChooser.CONTROL_BUTTONS_ARE_SHOWN_CHANGED_PROPERTY)) { if (filechooser.getControlButtonsAreShown()) { GridBagConstraints c = new GridBagConstraints(); c.gridy = 1; bottomPanel.add(filters, c); c.fill = GridBagConstraints.BOTH; c.gridy = 2; c.anchor = GridBagConstraints.EAST; bottomPanel.add(closePanel, c); bottomPanel.revalidate(); bottomPanel.repaint(); bottomPanel.doLayout(); } else bottomPanel.remove(closePanel); } else if (e.getPropertyName().equals(JFileChooser.ACCEPT_ALL_FILE_FILTER_USED_CHANGED_PROPERTY)) { if (filechooser.isAcceptAllFileFilterUsed()) filechooser.addChoosableFileFilter(getAcceptAllFileFilter(filechooser)); else filechooser.removeChoosableFileFilter(getAcceptAllFileFilter(filechooser)); } else if (e.getPropertyName().equals(JFileChooser.ACCESSORY_CHANGED_PROPERTY)) { JComponent old = (JComponent) e.getOldValue(); if (old != null) getAccessoryPanel().remove(old); JComponent newval = (JComponent) e.getNewValue(); if (newval != null) getAccessoryPanel().add(newval); } if (e.getPropertyName().equals(JFileChooser.DIRECTORY_CHANGED_PROPERTY) || e.getPropertyName().equals(JFileChooser.FILE_FILTER_CHANGED_PROPERTY) || e.getPropertyName().equals(JFileChooser.FILE_HIDING_CHANGED_PROPERTY)) rescanCurrentDirectory(filechooser); filechooser.revalidate(); filechooser.repaint(); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/045a5b41cdfa747889101d3993040acf89788bc4/BasicFileChooserUI.java/clean/core/src/classpath/javax/javax/swing/plaf/basic/BasicFileChooserUI.java
else if (e.getPropertyName().equals(JFileChooser.ACCESSORY_CHANGED_PROPERTY))
else if (e.getPropertyName().equals( JFileChooser.ACCESSORY_CHANGED_PROPERTY))
public void propertyChange(PropertyChangeEvent e) { // FIXME: Multiple file selection waiting on JList multiple selection bug. if (e.getPropertyName().equals(JFileChooser.SELECTED_FILE_CHANGED_PROPERTY)) { if (filechooser.getSelectedFile() == null) setFileName(null); else setFileName(filechooser.getSelectedFile().toString()); int index = -1; File file = filechooser.getSelectedFile(); for (index = 0; index < model.getSize(); index++) if (((File) model.getElementAt(index)).equals(file)) break; if (index == -1) return; filelist.setSelectedIndex(index); filelist.ensureIndexIsVisible(index); filelist.revalidate(); filelist.repaint(); } else if (e.getPropertyName().equals(JFileChooser.DIRECTORY_CHANGED_PROPERTY)) { filelist.clearSelection(); filelist.revalidate(); filelist.repaint(); setDirectorySelected(false); setDirectory(filechooser.getCurrentDirectory()); boxEntries(); } else if (e.getPropertyName().equals(JFileChooser.CHOOSABLE_FILE_FILTER_CHANGED_PROPERTY) || e.getPropertyName().equals(JFileChooser.FILE_FILTER_CHANGED_PROPERTY)) filterEntries(); else if (e.getPropertyName().equals(JFileChooser.DIALOG_TYPE_CHANGED_PROPERTY) || e.getPropertyName().equals(JFileChooser.DIALOG_TITLE_CHANGED_PROPERTY)) { Window owner = SwingUtilities.windowForComponent(filechooser); if (owner instanceof JDialog) ((JDialog) owner).setTitle(getDialogTitle(filechooser)); accept.setText(getApproveButtonText(filechooser)); accept.setToolTipText(getApproveButtonToolTipText(filechooser)); accept.setMnemonic(getApproveButtonMnemonic(filechooser)); } else if (e.getPropertyName().equals(JFileChooser.APPROVE_BUTTON_TEXT_CHANGED_PROPERTY)) accept.setText(getApproveButtonText(filechooser)); else if (e.getPropertyName().equals(JFileChooser.APPROVE_BUTTON_TOOL_TIP_TEXT_CHANGED_PROPERTY)) accept.setToolTipText(getApproveButtonToolTipText(filechooser)); else if (e.getPropertyName().equals(JFileChooser.APPROVE_BUTTON_MNEMONIC_CHANGED_PROPERTY)) accept.setMnemonic(getApproveButtonMnemonic(filechooser)); else if (e.getPropertyName().equals(JFileChooser.CONTROL_BUTTONS_ARE_SHOWN_CHANGED_PROPERTY)) { if (filechooser.getControlButtonsAreShown()) { GridBagConstraints c = new GridBagConstraints(); c.gridy = 1; bottomPanel.add(filters, c); c.fill = GridBagConstraints.BOTH; c.gridy = 2; c.anchor = GridBagConstraints.EAST; bottomPanel.add(closePanel, c); bottomPanel.revalidate(); bottomPanel.repaint(); bottomPanel.doLayout(); } else bottomPanel.remove(closePanel); } else if (e.getPropertyName().equals(JFileChooser.ACCEPT_ALL_FILE_FILTER_USED_CHANGED_PROPERTY)) { if (filechooser.isAcceptAllFileFilterUsed()) filechooser.addChoosableFileFilter(getAcceptAllFileFilter(filechooser)); else filechooser.removeChoosableFileFilter(getAcceptAllFileFilter(filechooser)); } else if (e.getPropertyName().equals(JFileChooser.ACCESSORY_CHANGED_PROPERTY)) { JComponent old = (JComponent) e.getOldValue(); if (old != null) getAccessoryPanel().remove(old); JComponent newval = (JComponent) e.getNewValue(); if (newval != null) getAccessoryPanel().add(newval); } if (e.getPropertyName().equals(JFileChooser.DIRECTORY_CHANGED_PROPERTY) || e.getPropertyName().equals(JFileChooser.FILE_FILTER_CHANGED_PROPERTY) || e.getPropertyName().equals(JFileChooser.FILE_HIDING_CHANGED_PROPERTY)) rescanCurrentDirectory(filechooser); filechooser.revalidate(); filechooser.repaint(); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/045a5b41cdfa747889101d3993040acf89788bc4/BasicFileChooserUI.java/clean/core/src/classpath/javax/javax/swing/plaf/basic/BasicFileChooserUI.java
|| e.getPropertyName().equals(JFileChooser.FILE_FILTER_CHANGED_PROPERTY) || e.getPropertyName().equals(JFileChooser.FILE_HIDING_CHANGED_PROPERTY))
|| e.getPropertyName().equals( JFileChooser.FILE_FILTER_CHANGED_PROPERTY) || e.getPropertyName().equals( JFileChooser.FILE_HIDING_CHANGED_PROPERTY))
public void propertyChange(PropertyChangeEvent e) { // FIXME: Multiple file selection waiting on JList multiple selection bug. if (e.getPropertyName().equals(JFileChooser.SELECTED_FILE_CHANGED_PROPERTY)) { if (filechooser.getSelectedFile() == null) setFileName(null); else setFileName(filechooser.getSelectedFile().toString()); int index = -1; File file = filechooser.getSelectedFile(); for (index = 0; index < model.getSize(); index++) if (((File) model.getElementAt(index)).equals(file)) break; if (index == -1) return; filelist.setSelectedIndex(index); filelist.ensureIndexIsVisible(index); filelist.revalidate(); filelist.repaint(); } else if (e.getPropertyName().equals(JFileChooser.DIRECTORY_CHANGED_PROPERTY)) { filelist.clearSelection(); filelist.revalidate(); filelist.repaint(); setDirectorySelected(false); setDirectory(filechooser.getCurrentDirectory()); boxEntries(); } else if (e.getPropertyName().equals(JFileChooser.CHOOSABLE_FILE_FILTER_CHANGED_PROPERTY) || e.getPropertyName().equals(JFileChooser.FILE_FILTER_CHANGED_PROPERTY)) filterEntries(); else if (e.getPropertyName().equals(JFileChooser.DIALOG_TYPE_CHANGED_PROPERTY) || e.getPropertyName().equals(JFileChooser.DIALOG_TITLE_CHANGED_PROPERTY)) { Window owner = SwingUtilities.windowForComponent(filechooser); if (owner instanceof JDialog) ((JDialog) owner).setTitle(getDialogTitle(filechooser)); accept.setText(getApproveButtonText(filechooser)); accept.setToolTipText(getApproveButtonToolTipText(filechooser)); accept.setMnemonic(getApproveButtonMnemonic(filechooser)); } else if (e.getPropertyName().equals(JFileChooser.APPROVE_BUTTON_TEXT_CHANGED_PROPERTY)) accept.setText(getApproveButtonText(filechooser)); else if (e.getPropertyName().equals(JFileChooser.APPROVE_BUTTON_TOOL_TIP_TEXT_CHANGED_PROPERTY)) accept.setToolTipText(getApproveButtonToolTipText(filechooser)); else if (e.getPropertyName().equals(JFileChooser.APPROVE_BUTTON_MNEMONIC_CHANGED_PROPERTY)) accept.setMnemonic(getApproveButtonMnemonic(filechooser)); else if (e.getPropertyName().equals(JFileChooser.CONTROL_BUTTONS_ARE_SHOWN_CHANGED_PROPERTY)) { if (filechooser.getControlButtonsAreShown()) { GridBagConstraints c = new GridBagConstraints(); c.gridy = 1; bottomPanel.add(filters, c); c.fill = GridBagConstraints.BOTH; c.gridy = 2; c.anchor = GridBagConstraints.EAST; bottomPanel.add(closePanel, c); bottomPanel.revalidate(); bottomPanel.repaint(); bottomPanel.doLayout(); } else bottomPanel.remove(closePanel); } else if (e.getPropertyName().equals(JFileChooser.ACCEPT_ALL_FILE_FILTER_USED_CHANGED_PROPERTY)) { if (filechooser.isAcceptAllFileFilterUsed()) filechooser.addChoosableFileFilter(getAcceptAllFileFilter(filechooser)); else filechooser.removeChoosableFileFilter(getAcceptAllFileFilter(filechooser)); } else if (e.getPropertyName().equals(JFileChooser.ACCESSORY_CHANGED_PROPERTY)) { JComponent old = (JComponent) e.getOldValue(); if (old != null) getAccessoryPanel().remove(old); JComponent newval = (JComponent) e.getNewValue(); if (newval != null) getAccessoryPanel().add(newval); } if (e.getPropertyName().equals(JFileChooser.DIRECTORY_CHANGED_PROPERTY) || e.getPropertyName().equals(JFileChooser.FILE_FILTER_CHANGED_PROPERTY) || e.getPropertyName().equals(JFileChooser.FILE_HIDING_CHANGED_PROPERTY)) rescanCurrentDirectory(filechooser); filechooser.revalidate(); filechooser.repaint(); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/045a5b41cdfa747889101d3993040acf89788bc4/BasicFileChooserUI.java/clean/core/src/classpath/javax/javax/swing/plaf/basic/BasicFileChooserUI.java
JTextField entry = new JTextField();
entry = new JTextField();
public void installComponents(JFileChooser fc) { JLabel look = new JLabel("Look In:"); parents = new JComboBox(); parents.setRenderer(new CBLabelRenderer()); boxEntries(); look.setLabelFor(parents); JPanel parentsPanel = new JPanel(); parentsPanel.add(look); parentsPanel.add(parents); JPanel buttonPanel = new JPanel(); upFolderButton = new JButton(); upFolderButton.setIcon(upFolderIcon); buttonPanel.add(upFolderButton); homeFolderButton = new JButton(); homeFolderButton = new JButton(homeFolderIcon); buttonPanel.add(homeFolderButton); newFolderButton = new JButton(); newFolderButton.setIcon(newFolderIcon); buttonPanel.add(newFolderButton); ButtonGroup toggles = new ButtonGroup(); JToggleButton listViewButton = new JToggleButton(); listViewButton.setIcon(listViewIcon); toggles.add(listViewButton); buttonPanel.add(listViewButton); JToggleButton detailsViewButton = new JToggleButton(); detailsViewButton.setIcon(detailsViewIcon); toggles.add(detailsViewButton); buttonPanel.add(detailsViewButton); JPanel topPanel = new JPanel(); topPanel.setLayout(new java.awt.FlowLayout()); topPanel.add(parentsPanel); topPanel.add(buttonPanel); accessoryPanel = new JPanel(); if (filechooser.getAccessory() != null) accessoryPanel.add(filechooser.getAccessory(), BorderLayout.CENTER); filelist = new JList(model); filelist.setVisibleRowCount(6); JScrollPane scrollp = new JScrollPane(filelist); scrollp.setPreferredSize(new Dimension(400, 175)); filelist.setBackground(Color.WHITE); filelist.setLayoutOrientation(JList.VERTICAL_WRAP); filelist.setCellRenderer(new ListLabelRenderer()); GridBagConstraints c = new GridBagConstraints(); c.gridx = 0; c.gridy = 0; c.fill = GridBagConstraints.BOTH; c.weightx = 1; c.weighty = 1; JPanel centrePanel = new JPanel(); centrePanel.setLayout(new GridBagLayout()); centrePanel.add(scrollp, c); c.gridx = 1; centrePanel.add(accessoryPanel, c); JLabel fileNameLabel = new JLabel("File Name:"); JLabel fileTypesLabel = new JLabel("Files of Type:"); JTextField entry = new JTextField(); filters = new JComboBox(); filterEntries(); fileNameLabel.setLabelFor(entry); fileNameLabel.setHorizontalTextPosition(SwingConstants.LEFT); fileTypesLabel.setLabelFor(filters); fileTypesLabel.setHorizontalTextPosition(SwingConstants.LEFT); closePanel = new JPanel(); accept = getApproveButton(filechooser); cancel = new JButton(cancelButtonText); cancel.setMnemonic(cancelButtonMnemonic); cancel.setToolTipText(cancelButtonToolTipText); closePanel.add(accept); closePanel.add(cancel); c.anchor = GridBagConstraints.WEST; c.weighty = 0; c.weightx = 0; c.gridx = 0; bottomPanel = new JPanel(); bottomPanel.setLayout(new GridBagLayout()); bottomPanel.add(fileNameLabel, c); c.gridy = 1; bottomPanel.add(fileTypesLabel, c); c.gridx = 1; c.gridy = 0; c.weightx = 1; c.weighty = 1; bottomPanel.add(entry, c); c.gridy = 1; bottomPanel.add(filters, c); c.fill = GridBagConstraints.NONE; c.gridy = 2; c.anchor = GridBagConstraints.EAST; bottomPanel.add(closePanel, c); filechooser.setLayout(new BorderLayout()); filechooser.add(topPanel, BorderLayout.NORTH); filechooser.add(centrePanel, BorderLayout.CENTER); filechooser.add(bottomPanel, BorderLayout.SOUTH); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/045a5b41cdfa747889101d3993040acf89788bc4/BasicFileChooserUI.java/clean/core/src/classpath/javax/javax/swing/plaf/basic/BasicFileChooserUI.java
Object path = filechooser.getCurrentDirectory(); if (path != null) parentPath = path.toString().substring(path.toString().lastIndexOf("/"));
public void installUI(JComponent c) { if (c instanceof JFileChooser) { JFileChooser fc = (JFileChooser) c; fc.resetChoosableFileFilters(); createModel(); clearIconCache(); installDefaults(fc); installComponents(fc); installListeners(fc); } }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/045a5b41cdfa747889101d3993040acf89788bc4/BasicFileChooserUI.java/clean/core/src/classpath/javax/javax/swing/plaf/basic/BasicFileChooserUI.java
newaxis.setAxisId(null);
newaxis.setAxisId(findUniqueIdName(AxisObj,newaxis.getAxisId())); AxisObj.put(newaxis.getAxisId(), newaxis);
public Object action (SaxDocumentHandler handler, AttributeList attrs) { // create new object appropriately Axis newaxis = new Axis(); newaxis.setXMLAttributes(attrs); // set XML attributes from passed list // Every axis must have *either* axisId *or* an axisIdRef // else, its illegal! String axisId = null; String axisIdRef = null; if ( (axisId = newaxis.getAxisId()) != null || (axisIdRef = newaxis.getAxisIdRef()) != null ) { // add this object to the lookup table, if it has an ID if (axisId != null) { // a warning check, just in case if (AxisObj.containsKey(axisId)) Log.warnln("More than one axis node with axisId=\""+axisId+"\", using latest node." ); // add this into the list of axis objects AxisObj.put(axisId, newaxis); } // If there is a reference object, clone it to get // the new axis if (axisIdRef != null) { if (AxisObj.containsKey(axisIdRef)) { BaseObject refAxisObj = (BaseObject) AxisObj.get(axisIdRef); try { newaxis = (Axis) refAxisObj.clone(); } catch (java.lang.CloneNotSupportedException e) { Log.errorln("Weird error, cannot clone axis object. Aborting read."); System.exit(-1); } // override attrs with those in passed list newaxis.setXMLAttributes(attrs); newaxis.setAxisId(null); // shouldnt have the axisId from refObj } else { Log.warnln("Error: Reader got an axis with AxisIdRef=\""+axisIdRef+"\" but no previous axis has that id! Ignoring add axis request."); return (Object) null; } } // add this axis to the current array object CurrentArray.addAxis(newaxis); // I dont believe this is actually used // CurrentDatatypeObject = newaxis; } else { Log.errorln("Axis object:"+newaxis+" lacks either axisId or axisIdRef, ignoring!"); } return newaxis; }
4483 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4483/51c1f5110504af22199bf58d876ab8653c82dee0/SaxDocumentHandler.java/clean/src/gov/nasa/gsfc/adc/xdf/SaxDocumentHandler.java
List iterationList = myLocator.getIterationOrder(); Iterator liter = iterationList.iterator(); while (liter.hasNext()) { Axis axis = (Axis) liter.next(); Log.errorln("ITERATION AXIS NAME:"+axis.getName()); }
public void action (SaxDocumentHandler handler) { // we stopped reading datanode, lower count by one DataNodeLevel--; // we might still be nested within a data node // if so, return now to accumulate more data within the DATABLOCK if(DataNodeLevel != 0) return; // now we are ready to read in untagged data (both delimited/formmatted styles) // from the DATABLOCK // Note: unfortunately we are reduced to using regex style matching // instead of a buffer read in formatted reads. Come back and // improve this later if possible. XMLDataIOStyle formatObj = CurrentArray.getXMLDataIOStyle(); if ( formatObj instanceof DelimitedXMLDataIOStyle || formatObj instanceof FormattedXMLDataIOStyle ) { // determine the size of the dataFormat (s) in our dataCube if (CurrentArray.hasFieldAxis()) { // if there is a field axis, then its set to the number of fields FieldAxis fieldAxis = CurrentArray.getFieldAxis(); MaxDataFormatIndex = (fieldAxis.getLength()-1); } else { // its homogeneous MaxDataFormatIndex = 0; } Locator myLocator = CurrentArray.createLocator();List iterationList = myLocator.getIterationOrder();Iterator liter = iterationList.iterator();while (liter.hasNext()) { Axis axis = (Axis) liter.next(); Log.errorln("ITERATION AXIS NAME:"+axis.getName());} myLocator.setIterationOrder(AxisReadOrder); CurrentDataFormatIndex = 0; ArrayList strValueList;// boolean dataHasSpecialIntegers = false; // set up appropriate instructions for reading if ( formatObj instanceof FormattedXMLDataIOStyle ) {/* $template = $formatObj->_templateNotation(1); $recordSize = $formatObj->bytes(); $data_has_special_integers = $formatObj->hasSpecialIntegers;*/ // snag the string representation of the values strValueList = formattedSplitStringIntoStringObjects( DATABLOCK.toString(), ((FormattedXMLDataIOStyle) formatObj) ); if (strValueList.size() == 0) { Log.errorln("Error: XDF Reader is unable to acquire formatted data, bad format?"); System.exit(-1); } } else { // snag the string representation of the values strValueList = splitStringIntoStringObjects( DATABLOCK.toString(), ((DelimitedXMLDataIOStyle) formatObj).getDelimiter(), ((DelimitedXMLDataIOStyle) formatObj).getRepeatable(), ((DelimitedXMLDataIOStyle) formatObj).getRecordTerminator() ); } // fire data into dataCube Iterator iter = strValueList.iterator(); while (iter.hasNext()) { DataFormat CurrentDataFormat = DataFormatList[CurrentDataFormatIndex]; // adding data based on what type.. addDataToCurrentArray(myLocator, (String) iter.next(), CurrentDataFormat); // bump up DataFormat appropriately if (MaxDataFormatIndex > 0) { int currentFastAxisCoordinate = myLocator.getAxisLocation(FastestAxis); if ( currentFastAxisCoordinate != LastFastAxisCoordinate ) { LastFastAxisCoordinate = currentFastAxisCoordinate; if (CurrentDataFormatIndex == MaxDataFormatIndex) CurrentDataFormatIndex = 0; else CurrentDataFormatIndex++; } } myLocator.next(); } } else if ( formatObj instanceof TaggedXMLDataIOStyle ) { // Tagged case: do nothing } else { Log.errorln("ERROR: Completely unknown DATA IO style:"+formatObj.toString() +" aborting read!"); System.exit(-1); } }
4483 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4483/51c1f5110504af22199bf58d876ab8653c82dee0/SaxDocumentHandler.java/clean/src/gov/nasa/gsfc/adc/xdf/SaxDocumentHandler.java
public void action (SaxDocumentHandler handler) { // we stopped reading datanode, lower count by one DataNodeLevel--; // we might still be nested within a data node // if so, return now to accumulate more data within the DATABLOCK if(DataNodeLevel != 0) return; // now we are ready to read in untagged data (both delimited/formmatted styles) // from the DATABLOCK // Note: unfortunately we are reduced to using regex style matching // instead of a buffer read in formatted reads. Come back and // improve this later if possible. XMLDataIOStyle formatObj = CurrentArray.getXMLDataIOStyle(); if ( formatObj instanceof DelimitedXMLDataIOStyle || formatObj instanceof FormattedXMLDataIOStyle ) { // determine the size of the dataFormat (s) in our dataCube if (CurrentArray.hasFieldAxis()) { // if there is a field axis, then its set to the number of fields FieldAxis fieldAxis = CurrentArray.getFieldAxis(); MaxDataFormatIndex = (fieldAxis.getLength()-1); } else { // its homogeneous MaxDataFormatIndex = 0; } Locator myLocator = CurrentArray.createLocator();List iterationList = myLocator.getIterationOrder();Iterator liter = iterationList.iterator();while (liter.hasNext()) { Axis axis = (Axis) liter.next(); Log.errorln("ITERATION AXIS NAME:"+axis.getName());} myLocator.setIterationOrder(AxisReadOrder); CurrentDataFormatIndex = 0; ArrayList strValueList;// boolean dataHasSpecialIntegers = false; // set up appropriate instructions for reading if ( formatObj instanceof FormattedXMLDataIOStyle ) {/* $template = $formatObj->_templateNotation(1); $recordSize = $formatObj->bytes(); $data_has_special_integers = $formatObj->hasSpecialIntegers;*/ // snag the string representation of the values strValueList = formattedSplitStringIntoStringObjects( DATABLOCK.toString(), ((FormattedXMLDataIOStyle) formatObj) ); if (strValueList.size() == 0) { Log.errorln("Error: XDF Reader is unable to acquire formatted data, bad format?"); System.exit(-1); } } else { // snag the string representation of the values strValueList = splitStringIntoStringObjects( DATABLOCK.toString(), ((DelimitedXMLDataIOStyle) formatObj).getDelimiter(), ((DelimitedXMLDataIOStyle) formatObj).getRepeatable(), ((DelimitedXMLDataIOStyle) formatObj).getRecordTerminator() ); } // fire data into dataCube Iterator iter = strValueList.iterator(); while (iter.hasNext()) { DataFormat CurrentDataFormat = DataFormatList[CurrentDataFormatIndex]; // adding data based on what type.. addDataToCurrentArray(myLocator, (String) iter.next(), CurrentDataFormat); // bump up DataFormat appropriately if (MaxDataFormatIndex > 0) { int currentFastAxisCoordinate = myLocator.getAxisLocation(FastestAxis); if ( currentFastAxisCoordinate != LastFastAxisCoordinate ) { LastFastAxisCoordinate = currentFastAxisCoordinate; if (CurrentDataFormatIndex == MaxDataFormatIndex) CurrentDataFormatIndex = 0; else CurrentDataFormatIndex++; } } myLocator.next(); } } else if ( formatObj instanceof TaggedXMLDataIOStyle ) { // Tagged case: do nothing } else { Log.errorln("ERROR: Completely unknown DATA IO style:"+formatObj.toString() +" aborting read!"); System.exit(-1); } }
4483 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4483/51c1f5110504af22199bf58d876ab8653c82dee0/SaxDocumentHandler.java/clean/src/gov/nasa/gsfc/adc/xdf/SaxDocumentHandler.java
public void action (SaxDocumentHandler handler) { // we stopped reading datanode, lower count by one DataNodeLevel--; // we might still be nested within a data node // if so, return now to accumulate more data within the DATABLOCK if(DataNodeLevel != 0) return; // now we are ready to read in untagged data (both delimited/formmatted styles) // from the DATABLOCK // Note: unfortunately we are reduced to using regex style matching // instead of a buffer read in formatted reads. Come back and // improve this later if possible. XMLDataIOStyle formatObj = CurrentArray.getXMLDataIOStyle(); if ( formatObj instanceof DelimitedXMLDataIOStyle || formatObj instanceof FormattedXMLDataIOStyle ) { // determine the size of the dataFormat (s) in our dataCube if (CurrentArray.hasFieldAxis()) { // if there is a field axis, then its set to the number of fields FieldAxis fieldAxis = CurrentArray.getFieldAxis(); MaxDataFormatIndex = (fieldAxis.getLength()-1); } else { // its homogeneous MaxDataFormatIndex = 0; } Locator myLocator = CurrentArray.createLocator();List iterationList = myLocator.getIterationOrder();Iterator liter = iterationList.iterator();while (liter.hasNext()) { Axis axis = (Axis) liter.next(); Log.errorln("ITERATION AXIS NAME:"+axis.getName());} myLocator.setIterationOrder(AxisReadOrder); CurrentDataFormatIndex = 0; ArrayList strValueList;// boolean dataHasSpecialIntegers = false; // set up appropriate instructions for reading if ( formatObj instanceof FormattedXMLDataIOStyle ) {/* $template = $formatObj->_templateNotation(1); $recordSize = $formatObj->bytes(); $data_has_special_integers = $formatObj->hasSpecialIntegers;*/ // snag the string representation of the values strValueList = formattedSplitStringIntoStringObjects( DATABLOCK.toString(), ((FormattedXMLDataIOStyle) formatObj) ); if (strValueList.size() == 0) { Log.errorln("Error: XDF Reader is unable to acquire formatted data, bad format?"); System.exit(-1); } } else { // snag the string representation of the values strValueList = splitStringIntoStringObjects( DATABLOCK.toString(), ((DelimitedXMLDataIOStyle) formatObj).getDelimiter(), ((DelimitedXMLDataIOStyle) formatObj).getRepeatable(), ((DelimitedXMLDataIOStyle) formatObj).getRecordTerminator() ); } // fire data into dataCube Iterator iter = strValueList.iterator(); while (iter.hasNext()) { DataFormat CurrentDataFormat = DataFormatList[CurrentDataFormatIndex]; // adding data based on what type.. addDataToCurrentArray(myLocator, (String) iter.next(), CurrentDataFormat); // bump up DataFormat appropriately if (MaxDataFormatIndex > 0) { int currentFastAxisCoordinate = myLocator.getAxisLocation(FastestAxis); if ( currentFastAxisCoordinate != LastFastAxisCoordinate ) { LastFastAxisCoordinate = currentFastAxisCoordinate; if (CurrentDataFormatIndex == MaxDataFormatIndex) CurrentDataFormatIndex = 0; else CurrentDataFormatIndex++; } } myLocator.next(); } } else if ( formatObj instanceof TaggedXMLDataIOStyle ) { // Tagged case: do nothing } else { Log.errorln("ERROR: Completely unknown DATA IO style:"+formatObj.toString() +" aborting read!"); System.exit(-1); } }
4483 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4483/51c1f5110504af22199bf58d876ab8653c82dee0/SaxDocumentHandler.java/clean/src/gov/nasa/gsfc/adc/xdf/SaxDocumentHandler.java
addDataToCurrentArray(myLocator, (String) iter.next(), CurrentDataFormat);
String thisData = (String) iter.next(); addDataToCurrentArray(myLocator, thisData, CurrentDataFormat);
public void action (SaxDocumentHandler handler) { // we stopped reading datanode, lower count by one DataNodeLevel--; // we might still be nested within a data node // if so, return now to accumulate more data within the DATABLOCK if(DataNodeLevel != 0) return; // now we are ready to read in untagged data (both delimited/formmatted styles) // from the DATABLOCK // Note: unfortunately we are reduced to using regex style matching // instead of a buffer read in formatted reads. Come back and // improve this later if possible. XMLDataIOStyle formatObj = CurrentArray.getXMLDataIOStyle(); if ( formatObj instanceof DelimitedXMLDataIOStyle || formatObj instanceof FormattedXMLDataIOStyle ) { // determine the size of the dataFormat (s) in our dataCube if (CurrentArray.hasFieldAxis()) { // if there is a field axis, then its set to the number of fields FieldAxis fieldAxis = CurrentArray.getFieldAxis(); MaxDataFormatIndex = (fieldAxis.getLength()-1); } else { // its homogeneous MaxDataFormatIndex = 0; } Locator myLocator = CurrentArray.createLocator();List iterationList = myLocator.getIterationOrder();Iterator liter = iterationList.iterator();while (liter.hasNext()) { Axis axis = (Axis) liter.next(); Log.errorln("ITERATION AXIS NAME:"+axis.getName());} myLocator.setIterationOrder(AxisReadOrder); CurrentDataFormatIndex = 0; ArrayList strValueList;// boolean dataHasSpecialIntegers = false; // set up appropriate instructions for reading if ( formatObj instanceof FormattedXMLDataIOStyle ) {/* $template = $formatObj->_templateNotation(1); $recordSize = $formatObj->bytes(); $data_has_special_integers = $formatObj->hasSpecialIntegers;*/ // snag the string representation of the values strValueList = formattedSplitStringIntoStringObjects( DATABLOCK.toString(), ((FormattedXMLDataIOStyle) formatObj) ); if (strValueList.size() == 0) { Log.errorln("Error: XDF Reader is unable to acquire formatted data, bad format?"); System.exit(-1); } } else { // snag the string representation of the values strValueList = splitStringIntoStringObjects( DATABLOCK.toString(), ((DelimitedXMLDataIOStyle) formatObj).getDelimiter(), ((DelimitedXMLDataIOStyle) formatObj).getRepeatable(), ((DelimitedXMLDataIOStyle) formatObj).getRecordTerminator() ); } // fire data into dataCube Iterator iter = strValueList.iterator(); while (iter.hasNext()) { DataFormat CurrentDataFormat = DataFormatList[CurrentDataFormatIndex]; // adding data based on what type.. addDataToCurrentArray(myLocator, (String) iter.next(), CurrentDataFormat); // bump up DataFormat appropriately if (MaxDataFormatIndex > 0) { int currentFastAxisCoordinate = myLocator.getAxisLocation(FastestAxis); if ( currentFastAxisCoordinate != LastFastAxisCoordinate ) { LastFastAxisCoordinate = currentFastAxisCoordinate; if (CurrentDataFormatIndex == MaxDataFormatIndex) CurrentDataFormatIndex = 0; else CurrentDataFormatIndex++; } } myLocator.next(); } } else if ( formatObj instanceof TaggedXMLDataIOStyle ) { // Tagged case: do nothing } else { Log.errorln("ERROR: Completely unknown DATA IO style:"+formatObj.toString() +" aborting read!"); System.exit(-1); } }
4483 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4483/51c1f5110504af22199bf58d876ab8653c82dee0/SaxDocumentHandler.java/clean/src/gov/nasa/gsfc/adc/xdf/SaxDocumentHandler.java
LastFastAxisCoordinate = 0;
LastFastAxisCoordinate = -1;
public Object action (SaxDocumentHandler handler, AttributeList attrs) { // we only need to do these things for the first time we enter // a data node if (DataNodeLevel == 0) { // update the array dataCube with passed attributes CurrentArray.getDataCube().setXMLAttributes(attrs); // determine the size of the dataFormat (s) in our dataCube if (CurrentArray.hasFieldAxis()) { // if there is a field axis, then its set to the number of fields FieldAxis fieldAxis = CurrentArray.getFieldAxis(); MaxDataFormatIndex = (fieldAxis.getLength()-1); } else { // its homogeneous MaxDataFormatIndex = 0; } // reset to start of which dataformat type we currently are reading CurrentDataFormatIndex = 0; // reset the list of dataformats we are reading DataFormatList = CurrentArray.getDataFormatList(); } XMLDataIOStyle readObj = CurrentArray.getXMLDataIOStyle(); FastestAxis = (AxisInterface) CurrentArray.getAxisList().get(0); LastFastAxisCoordinate = 0; if ( readObj instanceof TaggedXMLDataIOStyle) { TaggedLocatorObj = CurrentArray.createLocator(); } else { // A safety. We clear datablock when this is the first datanode we // have entered DATABLOCK is used in cases where we read in untagged data if (DataNodeLevel == 0) DATABLOCK = new StringBuffer (); } // entered a datanode, raise the count // this (partially helps) declare we are now reading data, DataNodeLevel++; return readObj; }
4483 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4483/51c1f5110504af22199bf58d876ab8653c82dee0/SaxDocumentHandler.java/clean/src/gov/nasa/gsfc/adc/xdf/SaxDocumentHandler.java
newfieldaxis.setAxisId(findUniqueIdName(AxisObj, newfieldaxis.getAxisId())); AxisObj.put(newfieldaxis.getAxisId(), newfieldaxis);
public Object action (SaxDocumentHandler handler, AttributeList attrs) { // create new object appropriately FieldAxis newfieldaxis = new FieldAxis(); newfieldaxis.setXMLAttributes(attrs); // set XML attributes from passed list // Every axis must have *either* axisId *or* an axisIdRef // else, its illegal! String axisId = null; String axisIdRef = null; if ( (axisId = newfieldaxis.getAxisId()) != null || (axisIdRef = newfieldaxis.getAxisIdRef()) != null ) { // add this object to the lookup table, if it has an ID if (axisId != null) { // a warning check, just in case if (AxisObj.containsKey(axisId)) Log.warnln("More than one axis node with axisId=\""+axisId+"\", using latest node." ); // add this into the list of axis objects AxisObj.put(axisId, newfieldaxis); } // If there is a reference object, clone it to get // the new axis if (axisIdRef != null) { if (AxisObj.containsKey(axisIdRef)) { BaseObject refAxisObj = (BaseObject) AxisObj.get(axisIdRef); try { newfieldaxis = (FieldAxis) refAxisObj.clone(); } catch (java.lang.CloneNotSupportedException e) { Log.errorln("Weird error, cannot clone field object. Aborting read."); System.exit(-1); } // override attrs with those in passed list newfieldaxis.setXMLAttributes(attrs); } else { Log.warnln("Error: Reader got an fieldaxis with AxisIdRef=\""+axisIdRef+"\" but no previous field axis has that id! Ignoring add fieldAxis request."); return (Object) null; } } // add this axis to the current array object CurrentArray.addFieldAxis(newfieldaxis); } else { Log.errorln("FieldAxis object:"+newfieldaxis+" lacks either axisId or axisIdRef, ignoring!"); } return newfieldaxis; }
4483 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4483/51c1f5110504af22199bf58d876ab8653c82dee0/SaxDocumentHandler.java/clean/src/gov/nasa/gsfc/adc/xdf/SaxDocumentHandler.java