rem
stringlengths
0
477k
add
stringlengths
0
313k
context
stringlengths
6
599k
meta
stringlengths
141
403
mapper.setKeyStroke(stroke,ke);
KeyMapper.setKeyStroke(stroke,ke);
private void setNewKeyStrokes(KeyEvent ke) { if (!macros && !special) { int index = ((KeyDescription)functions.getSelectedValue()).getIndex(); String stroke = mnemonicData[index]; if (altKey) stroke += KeyStroker.altSuffix; if (isLinux) { mapper.setKeyStroke(stroke,ke,isAltGr); } else { mapper.setKeyStroke(stroke,ke); } setKeyInformation(stroke); } else { if (macros) { Object o = functions.getSelectedValue(); String macro; if (o instanceof Macro) macro = ((Macro)o).getFullName(); else macro = (String)o; if (altKey) macro += KeyStroker.altSuffix; System.out.println(macro); if (isLinux) mapper.setKeyStroke(macro,ke,isAltGr); else mapper.setKeyStroke(macro,ke); setKeyInformation(macro); } if (special) { System.out.println((String)functions.getSelectedValue()); String k = parseSpecialCharacter((String)functions.getSelectedValue()); if (altKey) k += KeyStroker.altSuffix; mapper.removeKeyStroke(k); if (isLinux) { mapper.setKeyStroke(k,ke,isAltGr); } else { mapper.setKeyStroke(k,ke); } setKeyInformation(k); } } mods = true; }
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/b9aad5c107975ab6a513aa12db5674a7af4ffbb3/KeyConfigure.java/buggy/tn5250j/src/org/tn5250j/keyboard/configure/KeyConfigure.java
mapper.setKeyStroke(macro,ke,isAltGr);
KeyMapper.setKeyStroke(macro,ke,isAltGr);
private void setNewKeyStrokes(KeyEvent ke) { if (!macros && !special) { int index = ((KeyDescription)functions.getSelectedValue()).getIndex(); String stroke = mnemonicData[index]; if (altKey) stroke += KeyStroker.altSuffix; if (isLinux) { mapper.setKeyStroke(stroke,ke,isAltGr); } else { mapper.setKeyStroke(stroke,ke); } setKeyInformation(stroke); } else { if (macros) { Object o = functions.getSelectedValue(); String macro; if (o instanceof Macro) macro = ((Macro)o).getFullName(); else macro = (String)o; if (altKey) macro += KeyStroker.altSuffix; System.out.println(macro); if (isLinux) mapper.setKeyStroke(macro,ke,isAltGr); else mapper.setKeyStroke(macro,ke); setKeyInformation(macro); } if (special) { System.out.println((String)functions.getSelectedValue()); String k = parseSpecialCharacter((String)functions.getSelectedValue()); if (altKey) k += KeyStroker.altSuffix; mapper.removeKeyStroke(k); if (isLinux) { mapper.setKeyStroke(k,ke,isAltGr); } else { mapper.setKeyStroke(k,ke); } setKeyInformation(k); } } mods = true; }
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/b9aad5c107975ab6a513aa12db5674a7af4ffbb3/KeyConfigure.java/buggy/tn5250j/src/org/tn5250j/keyboard/configure/KeyConfigure.java
mapper.setKeyStroke(macro,ke);
KeyMapper.setKeyStroke(macro,ke);
private void setNewKeyStrokes(KeyEvent ke) { if (!macros && !special) { int index = ((KeyDescription)functions.getSelectedValue()).getIndex(); String stroke = mnemonicData[index]; if (altKey) stroke += KeyStroker.altSuffix; if (isLinux) { mapper.setKeyStroke(stroke,ke,isAltGr); } else { mapper.setKeyStroke(stroke,ke); } setKeyInformation(stroke); } else { if (macros) { Object o = functions.getSelectedValue(); String macro; if (o instanceof Macro) macro = ((Macro)o).getFullName(); else macro = (String)o; if (altKey) macro += KeyStroker.altSuffix; System.out.println(macro); if (isLinux) mapper.setKeyStroke(macro,ke,isAltGr); else mapper.setKeyStroke(macro,ke); setKeyInformation(macro); } if (special) { System.out.println((String)functions.getSelectedValue()); String k = parseSpecialCharacter((String)functions.getSelectedValue()); if (altKey) k += KeyStroker.altSuffix; mapper.removeKeyStroke(k); if (isLinux) { mapper.setKeyStroke(k,ke,isAltGr); } else { mapper.setKeyStroke(k,ke); } setKeyInformation(k); } } mods = true; }
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/b9aad5c107975ab6a513aa12db5674a7af4ffbb3/KeyConfigure.java/buggy/tn5250j/src/org/tn5250j/keyboard/configure/KeyConfigure.java
mapper.removeKeyStroke(k);
KeyMapper.removeKeyStroke(k);
private void setNewKeyStrokes(KeyEvent ke) { if (!macros && !special) { int index = ((KeyDescription)functions.getSelectedValue()).getIndex(); String stroke = mnemonicData[index]; if (altKey) stroke += KeyStroker.altSuffix; if (isLinux) { mapper.setKeyStroke(stroke,ke,isAltGr); } else { mapper.setKeyStroke(stroke,ke); } setKeyInformation(stroke); } else { if (macros) { Object o = functions.getSelectedValue(); String macro; if (o instanceof Macro) macro = ((Macro)o).getFullName(); else macro = (String)o; if (altKey) macro += KeyStroker.altSuffix; System.out.println(macro); if (isLinux) mapper.setKeyStroke(macro,ke,isAltGr); else mapper.setKeyStroke(macro,ke); setKeyInformation(macro); } if (special) { System.out.println((String)functions.getSelectedValue()); String k = parseSpecialCharacter((String)functions.getSelectedValue()); if (altKey) k += KeyStroker.altSuffix; mapper.removeKeyStroke(k); if (isLinux) { mapper.setKeyStroke(k,ke,isAltGr); } else { mapper.setKeyStroke(k,ke); } setKeyInformation(k); } } mods = true; }
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/b9aad5c107975ab6a513aa12db5674a7af4ffbb3/KeyConfigure.java/buggy/tn5250j/src/org/tn5250j/keyboard/configure/KeyConfigure.java
mapper.setKeyStroke(k,ke,isAltGr);
KeyMapper.setKeyStroke(k,ke,isAltGr);
private void setNewKeyStrokes(KeyEvent ke) { if (!macros && !special) { int index = ((KeyDescription)functions.getSelectedValue()).getIndex(); String stroke = mnemonicData[index]; if (altKey) stroke += KeyStroker.altSuffix; if (isLinux) { mapper.setKeyStroke(stroke,ke,isAltGr); } else { mapper.setKeyStroke(stroke,ke); } setKeyInformation(stroke); } else { if (macros) { Object o = functions.getSelectedValue(); String macro; if (o instanceof Macro) macro = ((Macro)o).getFullName(); else macro = (String)o; if (altKey) macro += KeyStroker.altSuffix; System.out.println(macro); if (isLinux) mapper.setKeyStroke(macro,ke,isAltGr); else mapper.setKeyStroke(macro,ke); setKeyInformation(macro); } if (special) { System.out.println((String)functions.getSelectedValue()); String k = parseSpecialCharacter((String)functions.getSelectedValue()); if (altKey) k += KeyStroker.altSuffix; mapper.removeKeyStroke(k); if (isLinux) { mapper.setKeyStroke(k,ke,isAltGr); } else { mapper.setKeyStroke(k,ke); } setKeyInformation(k); } } mods = true; }
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/b9aad5c107975ab6a513aa12db5674a7af4ffbb3/KeyConfigure.java/buggy/tn5250j/src/org/tn5250j/keyboard/configure/KeyConfigure.java
mapper.setKeyStroke(k,ke);
KeyMapper.setKeyStroke(k,ke);
private void setNewKeyStrokes(KeyEvent ke) { if (!macros && !special) { int index = ((KeyDescription)functions.getSelectedValue()).getIndex(); String stroke = mnemonicData[index]; if (altKey) stroke += KeyStroker.altSuffix; if (isLinux) { mapper.setKeyStroke(stroke,ke,isAltGr); } else { mapper.setKeyStroke(stroke,ke); } setKeyInformation(stroke); } else { if (macros) { Object o = functions.getSelectedValue(); String macro; if (o instanceof Macro) macro = ((Macro)o).getFullName(); else macro = (String)o; if (altKey) macro += KeyStroker.altSuffix; System.out.println(macro); if (isLinux) mapper.setKeyStroke(macro,ke,isAltGr); else mapper.setKeyStroke(macro,ke); setKeyInformation(macro); } if (special) { System.out.println((String)functions.getSelectedValue()); String k = parseSpecialCharacter((String)functions.getSelectedValue()); if (altKey) k += KeyStroker.altSuffix; mapper.removeKeyStroke(k); if (isLinux) { mapper.setKeyStroke(k,ke,isAltGr); } else { mapper.setKeyStroke(k,ke); } setKeyInformation(k); } } mods = true; }
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/b9aad5c107975ab6a513aa12db5674a7af4ffbb3/KeyConfigure.java/buggy/tn5250j/src/org/tn5250j/keyboard/configure/KeyConfigure.java
action = new AbstractAction(LangTool.getString("popup.systemRequest")) { public void actionPerformed(ActionEvent e) { vt.systemRequest(); } }; popup.add(action); action = new AbstractAction(LangTool.getString("popup.help")) { public void actionPerformed(ActionEvent e) { vt.sendHelpRequest(); } }; popup.add(action);
JMenu kbMenu = new JMenu(LangTool.getString("popup.keyboard")); popup.add(kbMenu); action = new AbstractAction(LangTool.getString("popup.mapKeys")) { public void actionPerformed(ActionEvent e) { mapMeKeys(); } }; kbMenu.add(action); kbMenu.addSeparator(); action = new AbstractAction(LangTool.getString("key.[attn]")) { public void actionPerformed(ActionEvent e) { screen.sendKeys("[attn]"); } }; kbMenu.add(action); action = new AbstractAction(LangTool.getString("key.[reset]")) { public void actionPerformed(ActionEvent e) { screen.sendKeys("[reset]"); } }; kbMenu.add(action); action = new AbstractAction(LangTool.getString("key.[sysreq]")) { public void actionPerformed(ActionEvent e) { screen.sendKeys("[sysreq]"); } }; kbMenu.add(action); if (screen.isMessageWait()) { action = new AbstractAction(LangTool.getString("popup.displayMessages")) { public void actionPerformed(ActionEvent e) { vt.systemRequest('4'); } }; kbMenu.add(action); } kbMenu.addSeparator(); action = new AbstractAction(LangTool.getString("key.[dupfield]")) { public void actionPerformed(ActionEvent e) { screen.sendKeys("[dupfield]"); } }; kbMenu.add(action); action = new AbstractAction(LangTool.getString("key.[help]")) { public void actionPerformed(ActionEvent e) { screen.sendKeys("[help]"); } }; kbMenu.add(action); action = new AbstractAction(LangTool.getString("key.[eraseeof]")) { public void actionPerformed(ActionEvent e) { screen.sendKeys("[eraseeof]"); } }; kbMenu.add(action); action = new AbstractAction(LangTool.getString("key.[field+]")) { public void actionPerformed(ActionEvent e) { screen.sendKeys("[field+]"); } }; kbMenu.add(action); action = new AbstractAction(LangTool.getString("key.[field-]")) { public void actionPerformed(ActionEvent e) { screen.sendKeys("[field-]"); } }; kbMenu.add(action); action = new AbstractAction(LangTool.getString("key.[newline]")) { public void actionPerformed(ActionEvent e) { screen.sendKeys("[newline]"); } }; kbMenu.add(action);
private void doPopup (MouseEvent me) { JMenuItem menuItem; Action action; popup = new JPopupMenu(); final Gui5250 g = this; final int pos = screen.getRowColFromPoint(me.getX(),me.getY()) - (screen.getCols()-1); if (!rubberband.isAreaSelected() && screen.isInField(pos,false) ) { action = new AbstractAction(LangTool.getString("popup.copy")) { public void actionPerformed(ActionEvent e) { screen.copyField(pos); getFocusForMe(); } }; popup.add(action); action = new AbstractAction(LangTool.getString("popup.paste")) { public void actionPerformed(ActionEvent e) { screen.pasteMe(false); getFocusForMe(); } }; popup.add(action); action = new AbstractAction(LangTool.getString("popup.pasteSpecial")) { public void actionPerformed(ActionEvent e) { screen.pasteMe(true); getFocusForMe(); } }; popup.add(action); } else { action = new AbstractAction(LangTool.getString("popup.copy")) { public void actionPerformed(ActionEvent e) { screen.copyMe(); getFocusForMe(); } }; popup.add(action); action = new AbstractAction(LangTool.getString("popup.paste")) { public void actionPerformed(ActionEvent e) { screen.pasteMe(false); getFocusForMe(); } }; popup.add(action); action = new AbstractAction(LangTool.getString("popup.pasteSpecial")) { public void actionPerformed(ActionEvent e) { screen.pasteMe(true); getFocusForMe(); } }; popup.add(action); Rectangle workR = new Rectangle(); if (rubberband.isAreaSelected()) { rubberband.getBoundingArea(workR); // get the width and height int ePos = screen.getRowColFromPoint(workR.width , workR.height ); popup.addSeparator(); menuItem = new JMenuItem(LangTool.getString("popup.selectedColumns") + " " + screen.getCol(ePos)); menuItem.setArmed(false); popup.add(menuItem); menuItem = new JMenuItem(LangTool.getString("popup.selectedRows") + " " + screen.getRow(ePos)); menuItem.setArmed(false); popup.add(menuItem);// JMenu sumMenu = new JMenu(LangTool.getString("popup.macros")); JMenu sumMenu = new JMenu(LangTool.getString("popup.calc")); popup.add(sumMenu); action = new AbstractAction(LangTool.getString("popup.calcGroupCD")) { public void actionPerformed(ActionEvent e) { sumArea(true); } }; sumMenu.add(action); action = new AbstractAction(LangTool.getString("popup.calcGroupDC")) { public void actionPerformed(ActionEvent e) { sumArea(false); } }; sumMenu.add(action); } popup.addSeparator(); action = new AbstractAction(LangTool.getString("popup.printScreen")) { public void actionPerformed(ActionEvent e) { screen.printMe(); getFocusForMe(); } }; popup.add(action); popup.addSeparator(); action = new AbstractAction(LangTool.getString("popup.systemRequest")) { public void actionPerformed(ActionEvent e) { vt.systemRequest(); } }; popup.add(action); action = new AbstractAction(LangTool.getString("popup.help")) { public void actionPerformed(ActionEvent e) { vt.sendHelpRequest(); } }; popup.add(action); action = new AbstractAction(LangTool.getString("popup.hostPrint")) { public void actionPerformed(ActionEvent e) { vt.hostPrint(1); } }; popup.add(action); if (screen.isMessageWait()) { action = new AbstractAction(LangTool.getString("popup.displayMessages")) { public void actionPerformed(ActionEvent e) { vt.systemRequest('4'); } }; popup.add(action); } popup.addSeparator(); action = new AbstractAction(LangTool.getString("popup.hexMap")) { public void actionPerformed(ActionEvent e) { showHexMap(); } }; popup.add(action); action = new AbstractAction(LangTool.getString("popup.mapKeys")) { public void actionPerformed(ActionEvent e) { mapMeKeys(); } }; popup.add(action); action = new AbstractAction(LangTool.getString("popup.settings")) { public void actionPerformed(ActionEvent e) { doAttributes(); } }; popup.add(action); popup.addSeparator(); JMenu macMenu = new JMenu(LangTool.getString("popup.macros")); if (recording) { action = new AbstractAction(LangTool.getString("popup.stop")) { public void actionPerformed(ActionEvent e) { stopRecordingMe(); getFocusForMe(); } }; } else { action = new AbstractAction(LangTool.getString("popup.record")) { public void actionPerformed(ActionEvent e) { startRecordingMe(); } }; } macMenu.add(action); if (macros.isMacrosExist()) { macMenu.addSeparator(); String[] macrosList = macros.getMacroList(); for (int x = 0; x < macrosList.length; x++) { action = new AbstractAction(macrosList[x]) { public void actionPerformed(ActionEvent e) { executeMeMacro(e); } }; macMenu.add(action); } } popup.add(macMenu); popup.addSeparator(); action = new AbstractAction(LangTool.getString("popup.xtfrFile")) { public void actionPerformed(ActionEvent e) { doMeTransfer(); } }; popup.add(action); JMenu sendMenu = new JMenu(LangTool.getString("popup.send")); popup.add(sendMenu); action = new AbstractAction(LangTool.getString("popup.email")) { public void actionPerformed(ActionEvent e) { sendScreenEMail(); } }; sendMenu.add(action); action = new AbstractAction(LangTool.getString("popup.file")) { public void actionPerformed(ActionEvent e) { sendMeToFile(); } }; sendMenu.add(action); popup.addSeparator(); if (vt.isConnected()) { action = new AbstractAction(LangTool.getString("popup.disconnect")) { public void actionPerformed(ActionEvent e) { vt.disconnect(); getFocusForMe(); } }; } else { action = new AbstractAction(LangTool.getString("popup.connect")) { public void actionPerformed(ActionEvent e) { vt.connect(); getFocusForMe(); } }; } popup.add(action); } action = new AbstractAction(LangTool.getString("popup.close")) { public void actionPerformed(ActionEvent e) { closeSession(); } }; popup.add(action); popup.show(me.getComponent(), me.getX(),me.getY()); }
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/bcfd5ba28d22d8100110257f977fd7c577f652c2/Gui5250.java/clean/tn5250j/src/org/tn5250j/Gui5250.java
popup.add(action);
kbMenu.add(action);
private void doPopup (MouseEvent me) { JMenuItem menuItem; Action action; popup = new JPopupMenu(); final Gui5250 g = this; final int pos = screen.getRowColFromPoint(me.getX(),me.getY()) - (screen.getCols()-1); if (!rubberband.isAreaSelected() && screen.isInField(pos,false) ) { action = new AbstractAction(LangTool.getString("popup.copy")) { public void actionPerformed(ActionEvent e) { screen.copyField(pos); getFocusForMe(); } }; popup.add(action); action = new AbstractAction(LangTool.getString("popup.paste")) { public void actionPerformed(ActionEvent e) { screen.pasteMe(false); getFocusForMe(); } }; popup.add(action); action = new AbstractAction(LangTool.getString("popup.pasteSpecial")) { public void actionPerformed(ActionEvent e) { screen.pasteMe(true); getFocusForMe(); } }; popup.add(action); } else { action = new AbstractAction(LangTool.getString("popup.copy")) { public void actionPerformed(ActionEvent e) { screen.copyMe(); getFocusForMe(); } }; popup.add(action); action = new AbstractAction(LangTool.getString("popup.paste")) { public void actionPerformed(ActionEvent e) { screen.pasteMe(false); getFocusForMe(); } }; popup.add(action); action = new AbstractAction(LangTool.getString("popup.pasteSpecial")) { public void actionPerformed(ActionEvent e) { screen.pasteMe(true); getFocusForMe(); } }; popup.add(action); Rectangle workR = new Rectangle(); if (rubberband.isAreaSelected()) { rubberband.getBoundingArea(workR); // get the width and height int ePos = screen.getRowColFromPoint(workR.width , workR.height ); popup.addSeparator(); menuItem = new JMenuItem(LangTool.getString("popup.selectedColumns") + " " + screen.getCol(ePos)); menuItem.setArmed(false); popup.add(menuItem); menuItem = new JMenuItem(LangTool.getString("popup.selectedRows") + " " + screen.getRow(ePos)); menuItem.setArmed(false); popup.add(menuItem);// JMenu sumMenu = new JMenu(LangTool.getString("popup.macros")); JMenu sumMenu = new JMenu(LangTool.getString("popup.calc")); popup.add(sumMenu); action = new AbstractAction(LangTool.getString("popup.calcGroupCD")) { public void actionPerformed(ActionEvent e) { sumArea(true); } }; sumMenu.add(action); action = new AbstractAction(LangTool.getString("popup.calcGroupDC")) { public void actionPerformed(ActionEvent e) { sumArea(false); } }; sumMenu.add(action); } popup.addSeparator(); action = new AbstractAction(LangTool.getString("popup.printScreen")) { public void actionPerformed(ActionEvent e) { screen.printMe(); getFocusForMe(); } }; popup.add(action); popup.addSeparator(); action = new AbstractAction(LangTool.getString("popup.systemRequest")) { public void actionPerformed(ActionEvent e) { vt.systemRequest(); } }; popup.add(action); action = new AbstractAction(LangTool.getString("popup.help")) { public void actionPerformed(ActionEvent e) { vt.sendHelpRequest(); } }; popup.add(action); action = new AbstractAction(LangTool.getString("popup.hostPrint")) { public void actionPerformed(ActionEvent e) { vt.hostPrint(1); } }; popup.add(action); if (screen.isMessageWait()) { action = new AbstractAction(LangTool.getString("popup.displayMessages")) { public void actionPerformed(ActionEvent e) { vt.systemRequest('4'); } }; popup.add(action); } popup.addSeparator(); action = new AbstractAction(LangTool.getString("popup.hexMap")) { public void actionPerformed(ActionEvent e) { showHexMap(); } }; popup.add(action); action = new AbstractAction(LangTool.getString("popup.mapKeys")) { public void actionPerformed(ActionEvent e) { mapMeKeys(); } }; popup.add(action); action = new AbstractAction(LangTool.getString("popup.settings")) { public void actionPerformed(ActionEvent e) { doAttributes(); } }; popup.add(action); popup.addSeparator(); JMenu macMenu = new JMenu(LangTool.getString("popup.macros")); if (recording) { action = new AbstractAction(LangTool.getString("popup.stop")) { public void actionPerformed(ActionEvent e) { stopRecordingMe(); getFocusForMe(); } }; } else { action = new AbstractAction(LangTool.getString("popup.record")) { public void actionPerformed(ActionEvent e) { startRecordingMe(); } }; } macMenu.add(action); if (macros.isMacrosExist()) { macMenu.addSeparator(); String[] macrosList = macros.getMacroList(); for (int x = 0; x < macrosList.length; x++) { action = new AbstractAction(macrosList[x]) { public void actionPerformed(ActionEvent e) { executeMeMacro(e); } }; macMenu.add(action); } } popup.add(macMenu); popup.addSeparator(); action = new AbstractAction(LangTool.getString("popup.xtfrFile")) { public void actionPerformed(ActionEvent e) { doMeTransfer(); } }; popup.add(action); JMenu sendMenu = new JMenu(LangTool.getString("popup.send")); popup.add(sendMenu); action = new AbstractAction(LangTool.getString("popup.email")) { public void actionPerformed(ActionEvent e) { sendScreenEMail(); } }; sendMenu.add(action); action = new AbstractAction(LangTool.getString("popup.file")) { public void actionPerformed(ActionEvent e) { sendMeToFile(); } }; sendMenu.add(action); popup.addSeparator(); if (vt.isConnected()) { action = new AbstractAction(LangTool.getString("popup.disconnect")) { public void actionPerformed(ActionEvent e) { vt.disconnect(); getFocusForMe(); } }; } else { action = new AbstractAction(LangTool.getString("popup.connect")) { public void actionPerformed(ActionEvent e) { vt.connect(); getFocusForMe(); } }; } popup.add(action); } action = new AbstractAction(LangTool.getString("popup.close")) { public void actionPerformed(ActionEvent e) { closeSession(); } }; popup.add(action); popup.show(me.getComponent(), me.getX(),me.getY()); }
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/bcfd5ba28d22d8100110257f977fd7c577f652c2/Gui5250.java/clean/tn5250j/src/org/tn5250j/Gui5250.java
vt.systemRequest();
mapMeKeys();
public void actionPerformed(ActionEvent e) { vt.systemRequest(); }
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/bcfd5ba28d22d8100110257f977fd7c577f652c2/Gui5250.java/clean/tn5250j/src/org/tn5250j/Gui5250.java
vt.sendHelpRequest();
screen.sendKeys("[attn]");
public void actionPerformed(ActionEvent e) { vt.sendHelpRequest(); }
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/bcfd5ba28d22d8100110257f977fd7c577f652c2/Gui5250.java/clean/tn5250j/src/org/tn5250j/Gui5250.java
vt.hostPrint(1);
screen.sendKeys("[reset]");
public void actionPerformed(ActionEvent e) { vt.hostPrint(1); }
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/bcfd5ba28d22d8100110257f977fd7c577f652c2/Gui5250.java/clean/tn5250j/src/org/tn5250j/Gui5250.java
vt.systemRequest('4'); }
screen.sendKeys("[sysreq]"); }
public void actionPerformed(ActionEvent e) { vt.systemRequest('4'); }
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/bcfd5ba28d22d8100110257f977fd7c577f652c2/Gui5250.java/clean/tn5250j/src/org/tn5250j/Gui5250.java
showHexMap(); }
vt.systemRequest('4'); }
public void actionPerformed(ActionEvent e) { showHexMap(); }
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/bcfd5ba28d22d8100110257f977fd7c577f652c2/Gui5250.java/clean/tn5250j/src/org/tn5250j/Gui5250.java
mapMeKeys();
screen.sendKeys("[dupfield]");
public void actionPerformed(ActionEvent e) { mapMeKeys(); }
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/bcfd5ba28d22d8100110257f977fd7c577f652c2/Gui5250.java/clean/tn5250j/src/org/tn5250j/Gui5250.java
doAttributes();
screen.sendKeys("[help]");
public void actionPerformed(ActionEvent e) { doAttributes(); }
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/bcfd5ba28d22d8100110257f977fd7c577f652c2/Gui5250.java/clean/tn5250j/src/org/tn5250j/Gui5250.java
stopRecordingMe(); getFocusForMe(); }
screen.sendKeys("[eraseeof]"); }
public void actionPerformed(ActionEvent e) { stopRecordingMe(); getFocusForMe(); }
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/bcfd5ba28d22d8100110257f977fd7c577f652c2/Gui5250.java/clean/tn5250j/src/org/tn5250j/Gui5250.java
startRecordingMe(); }
screen.sendKeys("[field+]"); }
public void actionPerformed(ActionEvent e) { startRecordingMe(); }
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/bcfd5ba28d22d8100110257f977fd7c577f652c2/Gui5250.java/clean/tn5250j/src/org/tn5250j/Gui5250.java
executeMeMacro(e); }
screen.sendKeys("[field-]"); }
public void actionPerformed(ActionEvent e) { executeMeMacro(e); }
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/bcfd5ba28d22d8100110257f977fd7c577f652c2/Gui5250.java/clean/tn5250j/src/org/tn5250j/Gui5250.java
doMeTransfer();
screen.sendKeys("[newline]");
public void actionPerformed(ActionEvent e) { doMeTransfer(); }
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/bcfd5ba28d22d8100110257f977fd7c577f652c2/Gui5250.java/clean/tn5250j/src/org/tn5250j/Gui5250.java
sendScreenEMail();
vt.hostPrint(1);
public void actionPerformed(ActionEvent e) { sendScreenEMail(); }
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/bcfd5ba28d22d8100110257f977fd7c577f652c2/Gui5250.java/clean/tn5250j/src/org/tn5250j/Gui5250.java
sendMeToFile(); }
vt.systemRequest('4'); }
public void actionPerformed(ActionEvent e) { sendMeToFile(); }
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/bcfd5ba28d22d8100110257f977fd7c577f652c2/Gui5250.java/clean/tn5250j/src/org/tn5250j/Gui5250.java
vt.disconnect(); getFocusForMe(); }
showHexMap(); }
public void actionPerformed(ActionEvent e) { vt.disconnect(); getFocusForMe(); }
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/bcfd5ba28d22d8100110257f977fd7c577f652c2/Gui5250.java/clean/tn5250j/src/org/tn5250j/Gui5250.java
vt.connect(); getFocusForMe(); }
mapMeKeys(); }
public void actionPerformed(ActionEvent e) { vt.connect(); getFocusForMe(); }
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/bcfd5ba28d22d8100110257f977fd7c577f652c2/Gui5250.java/clean/tn5250j/src/org/tn5250j/Gui5250.java
closeSession(); }
doAttributes(); }
public void actionPerformed(ActionEvent e) { closeSession(); }
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/bcfd5ba28d22d8100110257f977fd7c577f652c2/Gui5250.java/clean/tn5250j/src/org/tn5250j/Gui5250.java
if (keyProcessed || e.isConsumed())
if (Character.isISOControl(e.getKeyChar()) || keyProcessed || e.isConsumed() )
private void processVTKeyReleased(KeyEvent e){ if (isLinux && e.getKeyCode() == e.VK_ALT_GRAPH) { isAltGr = false; }// displayInfo(e,"Released " + keyProcessed); if (keyProcessed || e.isConsumed()) return; String s = keyMap.getKeyStrokeText(e); if (s != null) { if (s.startsWith("[")) { screen.sendKeys(s); if (recording) recordBuffer.append(s); } else executeMeMacro(s); } else keyProcessed = false; if (keyProcessed) e.consume(); }
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/bcfd5ba28d22d8100110257f977fd7c577f652c2/Gui5250.java/clean/tn5250j/src/org/tn5250j/Gui5250.java
if (Character.isISOControl(kc) || keyProcessed)
if (Character.isISOControl(kc) || keyProcessed) {
private void processVTKeyTyped(KeyEvent e){ char kc = e.getKeyChar();// displayInfo(e,"Typed processed " + keyProcessed); if (Character.isISOControl(kc) || keyProcessed)// if (keyProcessed) return;// displayInfo(e,"Typed "); String s = "";// if (isLinux) {// lastKeyStroke = keyMap.getKeyStrokeText(e,isAltGr);// System.out.println("last " + lastKeyStroke);// if (lastKeyStroke != null) {// s = lastKeyStroke;// System.out.println("last " + s);// }// else// s +=kc;// }// else s += kc; if (!vt.isConnected() ) return; screen.sendKeys(s); if (recording) recordBuffer.append(s); keyProcessed = true; e.consume(); }
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/bcfd5ba28d22d8100110257f977fd7c577f652c2/Gui5250.java/clean/tn5250j/src/org/tn5250j/Gui5250.java
}
private void processVTKeyTyped(KeyEvent e){ char kc = e.getKeyChar();// displayInfo(e,"Typed processed " + keyProcessed); if (Character.isISOControl(kc) || keyProcessed)// if (keyProcessed) return;// displayInfo(e,"Typed "); String s = "";// if (isLinux) {// lastKeyStroke = keyMap.getKeyStrokeText(e,isAltGr);// System.out.println("last " + lastKeyStroke);// if (lastKeyStroke != null) {// s = lastKeyStroke;// System.out.println("last " + s);// }// else// s +=kc;// }// else s += kc; if (!vt.isConnected() ) return; screen.sendKeys(s); if (recording) recordBuffer.append(s); keyProcessed = true; e.consume(); }
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/bcfd5ba28d22d8100110257f977fd7c577f652c2/Gui5250.java/clean/tn5250j/src/org/tn5250j/Gui5250.java
return super.getAttributes();
if (attributes == null) { attributes = getStyleSheet().getViewAttributes(this); } return attributes;
public AttributeSet getAttributes() { // FIXME: Implement this multiplexing thing. return super.getAttributes(); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ff4d557efcee4a2c3a25a9cac2252bc626fb10fe/ParagraphView.java/clean/core/src/classpath/javax/javax/swing/text/html/ParagraphView.java
}
public void paintIcon(Component c, Graphics g, int x, int y) { boolean focus = false; if (c != null) focus = c.hasFocus(); // TODO: pick up the colors from the look and feel // draw the outline g.setColor(Color.black); g.drawLine(x + 1, y, x + 13, y); g.drawLine(x + 14, y + 1, x + 14, y + 7); g.drawLine(x + 14, y + 8, x + 7, y + 15); g.drawLine(x + 6, y + 14, x, y + 8); g.drawLine(x, y + 7, x, y + 1); // fill the icon g.setColor(focus ? new Color(153, 153, 204) : new Color(204, 204, 204)); // medium g.fillRect(x + 2, y + 2, 12, 7); g.drawLine(x + 2, y + 9, x + 12, y + 9); g.drawLine(x + 3, y + 10, x + 11, y + 10); g.drawLine(x + 4, y + 11, x + 10, y + 11); g.drawLine(x + 5, y + 12, x + 9, y + 12); g.drawLine(x + 6, y + 13, x + 8, y + 13); g.drawLine(x + 7, y + 14, x + 7, y + 14); // draw highlights g.setColor(focus ? new Color(204, 204, 255) : new Color(255, 255, 255)); // light g.drawLine(x + 1, y + 1, x + 13, y + 1); g.drawLine(x + 1, y + 2, x + 1, y + 8); g.drawLine(x + 2, y + 2, x + 2, y + 2); g.drawLine(x + 6, y + 2, x + 6, y + 2); g.drawLine(x + 10, y + 2, x + 10, y + 2); g.drawLine(x + 4, y + 4, x + 4, y + 4); g.drawLine(x + 8, y + 4, x + 8, y + 4); g.drawLine(x + 2, y + 6, x + 2, y + 6); g.drawLine(x + 6, y + 6, x + 6, y + 6); g.drawLine(x + 10, y + 6, x + 10, y + 6); // draw dots g.setColor(focus ? new Color(102, 102, 153) : Color.black); // dark g.drawLine(x + 3, y + 3, x + 3, y + 3); g.drawLine(x + 7, y + 3, x + 7, y + 3); g.drawLine(x + 11, y + 3, x + 11, y + 3); g.drawLine(x + 5, y + 5, x + 5, y + 5); g.drawLine(x + 9, y + 5, x + 9, y + 5); g.drawLine(x + 3, y + 7, x + 3, y + 7); g.drawLine(x + 7, y + 7, x + 7, y + 7); g.drawLine(x + 11, y + 7, x + 11, y + 7); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/045a5b41cdfa747889101d3993040acf89788bc4/MetalIconFactory.java/buggy/core/src/classpath/javax/javax/swing/plaf/metal/MetalIconFactory.java
g.setColor(Color.black);
if (enabled) g.setColor(MetalLookAndFeel.getBlack()); else g.setColor(MetalLookAndFeel.getControlDarkShadow());
public void paintIcon(Component c, Graphics g, int x, int y) { boolean focus = false; if (c != null) focus = c.hasFocus(); // TODO: pick up the colors from the look and feel // draw the outline g.setColor(Color.black); g.drawLine(x + 1, y, x + 13, y); g.drawLine(x + 14, y + 1, x + 14, y + 7); g.drawLine(x + 14, y + 8, x + 7, y + 15); g.drawLine(x + 6, y + 14, x, y + 8); g.drawLine(x, y + 7, x, y + 1); // fill the icon g.setColor(focus ? new Color(153, 153, 204) : new Color(204, 204, 204)); // medium g.fillRect(x + 2, y + 2, 12, 7); g.drawLine(x + 2, y + 9, x + 12, y + 9); g.drawLine(x + 3, y + 10, x + 11, y + 10); g.drawLine(x + 4, y + 11, x + 10, y + 11); g.drawLine(x + 5, y + 12, x + 9, y + 12); g.drawLine(x + 6, y + 13, x + 8, y + 13); g.drawLine(x + 7, y + 14, x + 7, y + 14); // draw highlights g.setColor(focus ? new Color(204, 204, 255) : new Color(255, 255, 255)); // light g.drawLine(x + 1, y + 1, x + 13, y + 1); g.drawLine(x + 1, y + 2, x + 1, y + 8); g.drawLine(x + 2, y + 2, x + 2, y + 2); g.drawLine(x + 6, y + 2, x + 6, y + 2); g.drawLine(x + 10, y + 2, x + 10, y + 2); g.drawLine(x + 4, y + 4, x + 4, y + 4); g.drawLine(x + 8, y + 4, x + 8, y + 4); g.drawLine(x + 2, y + 6, x + 2, y + 6); g.drawLine(x + 6, y + 6, x + 6, y + 6); g.drawLine(x + 10, y + 6, x + 10, y + 6); // draw dots g.setColor(focus ? new Color(102, 102, 153) : Color.black); // dark g.drawLine(x + 3, y + 3, x + 3, y + 3); g.drawLine(x + 7, y + 3, x + 7, y + 3); g.drawLine(x + 11, y + 3, x + 11, y + 3); g.drawLine(x + 5, y + 5, x + 5, y + 5); g.drawLine(x + 9, y + 5, x + 9, y + 5); g.drawLine(x + 3, y + 7, x + 3, y + 7); g.drawLine(x + 7, y + 7, x + 7, y + 7); g.drawLine(x + 11, y + 7, x + 11, y + 7); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/045a5b41cdfa747889101d3993040acf89788bc4/MetalIconFactory.java/buggy/core/src/classpath/javax/javax/swing/plaf/metal/MetalIconFactory.java
g.setColor(focus ? new Color(153, 153, 204) : new Color(204, 204, 204)); g.fillRect(x + 2, y + 2, 12, 7);
if (focus) g.setColor(MetalLookAndFeel.getPrimaryControlShadow()); else g.setColor(MetalLookAndFeel.getControl()); g.fillRect(x + 1, y + 2, 13, 7);
public void paintIcon(Component c, Graphics g, int x, int y) { boolean focus = false; if (c != null) focus = c.hasFocus(); // TODO: pick up the colors from the look and feel // draw the outline g.setColor(Color.black); g.drawLine(x + 1, y, x + 13, y); g.drawLine(x + 14, y + 1, x + 14, y + 7); g.drawLine(x + 14, y + 8, x + 7, y + 15); g.drawLine(x + 6, y + 14, x, y + 8); g.drawLine(x, y + 7, x, y + 1); // fill the icon g.setColor(focus ? new Color(153, 153, 204) : new Color(204, 204, 204)); // medium g.fillRect(x + 2, y + 2, 12, 7); g.drawLine(x + 2, y + 9, x + 12, y + 9); g.drawLine(x + 3, y + 10, x + 11, y + 10); g.drawLine(x + 4, y + 11, x + 10, y + 11); g.drawLine(x + 5, y + 12, x + 9, y + 12); g.drawLine(x + 6, y + 13, x + 8, y + 13); g.drawLine(x + 7, y + 14, x + 7, y + 14); // draw highlights g.setColor(focus ? new Color(204, 204, 255) : new Color(255, 255, 255)); // light g.drawLine(x + 1, y + 1, x + 13, y + 1); g.drawLine(x + 1, y + 2, x + 1, y + 8); g.drawLine(x + 2, y + 2, x + 2, y + 2); g.drawLine(x + 6, y + 2, x + 6, y + 2); g.drawLine(x + 10, y + 2, x + 10, y + 2); g.drawLine(x + 4, y + 4, x + 4, y + 4); g.drawLine(x + 8, y + 4, x + 8, y + 4); g.drawLine(x + 2, y + 6, x + 2, y + 6); g.drawLine(x + 6, y + 6, x + 6, y + 6); g.drawLine(x + 10, y + 6, x + 10, y + 6); // draw dots g.setColor(focus ? new Color(102, 102, 153) : Color.black); // dark g.drawLine(x + 3, y + 3, x + 3, y + 3); g.drawLine(x + 7, y + 3, x + 7, y + 3); g.drawLine(x + 11, y + 3, x + 11, y + 3); g.drawLine(x + 5, y + 5, x + 5, y + 5); g.drawLine(x + 9, y + 5, x + 9, y + 5); g.drawLine(x + 3, y + 7, x + 3, y + 7); g.drawLine(x + 7, y + 7, x + 7, y + 7); g.drawLine(x + 11, y + 7, x + 11, y + 7); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/045a5b41cdfa747889101d3993040acf89788bc4/MetalIconFactory.java/buggy/core/src/classpath/javax/javax/swing/plaf/metal/MetalIconFactory.java
g.setColor(focus ? new Color(204, 204, 255) : new Color(255, 255, 255));
if (focus) g.setColor(MetalLookAndFeel.getPrimaryControl()); else g.setColor(MetalLookAndFeel.getWhite());
public void paintIcon(Component c, Graphics g, int x, int y) { boolean focus = false; if (c != null) focus = c.hasFocus(); // TODO: pick up the colors from the look and feel // draw the outline g.setColor(Color.black); g.drawLine(x + 1, y, x + 13, y); g.drawLine(x + 14, y + 1, x + 14, y + 7); g.drawLine(x + 14, y + 8, x + 7, y + 15); g.drawLine(x + 6, y + 14, x, y + 8); g.drawLine(x, y + 7, x, y + 1); // fill the icon g.setColor(focus ? new Color(153, 153, 204) : new Color(204, 204, 204)); // medium g.fillRect(x + 2, y + 2, 12, 7); g.drawLine(x + 2, y + 9, x + 12, y + 9); g.drawLine(x + 3, y + 10, x + 11, y + 10); g.drawLine(x + 4, y + 11, x + 10, y + 11); g.drawLine(x + 5, y + 12, x + 9, y + 12); g.drawLine(x + 6, y + 13, x + 8, y + 13); g.drawLine(x + 7, y + 14, x + 7, y + 14); // draw highlights g.setColor(focus ? new Color(204, 204, 255) : new Color(255, 255, 255)); // light g.drawLine(x + 1, y + 1, x + 13, y + 1); g.drawLine(x + 1, y + 2, x + 1, y + 8); g.drawLine(x + 2, y + 2, x + 2, y + 2); g.drawLine(x + 6, y + 2, x + 6, y + 2); g.drawLine(x + 10, y + 2, x + 10, y + 2); g.drawLine(x + 4, y + 4, x + 4, y + 4); g.drawLine(x + 8, y + 4, x + 8, y + 4); g.drawLine(x + 2, y + 6, x + 2, y + 6); g.drawLine(x + 6, y + 6, x + 6, y + 6); g.drawLine(x + 10, y + 6, x + 10, y + 6); // draw dots g.setColor(focus ? new Color(102, 102, 153) : Color.black); // dark g.drawLine(x + 3, y + 3, x + 3, y + 3); g.drawLine(x + 7, y + 3, x + 7, y + 3); g.drawLine(x + 11, y + 3, x + 11, y + 3); g.drawLine(x + 5, y + 5, x + 5, y + 5); g.drawLine(x + 9, y + 5, x + 9, y + 5); g.drawLine(x + 3, y + 7, x + 3, y + 7); g.drawLine(x + 7, y + 7, x + 7, y + 7); g.drawLine(x + 11, y + 7, x + 11, y + 7); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/045a5b41cdfa747889101d3993040acf89788bc4/MetalIconFactory.java/buggy/core/src/classpath/javax/javax/swing/plaf/metal/MetalIconFactory.java
g.setColor(focus ? new Color(102, 102, 153) : Color.black); g.drawLine(x + 3, y + 3, x + 3, y + 3); g.drawLine(x + 7, y + 3, x + 7, y + 3); g.drawLine(x + 11, y + 3, x + 11, y + 3); g.drawLine(x + 5, y + 5, x + 5, y + 5); g.drawLine(x + 9, y + 5, x + 9, y + 5); g.drawLine(x + 3, y + 7, x + 3, y + 7); g.drawLine(x + 7, y + 7, x + 7, y + 7); g.drawLine(x + 11, y + 7, x + 11, y + 7);
}
public void paintIcon(Component c, Graphics g, int x, int y) { boolean focus = false; if (c != null) focus = c.hasFocus(); // TODO: pick up the colors from the look and feel // draw the outline g.setColor(Color.black); g.drawLine(x + 1, y, x + 13, y); g.drawLine(x + 14, y + 1, x + 14, y + 7); g.drawLine(x + 14, y + 8, x + 7, y + 15); g.drawLine(x + 6, y + 14, x, y + 8); g.drawLine(x, y + 7, x, y + 1); // fill the icon g.setColor(focus ? new Color(153, 153, 204) : new Color(204, 204, 204)); // medium g.fillRect(x + 2, y + 2, 12, 7); g.drawLine(x + 2, y + 9, x + 12, y + 9); g.drawLine(x + 3, y + 10, x + 11, y + 10); g.drawLine(x + 4, y + 11, x + 10, y + 11); g.drawLine(x + 5, y + 12, x + 9, y + 12); g.drawLine(x + 6, y + 13, x + 8, y + 13); g.drawLine(x + 7, y + 14, x + 7, y + 14); // draw highlights g.setColor(focus ? new Color(204, 204, 255) : new Color(255, 255, 255)); // light g.drawLine(x + 1, y + 1, x + 13, y + 1); g.drawLine(x + 1, y + 2, x + 1, y + 8); g.drawLine(x + 2, y + 2, x + 2, y + 2); g.drawLine(x + 6, y + 2, x + 6, y + 2); g.drawLine(x + 10, y + 2, x + 10, y + 2); g.drawLine(x + 4, y + 4, x + 4, y + 4); g.drawLine(x + 8, y + 4, x + 8, y + 4); g.drawLine(x + 2, y + 6, x + 2, y + 6); g.drawLine(x + 6, y + 6, x + 6, y + 6); g.drawLine(x + 10, y + 6, x + 10, y + 6); // draw dots g.setColor(focus ? new Color(102, 102, 153) : Color.black); // dark g.drawLine(x + 3, y + 3, x + 3, y + 3); g.drawLine(x + 7, y + 3, x + 7, y + 3); g.drawLine(x + 11, y + 3, x + 11, y + 3); g.drawLine(x + 5, y + 5, x + 5, y + 5); g.drawLine(x + 9, y + 5, x + 9, y + 5); g.drawLine(x + 3, y + 7, x + 3, y + 7); g.drawLine(x + 7, y + 7, x + 7, y + 7); g.drawLine(x + 11, y + 7, x + 11, y + 7); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/045a5b41cdfa747889101d3993040acf89788bc4/MetalIconFactory.java/buggy/core/src/classpath/javax/javax/swing/plaf/metal/MetalIconFactory.java
Color dark = MetalLookAndFeel.getControlDarkShadow(); Color light = MetalLookAndFeel.getWhite(); g.translate(x, y);
Color savedColor = g.getColor(); JRadioButton b = (JRadioButton) c;
public void paintIcon(Component c, Graphics g, int x, int y) { Color dark = MetalLookAndFeel.getControlDarkShadow(); Color light = MetalLookAndFeel.getWhite(); g.translate(x, y); // The light 'circle' g.setColor(light); g.drawLine(4, 1, 10, 1); g.drawLine(2, 2, 3, 2); g.drawLine(8, 2, 11, 2); g.drawLine(2, 3, 2, 3); g.drawLine(11, 2, 11, 9); g.drawLine(1, 4, 1, 7); g.drawLine(12, 4, 12, 7); g.drawLine(2, 8, 2, 11); g.drawLine(11, 8, 11, 9); g.drawLine(10, 10, 10, 10); g.drawLine(2, 11, 9, 11); g.drawLine(4, 12, 7, 12); // The dark 'circle' g.setColor(dark); g.drawLine(4, 0, 7, 0); g.drawLine(2, 1, 3, 1); g.drawLine(8, 1, 9, 1); g.drawLine(1, 2, 1, 3); g.drawLine(10, 2, 10, 3); g.drawLine(0, 4, 0, 7); g.drawLine(11, 4, 11, 7); g.drawLine(1, 8, 1, 9); g.drawLine(10, 8, 10, 9); g.drawLine(2, 10, 3, 10); g.drawLine(8, 10, 9, 10); g.drawLine(4, 11, 7, 11); JRadioButton rb = (JRadioButton) c; if (rb.isSelected()) drawCheck(c, g); g.translate(-x, -y); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/045a5b41cdfa747889101d3993040acf89788bc4/MetalIconFactory.java/buggy/core/src/classpath/javax/javax/swing/plaf/metal/MetalIconFactory.java
g.setColor(light); g.drawLine(4, 1, 10, 1); g.drawLine(2, 2, 3, 2); g.drawLine(8, 2, 11, 2); g.drawLine(2, 3, 2, 3); g.drawLine(11, 2, 11, 9); g.drawLine(1, 4, 1, 7); g.drawLine(12, 4, 12, 7); g.drawLine(2, 8, 2, 11); g.drawLine(11, 8, 11, 9); g.drawLine(10, 10, 10, 10); g.drawLine(2, 11, 9, 11); g.drawLine(4, 12, 7, 12);
if (b.isEnabled()) g.setColor(MetalLookAndFeel.getControlDarkShadow()); else g.setColor(MetalLookAndFeel.getControlDisabled()); g.drawLine(x + 2, y + 1, x + 3, y + 1); g.drawLine(x + 4, y, x + 7, y); g.drawLine(x + 8, y + 1, x + 9, y + 1); g.drawLine(x + 10, y + 2, x + 10, y + 3); g.drawLine(x + 11, y + 4, x + 11, y + 7); g.drawLine(x + 10, y + 8, x + 10, y + 9); g.drawLine(x + 8, y + 10, x + 9, y + 10); g.drawLine(x + 4, y + 11, x + 7, y + 11); g.drawLine(x + 2, y + 10, x + 3, y + 10); g.drawLine(x + 1, y + 9, x + 1, y + 8); g.drawLine(x, y + 7, x, y + 4); g.drawLine(x + 1, y + 2, x + 1, y + 3);
public void paintIcon(Component c, Graphics g, int x, int y) { Color dark = MetalLookAndFeel.getControlDarkShadow(); Color light = MetalLookAndFeel.getWhite(); g.translate(x, y); // The light 'circle' g.setColor(light); g.drawLine(4, 1, 10, 1); g.drawLine(2, 2, 3, 2); g.drawLine(8, 2, 11, 2); g.drawLine(2, 3, 2, 3); g.drawLine(11, 2, 11, 9); g.drawLine(1, 4, 1, 7); g.drawLine(12, 4, 12, 7); g.drawLine(2, 8, 2, 11); g.drawLine(11, 8, 11, 9); g.drawLine(10, 10, 10, 10); g.drawLine(2, 11, 9, 11); g.drawLine(4, 12, 7, 12); // The dark 'circle' g.setColor(dark); g.drawLine(4, 0, 7, 0); g.drawLine(2, 1, 3, 1); g.drawLine(8, 1, 9, 1); g.drawLine(1, 2, 1, 3); g.drawLine(10, 2, 10, 3); g.drawLine(0, 4, 0, 7); g.drawLine(11, 4, 11, 7); g.drawLine(1, 8, 1, 9); g.drawLine(10, 8, 10, 9); g.drawLine(2, 10, 3, 10); g.drawLine(8, 10, 9, 10); g.drawLine(4, 11, 7, 11); JRadioButton rb = (JRadioButton) c; if (rb.isSelected()) drawCheck(c, g); g.translate(-x, -y); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/045a5b41cdfa747889101d3993040acf89788bc4/MetalIconFactory.java/buggy/core/src/classpath/javax/javax/swing/plaf/metal/MetalIconFactory.java
g.setColor(dark); g.drawLine(4, 0, 7, 0); g.drawLine(2, 1, 3, 1); g.drawLine(8, 1, 9, 1); g.drawLine(1, 2, 1, 3); g.drawLine(10, 2, 10, 3); g.drawLine(0, 4, 0, 7); g.drawLine(11, 4, 11, 7); g.drawLine(1, 8, 1, 9); g.drawLine(10, 8, 10, 9); g.drawLine(2, 10, 3, 10); g.drawLine(8, 10, 9, 10); g.drawLine(4, 11, 7, 11);
if (b.getModel().isArmed()) { g.setColor(MetalLookAndFeel.getControlShadow()); g.drawLine(x + 4, y + 1, x + 7, y + 1); g.drawLine(x + 4, y + 10, x + 7, y + 10); g.drawLine(x + 1, y + 4, x + 1, y + 7); g.drawLine(x + 10, y + 4, x + 10, y + 7); g.fillRect(x + 2, y + 2, 8, 8); } else { if (b.isEnabled()) { g.setColor(MetalLookAndFeel.getWhite()); g.drawLine(x + 2, y + 8, x + 2, y + 9); g.drawLine(x + 1, y + 4, x + 1, y + 7); g.drawLine(x + 2, y + 2, x + 2, y + 3); g.drawLine(x + 3, y + 2, x + 3, y + 2); g.drawLine(x + 4, y + 1, x + 7, y + 1); g.drawLine(x + 8, y + 2, x + 9, y + 2); } }
public void paintIcon(Component c, Graphics g, int x, int y) { Color dark = MetalLookAndFeel.getControlDarkShadow(); Color light = MetalLookAndFeel.getWhite(); g.translate(x, y); // The light 'circle' g.setColor(light); g.drawLine(4, 1, 10, 1); g.drawLine(2, 2, 3, 2); g.drawLine(8, 2, 11, 2); g.drawLine(2, 3, 2, 3); g.drawLine(11, 2, 11, 9); g.drawLine(1, 4, 1, 7); g.drawLine(12, 4, 12, 7); g.drawLine(2, 8, 2, 11); g.drawLine(11, 8, 11, 9); g.drawLine(10, 10, 10, 10); g.drawLine(2, 11, 9, 11); g.drawLine(4, 12, 7, 12); // The dark 'circle' g.setColor(dark); g.drawLine(4, 0, 7, 0); g.drawLine(2, 1, 3, 1); g.drawLine(8, 1, 9, 1); g.drawLine(1, 2, 1, 3); g.drawLine(10, 2, 10, 3); g.drawLine(0, 4, 0, 7); g.drawLine(11, 4, 11, 7); g.drawLine(1, 8, 1, 9); g.drawLine(10, 8, 10, 9); g.drawLine(2, 10, 3, 10); g.drawLine(8, 10, 9, 10); g.drawLine(4, 11, 7, 11); JRadioButton rb = (JRadioButton) c; if (rb.isSelected()) drawCheck(c, g); g.translate(-x, -y); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/045a5b41cdfa747889101d3993040acf89788bc4/MetalIconFactory.java/buggy/core/src/classpath/javax/javax/swing/plaf/metal/MetalIconFactory.java
JRadioButton rb = (JRadioButton) c; if (rb.isSelected()) drawCheck(c, g); g.translate(-x, -y);
if (b.isEnabled()) { g.setColor(MetalLookAndFeel.getWhite()); g.drawLine(x + 10, y + 1, x + 10, y + 1); g.drawLine(x + 11, y + 2, x + 11, y + 3); g.drawLine(x + 12, y + 4, x + 12, y + 7); g.drawLine(x + 11, y + 8, x + 11, y + 9); g.drawLine(x + 10, y + 10, x + 10, y + 10); g.drawLine(x + 8, y + 11, x + 9, y + 11); g.drawLine(x + 4, y + 12, x + 7, y + 12); g.drawLine(x + 2, y + 11, x + 3, y + 11); } if (b.isSelected()) { g.setColor(MetalLookAndFeel.getBlack()); g.drawLine(x + 4, y + 3, x + 7, y + 3); g.fillRect(x + 3, y + 4, 6, 4); g.drawLine(x + 4, y + 8, x + 7, y + 8); } g.setColor(savedColor);
public void paintIcon(Component c, Graphics g, int x, int y) { Color dark = MetalLookAndFeel.getControlDarkShadow(); Color light = MetalLookAndFeel.getWhite(); g.translate(x, y); // The light 'circle' g.setColor(light); g.drawLine(4, 1, 10, 1); g.drawLine(2, 2, 3, 2); g.drawLine(8, 2, 11, 2); g.drawLine(2, 3, 2, 3); g.drawLine(11, 2, 11, 9); g.drawLine(1, 4, 1, 7); g.drawLine(12, 4, 12, 7); g.drawLine(2, 8, 2, 11); g.drawLine(11, 8, 11, 9); g.drawLine(10, 10, 10, 10); g.drawLine(2, 11, 9, 11); g.drawLine(4, 12, 7, 12); // The dark 'circle' g.setColor(dark); g.drawLine(4, 0, 7, 0); g.drawLine(2, 1, 3, 1); g.drawLine(8, 1, 9, 1); g.drawLine(1, 2, 1, 3); g.drawLine(10, 2, 10, 3); g.drawLine(0, 4, 0, 7); g.drawLine(11, 4, 11, 7); g.drawLine(1, 8, 1, 9); g.drawLine(10, 8, 10, 9); g.drawLine(2, 10, 3, 10); g.drawLine(8, 10, 9, 10); g.drawLine(4, 11, 7, 11); JRadioButton rb = (JRadioButton) c; if (rb.isSelected()) drawCheck(c, g); g.translate(-x, -y); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/045a5b41cdfa747889101d3993040acf89788bc4/MetalIconFactory.java/buggy/core/src/classpath/javax/javax/swing/plaf/metal/MetalIconFactory.java
}
public void paintIcon(Component c, Graphics g, int x, int y) { boolean focus = false; if (c != null) focus = c.hasFocus(); // TODO: pick up the colors from the look and feel // draw the outline g.setColor(Color.black); g.drawLine(x + 1, y, x + 7, y); g.drawLine(x + 8, y, x + 15, y + 7); g.drawLine(x + 14, y + 8, x + 8, y + 14); g.drawLine(x + 8, y + 14, x + 1, y + 14); g.drawLine(x, y + 13, x, y + 1); // fill the icon g.setColor(focus ? new Color(153, 153, 204) : new Color(204, 204, 204)); // medium g.fillRect(x + 2, y + 2, 7, 12); g.drawLine(x + 9, y + 2, x + 9, y + 12); g.drawLine(x + 10, y + 3, x + 10, y + 11); g.drawLine(x + 11, y + 4, x + 11, y + 10); g.drawLine(x + 12, y + 5, x + 12, y + 9); g.drawLine(x + 13, y + 6, x + 13, y + 8); g.drawLine(x + 14, y + 7, x + 14, y + 7); // draw highlights g.setColor(focus ? new Color(204, 204, 255) : new Color(255, 255, 255)); // light g.drawLine(x + 1, y + 1, x + 8, y + 1); g.drawLine(x + 1, y + 2, x + 1, y + 13); g.drawLine(x + 2, y + 2, x + 2, y + 2); g.drawLine(x + 2, y + 6, x + 2, y + 6); g.drawLine(x + 2, y + 10, x + 2, y + 10); g.drawLine(x + 4, y + 4, x + 4, y + 4); g.drawLine(x + 4, y + 8, x + 4, y + 8); g.drawLine(x + 6, y + 2, x + 6, y + 2); g.drawLine(x + 6, y + 6, x + 6, y + 6); g.drawLine(x + 6, y + 10, x + 6, y + 10); // draw dots g.setColor(focus ? new Color(102, 102, 153) : Color.black); // dark g.drawLine(x + 3, y + 3, x + 3, y + 3); g.drawLine(x + 3, y + 7, x + 3, y + 7); g.drawLine(x + 3, y + 11, x + 3, y + 11); g.drawLine(x + 5, y + 5, x + 5, y + 5); g.drawLine(x + 5, y + 9, x + 5, y + 9); g.drawLine(x + 7, y + 3, x + 7, y + 3); g.drawLine(x + 7, y + 7, x + 7, y + 7); g.drawLine(x + 7, y + 11, x + 7, y + 11); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/045a5b41cdfa747889101d3993040acf89788bc4/MetalIconFactory.java/buggy/core/src/classpath/javax/javax/swing/plaf/metal/MetalIconFactory.java
g.setColor(Color.black);
if (enabled) g.setColor(MetalLookAndFeel.getBlack()); else g.setColor(MetalLookAndFeel.getControlDarkShadow());
public void paintIcon(Component c, Graphics g, int x, int y) { boolean focus = false; if (c != null) focus = c.hasFocus(); // TODO: pick up the colors from the look and feel // draw the outline g.setColor(Color.black); g.drawLine(x + 1, y, x + 7, y); g.drawLine(x + 8, y, x + 15, y + 7); g.drawLine(x + 14, y + 8, x + 8, y + 14); g.drawLine(x + 8, y + 14, x + 1, y + 14); g.drawLine(x, y + 13, x, y + 1); // fill the icon g.setColor(focus ? new Color(153, 153, 204) : new Color(204, 204, 204)); // medium g.fillRect(x + 2, y + 2, 7, 12); g.drawLine(x + 9, y + 2, x + 9, y + 12); g.drawLine(x + 10, y + 3, x + 10, y + 11); g.drawLine(x + 11, y + 4, x + 11, y + 10); g.drawLine(x + 12, y + 5, x + 12, y + 9); g.drawLine(x + 13, y + 6, x + 13, y + 8); g.drawLine(x + 14, y + 7, x + 14, y + 7); // draw highlights g.setColor(focus ? new Color(204, 204, 255) : new Color(255, 255, 255)); // light g.drawLine(x + 1, y + 1, x + 8, y + 1); g.drawLine(x + 1, y + 2, x + 1, y + 13); g.drawLine(x + 2, y + 2, x + 2, y + 2); g.drawLine(x + 2, y + 6, x + 2, y + 6); g.drawLine(x + 2, y + 10, x + 2, y + 10); g.drawLine(x + 4, y + 4, x + 4, y + 4); g.drawLine(x + 4, y + 8, x + 4, y + 8); g.drawLine(x + 6, y + 2, x + 6, y + 2); g.drawLine(x + 6, y + 6, x + 6, y + 6); g.drawLine(x + 6, y + 10, x + 6, y + 10); // draw dots g.setColor(focus ? new Color(102, 102, 153) : Color.black); // dark g.drawLine(x + 3, y + 3, x + 3, y + 3); g.drawLine(x + 3, y + 7, x + 3, y + 7); g.drawLine(x + 3, y + 11, x + 3, y + 11); g.drawLine(x + 5, y + 5, x + 5, y + 5); g.drawLine(x + 5, y + 9, x + 5, y + 9); g.drawLine(x + 7, y + 3, x + 7, y + 3); g.drawLine(x + 7, y + 7, x + 7, y + 7); g.drawLine(x + 7, y + 11, x + 7, y + 11); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/045a5b41cdfa747889101d3993040acf89788bc4/MetalIconFactory.java/buggy/core/src/classpath/javax/javax/swing/plaf/metal/MetalIconFactory.java
g.setColor(focus ? new Color(153, 153, 204) : new Color(204, 204, 204)); g.fillRect(x + 2, y + 2, 7, 12);
if (focus) g.setColor(MetalLookAndFeel.getPrimaryControlShadow()); else g.setColor(MetalLookAndFeel.getControl()); g.fillRect(x + 2, y + 1, 7, 13);
public void paintIcon(Component c, Graphics g, int x, int y) { boolean focus = false; if (c != null) focus = c.hasFocus(); // TODO: pick up the colors from the look and feel // draw the outline g.setColor(Color.black); g.drawLine(x + 1, y, x + 7, y); g.drawLine(x + 8, y, x + 15, y + 7); g.drawLine(x + 14, y + 8, x + 8, y + 14); g.drawLine(x + 8, y + 14, x + 1, y + 14); g.drawLine(x, y + 13, x, y + 1); // fill the icon g.setColor(focus ? new Color(153, 153, 204) : new Color(204, 204, 204)); // medium g.fillRect(x + 2, y + 2, 7, 12); g.drawLine(x + 9, y + 2, x + 9, y + 12); g.drawLine(x + 10, y + 3, x + 10, y + 11); g.drawLine(x + 11, y + 4, x + 11, y + 10); g.drawLine(x + 12, y + 5, x + 12, y + 9); g.drawLine(x + 13, y + 6, x + 13, y + 8); g.drawLine(x + 14, y + 7, x + 14, y + 7); // draw highlights g.setColor(focus ? new Color(204, 204, 255) : new Color(255, 255, 255)); // light g.drawLine(x + 1, y + 1, x + 8, y + 1); g.drawLine(x + 1, y + 2, x + 1, y + 13); g.drawLine(x + 2, y + 2, x + 2, y + 2); g.drawLine(x + 2, y + 6, x + 2, y + 6); g.drawLine(x + 2, y + 10, x + 2, y + 10); g.drawLine(x + 4, y + 4, x + 4, y + 4); g.drawLine(x + 4, y + 8, x + 4, y + 8); g.drawLine(x + 6, y + 2, x + 6, y + 2); g.drawLine(x + 6, y + 6, x + 6, y + 6); g.drawLine(x + 6, y + 10, x + 6, y + 10); // draw dots g.setColor(focus ? new Color(102, 102, 153) : Color.black); // dark g.drawLine(x + 3, y + 3, x + 3, y + 3); g.drawLine(x + 3, y + 7, x + 3, y + 7); g.drawLine(x + 3, y + 11, x + 3, y + 11); g.drawLine(x + 5, y + 5, x + 5, y + 5); g.drawLine(x + 5, y + 9, x + 5, y + 9); g.drawLine(x + 7, y + 3, x + 7, y + 3); g.drawLine(x + 7, y + 7, x + 7, y + 7); g.drawLine(x + 7, y + 11, x + 7, y + 11); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/045a5b41cdfa747889101d3993040acf89788bc4/MetalIconFactory.java/buggy/core/src/classpath/javax/javax/swing/plaf/metal/MetalIconFactory.java
g.setColor(focus ? new Color(204, 204, 255) : new Color(255, 255, 255));
if (focus) g.setColor(MetalLookAndFeel.getPrimaryControl()); else g.setColor(MetalLookAndFeel.getWhite());
public void paintIcon(Component c, Graphics g, int x, int y) { boolean focus = false; if (c != null) focus = c.hasFocus(); // TODO: pick up the colors from the look and feel // draw the outline g.setColor(Color.black); g.drawLine(x + 1, y, x + 7, y); g.drawLine(x + 8, y, x + 15, y + 7); g.drawLine(x + 14, y + 8, x + 8, y + 14); g.drawLine(x + 8, y + 14, x + 1, y + 14); g.drawLine(x, y + 13, x, y + 1); // fill the icon g.setColor(focus ? new Color(153, 153, 204) : new Color(204, 204, 204)); // medium g.fillRect(x + 2, y + 2, 7, 12); g.drawLine(x + 9, y + 2, x + 9, y + 12); g.drawLine(x + 10, y + 3, x + 10, y + 11); g.drawLine(x + 11, y + 4, x + 11, y + 10); g.drawLine(x + 12, y + 5, x + 12, y + 9); g.drawLine(x + 13, y + 6, x + 13, y + 8); g.drawLine(x + 14, y + 7, x + 14, y + 7); // draw highlights g.setColor(focus ? new Color(204, 204, 255) : new Color(255, 255, 255)); // light g.drawLine(x + 1, y + 1, x + 8, y + 1); g.drawLine(x + 1, y + 2, x + 1, y + 13); g.drawLine(x + 2, y + 2, x + 2, y + 2); g.drawLine(x + 2, y + 6, x + 2, y + 6); g.drawLine(x + 2, y + 10, x + 2, y + 10); g.drawLine(x + 4, y + 4, x + 4, y + 4); g.drawLine(x + 4, y + 8, x + 4, y + 8); g.drawLine(x + 6, y + 2, x + 6, y + 2); g.drawLine(x + 6, y + 6, x + 6, y + 6); g.drawLine(x + 6, y + 10, x + 6, y + 10); // draw dots g.setColor(focus ? new Color(102, 102, 153) : Color.black); // dark g.drawLine(x + 3, y + 3, x + 3, y + 3); g.drawLine(x + 3, y + 7, x + 3, y + 7); g.drawLine(x + 3, y + 11, x + 3, y + 11); g.drawLine(x + 5, y + 5, x + 5, y + 5); g.drawLine(x + 5, y + 9, x + 5, y + 9); g.drawLine(x + 7, y + 3, x + 7, y + 3); g.drawLine(x + 7, y + 7, x + 7, y + 7); g.drawLine(x + 7, y + 11, x + 7, y + 11); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/045a5b41cdfa747889101d3993040acf89788bc4/MetalIconFactory.java/buggy/core/src/classpath/javax/javax/swing/plaf/metal/MetalIconFactory.java
g.setColor(focus ? new Color(102, 102, 153) : Color.black); g.drawLine(x + 3, y + 3, x + 3, y + 3); g.drawLine(x + 3, y + 7, x + 3, y + 7); g.drawLine(x + 3, y + 11, x + 3, y + 11); g.drawLine(x + 5, y + 5, x + 5, y + 5); g.drawLine(x + 5, y + 9, x + 5, y + 9); g.drawLine(x + 7, y + 3, x + 7, y + 3); g.drawLine(x + 7, y + 7, x + 7, y + 7); g.drawLine(x + 7, y + 11, x + 7, y + 11);
}
public void paintIcon(Component c, Graphics g, int x, int y) { boolean focus = false; if (c != null) focus = c.hasFocus(); // TODO: pick up the colors from the look and feel // draw the outline g.setColor(Color.black); g.drawLine(x + 1, y, x + 7, y); g.drawLine(x + 8, y, x + 15, y + 7); g.drawLine(x + 14, y + 8, x + 8, y + 14); g.drawLine(x + 8, y + 14, x + 1, y + 14); g.drawLine(x, y + 13, x, y + 1); // fill the icon g.setColor(focus ? new Color(153, 153, 204) : new Color(204, 204, 204)); // medium g.fillRect(x + 2, y + 2, 7, 12); g.drawLine(x + 9, y + 2, x + 9, y + 12); g.drawLine(x + 10, y + 3, x + 10, y + 11); g.drawLine(x + 11, y + 4, x + 11, y + 10); g.drawLine(x + 12, y + 5, x + 12, y + 9); g.drawLine(x + 13, y + 6, x + 13, y + 8); g.drawLine(x + 14, y + 7, x + 14, y + 7); // draw highlights g.setColor(focus ? new Color(204, 204, 255) : new Color(255, 255, 255)); // light g.drawLine(x + 1, y + 1, x + 8, y + 1); g.drawLine(x + 1, y + 2, x + 1, y + 13); g.drawLine(x + 2, y + 2, x + 2, y + 2); g.drawLine(x + 2, y + 6, x + 2, y + 6); g.drawLine(x + 2, y + 10, x + 2, y + 10); g.drawLine(x + 4, y + 4, x + 4, y + 4); g.drawLine(x + 4, y + 8, x + 4, y + 8); g.drawLine(x + 6, y + 2, x + 6, y + 2); g.drawLine(x + 6, y + 6, x + 6, y + 6); g.drawLine(x + 6, y + 10, x + 6, y + 10); // draw dots g.setColor(focus ? new Color(102, 102, 153) : Color.black); // dark g.drawLine(x + 3, y + 3, x + 3, y + 3); g.drawLine(x + 3, y + 7, x + 3, y + 7); g.drawLine(x + 3, y + 11, x + 3, y + 11); g.drawLine(x + 5, y + 5, x + 5, y + 5); g.drawLine(x + 5, y + 9, x + 5, y + 9); g.drawLine(x + 7, y + 3, x + 7, y + 3); g.drawLine(x + 7, y + 7, x + 7, y + 7); g.drawLine(x + 7, y + 11, x + 7, y + 11); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/045a5b41cdfa747889101d3993040acf89788bc4/MetalIconFactory.java/buggy/core/src/classpath/javax/javax/swing/plaf/metal/MetalIconFactory.java
public void flush() throws BadLocationException
public void flush() throws BadLocationException
public void flush() throws BadLocationException { }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/963ae61676e8c35a9e0998e0b7de1f942db82a26/HTMLEditorKit.java/buggy/core/src/classpath/javax/javax/swing/text/html/HTMLEditorKit.java
public void flush() throws BadLocationException { }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/963ae61676e8c35a9e0998e0b7de1f942db82a26/HTMLEditorKit.java/buggy/core/src/classpath/javax/javax/swing/text/html/HTMLEditorKit.java
public void handleComment(char[] comment, int position) { }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/963ae61676e8c35a9e0998e0b7de1f942db82a26/HTMLEditorKit.java/buggy/core/src/classpath/javax/javax/swing/text/html/HTMLEditorKit.java
public void handleEndOfLineString(String end_of_line) { }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/963ae61676e8c35a9e0998e0b7de1f942db82a26/HTMLEditorKit.java/buggy/core/src/classpath/javax/javax/swing/text/html/HTMLEditorKit.java
public void handleEndTag(HTML.Tag tag, int position) { }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/963ae61676e8c35a9e0998e0b7de1f942db82a26/HTMLEditorKit.java/buggy/core/src/classpath/javax/javax/swing/text/html/HTMLEditorKit.java
public void handleError(String message, int position) { }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/963ae61676e8c35a9e0998e0b7de1f942db82a26/HTMLEditorKit.java/buggy/core/src/classpath/javax/javax/swing/text/html/HTMLEditorKit.java
int position )
int position)
public void handleSimpleTag(HTML.Tag tag, MutableAttributeSet attributes, int position ) { }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/963ae61676e8c35a9e0998e0b7de1f942db82a26/HTMLEditorKit.java/buggy/core/src/classpath/javax/javax/swing/text/html/HTMLEditorKit.java
public void handleSimpleTag(HTML.Tag tag, MutableAttributeSet attributes, int position ) { }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/963ae61676e8c35a9e0998e0b7de1f942db82a26/HTMLEditorKit.java/buggy/core/src/classpath/javax/javax/swing/text/html/HTMLEditorKit.java
public void handleStartTag(HTML.Tag tag, MutableAttributeSet attributes, int position ) { }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/963ae61676e8c35a9e0998e0b7de1f942db82a26/HTMLEditorKit.java/buggy/core/src/classpath/javax/javax/swing/text/html/HTMLEditorKit.java
public void handleText(char[] text, int position) { }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/963ae61676e8c35a9e0998e0b7de1f942db82a26/HTMLEditorKit.java/buggy/core/src/classpath/javax/javax/swing/text/html/HTMLEditorKit.java
throw new BAD_OPERATION("Invalid enumeration code " + code);
BAD_OPERATION bad = new BAD_OPERATION("Invalid policy code " + code); bad.minor = Minor.PolicyType; throw bad;
public static ServantRetentionPolicyValue from_int(int code) { try { return enume [ code ]; } catch (ArrayIndexOutOfBoundsException ex) { throw new BAD_OPERATION("Invalid enumeration code " + code); } }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/44e3ea509d80974dab547c4d1cf8c070d32bac86/ServantRetentionPolicyValue.java/clean/core/src/classpath/org/org/omg/PortableServer/ServantRetentionPolicyValue.java
if (keys == null) return; for (int i = 0; i < keys.length - 1; i+= 2) { Object key = keys[i]; KeyStroke keyStroke; if (key instanceof KeyStroke) keyStroke = (KeyStroke)key; else keyStroke = KeyStroke.getKeyStroke((String)key); retMap.put(keyStroke, keys[i+1]); }
public static void loadKeyBindings(InputMap retMap, Object[] keys) { // TODO: Implement this properly. }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/804045622bd8dd509311bab751f88cfa2f79345a/LookAndFeel.java/clean/core/src/classpath/javax/javax/swing/LookAndFeel.java
return null;
ComponentInputMap retMap = new ComponentInputMapUIResource(c); loadKeyBindings(retMap, keys); return retMap;
public static ComponentInputMap makeComponentInputMap(JComponent c, Object[] keys) { return null; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/804045622bd8dd509311bab751f88cfa2f79345a/LookAndFeel.java/clean/core/src/classpath/javax/javax/swing/LookAndFeel.java
return null;
InputMap retMap = new InputMapUIResource(); loadKeyBindings(retMap, keys); return retMap;
public static InputMap makeInputMap(Object[] keys) { return null; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/804045622bd8dd509311bab751f88cfa2f79345a/LookAndFeel.java/clean/core/src/classpath/javax/javax/swing/LookAndFeel.java
return null;
JTextComponent.KeyBinding[] retBindings = new JTextComponent.KeyBinding[keyBindingList.length / 2]; for (int i = 0; i < keyBindingList.length - 1; i+= 2) { KeyStroke stroke; if (keyBindingList[i] instanceof KeyStroke) stroke = (KeyStroke)keyBindingList[i]; else stroke = KeyStroke.getKeyStroke((String)keyBindingList[i]); retBindings[i/2] = new JTextComponent.KeyBinding(stroke, (String)keyBindingList[i+1]); } return retBindings;
public static JTextComponent.KeyBinding[] makeKeyBindings(Object[] keyBindingList) { return null; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/804045622bd8dd509311bab751f88cfa2f79345a/LookAndFeel.java/clean/core/src/classpath/javax/javax/swing/LookAndFeel.java
throw (Error) new InternalError().initCause(e);
throw (Error) new InternalError().initCause(e);
public Object clone() { try { return super.clone(); } catch (CloneNotSupportedException e) { throw (Error) new InternalError().initCause(e); // Impossible } }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/8b7bd34f9c789e32b3e30b7431e945f2f0ff17f5/BufferCapabilities.java/buggy/core/src/classpath/java/java/awt/BufferCapabilities.java
int origin = mymatch.index; int numRepeats = 0;
boolean match(CharIndexed input, REMatch mymatch) { int origin = mymatch.index; // number of times we've matched so far int numRepeats = 0; // Possible positions for the next repeat to match at REMatch newMatch = mymatch; REMatch last = null; REMatch current; // Add the '0-repeats' index // positions.elementAt(z) == position [] in input after <<z>> matches Vector positions = new Vector(); positions.addElement(newMatch); // Declare variables used in loop REMatch doables; REMatch doablesLast; REMatch recurrent; int lastIndex = mymatch.index; do { // Check for stingy match for each possibility. if ((stingy && (numRepeats >= min)) || alwaysEmpty) { REMatch result = matchRest(input, newMatch); if (result != null) { mymatch.assignFrom(result); mymatch.empty = (mymatch.index == origin); return true; } else { // Special case of {0}. It must always match an empty string. if (alwaysEmpty) return false; } } doables = null; doablesLast = null; // try next repeat at all possible positions for (current = newMatch; current != null; current = current.next) { recurrent = (REMatch) current.clone(); if (token.match(input, recurrent)) { // add all items in current to doables array if (doables == null) { doables = recurrent; doablesLast = recurrent; } else { // Order these from longest to shortest // Start by assuming longest (more repeats) doablesLast.next = recurrent; } // Find new doablesLast while (doablesLast.next != null) { doablesLast = doablesLast.next; } } } // if none of the possibilities worked out, break out of do/while if (doables == null) break; // reassign where the next repeat can match newMatch = doables; // increment how many repeats we've successfully found ++numRepeats; positions.addElement(newMatch); // doables.index == lastIndex occurs either // (1) when an empty string was the longest // that matched this token. // And this case occurs either // (1-1) when this token is always empty, // for example "()" or "(())". // (1-2) when this token is not always empty // but can match an empty string, for example, // "a*", "(a|)". // or // (2) when the same string matches this token many times. // For example, "acbab" itself matches "a.*b" and // its substrings "acb" and "ab" also match. if (doables.index == lastIndex) { if (doables.empty) { // Case (1): We break here, otherwise we will fall // into an endless loop. if (numRepeats < min) numRepeats = min; break; } else { // Case (2): We cannot break here because, for example, // "acbacb" matches "a.*b" up to 2 times but // not 3 times. So we have to check numRepeats >= min. // But we do not have to go further until numRepeats == max // because the more numRepeats grows, the shorter the // substring matching this token becomes. if (numRepeats > min) { // This means the previous match was successful, // and that must be the best match. This match // resulted in shortening the matched substring. numRepeats--; positions.remove(positions.size() - 1); break; } if (numRepeats == min) break; } } lastIndex = doables.index; } while (numRepeats < max); // If there aren't enough repeats, then fail if (numRepeats < min) return false; // We're greedy, but ease off until a true match is found int posIndex = positions.size(); // At this point we've either got too many or just the right amount. // See if this numRepeats works with the rest of the regexp. REMatch allResults = null; REMatch allResultsLast = null; REMatch results = null; int indexCount = posIndex - min; if (indexCount <= 0) { // This case occurs when we exited the previous do loop before // numRepeats >= min because an empty string matched the token. // In this case, an empty string can match as many times as // desired. indexCount = 1; } while (indexCount-- > 0) { --posIndex; newMatch = (REMatch) positions.elementAt(posIndex); results = matchRest(input, newMatch); if (results != null) { if (allResults == null) { allResults = results; allResultsLast = results; } else { // Order these from longest to shortest // Start by assuming longest (more repeats) allResultsLast.next = results; } // Find new doablesLast while (allResultsLast.next != null) { allResultsLast = allResultsLast.next; } } // else did not match rest of the tokens, try again on smaller sample // or break out when performing possessive matching if (possessive) break; } if (allResults != null) { mymatch.assignFrom(allResults); // does this get all? mymatch.empty = (mymatch.index == origin); return true; } // If we fall out, no matches. return false; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/5806c07c3eeedb0f4f92b9fbacf30c0f55915c25/RETokenRepeated.java/buggy/core/src/classpath/gnu/gnu/regexp/RETokenRepeated.java
REMatch last = null; REMatch current;
boolean match(CharIndexed input, REMatch mymatch) { int origin = mymatch.index; // number of times we've matched so far int numRepeats = 0; // Possible positions for the next repeat to match at REMatch newMatch = mymatch; REMatch last = null; REMatch current; // Add the '0-repeats' index // positions.elementAt(z) == position [] in input after <<z>> matches Vector positions = new Vector(); positions.addElement(newMatch); // Declare variables used in loop REMatch doables; REMatch doablesLast; REMatch recurrent; int lastIndex = mymatch.index; do { // Check for stingy match for each possibility. if ((stingy && (numRepeats >= min)) || alwaysEmpty) { REMatch result = matchRest(input, newMatch); if (result != null) { mymatch.assignFrom(result); mymatch.empty = (mymatch.index == origin); return true; } else { // Special case of {0}. It must always match an empty string. if (alwaysEmpty) return false; } } doables = null; doablesLast = null; // try next repeat at all possible positions for (current = newMatch; current != null; current = current.next) { recurrent = (REMatch) current.clone(); if (token.match(input, recurrent)) { // add all items in current to doables array if (doables == null) { doables = recurrent; doablesLast = recurrent; } else { // Order these from longest to shortest // Start by assuming longest (more repeats) doablesLast.next = recurrent; } // Find new doablesLast while (doablesLast.next != null) { doablesLast = doablesLast.next; } } } // if none of the possibilities worked out, break out of do/while if (doables == null) break; // reassign where the next repeat can match newMatch = doables; // increment how many repeats we've successfully found ++numRepeats; positions.addElement(newMatch); // doables.index == lastIndex occurs either // (1) when an empty string was the longest // that matched this token. // And this case occurs either // (1-1) when this token is always empty, // for example "()" or "(())". // (1-2) when this token is not always empty // but can match an empty string, for example, // "a*", "(a|)". // or // (2) when the same string matches this token many times. // For example, "acbab" itself matches "a.*b" and // its substrings "acb" and "ab" also match. if (doables.index == lastIndex) { if (doables.empty) { // Case (1): We break here, otherwise we will fall // into an endless loop. if (numRepeats < min) numRepeats = min; break; } else { // Case (2): We cannot break here because, for example, // "acbacb" matches "a.*b" up to 2 times but // not 3 times. So we have to check numRepeats >= min. // But we do not have to go further until numRepeats == max // because the more numRepeats grows, the shorter the // substring matching this token becomes. if (numRepeats > min) { // This means the previous match was successful, // and that must be the best match. This match // resulted in shortening the matched substring. numRepeats--; positions.remove(positions.size() - 1); break; } if (numRepeats == min) break; } } lastIndex = doables.index; } while (numRepeats < max); // If there aren't enough repeats, then fail if (numRepeats < min) return false; // We're greedy, but ease off until a true match is found int posIndex = positions.size(); // At this point we've either got too many or just the right amount. // See if this numRepeats works with the rest of the regexp. REMatch allResults = null; REMatch allResultsLast = null; REMatch results = null; int indexCount = posIndex - min; if (indexCount <= 0) { // This case occurs when we exited the previous do loop before // numRepeats >= min because an empty string matched the token. // In this case, an empty string can match as many times as // desired. indexCount = 1; } while (indexCount-- > 0) { --posIndex; newMatch = (REMatch) positions.elementAt(posIndex); results = matchRest(input, newMatch); if (results != null) { if (allResults == null) { allResults = results; allResultsLast = results; } else { // Order these from longest to shortest // Start by assuming longest (more repeats) allResultsLast.next = results; } // Find new doablesLast while (allResultsLast.next != null) { allResultsLast = allResultsLast.next; } } // else did not match rest of the tokens, try again on smaller sample // or break out when performing possessive matching if (possessive) break; } if (allResults != null) { mymatch.assignFrom(allResults); // does this get all? mymatch.empty = (mymatch.index == origin); return true; } // If we fall out, no matches. return false; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/5806c07c3eeedb0f4f92b9fbacf30c0f55915c25/RETokenRepeated.java/buggy/core/src/classpath/gnu/gnu/regexp/RETokenRepeated.java
Vector positions = new Vector(); positions.addElement(newMatch); REMatch doables; REMatch doablesLast; REMatch recurrent; int lastIndex = mymatch.index; do { if ((stingy && (numRepeats >= min)) || alwaysEmpty) {
if (alwaysEmpty) {
boolean match(CharIndexed input, REMatch mymatch) { int origin = mymatch.index; // number of times we've matched so far int numRepeats = 0; // Possible positions for the next repeat to match at REMatch newMatch = mymatch; REMatch last = null; REMatch current; // Add the '0-repeats' index // positions.elementAt(z) == position [] in input after <<z>> matches Vector positions = new Vector(); positions.addElement(newMatch); // Declare variables used in loop REMatch doables; REMatch doablesLast; REMatch recurrent; int lastIndex = mymatch.index; do { // Check for stingy match for each possibility. if ((stingy && (numRepeats >= min)) || alwaysEmpty) { REMatch result = matchRest(input, newMatch); if (result != null) { mymatch.assignFrom(result); mymatch.empty = (mymatch.index == origin); return true; } else { // Special case of {0}. It must always match an empty string. if (alwaysEmpty) return false; } } doables = null; doablesLast = null; // try next repeat at all possible positions for (current = newMatch; current != null; current = current.next) { recurrent = (REMatch) current.clone(); if (token.match(input, recurrent)) { // add all items in current to doables array if (doables == null) { doables = recurrent; doablesLast = recurrent; } else { // Order these from longest to shortest // Start by assuming longest (more repeats) doablesLast.next = recurrent; } // Find new doablesLast while (doablesLast.next != null) { doablesLast = doablesLast.next; } } } // if none of the possibilities worked out, break out of do/while if (doables == null) break; // reassign where the next repeat can match newMatch = doables; // increment how many repeats we've successfully found ++numRepeats; positions.addElement(newMatch); // doables.index == lastIndex occurs either // (1) when an empty string was the longest // that matched this token. // And this case occurs either // (1-1) when this token is always empty, // for example "()" or "(())". // (1-2) when this token is not always empty // but can match an empty string, for example, // "a*", "(a|)". // or // (2) when the same string matches this token many times. // For example, "acbab" itself matches "a.*b" and // its substrings "acb" and "ab" also match. if (doables.index == lastIndex) { if (doables.empty) { // Case (1): We break here, otherwise we will fall // into an endless loop. if (numRepeats < min) numRepeats = min; break; } else { // Case (2): We cannot break here because, for example, // "acbacb" matches "a.*b" up to 2 times but // not 3 times. So we have to check numRepeats >= min. // But we do not have to go further until numRepeats == max // because the more numRepeats grows, the shorter the // substring matching this token becomes. if (numRepeats > min) { // This means the previous match was successful, // and that must be the best match. This match // resulted in shortening the matched substring. numRepeats--; positions.remove(positions.size() - 1); break; } if (numRepeats == min) break; } } lastIndex = doables.index; } while (numRepeats < max); // If there aren't enough repeats, then fail if (numRepeats < min) return false; // We're greedy, but ease off until a true match is found int posIndex = positions.size(); // At this point we've either got too many or just the right amount. // See if this numRepeats works with the rest of the regexp. REMatch allResults = null; REMatch allResultsLast = null; REMatch results = null; int indexCount = posIndex - min; if (indexCount <= 0) { // This case occurs when we exited the previous do loop before // numRepeats >= min because an empty string matched the token. // In this case, an empty string can match as many times as // desired. indexCount = 1; } while (indexCount-- > 0) { --posIndex; newMatch = (REMatch) positions.elementAt(posIndex); results = matchRest(input, newMatch); if (results != null) { if (allResults == null) { allResults = results; allResultsLast = results; } else { // Order these from longest to shortest // Start by assuming longest (more repeats) allResultsLast.next = results; } // Find new doablesLast while (allResultsLast.next != null) { allResultsLast = allResultsLast.next; } } // else did not match rest of the tokens, try again on smaller sample // or break out when performing possessive matching if (possessive) break; } if (allResults != null) { mymatch.assignFrom(allResults); // does this get all? mymatch.empty = (mymatch.index == origin); return true; } // If we fall out, no matches. return false; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/5806c07c3eeedb0f4f92b9fbacf30c0f55915c25/RETokenRepeated.java/buggy/core/src/classpath/gnu/gnu/regexp/RETokenRepeated.java
mymatch.empty = (mymatch.index == origin);
boolean match(CharIndexed input, REMatch mymatch) { int origin = mymatch.index; // number of times we've matched so far int numRepeats = 0; // Possible positions for the next repeat to match at REMatch newMatch = mymatch; REMatch last = null; REMatch current; // Add the '0-repeats' index // positions.elementAt(z) == position [] in input after <<z>> matches Vector positions = new Vector(); positions.addElement(newMatch); // Declare variables used in loop REMatch doables; REMatch doablesLast; REMatch recurrent; int lastIndex = mymatch.index; do { // Check for stingy match for each possibility. if ((stingy && (numRepeats >= min)) || alwaysEmpty) { REMatch result = matchRest(input, newMatch); if (result != null) { mymatch.assignFrom(result); mymatch.empty = (mymatch.index == origin); return true; } else { // Special case of {0}. It must always match an empty string. if (alwaysEmpty) return false; } } doables = null; doablesLast = null; // try next repeat at all possible positions for (current = newMatch; current != null; current = current.next) { recurrent = (REMatch) current.clone(); if (token.match(input, recurrent)) { // add all items in current to doables array if (doables == null) { doables = recurrent; doablesLast = recurrent; } else { // Order these from longest to shortest // Start by assuming longest (more repeats) doablesLast.next = recurrent; } // Find new doablesLast while (doablesLast.next != null) { doablesLast = doablesLast.next; } } } // if none of the possibilities worked out, break out of do/while if (doables == null) break; // reassign where the next repeat can match newMatch = doables; // increment how many repeats we've successfully found ++numRepeats; positions.addElement(newMatch); // doables.index == lastIndex occurs either // (1) when an empty string was the longest // that matched this token. // And this case occurs either // (1-1) when this token is always empty, // for example "()" or "(())". // (1-2) when this token is not always empty // but can match an empty string, for example, // "a*", "(a|)". // or // (2) when the same string matches this token many times. // For example, "acbab" itself matches "a.*b" and // its substrings "acb" and "ab" also match. if (doables.index == lastIndex) { if (doables.empty) { // Case (1): We break here, otherwise we will fall // into an endless loop. if (numRepeats < min) numRepeats = min; break; } else { // Case (2): We cannot break here because, for example, // "acbacb" matches "a.*b" up to 2 times but // not 3 times. So we have to check numRepeats >= min. // But we do not have to go further until numRepeats == max // because the more numRepeats grows, the shorter the // substring matching this token becomes. if (numRepeats > min) { // This means the previous match was successful, // and that must be the best match. This match // resulted in shortening the matched substring. numRepeats--; positions.remove(positions.size() - 1); break; } if (numRepeats == min) break; } } lastIndex = doables.index; } while (numRepeats < max); // If there aren't enough repeats, then fail if (numRepeats < min) return false; // We're greedy, but ease off until a true match is found int posIndex = positions.size(); // At this point we've either got too many or just the right amount. // See if this numRepeats works with the rest of the regexp. REMatch allResults = null; REMatch allResultsLast = null; REMatch results = null; int indexCount = posIndex - min; if (indexCount <= 0) { // This case occurs when we exited the previous do loop before // numRepeats >= min because an empty string matched the token. // In this case, an empty string can match as many times as // desired. indexCount = 1; } while (indexCount-- > 0) { --posIndex; newMatch = (REMatch) positions.elementAt(posIndex); results = matchRest(input, newMatch); if (results != null) { if (allResults == null) { allResults = results; allResultsLast = results; } else { // Order these from longest to shortest // Start by assuming longest (more repeats) allResultsLast.next = results; } // Find new doablesLast while (allResultsLast.next != null) { allResultsLast = allResultsLast.next; } } // else did not match rest of the tokens, try again on smaller sample // or break out when performing possessive matching if (possessive) break; } if (allResults != null) { mymatch.assignFrom(allResults); // does this get all? mymatch.empty = (mymatch.index == origin); return true; } // If we fall out, no matches. return false; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/5806c07c3eeedb0f4f92b9fbacf30c0f55915c25/RETokenRepeated.java/buggy/core/src/classpath/gnu/gnu/regexp/RETokenRepeated.java
if (alwaysEmpty) return false;
return false;
boolean match(CharIndexed input, REMatch mymatch) { int origin = mymatch.index; // number of times we've matched so far int numRepeats = 0; // Possible positions for the next repeat to match at REMatch newMatch = mymatch; REMatch last = null; REMatch current; // Add the '0-repeats' index // positions.elementAt(z) == position [] in input after <<z>> matches Vector positions = new Vector(); positions.addElement(newMatch); // Declare variables used in loop REMatch doables; REMatch doablesLast; REMatch recurrent; int lastIndex = mymatch.index; do { // Check for stingy match for each possibility. if ((stingy && (numRepeats >= min)) || alwaysEmpty) { REMatch result = matchRest(input, newMatch); if (result != null) { mymatch.assignFrom(result); mymatch.empty = (mymatch.index == origin); return true; } else { // Special case of {0}. It must always match an empty string. if (alwaysEmpty) return false; } } doables = null; doablesLast = null; // try next repeat at all possible positions for (current = newMatch; current != null; current = current.next) { recurrent = (REMatch) current.clone(); if (token.match(input, recurrent)) { // add all items in current to doables array if (doables == null) { doables = recurrent; doablesLast = recurrent; } else { // Order these from longest to shortest // Start by assuming longest (more repeats) doablesLast.next = recurrent; } // Find new doablesLast while (doablesLast.next != null) { doablesLast = doablesLast.next; } } } // if none of the possibilities worked out, break out of do/while if (doables == null) break; // reassign where the next repeat can match newMatch = doables; // increment how many repeats we've successfully found ++numRepeats; positions.addElement(newMatch); // doables.index == lastIndex occurs either // (1) when an empty string was the longest // that matched this token. // And this case occurs either // (1-1) when this token is always empty, // for example "()" or "(())". // (1-2) when this token is not always empty // but can match an empty string, for example, // "a*", "(a|)". // or // (2) when the same string matches this token many times. // For example, "acbab" itself matches "a.*b" and // its substrings "acb" and "ab" also match. if (doables.index == lastIndex) { if (doables.empty) { // Case (1): We break here, otherwise we will fall // into an endless loop. if (numRepeats < min) numRepeats = min; break; } else { // Case (2): We cannot break here because, for example, // "acbacb" matches "a.*b" up to 2 times but // not 3 times. So we have to check numRepeats >= min. // But we do not have to go further until numRepeats == max // because the more numRepeats grows, the shorter the // substring matching this token becomes. if (numRepeats > min) { // This means the previous match was successful, // and that must be the best match. This match // resulted in shortening the matched substring. numRepeats--; positions.remove(positions.size() - 1); break; } if (numRepeats == min) break; } } lastIndex = doables.index; } while (numRepeats < max); // If there aren't enough repeats, then fail if (numRepeats < min) return false; // We're greedy, but ease off until a true match is found int posIndex = positions.size(); // At this point we've either got too many or just the right amount. // See if this numRepeats works with the rest of the regexp. REMatch allResults = null; REMatch allResultsLast = null; REMatch results = null; int indexCount = posIndex - min; if (indexCount <= 0) { // This case occurs when we exited the previous do loop before // numRepeats >= min because an empty string matched the token. // In this case, an empty string can match as many times as // desired. indexCount = 1; } while (indexCount-- > 0) { --posIndex; newMatch = (REMatch) positions.elementAt(posIndex); results = matchRest(input, newMatch); if (results != null) { if (allResults == null) { allResults = results; allResultsLast = results; } else { // Order these from longest to shortest // Start by assuming longest (more repeats) allResultsLast.next = results; } // Find new doablesLast while (allResultsLast.next != null) { allResultsLast = allResultsLast.next; } } // else did not match rest of the tokens, try again on smaller sample // or break out when performing possessive matching if (possessive) break; } if (allResults != null) { mymatch.assignFrom(allResults); // does this get all? mymatch.empty = (mymatch.index == origin); return true; } // If we fall out, no matches. return false; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/5806c07c3eeedb0f4f92b9fbacf30c0f55915c25/RETokenRepeated.java/buggy/core/src/classpath/gnu/gnu/regexp/RETokenRepeated.java
doables = null; doablesLast = null;
int numRepeats = 0;
boolean match(CharIndexed input, REMatch mymatch) { int origin = mymatch.index; // number of times we've matched so far int numRepeats = 0; // Possible positions for the next repeat to match at REMatch newMatch = mymatch; REMatch last = null; REMatch current; // Add the '0-repeats' index // positions.elementAt(z) == position [] in input after <<z>> matches Vector positions = new Vector(); positions.addElement(newMatch); // Declare variables used in loop REMatch doables; REMatch doablesLast; REMatch recurrent; int lastIndex = mymatch.index; do { // Check for stingy match for each possibility. if ((stingy && (numRepeats >= min)) || alwaysEmpty) { REMatch result = matchRest(input, newMatch); if (result != null) { mymatch.assignFrom(result); mymatch.empty = (mymatch.index == origin); return true; } else { // Special case of {0}. It must always match an empty string. if (alwaysEmpty) return false; } } doables = null; doablesLast = null; // try next repeat at all possible positions for (current = newMatch; current != null; current = current.next) { recurrent = (REMatch) current.clone(); if (token.match(input, recurrent)) { // add all items in current to doables array if (doables == null) { doables = recurrent; doablesLast = recurrent; } else { // Order these from longest to shortest // Start by assuming longest (more repeats) doablesLast.next = recurrent; } // Find new doablesLast while (doablesLast.next != null) { doablesLast = doablesLast.next; } } } // if none of the possibilities worked out, break out of do/while if (doables == null) break; // reassign where the next repeat can match newMatch = doables; // increment how many repeats we've successfully found ++numRepeats; positions.addElement(newMatch); // doables.index == lastIndex occurs either // (1) when an empty string was the longest // that matched this token. // And this case occurs either // (1-1) when this token is always empty, // for example "()" or "(())". // (1-2) when this token is not always empty // but can match an empty string, for example, // "a*", "(a|)". // or // (2) when the same string matches this token many times. // For example, "acbab" itself matches "a.*b" and // its substrings "acb" and "ab" also match. if (doables.index == lastIndex) { if (doables.empty) { // Case (1): We break here, otherwise we will fall // into an endless loop. if (numRepeats < min) numRepeats = min; break; } else { // Case (2): We cannot break here because, for example, // "acbacb" matches "a.*b" up to 2 times but // not 3 times. So we have to check numRepeats >= min. // But we do not have to go further until numRepeats == max // because the more numRepeats grows, the shorter the // substring matching this token becomes. if (numRepeats > min) { // This means the previous match was successful, // and that must be the best match. This match // resulted in shortening the matched substring. numRepeats--; positions.remove(positions.size() - 1); break; } if (numRepeats == min) break; } } lastIndex = doables.index; } while (numRepeats < max); // If there aren't enough repeats, then fail if (numRepeats < min) return false; // We're greedy, but ease off until a true match is found int posIndex = positions.size(); // At this point we've either got too many or just the right amount. // See if this numRepeats works with the rest of the regexp. REMatch allResults = null; REMatch allResultsLast = null; REMatch results = null; int indexCount = posIndex - min; if (indexCount <= 0) { // This case occurs when we exited the previous do loop before // numRepeats >= min because an empty string matched the token. // In this case, an empty string can match as many times as // desired. indexCount = 1; } while (indexCount-- > 0) { --posIndex; newMatch = (REMatch) positions.elementAt(posIndex); results = matchRest(input, newMatch); if (results != null) { if (allResults == null) { allResults = results; allResultsLast = results; } else { // Order these from longest to shortest // Start by assuming longest (more repeats) allResultsLast.next = results; } // Find new doablesLast while (allResultsLast.next != null) { allResultsLast = allResultsLast.next; } } // else did not match rest of the tokens, try again on smaller sample // or break out when performing possessive matching if (possessive) break; } if (allResults != null) { mymatch.assignFrom(allResults); // does this get all? mymatch.empty = (mymatch.index == origin); return true; } // If we fall out, no matches. return false; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/5806c07c3eeedb0f4f92b9fbacf30c0f55915c25/RETokenRepeated.java/buggy/core/src/classpath/gnu/gnu/regexp/RETokenRepeated.java
for (current = newMatch; current != null; current = current.next) { recurrent = (REMatch) current.clone(); if (token.match(input, recurrent)) { if (doables == null) { doables = recurrent; doablesLast = recurrent; } else { doablesLast.next = recurrent; } while (doablesLast.next != null) { doablesLast = doablesLast.next; } } } if (doables == null) break;
REMatch doables; int lastIndex = mymatch.index; boolean emptyMatchFound = false; while (numRepeats < min) { doables = findDoables(token, input, newMatch); if (doables == null) return false;
boolean match(CharIndexed input, REMatch mymatch) { int origin = mymatch.index; // number of times we've matched so far int numRepeats = 0; // Possible positions for the next repeat to match at REMatch newMatch = mymatch; REMatch last = null; REMatch current; // Add the '0-repeats' index // positions.elementAt(z) == position [] in input after <<z>> matches Vector positions = new Vector(); positions.addElement(newMatch); // Declare variables used in loop REMatch doables; REMatch doablesLast; REMatch recurrent; int lastIndex = mymatch.index; do { // Check for stingy match for each possibility. if ((stingy && (numRepeats >= min)) || alwaysEmpty) { REMatch result = matchRest(input, newMatch); if (result != null) { mymatch.assignFrom(result); mymatch.empty = (mymatch.index == origin); return true; } else { // Special case of {0}. It must always match an empty string. if (alwaysEmpty) return false; } } doables = null; doablesLast = null; // try next repeat at all possible positions for (current = newMatch; current != null; current = current.next) { recurrent = (REMatch) current.clone(); if (token.match(input, recurrent)) { // add all items in current to doables array if (doables == null) { doables = recurrent; doablesLast = recurrent; } else { // Order these from longest to shortest // Start by assuming longest (more repeats) doablesLast.next = recurrent; } // Find new doablesLast while (doablesLast.next != null) { doablesLast = doablesLast.next; } } } // if none of the possibilities worked out, break out of do/while if (doables == null) break; // reassign where the next repeat can match newMatch = doables; // increment how many repeats we've successfully found ++numRepeats; positions.addElement(newMatch); // doables.index == lastIndex occurs either // (1) when an empty string was the longest // that matched this token. // And this case occurs either // (1-1) when this token is always empty, // for example "()" or "(())". // (1-2) when this token is not always empty // but can match an empty string, for example, // "a*", "(a|)". // or // (2) when the same string matches this token many times. // For example, "acbab" itself matches "a.*b" and // its substrings "acb" and "ab" also match. if (doables.index == lastIndex) { if (doables.empty) { // Case (1): We break here, otherwise we will fall // into an endless loop. if (numRepeats < min) numRepeats = min; break; } else { // Case (2): We cannot break here because, for example, // "acbacb" matches "a.*b" up to 2 times but // not 3 times. So we have to check numRepeats >= min. // But we do not have to go further until numRepeats == max // because the more numRepeats grows, the shorter the // substring matching this token becomes. if (numRepeats > min) { // This means the previous match was successful, // and that must be the best match. This match // resulted in shortening the matched substring. numRepeats--; positions.remove(positions.size() - 1); break; } if (numRepeats == min) break; } } lastIndex = doables.index; } while (numRepeats < max); // If there aren't enough repeats, then fail if (numRepeats < min) return false; // We're greedy, but ease off until a true match is found int posIndex = positions.size(); // At this point we've either got too many or just the right amount. // See if this numRepeats works with the rest of the regexp. REMatch allResults = null; REMatch allResultsLast = null; REMatch results = null; int indexCount = posIndex - min; if (indexCount <= 0) { // This case occurs when we exited the previous do loop before // numRepeats >= min because an empty string matched the token. // In this case, an empty string can match as many times as // desired. indexCount = 1; } while (indexCount-- > 0) { --posIndex; newMatch = (REMatch) positions.elementAt(posIndex); results = matchRest(input, newMatch); if (results != null) { if (allResults == null) { allResults = results; allResultsLast = results; } else { // Order these from longest to shortest // Start by assuming longest (more repeats) allResultsLast.next = results; } // Find new doablesLast while (allResultsLast.next != null) { allResultsLast = allResultsLast.next; } } // else did not match rest of the tokens, try again on smaller sample // or break out when performing possessive matching if (possessive) break; } if (allResults != null) { mymatch.assignFrom(allResults); // does this get all? mymatch.empty = (mymatch.index == origin); return true; } // If we fall out, no matches. return false; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/5806c07c3eeedb0f4f92b9fbacf30c0f55915c25/RETokenRepeated.java/buggy/core/src/classpath/gnu/gnu/regexp/RETokenRepeated.java
positions.addElement(newMatch);
if (newMatch.empty) { numRepeats = min; emptyMatchFound = true; break; } lastIndex = newMatch.index; } Vector positions = new Vector(); while (numRepeats <= max) { if (stopMatchingIfSatisfied && stingy) { REMatch results = matchRest(input, newMatch); if (results != null) { mymatch.assignFrom(results); return true; } } positions.add(newMatch); if (emptyMatchFound) break; doables = findDoables(token, input, newMatch); if (doables == null) break;
boolean match(CharIndexed input, REMatch mymatch) { int origin = mymatch.index; // number of times we've matched so far int numRepeats = 0; // Possible positions for the next repeat to match at REMatch newMatch = mymatch; REMatch last = null; REMatch current; // Add the '0-repeats' index // positions.elementAt(z) == position [] in input after <<z>> matches Vector positions = new Vector(); positions.addElement(newMatch); // Declare variables used in loop REMatch doables; REMatch doablesLast; REMatch recurrent; int lastIndex = mymatch.index; do { // Check for stingy match for each possibility. if ((stingy && (numRepeats >= min)) || alwaysEmpty) { REMatch result = matchRest(input, newMatch); if (result != null) { mymatch.assignFrom(result); mymatch.empty = (mymatch.index == origin); return true; } else { // Special case of {0}. It must always match an empty string. if (alwaysEmpty) return false; } } doables = null; doablesLast = null; // try next repeat at all possible positions for (current = newMatch; current != null; current = current.next) { recurrent = (REMatch) current.clone(); if (token.match(input, recurrent)) { // add all items in current to doables array if (doables == null) { doables = recurrent; doablesLast = recurrent; } else { // Order these from longest to shortest // Start by assuming longest (more repeats) doablesLast.next = recurrent; } // Find new doablesLast while (doablesLast.next != null) { doablesLast = doablesLast.next; } } } // if none of the possibilities worked out, break out of do/while if (doables == null) break; // reassign where the next repeat can match newMatch = doables; // increment how many repeats we've successfully found ++numRepeats; positions.addElement(newMatch); // doables.index == lastIndex occurs either // (1) when an empty string was the longest // that matched this token. // And this case occurs either // (1-1) when this token is always empty, // for example "()" or "(())". // (1-2) when this token is not always empty // but can match an empty string, for example, // "a*", "(a|)". // or // (2) when the same string matches this token many times. // For example, "acbab" itself matches "a.*b" and // its substrings "acb" and "ab" also match. if (doables.index == lastIndex) { if (doables.empty) { // Case (1): We break here, otherwise we will fall // into an endless loop. if (numRepeats < min) numRepeats = min; break; } else { // Case (2): We cannot break here because, for example, // "acbacb" matches "a.*b" up to 2 times but // not 3 times. So we have to check numRepeats >= min. // But we do not have to go further until numRepeats == max // because the more numRepeats grows, the shorter the // substring matching this token becomes. if (numRepeats > min) { // This means the previous match was successful, // and that must be the best match. This match // resulted in shortening the matched substring. numRepeats--; positions.remove(positions.size() - 1); break; } if (numRepeats == min) break; } } lastIndex = doables.index; } while (numRepeats < max); // If there aren't enough repeats, then fail if (numRepeats < min) return false; // We're greedy, but ease off until a true match is found int posIndex = positions.size(); // At this point we've either got too many or just the right amount. // See if this numRepeats works with the rest of the regexp. REMatch allResults = null; REMatch allResultsLast = null; REMatch results = null; int indexCount = posIndex - min; if (indexCount <= 0) { // This case occurs when we exited the previous do loop before // numRepeats >= min because an empty string matched the token. // In this case, an empty string can match as many times as // desired. indexCount = 1; } while (indexCount-- > 0) { --posIndex; newMatch = (REMatch) positions.elementAt(posIndex); results = matchRest(input, newMatch); if (results != null) { if (allResults == null) { allResults = results; allResultsLast = results; } else { // Order these from longest to shortest // Start by assuming longest (more repeats) allResultsLast.next = results; } // Find new doablesLast while (allResultsLast.next != null) { allResultsLast = allResultsLast.next; } } // else did not match rest of the tokens, try again on smaller sample // or break out when performing possessive matching if (possessive) break; } if (allResults != null) { mymatch.assignFrom(allResults); // does this get all? mymatch.empty = (mymatch.index == origin); return true; } // If we fall out, no matches. return false; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/5806c07c3eeedb0f4f92b9fbacf30c0f55915c25/RETokenRepeated.java/buggy/core/src/classpath/gnu/gnu/regexp/RETokenRepeated.java
boolean match(CharIndexed input, REMatch mymatch) { int origin = mymatch.index; // number of times we've matched so far int numRepeats = 0; // Possible positions for the next repeat to match at REMatch newMatch = mymatch; REMatch last = null; REMatch current; // Add the '0-repeats' index // positions.elementAt(z) == position [] in input after <<z>> matches Vector positions = new Vector(); positions.addElement(newMatch); // Declare variables used in loop REMatch doables; REMatch doablesLast; REMatch recurrent; int lastIndex = mymatch.index; do { // Check for stingy match for each possibility. if ((stingy && (numRepeats >= min)) || alwaysEmpty) { REMatch result = matchRest(input, newMatch); if (result != null) { mymatch.assignFrom(result); mymatch.empty = (mymatch.index == origin); return true; } else { // Special case of {0}. It must always match an empty string. if (alwaysEmpty) return false; } } doables = null; doablesLast = null; // try next repeat at all possible positions for (current = newMatch; current != null; current = current.next) { recurrent = (REMatch) current.clone(); if (token.match(input, recurrent)) { // add all items in current to doables array if (doables == null) { doables = recurrent; doablesLast = recurrent; } else { // Order these from longest to shortest // Start by assuming longest (more repeats) doablesLast.next = recurrent; } // Find new doablesLast while (doablesLast.next != null) { doablesLast = doablesLast.next; } } } // if none of the possibilities worked out, break out of do/while if (doables == null) break; // reassign where the next repeat can match newMatch = doables; // increment how many repeats we've successfully found ++numRepeats; positions.addElement(newMatch); // doables.index == lastIndex occurs either // (1) when an empty string was the longest // that matched this token. // And this case occurs either // (1-1) when this token is always empty, // for example "()" or "(())". // (1-2) when this token is not always empty // but can match an empty string, for example, // "a*", "(a|)". // or // (2) when the same string matches this token many times. // For example, "acbab" itself matches "a.*b" and // its substrings "acb" and "ab" also match. if (doables.index == lastIndex) { if (doables.empty) { // Case (1): We break here, otherwise we will fall // into an endless loop. if (numRepeats < min) numRepeats = min; break; } else { // Case (2): We cannot break here because, for example, // "acbacb" matches "a.*b" up to 2 times but // not 3 times. So we have to check numRepeats >= min. // But we do not have to go further until numRepeats == max // because the more numRepeats grows, the shorter the // substring matching this token becomes. if (numRepeats > min) { // This means the previous match was successful, // and that must be the best match. This match // resulted in shortening the matched substring. numRepeats--; positions.remove(positions.size() - 1); break; } if (numRepeats == min) break; } } lastIndex = doables.index; } while (numRepeats < max); // If there aren't enough repeats, then fail if (numRepeats < min) return false; // We're greedy, but ease off until a true match is found int posIndex = positions.size(); // At this point we've either got too many or just the right amount. // See if this numRepeats works with the rest of the regexp. REMatch allResults = null; REMatch allResultsLast = null; REMatch results = null; int indexCount = posIndex - min; if (indexCount <= 0) { // This case occurs when we exited the previous do loop before // numRepeats >= min because an empty string matched the token. // In this case, an empty string can match as many times as // desired. indexCount = 1; } while (indexCount-- > 0) { --posIndex; newMatch = (REMatch) positions.elementAt(posIndex); results = matchRest(input, newMatch); if (results != null) { if (allResults == null) { allResults = results; allResultsLast = results; } else { // Order these from longest to shortest // Start by assuming longest (more repeats) allResultsLast.next = results; } // Find new doablesLast while (allResultsLast.next != null) { allResultsLast = allResultsLast.next; } } // else did not match rest of the tokens, try again on smaller sample // or break out when performing possessive matching if (possessive) break; } if (allResults != null) { mymatch.assignFrom(allResults); // does this get all? mymatch.empty = (mymatch.index == origin); return true; } // If we fall out, no matches. return false; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/5806c07c3eeedb0f4f92b9fbacf30c0f55915c25/RETokenRepeated.java/buggy/core/src/classpath/gnu/gnu/regexp/RETokenRepeated.java
if (numRepeats < min) numRepeats = min; break;
emptyMatchFound = true;
boolean match(CharIndexed input, REMatch mymatch) { int origin = mymatch.index; // number of times we've matched so far int numRepeats = 0; // Possible positions for the next repeat to match at REMatch newMatch = mymatch; REMatch last = null; REMatch current; // Add the '0-repeats' index // positions.elementAt(z) == position [] in input after <<z>> matches Vector positions = new Vector(); positions.addElement(newMatch); // Declare variables used in loop REMatch doables; REMatch doablesLast; REMatch recurrent; int lastIndex = mymatch.index; do { // Check for stingy match for each possibility. if ((stingy && (numRepeats >= min)) || alwaysEmpty) { REMatch result = matchRest(input, newMatch); if (result != null) { mymatch.assignFrom(result); mymatch.empty = (mymatch.index == origin); return true; } else { // Special case of {0}. It must always match an empty string. if (alwaysEmpty) return false; } } doables = null; doablesLast = null; // try next repeat at all possible positions for (current = newMatch; current != null; current = current.next) { recurrent = (REMatch) current.clone(); if (token.match(input, recurrent)) { // add all items in current to doables array if (doables == null) { doables = recurrent; doablesLast = recurrent; } else { // Order these from longest to shortest // Start by assuming longest (more repeats) doablesLast.next = recurrent; } // Find new doablesLast while (doablesLast.next != null) { doablesLast = doablesLast.next; } } } // if none of the possibilities worked out, break out of do/while if (doables == null) break; // reassign where the next repeat can match newMatch = doables; // increment how many repeats we've successfully found ++numRepeats; positions.addElement(newMatch); // doables.index == lastIndex occurs either // (1) when an empty string was the longest // that matched this token. // And this case occurs either // (1-1) when this token is always empty, // for example "()" or "(())". // (1-2) when this token is not always empty // but can match an empty string, for example, // "a*", "(a|)". // or // (2) when the same string matches this token many times. // For example, "acbab" itself matches "a.*b" and // its substrings "acb" and "ab" also match. if (doables.index == lastIndex) { if (doables.empty) { // Case (1): We break here, otherwise we will fall // into an endless loop. if (numRepeats < min) numRepeats = min; break; } else { // Case (2): We cannot break here because, for example, // "acbacb" matches "a.*b" up to 2 times but // not 3 times. So we have to check numRepeats >= min. // But we do not have to go further until numRepeats == max // because the more numRepeats grows, the shorter the // substring matching this token becomes. if (numRepeats > min) { // This means the previous match was successful, // and that must be the best match. This match // resulted in shortening the matched substring. numRepeats--; positions.remove(positions.size() - 1); break; } if (numRepeats == min) break; } } lastIndex = doables.index; } while (numRepeats < max); // If there aren't enough repeats, then fail if (numRepeats < min) return false; // We're greedy, but ease off until a true match is found int posIndex = positions.size(); // At this point we've either got too many or just the right amount. // See if this numRepeats works with the rest of the regexp. REMatch allResults = null; REMatch allResultsLast = null; REMatch results = null; int indexCount = posIndex - min; if (indexCount <= 0) { // This case occurs when we exited the previous do loop before // numRepeats >= min because an empty string matched the token. // In this case, an empty string can match as many times as // desired. indexCount = 1; } while (indexCount-- > 0) { --posIndex; newMatch = (REMatch) positions.elementAt(posIndex); results = matchRest(input, newMatch); if (results != null) { if (allResults == null) { allResults = results; allResultsLast = results; } else { // Order these from longest to shortest // Start by assuming longest (more repeats) allResultsLast.next = results; } // Find new doablesLast while (allResultsLast.next != null) { allResultsLast = allResultsLast.next; } } // else did not match rest of the tokens, try again on smaller sample // or break out when performing possessive matching if (possessive) break; } if (allResults != null) { mymatch.assignFrom(allResults); // does this get all? mymatch.empty = (mymatch.index == origin); return true; } // If we fall out, no matches. return false; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/5806c07c3eeedb0f4f92b9fbacf30c0f55915c25/RETokenRepeated.java/buggy/core/src/classpath/gnu/gnu/regexp/RETokenRepeated.java
if (numRepeats > min) { numRepeats--; positions.remove(positions.size() - 1); break;
if (!stingy) break;
boolean match(CharIndexed input, REMatch mymatch) { int origin = mymatch.index; // number of times we've matched so far int numRepeats = 0; // Possible positions for the next repeat to match at REMatch newMatch = mymatch; REMatch last = null; REMatch current; // Add the '0-repeats' index // positions.elementAt(z) == position [] in input after <<z>> matches Vector positions = new Vector(); positions.addElement(newMatch); // Declare variables used in loop REMatch doables; REMatch doablesLast; REMatch recurrent; int lastIndex = mymatch.index; do { // Check for stingy match for each possibility. if ((stingy && (numRepeats >= min)) || alwaysEmpty) { REMatch result = matchRest(input, newMatch); if (result != null) { mymatch.assignFrom(result); mymatch.empty = (mymatch.index == origin); return true; } else { // Special case of {0}. It must always match an empty string. if (alwaysEmpty) return false; } } doables = null; doablesLast = null; // try next repeat at all possible positions for (current = newMatch; current != null; current = current.next) { recurrent = (REMatch) current.clone(); if (token.match(input, recurrent)) { // add all items in current to doables array if (doables == null) { doables = recurrent; doablesLast = recurrent; } else { // Order these from longest to shortest // Start by assuming longest (more repeats) doablesLast.next = recurrent; } // Find new doablesLast while (doablesLast.next != null) { doablesLast = doablesLast.next; } } } // if none of the possibilities worked out, break out of do/while if (doables == null) break; // reassign where the next repeat can match newMatch = doables; // increment how many repeats we've successfully found ++numRepeats; positions.addElement(newMatch); // doables.index == lastIndex occurs either // (1) when an empty string was the longest // that matched this token. // And this case occurs either // (1-1) when this token is always empty, // for example "()" or "(())". // (1-2) when this token is not always empty // but can match an empty string, for example, // "a*", "(a|)". // or // (2) when the same string matches this token many times. // For example, "acbab" itself matches "a.*b" and // its substrings "acb" and "ab" also match. if (doables.index == lastIndex) { if (doables.empty) { // Case (1): We break here, otherwise we will fall // into an endless loop. if (numRepeats < min) numRepeats = min; break; } else { // Case (2): We cannot break here because, for example, // "acbacb" matches "a.*b" up to 2 times but // not 3 times. So we have to check numRepeats >= min. // But we do not have to go further until numRepeats == max // because the more numRepeats grows, the shorter the // substring matching this token becomes. if (numRepeats > min) { // This means the previous match was successful, // and that must be the best match. This match // resulted in shortening the matched substring. numRepeats--; positions.remove(positions.size() - 1); break; } if (numRepeats == min) break; } } lastIndex = doables.index; } while (numRepeats < max); // If there aren't enough repeats, then fail if (numRepeats < min) return false; // We're greedy, but ease off until a true match is found int posIndex = positions.size(); // At this point we've either got too many or just the right amount. // See if this numRepeats works with the rest of the regexp. REMatch allResults = null; REMatch allResultsLast = null; REMatch results = null; int indexCount = posIndex - min; if (indexCount <= 0) { // This case occurs when we exited the previous do loop before // numRepeats >= min because an empty string matched the token. // In this case, an empty string can match as many times as // desired. indexCount = 1; } while (indexCount-- > 0) { --posIndex; newMatch = (REMatch) positions.elementAt(posIndex); results = matchRest(input, newMatch); if (results != null) { if (allResults == null) { allResults = results; allResultsLast = results; } else { // Order these from longest to shortest // Start by assuming longest (more repeats) allResultsLast.next = results; } // Find new doablesLast while (allResultsLast.next != null) { allResultsLast = allResultsLast.next; } } // else did not match rest of the tokens, try again on smaller sample // or break out when performing possessive matching if (possessive) break; } if (allResults != null) { mymatch.assignFrom(allResults); // does this get all? mymatch.empty = (mymatch.index == origin); return true; } // If we fall out, no matches. return false; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/5806c07c3eeedb0f4f92b9fbacf30c0f55915c25/RETokenRepeated.java/buggy/core/src/classpath/gnu/gnu/regexp/RETokenRepeated.java
if (numRepeats == min) break;
boolean match(CharIndexed input, REMatch mymatch) { int origin = mymatch.index; // number of times we've matched so far int numRepeats = 0; // Possible positions for the next repeat to match at REMatch newMatch = mymatch; REMatch last = null; REMatch current; // Add the '0-repeats' index // positions.elementAt(z) == position [] in input after <<z>> matches Vector positions = new Vector(); positions.addElement(newMatch); // Declare variables used in loop REMatch doables; REMatch doablesLast; REMatch recurrent; int lastIndex = mymatch.index; do { // Check for stingy match for each possibility. if ((stingy && (numRepeats >= min)) || alwaysEmpty) { REMatch result = matchRest(input, newMatch); if (result != null) { mymatch.assignFrom(result); mymatch.empty = (mymatch.index == origin); return true; } else { // Special case of {0}. It must always match an empty string. if (alwaysEmpty) return false; } } doables = null; doablesLast = null; // try next repeat at all possible positions for (current = newMatch; current != null; current = current.next) { recurrent = (REMatch) current.clone(); if (token.match(input, recurrent)) { // add all items in current to doables array if (doables == null) { doables = recurrent; doablesLast = recurrent; } else { // Order these from longest to shortest // Start by assuming longest (more repeats) doablesLast.next = recurrent; } // Find new doablesLast while (doablesLast.next != null) { doablesLast = doablesLast.next; } } } // if none of the possibilities worked out, break out of do/while if (doables == null) break; // reassign where the next repeat can match newMatch = doables; // increment how many repeats we've successfully found ++numRepeats; positions.addElement(newMatch); // doables.index == lastIndex occurs either // (1) when an empty string was the longest // that matched this token. // And this case occurs either // (1-1) when this token is always empty, // for example "()" or "(())". // (1-2) when this token is not always empty // but can match an empty string, for example, // "a*", "(a|)". // or // (2) when the same string matches this token many times. // For example, "acbab" itself matches "a.*b" and // its substrings "acb" and "ab" also match. if (doables.index == lastIndex) { if (doables.empty) { // Case (1): We break here, otherwise we will fall // into an endless loop. if (numRepeats < min) numRepeats = min; break; } else { // Case (2): We cannot break here because, for example, // "acbacb" matches "a.*b" up to 2 times but // not 3 times. So we have to check numRepeats >= min. // But we do not have to go further until numRepeats == max // because the more numRepeats grows, the shorter the // substring matching this token becomes. if (numRepeats > min) { // This means the previous match was successful, // and that must be the best match. This match // resulted in shortening the matched substring. numRepeats--; positions.remove(positions.size() - 1); break; } if (numRepeats == min) break; } } lastIndex = doables.index; } while (numRepeats < max); // If there aren't enough repeats, then fail if (numRepeats < min) return false; // We're greedy, but ease off until a true match is found int posIndex = positions.size(); // At this point we've either got too many or just the right amount. // See if this numRepeats works with the rest of the regexp. REMatch allResults = null; REMatch allResultsLast = null; REMatch results = null; int indexCount = posIndex - min; if (indexCount <= 0) { // This case occurs when we exited the previous do loop before // numRepeats >= min because an empty string matched the token. // In this case, an empty string can match as many times as // desired. indexCount = 1; } while (indexCount-- > 0) { --posIndex; newMatch = (REMatch) positions.elementAt(posIndex); results = matchRest(input, newMatch); if (results != null) { if (allResults == null) { allResults = results; allResultsLast = results; } else { // Order these from longest to shortest // Start by assuming longest (more repeats) allResultsLast.next = results; } // Find new doablesLast while (allResultsLast.next != null) { allResultsLast = allResultsLast.next; } } // else did not match rest of the tokens, try again on smaller sample // or break out when performing possessive matching if (possessive) break; } if (allResults != null) { mymatch.assignFrom(allResults); // does this get all? mymatch.empty = (mymatch.index == origin); return true; } // If we fall out, no matches. return false; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/5806c07c3eeedb0f4f92b9fbacf30c0f55915c25/RETokenRepeated.java/buggy/core/src/classpath/gnu/gnu/regexp/RETokenRepeated.java
lastIndex = doables.index; } while (numRepeats < max);
boolean match(CharIndexed input, REMatch mymatch) { int origin = mymatch.index; // number of times we've matched so far int numRepeats = 0; // Possible positions for the next repeat to match at REMatch newMatch = mymatch; REMatch last = null; REMatch current; // Add the '0-repeats' index // positions.elementAt(z) == position [] in input after <<z>> matches Vector positions = new Vector(); positions.addElement(newMatch); // Declare variables used in loop REMatch doables; REMatch doablesLast; REMatch recurrent; int lastIndex = mymatch.index; do { // Check for stingy match for each possibility. if ((stingy && (numRepeats >= min)) || alwaysEmpty) { REMatch result = matchRest(input, newMatch); if (result != null) { mymatch.assignFrom(result); mymatch.empty = (mymatch.index == origin); return true; } else { // Special case of {0}. It must always match an empty string. if (alwaysEmpty) return false; } } doables = null; doablesLast = null; // try next repeat at all possible positions for (current = newMatch; current != null; current = current.next) { recurrent = (REMatch) current.clone(); if (token.match(input, recurrent)) { // add all items in current to doables array if (doables == null) { doables = recurrent; doablesLast = recurrent; } else { // Order these from longest to shortest // Start by assuming longest (more repeats) doablesLast.next = recurrent; } // Find new doablesLast while (doablesLast.next != null) { doablesLast = doablesLast.next; } } } // if none of the possibilities worked out, break out of do/while if (doables == null) break; // reassign where the next repeat can match newMatch = doables; // increment how many repeats we've successfully found ++numRepeats; positions.addElement(newMatch); // doables.index == lastIndex occurs either // (1) when an empty string was the longest // that matched this token. // And this case occurs either // (1-1) when this token is always empty, // for example "()" or "(())". // (1-2) when this token is not always empty // but can match an empty string, for example, // "a*", "(a|)". // or // (2) when the same string matches this token many times. // For example, "acbab" itself matches "a.*b" and // its substrings "acb" and "ab" also match. if (doables.index == lastIndex) { if (doables.empty) { // Case (1): We break here, otherwise we will fall // into an endless loop. if (numRepeats < min) numRepeats = min; break; } else { // Case (2): We cannot break here because, for example, // "acbacb" matches "a.*b" up to 2 times but // not 3 times. So we have to check numRepeats >= min. // But we do not have to go further until numRepeats == max // because the more numRepeats grows, the shorter the // substring matching this token becomes. if (numRepeats > min) { // This means the previous match was successful, // and that must be the best match. This match // resulted in shortening the matched substring. numRepeats--; positions.remove(positions.size() - 1); break; } if (numRepeats == min) break; } } lastIndex = doables.index; } while (numRepeats < max); // If there aren't enough repeats, then fail if (numRepeats < min) return false; // We're greedy, but ease off until a true match is found int posIndex = positions.size(); // At this point we've either got too many or just the right amount. // See if this numRepeats works with the rest of the regexp. REMatch allResults = null; REMatch allResultsLast = null; REMatch results = null; int indexCount = posIndex - min; if (indexCount <= 0) { // This case occurs when we exited the previous do loop before // numRepeats >= min because an empty string matched the token. // In this case, an empty string can match as many times as // desired. indexCount = 1; } while (indexCount-- > 0) { --posIndex; newMatch = (REMatch) positions.elementAt(posIndex); results = matchRest(input, newMatch); if (results != null) { if (allResults == null) { allResults = results; allResultsLast = results; } else { // Order these from longest to shortest // Start by assuming longest (more repeats) allResultsLast.next = results; } // Find new doablesLast while (allResultsLast.next != null) { allResultsLast = allResultsLast.next; } } // else did not match rest of the tokens, try again on smaller sample // or break out when performing possessive matching if (possessive) break; } if (allResults != null) { mymatch.assignFrom(allResults); // does this get all? mymatch.empty = (mymatch.index == origin); return true; } // If we fall out, no matches. return false; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/5806c07c3eeedb0f4f92b9fbacf30c0f55915c25/RETokenRepeated.java/buggy/core/src/classpath/gnu/gnu/regexp/RETokenRepeated.java
if (numRepeats < min) return false; int posIndex = positions.size();
boolean match(CharIndexed input, REMatch mymatch) { int origin = mymatch.index; // number of times we've matched so far int numRepeats = 0; // Possible positions for the next repeat to match at REMatch newMatch = mymatch; REMatch last = null; REMatch current; // Add the '0-repeats' index // positions.elementAt(z) == position [] in input after <<z>> matches Vector positions = new Vector(); positions.addElement(newMatch); // Declare variables used in loop REMatch doables; REMatch doablesLast; REMatch recurrent; int lastIndex = mymatch.index; do { // Check for stingy match for each possibility. if ((stingy && (numRepeats >= min)) || alwaysEmpty) { REMatch result = matchRest(input, newMatch); if (result != null) { mymatch.assignFrom(result); mymatch.empty = (mymatch.index == origin); return true; } else { // Special case of {0}. It must always match an empty string. if (alwaysEmpty) return false; } } doables = null; doablesLast = null; // try next repeat at all possible positions for (current = newMatch; current != null; current = current.next) { recurrent = (REMatch) current.clone(); if (token.match(input, recurrent)) { // add all items in current to doables array if (doables == null) { doables = recurrent; doablesLast = recurrent; } else { // Order these from longest to shortest // Start by assuming longest (more repeats) doablesLast.next = recurrent; } // Find new doablesLast while (doablesLast.next != null) { doablesLast = doablesLast.next; } } } // if none of the possibilities worked out, break out of do/while if (doables == null) break; // reassign where the next repeat can match newMatch = doables; // increment how many repeats we've successfully found ++numRepeats; positions.addElement(newMatch); // doables.index == lastIndex occurs either // (1) when an empty string was the longest // that matched this token. // And this case occurs either // (1-1) when this token is always empty, // for example "()" or "(())". // (1-2) when this token is not always empty // but can match an empty string, for example, // "a*", "(a|)". // or // (2) when the same string matches this token many times. // For example, "acbab" itself matches "a.*b" and // its substrings "acb" and "ab" also match. if (doables.index == lastIndex) { if (doables.empty) { // Case (1): We break here, otherwise we will fall // into an endless loop. if (numRepeats < min) numRepeats = min; break; } else { // Case (2): We cannot break here because, for example, // "acbacb" matches "a.*b" up to 2 times but // not 3 times. So we have to check numRepeats >= min. // But we do not have to go further until numRepeats == max // because the more numRepeats grows, the shorter the // substring matching this token becomes. if (numRepeats > min) { // This means the previous match was successful, // and that must be the best match. This match // resulted in shortening the matched substring. numRepeats--; positions.remove(positions.size() - 1); break; } if (numRepeats == min) break; } } lastIndex = doables.index; } while (numRepeats < max); // If there aren't enough repeats, then fail if (numRepeats < min) return false; // We're greedy, but ease off until a true match is found int posIndex = positions.size(); // At this point we've either got too many or just the right amount. // See if this numRepeats works with the rest of the regexp. REMatch allResults = null; REMatch allResultsLast = null; REMatch results = null; int indexCount = posIndex - min; if (indexCount <= 0) { // This case occurs when we exited the previous do loop before // numRepeats >= min because an empty string matched the token. // In this case, an empty string can match as many times as // desired. indexCount = 1; } while (indexCount-- > 0) { --posIndex; newMatch = (REMatch) positions.elementAt(posIndex); results = matchRest(input, newMatch); if (results != null) { if (allResults == null) { allResults = results; allResultsLast = results; } else { // Order these from longest to shortest // Start by assuming longest (more repeats) allResultsLast.next = results; } // Find new doablesLast while (allResultsLast.next != null) { allResultsLast = allResultsLast.next; } } // else did not match rest of the tokens, try again on smaller sample // or break out when performing possessive matching if (possessive) break; } if (allResults != null) { mymatch.assignFrom(allResults); // does this get all? mymatch.empty = (mymatch.index == origin); return true; } // If we fall out, no matches. return false; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/5806c07c3eeedb0f4f92b9fbacf30c0f55915c25/RETokenRepeated.java/buggy/core/src/classpath/gnu/gnu/regexp/RETokenRepeated.java
REMatch allResults = null; REMatch allResultsLast = null;
boolean match(CharIndexed input, REMatch mymatch) { int origin = mymatch.index; // number of times we've matched so far int numRepeats = 0; // Possible positions for the next repeat to match at REMatch newMatch = mymatch; REMatch last = null; REMatch current; // Add the '0-repeats' index // positions.elementAt(z) == position [] in input after <<z>> matches Vector positions = new Vector(); positions.addElement(newMatch); // Declare variables used in loop REMatch doables; REMatch doablesLast; REMatch recurrent; int lastIndex = mymatch.index; do { // Check for stingy match for each possibility. if ((stingy && (numRepeats >= min)) || alwaysEmpty) { REMatch result = matchRest(input, newMatch); if (result != null) { mymatch.assignFrom(result); mymatch.empty = (mymatch.index == origin); return true; } else { // Special case of {0}. It must always match an empty string. if (alwaysEmpty) return false; } } doables = null; doablesLast = null; // try next repeat at all possible positions for (current = newMatch; current != null; current = current.next) { recurrent = (REMatch) current.clone(); if (token.match(input, recurrent)) { // add all items in current to doables array if (doables == null) { doables = recurrent; doablesLast = recurrent; } else { // Order these from longest to shortest // Start by assuming longest (more repeats) doablesLast.next = recurrent; } // Find new doablesLast while (doablesLast.next != null) { doablesLast = doablesLast.next; } } } // if none of the possibilities worked out, break out of do/while if (doables == null) break; // reassign where the next repeat can match newMatch = doables; // increment how many repeats we've successfully found ++numRepeats; positions.addElement(newMatch); // doables.index == lastIndex occurs either // (1) when an empty string was the longest // that matched this token. // And this case occurs either // (1-1) when this token is always empty, // for example "()" or "(())". // (1-2) when this token is not always empty // but can match an empty string, for example, // "a*", "(a|)". // or // (2) when the same string matches this token many times. // For example, "acbab" itself matches "a.*b" and // its substrings "acb" and "ab" also match. if (doables.index == lastIndex) { if (doables.empty) { // Case (1): We break here, otherwise we will fall // into an endless loop. if (numRepeats < min) numRepeats = min; break; } else { // Case (2): We cannot break here because, for example, // "acbacb" matches "a.*b" up to 2 times but // not 3 times. So we have to check numRepeats >= min. // But we do not have to go further until numRepeats == max // because the more numRepeats grows, the shorter the // substring matching this token becomes. if (numRepeats > min) { // This means the previous match was successful, // and that must be the best match. This match // resulted in shortening the matched substring. numRepeats--; positions.remove(positions.size() - 1); break; } if (numRepeats == min) break; } } lastIndex = doables.index; } while (numRepeats < max); // If there aren't enough repeats, then fail if (numRepeats < min) return false; // We're greedy, but ease off until a true match is found int posIndex = positions.size(); // At this point we've either got too many or just the right amount. // See if this numRepeats works with the rest of the regexp. REMatch allResults = null; REMatch allResultsLast = null; REMatch results = null; int indexCount = posIndex - min; if (indexCount <= 0) { // This case occurs when we exited the previous do loop before // numRepeats >= min because an empty string matched the token. // In this case, an empty string can match as many times as // desired. indexCount = 1; } while (indexCount-- > 0) { --posIndex; newMatch = (REMatch) positions.elementAt(posIndex); results = matchRest(input, newMatch); if (results != null) { if (allResults == null) { allResults = results; allResultsLast = results; } else { // Order these from longest to shortest // Start by assuming longest (more repeats) allResultsLast.next = results; } // Find new doablesLast while (allResultsLast.next != null) { allResultsLast = allResultsLast.next; } } // else did not match rest of the tokens, try again on smaller sample // or break out when performing possessive matching if (possessive) break; } if (allResults != null) { mymatch.assignFrom(allResults); // does this get all? mymatch.empty = (mymatch.index == origin); return true; } // If we fall out, no matches. return false; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/5806c07c3eeedb0f4f92b9fbacf30c0f55915c25/RETokenRepeated.java/buggy/core/src/classpath/gnu/gnu/regexp/RETokenRepeated.java
REMatch results = null; int indexCount = posIndex - min; if (indexCount <= 0) { indexCount = 1; } while (indexCount-- > 0) { --posIndex; newMatch = (REMatch) positions.elementAt(posIndex); results = matchRest(input, newMatch);
REMatch.REMatchList allResults = new REMatch.REMatchList(); int posCount = positions.size(); int posIndex = (stingy ? 0 : posCount - 1); while (posCount-- > 0) { REMatch m = (REMatch) positions.elementAt(posIndex); if (stingy) posIndex++; else posIndex--; REMatch results = matchRest(input, m);
boolean match(CharIndexed input, REMatch mymatch) { int origin = mymatch.index; // number of times we've matched so far int numRepeats = 0; // Possible positions for the next repeat to match at REMatch newMatch = mymatch; REMatch last = null; REMatch current; // Add the '0-repeats' index // positions.elementAt(z) == position [] in input after <<z>> matches Vector positions = new Vector(); positions.addElement(newMatch); // Declare variables used in loop REMatch doables; REMatch doablesLast; REMatch recurrent; int lastIndex = mymatch.index; do { // Check for stingy match for each possibility. if ((stingy && (numRepeats >= min)) || alwaysEmpty) { REMatch result = matchRest(input, newMatch); if (result != null) { mymatch.assignFrom(result); mymatch.empty = (mymatch.index == origin); return true; } else { // Special case of {0}. It must always match an empty string. if (alwaysEmpty) return false; } } doables = null; doablesLast = null; // try next repeat at all possible positions for (current = newMatch; current != null; current = current.next) { recurrent = (REMatch) current.clone(); if (token.match(input, recurrent)) { // add all items in current to doables array if (doables == null) { doables = recurrent; doablesLast = recurrent; } else { // Order these from longest to shortest // Start by assuming longest (more repeats) doablesLast.next = recurrent; } // Find new doablesLast while (doablesLast.next != null) { doablesLast = doablesLast.next; } } } // if none of the possibilities worked out, break out of do/while if (doables == null) break; // reassign where the next repeat can match newMatch = doables; // increment how many repeats we've successfully found ++numRepeats; positions.addElement(newMatch); // doables.index == lastIndex occurs either // (1) when an empty string was the longest // that matched this token. // And this case occurs either // (1-1) when this token is always empty, // for example "()" or "(())". // (1-2) when this token is not always empty // but can match an empty string, for example, // "a*", "(a|)". // or // (2) when the same string matches this token many times. // For example, "acbab" itself matches "a.*b" and // its substrings "acb" and "ab" also match. if (doables.index == lastIndex) { if (doables.empty) { // Case (1): We break here, otherwise we will fall // into an endless loop. if (numRepeats < min) numRepeats = min; break; } else { // Case (2): We cannot break here because, for example, // "acbacb" matches "a.*b" up to 2 times but // not 3 times. So we have to check numRepeats >= min. // But we do not have to go further until numRepeats == max // because the more numRepeats grows, the shorter the // substring matching this token becomes. if (numRepeats > min) { // This means the previous match was successful, // and that must be the best match. This match // resulted in shortening the matched substring. numRepeats--; positions.remove(positions.size() - 1); break; } if (numRepeats == min) break; } } lastIndex = doables.index; } while (numRepeats < max); // If there aren't enough repeats, then fail if (numRepeats < min) return false; // We're greedy, but ease off until a true match is found int posIndex = positions.size(); // At this point we've either got too many or just the right amount. // See if this numRepeats works with the rest of the regexp. REMatch allResults = null; REMatch allResultsLast = null; REMatch results = null; int indexCount = posIndex - min; if (indexCount <= 0) { // This case occurs when we exited the previous do loop before // numRepeats >= min because an empty string matched the token. // In this case, an empty string can match as many times as // desired. indexCount = 1; } while (indexCount-- > 0) { --posIndex; newMatch = (REMatch) positions.elementAt(posIndex); results = matchRest(input, newMatch); if (results != null) { if (allResults == null) { allResults = results; allResultsLast = results; } else { // Order these from longest to shortest // Start by assuming longest (more repeats) allResultsLast.next = results; } // Find new doablesLast while (allResultsLast.next != null) { allResultsLast = allResultsLast.next; } } // else did not match rest of the tokens, try again on smaller sample // or break out when performing possessive matching if (possessive) break; } if (allResults != null) { mymatch.assignFrom(allResults); // does this get all? mymatch.empty = (mymatch.index == origin); return true; } // If we fall out, no matches. return false; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/5806c07c3eeedb0f4f92b9fbacf30c0f55915c25/RETokenRepeated.java/buggy/core/src/classpath/gnu/gnu/regexp/RETokenRepeated.java
if (allResults == null) { allResults = results; allResultsLast = results; } else {
boolean match(CharIndexed input, REMatch mymatch) { int origin = mymatch.index; // number of times we've matched so far int numRepeats = 0; // Possible positions for the next repeat to match at REMatch newMatch = mymatch; REMatch last = null; REMatch current; // Add the '0-repeats' index // positions.elementAt(z) == position [] in input after <<z>> matches Vector positions = new Vector(); positions.addElement(newMatch); // Declare variables used in loop REMatch doables; REMatch doablesLast; REMatch recurrent; int lastIndex = mymatch.index; do { // Check for stingy match for each possibility. if ((stingy && (numRepeats >= min)) || alwaysEmpty) { REMatch result = matchRest(input, newMatch); if (result != null) { mymatch.assignFrom(result); mymatch.empty = (mymatch.index == origin); return true; } else { // Special case of {0}. It must always match an empty string. if (alwaysEmpty) return false; } } doables = null; doablesLast = null; // try next repeat at all possible positions for (current = newMatch; current != null; current = current.next) { recurrent = (REMatch) current.clone(); if (token.match(input, recurrent)) { // add all items in current to doables array if (doables == null) { doables = recurrent; doablesLast = recurrent; } else { // Order these from longest to shortest // Start by assuming longest (more repeats) doablesLast.next = recurrent; } // Find new doablesLast while (doablesLast.next != null) { doablesLast = doablesLast.next; } } } // if none of the possibilities worked out, break out of do/while if (doables == null) break; // reassign where the next repeat can match newMatch = doables; // increment how many repeats we've successfully found ++numRepeats; positions.addElement(newMatch); // doables.index == lastIndex occurs either // (1) when an empty string was the longest // that matched this token. // And this case occurs either // (1-1) when this token is always empty, // for example "()" or "(())". // (1-2) when this token is not always empty // but can match an empty string, for example, // "a*", "(a|)". // or // (2) when the same string matches this token many times. // For example, "acbab" itself matches "a.*b" and // its substrings "acb" and "ab" also match. if (doables.index == lastIndex) { if (doables.empty) { // Case (1): We break here, otherwise we will fall // into an endless loop. if (numRepeats < min) numRepeats = min; break; } else { // Case (2): We cannot break here because, for example, // "acbacb" matches "a.*b" up to 2 times but // not 3 times. So we have to check numRepeats >= min. // But we do not have to go further until numRepeats == max // because the more numRepeats grows, the shorter the // substring matching this token becomes. if (numRepeats > min) { // This means the previous match was successful, // and that must be the best match. This match // resulted in shortening the matched substring. numRepeats--; positions.remove(positions.size() - 1); break; } if (numRepeats == min) break; } } lastIndex = doables.index; } while (numRepeats < max); // If there aren't enough repeats, then fail if (numRepeats < min) return false; // We're greedy, but ease off until a true match is found int posIndex = positions.size(); // At this point we've either got too many or just the right amount. // See if this numRepeats works with the rest of the regexp. REMatch allResults = null; REMatch allResultsLast = null; REMatch results = null; int indexCount = posIndex - min; if (indexCount <= 0) { // This case occurs when we exited the previous do loop before // numRepeats >= min because an empty string matched the token. // In this case, an empty string can match as many times as // desired. indexCount = 1; } while (indexCount-- > 0) { --posIndex; newMatch = (REMatch) positions.elementAt(posIndex); results = matchRest(input, newMatch); if (results != null) { if (allResults == null) { allResults = results; allResultsLast = results; } else { // Order these from longest to shortest // Start by assuming longest (more repeats) allResultsLast.next = results; } // Find new doablesLast while (allResultsLast.next != null) { allResultsLast = allResultsLast.next; } } // else did not match rest of the tokens, try again on smaller sample // or break out when performing possessive matching if (possessive) break; } if (allResults != null) { mymatch.assignFrom(allResults); // does this get all? mymatch.empty = (mymatch.index == origin); return true; } // If we fall out, no matches. return false; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/5806c07c3eeedb0f4f92b9fbacf30c0f55915c25/RETokenRepeated.java/buggy/core/src/classpath/gnu/gnu/regexp/RETokenRepeated.java
allResultsLast.next = results;
allResults.addTail(results);
boolean match(CharIndexed input, REMatch mymatch) { int origin = mymatch.index; // number of times we've matched so far int numRepeats = 0; // Possible positions for the next repeat to match at REMatch newMatch = mymatch; REMatch last = null; REMatch current; // Add the '0-repeats' index // positions.elementAt(z) == position [] in input after <<z>> matches Vector positions = new Vector(); positions.addElement(newMatch); // Declare variables used in loop REMatch doables; REMatch doablesLast; REMatch recurrent; int lastIndex = mymatch.index; do { // Check for stingy match for each possibility. if ((stingy && (numRepeats >= min)) || alwaysEmpty) { REMatch result = matchRest(input, newMatch); if (result != null) { mymatch.assignFrom(result); mymatch.empty = (mymatch.index == origin); return true; } else { // Special case of {0}. It must always match an empty string. if (alwaysEmpty) return false; } } doables = null; doablesLast = null; // try next repeat at all possible positions for (current = newMatch; current != null; current = current.next) { recurrent = (REMatch) current.clone(); if (token.match(input, recurrent)) { // add all items in current to doables array if (doables == null) { doables = recurrent; doablesLast = recurrent; } else { // Order these from longest to shortest // Start by assuming longest (more repeats) doablesLast.next = recurrent; } // Find new doablesLast while (doablesLast.next != null) { doablesLast = doablesLast.next; } } } // if none of the possibilities worked out, break out of do/while if (doables == null) break; // reassign where the next repeat can match newMatch = doables; // increment how many repeats we've successfully found ++numRepeats; positions.addElement(newMatch); // doables.index == lastIndex occurs either // (1) when an empty string was the longest // that matched this token. // And this case occurs either // (1-1) when this token is always empty, // for example "()" or "(())". // (1-2) when this token is not always empty // but can match an empty string, for example, // "a*", "(a|)". // or // (2) when the same string matches this token many times. // For example, "acbab" itself matches "a.*b" and // its substrings "acb" and "ab" also match. if (doables.index == lastIndex) { if (doables.empty) { // Case (1): We break here, otherwise we will fall // into an endless loop. if (numRepeats < min) numRepeats = min; break; } else { // Case (2): We cannot break here because, for example, // "acbacb" matches "a.*b" up to 2 times but // not 3 times. So we have to check numRepeats >= min. // But we do not have to go further until numRepeats == max // because the more numRepeats grows, the shorter the // substring matching this token becomes. if (numRepeats > min) { // This means the previous match was successful, // and that must be the best match. This match // resulted in shortening the matched substring. numRepeats--; positions.remove(positions.size() - 1); break; } if (numRepeats == min) break; } } lastIndex = doables.index; } while (numRepeats < max); // If there aren't enough repeats, then fail if (numRepeats < min) return false; // We're greedy, but ease off until a true match is found int posIndex = positions.size(); // At this point we've either got too many or just the right amount. // See if this numRepeats works with the rest of the regexp. REMatch allResults = null; REMatch allResultsLast = null; REMatch results = null; int indexCount = posIndex - min; if (indexCount <= 0) { // This case occurs when we exited the previous do loop before // numRepeats >= min because an empty string matched the token. // In this case, an empty string can match as many times as // desired. indexCount = 1; } while (indexCount-- > 0) { --posIndex; newMatch = (REMatch) positions.elementAt(posIndex); results = matchRest(input, newMatch); if (results != null) { if (allResults == null) { allResults = results; allResultsLast = results; } else { // Order these from longest to shortest // Start by assuming longest (more repeats) allResultsLast.next = results; } // Find new doablesLast while (allResultsLast.next != null) { allResultsLast = allResultsLast.next; } } // else did not match rest of the tokens, try again on smaller sample // or break out when performing possessive matching if (possessive) break; } if (allResults != null) { mymatch.assignFrom(allResults); // does this get all? mymatch.empty = (mymatch.index == origin); return true; } // If we fall out, no matches. return false; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/5806c07c3eeedb0f4f92b9fbacf30c0f55915c25/RETokenRepeated.java/buggy/core/src/classpath/gnu/gnu/regexp/RETokenRepeated.java
while (allResultsLast.next != null) { allResultsLast = allResultsLast.next; } }
else {
boolean match(CharIndexed input, REMatch mymatch) { int origin = mymatch.index; // number of times we've matched so far int numRepeats = 0; // Possible positions for the next repeat to match at REMatch newMatch = mymatch; REMatch last = null; REMatch current; // Add the '0-repeats' index // positions.elementAt(z) == position [] in input after <<z>> matches Vector positions = new Vector(); positions.addElement(newMatch); // Declare variables used in loop REMatch doables; REMatch doablesLast; REMatch recurrent; int lastIndex = mymatch.index; do { // Check for stingy match for each possibility. if ((stingy && (numRepeats >= min)) || alwaysEmpty) { REMatch result = matchRest(input, newMatch); if (result != null) { mymatch.assignFrom(result); mymatch.empty = (mymatch.index == origin); return true; } else { // Special case of {0}. It must always match an empty string. if (alwaysEmpty) return false; } } doables = null; doablesLast = null; // try next repeat at all possible positions for (current = newMatch; current != null; current = current.next) { recurrent = (REMatch) current.clone(); if (token.match(input, recurrent)) { // add all items in current to doables array if (doables == null) { doables = recurrent; doablesLast = recurrent; } else { // Order these from longest to shortest // Start by assuming longest (more repeats) doablesLast.next = recurrent; } // Find new doablesLast while (doablesLast.next != null) { doablesLast = doablesLast.next; } } } // if none of the possibilities worked out, break out of do/while if (doables == null) break; // reassign where the next repeat can match newMatch = doables; // increment how many repeats we've successfully found ++numRepeats; positions.addElement(newMatch); // doables.index == lastIndex occurs either // (1) when an empty string was the longest // that matched this token. // And this case occurs either // (1-1) when this token is always empty, // for example "()" or "(())". // (1-2) when this token is not always empty // but can match an empty string, for example, // "a*", "(a|)". // or // (2) when the same string matches this token many times. // For example, "acbab" itself matches "a.*b" and // its substrings "acb" and "ab" also match. if (doables.index == lastIndex) { if (doables.empty) { // Case (1): We break here, otherwise we will fall // into an endless loop. if (numRepeats < min) numRepeats = min; break; } else { // Case (2): We cannot break here because, for example, // "acbacb" matches "a.*b" up to 2 times but // not 3 times. So we have to check numRepeats >= min. // But we do not have to go further until numRepeats == max // because the more numRepeats grows, the shorter the // substring matching this token becomes. if (numRepeats > min) { // This means the previous match was successful, // and that must be the best match. This match // resulted in shortening the matched substring. numRepeats--; positions.remove(positions.size() - 1); break; } if (numRepeats == min) break; } } lastIndex = doables.index; } while (numRepeats < max); // If there aren't enough repeats, then fail if (numRepeats < min) return false; // We're greedy, but ease off until a true match is found int posIndex = positions.size(); // At this point we've either got too many or just the right amount. // See if this numRepeats works with the rest of the regexp. REMatch allResults = null; REMatch allResultsLast = null; REMatch results = null; int indexCount = posIndex - min; if (indexCount <= 0) { // This case occurs when we exited the previous do loop before // numRepeats >= min because an empty string matched the token. // In this case, an empty string can match as many times as // desired. indexCount = 1; } while (indexCount-- > 0) { --posIndex; newMatch = (REMatch) positions.elementAt(posIndex); results = matchRest(input, newMatch); if (results != null) { if (allResults == null) { allResults = results; allResultsLast = results; } else { // Order these from longest to shortest // Start by assuming longest (more repeats) allResultsLast.next = results; } // Find new doablesLast while (allResultsLast.next != null) { allResultsLast = allResultsLast.next; } } // else did not match rest of the tokens, try again on smaller sample // or break out when performing possessive matching if (possessive) break; } if (allResults != null) { mymatch.assignFrom(allResults); // does this get all? mymatch.empty = (mymatch.index == origin); return true; } // If we fall out, no matches. return false; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/5806c07c3eeedb0f4f92b9fbacf30c0f55915c25/RETokenRepeated.java/buggy/core/src/classpath/gnu/gnu/regexp/RETokenRepeated.java
if (allResults != null) { mymatch.assignFrom(allResults); mymatch.empty = (mymatch.index == origin);
} if (allResults.head != null) { mymatch.assignFrom(allResults.head);
boolean match(CharIndexed input, REMatch mymatch) { int origin = mymatch.index; // number of times we've matched so far int numRepeats = 0; // Possible positions for the next repeat to match at REMatch newMatch = mymatch; REMatch last = null; REMatch current; // Add the '0-repeats' index // positions.elementAt(z) == position [] in input after <<z>> matches Vector positions = new Vector(); positions.addElement(newMatch); // Declare variables used in loop REMatch doables; REMatch doablesLast; REMatch recurrent; int lastIndex = mymatch.index; do { // Check for stingy match for each possibility. if ((stingy && (numRepeats >= min)) || alwaysEmpty) { REMatch result = matchRest(input, newMatch); if (result != null) { mymatch.assignFrom(result); mymatch.empty = (mymatch.index == origin); return true; } else { // Special case of {0}. It must always match an empty string. if (alwaysEmpty) return false; } } doables = null; doablesLast = null; // try next repeat at all possible positions for (current = newMatch; current != null; current = current.next) { recurrent = (REMatch) current.clone(); if (token.match(input, recurrent)) { // add all items in current to doables array if (doables == null) { doables = recurrent; doablesLast = recurrent; } else { // Order these from longest to shortest // Start by assuming longest (more repeats) doablesLast.next = recurrent; } // Find new doablesLast while (doablesLast.next != null) { doablesLast = doablesLast.next; } } } // if none of the possibilities worked out, break out of do/while if (doables == null) break; // reassign where the next repeat can match newMatch = doables; // increment how many repeats we've successfully found ++numRepeats; positions.addElement(newMatch); // doables.index == lastIndex occurs either // (1) when an empty string was the longest // that matched this token. // And this case occurs either // (1-1) when this token is always empty, // for example "()" or "(())". // (1-2) when this token is not always empty // but can match an empty string, for example, // "a*", "(a|)". // or // (2) when the same string matches this token many times. // For example, "acbab" itself matches "a.*b" and // its substrings "acb" and "ab" also match. if (doables.index == lastIndex) { if (doables.empty) { // Case (1): We break here, otherwise we will fall // into an endless loop. if (numRepeats < min) numRepeats = min; break; } else { // Case (2): We cannot break here because, for example, // "acbacb" matches "a.*b" up to 2 times but // not 3 times. So we have to check numRepeats >= min. // But we do not have to go further until numRepeats == max // because the more numRepeats grows, the shorter the // substring matching this token becomes. if (numRepeats > min) { // This means the previous match was successful, // and that must be the best match. This match // resulted in shortening the matched substring. numRepeats--; positions.remove(positions.size() - 1); break; } if (numRepeats == min) break; } } lastIndex = doables.index; } while (numRepeats < max); // If there aren't enough repeats, then fail if (numRepeats < min) return false; // We're greedy, but ease off until a true match is found int posIndex = positions.size(); // At this point we've either got too many or just the right amount. // See if this numRepeats works with the rest of the regexp. REMatch allResults = null; REMatch allResultsLast = null; REMatch results = null; int indexCount = posIndex - min; if (indexCount <= 0) { // This case occurs when we exited the previous do loop before // numRepeats >= min because an empty string matched the token. // In this case, an empty string can match as many times as // desired. indexCount = 1; } while (indexCount-- > 0) { --posIndex; newMatch = (REMatch) positions.elementAt(posIndex); results = matchRest(input, newMatch); if (results != null) { if (allResults == null) { allResults = results; allResultsLast = results; } else { // Order these from longest to shortest // Start by assuming longest (more repeats) allResultsLast.next = results; } // Find new doablesLast while (allResultsLast.next != null) { allResultsLast = allResultsLast.next; } } // else did not match rest of the tokens, try again on smaller sample // or break out when performing possessive matching if (possessive) break; } if (allResults != null) { mymatch.assignFrom(allResults); // does this get all? mymatch.empty = (mymatch.index == origin); return true; } // If we fall out, no matches. return false; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/5806c07c3eeedb0f4f92b9fbacf30c0f55915c25/RETokenRepeated.java/buggy/core/src/classpath/gnu/gnu/regexp/RETokenRepeated.java
REMatch doneIndex = null; REMatch doneIndexLast = null;
REMatch.REMatchList doneIndex = new REMatch.REMatchList();
private REMatch matchRest(CharIndexed input, final REMatch newMatch) { REMatch current, single; REMatch doneIndex = null; REMatch doneIndexLast = null; // Test all possible matches for this number of repeats for (current = newMatch; current != null; current = current.next) { // clone() separates a single match from the chain single = (REMatch) current.clone(); if (next(input, single)) { // chain results to doneIndex if (doneIndex == null) { doneIndex = single; doneIndexLast = single; } else { doneIndexLast.next = single; } // Find new doneIndexLast while (doneIndexLast.next != null) { doneIndexLast = doneIndexLast.next; } } } return doneIndex; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/5806c07c3eeedb0f4f92b9fbacf30c0f55915c25/RETokenRepeated.java/buggy/core/src/classpath/gnu/gnu/regexp/RETokenRepeated.java
if (doneIndex == null) { doneIndex = single; doneIndexLast = single; } else { doneIndexLast.next = single; } while (doneIndexLast.next != null) { doneIndexLast = doneIndexLast.next; }
doneIndex.addTail(single);
private REMatch matchRest(CharIndexed input, final REMatch newMatch) { REMatch current, single; REMatch doneIndex = null; REMatch doneIndexLast = null; // Test all possible matches for this number of repeats for (current = newMatch; current != null; current = current.next) { // clone() separates a single match from the chain single = (REMatch) current.clone(); if (next(input, single)) { // chain results to doneIndex if (doneIndex == null) { doneIndex = single; doneIndexLast = single; } else { doneIndexLast.next = single; } // Find new doneIndexLast while (doneIndexLast.next != null) { doneIndexLast = doneIndexLast.next; } } } return doneIndex; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/5806c07c3eeedb0f4f92b9fbacf30c0f55915c25/RETokenRepeated.java/buggy/core/src/classpath/gnu/gnu/regexp/RETokenRepeated.java
return doneIndex;
return doneIndex.head;
private REMatch matchRest(CharIndexed input, final REMatch newMatch) { REMatch current, single; REMatch doneIndex = null; REMatch doneIndexLast = null; // Test all possible matches for this number of repeats for (current = newMatch; current != null; current = current.next) { // clone() separates a single match from the chain single = (REMatch) current.clone(); if (next(input, single)) { // chain results to doneIndex if (doneIndex == null) { doneIndex = single; doneIndexLast = single; } else { doneIndexLast.next = single; } // Find new doneIndexLast while (doneIndexLast.next != null) { doneIndexLast = doneIndexLast.next; } } } return doneIndex; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/5806c07c3eeedb0f4f92b9fbacf30c0f55915c25/RETokenRepeated.java/buggy/core/src/classpath/gnu/gnu/regexp/RETokenRepeated.java
static Frame getOwnerFrame()
static Window getOwnerFrame(Window owner) { Window result = owner; if (result == null)
static Frame getOwnerFrame() { if (ownerFrame == null) ownerFrame = new OwnerFrame(); return ownerFrame; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/fd7e81b5c6d5963539719dfde9d197c68890c201/SwingUtilities.java/buggy/core/src/classpath/javax/javax/swing/SwingUtilities.java
return ownerFrame;
result = ownerFrame; } return result;
static Frame getOwnerFrame() { if (ownerFrame == null) ownerFrame = new OwnerFrame(); return ownerFrame; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/fd7e81b5c6d5963539719dfde9d197c68890c201/SwingUtilities.java/buggy/core/src/classpath/javax/javax/swing/SwingUtilities.java
/* byte[] newData = new byte[getRecLen()]; System.arraycopy(data, offset, newData, 0, getRecLen()); this.data = newData; setOffset(0); */
synchronized(data) { byte[] newData = new byte[getRecLen()]; System.arraycopy(data, offset, newData, 0, getRecLen()); this.data = newData; setOffset(0); }
public Ext2DirectoryRecord(Ext2FileSystem fs, byte[] data, int offset, int fileOffset) { this.fs=fs; this.data = data; this.offset = offset; this.fileOffset = fileOffset; //make a copy of the data /* byte[] newData = new byte[getRecLen()]; System.arraycopy(data, offset, newData, 0, getRecLen()); this.data = newData; setOffset(0); */ }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/76cdfbaf38c1029347a5829758eac206a20e3b16/Ext2DirectoryRecord.java/clean/fs/src/fs/org/jnode/fs/ext2/Ext2DirectoryRecord.java
protected void expandRecord(long beginning, long end) throws FileSystemException{
protected synchronized void expandRecord(long beginning, long end) throws FileSystemException{
protected void expandRecord(long beginning, long end) throws FileSystemException{ log.debug("expandRecord("+beginning + ", "+ end+")"); if(beginning+getNameLen()+8 < end) { //the record fits in the block setRecLen((int)(end - beginning)); //pad the end of the record with zeroes byte[] newData = new byte[getRecLen()]; Arrays.fill(newData, 0, getRecLen(), (byte)0); System.arraycopy(data, getOffset(), newData, 0, getNameLen()+8); setOffset(0); setFileOffset(beginning); data=newData; } else throw new FileSystemException("The directory record does not fit into the block!"); log.debug("expandRecord(): newLength: "+getRecLen()); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/76cdfbaf38c1029347a5829758eac206a20e3b16/Ext2DirectoryRecord.java/clean/fs/src/fs/org/jnode/fs/ext2/Ext2DirectoryRecord.java
public int getINodeNr() {
public synchronized int getINodeNr() {
public int getINodeNr() { return (int)Ext2Utils.get32(data, offset); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/76cdfbaf38c1029347a5829758eac206a20e3b16/Ext2DirectoryRecord.java/clean/fs/src/fs/org/jnode/fs/ext2/Ext2DirectoryRecord.java
public String getName() {
public synchronized String getName() {
public String getName() { StringBuffer name = new StringBuffer(); if(getINodeNr()!=0) { //TODO: character conversion?? for(int i=0; i<getNameLen(); i++) name.append( (char)Ext2Utils.get8(data, offset+8+i) ); log.debug("Ext2DirectoryRecord(): iNode="+getINodeNr()+", name="+name); } return name.toString(); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/76cdfbaf38c1029347a5829758eac206a20e3b16/Ext2DirectoryRecord.java/clean/fs/src/fs/org/jnode/fs/ext2/Ext2DirectoryRecord.java
private int getNameLen() {
private synchronized int getNameLen() {
private int getNameLen() { return Ext2Utils.get8(data, offset+6); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/76cdfbaf38c1029347a5829758eac206a20e3b16/Ext2DirectoryRecord.java/clean/fs/src/fs/org/jnode/fs/ext2/Ext2DirectoryRecord.java
public int getRecLen() {
public synchronized int getRecLen() {
public int getRecLen() { return Ext2Utils.get16(data, offset+4); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/76cdfbaf38c1029347a5829758eac206a20e3b16/Ext2DirectoryRecord.java/clean/fs/src/fs/org/jnode/fs/ext2/Ext2DirectoryRecord.java
public int getType() {
public synchronized int getType() {
public int getType() { return Ext2Utils.get8(data, offset+7); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/76cdfbaf38c1029347a5829758eac206a20e3b16/Ext2DirectoryRecord.java/clean/fs/src/fs/org/jnode/fs/ext2/Ext2DirectoryRecord.java
private void setINodeNr(long nr) {
private synchronized void setINodeNr(long nr) {
private void setINodeNr(long nr) { Ext2Utils.set32(data, offset, nr); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/76cdfbaf38c1029347a5829758eac206a20e3b16/Ext2DirectoryRecord.java/clean/fs/src/fs/org/jnode/fs/ext2/Ext2DirectoryRecord.java
private void setName(String name) {
private synchronized void setName(String name) {
private void setName(String name) { for(int i=0; i<name.length(); i++) Ext2Utils.set8(data, offset+8+i, name.charAt(i)); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/76cdfbaf38c1029347a5829758eac206a20e3b16/Ext2DirectoryRecord.java/clean/fs/src/fs/org/jnode/fs/ext2/Ext2DirectoryRecord.java
private void setNameLen(int len) {
private synchronized void setNameLen(int len) {
private void setNameLen(int len) { Ext2Utils.set8(data, offset+6, len); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/76cdfbaf38c1029347a5829758eac206a20e3b16/Ext2DirectoryRecord.java/clean/fs/src/fs/org/jnode/fs/ext2/Ext2DirectoryRecord.java
private void setRecLen(int len) {
private synchronized void setRecLen(int len) {
private void setRecLen(int len) { Ext2Utils.set16(data, offset+4, len); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/76cdfbaf38c1029347a5829758eac206a20e3b16/Ext2DirectoryRecord.java/clean/fs/src/fs/org/jnode/fs/ext2/Ext2DirectoryRecord.java
private void setType(int type) {
private synchronized void setType(int type) {
private void setType(int type) { if(!fs.hasIncompatFeature(Ext2Constants.EXT2_FEATURE_INCOMPAT_FILETYPE)) return; Ext2Utils.set8(data, offset+7, type); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/76cdfbaf38c1029347a5829758eac206a20e3b16/Ext2DirectoryRecord.java/clean/fs/src/fs/org/jnode/fs/ext2/Ext2DirectoryRecord.java
protected void truncateRecord() {
protected synchronized void truncateRecord() {
protected void truncateRecord() { int newLength = getNameLen() + 8; //record length is padded to n*4 bytes if(newLength%4!=0) newLength+=4-newLength%4; setRecLen(newLength); log.debug("truncateRecord(): newLength: "+newLength); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/76cdfbaf38c1029347a5829758eac206a20e3b16/Ext2DirectoryRecord.java/clean/fs/src/fs/org/jnode/fs/ext2/Ext2DirectoryRecord.java
if (cp.equals("870-sk")) return codePage870sk;
public static final int[] getCodePage(String cp) { if (cp.equals("37")) return codePage37; if (cp.equals("37PT")) return codePage37PT; if (cp.equals("273")) return codePage273; if (cp.equals("277-dk")) return codePage277_DK; if (cp.equals("277-no")) return codePage277_NO; if (cp.equals("280")) return codePage280; if (cp.equals("284")) return codePage284; if (cp.equals("285")) return codePage285; if (cp.equals("297")) return codePage297; if (cp.equals("424")) return codePage500ch; if (cp.equals("500-ch")) return codePage500ch; if (cp.equals("870-pl")) return codePage870; if (cp.equals("1025-r")) return codePage1025; return codePage37; }
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/bc7e11ab017c3feeba41d87e99dba276258b7c41/CharMappings.java/buggy/tn5250j/src/org/tn5250j/CharMappings.java
if (e.getPropertyName().equals(JToolBar.ROLLOVER_CHANGED_PROPERTY))
if (e.getPropertyName().equals("rollover"))
public void propertyChange(PropertyChangeEvent e) { // FIXME: need name properties so can change floatFrame title. if (e.getPropertyName().equals(JToolBar.ROLLOVER_CHANGED_PROPERTY)) setRolloverBorders(toolBar.isRollover()); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/53b78dd1e4587254262f4618d2aa7551de8e0cbf/BasicToolBarUI.java/clean/core/src/classpath/javax/javax/swing/plaf/basic/BasicToolBarUI.java
{
{
private void init() { classXDFNodeName = "textDelimiter"; attribOrder.add(0,"delimiter"); attribOrder.add(0,"repeatable"); attribOrder.add(0,"recordTerminator"); attribHash.put("delimiter", new XMLAttribute(DefaultDelimiter, Constants.STRING_TYPE)); attribHash.put("repeatable", new XMLAttribute(DefaultRepeatable, Constants.STRING_TYPE)); attribHash.put("recordTerminator", new XMLAttribute(DefaultRecordTerminator, Constants.STRING_TYPE)); }
4483 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4483/5ccaa0a39fcc8791fa01673a52183b2075616638/DelimitedXMLDataIOStyle.java/buggy/src/gov/nasa/gsfc/adc/xdf/DelimitedXMLDataIOStyle.java
nestedToXDF(outputstream, indent, 0, stop);
synchronized (attribHash) { nestedToXDF(outputstream, indent, 0, stop); }
protected void specificIOStyleToXDF( OutputStream outputstream,String indent) { int stop = parentArray.getAxisList().size()-1; nestedToXDF(outputstream, indent, 0, stop); }
4483 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4483/5ccaa0a39fcc8791fa01673a52183b2075616638/DelimitedXMLDataIOStyle.java/buggy/src/gov/nasa/gsfc/adc/xdf/DelimitedXMLDataIOStyle.java