rem
stringlengths
0
477k
add
stringlengths
0
313k
context
stringlengths
6
599k
meta
stringlengths
141
403
Method read = helperClass.getMethod("read", new Class[] { org.omg.CORBA.portable.InputStream.class } );
Method read = helperClass.getMethod("read", new Class[] { org.omg.CORBA.portable.InputStream.class });
public static UserException readUserException(String idl, InputStream input) { try { String helper = toHelperName(idl); Class helperClass = Class.forName(helper); Method read = helperClass.getMethod("read", new Class[] { org.omg.CORBA.portable.InputStream.class } ); return (UserException) read.invoke(null, new Object[] { input }); } catch (MARSHAL mex) { // This one is ok to throw throw mex; } catch (Exception ex) { ex.printStackTrace(); return null; } }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/44e3ea509d80974dab547c4d1cf8c070d32bac86/ObjectCreator.java/buggy/core/src/classpath/gnu/gnu/CORBA/ObjectCreator.java
t.minor = Minor.Header;
public void write(java.io.OutputStream out) { try { abstractDataOutputStream dout; if (isBigEndian()) dout = new BigEndianOutputStream(out); else dout = new LittleEndianOutputStream(out); // Write magic sequence. dout.write(MAGIC); // Write version number. version.write((OutputStream) dout); dout.write(flags); dout.write(message_type); dout.writeInt(message_size); } catch (IOException ex) { MARSHAL t = new MARSHAL(); t.initCause(ex); throw t; } }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/44e3ea509d80974dab547c4d1cf8c070d32bac86/MessageHeader.java/buggy/core/src/classpath/gnu/gnu/CORBA/GIOP/MessageHeader.java
throw new MARSHAL("Not a GIOP message");
{ MARSHAL m = new MARSHAL("Not a GIOP message"); m.minor = Minor.Giop; throw m; }
public void read(java.io.InputStream istream) throws MARSHAL { try { byte[] xMagic = new byte[ MAGIC.length ]; istream.read(xMagic); if (!Arrays.equals(xMagic, MAGIC)) throw new MARSHAL("Not a GIOP message"); version = Version.read_version(istream); abstractDataInputStream din; flags = (byte) istream.read(); // This checks the bit in the byte we have just received. if (isBigEndian()) din = new BigEndianInputStream(istream); else din = new LittleEndianInputStream(istream); message_type = (byte) din.read(); message_size = din.readInt(); } catch (IOException ex) { MARSHAL t = new MARSHAL(); t.initCause(ex); throw t; } }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/44e3ea509d80974dab547c4d1cf8c070d32bac86/MessageHeader.java/buggy/core/src/classpath/gnu/gnu/CORBA/GIOP/MessageHeader.java
t.minor = Minor.Header;
public void read(java.io.InputStream istream) throws MARSHAL { try { byte[] xMagic = new byte[ MAGIC.length ]; istream.read(xMagic); if (!Arrays.equals(xMagic, MAGIC)) throw new MARSHAL("Not a GIOP message"); version = Version.read_version(istream); abstractDataInputStream din; flags = (byte) istream.read(); // This checks the bit in the byte we have just received. if (isBigEndian()) din = new BigEndianInputStream(istream); else din = new LittleEndianInputStream(istream); message_type = (byte) din.read(); message_size = din.readInt(); } catch (IOException ex) { MARSHAL t = new MARSHAL(); t.initCause(ex); throw t; } }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/44e3ea509d80974dab547c4d1cf8c070d32bac86/MessageHeader.java/buggy/core/src/classpath/gnu/gnu/CORBA/GIOP/MessageHeader.java
public UnsatisfiedLinkError(String s) { super(s);
public UnsatisfiedLinkError() {
public UnsatisfiedLinkError(String s) { super(s); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/b2ed890086e708f00d163f3e8514bfa8b353f662/UnsatisfiedLinkError.java/buggy/core/src/classpath/java/java/lang/UnsatisfiedLinkError.java
public void checkRead(String filename)
public void checkRead(FileDescriptor desc)
public void checkRead(String filename) { checkPermission(new FilePermission(filename, "read")); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/68a6301301378680519f2b146daec37812a1bc22/SecurityManager.java/buggy/core/src/classpath/java/java/lang/SecurityManager.java
checkPermission(new FilePermission(filename, "read"));
if (desc == null) throw new NullPointerException(); checkPermission(new RuntimePermission("readFileDescriptor"));
public void checkRead(String filename) { checkPermission(new FilePermission(filename, "read")); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/68a6301301378680519f2b146daec37812a1bc22/SecurityManager.java/buggy/core/src/classpath/java/java/lang/SecurityManager.java
public static SortedMap availableCharsets ()
public static SortedMap availableCharsets()
public static SortedMap availableCharsets () { TreeMap charsets = new TreeMap (String.CASE_INSENSITIVE_ORDER); for (Iterator i = provider ().charsets (); i.hasNext (); ) { Charset cs = (Charset) i.next (); charsets.put (cs.name (), cs); } return Collections.unmodifiableSortedMap (charsets); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/d7e10284742ade2934a1d2f7548145b029098f79/Charset.java/buggy/core/src/classpath/java/java/nio/charset/Charset.java
TreeMap charsets = new TreeMap (String.CASE_INSENSITIVE_ORDER);
TreeMap charsets = new TreeMap(String.CASE_INSENSITIVE_ORDER);
public static SortedMap availableCharsets () { TreeMap charsets = new TreeMap (String.CASE_INSENSITIVE_ORDER); for (Iterator i = provider ().charsets (); i.hasNext (); ) { Charset cs = (Charset) i.next (); charsets.put (cs.name (), cs); } return Collections.unmodifiableSortedMap (charsets); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/d7e10284742ade2934a1d2f7548145b029098f79/Charset.java/buggy/core/src/classpath/java/java/nio/charset/Charset.java
for (Iterator i = provider ().charsets (); i.hasNext (); )
CharsetProvider[] providers = providers(); for (int j = 0; j < providers.length; j++)
public static SortedMap availableCharsets () { TreeMap charsets = new TreeMap (String.CASE_INSENSITIVE_ORDER); for (Iterator i = provider ().charsets (); i.hasNext (); ) { Charset cs = (Charset) i.next (); charsets.put (cs.name (), cs); } return Collections.unmodifiableSortedMap (charsets); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/d7e10284742ade2934a1d2f7548145b029098f79/Charset.java/buggy/core/src/classpath/java/java/nio/charset/Charset.java
Charset cs = (Charset) i.next (); charsets.put (cs.name (), cs); }
for (Iterator i = providers[j].charsets(); i.hasNext(); ) { Charset cs = (Charset) i.next(); charsets.put(cs.name(), cs); } }
public static SortedMap availableCharsets () { TreeMap charsets = new TreeMap (String.CASE_INSENSITIVE_ORDER); for (Iterator i = provider ().charsets (); i.hasNext (); ) { Charset cs = (Charset) i.next (); charsets.put (cs.name (), cs); } return Collections.unmodifiableSortedMap (charsets); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/d7e10284742ade2934a1d2f7548145b029098f79/Charset.java/buggy/core/src/classpath/java/java/nio/charset/Charset.java
return Collections.unmodifiableSortedMap (charsets); }
return Collections.unmodifiableSortedMap(charsets); }
public static SortedMap availableCharsets () { TreeMap charsets = new TreeMap (String.CASE_INSENSITIVE_ORDER); for (Iterator i = provider ().charsets (); i.hasNext (); ) { Charset cs = (Charset) i.next (); charsets.put (cs.name (), cs); } return Collections.unmodifiableSortedMap (charsets); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/d7e10284742ade2934a1d2f7548145b029098f79/Charset.java/buggy/core/src/classpath/java/java/nio/charset/Charset.java
private static Charset charsetForName (String charsetName)
private static Charset charsetForName(String charsetName)
private static Charset charsetForName (String charsetName) { checkName (charsetName); return provider ().charsetForName (charsetName); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/d7e10284742ade2934a1d2f7548145b029098f79/Charset.java/buggy/core/src/classpath/java/java/nio/charset/Charset.java
return provider ().charsetForName (charsetName);
Charset cs = null; CharsetProvider[] providers = providers(); for (int i = 0; i < providers.length; i++) { cs = providers[i].charsetForName(charsetName); if (cs != null) break;
private static Charset charsetForName (String charsetName) { checkName (charsetName); return provider ().charsetForName (charsetName); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/d7e10284742ade2934a1d2f7548145b029098f79/Charset.java/buggy/core/src/classpath/java/java/nio/charset/Charset.java
return cs; }
private static Charset charsetForName (String charsetName) { checkName (charsetName); return provider ().charsetForName (charsetName); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/d7e10284742ade2934a1d2f7548145b029098f79/Charset.java/buggy/core/src/classpath/java/java/nio/charset/Charset.java
private static CharsetProvider provider () { return Provider.provider (); }
private static CharsetProvider provider() { return Provider.provider(); }
private static CharsetProvider provider () { return Provider.provider (); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/d7e10284742ade2934a1d2f7548145b029098f79/Charset.java/buggy/core/src/classpath/java/java/nio/charset/Charset.java
protected AccessibleJSplitPane() { }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/963ae61676e8c35a9e0998e0b7de1f942db82a26/JSplitPane.java/clean/core/src/classpath/javax/javax/swing/JSplitPane.java
throw new MARSHAL();
MARSHAL m = new MARSHAL("Inappropriate"); m.minor = Minor.Inappropriate; throw m;
public static Current read(InputStream input) { throw new MARSHAL(); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/44e3ea509d80974dab547c4d1cf8c070d32bac86/CurrentHelper.java/clean/core/src/classpath/org/org/omg/PortableInterceptor/CurrentHelper.java
throw new MARSHAL();
MARSHAL m = new MARSHAL("Inappropriate"); m.minor = Minor.Inappropriate; throw m;
public static void write(OutputStream output, Current value) { throw new MARSHAL(); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/44e3ea509d80974dab547c4d1cf8c070d32bac86/CurrentHelper.java/clean/core/src/classpath/org/org/omg/PortableInterceptor/CurrentHelper.java
setCursorActive(true);
protected final void pasteMe(boolean special) { Clipboard cb = Toolkit.getDefaultToolkit().getSystemClipboard(); Transferable content = cb.getContents(this); try { StringBuffer sb = new StringBuffer((String)content.getTransferData(DataFlavor.stringFlavor)); StringBuffer pd = new StringBuffer(); int r = getRow(lastPos); int nextChar = 0; int nChars = sb.length(); boolean omitLF = false; boolean done = false; screenFields.saveCurrentField(); int lr = getRow(lastPos); int lc = getCol(lastPos); resetDirty(lastPos); while (!done) { if (nextChar >= nChars) { /* EOF */ done = true; break; } pd.setLength(0); boolean eol = false; char c = 0; int i; /* Skip a leftover '\n', if necessary */ if (omitLF && (sb.charAt(nextChar) == '\n')) nextChar++; boolean skipLF = false; omitLF = false; charLoop: for (i = nextChar; i < nChars; i++) { c = sb.charAt(i); if ((c == '\n') || (c == '\r')) { eol = true; break charLoop; } } int startChar = nextChar; nextChar = i; pd.append(sb.substring(startChar, startChar + (i - startChar))); if (eol) { nextChar++; if (c == '\r') { skipLF = true; } } System.out.println("pasted >" + pd + "<"); int col = getCol(lastPos); int t = numCols - col; if (t > pd.length()) t = pd.length(); int p = 0; char pc; boolean setIt; while (t-- > 0) { pc = pd.charAt(p); setIt = true; if (special && (!Character.isLetter(pc) && !Character.isDigit(pc))) setIt = false; if (isInField(r,col) && setIt) { screen[getPos(r,col)].setChar(pc); setDirty(r,col); screenFields.setCurrentFieldMDT(); } p++; if (setIt) col++; } r++; } screenFields.restoreCurrentField(); updateDirty(); goto_XY(lr+1,lc+1); } catch (Throwable exc) { System.err.println(exc); } }
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/9cfa94eb3d0e83caa3b415cf3db7594b803a17ba/Screen5250.java/clean/tn5250j/src/org/tn5250j/Screen5250.java
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 { screenFields.getCurrentField().getKeyPos(lastPos); screenFields.getCurrentField().changePos(-1); resetDirty(screenFields.getCurrentField().getCurrentPos()); shiftLeft(screenFields.getCurrentField().getCurrentPos()); updateDirty(); 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 :// setCursorOff(); process_XY(lastPos - numCols);// setCursorOn(); simulated = true; break; case DOWN : case MARK_DOWN :// setCursorOff(); process_XY(lastPos + numCols);// setCursorOn(); 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()) { resetDirty(lastPos); screenFields.getCurrentField().getKeyPos(lastPos); shiftLeft(screenFields.getCurrentFieldPos()); screenFields.setCurrentFieldMDT(); updateDirty(); 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()) { 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); simulated = true; } else { displayError(ERR_CURSOR_PROTECTED); } break; case ERASE_FIELD : if (screenFields.getCurrentField() != null && screenFields.withinCurrentField(lastPos) && !screenFields.isCurrentFieldBypassField()) { 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); simulated = true; } else { displayError(ERR_CURSOR_PROTECTED); } break; case INSERT : // we toggle it insertMode = insertMode ? false : true; 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()) { resetDirty(lastPos); if (fieldExit()) { screenFields.setCurrentFieldMDT(); if (!screenFields.isCurrentFieldContinued()) { gotoFieldNext(); } else { do { gotoFieldNext(); if (screenFields.isCurrentFieldContinued()) fieldExit(); } while (screenFields.isCurrentFieldContinuedMiddle() || screenFields.isCurrentFieldContinuedLast()); } } updateDirty(); 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()) { resetDirty(lastPos); if (fieldExit()) { screenFields.setCurrentFieldMDT(); if (!screenFields.isCurrentFieldContinued()) { gotoFieldNext(); } else { do { gotoFieldNext(); } while (screenFields.isCurrentFieldContinuedMiddle() || screenFields.isCurrentFieldContinuedLast()); } } updateDirty(); 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) { screen[lastPos].setChar('-'); resetDirty(lastPos); advancePos(); if (fieldExit()) { screenFields.setCurrentFieldMDT(); if (!screenFields.isCurrentFieldContinued()) { gotoFieldNext(); } else { do { gotoFieldNext(); } while (screenFields.isCurrentFieldContinuedMiddle() || screenFields.isCurrentFieldContinuedLast()); } } updateDirty(); simulated = true; if (screenFields.isCurrentFieldAutoEnter()) sendAid(AID_ENTER); } else { displayError(ERR_FIELD_MINUS); } } else { displayError(ERR_CURSOR_PROTECTED); } break; case BOF : if (screenFields.getCurrentField() != null && screenFields.withinCurrentField(lastPos) && !screenFields.isCurrentFieldBypassField()) { int where = screenFields.getCurrentField().startPos(); if (where > 0) { goto_XY(where); } simulated = true; } else { displayError(ERR_CURSOR_PROTECTED); } resetDirty(lastPos); break; case SYSREQ : sessionVT.systemRequest(); simulated = true; break; case RESET : if (isStatusErrorCode()) { resetError(); isInField(lastPos); updateDirty(); } else { setPrehelpState(false,isKeyboardLocked(),false); } simulated = true; break; case COPY : copyMe(); break; case PASTE : pasteMe(false); break; case ATTN : sessionVT.sendAttentionKey(); simulated = true; break; case DUP_FIELD : if (screenFields.getCurrentField() != null && screenFields.withinCurrentField(lastPos) && !screenFields.isCurrentFieldBypassField()) { if (screenFields.isCurrentFieldDupEnabled()) { resetDirty(lastPos); screenFields.getCurrentField().setFieldChar(lastPos,(char)0x1C); screenFields.setCurrentFieldMDT(); gotoFieldNext(); updateDirty(); simulated = true; } else { displayError(ERR_DUP_KEY_NOT_ALLOWED); } } else { displayError(ERR_CURSOR_PROTECTED); } break; case NEW_LINE : if (screenFields.getSize() > 0) { int startRow = getRow(lastPos) + 1; int startPos = lastPos; boolean isthere = false; if (startRow == getRows()) startRow = 0; goto_XY(++startRow,1); if (!isInField() && screenFields.getCurrentField() != null && !screenFields.isCurrentFieldBypassField()) { while (!isInField() && screenFields.getCurrentField() != null && !screenFields.isCurrentFieldBypassField()) { // lets keep going advancePos(); // Have we looped the screen? if (lastPos == startPos) { // if so then go back to starting point goto_XY(startPos); break; } } } } simulated = true; break; case JUMP_NEXT_SESS : gui.nextSession(); simulated = true; break; case JUMP_PREV_SESS : gui.prevSession(); 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/9cfa94eb3d0e83caa3b415cf3db7594b803a17ba/Screen5250.java/clean/tn5250j/src/org/tn5250j/Screen5250.java
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 { screenFields.getCurrentField().getKeyPos(lastPos); screenFields.getCurrentField().changePos(-1); resetDirty(screenFields.getCurrentField().getCurrentPos()); shiftLeft(screenFields.getCurrentField().getCurrentPos()); updateDirty(); 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 :// setCursorOff(); process_XY(lastPos - numCols);// setCursorOn(); simulated = true; break; case DOWN : case MARK_DOWN :// setCursorOff(); process_XY(lastPos + numCols);// setCursorOn(); 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()) { resetDirty(lastPos); screenFields.getCurrentField().getKeyPos(lastPos); shiftLeft(screenFields.getCurrentFieldPos()); screenFields.setCurrentFieldMDT(); updateDirty(); 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()) { 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); simulated = true; } else { displayError(ERR_CURSOR_PROTECTED); } break; case ERASE_FIELD : if (screenFields.getCurrentField() != null && screenFields.withinCurrentField(lastPos) && !screenFields.isCurrentFieldBypassField()) { 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); simulated = true; } else { displayError(ERR_CURSOR_PROTECTED); } break; case INSERT : // we toggle it insertMode = insertMode ? false : true; 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()) { resetDirty(lastPos); if (fieldExit()) { screenFields.setCurrentFieldMDT(); if (!screenFields.isCurrentFieldContinued()) { gotoFieldNext(); } else { do { gotoFieldNext(); if (screenFields.isCurrentFieldContinued()) fieldExit(); } while (screenFields.isCurrentFieldContinuedMiddle() || screenFields.isCurrentFieldContinuedLast()); } } updateDirty(); 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()) { resetDirty(lastPos); if (fieldExit()) { screenFields.setCurrentFieldMDT(); if (!screenFields.isCurrentFieldContinued()) { gotoFieldNext(); } else { do { gotoFieldNext(); } while (screenFields.isCurrentFieldContinuedMiddle() || screenFields.isCurrentFieldContinuedLast()); } } updateDirty(); 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) { screen[lastPos].setChar('-'); resetDirty(lastPos); advancePos(); if (fieldExit()) { screenFields.setCurrentFieldMDT(); if (!screenFields.isCurrentFieldContinued()) { gotoFieldNext(); } else { do { gotoFieldNext(); } while (screenFields.isCurrentFieldContinuedMiddle() || screenFields.isCurrentFieldContinuedLast()); } } updateDirty(); simulated = true; if (screenFields.isCurrentFieldAutoEnter()) sendAid(AID_ENTER); } else { displayError(ERR_FIELD_MINUS); } } else { displayError(ERR_CURSOR_PROTECTED); } break; case BOF : if (screenFields.getCurrentField() != null && screenFields.withinCurrentField(lastPos) && !screenFields.isCurrentFieldBypassField()) { int where = screenFields.getCurrentField().startPos(); if (where > 0) { goto_XY(where); } simulated = true; } else { displayError(ERR_CURSOR_PROTECTED); } resetDirty(lastPos); break; case SYSREQ : sessionVT.systemRequest(); simulated = true; break; case RESET : if (isStatusErrorCode()) { resetError(); isInField(lastPos); updateDirty(); } else { setPrehelpState(false,isKeyboardLocked(),false); } simulated = true; break; case COPY : copyMe(); break; case PASTE : pasteMe(false); break; case ATTN : sessionVT.sendAttentionKey(); simulated = true; break; case DUP_FIELD : if (screenFields.getCurrentField() != null && screenFields.withinCurrentField(lastPos) && !screenFields.isCurrentFieldBypassField()) { if (screenFields.isCurrentFieldDupEnabled()) { resetDirty(lastPos); screenFields.getCurrentField().setFieldChar(lastPos,(char)0x1C); screenFields.setCurrentFieldMDT(); gotoFieldNext(); updateDirty(); simulated = true; } else { displayError(ERR_DUP_KEY_NOT_ALLOWED); } } else { displayError(ERR_CURSOR_PROTECTED); } break; case NEW_LINE : if (screenFields.getSize() > 0) { int startRow = getRow(lastPos) + 1; int startPos = lastPos; boolean isthere = false; if (startRow == getRows()) startRow = 0; goto_XY(++startRow,1); if (!isInField() && screenFields.getCurrentField() != null && !screenFields.isCurrentFieldBypassField()) { while (!isInField() && screenFields.getCurrentField() != null && !screenFields.isCurrentFieldBypassField()) { // lets keep going advancePos(); // Have we looped the screen? if (lastPos == startPos) { // if so then go back to starting point goto_XY(startPos); break; } } } } simulated = true; break; case JUMP_NEXT_SESS : gui.nextSession(); simulated = true; break; case JUMP_PREV_SESS : gui.prevSession(); 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/9cfa94eb3d0e83caa3b415cf3db7594b803a17ba/Screen5250.java/clean/tn5250j/src/org/tn5250j/Screen5250.java
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 { screenFields.getCurrentField().getKeyPos(lastPos); screenFields.getCurrentField().changePos(-1); resetDirty(screenFields.getCurrentField().getCurrentPos()); shiftLeft(screenFields.getCurrentField().getCurrentPos()); updateDirty(); 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 :// setCursorOff(); process_XY(lastPos - numCols);// setCursorOn(); simulated = true; break; case DOWN : case MARK_DOWN :// setCursorOff(); process_XY(lastPos + numCols);// setCursorOn(); 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()) { resetDirty(lastPos); screenFields.getCurrentField().getKeyPos(lastPos); shiftLeft(screenFields.getCurrentFieldPos()); screenFields.setCurrentFieldMDT(); updateDirty(); 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()) { 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); simulated = true; } else { displayError(ERR_CURSOR_PROTECTED); } break; case ERASE_FIELD : if (screenFields.getCurrentField() != null && screenFields.withinCurrentField(lastPos) && !screenFields.isCurrentFieldBypassField()) { 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); simulated = true; } else { displayError(ERR_CURSOR_PROTECTED); } break; case INSERT : // we toggle it insertMode = insertMode ? false : true; 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()) { resetDirty(lastPos); if (fieldExit()) { screenFields.setCurrentFieldMDT(); if (!screenFields.isCurrentFieldContinued()) { gotoFieldNext(); } else { do { gotoFieldNext(); if (screenFields.isCurrentFieldContinued()) fieldExit(); } while (screenFields.isCurrentFieldContinuedMiddle() || screenFields.isCurrentFieldContinuedLast()); } } updateDirty(); 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()) { resetDirty(lastPos); if (fieldExit()) { screenFields.setCurrentFieldMDT(); if (!screenFields.isCurrentFieldContinued()) { gotoFieldNext(); } else { do { gotoFieldNext(); } while (screenFields.isCurrentFieldContinuedMiddle() || screenFields.isCurrentFieldContinuedLast()); } } updateDirty(); 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) { screen[lastPos].setChar('-'); resetDirty(lastPos); advancePos(); if (fieldExit()) { screenFields.setCurrentFieldMDT(); if (!screenFields.isCurrentFieldContinued()) { gotoFieldNext(); } else { do { gotoFieldNext(); } while (screenFields.isCurrentFieldContinuedMiddle() || screenFields.isCurrentFieldContinuedLast()); } } updateDirty(); simulated = true; if (screenFields.isCurrentFieldAutoEnter()) sendAid(AID_ENTER); } else { displayError(ERR_FIELD_MINUS); } } else { displayError(ERR_CURSOR_PROTECTED); } break; case BOF : if (screenFields.getCurrentField() != null && screenFields.withinCurrentField(lastPos) && !screenFields.isCurrentFieldBypassField()) { int where = screenFields.getCurrentField().startPos(); if (where > 0) { goto_XY(where); } simulated = true; } else { displayError(ERR_CURSOR_PROTECTED); } resetDirty(lastPos); break; case SYSREQ : sessionVT.systemRequest(); simulated = true; break; case RESET : if (isStatusErrorCode()) { resetError(); isInField(lastPos); updateDirty(); } else { setPrehelpState(false,isKeyboardLocked(),false); } simulated = true; break; case COPY : copyMe(); break; case PASTE : pasteMe(false); break; case ATTN : sessionVT.sendAttentionKey(); simulated = true; break; case DUP_FIELD : if (screenFields.getCurrentField() != null && screenFields.withinCurrentField(lastPos) && !screenFields.isCurrentFieldBypassField()) { if (screenFields.isCurrentFieldDupEnabled()) { resetDirty(lastPos); screenFields.getCurrentField().setFieldChar(lastPos,(char)0x1C); screenFields.setCurrentFieldMDT(); gotoFieldNext(); updateDirty(); simulated = true; } else { displayError(ERR_DUP_KEY_NOT_ALLOWED); } } else { displayError(ERR_CURSOR_PROTECTED); } break; case NEW_LINE : if (screenFields.getSize() > 0) { int startRow = getRow(lastPos) + 1; int startPos = lastPos; boolean isthere = false; if (startRow == getRows()) startRow = 0; goto_XY(++startRow,1); if (!isInField() && screenFields.getCurrentField() != null && !screenFields.isCurrentFieldBypassField()) { while (!isInField() && screenFields.getCurrentField() != null && !screenFields.isCurrentFieldBypassField()) { // lets keep going advancePos(); // Have we looped the screen? if (lastPos == startPos) { // if so then go back to starting point goto_XY(startPos); break; } } } } simulated = true; break; case JUMP_NEXT_SESS : gui.nextSession(); simulated = true; break; case JUMP_PREV_SESS : gui.prevSession(); 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/9cfa94eb3d0e83caa3b415cf3db7594b803a17ba/Screen5250.java/clean/tn5250j/src/org/tn5250j/Screen5250.java
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 { screenFields.getCurrentField().getKeyPos(lastPos); screenFields.getCurrentField().changePos(-1); resetDirty(screenFields.getCurrentField().getCurrentPos()); shiftLeft(screenFields.getCurrentField().getCurrentPos()); updateDirty(); 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 :// setCursorOff(); process_XY(lastPos - numCols);// setCursorOn(); simulated = true; break; case DOWN : case MARK_DOWN :// setCursorOff(); process_XY(lastPos + numCols);// setCursorOn(); 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()) { resetDirty(lastPos); screenFields.getCurrentField().getKeyPos(lastPos); shiftLeft(screenFields.getCurrentFieldPos()); screenFields.setCurrentFieldMDT(); updateDirty(); 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()) { 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); simulated = true; } else { displayError(ERR_CURSOR_PROTECTED); } break; case ERASE_FIELD : if (screenFields.getCurrentField() != null && screenFields.withinCurrentField(lastPos) && !screenFields.isCurrentFieldBypassField()) { 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); simulated = true; } else { displayError(ERR_CURSOR_PROTECTED); } break; case INSERT : // we toggle it insertMode = insertMode ? false : true; 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()) { resetDirty(lastPos); if (fieldExit()) { screenFields.setCurrentFieldMDT(); if (!screenFields.isCurrentFieldContinued()) { gotoFieldNext(); } else { do { gotoFieldNext(); if (screenFields.isCurrentFieldContinued()) fieldExit(); } while (screenFields.isCurrentFieldContinuedMiddle() || screenFields.isCurrentFieldContinuedLast()); } } updateDirty(); 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()) { resetDirty(lastPos); if (fieldExit()) { screenFields.setCurrentFieldMDT(); if (!screenFields.isCurrentFieldContinued()) { gotoFieldNext(); } else { do { gotoFieldNext(); } while (screenFields.isCurrentFieldContinuedMiddle() || screenFields.isCurrentFieldContinuedLast()); } } updateDirty(); 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) { screen[lastPos].setChar('-'); resetDirty(lastPos); advancePos(); if (fieldExit()) { screenFields.setCurrentFieldMDT(); if (!screenFields.isCurrentFieldContinued()) { gotoFieldNext(); } else { do { gotoFieldNext(); } while (screenFields.isCurrentFieldContinuedMiddle() || screenFields.isCurrentFieldContinuedLast()); } } updateDirty(); simulated = true; if (screenFields.isCurrentFieldAutoEnter()) sendAid(AID_ENTER); } else { displayError(ERR_FIELD_MINUS); } } else { displayError(ERR_CURSOR_PROTECTED); } break; case BOF : if (screenFields.getCurrentField() != null && screenFields.withinCurrentField(lastPos) && !screenFields.isCurrentFieldBypassField()) { int where = screenFields.getCurrentField().startPos(); if (where > 0) { goto_XY(where); } simulated = true; } else { displayError(ERR_CURSOR_PROTECTED); } resetDirty(lastPos); break; case SYSREQ : sessionVT.systemRequest(); simulated = true; break; case RESET : if (isStatusErrorCode()) { resetError(); isInField(lastPos); updateDirty(); } else { setPrehelpState(false,isKeyboardLocked(),false); } simulated = true; break; case COPY : copyMe(); break; case PASTE : pasteMe(false); break; case ATTN : sessionVT.sendAttentionKey(); simulated = true; break; case DUP_FIELD : if (screenFields.getCurrentField() != null && screenFields.withinCurrentField(lastPos) && !screenFields.isCurrentFieldBypassField()) { if (screenFields.isCurrentFieldDupEnabled()) { resetDirty(lastPos); screenFields.getCurrentField().setFieldChar(lastPos,(char)0x1C); screenFields.setCurrentFieldMDT(); gotoFieldNext(); updateDirty(); simulated = true; } else { displayError(ERR_DUP_KEY_NOT_ALLOWED); } } else { displayError(ERR_CURSOR_PROTECTED); } break; case NEW_LINE : if (screenFields.getSize() > 0) { int startRow = getRow(lastPos) + 1; int startPos = lastPos; boolean isthere = false; if (startRow == getRows()) startRow = 0; goto_XY(++startRow,1); if (!isInField() && screenFields.getCurrentField() != null && !screenFields.isCurrentFieldBypassField()) { while (!isInField() && screenFields.getCurrentField() != null && !screenFields.isCurrentFieldBypassField()) { // lets keep going advancePos(); // Have we looped the screen? if (lastPos == startPos) { // if so then go back to starting point goto_XY(startPos); break; } } } } simulated = true; break; case JUMP_NEXT_SESS : gui.nextSession(); simulated = true; break; case JUMP_PREV_SESS : gui.prevSession(); 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/9cfa94eb3d0e83caa3b415cf3db7594b803a17ba/Screen5250.java/clean/tn5250j/src/org/tn5250j/Screen5250.java
public Collection<FileSystemType> fileSystemTypes() { return Collections.unmodifiableCollection(types.values());
public synchronized Collection<FileSystemType> fileSystemTypes() { return new ArrayList<FileSystemType>(types.values());
public Collection<FileSystemType> fileSystemTypes() { return Collections.unmodifiableCollection(types.values()); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/db375ff26e46c7f1767dc5d096c5f8866c265859/FileSystemTypeManager.java/buggy/fs/src/fs/org/jnode/fs/service/def/FileSystemTypeManager.java
public FileSystemType getSystemType(String name) {
public synchronized FileSystemType getSystemType(String name) {
public FileSystemType getSystemType(String name) { return types.get(name); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/db375ff26e46c7f1767dc5d096c5f8866c265859/FileSystemTypeManager.java/buggy/fs/src/fs/org/jnode/fs/service/def/FileSystemTypeManager.java
protected synchronized void refreshFileSystemTypes() { types.clear();
protected final void refreshFileSystemTypes() { HashMap<String, FileSystemType> newTypes = new HashMap<String, FileSystemType>();
protected synchronized void refreshFileSystemTypes() { types.clear(); final Extension[] extensions = typesEP.getExtensions(); for (int i = 0; i < extensions.length; i++) { final Extension ext = extensions[i]; final ConfigurationElement[] elements = ext.getConfigurationElements(); for (int j = 0; j < elements.length; j++) { createType(types, elements[j]); } } }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/db375ff26e46c7f1767dc5d096c5f8866c265859/FileSystemTypeManager.java/buggy/fs/src/fs/org/jnode/fs/service/def/FileSystemTypeManager.java
createType(types, elements[j]);
createType(newTypes, elements[j]);
protected synchronized void refreshFileSystemTypes() { types.clear(); final Extension[] extensions = typesEP.getExtensions(); for (int i = 0; i < extensions.length; i++) { final Extension ext = extensions[i]; final ConfigurationElement[] elements = ext.getConfigurationElements(); for (int j = 0; j < elements.length; j++) { createType(types, elements[j]); } } }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/db375ff26e46c7f1767dc5d096c5f8866c265859/FileSystemTypeManager.java/buggy/fs/src/fs/org/jnode/fs/service/def/FileSystemTypeManager.java
synchronized (this) { this.types.clear(); this.types.putAll(newTypes); }
protected synchronized void refreshFileSystemTypes() { types.clear(); final Extension[] extensions = typesEP.getExtensions(); for (int i = 0; i < extensions.length; i++) { final Extension ext = extensions[i]; final ConfigurationElement[] elements = ext.getConfigurationElements(); for (int j = 0; j < elements.length; j++) { createType(types, elements[j]); } } }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/db375ff26e46c7f1767dc5d096c5f8866c265859/FileSystemTypeManager.java/buggy/fs/src/fs/org/jnode/fs/service/def/FileSystemTypeManager.java
sb.append((char)buf[x]);
sb.append(byte2char(buf[x], "cp850"));
private void cvtToPDF() { try { openOutputFile(); // Create the printparameters to be used in the transform of the // input stream PrintParameterList printParms = new PrintParameterList(); printParms.setParameter(PrintObject.ATTR_WORKSTATION_CUST_OBJECT, "/QSYS.LIB/QWPDEFAULT.WSCST"); printParms.setParameter(PrintObject.ATTR_MFGTYPE, "*WSCST"); // get the text (via a transformed input stream) from the spooled file PrintObjectTransformedInputStream inStream = splfile.getTransformedInputStream(printParms); // get the number of available bytes int avail = inStream.available(); byte[] buf = new byte[avail + 1]; int read = 0; int totBytes = 0; StringBuffer sb = new StringBuffer(); updateStatus("Starting Output"); // read the transformed spooled file, creating the jobLog String while (avail > 0) { if (avail > buf.length) { buf = new byte[avail + 1]; } read = inStream.read(buf, 0, avail); for (int x = 0; x < read; x++) { switch (buf[x]) { case 0x0: // 0x00 break; // write line feed to the stream case 0x0A:// writeChar(sb.toString()); sb.append((char)buf[x]);// System.out.print(sb);// sb.setLength(0); break; // we will skip the carrage return case 0x0D:// sb.append('\n');// writeChar("\n");// System.out.println(); break; // new page case 0x0C: writeBuffer(sb.toString()); document.newPage(); sb.setLength(0); break; default: sb.append((char)buf[x]); } } totBytes += read; updateStatus("Bytes read " + totBytes); // // process the data buffer // avail = inStream.available(); } closeOutputFile(); updateStatus("Total bytes converted " + totBytes); if (email.isSelected()) emailMe(); } catch (Exception e) { updateStatus("Error: " + e.getMessage ()); System.out.println ("Error: " + e.getMessage ()); } }
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/c837bdacac8d70849cdfe71643ea81465a4cd386/SpoolExportWizard.java/clean/tn5250j/src/org/tn5250j/spoolfile/SpoolExportWizard.java
private void cvtToPDF() { try { openOutputFile(); // Create the printparameters to be used in the transform of the // input stream PrintParameterList printParms = new PrintParameterList(); printParms.setParameter(PrintObject.ATTR_WORKSTATION_CUST_OBJECT, "/QSYS.LIB/QWPDEFAULT.WSCST"); printParms.setParameter(PrintObject.ATTR_MFGTYPE, "*WSCST"); // get the text (via a transformed input stream) from the spooled file PrintObjectTransformedInputStream inStream = splfile.getTransformedInputStream(printParms); // get the number of available bytes int avail = inStream.available(); byte[] buf = new byte[avail + 1]; int read = 0; int totBytes = 0; StringBuffer sb = new StringBuffer(); updateStatus("Starting Output"); // read the transformed spooled file, creating the jobLog String while (avail > 0) { if (avail > buf.length) { buf = new byte[avail + 1]; } read = inStream.read(buf, 0, avail); for (int x = 0; x < read; x++) { switch (buf[x]) { case 0x0: // 0x00 break; // write line feed to the stream case 0x0A:// writeChar(sb.toString()); sb.append((char)buf[x]);// System.out.print(sb);// sb.setLength(0); break; // we will skip the carrage return case 0x0D:// sb.append('\n');// writeChar("\n");// System.out.println(); break; // new page case 0x0C: writeBuffer(sb.toString()); document.newPage(); sb.setLength(0); break; default: sb.append((char)buf[x]); } } totBytes += read; updateStatus("Bytes read " + totBytes); // // process the data buffer // avail = inStream.available(); } closeOutputFile(); updateStatus("Total bytes converted " + totBytes); if (email.isSelected()) emailMe(); } catch (Exception e) { updateStatus("Error: " + e.getMessage ()); System.out.println ("Error: " + e.getMessage ()); } }
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/c837bdacac8d70849cdfe71643ea81465a4cd386/SpoolExportWizard.java/clean/tn5250j/src/org/tn5250j/spoolfile/SpoolExportWizard.java
sb.append((char)buf[x]);
sb.append(byte2char(buf[x], "cp850"));
private void cvtToText() { java.io.PrintStream dw; try { openOutputFile(); if (ifs.isSelected()) dw = new java.io.PrintStream(ifsfw); else dw = new java.io.PrintStream(fw); // Create an AS400 object. The system name was passed // as the first command line argument. AS400 system = new AS400 (systemName.getText()); String splfName = spooledFile.getText(); int splfNumber = Integer.parseInt(spooledFileNumber.getText()); String _jobName = jobName.getText(); String _jobUser = user.getText(); String _jobNumber = number.getText(); SpooledFile splF = new SpooledFile(system, splfName, splfNumber, _jobName, _jobUser, _jobNumber); PrintParameterList printParms = new PrintParameterList(); printParms.setParameter(PrintObject.ATTR_WORKSTATION_CUST_OBJECT, "/QSYS.LIB/QWPDEFAULT.WSCST"); printParms.setParameter(PrintObject.ATTR_MFGTYPE, "*WSCST"); // get the text (via a transformed input stream) from the spooled file PrintObjectTransformedInputStream inStream = splF.getTransformedInputStream(printParms); // DataInputStream dis = new DataInputStream(inStream); // get the number of available bytes int avail = inStream.available(); byte[] buf = new byte[avail + 1]; int read = 0; int totBytes = 0; StringBuffer sb = new StringBuffer(); updateStatus("Starting Output"); // read the transformed spooled file, creating the jobLog String while (avail > 0) { if (avail > buf.length) { buf = new byte[avail + 1]; } read = inStream.read(buf, 0, avail); for (int x = 0; x < read; x++) { switch (buf[x]) { case 0x0: // 0x00 break; // write line feed to the stream case 0x0A: dw.println(sb.toString().toCharArray()); sb.setLength(0); break; // we will skip the carrage return case 0x0D:// sb.append('\n');// writeChar("\n");// System.out.println(); break; // new page case 0x0C:// writeChar(sb.toString());// dw.write(sb.toString().getBytes()); dw.println(sb.toString().toCharArray()); sb.setLength(0); break; default: sb.append((char)buf[x]); } } totBytes += read; updateStatus("Bytes read " + totBytes); // // process the data buffer // avail = inStream.available(); } if (sb.length() > 0) dw.println(sb.toString().toCharArray()); dw.flush(); dw.close(); updateStatus("Total bytes converted " + totBytes); // if we are to open it afterwards then execute the program with the // text file as a parameter if (openAfter.isSelected()) { // not sure if this works on linux yet but here we go. try { Runtime rt = Runtime.getRuntime(); String[] cmdArray = {editor.getText(),pcPathInfo.getText()}; // We need to probably do some checking here in the future // Process proc = rt.exec(cmdArray); rt.exec(cmdArray); // now we set the field to use external viewer or not if (openAfter.isSelected()) session.getConfiguration().setProperty("useExternal",""); else session.getConfiguration().removeProperty("useExternal"); // now we set the property for external viewer session.getConfiguration().setProperty("externalViewer", editor.getText()); // save it off session.getConfiguration().saveSessionProps(); } catch (Throwable t) { // print a stack trace t.printStackTrace(); // throw up the message error JOptionPane.showMessageDialog(this,t.getMessage(),"error", JOptionPane.ERROR_MESSAGE); } } if (email.isSelected()) emailMe(); } catch (Exception e) { updateStatus("Error: " + e.getMessage ()); System.out.println ("Error: " + e.getMessage ()); } }
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/c837bdacac8d70849cdfe71643ea81465a4cd386/SpoolExportWizard.java/clean/tn5250j/src/org/tn5250j/spoolfile/SpoolExportWizard.java
attribs = attribtable; isDelimitedCase = false;
Enumeration keys = attribtable.keys(); while (keys.hasMoreElements()) { String key = (String) keys.nextElement(); Object value = attribtable.get(key); attribs.put(key,value); } this.isDelimitedCase = false;
public void init (Hashtable attribtable) { attribs = attribtable; isDelimitedCase = false; }
4483 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4483/31fd561c304aa6c3550d699a7ed7d5b2ef530684/SaxDocumentHandler.java/buggy/src/gov/nasa/gsfc/adc/xdf/SaxDocumentHandler.java
public void setSize(String value) { attribs.put("size", value); }
public void setSize(int value) { attribs.put("size", Integer.toString(value)); }
public void setSize(String value) { attribs.put("size", value); }
4483 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4483/31fd561c304aa6c3550d699a7ed7d5b2ef530684/SaxDocumentHandler.java/buggy/src/gov/nasa/gsfc/adc/xdf/SaxDocumentHandler.java
public void setStep (String value) { attribs.put("step", value); }
public void setStep (int value) { attribs.put("step", Integer.toString(value)); }
public void setStep (String value) { attribs.put("step", value); }
4483 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4483/31fd561c304aa6c3550d699a7ed7d5b2ef530684/SaxDocumentHandler.java/buggy/src/gov/nasa/gsfc/adc/xdf/SaxDocumentHandler.java
}
}
public boolean setFieldAxis (FieldAxis fieldAxis) { if (!canAddAxisObjToArray(fieldAxis)) return false; hasFieldAxis = false; if (getFieldAxis() != null) { // replace or removal List axisList = getAxes(); axisList.remove(0); if (fieldAxis != null) { axisList.add(0, fieldAxis); //replace the old fieldAxis with the new one hasFieldAxis = true; } } else { //add a fieldAxis where none prev existed. if (fieldAxis != null) { // only if we have something to add getAxes().add(0, fieldAxis); getDataCube().incrementDimension(fieldAxis); // increment dimension hasFieldAxis = true; } } // IF we had an object, update the locators if (fieldAxis != null) { updateChildLocators(fieldAxis, "add"); } updateNotesLocationOrder(); // reset to the current order of the axes // may not be needed, but we do for all cases anyways //array doenst hold a dataformat anymore //each field along the fieldAxis should have dataformat // IF fieldAxis exists if (hasFieldAxis) { setDataFormat(null); } return true; }
4483 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4483/3266f401876bff8226e268cfbabeb96a9a320789/Array.java/buggy/src/gov/nasa/gsfc/adc/xdf/Array.java
getDataCube().incrementDimension(fieldAxis);
public boolean setFieldAxis (FieldAxis fieldAxis) { if (!canAddAxisObjToArray(fieldAxis)) return false; hasFieldAxis = false; if (getFieldAxis() != null) { // replace or removal List axisList = getAxes(); axisList.remove(0); if (fieldAxis != null) { axisList.add(0, fieldAxis); //replace the old fieldAxis with the new one hasFieldAxis = true; } } else { //add a fieldAxis where none prev existed. if (fieldAxis != null) { // only if we have something to add getAxes().add(0, fieldAxis); getDataCube().incrementDimension(fieldAxis); // increment dimension hasFieldAxis = true; } } // IF we had an object, update the locators if (fieldAxis != null) { updateChildLocators(fieldAxis, "add"); } updateNotesLocationOrder(); // reset to the current order of the axes // may not be needed, but we do for all cases anyways //array doenst hold a dataformat anymore //each field along the fieldAxis should have dataformat // IF fieldAxis exists if (hasFieldAxis) { setDataFormat(null); } return true; }
4483 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4483/3266f401876bff8226e268cfbabeb96a9a320789/Array.java/buggy/src/gov/nasa/gsfc/adc/xdf/Array.java
getDataCube().reset();
public boolean setFieldAxis (FieldAxis fieldAxis) { if (!canAddAxisObjToArray(fieldAxis)) return false; hasFieldAxis = false; if (getFieldAxis() != null) { // replace or removal List axisList = getAxes(); axisList.remove(0); if (fieldAxis != null) { axisList.add(0, fieldAxis); //replace the old fieldAxis with the new one hasFieldAxis = true; } } else { //add a fieldAxis where none prev existed. if (fieldAxis != null) { // only if we have something to add getAxes().add(0, fieldAxis); getDataCube().incrementDimension(fieldAxis); // increment dimension hasFieldAxis = true; } } // IF we had an object, update the locators if (fieldAxis != null) { updateChildLocators(fieldAxis, "add"); } updateNotesLocationOrder(); // reset to the current order of the axes // may not be needed, but we do for all cases anyways //array doenst hold a dataformat anymore //each field along the fieldAxis should have dataformat // IF fieldAxis exists if (hasFieldAxis) { setDataFormat(null); } return true; }
4483 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4483/3266f401876bff8226e268cfbabeb96a9a320789/Array.java/buggy/src/gov/nasa/gsfc/adc/xdf/Array.java
public ValueListDelimitedList(List values, String delimiter, String noDataValue, String infiniteValue, String infiniteNegativeValue, String notANumberValue, String overflowValue, String underflowValue ) { if (delimiter == null) { Log.errorln("ERROR: in ValueListDelimitedList() delimiter string can't be null."); System.exit(-1); } setDelimiter(delimiter); setNoData(noDataValue); setNotANumber(notANumberValue); setInfinite(infiniteValue); setInfiniteNegative(infiniteNegativeValue); setUnderflow(underflowValue); setOverflow(overflowValue);
public ValueListDelimitedList (List values) {
public ValueListDelimitedList(List values, String delimiter, String noDataValue, String infiniteValue, String infiniteNegativeValue, String notANumberValue, String overflowValue, String underflowValue ) { if (delimiter == null) { Log.errorln("ERROR: in ValueListDelimitedList() delimiter string can't be null."); System.exit(-1); } setDelimiter(delimiter); setNoData(noDataValue); setNotANumber(notANumberValue); setInfinite(infiniteValue); setInfiniteNegative(infiniteNegativeValue); setUnderflow(underflowValue); setOverflow(overflowValue); setValues(values); }
4483 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4483/57f32658b53e820a26154aac60c99ffe3026de0f/ValueListDelimitedList.java/buggy/src/gov/nasa/gsfc/adc/xdf/ValueListDelimitedList.java
public ValueListDelimitedList(List values, String delimiter, String noDataValue, String infiniteValue, String infiniteNegativeValue, String notANumberValue, String overflowValue, String underflowValue ) { if (delimiter == null) { Log.errorln("ERROR: in ValueListDelimitedList() delimiter string can't be null."); System.exit(-1); } setDelimiter(delimiter); setNoData(noDataValue); setNotANumber(notANumberValue); setInfinite(infiniteValue); setInfiniteNegative(infiniteNegativeValue); setUnderflow(underflowValue); setOverflow(overflowValue); setValues(values); }
4483 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4483/57f32658b53e820a26154aac60c99ffe3026de0f/ValueListDelimitedList.java/buggy/src/gov/nasa/gsfc/adc/xdf/ValueListDelimitedList.java
public String toString()
public static String toString(float f)
public String toString() { return toString(value); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/4d952c1ff48838834c7dcd3b56acf7f236a00079/Float.java/buggy/core/src/classpath/5.0/java/lang/Float.java
return toString(value);
return VMDouble.toString(f, true);
public String toString() { return toString(value); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/4d952c1ff48838834c7dcd3b56acf7f236a00079/Float.java/buggy/core/src/classpath/5.0/java/lang/Float.java
if (theme == null)
public MetalLookAndFeel() { createDefaultTheme(); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/045a5b41cdfa747889101d3993040acf89788bc4/MetalLookAndFeel.java/buggy/core/src/classpath/javax/javax/swing/plaf/metal/MetalLookAndFeel.java
Thread currentThread = Thread.currentThread(); List heritage = (List) threadMap.get(currentThread); if (heritage == null) { heritage = new ArrayList(); threadMap.put(currentThread, heritage); } heritage.add(this);
public InheritableThreadLocal() { Thread currentThread = Thread.currentThread(); // Note that we don't have to synchronize, as only this thread will // ever modify the returned heritage and threadMap is a synchronizedMap. List heritage = (List) threadMap.get(currentThread); if (heritage == null) { heritage = new ArrayList(); threadMap.put(currentThread, heritage); } heritage.add(this); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/83a7a3853dc85765487a87b5a791a0d7b225f70f/InheritableThreadLocal.java/clean/core/src/classpath/java/java/lang/InheritableThreadLocal.java
ArrayList heritage = (ArrayList) threadMap.get(parentThread); if (heritage != null)
if (parentThread.locals != null)
static void newChildThread(Thread childThread) { // The currentThread is the parent of the new thread. Thread parentThread = Thread.currentThread(); // Note that we don't have to synchronize, as only this thread will // ever modify the returned heritage and threadMap is a synchronizedMap. ArrayList heritage = (ArrayList) threadMap.get(parentThread); if (heritage != null) { threadMap.put(childThread, heritage.clone()); // Perform the inheritance. Iterator it = heritage.iterator(); int i = heritage.size(); while (--i >= 0) { InheritableThreadLocal local = (InheritableThreadLocal) it.next(); Object parentValue = local.valueMap.get(parentThread); if (parentValue != null) { Object childValue = local.childValue(parentValue == NULL ? null : parentValue); local.valueMap.put(childThread, (childValue == null ? NULL : parentValue)); } } } }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/83a7a3853dc85765487a87b5a791a0d7b225f70f/InheritableThreadLocal.java/clean/core/src/classpath/java/java/lang/InheritableThreadLocal.java
threadMap.put(childThread, heritage.clone()); Iterator it = heritage.iterator(); int i = heritage.size(); while (--i >= 0)
Iterator keys = parentThread.locals.keySet().iterator(); while (keys.hasNext())
static void newChildThread(Thread childThread) { // The currentThread is the parent of the new thread. Thread parentThread = Thread.currentThread(); // Note that we don't have to synchronize, as only this thread will // ever modify the returned heritage and threadMap is a synchronizedMap. ArrayList heritage = (ArrayList) threadMap.get(parentThread); if (heritage != null) { threadMap.put(childThread, heritage.clone()); // Perform the inheritance. Iterator it = heritage.iterator(); int i = heritage.size(); while (--i >= 0) { InheritableThreadLocal local = (InheritableThreadLocal) it.next(); Object parentValue = local.valueMap.get(parentThread); if (parentValue != null) { Object childValue = local.childValue(parentValue == NULL ? null : parentValue); local.valueMap.put(childThread, (childValue == null ? NULL : parentValue)); } } } }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/83a7a3853dc85765487a87b5a791a0d7b225f70f/InheritableThreadLocal.java/clean/core/src/classpath/java/java/lang/InheritableThreadLocal.java
InheritableThreadLocal local = (InheritableThreadLocal) it.next(); Object parentValue = local.valueMap.get(parentThread); if (parentValue != null)
Key key = (Key)keys.next(); if (key.get() instanceof InheritableThreadLocal)
static void newChildThread(Thread childThread) { // The currentThread is the parent of the new thread. Thread parentThread = Thread.currentThread(); // Note that we don't have to synchronize, as only this thread will // ever modify the returned heritage and threadMap is a synchronizedMap. ArrayList heritage = (ArrayList) threadMap.get(parentThread); if (heritage != null) { threadMap.put(childThread, heritage.clone()); // Perform the inheritance. Iterator it = heritage.iterator(); int i = heritage.size(); while (--i >= 0) { InheritableThreadLocal local = (InheritableThreadLocal) it.next(); Object parentValue = local.valueMap.get(parentThread); if (parentValue != null) { Object childValue = local.childValue(parentValue == NULL ? null : parentValue); local.valueMap.put(childThread, (childValue == null ? NULL : parentValue)); } } } }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/83a7a3853dc85765487a87b5a791a0d7b225f70f/InheritableThreadLocal.java/clean/core/src/classpath/java/java/lang/InheritableThreadLocal.java
local.valueMap.put(childThread, (childValue == null ? NULL : parentValue));
if (childThread.locals == null) childThread.locals = new WeakHashMap(); childThread.locals.put(key, (childValue == null ? NULL : childValue));
static void newChildThread(Thread childThread) { // The currentThread is the parent of the new thread. Thread parentThread = Thread.currentThread(); // Note that we don't have to synchronize, as only this thread will // ever modify the returned heritage and threadMap is a synchronizedMap. ArrayList heritage = (ArrayList) threadMap.get(parentThread); if (heritage != null) { threadMap.put(childThread, heritage.clone()); // Perform the inheritance. Iterator it = heritage.iterator(); int i = heritage.size(); while (--i >= 0) { InheritableThreadLocal local = (InheritableThreadLocal) it.next(); Object parentValue = local.valueMap.get(parentThread); if (parentValue != null) { Object childValue = local.childValue(parentValue == NULL ? null : parentValue); local.valueMap.put(childThread, (childValue == null ? NULL : parentValue)); } } } }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/83a7a3853dc85765487a87b5a791a0d7b225f70f/InheritableThreadLocal.java/clean/core/src/classpath/java/java/lang/InheritableThreadLocal.java
frame.show();
frame.setVisible(true);
public Screen5250 startSession(String name) { JFrame frame = new JFrame(); String args[] = new String[15]; parseArgs((String) sesprops.get(name), args); Properties fin = convertToProps(args); Session5250 newses = manager.openSession(fin, null, name); SessionGUI newGui = new SessionGUI(newses); frame.getContentPane().add(newGui); frame.setBounds(50, 50, 960, 700); frame.show(); newses.connect(); return newses.getScreen(); }
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/d3f4f0d032e4305c6a78bdb863ee5599f3e41633/Tn5250jController.java/clean/tn5250j/src/org/tn5250j/framework/Tn5250jController.java
if (sesProps.containsKey(org.tn5250j.framework.transport.SSLConstants.SSL_TYPE)) { sslType = (String)sesProps.getProperty(org.tn5250j.framework.transport.SSLConstants.SSL_TYPE);
String sslType = null; if (sesProps.containsKey(TN5250jConstants.SSL_TYPE)) { sslType = (String)sesProps.getProperty(TN5250jConstants.SSL_TYPE);
public void connect() { String proxyPort = "1080"; // default socks proxy port boolean enhanced = false; boolean support132 = false; int port = 23; // default telnet port enhanced = sesProps.containsKey(SESSION_TN_ENHANCED); if (sesProps.containsKey(SESSION_SCREEN_SIZE)) if (((String)sesProps.getProperty(SESSION_SCREEN_SIZE)).equals(SCREEN_SIZE_27X132_STR)) support132 = true; final tnvt vt = new tnvt(this,screen,enhanced,support132); setVT(vt);// vt.setController(this); if (sesProps.containsKey(SESSION_PROXY_PORT)) proxyPort = (String)sesProps.getProperty(SESSION_PROXY_PORT); if (sesProps.containsKey(SESSION_PROXY_HOST)) vt.setProxy((String)sesProps.getProperty(SESSION_PROXY_HOST), proxyPort); if (sesProps.containsKey(org.tn5250j.framework.transport.SSLConstants.SSL_TYPE)) { sslType = (String)sesProps.getProperty(org.tn5250j.framework.transport.SSLConstants.SSL_TYPE); } else { // set default to none sslType = org.tn5250j.framework.transport.SSLConstants.SSL_TYPE_NONE; } vt.setSSLType(sslType); if (sesProps.containsKey(SESSION_CODE_PAGE)) vt.setCodePage((String)sesProps.getProperty(SESSION_CODE_PAGE)); if (sesProps.containsKey(SESSION_DEVICE_NAME)) vt.setDeviceName((String)sesProps.getProperty(SESSION_DEVICE_NAME)); if (sesProps.containsKey(SESSION_HOST_PORT)) { port = Integer.parseInt((String)sesProps.getProperty(SESSION_HOST_PORT)); } else { // set to default 23 of telnet port = 23; } final String ses = (String)sesProps.getProperty(SESSION_HOST); final int portp = port; // lets set this puppy up to connect within its own thread Runnable connectIt = new Runnable() { public void run() { vt.connect(ses,portp); } }; // now lets set it to connect within its own daemon thread // this seems to work better and is more responsive than using // swingutilities's invokelater Thread ct = new Thread(connectIt); ct.setDaemon(true); ct.start(); }
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/3d7ef96190bb6c412f768ba9c0eebbb5657cd342/Session5250.java/buggy/tn5250j/src/org/tn5250j/Session5250.java
sslType = org.tn5250j.framework.transport.SSLConstants.SSL_TYPE_NONE;
sslType = TN5250jConstants.SSL_TYPE_NONE;
public void connect() { String proxyPort = "1080"; // default socks proxy port boolean enhanced = false; boolean support132 = false; int port = 23; // default telnet port enhanced = sesProps.containsKey(SESSION_TN_ENHANCED); if (sesProps.containsKey(SESSION_SCREEN_SIZE)) if (((String)sesProps.getProperty(SESSION_SCREEN_SIZE)).equals(SCREEN_SIZE_27X132_STR)) support132 = true; final tnvt vt = new tnvt(this,screen,enhanced,support132); setVT(vt);// vt.setController(this); if (sesProps.containsKey(SESSION_PROXY_PORT)) proxyPort = (String)sesProps.getProperty(SESSION_PROXY_PORT); if (sesProps.containsKey(SESSION_PROXY_HOST)) vt.setProxy((String)sesProps.getProperty(SESSION_PROXY_HOST), proxyPort); if (sesProps.containsKey(org.tn5250j.framework.transport.SSLConstants.SSL_TYPE)) { sslType = (String)sesProps.getProperty(org.tn5250j.framework.transport.SSLConstants.SSL_TYPE); } else { // set default to none sslType = org.tn5250j.framework.transport.SSLConstants.SSL_TYPE_NONE; } vt.setSSLType(sslType); if (sesProps.containsKey(SESSION_CODE_PAGE)) vt.setCodePage((String)sesProps.getProperty(SESSION_CODE_PAGE)); if (sesProps.containsKey(SESSION_DEVICE_NAME)) vt.setDeviceName((String)sesProps.getProperty(SESSION_DEVICE_NAME)); if (sesProps.containsKey(SESSION_HOST_PORT)) { port = Integer.parseInt((String)sesProps.getProperty(SESSION_HOST_PORT)); } else { // set to default 23 of telnet port = 23; } final String ses = (String)sesProps.getProperty(SESSION_HOST); final int portp = port; // lets set this puppy up to connect within its own thread Runnable connectIt = new Runnable() { public void run() { vt.connect(ses,portp); } }; // now lets set it to connect within its own daemon thread // this seems to work better and is more responsive than using // swingutilities's invokelater Thread ct = new Thread(connectIt); ct.setDaemon(true); ct.start(); }
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/3d7ef96190bb6c412f768ba9c0eebbb5657cd342/Session5250.java/buggy/tn5250j/src/org/tn5250j/Session5250.java
return null;
String[][] info = { {"host","text","Hostname or IP Address of Host"}, {"-p","int","IP Port to connect to"}, {"width","int","Width of Applet"}, {"height","int","Height of Applet"}, {"-dn","text","Screen Device Name"}, {"-sslType","text","Type of SSL connection (NONE | SSLv2 | TLS)"} }; return info;
public String[][] getParameterInfo() { return null; }
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/71f98545e9f52976eb4d87bc7cfe61fbd4f0021c/My5250App.java/buggy/tn5250j/src/org/tn5250j/My5250App.java
Session s = manager.openSession(sesProps,"","Test Applet");
Session s = manager.openSession(sesProps,"",sessionName);
private void jbInit() throws Exception { this.setSize(new Dimension(400,300)); Properties sesProps = new Properties(); // Start loading properties - Host must exist sesProps.put(SESSION_HOST,getParameter("host")); if (isSpecified("-e")) sesProps.put(SESSION_TN_ENHANCED,"1"); if (isSpecified("-p")) { sesProps.put(SESSION_HOST_PORT,getParameter("-p")); }// if (isSpecified("-f",args))// propFileName = getParm("-f",args); if (isSpecified("-cp")) sesProps.put(SESSION_CODE_PAGE ,getParameter("-cp")); if (isSpecified("-gui")) sesProps.put(SESSION_USE_GUI,"1"); if (isSpecified("-132")) sesProps.put(SESSION_SCREEN_SIZE,SCREEN_SIZE_27X132_STR); else sesProps.put(SESSION_SCREEN_SIZE,SCREEN_SIZE_24X80_STR); // socks proxy host argument if (isSpecified("-sph")) { sesProps.put(SESSION_PROXY_HOST ,getParameter("-sph")); } // socks proxy port argument if (isSpecified("-spp")) sesProps.put(SESSION_PROXY_PORT ,getParameter("-spp")); // check if device name is specified if (isSpecified("-dn")) sesProps.put(SESSION_DEVICE_NAME ,getParameter("-dn")); if (isSpecified("-L")) LangTool.init(parseLocale(getParameter("-L"))); else LangTool.init(); if (isSpecified("-sslType")) { sesProps.put(SSL_TYPE,getParameter("-sslType")); } manager = new SessionManager(); Session s = manager.openSession(sesProps,"","Test Applet"); this.getContentPane().add(s); s.connect(); }
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/71f98545e9f52976eb4d87bc7cfe61fbd4f0021c/My5250App.java/buggy/tn5250j/src/org/tn5250j/My5250App.java
private void jbInit() throws Exception { this.setSize(new Dimension(400,300)); Properties sesProps = new Properties(); // Start loading properties - Host must exist sesProps.put(SESSION_HOST,getParameter("host")); if (isSpecified("-e")) sesProps.put(SESSION_TN_ENHANCED,"1"); if (isSpecified("-p")) { sesProps.put(SESSION_HOST_PORT,getParameter("-p")); }// if (isSpecified("-f",args))// propFileName = getParm("-f",args); if (isSpecified("-cp")) sesProps.put(SESSION_CODE_PAGE ,getParameter("-cp")); if (isSpecified("-gui")) sesProps.put(SESSION_USE_GUI,"1"); if (isSpecified("-132")) sesProps.put(SESSION_SCREEN_SIZE,SCREEN_SIZE_27X132_STR); else sesProps.put(SESSION_SCREEN_SIZE,SCREEN_SIZE_24X80_STR); // socks proxy host argument if (isSpecified("-sph")) { sesProps.put(SESSION_PROXY_HOST ,getParameter("-sph")); } // socks proxy port argument if (isSpecified("-spp")) sesProps.put(SESSION_PROXY_PORT ,getParameter("-spp")); // check if device name is specified if (isSpecified("-dn")) sesProps.put(SESSION_DEVICE_NAME ,getParameter("-dn")); if (isSpecified("-L")) LangTool.init(parseLocale(getParameter("-L"))); else LangTool.init(); if (isSpecified("-sslType")) { sesProps.put(SSL_TYPE,getParameter("-sslType")); } manager = new SessionManager(); Session s = manager.openSession(sesProps,"","Test Applet"); this.getContentPane().add(s); s.connect(); }
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/71f98545e9f52976eb4d87bc7cfe61fbd4f0021c/My5250App.java/buggy/tn5250j/src/org/tn5250j/My5250App.java
protected SessionManager() { if (_instance == null) { // initialize the settings information initialize(); // set our instance to this one. _instance = this; } }
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/379255347f37d0432228baaff23d41ccb4ad68bd/SessionManager.java/buggy/tn5250j/src/org/tn5250j/SessionManager.java
public void getInts(int memPtr, char[] dst, int dstOfs, int length) {
public void getInts(int memPtr, int[] dst, int dstOfs, int length) {
public void getInts(int memPtr, char[] dst, int dstOfs, int length) { if (dstOfs < 0) { throw new IndexOutOfBoundsException("dstOfs < 0"); } if (length < 0) { throw new IndexOutOfBoundsException("length < 0"); } if (dstOfs + length > dst.length) { throw new IndexOutOfBoundsException("dstOfs + length > dst.length"); } testMemPtr(memPtr, length * 4); Address dstPtr = Unsafe.add(Unsafe.addressOf(dst), (VmArray.DATA_OFFSET * slotSize) + (dstOfs * 4)); Unsafe.copy(Unsafe.add(start, memPtr), dstPtr, length * 4); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/cf8ce2c5ba5a917561914a10973076ffaf84b47b/MemoryResourceImpl.java/clean/core/src/core/org/jnode/vm/MemoryResourceImpl.java
screen52.setPrehelpState(true);
screen52.setPrehelpState(true,true,false);
public void sendNegResponse2(int ec) { screen52.setPrehelpState(true); baosp.write(0x00); baosp.write(ec); try { writeGDS(1, 0, baosp.toByteArray()); } catch (IOException ioe) { System.out.println(ioe.getMessage()); } baosp.reset(); }
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/4aeb43e177d093974bc7ac8bf0617a0a162695fa/tnvt.java/clean/tn5250j/src/org/tn5250j/tnvt.java
show();
setVisible(true);
void jbInit() throws Exception { // create some reusable borders and layouts BorderLayout borderLayout = new BorderLayout(); mapper = new KeyMapper(); KeyMapper.init(); keyPanel.setLayout(borderLayout); keyPanel.add(createFunctionsPanel(),BorderLayout.WEST); keyPanel.add(createMappingPanel(),BorderLayout.CENTER); // add the panels to our dialog getContentPane().add(keyPanel,BorderLayout.CENTER); getContentPane().add(options, BorderLayout.SOUTH); // add option buttons to options panel addOptButton(LangTool.getString("key.labelDone","Done"),"DONE",options,true); this.setModal(true); this.setTitle(LangTool.getString("key.title")); // pack it and center it on the screen pack(); Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize(); Dimension frameSize = getSize(); if (frameSize.height > screenSize.height) frameSize.height = screenSize.height; if (frameSize.width > screenSize.width) frameSize.width = screenSize.width; setLocation((screenSize.width - frameSize.width) / 2, (screenSize.height - frameSize.height) / 2); // now show the world what we can do show(); }
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/d3f4f0d032e4305c6a78bdb863ee5599f3e41633/KeyConfigure.java/buggy/tn5250j/src/org/tn5250j/keyboard/configure/KeyConfigure.java
public static void init() {// if (mappedKeys != null)// return;//// init("keymap");//// }//// public static void init(String map) { if (mappedKeys != null) return;// keyMapName = map; mappedKeys = new HashMap(60); workStroke = new KeyStroker(0, false, false, false,false);// Properties keys = new Properties(); Properties keys = ConfigureFactory.getInstance().getProperties( GlobalConfigure.KEYMAP); if (!loadKeyStrokes(keys)) { // keycode shift control alternate // Key <-> Keycode , isShiftDown , isControlDown , isAlternateDown // my personal preference mappedKeys.put(new KeyStroker(10, false, false, false, false),"[fldext]"); mappedKeys.put(new KeyStroker(17, false, true, false, false),"[enter]");// mappedKeys.put(new KeyStroker(10, false, false, false),"[enter]");// mappedKeys.put(new KeyStroker(10, true, false, false),"[fldext]"); mappedKeys.put(new KeyStroker(8, false, false, false, false),"[backspace]"); mappedKeys.put(new KeyStroker(9, false, false, false, false),"[tab]"); mappedKeys.put(new KeyStroker(9, true, false, false, false),"[backtab]"); mappedKeys.put(new KeyStroker(127, false, false, false, false),"[delete]"); mappedKeys.put(new KeyStroker(155, false, false, false, false),"[insert]"); mappedKeys.put(new KeyStroker(19, false, false, false, false),"[clear]"); mappedKeys.put(new KeyStroker(27, false, false, false, false),"[reset]"); mappedKeys.put(new KeyStroker(27, true, false, false, false),"[sysreq]"); mappedKeys.put(new KeyStroker(35, false, false, false, false),"[eof]"); mappedKeys.put(new KeyStroker(36, false, false, false, false),"[home]"); mappedKeys.put(new KeyStroker(39, false, false, false, false),"[right]"); mappedKeys.put(new KeyStroker(39, false, false, true, false),"[nextword]"); mappedKeys.put(new KeyStroker(37, false, false, false, false),"[left]"); mappedKeys.put(new KeyStroker(37, false, false, true, false),"[prevword]"); mappedKeys.put(new KeyStroker(38, false, false, false, false),"[up]"); mappedKeys.put(new KeyStroker(40, false, false, false, false),"[down]"); mappedKeys.put(new KeyStroker(34, false, false, false, false),"[pgdown]"); mappedKeys.put(new KeyStroker(33, false, false, false, false),"[pgup]"); mappedKeys.put(new KeyStroker(96, false, false, false, false),"[keypad0]"); mappedKeys.put(new KeyStroker(97, false, false, false, false),"[keypad1]"); mappedKeys.put(new KeyStroker(98, false, false, false, false),"[keypad2]"); mappedKeys.put(new KeyStroker(99, false, false, false, false),"[keypad3]"); mappedKeys.put(new KeyStroker(100, false, false, false, false),"[keypad4]"); mappedKeys.put(new KeyStroker(101, false, false, false, false),"[keypad5]"); mappedKeys.put(new KeyStroker(102, false, false, false, false),"[keypad6]"); mappedKeys.put(new KeyStroker(103, false, false, false, false),"[keypad7]"); mappedKeys.put(new KeyStroker(104, false, false, false, false),"[keypad8]"); mappedKeys.put(new KeyStroker(105, false, false, false, false),"[keypad9]"); mappedKeys.put(new KeyStroker(109, false, false, false, false),"[field-]"); mappedKeys.put(new KeyStroker(107, false, false, false, false),"[field+]"); mappedKeys.put(new KeyStroker(112, false, false, false, false),"[pf1]"); mappedKeys.put(new KeyStroker(113, false, false, false, false),"[pf2]"); mappedKeys.put(new KeyStroker(114, false, false, false, false),"[pf3]"); mappedKeys.put(new KeyStroker(115, false, false, false, false),"[pf4]"); mappedKeys.put(new KeyStroker(116, false, false, false, false),"[pf5]"); mappedKeys.put(new KeyStroker(117, false, false, false, false),"[pf6]"); mappedKeys.put(new KeyStroker(118, false, false, false, false),"[pf7]"); mappedKeys.put(new KeyStroker(119, false, false, false, false),"[pf8]"); mappedKeys.put(new KeyStroker(120, false, false, false, false),"[pf9]"); mappedKeys.put(new KeyStroker(121, false, false, false, false),"[pf10]"); mappedKeys.put(new KeyStroker(122, false, false, false, false),"[pf11]"); mappedKeys.put(new KeyStroker(123, false, false, false, false),"[pf12]"); mappedKeys.put(new KeyStroker(112, true, false, false, false),"[pf13]"); mappedKeys.put(new KeyStroker(113, true, false, false, false),"[pf14]"); mappedKeys.put(new KeyStroker(114, true, false, false, false),"[pf15]"); mappedKeys.put(new KeyStroker(115, true, false, false, false),"[pf16]"); mappedKeys.put(new KeyStroker(116, true, false, false, false),"[pf17]"); mappedKeys.put(new KeyStroker(117, true, false, false, false),"[pf18]"); mappedKeys.put(new KeyStroker(118, true, false, false, false),"[pf19]"); mappedKeys.put(new KeyStroker(119, true, false, false, false),"[pf20]"); mappedKeys.put(new KeyStroker(120, true, false, false, false),"[pf21]"); mappedKeys.put(new KeyStroker(121, true, false, false, false),"[pf22]"); mappedKeys.put(new KeyStroker(122, true, false, false, false),"[pf23]"); mappedKeys.put(new KeyStroker(123, true, false, false, false),"[pf24]"); mappedKeys.put(new KeyStroker(112, false, false, true, false),"[help]"); mappedKeys.put(new KeyStroker(72, false, false, true, false),"[hostprint]"); mappedKeys.put(new KeyStroker(67, false, false, true, false),"[copy]"); mappedKeys.put(new KeyStroker(86, false, false, true, false),"[paste]"); mappedKeys.put(new KeyStroker(39, true, false, false, false),"[markright]"); mappedKeys.put(new KeyStroker(37, true, false, false, false),"[markleft]"); mappedKeys.put(new KeyStroker(38, true, false, false, false),"[markup]"); mappedKeys.put(new KeyStroker(40, true, false, false, false),"[markdown]"); mappedKeys.put(new KeyStroker(155, true, false, false, false),"[dupfield]"); mappedKeys.put(new KeyStroker(17, true, true, false, false),"[newline]"); mappedKeys.put(new KeyStroker(34, false, false, true, false),"[jumpnext]"); mappedKeys.put(new KeyStroker(33, false, false, true, false),"[jumpprev]"); saveKeyMap(); } else { setKeyMap(keys); } }
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/afff7d5ba1bc03e5e4709099fbacc81757f734a1/KeyMapper.java/buggy/tn5250j/src/org/tn5250j/keyboard/KeyMapper.java
public static void init() {// if (mappedKeys != null)// return;//// init("keymap");//// }//// public static void init(String map) { if (mappedKeys != null) return;// keyMapName = map; mappedKeys = new HashMap(60); workStroke = new KeyStroker(0, false, false, false,false);// Properties keys = new Properties(); Properties keys = ConfigureFactory.getInstance().getProperties( GlobalConfigure.KEYMAP); if (!loadKeyStrokes(keys)) { // keycode shift control alternate // Key <-> Keycode , isShiftDown , isControlDown , isAlternateDown // my personal preference mappedKeys.put(new KeyStroker(10, false, false, false, false),"[fldext]"); mappedKeys.put(new KeyStroker(17, false, true, false, false),"[enter]");// mappedKeys.put(new KeyStroker(10, false, false, false),"[enter]");// mappedKeys.put(new KeyStroker(10, true, false, false),"[fldext]"); mappedKeys.put(new KeyStroker(8, false, false, false, false),"[backspace]"); mappedKeys.put(new KeyStroker(9, false, false, false, false),"[tab]"); mappedKeys.put(new KeyStroker(9, true, false, false, false),"[backtab]"); mappedKeys.put(new KeyStroker(127, false, false, false, false),"[delete]"); mappedKeys.put(new KeyStroker(155, false, false, false, false),"[insert]"); mappedKeys.put(new KeyStroker(19, false, false, false, false),"[clear]"); mappedKeys.put(new KeyStroker(27, false, false, false, false),"[reset]"); mappedKeys.put(new KeyStroker(27, true, false, false, false),"[sysreq]"); mappedKeys.put(new KeyStroker(35, false, false, false, false),"[eof]"); mappedKeys.put(new KeyStroker(36, false, false, false, false),"[home]"); mappedKeys.put(new KeyStroker(39, false, false, false, false),"[right]"); mappedKeys.put(new KeyStroker(39, false, false, true, false),"[nextword]"); mappedKeys.put(new KeyStroker(37, false, false, false, false),"[left]"); mappedKeys.put(new KeyStroker(37, false, false, true, false),"[prevword]"); mappedKeys.put(new KeyStroker(38, false, false, false, false),"[up]"); mappedKeys.put(new KeyStroker(40, false, false, false, false),"[down]"); mappedKeys.put(new KeyStroker(34, false, false, false, false),"[pgdown]"); mappedKeys.put(new KeyStroker(33, false, false, false, false),"[pgup]"); mappedKeys.put(new KeyStroker(96, false, false, false, false),"[keypad0]"); mappedKeys.put(new KeyStroker(97, false, false, false, false),"[keypad1]"); mappedKeys.put(new KeyStroker(98, false, false, false, false),"[keypad2]"); mappedKeys.put(new KeyStroker(99, false, false, false, false),"[keypad3]"); mappedKeys.put(new KeyStroker(100, false, false, false, false),"[keypad4]"); mappedKeys.put(new KeyStroker(101, false, false, false, false),"[keypad5]"); mappedKeys.put(new KeyStroker(102, false, false, false, false),"[keypad6]"); mappedKeys.put(new KeyStroker(103, false, false, false, false),"[keypad7]"); mappedKeys.put(new KeyStroker(104, false, false, false, false),"[keypad8]"); mappedKeys.put(new KeyStroker(105, false, false, false, false),"[keypad9]"); mappedKeys.put(new KeyStroker(109, false, false, false, false),"[field-]"); mappedKeys.put(new KeyStroker(107, false, false, false, false),"[field+]"); mappedKeys.put(new KeyStroker(112, false, false, false, false),"[pf1]"); mappedKeys.put(new KeyStroker(113, false, false, false, false),"[pf2]"); mappedKeys.put(new KeyStroker(114, false, false, false, false),"[pf3]"); mappedKeys.put(new KeyStroker(115, false, false, false, false),"[pf4]"); mappedKeys.put(new KeyStroker(116, false, false, false, false),"[pf5]"); mappedKeys.put(new KeyStroker(117, false, false, false, false),"[pf6]"); mappedKeys.put(new KeyStroker(118, false, false, false, false),"[pf7]"); mappedKeys.put(new KeyStroker(119, false, false, false, false),"[pf8]"); mappedKeys.put(new KeyStroker(120, false, false, false, false),"[pf9]"); mappedKeys.put(new KeyStroker(121, false, false, false, false),"[pf10]"); mappedKeys.put(new KeyStroker(122, false, false, false, false),"[pf11]"); mappedKeys.put(new KeyStroker(123, false, false, false, false),"[pf12]"); mappedKeys.put(new KeyStroker(112, true, false, false, false),"[pf13]"); mappedKeys.put(new KeyStroker(113, true, false, false, false),"[pf14]"); mappedKeys.put(new KeyStroker(114, true, false, false, false),"[pf15]"); mappedKeys.put(new KeyStroker(115, true, false, false, false),"[pf16]"); mappedKeys.put(new KeyStroker(116, true, false, false, false),"[pf17]"); mappedKeys.put(new KeyStroker(117, true, false, false, false),"[pf18]"); mappedKeys.put(new KeyStroker(118, true, false, false, false),"[pf19]"); mappedKeys.put(new KeyStroker(119, true, false, false, false),"[pf20]"); mappedKeys.put(new KeyStroker(120, true, false, false, false),"[pf21]"); mappedKeys.put(new KeyStroker(121, true, false, false, false),"[pf22]"); mappedKeys.put(new KeyStroker(122, true, false, false, false),"[pf23]"); mappedKeys.put(new KeyStroker(123, true, false, false, false),"[pf24]"); mappedKeys.put(new KeyStroker(112, false, false, true, false),"[help]"); mappedKeys.put(new KeyStroker(72, false, false, true, false),"[hostprint]"); mappedKeys.put(new KeyStroker(67, false, false, true, false),"[copy]"); mappedKeys.put(new KeyStroker(86, false, false, true, false),"[paste]"); mappedKeys.put(new KeyStroker(39, true, false, false, false),"[markright]"); mappedKeys.put(new KeyStroker(37, true, false, false, false),"[markleft]"); mappedKeys.put(new KeyStroker(38, true, false, false, false),"[markup]"); mappedKeys.put(new KeyStroker(40, true, false, false, false),"[markdown]"); mappedKeys.put(new KeyStroker(155, true, false, false, false),"[dupfield]"); mappedKeys.put(new KeyStroker(17, true, true, false, false),"[newline]"); mappedKeys.put(new KeyStroker(34, false, false, true, false),"[jumpnext]"); mappedKeys.put(new KeyStroker(33, false, false, true, false),"[jumpprev]"); saveKeyMap(); } else { setKeyMap(keys); } }
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/afff7d5ba1bc03e5e4709099fbacc81757f734a1/KeyMapper.java/buggy/tn5250j/src/org/tn5250j/keyboard/KeyMapper.java
workStroke = new KeyStroker(0, false, false, false,false);
workStroke = newKeyStroker(0, false, false, false,false,KeyStroker.KEY_LOCATION_STANDARD);
public static void init() {// if (mappedKeys != null)// return;//// init("keymap");//// }//// public static void init(String map) { if (mappedKeys != null) return;// keyMapName = map; mappedKeys = new HashMap(60); workStroke = new KeyStroker(0, false, false, false,false);// Properties keys = new Properties(); Properties keys = ConfigureFactory.getInstance().getProperties( GlobalConfigure.KEYMAP); if (!loadKeyStrokes(keys)) { // keycode shift control alternate // Key <-> Keycode , isShiftDown , isControlDown , isAlternateDown // my personal preference mappedKeys.put(new KeyStroker(10, false, false, false, false),"[fldext]"); mappedKeys.put(new KeyStroker(17, false, true, false, false),"[enter]");// mappedKeys.put(new KeyStroker(10, false, false, false),"[enter]");// mappedKeys.put(new KeyStroker(10, true, false, false),"[fldext]"); mappedKeys.put(new KeyStroker(8, false, false, false, false),"[backspace]"); mappedKeys.put(new KeyStroker(9, false, false, false, false),"[tab]"); mappedKeys.put(new KeyStroker(9, true, false, false, false),"[backtab]"); mappedKeys.put(new KeyStroker(127, false, false, false, false),"[delete]"); mappedKeys.put(new KeyStroker(155, false, false, false, false),"[insert]"); mappedKeys.put(new KeyStroker(19, false, false, false, false),"[clear]"); mappedKeys.put(new KeyStroker(27, false, false, false, false),"[reset]"); mappedKeys.put(new KeyStroker(27, true, false, false, false),"[sysreq]"); mappedKeys.put(new KeyStroker(35, false, false, false, false),"[eof]"); mappedKeys.put(new KeyStroker(36, false, false, false, false),"[home]"); mappedKeys.put(new KeyStroker(39, false, false, false, false),"[right]"); mappedKeys.put(new KeyStroker(39, false, false, true, false),"[nextword]"); mappedKeys.put(new KeyStroker(37, false, false, false, false),"[left]"); mappedKeys.put(new KeyStroker(37, false, false, true, false),"[prevword]"); mappedKeys.put(new KeyStroker(38, false, false, false, false),"[up]"); mappedKeys.put(new KeyStroker(40, false, false, false, false),"[down]"); mappedKeys.put(new KeyStroker(34, false, false, false, false),"[pgdown]"); mappedKeys.put(new KeyStroker(33, false, false, false, false),"[pgup]"); mappedKeys.put(new KeyStroker(96, false, false, false, false),"[keypad0]"); mappedKeys.put(new KeyStroker(97, false, false, false, false),"[keypad1]"); mappedKeys.put(new KeyStroker(98, false, false, false, false),"[keypad2]"); mappedKeys.put(new KeyStroker(99, false, false, false, false),"[keypad3]"); mappedKeys.put(new KeyStroker(100, false, false, false, false),"[keypad4]"); mappedKeys.put(new KeyStroker(101, false, false, false, false),"[keypad5]"); mappedKeys.put(new KeyStroker(102, false, false, false, false),"[keypad6]"); mappedKeys.put(new KeyStroker(103, false, false, false, false),"[keypad7]"); mappedKeys.put(new KeyStroker(104, false, false, false, false),"[keypad8]"); mappedKeys.put(new KeyStroker(105, false, false, false, false),"[keypad9]"); mappedKeys.put(new KeyStroker(109, false, false, false, false),"[field-]"); mappedKeys.put(new KeyStroker(107, false, false, false, false),"[field+]"); mappedKeys.put(new KeyStroker(112, false, false, false, false),"[pf1]"); mappedKeys.put(new KeyStroker(113, false, false, false, false),"[pf2]"); mappedKeys.put(new KeyStroker(114, false, false, false, false),"[pf3]"); mappedKeys.put(new KeyStroker(115, false, false, false, false),"[pf4]"); mappedKeys.put(new KeyStroker(116, false, false, false, false),"[pf5]"); mappedKeys.put(new KeyStroker(117, false, false, false, false),"[pf6]"); mappedKeys.put(new KeyStroker(118, false, false, false, false),"[pf7]"); mappedKeys.put(new KeyStroker(119, false, false, false, false),"[pf8]"); mappedKeys.put(new KeyStroker(120, false, false, false, false),"[pf9]"); mappedKeys.put(new KeyStroker(121, false, false, false, false),"[pf10]"); mappedKeys.put(new KeyStroker(122, false, false, false, false),"[pf11]"); mappedKeys.put(new KeyStroker(123, false, false, false, false),"[pf12]"); mappedKeys.put(new KeyStroker(112, true, false, false, false),"[pf13]"); mappedKeys.put(new KeyStroker(113, true, false, false, false),"[pf14]"); mappedKeys.put(new KeyStroker(114, true, false, false, false),"[pf15]"); mappedKeys.put(new KeyStroker(115, true, false, false, false),"[pf16]"); mappedKeys.put(new KeyStroker(116, true, false, false, false),"[pf17]"); mappedKeys.put(new KeyStroker(117, true, false, false, false),"[pf18]"); mappedKeys.put(new KeyStroker(118, true, false, false, false),"[pf19]"); mappedKeys.put(new KeyStroker(119, true, false, false, false),"[pf20]"); mappedKeys.put(new KeyStroker(120, true, false, false, false),"[pf21]"); mappedKeys.put(new KeyStroker(121, true, false, false, false),"[pf22]"); mappedKeys.put(new KeyStroker(122, true, false, false, false),"[pf23]"); mappedKeys.put(new KeyStroker(123, true, false, false, false),"[pf24]"); mappedKeys.put(new KeyStroker(112, false, false, true, false),"[help]"); mappedKeys.put(new KeyStroker(72, false, false, true, false),"[hostprint]"); mappedKeys.put(new KeyStroker(67, false, false, true, false),"[copy]"); mappedKeys.put(new KeyStroker(86, false, false, true, false),"[paste]"); mappedKeys.put(new KeyStroker(39, true, false, false, false),"[markright]"); mappedKeys.put(new KeyStroker(37, true, false, false, false),"[markleft]"); mappedKeys.put(new KeyStroker(38, true, false, false, false),"[markup]"); mappedKeys.put(new KeyStroker(40, true, false, false, false),"[markdown]"); mappedKeys.put(new KeyStroker(155, true, false, false, false),"[dupfield]"); mappedKeys.put(new KeyStroker(17, true, true, false, false),"[newline]"); mappedKeys.put(new KeyStroker(34, false, false, true, false),"[jumpnext]"); mappedKeys.put(new KeyStroker(33, false, false, true, false),"[jumpprev]"); saveKeyMap(); } else { setKeyMap(keys); } }
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/afff7d5ba1bc03e5e4709099fbacc81757f734a1/KeyMapper.java/buggy/tn5250j/src/org/tn5250j/keyboard/KeyMapper.java
public static void init() {// if (mappedKeys != null)// return;//// init("keymap");//// }//// public static void init(String map) { if (mappedKeys != null) return;// keyMapName = map; mappedKeys = new HashMap(60); workStroke = new KeyStroker(0, false, false, false,false);// Properties keys = new Properties(); Properties keys = ConfigureFactory.getInstance().getProperties( GlobalConfigure.KEYMAP); if (!loadKeyStrokes(keys)) { // keycode shift control alternate // Key <-> Keycode , isShiftDown , isControlDown , isAlternateDown // my personal preference mappedKeys.put(new KeyStroker(10, false, false, false, false),"[fldext]"); mappedKeys.put(new KeyStroker(17, false, true, false, false),"[enter]");// mappedKeys.put(new KeyStroker(10, false, false, false),"[enter]");// mappedKeys.put(new KeyStroker(10, true, false, false),"[fldext]"); mappedKeys.put(new KeyStroker(8, false, false, false, false),"[backspace]"); mappedKeys.put(new KeyStroker(9, false, false, false, false),"[tab]"); mappedKeys.put(new KeyStroker(9, true, false, false, false),"[backtab]"); mappedKeys.put(new KeyStroker(127, false, false, false, false),"[delete]"); mappedKeys.put(new KeyStroker(155, false, false, false, false),"[insert]"); mappedKeys.put(new KeyStroker(19, false, false, false, false),"[clear]"); mappedKeys.put(new KeyStroker(27, false, false, false, false),"[reset]"); mappedKeys.put(new KeyStroker(27, true, false, false, false),"[sysreq]"); mappedKeys.put(new KeyStroker(35, false, false, false, false),"[eof]"); mappedKeys.put(new KeyStroker(36, false, false, false, false),"[home]"); mappedKeys.put(new KeyStroker(39, false, false, false, false),"[right]"); mappedKeys.put(new KeyStroker(39, false, false, true, false),"[nextword]"); mappedKeys.put(new KeyStroker(37, false, false, false, false),"[left]"); mappedKeys.put(new KeyStroker(37, false, false, true, false),"[prevword]"); mappedKeys.put(new KeyStroker(38, false, false, false, false),"[up]"); mappedKeys.put(new KeyStroker(40, false, false, false, false),"[down]"); mappedKeys.put(new KeyStroker(34, false, false, false, false),"[pgdown]"); mappedKeys.put(new KeyStroker(33, false, false, false, false),"[pgup]"); mappedKeys.put(new KeyStroker(96, false, false, false, false),"[keypad0]"); mappedKeys.put(new KeyStroker(97, false, false, false, false),"[keypad1]"); mappedKeys.put(new KeyStroker(98, false, false, false, false),"[keypad2]"); mappedKeys.put(new KeyStroker(99, false, false, false, false),"[keypad3]"); mappedKeys.put(new KeyStroker(100, false, false, false, false),"[keypad4]"); mappedKeys.put(new KeyStroker(101, false, false, false, false),"[keypad5]"); mappedKeys.put(new KeyStroker(102, false, false, false, false),"[keypad6]"); mappedKeys.put(new KeyStroker(103, false, false, false, false),"[keypad7]"); mappedKeys.put(new KeyStroker(104, false, false, false, false),"[keypad8]"); mappedKeys.put(new KeyStroker(105, false, false, false, false),"[keypad9]"); mappedKeys.put(new KeyStroker(109, false, false, false, false),"[field-]"); mappedKeys.put(new KeyStroker(107, false, false, false, false),"[field+]"); mappedKeys.put(new KeyStroker(112, false, false, false, false),"[pf1]"); mappedKeys.put(new KeyStroker(113, false, false, false, false),"[pf2]"); mappedKeys.put(new KeyStroker(114, false, false, false, false),"[pf3]"); mappedKeys.put(new KeyStroker(115, false, false, false, false),"[pf4]"); mappedKeys.put(new KeyStroker(116, false, false, false, false),"[pf5]"); mappedKeys.put(new KeyStroker(117, false, false, false, false),"[pf6]"); mappedKeys.put(new KeyStroker(118, false, false, false, false),"[pf7]"); mappedKeys.put(new KeyStroker(119, false, false, false, false),"[pf8]"); mappedKeys.put(new KeyStroker(120, false, false, false, false),"[pf9]"); mappedKeys.put(new KeyStroker(121, false, false, false, false),"[pf10]"); mappedKeys.put(new KeyStroker(122, false, false, false, false),"[pf11]"); mappedKeys.put(new KeyStroker(123, false, false, false, false),"[pf12]"); mappedKeys.put(new KeyStroker(112, true, false, false, false),"[pf13]"); mappedKeys.put(new KeyStroker(113, true, false, false, false),"[pf14]"); mappedKeys.put(new KeyStroker(114, true, false, false, false),"[pf15]"); mappedKeys.put(new KeyStroker(115, true, false, false, false),"[pf16]"); mappedKeys.put(new KeyStroker(116, true, false, false, false),"[pf17]"); mappedKeys.put(new KeyStroker(117, true, false, false, false),"[pf18]"); mappedKeys.put(new KeyStroker(118, true, false, false, false),"[pf19]"); mappedKeys.put(new KeyStroker(119, true, false, false, false),"[pf20]"); mappedKeys.put(new KeyStroker(120, true, false, false, false),"[pf21]"); mappedKeys.put(new KeyStroker(121, true, false, false, false),"[pf22]"); mappedKeys.put(new KeyStroker(122, true, false, false, false),"[pf23]"); mappedKeys.put(new KeyStroker(123, true, false, false, false),"[pf24]"); mappedKeys.put(new KeyStroker(112, false, false, true, false),"[help]"); mappedKeys.put(new KeyStroker(72, false, false, true, false),"[hostprint]"); mappedKeys.put(new KeyStroker(67, false, false, true, false),"[copy]"); mappedKeys.put(new KeyStroker(86, false, false, true, false),"[paste]"); mappedKeys.put(new KeyStroker(39, true, false, false, false),"[markright]"); mappedKeys.put(new KeyStroker(37, true, false, false, false),"[markleft]"); mappedKeys.put(new KeyStroker(38, true, false, false, false),"[markup]"); mappedKeys.put(new KeyStroker(40, true, false, false, false),"[markdown]"); mappedKeys.put(new KeyStroker(155, true, false, false, false),"[dupfield]"); mappedKeys.put(new KeyStroker(17, true, true, false, false),"[newline]"); mappedKeys.put(new KeyStroker(34, false, false, true, false),"[jumpnext]"); mappedKeys.put(new KeyStroker(33, false, false, true, false),"[jumpprev]"); saveKeyMap(); } else { setKeyMap(keys); } }
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/afff7d5ba1bc03e5e4709099fbacc81757f734a1/KeyMapper.java/buggy/tn5250j/src/org/tn5250j/keyboard/KeyMapper.java
mappedKeys.put(new KeyStroker(10, false, false, false, false),"[fldext]"); mappedKeys.put(new KeyStroker(17, false, true, false, false),"[enter]");
mappedKeys.put(newKeyStroker(10, false, false, false, false,KeyStroker.KEY_LOCATION_STANDARD),"[fldext]"); mappedKeys.put(newKeyStroker(17, false, true, false, false,KeyStroker.KEY_LOCATION_STANDARD),"[enter]");
public static void init() {// if (mappedKeys != null)// return;//// init("keymap");//// }//// public static void init(String map) { if (mappedKeys != null) return;// keyMapName = map; mappedKeys = new HashMap(60); workStroke = new KeyStroker(0, false, false, false,false);// Properties keys = new Properties(); Properties keys = ConfigureFactory.getInstance().getProperties( GlobalConfigure.KEYMAP); if (!loadKeyStrokes(keys)) { // keycode shift control alternate // Key <-> Keycode , isShiftDown , isControlDown , isAlternateDown // my personal preference mappedKeys.put(new KeyStroker(10, false, false, false, false),"[fldext]"); mappedKeys.put(new KeyStroker(17, false, true, false, false),"[enter]");// mappedKeys.put(new KeyStroker(10, false, false, false),"[enter]");// mappedKeys.put(new KeyStroker(10, true, false, false),"[fldext]"); mappedKeys.put(new KeyStroker(8, false, false, false, false),"[backspace]"); mappedKeys.put(new KeyStroker(9, false, false, false, false),"[tab]"); mappedKeys.put(new KeyStroker(9, true, false, false, false),"[backtab]"); mappedKeys.put(new KeyStroker(127, false, false, false, false),"[delete]"); mappedKeys.put(new KeyStroker(155, false, false, false, false),"[insert]"); mappedKeys.put(new KeyStroker(19, false, false, false, false),"[clear]"); mappedKeys.put(new KeyStroker(27, false, false, false, false),"[reset]"); mappedKeys.put(new KeyStroker(27, true, false, false, false),"[sysreq]"); mappedKeys.put(new KeyStroker(35, false, false, false, false),"[eof]"); mappedKeys.put(new KeyStroker(36, false, false, false, false),"[home]"); mappedKeys.put(new KeyStroker(39, false, false, false, false),"[right]"); mappedKeys.put(new KeyStroker(39, false, false, true, false),"[nextword]"); mappedKeys.put(new KeyStroker(37, false, false, false, false),"[left]"); mappedKeys.put(new KeyStroker(37, false, false, true, false),"[prevword]"); mappedKeys.put(new KeyStroker(38, false, false, false, false),"[up]"); mappedKeys.put(new KeyStroker(40, false, false, false, false),"[down]"); mappedKeys.put(new KeyStroker(34, false, false, false, false),"[pgdown]"); mappedKeys.put(new KeyStroker(33, false, false, false, false),"[pgup]"); mappedKeys.put(new KeyStroker(96, false, false, false, false),"[keypad0]"); mappedKeys.put(new KeyStroker(97, false, false, false, false),"[keypad1]"); mappedKeys.put(new KeyStroker(98, false, false, false, false),"[keypad2]"); mappedKeys.put(new KeyStroker(99, false, false, false, false),"[keypad3]"); mappedKeys.put(new KeyStroker(100, false, false, false, false),"[keypad4]"); mappedKeys.put(new KeyStroker(101, false, false, false, false),"[keypad5]"); mappedKeys.put(new KeyStroker(102, false, false, false, false),"[keypad6]"); mappedKeys.put(new KeyStroker(103, false, false, false, false),"[keypad7]"); mappedKeys.put(new KeyStroker(104, false, false, false, false),"[keypad8]"); mappedKeys.put(new KeyStroker(105, false, false, false, false),"[keypad9]"); mappedKeys.put(new KeyStroker(109, false, false, false, false),"[field-]"); mappedKeys.put(new KeyStroker(107, false, false, false, false),"[field+]"); mappedKeys.put(new KeyStroker(112, false, false, false, false),"[pf1]"); mappedKeys.put(new KeyStroker(113, false, false, false, false),"[pf2]"); mappedKeys.put(new KeyStroker(114, false, false, false, false),"[pf3]"); mappedKeys.put(new KeyStroker(115, false, false, false, false),"[pf4]"); mappedKeys.put(new KeyStroker(116, false, false, false, false),"[pf5]"); mappedKeys.put(new KeyStroker(117, false, false, false, false),"[pf6]"); mappedKeys.put(new KeyStroker(118, false, false, false, false),"[pf7]"); mappedKeys.put(new KeyStroker(119, false, false, false, false),"[pf8]"); mappedKeys.put(new KeyStroker(120, false, false, false, false),"[pf9]"); mappedKeys.put(new KeyStroker(121, false, false, false, false),"[pf10]"); mappedKeys.put(new KeyStroker(122, false, false, false, false),"[pf11]"); mappedKeys.put(new KeyStroker(123, false, false, false, false),"[pf12]"); mappedKeys.put(new KeyStroker(112, true, false, false, false),"[pf13]"); mappedKeys.put(new KeyStroker(113, true, false, false, false),"[pf14]"); mappedKeys.put(new KeyStroker(114, true, false, false, false),"[pf15]"); mappedKeys.put(new KeyStroker(115, true, false, false, false),"[pf16]"); mappedKeys.put(new KeyStroker(116, true, false, false, false),"[pf17]"); mappedKeys.put(new KeyStroker(117, true, false, false, false),"[pf18]"); mappedKeys.put(new KeyStroker(118, true, false, false, false),"[pf19]"); mappedKeys.put(new KeyStroker(119, true, false, false, false),"[pf20]"); mappedKeys.put(new KeyStroker(120, true, false, false, false),"[pf21]"); mappedKeys.put(new KeyStroker(121, true, false, false, false),"[pf22]"); mappedKeys.put(new KeyStroker(122, true, false, false, false),"[pf23]"); mappedKeys.put(new KeyStroker(123, true, false, false, false),"[pf24]"); mappedKeys.put(new KeyStroker(112, false, false, true, false),"[help]"); mappedKeys.put(new KeyStroker(72, false, false, true, false),"[hostprint]"); mappedKeys.put(new KeyStroker(67, false, false, true, false),"[copy]"); mappedKeys.put(new KeyStroker(86, false, false, true, false),"[paste]"); mappedKeys.put(new KeyStroker(39, true, false, false, false),"[markright]"); mappedKeys.put(new KeyStroker(37, true, false, false, false),"[markleft]"); mappedKeys.put(new KeyStroker(38, true, false, false, false),"[markup]"); mappedKeys.put(new KeyStroker(40, true, false, false, false),"[markdown]"); mappedKeys.put(new KeyStroker(155, true, false, false, false),"[dupfield]"); mappedKeys.put(new KeyStroker(17, true, true, false, false),"[newline]"); mappedKeys.put(new KeyStroker(34, false, false, true, false),"[jumpnext]"); mappedKeys.put(new KeyStroker(33, false, false, true, false),"[jumpprev]"); saveKeyMap(); } else { setKeyMap(keys); } }
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/afff7d5ba1bc03e5e4709099fbacc81757f734a1/KeyMapper.java/buggy/tn5250j/src/org/tn5250j/keyboard/KeyMapper.java
public static void init() {// if (mappedKeys != null)// return;//// init("keymap");//// }//// public static void init(String map) { if (mappedKeys != null) return;// keyMapName = map; mappedKeys = new HashMap(60); workStroke = new KeyStroker(0, false, false, false,false);// Properties keys = new Properties(); Properties keys = ConfigureFactory.getInstance().getProperties( GlobalConfigure.KEYMAP); if (!loadKeyStrokes(keys)) { // keycode shift control alternate // Key <-> Keycode , isShiftDown , isControlDown , isAlternateDown // my personal preference mappedKeys.put(new KeyStroker(10, false, false, false, false),"[fldext]"); mappedKeys.put(new KeyStroker(17, false, true, false, false),"[enter]");// mappedKeys.put(new KeyStroker(10, false, false, false),"[enter]");// mappedKeys.put(new KeyStroker(10, true, false, false),"[fldext]"); mappedKeys.put(new KeyStroker(8, false, false, false, false),"[backspace]"); mappedKeys.put(new KeyStroker(9, false, false, false, false),"[tab]"); mappedKeys.put(new KeyStroker(9, true, false, false, false),"[backtab]"); mappedKeys.put(new KeyStroker(127, false, false, false, false),"[delete]"); mappedKeys.put(new KeyStroker(155, false, false, false, false),"[insert]"); mappedKeys.put(new KeyStroker(19, false, false, false, false),"[clear]"); mappedKeys.put(new KeyStroker(27, false, false, false, false),"[reset]"); mappedKeys.put(new KeyStroker(27, true, false, false, false),"[sysreq]"); mappedKeys.put(new KeyStroker(35, false, false, false, false),"[eof]"); mappedKeys.put(new KeyStroker(36, false, false, false, false),"[home]"); mappedKeys.put(new KeyStroker(39, false, false, false, false),"[right]"); mappedKeys.put(new KeyStroker(39, false, false, true, false),"[nextword]"); mappedKeys.put(new KeyStroker(37, false, false, false, false),"[left]"); mappedKeys.put(new KeyStroker(37, false, false, true, false),"[prevword]"); mappedKeys.put(new KeyStroker(38, false, false, false, false),"[up]"); mappedKeys.put(new KeyStroker(40, false, false, false, false),"[down]"); mappedKeys.put(new KeyStroker(34, false, false, false, false),"[pgdown]"); mappedKeys.put(new KeyStroker(33, false, false, false, false),"[pgup]"); mappedKeys.put(new KeyStroker(96, false, false, false, false),"[keypad0]"); mappedKeys.put(new KeyStroker(97, false, false, false, false),"[keypad1]"); mappedKeys.put(new KeyStroker(98, false, false, false, false),"[keypad2]"); mappedKeys.put(new KeyStroker(99, false, false, false, false),"[keypad3]"); mappedKeys.put(new KeyStroker(100, false, false, false, false),"[keypad4]"); mappedKeys.put(new KeyStroker(101, false, false, false, false),"[keypad5]"); mappedKeys.put(new KeyStroker(102, false, false, false, false),"[keypad6]"); mappedKeys.put(new KeyStroker(103, false, false, false, false),"[keypad7]"); mappedKeys.put(new KeyStroker(104, false, false, false, false),"[keypad8]"); mappedKeys.put(new KeyStroker(105, false, false, false, false),"[keypad9]"); mappedKeys.put(new KeyStroker(109, false, false, false, false),"[field-]"); mappedKeys.put(new KeyStroker(107, false, false, false, false),"[field+]"); mappedKeys.put(new KeyStroker(112, false, false, false, false),"[pf1]"); mappedKeys.put(new KeyStroker(113, false, false, false, false),"[pf2]"); mappedKeys.put(new KeyStroker(114, false, false, false, false),"[pf3]"); mappedKeys.put(new KeyStroker(115, false, false, false, false),"[pf4]"); mappedKeys.put(new KeyStroker(116, false, false, false, false),"[pf5]"); mappedKeys.put(new KeyStroker(117, false, false, false, false),"[pf6]"); mappedKeys.put(new KeyStroker(118, false, false, false, false),"[pf7]"); mappedKeys.put(new KeyStroker(119, false, false, false, false),"[pf8]"); mappedKeys.put(new KeyStroker(120, false, false, false, false),"[pf9]"); mappedKeys.put(new KeyStroker(121, false, false, false, false),"[pf10]"); mappedKeys.put(new KeyStroker(122, false, false, false, false),"[pf11]"); mappedKeys.put(new KeyStroker(123, false, false, false, false),"[pf12]"); mappedKeys.put(new KeyStroker(112, true, false, false, false),"[pf13]"); mappedKeys.put(new KeyStroker(113, true, false, false, false),"[pf14]"); mappedKeys.put(new KeyStroker(114, true, false, false, false),"[pf15]"); mappedKeys.put(new KeyStroker(115, true, false, false, false),"[pf16]"); mappedKeys.put(new KeyStroker(116, true, false, false, false),"[pf17]"); mappedKeys.put(new KeyStroker(117, true, false, false, false),"[pf18]"); mappedKeys.put(new KeyStroker(118, true, false, false, false),"[pf19]"); mappedKeys.put(new KeyStroker(119, true, false, false, false),"[pf20]"); mappedKeys.put(new KeyStroker(120, true, false, false, false),"[pf21]"); mappedKeys.put(new KeyStroker(121, true, false, false, false),"[pf22]"); mappedKeys.put(new KeyStroker(122, true, false, false, false),"[pf23]"); mappedKeys.put(new KeyStroker(123, true, false, false, false),"[pf24]"); mappedKeys.put(new KeyStroker(112, false, false, true, false),"[help]"); mappedKeys.put(new KeyStroker(72, false, false, true, false),"[hostprint]"); mappedKeys.put(new KeyStroker(67, false, false, true, false),"[copy]"); mappedKeys.put(new KeyStroker(86, false, false, true, false),"[paste]"); mappedKeys.put(new KeyStroker(39, true, false, false, false),"[markright]"); mappedKeys.put(new KeyStroker(37, true, false, false, false),"[markleft]"); mappedKeys.put(new KeyStroker(38, true, false, false, false),"[markup]"); mappedKeys.put(new KeyStroker(40, true, false, false, false),"[markdown]"); mappedKeys.put(new KeyStroker(155, true, false, false, false),"[dupfield]"); mappedKeys.put(new KeyStroker(17, true, true, false, false),"[newline]"); mappedKeys.put(new KeyStroker(34, false, false, true, false),"[jumpnext]"); mappedKeys.put(new KeyStroker(33, false, false, true, false),"[jumpprev]"); saveKeyMap(); } else { setKeyMap(keys); } }
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/afff7d5ba1bc03e5e4709099fbacc81757f734a1/KeyMapper.java/buggy/tn5250j/src/org/tn5250j/keyboard/KeyMapper.java
mappedKeys.put(new KeyStroker(8, false, false, false, false),"[backspace]"); mappedKeys.put(new KeyStroker(9, false, false, false, false),"[tab]"); mappedKeys.put(new KeyStroker(9, true, false, false, false),"[backtab]"); mappedKeys.put(new KeyStroker(127, false, false, false, false),"[delete]"); mappedKeys.put(new KeyStroker(155, false, false, false, false),"[insert]"); mappedKeys.put(new KeyStroker(19, false, false, false, false),"[clear]"); mappedKeys.put(new KeyStroker(27, false, false, false, false),"[reset]"); mappedKeys.put(new KeyStroker(27, true, false, false, false),"[sysreq]");
mappedKeys.put(newKeyStroker(8, false, false, false, false,KeyStroker.KEY_LOCATION_STANDARD),"[backspace]"); mappedKeys.put(newKeyStroker(9, false, false, false, false,KeyStroker.KEY_LOCATION_STANDARD),"[tab]"); mappedKeys.put(newKeyStroker(9, true, false, false, false,KeyStroker.KEY_LOCATION_STANDARD),"[backtab]"); mappedKeys.put(newKeyStroker(127, false, false, false, false,KeyStroker.KEY_LOCATION_STANDARD),"[delete]"); mappedKeys.put(newKeyStroker(155, false, false, false, false,KeyStroker.KEY_LOCATION_STANDARD),"[insert]"); mappedKeys.put(newKeyStroker(19, false, false, false, false,KeyStroker.KEY_LOCATION_STANDARD),"[clear]"); mappedKeys.put(newKeyStroker(27, false, false, false, false,KeyStroker.KEY_LOCATION_STANDARD),"[reset]"); mappedKeys.put(newKeyStroker(27, true, false, false, false,KeyStroker.KEY_LOCATION_STANDARD),"[sysreq]");
public static void init() {// if (mappedKeys != null)// return;//// init("keymap");//// }//// public static void init(String map) { if (mappedKeys != null) return;// keyMapName = map; mappedKeys = new HashMap(60); workStroke = new KeyStroker(0, false, false, false,false);// Properties keys = new Properties(); Properties keys = ConfigureFactory.getInstance().getProperties( GlobalConfigure.KEYMAP); if (!loadKeyStrokes(keys)) { // keycode shift control alternate // Key <-> Keycode , isShiftDown , isControlDown , isAlternateDown // my personal preference mappedKeys.put(new KeyStroker(10, false, false, false, false),"[fldext]"); mappedKeys.put(new KeyStroker(17, false, true, false, false),"[enter]");// mappedKeys.put(new KeyStroker(10, false, false, false),"[enter]");// mappedKeys.put(new KeyStroker(10, true, false, false),"[fldext]"); mappedKeys.put(new KeyStroker(8, false, false, false, false),"[backspace]"); mappedKeys.put(new KeyStroker(9, false, false, false, false),"[tab]"); mappedKeys.put(new KeyStroker(9, true, false, false, false),"[backtab]"); mappedKeys.put(new KeyStroker(127, false, false, false, false),"[delete]"); mappedKeys.put(new KeyStroker(155, false, false, false, false),"[insert]"); mappedKeys.put(new KeyStroker(19, false, false, false, false),"[clear]"); mappedKeys.put(new KeyStroker(27, false, false, false, false),"[reset]"); mappedKeys.put(new KeyStroker(27, true, false, false, false),"[sysreq]"); mappedKeys.put(new KeyStroker(35, false, false, false, false),"[eof]"); mappedKeys.put(new KeyStroker(36, false, false, false, false),"[home]"); mappedKeys.put(new KeyStroker(39, false, false, false, false),"[right]"); mappedKeys.put(new KeyStroker(39, false, false, true, false),"[nextword]"); mappedKeys.put(new KeyStroker(37, false, false, false, false),"[left]"); mappedKeys.put(new KeyStroker(37, false, false, true, false),"[prevword]"); mappedKeys.put(new KeyStroker(38, false, false, false, false),"[up]"); mappedKeys.put(new KeyStroker(40, false, false, false, false),"[down]"); mappedKeys.put(new KeyStroker(34, false, false, false, false),"[pgdown]"); mappedKeys.put(new KeyStroker(33, false, false, false, false),"[pgup]"); mappedKeys.put(new KeyStroker(96, false, false, false, false),"[keypad0]"); mappedKeys.put(new KeyStroker(97, false, false, false, false),"[keypad1]"); mappedKeys.put(new KeyStroker(98, false, false, false, false),"[keypad2]"); mappedKeys.put(new KeyStroker(99, false, false, false, false),"[keypad3]"); mappedKeys.put(new KeyStroker(100, false, false, false, false),"[keypad4]"); mappedKeys.put(new KeyStroker(101, false, false, false, false),"[keypad5]"); mappedKeys.put(new KeyStroker(102, false, false, false, false),"[keypad6]"); mappedKeys.put(new KeyStroker(103, false, false, false, false),"[keypad7]"); mappedKeys.put(new KeyStroker(104, false, false, false, false),"[keypad8]"); mappedKeys.put(new KeyStroker(105, false, false, false, false),"[keypad9]"); mappedKeys.put(new KeyStroker(109, false, false, false, false),"[field-]"); mappedKeys.put(new KeyStroker(107, false, false, false, false),"[field+]"); mappedKeys.put(new KeyStroker(112, false, false, false, false),"[pf1]"); mappedKeys.put(new KeyStroker(113, false, false, false, false),"[pf2]"); mappedKeys.put(new KeyStroker(114, false, false, false, false),"[pf3]"); mappedKeys.put(new KeyStroker(115, false, false, false, false),"[pf4]"); mappedKeys.put(new KeyStroker(116, false, false, false, false),"[pf5]"); mappedKeys.put(new KeyStroker(117, false, false, false, false),"[pf6]"); mappedKeys.put(new KeyStroker(118, false, false, false, false),"[pf7]"); mappedKeys.put(new KeyStroker(119, false, false, false, false),"[pf8]"); mappedKeys.put(new KeyStroker(120, false, false, false, false),"[pf9]"); mappedKeys.put(new KeyStroker(121, false, false, false, false),"[pf10]"); mappedKeys.put(new KeyStroker(122, false, false, false, false),"[pf11]"); mappedKeys.put(new KeyStroker(123, false, false, false, false),"[pf12]"); mappedKeys.put(new KeyStroker(112, true, false, false, false),"[pf13]"); mappedKeys.put(new KeyStroker(113, true, false, false, false),"[pf14]"); mappedKeys.put(new KeyStroker(114, true, false, false, false),"[pf15]"); mappedKeys.put(new KeyStroker(115, true, false, false, false),"[pf16]"); mappedKeys.put(new KeyStroker(116, true, false, false, false),"[pf17]"); mappedKeys.put(new KeyStroker(117, true, false, false, false),"[pf18]"); mappedKeys.put(new KeyStroker(118, true, false, false, false),"[pf19]"); mappedKeys.put(new KeyStroker(119, true, false, false, false),"[pf20]"); mappedKeys.put(new KeyStroker(120, true, false, false, false),"[pf21]"); mappedKeys.put(new KeyStroker(121, true, false, false, false),"[pf22]"); mappedKeys.put(new KeyStroker(122, true, false, false, false),"[pf23]"); mappedKeys.put(new KeyStroker(123, true, false, false, false),"[pf24]"); mappedKeys.put(new KeyStroker(112, false, false, true, false),"[help]"); mappedKeys.put(new KeyStroker(72, false, false, true, false),"[hostprint]"); mappedKeys.put(new KeyStroker(67, false, false, true, false),"[copy]"); mappedKeys.put(new KeyStroker(86, false, false, true, false),"[paste]"); mappedKeys.put(new KeyStroker(39, true, false, false, false),"[markright]"); mappedKeys.put(new KeyStroker(37, true, false, false, false),"[markleft]"); mappedKeys.put(new KeyStroker(38, true, false, false, false),"[markup]"); mappedKeys.put(new KeyStroker(40, true, false, false, false),"[markdown]"); mappedKeys.put(new KeyStroker(155, true, false, false, false),"[dupfield]"); mappedKeys.put(new KeyStroker(17, true, true, false, false),"[newline]"); mappedKeys.put(new KeyStroker(34, false, false, true, false),"[jumpnext]"); mappedKeys.put(new KeyStroker(33, false, false, true, false),"[jumpprev]"); saveKeyMap(); } else { setKeyMap(keys); } }
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/afff7d5ba1bc03e5e4709099fbacc81757f734a1/KeyMapper.java/buggy/tn5250j/src/org/tn5250j/keyboard/KeyMapper.java
mappedKeys.put(new KeyStroker(35, false, false, false, false),"[eof]"); mappedKeys.put(new KeyStroker(36, false, false, false, false),"[home]"); mappedKeys.put(new KeyStroker(39, false, false, false, false),"[right]"); mappedKeys.put(new KeyStroker(39, false, false, true, false),"[nextword]"); mappedKeys.put(new KeyStroker(37, false, false, false, false),"[left]"); mappedKeys.put(new KeyStroker(37, false, false, true, false),"[prevword]"); mappedKeys.put(new KeyStroker(38, false, false, false, false),"[up]"); mappedKeys.put(new KeyStroker(40, false, false, false, false),"[down]"); mappedKeys.put(new KeyStroker(34, false, false, false, false),"[pgdown]"); mappedKeys.put(new KeyStroker(33, false, false, false, false),"[pgup]");
mappedKeys.put(newKeyStroker(35, false, false, false, false,KeyStroker.KEY_LOCATION_STANDARD),"[eof]"); mappedKeys.put(newKeyStroker(36, false, false, false, false,KeyStroker.KEY_LOCATION_STANDARD),"[home]"); mappedKeys.put(newKeyStroker(39, false, false, false, false,KeyStroker.KEY_LOCATION_STANDARD),"[right]"); mappedKeys.put(newKeyStroker(39, false, false, true, false,KeyStroker.KEY_LOCATION_STANDARD),"[nextword]"); mappedKeys.put(newKeyStroker(37, false, false, false, false,KeyStroker.KEY_LOCATION_STANDARD),"[left]"); mappedKeys.put(newKeyStroker(37, false, false, true, false,KeyStroker.KEY_LOCATION_STANDARD),"[prevword]"); mappedKeys.put(newKeyStroker(38, false, false, false, false,KeyStroker.KEY_LOCATION_STANDARD),"[up]"); mappedKeys.put(newKeyStroker(40, false, false, false, false,KeyStroker.KEY_LOCATION_STANDARD),"[down]"); mappedKeys.put(newKeyStroker(34, false, false, false, false,KeyStroker.KEY_LOCATION_STANDARD),"[pgdown]"); mappedKeys.put(newKeyStroker(33, false, false, false, false,KeyStroker.KEY_LOCATION_STANDARD),"[pgup]");
public static void init() {// if (mappedKeys != null)// return;//// init("keymap");//// }//// public static void init(String map) { if (mappedKeys != null) return;// keyMapName = map; mappedKeys = new HashMap(60); workStroke = new KeyStroker(0, false, false, false,false);// Properties keys = new Properties(); Properties keys = ConfigureFactory.getInstance().getProperties( GlobalConfigure.KEYMAP); if (!loadKeyStrokes(keys)) { // keycode shift control alternate // Key <-> Keycode , isShiftDown , isControlDown , isAlternateDown // my personal preference mappedKeys.put(new KeyStroker(10, false, false, false, false),"[fldext]"); mappedKeys.put(new KeyStroker(17, false, true, false, false),"[enter]");// mappedKeys.put(new KeyStroker(10, false, false, false),"[enter]");// mappedKeys.put(new KeyStroker(10, true, false, false),"[fldext]"); mappedKeys.put(new KeyStroker(8, false, false, false, false),"[backspace]"); mappedKeys.put(new KeyStroker(9, false, false, false, false),"[tab]"); mappedKeys.put(new KeyStroker(9, true, false, false, false),"[backtab]"); mappedKeys.put(new KeyStroker(127, false, false, false, false),"[delete]"); mappedKeys.put(new KeyStroker(155, false, false, false, false),"[insert]"); mappedKeys.put(new KeyStroker(19, false, false, false, false),"[clear]"); mappedKeys.put(new KeyStroker(27, false, false, false, false),"[reset]"); mappedKeys.put(new KeyStroker(27, true, false, false, false),"[sysreq]"); mappedKeys.put(new KeyStroker(35, false, false, false, false),"[eof]"); mappedKeys.put(new KeyStroker(36, false, false, false, false),"[home]"); mappedKeys.put(new KeyStroker(39, false, false, false, false),"[right]"); mappedKeys.put(new KeyStroker(39, false, false, true, false),"[nextword]"); mappedKeys.put(new KeyStroker(37, false, false, false, false),"[left]"); mappedKeys.put(new KeyStroker(37, false, false, true, false),"[prevword]"); mappedKeys.put(new KeyStroker(38, false, false, false, false),"[up]"); mappedKeys.put(new KeyStroker(40, false, false, false, false),"[down]"); mappedKeys.put(new KeyStroker(34, false, false, false, false),"[pgdown]"); mappedKeys.put(new KeyStroker(33, false, false, false, false),"[pgup]"); mappedKeys.put(new KeyStroker(96, false, false, false, false),"[keypad0]"); mappedKeys.put(new KeyStroker(97, false, false, false, false),"[keypad1]"); mappedKeys.put(new KeyStroker(98, false, false, false, false),"[keypad2]"); mappedKeys.put(new KeyStroker(99, false, false, false, false),"[keypad3]"); mappedKeys.put(new KeyStroker(100, false, false, false, false),"[keypad4]"); mappedKeys.put(new KeyStroker(101, false, false, false, false),"[keypad5]"); mappedKeys.put(new KeyStroker(102, false, false, false, false),"[keypad6]"); mappedKeys.put(new KeyStroker(103, false, false, false, false),"[keypad7]"); mappedKeys.put(new KeyStroker(104, false, false, false, false),"[keypad8]"); mappedKeys.put(new KeyStroker(105, false, false, false, false),"[keypad9]"); mappedKeys.put(new KeyStroker(109, false, false, false, false),"[field-]"); mappedKeys.put(new KeyStroker(107, false, false, false, false),"[field+]"); mappedKeys.put(new KeyStroker(112, false, false, false, false),"[pf1]"); mappedKeys.put(new KeyStroker(113, false, false, false, false),"[pf2]"); mappedKeys.put(new KeyStroker(114, false, false, false, false),"[pf3]"); mappedKeys.put(new KeyStroker(115, false, false, false, false),"[pf4]"); mappedKeys.put(new KeyStroker(116, false, false, false, false),"[pf5]"); mappedKeys.put(new KeyStroker(117, false, false, false, false),"[pf6]"); mappedKeys.put(new KeyStroker(118, false, false, false, false),"[pf7]"); mappedKeys.put(new KeyStroker(119, false, false, false, false),"[pf8]"); mappedKeys.put(new KeyStroker(120, false, false, false, false),"[pf9]"); mappedKeys.put(new KeyStroker(121, false, false, false, false),"[pf10]"); mappedKeys.put(new KeyStroker(122, false, false, false, false),"[pf11]"); mappedKeys.put(new KeyStroker(123, false, false, false, false),"[pf12]"); mappedKeys.put(new KeyStroker(112, true, false, false, false),"[pf13]"); mappedKeys.put(new KeyStroker(113, true, false, false, false),"[pf14]"); mappedKeys.put(new KeyStroker(114, true, false, false, false),"[pf15]"); mappedKeys.put(new KeyStroker(115, true, false, false, false),"[pf16]"); mappedKeys.put(new KeyStroker(116, true, false, false, false),"[pf17]"); mappedKeys.put(new KeyStroker(117, true, false, false, false),"[pf18]"); mappedKeys.put(new KeyStroker(118, true, false, false, false),"[pf19]"); mappedKeys.put(new KeyStroker(119, true, false, false, false),"[pf20]"); mappedKeys.put(new KeyStroker(120, true, false, false, false),"[pf21]"); mappedKeys.put(new KeyStroker(121, true, false, false, false),"[pf22]"); mappedKeys.put(new KeyStroker(122, true, false, false, false),"[pf23]"); mappedKeys.put(new KeyStroker(123, true, false, false, false),"[pf24]"); mappedKeys.put(new KeyStroker(112, false, false, true, false),"[help]"); mappedKeys.put(new KeyStroker(72, false, false, true, false),"[hostprint]"); mappedKeys.put(new KeyStroker(67, false, false, true, false),"[copy]"); mappedKeys.put(new KeyStroker(86, false, false, true, false),"[paste]"); mappedKeys.put(new KeyStroker(39, true, false, false, false),"[markright]"); mappedKeys.put(new KeyStroker(37, true, false, false, false),"[markleft]"); mappedKeys.put(new KeyStroker(38, true, false, false, false),"[markup]"); mappedKeys.put(new KeyStroker(40, true, false, false, false),"[markdown]"); mappedKeys.put(new KeyStroker(155, true, false, false, false),"[dupfield]"); mappedKeys.put(new KeyStroker(17, true, true, false, false),"[newline]"); mappedKeys.put(new KeyStroker(34, false, false, true, false),"[jumpnext]"); mappedKeys.put(new KeyStroker(33, false, false, true, false),"[jumpprev]"); saveKeyMap(); } else { setKeyMap(keys); } }
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/afff7d5ba1bc03e5e4709099fbacc81757f734a1/KeyMapper.java/buggy/tn5250j/src/org/tn5250j/keyboard/KeyMapper.java
mappedKeys.put(new KeyStroker(96, false, false, false, false),"[keypad0]"); mappedKeys.put(new KeyStroker(97, false, false, false, false),"[keypad1]"); mappedKeys.put(new KeyStroker(98, false, false, false, false),"[keypad2]"); mappedKeys.put(new KeyStroker(99, false, false, false, false),"[keypad3]"); mappedKeys.put(new KeyStroker(100, false, false, false, false),"[keypad4]"); mappedKeys.put(new KeyStroker(101, false, false, false, false),"[keypad5]"); mappedKeys.put(new KeyStroker(102, false, false, false, false),"[keypad6]"); mappedKeys.put(new KeyStroker(103, false, false, false, false),"[keypad7]"); mappedKeys.put(new KeyStroker(104, false, false, false, false),"[keypad8]"); mappedKeys.put(new KeyStroker(105, false, false, false, false),"[keypad9]");
mappedKeys.put(newKeyStroker(96, false, false, false, false,KeyStroker.KEY_LOCATION_STANDARD),"[keypad0]"); mappedKeys.put(newKeyStroker(97, false, false, false, false,KeyStroker.KEY_LOCATION_STANDARD),"[keypad1]"); mappedKeys.put(newKeyStroker(98, false, false, false, false,KeyStroker.KEY_LOCATION_STANDARD),"[keypad2]"); mappedKeys.put(newKeyStroker(99, false, false, false, false,KeyStroker.KEY_LOCATION_STANDARD),"[keypad3]"); mappedKeys.put(newKeyStroker(100, false, false, false, false,KeyStroker.KEY_LOCATION_STANDARD),"[keypad4]"); mappedKeys.put(newKeyStroker(101, false, false, false, false,KeyStroker.KEY_LOCATION_STANDARD),"[keypad5]"); mappedKeys.put(newKeyStroker(102, false, false, false, false,KeyStroker.KEY_LOCATION_STANDARD),"[keypad6]"); mappedKeys.put(newKeyStroker(103, false, false, false, false,KeyStroker.KEY_LOCATION_STANDARD),"[keypad7]"); mappedKeys.put(newKeyStroker(104, false, false, false, false,KeyStroker.KEY_LOCATION_STANDARD),"[keypad8]"); mappedKeys.put(newKeyStroker(105, false, false, false, false,KeyStroker.KEY_LOCATION_STANDARD),"[keypad9]");
public static void init() {// if (mappedKeys != null)// return;//// init("keymap");//// }//// public static void init(String map) { if (mappedKeys != null) return;// keyMapName = map; mappedKeys = new HashMap(60); workStroke = new KeyStroker(0, false, false, false,false);// Properties keys = new Properties(); Properties keys = ConfigureFactory.getInstance().getProperties( GlobalConfigure.KEYMAP); if (!loadKeyStrokes(keys)) { // keycode shift control alternate // Key <-> Keycode , isShiftDown , isControlDown , isAlternateDown // my personal preference mappedKeys.put(new KeyStroker(10, false, false, false, false),"[fldext]"); mappedKeys.put(new KeyStroker(17, false, true, false, false),"[enter]");// mappedKeys.put(new KeyStroker(10, false, false, false),"[enter]");// mappedKeys.put(new KeyStroker(10, true, false, false),"[fldext]"); mappedKeys.put(new KeyStroker(8, false, false, false, false),"[backspace]"); mappedKeys.put(new KeyStroker(9, false, false, false, false),"[tab]"); mappedKeys.put(new KeyStroker(9, true, false, false, false),"[backtab]"); mappedKeys.put(new KeyStroker(127, false, false, false, false),"[delete]"); mappedKeys.put(new KeyStroker(155, false, false, false, false),"[insert]"); mappedKeys.put(new KeyStroker(19, false, false, false, false),"[clear]"); mappedKeys.put(new KeyStroker(27, false, false, false, false),"[reset]"); mappedKeys.put(new KeyStroker(27, true, false, false, false),"[sysreq]"); mappedKeys.put(new KeyStroker(35, false, false, false, false),"[eof]"); mappedKeys.put(new KeyStroker(36, false, false, false, false),"[home]"); mappedKeys.put(new KeyStroker(39, false, false, false, false),"[right]"); mappedKeys.put(new KeyStroker(39, false, false, true, false),"[nextword]"); mappedKeys.put(new KeyStroker(37, false, false, false, false),"[left]"); mappedKeys.put(new KeyStroker(37, false, false, true, false),"[prevword]"); mappedKeys.put(new KeyStroker(38, false, false, false, false),"[up]"); mappedKeys.put(new KeyStroker(40, false, false, false, false),"[down]"); mappedKeys.put(new KeyStroker(34, false, false, false, false),"[pgdown]"); mappedKeys.put(new KeyStroker(33, false, false, false, false),"[pgup]"); mappedKeys.put(new KeyStroker(96, false, false, false, false),"[keypad0]"); mappedKeys.put(new KeyStroker(97, false, false, false, false),"[keypad1]"); mappedKeys.put(new KeyStroker(98, false, false, false, false),"[keypad2]"); mappedKeys.put(new KeyStroker(99, false, false, false, false),"[keypad3]"); mappedKeys.put(new KeyStroker(100, false, false, false, false),"[keypad4]"); mappedKeys.put(new KeyStroker(101, false, false, false, false),"[keypad5]"); mappedKeys.put(new KeyStroker(102, false, false, false, false),"[keypad6]"); mappedKeys.put(new KeyStroker(103, false, false, false, false),"[keypad7]"); mappedKeys.put(new KeyStroker(104, false, false, false, false),"[keypad8]"); mappedKeys.put(new KeyStroker(105, false, false, false, false),"[keypad9]"); mappedKeys.put(new KeyStroker(109, false, false, false, false),"[field-]"); mappedKeys.put(new KeyStroker(107, false, false, false, false),"[field+]"); mappedKeys.put(new KeyStroker(112, false, false, false, false),"[pf1]"); mappedKeys.put(new KeyStroker(113, false, false, false, false),"[pf2]"); mappedKeys.put(new KeyStroker(114, false, false, false, false),"[pf3]"); mappedKeys.put(new KeyStroker(115, false, false, false, false),"[pf4]"); mappedKeys.put(new KeyStroker(116, false, false, false, false),"[pf5]"); mappedKeys.put(new KeyStroker(117, false, false, false, false),"[pf6]"); mappedKeys.put(new KeyStroker(118, false, false, false, false),"[pf7]"); mappedKeys.put(new KeyStroker(119, false, false, false, false),"[pf8]"); mappedKeys.put(new KeyStroker(120, false, false, false, false),"[pf9]"); mappedKeys.put(new KeyStroker(121, false, false, false, false),"[pf10]"); mappedKeys.put(new KeyStroker(122, false, false, false, false),"[pf11]"); mappedKeys.put(new KeyStroker(123, false, false, false, false),"[pf12]"); mappedKeys.put(new KeyStroker(112, true, false, false, false),"[pf13]"); mappedKeys.put(new KeyStroker(113, true, false, false, false),"[pf14]"); mappedKeys.put(new KeyStroker(114, true, false, false, false),"[pf15]"); mappedKeys.put(new KeyStroker(115, true, false, false, false),"[pf16]"); mappedKeys.put(new KeyStroker(116, true, false, false, false),"[pf17]"); mappedKeys.put(new KeyStroker(117, true, false, false, false),"[pf18]"); mappedKeys.put(new KeyStroker(118, true, false, false, false),"[pf19]"); mappedKeys.put(new KeyStroker(119, true, false, false, false),"[pf20]"); mappedKeys.put(new KeyStroker(120, true, false, false, false),"[pf21]"); mappedKeys.put(new KeyStroker(121, true, false, false, false),"[pf22]"); mappedKeys.put(new KeyStroker(122, true, false, false, false),"[pf23]"); mappedKeys.put(new KeyStroker(123, true, false, false, false),"[pf24]"); mappedKeys.put(new KeyStroker(112, false, false, true, false),"[help]"); mappedKeys.put(new KeyStroker(72, false, false, true, false),"[hostprint]"); mappedKeys.put(new KeyStroker(67, false, false, true, false),"[copy]"); mappedKeys.put(new KeyStroker(86, false, false, true, false),"[paste]"); mappedKeys.put(new KeyStroker(39, true, false, false, false),"[markright]"); mappedKeys.put(new KeyStroker(37, true, false, false, false),"[markleft]"); mappedKeys.put(new KeyStroker(38, true, false, false, false),"[markup]"); mappedKeys.put(new KeyStroker(40, true, false, false, false),"[markdown]"); mappedKeys.put(new KeyStroker(155, true, false, false, false),"[dupfield]"); mappedKeys.put(new KeyStroker(17, true, true, false, false),"[newline]"); mappedKeys.put(new KeyStroker(34, false, false, true, false),"[jumpnext]"); mappedKeys.put(new KeyStroker(33, false, false, true, false),"[jumpprev]"); saveKeyMap(); } else { setKeyMap(keys); } }
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/afff7d5ba1bc03e5e4709099fbacc81757f734a1/KeyMapper.java/buggy/tn5250j/src/org/tn5250j/keyboard/KeyMapper.java
mappedKeys.put(new KeyStroker(109, false, false, false, false),"[field-]"); mappedKeys.put(new KeyStroker(107, false, false, false, false),"[field+]"); mappedKeys.put(new KeyStroker(112, false, false, false, false),"[pf1]"); mappedKeys.put(new KeyStroker(113, false, false, false, false),"[pf2]"); mappedKeys.put(new KeyStroker(114, false, false, false, false),"[pf3]"); mappedKeys.put(new KeyStroker(115, false, false, false, false),"[pf4]"); mappedKeys.put(new KeyStroker(116, false, false, false, false),"[pf5]"); mappedKeys.put(new KeyStroker(117, false, false, false, false),"[pf6]"); mappedKeys.put(new KeyStroker(118, false, false, false, false),"[pf7]"); mappedKeys.put(new KeyStroker(119, false, false, false, false),"[pf8]"); mappedKeys.put(new KeyStroker(120, false, false, false, false),"[pf9]"); mappedKeys.put(new KeyStroker(121, false, false, false, false),"[pf10]"); mappedKeys.put(new KeyStroker(122, false, false, false, false),"[pf11]"); mappedKeys.put(new KeyStroker(123, false, false, false, false),"[pf12]"); mappedKeys.put(new KeyStroker(112, true, false, false, false),"[pf13]"); mappedKeys.put(new KeyStroker(113, true, false, false, false),"[pf14]"); mappedKeys.put(new KeyStroker(114, true, false, false, false),"[pf15]"); mappedKeys.put(new KeyStroker(115, true, false, false, false),"[pf16]"); mappedKeys.put(new KeyStroker(116, true, false, false, false),"[pf17]"); mappedKeys.put(new KeyStroker(117, true, false, false, false),"[pf18]"); mappedKeys.put(new KeyStroker(118, true, false, false, false),"[pf19]"); mappedKeys.put(new KeyStroker(119, true, false, false, false),"[pf20]"); mappedKeys.put(new KeyStroker(120, true, false, false, false),"[pf21]"); mappedKeys.put(new KeyStroker(121, true, false, false, false),"[pf22]"); mappedKeys.put(new KeyStroker(122, true, false, false, false),"[pf23]"); mappedKeys.put(new KeyStroker(123, true, false, false, false),"[pf24]"); mappedKeys.put(new KeyStroker(112, false, false, true, false),"[help]");
mappedKeys.put(newKeyStroker(109, false, false, false, false,KeyStroker.KEY_LOCATION_STANDARD),"[field-]"); mappedKeys.put(newKeyStroker(107, false, false, false, false,KeyStroker.KEY_LOCATION_STANDARD),"[field+]"); mappedKeys.put(newKeyStroker(112, false, false, false, false,KeyStroker.KEY_LOCATION_STANDARD),"[pf1]"); mappedKeys.put(newKeyStroker(113, false, false, false, false,KeyStroker.KEY_LOCATION_STANDARD),"[pf2]"); mappedKeys.put(newKeyStroker(114, false, false, false, false,KeyStroker.KEY_LOCATION_STANDARD),"[pf3]"); mappedKeys.put(newKeyStroker(115, false, false, false, false,KeyStroker.KEY_LOCATION_STANDARD),"[pf4]"); mappedKeys.put(newKeyStroker(116, false, false, false, false,KeyStroker.KEY_LOCATION_STANDARD),"[pf5]"); mappedKeys.put(newKeyStroker(117, false, false, false, false,KeyStroker.KEY_LOCATION_STANDARD),"[pf6]"); mappedKeys.put(newKeyStroker(118, false, false, false, false,KeyStroker.KEY_LOCATION_STANDARD),"[pf7]"); mappedKeys.put(newKeyStroker(119, false, false, false, false,KeyStroker.KEY_LOCATION_STANDARD),"[pf8]"); mappedKeys.put(newKeyStroker(120, false, false, false, false,KeyStroker.KEY_LOCATION_STANDARD),"[pf9]"); mappedKeys.put(newKeyStroker(121, false, false, false, false,KeyStroker.KEY_LOCATION_STANDARD),"[pf10]"); mappedKeys.put(newKeyStroker(122, false, false, false, false,KeyStroker.KEY_LOCATION_STANDARD),"[pf11]"); mappedKeys.put(newKeyStroker(123, false, false, false, false,KeyStroker.KEY_LOCATION_STANDARD),"[pf12]"); mappedKeys.put(newKeyStroker(112, true, false, false, false,KeyStroker.KEY_LOCATION_STANDARD),"[pf13]"); mappedKeys.put(newKeyStroker(113, true, false, false, false,KeyStroker.KEY_LOCATION_STANDARD),"[pf14]"); mappedKeys.put(newKeyStroker(114, true, false, false, false,KeyStroker.KEY_LOCATION_STANDARD),"[pf15]"); mappedKeys.put(newKeyStroker(115, true, false, false, false,KeyStroker.KEY_LOCATION_STANDARD),"[pf16]"); mappedKeys.put(newKeyStroker(116, true, false, false, false,KeyStroker.KEY_LOCATION_STANDARD),"[pf17]"); mappedKeys.put(newKeyStroker(117, true, false, false, false,KeyStroker.KEY_LOCATION_STANDARD),"[pf18]"); mappedKeys.put(newKeyStroker(118, true, false, false, false,KeyStroker.KEY_LOCATION_STANDARD),"[pf19]"); mappedKeys.put(newKeyStroker(119, true, false, false, false,KeyStroker.KEY_LOCATION_STANDARD),"[pf20]"); mappedKeys.put(newKeyStroker(120, true, false, false, false,KeyStroker.KEY_LOCATION_STANDARD),"[pf21]"); mappedKeys.put(newKeyStroker(121, true, false, false, false,KeyStroker.KEY_LOCATION_STANDARD),"[pf22]"); mappedKeys.put(newKeyStroker(122, true, false, false, false,KeyStroker.KEY_LOCATION_STANDARD),"[pf23]"); mappedKeys.put(newKeyStroker(123, true, false, false, false,KeyStroker.KEY_LOCATION_STANDARD),"[pf24]"); mappedKeys.put(newKeyStroker(112, false, false, true, false,KeyStroker.KEY_LOCATION_STANDARD),"[help]");
public static void init() {// if (mappedKeys != null)// return;//// init("keymap");//// }//// public static void init(String map) { if (mappedKeys != null) return;// keyMapName = map; mappedKeys = new HashMap(60); workStroke = new KeyStroker(0, false, false, false,false);// Properties keys = new Properties(); Properties keys = ConfigureFactory.getInstance().getProperties( GlobalConfigure.KEYMAP); if (!loadKeyStrokes(keys)) { // keycode shift control alternate // Key <-> Keycode , isShiftDown , isControlDown , isAlternateDown // my personal preference mappedKeys.put(new KeyStroker(10, false, false, false, false),"[fldext]"); mappedKeys.put(new KeyStroker(17, false, true, false, false),"[enter]");// mappedKeys.put(new KeyStroker(10, false, false, false),"[enter]");// mappedKeys.put(new KeyStroker(10, true, false, false),"[fldext]"); mappedKeys.put(new KeyStroker(8, false, false, false, false),"[backspace]"); mappedKeys.put(new KeyStroker(9, false, false, false, false),"[tab]"); mappedKeys.put(new KeyStroker(9, true, false, false, false),"[backtab]"); mappedKeys.put(new KeyStroker(127, false, false, false, false),"[delete]"); mappedKeys.put(new KeyStroker(155, false, false, false, false),"[insert]"); mappedKeys.put(new KeyStroker(19, false, false, false, false),"[clear]"); mappedKeys.put(new KeyStroker(27, false, false, false, false),"[reset]"); mappedKeys.put(new KeyStroker(27, true, false, false, false),"[sysreq]"); mappedKeys.put(new KeyStroker(35, false, false, false, false),"[eof]"); mappedKeys.put(new KeyStroker(36, false, false, false, false),"[home]"); mappedKeys.put(new KeyStroker(39, false, false, false, false),"[right]"); mappedKeys.put(new KeyStroker(39, false, false, true, false),"[nextword]"); mappedKeys.put(new KeyStroker(37, false, false, false, false),"[left]"); mappedKeys.put(new KeyStroker(37, false, false, true, false),"[prevword]"); mappedKeys.put(new KeyStroker(38, false, false, false, false),"[up]"); mappedKeys.put(new KeyStroker(40, false, false, false, false),"[down]"); mappedKeys.put(new KeyStroker(34, false, false, false, false),"[pgdown]"); mappedKeys.put(new KeyStroker(33, false, false, false, false),"[pgup]"); mappedKeys.put(new KeyStroker(96, false, false, false, false),"[keypad0]"); mappedKeys.put(new KeyStroker(97, false, false, false, false),"[keypad1]"); mappedKeys.put(new KeyStroker(98, false, false, false, false),"[keypad2]"); mappedKeys.put(new KeyStroker(99, false, false, false, false),"[keypad3]"); mappedKeys.put(new KeyStroker(100, false, false, false, false),"[keypad4]"); mappedKeys.put(new KeyStroker(101, false, false, false, false),"[keypad5]"); mappedKeys.put(new KeyStroker(102, false, false, false, false),"[keypad6]"); mappedKeys.put(new KeyStroker(103, false, false, false, false),"[keypad7]"); mappedKeys.put(new KeyStroker(104, false, false, false, false),"[keypad8]"); mappedKeys.put(new KeyStroker(105, false, false, false, false),"[keypad9]"); mappedKeys.put(new KeyStroker(109, false, false, false, false),"[field-]"); mappedKeys.put(new KeyStroker(107, false, false, false, false),"[field+]"); mappedKeys.put(new KeyStroker(112, false, false, false, false),"[pf1]"); mappedKeys.put(new KeyStroker(113, false, false, false, false),"[pf2]"); mappedKeys.put(new KeyStroker(114, false, false, false, false),"[pf3]"); mappedKeys.put(new KeyStroker(115, false, false, false, false),"[pf4]"); mappedKeys.put(new KeyStroker(116, false, false, false, false),"[pf5]"); mappedKeys.put(new KeyStroker(117, false, false, false, false),"[pf6]"); mappedKeys.put(new KeyStroker(118, false, false, false, false),"[pf7]"); mappedKeys.put(new KeyStroker(119, false, false, false, false),"[pf8]"); mappedKeys.put(new KeyStroker(120, false, false, false, false),"[pf9]"); mappedKeys.put(new KeyStroker(121, false, false, false, false),"[pf10]"); mappedKeys.put(new KeyStroker(122, false, false, false, false),"[pf11]"); mappedKeys.put(new KeyStroker(123, false, false, false, false),"[pf12]"); mappedKeys.put(new KeyStroker(112, true, false, false, false),"[pf13]"); mappedKeys.put(new KeyStroker(113, true, false, false, false),"[pf14]"); mappedKeys.put(new KeyStroker(114, true, false, false, false),"[pf15]"); mappedKeys.put(new KeyStroker(115, true, false, false, false),"[pf16]"); mappedKeys.put(new KeyStroker(116, true, false, false, false),"[pf17]"); mappedKeys.put(new KeyStroker(117, true, false, false, false),"[pf18]"); mappedKeys.put(new KeyStroker(118, true, false, false, false),"[pf19]"); mappedKeys.put(new KeyStroker(119, true, false, false, false),"[pf20]"); mappedKeys.put(new KeyStroker(120, true, false, false, false),"[pf21]"); mappedKeys.put(new KeyStroker(121, true, false, false, false),"[pf22]"); mappedKeys.put(new KeyStroker(122, true, false, false, false),"[pf23]"); mappedKeys.put(new KeyStroker(123, true, false, false, false),"[pf24]"); mappedKeys.put(new KeyStroker(112, false, false, true, false),"[help]"); mappedKeys.put(new KeyStroker(72, false, false, true, false),"[hostprint]"); mappedKeys.put(new KeyStroker(67, false, false, true, false),"[copy]"); mappedKeys.put(new KeyStroker(86, false, false, true, false),"[paste]"); mappedKeys.put(new KeyStroker(39, true, false, false, false),"[markright]"); mappedKeys.put(new KeyStroker(37, true, false, false, false),"[markleft]"); mappedKeys.put(new KeyStroker(38, true, false, false, false),"[markup]"); mappedKeys.put(new KeyStroker(40, true, false, false, false),"[markdown]"); mappedKeys.put(new KeyStroker(155, true, false, false, false),"[dupfield]"); mappedKeys.put(new KeyStroker(17, true, true, false, false),"[newline]"); mappedKeys.put(new KeyStroker(34, false, false, true, false),"[jumpnext]"); mappedKeys.put(new KeyStroker(33, false, false, true, false),"[jumpprev]"); saveKeyMap(); } else { setKeyMap(keys); } }
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/afff7d5ba1bc03e5e4709099fbacc81757f734a1/KeyMapper.java/buggy/tn5250j/src/org/tn5250j/keyboard/KeyMapper.java
mappedKeys.put(new KeyStroker(72, false, false, true, false),"[hostprint]"); mappedKeys.put(new KeyStroker(67, false, false, true, false),"[copy]"); mappedKeys.put(new KeyStroker(86, false, false, true, false),"[paste]");
mappedKeys.put(newKeyStroker(72, false, false, true, false,KeyStroker.KEY_LOCATION_STANDARD),"[hostprint]"); mappedKeys.put(newKeyStroker(67, false, false, true, false,KeyStroker.KEY_LOCATION_STANDARD),"[copy]"); mappedKeys.put(newKeyStroker(86, false, false, true, false,KeyStroker.KEY_LOCATION_STANDARD),"[paste]");
public static void init() {// if (mappedKeys != null)// return;//// init("keymap");//// }//// public static void init(String map) { if (mappedKeys != null) return;// keyMapName = map; mappedKeys = new HashMap(60); workStroke = new KeyStroker(0, false, false, false,false);// Properties keys = new Properties(); Properties keys = ConfigureFactory.getInstance().getProperties( GlobalConfigure.KEYMAP); if (!loadKeyStrokes(keys)) { // keycode shift control alternate // Key <-> Keycode , isShiftDown , isControlDown , isAlternateDown // my personal preference mappedKeys.put(new KeyStroker(10, false, false, false, false),"[fldext]"); mappedKeys.put(new KeyStroker(17, false, true, false, false),"[enter]");// mappedKeys.put(new KeyStroker(10, false, false, false),"[enter]");// mappedKeys.put(new KeyStroker(10, true, false, false),"[fldext]"); mappedKeys.put(new KeyStroker(8, false, false, false, false),"[backspace]"); mappedKeys.put(new KeyStroker(9, false, false, false, false),"[tab]"); mappedKeys.put(new KeyStroker(9, true, false, false, false),"[backtab]"); mappedKeys.put(new KeyStroker(127, false, false, false, false),"[delete]"); mappedKeys.put(new KeyStroker(155, false, false, false, false),"[insert]"); mappedKeys.put(new KeyStroker(19, false, false, false, false),"[clear]"); mappedKeys.put(new KeyStroker(27, false, false, false, false),"[reset]"); mappedKeys.put(new KeyStroker(27, true, false, false, false),"[sysreq]"); mappedKeys.put(new KeyStroker(35, false, false, false, false),"[eof]"); mappedKeys.put(new KeyStroker(36, false, false, false, false),"[home]"); mappedKeys.put(new KeyStroker(39, false, false, false, false),"[right]"); mappedKeys.put(new KeyStroker(39, false, false, true, false),"[nextword]"); mappedKeys.put(new KeyStroker(37, false, false, false, false),"[left]"); mappedKeys.put(new KeyStroker(37, false, false, true, false),"[prevword]"); mappedKeys.put(new KeyStroker(38, false, false, false, false),"[up]"); mappedKeys.put(new KeyStroker(40, false, false, false, false),"[down]"); mappedKeys.put(new KeyStroker(34, false, false, false, false),"[pgdown]"); mappedKeys.put(new KeyStroker(33, false, false, false, false),"[pgup]"); mappedKeys.put(new KeyStroker(96, false, false, false, false),"[keypad0]"); mappedKeys.put(new KeyStroker(97, false, false, false, false),"[keypad1]"); mappedKeys.put(new KeyStroker(98, false, false, false, false),"[keypad2]"); mappedKeys.put(new KeyStroker(99, false, false, false, false),"[keypad3]"); mappedKeys.put(new KeyStroker(100, false, false, false, false),"[keypad4]"); mappedKeys.put(new KeyStroker(101, false, false, false, false),"[keypad5]"); mappedKeys.put(new KeyStroker(102, false, false, false, false),"[keypad6]"); mappedKeys.put(new KeyStroker(103, false, false, false, false),"[keypad7]"); mappedKeys.put(new KeyStroker(104, false, false, false, false),"[keypad8]"); mappedKeys.put(new KeyStroker(105, false, false, false, false),"[keypad9]"); mappedKeys.put(new KeyStroker(109, false, false, false, false),"[field-]"); mappedKeys.put(new KeyStroker(107, false, false, false, false),"[field+]"); mappedKeys.put(new KeyStroker(112, false, false, false, false),"[pf1]"); mappedKeys.put(new KeyStroker(113, false, false, false, false),"[pf2]"); mappedKeys.put(new KeyStroker(114, false, false, false, false),"[pf3]"); mappedKeys.put(new KeyStroker(115, false, false, false, false),"[pf4]"); mappedKeys.put(new KeyStroker(116, false, false, false, false),"[pf5]"); mappedKeys.put(new KeyStroker(117, false, false, false, false),"[pf6]"); mappedKeys.put(new KeyStroker(118, false, false, false, false),"[pf7]"); mappedKeys.put(new KeyStroker(119, false, false, false, false),"[pf8]"); mappedKeys.put(new KeyStroker(120, false, false, false, false),"[pf9]"); mappedKeys.put(new KeyStroker(121, false, false, false, false),"[pf10]"); mappedKeys.put(new KeyStroker(122, false, false, false, false),"[pf11]"); mappedKeys.put(new KeyStroker(123, false, false, false, false),"[pf12]"); mappedKeys.put(new KeyStroker(112, true, false, false, false),"[pf13]"); mappedKeys.put(new KeyStroker(113, true, false, false, false),"[pf14]"); mappedKeys.put(new KeyStroker(114, true, false, false, false),"[pf15]"); mappedKeys.put(new KeyStroker(115, true, false, false, false),"[pf16]"); mappedKeys.put(new KeyStroker(116, true, false, false, false),"[pf17]"); mappedKeys.put(new KeyStroker(117, true, false, false, false),"[pf18]"); mappedKeys.put(new KeyStroker(118, true, false, false, false),"[pf19]"); mappedKeys.put(new KeyStroker(119, true, false, false, false),"[pf20]"); mappedKeys.put(new KeyStroker(120, true, false, false, false),"[pf21]"); mappedKeys.put(new KeyStroker(121, true, false, false, false),"[pf22]"); mappedKeys.put(new KeyStroker(122, true, false, false, false),"[pf23]"); mappedKeys.put(new KeyStroker(123, true, false, false, false),"[pf24]"); mappedKeys.put(new KeyStroker(112, false, false, true, false),"[help]"); mappedKeys.put(new KeyStroker(72, false, false, true, false),"[hostprint]"); mappedKeys.put(new KeyStroker(67, false, false, true, false),"[copy]"); mappedKeys.put(new KeyStroker(86, false, false, true, false),"[paste]"); mappedKeys.put(new KeyStroker(39, true, false, false, false),"[markright]"); mappedKeys.put(new KeyStroker(37, true, false, false, false),"[markleft]"); mappedKeys.put(new KeyStroker(38, true, false, false, false),"[markup]"); mappedKeys.put(new KeyStroker(40, true, false, false, false),"[markdown]"); mappedKeys.put(new KeyStroker(155, true, false, false, false),"[dupfield]"); mappedKeys.put(new KeyStroker(17, true, true, false, false),"[newline]"); mappedKeys.put(new KeyStroker(34, false, false, true, false),"[jumpnext]"); mappedKeys.put(new KeyStroker(33, false, false, true, false),"[jumpprev]"); saveKeyMap(); } else { setKeyMap(keys); } }
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/afff7d5ba1bc03e5e4709099fbacc81757f734a1/KeyMapper.java/buggy/tn5250j/src/org/tn5250j/keyboard/KeyMapper.java
mappedKeys.put(new KeyStroker(39, true, false, false, false),"[markright]"); mappedKeys.put(new KeyStroker(37, true, false, false, false),"[markleft]"); mappedKeys.put(new KeyStroker(38, true, false, false, false),"[markup]"); mappedKeys.put(new KeyStroker(40, true, false, false, false),"[markdown]");
mappedKeys.put(newKeyStroker(39, true, false, false, false,KeyStroker.KEY_LOCATION_STANDARD),"[markright]"); mappedKeys.put(newKeyStroker(37, true, false, false, false,KeyStroker.KEY_LOCATION_STANDARD),"[markleft]"); mappedKeys.put(newKeyStroker(38, true, false, false, false,KeyStroker.KEY_LOCATION_STANDARD),"[markup]"); mappedKeys.put(newKeyStroker(40, true, false, false, false,KeyStroker.KEY_LOCATION_STANDARD),"[markdown]");
public static void init() {// if (mappedKeys != null)// return;//// init("keymap");//// }//// public static void init(String map) { if (mappedKeys != null) return;// keyMapName = map; mappedKeys = new HashMap(60); workStroke = new KeyStroker(0, false, false, false,false);// Properties keys = new Properties(); Properties keys = ConfigureFactory.getInstance().getProperties( GlobalConfigure.KEYMAP); if (!loadKeyStrokes(keys)) { // keycode shift control alternate // Key <-> Keycode , isShiftDown , isControlDown , isAlternateDown // my personal preference mappedKeys.put(new KeyStroker(10, false, false, false, false),"[fldext]"); mappedKeys.put(new KeyStroker(17, false, true, false, false),"[enter]");// mappedKeys.put(new KeyStroker(10, false, false, false),"[enter]");// mappedKeys.put(new KeyStroker(10, true, false, false),"[fldext]"); mappedKeys.put(new KeyStroker(8, false, false, false, false),"[backspace]"); mappedKeys.put(new KeyStroker(9, false, false, false, false),"[tab]"); mappedKeys.put(new KeyStroker(9, true, false, false, false),"[backtab]"); mappedKeys.put(new KeyStroker(127, false, false, false, false),"[delete]"); mappedKeys.put(new KeyStroker(155, false, false, false, false),"[insert]"); mappedKeys.put(new KeyStroker(19, false, false, false, false),"[clear]"); mappedKeys.put(new KeyStroker(27, false, false, false, false),"[reset]"); mappedKeys.put(new KeyStroker(27, true, false, false, false),"[sysreq]"); mappedKeys.put(new KeyStroker(35, false, false, false, false),"[eof]"); mappedKeys.put(new KeyStroker(36, false, false, false, false),"[home]"); mappedKeys.put(new KeyStroker(39, false, false, false, false),"[right]"); mappedKeys.put(new KeyStroker(39, false, false, true, false),"[nextword]"); mappedKeys.put(new KeyStroker(37, false, false, false, false),"[left]"); mappedKeys.put(new KeyStroker(37, false, false, true, false),"[prevword]"); mappedKeys.put(new KeyStroker(38, false, false, false, false),"[up]"); mappedKeys.put(new KeyStroker(40, false, false, false, false),"[down]"); mappedKeys.put(new KeyStroker(34, false, false, false, false),"[pgdown]"); mappedKeys.put(new KeyStroker(33, false, false, false, false),"[pgup]"); mappedKeys.put(new KeyStroker(96, false, false, false, false),"[keypad0]"); mappedKeys.put(new KeyStroker(97, false, false, false, false),"[keypad1]"); mappedKeys.put(new KeyStroker(98, false, false, false, false),"[keypad2]"); mappedKeys.put(new KeyStroker(99, false, false, false, false),"[keypad3]"); mappedKeys.put(new KeyStroker(100, false, false, false, false),"[keypad4]"); mappedKeys.put(new KeyStroker(101, false, false, false, false),"[keypad5]"); mappedKeys.put(new KeyStroker(102, false, false, false, false),"[keypad6]"); mappedKeys.put(new KeyStroker(103, false, false, false, false),"[keypad7]"); mappedKeys.put(new KeyStroker(104, false, false, false, false),"[keypad8]"); mappedKeys.put(new KeyStroker(105, false, false, false, false),"[keypad9]"); mappedKeys.put(new KeyStroker(109, false, false, false, false),"[field-]"); mappedKeys.put(new KeyStroker(107, false, false, false, false),"[field+]"); mappedKeys.put(new KeyStroker(112, false, false, false, false),"[pf1]"); mappedKeys.put(new KeyStroker(113, false, false, false, false),"[pf2]"); mappedKeys.put(new KeyStroker(114, false, false, false, false),"[pf3]"); mappedKeys.put(new KeyStroker(115, false, false, false, false),"[pf4]"); mappedKeys.put(new KeyStroker(116, false, false, false, false),"[pf5]"); mappedKeys.put(new KeyStroker(117, false, false, false, false),"[pf6]"); mappedKeys.put(new KeyStroker(118, false, false, false, false),"[pf7]"); mappedKeys.put(new KeyStroker(119, false, false, false, false),"[pf8]"); mappedKeys.put(new KeyStroker(120, false, false, false, false),"[pf9]"); mappedKeys.put(new KeyStroker(121, false, false, false, false),"[pf10]"); mappedKeys.put(new KeyStroker(122, false, false, false, false),"[pf11]"); mappedKeys.put(new KeyStroker(123, false, false, false, false),"[pf12]"); mappedKeys.put(new KeyStroker(112, true, false, false, false),"[pf13]"); mappedKeys.put(new KeyStroker(113, true, false, false, false),"[pf14]"); mappedKeys.put(new KeyStroker(114, true, false, false, false),"[pf15]"); mappedKeys.put(new KeyStroker(115, true, false, false, false),"[pf16]"); mappedKeys.put(new KeyStroker(116, true, false, false, false),"[pf17]"); mappedKeys.put(new KeyStroker(117, true, false, false, false),"[pf18]"); mappedKeys.put(new KeyStroker(118, true, false, false, false),"[pf19]"); mappedKeys.put(new KeyStroker(119, true, false, false, false),"[pf20]"); mappedKeys.put(new KeyStroker(120, true, false, false, false),"[pf21]"); mappedKeys.put(new KeyStroker(121, true, false, false, false),"[pf22]"); mappedKeys.put(new KeyStroker(122, true, false, false, false),"[pf23]"); mappedKeys.put(new KeyStroker(123, true, false, false, false),"[pf24]"); mappedKeys.put(new KeyStroker(112, false, false, true, false),"[help]"); mappedKeys.put(new KeyStroker(72, false, false, true, false),"[hostprint]"); mappedKeys.put(new KeyStroker(67, false, false, true, false),"[copy]"); mappedKeys.put(new KeyStroker(86, false, false, true, false),"[paste]"); mappedKeys.put(new KeyStroker(39, true, false, false, false),"[markright]"); mappedKeys.put(new KeyStroker(37, true, false, false, false),"[markleft]"); mappedKeys.put(new KeyStroker(38, true, false, false, false),"[markup]"); mappedKeys.put(new KeyStroker(40, true, false, false, false),"[markdown]"); mappedKeys.put(new KeyStroker(155, true, false, false, false),"[dupfield]"); mappedKeys.put(new KeyStroker(17, true, true, false, false),"[newline]"); mappedKeys.put(new KeyStroker(34, false, false, true, false),"[jumpnext]"); mappedKeys.put(new KeyStroker(33, false, false, true, false),"[jumpprev]"); saveKeyMap(); } else { setKeyMap(keys); } }
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/afff7d5ba1bc03e5e4709099fbacc81757f734a1/KeyMapper.java/buggy/tn5250j/src/org/tn5250j/keyboard/KeyMapper.java
mappedKeys.put(new KeyStroker(155, true, false, false, false),"[dupfield]"); mappedKeys.put(new KeyStroker(17, true, true, false, false),"[newline]"); mappedKeys.put(new KeyStroker(34, false, false, true, false),"[jumpnext]"); mappedKeys.put(new KeyStroker(33, false, false, true, false),"[jumpprev]");
mappedKeys.put(newKeyStroker(155, true, false, false, false,KeyStroker.KEY_LOCATION_STANDARD),"[dupfield]"); mappedKeys.put(newKeyStroker(17, true, true, false, false,KeyStroker.KEY_LOCATION_STANDARD),"[newline]"); mappedKeys.put(newKeyStroker(34, false, false, true, false,KeyStroker.KEY_LOCATION_STANDARD),"[jumpnext]"); mappedKeys.put(newKeyStroker(33, false, false, true, false,KeyStroker.KEY_LOCATION_STANDARD),"[jumpprev]");
public static void init() {// if (mappedKeys != null)// return;//// init("keymap");//// }//// public static void init(String map) { if (mappedKeys != null) return;// keyMapName = map; mappedKeys = new HashMap(60); workStroke = new KeyStroker(0, false, false, false,false);// Properties keys = new Properties(); Properties keys = ConfigureFactory.getInstance().getProperties( GlobalConfigure.KEYMAP); if (!loadKeyStrokes(keys)) { // keycode shift control alternate // Key <-> Keycode , isShiftDown , isControlDown , isAlternateDown // my personal preference mappedKeys.put(new KeyStroker(10, false, false, false, false),"[fldext]"); mappedKeys.put(new KeyStroker(17, false, true, false, false),"[enter]");// mappedKeys.put(new KeyStroker(10, false, false, false),"[enter]");// mappedKeys.put(new KeyStroker(10, true, false, false),"[fldext]"); mappedKeys.put(new KeyStroker(8, false, false, false, false),"[backspace]"); mappedKeys.put(new KeyStroker(9, false, false, false, false),"[tab]"); mappedKeys.put(new KeyStroker(9, true, false, false, false),"[backtab]"); mappedKeys.put(new KeyStroker(127, false, false, false, false),"[delete]"); mappedKeys.put(new KeyStroker(155, false, false, false, false),"[insert]"); mappedKeys.put(new KeyStroker(19, false, false, false, false),"[clear]"); mappedKeys.put(new KeyStroker(27, false, false, false, false),"[reset]"); mappedKeys.put(new KeyStroker(27, true, false, false, false),"[sysreq]"); mappedKeys.put(new KeyStroker(35, false, false, false, false),"[eof]"); mappedKeys.put(new KeyStroker(36, false, false, false, false),"[home]"); mappedKeys.put(new KeyStroker(39, false, false, false, false),"[right]"); mappedKeys.put(new KeyStroker(39, false, false, true, false),"[nextword]"); mappedKeys.put(new KeyStroker(37, false, false, false, false),"[left]"); mappedKeys.put(new KeyStroker(37, false, false, true, false),"[prevword]"); mappedKeys.put(new KeyStroker(38, false, false, false, false),"[up]"); mappedKeys.put(new KeyStroker(40, false, false, false, false),"[down]"); mappedKeys.put(new KeyStroker(34, false, false, false, false),"[pgdown]"); mappedKeys.put(new KeyStroker(33, false, false, false, false),"[pgup]"); mappedKeys.put(new KeyStroker(96, false, false, false, false),"[keypad0]"); mappedKeys.put(new KeyStroker(97, false, false, false, false),"[keypad1]"); mappedKeys.put(new KeyStroker(98, false, false, false, false),"[keypad2]"); mappedKeys.put(new KeyStroker(99, false, false, false, false),"[keypad3]"); mappedKeys.put(new KeyStroker(100, false, false, false, false),"[keypad4]"); mappedKeys.put(new KeyStroker(101, false, false, false, false),"[keypad5]"); mappedKeys.put(new KeyStroker(102, false, false, false, false),"[keypad6]"); mappedKeys.put(new KeyStroker(103, false, false, false, false),"[keypad7]"); mappedKeys.put(new KeyStroker(104, false, false, false, false),"[keypad8]"); mappedKeys.put(new KeyStroker(105, false, false, false, false),"[keypad9]"); mappedKeys.put(new KeyStroker(109, false, false, false, false),"[field-]"); mappedKeys.put(new KeyStroker(107, false, false, false, false),"[field+]"); mappedKeys.put(new KeyStroker(112, false, false, false, false),"[pf1]"); mappedKeys.put(new KeyStroker(113, false, false, false, false),"[pf2]"); mappedKeys.put(new KeyStroker(114, false, false, false, false),"[pf3]"); mappedKeys.put(new KeyStroker(115, false, false, false, false),"[pf4]"); mappedKeys.put(new KeyStroker(116, false, false, false, false),"[pf5]"); mappedKeys.put(new KeyStroker(117, false, false, false, false),"[pf6]"); mappedKeys.put(new KeyStroker(118, false, false, false, false),"[pf7]"); mappedKeys.put(new KeyStroker(119, false, false, false, false),"[pf8]"); mappedKeys.put(new KeyStroker(120, false, false, false, false),"[pf9]"); mappedKeys.put(new KeyStroker(121, false, false, false, false),"[pf10]"); mappedKeys.put(new KeyStroker(122, false, false, false, false),"[pf11]"); mappedKeys.put(new KeyStroker(123, false, false, false, false),"[pf12]"); mappedKeys.put(new KeyStroker(112, true, false, false, false),"[pf13]"); mappedKeys.put(new KeyStroker(113, true, false, false, false),"[pf14]"); mappedKeys.put(new KeyStroker(114, true, false, false, false),"[pf15]"); mappedKeys.put(new KeyStroker(115, true, false, false, false),"[pf16]"); mappedKeys.put(new KeyStroker(116, true, false, false, false),"[pf17]"); mappedKeys.put(new KeyStroker(117, true, false, false, false),"[pf18]"); mappedKeys.put(new KeyStroker(118, true, false, false, false),"[pf19]"); mappedKeys.put(new KeyStroker(119, true, false, false, false),"[pf20]"); mappedKeys.put(new KeyStroker(120, true, false, false, false),"[pf21]"); mappedKeys.put(new KeyStroker(121, true, false, false, false),"[pf22]"); mappedKeys.put(new KeyStroker(122, true, false, false, false),"[pf23]"); mappedKeys.put(new KeyStroker(123, true, false, false, false),"[pf24]"); mappedKeys.put(new KeyStroker(112, false, false, true, false),"[help]"); mappedKeys.put(new KeyStroker(72, false, false, true, false),"[hostprint]"); mappedKeys.put(new KeyStroker(67, false, false, true, false),"[copy]"); mappedKeys.put(new KeyStroker(86, false, false, true, false),"[paste]"); mappedKeys.put(new KeyStroker(39, true, false, false, false),"[markright]"); mappedKeys.put(new KeyStroker(37, true, false, false, false),"[markleft]"); mappedKeys.put(new KeyStroker(38, true, false, false, false),"[markup]"); mappedKeys.put(new KeyStroker(40, true, false, false, false),"[markdown]"); mappedKeys.put(new KeyStroker(155, true, false, false, false),"[dupfield]"); mappedKeys.put(new KeyStroker(17, true, true, false, false),"[newline]"); mappedKeys.put(new KeyStroker(34, false, false, true, false),"[jumpnext]"); mappedKeys.put(new KeyStroker(33, false, false, true, false),"[jumpprev]"); saveKeyMap(); } else { setKeyMap(keys); } }
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/afff7d5ba1bc03e5e4709099fbacc81757f734a1/KeyMapper.java/buggy/tn5250j/src/org/tn5250j/keyboard/KeyMapper.java
public final static void setKeyStroke(String which, KeyEvent ke, boolean isAltGr) {
public final static void setKeyStroke(String which, KeyEvent ke) {
public final static void setKeyStroke(String which, KeyEvent ke, boolean isAltGr) { if (ke == null) return; Collection v = mappedKeys.values(); Set o = mappedKeys.keySet(); Iterator k = o.iterator(); Iterator i = v.iterator(); while (k.hasNext()) { KeyStroker ks = (KeyStroker)k.next(); String keyVal = (String)i.next(); if (keyVal.equals(which)) { mappedKeys.remove(ks); mappedKeys.put(new KeyStroker(ke.getKeyCode(), ke.isShiftDown(), ke.isControlDown(), ke.isAltDown(), isAltGr),keyVal); return; } } // if we got here it was a dead key and we need to add it. mappedKeys.put(new KeyStroker(ke.getKeyCode(), ke.isShiftDown(), ke.isControlDown(), ke.isAltDown(), isAltGr),which); }
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/afff7d5ba1bc03e5e4709099fbacc81757f734a1/KeyMapper.java/buggy/tn5250j/src/org/tn5250j/keyboard/KeyMapper.java
mappedKeys.put(new KeyStroker(ke.getKeyCode(), ke.isShiftDown(), ke.isControlDown(), ke.isAltDown(), isAltGr),keyVal);
mappedKeys.put(newKeyStroker(ke),keyVal);
public final static void setKeyStroke(String which, KeyEvent ke, boolean isAltGr) { if (ke == null) return; Collection v = mappedKeys.values(); Set o = mappedKeys.keySet(); Iterator k = o.iterator(); Iterator i = v.iterator(); while (k.hasNext()) { KeyStroker ks = (KeyStroker)k.next(); String keyVal = (String)i.next(); if (keyVal.equals(which)) { mappedKeys.remove(ks); mappedKeys.put(new KeyStroker(ke.getKeyCode(), ke.isShiftDown(), ke.isControlDown(), ke.isAltDown(), isAltGr),keyVal); return; } } // if we got here it was a dead key and we need to add it. mappedKeys.put(new KeyStroker(ke.getKeyCode(), ke.isShiftDown(), ke.isControlDown(), ke.isAltDown(), isAltGr),which); }
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/afff7d5ba1bc03e5e4709099fbacc81757f734a1/KeyMapper.java/buggy/tn5250j/src/org/tn5250j/keyboard/KeyMapper.java
mappedKeys.put(new KeyStroker(ke.getKeyCode(), ke.isShiftDown(), ke.isControlDown(), ke.isAltDown(), isAltGr),which);
mappedKeys.put(newKeyStroker(ke),which);
public final static void setKeyStroke(String which, KeyEvent ke, boolean isAltGr) { if (ke == null) return; Collection v = mappedKeys.values(); Set o = mappedKeys.keySet(); Iterator k = o.iterator(); Iterator i = v.iterator(); while (k.hasNext()) { KeyStroker ks = (KeyStroker)k.next(); String keyVal = (String)i.next(); if (keyVal.equals(which)) { mappedKeys.remove(ks); mappedKeys.put(new KeyStroker(ke.getKeyCode(), ke.isShiftDown(), ke.isControlDown(), ke.isAltDown(), isAltGr),keyVal); return; } } // if we got here it was a dead key and we need to add it. mappedKeys.put(new KeyStroker(ke.getKeyCode(), ke.isShiftDown(), ke.isControlDown(), ke.isAltDown(), isAltGr),which); }
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/afff7d5ba1bc03e5e4709099fbacc81757f734a1/KeyMapper.java/buggy/tn5250j/src/org/tn5250j/keyboard/KeyMapper.java
static public double distance(double x1, double y1, double x2, double y2)
public static double distance(double x1, double y1, double x2, double y2)
static public double distance(double x1, double y1, double x2, double y2) { return Math.sqrt(distanceSq(x1, y1, x2, y2)); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/560cf787ab92cba97cf57ce7b258e72947e5efbc/Point2D.java/buggy/core/src/classpath/java/java/awt/geom/Point2D.java
public boolean equals(Object obj)
public final boolean equals(Object obj)
public boolean equals(Object obj) { if (obj instanceof QName) { QName qname = (QName) obj; return qname.getLocalPart().equals(localPart) && qname.getNamespaceURI().equals(namespaceURI); } return false; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/QName.java/clean/core/src/classpath/javax/javax/xml/namespace/QName.java
{ StringBuffer buf = new StringBuffer(); buf.append('{'); buf.append(namespaceURI); buf.append('}'); buf.append(localPart); hashCode = buf.toString().hashCode(); }
hashCode = localPart.hashCode() ^ namespaceURI.hashCode();
public final int hashCode() { if (hashCode == -1) { StringBuffer buf = new StringBuffer(); buf.append('{'); buf.append(namespaceURI); buf.append('}'); buf.append(localPart); hashCode = buf.toString().hashCode(); } return hashCode; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/QName.java/clean/core/src/classpath/javax/javax/xml/namespace/QName.java
public String toString()
public synchronized String toString()
public String toString() { return qName; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/QName.java/clean/core/src/classpath/javax/javax/xml/namespace/QName.java
if (qName == null) { StringBuffer buf = new StringBuffer(); if (namespaceURI.length() > 0) { buf.append('{'); buf.append(namespaceURI); buf.append('}'); } if (prefix.length() > 0) { buf.append(prefix); buf.append(':'); } buf.append(localPart); qName = buf.toString(); }
public String toString() { return qName; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/QName.java/clean/core/src/classpath/javax/javax/xml/namespace/QName.java
session.doConnections();
session.startNewSession();
public void actionPerformed(ActionEvent e) { session.doConnections(); }
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/0686de448db01a9cc1b09cae982858a4d418dae8/SessionPopup.java/buggy/tn5250j/src/org/tn5250j/SessionPopup.java
keyPad.repaint();
protected void paintComponent(Graphics g) { //log.info("paint from screen"); if (bi == null) { checkOffScreenImage(); }// screen.paintComponent3(g); Graphics2D g2 = (Graphics2D) g; // Rectangle r = g.getClipBounds(); g2.setColor(bi.colorBg); g2.fillRect(0, 0, getWidth(), getHeight()); bi.drawImageBuffer(g2); if (rubberband.isAreaSelected() && !rubberband.isDragging()) { rubberband.erase(); rubberband.draw(); } keyPad.repaint(); }
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/5b28d3c709dc846b2c3cb5be97d733241cc80b3a/Gui5250.java/buggy/tn5250j/src/org/tn5250j/Gui5250.java
throw new BAD_OPERATION("NameValuePair expected");
BAD_OPERATION bad = new BAD_OPERATION("NameValuePair expected"); bad.minor = Minor.Any; throw bad;
public static NameValuePair extract(Any a) { try { return ((NameValuePairHolder) a.extract_Streamable()).value; } catch (ClassCastException ex) { throw new BAD_OPERATION("NameValuePair expected"); } }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/44e3ea509d80974dab547c4d1cf8c070d32bac86/NameValuePairHelper.java/buggy/core/src/classpath/org/org/omg/CORBA/NameValuePairHelper.java
try { Thread.sleep(20000); } catch (InterruptedException ex1) { }
protected PointerInterpreter createInterpreter() { try { initPointer(); // bring mouse into stable state } catch (DeviceException ex) { log.error("Cannot initialize pointer", ex); return null; } PointerInterpreter i = new MouseInterpreter(); if (i.probe(this)) { log.info("Found " + i.getName()); return i; } else { // here goes the tablet stuff return null; } }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/b0256958683f8a0221aee7dd41454c146be106f0/AbstractPointerDriver.java/clean/core/src/driver/org/jnode/driver/input/AbstractPointerDriver.java
log.info("Starting " + dev.getId());
log.debug("Starting " + dev.getId());
protected synchronized void startDevice() throws DriverException { final Device dev = getDevice(); log.info("Starting " + dev.getId()); this.channel = getChannel(); this.interpreter = createInterpreter(); try { setRate(80); } catch (DeviceException ex) { log.error("Cannot set default rate", ex); } // start the deamon anyway, so we can register a mouse later daemon = new PointerDaemon(dev.getId() + "-daemon"); daemon.start(); dev.registerAPI(PointerAPI.class, this); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/b0256958683f8a0221aee7dd41454c146be106f0/AbstractPointerDriver.java/clean/core/src/driver/org/jnode/driver/input/AbstractPointerDriver.java
public String[] parse(String[] inArgs)
public synchronized void parse(String[] inArgs, FileArgumentCallback files)
public String[] parse(String[] inArgs) { final ArrayList fileResult = new ArrayList(); parse(inArgs, new FileArgumentCallback() { public void notifyFile(String fileArgument) { fileResult.add(fileArgument); } }); return (String[]) fileResult.toArray(new String[0]); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/bd3c4af88fcde25afb91781dd0bd56ebcfa8a15b/Parser.java/buggy/core/src/classpath/tools/gnu/classpath/tools/getopt/Parser.java
final ArrayList fileResult = new ArrayList(); parse(inArgs, new FileArgumentCallback() { public void notifyFile(String fileArgument)
try
public String[] parse(String[] inArgs) { final ArrayList fileResult = new ArrayList(); parse(inArgs, new FileArgumentCallback() { public void notifyFile(String fileArgument) { fileResult.add(fileArgument); } }); return (String[]) fileResult.toArray(new String[0]); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/bd3c4af88fcde25afb91781dd0bd56ebcfa8a15b/Parser.java/buggy/core/src/classpath/tools/gnu/classpath/tools/getopt/Parser.java
fileResult.add(fileArgument);
args = inArgs; for (currentIndex = 0; currentIndex < args.length; ++currentIndex) { if (args[currentIndex].length() == 0 || args[currentIndex].charAt(0) != '-' || "-".equals(args[currentIndex])) { files.notifyFile(args[currentIndex]); continue; } if ("--".equals(args[currentIndex])) break; if (args[currentIndex].charAt(1) == '-') handleLongOption(args[currentIndex], 2); else if (longOnly) handleLongOption(args[currentIndex], 1); else handleShortOptions(args[currentIndex]); } for (++currentIndex; currentIndex < args.length; ++currentIndex) files.notifyFile(args[currentIndex]); validate();
public String[] parse(String[] inArgs) { final ArrayList fileResult = new ArrayList(); parse(inArgs, new FileArgumentCallback() { public void notifyFile(String fileArgument) { fileResult.add(fileArgument); } }); return (String[]) fileResult.toArray(new String[0]); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/bd3c4af88fcde25afb91781dd0bd56ebcfa8a15b/Parser.java/buggy/core/src/classpath/tools/gnu/classpath/tools/getopt/Parser.java
}); return (String[]) fileResult.toArray(new String[0]);
catch (OptionException err) { System.err.println(programName + ": " + err.getMessage()); String fmt; if (longOnly) fmt = Messages.getString("Parser.TryHelpShort"); else fmt = Messages.getString("Parser.TryHelpLong"); String msg = MessageFormat.format(fmt, new Object[] { programName }); System.err.println(programName + ": " + msg); System.exit(1); }
public String[] parse(String[] inArgs) { final ArrayList fileResult = new ArrayList(); parse(inArgs, new FileArgumentCallback() { public void notifyFile(String fileArgument) { fileResult.add(fileArgument); } }); return (String[]) fileResult.toArray(new String[0]); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/bd3c4af88fcde25afb91781dd0bd56ebcfa8a15b/Parser.java/buggy/core/src/classpath/tools/gnu/classpath/tools/getopt/Parser.java
else { if (isRootPaneCheckingEnabled()) throw new Error("rootPaneChecking is enabled - adding components " + "disallowed."); getContentPane().add(comp,constraints,index); }
protected void addImpl(Component comp, Object constraints, int index) { super.addImpl(comp, constraints, index); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/159638d634951eb718c5e3a0917ef516d5a44797/JFrame.java/clean/core/src/classpath/javax/javax/swing/JFrame.java
initStageDone = true;
protected void frameInit() { super.setLayout(new BorderLayout(1, 1)); enableEvents(AWTEvent.WINDOW_EVENT_MASK); getRootPane(); // will do set/create }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/159638d634951eb718c5e3a0917ef516d5a44797/JFrame.java/clean/core/src/classpath/javax/javax/swing/JFrame.java
if (comp==rootPane) super.remove(rootPane); else
public void remove(Component comp) { getContentPane().remove(comp); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/159638d634951eb718c5e3a0917ef516d5a44797/JFrame.java/clean/core/src/classpath/javax/javax/swing/JFrame.java
throw new IllegalArgumentException("operation = " + operation);
throw new IllegalArgumentException("defaultCloseOperation must be EXIT_ON_CLOSE, HIDE_ON_CLOSE, DISPOSE_ON_CLOSE, or DO_NOTHING_ON_CLOSE");
public void setDefaultCloseOperation(int operation) { SecurityManager sm = System.getSecurityManager(); if (sm != null && operation == EXIT_ON_CLOSE) sm.checkExit(0); if (operation != EXIT_ON_CLOSE && operation != DISPOSE_ON_CLOSE && operation != HIDE_ON_CLOSE && operation != DO_NOTHING_ON_CLOSE) throw new IllegalArgumentException("operation = " + operation); close_action = operation; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/159638d634951eb718c5e3a0917ef516d5a44797/JFrame.java/clean/core/src/classpath/javax/javax/swing/JFrame.java
if (initStageDone) { if (isRootPaneCheckingEnabled()) throw new Error("Cannot set layout. Use getContentPane().setLayout()" + " instead."); getContentPane().setLayout(manager); } else
public void setLayout(LayoutManager manager) { super.setLayout(manager); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/159638d634951eb718c5e3a0917ef516d5a44797/JFrame.java/clean/core/src/classpath/javax/javax/swing/JFrame.java
if (d < 0) throw new IllegalArgumentException("Invalid delay: " + d);
public void setDelay(int d) { delay = d; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ff4d557efcee4a2c3a25a9cac2252bc626fb10fe/Timer.java/clean/core/src/classpath/javax/javax/swing/Timer.java
if (i < 0) throw new IllegalArgumentException("Invalid initial delay: " + i);
public void setInitialDelay(int i) { initialDelay = i; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ff4d557efcee4a2c3a25a9cac2252bc626fb10fe/Timer.java/clean/core/src/classpath/javax/javax/swing/Timer.java
if (t != null) { try { int pos = t.getCaret().getDot(); if (pos < t.getDocument().getEndPosition().getOffset()) { t.getDocument().remove(t.getCaret().getDot(), 1); } } catch (BadLocationException e) { } }
try { Point p = t.modelToView(t.getCaret().getDot()).getLocation(); int cur = t.getCaretPosition(); int y = p.y; while (y == p.y && cur > 0) y = t.modelToView(--cur).getLocation().y; if (cur != 0) cur++; t.setCaretPosition(cur); } catch (BadLocationException ble) { }
public void actionPerformed(ActionEvent event) { JTextComponent t = getTextComponent(event); if (t != null) { try { int pos = t.getCaret().getDot(); if (pos < t.getDocument().getEndPosition().getOffset()) { t.getDocument().remove(t.getCaret().getDot(), 1); } } catch (BadLocationException e) { // FIXME: we're not authorized to throw this.. swallow it? } } }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/a78ab2f492456918e4f5c52be600854882e139fc/DefaultEditorKit.java/buggy/core/src/classpath/javax/javax/swing/text/DefaultEditorKit.java
if (t != null) { try { int pos = t.getCaret().getDot(); if (pos > t.getDocument().getStartPosition().getOffset()) { t.getDocument().remove(pos - 1, 1); t.getCaret().setDot(pos - 1); } } catch (BadLocationException e) { } }
try { Point p = t.modelToView(t.getCaret().getDot()).getLocation(); int cur = t.getCaretPosition(); int y = p.y; int length = t.getDocument().getLength(); while (y == p.y && cur < length) y = t.modelToView(++cur).getLocation().y; if (cur != length) cur--; t.setCaretPosition(cur); } catch (BadLocationException ble) { }
public void actionPerformed(ActionEvent event) { JTextComponent t = getTextComponent(event); if (t != null) { try { int pos = t.getCaret().getDot(); if (pos > t.getDocument().getStartPosition().getOffset()) { t.getDocument().remove(pos - 1, 1); t.getCaret().setDot(pos - 1); } } catch (BadLocationException e) { // FIXME: we're not authorized to throw this.. swallow it? } } }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/a78ab2f492456918e4f5c52be600854882e139fc/DefaultEditorKit.java/buggy/core/src/classpath/javax/javax/swing/text/DefaultEditorKit.java
t.getCaret().setDot(Math.max(t.getCaret().getDot() - 1, t.getDocument().getStartPosition().getOffset()));
try { int pos = t.getCaret().getDot(); if (pos < t.getDocument().getEndPosition().getOffset()) { t.getDocument().remove(t.getCaret().getDot(), 1); } } catch (BadLocationException e) { }
public void actionPerformed(ActionEvent event) { JTextComponent t = getTextComponent(event); if (t != null) { t.getCaret().setDot(Math.max(t.getCaret().getDot() - 1, t.getDocument().getStartPosition().getOffset())); } }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/a78ab2f492456918e4f5c52be600854882e139fc/DefaultEditorKit.java/buggy/core/src/classpath/javax/javax/swing/text/DefaultEditorKit.java
t.getCaret().setDot(Math.min(t.getCaret().getDot() + 1, t.getDocument().getEndPosition().getOffset()));
try { int pos = t.getCaret().getDot(); if (pos > t.getDocument().getStartPosition().getOffset()) { t.getDocument().remove(pos - 1, 1); t.getCaret().setDot(pos - 1); } } catch (BadLocationException e) { }
public void actionPerformed(ActionEvent event) { JTextComponent t = getTextComponent(event); if (t != null) { t.getCaret().setDot(Math.min(t.getCaret().getDot() + 1, t.getDocument().getEndPosition().getOffset())); } }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/a78ab2f492456918e4f5c52be600854882e139fc/DefaultEditorKit.java/buggy/core/src/classpath/javax/javax/swing/text/DefaultEditorKit.java
JTextComponent t = getTextComponent(event); if (t != null) { t.getCaret().moveDot(Math.max(t.getCaret().getDot() - 1, t.getDocument().getStartPosition().getOffset())); }
JTextComponent t = getTextComponent(event); if (t != null) { t.getCaret().setDot(Math.max(t.getCaret().getDot() - 1, t.getDocument().getStartPosition().getOffset())); }
public void actionPerformed(ActionEvent event) { JTextComponent t = getTextComponent(event); if (t != null) { t.getCaret().moveDot(Math.max(t.getCaret().getDot() - 1, t.getDocument().getStartPosition().getOffset())); } }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/a78ab2f492456918e4f5c52be600854882e139fc/DefaultEditorKit.java/buggy/core/src/classpath/javax/javax/swing/text/DefaultEditorKit.java