bugged
stringlengths
6
599k
fixed
stringlengths
6
40.8M
__index_level_0__
int64
0
3.24M
public FocusManager() { // TODO }
super(); super(); publicsuper(); FocusManager()super(); super(); { //super(); TODOsuper(); super(); }
14,141
public static FocusManager getCurrentManager() { return null; // TODO }
public static FocusManager getCurrentManager() { KeyboardFocusManager fm = KeyboardFocusManager.getCurrentKeyboardFocusManager(); if (fm instanceof FocusManager) return (FocusManager) fm; else { System.err.println("The Swing FocusManager API has been obsoleted by"); System.err.println("the new KeyboardFocusManager ...
14,142
public static void setCurrentManager(FocusManager manager) { // TODO }
KeyboardFocusManager.setCurrentKeyboardFocusManager(manager); KeyboardFocusManager.setCurrentKeyboardFocusManager(manager); publicKeyboardFocusManager.setCurrentKeyboardFocusManager(manager); staticKeyboardFocusManager.setCurrentKeyboardFocusManager(manager); voidKeyboardFocusManager.setCurrentKeyboardFocusManager(mana...
14,143
public Dimension getMaximumSize() { return MAXIMUM_SIZE; }
public Dimension getMaximumSize() { return new Dimension(Integer.MAX_VALUE, Integer.MAX_VALUE); }
14,145
public Dimension getMinimumSize() { return MINIMUM_SIZE; }
public Dimension getMinimumSize() { return new Dimension(5, 5); }
14,146
public Dimension getPreferredSize() { return PREFERRED_SIZE; }
public Dimension getPreferredSize() { return new Dimension(16, 16); }
14,147
public void paint(Graphics g) { super.paint(g); Rectangle bounds = getBounds(); int size = bounds.height / 4; int x = bounds.x + (bounds.width - size) / 2; int y = (bounds.height - size) / 4; ButtonModel m = getModel(); if (m.isArmed()) { x++; y++; } paintTriangle(g, x...
public void paint(Graphics g) { super.paint(g); Rectangle bounds = getBounds(); int size = bounds.height / 4; int x = bounds.x + (bounds.width - size) / 2; int y = (bounds.height - size) / 4; ButtonModel m = getModel(); if (m.isArmed()) { x++; y++; } paintTriangle(g, x...
14,148
private String dealWithClosingGroupNodes (BaseObject obj, OutputStream outputstream, String indent) { // Should *both* groupMemberHash and openGroupNodeHash be synchronized?? synchronized(obj.groupMemberHash) { synchronized(obj.openGroupNodeHash) { Iterator iter = obj.openGroupNodeHash.iterator(); /...
private String dealWithClosingGroupNodes (BaseObject obj, OutputStream outputstream, String indent) { // Should *both* groupMemberHash and openGroupNodeHash be synchronized?? synchronized(obj.groupMemberHash) { synchronized(this.openGroupNodeHash) { Iterator iter = obj.openGroupNodeHash.iterator(); ...
14,150
private String dealWithClosingGroupNodes (BaseObject obj, OutputStream outputstream, String indent) { // Should *both* groupMemberHash and openGroupNodeHash be synchronized?? synchronized(obj.groupMemberHash) { synchronized(obj.openGroupNodeHash) { Iterator iter = obj.openGroupNodeHash.iterator(); /...
private String dealWithClosingGroupNodes (BaseObject obj, OutputStream outputstream, String indent) { // Should *both* groupMemberHash and openGroupNodeHash be synchronized?? synchronized(obj.groupMemberHash) { synchronized(obj.openGroupNodeHash) { Iterator iter = this.openGroupNodeHash.iterator(); ...
14,151
private String dealWithClosingGroupNodes (BaseObject obj, OutputStream outputstream, String indent) { // Should *both* groupMemberHash and openGroupNodeHash be synchronized?? synchronized(obj.groupMemberHash) { synchronized(obj.openGroupNodeHash) { Iterator iter = obj.openGroupNodeHash.iterator(); /...
private String dealWithClosingGroupNodes (BaseObject obj, OutputStream outputstream, String indent) { // Should *both* groupMemberHash and openGroupNodeHash be synchronized?? synchronized(obj.groupMemberHash) { synchronized(obj.openGroupNodeHash) { Iterator iter = obj.openGroupNodeHash.iterator(); /...
14,152
private String dealWithOpeningGroupNodes (BaseObject obj, OutputStream outputstream, String indent) { // Should *both* groupMemberHash and openGroupNodeHash be synchronized?? synchronized(obj.groupMemberHash) { synchronized(obj.openGroupNodeHash) { Iterator iter = obj.groupMemberHash.iterator(); // ...
private String dealWithOpeningGroupNodes (BaseObject obj, OutputStream outputstream, String indent) { // Should *both* groupMemberHash and openGroupNodeHash be synchronized?? synchronized(obj.groupMemberHash) { synchronized(this.openGroupNodeHash) { Iterator iter = obj.groupMemberHash.iterator(); //...
14,153
private String dealWithOpeningGroupNodes (BaseObject obj, OutputStream outputstream, String indent) { // Should *both* groupMemberHash and openGroupNodeHash be synchronized?? synchronized(obj.groupMemberHash) { synchronized(obj.openGroupNodeHash) { Iterator iter = obj.groupMemberHash.iterator(); // ...
private String dealWithOpeningGroupNodes (BaseObject obj, OutputStream outputstream, String indent) { // Should *both* groupMemberHash and openGroupNodeHash be synchronized?? synchronized(obj.groupMemberHash) { synchronized(obj.openGroupNodeHash) { Iterator iter = obj.groupMemberHash.iterator(); // ...
14,154
private String dealWithOpeningGroupNodes (BaseObject obj, OutputStream outputstream, String indent) { // Should *both* groupMemberHash and openGroupNodeHash be synchronized?? synchronized(obj.groupMemberHash) { synchronized(obj.openGroupNodeHash) { Iterator iter = obj.groupMemberHash.iterator(); // ...
private String dealWithOpeningGroupNodes (BaseObject obj, OutputStream outputstream, String indent) { // Should *both* groupMemberHash and openGroupNodeHash be synchronized?? synchronized(obj.groupMemberHash) { synchronized(obj.openGroupNodeHash) { Iterator iter = obj.groupMemberHash.iterator(); // ...
14,155
private String dealWithOpeningGroupNodes (BaseObject obj, OutputStream outputstream, String indent) { // Should *both* groupMemberHash and openGroupNodeHash be synchronized?? synchronized(obj.groupMemberHash) { synchronized(obj.openGroupNodeHash) { Iterator iter = obj.groupMemberHash.iterator(); // ...
private String dealWithOpeningGroupNodes (BaseObject obj, OutputStream outputstream, String indent) { // Should *both* groupMemberHash and openGroupNodeHash be synchronized?? synchronized(obj.groupMemberHash) { synchronized(obj.openGroupNodeHash) { Iterator iter = obj.groupMemberHash.iterator(); // ...
14,156
public void toXDFOutputStream ( OutputStream outputstream, Hashtable XMLDeclAttribs, String indent, boolean dontCloseNode, String newNodeNameString,...
public void toXDFOutputStream ( OutputStream outputstream, Hashtable XMLDeclAttribs, String indent, boolean dontCloseNode, String newNodeNameString,...
14,157
public void toXDFOutputStream ( OutputStream outputstream, Hashtable XMLDeclAttribs, String indent, boolean dontCloseNode, String newNodeNameString,...
public void toXDFOutputStream ( OutputStream outputstream, Hashtable XMLDeclAttribs, String indent, boolean dontCloseNode, String newNodeNameString,...
14,158
public void toXDFOutputStream ( OutputStream outputstream, Hashtable XMLDeclAttribs, String indent, boolean dontCloseNode, String newNodeNameString,...
public void toXDFOutputStream ( OutputStream outputstream, Hashtable XMLDeclAttribs, String indent, boolean dontCloseNode, String newNodeNameString,...
14,159
public void toXDFOutputStream ( OutputStream outputstream, Hashtable XMLDeclAttribs, String indent, boolean dontCloseNode, String newNodeNameString,...
public void toXDFOutputStream ( OutputStream outputstream, Hashtable XMLDeclAttribs, String indent, boolean dontCloseNode, String newNodeNameString,...
14,160
public void toXDFOutputStream ( OutputStream outputstream, Hashtable XMLDeclAttribs, String indent, boolean dontCloseNode, String newNodeNameString,...
public void toXDFOutputStream ( OutputStream outputstream, Hashtable XMLDeclAttribs, String indent, boolean dontCloseNode, String newNodeNameString,...
14,161
public void toXDFOutputStream ( OutputStream outputstream, Hashtable XMLDeclAttribs, String indent, boolean dontCloseNode, String newNodeNameString,...
public void toXDFOutputStream ( OutputStream outputstream, Hashtable XMLDeclAttribs, String indent, boolean dontCloseNode, String newNodeNameString,...
14,162
public void toXDFOutputStream ( OutputStream outputstream, Hashtable XMLDeclAttribs, String indent, boolean dontCloseNode, String newNodeNameString,...
public void toXDFOutputStream ( OutputStream outputstream, Hashtable XMLDeclAttribs, String indent, boolean dontCloseNode, String newNodeNameString,...
14,163
public void toXDFOutputStream ( OutputStream outputstream, Hashtable XMLDeclAttribs, String indent, boolean dontCloseNode, String newNodeNameString,...
public void toXDFOutputStream ( OutputStream outputstream, Hashtable XMLDeclAttribs, String indent, boolean dontCloseNode, String newNodeNameString,...
14,164
public void toXDFOutputStream ( OutputStream outputstream, Hashtable XMLDeclAttribs, String indent, boolean dontCloseNode, String newNodeNameString,...
public void toXDFOutputStream ( OutputStream outputstream, Hashtable XMLDeclAttribs, String indent, boolean dontCloseNode, String newNodeNameString, String noChildObjectNodeName){String nodeNameString = this.classXDFNodeName;// Setup. Sometimes the name of the node we are opening is different from// that specified in t...
14,165
public void toXDFOutputStream ( OutputStream outputstream, Hashtable XMLDeclAttribs, String indent, boolean dontCloseNode, String newNodeNameString,...
public void toXDFOutputStream ( OutputStream outputstream, Hashtable XMLDeclAttribs, String indent, boolean dontCloseNode, String newNodeNameString,...
14,166
public void toXDFOutputStream ( OutputStream outputstream, Hashtable XMLDeclAttribs, String indent, boolean dontCloseNode, String newNodeNameString,...
public void toXDFOutputStream ( OutputStream outputstream, Hashtable XMLDeclAttribs, String indent, boolean dontCloseNode, String newNodeNameString,...
14,167
public void toXDFOutputStream ( OutputStream outputstream, Hashtable XMLDeclAttribs, String indent, boolean dontCloseNode, String newNodeNameString,...
public void toXDFOutputStream ( OutputStream outputstream, Hashtable XMLDeclAttribs, String indent, boolean dontCloseNode, String newNodeNameString,...
14,168
public void actionPerformed(ActionEvent e) { String t = new Date(e.getWhen()).toString(); Session ses; for (int x = 0; x < sessions.size(); x++) { try { ses = (Session)sessions.get(x); if (ses.isConnected() && ses.isSendKeepAlive()) { ses.getVT().sendHeartBe...
public void actionPerformed(ActionEvent e) { Session ses; for (int x = 0; x < sessions.size(); x++) { try { ses = (Session)sessions.get(x); if (ses.isConnected() && ses.isSendKeepAlive()) { ses.getVT().sendHeartBeat(); //System.out.println(" s...
14,170
public static ComponentUI createUI(JComponent component) { if (instances == null) instances = new HashMap(); Object o = instances.get(component); MetalScrollBarUI instance; if (o == null) { instance = new MetalScrollBarUI(); instances.put(component, instance); } else instance ...
public static ComponentUI createUI(JComponent component) { if (instances == null) instances = new HashMap(); Object o = instances.get(component); MetalScrollBarUI instance; if (o == null) { instance = new MetalScrollBarUI(); instances.put(component, instance); } else instance ...
14,172
protected void paintThumb(Graphics g, JComponent c, Rectangle thumbBounds) { // first we fill the background g.setColor(thumbColor); g.fillRect(thumbBounds.x, thumbBounds.y, thumbBounds.width, thumbBounds.height); // draw the outer dark line g.setColor(thumbDarkShadowColor); g.drawRec...
protected void paintThumb(Graphics g, JComponent c, Rectangle thumbBounds) { // first we fill the background g.setColor(thumbColor); g.fillRect(thumbBounds.x, thumbBounds.y, thumbBounds.width, thumbBounds.height); // draw the outer dark line g.setColor(thumbDarkShadowColor); g.drawRec...
14,173
protected void paintThumb(Graphics g, JComponent c, Rectangle thumbBounds) { // first we fill the background g.setColor(thumbColor); g.fillRect(thumbBounds.x, thumbBounds.y, thumbBounds.width, thumbBounds.height); // draw the outer dark line g.setColor(thumbDarkShadowColor); g.drawRec...
protected void paintThumb(Graphics g, JComponent c, Rectangle thumbBounds) { // first we fill the background g.setColor(thumbColor); g.fillRect(thumbBounds.x, thumbBounds.y, thumbBounds.width, thumbBounds.height); // draw the outer dark line g.setColor(thumbDarkShadowColor); g.drawRec...
14,174
public long getLastModified() throws IOException { //return ftpFile.lastModified().getTime(); return ftpFile.getTimestamp().getTimeInMillis(); }
public long getLastModified() throws IOException { //return ftpFile.lastModified().getTime(); return ftpFile.lastModified().getTime(); }
14,175
public boolean isDirectory() { return ftpFile.isDirectory(); }
public boolean isDirectory() { return ftpFile.isDir(); }
14,176
public boolean isFile() { return !ftpFile.isFile(); }
public boolean isFile() { return !ftpFile.isDir() && !ftpFile.isLink(); }
14,177
protected void readFormatTable(ByteArrayOutputStream baosp,int readType, CodePage codePage) { ScreenField sf; boolean isSigned = false; char c; if (masterMDT) { StringBuffer sb = new StringBuffer(); for (int x = 0; x < sizeFields; x++) { ...
protected void readFormatTable(ByteArrayOutputStream baosp,int readType, CodePage codePage) { ScreenField sf; boolean isSigned = false; char c; if (masterMDT) { StringBuffer sb = new StringBuffer(); for (int x = 0; x < sizeFields; x++) { ...
14,179
protected void readFormatTable(ByteArrayOutputStream baosp,int readType, CodePage codePage) { ScreenField sf; boolean isSigned = false; char c; if (masterMDT) { StringBuffer sb = new StringBuffer(); for (int x = 0; x < sizeFields; x++) { ...
protectedvoidreadFormatTable(ByteArrayOutputStreambaosp,intreadType,CodePagecodePage){ScreenFieldsf;booleanisSigned=false;charc;if(masterMDT){StringBuffersb=newStringBuffer();for(intx=0;x<sizeFields;x++){isSigned=false;sf=screenFields[x];if(sf.mdt||(readType==CMD_READ_INPUT_FIELDS)){sb.setLength(0);sb.append(sf.getText...
14,180
protected void readFormatTable(ByteArrayOutputStream baosp,int readType, CodePage codePage) { ScreenField sf; boolean isSigned = false; char c; if (masterMDT) { StringBuffer sb = new StringBuffer(); for (int x = 0; x < sizeFields; x++) { ...
protected void readFormatTable(ByteArrayOutputStream baosp,int readType, CodePage codePage) { ScreenField sf; boolean isSigned = false; char c; if (masterMDT) { StringBuffer sb = new StringBuffer(); for (int x = 0; x < sizeFields; x++) { ...
14,181
private void initJarPaths() { String userDir = System.getProperty("user.dir"); if (new File(userDir + File.separator + "jython.jar").exists()) { jarClassPaths = userDir + File.separator + "jython.jar"; } if (jarClassPaths != null) System.setProperty("python.path",jarClassPaths); ...
private void initJarPaths() { String userDir = System.getProperty("user.dir"); if (new File(userDir + File.separator + "jython.jar").exists()) { jarClassPaths = "." + File.pathSeparator + "jython.jar" + File.pathSeparator + "jt400.jar" + File.pathSeparator + "itext.jar"; if (sessions.contains("scri...
14,183
static public void main(String[] args) { if (isSpecified("-MDI",args)) { useMDIFrames = true; } if (!isSpecified("-nc",args)) { if (!checkBootStrapper(args)) { // if we did not find a running instance and the -d options is // specified start up the bootstrap de...
static public void main(String[] args) { if (isSpecified("-MDI",args)) { useMDIFrames = true; } if (!isSpecified("-nc",args)) { if (!checkBootStrapper(args)) { // if we did not find a running instance and the -d options is // specified start up the bootstrap de...
14,184
static public void main(String[] args) { if (isSpecified("-MDI",args)) { useMDIFrames = true; } if (!isSpecified("-nc",args)) { if (!checkBootStrapper(args)) { // if we did not find a running instance and the -d options is // specified start up the bootstrap de...
static public void main(String[] args) { if (isSpecified("-MDI",args)) { useMDIFrames = true; if (!isSpecified("-nc",args)) { if (!checkBootStrapper(args)) { // if we did not find a running instance and the -d options is // specified start up the bootstrap dea...
14,185
synchronized void newSession(String sel,String[] args) { Properties sesProps = new Properties(); String propFileName = null; String session = args[0]; // Start loading properties sesProps.put(SESSION_HOST,session); if (isSpecified("-e",args)) sesProps.put(SESSION_TN_ENHANCED,"1"...
synchronized void newSession(String sel,String[] args) { Properties sesProps = new Properties(); String propFileName = null; String session = args[0]; // Start loading properties sesProps.put(SESSION_HOST,session); if (isSpecified("-e",args)) sesProps.put(SESSION_TN_ENHANCED,"1"...
14,186
synchronized void newSession(String sel,String[] args) { Properties sesProps = new Properties(); String propFileName = null; String session = args[0]; // Start loading properties sesProps.put(SESSION_HOST,session); if (isSpecified("-e",args)) sesProps.put(SESSION_TN_ENHANCED,"1"...
synchronized void newSession(String sel,String[] args) { Properties sesProps = new Properties(); String propFileName = null; String session = args[0]; // Start loading properties sesProps.put(SESSION_HOST,session); if (isSpecified("-e",args)) sesProps.put(SESSION_TN_ENHANCED,"1"...
14,187
public void actionPerformed(ActionEvent event) { // first we filter the following events: // - control characters // - key events with the ALT modifier (FIXME: filter that too!) char c = event.getActionCommand().charAt(0); if (Character.isISOControl(c)) return; ...
public void actionPerformed(ActionEvent event) { // first we filter the following events: // - control characters // - key events with the ALT modifier (FIXME: filter that too!) char c = event.getActionCommand().charAt(0); if (Character.isISOControl(c)) return; ...
14,188
private void doPopup (MouseEvent me) { JMenuItem menuItem; Action action; popup = new JPopupMenu(); final Gui5250 g = this; JMenuItem mi; final int pos = screen.getRowColFromPoint(me.getX(),me.getY()) - (screen.getCols()-1); if (!rubberband.isAreaSelected() && s...
private void doPopup (MouseEvent me) { JMenuItem menuItem; Action action; popup = new JPopupMenu(); final Gui5250 g = this; JMenuItem mi; final int pos = screen.getRowColFromPoint(me.getX(),me.getY()) - (screen.getCols()-1); if (!rubberband.isAreaSelected() && s...
14,190
private void doPopup (MouseEvent me) { JMenuItem menuItem; Action action; popup = new JPopupMenu(); final Gui5250 g = this; JMenuItem mi; final int pos = screen.getRowColFromPoint(me.getX(),me.getY()) - (screen.getCols()-1); if (!rubberband.isAreaSelected() && s...
private void doPopup (MouseEvent me) { JMenuItem menuItem; Action action; popup = new JPopupMenu(); final Gui5250 g = this; JMenuItem mi; final int pos = screen.getRowColFromPoint(me.getX(),me.getY()) - (screen.getCols()-1); if (!rubberband.isAreaSelected() && s...
14,191
private void doPopup (MouseEvent me) { JMenuItem menuItem; Action action; popup = new JPopupMenu(); final Gui5250 g = this; JMenuItem mi; final int pos = screen.getRowColFromPoint(me.getX(),me.getY()) - (screen.getCols()-1); if (!rubberband.isAreaSelected() && s...
private void doPopup (MouseEvent me) { JMenuItem menuItem; Action action; popup = new JPopupMenu(); final Gui5250 g = this; JMenuItem mi; final int pos = screen.getRowColFromPoint(me.getX(),me.getY()) - (screen.getCols()-1); if (!rubberband.isAreaSelected() && s...
14,192
public void actionPerformed(ActionEvent e) { screen.pasteMe(false); getFocusForMe(); }
public void actionPerformed(ActionEvent e) { screen.sendKeys(MNEMONIC_PASTE); getFocusForMe(); }
14,193
public void actionPerformed(ActionEvent e) { screen.copyMe(); getFocusForMe(); }
public void actionPerformed(ActionEvent e) { screen.sendKeys(MNEMONIC_COPY); getFocusForMe(); }
14,194
public void actionPerformed(ActionEvent e) { screen.pasteMe(false); getFocusForMe(); }
public void actionPerformed(ActionEvent e) { screen.sendKeys(MNEMONIC_PASTE); getFocusForMe(); }
14,195
public void setMacroRunning(boolean mr) { macroRunning = mr; if (macroRunning) screen.setSRIndicatorOn(); else screen.setSRIndicatorOff(); stopMacro = false; }
public void setMacroRunning(boolean mr) { macroRunning = mr; if (macroRunning) screen.setSRIndicatorOn(); else screen.setSRIndicatorOff(); stopMacro = !macroRunning; }
14,196
public void setStopMacroRequested () { setMacroRunning(true); macroRunning = false; }
public void setStopMacroRequested () { setMacroRunning(true); macroRunning = false; }
14,197
private void copyConfigs(String sesFile) { /** Copy the config-files to the user's home-dir */ String srcFile = System.getProperty("user.dir") + File.separator + sesFile; String dest = System.getProperty("user.home") + File.separator + ".tn5250j" + File.separator + sesFile; File rmvFil...
private void copyConfigs(String sesFile) { /** Copy the config-files to the user's home-dir */ String srcFile = System.getProperty("user.dir") + File.separator + sesFile; String dest = System.getProperty("user.home") + File.separator + ".tn5250j" + File.separator + sesFile; File rmvFil...
14,198
private void copyConfigs(String sesFile) { /** Copy the config-files to the user's home-dir */ String srcFile = System.getProperty("user.dir") + File.separator + sesFile; String dest = System.getProperty("user.home") + File.separator + ".tn5250j" + File.separator + sesFile; File rmvFil...
private void copyConfigs(String sesFile) { /** Copy the config-files to the user's home-dir */ String srcFile = System.getProperty("user.dir") + File.separator + sesFile; String dest = System.getProperty("user.home") + File.separator + ".tn5250j" + File.separator + sesFile; File rmvFil...
14,199
private void loadSettings() { FileInputStream in = null; FileInputStream again = null; settings = new Properties(); // here we will check for a system property is provided first. if (System.getProperties().containsKey("emulator.settingsDirectory")) { settings.setProperty("emul...
private void loadSettings() { FileInputStream in = null; FileInputStream again = null; settings = new Properties(); // here we will check for a system property is provided first. if (System.getProperties().containsKey("emulator.settingsDirectory")) { settings.setProperty("emul...
14,200
private void loadSettings() { FileInputStream in = null; FileInputStream again = null; settings = new Properties(); // here we will check for a system property is provided first. if (System.getProperties().containsKey("emulator.settingsDirectory")) { settings.setProperty("emul...
private void loadSettings() { FileInputStream in = null; FileInputStream again = null; settings = new Properties(); // here we will check for a system property is provided first. if (System.getProperties().containsKey("emulator.settingsDirectory")) { settings.setProperty("emul...
14,201
private void loadSettings() { FileInputStream in = null; FileInputStream again = null; settings = new Properties(); // here we will check for a system property is provided first. if (System.getProperties().containsKey("emulator.settingsDirectory")) { settings.setProperty("emul...
private void loadSettings() { FileInputStream in = null; FileInputStream again = null; settings = new Properties(); // here we will check for a system property is provided first. if (System.getProperties().containsKey("emulator.settingsDirectory")) { settings.setProperty("emul...
14,202
private void loadSettings() { FileInputStream in = null; FileInputStream again = null; settings = new Properties(); // here we will check for a system property is provided first. if (System.getProperties().containsKey("emulator.settingsDirectory")) { settings.setProperty("emul...
private void loadSettings() { FileInputStream in = null; FileInputStream again = null; settings = new Properties(); // here we will check for a system property is provided first. if (System.getProperties().containsKey("emulator.settingsDirectory")) { settings.setProperty("emul...
14,203
private void loadSettings() { FileInputStream in = null; FileInputStream again = null; settings = new Properties(); // here we will check for a system property is provided first. if (System.getProperties().containsKey("emulator.settingsDirectory")) { settings.setProperty("emul...
private void loadSettings() { FileInputStream in = null; FileInputStream again = null; settings = new Properties(); // here we will check for a system property is provided first. if (System.getProperties().containsKey("emulator.settingsDirectory")) { settings.setProperty("emul...
14,204
private static int writeBitString(OutputStream out, BitString bs) throws IOException { byte[] buf = bs.getShiftedByteArray(); out.write(buf.length + 1); out.write(bs.getIgnoredBits()); out.write(buf); return buf.length; }
private static int writeBitString(OutputStream out, BitString bs) throws IOException { byte[] buf = bs.getShiftedByteArray(); writeLength(out, buf.length + 1); out.write(bs.getIgnoredBits()); out.write(buf); return buf.length; }
14,205
private static int writeBitString(OutputStream out, BitString bs) throws IOException { byte[] buf = bs.getShiftedByteArray(); out.write(buf.length + 1); out.write(bs.getIgnoredBits()); out.write(buf); return buf.length; }
private static int writeBitString(OutputStream out, BitString bs) throws IOException { byte[] buf = bs.getShiftedByteArray(); out.write(buf.length + 1); out.write(bs.getIgnoredBits()); out.write(buf); return buf.length + 1; }
14,206
protected Object alloc(VmClassType<?> vmClass, int alignedSize) { if (nextFreePtr == null) { /* This heap is full */ return null; } final Offset tibOffset = this.tibOffset; final Word headerSize = Word.fromIntZeroExtend(this.headerSize); final Offset flagsOffset = this.flagsOffset...
protected Object alloc(VmClassType<?> vmClass, int alignedSize) { if (nextFreePtr.EQ(Address.zero())) { /* This heap is full */ return null; } final Offset tibOffset = this.tibOffset; final Word headerSize = Word.fromIntZeroExtend(this.headerSize); final Offset flagsOffset = this....
14,208
protected Object alloc(VmClassType<?> vmClass, int alignedSize) { if (nextFreePtr == null) { /* This heap is full */ return null; } final Offset tibOffset = this.tibOffset; final Word headerSize = Word.fromIntZeroExtend(this.headerSize); final Offset flagsOffset = this.flagsOffset...
protected Object alloc(VmClassType<?> vmClass, int alignedSize) { if (nextFreePtr == null) { /* This heap is full */ return null; } final Offset tibOffset = this.tibOffset; final Word headerSize = Word.fromIntZeroExtend(this.headerSize); final Offset flagsOffset = this.flagsOffset...
14,209
protected Object alloc(VmClassType<?> vmClass, int alignedSize) { if (nextFreePtr == null) { /* This heap is full */ return null; } final Offset tibOffset = this.tibOffset; final Word headerSize = Word.fromIntZeroExtend(this.headerSize); final Offset flagsOffset = this.flagsOffset...
protected Object alloc(VmClassType<?> vmClass, int alignedSize) { if (nextFreePtr == null) { /* This heap is full */ return null; } final Offset tibOffset = this.tibOffset; final Word headerSize = Word.fromIntZeroExtend(this.headerSize); final Offset flagsOffset = this.flagsOffset...
14,210
protected final void defragment() throws UninterruptiblePragma { final Word size = Word.fromIntZeroExtend(getSize()); final Word headerSize = Word.fromIntZeroExtend(this.headerSize); Word offset = headerSize; final Offset sizeOffset = this.sizeOffset; final Offset tibOffset = this...
protected final void defragment() throws UninterruptiblePragma { final Word size = Word.fromIntZeroExtend(getSize()); final Word headerSize = Word.fromIntZeroExtend(this.headerSize); Word offset = headerSize; final Offset sizeOffset = this.sizeOffset; final Offset tibOffset = this...
14,211
public static void main(String[] args) { try { String s = null; s.length(); System.out.println("No throw of NPE: NOK!"); } catch (NullPointerException ex) { System.out.println("catch of NPE: OK! (" + ex + ")"); } }
public static void main(String[] args) { try { String s = null; s.length(); System.out.println("No throw of NPE: NOK!"); } catch (NullPointerException ex) { System.out.println("catch of NPE: OK! (" + ex + ")"); } }
14,212
public static void main(String[] args) { try { String s = null; s.length(); System.out.println("No throw of NPE: NOK!"); } catch (NullPointerException ex) { System.out.println("catch of NPE: OK! (" + ex + ")"); } }
public static void main(String[] args) { try { String s = null; s.length(); System.out.println("No throw of NPE: NOK!"); } catch (NullPointerException ex) { System.out.println("catch of NPE: OK! (" + ex + ")"); } }
14,213
final byte[] encodeText(String text) throws IOException { encoder.reset(); if (!encoder.canEncode(text)) { // Check each character StringBuffer buf = new StringBuffer(); int len = text.length(); for (int i = 0; i < len; i++) { char c = text.charAt(i); ...
final byte[] encodeText(String text) throws IOException { encoder.reset(); if (!encoder.canEncode(text)) { // Check each character StringBuffer buf = new StringBuffer(); int len = text.length(); for (int i = 0; i < len; i++) { char c = text.charAt(i); ...
14,214
final byte[] encodeText(String text) throws IOException { encoder.reset(); if (!encoder.canEncode(text)) { // Check each character StringBuffer buf = new StringBuffer(); int len = text.length(); for (int i = 0; i < len; i++) { char c = text.charAt(i); ...
final byte[] encodeText(String text) throws IOException { encoder.reset(); if (!encoder.canEncode(text)) { // Check each character StringBuffer buf = new StringBuffer(); int len = text.length(); for (int i = 0; i < len; i++) { char c = text.charAt(i); ...
14,215
public long getLength() { return ftpFile.getSize(); }
public long getLength() { return ftpFile.size(); }
14,216
public synchronized void read(long fileOffset, ByteBuffer dest) throws IOException { try { if(data == null){ synchronized(fileSystem) { fileSystem.cwd(parent.path()); //data = fileSystem.get(getName()); InputStream in = fileSy...
public synchronized void read(long fileOffset, ByteBuffer dest) throws IOException { try { if(data == null){ synchronized(fileSystem) { fileSystem.cwd(parent.path()); //data = fileSystem.get(getName()); InputStream in = fileSy...
14,217
private Object get(int index) { Object result = cp[ index]; /* * if (result == null) { System.err.println("Warning: cp[" + index + "] * (tag " + tags[index] + ") returns null"); */ return result; }
private Object get(int index) { Object result = cp[ index]; /* * if (result == null) { System.err.println("Warning: cp[" + index + "] * (tag " + tags[index] + ") returns null"); */ return result; }
14,218
public int indexOf(Object object) { for (int i = 0; i < used; i++) { final Object o = cp[ i]; if ((o != null) && (o.equals(object))) { return i; } } return -1; }
public final int indexOf(Object object) { for (int i = 0; i < used; i++) { final Object o = cp[ i]; if ((o != null) && (o.equals(object))) { return i; } } return -1; }
14,219
public void keyPressed( KeyEvent evt ) { int lead = BasicListUI.this.list.getLeadSelectionIndex(); int max = BasicListUI.this.list.getModel().getSize() - 1; // Do nothing if list is empty if (max == -1) return; // Process the key event. Bindings can be found in // j...
public void keyPressed( KeyEvent evt ) { int lead = BasicListUI.this.list.getLeadSelectionIndex(); int max = BasicListUI.this.list.getModel().getSize() - 1; // Do nothing if list is empty if (max == -1) return; // Process the key event. Bindings can be found in // j...
14,222
public void keyPressed( KeyEvent evt ) { int lead = BasicListUI.this.list.getLeadSelectionIndex(); int max = BasicListUI.this.list.getModel().getSize() - 1; // Do nothing if list is empty if (max == -1) return; // Process the key event. Bindings can be found in // j...
public void keyPressed( KeyEvent evt ) { int lead = BasicListUI.this.list.getLeadSelectionIndex(); int max = BasicListUI.this.list.getModel().getSize() - 1; // Do nothing if list is empty if (max == -1) return; // Process the key event. Bindings can be found in // j...
14,223
public void keyPressed( KeyEvent evt ) { int lead = BasicListUI.this.list.getLeadSelectionIndex(); int max = BasicListUI.this.list.getModel().getSize() - 1; // Do nothing if list is empty if (max == -1) return; // Process the key event. Bindings can be found in // j...
public void keyPressed( KeyEvent evt ) { int lead = BasicListUI.this.list.getLeadSelectionIndex(); int max = BasicListUI.this.list.getModel().getSize() - 1; // Do nothing if list is empty if (max == -1) return; // Process the key event. Bindings can be found in // j...
14,224
public void keyPressed( KeyEvent evt ) { int lead = BasicListUI.this.list.getLeadSelectionIndex(); int max = BasicListUI.this.list.getModel().getSize() - 1; // Do nothing if list is empty if (max == -1) return; // Process the key event. Bindings can be found in // j...
public void keyPressed( KeyEvent evt ) { int lead = BasicListUI.this.list.getLeadSelectionIndex(); int max = BasicListUI.this.list.getModel().getSize() - 1; // Do nothing if list is empty if (max == -1) return; // Process the key event. Bindings can be found in // j...
14,225
public void keyPressed( KeyEvent evt ) { int lead = BasicListUI.this.list.getLeadSelectionIndex(); int max = BasicListUI.this.list.getModel().getSize() - 1; // Do nothing if list is empty if (max == -1) return; // Process the key event. Bindings can be found in // j...
int target; if (lead == BasicListUI.this.list.getFirstVisibleIndex()) { target = Math.max (0, lead - (BasicListUI.this.list.getLastVisibleIndex() - BasicListUI.this.list.getFirstVisibleIndex() + 1)); } else { target = BasicListUI.this.list.getFirstVisibleIndex(); } if (evt.getModifiers() == 0) BasicListUI.this.list.set...
14,226
public void keyPressed( KeyEvent evt ) { int lead = BasicListUI.this.list.getLeadSelectionIndex(); int max = BasicListUI.this.list.getModel().getSize() - 1; // Do nothing if list is empty if (max == -1) return; // Process the key event. Bindings can be found in // j...
int target; if (lead == BasicListUI.this.list.getLastVisibleIndex()) { target = Math.min (max, lead + (BasicListUI.this.list.getLastVisibleIndex() - BasicListUI.this.list.getFirstVisibleIndex() + 1)); } else { target = BasicListUI.this.list.getLastVisibleIndex(); } if (evt.getModifiers() == 0) BasicListUI.this.list.set...
14,227
public void keyPressed( KeyEvent evt ) { int lead = BasicListUI.this.list.getLeadSelectionIndex(); int max = BasicListUI.this.list.getModel().getSize() - 1; // Do nothing if list is empty if (max == -1) return; // Process the key event. Bindings can be found in // j...
public void keyPressed( KeyEvent evt ) { int lead = BasicListUI.this.list.getLeadSelectionIndex(); int max = BasicListUI.this.list.getModel().getSize() - 1; // Do nothing if list is empty if (max == -1) return; // Process the key event. Bindings can be found in // j...
14,228
public void keyPressed( KeyEvent evt ) { int lead = BasicListUI.this.list.getLeadSelectionIndex(); int max = BasicListUI.this.list.getModel().getSize() - 1; // Do nothing if list is empty if (max == -1) return; // Process the key event. Bindings can be found in // j...
public void keyPressed( KeyEvent evt ) { int lead = BasicListUI.this.list.getLeadSelectionIndex(); int max = BasicListUI.this.list.getModel().getSize() - 1; // Do nothing if list is empty if (max == -1) return; // Process the key event. Bindings can be found in // j...
14,229
public void keyPressed( KeyEvent evt ) { int lead = BasicListUI.this.list.getLeadSelectionIndex(); int max = BasicListUI.this.list.getModel().getSize() - 1; // Do nothing if list is empty if (max == -1) return; // Process the key event. Bindings can be found in // j...
public void keyPressed( KeyEvent evt ) { int lead = BasicListUI.this.list.getLeadSelectionIndex(); int max = BasicListUI.this.list.getModel().getSize() - 1; // Do nothing if list is empty if (max == -1) return; // Process the key event. Bindings can be found in // j...
14,230
public void mouseClicked(MouseEvent event) { Point click = event.getPoint(); int index = BasicListUI.this.locationToIndex(list, click); if (index == -1) return; if (event.isControlDown()) { if (BasicListUI.this.list.getSelectionMode() == ListSelectionModel...
public void mouseClicked(MouseEvent event) { Point click = event.getPoint(); int index = BasicListUI.this.locationToIndex(list, click); if (index == -1) return; if (event.isControlDown()) { if (BasicListUI.this.list.getSelectionMode() == ListSelectionModel...
14,232
public Dimension getPreferredSize() { Dimension size = super.getPreferredSize(); if (columns != 0) size.width = columns * getColumnWidth(); return size; }
public Dimension getPreferredSize() { Dimension size = super.getPreferredSize(); if (columns != 0) { Insets i = getInsets(); size.width = columns * getColumnWidth() + i.left + i.right; } return size; }
14,234
private static Clipboard getClipboard(JComponent component) { // Avoid throwing exception if the system clipboard access failed // in the past. if (clipboard != null) return clipboard; else { try { SecurityManager sm = System.getSecurityManager(); if (sm...
private static Clipboard getClipboard(JComponent component) { // Avoid throwing exception if the system clipboard access failed // in the past. if (clipboard != null) return clipboard; else { try { SecurityManager sm = System.getSecurityManager(); if (sm...
14,235
private static Clipboard getClipboard(JComponent component) { // Avoid throwing exception if the system clipboard access failed // in the past. if (clipboard != null) return clipboard; else { try { SecurityManager sm = System.getSecurityManager(); if (sm...
private static Clipboard getClipboard(JComponent component) { // Avoid throwing exception if the system clipboard access failed // in the past. if (clipboard != null) return clipboard; else { try { SecurityManager sm = System.getSecurityManager(); if (sm...
14,236
private static Clipboard getClipboard(JComponent component) { // Avoid throwing exception if the system clipboard access failed // in the past. if (clipboard != null) return clipboard; else { try { SecurityManager sm = System.getSecurityManager(); if (sm...
private static Clipboard getClipboard(JComponent component) { // Avoid throwing exception if the system clipboard access failed // in the past. if (clipboard != null) return clipboard; else { try { SecurityManager sm = System.getSecurityManager(); if (sm...
14,237
public ProgressMonitorInputStream(Component component, Object message, InputStream stream) { super(stream); // TODO } // ProgressMonitorInputStream()
public ProgressMonitorInputStream(Component component, Object message, InputStream stream) { super(stream); // TODO } // ProgressMonitorInputStream()
14,242
public void close() throws IOException { // TODO } // close()
public void close() throws IOException { // TODO } // close()
14,243
public ProgressMonitor getProgressMonitor() { return null; // TODO } // getProgressMonitor()
public ProgressMonitor getProgressMonitor() { return null; // TODO } // getProgressMonitor()
14,244
public int read() throws IOException { return 0; // TODO } // read()
public int read() throws IOException { return 0; // TODO } // read()
14,245
public synchronized void reset() throws IOException { // TODO } // reset()
public synchronized void reset() throws IOException { // TODO } // reset()
14,246
public long skip(long length) throws IOException { return 0; // TODO } // skip()
public long skip(long length) throws IOException { return 0; // TODO } // skip()
14,247
public Object action (SaxDocumentHandler handler, Attributes attrs) throws SAXException { String parentNodeName = getParentNodeName(); // create new object appropriately Note newnote = new Note(); newnote.setAttributes(attrs); // set XML attributes from pass...
public Object action (SaxDocumentHandler handler, Attributes attrs) throws SAXException { String parentNodeName = getParentNodeName(); // create new object appropriately Note newnote = new Note(); newnote.setAttributes(attrs); // set XML attributes from pass...
14,248
public DefaultDesktopManager() { } // DefaultDesktopManager()
public DefaultDesktopManager() { } // DefaultDesktopManager()
14,253
public void activateFrame(JInternalFrame frame) { JDesktopPane p = frame.getDesktopPane(); if (p != null) p.setSelectedFrame(frame); else { try { frame.setSelected(true); } catch (PropertyVetoException e) { } } frame.toFront(); } // activateFrame()
public void activateFrame(JInternalFrame frame) { JDesktopPane p = frame.getDesktopPane(); if (p != null) p.setSelectedFrame(frame); else { try { frame.setSelected(true); } catch (PropertyVetoException e) { } } frame.toFront(); } // activateFrame()
14,254
public void beginDraggingFrame(JComponent component) { if (component instanceof JDesktopIcon) pane = ((JDesktopIcon) component).getInternalFrame().getDesktopPane(); else pane = ((JInternalFrame) component).getDesktopPane(); if (pane == null) return; dragCache = component.getBounds(); if...
public void beginDraggingFrame(JComponent component) { if (component instanceof JDesktopIcon) pane = ((JDesktopIcon) component).getInternalFrame().getDesktopPane(); else pane = ((JInternalFrame) component).getDesktopPane(); if (pane == null) return; dragCache = component.getBounds(); if...
14,255
public void beginResizingFrame(JComponent component, int direction) { pane = ((JInternalFrame) component).getDesktopPane(); if (pane == null) return; dragCache = component.getBounds(); if (! (pane instanceof JDesktopPane)) currentDragMode = JDesktopPane.LIVE_DRAG_MODE; else currentDragM...
public void beginResizingFrame(JComponent component, int direction) { pane = ((JInternalFrame) component).getDesktopPane(); if (pane == null) return; dragCache = component.getBounds(); if (! (pane instanceof JDesktopPane)) currentDragMode = JDesktopPane.LIVE_DRAG_MODE; else currentDragM...
14,256
public void closeFrame(JInternalFrame frame) { Container c = frame.getParent(); frame.doDefaultCloseAction(); if (c != null) { if (frame.isIcon()) c.remove(frame.getDesktopIcon()); else c.remove(frame); c.repaint(); } } // closeFrame()
public void closeFrame(JInternalFrame frame) { Container c = frame.getParent(); frame.doDefaultCloseAction(); if (c != null) { if (frame.isIcon()) c.remove(frame.getDesktopIcon()); else c.remove(frame); c.repaint(); } } // closeFrame()
14,257
public void deactivateFrame(JInternalFrame frame) { JDesktopPane p = frame.getDesktopPane(); if (p != null) { if (p.getSelectedFrame() == frame) p.setSelectedFrame(null); } else { try { frame.setSelected(false); } catch (PropertyVetoException e) { } } } // deactivateFrame()
public void deactivateFrame(JInternalFrame frame) { JDesktopPane p = frame.getDesktopPane(); if (p != null) { if (p.getSelectedFrame() == frame) p.setSelectedFrame(null); } else { try { frame.setSelected(false); } catch (PropertyVetoException e) { } } } // deactivateFrame()
14,258
public void deiconifyFrame(JInternalFrame frame) { JDesktopIcon icon = frame.getDesktopIcon(); Container c = icon.getParent(); removeIconFor(frame); c.add(frame); frame.setVisible(true); if (! frame.isSelected()) { JDesktopPane p = frame.getDesktopPane(); if (p != null) p.setSelectedFrame(fr...
public void deiconifyFrame(JInternalFrame frame) { JDesktopIcon icon = frame.getDesktopIcon(); Container c = icon.getParent(); removeIconFor(frame); c.add(frame); frame.setVisible(true); if (! frame.isSelected()) { JDesktopPane p = frame.getDesktopPane(); if (p != null) p.setSelectedFrame(fr...
14,259
public void dragFrame(JComponent component, int newX, int newY) { if (currentDragMode == JDesktopPane.OUTLINE_DRAG_MODE) { // FIXME: Do outline drag mode painting. } else { Rectangle b = component.getBounds(); if (component instanceof JDesktopIcon) component.setBounds(newX, newY, b.width, b.he...
public void dragFrame(JComponent component, int newX, int newY) { if (currentDragMode == JDesktopPane.OUTLINE_DRAG_MODE) { // FIXME: Do outline drag mode painting. } else { Rectangle b = component.getBounds(); if (component instanceof JDesktopIcon) component.setBounds(newX, newY, b.width, b.he...
14,260