rem
stringlengths
0
477k
add
stringlengths
0
313k
context
stringlengths
6
599k
meta
stringlengths
141
403
"Invalid signature in getArgSlotCount: " + signature);*/ return getArgSlotCount(signature.toCharArray());
"Invalid signature in getArgSlotCount: " + String.valueOf(signature));
public static final int getArgSlotCount(String signature) { /*int ofs = 0; final int len = signature.length(); if (signature.charAt(ofs++) != '(') return 0; int count = 0; while (ofs < len) { char ch = signature.charAt(ofs++); switch (ch) { case ')' : return count; case 'B' : // Byte case 'Z' : // Boolean case 'C' : // Char case 'S' : // Short case 'I' : // Int case 'F' : // Float count++; break; case 'D' : // Double case 'J' : // Long count += 2; break; case '[' : // Array { count++; while (signature.charAt(ofs) == '[') ofs++; if (signature.charAt(ofs) == 'L') { ofs++; while (signature.charAt(ofs) != ';') ofs++; } ofs++; } break; case 'L' : // Object { count++; while (signature.charAt(ofs) != ';') ofs++; ofs++; } break; } } throw new RuntimeException( "Invalid signature in getArgSlotCount: " + signature);*/ return getArgSlotCount(signature.toCharArray()); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/51e4aed2205f326c2698e2154ea7f83ae5dfc2b6/Signature.java/buggy/core/src/core/org/jnode/vm/classmgr/Signature.java
{
{
public Exception getException() { return exception; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/TransformerFactoryConfigurationError.java/clean/core/src/classpath/javax/javax/xml/transform/TransformerFactoryConfigurationError.java
}
}
public Exception getException() { return exception; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/TransformerFactoryConfigurationError.java/clean/core/src/classpath/javax/javax/xml/transform/TransformerFactoryConfigurationError.java
Log.infoln("Locator.setIterationOrder() has reset the current location to the dataCube origin.");
public void setIterationOrder (List axisIterationList) { int stop = axisIterationList.size(); for (int i = 0; i < stop; i++) { Object axisObj = axisIterationList.get(i); axisOrderList.add(axisObj); locations.put(axisObj, new Integer(0)); } }
4483 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4483/7a1f6cf6a7a7fc6090c4fb963741090ff753f9cc/Locator.java/buggy/src/gov/nasa/gsfc/adc/xdf/Locator.java
System.out.println("restore screen partial");
private void parseIncoming() { boolean controlChars = false; byte control0; byte control1; boolean done = false; boolean error = false; try { while (bk.hasNext() && !done) { byte b = bk.getNextByte(); switch (b) { case 0: case 1: break; case CMD_SAVE_SCREEN: // 0x02 2 Save Screen case 3: // 0x03 3 Save Partial Screen// System.out.println("save screen partial"); saveScreen(); break; case ESC: // ESCAPE break; case 7: // audible bell Toolkit.getDefaultToolkit().beep(); bk.getNextByte(); bk.getNextByte(); break; case CMD_WRITE_TO_DISPLAY: // 0x11 17 write to display error = writeToDisplay(true); break; case CMD_RESTORE_SCREEN: // 0x12 18 Restore Screen case 13: // 0x13 19 Restore Partial Screen System.out.println("restore screen partial"); restoreScreen(); break; case CMD_CLEAR_UNIT_ALTERNATE: // 0x20 32 clear unit alternate int param = bk.getNextByte(); if (param != 0) {// System.out.println(" clear unit alternate error " + Integer.toHexString(param)); sendNegResponse(NR_REQUEST_ERROR,03,01,05, " clear unit alternate not supported"); done = true; } else { if (screen52.getRows() != 27) screen52.setRowsCols(27,132); screen52.clearAll(); } break; case CMD_WRITE_ERROR_CODE: // 0x21 33 Write Error Code writeErrorCode(); error = writeToDisplay(false); break; case CMD_WRITE_ERROR_CODE_TO_WINDOW: // 0x22 34 // Write Error Code to window writeErrorCodeToWindow(); error = writeToDisplay(false); break; case CMD_READ_SCREEN_IMMEDIATE: // 0x62 98 case CMD_READ_SCREEN_TO_PRINT: // 0x66 102 read screen to print readScreen(); break; case CMD_CLEAR_UNIT: // 64 0x40 clear unit if (screen52.getRows() != 24) screen52.setRowsCols(24,80); screen52.clearAll(); break; case CMD_CLEAR_FORMAT_TABLE: // 80 0x50 Clear format table screen52.clearTable(); break; case CMD_READ_INPUT_FIELDS: //0x42 66 read input fields case CMD_READ_MDT_FIELDS: // 0x52 82 read MDT Fields bk.getNextByte(); bk.getNextByte(); readType = b; screen52.goHome();// screen52.setCursorOn(); waitingForInput = true; pendingUnlock = true;// screen52.setKeyboardLocked(false); break; case CMD_READ_MDT_IMMEDIATE_ALT: // 0x53 83 readType = b;// screen52.goHome();// waitingForInput = true;// screen52.setKeyboardLocked(false); readImmediate(readType); break; case CMD_WRITE_STRUCTURED_FIELD: // 243 0xF3 -13 Write structured field writeStructuredField(); break; default: done = true; sendNegResponse(NR_REQUEST_ERROR,03,01,01,"parseIncoming"); break; } if (error) done = true; } } catch (Exception exc) {System.out.println("incoming " + exc.getMessage());}; }
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/138d7f531fedca589f174b282c497f86f7e83899/tnvt.java/buggy/tn5250j/src/org/tn5250j/tnvt.java
screen52.clearGuiStuff();
private boolean writeToDisplayStructuredField() { boolean error = false; boolean done = false; int nextone; try { int length = (( bk.getNextByte() & 0xff )<< 8 | (bk.getNextByte() & 0xff)); while (!done) { int s = bk.getNextByte() & 0xff; switch (s) { case 0xD9: // Class Type 0xD9 - Create Window switch (bk.getNextByte()) {// case 0x50: // Define Selection Field//// defineSelectionField(length);// done = true;// break; case 0x51: // Create Window boolean cr = false; int rows = 0; int cols = 0; // pull down not supported yet if ((bk.getNextByte() & 0x80) == 0x80) cr = true; // restrict cursor bk.getNextByte(); // get reserved field pos 6 bk.getNextByte(); // get reserved field pos 7 rows = bk.getNextByte(); // get window depth rows pos 8 cols = bk.getNextByte(); // get window width cols pos 9 length -= 9; if (length == 0) { done = true;// System.out.println("Create Window");// System.out.println(" restrict cursor " + cr);// System.out.println(" Depth = " + rows + " Width = " + cols); screen52.createWindow(rows,cols,1,true,32,58, '.', '.', '.', ':', ':', ':', '.', ':'); break; } // pos 10 is Minor Structure int ml = 0; int type = 0; int lastPos = screen52.getLastPos();// if (cr)// screen52.setPendingInsert(true,// screen52.getCurrentRow(),// screen52.getCurrentCol()); int mAttr = 0; int cAttr = 0; while (length > 0) { // get minor length ml = ( bk.getNextByte() & 0xff ); length -= ml; // only normal windows are supported at this time type = bk.getNextByte(); switch (type) { case 0x01 : // Border presentation boolean gui = false; if ((bk.getNextByte() & 0x80) == 0x80) gui = true; mAttr = bk.getNextByte(); cAttr = bk.getNextByte(); char ul = '.'; char upper = '.'; char ur = '.'; char left = ':'; char right = ':'; char ll = ':'; char bottom = '.'; char lr = ':'; // if minor length is greater than 5 then // the border characters are specified if (ml > 5) { ul = getASCIIChar(bk.getNextByte()); if (ul == 0) ul = '.'; upper = getASCIIChar(bk.getNextByte()); if (upper == 0) upper = '.'; ur = getASCIIChar(bk.getNextByte()); if (ur == 0) ur = '.'; left = getASCIIChar(bk.getNextByte()); if (left == 0) left = ':'; right = getASCIIChar(bk.getNextByte()); if (right == 0) right = ':'; ll = getASCIIChar(bk.getNextByte()); if (ll == 0) ll = ':'; bottom = getASCIIChar(bk.getNextByte()); if (bottom == 0) bottom = '.'; lr = getASCIIChar(bk.getNextByte()); if (lr == 0) lr = ':'; }// System.out.println("Create Window");// System.out.println(" restrict cursor " + cr);// System.out.println(" Depth = " + rows + " Width = " + cols);// System.out.println(" type = " + type + " gui = " + gui);// System.out.println(" mono attr = " + mAttr + " color attr = " + cAttr);// System.out.println(" ul = " + ul + " upper = " + upper +// " ur = " + ur +// " left = " + left +// " right = " + right +// " ll = " + ll +// " bottom = " + bottom +// " lr = " + lr// ); screen52.createWindow(rows,cols,type,gui,mAttr,cAttr, ul, upper, ur, left, right, ll, bottom, lr); break; // // The following shows the input for window with a title // // +0000 019A12A0 00000400 00020411 00200107 .......... // +0010 00000018 00000011 06131500 37D95180 ...........R // +0020 00000A24 0D018023 23404040 40404040 ....؃ // +0030 40211000 000000D7 C2C1D9C4 C5D4D67A \uFFFD.....PBARDEMO: // +0040 40D79996 879985A2 A2408281 99408485 Progress bar de // +0050 94961108 1520D5A4 94828599 40968640 mo.Number of // +0060 8595A399 8985A24B 4B4B4B4B 4B7A2011 entries......:. // +0070 082E2040 404040F5 F0F06BF0 F0F02011 . 500,000. // +0080 091520C3 A4999985 95A34085 95A399A8 \uFFFDCurrent entry // +0090 4095A494 8285994B 4B4B7A20 11092E20 number...:.\uFFFD. // +00A0 40404040 4040F56B F0F0F020 110A1520 5,000. // +00B0 D9859481 89958995 87408595 A3998985 Remaining entrie // +00C0 A24B4B4B 4B4B4B7A 20110A2E 20404040 s......:.. // +00D0 40F4F9F5 6BF0F0F0 20110C15 20E2A381 495,000..Sta // +00E0 99A340A3 8994854B 4B4B4B4B 4B4B4B4B rt time......... // +00F0 4B4B4B4B 7A20110C 2F2040F7 7AF5F37A ....:... 7:53: case 0x10 : // Window title/footer byte orientation = bk.getNextByte(); mAttr = bk.getNextByte(); cAttr = bk.getNextByte(); //reserved bk.getNextByte(); ml -= 6; StringBuffer hfBuffer = new StringBuffer(ml); while (ml-- > 0) { hfBuffer.append(getASCIIChar(bk.getNextByte())); } System.out.println( " orientation " + Integer.toBinaryString(orientation) + " mAttr " + mAttr + " cAttr " + cAttr + " Header/Footer " + hfBuffer); screen52.writeWindowTitle(lastPos, rows, cols, orientation, mAttr, cAttr, hfBuffer); break; default: System.out.println("Invalid Window minor structure"); length = 0; done = true; } } done = true; break; case 0x53: // Scroll Bar int sblen = 15; byte sbflag = bk.getNextByte(); // flag position 5 bk.getNextByte(); // reserved position 6 // position 7,8 int totalRowScrollable = (( bk.getNextByte() & 0xff )<< 8 | (bk.getNextByte() & 0xff)); // position 9,10 int totalColScrollable = (( bk.getNextByte() & 0xff )<< 8 | (bk.getNextByte() & 0xff)); // position 11,12 int sliderRowPos = (( bk.getNextByte() & 0xff )<< 8 | (bk.getNextByte() & 0xff)); // position 13,14 int sliderColPos = (( bk.getNextByte() & 0xff )<< 8 | (bk.getNextByte() & 0xff)); // position 15 int sliderRC = bk.getNextByte(); screen52.createScrollBar(sbflag,totalRowScrollable, totalColScrollable, sliderRowPos, sliderColPos, sliderRC); length -= 15; done = true; break; case 0x5B: // Remove GUI ScrollBar field bk.getNextByte(); // reserved must be set to off pos 5 bk.getNextByte(); // reserved must be set to zero pos 6 done = true; break; case 0x5F: // Remove All GUI Constructs// System.out.println("remove all gui contructs"); int len = 4; int d = 0; length -= s; while (--len > 0) d = bk.getNextByte();// if (length > 0) {// len = (bk.getNextByte() & 0xff )<< 8;//// while (--len > 0)// d = bk.getNextByte();// } // per 14.6.13.4 documentation we should clear the // format table after this command screen52.clearTable(); done = true; break; case 0x60: // Erase/Draw Grid Lines - not supported // do not know what they are // as of 03/11/2002 we should not be getting // this anymore but I will leave it here // just in case.// System.out.println("erase/draw grid lines " + length); len = 6; d = 0; length -= 9; while (--len > 0) d = bk.getNextByte(); if (length > 0) { len = (bk.getNextByte() & 0xff )<< 8; while (--len > 0) { d = bk.getNextByte(); } } done = true; break; default: sendNegResponse(NR_REQUEST_ERROR,0x03,0x01,0x01,"invalid wtd structured field sub command " + bk.getByteOffset(-1)); error = true; break; } break; default: sendNegResponse(NR_REQUEST_ERROR,0x03,0x01,0x01, "invalid wtd structured field command " + bk.getByteOffset(-1)); error = true; break; } if (error) done = true; } } catch (Exception e) {}; return error; }
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/138d7f531fedca589f174b282c497f86f7e83899/tnvt.java/buggy/tn5250j/src/org/tn5250j/tnvt.java
b = Character.toString(index).getBytes("Cp1141")[0];
b = characterToString(index).getBytes("Cp1141")[0];
public byte uni2ebcdic (char index) { if (convert) { if (codePage.equals("1141")) { byte b = 0x0; try { b = Character.toString(index).getBytes("Cp1141")[0]; } catch (java.io.UnsupportedEncodingException uee) { uee.printStackTrace(); } return b; } if (codePage.equals("1140")) { byte b = 0x0; try { b = Character.toString(index).getBytes("Cp1140")[0]; } catch (java.io.UnsupportedEncodingException uee) { uee.printStackTrace(); } return b; } int ind = index; int len = unicode.length; if (index > '\u007F') for (int x = 0x80; x < len; x++) { if (unicode[x] == index) {// System.out.println("conversion found " + (char)index + " " + unicode[x]); ind = x; break; } }// System.out.println("using conversion"); return (byte)ascii[ind & 0xff]; } else return (byte)ascii[index & 0xff]; }
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/0906d8d2a99a603761fa1193fa1c71481813bb17/CodePage.java/buggy/tn5250j/src/org/tn5250j/tools/CodePage.java
b = Character.toString(index).getBytes("Cp1140")[0];
b = characterToString(index).getBytes("Cp1140")[0];
public byte uni2ebcdic (char index) { if (convert) { if (codePage.equals("1141")) { byte b = 0x0; try { b = Character.toString(index).getBytes("Cp1141")[0]; } catch (java.io.UnsupportedEncodingException uee) { uee.printStackTrace(); } return b; } if (codePage.equals("1140")) { byte b = 0x0; try { b = Character.toString(index).getBytes("Cp1140")[0]; } catch (java.io.UnsupportedEncodingException uee) { uee.printStackTrace(); } return b; } int ind = index; int len = unicode.length; if (index > '\u007F') for (int x = 0x80; x < len; x++) { if (unicode[x] == index) {// System.out.println("conversion found " + (char)index + " " + unicode[x]); ind = x; break; } }// System.out.println("using conversion"); return (byte)ascii[ind & 0xff]; } else return (byte)ascii[index & 0xff]; }
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/0906d8d2a99a603761fa1193fa1c71481813bb17/CodePage.java/buggy/tn5250j/src/org/tn5250j/tools/CodePage.java
public MarginBorder() { }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/963ae61676e8c35a9e0998e0b7de1f942db82a26/BasicBorders.java/buggy/core/src/classpath/javax/javax/swing/plaf/basic/BasicBorders.java
protected void setPendingInsert(boolean flag) {
protected void setPendingInsert(boolean flag, int icX, int icY) {
protected void setPendingInsert(boolean flag) { if (homePos != -1) pendingInsert = flag; }
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/446c691d87b77c1be3b434626845a4988e42aea7/Screen5250.java/buggy/tn5250j/src/org/tn5250j/framework/tn5250/Screen5250.java
if (homePos != -1)
pendingInsert = flag;
protected void setPendingInsert(boolean flag) { if (homePos != -1) pendingInsert = flag; }
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/446c691d87b77c1be3b434626845a4988e42aea7/Screen5250.java/buggy/tn5250j/src/org/tn5250j/framework/tn5250/Screen5250.java
pendingInsert = flag;
if (pendingInsert) { homePos = getPos(icX, icY); } if (!isStatusErrorCode()) { setCursor(icX, icY); }
protected void setPendingInsert(boolean flag) { if (homePos != -1) pendingInsert = flag; }
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/446c691d87b77c1be3b434626845a4988e42aea7/Screen5250.java/buggy/tn5250j/src/org/tn5250j/framework/tn5250/Screen5250.java
public static Properties getInitProperties() { final String arch; final Vm vm = Vm.getVm(); arch = vm.getArch().getName(); final Properties res = new Properties(); // Java properties res.put("java.version", "1.1.0"); res.put("java.vendor", "JNode.org"); res.put("java.vendor.url", "http://jnode.org"); res.put("java.home", "/"); res.put("java.vm.specification.version", "1.4"); res.put("java.vm.specification.vendor", "JNode.org"); res.put("java.vm.specification.name", "jnode"); res.put("java.vm.version", vm.getVersion()); res.put("java.vm.vendor", "JNode.org"); res.put("java.vm.name", "JNode"); res.put("java.class.version", "1.1"); res.put("java.class.path", ""); res.put("java.library.path", ""); res.put("java.io.tmpdir", "/tmp"); res.put("java.compiler", "Internal"); res.put("java.ext.dirs", ""); res.put("os.name", "JNode"); res.put("os.arch", arch); res.put("os.version", vm.getVersion()); res.put("file.separator", "/"); res.put("path.separator", ":"); res.put("line.separator", "\n"); res.put("user.name", "System"); res.put("user.home", "/"); res.put("user.dir", "/"); // GNU properties res.put("gnu.java.io.encoding_scheme_alias.US-ASCII", "ISO8859-1"); res.put("gnu.java.io.encoding_scheme_alias.UTF-16LE", "UTF16LE"); res.put("gnu.java.io.encoding_scheme_alias.UTF-16BE", "UTF16BE"); return res; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/50e31eccd50a204db22831206646c58f95c4cc44/VmSystem.java/clean/core/src/core/org/jnode/vm/VmSystem.java
res.put("gnu.java.io.encoding_scheme_alias.US-ASCII", "ISO8859-1"); res.put("gnu.java.io.encoding_scheme_alias.UTF-16LE", "UTF16LE"); res.put("gnu.java.io.encoding_scheme_alias.UTF-16BE", "UTF16BE");
res.put("gnu.java.io.encoding_scheme_alias.US-ASCII", "ISO8859-1"); res.put("gnu.java.io.encoding_scheme_alias.UTF-16LE", "UTF16LE"); res.put("gnu.java.io.encoding_scheme_alias.UTF-16BE", "UTF16BE");
public static Properties getInitProperties() { final String arch; final Vm vm = Vm.getVm(); arch = vm.getArch().getName(); final Properties res = new Properties(); // Java properties res.put("java.version", "1.1.0"); res.put("java.vendor", "JNode.org"); res.put("java.vendor.url", "http://jnode.org"); res.put("java.home", "/"); res.put("java.vm.specification.version", "1.4"); res.put("java.vm.specification.vendor", "JNode.org"); res.put("java.vm.specification.name", "jnode"); res.put("java.vm.version", vm.getVersion()); res.put("java.vm.vendor", "JNode.org"); res.put("java.vm.name", "JNode"); res.put("java.class.version", "1.1"); res.put("java.class.path", ""); res.put("java.library.path", ""); res.put("java.io.tmpdir", "/tmp"); res.put("java.compiler", "Internal"); res.put("java.ext.dirs", ""); res.put("os.name", "JNode"); res.put("os.arch", arch); res.put("os.version", vm.getVersion()); res.put("file.separator", "/"); res.put("path.separator", ":"); res.put("line.separator", "\n"); res.put("user.name", "System"); res.put("user.home", "/"); res.put("user.dir", "/"); // GNU properties res.put("gnu.java.io.encoding_scheme_alias.US-ASCII", "ISO8859-1"); res.put("gnu.java.io.encoding_scheme_alias.UTF-16LE", "UTF16LE"); res.put("gnu.java.io.encoding_scheme_alias.UTF-16BE", "UTF16BE"); return res; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/50e31eccd50a204db22831206646c58f95c4cc44/VmSystem.java/clean/core/src/core/org/jnode/vm/VmSystem.java
if (current == proc.getCurrentThread()) {
if (current.isInSystemException()) { proc.disableReschedule(); try { mt = reader.getVmStackTrace(current.getExceptionStackFrame(), current.getExceptionInstructionPointer(), STACKTRACE_LIMIT); } finally { proc.enableReschedule(); } } else if (current == proc.getCurrentThread()) {
public static Object[] getStackTrace(VmThread current) { if (current.inException) { Unsafe.debug("Exception in getStackTrace"); Unsafe.die("getStackTrace"); return null; } else { current.inException = true; } if (Vm.getVm().getHeapManager().isLowOnMemory()) { return null; } final VmProcessor proc = Unsafe.getCurrentProcessor(); final VmStackReader reader = proc.getArchitecture().getStackReader(); final VmStackFrame[] mt; //Address lastIP = null; if (current == proc.getCurrentThread()) { final Address curFrame = Unsafe.getCurrentFrame(); mt = reader.getVmStackTrace(reader.getPrevious(curFrame), reader .getReturnAddress(curFrame), STACKTRACE_LIMIT); } else { proc.disableReschedule(); try { mt = reader.getVmStackTrace(current.getStackFrame(), current .getInstructionPointer(), STACKTRACE_LIMIT); //lastIP = current.getInstructionPointer(); } finally { proc.enableReschedule(); } } final int cnt = (mt == null) ? 0 : mt.length; VmType lastClass = null; int i = 0; while (i < cnt) { final VmStackFrame f = mt[ i]; if (f == null) { break; } final VmMethod method = f.getMethod(); if (method == null) { break; } final VmType vmClass = method.getDeclaringClass(); if (vmClass == null) { break; } final VmType sClass = vmClass.getSuperClass(); if ((lastClass != null) && (sClass != lastClass) && (vmClass != lastClass)) { break; } final String mname = method.getName(); if (mname == null) { break; } if (!("<init>".equals(mname) || "fillInStackTrace".equals(mname) || "getStackTrace" .equals(mname))) { break; } lastClass = vmClass; i++; } final VmStackFrame[] st = new VmStackFrame[ cnt - i]; int j = 0; for (; i < cnt; i++) { st[ j++] = mt[ i]; } current.inException = false; return st; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/50e31eccd50a204db22831206646c58f95c4cc44/VmSystem.java/clean/core/src/core/org/jnode/vm/VmSystem.java
super();
public NoClassDefFoundError() { super(); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/b2ed890086e708f00d163f3e8514bfa8b353f662/NoClassDefFoundError.java/buggy/core/src/classpath/java/java/lang/NoClassDefFoundError.java
public ArrayStoreException(String s) { super(s);
public ArrayStoreException() {
public ArrayStoreException(String s) { super(s); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/b2ed890086e708f00d163f3e8514bfa8b353f662/ArrayStoreException.java/buggy/core/src/classpath/java/java/lang/ArrayStoreException.java
if (eTable != null) { return eTable[index]; } else { throw new IndexOutOfBoundsException("eTable is null; index " + index); } }
if (eTable != null) { return eTable[ index]; } else { throw new IndexOutOfBoundsException("eTable is null; index " + index); } }
public VmCompiledExceptionHandler getExceptionHandler(int index) { if (eTable != null) { return eTable[index]; } else { throw new IndexOutOfBoundsException("eTable is null; index " + index); } }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/50e31eccd50a204db22831206646c58f95c4cc44/VmCompiledCode.java/buggy/core/src/core/org/jnode/vm/classmgr/VmCompiledCode.java
return resolved;
return true;
public boolean isResolved() { return resolved; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/10b9028253f5fe6331eb3ee3c17eb137e07633c9/VmConstObject.java/buggy/core/src/core/org/jnode/vm/classmgr/VmConstObject.java
final int cmpStart = Address.compare(codePtr, nativeCode); final int cmpEnd = Address.compare(codePtr, Address.add(nativeCode, nativeCodeSize1)); return ((cmpStart >= 0) && (cmpEnd < 0)); }
final int cmpStart = Address.compare(codePtr, nativeCode); final int cmpEnd = Address.compare(codePtr, Address.add(nativeCode, nativeCodeSize1)); return ((cmpStart >= 0) && (cmpEnd < 0)); }
public boolean contains(Address codePtr) { final int cmpStart = Address.compare(codePtr, nativeCode); final int cmpEnd = Address.compare(codePtr, Address.add(nativeCode, nativeCodeSize1)); return ((cmpStart >= 0) && (cmpEnd < 0)); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/50e31eccd50a204db22831206646c58f95c4cc44/VmCompiledCode.java/buggy/core/src/core/org/jnode/vm/classmgr/VmCompiledCode.java
return defaultExceptionHandler; }
return defaultExceptionHandler; }
public Address getDefaultExceptionHandler() { return defaultExceptionHandler; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/50e31eccd50a204db22831206646c58f95c4cc44/VmCompiledCode.java/buggy/core/src/core/org/jnode/vm/classmgr/VmCompiledCode.java
ip = stack[i].getReturnAddress();
ip = Address.add(stack[i].getReturnAddress(), -1);
final VmStackFrame[] getVmStackTrace(Address argFrame, Address ip, int limit) { final Address frame = argFrame; Address f = frame; int count = 0; while (isValid(f) && (count < limit)) { count++; f = getPrevious(f); } if ((f != null) && !isStackBottom(f) && (count < limit)) { Unsafe.debug("Corrupted stack!, st.length="); Unsafe.debug(count); Unsafe.debug(" f.magic="); Unsafe.debug(getMagic(f)); //Unsafe.die(); } final VmStackFrame[] stack = new VmStackFrame[count]; f = frame; for (int i = 0; i < count; i++) { stack[i] = new VmStackFrame(f, this, ip); ip = stack[i].getReturnAddress(); f = getPrevious(f); } return stack; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/50e31eccd50a204db22831206646c58f95c4cc44/VmStackReader.java/buggy/core/src/core/org/jnode/vm/VmStackReader.java
public BigDecimal (String num) throws NumberFormatException
public BigDecimal (BigInteger num)
public BigDecimal (String num) throws NumberFormatException { int len = num.length(); int start = 0, point = 0; int dot = -1; boolean negative = false; if (num.charAt(0) == '+') { ++start; ++point; } else if (num.charAt(0) == '-') { ++start; ++point; negative = true; } while (point < len) { char c = num.charAt (point); if (c == '.') { if (dot >= 0) throw new NumberFormatException ("multiple `.'s in number"); dot = point; } else if (c == 'e' || c == 'E') break; else if (Character.digit (c, 10) < 0) throw new NumberFormatException ("unrecognized character: " + c); ++point; } String val; if (dot >= 0) { val = num.substring (start, dot) + num.substring (dot + 1, point); scale = point - 1 - dot; } else { val = num.substring (start, point); scale = 0; } if (val.length () == 0) throw new NumberFormatException ("no digits seen"); if (negative) val = "-" + val; intVal = new BigInteger (val); // Now parse exponent. if (point < len) { point++; if (num.charAt(point) == '+') point++; if (point >= len ) throw new NumberFormatException ("no exponent following e or E"); try { int exp = Integer.parseInt (num.substring (point)); exp -= scale; if (signum () == 0) scale = 0; else if (exp > 0) { intVal = intVal.multiply (BigInteger.valueOf (10).pow (exp)); scale = 0; } else scale = - exp; } catch (NumberFormatException ex) { throw new NumberFormatException ("malformed exponent"); } } }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/e81465c8dc08fe3c0a055c4bb1c2588e37b39c25/BigDecimal.java/buggy/core/src/classpath/java/java/math/BigDecimal.java
int len = num.length(); int start = 0, point = 0; int dot = -1; boolean negative = false; if (num.charAt(0) == '+') { ++start; ++point; } else if (num.charAt(0) == '-') { ++start; ++point; negative = true; } while (point < len) { char c = num.charAt (point); if (c == '.') { if (dot >= 0) throw new NumberFormatException ("multiple `.'s in number"); dot = point; } else if (c == 'e' || c == 'E') break; else if (Character.digit (c, 10) < 0) throw new NumberFormatException ("unrecognized character: " + c); ++point; } String val; if (dot >= 0) { val = num.substring (start, dot) + num.substring (dot + 1, point); scale = point - 1 - dot; } else { val = num.substring (start, point); scale = 0; } if (val.length () == 0) throw new NumberFormatException ("no digits seen"); if (negative) val = "-" + val; intVal = new BigInteger (val); if (point < len) { point++; if (num.charAt(point) == '+') point++; if (point >= len ) throw new NumberFormatException ("no exponent following e or E"); try { int exp = Integer.parseInt (num.substring (point)); exp -= scale; if (signum () == 0) scale = 0; else if (exp > 0) { intVal = intVal.multiply (BigInteger.valueOf (10).pow (exp)); scale = 0; } else scale = - exp; } catch (NumberFormatException ex) { throw new NumberFormatException ("malformed exponent"); } }
this (num, 0);
public BigDecimal (String num) throws NumberFormatException { int len = num.length(); int start = 0, point = 0; int dot = -1; boolean negative = false; if (num.charAt(0) == '+') { ++start; ++point; } else if (num.charAt(0) == '-') { ++start; ++point; negative = true; } while (point < len) { char c = num.charAt (point); if (c == '.') { if (dot >= 0) throw new NumberFormatException ("multiple `.'s in number"); dot = point; } else if (c == 'e' || c == 'E') break; else if (Character.digit (c, 10) < 0) throw new NumberFormatException ("unrecognized character: " + c); ++point; } String val; if (dot >= 0) { val = num.substring (start, dot) + num.substring (dot + 1, point); scale = point - 1 - dot; } else { val = num.substring (start, point); scale = 0; } if (val.length () == 0) throw new NumberFormatException ("no digits seen"); if (negative) val = "-" + val; intVal = new BigInteger (val); // Now parse exponent. if (point < len) { point++; if (num.charAt(point) == '+') point++; if (point >= len ) throw new NumberFormatException ("no exponent following e or E"); try { int exp = Integer.parseInt (num.substring (point)); exp -= scale; if (signum () == 0) scale = 0; else if (exp > 0) { intVal = intVal.multiply (BigInteger.valueOf (10).pow (exp)); scale = 0; } else scale = - exp; } catch (NumberFormatException ex) { throw new NumberFormatException ("malformed exponent"); } } }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/e81465c8dc08fe3c0a055c4bb1c2588e37b39c25/BigDecimal.java/buggy/core/src/classpath/java/java/math/BigDecimal.java
/*if (newFreeSize <= headerSize) { Unsafe.debug("Block splitup failed"); Unsafe.debug("\ncurFreeSize "); Unsafe.debug(curFreeSize); Unsafe.debug("\ntotalSize "); Unsafe.debug(totalSize); Unsafe.debug("\nnewFreeSize "); Unsafe.debug(newFreeSize); Unsafe.debug("\nheaderSize "); Unsafe.debug(headerSize); throw new Error("Block splitup failed"); }*/
protected Object alloc(VmClassType vmClass, int alignedSize) { if (nextFreePtr == null) { /* This heap is full */ return null; } final int totalSize = alignedSize + headerSize; final Object tib = vmClass.getTIB(); //final int size = getSize(); final int tibOffset = this.tibOffset; final int headerSize = this.headerSize; Address objectPtr = null; lock(); try { // Search for the first free block that is large enough //Screen.debug("a"); while (objectPtr == null) { final Address ptr = nextFreePtr; final int objSize = helper.getInt(ptr, sizeOffset); final Object objVmt = helper.getObject(ptr, tibOffset); final Address nextPtr = Address.add(ptr, objSize + headerSize); if ((objVmt == FREE) && (alignedSize <= objSize)) { objectPtr = ptr; } else { if (!inHeap(nextPtr)) { // No large enough free space has been found // A collect may recover smaller free spaces in this // heap, but we leave that to a GC iteration. nextFreePtr = null; //Screen.debug("B"); return null; } else { this.nextFreePtr = nextPtr; } } } //Screen.debug("A"); final int curFreeSize = helper.getInt(objectPtr, sizeOffset); if (curFreeSize > totalSize) { // Block is larger then we need, split it up. final int newFreeSize = curFreeSize - totalSize; final Address newFreePtr = Address.add(objectPtr, totalSize); // Set the header for the remaining free block helper.setInt(newFreePtr, sizeOffset, newFreeSize); helper.setInt(newFreePtr, flagsOffset, 0); helper.setObject(newFreePtr, tibOffset, FREE); // Set the next free offset nextFreePtr = newFreePtr; } else { // The block is not large enough to split up, make the // new object the size of the free block. alignedSize = curFreeSize; } // Create the object header helper.setInt(objectPtr, sizeOffset, alignedSize); helper.setInt(objectPtr, flagsOffset, 0); helper.setObject(objectPtr, tibOffset, tib); // Mark the object in the allocation bitmap setAllocationBit(objectPtr, true); // Fix the freeSize freeSize -= alignedSize; } finally { unlock(); } // Clear the contents of the object. helper.clear(objectPtr, alignedSize); return helper.objectAt(objectPtr); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/17c5c434010c98f6a1acae0cf9ca6782f92f1dfc/VmDefaultHeap.java/buggy/core/src/core/org/jnode/vm/memmgr/def/VmDefaultHeap.java
registerPool.release(l.getLocation());
RegisterLocation regLoc = (RegisterLocation) l.getLocation(); registerPool.release(regLoc.getRegister());
private void expireOldRange(LiveRange lr) { for (int i=0; i<active.size(); i+=1) { LiveRange l = (LiveRange) active.get(i); if (l.getLastUseAddress() >= lr.getAssignAddress()) { return; } active.remove(l); registerPool.release(l.getLocation()); } }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/d18e9a04e790dda0051cb1f66d02c6027be23f2e/LinearScanAllocator.java/buggy/core/src/core/org/jnode/vm/compiler/ir/LinearScanAllocator.java
public StackLocation() { this(0);
public StackLocation(int displacement) { super("local" + displacement); this.displacement = displacement;
public StackLocation() { this(0); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/51e4aed2205f326c2698e2154ea7f83ae5dfc2b6/StackLocation.java/buggy/core/src/core/org/jnode/vm/compiler/ir/StackLocation.java
HelpException(String message) { super(message);
HelpException() { super();
HelpException(String message) { super(message); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/51e4aed2205f326c2698e2154ea7f83ae5dfc2b6/HelpException.java/buggy/shell/src/shell/org/jnode/shell/help/HelpException.java
public void append(SocketBuffer skbuf) {
public void append(int count) {
public void append(SocketBuffer skbuf) { if (next != null) { next.append(skbuf); } else { next = skbuf; } testBuffer(); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/51e4aed2205f326c2698e2154ea7f83ae5dfc2b6/SocketBuffer.java/buggy/net/src/net/org/jnode/net/SocketBuffer.java
next.append(skbuf);
next.append(count);
public void append(SocketBuffer skbuf) { if (next != null) { next.append(skbuf); } else { next = skbuf; } testBuffer(); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/51e4aed2205f326c2698e2154ea7f83ae5dfc2b6/SocketBuffer.java/buggy/net/src/net/org/jnode/net/SocketBuffer.java
next = skbuf;
setSize(size + count);
public void append(SocketBuffer skbuf) { if (next != null) { next.append(skbuf); } else { next = skbuf; } testBuffer(); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/51e4aed2205f326c2698e2154ea7f83ae5dfc2b6/SocketBuffer.java/buggy/net/src/net/org/jnode/net/SocketBuffer.java
kbArea = new Rectangle2D.Float(0,0,0,0);
private void checkOffScreenImage() { // do we have something already? if (bi == null) { bi = new GuiGraphicBuffer(); // allocate a buffer Image with appropriate size bi.getImageBuffer(fmWidth * numCols,fmHeight * (numRows + 2)); // fill in the areas tArea = new Rectangle2D.Float(0,0,0,0); cArea = new Rectangle2D.Float(0,0,0,0); aArea = new Rectangle2D.Float(0,0,0,0); sArea = new Rectangle2D.Float(0,0,0,0); pArea = new Rectangle2D.Float(0,0,0,0); mArea = new Rectangle2D.Float(0,0,0,0); // Draw Operator Information Area drawOIA(); } }
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/dcb947eb588a1d04e8bce2a3cb53d901acfa8f65/Screen5250.java/clean/tn5250j/src/org/tn5250j/Screen5250.java
kbArea.setRect(bi.getKBIndicatorArea());
private void drawOIA() { // get ourselves a global pointer to the graphics g2d = bi.drawOIA(fmWidth,fmHeight,numRows,numCols,font,colorBg,colorBlue); tArea.setRect(bi.getTextArea()); cArea.setRect(bi.getCommandLineArea()); aArea.setRect(bi.getScreenArea()); sArea.setRect(bi.getStatusArea()); pArea.setRect(bi.getPositionArea()); mArea.setRect(bi.getMessageArea()); }
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/dcb947eb588a1d04e8bce2a3cb53d901acfa8f65/Screen5250.java/clean/tn5250j/src/org/tn5250j/Screen5250.java
if (bufferedKeys != null)
if (bufferedKeys != null) {
public void sendKeys(String text) { if (keyboardLocked) { if(text.equals("[reset]") || text.equals("[sysreq]") || text.equals("[attn]")) { bufferedKeys = ""; keysBuffered = false; simulateMnemonic(getMnemonicValue(text)); } 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/dcb947eb588a1d04e8bce2a3cb53d901acfa8f65/Screen5250.java/clean/tn5250j/src/org/tn5250j/Screen5250.java
setKBIndicatorOn(); }
public void sendKeys(String text) { if (keyboardLocked) { if(text.equals("[reset]") || text.equals("[sysreq]") || text.equals("[attn]")) { bufferedKeys = ""; keysBuffered = false; simulateMnemonic(getMnemonicValue(text)); } 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/dcb947eb588a1d04e8bce2a3cb53d901acfa8f65/Screen5250.java/clean/tn5250j/src/org/tn5250j/Screen5250.java
restoreErrorLine(); setStatus(STATUS_ERROR_CODE,STATUS_VALUE_OFF,""); isInField(lastPos); simulated = true; updateDirty();
if (isStatusErrorCode()) { restoreErrorLine(); setStatus(STATUS_ERROR_CODE,STATUS_VALUE_OFF,""); isInField(lastPos); updateDirty(); } setKBIndicatorOff(); simulated = true;
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 : restoreErrorLine(); setStatus(STATUS_ERROR_CODE,STATUS_VALUE_OFF,""); isInField(lastPos); simulated = true; updateDirty(); 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/dcb947eb588a1d04e8bce2a3cb53d901acfa8f65/Screen5250.java/clean/tn5250j/src/org/tn5250j/Screen5250.java
return getPreferredSize(c);
Dimension d = getPreferredSize(c); View view = (View) c.getClientProperty(BasicHTML.propertyKey); if (view != null) d.width += view.getMaximumSpan(View.X_AXIS) - view.getPreferredSpan(View.X_AXIS); return d;
public Dimension getMaximumSize(JComponent c) { return getPreferredSize(c); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ff4d557efcee4a2c3a25a9cac2252bc626fb10fe/BasicToolTipUI.java/clean/core/src/classpath/javax/javax/swing/plaf/basic/BasicToolTipUI.java
return getPreferredSize(c);
Dimension d = getPreferredSize(c); View view = (View) c.getClientProperty(BasicHTML.propertyKey); if (view != null) d.width -= view.getPreferredSpan(View.X_AXIS) - view.getMinimumSpan(View.X_AXIS); return d;
public Dimension getMinimumSize(JComponent c) { return getPreferredSize(c); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ff4d557efcee4a2c3a25a9cac2252bc626fb10fe/BasicToolTipUI.java/clean/core/src/classpath/javax/javax/swing/plaf/basic/BasicToolTipUI.java
FontMetrics fm; Toolkit g = tip.getToolkit(); text = tip.getTipText(); Rectangle vr = new Rectangle(); Rectangle ir = new Rectangle(); Rectangle tr = new Rectangle(); Insets insets = tip.getInsets(); fm = g.getFontMetrics(tip.getFont()); SwingUtilities.layoutCompoundLabel(tip, fm, text, null, SwingConstants.CENTER, SwingConstants.CENTER, SwingConstants.CENTER, SwingConstants.CENTER, vr, ir, tr, 0); return new Dimension(insets.left + tr.width + insets.right, insets.top + tr.height + insets.bottom);
String str = tip.getTipText(); FontMetrics fm = c.getFontMetrics(c.getFont()); Insets i = c.getInsets(); Dimension d = new Dimension(i.left + i.right, i.top + i.bottom); if (str != null && ! str.equals("")) { View view = (View) c.getClientProperty(BasicHTML.propertyKey); if (view != null) { d.width += (int) view.getPreferredSpan(View.X_AXIS); d.height += (int) view.getPreferredSpan(View.Y_AXIS); } else { d.width += fm.stringWidth(str) + 6; d.height += fm.getHeight(); } } return d;
public Dimension getPreferredSize(JComponent c) { JToolTip tip = (JToolTip) c; FontMetrics fm; Toolkit g = tip.getToolkit(); text = tip.getTipText(); Rectangle vr = new Rectangle(); Rectangle ir = new Rectangle(); Rectangle tr = new Rectangle(); Insets insets = tip.getInsets(); fm = g.getFontMetrics(tip.getFont()); SwingUtilities.layoutCompoundLabel(tip, fm, text, null, SwingConstants.CENTER, SwingConstants.CENTER, SwingConstants.CENTER, SwingConstants.CENTER, vr, ir, tr, 0); return new Dimension(insets.left + tr.width + insets.right, insets.top + tr.height + insets.bottom); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ff4d557efcee4a2c3a25a9cac2252bc626fb10fe/BasicToolTipUI.java/clean/core/src/classpath/javax/javax/swing/plaf/basic/BasicToolTipUI.java
propertyChangeHandler = new PropertyChangeHandler(); c.addPropertyChangeListener(propertyChangeHandler);
protected void installListeners(JComponent c) { // TODO: Implement this properly. }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ff4d557efcee4a2c3a25a9cac2252bc626fb10fe/BasicToolTipUI.java/clean/core/src/classpath/javax/javax/swing/plaf/basic/BasicToolTipUI.java
BasicHTML.updateRenderer(c, ((JToolTip) c).getTipText());
public void installUI(JComponent c) { c.setOpaque(true); installDefaults(c); installListeners(c); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ff4d557efcee4a2c3a25a9cac2252bc626fb10fe/BasicToolTipUI.java/clean/core/src/classpath/javax/javax/swing/plaf/basic/BasicToolTipUI.java
Toolkit t = tip.getToolkit(); if (text == null) return; Rectangle vr = new Rectangle(); vr = SwingUtilities.calculateInnerArea(tip, vr); Rectangle ir = new Rectangle(); Rectangle tr = new Rectangle(); FontMetrics fm = t.getFontMetrics(tip.getFont());
Font font = c.getFont(); FontMetrics fm = c.getFontMetrics(font);
public void paint(Graphics g, JComponent c) { JToolTip tip = (JToolTip) c; String text = tip.getTipText(); Toolkit t = tip.getToolkit(); if (text == null) return; Rectangle vr = new Rectangle(); vr = SwingUtilities.calculateInnerArea(tip, vr); Rectangle ir = new Rectangle(); Rectangle tr = new Rectangle(); FontMetrics fm = t.getFontMetrics(tip.getFont()); int ascent = fm.getAscent(); SwingUtilities.layoutCompoundLabel(tip, fm, text, null, SwingConstants.CENTER, SwingConstants.CENTER, SwingConstants.CENTER, SwingConstants.CENTER, vr, ir, tr, 0); Color saved = g.getColor(); g.setColor(Color.BLACK); g.drawString(text, vr.x, vr.y + ascent); g.setColor(saved); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ff4d557efcee4a2c3a25a9cac2252bc626fb10fe/BasicToolTipUI.java/clean/core/src/classpath/javax/javax/swing/plaf/basic/BasicToolTipUI.java
SwingUtilities.layoutCompoundLabel(tip, fm, text, null, SwingConstants.CENTER, SwingConstants.CENTER, SwingConstants.CENTER, SwingConstants.CENTER, vr, ir, tr, 0);
Insets i = c.getInsets(); Dimension size = c.getSize(); Rectangle paintR = new Rectangle(i.left, i.top, size.width - i.left - i.right, size.height - i.top - i.bottom);
public void paint(Graphics g, JComponent c) { JToolTip tip = (JToolTip) c; String text = tip.getTipText(); Toolkit t = tip.getToolkit(); if (text == null) return; Rectangle vr = new Rectangle(); vr = SwingUtilities.calculateInnerArea(tip, vr); Rectangle ir = new Rectangle(); Rectangle tr = new Rectangle(); FontMetrics fm = t.getFontMetrics(tip.getFont()); int ascent = fm.getAscent(); SwingUtilities.layoutCompoundLabel(tip, fm, text, null, SwingConstants.CENTER, SwingConstants.CENTER, SwingConstants.CENTER, SwingConstants.CENTER, vr, ir, tr, 0); Color saved = g.getColor(); g.setColor(Color.BLACK); g.drawString(text, vr.x, vr.y + ascent); g.setColor(saved); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ff4d557efcee4a2c3a25a9cac2252bc626fb10fe/BasicToolTipUI.java/clean/core/src/classpath/javax/javax/swing/plaf/basic/BasicToolTipUI.java
g.drawString(text, vr.x, vr.y + ascent);
View view = (View) c.getClientProperty(BasicHTML.propertyKey); if (view != null) view.paint(g, paintR); else g.drawString(text, paintR.x + 3, paintR.y + ascent);
public void paint(Graphics g, JComponent c) { JToolTip tip = (JToolTip) c; String text = tip.getTipText(); Toolkit t = tip.getToolkit(); if (text == null) return; Rectangle vr = new Rectangle(); vr = SwingUtilities.calculateInnerArea(tip, vr); Rectangle ir = new Rectangle(); Rectangle tr = new Rectangle(); FontMetrics fm = t.getFontMetrics(tip.getFont()); int ascent = fm.getAscent(); SwingUtilities.layoutCompoundLabel(tip, fm, text, null, SwingConstants.CENTER, SwingConstants.CENTER, SwingConstants.CENTER, SwingConstants.CENTER, vr, ir, tr, 0); Color saved = g.getColor(); g.setColor(Color.BLACK); g.drawString(text, vr.x, vr.y + ascent); g.setColor(saved); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ff4d557efcee4a2c3a25a9cac2252bc626fb10fe/BasicToolTipUI.java/clean/core/src/classpath/javax/javax/swing/plaf/basic/BasicToolTipUI.java
g.setFont(oldFont);
public void paint(Graphics g, JComponent c) { JToolTip tip = (JToolTip) c; String text = tip.getTipText(); Toolkit t = tip.getToolkit(); if (text == null) return; Rectangle vr = new Rectangle(); vr = SwingUtilities.calculateInnerArea(tip, vr); Rectangle ir = new Rectangle(); Rectangle tr = new Rectangle(); FontMetrics fm = t.getFontMetrics(tip.getFont()); int ascent = fm.getAscent(); SwingUtilities.layoutCompoundLabel(tip, fm, text, null, SwingConstants.CENTER, SwingConstants.CENTER, SwingConstants.CENTER, SwingConstants.CENTER, vr, ir, tr, 0); Color saved = g.getColor(); g.setColor(Color.BLACK); g.drawString(text, vr.x, vr.y + ascent); g.setColor(saved); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ff4d557efcee4a2c3a25a9cac2252bc626fb10fe/BasicToolTipUI.java/clean/core/src/classpath/javax/javax/swing/plaf/basic/BasicToolTipUI.java
if (propertyChangeHandler != null) { c.removePropertyChangeListener(propertyChangeHandler); propertyChangeHandler = null; }
protected void uninstallListeners(JComponent c) { // TODO: Implement this properly. }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ff4d557efcee4a2c3a25a9cac2252bc626fb10fe/BasicToolTipUI.java/clean/core/src/classpath/javax/javax/swing/plaf/basic/BasicToolTipUI.java
BasicHTML.updateRenderer(c, "");
public void uninstallUI(JComponent c) { uninstallDefaults(c); uninstallListeners(c); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ff4d557efcee4a2c3a25a9cac2252bc626fb10fe/BasicToolTipUI.java/clean/core/src/classpath/javax/javax/swing/plaf/basic/BasicToolTipUI.java
public ToolTipUI() { }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/963ae61676e8c35a9e0998e0b7de1f942db82a26/ToolTipUI.java/buggy/core/src/classpath/javax/javax/swing/plaf/ToolTipUI.java
return new Icon() { public int getIconHeight() { return 10; } public int getIconWidth() { return 10; } public void paintIcon(Component c, Graphics g, int x, int y) { if (c instanceof AbstractButton) { UIDefaults defaults; defaults = UIManager.getLookAndFeelDefaults(); Color hi = defaults.getColor("CheckBox.highlight"); Color low = defaults.getColor("CheckBox.darkShadow"); Color sel = defaults.getColor("CheckBox.foreground"); Color dim = defaults.getColor("CheckBox.shadow"); Polygon check = new Polygon(new int[] {x+3, x+3, x+8}, new int[] {y+5, y+9, y+3}, 3); AbstractButton b = (AbstractButton) c; Color saved = g.getColor(); if (b.isEnabled()) { g.setColor(low); g.drawRect(x, y, 10, 10); g.setColor(hi); g.drawRect(x+1, y+1, 10, 10); if (b.isSelected()) { g.setColor(sel); if (b.isSelected()) { g.drawLine(x+3, y+5, x+3, y+8); g.drawLine(x+4, y+5, x+4, y+8); g.drawLine(x+3, y+8, x+8, y+3); g.drawLine(x+4, y+8, x+8, y+3); } } } else { g.setColor(hi); g.drawRect(x, y, 10, 10); if (b.isSelected()) { g.drawLine(x+3, y+5, x+3, y+9); g.drawLine(x+3, y+9, x+8, y+3); } } g.setColor(saved); } } };
if (checkBoxIcon == null) checkBoxIcon = new CheckBoxIcon(); return checkBoxIcon;
public static Icon getCheckBoxIcon() { return new Icon() { public int getIconHeight() { return 10; } public int getIconWidth() { return 10; } public void paintIcon(Component c, Graphics g, int x, int y) { if (c instanceof AbstractButton) { UIDefaults defaults; defaults = UIManager.getLookAndFeelDefaults(); Color hi = defaults.getColor("CheckBox.highlight"); Color low = defaults.getColor("CheckBox.darkShadow"); Color sel = defaults.getColor("CheckBox.foreground"); Color dim = defaults.getColor("CheckBox.shadow"); Polygon check = new Polygon(new int[] {x+3, x+3, x+8}, new int[] {y+5, y+9, y+3}, 3); AbstractButton b = (AbstractButton) c; Color saved = g.getColor(); if (b.isEnabled()) { g.setColor(low); g.drawRect(x, y, 10, 10); g.setColor(hi); g.drawRect(x+1, y+1, 10, 10); if (b.isSelected()) { g.setColor(sel); if (b.isSelected()) { g.drawLine(x+3, y+5, x+3, y+8); g.drawLine(x+4, y+5, x+4, y+8); g.drawLine(x+3, y+8, x+8, y+3); g.drawLine(x+4, y+8, x+8, y+3); } } } else { g.setColor(hi); g.drawRect(x, y, 10, 10); if (b.isSelected()) { g.drawLine(x+3, y+5, x+3, y+9); g.drawLine(x+3, y+9, x+8, y+3); } } g.setColor(saved); } } }; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/c4eda97e6e5feb8e7650d83d5066d85580f1249c/BasicIconFactory.java/clean/core/src/classpath/javax/javax/swing/plaf/basic/BasicIconFactory.java
return new Icon() { public int getIconHeight() { return 12;
if (radioButtonIcon == null) radioButtonIcon = new RadioButtonIcon(); return radioButtonIcon;
public static Icon getRadioButtonIcon() { return new Icon() { public int getIconHeight() { return 12; } public int getIconWidth() { return 12; } public void paintIcon(Component c, Graphics g, int x, int y) { UIDefaults defaults; defaults = UIManager.getLookAndFeelDefaults(); Color hi = defaults.getColor("RadioButton.highlight"); Color low = defaults.getColor("RadioButton.darkShadow"); Color sel = defaults.getColor("RadioButton.foreground"); Color dim = defaults.getColor("RadioButton.shadow"); if (c instanceof AbstractButton) { AbstractButton b = (AbstractButton) c; Color saved = g.getColor(); if (b.isEnabled()) { g.setColor(low); g.drawOval(x, y, 12, 12); g.setColor(hi); g.drawOval(x+1, y+1, 12, 12); if (b.isSelected()) { g.setColor(sel); g.fillOval(x+4, y+4, 6, 6); } } else { g.setColor(hi); g.drawOval(x, y, 12, 12); if (b.isSelected()) g.fillOval(x+4, y+4, 6, 6); } g.setColor(saved); } } }; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/c4eda97e6e5feb8e7650d83d5066d85580f1249c/BasicIconFactory.java/clean/core/src/classpath/javax/javax/swing/plaf/basic/BasicIconFactory.java
public int getIconWidth() { return 12; } public void paintIcon(Component c, Graphics g, int x, int y) { UIDefaults defaults; defaults = UIManager.getLookAndFeelDefaults(); Color hi = defaults.getColor("RadioButton.highlight"); Color low = defaults.getColor("RadioButton.darkShadow"); Color sel = defaults.getColor("RadioButton.foreground"); Color dim = defaults.getColor("RadioButton.shadow"); if (c instanceof AbstractButton) { AbstractButton b = (AbstractButton) c; Color saved = g.getColor(); if (b.isEnabled()) { g.setColor(low); g.drawOval(x, y, 12, 12); g.setColor(hi); g.drawOval(x+1, y+1, 12, 12); if (b.isSelected()) { g.setColor(sel); g.fillOval(x+4, y+4, 6, 6); } } else { g.setColor(hi); g.drawOval(x, y, 12, 12); if (b.isSelected()) g.fillOval(x+4, y+4, 6, 6); } g.setColor(saved); } } }; }
public static Icon getRadioButtonIcon() { return new Icon() { public int getIconHeight() { return 12; } public int getIconWidth() { return 12; } public void paintIcon(Component c, Graphics g, int x, int y) { UIDefaults defaults; defaults = UIManager.getLookAndFeelDefaults(); Color hi = defaults.getColor("RadioButton.highlight"); Color low = defaults.getColor("RadioButton.darkShadow"); Color sel = defaults.getColor("RadioButton.foreground"); Color dim = defaults.getColor("RadioButton.shadow"); if (c instanceof AbstractButton) { AbstractButton b = (AbstractButton) c; Color saved = g.getColor(); if (b.isEnabled()) { g.setColor(low); g.drawOval(x, y, 12, 12); g.setColor(hi); g.drawOval(x+1, y+1, 12, 12); if (b.isSelected()) { g.setColor(sel); g.fillOval(x+4, y+4, 6, 6); } } else { g.setColor(hi); g.drawOval(x, y, 12, 12); if (b.isSelected()) g.fillOval(x+4, y+4, 6, 6); } g.setColor(saved); } } }; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/c4eda97e6e5feb8e7650d83d5066d85580f1249c/BasicIconFactory.java/clean/core/src/classpath/javax/javax/swing/plaf/basic/BasicIconFactory.java
public ISO9660Directory(ISO9660Entry entry) { this.entry = entry; }
public ISO9660Directory(ISO9660Entry entry) { this.entry = entry; }
public ISO9660Directory(ISO9660Entry entry) { this.entry = entry; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/aa324658a8e5c25a895787936a31595462ad8442/ISO9660Directory.java/buggy/fs/src/fs/org/jnode/fs/iso9660/ISO9660Directory.java
public FSEntry addDirectory(String name) throws IOException { throw new UnsupportedOperationException("Not yet implemented"); }
public FSEntry addDirectory(String name) throws IOException { throw new UnsupportedOperationException("Not yet implemented"); }
public FSEntry addDirectory(String name) throws IOException { throw new UnsupportedOperationException("Not yet implemented"); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/aa324658a8e5c25a895787936a31595462ad8442/ISO9660Directory.java/buggy/fs/src/fs/org/jnode/fs/iso9660/ISO9660Directory.java
public FSEntry addFile(String name) throws IOException { throw new UnsupportedOperationException("Not yet implemented"); }
public FSEntry addFile(String name) throws IOException { throw new UnsupportedOperationException("Not yet implemented"); }
public FSEntry addFile(String name) throws IOException { throw new UnsupportedOperationException("Not yet implemented"); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/aa324658a8e5c25a895787936a31595462ad8442/ISO9660Directory.java/buggy/fs/src/fs/org/jnode/fs/iso9660/ISO9660Directory.java
public FSEntry getEntry(String name) throws IOException { for(Iterator it = this.iterator();it.hasNext();) { ISO9660Entry entry = (ISO9660Entry) it.next(); if(entry.getName().equalsIgnoreCase(name)) return entry; } return null; }
public FSEntry getEntry(String name) throws IOException { for (Iterator it = this.iterator(); it.hasNext();) { ISO9660Entry entry = (ISO9660Entry) it.next(); if (entry.getName().equalsIgnoreCase(name)) return entry; } return null; }
public FSEntry getEntry(String name) throws IOException { for(Iterator it = this.iterator();it.hasNext();) { ISO9660Entry entry = (ISO9660Entry) it.next(); if(entry.getName().equalsIgnoreCase(name)) return entry; } return null; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/aa324658a8e5c25a895787936a31595462ad8442/ISO9660Directory.java/buggy/fs/src/fs/org/jnode/fs/iso9660/ISO9660Directory.java
public FileSystem getFileSystem() { return null; }
public final FileSystem getFileSystem() { return entry.getFileSystem(); }
public FileSystem getFileSystem() { return null; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/aa324658a8e5c25a895787936a31595462ad8442/ISO9660Directory.java/buggy/fs/src/fs/org/jnode/fs/iso9660/ISO9660Directory.java
public boolean isValid() { return true; }
public final boolean isValid() { return true; }
public boolean isValid() { return true; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/aa324658a8e5c25a895787936a31595462ad8442/ISO9660Directory.java/buggy/fs/src/fs/org/jnode/fs/iso9660/ISO9660Directory.java
public Iterator iterator() throws IOException { return new Iterator() { int offset = 0; EntryRecord parent = ISO9660Directory.this.entry.getCDFSentry(); byte[] buffer = parent.getExtentData(); public boolean hasNext() { return buffer[offset] > 0; }
public Iterator iterator() throws IOException { return new Iterator() {
public Iterator iterator() throws IOException { return new Iterator() { int offset = 0; EntryRecord parent = ISO9660Directory.this.entry.getCDFSentry(); byte[] buffer = parent.getExtentData(); public boolean hasNext() { return buffer[offset] > 0; } public Object next() { EntryRecord fEntry = new EntryRecord(parent.getVolume(),buffer,offset); offset += fEntry.getLengthOfDirectoryEntry(); return new ISO9660Entry(fEntry); } public void remove() { throw new UnsupportedOperationException("Not yet implemented"); } }; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/aa324658a8e5c25a895787936a31595462ad8442/ISO9660Directory.java/buggy/fs/src/fs/org/jnode/fs/iso9660/ISO9660Directory.java
public Object next() { EntryRecord fEntry = new EntryRecord(parent.getVolume(),buffer,offset); offset += fEntry.getLengthOfDirectoryEntry(); return new ISO9660Entry(fEntry); }
int offset = 0;
public Iterator iterator() throws IOException { return new Iterator() { int offset = 0; EntryRecord parent = ISO9660Directory.this.entry.getCDFSentry(); byte[] buffer = parent.getExtentData(); public boolean hasNext() { return buffer[offset] > 0; } public Object next() { EntryRecord fEntry = new EntryRecord(parent.getVolume(),buffer,offset); offset += fEntry.getLengthOfDirectoryEntry(); return new ISO9660Entry(fEntry); } public void remove() { throw new UnsupportedOperationException("Not yet implemented"); } }; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/aa324658a8e5c25a895787936a31595462ad8442/ISO9660Directory.java/buggy/fs/src/fs/org/jnode/fs/iso9660/ISO9660Directory.java
public void remove() { throw new UnsupportedOperationException("Not yet implemented"); } }; }
final EntryRecord parent = ISO9660Directory.this.entry .getCDFSentry(); final byte[] buffer = parent.getExtentData(); public boolean hasNext() { return ((offset < buffer.length) && (buffer[ offset] > 0)); } public Object next() { final ISO9660Volume volume = parent.getVolume(); final EntryRecord fEntry = new EntryRecord(volume, buffer, offset, parent.getEncoding()); offset += fEntry.getLengthOfDirectoryEntry(); return new ISO9660Entry((ISO9660FileSystem) entry .getFileSystem(), fEntry); } public void remove() { throw new UnsupportedOperationException("Not yet implemented"); } }; }
public Iterator iterator() throws IOException { return new Iterator() { int offset = 0; EntryRecord parent = ISO9660Directory.this.entry.getCDFSentry(); byte[] buffer = parent.getExtentData(); public boolean hasNext() { return buffer[offset] > 0; } public Object next() { EntryRecord fEntry = new EntryRecord(parent.getVolume(),buffer,offset); offset += fEntry.getLengthOfDirectoryEntry(); return new ISO9660Entry(fEntry); } public void remove() { throw new UnsupportedOperationException("Not yet implemented"); } }; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/aa324658a8e5c25a895787936a31595462ad8442/ISO9660Directory.java/buggy/fs/src/fs/org/jnode/fs/iso9660/ISO9660Directory.java
public boolean hasNext() { return buffer[offset] > 0; }
public boolean hasNext() { return ((offset < buffer.length) && (buffer[ offset] > 0)); }
public boolean hasNext() { return buffer[offset] > 0; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/aa324658a8e5c25a895787936a31595462ad8442/ISO9660Directory.java/buggy/fs/src/fs/org/jnode/fs/iso9660/ISO9660Directory.java
public Object next() { EntryRecord fEntry = new EntryRecord(parent.getVolume(),buffer,offset); offset += fEntry.getLengthOfDirectoryEntry(); return new ISO9660Entry(fEntry); }
public Object next() { final ISO9660Volume volume = parent.getVolume(); final EntryRecord fEntry = new EntryRecord(volume, buffer, offset, parent.getEncoding()); offset += fEntry.getLengthOfDirectoryEntry(); return new ISO9660Entry((ISO9660FileSystem) entry .getFileSystem(), fEntry); }
public Object next() { EntryRecord fEntry = new EntryRecord(parent.getVolume(),buffer,offset); offset += fEntry.getLengthOfDirectoryEntry(); return new ISO9660Entry(fEntry); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/aa324658a8e5c25a895787936a31595462ad8442/ISO9660Directory.java/buggy/fs/src/fs/org/jnode/fs/iso9660/ISO9660Directory.java
public void remove() { throw new UnsupportedOperationException("Not yet implemented"); }
public void remove() { throw new UnsupportedOperationException("Not yet implemented"); }
public void remove() { throw new UnsupportedOperationException("Not yet implemented"); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/aa324658a8e5c25a895787936a31595462ad8442/ISO9660Directory.java/buggy/fs/src/fs/org/jnode/fs/iso9660/ISO9660Directory.java
public void remove(String name) throws IOException { throw new UnsupportedOperationException("Not yet implemented"); }
public void remove(String name) throws IOException { throw new UnsupportedOperationException("Not yet implemented"); }
public void remove(String name) throws IOException { throw new UnsupportedOperationException("Not yet implemented"); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/aa324658a8e5c25a895787936a31595462ad8442/ISO9660Directory.java/buggy/fs/src/fs/org/jnode/fs/iso9660/ISO9660Directory.java
super ("UTF-16", null);
super ("UTF-16", new String[] { "UTF16", /* These names are provided by * http: */ "ISO-10646-UCS-2", "unicode", "csUnicode", "ucs-2" });
UTF_16 () { super ("UTF-16", null); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/d7e10284742ade2934a1d2f7548145b029098f79/UTF_16.java/buggy/core/src/classpath/gnu/gnu/java/nio/charset/UTF_16.java
boolean isValue = read_boolean();
boolean isObject = read_boolean();
public Object read_abstract_interface() { boolean isValue = read_boolean(); if (isValue) return read_value(); else return read_Object(); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/44e3ea509d80974dab547c4d1cf8c070d32bac86/InputStream.java/buggy/core/src/classpath/org/org/omg/CORBA_2_3/portable/InputStream.java
if (isValue) return read_value();
if (isObject) return read_Object();
public Object read_abstract_interface() { boolean isValue = read_boolean(); if (isValue) return read_value(); else return read_Object(); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/44e3ea509d80974dab547c4d1cf8c070d32bac86/InputStream.java/buggy/core/src/classpath/org/org/omg/CORBA_2_3/portable/InputStream.java
return read_Object();
return read_value();
public Object read_abstract_interface() { boolean isValue = read_boolean(); if (isValue) return read_value(); else return read_Object(); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/44e3ea509d80974dab547c4d1cf8c070d32bac86/InputStream.java/buggy/core/src/classpath/org/org/omg/CORBA_2_3/portable/InputStream.java
try { input.mark(512); int value_tag = input.read_long(); checkTag(value_tag); String codebase = null; String[] ids = null; String id = null; java.lang.Object ox = null; if (value_tag == vt_NULL) return null; else if (value_tag == vt_INDIRECTION) throw new NO_IMPLEMENT("Indirections unsupported"); else { if ((value_tag & vf_CODEBASE) != 0) { codebase = input.read_string(); } if ((value_tag & vf_MULTIPLE_IDS) != 0) { ids = StringSeqHelper.read(input); for (int i = 0; (i < ids.length) && (ox == null); i++) { ox = ObjectCreator.Idl2Object(ids [ i ]); if (ox == null) { ValueFactory f = ((org.omg.CORBA_2_3.ORB) input.orb()).lookup_value_factory(ids [ i ]); if (f != null) { input.reset(); return f.read_value((org.omg.CORBA_2_3.portable.InputStream) input); } } } } else if ((value_tag & vf_ID) != 0) { id = input.read_string(); ox = ObjectCreator.Idl2Object(id); if (ox == null) { ValueFactory f = ((org.omg.CORBA_2_3.ORB) input.orb()).lookup_value_factory(id); if (f != null) { input.reset(); return f.read_value((org.omg.CORBA_2_3.portable.InputStream) input); } } } } if (ox == null) throw new MARSHAL("Unable to instantiate the value type"); else { read_instance(input, ox, value_tag, null); return (Serializable) ox; } } catch (Exception ex) { throw new MARSHAL(ex + ":" + ex.getMessage()); }
return read(input, (String) null);
public static Serializable read(InputStream input) { // Explicitly prevent the stream from closing as we may need // to read the subsequent bytes as well. Stream may be auto-closed // in its finalizer. try { // We may need to jump back if the value is read via value factory. input.mark(512); int value_tag = input.read_long(); checkTag(value_tag); String codebase = null; String[] ids = null; String id = null; // The existing implementing object. java.lang.Object ox = null; // Check for the agreed null value. if (value_tag == vt_NULL) return null; else if (value_tag == vt_INDIRECTION) // TODO FIXME Implement support for indirections. throw new NO_IMPLEMENT("Indirections unsupported"); else { // Read the value. if ((value_tag & vf_CODEBASE) != 0) { // The codebase is present. The codebase is a space // separated list of URLs from where the implementing // code can be downloaded. codebase = input.read_string(); } if ((value_tag & vf_MULTIPLE_IDS) != 0) { // Multiple supported repository ids are present. ids = StringSeqHelper.read(input); for (int i = 0; (i < ids.length) && (ox == null); i++) { ox = ObjectCreator.Idl2Object(ids [ i ]); if (ox == null) { // Try to find the value factory. ValueFactory f = ((org.omg.CORBA_2_3.ORB) input.orb()).lookup_value_factory(ids [ i ]); if (f != null) { // Reset, as the value factory reads from beginning. input.reset(); return f.read_value((org.omg.CORBA_2_3.portable.InputStream) input); } } } } else if ((value_tag & vf_ID) != 0) { // Single supported repository id is present. id = input.read_string(); ox = ObjectCreator.Idl2Object(id); if (ox == null) { // Try to find the value factory. ValueFactory f = ((org.omg.CORBA_2_3.ORB) input.orb()).lookup_value_factory(id); if (f != null) { input.reset(); return f.read_value((org.omg.CORBA_2_3.portable.InputStream) input); } } } } if (ox == null) throw new MARSHAL("Unable to instantiate the value type"); else { read_instance(input, ox, value_tag, null); return (Serializable) ox; } } catch (Exception ex) { throw new MARSHAL(ex + ":" + ex.getMessage()); } }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/44e3ea509d80974dab547c4d1cf8c070d32bac86/Vio.java/buggy/core/src/classpath/gnu/gnu/CORBA/CDR/Vio.java
public Image createImage(byte[] data) { return createImage(data, 0, data.length); }
public abstract Image createImage(String filename);
public Image createImage(byte[] data) { return createImage(data, 0, data.length); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/Toolkit.java/buggy/core/src/classpath/java/java/awt/Toolkit.java
public ICMPTimestampHeader(SocketBuffer skbuf) { super(skbuf); final int type = getType();
public ICMPTimestampHeader( int type, int identifier, int seqNumber, int originateTimestamp, int receiveTimestamp, int transmitTimestamp) { super(type, 0, identifier, seqNumber);
public ICMPTimestampHeader(SocketBuffer skbuf) { super(skbuf); final int type = getType(); if ((type != ICMP_TIMESTAMP) && (type != ICMP_TIMESTAMPREPLY)) { throw new IllegalArgumentException("Invalid type " + type); } this.originateTimestamp = skbuf.get32(8); this.receiveTimestamp = skbuf.get32(12); this.transmitTimestamp = skbuf.get32(16); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/51e4aed2205f326c2698e2154ea7f83ae5dfc2b6/ICMPTimestampHeader.java/buggy/net/src/net/org/jnode/net/ipv4/icmp/ICMPTimestampHeader.java
this.originateTimestamp = skbuf.get32(8); this.receiveTimestamp = skbuf.get32(12); this.transmitTimestamp = skbuf.get32(16);
this.originateTimestamp = originateTimestamp; this.receiveTimestamp = receiveTimestamp; this.transmitTimestamp = transmitTimestamp;
public ICMPTimestampHeader(SocketBuffer skbuf) { super(skbuf); final int type = getType(); if ((type != ICMP_TIMESTAMP) && (type != ICMP_TIMESTAMPREPLY)) { throw new IllegalArgumentException("Invalid type " + type); } this.originateTimestamp = skbuf.get32(8); this.receiveTimestamp = skbuf.get32(12); this.transmitTimestamp = skbuf.get32(16); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/51e4aed2205f326c2698e2154ea7f83ae5dfc2b6/ICMPTimestampHeader.java/buggy/net/src/net/org/jnode/net/ipv4/icmp/ICMPTimestampHeader.java
public ICMPAddressMaskHeader(SocketBuffer skbuf) { super(skbuf); final int type = getType();
public ICMPAddressMaskHeader(int type, int identifier, int seqNumber, IPv4Address subnetMask) { super(type, 0, identifier, seqNumber);
public ICMPAddressMaskHeader(SocketBuffer skbuf) { super(skbuf); final int type = getType(); if ((type != ICMP_ADDRESS) && (type != ICMP_ADDRESSREPLY)) { throw new IllegalArgumentException("Invalid type " + type); } this.subnetMask = new IPv4Address(skbuf, 8); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/51e4aed2205f326c2698e2154ea7f83ae5dfc2b6/ICMPAddressMaskHeader.java/buggy/net/src/net/org/jnode/net/ipv4/icmp/ICMPAddressMaskHeader.java
this.subnetMask = new IPv4Address(skbuf, 8);
this.subnetMask = subnetMask;
public ICMPAddressMaskHeader(SocketBuffer skbuf) { super(skbuf); final int type = getType(); if ((type != ICMP_ADDRESS) && (type != ICMP_ADDRESSREPLY)) { throw new IllegalArgumentException("Invalid type " + type); } this.subnetMask = new IPv4Address(skbuf, 8); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/51e4aed2205f326c2698e2154ea7f83ae5dfc2b6/ICMPAddressMaskHeader.java/buggy/net/src/net/org/jnode/net/ipv4/icmp/ICMPAddressMaskHeader.java
public ICMPEchoHeader(SocketBuffer skbuf) { super(skbuf);
public ICMPEchoHeader(int type, int identifier, int seqNumber) { super(type, 0, identifier, seqNumber);
public ICMPEchoHeader(SocketBuffer skbuf) { super(skbuf); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/51e4aed2205f326c2698e2154ea7f83ae5dfc2b6/ICMPEchoHeader.java/buggy/net/src/net/org/jnode/net/ipv4/icmp/ICMPEchoHeader.java
attribHash.put("axisDatatype",new XMLAttribute(new StringDataFormat(), Constants.OBJECT_TYPE));
attribHash.put("axisDatatype",new XMLAttribute(new StringDataFormat(), Constants.STRING_TYPE));
private void init() { classXDFNodeName = "axis"; // order matters! these are in *reverse* order of their // occurence in the XDF DTD attribOrder.add(0,"valueList"); attribOrder.add(0,"axisIdRef"); attribOrder.add(0,"axisId"); attribOrder.add(0,"align"); //not sure what it is??? attribOrder.add(0,"axisUnits"); attribOrder.add(0,"axisDatatype"); attribOrder.add(0,"description"); attribOrder.add(0,"name"); //set up the attribute hashtable key with the default initial value //set the minimum array size(essentially the size of the axis) attribHash.put("valueList", new XMLAttribute(Collections.synchronizedList(new ArrayList(super.sDefaultDataArraySize)), Constants.LIST_TYPE)); attribHash.put("axisIdRef", new XMLAttribute(null, Constants.STRING_TYPE)); attribHash.put("axisId", new XMLAttribute(null, Constants.STRING_TYPE)); attribHash.put("aligh", new XMLAttribute(null, Constants.STRING_TYPE)); //double check??? //set up the axisUnits attribute Units unitsObj = new Units(); attribHash.put("axisUnits", new XMLAttribute(unitsObj, Constants.OBJECT_TYPE)); unitsObj.setXDFNodeName("axisUnits"); attribHash.put("axisDatatype",new XMLAttribute(new StringDataFormat(), Constants.OBJECT_TYPE)); attribHash.put("description", new XMLAttribute(null, Constants.STRING_TYPE)); attribHash.put("name", new XMLAttribute(null, Constants.STRING_TYPE)); length = 0; }
4483 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4483/d0452a0b5820c660cc92e5d08c9fccd650031b77/Axis.java/buggy/src/gov/nasa/gsfc/adc/xdf/Axis.java
JViewport vp = (JViewport)parent; Component view = vp.getView(); if (view != null) return view.getMinimumSize(); else return new Dimension();
return new Dimension(4, 4);
public Dimension minimumLayoutSize(Container parent) { JViewport vp = (JViewport)parent; Component view = vp.getView(); if (view != null) return view.getMinimumSize(); else return new Dimension(); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/5806c07c3eeedb0f4f92b9fbacf30c0f55915c25/ViewportLayout.java/buggy/core/src/classpath/javax/javax/swing/ViewportLayout.java
public void connect(SocketAddress address) throws SocketException
public void connect(InetAddress address, int port)
public void connect(SocketAddress address) throws SocketException { if (isClosed()) throw new SocketException("socket is closed"); if (! (address instanceof InetSocketAddress)) throw new IllegalArgumentException("unsupported address type"); InetSocketAddress tmp = (InetSocketAddress) address; connect(tmp.getAddress(), tmp.getPort()); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/4ab0e0ca443d7a98e3dfd00d94df0d256e3fbd3f/DatagramSocket.java/buggy/core/src/classpath/java/java/net/DatagramSocket.java
if (isClosed()) throw new SocketException("socket is closed");
if (address == null) throw new IllegalArgumentException("Connect address may not be null");
public void connect(SocketAddress address) throws SocketException { if (isClosed()) throw new SocketException("socket is closed"); if (! (address instanceof InetSocketAddress)) throw new IllegalArgumentException("unsupported address type"); InetSocketAddress tmp = (InetSocketAddress) address; connect(tmp.getAddress(), tmp.getPort()); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/4ab0e0ca443d7a98e3dfd00d94df0d256e3fbd3f/DatagramSocket.java/buggy/core/src/classpath/java/java/net/DatagramSocket.java
if (! (address instanceof InetSocketAddress)) throw new IllegalArgumentException("unsupported address type");
if ((port < 1) || (port > 65535)) throw new IllegalArgumentException("Port number is illegal: " + port);
public void connect(SocketAddress address) throws SocketException { if (isClosed()) throw new SocketException("socket is closed"); if (! (address instanceof InetSocketAddress)) throw new IllegalArgumentException("unsupported address type"); InetSocketAddress tmp = (InetSocketAddress) address; connect(tmp.getAddress(), tmp.getPort()); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/4ab0e0ca443d7a98e3dfd00d94df0d256e3fbd3f/DatagramSocket.java/buggy/core/src/classpath/java/java/net/DatagramSocket.java
InetSocketAddress tmp = (InetSocketAddress) address; connect(tmp.getAddress(), tmp.getPort());
SecurityManager sm = System.getSecurityManager(); if (sm != null) sm.checkConnect(address.getHostName(), port); try { getImpl().connect(address, port); remoteAddress = address; remotePort = port; } catch (SocketException e) { }
public void connect(SocketAddress address) throws SocketException { if (isClosed()) throw new SocketException("socket is closed"); if (! (address instanceof InetSocketAddress)) throw new IllegalArgumentException("unsupported address type"); InetSocketAddress tmp = (InetSocketAddress) address; connect(tmp.getAddress(), tmp.getPort()); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/4ab0e0ca443d7a98e3dfd00d94df0d256e3fbd3f/DatagramSocket.java/buggy/core/src/classpath/java/java/net/DatagramSocket.java
public abstract int read(ByteBuffer dst) throws IOException;
public final long read(ByteBuffer[] dsts) throws IOException { long b = 0; for (int i = 0; i < dsts.length; i++) b += read(dsts[i]); return b; }
public abstract int read(ByteBuffer dst) throws IOException;
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/e8834e60eedea5a65712de1e0c0fa2d875e22b9c/DatagramChannel.java/buggy/core/src/classpath/java/java/nio/channels/DatagramChannel.java
public DatagramPacket(byte[] buf, int length) { this(buf, 0, length);
public DatagramPacket(byte[] buf, int offset, int length) { setData(buf, offset, length); address = null; port = -1;
public DatagramPacket(byte[] buf, int length) { this(buf, 0, length); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/7c463aa3bd840a934d101c434976bb7b25d5b975/DatagramPacket.java/buggy/core/src/classpath/java/java/net/DatagramPacket.java
public SocketAddress getSocketAddress() {
public SocketAddress getSocketAddress() {
public SocketAddress getSocketAddress() { return new InetSocketAddress(address, port); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/7c463aa3bd840a934d101c434976bb7b25d5b975/DatagramPacket.java/buggy/core/src/classpath/java/java/net/DatagramPacket.java
public abstract int write(ByteBuffer src) throws IOException;
public final long write(ByteBuffer[] srcs) throws IOException { long b = 0; for (int i = 0; i < srcs.length; i++) b += write(srcs[i]); return b; }
public abstract int write(ByteBuffer src) throws IOException;
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/e8834e60eedea5a65712de1e0c0fa2d875e22b9c/DatagramChannel.java/buggy/core/src/classpath/java/java/nio/channels/DatagramChannel.java
Level.toLevel(Level.OFF_INT);
log.setLevel((Level)Level.OFF);
public void setLevel(int newLevel) { switch (newLevel) { case OFF: Level.toLevel(Level.OFF_INT); break; case DEBUG: Level.toLevel(org.apache.log4j.Level.DEBUG_INT); break; case INFO: Level.toLevel(org.apache.log4j.Level.INFO_INT); break; case WARN: Level.toLevel(org.apache.log4j.Level.WARN_INT); break; case ERROR: Level.toLevel(org.apache.log4j.Level.ERROR_INT); break; case FATAL: Level.toLevel(org.apache.log4j.Level.FATAL_INT); break; } }
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/6f5b3058f823be5d7680327fd154e97f4115b81b/Log4jLogger.java/clean/tn5250j/src/org/tn5250j/tools/logging/Log4jLogger.java
public void setLevel(int newLevel) { switch (newLevel) { case OFF: Level.toLevel(Level.OFF_INT); break; case DEBUG: Level.toLevel(org.apache.log4j.Level.DEBUG_INT); break; case INFO: Level.toLevel(org.apache.log4j.Level.INFO_INT); break; case WARN: Level.toLevel(org.apache.log4j.Level.WARN_INT); break; case ERROR: Level.toLevel(org.apache.log4j.Level.ERROR_INT); break; case FATAL: Level.toLevel(org.apache.log4j.Level.FATAL_INT); break; } }
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/6f5b3058f823be5d7680327fd154e97f4115b81b/Log4jLogger.java/clean/tn5250j/src/org/tn5250j/tools/logging/Log4jLogger.java
Level.toLevel(org.apache.log4j.Level.DEBUG_INT);
log.setLevel((Level)Level.DEBUG);
public void setLevel(int newLevel) { switch (newLevel) { case OFF: Level.toLevel(Level.OFF_INT); break; case DEBUG: Level.toLevel(org.apache.log4j.Level.DEBUG_INT); break; case INFO: Level.toLevel(org.apache.log4j.Level.INFO_INT); break; case WARN: Level.toLevel(org.apache.log4j.Level.WARN_INT); break; case ERROR: Level.toLevel(org.apache.log4j.Level.ERROR_INT); break; case FATAL: Level.toLevel(org.apache.log4j.Level.FATAL_INT); break; } }
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/6f5b3058f823be5d7680327fd154e97f4115b81b/Log4jLogger.java/clean/tn5250j/src/org/tn5250j/tools/logging/Log4jLogger.java
Level.toLevel(org.apache.log4j.Level.INFO_INT);
log.setLevel((Level)Level.INFO);
public void setLevel(int newLevel) { switch (newLevel) { case OFF: Level.toLevel(Level.OFF_INT); break; case DEBUG: Level.toLevel(org.apache.log4j.Level.DEBUG_INT); break; case INFO: Level.toLevel(org.apache.log4j.Level.INFO_INT); break; case WARN: Level.toLevel(org.apache.log4j.Level.WARN_INT); break; case ERROR: Level.toLevel(org.apache.log4j.Level.ERROR_INT); break; case FATAL: Level.toLevel(org.apache.log4j.Level.FATAL_INT); break; } }
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/6f5b3058f823be5d7680327fd154e97f4115b81b/Log4jLogger.java/clean/tn5250j/src/org/tn5250j/tools/logging/Log4jLogger.java
Level.toLevel(org.apache.log4j.Level.WARN_INT);
log.setLevel((Level)Level.WARN);
public void setLevel(int newLevel) { switch (newLevel) { case OFF: Level.toLevel(Level.OFF_INT); break; case DEBUG: Level.toLevel(org.apache.log4j.Level.DEBUG_INT); break; case INFO: Level.toLevel(org.apache.log4j.Level.INFO_INT); break; case WARN: Level.toLevel(org.apache.log4j.Level.WARN_INT); break; case ERROR: Level.toLevel(org.apache.log4j.Level.ERROR_INT); break; case FATAL: Level.toLevel(org.apache.log4j.Level.FATAL_INT); break; } }
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/6f5b3058f823be5d7680327fd154e97f4115b81b/Log4jLogger.java/clean/tn5250j/src/org/tn5250j/tools/logging/Log4jLogger.java
Level.toLevel(org.apache.log4j.Level.ERROR_INT);
log.setLevel((Level)Level.ERROR);
public void setLevel(int newLevel) { switch (newLevel) { case OFF: Level.toLevel(Level.OFF_INT); break; case DEBUG: Level.toLevel(org.apache.log4j.Level.DEBUG_INT); break; case INFO: Level.toLevel(org.apache.log4j.Level.INFO_INT); break; case WARN: Level.toLevel(org.apache.log4j.Level.WARN_INT); break; case ERROR: Level.toLevel(org.apache.log4j.Level.ERROR_INT); break; case FATAL: Level.toLevel(org.apache.log4j.Level.FATAL_INT); break; } }
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/6f5b3058f823be5d7680327fd154e97f4115b81b/Log4jLogger.java/clean/tn5250j/src/org/tn5250j/tools/logging/Log4jLogger.java
Level.toLevel(org.apache.log4j.Level.FATAL_INT);
log.setLevel((Level)Level.FATAL);
public void setLevel(int newLevel) { switch (newLevel) { case OFF: Level.toLevel(Level.OFF_INT); break; case DEBUG: Level.toLevel(org.apache.log4j.Level.DEBUG_INT); break; case INFO: Level.toLevel(org.apache.log4j.Level.INFO_INT); break; case WARN: Level.toLevel(org.apache.log4j.Level.WARN_INT); break; case ERROR: Level.toLevel(org.apache.log4j.Level.ERROR_INT); break; case FATAL: Level.toLevel(org.apache.log4j.Level.FATAL_INT); break; } }
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/6f5b3058f823be5d7680327fd154e97f4115b81b/Log4jLogger.java/clean/tn5250j/src/org/tn5250j/tools/logging/Log4jLogger.java
if ((mY % 2) == 0)
if (((mY - y) % 2) == 0)
static void fillMetalPattern(Graphics g, int x, int y, int w, int h, Color light, Color dark) { int xOff = 0; for (int mY = y; mY < (y + h); mY++) { // set color alternating with every line if ((mY % 2) == 0) g.setColor(light); else g.setColor(dark); for (int mX = x + (xOff); mX < (x + w); mX += 4) { g.drawLine(mX, mY, mX, mY); } // increase x offset xOff++; if (xOff > 3) xOff = 0; } }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/045a5b41cdfa747889101d3993040acf89788bc4/MetalUtils.java/clean/core/src/classpath/javax/javax/swing/plaf/metal/MetalUtils.java
for (i = lo; i < hi; ++i)
for (i = lo; i <= hi; ++i)
public int[] getSelectedIndices() { int lo, hi, n, i, j; if (selectionModel.isSelectionEmpty()) return new int[0]; lo = selectionModel.getMinSelectionIndex(); hi = selectionModel.getMaxSelectionIndex(); n = 0; for (i = lo; i <= hi; ++i) if (selectionModel.isSelectedIndex(i)) n++; int [] v = new int[n]; j = 0; for (i = lo; i < hi; ++i) if (selectionModel.isSelectedIndex(i)) v[j++] = i; return v; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/804045622bd8dd509311bab751f88cfa2f79345a/JList.java/clean/core/src/classpath/javax/javax/swing/JList.java
.getSelectionMode() == treeSelectionModel.SINGLE_TREE_SELECTION)
.getSelectionMode() == TreeSelectionModel.SINGLE_TREE_SELECTION)
public void mouseClicked(MouseEvent e) { Point click = e.getPoint(); int row = ((int) click.getY() / getRowHeight()) - 1; if (BasicTreeUI.this.tree.isRowSelected(row)) BasicTreeUI.this.tree.removeSelectionRow(row); else if (BasicTreeUI.this.tree.getSelectionModel() .getSelectionMode() == treeSelectionModel.SINGLE_TREE_SELECTION) { // clear selection, since only able to select one row at a time. BasicTreeUI.this.tree.getSelectionModel().clearSelection(); BasicTreeUI.this.tree.addSelectionRow(row); } else if (BasicTreeUI.this.tree.getSelectionModel() .getSelectionMode() == treeSelectionModel.CONTIGUOUS_TREE_SELECTION) { //TODO } else { BasicTreeUI.this.tree.getSelectionModel() .setSelectionMode( treeSelectionModel.DISCONTIGUOUS_TREE_SELECTION); BasicTreeUI.this.tree.addSelectionRow(row); } }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/50cfc3ee73e2e377b07c91f0e40a2f172b10fd27/BasicTreeUI.java/buggy/core/src/classpath/javax/javax/swing/plaf/basic/BasicTreeUI.java
public void mouseClicked(MouseEvent e) { Point click = e.getPoint(); int row = ((int) click.getY() / getRowHeight()) - 1; if (BasicTreeUI.this.tree.isRowSelected(row)) BasicTreeUI.this.tree.removeSelectionRow(row); else if (BasicTreeUI.this.tree.getSelectionModel() .getSelectionMode() == treeSelectionModel.SINGLE_TREE_SELECTION) { // clear selection, since only able to select one row at a time. BasicTreeUI.this.tree.getSelectionModel().clearSelection(); BasicTreeUI.this.tree.addSelectionRow(row); } else if (BasicTreeUI.this.tree.getSelectionModel() .getSelectionMode() == treeSelectionModel.CONTIGUOUS_TREE_SELECTION) { //TODO } else { BasicTreeUI.this.tree.getSelectionModel() .setSelectionMode( treeSelectionModel.DISCONTIGUOUS_TREE_SELECTION); BasicTreeUI.this.tree.addSelectionRow(row); } }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/50cfc3ee73e2e377b07c91f0e40a2f172b10fd27/BasicTreeUI.java/buggy/core/src/classpath/javax/javax/swing/plaf/basic/BasicTreeUI.java
.getSelectionMode() == treeSelectionModel.CONTIGUOUS_TREE_SELECTION)
.getSelectionMode() == TreeSelectionModel.CONTIGUOUS_TREE_SELECTION)
public void mouseClicked(MouseEvent e) { Point click = e.getPoint(); int row = ((int) click.getY() / getRowHeight()) - 1; if (BasicTreeUI.this.tree.isRowSelected(row)) BasicTreeUI.this.tree.removeSelectionRow(row); else if (BasicTreeUI.this.tree.getSelectionModel() .getSelectionMode() == treeSelectionModel.SINGLE_TREE_SELECTION) { // clear selection, since only able to select one row at a time. BasicTreeUI.this.tree.getSelectionModel().clearSelection(); BasicTreeUI.this.tree.addSelectionRow(row); } else if (BasicTreeUI.this.tree.getSelectionModel() .getSelectionMode() == treeSelectionModel.CONTIGUOUS_TREE_SELECTION) { //TODO } else { BasicTreeUI.this.tree.getSelectionModel() .setSelectionMode( treeSelectionModel.DISCONTIGUOUS_TREE_SELECTION); BasicTreeUI.this.tree.addSelectionRow(row); } }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/50cfc3ee73e2e377b07c91f0e40a2f172b10fd27/BasicTreeUI.java/buggy/core/src/classpath/javax/javax/swing/plaf/basic/BasicTreeUI.java
public void mouseClicked(MouseEvent e) { Point click = e.getPoint(); int row = ((int) click.getY() / getRowHeight()) - 1; if (BasicTreeUI.this.tree.isRowSelected(row)) BasicTreeUI.this.tree.removeSelectionRow(row); else if (BasicTreeUI.this.tree.getSelectionModel() .getSelectionMode() == treeSelectionModel.SINGLE_TREE_SELECTION) { // clear selection, since only able to select one row at a time. BasicTreeUI.this.tree.getSelectionModel().clearSelection(); BasicTreeUI.this.tree.addSelectionRow(row); } else if (BasicTreeUI.this.tree.getSelectionModel() .getSelectionMode() == treeSelectionModel.CONTIGUOUS_TREE_SELECTION) { //TODO } else { BasicTreeUI.this.tree.getSelectionModel() .setSelectionMode( treeSelectionModel.DISCONTIGUOUS_TREE_SELECTION); BasicTreeUI.this.tree.addSelectionRow(row); } }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/50cfc3ee73e2e377b07c91f0e40a2f172b10fd27/BasicTreeUI.java/buggy/core/src/classpath/javax/javax/swing/plaf/basic/BasicTreeUI.java
BasicTreeUI.this.tree.getSelectionModel() .setSelectionMode( treeSelectionModel.DISCONTIGUOUS_TREE_SELECTION);
BasicTreeUI.this.tree.getSelectionModel().setSelectionMode( TreeSelectionModel.DISCONTIGUOUS_TREE_SELECTION);
public void mouseClicked(MouseEvent e) { Point click = e.getPoint(); int row = ((int) click.getY() / getRowHeight()) - 1; if (BasicTreeUI.this.tree.isRowSelected(row)) BasicTreeUI.this.tree.removeSelectionRow(row); else if (BasicTreeUI.this.tree.getSelectionModel() .getSelectionMode() == treeSelectionModel.SINGLE_TREE_SELECTION) { // clear selection, since only able to select one row at a time. BasicTreeUI.this.tree.getSelectionModel().clearSelection(); BasicTreeUI.this.tree.addSelectionRow(row); } else if (BasicTreeUI.this.tree.getSelectionModel() .getSelectionMode() == treeSelectionModel.CONTIGUOUS_TREE_SELECTION) { //TODO } else { BasicTreeUI.this.tree.getSelectionModel() .setSelectionMode( treeSelectionModel.DISCONTIGUOUS_TREE_SELECTION); BasicTreeUI.this.tree.addSelectionRow(row); } }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/50cfc3ee73e2e377b07c91f0e40a2f172b10fd27/BasicTreeUI.java/buggy/core/src/classpath/javax/javax/swing/plaf/basic/BasicTreeUI.java
}
public void mouseClicked(MouseEvent e) { Point click = e.getPoint(); int row = ((int) click.getY() / getRowHeight()) - 1; if (BasicTreeUI.this.tree.isRowSelected(row)) BasicTreeUI.this.tree.removeSelectionRow(row); else if (BasicTreeUI.this.tree.getSelectionModel() .getSelectionMode() == treeSelectionModel.SINGLE_TREE_SELECTION) { // clear selection, since only able to select one row at a time. BasicTreeUI.this.tree.getSelectionModel().clearSelection(); BasicTreeUI.this.tree.addSelectionRow(row); } else if (BasicTreeUI.this.tree.getSelectionModel() .getSelectionMode() == treeSelectionModel.CONTIGUOUS_TREE_SELECTION) { //TODO } else { BasicTreeUI.this.tree.getSelectionModel() .setSelectionMode( treeSelectionModel.DISCONTIGUOUS_TREE_SELECTION); BasicTreeUI.this.tree.addSelectionRow(row); } }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/50cfc3ee73e2e377b07c91f0e40a2f172b10fd27/BasicTreeUI.java/buggy/core/src/classpath/javax/javax/swing/plaf/basic/BasicTreeUI.java