bugged stringlengths 6 599k | fixed stringlengths 10 599k | __index_level_0__ int64 0 1.13M |
|---|---|---|
public boolean isFocusTraversable() { return !comboBox.isEditable() && comboBox.isEnabled(); } | public boolean isFocusTraversable() { return false; } | 21,072 |
public String getName() { //FIXME: this is supposed to do something different from the super class return super.getName(); } | public String getName() { //FIXME: this is supposed to do something different from the super class return (String) getAttribute(NameAttribute); } | 21,074 |
public HTMLEditorKit.ParserCallback getReader(int pos) { // FIXME: Not implemented. return null; } | public HTMLEditorKit.ParserCallback getReader(int pos) { // FIXME: Not implemented. return new HTMLReader(pos); } | 21,075 |
public void actionPerformed(ActionEvent event) { JTextComponent t = getTextComponent(event); if (t != null) { try { int pos = t.getCaret().getDot(); if (pos < t.getDocument().getEndPosition().getOffset()) { ... | public void actionPerformed(ActionEvent event) { JTextComponent t = getTextComponent(event); if (t != null) { try { int pos = t.getCaret().getDot(); if (pos < t.getDocument().getEndPosition().getOffset()) { ... | 21,077 |
public void actionPerformed(ActionEvent event) { JTextComponent t = getTextComponent(event); if (t != null) { try { int pos = t.getCaret().getDot(); if (pos > t.getDocument().getStartPosition().getOffset()) { ... | public void actionPerformed(ActionEvent event) { JTextComponent t = getTextComponent(event); if (t != null) { try { int pos = t.getCaret().getDot(); if (pos > t.getDocument().getStartPosition().getOffset()) { ... | 21,078 |
public void actionPerformed(ActionEvent event) { JTextComponent t = getTextComponent(event); if (t != null) { try { int pos = t.getCaret().getDot(); if (pos > t.getDocument().getStartPosition().getOffset()) { ... | public void actionPerformed(ActionEvent event) { JTextComponent t = getTextComponent(event); if (t != null) { try { int pos = t.getCaret().getDot(); if (pos > t.getDocument().getStartPosition().getOffset()) { ... | 21,079 |
public boolean isValid () { return channel().isOpen(); } | public boolean isValid () { if (valid) valid = channel().isOpen(); return valid; } | 21,080 |
public synchronized void release () throws IOException { ch.unlock(position(), size()); } | public void release() throws IOException { ch.unlock(position(), size()); } | 21,081 |
public synchronized void release () throws IOException { ch.unlock(position(), size()); } | public synchronized void release () throws IOException { if (isValid()) { valid = false; ((FileChannelImpl) channel()).unlock(position(), size()); } } | 21,082 |
protected DropTarget.DropTargetAutoScroller createDropTargetAutoScroller (Component c, Point p) { return null; } | protected DropTarget.DropTargetAutoScroller createDropTargetAutoScroller (Component c, Point p) { return new DropTarget.DropTargetAutoScroller (c, p); } | 21,087 |
protected DropTargetContext createDropTargetContext() { return null; } | protected DropTargetContext createDropTargetContext() { return new DropTargetContext (this); } | 21,088 |
public int getDefaultActions () { return 0; } | public int getDefaultActions () { return actions; } | 21,089 |
public DropTargetContext getDropTargetContext() { return null; } | public DropTargetContext getDropTargetContext() { if (dropTargetContext == null) dropTargetContext = createDropTargetContext (); return dropTargetContext; } | 21,090 |
public boolean isActive() { return this.isActive; } | public boolean isActive() { return active; } | 21,091 |
public void setActive(boolean isActive) { this.isActive = isActive; } | public void setActive (boolean active) { this.isActive = isActive; } | 21,093 |
public void setActive(boolean isActive) { this.isActive = isActive; } | public void setActive(boolean isActive) { this.active = active; } | 21,094 |
GapContentPosition(int mark) { this.mark = mark; } | GapContentPosition(int mark) { synchronized (GapContent.this) { int i = binarySearch(positionMarks, mark, numMarks); if (i >= 0) { index = i; } else { index = -i - 1; insertMark(index, mark); } } } | 21,098 |
public int getOffset() { // Check precondition. assert mark <= gapStart || mark >= gapEnd : "mark: " + mark + ", gapStart: " + gapStart + ", gapEnd: " + gapEnd; if (mark <= gapStart) return mark; ... | public int getOffset() { // Check precondition. assert mark <= gapStart || mark >= gapEnd : "mark: " + mark + ", gapStart: " + gapStart + ", gapEnd: " + gapEnd; if (mark <= gapStart) return mark; ... | 21,099 |
private void adjustPositionsInRange(int offset, int length, int incr) { int endOffset = offset + length; int index1 = Collections.binarySearch(positions, new GapContentPosition(offset), new WeakPositionComparator()); if (index... | private void adjustPositionsInRange(int offset, int length, int incr) { int endMark = offset + length; int index1 = Collections.binarySearch(positions, new GapContentPosition(offset), new WeakPositionComparator()); if (index1 ... | 21,100 |
private void adjustPositionsInRange(int offset, int length, int incr) { int endOffset = offset + length; int index1 = Collections.binarySearch(positions, new GapContentPosition(offset), new WeakPositionComparator()); if (index... | private void adjustPositionsInRange(int offset, int length, int incr) { int endOffset = offset + length; int index1 = Collections.binarySearch(positions, new GapContentPosition(offset), new WeakPositionComparator()); if (index... | 21,101 |
private void adjustPositionsInRange(int offset, int length, int incr) { int endOffset = offset + length; int index1 = Collections.binarySearch(positions, new GapContentPosition(offset), new WeakPositionComparator()); if (index... | private void adjustPositionsInRange(int offset, int length, int incr) { int endOffset = offset + length; int index1 = Collections.binarySearch(positions, new GapContentPosition(offset), new WeakPositionComparator()); if (index... | 21,102 |
private void adjustPositionsInRange(int offset, int length, int incr) { int endOffset = offset + length; int index1 = Collections.binarySearch(positions, new GapContentPosition(offset), new WeakPositionComparator()); if (index... | private void adjustPositionsInRange(int offset, int length, int incr) { int endOffset = offset + length; int index1 = Collections.binarySearch(positions, new GapContentPosition(offset), new WeakPositionComparator()); if (index... | 21,103 |
public Position createPosition(final int offset) throws BadLocationException { if (offset < 0 || offset > length()) throw new BadLocationException("The offset was out of the bounds of this" + " buffer", offset); clearPositionReferences(); // We store the actual array index in the GapContentPos... | public Position createPosition(final int offset) throws BadLocationException { if (offset < 0 || offset > length()) throw new BadLocationException("The offset was out of the bounds of this" + " buffer", offset); clearPositionReferences(); // We store the actual array index in the GapContentPos... | 21,104 |
public Position createPosition(final int offset) throws BadLocationException { if (offset < 0 || offset > length()) throw new BadLocationException("The offset was out of the bounds of this" + " buffer", offset); clearPositionReferences(); // We store the actual array index in the GapContentPos... | public Position createPosition(final int offset) throws BadLocationException { if (offset < 0 || offset > length()) throw new BadLocationException("The offset was out of the bounds of this" + " buffer", offset); if (pos == null) { int mark = offset; if (mark >= gapStart) mark += (gapEnd - gapStar... | 21,105 |
public Position createPosition(final int offset) throws BadLocationException { if (offset < 0 || offset > length()) throw new BadLocationException("The offset was out of the bounds of this" + " buffer", offset); clearPositionReferences(); // We store the actual array index in the GapContentPos... | public Position createPosition(final int offset) throws BadLocationException { if (offset < 0 || offset > length()) throw new BadLocationException("The offset was out of the bounds of this" + " buffer", offset); clearPositionReferences(); // We store the actual array index in the GapContentPos... | 21,106 |
protected Vector getPositionsInRange(Vector v, int offset, int length) { Vector res = v; if (res == null) res = new Vector(); else res.clear(); int endOffset = offset + length; int index1 = Collections.binarySearch(positions, new GapContentPosition(of... | protected Vector getPositionsInRange(Vector v, int offset, int length) { Vector res = v; if (res == null) res = new Vector(); else res.clear(); int endOffs = offset + length; int index1 = Collections.binarySearch(positions, new GapContentPosition(offs... | 21,107 |
protected Vector getPositionsInRange(Vector v, int offset, int length) { Vector res = v; if (res == null) res = new Vector(); else res.clear(); int endOffset = offset + length; int index1 = Collections.binarySearch(positions, new GapContentPosition(of... | protected Vector getPositionsInRange(Vector v, int offset, int length) { Vector res = v; if (res == null) res = new Vector(); else res.clear(); int endOffset = offset + length; int index1 = Collections.binarySearch(positions, new GapContentPosition(of... | 21,108 |
protected Vector getPositionsInRange(Vector v, int offset, int length) { Vector res = v; if (res == null) res = new Vector(); else res.clear(); int endOffset = offset + length; int index1 = Collections.binarySearch(positions, new GapContentPosition(of... | protected Vector getPositionsInRange(Vector v, int offset, int length) { Vector res = v; if (res == null) res = new Vector(); else res.clear(); int endOffset = offset + length; int index1 = Collections.binarySearch(positions, new GapContentPosition(of... | 21,109 |
protected Vector getPositionsInRange(Vector v, int offset, int length) { Vector res = v; if (res == null) res = new Vector(); else res.clear(); int endOffset = offset + length; int index1 = Collections.binarySearch(positions, new GapContentPosition(of... | protected Vector getPositionsInRange(Vector v, int offset, int length) { Vector res = v; if (res == null) res = new Vector(); else res.clear(); int endOffset = offset + length; int index1 = Collections.binarySearch(positions, new GapContentPosition(of... | 21,110 |
protected void resetMarksAtZero() { if (gapStart != 0) return; setPositionsInRange(gapEnd, 0, 0); } | protected void resetMarksAtZero() { if (gapStart != 0) return; positionMarks[0] = 0; } | 21,111 |
private void setPositionsInRange(int offset, int length, int value) { int endOffset = offset + length; int index1 = Collections.binarySearch(positions, new GapContentPosition(offset), new WeakPositionComparator()); if (index1 ... | private void setPositionsInRange(int start, int end, boolean toStart) { int endOffset = offset + length; int index1 = Collections.binarySearch(positions, new GapContentPosition(offset), new WeakPositionComparator()); if (index... | 21,112 |
private void setPositionsInRange(int offset, int length, int value) { int endOffset = offset + length; int index1 = Collections.binarySearch(positions, new GapContentPosition(offset), new WeakPositionComparator()); if (index1 ... | private void setPositionsInRange(int offset, int length, int value) { int index1 = Collections.binarySearch(positions, new GapContentPosition(offset), new WeakPositionComparator()); if (index1 < 0) index1 = -(index1 + 1)... | 21,113 |
private void setPositionsInRange(int offset, int length, int value) { int endOffset = offset + length; int index1 = Collections.binarySearch(positions, new GapContentPosition(offset), new WeakPositionComparator()); if (index1 ... | private void setPositionsInRange(int offset, int length, int value) { int endOffset = offset + length; int index1 = Collections.binarySearch(positions, new GapContentPosition(offset), new WeakPositionComparator()); if (index1 ... | 21,114 |
private void setPositionsInRange(int offset, int length, int value) { int endOffset = offset + length; int index1 = Collections.binarySearch(positions, new GapContentPosition(offset), new WeakPositionComparator()); if (index1 ... | private void setPositionsInRange(int offset, int length, int value) { int endOffset = offset + length; int index1 = Collections.binarySearch(positions, new GapContentPosition(offset), new WeakPositionComparator()); if (index1 ... | 21,115 |
private void setPositionsInRange(int offset, int length, int value) { int endOffset = offset + length; int index1 = Collections.binarySearch(positions, new GapContentPosition(offset), new WeakPositionComparator()); if (index1 ... | private void setPositionsInRange(int offset, int length, int value) { int endOffset = offset + length; int index1 = Collections.binarySearch(positions, new GapContentPosition(offset), new WeakPositionComparator()); if (index1 ... | 21,116 |
private void setPositionsInRange(int offset, int length, int value) { int endOffset = offset + length; int index1 = Collections.binarySearch(positions, new GapContentPosition(offset), new WeakPositionComparator()); if (index1 ... | private void setPositionsInRange(int offset, int length, int value) { int endOffset = offset + length; int index1 = Collections.binarySearch(positions, new GapContentPosition(offset), new WeakPositionComparator()); if (index1 ... | 21,117 |
private void setPositionsInRange(int offset, int length, int value) { int endOffset = offset + length; int index1 = Collections.binarySearch(positions, new GapContentPosition(offset), new WeakPositionComparator()); if (index1 ... | private void setPositionsInRange(int offset, int length, int value) { int endOffset = offset + length; int index1 = Collections.binarySearch(positions, new GapContentPosition(offset), new WeakPositionComparator()); if (index1 ... | 21,118 |
protected void shiftGapEndUp(int newGapEnd) { if (newGapEnd == gapEnd) return; assert newGapEnd > gapEnd : "The new gap end must be greater than the " + "old gap end."; setPositionsInRange(gapEnd, newGapEnd - gapEnd, newGapEnd); gapEnd = newGapEnd; } | protected void shiftGapEndUp(int newGapEnd) { if (newGapEnd == gapEnd) return; assert newGapEnd > gapEnd : "The new gap end must be greater than the " + "old gap end."; setPositionsInRange(gapEnd, newGapEnd, false); gapEnd = newGapEnd; } | 21,119 |
protected void shiftGapStartDown(int newGapStart) { if (newGapStart == gapStart) return; assert newGapStart < gapStart : "The new gap start must be less than the " + "old gap start."; setPositionsInRange(newGapStart, gapStart - newGapStart, gapStart); gapStart = ne... | protected void shiftGapStartDown(int newGapStart) { if (newGapStart == gapStart) return; assert newGapStart < gapStart : "The new gap start must be less than the " + "old gap start."; setPositionsInRange(newGapStart, gapStart, false); gapStart = newGapStart; } | 21,120 |
public void paintIcon(Component c, Graphics g, int x, int y) { boolean enabled = false; boolean focus = false; if (c != null) { enabled = c.isEnabled(); focus = c.hasFocus(); } // draw the outline if (enabled) g.setColor(MetalLookAndFeel... | public void paintIcon(Component c, Graphics g, int x, int y) { boolean enabled = false; boolean focus = false; if (c != null) { enabled = c.isEnabled(); focus = c.hasFocus(); } // draw the outline if (enabled) g.setColor(MetalLookAndFeel... | 21,123 |
public void paintIcon(Component c, Graphics g, int x, int y) { if (UIManager.get("RadioButton.gradient") != null) MetalUtils.paintGradient(g, x, y, getIconWidth(), getIconHeight(), SwingConstants.VERTICAL, "RadioButton.gradient"); Color savedColor = g.getColor(); ... | public void paintIcon(Component c, Graphics g, int x, int y) { if (UIManager.get("RadioButton.gradient") != null) MetalUtils.paintGradient(g, x, y, getIconWidth(), getIconHeight(), SwingConstants.VERTICAL, "RadioButton.gradient"); Color savedColor = g.getColor(); ... | 21,124 |
public void paintIcon(Component c, Graphics g, int x, int y) { boolean enabled = false; boolean focus = false; if (c != null) { enabled = c.isEnabled(); focus = c.hasFocus(); } // draw the outline if (enabled) g.setColor(MetalLookAndFeel... | public void paintIcon(Component c, Graphics g, int x, int y) { boolean enabled = false; boolean focus = false; if (c != null) { enabled = c.isEnabled(); focus = c.hasFocus(); } // draw the outline if (enabled && ! (MetalLookAndFeel.getCurrentThe... | 21,126 |
public void activate (Applet applet); | void activate (Applet applet); | 21,127 |
public void initialize (Applet applet, BeanContext context); | void initialize (Applet applet, BeanContext context); | 21,128 |
public DragSource() { if (GraphicsEnvironment.isHeadless()) throw new HeadlessException (); } | public DragSource() { if (GraphicsEnvironment.isHeadless()) { ds = null; throw new HeadlessException(); } } | 21,129 |
createDefaultDragGestureRecognizer(Component c, int actions, DragGestureListener dgl) { return createDragGestureRecognizer (MouseDragGestureRecognizer.class, c, actions, dgl); } | public DragGestureRecognizer createDefaultDragGestureRecognizer(Component c, int actions, DragGestureListener dgl) { return createDragGestureRecognizer (MouseDragGestureRecognizer.class, c, actions, dgl); } | 21,130 |
createDragGestureRecognizer(Class recognizer, Component c, int actions, DragGestureListener dgl) { DragGestureRecognizer dgr; dgr = Toolkit.getDefaultToolkit () .createDragGestureRecognizer (recognizer, this, c, actions, ... | public DragGestureRecognizer createDragGestureRecognizer(Class recognizer, Component c, int actions, DragGestureListener dgl) { DragGestureRecognizer dgr; dgr = Toolkit.getDefaultToolkit () .createDragGestureRecognizer (recognizer, this, c, actions, ... | 21,131 |
createDragGestureRecognizer(Class recognizer, Component c, int actions, DragGestureListener dgl) { DragGestureRecognizer dgr; dgr = Toolkit.getDefaultToolkit () .createDragGestureRecognizer (recognizer, this, c, actions, ... | createDragGestureRecognizer(Class recognizer, Component c, int actions, DragGestureListener dgl) { DragGestureRecognizer dgr; dgr = Toolkit.getDefaultToolkit () .createDragGestureRecognizer (recognizer, this, c, actions, ... | 21,132 |
createDragSourceContext(DragSourceContextPeer peer, DragGestureEvent dge, Cursor cursor, Image image, Point offset, Transferable t, DragSourceListener dsl) { return null; } | createDragSourceContext(DragSourceContextPeer peer, DragGestureEvent dge, Cursor cursor, Image image, Point offset, Transferable t, DragSourceListener dsl) { return new DragSourceContext(peer, dge, cursor, image, offset, t, dsl); } | 21,133 |
public static DragSource getDefaultDragSource() { return new DragSource(); } | public static DragSource getDefaultDragSource() { if (GraphicsEnvironment.isHeadless()) { ds = null; throw new HeadlessException(); } if (ds == null) ds = new DragSource(); return ds; } | 21,134 |
public void setup(Map attributes) { // find out which hash to use String underlyingMD = (String) attributes.get(MD_NAME); if (underlyingMD == null) { if (md == null) { // happy birthday // ensure we have a reliable implementation of this hash md = HashFactory.getIn... | public void setup(Map attributes) { // find out which hash to use String underlyingMD = (String) attributes.get(MD_NAME); if (underlyingMD == null) { if (md == null) { // happy birthday // ensure we have a reliable implementation of this hash md = HashFactory.getIn... | 21,136 |
public void setup(Map attributes) { // find out which hash to use String underlyingMD = (String) attributes.get(MD_NAME); if (underlyingMD == null) { if (md == null) { // happy birthday // ensure we have a reliable implementation of this hash md = HashFactory.getIn... | public void setup(Map attributes) { // find out which hash to use String underlyingMD = (String) attributes.get(MD_NAME); if (underlyingMD == null) { if (md == null) { // happy birthday // ensure we have a reliable implementation of this hash md = HashFactory.getIn... | 21,137 |
public void setup(Map attributes) { // find out which hash to use String underlyingMD = (String) attributes.get(MD_NAME); if (underlyingMD == null) { if (md == null) { // happy birthday // ensure we have a reliable implementation of this hash md = HashFactory.getIn... | public void setup(Map attributes) { // find out which hash to use String underlyingMD = (String) attributes.get(MD_NAME); if (underlyingMD == null) { if (md == null) { // happy birthday // ensure we have a reliable implementation of this hash md = HashFactory.getIn... | 21,138 |
public void setup(Map attributes) { // find out which hash to use String underlyingMD = (String) attributes.get(MD_NAME); if (underlyingMD == null) { if (md == null) { // happy birthday // ensure we have a reliable implementation of this hash md = HashFactory.getIn... | public void setup(Map attributes) // find out which hash to use String underlyingMD = (String) attributes.get(MD_NAME); if (underlyingMD == null) if (md == null) // happy birthday // ensure we have a reliable implementation of this hash md = HashFactory.getInsta... | 21,139 |
protected EnumSyntax[] getEnumValueTable() { // FIXME return (EnumSyntax[])null; } | protected EnumSyntax[] getEnumValueTable() { // FIXME return enumValueTable; } | 21,140 |
protected String[] getStringTable() { // FIXME return (String[])null; } | protected String[] getStringTable() { // FIXME return stringTable; } | 21,141 |
public void drawText(Graphics2D g, String text, Font font, int x, int y) { FontProvider prv = getProvider(font); Font txFont = font; if (prv == null) { txFont = getTranslatedFont(font); prv = getProvider(txFont); } if (prv != null) { final TextRenderer r... | public void drawText(Surface g, AffineTransform tx, String text, Font font, int x, int y, Color color) { FontProvider prv = getProvider(font); Font txFont = font; if (prv == null) { txFont = getTranslatedFont(font); prv = getProvider(txFont); } if (prv != null) ... | 21,142 |
public void drawText(Graphics2D g, String text, Font font, int x, int y) { FontProvider prv = getProvider(font); Font txFont = font; if (prv == null) { txFont = getTranslatedFont(font); prv = getProvider(txFont); } if (prv != null) { final TextRenderer r... | public void drawText(Graphics2D g, String text, Font font, int x, int y) { FontProvider prv = getProvider(font); Font txFont = font; if (prv == null) { txFont = getTranslatedFont(font); prv = getProvider(txFont); } if (prv != null) { final TextRenderer r... | 21,143 |
static BeanInfo reallyFindExplicitBeanInfo(Class beanClass) { try { try { return (BeanInfo) Class.forName(beanClass.getName() + "BeanInfo").newInstance(); } catch (ClassNotFoundException E) { } String newName = ClassHelper.getTruncatedClassName(beanClass) + "BeanInfo"; for (int i = 0; i < Introspector.be... | static BeanInfo reallyFindExplicitBeanInfo(Class beanClass) { try { try { return (BeanInfo) Class.forName(beanClass.getName() + "BeanInfo").newInstance(); } catch (ClassNotFoundException E) { } String newName = ClassHelper.getTruncatedClassName(beanClass) + "BeanInfo"; for (int i = 0; i < Introspector.be... | 21,144 |
public static String decapitalize(String name) { try { if (!Character.isUpperCase(name.charAt(0))) { return name; } else { try { if (Character.isUpperCase(name.charAt(1))) { return name; } else { char[] c = name.toCharArray(); c[0] = Character.toLowerCase(c[0]); return new String... | public static String decapitalize(String name) { try { if (!Character.isUpperCase(name.charAt(0))) { return name; } else { try { if (Character.isUpperCase(name.charAt(1))) { return name; } else { char[] c = name.toCharArray(); c[0] = Character.toLowerCase(c[0]); return new String... | 21,145 |
void doParse(Node node, boolean root) throws TransformerConfigurationException { try { String namespaceUri = node.getNamespaceURI(); if (XSL_NS.equals(namespaceUri) && node.getNodeType() == Node.ELEMENT_NODE) { String name = node.getLocalName(); Name... | void doParse(Node node, boolean root) throws TransformerConfigurationException { try { String namespaceUri = node.getNamespaceURI(); if (XSL_NS.equals(namespaceUri) && node.getNodeType() == Node.ELEMENT_NODE) { String name = node.getLocalName(); Name... | 21,147 |
final Template parseTemplate(Node node, NamedNodeMap attrs) throws TransformerConfigurationException, XPathExpressionException { String n = getAttribute(attrs, "name"); QName name = (n == null) ? null : getQName(n); String m = getAttribute(attrs, "match"); Pattern match = null; if (m != null) ... | final Template parseTemplate(Node node, NamedNodeMap attrs) throws TransformerConfigurationException, XPathExpressionException { String n = getAttribute(attrs, "name"); QName name = (n == null) ? null : getQName(n); String m = getAttribute(attrs, "match"); Pattern match = null; if (m != null) ... | 21,148 |
final Template parseTemplate(Node node, NamedNodeMap attrs) throws TransformerConfigurationException, XPathExpressionException { String n = getAttribute(attrs, "name"); QName name = (n == null) ? null : getQName(n); String m = getAttribute(attrs, "match"); Pattern match = null; if (m != null) ... | final Template parseTemplate(Node node, NamedNodeMap attrs) throws TransformerConfigurationException, XPathExpressionException { String n = getAttribute(attrs, "name"); QName name = (n == null) ? null : getQName(n); String m = getAttribute(attrs, "match"); Pattern match = null; if (m != null) ... | 21,149 |
private void readEntries(Preferences node) throws InvalidPreferencesFormatException, IOException { while ("entry".equals(nextTag())) { skipTill("<entry"); skipTill("key=\""); String key = readTill("\""); skipTill("value=\""); String... | private void readEntries(Preferences node) throws InvalidPreferencesFormatException, IOException { while ("entry".equals(nextTag())) { skipTill("<entry"); skipTill("key=\""); String key = readTill("\""); skipTill("value=\""); String... | 21,150 |
private void readNodes(Preferences node) throws InvalidPreferencesFormatException, IOException { while ("node".equals(nextTag())) { skipTill("<node"); skipTill("name=\""); String name = readTill("\""); Preferences subnode = node.node(name); ... | private void readNodes(Preferences node) throws InvalidPreferencesFormatException, IOException { while ("node".equals(nextTag())) { skipTill("<node"); skipTill("name=\""); String name = readTill("\""); Preferences subnode = node.node(name); ... | 21,151 |
static RawData adjustAddress(RawData address, int offset) { final MemoryResource res = ((MemoryRawData)address).resource; final Extent size = res.getSize().sub(offset); try { return new MemoryRawData(res.claimChildResource(Offset.fromIntZeroExtend(offset), size, true)); } catch (ResourceNotFreeException ex) { ... | static Pointer adjustAddress(Pointer address, int offset) { final MemoryResource res = ((MemoryRawData)address).resource; final Extent size = res.getSize().sub(offset); try { return new MemoryRawData(res.claimChildResource(Offset.fromIntZeroExtend(offset), size, true)); } catch (ResourceNotFreeException ex) { ... | 21,152 |
static RawData allocate(int capacity) { return new MemoryRawData(capacity); } | static Pointer allocate(int capacity) { return new MemoryRawData(capacity); } | 21,153 |
static void free(RawData address) { ((MemoryRawData)address).resource.release(); } | static void free(Pointer address) { ((MemoryRawData)address).resource.release(); } | 21,154 |
static byte get(RawData address, int index) { final MemoryRawData mrd = (MemoryRawData)address; final byte value = mrd.address.loadByte(Offset.fromIntZeroExtend(index)); return value; } | static byte get(Pointer address, int index) { final MemoryRawData mrd = (MemoryRawData)address; final byte value = mrd.address.loadByte(Offset.fromIntZeroExtend(index)); return value; } | 21,155 |
static void put(RawData address, int index, byte value) { ((MemoryRawData)address).resource.setByte(index, value); } | static void put(Pointer address, int index, byte value) { ((MemoryRawData)address).resource.setByte(index, value); } | 21,156 |
static void shiftDown(RawData address, int dst_offset, int src_offset, int count) { ((MemoryRawData)address).resource.copy(src_offset, dst_offset, count); } | static void shiftDown(Pointer address, int dst_offset, int src_offset, int count) { ((MemoryRawData)address).resource.copy(src_offset, dst_offset, count); } | 21,157 |
public static ByteBuffer wrap(MemoryResource resource) { final Object owner = resource.getOwner(); final RawData address = new MemoryRawData(resource); final int size = resource.getSize().toInt(); final ByteBuffer result = new DirectByteBufferImpl.ReadWrite(owner, address, size, size, 0)... | public static ByteBuffer wrap(MemoryResource resource) { final Object owner = resource.getOwner(); final Pointer address = new MemoryRawData(resource); final int size = resource.getSize().toInt(); final ByteBuffer result = new DirectByteBufferImpl.ReadWrite(owner, address, size, size, 0)... | 21,158 |
public static void main(String[] args) throws Exception { final String className = (args.length > 0) ? args[0] : "java.lang.Object"; final VmClassLoader loader = new VmClassLoader(new File(".").toURL(), new VmX86Architecture()); final VmType vmClass = loader.loadClass(className, true); for (int i = 0; i < vmCla... | public static void main(String[] args) throws Exception { final String className = (args.length > 0) ? args[0] : "java.lang.Object"; final VmSystemClassLoader loader = new VmSystemClassLoader(new File(".").toURL(), new VmX86Architecture()); final VmType vmClass = loader.loadClass(className, true); for (int i = ... | 21,159 |
protected void init(String text, Icon icon) { this.text = text; default_icon = icon; model = new DefaultButtonModel(); actionListener = createActionListener(); changeListener = createChangeListener(); itemListener = createItemListener(); model.addActionListener(actionListener); model.addChange... | protected void init(String text, Icon icon) { this.text = text; default_icon = icon; actionListener = createActionListener(); changeListener = createChangeListener(); itemListener = createItemListener(); model.addActionListener(actionListener); model.addChangeListener(changeListener); mode... | 21,160 |
protected void init(String text, Icon icon) { this.text = text; default_icon = icon; model = new DefaultButtonModel(); actionListener = createActionListener(); changeListener = createChangeListener(); itemListener = createItemListener(); model.addActionListener(actionListener); model.addChange... | protected void init(String text, Icon icon) { this.text = text; default_icon = icon; model = new DefaultButtonModel(); actionListener = createActionListener(); changeListener = createChangeListener(); itemListener = createItemListener(); model.addActionListener(actionListener); model.addChange... | 21,161 |
protected AbstractGraphics2D() { transform = new AffineTransform(); background = Color.WHITE; composite = AlphaComposite.SrcOver; stroke = new BasicStroke(); renderingHints = new RenderingHints(RenderingHints.KEY_RENDERING, RenderingHints.VALUE_RENDER_DEFAULT); ... | protected AbstractGraphics2D() { transform = new AffineTransform(); background = Color.WHITE; composite = AlphaComposite.SrcOver; stroke = new BasicStroke(); renderingHints = new RenderingHints(RenderingHints.KEY_RENDERING, RenderingHints.VALUE_RENDER_DEFAULT); ... | 21,162 |
public void draw(Shape shape) { // Clip the shape. Shape clipped = clipShape(shape); if (clipped != null) { // Stroke the shape. Shape strokedShape = stroke.createStrokedShape(clipped); // Fill the shape. fillShape(strokedShape); } } | public void draw(Shape shape) { // Clip the shape. Shape clipped = clipShape(shape); if (clipped != null) { // Stroke the shape. Shape strokedShape = stroke.createStrokedShape(clipped); // Fill the shape. fillShape(strokedShape); } } | 21,164 |
public void draw(Shape shape) { // Clip the shape. Shape clipped = clipShape(shape); if (clipped != null) { // Stroke the shape. Shape strokedShape = stroke.createStrokedShape(clipped); // Fill the shape. fillShape(strokedShape); } } | public void draw(Shape shape) { // Clip the shape. Shape clipped = clipShape(shape); if (clipped != null) { // Stroke the shape. Shape strokedShape = stroke.createStrokedShape(clipped); // Fill the shape. fillShape(strokedShape); } } | 21,165 |
public void drawGlyphVector(GlyphVector gv, float x, float y) { int numGlyphs = gv.getNumGlyphs(); AffineTransform t = new AffineTransform(); t.translate(x, y); // TODO: We could use fill(gv.getOutline()), but that doesn't seem // to work yet with the font infrastructure I use. for (int i = 0; i < ... | public void drawGlyphVector(GlyphVector gv, float x, float y) { int numGlyphs = gv.getNumGlyphs(); AffineTransform t = new AffineTransform(); t.translate(x, y); // TODO: We could use fill(gv.getOutline()), but that doesn't seem // to work yet with the font infrastructure I use. for (int i = 0; i < ... | 21,166 |
public void drawLine(int x1, int y1, int x2, int y2) { if (isOptimized) rawDrawLine(x1, y1, x2, y2); else { Line2D line = new Line2D.Double(x1, y1, x2, y2); draw(line); } } | public void drawLine(int x1, int y1, int x2, int y2) { if (isOptimized) { int tx = (int) transform.getTranslateX(); int ty = (int) transform.getTranslateY(); rawDrawLine(x1 + tx, y1 + ty, x2 + tx, y2 + ty); } else { Line2D line = new Line2D.Double(x1, y1, x2, y2); draw(line); } } | 21,167 |
public void fill(Shape shape) { Shape clipped = clipShape(shape); if (clipped != null) fillShape(shape); } | public void fill(Shape shape) { Shape clipped = clipShape(shape); if (clipped != null) fillShape(shape); } | 21,168 |
public void fillRect(int x, int y, int width, int height) { if (isOptimized) rawFillRect(x, y, width, height); else { fill(new Rectangle(x, y, width, height)); } } | public void fillRect(int x, int y, int width, int height) { if (isOptimized) { int tx = (int) transform.getTranslateX(); int ty = (int) transform.getTranslateY(); rawFillRect(x + tx, y + ty, width, height); } else { fill(new Rectangle(x, y, width, height)); } } | 21,169 |
protected void fillScanline(int x0, int x1, int y) { for (int x = x0; x < x1; x++) drawPixel(x, y); } | protected void fillScanline(PaintContext pCtx, int x0, int x1, int y) { for (int x = x0; x < x1; x++) drawPixel(x, y); } | 21,170 |
protected void fillScanline(int x0, int x1, int y) { for (int x = x0; x < x1; x++) drawPixel(x, y); } | protected void fillScanline(int x0, int x1, int y) { for (int x = x0; x < x1; x++) drawPixel(x, y); } | 21,171 |
protected void fillShape(Shape s) { PathIterator path = s.getPathIterator(getTransform(), 1.0); // Build up polygons and let the native backend render this using // rawFillPolygon() which would provide a default implementation for // drawPixel using a PolyScan algorithm. double[] seg = new double[6]; ... | protected void fillShape(Shape s, boolean isFont) { PathIterator path = s.getPathIterator(getTransform(), 1.0); // Build up polygons and let the native backend render this using // rawFillPolygon() which would provide a default implementation for // drawPixel using a PolyScan algorithm. double[] seg =... | 21,172 |
protected void fillShape(Shape s) { PathIterator path = s.getPathIterator(getTransform(), 1.0); // Build up polygons and let the native backend render this using // rawFillPolygon() which would provide a default implementation for // drawPixel using a PolyScan algorithm. double[] seg = new double[6]; ... | protected void fillShape(Shape s) { PathIterator path = s.getPathIterator(getTransform(), 1.0); // Build up polygons and let the native backend render this using // rawFillPolygon() which would provide a default implementation for // drawPixel using a PolyScan algorithm. double[] seg = new double[6]; ... | 21,173 |
public Rectangle getClipBounds() { return clip.getBounds(); } | public Rectangle getClipBounds() { Rectangle b = null; if (clip != null) b = clip.getBounds(); return b; } | 21,174 |
protected abstract Rectangle getDeviceBounds(); | protected Rectangle getDeviceBounds() { return destinationRaster.getBounds(); } | 21,175 |
protected void rawFillShape(ArrayList segs, double minX, double minY, double maxX, double maxY) { // This is an implementation of a polygon scanline conversion algorithm // described here: // http://www.cs.berkeley.edu/~ug/slide/pipeline/assignments/scan/ // Create table of a... | protected void rawFillShape(ArrayList segs, double minX, double minY, double maxX, double maxY, Rectangle2D userBounds) { // This is an implementation of a polygon scanline conversion algorithm // described here: // http://www.cs.berkeley.edu/~ug/slide/pipeline/assignments/scan/... | 21,177 |
protected void rawFillShape(ArrayList segs, double minX, double minY, double maxX, double maxY) { // This is an implementation of a polygon scanline conversion algorithm // described here: // http://www.cs.berkeley.edu/~ug/slide/pipeline/assignments/scan/ // Create table of a... | protected void rawFillShape(ArrayList segs, double minX, double minY, double maxX, double maxY) { // This is an implementation of a polygon scanline conversion algorithm // described here: // http://www.cs.berkeley.edu/~ug/slide/pipeline/assignments/scan/ // Create table of a... | 21,178 |
protected void rawFillShape(ArrayList segs, double minX, double minY, double maxX, double maxY) { // This is an implementation of a polygon scanline conversion algorithm // described here: // http://www.cs.berkeley.edu/~ug/slide/pipeline/assignments/scan/ // Create table of a... | protected void rawFillShape(ArrayList segs, double minX, double minY, double maxX, double maxY) { // This is an implementation of a polygon scanline conversion algorithm // described here: // http://www.cs.berkeley.edu/~ug/slide/pipeline/assignments/scan/ // Create table of a... | 21,179 |
protected void rawFillShape(ArrayList segs, double minX, double minY, double maxX, double maxY) { // This is an implementation of a polygon scanline conversion algorithm // described here: // http://www.cs.berkeley.edu/~ug/slide/pipeline/assignments/scan/ // Create table of a... | protected void rawFillShape(ArrayList segs, double minX, double minY, double maxX, double maxY) { // This is an implementation of a polygon scanline conversion algorithm // described here: // http://www.cs.berkeley.edu/~ug/slide/pipeline/assignments/scan/ // Create table of a... | 21,180 |
protected void rawFillShape(ArrayList segs, double minX, double minY, double maxX, double maxY) { // This is an implementation of a polygon scanline conversion algorithm // described here: // http://www.cs.berkeley.edu/~ug/slide/pipeline/assignments/scan/ // Create table of a... | protected void rawFillShape(ArrayList segs, double minX, double minY, double maxX, double maxY) { // This is an implementation of a polygon scanline conversion algorithm // described here: // http://www.cs.berkeley.edu/~ug/slide/pipeline/assignments/scan/ // Create table of a... | 21,181 |
protected void rawFillShape(ArrayList segs, double minX, double minY, double maxX, double maxY) { // This is an implementation of a polygon scanline conversion algorithm // described here: // http://www.cs.berkeley.edu/~ug/slide/pipeline/assignments/scan/ // Create table of a... | protected void rawFillShape(ArrayList segs, double minX, double minY, double maxX, double maxY) { // This is an implementation of a polygon scanline conversion algorithm // described here: // http://www.cs.berkeley.edu/~ug/slide/pipeline/assignments/scan/ // Create table of a... | 21,182 |
protected void rawFillShape(ArrayList segs, double minX, double minY, double maxX, double maxY) { // This is an implementation of a polygon scanline conversion algorithm // described here: // http://www.cs.berkeley.edu/~ug/slide/pipeline/assignments/scan/ // Create table of a... | protected void rawFillShape(ArrayList segs, double minX, double minY, double maxX, double maxY) { // This is an implementation of a polygon scanline conversion algorithm // described here: // http://www.cs.berkeley.edu/~ug/slide/pipeline/assignments/scan/ // Create table of a... | 21,183 |
protected abstract void rawSetForeground(Color c); | protected void rawSetForeground(Color c) { } | 21,185 |
protected abstract void rawSetPixel(int x, int y); | protected void rawSetPixel(int x, int y) { } | 21,186 |
public void setComposite(Composite comp) { composite = comp; compositeContext = composite.createContext(getColorModel(), getDestinationColorModel(), renderingHints); if (! (comp.equals(AlphaComposite.SrcOver))) ... | public void setComposite(Composite comp) { composite = comp; compositeContext = composite.createContext(getColorModel(), getDestinationColorModel(), renderingHints); if (! (comp.equals(AlphaComposite.SrcOver))) ... | 21,187 |
public void setPaint(Paint p) { paint = p; if (paint != null && ! (paint instanceof Color)) isOptimized = false; else { updateOptimization(); rawSetForeground((Color) paint); } } | public void setPaint(Paint p) { paint = p; if (! (paint instanceof Color)) isOptimized = false; else { updateOptimization(); rawSetForeground((Color) paint); } } | 21,188 |
private void updateOptimization() { int transformType = transform.getType(); boolean optimizedTransform = (transformType & (AffineTransform.TYPE_TRANSLATION | AffineTransform.TYPE_IDENTITY)) != 0; isOptimized = clip instanceof Rectangle && optimizedTransform && paint instanceof Co... | private void updateOptimization() { int transformType = transform.getType(); boolean optimizedTransform = (transformType & (AffineTransform.TYPE_TRANSLATION | AffineTransform.TYPE_IDENTITY)) != 0; isOptimized = clip instanceof Rectangle && optimizedTransform && paint instanceof Co... | 21,191 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.