rem stringlengths 0 477k | add stringlengths 0 313k | context stringlengths 6 599k | meta stringlengths 141 403 |
|---|---|---|---|
final X86RegisterPool pool = ec.getPool(); final Register newLsb = request(ec, pool); final Register newMsb = request(ec, pool); loadTo(ec, newLsb, newMsb); pool.transferOwnerTo(newLsb, this); pool.transferOwnerTo(newMsb, this); } | final X86RegisterPool pool = ec.getPool(); final Register newLsb = request(ec, pool); final Register newMsb = request(ec, pool); loadTo(ec, newLsb, newMsb); pool.transferOwnerTo(newLsb, this); pool.transferOwnerTo(newMsb, this); } | final void spill(EmitterContext ec, Register reg) { assertCondition((getKind() == Kind.REGISTER) && ((this.lsb == reg) || (this.msb == reg)), "spill1"); ec.getVStack().push(ec); if (isStack()) { return; } final X86RegisterPool pool = ec.getPool(); final Register newLsb = request(ec, pool); final Register n... | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/e304bedac9ab86f88bdb27ffd782a9777505c449/DoubleWordItem.java/clean/core/src/core/org/jnode/vm/x86/compiler/l1a/DoubleWordItem.java |
return ((kind == Kind.REGISTER) && (msb.equals(reg) || lsb.equals(reg))); } | return ((kind == Kind.REGISTER) && (msb.equals(reg) || lsb.equals(reg))); } | final boolean uses(Register reg) { return ((kind == Kind.REGISTER) && (msb.equals(reg) || lsb.equals(reg))); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/e304bedac9ab86f88bdb27ffd782a9777505c449/DoubleWordItem.java/clean/core/src/core/org/jnode/vm/x86/compiler/l1a/DoubleWordItem.java |
return ((kind == Kind.REGISTER) && !(pool.isCallerSaved(lsb) && pool.isCallerSaved(msb))); } | return ((kind == Kind.REGISTER) && !(pool.isCallerSaved(lsb) && pool .isCallerSaved(msb))); } | final boolean usesVolatileRegister(X86RegisterPool pool) { return ((kind == Kind.REGISTER) && !(pool.isCallerSaved(lsb) && pool.isCallerSaved(msb))); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/e304bedac9ab86f88bdb27ffd782a9777505c449/DoubleWordItem.java/clean/core/src/core/org/jnode/vm/x86/compiler/l1a/DoubleWordItem.java |
static final void fxch(AbstractX86Stream os, FPUStack fpuStack, Register fpuReg) { if (fpuReg == Register.ST0) { throw new StackException("Cannot fxch ST0"); | static final void fxch(AbstractX86Stream os, FPUStack fpuStack, Item item) { if (!fpuStack.isTos(item)) { final Register fpuReg = fpuStack.getRegister(item); fxch(os, fpuStack, fpuReg); | static final void fxch(AbstractX86Stream os, FPUStack fpuStack, Register fpuReg) { if (fpuReg == Register.ST0) { throw new StackException("Cannot fxch ST0"); } os.writeFXCH(fpuReg); fpuStack.fxch(fpuReg); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/4210cbd2e8532c8a29412a6b016e4072578a8de8/FPUHelper.java/buggy/core/src/core/org/jnode/vm/x86/compiler/l1a/FPUHelper.java |
os.writeFXCH(fpuReg); fpuStack.fxch(fpuReg); | static final void fxch(AbstractX86Stream os, FPUStack fpuStack, Register fpuReg) { if (fpuReg == Register.ST0) { throw new StackException("Cannot fxch ST0"); } os.writeFXCH(fpuReg); fpuStack.fxch(fpuReg); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/4210cbd2e8532c8a29412a6b016e4072578a8de8/FPUHelper.java/buggy/core/src/core/org/jnode/vm/x86/compiler/l1a/FPUHelper.java | |
public X500Principal (String name) | private X500Principal() | public X500Principal (String name) { this(); if (name == null) throw new NullPointerException(); try { parseString (name); } catch (IOException ioe) { IllegalArgumentException iae = new IllegalArgumentException("malformed name"); iae.initCause (ioe); throw ... | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/c6ebf1f74ce34c04205e65bfd96c25a18c5a0861/X500Principal.java/clean/core/src/classpath/javax/javax/security/auth/x500/X500Principal.java |
this(); if (name == null) throw new NullPointerException(); try { parseString (name); } catch (IOException ioe) { IllegalArgumentException iae = new IllegalArgumentException("malformed name"); iae.initCause (ioe); throw iae; } } | components = new LinkedList(); currentRdn = new LinkedHashMap(); components.add (currentRdn); } | public X500Principal (String name) { this(); if (name == null) throw new NullPointerException(); try { parseString (name); } catch (IOException ioe) { IllegalArgumentException iae = new IllegalArgumentException("malformed name"); iae.initCause (ioe); throw ... | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/c6ebf1f74ce34c04205e65bfd96c25a18c5a0861/X500Principal.java/clean/core/src/classpath/javax/javax/security/auth/x500/X500Principal.java |
public OID(String strRep) | public OID(int[] components) | public OID(String strRep) { this(strRep, false); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/e81465c8dc08fe3c0a055c4bb1c2588e37b39c25/OID.java/buggy/core/src/classpath/gnu/gnu/java/security/OID.java |
this(strRep, false); | this(components, false); | public OID(String strRep) { this(strRep, false); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/e81465c8dc08fe3c0a055c4bb1c2588e37b39c25/OID.java/buggy/core/src/classpath/gnu/gnu/java/security/OID.java |
encoded = new byte[0]; | IllegalArgumentException iae = new IllegalArgumentException (); iae.initCause (ioe); throw iae; | public byte[] getEncoded() { if (encoded == null) { try { ByteArrayOutputStream out = new ByteArrayOutputStream(); length = DERWriter.write(out, this); encoded = out.toByteArray(); } catch (IOException ioe) { encoded = new b... | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/5806c07c3eeedb0f4f92b9fbacf30c0f55915c25/DERValue.java/buggy/core/src/classpath/gnu/gnu/java/security/der/DERValue.java |
encoded = new byte[0]; | IllegalArgumentException iae = new IllegalArgumentException (); iae.initCause (ioe); throw iae; | public int getLength() { if (encoded == null) { try { ByteArrayOutputStream out = new ByteArrayOutputStream(); length = DERWriter.write(out, this); encoded = out.toByteArray(); } catch (IOException ioe) { encoded = new byte[... | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/5806c07c3eeedb0f4f92b9fbacf30c0f55915c25/DERValue.java/buggy/core/src/classpath/gnu/gnu/java/security/der/DERValue.java |
encoded = new byte[0]; | IllegalArgumentException iae = new IllegalArgumentException (); iae.initCause (ioe); throw iae; | public int getEncodedLength() { if (encoded == null) { try { ByteArrayOutputStream out = new ByteArrayOutputStream(); length = DERWriter.write(out, this); encoded = out.toByteArray(); } catch (IOException ioe) { encoded = ne... | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/5806c07c3eeedb0f4f92b9fbacf30c0f55915c25/DERValue.java/buggy/core/src/classpath/gnu/gnu/java/security/der/DERValue.java |
Toolkit tk = getToolkit(); if (! (tk instanceof EmbeddedWindowSupport)) throw new UnsupportedOperationException ("Embedded windows are not supported by the current peers: " + tk.getClass()); | ClasspathToolkit tk = (ClasspathToolkit) getToolkit(); | public void addNotify() { Toolkit tk = getToolkit(); if (! (tk instanceof EmbeddedWindowSupport)) throw new UnsupportedOperationException ("Embedded windows are not supported by the current peers: " + tk.getClass()); // Circumvent the package-privateness of the AWT internal // java.awt.Compo... | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/50cfc3ee73e2e377b07c91f0e40a2f172b10fd27/EmbeddedWindow.java/clean/core/src/classpath/gnu/gnu/java/awt/EmbeddedWindow.java |
peerField.set(this, ((EmbeddedWindowSupport) tk).createEmbeddedWindow (this)); | peerField.set(this, tk.createEmbeddedWindow (this)); | public void addNotify() { Toolkit tk = getToolkit(); if (! (tk instanceof EmbeddedWindowSupport)) throw new UnsupportedOperationException ("Embedded windows are not supported by the current peers: " + tk.getClass()); // Circumvent the package-privateness of the AWT internal // java.awt.Compo... | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/50cfc3ee73e2e377b07c91f0e40a2f172b10fd27/EmbeddedWindow.java/clean/core/src/classpath/gnu/gnu/java/awt/EmbeddedWindow.java |
addNotify() { | public void addNotify() { | addNotify(){ if (menuBar != null) menuBar.addNotify(); if (peer == null) peer = getToolkit ().createFrame (this); super.addNotify();} | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/5806c07c3eeedb0f4f92b9fbacf30c0f55915c25/Frame.java/buggy/core/src/classpath/java/java/awt/Frame.java |
} | } | addNotify(){ if (menuBar != null) menuBar.addNotify(); if (peer == null) peer = getToolkit ().createFrame (this); super.addNotify();} | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/5806c07c3eeedb0f4f92b9fbacf30c0f55915c25/Frame.java/buggy/core/src/classpath/java/java/awt/Frame.java |
public SetAccessibleAction(AccessibleObject member) | public SetAccessibleAction() | public SetAccessibleAction(AccessibleObject member) { this.member = member; } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/e81465c8dc08fe3c0a055c4bb1c2588e37b39c25/SetAccessibleAction.java/buggy/core/src/classpath/gnu/gnu/java/security/action/SetAccessibleAction.java |
this.member = member; | public SetAccessibleAction(AccessibleObject member) { this.member = member; } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/e81465c8dc08fe3c0a055c4bb1c2588e37b39c25/SetAccessibleAction.java/buggy/core/src/classpath/gnu/gnu/java/security/action/SetAccessibleAction.java | |
File ses = new File(SESSIONS); | private void checkLegacy() { // we check if the sessions file already exists in the directory // if it does exist we are working with an old install so we // need to set the settings directory to the users directory // SESSIONS is declared as a string, so we just can use the keyword here. Fi... | 1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/c91e1701e94caeff60dd19745948841b95027425/GlobalConfigure.java/clean/tn5250j/src/org/tn5250j/GlobalConfigure.java | |
settings.setProperty("emulator.settingsDirectory", System.getProperty("user.dir") + File.separator); | int cfc; settings.setProperty("emulator.settingsDirectory", System.getProperty("user.dir") + File.separator); cfc = JOptionPane.showConfirmDialog(null, "Dear User,\n\n" + "Seems you are using an old version of tn5250j.\n" + "In meanwhile the application became multi-user capable,\n" + "which means ALL the config- and s... | private void checkLegacy() { // we check if the sessions file already exists in the directory // if it does exist we are working with an old install so we // need to set the settings directory to the users directory // SESSIONS is declared as a string, so we just can use the keyword here. Fi... | 1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/c91e1701e94caeff60dd19745948841b95027425/GlobalConfigure.java/clean/tn5250j/src/org/tn5250j/GlobalConfigure.java |
File sd = new File(settings.getProperty("emulator.settingsDirectory")); if (!sd.isDirectory()) sd.mkdirs(); | private void loadSettings() { FileInputStream in = null; settings = new Properties(); // here we will check for a system property is provided first. if (System.getProperties().containsKey("emulator.settingsDirectory")) { settings.setProperty("emulator.settingsDirectory", ... | 1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/c91e1701e94caeff60dd19745948841b95027425/GlobalConfigure.java/clean/tn5250j/src/org/tn5250j/GlobalConfigure.java | |
abstract public String getProperty(String regKey, String defaultValue); | abstract public String getProperty(String regKey); | abstract public String getProperty(String regKey, String defaultValue); | 1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/d176b045eb10d934c5b8bbe4ce787a7bbc5a271e/ConfigureFactory.java/buggy/tn5250j/src/org/tn5250j/interfaces/ConfigureFactory.java |
} | } | public void run() { drainEvents(); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/Timer.java/buggy/core/src/classpath/javax/javax/swing/Timer.java |
try | try | public void run() { running = true; try { sleep(initialDelay); queueEvent(); while (running) { try { sleep(delay); } catch (InterruptedException e) { return; } queueEvent(); if (logTimers... | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/Timer.java/buggy/core/src/classpath/javax/javax/swing/Timer.java |
public void run() { running = true; try { sleep(initialDelay); queueEvent(); while (running) { try { sleep(delay); } catch (InterruptedException e) { return; } queueEvent(); if (logTimers... | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/Timer.java/buggy/core/src/classpath/javax/javax/swing/Timer.java | ||
while (running) { try { sleep(delay); } catch (InterruptedException e) { return; } queueEvent(); | if (repeats) while (running) { try { sleep(delay); } catch (InterruptedException e) { return; } queueEvent(); | public void run() { running = true; try { sleep(initialDelay); queueEvent(); while (running) { try { sleep(delay); } catch (InterruptedException e) { return; } queueEvent(); if (logTimers... | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/Timer.java/buggy/core/src/classpath/javax/javax/swing/Timer.java |
if (logTimers) System.out.println("javax.swing.Timer -> clocktick"); if ( ! repeats) break; } running = false; } catch (Exception e) | if (logTimers) System.out.println("javax.swing.Timer -> clocktick"); if ( ! repeats) break; } running = false; } catch (Exception e) | public void run() { running = true; try { sleep(initialDelay); queueEvent(); while (running) { try { sleep(delay); } catch (InterruptedException e) { return; } queueEvent(); if (logTimers... | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/Timer.java/buggy/core/src/classpath/javax/javax/swing/Timer.java |
} | } | public void run() { running = true; try { sleep(initialDelay); queueEvent(); while (running) { try { sleep(delay); } catch (InterruptedException e) { return; } queueEvent(); if (logTimers... | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/Timer.java/buggy/core/src/classpath/javax/javax/swing/Timer.java |
setOpaque(true); | public SwingLabel(Label awtComponent) { this.awtComponent = awtComponent; } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/dd5ff39999544f9f37603e35023d112e22fdd049/SwingLabelPeer.java/buggy/gui/src/awt/org/jnode/awt/swingpeers/SwingLabelPeer.java | |
awtComponent.dispatchEvent(SwingToolkit.convertEvent(event, awtComponent)); | awtComponent.dispatchEvent(SwingToolkit.convertEvent(event, awtComponent)); | protected final void processEvent(AWTEvent event) { awtComponent.dispatchEvent(SwingToolkit.convertEvent(event, awtComponent)); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/dd5ff39999544f9f37603e35023d112e22fdd049/SwingLabelPeer.java/buggy/gui/src/awt/org/jnode/awt/swingpeers/SwingLabelPeer.java |
super(toolkit, label, new SwingLabel(label)); final JLabel jLabel = (JLabel) jComponent; SwingToolkit.add(label, jLabel); SwingToolkit.copyAwtProperties(label, jLabel); setText(label.getText()); } | super(toolkit, label, new SwingLabel(label)); SwingToolkit.add(label, jComponent); SwingToolkit.copyAwtProperties(label, jComponent); setText(label.getText()); setAlignment(label.getAlignment()); } | public SwingLabelPeer(SwingToolkit toolkit, Label label) { super(toolkit, label, new SwingLabel(label)); final JLabel jLabel = (JLabel) jComponent; SwingToolkit.add(label, jLabel); SwingToolkit.copyAwtProperties(label, jLabel); setText(label.getText()); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/dd5ff39999544f9f37603e35023d112e22fdd049/SwingLabelPeer.java/buggy/gui/src/awt/org/jnode/awt/swingpeers/SwingLabelPeer.java |
} | switch (alignment) { case Label.LEFT: jComponent.setHorizontalAlignment(SwingConstants.LEFT); break; case Label.CENTER: jComponent.setHorizontalAlignment(SwingConstants.CENTER); break; case Label.RIGHT: jComponent.setHorizontalAlignment(SwingConstants.RIGHT); break; } } | public void setAlignment(int alignment) { //TODO implement it } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/dd5ff39999544f9f37603e35023d112e22fdd049/SwingLabelPeer.java/buggy/gui/src/awt/org/jnode/awt/swingpeers/SwingLabelPeer.java |
((JLabel) jComponent).setText(text); } | jComponent.setText(text); } | public void setText(String text) { ((JLabel) jComponent).setText(text); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/dd5ff39999544f9f37603e35023d112e22fdd049/SwingLabelPeer.java/buggy/gui/src/awt/org/jnode/awt/swingpeers/SwingLabelPeer.java |
public CommandShell() throws NameNotFoundException, ShellException { this((ScrollableShellConsole) ((ConsoleManager) InitialNaming.lookup(ConsoleManager.NAME)).getFocus()); } | public CommandShell() throws NameNotFoundException, ShellException { this((ScrollableShellConsole) ((ConsoleManager) InitialNaming .lookup(ConsoleManager.NAME)).getFocus()); } | public CommandShell() throws NameNotFoundException, ShellException { this((ScrollableShellConsole) ((ConsoleManager) InitialNaming.lookup(ConsoleManager.NAME)).getFocus()); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/8475fed231619f209c4398ccad2ba966899e292d/CommandShell.java/buggy/shell/src/shell/org/jnode/shell/CommandShell.java |
if (!cmdLineStr.equals(newestLine)) history.addCommand(cmdLineStr); } | if (!cmdLineStr.equals(newestLine)) history.addCommand(cmdLineStr); } | public void addCommandToHistory(String cmdLineStr) { // Add this command to the history. if (!cmdLineStr.equals(newestLine)) history.addCommand(cmdLineStr); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/8475fed231619f209c4398ccad2ba966899e292d/CommandShell.java/buggy/shell/src/shell/org/jnode/shell/CommandShell.java |
try { ShellUtils.getShellManager().registerShell(this); } catch (NameNotFoundException ex) { } dirty = false; String result = null; try { CommandLine cl = new CommandLine(partial); String cmd = ""; if (cl.hasNext()) { cmd = cl.next(); if (!cmd.trim().equals("") && cl.hasNext()) try { Class cmdClass = getCommandClass... | try { ShellUtils.getShellManager().registerShell(this); } catch (NameNotFoundException ex) { } dirty = false; String result = null; try { CommandLine cl = new CommandLine(partial); String cmd = ""; if (cl.hasNext()) { cmd = cl.next(); if (!cmd.trim().equals("") && cl.hasNext()) try { Class cmdClass = getCommandClass... | private String complete(String partial) { // workaround to set the currentShell to this shell try { ShellUtils.getShellManager().registerShell(this); } catch (NameNotFoundException ex) { } dirty = false; String result = null; try { CommandLine cl = new CommandLine(partial); String cmd = ""; if (cl.has... | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/8475fed231619f209c4398ccad2ba966899e292d/CommandShell.java/buggy/shell/src/shell/org/jnode/shell/CommandShell.java |
return aliasMgr; } | return aliasMgr; } | public AliasManager getAliasManager() { return aliasMgr; } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/8475fed231619f209c4398ccad2ba966899e292d/CommandShell.java/buggy/shell/src/shell/org/jnode/shell/CommandShell.java |
try { return aliasMgr.getAliasClass(cmd); } catch (NoSuchAliasException ex) { final ClassLoader cl = Thread.currentThread().getContextClassLoader(); return cl.loadClass(cmd); } } | try { return aliasMgr.getAliasClass(cmd); } catch (NoSuchAliasException ex) { final ClassLoader cl = Thread.currentThread() .getContextClassLoader(); return cl.loadClass(cmd); } } | protected Class getCommandClass(String cmd) throws ClassNotFoundException { try { return aliasMgr.getAliasClass(cmd); } catch (NoSuchAliasException ex) { final ClassLoader cl = Thread.currentThread().getContextClassLoader(); return cl.loadClass(cmd); } } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/8475fed231619f209c4398ccad2ba966899e292d/CommandShell.java/buggy/shell/src/shell/org/jnode/shell/CommandShell.java |
return history; } | return history; } | public CommandHistory getCommandHistory() { return history; } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/8475fed231619f209c4398ccad2ba966899e292d/CommandShell.java/buggy/shell/src/shell/org/jnode/shell/CommandShell.java |
return console; } | return console; } | public Console getConsole() { return console; } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/8475fed231619f209c4398ccad2ba966899e292d/CommandShell.java/buggy/shell/src/shell/org/jnode/shell/CommandShell.java |
return err; } | return err; } | public PrintStream getErrorStream() { return err; } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/8475fed231619f209c4398ccad2ba966899e292d/CommandShell.java/buggy/shell/src/shell/org/jnode/shell/CommandShell.java |
if (!isActive) return; switch(ke.getKeyCode()) { case KeyEvent.VK_UP: ke.consume(); if (historyIndex == -1) { newestLine = currentLine; historyIndex = history.size(); } historyIndex--; redisplay(); break; case KeyEvent.VK_DOWN: ke.consume(); if (historyIndex == history.size() - 1) historyIndex = -2; else if (history... | if (!isActive) return; switch (ke.getKeyCode()) { case KeyEvent.VK_UP: ke.consume(); if (historyIndex == -1) { newestLine = currentLine; historyIndex = history.size(); } historyIndex--; redisplay(); break; case KeyEvent.VK_DOWN: ke.consume(); if (historyIndex == history.size() - 1) historyIndex = -2; else if (histor... | public void keyPressed(KeyboardEvent ke) { // make sure we are ready to intercept the keyboard if (!isActive) return; switch(ke.getKeyCode()) { // intercept the up and down arrow keys case KeyEvent.VK_UP: ke.consume(); if (historyIndex == -1) { newestLine = currentLine; historyIndex = histor... | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/8475fed231619f209c4398ccad2ba966899e292d/CommandShell.java/buggy/shell/src/shell/org/jnode/shell/CommandShell.java |
} | } | public void keyReleased(KeyboardEvent ke) { // do nothing } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/8475fed231619f209c4398ccad2ba966899e292d/CommandShell.java/buggy/shell/src/shell/org/jnode/shell/CommandShell.java |
System.out.println(); for (int i = 0; i < items.length; i++) System.out.println(items[i]); dirty = true; } | System.out.println(); for (int i = 0; i < items.length; i++) System.out.println(items[ i]); dirty = true; } | public void list(String[] items) { System.out.println(); for (int i = 0; i < items.length; i++) System.out.println(items[i]); dirty = true; } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/8475fed231619f209c4398ccad2ba966899e292d/CommandShell.java/buggy/shell/src/shell/org/jnode/shell/CommandShell.java |
commandInvoker.invoke(cmdLineStr); } | commandInvoker.invoke(cmdLineStr); } | protected void processCommand(String cmdLineStr) { commandInvoker.invoke(cmdLineStr); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/8475fed231619f209c4398ccad2ba966899e292d/CommandShell.java/buggy/shell/src/shell/org/jnode/shell/CommandShell.java |
String prompt = System.getProperty(PROMPT_PROPERTY_NAME); final StringBuffer result = new StringBuffer(); boolean commandMode = false; try { StringReader reader = new StringReader(prompt); int i; while ((i = reader.read()) != -1) { char c = (char) i; if (commandMode) { switch (c) { case 'P' : result.append(new File((St... | String prompt = System.getProperty(PROMPT_PROPERTY_NAME); final StringBuffer result = new StringBuffer(); boolean commandMode = false; try { StringReader reader = new StringReader(prompt); int i; while ((i = reader.read()) != -1) { char c = (char) i; if (commandMode) { switch (c) { case 'P': result.append(new File( (St... | protected String prompt() { String prompt = System.getProperty(PROMPT_PROPERTY_NAME); final StringBuffer result = new StringBuffer(); boolean commandMode = false; try { StringReader reader = new StringReader(prompt); int i; while ((i = reader.read()) != -1) { char c = (char) i; if (commandMode) { s... | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/8475fed231619f209c4398ccad2ba966899e292d/CommandShell.java/buggy/shell/src/shell/org/jnode/shell/CommandShell.java |
if (console != null) { console.clearLine(console.getCursorY()); } out.print(currentPrompt); if (historyIndex == -1) currentLine = newestLine; else currentLine = history.getCommand(historyIndex); out.print(currentLine); posOnCurrentLine = currentLine.length(); } | if (console != null) { console.clearLine(console.getCursorY()); } out.print(currentPrompt); if (historyIndex == -1) currentLine = newestLine; else currentLine = history.getCommand(historyIndex); out.print(currentLine); posOnCurrentLine = currentLine.length(); } | private void redisplay() { // clear the line if (console != null) { console.clearLine(console.getCursorY()); } // display the prompt out.print(currentPrompt); // display the required history/current line if (historyIndex == -1) currentLine = newestLine; else currentLine = history.getCommand(historyInd... | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/8475fed231619f209c4398ccad2ba966899e292d/CommandShell.java/buggy/shell/src/shell/org/jnode/shell/CommandShell.java |
try { int y = console.getCursorY(); console.clearLine(y); /* Uncomment this to display cursor position console.clearLine(y-25); console.setCursor(0, y-1); err.print("Cursor pos : x = "+currentPrompt.length() + posOnCurrentLine+", y = "+y); console.setCursor(0, y); */ out.print(currentPrompt + currentLine + " "); consol... | try { int y = console.getCursorY(); console.clearLine(y); /* * Uncomment this to display cursor position * console.clearLine(y-25); console.setCursor(0, y-1); * err.print("Cursor pos : x = "+currentPrompt.length() + * posOnCurrentLine+", y = "+y); console.setCursor(0, y); */ out.print(currentPrompt + currentLine + " ")... | private void refreshCurrentLine() { try { int y = console.getCursorY(); console.clearLine(y); /* Uncomment this to display cursor position console.clearLine(y-25); console.setCursor(0, y-1); err.print("Cursor pos : x = "+currentPrompt.length() + posOnCurrentLine+", y = "+y); console.setCursor(0, y); ... | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/8475fed231619f209c4398ccad2ba966899e292d/CommandShell.java/buggy/shell/src/shell/org/jnode/shell/CommandShell.java |
final String cmdLine = (String)AccessController.doPrivileged(new GetPropertyAction("jnode.cmdline", "")); final StringTokenizer tok = new StringTokenizer(cmdLine); while (tok.hasMoreTokens()) { final String e = tok.nextToken(); try { if (e.startsWith("cmd=")) { final String cmd = e.substring("cmd=".length()); currentP... | final String cmdLine = (String) AccessController .doPrivileged(new GetPropertyAction("jnode.cmdline", "")); final StringTokenizer tok = new StringTokenizer(cmdLine); while (tok.hasMoreTokens()) { final String e = tok.nextToken(); try { if (e.startsWith("cmd=")) { final String cmd = e.substring("cmd=".length()); curren... | public void run() { // Run commands from the JNode commandline first final String cmdLine = (String)AccessController.doPrivileged(new GetPropertyAction("jnode.cmdline", "")); final StringTokenizer tok = new StringTokenizer(cmdLine); while (tok.hasMoreTokens()) { final String e = tok.nextToken(); try { if (e... | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/8475fed231619f209c4398ccad2ba966899e292d/CommandShell.java/buggy/shell/src/shell/org/jnode/shell/CommandShell.java |
this.commandInvoker = defaultCommandInvoker; } | this.commandInvoker = defaultCommandInvoker; } | public void setDefaultCommandInvoker() { this.commandInvoker = defaultCommandInvoker; } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/8475fed231619f209c4398ccad2ba966899e292d/CommandShell.java/buggy/shell/src/shell/org/jnode/shell/CommandShell.java |
this.commandInvoker = threadCommandInvoker; } | this.commandInvoker = threadCommandInvoker; } | public void setThreadCommandInvoker() { this.commandInvoker = threadCommandInvoker; } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/8475fed231619f209c4398ccad2ba966899e292d/CommandShell.java/buggy/shell/src/shell/org/jnode/shell/CommandShell.java |
public AliasArgument(String name, String description) { super(name, description); | public AliasArgument(String name, String description, boolean multi) { super(name, description, multi); | public AliasArgument(String name, String description) { super(name, description); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/51e4aed2205f326c2698e2154ea7f83ae5dfc2b6/AliasArgument.java/buggy/shell/src/shell/org/jnode/shell/help/AliasArgument.java |
public ShellException(String message, Throwable cause) { super(message, cause); | public ShellException() { super(); | public ShellException(String message, Throwable cause) { super(message, cause); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/51e4aed2205f326c2698e2154ea7f83ae5dfc2b6/ShellException.java/buggy/shell/src/shell/org/jnode/shell/ShellException.java |
public abstract StringBuffer format (Date date, StringBuffer buf, FieldPosition pos); | public final StringBuffer format (Object obj, StringBuffer buf, FieldPosition pos) { if (obj instanceof Number) obj = new Date(((Number) obj).longValue()); else if (! (obj instanceof Date)) throw new IllegalArgumentException ("Cannot format given Object as a Date"); return format ((Date) obj, buf, pos); } | public abstract StringBuffer format (Date date, StringBuffer buf, FieldPosition pos); | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/1a6944e2b647ccd9f0a45036fbe2dcd289ca1699/DateFormat.java/buggy/core/src/classpath/java/java/text/DateFormat.java |
public int add(SocketBuffer skbuf, int index, int length) { | public int add(byte[] src, int srcOffset, int length) { | public int add(SocketBuffer skbuf, int index, int length) { if (length > getFreeSize()) { throw new IllegalArgumentException("Not enough free space"); } final int dstOffset = this.used; skbuf.get(this.data, dstOffset, index, length); this.used += length; return dstOffset; } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/51e4aed2205f326c2698e2154ea7f83ae5dfc2b6/TCPDataBuffer.java/buggy/net/src/net/org/jnode/net/ipv4/tcp/TCPDataBuffer.java |
skbuf.get(this.data, dstOffset, index, length); | System.arraycopy(src, srcOffset, this.data, dstOffset, length); | public int add(SocketBuffer skbuf, int index, int length) { if (length > getFreeSize()) { throw new IllegalArgumentException("Not enough free space"); } final int dstOffset = this.used; skbuf.get(this.data, dstOffset, index, length); this.used += length; return dstOffset; } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/51e4aed2205f326c2698e2154ea7f83ae5dfc2b6/TCPDataBuffer.java/buggy/net/src/net/org/jnode/net/ipv4/tcp/TCPDataBuffer.java |
public short loadShort(Offset offset) { | public short loadShort() { | public short loadShort(Offset offset) { return (short) 0; } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/51e4aed2205f326c2698e2154ea7f83ae5dfc2b6/Address.java/buggy/core/src/vmmagic/org/vmmagic/unboxed/Address.java |
public char loadChar(Offset offset) { | public char loadChar() { | public char loadChar(Offset offset) { return (char) 0; } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/51e4aed2205f326c2698e2154ea7f83ae5dfc2b6/Address.java/buggy/core/src/vmmagic/org/vmmagic/unboxed/Address.java |
public DDC1NoSignalException(String s) { super(s); | public DDC1NoSignalException() { super(); | public DDC1NoSignalException(String s) { super(s); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/51e4aed2205f326c2698e2154ea7f83ae5dfc2b6/DDC1NoSignalException.java/buggy/gui/src/driver/org/jnode/driver/video/ddc/DDC1NoSignalException.java |
SecurityManager s = System.getSecurityManager(); if (s != null) | SecurityManager s = System.getSecurityManager(); if (s != null) | public void bind(SocketAddress address) throws SocketException { if (isClosed()) throw new SocketException("socket is closed"); if (! (address instanceof InetSocketAddress)) throw new IllegalArgumentException("unsupported address type"); InetAddress addr = ((InetSocketAddress) address).getAddress(... | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/6cac04c48e1afad0cfbb014fb4ace224bd84bfaf/DatagramSocket.java/clean/core/src/classpath/java/java/net/DatagramSocket.java |
} | } | public void close() { if (isClosed()) return; try { getImpl().close(); } catch (SocketException e) { // Ignore this case, just close the socket in finally clause. } finally { remoteAddress = null; remotePort = -1; impl = null; } try { if (getChannel() != null) ... | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/6cac04c48e1afad0cfbb014fb4ace224bd84bfaf/DatagramSocket.java/clean/core/src/classpath/java/java/net/DatagramSocket.java |
if ((port < 1) || (port > 65535)) | if ((port < 1) || (port > 65535)) | public void connect(InetAddress address, int port) { if (address == null) throw new IllegalArgumentException("Connect address may not be null"); if ((port < 1) || (port > 65535)) throw new IllegalArgumentException("Port number is illegal: " + port); SecurityManager sm = System.getSecurityManager(); i... | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/6cac04c48e1afad0cfbb014fb4ace224bd84bfaf/DatagramSocket.java/clean/core/src/classpath/java/java/net/DatagramSocket.java |
SecurityManager sm = System.getSecurityManager(); if (sm != null) sm.checkConnect(address.getHostName(), port); | SecurityManager sm = System.getSecurityManager(); if (sm != null) sm.checkConnect(address.getHostAddress(), port); | public void connect(InetAddress address, int port) { if (address == null) throw new IllegalArgumentException("Connect address may not be null"); if ((port < 1) || (port > 65535)) throw new IllegalArgumentException("Port number is illegal: " + port); SecurityManager sm = System.getSecurityManager(); i... | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/6cac04c48e1afad0cfbb014fb4ace224bd84bfaf/DatagramSocket.java/clean/core/src/classpath/java/java/net/DatagramSocket.java |
} | } | public void connect(InetAddress address, int port) { if (address == null) throw new IllegalArgumentException("Connect address may not be null"); if ((port < 1) || (port > 65535)) throw new IllegalArgumentException("Port number is illegal: " + port); SecurityManager sm = System.getSecurityManager(); i... | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/6cac04c48e1afad0cfbb014fb4ace224bd84bfaf/DatagramSocket.java/clean/core/src/classpath/java/java/net/DatagramSocket.java |
} | } | public void disconnect() { if (! isConnected()) return; try { getImpl().disconnect(); } catch (SocketException e) { // This cannot happen as we are connected. } finally { remoteAddress = null; remotePort = -1; } } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/6cac04c48e1afad0cfbb014fb4ace224bd84bfaf/DatagramSocket.java/clean/core/src/classpath/java/java/net/DatagramSocket.java |
} | } | public boolean getBroadcast() throws SocketException { if (isClosed()) throw new SocketException("socket is closed"); Object buf = getImpl().getOption(SocketOptions.SO_BROADCAST); if (buf instanceof Boolean) return ((Boolean) buf).booleanValue(); throw new SocketException("unexpected type"); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/6cac04c48e1afad0cfbb014fb4ace224bd84bfaf/DatagramSocket.java/clean/core/src/classpath/java/java/net/DatagramSocket.java |
} | } | public DatagramChannel getChannel() { return null; } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/6cac04c48e1afad0cfbb014fb4ace224bd84bfaf/DatagramSocket.java/clean/core/src/classpath/java/java/net/DatagramSocket.java |
} | } | DatagramSocketImpl getImpl() throws SocketException { try { if (! implCreated) { impl.create(); implCreated = true; } return impl; } catch (IOException e) { SocketException se = new SocketException(); se.initCause(e); throw se; } } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/6cac04c48e1afad0cfbb014fb4ace224bd84bfaf/DatagramSocket.java/clean/core/src/classpath/java/java/net/DatagramSocket.java |
} | } | DatagramSocketImpl getImpl() throws SocketException { try { if (! implCreated) { impl.create(); implCreated = true; } return impl; } catch (IOException e) { SocketException se = new SocketException(); se.initCause(e); throw se; } } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/6cac04c48e1afad0cfbb014fb4ace224bd84bfaf/DatagramSocket.java/clean/core/src/classpath/java/java/net/DatagramSocket.java |
} } | } } | DatagramSocketImpl getImpl() throws SocketException { try { if (! implCreated) { impl.create(); implCreated = true; } return impl; } catch (IOException e) { SocketException se = new SocketException(); se.initCause(e); throw se; } } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/6cac04c48e1afad0cfbb014fb4ace224bd84bfaf/DatagramSocket.java/clean/core/src/classpath/java/java/net/DatagramSocket.java |
return remoteAddress; } | return remoteAddress; } | public InetAddress getInetAddress() { return remoteAddress; } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/6cac04c48e1afad0cfbb014fb4ace224bd84bfaf/DatagramSocket.java/clean/core/src/classpath/java/java/net/DatagramSocket.java |
return null; | return null; | public InetAddress getLocalAddress() { if (! isBound()) return null; InetAddress localAddr; try { localAddr = (InetAddress) getImpl().getOption(SocketOptions.SO_BINDADDR); SecurityManager s = System.getSecurityManager(); if (s != null) s.checkConnect(localAddr.getHostName(), -1); } catch ... | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/6cac04c48e1afad0cfbb014fb4ace224bd84bfaf/DatagramSocket.java/clean/core/src/classpath/java/java/net/DatagramSocket.java |
s.checkConnect(localAddr.getHostName(), -1); | s.checkConnect(localAddr.getHostAddress(), -1); | public InetAddress getLocalAddress() { if (! isBound()) return null; InetAddress localAddr; try { localAddr = (InetAddress) getImpl().getOption(SocketOptions.SO_BINDADDR); SecurityManager s = System.getSecurityManager(); if (s != null) s.checkConnect(localAddr.getHostName(), -1); } catch ... | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/6cac04c48e1afad0cfbb014fb4ace224bd84bfaf/DatagramSocket.java/clean/core/src/classpath/java/java/net/DatagramSocket.java |
} | } | public InetAddress getLocalAddress() { if (! isBound()) return null; InetAddress localAddr; try { localAddr = (InetAddress) getImpl().getOption(SocketOptions.SO_BINDADDR); SecurityManager s = System.getSecurityManager(); if (s != null) s.checkConnect(localAddr.getHostName(), -1); } catch ... | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/6cac04c48e1afad0cfbb014fb4ace224bd84bfaf/DatagramSocket.java/clean/core/src/classpath/java/java/net/DatagramSocket.java |
} | } | public int getLocalPort() { if (isClosed()) return -1; try { return getImpl().getLocalPort(); } catch (SocketException e) { // This cannot happen as we are bound. return 0; } } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/6cac04c48e1afad0cfbb014fb4ace224bd84bfaf/DatagramSocket.java/clean/core/src/classpath/java/java/net/DatagramSocket.java |
return null; | return null; | public SocketAddress getLocalSocketAddress() { if (! isBound()) return null; return new InetSocketAddress(getLocalAddress(), getLocalPort()); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/6cac04c48e1afad0cfbb014fb4ace224bd84bfaf/DatagramSocket.java/clean/core/src/classpath/java/java/net/DatagramSocket.java |
} | } | public SocketAddress getLocalSocketAddress() { if (! isBound()) return null; return new InetSocketAddress(getLocalAddress(), getLocalPort()); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/6cac04c48e1afad0cfbb014fb4ace224bd84bfaf/DatagramSocket.java/clean/core/src/classpath/java/java/net/DatagramSocket.java |
return remotePort; } | return remotePort; } | public int getPort() { return remotePort; } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/6cac04c48e1afad0cfbb014fb4ace224bd84bfaf/DatagramSocket.java/clean/core/src/classpath/java/java/net/DatagramSocket.java |
} | } | public int getReceiveBufferSize() throws SocketException { if (isClosed()) throw new SocketException("socket is closed"); Object buf = getImpl().getOption(SocketOptions.SO_RCVBUF); if (buf instanceof Integer) return ((Integer) buf).intValue(); throw new SocketException("unexpected type"); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/6cac04c48e1afad0cfbb014fb4ace224bd84bfaf/DatagramSocket.java/clean/core/src/classpath/java/java/net/DatagramSocket.java |
return null; | return null; | public SocketAddress getRemoteSocketAddress() { if (! isConnected()) return null; return new InetSocketAddress(remoteAddress, remotePort); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/6cac04c48e1afad0cfbb014fb4ace224bd84bfaf/DatagramSocket.java/clean/core/src/classpath/java/java/net/DatagramSocket.java |
return new InetSocketAddress(remoteAddress, remotePort); } | return new InetSocketAddress(remoteAddress, remotePort); } | public SocketAddress getRemoteSocketAddress() { if (! isConnected()) return null; return new InetSocketAddress(remoteAddress, remotePort); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/6cac04c48e1afad0cfbb014fb4ace224bd84bfaf/DatagramSocket.java/clean/core/src/classpath/java/java/net/DatagramSocket.java |
} | } | public boolean getReuseAddress() throws SocketException { if (isClosed()) throw new SocketException("socket is closed"); Object buf = getImpl().getOption(SocketOptions.SO_REUSEADDR); if (buf instanceof Boolean) return ((Boolean) buf).booleanValue(); throw new SocketException("unexpected type");... | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/6cac04c48e1afad0cfbb014fb4ace224bd84bfaf/DatagramSocket.java/clean/core/src/classpath/java/java/net/DatagramSocket.java |
} | } | public int getSendBufferSize() throws SocketException { if (isClosed()) throw new SocketException("socket is closed"); Object buf = getImpl().getOption(SocketOptions.SO_SNDBUF); if (buf instanceof Integer) return ((Integer) buf).intValue(); throw new SocketException("unexpected type"); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/6cac04c48e1afad0cfbb014fb4ace224bd84bfaf/DatagramSocket.java/clean/core/src/classpath/java/java/net/DatagramSocket.java |
} | } | public synchronized int getSoTimeout() throws SocketException { if (isClosed()) throw new SocketException("socket is closed"); Object buf = getImpl().getOption(SocketOptions.SO_TIMEOUT); if (buf instanceof Integer) return ((Integer) buf).intValue(); throw new SocketException("unexpected type");... | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/6cac04c48e1afad0cfbb014fb4ace224bd84bfaf/DatagramSocket.java/clean/core/src/classpath/java/java/net/DatagramSocket.java |
} | } | public int getTrafficClass() throws SocketException { if (isClosed()) throw new SocketException("socket is closed"); Object buf = getImpl().getOption(SocketOptions.IP_TOS); if (buf instanceof Integer) return ((Integer) buf).intValue(); throw new SocketException("unexpected type"); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/6cac04c48e1afad0cfbb014fb4ace224bd84bfaf/DatagramSocket.java/clean/core/src/classpath/java/java/net/DatagramSocket.java |
} | } | public boolean isBound() { return bound; } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/6cac04c48e1afad0cfbb014fb4ace224bd84bfaf/DatagramSocket.java/clean/core/src/classpath/java/java/net/DatagramSocket.java |
} | } | public boolean isClosed() { return impl == null; } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/6cac04c48e1afad0cfbb014fb4ace224bd84bfaf/DatagramSocket.java/clean/core/src/classpath/java/java/net/DatagramSocket.java |
return remoteAddress != null; } | return remoteAddress != null; } | public boolean isConnected() { return remoteAddress != null; } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/6cac04c48e1afad0cfbb014fb4ace224bd84bfaf/DatagramSocket.java/clean/core/src/classpath/java/java/net/DatagramSocket.java |
getImpl().receive(p); | DatagramPacket p2 = new DatagramPacket(p.getData(), p.getOffset(), p.maxlen); getImpl().receive(p2); p.length = p2.length; if (p2.getAddress() != null) p.setAddress(p2.getAddress()); if (p2.getPort() != -1) p.setPort(p2.getPort()); | public synchronized void receive(DatagramPacket p) throws IOException { if (isClosed()) throw new SocketException("socket is closed"); if (remoteAddress != null && remoteAddress.isMulticastAddress()) throw new IOException ("Socket connected to a multicast address my not receive"); if (getChannel()... | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/6cac04c48e1afad0cfbb014fb4ace224bd84bfaf/DatagramSocket.java/clean/core/src/classpath/java/java/net/DatagramSocket.java |
SecurityManager s = System.getSecurityManager(); if (s != null && isConnected()) s.checkAccept(p.getAddress().getHostName(), p.getPort()); } | SecurityManager s = System.getSecurityManager(); if (s != null && isConnected()) s.checkAccept(p.getAddress().getHostAddress(), p.getPort()); } | public synchronized void receive(DatagramPacket p) throws IOException { if (isClosed()) throw new SocketException("socket is closed"); if (remoteAddress != null && remoteAddress.isMulticastAddress()) throw new IOException ("Socket connected to a multicast address my not receive"); if (getChannel()... | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/6cac04c48e1afad0cfbb014fb4ace224bd84bfaf/DatagramSocket.java/clean/core/src/classpath/java/java/net/DatagramSocket.java |
SecurityManager s = System.getSecurityManager(); | SecurityManager s = System.getSecurityManager(); | public void send(DatagramPacket p) throws IOException { if (isClosed()) throw new SocketException("socket is closed"); // JDK1.2: Don't do security checks if socket is connected; see jdk1.2 api. SecurityManager s = System.getSecurityManager(); if (s != null && ! isConnected()) { InetAddress a... | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/6cac04c48e1afad0cfbb014fb4ace224bd84bfaf/DatagramSocket.java/clean/core/src/classpath/java/java/net/DatagramSocket.java |
InetAddress addr = p.getAddress(); if (addr.isMulticastAddress()) s.checkMulticast(addr); else s.checkConnect(addr.getHostAddress(), p.getPort()); } | InetAddress addr = p.getAddress(); if (addr.isMulticastAddress()) s.checkMulticast(addr); else s.checkConnect(addr.getHostAddress(), p.getPort()); } | public void send(DatagramPacket p) throws IOException { if (isClosed()) throw new SocketException("socket is closed"); // JDK1.2: Don't do security checks if socket is connected; see jdk1.2 api. SecurityManager s = System.getSecurityManager(); if (s != null && ! isConnected()) { InetAddress a... | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/6cac04c48e1afad0cfbb014fb4ace224bd84bfaf/DatagramSocket.java/clean/core/src/classpath/java/java/net/DatagramSocket.java |
} | } | public void send(DatagramPacket p) throws IOException { if (isClosed()) throw new SocketException("socket is closed"); // JDK1.2: Don't do security checks if socket is connected; see jdk1.2 api. SecurityManager s = System.getSecurityManager(); if (s != null && ! isConnected()) { InetAddress a... | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/6cac04c48e1afad0cfbb014fb4ace224bd84bfaf/DatagramSocket.java/clean/core/src/classpath/java/java/net/DatagramSocket.java |
} | } | public void send(DatagramPacket p) throws IOException { if (isClosed()) throw new SocketException("socket is closed"); // JDK1.2: Don't do security checks if socket is connected; see jdk1.2 api. SecurityManager s = System.getSecurityManager(); if (s != null && ! isConnected()) { InetAddress a... | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/6cac04c48e1afad0cfbb014fb4ace224bd84bfaf/DatagramSocket.java/clean/core/src/classpath/java/java/net/DatagramSocket.java |
} | } | public void setBroadcast(boolean enable) throws SocketException { if (isClosed()) throw new SocketException("socket is closed"); getImpl().setOption(SocketOptions.SO_BROADCAST, Boolean.valueOf(enable)); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/6cac04c48e1afad0cfbb014fb4ace224bd84bfaf/DatagramSocket.java/clean/core/src/classpath/java/java/net/DatagramSocket.java |
if (factory != null) throw new SocketException("DatagramSocketImplFactory already defined"); | if (factory != null) throw new SocketException("DatagramSocketImplFactory already defined"); | public static void setDatagramSocketImplFactory(DatagramSocketImplFactory fac) throws IOException { if (factory != null) throw new SocketException("DatagramSocketImplFactory already defined"); SecurityManager sm = System.getSecurityManager(); if (sm != null) sm.checkSetFactory(); factory = fac; } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/6cac04c48e1afad0cfbb014fb4ace224bd84bfaf/DatagramSocket.java/clean/core/src/classpath/java/java/net/DatagramSocket.java |
SecurityManager sm = System.getSecurityManager(); if (sm != null) sm.checkSetFactory(); | SecurityManager sm = System.getSecurityManager(); if (sm != null) sm.checkSetFactory(); | public static void setDatagramSocketImplFactory(DatagramSocketImplFactory fac) throws IOException { if (factory != null) throw new SocketException("DatagramSocketImplFactory already defined"); SecurityManager sm = System.getSecurityManager(); if (sm != null) sm.checkSetFactory(); factory = fac; } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/6cac04c48e1afad0cfbb014fb4ace224bd84bfaf/DatagramSocket.java/clean/core/src/classpath/java/java/net/DatagramSocket.java |
factory = fac; } | factory = fac; } | public static void setDatagramSocketImplFactory(DatagramSocketImplFactory fac) throws IOException { if (factory != null) throw new SocketException("DatagramSocketImplFactory already defined"); SecurityManager sm = System.getSecurityManager(); if (sm != null) sm.checkSetFactory(); factory = fac; } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/6cac04c48e1afad0cfbb014fb4ace224bd84bfaf/DatagramSocket.java/clean/core/src/classpath/java/java/net/DatagramSocket.java |
if (size < 0) throw new IllegalArgumentException("Buffer size is less than 0"); | if (size < 0) throw new IllegalArgumentException("Buffer size is less than 0"); | public void setReceiveBufferSize(int size) throws SocketException { if (isClosed()) throw new SocketException("socket is closed"); if (size < 0) throw new IllegalArgumentException("Buffer size is less than 0"); getImpl().setOption(SocketOptions.SO_RCVBUF, new Integer(size)); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/6cac04c48e1afad0cfbb014fb4ace224bd84bfaf/DatagramSocket.java/clean/core/src/classpath/java/java/net/DatagramSocket.java |
} | } | public void setReceiveBufferSize(int size) throws SocketException { if (isClosed()) throw new SocketException("socket is closed"); if (size < 0) throw new IllegalArgumentException("Buffer size is less than 0"); getImpl().setOption(SocketOptions.SO_RCVBUF, new Integer(size)); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/6cac04c48e1afad0cfbb014fb4ace224bd84bfaf/DatagramSocket.java/clean/core/src/classpath/java/java/net/DatagramSocket.java |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.