bugged stringlengths 6 599k | fixed stringlengths 10 599k | __index_level_0__ int64 0 1.13M |
|---|---|---|
protected void installDefaults() { Caret caret = textComponent.getCaret(); if (caret == null) { caret = createCaret(); textComponent.setCaret(caret); } Highlighter highlighter = textComponent.getHighlighter(); if (highlighter == null) textComponent.setHighlighter(createHighli... | protected void installDefaults() { Caret caret = textComponent.getCaret(); if (caret == null) { caret = createCaret(); textComponent.setCaret(caret); } Highlighter highlighter = textComponent.getHighlighter(); if (highlighter == null) textComponent.setHighlighter(createHighli... | 4,875 |
protected void installListeners() { textComponent.addFocusListener(focuslistener); textComponent.addPropertyChangeListener(updateHandler); installDocumentListeners(); } | protected void installListeners() { textComponent.addFocusListener(focuslistener); textComponent.addPropertyChangeListener(updateHandler); installDocumentListeners(); } | 4,876 |
public void installUI(final JComponent c) { super.installUI(c); textComponent = (JTextComponent) c; Document doc = textComponent.getDocument(); if (doc == null) { doc = getEditorKit(textComponent).createDefaultDocument(); textComponent.setDocument(doc); } installDefaults(); installListene... | public void installUI(final JComponent c) { textComponent = (JTextComponent) c; Document doc = textComponent.getDocument(); if (doc == null) { doc = getEditorKit(textComponent).createDefaultDocument(); textComponent.setDocument(doc); } installDefaults(); installListeners(); installKey... | 4,877 |
public void installUI(final JComponent c) { super.installUI(c); textComponent = (JTextComponent) c; Document doc = textComponent.getDocument(); if (doc == null) { doc = getEditorKit(textComponent).createDefaultDocument(); textComponent.setDocument(doc); } installDefaults(); installListene... | public void installUI(final JComponent c) { super.installUI(c); textComponent = (JTextComponent) c; Document doc = textComponent.getDocument(); if (doc == null) { doc = getEditorKit(textComponent).createDefaultDocument(); textComponent.setDocument(doc); } else { doc.addDocumentListener(docum... | 4,878 |
public void installUI(final JComponent c) { super.installUI(c); textComponent = (JTextComponent) c; Document doc = textComponent.getDocument(); if (doc == null) { doc = getEditorKit(textComponent).createDefaultDocument(); textComponent.setDocument(doc); } installDefaults(); installListene... | public void installUI(final JComponent c) { super.installUI(c); textComponent = (JTextComponent) c; Document doc = textComponent.getDocument(); if (doc == null) { doc = getEditorKit(textComponent).createDefaultDocument(); textComponent.setDocument(doc); } installDefaults(); installListene... | 4,879 |
protected void modelChanged() { if (textComponent == null || rootView == null) return; ViewFactory factory = rootView.getViewFactory(); if (factory == null) return; Document doc = textComponent.getDocument(); if (doc == null) return; installDocumentListeners(); Element elem = do... | protected void modelChanged() { if (textComponent == null || rootView == null) return; ViewFactory factory = rootView.getViewFactory(); if (factory == null) return; Document doc = textComponent.getDocument(); if (doc == null) return; Element elem = doc.getDefaultRootElement(); ... | 4,880 |
protected void uninstallListeners() { textComponent.removePropertyChangeListener(updateHandler); textComponent.removeFocusListener(focuslistener); textComponent.getDocument().removeDocumentListener(documentHandler); } | protected void uninstallListeners() { textComponent.removeFocusListener(focuslistener); textComponent.getDocument().removeDocumentListener(documentHandler); } | 4,881 |
public int viewToModel(JTextComponent t, Point pt) { return viewToModel(t, pt, null); } | public int viewToModel(JTextComponent t, Point pt) { return viewToModel(t, pt, new Position.Bias[1]); } | 4,882 |
public synchronized void drawImageBuffer(Graphics2D gg2d,int x, int y, int width, int height) { /** * @todo this is a hack and should be fixed at the root of the problem */ if (gg2d == null) { System.out.println(" we got a null graphic object "); return; } synchroni... | public synchronized void drawImageBuffer(Graphics2D gg2d,int x, int y, int width, int height) { /** * @todo this is a hack and should be fixed at the root of the problem */ if (gg2d == null) { log.debug(" we got a null graphic object "); return; } synchronized (lock... | 4,883 |
public Graphics2D getDrawingArea() { try { synchronized (lock) { // wait until there is something to read while (bi == null) { System.out.println(" bi = null "); lock.wait(); } // we have the lock and state we're seeking ... | public Graphics2D getDrawingArea() { try { synchronized (lock) { // wait until there is something to read while (bi == null) { log.debug(" bi = null "); lock.wait(); } // we have the lock and state we're seeking Graphics2... | 4,884 |
public Graphics2D getDrawingArea() { try { synchronized (lock) { // wait until there is something to read while (bi == null) { System.out.println(" bi = null "); lock.wait(); } // we have the lock and state we're seeking ... | public Graphics2D getDrawingArea() { try { synchronized (lock) { // wait until there is something to read while (bi == null) { System.out.println(" bi = null "); lock.wait(); } // we have the lock and state we're seeking ... | 4,885 |
public Graphics2D getWritingArea(Font font) { Graphics2D g2; // we could be in the middle of creating the graphics because of the // threads, resizing etc.... so lets wait until we have one. // If this causes problems we should implement a thresh-hold of sorts // to keep an infina... | public Graphics2D getWritingArea(Font font) { Graphics2D g2; // we could be in the middle of creating the graphics because of the // threads, resizing etc.... so lets wait until we have one. // If this causes problems we should implement a thresh-hold of sorts // to keep an infina... | 4,886 |
public Graphics2D getWritingArea(Font font) { Graphics2D g2; // we could be in the middle of creating the graphics because of the // threads, resizing etc.... so lets wait until we have one. // If this causes problems we should implement a thresh-hold of sorts // to keep an infina... | public Graphics2D getWritingArea(Font font) { Graphics2D g2; // we could be in the middle of creating the graphics because of the // threads, resizing etc.... so lets wait until we have one. // If this causes problems we should implement a thresh-hold of sorts // to keep an infina... | 4,887 |
public void setStatus(byte attr,byte value,String s, int fmWidth, int fmHeight, LineMetrics lm, Font font, Color colorBg, Color colorRed, ... | public void setStatus(byte attr,byte value,String s, int fmWidth, int fmHeight, LineMetrics lm, Font font, Color colorBg, Color colorRed, ... | 4,888 |
protected void create(ElementSpec[] data) { // Once the super behaviour is properly implemented it should be sufficient // to simply call super.create(data). super.create(data); } | protected void create(DefaultStyledDocument.ElementSpec[] data) { // Once the super behaviour is properly implemented it should be sufficient // to simply call super.create(data). super.create(data); } | 4,891 |
protected AbstractDocument.AbstractElement createDefaultRoot() { Element[] tmp; // FIXME: Create a SecionElement here instead of a BranchElement. // Use createBranchElement() and createLeafElement instead. BranchElement section = new BranchElement(null, null); BranchElement paragraph = new BranchE... | protected AbstractDocument.AbstractElement createDefaultRoot() { Element[] tmp; // FIXME: Create a SecionElement here instead of a BranchElement. // Use createBranchElement() and createLeafElement instead. BranchElement section = new BranchElement(null, null); BranchElement paragraph = new BranchE... | 4,892 |
public void setParagraphAttributes(int offset, int length, AttributeSet attributes, boolean replace) { // FIXME: Implement me. throw new Error("not implemented"); } | public void setParagraphAttributes(int offset, int length, AttributeSet attributes, boolean replace) { // FIXME: Implement me. int index = offset; while (index < offset + length) { AbstractElement par = (AbstractElement) getParagraphElement(index); AttributeContext ctx = getAttributeContext(); ... | 4,893 |
public boolean moveCursor(MouseEvent e, int pos) { if (!oia.isKeyBoardLocked()) { if (pos < 0) return false; // because getRowColFromPoint returns offset of 1,1 we need to // translate to offset 0,0 // pos -= (numCols + 1); int g = planes.getWhichGUI(pos); // lets check for hot spots if (g... | public boolean moveCursor(MouseEvent e, int pos) { if (!oia.isKeyBoardLocked()) { if (pos < 0) return false; // because getRowColFromPoint returns offset of 1,1 we need to // translate to offset 0,0 // pos -= (numCols + 1); int g = planes.getWhichGUI(pos); // lets check for hot spots if (g... | 4,895 |
public boolean moveCursor(MouseEvent e, int pos) { if (!oia.isKeyBoardLocked()) { if (pos < 0) return false; // because getRowColFromPoint returns offset of 1,1 we need to // translate to offset 0,0 // pos -= (numCols + 1); int g = planes.getWhichGUI(pos); // lets check for hot spots if (g... | public boolean moveCursor(MouseEvent e, int pos) { if (!oia.isKeyBoardLocked()) { if (pos < 0) return false; // because getRowColFromPoint returns offset of 1,1 we need to // translate to offset 0,0 // pos -= (numCols + 1); int g = planes.getWhichGUI(pos); // lets check for hot spots if (g... | 4,896 |
public boolean moveCursor(MouseEvent e, int pos) { if (!oia.isKeyBoardLocked()) { if (pos < 0) return false; // because getRowColFromPoint returns offset of 1,1 we need to // translate to offset 0,0 // pos -= (numCols + 1); int g = planes.getWhichGUI(pos); // lets check for hot spots if (g... | public boolean moveCursor(MouseEvent e, int pos) { if (!oia.isKeyBoardLocked()) { if (pos < 0) return false; // because getRowColFromPoint returns offset of 1,1 we need to // translate to offset 0,0 // pos -= (numCols + 1); int g = planes.getWhichGUI(pos); // lets check for hot spots if (g... | 4,897 |
public boolean moveCursor(MouseEvent e, int pos) { if (!oia.isKeyBoardLocked()) { if (pos < 0) return false; // because getRowColFromPoint returns offset of 1,1 we need to // translate to offset 0,0 // pos -= (numCols + 1); int g = planes.getWhichGUI(pos); // lets check for hot spots if (g... | public boolean moveCursor(MouseEvent e, int pos) { if (!oia.isKeyBoardLocked()) { if (pos < 0) return false; // because getRowColFromPoint returns offset of 1,1 we need to // translate to offset 0,0 // pos -= (numCols + 1); int g = planes.getWhichGUI(pos); // lets check for hot spots if (g... | 4,898 |
private void distributeSpill(TableColumn[] cols, int spill) { int MIN = 0; int MAX = 0; int PREF = 0; int[] min = new int[cols.length]; int[] max = new int[cols.length]; int[] pref = new int[cols.length]; for (int i = 0; i < cols.length; ++i) { pref[i] = cols[i].getPreferredWidth(); ... | private void distributeSpill(TableColumn[] cols, int spill) { int MIN = 0; int MAX = 0; int PREF = 0; int[] min = new int[cols.length]; int[] max = new int[cols.length]; int[] pref = new int[cols.length]; for (int i = 0; i < cols.length; ++i) { pref[i] = cols[i].getPreferredWidth(); ... | 4,900 |
private void distributeSpill(TableColumn[] cols, int spill) { int MIN = 0; int MAX = 0; int PREF = 0; int[] min = new int[cols.length]; int[] max = new int[cols.length]; int[] pref = new int[cols.length]; for (int i = 0; i < cols.length; ++i) { pref[i] = cols[i].getPreferredWidth(); ... | private void distributeSpill(TableColumn[] cols, int spill) { int MIN = 0; int MAX = 0; int PREF = 0; int[] min = new int[cols.length]; int[] max = new int[cols.length]; int[] pref = new int[cols.length]; for (int i = 0; i < cols.length; ++i) { pref[i] = cols[i].getPreferredWidth(); ... | 4,901 |
public void doLayout() { TableColumn resizingColumn = null; int ncols = getColumnCount(); if (ncols < 1) return; int[] pref = new int[ncols]; int prefSum = 0; int rCol = -1; if (tableHeader != null) resizingColumn = tableHeader.getResizingColumn(); for (int i = 0; i < ncols; ++i) ... | public void doLayout() { TableColumn resizingColumn = null; int ncols = getColumnCount(); if (ncols < 1) return; int[] pref = new int[ncols]; int prefSum = 0; int rCol = -1; if (tableHeader != null) resizingColumn = tableHeader.getResizingColumn(); for (int i = 0; i < ncols; ++i) ... | 4,902 |
public View create(Element element) { View view = null; Object attr = element.getAttributes().getAttribute( StyleConstants.NameAttribute); if (attr instanceof HTML.Tag) { HTML.Tag tag = (HTML.Tag) attr; if (tag.equals(HTML.Tag.IMPLIED) || tag... | public View create(Element element) { View view = null; Object attr = element.getAttributes().getAttribute( StyleConstants.NameAttribute); if (attr instanceof HTML.Tag) { HTML.Tag tag = (HTML.Tag) attr; if (tag.equals(HTML.Tag.IMPLIED) || tag... | 4,904 |
static final KDF getInstance(final byte[] K) { int ndx = -1; final byte[] keyMaterial; if (K != null) { keyMaterial = K; ndx = 0; } else { keyMaterial = new byte[AES_BLOCK_SIZE]; ndx = new Random ().nextInt (256); // XXX does this need to be secure? } re... | static final KDF getInstance(final byte[] K) { int ndx = -1; final byte[] keyMaterial; if (K != null) { keyMaterial = K; ndx = 0; } else { keyMaterial = new byte[AES_BLOCK_SIZE]; while (ndx < 1 || ndx > 255) ndx = (byte) nextByte(); // XXX does this need to be s... | 4,906 |
public int getLayer(Component c) { if (! componentToLayer.containsKey (c)) throw new IllegalArgumentException (); return ((Integer) componentToLayer.get(c)).intValue(); } | public int getLayer(Component c) { if (! componentToLayer.containsKey (c)) throw new IllegalArgumentException (); return ((Integer) componentToLayer.get(c)).intValue(); } | 4,907 |
protected ChangeListener createChangeListener(JComponent c) { return new ChangeHandler(); } | protected ChangeListener createChangeListener(JComponent c) { return new ChangeHandler((JMenu) c, this); } | 4,908 |
public void run () { boolean keepTrucking = true; while (keepTrucking) { try { bk = (Stream5250)dsq.get(); } catch (InterruptedException ie) { System.out.println(" vt thread interrupted and stopping "); keepTrucking = false; continue; ... | public void run () { boolean keepTrucking = true; while (keepTrucking) { try { bk = (Stream5250)dsq.get(); } catch (InterruptedException ie) { System.out.println(" vt thread interrupted and stopping "); keepTrucking = false; continue; ... | 4,909 |
public void changedUpdate(DocumentEvent ev, Shape shape, ViewFactory vf) { Element el = getElement(); DocumentEvent.ElementChange ec = ev.getChange(el); if (ec != null) updateChildren(ec, ev, vf); forwardUpdate(ec, ev, shape, vf); updateLayout(ec, ev, shape); } | public void changedUpdate(DocumentEvent ev, Shape shape, ViewFactory vf) { Element el = getElement(); DocumentEvent.ElementChange ec = ev.getChange(el); if (ec != null) { if (! updateChildren(ec, ev, vf)) ec = null; } forwardUpdate(ec, ev, shape, vf); updateLayout(ec, ev, shape); } | 4,910 |
protected void forwardUpdate(DocumentEvent.ElementChange ec, DocumentEvent ev, Shape shape, ViewFactory vf) { int count = getViewCount(); if (count > 0) { int startOffset = ev.getOffset(); int endOffset = startOffset + ev.getLength(); int startIndex = get... | protected void forwardUpdate(DocumentEvent.ElementChange ec, DocumentEvent ev, Shape shape, ViewFactory vf) { int count = getViewCount(); if (count > 0) { int startOffset = ev.getOffset(); int startIndex = getViewIndex(startOffset, Position.Bias.Backward... | 4,912 |
protected void forwardUpdate(DocumentEvent.ElementChange ec, DocumentEvent ev, Shape shape, ViewFactory vf) { int count = getViewCount(); if (count > 0) { int startOffset = ev.getOffset(); int endOffset = startOffset + ev.getLength(); int startIndex = get... | protected void forwardUpdate(DocumentEvent.ElementChange ec, DocumentEvent ev, Shape shape, ViewFactory vf) { int count = getViewCount(); if (count > 0) { int startOffset = ev.getOffset(); int endOffset = startOffset + ev.getLength(); int startIndex = get... | 4,913 |
protected void forwardUpdate(DocumentEvent.ElementChange ec, DocumentEvent ev, Shape shape, ViewFactory vf) { int count = getViewCount(); if (count > 0) { int startOffset = ev.getOffset(); int endOffset = startOffset + ev.getLength(); int startIndex = get... | protected void forwardUpdate(DocumentEvent.ElementChange ec, DocumentEvent ev, Shape shape, ViewFactory vf) { int count = getViewCount(); if (count > 0) { int startOffset = ev.getOffset(); int endOffset = startOffset + ev.getLength(); int startIndex = get... | 4,914 |
protected void forwardUpdate(DocumentEvent.ElementChange ec, DocumentEvent ev, Shape shape, ViewFactory vf) { int count = getViewCount(); if (count > 0) { int startOffset = ev.getOffset(); int endOffset = startOffset + ev.getLength(); int startIndex = get... | protected void forwardUpdate(DocumentEvent.ElementChange ec, DocumentEvent ev, Shape shape, ViewFactory vf) { int count = getViewCount(); if (count > 0) { int startOffset = ev.getOffset(); int endOffset = startOffset + ev.getLength(); int startIndex = get... | 4,915 |
protected void forwardUpdate(DocumentEvent.ElementChange ec, DocumentEvent ev, Shape shape, ViewFactory vf) { int count = getViewCount(); if (count > 0) { int startOffset = ev.getOffset(); int endOffset = startOffset + ev.getLength(); int startIndex = get... | protected void forwardUpdate(DocumentEvent.ElementChange ec, DocumentEvent ev, Shape shape, ViewFactory vf) { int count = getViewCount(); if (count > 0) { int startOffset = ev.getOffset(); int endOffset = startOffset + ev.getLength(); int startIndex = get... | 4,916 |
protected void forwardUpdate(DocumentEvent.ElementChange ec, DocumentEvent ev, Shape shape, ViewFactory vf) { int count = getViewCount(); if (count > 0) { int startOffset = ev.getOffset(); int endOffset = startOffset + ev.getLength(); int startIndex = get... | protected void forwardUpdate(DocumentEvent.ElementChange ec, DocumentEvent ev, Shape shape, ViewFactory vf) { int count = getViewCount(); if (count > 0) { int startOffset = ev.getOffset(); int endOffset = startOffset + ev.getLength(); int startIndex = get... | 4,917 |
public void removeUpdate(DocumentEvent ev, Shape shape, ViewFactory vf) { Element el = getElement(); DocumentEvent.ElementChange ec = ev.getChange(el); if (ec != null) updateChildren(ec, ev, vf); forwardUpdate(ec, ev, shape, vf); updateLayout(ec, ev, shape); } | public void removeUpdate(DocumentEvent ev, Shape shape, ViewFactory vf) { Element el = getElement(); DocumentEvent.ElementChange ec = ev.getChange(el); if (ec != null) { if (! updateChildren(ec, ev, vf)) ec = null; } forwardUpdate(ec, ev, shape, vf); updateLayout(ec, ev, shape); } | 4,918 |
public int getIntData (Locator locator) throws NoDataException { int longIndex = getLongArrayIndex(locator); int shortIndex = getShortArrayIndex(locator); try { if (java.lang.reflect.Array.getByte(longDataArray.get(longIndex), shortIndex) !=1) throw new NoDataException();... | public int getIntData (Locator locator) throws NoDataException { int longIndex = getLongArrayIndex(locator); int shortIndex = getShortArrayIndex(locator); try { if (java.lang.reflect.Array.getByte(longDataArray.get(longIndex), shortIndex) !=1) throw new NoDataException();... | 4,919 |
public long getLongData (Locator locator) throws NoDataException { int longIndex = getLongArrayIndex(locator); int shortIndex = getShortArrayIndex(locator); try { if (java.lang.reflect.Array.getByte(longDataArray.get(longIndex), shortIndex) !=1) throw new NoDataException()... | public long getLongData (Locator locator) throws NoDataException { int longIndex = getLongArrayIndex(locator); int shortIndex = getShortArrayIndex(locator); try { if (java.lang.reflect.Array.getByte(longDataArray.get(longIndex), shortIndex) !=1) throw new NoDataException()... | 4,920 |
public short getShortData (Locator locator) throws NoDataException { int longIndex = getLongArrayIndex(locator); int shortIndex = getShortArrayIndex(locator); try { if (java.lang.reflect.Array.getByte(longDataArray.get(longIndex), shortIndex) !=1) throw new NoDataException... | public short getShortData (Locator locator) throws NoDataException { int longIndex = getLongArrayIndex(locator); int shortIndex = getShortArrayIndex(locator); try { if (java.lang.reflect.Array.getByte(longDataArray.get(longIndex), shortIndex) !=1) throw new NoDataException... | 4,921 |
public SwingFramePeer(SwingToolkit toolkit, JDesktopPane desktopPane, Frame awtFrame) { super(toolkit, awtFrame, new SwingFrame(awtFrame)); jComponent.initialize(this); SwingToolkit.copyAwtProperties(awtFrame, this.jComponent); jComponent.getContentPane().setLayout(new SwingFrameLayout(this)); ... | public SwingFramePeer(SwingToolkit toolkit, JDesktopPane desktopPane, Frame awtFrame) { super(toolkit, awtFrame, new SwingFrame(awtFrame)); jComponent.initialize(this); SwingToolkit.copyAwtProperties(awtFrame, this.jComponent); jComponent.getContentPane().setLayout(new SwingContainerLayout(this))... | 4,926 |
public void clear() { synchronized (lock) { vector.clear(); lock.notify(); } } | public void clear() { synchronized (lock) { vector.clear(); lock.notifyAll(); } } | 4,927 |
public Object get() throws InterruptedException { synchronized (lock) { // wait until there is something to read while (isEmpty()) lock.wait(); /** * @todo here is the throttling code to look at * * just something here to try. OK it works but we nee... | public Object get() throws InterruptedException { synchronized (lock) { // wait until there is something to read while (isEmpty()) { lock.wait(); /** * @todo here is the throttling code to look at * * just something here to try. OK it works but we n... | 4,928 |
public void put(Object o) { synchronized (lock) { vector.addElement(o);// if (vector.size() > 5)// System.out.println(vector.size()); // tell waiting threads to wake up lock.notify(); } } | public void put(Object o) { synchronized (lock) { vector.addElement(o);// if (vector.size() > 5)// System.out.println(vector.size()); // tell waiting threads to wake up lock.notifyAll(); } } | 4,930 |
void visitParameter(Parameter p); | public void visitParameter(Parameter p); | 4,931 |
String visitValue(String s, boolean last, int tokenType); | public String visitValue(String s, boolean last, int tokenType); | 4,932 |
public void visitParameter(Parameter p) { this.param = p; String s = p.getName(); if( !Parameter.ANONYMOUS.equals(s) ) { line += "-" + s + " "; } } | public void visitParameter(Parameter p) { this.param = p; String s = p.getName(); if( !Parameter.ANONYMOUS.equals(s) ) { line += "-" + s + " "; } } | 4,933 |
private void clearArguments() { for (int i = 0; i < params.length; i++) if (params[i].hasArgument()) params[i].getArgument().clear(); } | private void clearArguments() { for (int i = 0; i < params.length; i++) if (params[i].hasArgument()) params[i].getArgument().clear(); } | 4,934 |
public String complete(CommandLine partial) throws CompletionException { CompletionVisitor visitor = new CompletionVisitor(); try { visitCommandLine(partial, visitor); } catch(SyntaxError ex) { throw new CompletionException(ex.getMessage()); } return visitor.getCompletedLine(); } | public String complete(CommandLine partial) throws CompletionException { CompletionVisitor visitor = new CompletionVisitor(); try { visitCommandLine(partial, visitor); } catch(SyntaxError ex) { throw new CompletionException(ex.getMessage()); } return visitor.getCompletedLine(); } | 4,935 |
synchronized ParsedArguments parse(String[] args) throws SyntaxError { if (params.length == 0) { if( args.length == 0 ) return new ParsedArguments(new HashMap()); throw new SyntaxError("Syntax takes no parameter"); } CommandLine cmdLine = new CommandLine(args); ParseVisitor visitor = new ParseVisitor(); vi... | synchronized ParsedArguments parse(String[] args) throws SyntaxError { if (params.length == 0) { if( args.length == 0 ) return new ParsedArguments(new HashMap()); throw new SyntaxError("Syntax takes no parameter"); } CommandLine cmdLine = new CommandLine(args); ParseVisitor visitor = new ParseVisitor(); vi... | 4,936 |
synchronized ParsedArguments parse(String[] args) throws SyntaxError { if (params.length == 0) { if( args.length == 0 ) return new ParsedArguments(new HashMap()); throw new SyntaxError("Syntax takes no parameter"); } CommandLine cmdLine = new CommandLine(args); ParseVisitor visitor = new ParseVisitor(); vi... | synchronized ParsedArguments parse(String[] args) throws SyntaxError { if (params.length == 0) { if( args.length == 0 ) return new ParsedArguments(new HashMap()); throw new SyntaxError("Syntax takes no parameter"); } CommandLine cmdLine = new CommandLine(args); ParseVisitor visitor = new ParseVisitor(); vi... | 4,937 |
synchronized ParsedArguments parse(String[] args) throws SyntaxError { if (params.length == 0) { if( args.length == 0 ) return new ParsedArguments(new HashMap()); throw new SyntaxError("Syntax takes no parameter"); } CommandLine cmdLine = new CommandLine(args); ParseVisitor visitor = new ParseVisitor(); vi... | synchronized ParsedArguments parse(String[] args) throws SyntaxError { if (params.length == 0) { if( args.length == 0 ) return new ParsedArguments(new HashMap()); throw new SyntaxError("Syntax takes no parameter"); } CommandLine cmdLine = new CommandLine(args); ParseVisitor visitor = new ParseVisitor(); vi... | 4,938 |
private synchronized void visitCommandLine(CommandLine cmdLine, CommandLineVisitor visitor) { clearArguments(); Parameter param = null; do { String s = ""; if( cmdLine.hasNext() ) s = cmdLine.next(); // TODO: it didn't handle correctly the parameters starting with "-" /*if (s.startsWit... | private synchronized void visitCommandLine(CommandLine cmdLine, CommandLineVisitor visitor) { clearArguments(); Parameter param = null; do { String s = ""; if( cmdLine.hasNext() ) s = cmdLine.next(); // TODO: it didn't handle correctly the parameters starting with "-" /*if (s.startsWit... | 4,939 |
private synchronized void visitCommandLine(CommandLine cmdLine, CommandLineVisitor visitor) { clearArguments(); Parameter param = null; do { String s = ""; if( cmdLine.hasNext() ) s = cmdLine.next(); // TODO: it didn't handle correctly the parameters starting with "-" /*if (s.startsWit... | private synchronized void visitCommandLine(CommandLine cmdLine, CommandLineVisitor visitor) { clearArguments(); Parameter param = null; do { String s = ""; if( cmdLine.hasNext() ) s = cmdLine.next(); // TODO: it didn't handle correctly the parameters starting with "-" /*if (s.startsWit... | 4,940 |
private synchronized void visitCommandLine(CommandLine cmdLine, CommandLineVisitor visitor) { clearArguments(); Parameter param = null; do { String s = ""; if( cmdLine.hasNext() ) s = cmdLine.next(); // TODO: it didn't handle correctly the parameters starting with "-" /*if (s.startsWit... | private synchronized void visitCommandLine(CommandLine cmdLine, CommandLineVisitor visitor) { clearArguments(); Parameter param = null; do { String s = ""; if( cmdLine.hasNext() ) s = cmdLine.next(); // TODO: it didn't handle correctly the parameters starting with "-" /*if (s.startsWit... | 4,941 |
private synchronized void visitCommandLine(CommandLine cmdLine, CommandLineVisitor visitor) { clearArguments(); Parameter param = null; do { String s = ""; if( cmdLine.hasNext() ) s = cmdLine.next(); // TODO: it didn't handle correctly the parameters starting with "-" /*if (s.startsWit... | private synchronized void visitCommandLine(CommandLine cmdLine, CommandLineVisitor visitor) { clearArguments(); Parameter param = null; do { String s = ""; if( cmdLine.hasNext() ) s = cmdLine.next(); // TODO: it didn't handle correctly the parameters starting with "-" /*if (s.startsWit... | 4,942 |
private void processChild(Object child) { final int gcColor = helper.getObjectColor(child); if (gcColor <= GC_WHITE) { // Yellow or White helper.atomicChangeObjectColor(child, gcColor, GC_GREY); stack.push(child); } } | private void processChild(Object child) { final int gcColor = helper.getObjectColor(child); if (gcColor <= GC_WHITE) { // Yellow or White helper.atomicChangeObjectColor(child, gcColor, GC_GREY); try { helper.getVmClass(child); stack.push(child); } catch (NullPointerEx... | 4,944 |
public void changedUpdate(DocumentEvent ev, Shape a, ViewFactory fv) { setPropertiesFromAttributes(); } | public void changedUpdate(DocumentEvent ev, Shape a, ViewFactory vf) { setPropertiesFromAttributes(); } | 4,947 |
public float getAlignment(int axis) { float align; if (axis == X_AXIS) align = super.getAlignment(axis); else if (getViewCount() > 0) { float prefHeight = getPreferredSpan(Y_AXIS); float firstRowHeight = getView(0).getPreferredSpan(Y_AXIS); align = (firstRowHeight / 2.F) / pre... | public float getAlignment(int axis) { float align; if (axis == X_AXIS) align = 0.5F; else if (getViewCount() > 0) { float prefHeight = getPreferredSpan(Y_AXIS); float firstRowHeight = getView(0).getPreferredSpan(Y_AXIS); align = (firstRowHeight / 2.F) / prefHeight; } e... | 4,949 |
public float getAlignment(int axis) { float align; if (axis == X_AXIS) align = super.getAlignment(axis); else if (getViewCount() > 0) { float prefHeight = getPreferredSpan(Y_AXIS); float firstRowHeight = getView(0).getPreferredSpan(Y_AXIS); align = (firstRowHeight / 2.F) / pre... | public float getAlignment(int axis) { float align; if (axis == X_AXIS) align = super.getAlignment(axis); else if (getViewCount() > 0) { float prefHeight = getPreferredSpan(Y_AXIS); float firstRowHeight = getView(0).getPreferredSpan(Y_AXIS); align = (firstRowHeight / 2.F) / pre... | 4,950 |
private static Class getRepresentationClassFromMime(String mimeString, ClassLoader classLoader) { String classname = getParameter("class", mimeString); if (classname != null) { try { return tryToLoadClass(classna... | private static Class getRepresentationClassFromMime(String mimeString, ClassLoader classLoader) { String classname = getParameter("class", mimeString); if (classname != null) { try { return tryToLoadClass(classna... | 4,951 |
protected static final Class tryToLoadClass(String className, ClassLoader classLoader) throws ClassNotFoundException { try { return(Class.forName(className)); } catch(Exception e) { ; } // Commented out for Java 1.1 /* try { return(cla... | protected static final Class tryToLoadClass(String className, ClassLoader classLoader) throws ClassNotFoundException { try { return Class.forName(className); } catch(Exception e) { ; } // Commented out for Java 1.1 /* try { return(clas... | 4,952 |
protected static final Class tryToLoadClass(String className, ClassLoader classLoader) throws ClassNotFoundException { try { return(Class.forName(className)); } catch(Exception e) { ; } // Commented out for Java 1.1 /* try { return(cla... | protected static final Class tryToLoadClass(String className, ClassLoader classLoader) throws ClassNotFoundException { try { return(Class.forName(className)); } catch(Exception e) { ; } // Commented out for Java 1.1 /* try { return(cla... | 4,953 |
protected static final Class tryToLoadClass(String className, ClassLoader classLoader) throws ClassNotFoundException { try { return(Class.forName(className)); } catch(Exception e) { ; } // Commented out for Java 1.1 /* try { return(cla... | protected static final Class tryToLoadClass(String className, ClassLoader classLoader) throws ClassNotFoundException { try { return(Class.forName(className)); } catch(Exception e) { ; } // Commented out for Java 1.1 /* try { ClassLoade... | 4,954 |
protected static final Class tryToLoadClass(String className, ClassLoader classLoader) throws ClassNotFoundException { try { return(Class.forName(className)); } catch(Exception e) { ; } // Commented out for Java 1.1 /* try { return(cla... | protected static final Class tryToLoadClass(String className, ClassLoader classLoader) throws ClassNotFoundException { try { return(Class.forName(className)); } // Commented out for Java 1.1 /* try { return(className.getClass().getCla... | 4,955 |
protected static final Class tryToLoadClass(String className, ClassLoader classLoader) throws ClassNotFoundException { try { return(Class.forName(className)); } catch(Exception e) { ; } // Commented out for Java 1.1 /* try { return(cla... | protected static final Class tryToLoadClass(String className, ClassLoader classLoader) throws ClassNotFoundException { try { return(Class.forName(className)); } catch(Exception e) { ; } // Commented out for Java 1.1 /* try { return(cla... | 4,956 |
protected static final Class tryToLoadClass(String className, ClassLoader classLoader) throws ClassNotFoundException { try { return(Class.forName(className)); } catch(Exception e) { ; } // Commented out for Java 1.1 /* try { return(cla... | protected static final Class tryToLoadClass(String className, ClassLoader classLoader) throws ClassNotFoundException { try { return(Class.forName(className)); } catch(Exception e) { ; } // Commented out for Java 1.1 /* try { return(cla... | 4,957 |
protected static final Class tryToLoadClass(String className, ClassLoader classLoader) throws ClassNotFoundException { try { return(Class.forName(className)); } catch(Exception e) { ; } // Commented out for Java 1.1 /* try { return(cla... | protected static final Class tryToLoadClass(String className, ClassLoader classLoader) throws ClassNotFoundException { try { return(Class.forName(className)); } catch(Exception e) { ; } // Commented out for Java 1.1 /* try { return(cla... | 4,958 |
public void init(TestConfig config, MockObjectTestCase testCase) throws NameAlreadyBoundException, NamingException, IllegalArgumentException, DriverException, ResourceNotFreeException { IDEDiskDriver driver = new IDEDiskDriver(); // set the current testCase for our factory ... | public void init(TestConfig config, MockObjectTestCase testCase) throws NameAlreadyBoundException, NamingException, IllegalArgumentException, DriverException, ResourceNotFreeException { IDEDiskDriver driver = new IDEDiskDriver(); // set the current testCase for our factory ... | 4,959 |
public static Toolkit getDefaultToolkit() { if (toolkit != null) return toolkit; String toolkit_name = System.getProperty("awt.toolkit", default_toolkit_name); try { Class cls = Class.forName(toolkit_name); Object obj = cls.newInstance(); if (!(obj... | public static Toolkit getDefaultToolkit() { if (toolkit != null) return toolkit; String toolkit_name = System.getProperty("awt.toolkit", default_toolkit_name); try { ClassLoader cl = Thread.currentThread().getContextClassLoader(); Class cls = cl.loadCl... | 4,960 |
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"... | 4,961 |
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"... | 4,962 |
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"... | 4,963 |
public View create(Element element) { View view = null; Object attr = element.getAttributes().getAttribute(StyleConstants.NameAttribute); if (attr instanceof HTML.Tag) { HTML.Tag tag = (HTML.Tag) attr; if (tag.equals(HTML.Tag.IMPLIED) || tag.equals(HTML.Tag.P) ... | public View create(Element element) { View view = null; Object attr = element.getAttributes().getAttribute(StyleConstants.NameAttribute); if (attr instanceof HTML.Tag) { HTML.Tag tag = (HTML.Tag) attr; if (tag.equals(HTML.Tag.IMPLIED) || tag.equals(HTML.Tag.P) ... | 4,964 |
public Vector getDirectories() { Vector tmp = new Vector(); for (int i = 0; i < directories; i++) tmp.add(contents.get(i)); return tmp; } | public Vector getDirectories() { Vector tmp = new Vector(); for (int i = 0; i < directories; i++) tmp.add(contents.get(i)); return tmp; } | 4,968 |
public Object getElementAt(int index) { if (index > getSize() - 1) return null; if (listingMode == JFileChooser.FILES_ONLY) return contents.get(directories + index); else return contents.elementAt(index); } | public Object getElementAt(int index) { if (index > getSize() - 1) return null; if (listingMode == JFileChooser.FILES_ONLY) return contents.get(directories + index); else return contents.elementAt(index); } | 4,969 |
public Vector getFiles() { Vector tmp = new Vector(); for (int i = directories; i < getSize(); i++) tmp.add(contents.get(i)); return tmp; } | public Vector getFiles() { Vector tmp = new Vector(); for (int i = directories; i < getSize(); i++) tmp.add(contents.get(i)); return tmp; } | 4,970 |
public int getSize() { if (listingMode == JFileChooser.DIRECTORIES_ONLY) return directories; else if (listingMode == JFileChooser.FILES_ONLY) return contents.size() - directories; return contents.size(); } | public int getSize() { if (listingMode == JFileChooser.DIRECTORIES_ONLY) return directories; else if (listingMode == JFileChooser.FILES_ONLY) return contents.size() - directories; return contents.size(); } | 4,971 |
public int indexOf(Object o) { if (listingMode == JFileChooser.FILES_ONLY) return contents.indexOf(o) - directories; return contents.indexOf(o); } | public int indexOf(Object o) { if (listingMode == JFileChooser.FILES_ONLY) return contents.indexOf(o) - directories; return contents.indexOf(o); } | 4,972 |
public void propertyChange(PropertyChangeEvent e) { if (e.getPropertyName().equals(JFileChooser.FILE_SELECTION_MODE_CHANGED_PROPERTY)) listingMode = filechooser.getFileSelectionMode(); } | public void propertyChange(PropertyChangeEvent e) { if (e.getPropertyName().equals(JFileChooser.FILE_SELECTION_MODE_CHANGED_PROPERTY)) listingMode = filechooser.getFileSelectionMode(); } | 4,973 |
public boolean renameFile(File oldFile, File newFile) { // FIXME: implement return false; } | public boolean renameFile(File oldFile, File newFile) { // FIXME: implement return oldFile.renameTo( newFile ); } | 4,974 |
protected void sort(Vector v) { Collections.sort(v, comparator); Enumeration e = Collections.enumeration(v); Vector tmp = new Vector(); for (; e.hasMoreElements();) tmp.add(e.nextElement()); contents = tmp; } | protected void sort(Vector v) { Collections.sort(v, comparator); Enumeration e = Collections.enumeration(v); Vector tmp = new Vector(); for (; e.hasMoreElements();) tmp.add(e.nextElement()); contents = tmp; } | 4,975 |
public void validateFileCache() { contents.clear(); directories = 0; FileSystemView fsv = filechooser.getFileSystemView(); File[] list = fsv.getFiles(filechooser.getCurrentDirectory(), filechooser.isFileHidingEnabled()); if (list == null) return; for (int i = 0; i... | public void validateFileCache() { contents.clear(); directories = 0; FileSystemView fsv = filechooser.getFileSystemView(); File[] list = fsv.getFiles(filechooser.getCurrentDirectory(), filechooser.isFileHidingEnabled()); if (list == null) return; for (int i = 0; i... | 4,976 |
public void validateFileCache() { contents.clear(); directories = 0; FileSystemView fsv = filechooser.getFileSystemView(); File[] list = fsv.getFiles(filechooser.getCurrentDirectory(), filechooser.isFileHidingEnabled()); if (list == null) return; for (int i = 0; i... | public void validateFileCache() { contents.clear(); directories = 0; FileSystemView fsv = filechooser.getFileSystemView(); File[] list = fsv.getFiles(filechooser.getCurrentDirectory(), filechooser.isFileHidingEnabled()); if (list == null) return; for (int i = 0; i... | 4,977 |
public void validateFileCache() { contents.clear(); directories = 0; FileSystemView fsv = filechooser.getFileSystemView(); File[] list = fsv.getFiles(filechooser.getCurrentDirectory(), filechooser.isFileHidingEnabled()); if (list == null) return; for (int i = 0; i... | public void validateFileCache() { contents.clear(); directories = 0; FileSystemView fsv = filechooser.getFileSystemView(); File[] list = fsv.getFiles(filechooser.getCurrentDirectory(), filechooser.isFileHidingEnabled()); if (list == null) return; for (int i = 0; i... | 4,978 |
public void validateFileCache() { contents.clear(); directories = 0; FileSystemView fsv = filechooser.getFileSystemView(); File[] list = fsv.getFiles(filechooser.getCurrentDirectory(), filechooser.isFileHidingEnabled()); if (list == null) return; for (int i = 0; i... | public void validateFileCache() { contents.clear(); directories = 0; FileSystemView fsv = filechooser.getFileSystemView(); File[] list = fsv.getFiles(filechooser.getCurrentDirectory(), filechooser.isFileHidingEnabled()); if (list == null) return; for (int i = 0; i... | 4,979 |
private String createO(final String aol) throws AuthenticationException { if (DEBUG && debuglevel > 8) debug(TRACE, "==> createO(\"" + aol + "\")"); boolean replaydetectionAvailable = false; boolean integrityAvailable = false; boolean confidentialityAvailable = false; String option, mandatory = S... | private String createO(final String aol) throws AuthenticationException { if (DEBUG && debuglevel > 8) debug(TRACE, "==> createO(\"" + aol + "\")"); boolean replaydetectionAvailable = false; boolean integrityAvailable = false; boolean confidentialityAvailable = false; String option, mandatory = S... | 4,980 |
private byte[] sendIdentities() throws SaslException { if (DEBUG && debuglevel > 8) debug(TRACE, "==> sendIdentities()"); // If necessary, prompt the client for the username and password getUsernameAndPassword(); if (DEBUG && debuglevel > 6) debug(TRACE, "Password: \"" + new String(password.get... | private byte[] sendIdentities() throws SaslException { if (DEBUG && debuglevel > 8) debug(TRACE, "==> sendIdentities()"); // If necessary, prompt the client for the username and password getUsernameAndPassword(); if (DEBUG && debuglevel > 6) debug(TRACE, "Password: \"" + new String(password.get... | 4,981 |
public void revalidate() { invalidate(); RepaintManager.currentManager(this).addInvalidComponent(this); } | public void revalidate() { invalidate(); RepaintManager.currentManager(this).addInvalidComponent(this); } | 4,982 |
public abstract FileLock lock(long position, long size, boolean shared) throws IOException; | public abstract FileLock lock(long position, long size, boolean shared) throws IOException; | 4,984 |
public abstract int read(ByteBuffer dst) throws IOException; | public abstract long read(ByteBuffer[] dsts, int offset, int length) throws IOException; | 4,985 |
public abstract FileLock tryLock(long position, long size, boolean shared) throws IOException; | public abstract FileLock tryLock(long position, long size, boolean shared) throws IOException; | 4,986 |
public abstract int write(ByteBuffer src) throws IOException; | public final long write(ByteBuffer[] srcs) throws IOException { long result = 0; for (int i = 0; i < srcs.length; i++) result += write(srcs[i]); return result; } | 4,987 |
public void propertyChange(PropertyChangeEvent e) { if (e.getPropertyName().equals(JTabbedPane.TAB_LAYOUT_POLICY_CHANGED_PROPERTY)) { layoutManager = createLayoutManager(); tabPane.setLayout(layoutManager); } else if (e.getPropertyName().equals(JTabbedPane.TAB_PLACEMENT_CHANGED_PROPERTY) ... | public void propertyChange(PropertyChangeEvent e) { if (e.getPropertyName().equals("tabLayoutPolicy")) { layoutManager = createLayoutManager(); tabPane.setLayout(layoutManager); } else if (e.getPropertyName().equals(JTabbedPane.TAB_PLACEMENT_CHANGED_PROPERTY) && tabPane.getT... | 4,990 |
public void propertyChange(PropertyChangeEvent e) { if (e.getPropertyName().equals(JTabbedPane.TAB_LAYOUT_POLICY_CHANGED_PROPERTY)) { layoutManager = createLayoutManager(); tabPane.setLayout(layoutManager); } else if (e.getPropertyName().equals(JTabbedPane.TAB_PLACEMENT_CHANGED_PROPERTY) ... | public void propertyChange(PropertyChangeEvent e) { if (e.getPropertyName().equals(JTabbedPane.TAB_LAYOUT_POLICY_CHANGED_PROPERTY)) { layoutManager = createLayoutManager(); tabPane.setLayout(layoutManager); } else if (e.getPropertyName().equals("tabPlacement") && tabPane.get... | 4,991 |
public LayoutManager createLayoutManager() { if (tabPane.getTabLayoutPolicy() == JTabbedPane.WRAP_TAB_LAYOUT) return new TabbedPaneLayout(); else { incrButton = createIncreaseButton(); decrButton = createDecreaseButton(); viewport = new ScrollingViewport(); viewport.setLayout(null); panel = new Scrol... | protected LayoutManager createLayoutManager() { if (tabPane.getTabLayoutPolicy() == JTabbedPane.WRAP_TAB_LAYOUT) return new TabbedPaneLayout(); else { incrButton = createIncreaseButton(); decrButton = createDecreaseButton(); viewport = new ScrollingViewport(); viewport.setLayout(null); panel = new Sc... | 4,992 |
public void addAccessibleSelection(int value0) throws NotImplementedException { // TODO: Implement this properly. } | public void addAccessibleSelection(int value0) throws NotImplementedException { // TODO: Implement this properly. } | 4,993 |
public boolean doAccessibleAction(int value0) throws NotImplementedException { return false; } | public boolean doAccessibleAction(int value0) throws NotImplementedException { return false; } | 4,996 |
public boolean doAccessibleAction(int value0) throws NotImplementedException { return false; } | public boolean doAccessibleAction(int value0) throws NotImplementedException { boolean actionPerformed = false; if (actionIndex == 0) { setPopupVisible(! isPopupVisible()); actionPerformed = true; } return actionPerformed; } | 4,997 |
public AccessibleAction getAccessibleAction() throws NotImplementedException { return null; } | public AccessibleAction getAccessibleAction() { return null; } | 4,998 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.