bugged
stringlengths
6
599k
fixed
stringlengths
10
599k
__index_level_0__
int64
0
1.13M
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); }
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); }
1,107
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); }
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); }
1,108
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 iae; } }
private X500Principal() { this(); if (name == null) throw new NullPointerException(); try { parseString (name); } catch (IOException ioe) { IllegalArgumentException iae = new IllegalArgumentException("malformed name"); iae.initCause (ioe); throw iae; } }
1,109
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 iae; } }
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 iae; } }
1,110
public OID(String strRep) { this(strRep, false); }
public OID(int[] components) { this(strRep, false); }
1,111
public OID(String strRep) { this(strRep, false); }
public OID(String strRep) { this(components, false); }
1,112
public byte[] getEncoded() { if (encoded == null) { try { ByteArrayOutputStream out = new ByteArrayOutputStream(); length = DERWriter.write(out, this); encoded = out.toByteArray(); } catch (IOException ioe) { encoded = new byte[0]; } } return (byte[]) encoded.clone(); }
public byte[] getEncoded() { if (encoded == null) { try { ByteArrayOutputStream out = new ByteArrayOutputStream(); length = DERWriter.write(out, this); encoded = out.toByteArray(); } catch (IOException ioe) { IllegalArgumentException iae = new IllegalArgumentException (); iae.initCause (ioe); throw iae; } } return (byte[]) encoded.clone(); }
1,113
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[0]; } } return length; }
public int getLength() { if (encoded == null) { try { ByteArrayOutputStream out = new ByteArrayOutputStream(); length = DERWriter.write(out, this); encoded = out.toByteArray(); } catch (IOException ioe) { IllegalArgumentException iae = new IllegalArgumentException (); iae.initCause (ioe); throw iae; } } return length; }
1,114
public int getEncodedLength() { if (encoded == null) { try { ByteArrayOutputStream out = new ByteArrayOutputStream(); length = DERWriter.write(out, this); encoded = out.toByteArray(); } catch (IOException ioe) { encoded = new byte[0]; } } return encoded.length; }
public int getEncodedLength() { if (encoded == null) { try { ByteArrayOutputStream out = new ByteArrayOutputStream(); length = DERWriter.write(out, this); encoded = out.toByteArray(); } catch (IOException ioe) { IllegalArgumentException iae = new IllegalArgumentException (); iae.initCause (ioe); throw iae; } } return encoded.length; }
1,115
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.Component.peer member variable. try { Field peerField = Component.class.getDeclaredField("peer"); AccessController.doPrivileged(new SetAccessibleAction(peerField)); peerField.set(this, ((EmbeddedWindowSupport) tk).createEmbeddedWindow (this)); } catch (IllegalAccessException e) { // This should never happen. } catch (NoSuchFieldException e) { // This should never happen. } super.addNotify(); }
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.Component.peer member variable. try { Field peerField = Component.class.getDeclaredField("peer"); AccessController.doPrivileged(new SetAccessibleAction(peerField)); peerField.set(this, ((EmbeddedWindowSupport) tk).createEmbeddedWindow (this)); } catch (IllegalAccessException e) { // This should never happen. } catch (NoSuchFieldException e) { // This should never happen. } super.addNotify(); }
1,116
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.Component.peer member variable. try { Field peerField = Component.class.getDeclaredField("peer"); AccessController.doPrivileged(new SetAccessibleAction(peerField)); peerField.set(this, ((EmbeddedWindowSupport) tk).createEmbeddedWindow (this)); } catch (IllegalAccessException e) { // This should never happen. } catch (NoSuchFieldException e) { // This should never happen. } super.addNotify(); }
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.Component.peer member variable. try { Field peerField = Component.class.getDeclaredField("peer"); AccessController.doPrivileged(new SetAccessibleAction(peerField)); peerField.set(this, tk.createEmbeddedWindow (this)); } catch (IllegalAccessException e) { // This should never happen. } catch (NoSuchFieldException e) { // This should never happen. } super.addNotify(); }
1,117
addNotify(){ if (menuBar != null) menuBar.addNotify(); if (peer == null) peer = getToolkit ().createFrame (this); super.addNotify();}
addNotify(){ if (menuBar != null) menuBar.addNotify(); if (peer == null) peer = getToolkit ().createFrame (this); super.addNotify();}
1,118
public SetAccessibleAction(AccessibleObject member) { this.member = member; }
public SetAccessibleAction() { this.member = member; }
1,119
public SetAccessibleAction(AccessibleObject member) { this.member = member; }
public SetAccessibleAction(AccessibleObject member) { }
1,120
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. File ses = new File(SESSIONS); if(ses.exists()) { settings.setProperty("emulator.settingsDirectory", System.getProperty("user.dir") + File.separator); } else { settings.setProperty("emulator.settingsDirectory", System.getProperty("user.home") + File.separator + ".tn5250j" + File.separator); System.out.println("User Home = " + System.getProperty("user.home")); } }
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. if(ses.exists()) { settings.setProperty("emulator.settingsDirectory", System.getProperty("user.dir") + File.separator); } else { settings.setProperty("emulator.settingsDirectory", System.getProperty("user.home") + File.separator + ".tn5250j" + File.separator); System.out.println("User Home = " + System.getProperty("user.home")); } }
1,121
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. File ses = new File(SESSIONS); if(ses.exists()) { settings.setProperty("emulator.settingsDirectory", System.getProperty("user.dir") + File.separator); } else { settings.setProperty("emulator.settingsDirectory", System.getProperty("user.home") + File.separator + ".tn5250j" + File.separator); System.out.println("User Home = " + System.getProperty("user.home")); } }
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. File ses = new File(SESSIONS); if(ses.exists()) { 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 settings-files are\n" + "placed in your home-dir to avoid further problems in\n" + "the near future.\n\n" + "You have the choice to choose if you want the files\n" + "to be copied or not, please make your choice !\n\n" + "Shall we copy the files to the new location ?", "Old install detected", JOptionPane.WARNING_MESSAGE, JOptionPane.YES_NO_OPTION); if (cfc == 0) { settings.setProperty("emulator.settingsDirectory", System.getProperty("user.home") + File.separator + ".tn5250j" + File.separator); checkDirs(); copyConfigs(SESSIONS); copyConfigs(MACROS); copyConfigs(KEYMAP); } else { JOptionPane.showMessageDialog(null, "Dear User,\n\n" + "You choosed not to copy the file.\n" + "This means the program will end here.\n\n" + "To use this NON-STANDARD behaviour start tn5250j\n" + "with the -Duser.home=<your home dir> parameter\n" + "to avoid this question popping up all the time.", "Using NON-STANDARD behaviour", JOptionPane.WARNING_MESSAGE); System.exit(0); } } else { settings.setProperty("emulator.settingsDirectory", System.getProperty("user.home") + File.separator + ".tn5250j" + File.separator); System.out.println("User Home = " + System.getProperty("user.home")); } }
1,122
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", System.getProperty("emulator.settingsDirectory") + File.separator); } else { try { in = new FileInputStream(settingsFile); settings.load(in); } catch (FileNotFoundException fnfe) { System.out.println(" Information Message: " + fnfe.getMessage() + ". The file " + settingsFile + " will" + " be created for first time use."); checkLegacy(); saveSettings(); } catch (IOException ioe) { System.out.println("IO Exception accessing File " + settingsFile + " for the following reason : " + ioe.getMessage()); } catch (SecurityException se) { System.out.println("Security Exception for file " + settingsFile + " This file can not be " + "accessed because : " + se.getMessage()); } } // we now check to see if the settings directory is a directory. If not then we create it 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", System.getProperty("emulator.settingsDirectory") + File.separator); } else { try { in = new FileInputStream(settingsFile); settings.load(in); } catch (FileNotFoundException fnfe) { System.out.println(" Information Message: " + fnfe.getMessage() + ". The file " + settingsFile + " will" + " be created for first time use."); checkLegacy(); saveSettings(); } catch (IOException ioe) { System.out.println("IO Exception accessing File " + settingsFile + " for the following reason : " + ioe.getMessage()); } catch (SecurityException se) { System.out.println("Security Exception for file " + settingsFile + " This file can not be " + "accessed because : " + se.getMessage()); } } // we now check to see if the settings directory is a directory. If not then we create it File sd = new File(settings.getProperty("emulator.settingsDirectory")); if (!sd.isDirectory()) sd.mkdirs(); }
1,123
abstract public String getProperty(String regKey, String defaultValue);
abstract public String getProperty(String regKey);
1,124
public void run() { running = true; try { sleep(initialDelay); queueEvent(); while (running) { try { sleep(delay); } catch (InterruptedException e) { return; } queueEvent(); if (logTimers) System.out.println("javax.swing.Timer -> clocktick"); if ( ! repeats) break; } running = false; } catch (Exception e) { // The timer is no longer running. running = false; } }
public void run() { running = true; try { sleep(initialDelay); queueEvent(); while (running) { try { sleep(delay); } catch (InterruptedException e) { return; } queueEvent(); if (logTimers) System.out.println("javax.swing.Timer -> clocktick"); if ( ! repeats) break; } running = false; } catch (Exception e) { // The timer is no longer running. running = false; } }
1,125
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()); }
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()); }
1,127
public void setAlignment(int alignment) { //TODO implement it }
public void setAlignment(int alignment) { //TODO implement it 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; } }
1,128
public void setText(String text) { ((JLabel) jComponent).setText(text); }
public void setText(String text) { ((JLabel) jComponent).setText(text); }
1,129
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.hasNext()) { cmd = cl.next(); if (!cmd.trim().equals("") && cl.hasNext()) try { // get command's help info Class cmdClass = getCommandClass(cmd); Help.Info info = Help.getInfo(cmdClass); // perform completion result = cmd + " " + info.complete(cl); // prepend command name and space // again } catch (ClassNotFoundException ex) { throw new CompletionException("Command class not found"); } } if (result == null) // assume this is the alias to be called result = defaultArg.complete(cmd); if (!partial.equals(result) && !dirty) { // performed direct completion without listing dirty = true; // indicate we want to have a new prompt for (int i = 0; i < partial.length() + currentPrompt.length(); i++) System.out.print("\b"); // clear line (cheap approach) } } catch (CompletionException ex) { System.out.println(); // next line System.err.println(ex.getMessage()); // print the error (optional) // this debug output is to trace where the Exception came from //ex.printStackTrace(System.err); result = partial; // restore old value dirty = true; // we need a new prompt } if (dirty) { dirty = false; System.out.print(currentPrompt + result); // print the prompt and go on with normal // operation } return result; }
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.hasNext()) { cmd = cl.next(); if (!cmd.trim().equals("") && cl.hasNext()) try { // get command's help info Class cmdClass = getCommandClass(cmd); Help.Info info = Help.getInfo(cmdClass); // perform completion result = cmd + " " + info.complete(cl); // prepend command name and space // again } catch (ClassNotFoundException ex) { throw new CompletionException("Command class not found"); } } if (result == null) // assume this is the alias to be called result = defaultArg.complete(cmd); if (!partial.equals(result) && !dirty) { // performed direct completion without listing dirty = true; // indicate we want to have a new prompt for (int i = 0; i < partial.length() + currentPrompt.length(); i++) System.out.print("\b"); // clear line (cheap approach) } } catch (CompletionException ex) { System.out.println(); // next line System.err.println(ex.getMessage()); // print the error (optional) // this debug output is to trace where the Exception came from //ex.printStackTrace(System.err); result = partial; // restore old value dirty = true; // we need a new prompt } if (dirty) { dirty = false; System.out.print(currentPrompt + result); // print the prompt and go on with normal // operation } return result; }
1,130
public AliasArgument(String name, String description) { super(name, description); }
public AliasArgument(String name, String description) { super(name, description); }
1,131
public ShellException(String message, Throwable cause) { super(message, cause); }
public ShellException(String message, Throwable cause) { super(message, cause); }
1,132
public abstract StringBuffer format (Date date, StringBuffer buf, FieldPosition pos);
public abstract StringBuffer format (Date date, StringBuffer buf, FieldPosition pos);
1,133
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; }
public int add(byte[] src, int srcOffset, 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; }
1,134
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; }
public int add(SocketBuffer skbuf, int index, int length) { if (length > getFreeSize()) { throw new IllegalArgumentException("Not enough free space"); } final int dstOffset = this.used; System.arraycopy(src, srcOffset, this.data, dstOffset, length); this.used += length; return dstOffset; }
1,135
public short loadShort(Offset offset) { return (short) 0; }
public short loadShort() { return (short) 0; }
1,136
public char loadChar(Offset offset) { return (char) 0; }
public char loadChar() { return (char) 0; }
1,137
public DDC1NoSignalException(String s) { super(s); }
public DDC1NoSignalException(String s) { super(s); }
1,138
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(); if (sm != null) sm.checkConnect(address.getHostName(), port); try { getImpl().connect(address, port); remoteAddress = address; remotePort = port; } catch (SocketException e) { // This means simply not connected or connect not implemented. } }
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(); if (sm != null) sm.checkConnect(address.getHostName(), port); try { getImpl().connect(address, port); remoteAddress = address; remotePort = port; } catch (SocketException e) { // This means simply not connected or connect not implemented. } }
1,139
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 (SecurityException e) { localAddr = InetAddress.ANY_IF; } catch (SocketException e) { // This cannot happen as we are bound. return null; } return localAddr; }
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.getHostAddress(), -1); } catch (SecurityException e) { localAddr = InetAddress.ANY_IF; } catch (SocketException e) { // This cannot happen as we are bound. return null; } return localAddr; }
1,140
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() != null && ! getChannel().isBlocking() && ! ((DatagramChannelImpl) getChannel()).isInChannelOperation()) throw new IllegalBlockingModeException(); getImpl().receive(p); SecurityManager s = System.getSecurityManager(); if (s != null && isConnected()) s.checkAccept(p.getAddress().getHostName(), 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() != null && ! getChannel().isBlocking() && ! ((DatagramChannelImpl) getChannel()).isInChannelOperation()) throw new IllegalBlockingModeException(); 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()); SecurityManager s = System.getSecurityManager(); if (s != null && isConnected()) s.checkAccept(p.getAddress().getHostName(), p.getPort()); }
1,141
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() != null && ! getChannel().isBlocking() && ! ((DatagramChannelImpl) getChannel()).isInChannelOperation()) throw new IllegalBlockingModeException(); getImpl().receive(p); SecurityManager s = System.getSecurityManager(); if (s != null && isConnected()) s.checkAccept(p.getAddress().getHostName(), 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() != null && ! getChannel().isBlocking() && ! ((DatagramChannelImpl) getChannel()).isInChannelOperation()) throw new IllegalBlockingModeException(); getImpl().receive(p); SecurityManager s = System.getSecurityManager(); if (s != null && isConnected()) s.checkAccept(p.getAddress().getHostName(), p.getPort()); }
1,142
public synchronized void setAddress(InetAddress iaddr) { if (iaddr == null) throw new NullPointerException("Null address"); address = iaddr; }
public synchronized void setAddress(InetAddress iaddr) { if (iaddr == null) throw new NullPointerException("Null address"); address = iaddr; }
1,143
public synchronized void setAddress(InetAddress iaddr) { if (iaddr == null) throw new NullPointerException("Null address"); address = iaddr; }
public synchronized void setAddress(InetAddress iaddr) { if (iaddr == null) throw new NullPointerException("Null address"); this.address = address; }
1,144
public synchronized void setPort(int iport) { if (iport < 0 || iport > 65535) throw new IllegalArgumentException("Invalid port: " + iport); port = iport; }
public synchronized void setPort(int iport) { if (iport < 0 || iport > 65535) throw new IllegalArgumentException("Invalid port: " + iport); port = iport; }
1,145
public synchronized void setPort(int iport) { if (iport < 0 || iport > 65535) throw new IllegalArgumentException("Invalid port: " + iport); port = iport; }
public synchronized void setPort(int iport) { if (iport < 0 || iport > 65535) throw new IllegalArgumentException("Invalid port: " + iport); this.port = port; }
1,146
public static BigInteger generateRandomPrime( int pmin, int pmax, BigInteger f ) { BigInteger d; //Step 1 - generate prime BigInteger p = new BigInteger( (pmax + pmin)/2, new Random() ); if( p.compareTo( BigInteger.valueOf( 1 ).shiftLeft( pmin ) ) <= 0 ) { p.add( BigInteger.valueOf( 1 ).shiftLeft( pmin ).subtract( p ) ); } //Step 2 - test for even if( p.mod( BigInteger.valueOf(2) ).compareTo( BigInteger.valueOf( 0 )) == 0) p.add( BigInteger.valueOf( 1 ) ); for(;;) { //Step 3 if( p.compareTo( BigInteger.valueOf( 1 ).shiftLeft( pmax)) > 0) { //Step 3.1 p = p.subtract( BigInteger.valueOf( 1 ).shiftLeft( pmax) ); p = p.add( BigInteger.valueOf( 1 ).shiftLeft( pmin) ); p = p.subtract( BigInteger.valueOf( 1 ) ); //Step 3.2 // put step 2 code here so looping code is cleaner //Step 2 - test for even if( p.mod( BigInteger.valueOf(2) ).compareTo( BigInteger.valueOf( 0 )) == 0) p.add( BigInteger.valueOf( 1 ) ); continue; } //Step 4 - compute GCD d = p.subtract( BigInteger.valueOf(1) ); d = d.gcd( f ); //Step 5 - test d if( d.compareTo( BigInteger.valueOf( 1 ) ) == 0) { //Step 5.1 - test primality if( p.isProbablePrime( 1 ) == true ) { //Step 5.2; return p; } } //Step 6 p = p.add( BigInteger.valueOf( 2 ) ); //Step 7 } }
public static BigInteger generateRandomPrime( int pmin, int pmax, BigInteger f ) { BigInteger d; //Step 1 - generate prime BigInteger p = new BigInteger( (pmax + pmin)/2, new Random() ); if( p.compareTo( BigInteger.valueOf( 1 ).shiftLeft( pmin ) ) <= 0 ) { p = p.add( BigInteger.valueOf( 1 ).shiftLeft( pmin ).subtract( p ) ); } //Step 2 - test for even if( p.mod( BigInteger.valueOf(2) ).compareTo( BigInteger.valueOf( 0 )) == 0) p.add( BigInteger.valueOf( 1 ) ); for(;;) { //Step 3 if( p.compareTo( BigInteger.valueOf( 1 ).shiftLeft( pmax)) > 0) { //Step 3.1 p = p.subtract( BigInteger.valueOf( 1 ).shiftLeft( pmax) ); p = p.add( BigInteger.valueOf( 1 ).shiftLeft( pmin) ); p = p.subtract( BigInteger.valueOf( 1 ) ); //Step 3.2 // put step 2 code here so looping code is cleaner //Step 2 - test for even if( p.mod( BigInteger.valueOf(2) ).compareTo( BigInteger.valueOf( 0 )) == 0) p.add( BigInteger.valueOf( 1 ) ); continue; } //Step 4 - compute GCD d = p.subtract( BigInteger.valueOf(1) ); d = d.gcd( f ); //Step 5 - test d if( d.compareTo( BigInteger.valueOf( 1 ) ) == 0) { //Step 5.1 - test primality if( p.isProbablePrime( 1 ) == true ) { //Step 5.2; return p; } } //Step 6 p = p.add( BigInteger.valueOf( 2 ) ); //Step 7 } }
1,147
public static BigInteger generateRandomPrime( int pmin, int pmax, BigInteger f ) { BigInteger d; //Step 1 - generate prime BigInteger p = new BigInteger( (pmax + pmin)/2, new Random() ); if( p.compareTo( BigInteger.valueOf( 1 ).shiftLeft( pmin ) ) <= 0 ) { p.add( BigInteger.valueOf( 1 ).shiftLeft( pmin ).subtract( p ) ); } //Step 2 - test for even if( p.mod( BigInteger.valueOf(2) ).compareTo( BigInteger.valueOf( 0 )) == 0) p.add( BigInteger.valueOf( 1 ) ); for(;;) { //Step 3 if( p.compareTo( BigInteger.valueOf( 1 ).shiftLeft( pmax)) > 0) { //Step 3.1 p = p.subtract( BigInteger.valueOf( 1 ).shiftLeft( pmax) ); p = p.add( BigInteger.valueOf( 1 ).shiftLeft( pmin) ); p = p.subtract( BigInteger.valueOf( 1 ) ); //Step 3.2 // put step 2 code here so looping code is cleaner //Step 2 - test for even if( p.mod( BigInteger.valueOf(2) ).compareTo( BigInteger.valueOf( 0 )) == 0) p.add( BigInteger.valueOf( 1 ) ); continue; } //Step 4 - compute GCD d = p.subtract( BigInteger.valueOf(1) ); d = d.gcd( f ); //Step 5 - test d if( d.compareTo( BigInteger.valueOf( 1 ) ) == 0) { //Step 5.1 - test primality if( p.isProbablePrime( 1 ) == true ) { //Step 5.2; return p; } } //Step 6 p = p.add( BigInteger.valueOf( 2 ) ); //Step 7 } }
public static BigInteger generateRandomPrime( int pmin, int pmax, BigInteger f ) { BigInteger d; //Step 1 - generate prime BigInteger p = new BigInteger( (pmax + pmin)/2, new Random() ); if( p.compareTo( BigInteger.valueOf( 1 ).shiftLeft( pmin ) ) <= 0 ) { p.add( BigInteger.valueOf( 1 ).shiftLeft( pmin ).subtract( p ) ); } //Step 2 - test for even if( p.mod( BigInteger.valueOf(2) ).compareTo( BigInteger.valueOf( 0 )) == 0) p = p.add( BigInteger.valueOf( 1 ) ); for(;;) { //Step 3 if( p.compareTo( BigInteger.valueOf( 1 ).shiftLeft( pmax)) > 0) { //Step 3.1 p = p.subtract( BigInteger.valueOf( 1 ).shiftLeft( pmax) ); p = p.add( BigInteger.valueOf( 1 ).shiftLeft( pmin) ); p = p.subtract( BigInteger.valueOf( 1 ) ); //Step 3.2 // put step 2 code here so looping code is cleaner //Step 2 - test for even if( p.mod( BigInteger.valueOf(2) ).compareTo( BigInteger.valueOf( 0 )) == 0) p = p.add( BigInteger.valueOf( 1 ) ); continue; } //Step 4 - compute GCD d = p.subtract( BigInteger.valueOf(1) ); d = d.gcd( f ); //Step 5 - test d if( d.compareTo( BigInteger.valueOf( 1 ) ) == 0) { //Step 5.1 - test primality if( p.isProbablePrime( 1 ) == true ) { //Step 5.2; return p; } } //Step 6 p = p.add( BigInteger.valueOf( 2 ) ); //Step 7 } }
1,148
protected void installKeyboardActions() { UIDefaults defaults = UIManager.getLookAndFeelDefaults(); InputMap focusInputMap = (InputMap)defaults.get("List.focusInputMap"); InputMapUIResource parentInputMap = new InputMapUIResource(); // FIXME: The JDK uses a LazyActionMap for parentActionMap ActionMap parentActionMap = new ActionMap(); action = new ListAction(); Object keys[] = focusInputMap.allKeys(); // Register key bindings in the UI InputMap-ActionMap pair // Note that we register key bindings with both the old and new modifier // masks: InputEvent.SHIFT_MASK and InputEvent.SHIFT_DOWN_MASK and so on. for (int i = 0; i < keys.length; i++) { parentInputMap.put(KeyStroke.getKeyStroke (((KeyStroke)keys[i]).getKeyCode(), convertModifiers (((KeyStroke)keys[i]).getModifiers())), (String)focusInputMap.get((KeyStroke)keys[i])); parentInputMap.put(KeyStroke.getKeyStroke (((KeyStroke)keys[i]).getKeyCode(), ((KeyStroke)keys[i]).getModifiers()), (String)focusInputMap.get((KeyStroke)keys[i])); parentActionMap.put ((String)focusInputMap.get((KeyStroke)keys[i]), new ActionListenerProxy (action, (String)focusInputMap.get((KeyStroke)keys[i]))); } parentInputMap.setParent(list.getInputMap().getParent()); parentActionMap.setParent(list.getActionMap().getParent()); list.getInputMap().setParent(parentInputMap); list.getActionMap().setParent(parentActionMap); }
protected void installKeyboardActions() { UIDefaults defaults = UIManager.getLookAndFeelDefaults(); InputMap focusInputMap = (InputMap)defaults.get("List.focusInputMap"); InputMapUIResource parentInputMap = new InputMapUIResource(); // FIXME: The JDK uses a LazyActionMap for parentActionMap ActionMap parentActionMap = new ActionMap(); action = new ListAction(); Object keys[] = focusInputMap.allKeys(); // Register key bindings in the UI InputMap-ActionMap pair // Note that we register key bindings with both the old and new modifier // masks: InputEvent.SHIFT_MASK and InputEvent.SHIFT_DOWN_MASK and so on. for (int i = 0; i < keys.length; i++) { parentInputMap.put(KeyStroke.getKeyStroke (((KeyStroke)keys[i]).getKeyCode(), convertModifiers (((KeyStroke)keys[i]).getModifiers())), (String)focusInputMap.get((KeyStroke)keys[i])); parentInputMap.put(KeyStroke.getKeyStroke (((KeyStroke)keys[i]).getKeyCode(), ((KeyStroke)keys[i]).getModifiers()), (String)focusInputMap.get((KeyStroke)keys[i])); parentActionMap.put ((String)focusInputMap.get((KeyStroke)keys[i]), new ActionListenerProxy (action, (String)focusInputMap.get((KeyStroke)keys[i]))); } parentInputMap.setParent(list.getInputMap().getParent()); parentActionMap.setParent(list.getActionMap().getParent()); list.getInputMap().setParent(parentInputMap); list.getActionMap().setParent(parentActionMap); }
1,149
protected void installKeyboardActions() { UIDefaults defaults = UIManager.getLookAndFeelDefaults(); InputMap focusInputMap = (InputMap)defaults.get("List.focusInputMap"); InputMapUIResource parentInputMap = new InputMapUIResource(); // FIXME: The JDK uses a LazyActionMap for parentActionMap ActionMap parentActionMap = new ActionMap(); action = new ListAction(); Object keys[] = focusInputMap.allKeys(); // Register key bindings in the UI InputMap-ActionMap pair // Note that we register key bindings with both the old and new modifier // masks: InputEvent.SHIFT_MASK and InputEvent.SHIFT_DOWN_MASK and so on. for (int i = 0; i < keys.length; i++) { parentInputMap.put(KeyStroke.getKeyStroke (((KeyStroke)keys[i]).getKeyCode(), convertModifiers (((KeyStroke)keys[i]).getModifiers())), (String)focusInputMap.get((KeyStroke)keys[i])); parentInputMap.put(KeyStroke.getKeyStroke (((KeyStroke)keys[i]).getKeyCode(), ((KeyStroke)keys[i]).getModifiers()), (String)focusInputMap.get((KeyStroke)keys[i])); parentActionMap.put ((String)focusInputMap.get((KeyStroke)keys[i]), new ActionListenerProxy (action, (String)focusInputMap.get((KeyStroke)keys[i]))); } parentInputMap.setParent(list.getInputMap().getParent()); parentActionMap.setParent(list.getActionMap().getParent()); list.getInputMap().setParent(parentInputMap); list.getActionMap().setParent(parentActionMap); }
protected void installKeyboardActions() { UIDefaults defaults = UIManager.getLookAndFeelDefaults(); InputMap focusInputMap = (InputMap)defaults.get("List.focusInputMap"); InputMapUIResource parentInputMap = new InputMapUIResource(); // FIXME: The JDK uses a LazyActionMap for parentActionMap ActionMap parentActionMap = new ActionMap(); action = new ListAction(); Object keys[] = focusInputMap.allKeys(); // Register key bindings in the UI InputMap-ActionMap pair // Note that we register key bindings with both the old and new modifier // masks: InputEvent.SHIFT_MASK and InputEvent.SHIFT_DOWN_MASK and so on. for (int i = 0; i < keys.length; i++) { parentInputMap.put(KeyStroke.getKeyStroke (((KeyStroke)keys[i]).getKeyCode(), convertModifiers (((KeyStroke)keys[i]).getModifiers())), (String)focusInputMap.get((KeyStroke)keys[i])); parentInputMap.put(KeyStroke.getKeyStroke (((KeyStroke)keys[i]).getKeyCode(), ((KeyStroke)keys[i]).getModifiers()), (String)focusInputMap.get((KeyStroke)keys[i])); parentActionMap.put ((String)focusInputMap.get((KeyStroke)keys[i]), new ActionListenerProxy (action, (String)focusInputMap.get((KeyStroke)keys[i]))); } parentInputMap.setParent(list.getInputMap().getParent()); parentActionMap.setParent(list.getActionMap().getParent()); list.getInputMap().setParent(parentInputMap); list.getActionMap().setParent(parentActionMap); }
1,150
public static Border createBevelBorder (int type, Color highlightOuter, Color highlightInner, Color shadowOuter, Color shadowInner) { return new BevelBorder (type, highlightOuter, highlightInner, shadowOuter, shadowInner); }
public static Border createBevelBorder (int type, Color highlightOuter, Color highlightInner, Color shadowOuter, Color shadowInner) { return new BevelBorder (type, highlightOuter, highlightInner, shadowOuter, shadowInner); }
1,151
public static Border createBevelBorder (int type, Color highlightOuter, Color highlightInner, Color shadowOuter, Color shadowInner) { return new BevelBorder (type, highlightOuter, highlightInner, shadowOuter, shadowInner); }
public static Border createBevelBorder (int type, Color highlightOuter, Color highlightInner, Color shadowOuter, Color shadowInner) { return new BevelBorder (type, highlightOuter, highlightInner, shadowOuter, shadowInner); }
1,152
public static Border createEmptyBorder (int top, int left, int bottom, int right) { return new EmptyBorder (top, left, bottom, right); }
public static Border createEmptyBorder (int top, int left, int bottom, int right) { return new EmptyBorder (top, left, bottom, right); }
1,153
public static Border createEmptyBorder (int top, int left, int bottom, int right) { return new EmptyBorder (top, left, bottom, right); }
public static Border createEmptyBorder (int top, int left, int bottom, int right) { return new EmptyBorder(0, 0, 0, 0); }
1,154
public static Border createLineBorder (Color color, int thickness) { return new LineBorder (color, thickness); }
public static Border createLineBorder(Color color) { return new LineBorder (color, thickness); }
1,155
public static Border createLineBorder (Color color, int thickness) { return new LineBorder (color, thickness); }
public static Border createLineBorder (Color color, int thickness) { return null; }
1,156
public LineBorder(Color color, int thickness) { this (color, thickness, /* roundedCorners */ false); }
public LineBorder(Color color) { this (color, thickness, /* roundedCorners */ false); }
1,157
public LineBorder(Color color, int thickness) { this (color, thickness, /* roundedCorners */ false); }
public LineBorder(Color color, int thickness) { this (color, thickness, /* roundedCorners */ false); }
1,158
public Image createImage (int width, int height) { Image returnValue = null; if (!GraphicsEnvironment.isHeadless ()) { if (isLightweight () && parent != null) returnValue = parent.createImage (width, height); else if (peer != null) returnValue = peer.createImage (width, height); } return returnValue; }
public Image createImage(ImageProducer producer) { Image returnValue = null; if (!GraphicsEnvironment.isHeadless ()) { if (isLightweight () && parent != null) returnValue = parent.createImage (width, height); else if (peer != null) returnValue = peer.createImage (width, height); } return returnValue; }
1,159
public Image createImage (int width, int height) { Image returnValue = null; if (!GraphicsEnvironment.isHeadless ()) { if (isLightweight () && parent != null) returnValue = parent.createImage (width, height); else if (peer != null) returnValue = peer.createImage (width, height); } return returnValue; }
public Image createImage (int width, int height) { Image returnValue = null; if (!GraphicsEnvironment.isHeadless ()) { if (isLightweight () && parent != null) returnValue = parent.createImage (width, height); else if (peer != null) returnValue = peer.createImage (width, height); } return returnValue; }
1,160
Button(String label){ this.label = label; actionCommand = label; if (GraphicsEnvironment.isHeadless ()) throw new HeadlessException ();}
Button(){ this.label = label; actionCommand = label; if (GraphicsEnvironment.isHeadless ()) throw new HeadlessException ();}
1,161
Button(String label){ this.label = label; actionCommand = label; if (GraphicsEnvironment.isHeadless ()) throw new HeadlessException ();}
Button(String label){ this.label = label; actionCommand = label; if (GraphicsEnvironment.isHeadless ()) throw new HeadlessException ();}
1,162
Scrollbar(int orientation) throws IllegalArgumentException{ this(orientation, 0, 10, 0, 100);}
Scrollbar(){ this(orientation, 0, 10, 0, 100);}
1,163
Scrollbar(int orientation) throws IllegalArgumentException{ this(orientation, 0, 10, 0, 100);}
Scrollbar(int orientation) throws IllegalArgumentException{ this(VERTICAL);}
1,164
public JCheckBox(String text) { super(text); init(); }
public JCheckBox(String text) { super(text); init(); }
1,165
public JNodeBufferedImageGraphics(BufferedImage image) { super(new BufferedImageSurface(image), image.getWidth(), image.getHeight()); this.image = image; }
public JNodeBufferedImageGraphics(BufferedImage image) { super(new BufferedImageSurface(image), image.getWidth(), image.getHeight()); this.image = image; }
1,166
public JTextPane() { // TODO } // JTextPane()
public JTextPane() { // TODO } // JTextPane()
1,167
public Style addStyle(String nm, Style parent) { return null; // TODO } // addStyle()
public Style addStyle(String nm, Style parent) { return null; // TODO } // addStyle()
1,168
protected EditorKit createDefaultEditorKit() { return super.createDefaultEditorKit(); // TODO } // createDefaultEditorKit()
protected EditorKit createDefaultEditorKit() { return super.createDefaultEditorKit(); // TODO } // createDefaultEditorKit()
1,169
public AttributeSet getCharacterAttributes() { return null; // TODO } // getCharacterAttributes()
public AttributeSet getCharacterAttributes() { return null; // TODO } // getCharacterAttributes()
1,170
public MutableAttributeSet getInputAttributes() { return null; // TODO } // getInputAttributes()
public MutableAttributeSet getInputAttributes() { return null; // TODO } // getInputAttributes()
1,171
public Style getLogicalStyle() { return null; // TODO } // getLogicalStyle()
public Style getLogicalStyle() { return null; // TODO } // getLogicalStyle()
1,172
public AttributeSet getParagraphAttributes() { return null; // TODO } // getParagraphAttributes()
public AttributeSet getParagraphAttributes() { return null; // TODO } // getParagraphAttributes()
1,173
public Style getStyle(String nm) { return null; // TODO } // getStyle()
public Style getStyle(String nm) { return null; // TODO } // getStyle()
1,174
public StyledDocument getStyledDocument() { return null; // TODO } // getStyledDocument()
public StyledDocument getStyledDocument() { return null; // TODO } // getStyledDocument()
1,175
protected final StyledEditorKit getStyledEditorKit() { return null; // TODO } // getStyledEditorKit()
protected final StyledEditorKit getStyledEditorKit() { return null; // TODO } // getStyledEditorKit()
1,176
public String getUIClassID() { return uiClassID; } // getUIClassID()
public String getUIClassID() { return uiClassID; } // getUIClassID()
1,177
public void removeStyle(String nm) { // TODO } // removeStyle()
public void removeStyle(String nm) { // TODO } // removeStyle()
1,178
public void replaceSelection(String content) { super.replaceSelection(content); // TODO } // replaceSelection()
public void replaceSelection(String content) { super.replaceSelection(content); // TODO } // replaceSelection()
1,179
public void setCharacterAttributes(AttributeSet attribute, boolean replace) { // TODO } // setCharacterAttributes()
public void setCharacterAttributes(AttributeSet attribute, boolean replace) { // TODO } // setCharacterAttributes()
1,180
public void setDocument(Document document) { super.setDocument(document); // TODO } // setDocument()
public void setDocument(Document document) { super.setDocument(document); // TODO } // setDocument()
1,181
public final void setEditorKit(EditorKit editor) { super.setEditorKit(editor); // TODO } // setEditorKit()
public final void setEditorKit(EditorKit editor) { super.setEditorKit(editor); // TODO } // setEditorKit()
1,182
public void setLogicalStyle(Style style) { // TODO } // setLogicalStyle()
public void setLogicalStyle(Style style) { // TODO } // setLogicalStyle()
1,183
public void setStyledDocument(StyledDocument document) { // TODO } // setStyledDocument()
public void setStyledDocument(StyledDocument document) { // TODO } // setStyledDocument()
1,184
public ViewFactory getViewFactory() { // FIXME: Handle EditorKit somehow. return BasicTextUI.this; }
public ViewFactory getViewFactory() { // FIXME: Handle EditorKit somehow. ViewFactory factory = null; EditorKit editorKit = BasicTextUI.this.getEditorKit(getComponent()); factory = editorKit.getViewFactory(); if (factory == null) factory = BasicTextUI.this; return factory; }
1,185
public Shape modelToView(int position, Shape a, Position.Bias bias) throws BadLocationException { if (view == null) return null; return ((PlainView) view).modelToView(position, a, bias).getBounds(); }
public Shape modelToView(int position, Shape a, Position.Bias bias) throws BadLocationException { if (view == null) return null; return ((PlainView) view).modelToView(position, a, bias).getBounds(); }
1,186
public void setView(View v) { if (view != null) view.setParent(null); if (v != null) v.setParent(null); view = v; }
public void setView(View v) { if (view != null) view.setParent(null); if (v != null) v.setParent(this); view = v; }
1,187
protected final void setView(View view) { rootView.setView(view); view.setParent(rootView); }
protected final void setView(View view) { rootView.setView(view); }
1,188
public void onScreenChanged(int which, int sr, int sc, int er, int ec) {// workR.setBounds(sr, sc, ec, er);// if (screen.cursorShown)// this.drawCursor(); if (which == 3 || which == 4) {// log.info("cursor updated -> " + sr + ", " + sc + "-> active " +// screen.cursorActive + " -> shown " + screen.cursorShown); drawCursor(sr,sc); return; } if (hotSpots) screen.checkHotSpots(); log.info("screen updated -> " + sr + ", " + sc + ", " + er + ", " + ec); int rows = er - sr; int cols = 0; int lc = 0;// int lenScreen = screen.getScreenLength(); int lr = screen.getPos(sr,sc); int numCols = screen.getCols(); updateRect = new Data (sr,sc,er,ec); int clipX; int clipY; int clipWidth; int clipHeight; Rectangle clipper = new Rectangle(); int pos = 0;// while (rows-- >= 0) {// cols = ec - sc;// lc = lr;// while (cols-- >= 0) {// if (lc >= 0 && lc < lenScreen) {// drawChar(gg2d,pos++,screen.getRow(lc),screen.getCol(lc));// // drawChar(gg2d,pos++,sr-rows,lc);// lc++;// }// }// lr += numCols;// } lc = ec; clipper.x = sc * columnWidth; clipper.y = sr * rowHeight; clipper.width = ((ec - sc) + 1) * columnWidth; clipper.height = ((er - sr ) + 1) * rowHeight; gg2d.setClip(clipper.getBounds()); gg2d.setColor(colorBg); // System.out.println("PaintComponent " + r); gg2d.fillRect(clipper.x, clipper.y, clipper.width, clipper.height); while (sr <= er) { cols = ec - sc; lc = sc; while (cols-- >= 0) { if (sc + cols <= ec) {// drawChar(gg2d,pos++,screen.getRow(lc),screen.getCol(lc)); drawChar(gg2d,pos++,sr,lc);// if (clipper == null) {// clipper = new Rectangle(workR);// }// else {// clipper.union(workR);// } lc++; } } sr++; }// System.out.println(" clipping from screen change " + clipper// + " clipping region of paint " + gg2d.getClipBounds()); updateImage(clipper);// if (screen.cursorShown)// this.drawCursor();// screen.dumpScreen(); }
public void onScreenChanged(int which, int sr, int sc, int er, int ec) {// workR.setBounds(sr, sc, ec, er);// if (screen.cursorShown)// this.drawCursor(); if (which == 3 || which == 4) {// log.info("cursor updated -> " + sr + ", " + sc + "-> active " +// screen.cursorActive + " -> shown " + screen.cursorShown); drawCursor(sr,sc); return; } if (hotSpots) screen.checkHotSpots(); int rows = er - sr; int cols = 0; int lc = 0;// int lenScreen = screen.getScreenLength(); int lr = screen.getPos(sr,sc); int numCols = screen.getCols(); updateRect = new Data (sr,sc,er,ec); int clipX; int clipY; int clipWidth; int clipHeight; Rectangle clipper = new Rectangle(); int pos = 0;// while (rows-- >= 0) {// cols = ec - sc;// lc = lr;// while (cols-- >= 0) {// if (lc >= 0 && lc < lenScreen) {// drawChar(gg2d,pos++,screen.getRow(lc),screen.getCol(lc));// // drawChar(gg2d,pos++,sr-rows,lc);// lc++;// }// }// lr += numCols;// } lc = ec; clipper.x = sc * columnWidth; clipper.y = sr * rowHeight; clipper.width = ((ec - sc) + 1) * columnWidth; clipper.height = ((er - sr ) + 1) * rowHeight; gg2d.setClip(clipper.getBounds()); gg2d.setColor(colorBg); // System.out.println("PaintComponent " + r); gg2d.fillRect(clipper.x, clipper.y, clipper.width, clipper.height); while (sr <= er) { cols = ec - sc; lc = sc; while (cols-- >= 0) { if (sc + cols <= ec) {// drawChar(gg2d,pos++,screen.getRow(lc),screen.getCol(lc)); drawChar(gg2d,pos++,sr,lc);// if (clipper == null) {// clipper = new Rectangle(workR);// }// else {// clipper.union(workR);// } lc++; } } sr++; }// System.out.println(" clipping from screen change " + clipper// + " clipping region of paint " + gg2d.getClipBounds()); updateImage(clipper);// if (screen.cursorShown)// this.drawCursor();// screen.dumpScreen(); }
1,189
public void resize(int width, int height) { if (bi.getWidth() != width || bi.getHeight() != height) {// synchronized (lock) { bi = null; bi = new BufferedImage(width,height,BufferedImage.TYPE_INT_RGB); this.width = width; this.height = height; resized = true; getSettings(); // tell waiting threads to wake up// lock.notifyAll();// } } drawOIA(); }
public void resize(int width, int height) { if (bi.getWidth() != width || bi.getHeight() != height) {// synchronized (lock) { bi = null; bi = new BufferedImage(width,height,BufferedImage.TYPE_INT_RGB); this.width = width; this.height = height; resized = true; getSettings(); // tell waiting threads to wake up// lock.notifyAll();// } } }
1,190
public static TN5250jLogger getLogger (String clazzName) { TN5250jLogger logger = null; if (_loggers.containsKey(clazzName)) { logger = ( TN5250jLogger ) _loggers.get(clazzName); } else { if (customLogger != null) { try { Class classObject = Class.forName(customLogger); Object object = classObject.newInstance(); if (object instanceof TN5250jLogFactory) { logger = (TN5250jLogger) object; } } catch (Exception ex) { ; } } else { if (logger == null) { if (log4j) logger = new Log4jLogger(); else // take the default logger. logger = new ConsoleLogger(); } logger.initialize(clazzName); _loggers.put(clazzName, logger); } } return logger; }
public static TN5250jLogger getLogger (String clazzName) { TN5250jLogger logger = null; if (_loggers.containsKey(clazzName)) { logger = ( TN5250jLogger ) _loggers.get(clazzName); } else { if (customLogger != null) { try { Class classObject = Class.forName(customLogger); Object object = classObject.newInstance(); if (object instanceof TN5250jLogFactory) { logger = (TN5250jLogger) object; } } catch (Exception ex) { ; } } else { if (logger == null) { if (log4j) logger = new Log4jLogger(); else // take the default logger. logger = new ConsoleLogger(); } logger.initialize(clazzName); _loggers.put(clazzName, logger); } } return logger; }
1,191
public static void version() { System.out.println("rmiregistry (" + System.getProperty("java.vm.name") + ") " + System.getProperty("java.vm.version")); System.out.println("Copyright 2005 Free Software Foundation, Inc."); System.out.println("This is free software; see the source for copying conditions. There is NO"); System.out.println("warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."); System.exit(0);}
public static void version() { System.out.println("rmiregistry (" + System.getProperty("java.vm.name") + ") " + System.getProperty("java.vm.version")); System.out.println("Copyright 2006 Free Software Foundation, Inc."); System.out.println("This is free software; see the source for copying conditions. There is NO"); System.out.println("warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."); System.exit(0);}
1,192
protected UnicastRemoteObject(RemoteRef ref) throws RemoteException { super((UnicastServerRef) ref); exportObject(this); }
protected UnicastRemoteObject() throws RemoteException { super((UnicastServerRef) ref); exportObject(this); }
1,193
protected UnicastRemoteObject(RemoteRef ref) throws RemoteException { super((UnicastServerRef) ref); exportObject(this); }
protected UnicastRemoteObject(RemoteRef ref) throws RemoteException { super((UnicastServerRef) ref); exportObject(this); }
1,194
public void initialize(int keysize, SecureRandom random) { HashMap attributes = new HashMap(); attributes.put(DSSKeyPairGenerator.MODULUS_LENGTH, new Integer(keysize)); if (random != null) { attributes.put(DSSKeyPairGenerator.SOURCE_OF_RANDOMNESS, random); } adaptee.setup(attributes); }
public void initialize(int keysize, SecureRandom random) { HashMap attributes = new HashMap(); attributes.put(DSSKeyPairGenerator.MODULUS_LENGTH, new Integer(keysize)); if (random != null) { attributes.put(DSSKeyPairGenerator.SOURCE_OF_RANDOMNESS, random); } adaptee.setup(attributes); }
1,195
public Argument(String name, String description) { this(name, description, SINGLE); }
public Argument(String name, String description) { this(name, description, SINGLE); }
1,196
public void connect(javax.rmi.ORB orb) throws RemoteException { if(delegate != null) delegate.connect(this, orb); }
public void connect(ORB orb) throws RemoteException { if(delegate != null) delegate.connect(this, orb); }
1,197
public void connect(javax.rmi.ORB orb) throws RemoteException { if(delegate != null) delegate.connect(this, orb); }
public void connect(javax.rmi.ORB orb) throws RemoteException { if (m_orb != null && orb != null) { if (m_orb.equals(orb)) throw new RemoteException("Stub " + this + " is connected to another ORB, " + orb); else return; } m_orb = orb; delegate.connect(this, orb); }
1,198
public boolean equals(Object obj) { if(delegate != null) return delegate.equals(this, obj); else return false; }
public boolean equals(java.lang.Object obj) { if(delegate != null) return delegate.equals(this, obj); else return false; }
1,199
public boolean equals(Object obj) { if(delegate != null) return delegate.equals(this, obj); else return false; }
public boolean equals(Object obj) { return delegate.equals(this, obj); else return false; }
1,200
public boolean equals(Object obj) { if(delegate != null) return delegate.equals(this, obj); else return false; }
public boolean equals(Object obj) { if(delegate != null) return delegate.equals(this, obj); else return false; }
1,201
public int hashCode() { if(delegate != null) return delegate.hashCode(this); else return 0; }
public int hashCode() { if(delegate != null) return delegate.hashCode(this); else return 0; }
1,202
private void readObject(ObjectInputStream stream) throws IOException, ClassNotFoundException { if(delegate != null) delegate.readObject(this, stream); }
private void readObject(ObjectInputStream input) throws IOException, ClassNotFoundException { if(delegate != null) delegate.readObject(this, stream); }
1,203
private void readObject(ObjectInputStream stream) throws IOException, ClassNotFoundException { if(delegate != null) delegate.readObject(this, stream); }
private void readObject(ObjectInputStream stream) throws IOException, ClassNotFoundException { if(delegate != null) delegate.readObject(this, stream); }
1,204
public String toString() { String s = null; if(delegate != null) s = delegate.toString(this); if(s == null) s = super.toString(); return s; }
public String toString() { String s = null; if(delegate != null) s = delegate.toString(this); if(s == null) s = super.toString(); return s; }
1,205
private void writeObject(ObjectOutputStream stream) throws IOException { if(delegate != null) delegate.writeObject(this, stream); }
private void writeObject(ObjectOutputStream output) throws IOException { if(delegate != null) delegate.writeObject(this, stream); }
1,206
private void writeObject(ObjectOutputStream stream) throws IOException { if(delegate != null) delegate.writeObject(this, stream); }
private void writeObject(ObjectOutputStream stream) throws IOException { if(delegate != null) delegate.writeObject(this, stream); }
1,207