rem
stringlengths
0
477k
add
stringlengths
0
313k
context
stringlengths
6
599k
meta
stringlengths
141
403
optionPane.removeAll(); messageAreaContainer = createMessageArea(); optionPane.add(messageAreaContainer); optionPane.add(buttonContainer);
optionPane.remove(messageAreaContainer); messageAreaContainer = createMessageArea(); optionPane.add(messageAreaContainer); Container newButtons = createButtonArea(); optionPane.remove(buttonContainer); optionPane.add(newButtons); buttonContainer = newButtons; optionPane.add(buttonContainer);
public void propertyChange(PropertyChangeEvent e) { if (e.getPropertyName().equals(JOptionPane.ICON_PROPERTY) || e.getPropertyName().equals(JOptionPane.MESSAGE_TYPE_PROPERTY)) addIcon(messageAreaContainer); else if (e.getPropertyName().equals(JOptionPane.INITIAL_SELECTION_VALUE_PROPERTY)) rese...
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/BasicOptionPaneUI.java/clean/core/src/classpath/javax/javax/swing/plaf/basic/BasicOptionPaneUI.java
rightSide.setBorder(BorderFactory.createEmptyBorder(0, 11, 17, 0));
rightSide.setBorder(BorderFactory.createEmptyBorder(10, 10, 10, 10));
protected Container createMessageArea() { JPanel messageArea = new JPanel(); messageArea.setLayout(new BorderLayout()); addIcon(messageArea); JPanel rightSide = new JPanel(); rightSide.setBorder(BorderFactory.createEmptyBorder(0, 11, 17, 0)); rightSide.setLayout(new GridBagLayout()); GridBagCons...
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/BasicOptionPaneUI.java/clean/core/src/classpath/javax/javax/swing/plaf/basic/BasicOptionPaneUI.java
protected Container createMessageArea() { JPanel messageArea = new JPanel(); messageArea.setLayout(new BorderLayout()); addIcon(messageArea); JPanel rightSide = new JPanel(); rightSide.setBorder(BorderFactory.createEmptyBorder(0, 11, 17, 0)); rightSide.setLayout(new GridBagLayout()); GridBagCons...
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/BasicOptionPaneUI.java/clean/core/src/classpath/javax/javax/swing/plaf/basic/BasicOptionPaneUI.java
messageArea.add(rightSide, BorderLayout.EAST);
messageArea.add(rightSide, BorderLayout.CENTER);
protected Container createMessageArea() { JPanel messageArea = new JPanel(); messageArea.setLayout(new BorderLayout()); addIcon(messageArea); JPanel rightSide = new JPanel(); rightSide.setBorder(BorderFactory.createEmptyBorder(0, 11, 17, 0)); rightSide.setLayout(new GridBagLayout()); GridBagCons...
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/BasicOptionPaneUI.java/clean/core/src/classpath/javax/javax/swing/plaf/basic/BasicOptionPaneUI.java
return new Object[] { OK_STRING, CANCEL_STRING };
return (optionPane.getWantsInput() ) ? new Object[] { OK_STRING, CANCEL_STRING } : ( optionPane.getMessageType() == JOptionPane.QUESTION_MESSAGE ) ? new Object[] { YES_STRING, NO_STRING, CANCEL_STRING } : new Object[] { OK_STRING };
protected Object[] getButtons() { if (optionPane.getOptions() != null) return optionPane.getOptions(); switch (optionPane.getOptionType()) { case JOptionPane.YES_NO_OPTION: return new Object[] { YES_STRING, NO_STRING }; case JOptionPane.YES_NO_CANCEL_OPTION: return new Object[] { YES_STRING...
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/BasicOptionPaneUI.java/clean/core/src/classpath/javax/javax/swing/plaf/basic/BasicOptionPaneUI.java
return null;
return null;
protected Object[] getButtons() { if (optionPane.getOptions() != null) return optionPane.getOptions(); switch (optionPane.getOptionType()) { case JOptionPane.YES_NO_OPTION: return new Object[] { YES_STRING, NO_STRING }; case JOptionPane.YES_NO_CANCEL_OPTION: return new Object[] { YES_STRING...
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/BasicOptionPaneUI.java/clean/core/src/classpath/javax/javax/swing/plaf/basic/BasicOptionPaneUI.java
Dimension d2 = getMinimumOptionPaneSize();
Dimension d2 = getMinimumOptionPaneSize();
public Dimension getPreferredSize(JComponent c) { Dimension d = optionPane.getLayout().preferredLayoutSize(optionPane); Dimension d2 = getMinimumOptionPaneSize(); int w = Math.max(d.width, d2.width); int h = Math.max(d.height, d2.height); return new Dimension(w, h); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/BasicOptionPaneUI.java/clean/core/src/classpath/javax/javax/swing/plaf/basic/BasicOptionPaneUI.java
}
}
protected void installComponents() { // reset it. hasCustomComponents = false; Container msg = createMessageArea(); if (msg != null) { ((JComponent) msg).setBorder(messageBorder); msg.setForeground(messageForeground); messageAreaContainer = msg; optionPane.add(msg); } // FIXME: Figure out if...
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/BasicOptionPaneUI.java/clean/core/src/classpath/javax/javax/swing/plaf/basic/BasicOptionPaneUI.java
minimumWidth = minimumSize.width; minimumHeight = minimumSize.height;
protected void installDefaults() { UIDefaults defaults = UIManager.getLookAndFeelDefaults(); optionPane.setFont(defaults.getFont("OptionPane.font")); optionPane.setBackground(defaults.getColor("OptionPane.background")); optionPane.setForeground(defaults.getColor("OptionPane.foreground")); optionPane.s...
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/BasicOptionPaneUI.java/clean/core/src/classpath/javax/javax/swing/plaf/basic/BasicOptionPaneUI.java
{
{
void resetSelectedValue() { if (inputComponent != null) { Object init = optionPane.getInitialSelectionValue(); if (init == null) return; if (inputComponent instanceof JTextField) ((JTextField) inputComponent).setText((String) init); else if (inputComponent instanceof JComboBox) ((JComboBox) inputCompon...
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/BasicOptionPaneUI.java/clean/core/src/classpath/javax/javax/swing/plaf/basic/BasicOptionPaneUI.java
public static void debug(String msg) {
public static void debug (String msg) {
public static void debug(String msg) { if (priority > Priority.DEBUG) return; try { output.write(msg.getBytes()); output.write(Constants.NEW_LINE.getBytes()); } catch (IOException e) { System.err.println("error in Log.debug()"); e.printStackTrace(); } }
4483 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4483/e7a9ac18e9d2994061521c78b0e214111d3c5741/Log.java/buggy/src/gov/nasa/gsfc/adc/xdf/Log.java
output.write(Constants.NEW_LINE.getBytes());
public static void debug(String msg) { if (priority > Priority.DEBUG) return; try { output.write(msg.getBytes()); output.write(Constants.NEW_LINE.getBytes()); } catch (IOException e) { System.err.println("error in Log.debug()"); e.printStackTrace(); } }
4483 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4483/e7a9ac18e9d2994061521c78b0e214111d3c5741/Log.java/buggy/src/gov/nasa/gsfc/adc/xdf/Log.java
public static void debug(String msg) { if (priority > Priority.DEBUG) return; try { output.write(msg.getBytes()); output.write(Constants.NEW_LINE.getBytes()); } catch (IOException e) { System.err.println("error in Log.debug()"); e.printStackTrace(); } }
4483 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4483/e7a9ac18e9d2994061521c78b0e214111d3c5741/Log.java/buggy/src/gov/nasa/gsfc/adc/xdf/Log.java
public static void error(String msg) {
public static void error (String msg) {
public static void error(String msg) { if (priority > Priority.ERROR) return; try { output.write(msg.getBytes()); output.write(Constants.NEW_LINE.getBytes()); } catch (IOException e) { System.err.println("error in Log.error()"); e.printStackTrace(); } }
4483 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4483/e7a9ac18e9d2994061521c78b0e214111d3c5741/Log.java/buggy/src/gov/nasa/gsfc/adc/xdf/Log.java
output.write(Constants.NEW_LINE.getBytes());
public static void error(String msg) { if (priority > Priority.ERROR) return; try { output.write(msg.getBytes()); output.write(Constants.NEW_LINE.getBytes()); } catch (IOException e) { System.err.println("error in Log.error()"); e.printStackTrace(); } }
4483 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4483/e7a9ac18e9d2994061521c78b0e214111d3c5741/Log.java/buggy/src/gov/nasa/gsfc/adc/xdf/Log.java
public static void info(String msg) {
public static void info (String msg) {
public static void info(String msg) { if (priority > Priority.INFO) return; try { output.write(msg.getBytes()); output.write(Constants.NEW_LINE.getBytes()); } catch (IOException e) { System.err.println("error in Log.info()"); e.printStackTrace(); } }
4483 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4483/e7a9ac18e9d2994061521c78b0e214111d3c5741/Log.java/buggy/src/gov/nasa/gsfc/adc/xdf/Log.java
output.write(Constants.NEW_LINE.getBytes());
public static void info(String msg) { if (priority > Priority.INFO) return; try { output.write(msg.getBytes()); output.write(Constants.NEW_LINE.getBytes()); } catch (IOException e) { System.err.println("error in Log.info()"); e.printStackTrace(); } }
4483 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4483/e7a9ac18e9d2994061521c78b0e214111d3c5741/Log.java/buggy/src/gov/nasa/gsfc/adc/xdf/Log.java
public static void warn(String msg) {
public static void warn (String msg) {
public static void warn(String msg) { if (priority > Priority.WARN) return; try { output.write(msg.getBytes()); output.write(Constants.NEW_LINE.getBytes()); } catch (IOException e) { System.err.println("error in Log.warn()"); e.printStackTrace(); } }
4483 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4483/e7a9ac18e9d2994061521c78b0e214111d3c5741/Log.java/buggy/src/gov/nasa/gsfc/adc/xdf/Log.java
output.write(Constants.NEW_LINE.getBytes());
public static void warn(String msg) { if (priority > Priority.WARN) return; try { output.write(msg.getBytes()); output.write(Constants.NEW_LINE.getBytes()); } catch (IOException e) { System.err.println("error in Log.warn()"); e.printStackTrace(); } }
4483 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4483/e7a9ac18e9d2994061521c78b0e214111d3c5741/Log.java/buggy/src/gov/nasa/gsfc/adc/xdf/Log.java
switch (buffer[offset])
char c = buffer[offset]; if (len > 0 && (c == '\t' || c == '\n')) { g.drawChars(buffer, pos, len, pixelX, pixelY + ascent); pixelX += pixelWidth; pixelWidth = 0; pos = offset+1; len = 0; } switch (c)
public static final int drawTabbedText(Segment s, int x, int y, Graphics g, TabExpander e, int startOffset) { // This buffers the chars to be drawn. char[] buffer = s.array; // The current x and y pixel coordinates. int pixelX = x; int pixelY = y; // The font...
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/698ac538b7482b0e4aac918befb43b8376e364e3/Utilities.java/buggy/core/src/classpath/javax/javax/swing/text/Utilities.java
public static final int drawTabbedText(Segment s, int x, int y, Graphics g, TabExpander e, int startOffset) { // This buffers the chars to be drawn. char[] buffer = s.array; // The current x and y pixel coordinates. int pixelX = x; int pixelY = y; // The font...
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/698ac538b7482b0e4aac918befb43b8376e364e3/Utilities.java/buggy/core/src/classpath/javax/javax/swing/text/Utilities.java
g.drawChars(buffer, offset, 1, pixelX, y);
public static final int drawTabbedText(Segment s, int x, int y, Graphics g, TabExpander e, int startOffset) { // This buffers the chars to be drawn. char[] buffer = s.array; // The current x and y pixel coordinates. int pixelX = x; int pixelY = y; // The font...
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/698ac538b7482b0e4aac918befb43b8376e364e3/Utilities.java/buggy/core/src/classpath/javax/javax/swing/text/Utilities.java
g.drawChars(buffer, offset, 1, pixelX, pixelY + ascent); pixelX += metrics.charWidth(buffer[offset]);
++len; pixelWidth += metrics.charWidth(buffer[offset]);
public static final int drawTabbedText(Segment s, int x, int y, Graphics g, TabExpander e, int startOffset) { // This buffers the chars to be drawn. char[] buffer = s.array; // The current x and y pixel coordinates. int pixelX = x; int pixelY = y; // The font...
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/698ac538b7482b0e4aac918befb43b8376e364e3/Utilities.java/buggy/core/src/classpath/javax/javax/swing/text/Utilities.java
if (len > 0) g.drawChars(buffer, pos, len, pixelX, pixelY + ascent);
public static final int drawTabbedText(Segment s, int x, int y, Graphics g, TabExpander e, int startOffset) { // This buffers the chars to be drawn. char[] buffer = s.array; // The current x and y pixel coordinates. int pixelX = x; int pixelY = y; // The font...
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/698ac538b7482b0e4aac918befb43b8376e364e3/Utilities.java/buggy/core/src/classpath/javax/javax/swing/text/Utilities.java
super(toolkit, panel, new JPanel()); final JPanel jPanel = (JPanel)jComponent; this.panel = panel;
super(toolkit, panel, new SwingPanel(panel)); final SwingPanel jPanel = (SwingPanel) jComponent;
public SwingPanelPeer(SwingToolkit toolkit, Panel panel) { super(toolkit, panel, new JPanel()); final JPanel jPanel = (JPanel)jComponent; this.panel = panel; SwingToolkit.add(panel, jPanel); SwingToolkit.copyAwtProperties(panel, jPanel); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/cb141050fd84afdb6e8ef6f8cc3ed4e90608d848/SwingPanelPeer.java/clean/gui/src/awt/org/jnode/awt/swingpeers/SwingPanelPeer.java
((JPanel)jComponent).add(peer);
((JPanel) jComponent).add(peer);
public void addAWTComponent(Component awtComponent, JComponent peer) { ((JPanel)jComponent).add(peer); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/cb141050fd84afdb6e8ef6f8cc3ed4e90608d848/SwingPanelPeer.java/clean/gui/src/awt/org/jnode/awt/swingpeers/SwingPanelPeer.java
return ((JPanel)jComponent).getInsets(); }
return ((JPanel) jComponent).getInsets(); }
public Insets getInsets() { return ((JPanel)jComponent).getInsets(); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/cb141050fd84afdb6e8ef6f8cc3ed4e90608d848/SwingPanelPeer.java/clean/gui/src/awt/org/jnode/awt/swingpeers/SwingPanelPeer.java
return getInsets(); }
return getInsets(); }
public Insets insets() { return getInsets(); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/cb141050fd84afdb6e8ef6f8cc3ed4e90608d848/SwingPanelPeer.java/clean/gui/src/awt/org/jnode/awt/swingpeers/SwingPanelPeer.java
public void addLayoutComponent(String string, Component component) { }
public void addLayoutComponent(String string, Component component) { }
public void addLayoutComponent(String string, Component component) { // TODO } // addLayoutComponent()
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/OverlayLayout.java/buggy/core/src/classpath/javax/javax/swing/OverlayLayout.java
public float getLayoutAlignmentX(Container target) { return (float) 0.0; }
public float getLayoutAlignmentX(Container target) { return (float) 0.0; }
public float getLayoutAlignmentX(Container target) { return (float) 0.0; // TODO } // getLayoutAlignmentX()
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/OverlayLayout.java/buggy/core/src/classpath/javax/javax/swing/OverlayLayout.java
public float getLayoutAlignmentY(Container target) { return (float) 0.0; }
public float getLayoutAlignmentY(Container target) { return (float) 0.0; }
public float getLayoutAlignmentY(Container target) { return (float) 0.0; // TODO } // getLayoutAlignmentY()
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/OverlayLayout.java/buggy/core/src/classpath/javax/javax/swing/OverlayLayout.java
public void invalidateLayout(Container target) { }
public void invalidateLayout(Container target) { }
public void invalidateLayout(Container target) { // TODO } // invalidateLayout()
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/OverlayLayout.java/buggy/core/src/classpath/javax/javax/swing/OverlayLayout.java
public void layoutContainer(Container target) { }
public void layoutContainer(Container target) { }
public void layoutContainer(Container target) { // TODO } // layoutContainer()
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/OverlayLayout.java/buggy/core/src/classpath/javax/javax/swing/OverlayLayout.java
public Dimension maximumLayoutSize(Container target) { return null; }
public Dimension maximumLayoutSize(Container target) { return null; }
public Dimension maximumLayoutSize(Container target) { return null; // TODO } // maximumLayoutSize()
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/OverlayLayout.java/buggy/core/src/classpath/javax/javax/swing/OverlayLayout.java
public Dimension minimumLayoutSize(Container target) { return null; }
public Dimension minimumLayoutSize(Container target) { return null; }
public Dimension minimumLayoutSize(Container target) { return null; // TODO } // minimumLayoutSize()
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/OverlayLayout.java/buggy/core/src/classpath/javax/javax/swing/OverlayLayout.java
public Dimension preferredLayoutSize(Container target) { return null; }
public Dimension preferredLayoutSize(Container target) { return null; }
public Dimension preferredLayoutSize(Container target) { return null; // TODO } // preferredLayoutSize()
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/OverlayLayout.java/buggy/core/src/classpath/javax/javax/swing/OverlayLayout.java
public void removeLayoutComponent(Component component) { }
public void removeLayoutComponent(Component component) { }
public void removeLayoutComponent(Component component) { // TODO } // removeLayoutComponent()
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/OverlayLayout.java/buggy/core/src/classpath/javax/javax/swing/OverlayLayout.java
Throwable throwable = record.getThrown(); if (throwable != null) { StringWriter sink = new StringWriter(); throwable.printStackTrace(new PrintWriter(sink, true)); buf.append(sink.toString()); }
public String format(LogRecord record) { StringBuffer buf = new StringBuffer(180); if (dateFormat == null) dateFormat = DateFormat.getDateTimeInstance(); buf.append(dateFormat.format(new Date(record.getMillis()))); buf.append(' '); buf.append(record.getSourceClassName()); buf.append(' '); b...
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/5806c07c3eeedb0f4f92b9fbacf30c0f55915c25/SimpleFormatter.java/buggy/core/src/classpath/java/java/util/logging/SimpleFormatter.java
Dimension e = minSize(editor); Dimension n = minSize(next); Dimension p = minSize(previous);
Dimension e = prefSize(editor); Dimension n = prefSize(next); Dimension p = prefSize(previous);
public void layoutContainer(Container parent) { synchronized (parent.getTreeLock()) { Insets i = parent.getInsets(); boolean l2r = parent.getComponentOrientation().isLeftToRight(); /* -------------- -------------- | | n | | n | | | e | - | or | - | e | ...
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/70a2876c99036463feada99a37295405c146f49b/BasicSpinnerUI.java/clean/core/src/classpath/javax/javax/swing/plaf/basic/BasicSpinnerUI.java
int h = Math.max(p.height, n.height); h = Math.max(h, e.height / 2); int e_width = s.width - w;
int h = e.height / 2; int e_width = s.width - w - i.left - i.right;
public void layoutContainer(Container parent) { synchronized (parent.getTreeLock()) { Insets i = parent.getInsets(); boolean l2r = parent.getComponentOrientation().isLeftToRight(); /* -------------- -------------- | | n | | n | | | e | - | or | - | e | ...
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/70a2876c99036463feada99a37295405c146f49b/BasicSpinnerUI.java/clean/core/src/classpath/javax/javax/swing/plaf/basic/BasicSpinnerUI.java
setBounds(editor, x, y + (s.height - e.height) / 2, e_width, e.height);
setBounds(editor, x, y, e_width, 2 * h);
public void layoutContainer(Container parent) { synchronized (parent.getTreeLock()) { Insets i = parent.getInsets(); boolean l2r = parent.getComponentOrientation().isLeftToRight(); /* -------------- -------------- | | n | | n | | | e | - | or | - | e | ...
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/70a2876c99036463feada99a37295405c146f49b/BasicSpinnerUI.java/clean/core/src/classpath/javax/javax/swing/plaf/basic/BasicSpinnerUI.java
public void layoutContainer(Container parent) { synchronized (parent.getTreeLock()) { Insets i = parent.getInsets(); boolean l2r = parent.getComponentOrientation().isLeftToRight(); /* -------------- -------------- | | n | | n | | | e | - | or | - | e | ...
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/70a2876c99036463feada99a37295405c146f49b/BasicSpinnerUI.java/clean/core/src/classpath/javax/javax/swing/plaf/basic/BasicSpinnerUI.java
public void layoutContainer(Container parent) { synchronized (parent.getTreeLock()) { Insets i = parent.getInsets(); boolean l2r = parent.getComponentOrientation().isLeftToRight(); /* -------------- -------------- | | n | | n | | | e | - | or | - | e | ...
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/70a2876c99036463feada99a37295405c146f49b/BasicSpinnerUI.java/clean/core/src/classpath/javax/javax/swing/plaf/basic/BasicSpinnerUI.java
setBounds(previous, x, y, w, h);
setBounds(previous, x, y + (s.height - e.height) / 2, w, h);
public void layoutContainer(Container parent) { synchronized (parent.getTreeLock()) { Insets i = parent.getInsets(); boolean l2r = parent.getComponentOrientation().isLeftToRight(); /* -------------- -------------- | | n | | n | | | e | - | or | - | e | ...
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/70a2876c99036463feada99a37295405c146f49b/BasicSpinnerUI.java/clean/core/src/classpath/javax/javax/swing/plaf/basic/BasicSpinnerUI.java
public void layoutContainer(Container parent) { synchronized (parent.getTreeLock()) { Insets i = parent.getInsets(); boolean l2r = parent.getComponentOrientation().isLeftToRight(); /* -------------- -------------- | | n | | n | | | e | - | or | - | e | ...
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/70a2876c99036463feada99a37295405c146f49b/BasicSpinnerUI.java/clean/core/src/classpath/javax/javax/swing/plaf/basic/BasicSpinnerUI.java
int otherHeight = 0;
public Dimension minimumLayoutSize(Container parent) { Dimension d = new Dimension(); if (editor != null) { Dimension tmp = editor.getMinimumSize(); d.width += tmp.width; d.height = tmp.height; } int nextWidth = 0; int previousWidth = 0; int otherHeight = 0; if (...
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/70a2876c99036463feada99a37295405c146f49b/BasicSpinnerUI.java/clean/core/src/classpath/javax/javax/swing/plaf/basic/BasicSpinnerUI.java
otherHeight += tmp.height;
public Dimension minimumLayoutSize(Container parent) { Dimension d = new Dimension(); if (editor != null) { Dimension tmp = editor.getMinimumSize(); d.width += tmp.width; d.height = tmp.height; } int nextWidth = 0; int previousWidth = 0; int otherHeight = 0; if (...
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/70a2876c99036463feada99a37295405c146f49b/BasicSpinnerUI.java/clean/core/src/classpath/javax/javax/swing/plaf/basic/BasicSpinnerUI.java
otherHeight += tmp.height;
public Dimension minimumLayoutSize(Container parent) { Dimension d = new Dimension(); if (editor != null) { Dimension tmp = editor.getMinimumSize(); d.width += tmp.width; d.height = tmp.height; } int nextWidth = 0; int previousWidth = 0; int otherHeight = 0; if (...
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/70a2876c99036463feada99a37295405c146f49b/BasicSpinnerUI.java/clean/core/src/classpath/javax/javax/swing/plaf/basic/BasicSpinnerUI.java
d.height = Math.max(d.height, otherHeight);
public Dimension minimumLayoutSize(Container parent) { Dimension d = new Dimension(); if (editor != null) { Dimension tmp = editor.getMinimumSize(); d.width += tmp.width; d.height = tmp.height; } int nextWidth = 0; int previousWidth = 0; int otherHeight = 0; if (...
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/70a2876c99036463feada99a37295405c146f49b/BasicSpinnerUI.java/clean/core/src/classpath/javax/javax/swing/plaf/basic/BasicSpinnerUI.java
int otherHeight = 0;
public Dimension preferredLayoutSize(Container parent) { Dimension d = new Dimension(); if (editor != null) { Dimension tmp = editor.getPreferredSize(); d.width += Math.max(tmp.width, 40); d.height = tmp.height; } int nextWidth = 0; int previousWidth = 0; int otherHei...
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/70a2876c99036463feada99a37295405c146f49b/BasicSpinnerUI.java/clean/core/src/classpath/javax/javax/swing/plaf/basic/BasicSpinnerUI.java
otherHeight += tmp.height;
public Dimension preferredLayoutSize(Container parent) { Dimension d = new Dimension(); if (editor != null) { Dimension tmp = editor.getPreferredSize(); d.width += Math.max(tmp.width, 40); d.height = tmp.height; } int nextWidth = 0; int previousWidth = 0; int otherHei...
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/70a2876c99036463feada99a37295405c146f49b/BasicSpinnerUI.java/clean/core/src/classpath/javax/javax/swing/plaf/basic/BasicSpinnerUI.java
otherHeight += tmp.height;
public Dimension preferredLayoutSize(Container parent) { Dimension d = new Dimension(); if (editor != null) { Dimension tmp = editor.getPreferredSize(); d.width += Math.max(tmp.width, 40); d.height = tmp.height; } int nextWidth = 0; int previousWidth = 0; int otherHei...
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/70a2876c99036463feada99a37295405c146f49b/BasicSpinnerUI.java/clean/core/src/classpath/javax/javax/swing/plaf/basic/BasicSpinnerUI.java
d.height = Math.max(d.height, otherHeight);
public Dimension preferredLayoutSize(Container parent) { Dimension d = new Dimension(); if (editor != null) { Dimension tmp = editor.getPreferredSize(); d.width += Math.max(tmp.width, 40); d.height = tmp.height; } int nextWidth = 0; int previousWidth = 0; int otherHei...
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/70a2876c99036463feada99a37295405c146f49b/BasicSpinnerUI.java/clean/core/src/classpath/javax/javax/swing/plaf/basic/BasicSpinnerUI.java
Insets insets = parent.getInsets(); d.width = d.width + insets.left + insets.right; d.height = d.height + insets.top + insets.bottom;
public Dimension preferredLayoutSize(Container parent) { Dimension d = new Dimension(); if (editor != null) { Dimension tmp = editor.getPreferredSize(); d.width += Math.max(tmp.width, 40); d.height = tmp.height; } int nextWidth = 0; int previousWidth = 0; int otherHei...
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/70a2876c99036463feada99a37295405c146f49b/BasicSpinnerUI.java/clean/core/src/classpath/javax/javax/swing/plaf/basic/BasicSpinnerUI.java
public void propertyChange(PropertyChangeEvent evt)
public void propertyChange(PropertyChangeEvent event)
protected PropertyChangeListener createPropertyChangeListener() { return new PropertyChangeListener() { public void propertyChange(PropertyChangeEvent evt) { // FIXME: Add check for enabled property change. Need to // disable the buttons. if ("editor".equals(evt.getPropertyName())) BasicSpinnerUI.t...
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/70a2876c99036463feada99a37295405c146f49b/BasicSpinnerUI.java/clean/core/src/classpath/javax/javax/swing/plaf/basic/BasicSpinnerUI.java
if ("editor".equals(evt.getPropertyName())) BasicSpinnerUI.this.replaceEditor((JComponent) evt.getOldValue(), (JComponent) evt.getNewValue());
if ("editor".equals(event.getPropertyName())) BasicSpinnerUI.this.replaceEditor((JComponent) event.getOldValue(), (JComponent) event.getNewValue());
protected PropertyChangeListener createPropertyChangeListener() { return new PropertyChangeListener() { public void propertyChange(PropertyChangeEvent evt) { // FIXME: Add check for enabled property change. Need to // disable the buttons. if ("editor".equals(evt.getPropertyName())) BasicSpinnerUI.t...
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/70a2876c99036463feada99a37295405c146f49b/BasicSpinnerUI.java/clean/core/src/classpath/javax/javax/swing/plaf/basic/BasicSpinnerUI.java
public void propertyChange(PropertyChangeEvent evt)
public void propertyChange(PropertyChangeEvent event)
public void propertyChange(PropertyChangeEvent evt) { // FIXME: Add check for enabled property change. Need to // disable the buttons. if ("editor".equals(evt.getPropertyName())) BasicSpinnerUI.this.replaceEditor((JComponent) evt.getOldValue(), (JComponent) evt.getNewVal...
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/70a2876c99036463feada99a37295405c146f49b/BasicSpinnerUI.java/clean/core/src/classpath/javax/javax/swing/plaf/basic/BasicSpinnerUI.java
if ("editor".equals(evt.getPropertyName())) BasicSpinnerUI.this.replaceEditor((JComponent) evt.getOldValue(), (JComponent) evt.getNewValue());
if ("editor".equals(event.getPropertyName())) BasicSpinnerUI.this.replaceEditor((JComponent) event.getOldValue(), (JComponent) event.getNewValue());
public void propertyChange(PropertyChangeEvent evt) { // FIXME: Add check for enabled property change. Need to // disable the buttons. if ("editor".equals(evt.getPropertyName())) BasicSpinnerUI.this.replaceEditor((JComponent) evt.getOldValue(), (JComponent) evt.getNewVal...
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/70a2876c99036463feada99a37295405c146f49b/BasicSpinnerUI.java/clean/core/src/classpath/javax/javax/swing/plaf/basic/BasicSpinnerUI.java
JComponent e = spinner.getEditor(); if (e instanceof JSpinner.DefaultEditor) { JSpinner.DefaultEditor de = (JSpinner.DefaultEditor) e; de.getTextField().setBorder(null); }
protected void installDefaults() { LookAndFeel.installColorsAndFont(spinner, "Spinner.background", "Spinner.foreground", "Spinner.font"); LookAndFeel.installBorder(spinner, "Spinner.border"); spinner.setLayout(createLayout()); spinner.setOpaque(true); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/70a2876c99036463feada99a37295405c146f49b/BasicSpinnerUI.java/clean/core/src/classpath/javax/javax/swing/plaf/basic/BasicSpinnerUI.java
boolean niceOutput = sPrettyXDFOutput;
boolean niceOutput = Specification.getInstance().isPrettyXDFOutput();
protected void specificIOStyleToXDF( OutputStream outputstream,String indent) { boolean niceOutput = sPrettyXDFOutput; //write out the tags info String[] tags = getAxisTags(); List axisList = parentArray.getAxisList(); String axisId; String tag; int stop = axisList.size(); synchronized (axisL...
4483 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4483/1e7f6912855beedfa6f64bcbc5bc675d9beedbae/TaggedXMLDataIOStyle.java/clean/src/gov/nasa/gsfc/adc/xdf/TaggedXMLDataIOStyle.java
ICC_ProfileGray()
ICC_ProfileGray(int cspace)
ICC_ProfileGray() { super(ColorSpace.CS_GRAY); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/511ee4599fec6e0fd95b9d64823beef0c7439ee1/ICC_ProfileGray.java/buggy/core/src/classpath/java/java/awt/color/ICC_ProfileGray.java
super(ColorSpace.CS_GRAY);
super(cspace); whitePoint = getXYZData(icSigMediaWhitePointTag);
ICC_ProfileGray() { super(ColorSpace.CS_GRAY); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/511ee4599fec6e0fd95b9d64823beef0c7439ee1/ICC_ProfileGray.java/buggy/core/src/classpath/java/java/awt/color/ICC_ProfileGray.java
return 0;
short[] data = getCurve(icSigGrayTRCTag); if (data == null) throw new IllegalArgumentException("Couldn't read Gray TRC data."); if (data.length != 1) throw new ProfileDataException("TRC is a table, not a gamma value."); double gamma = (double) (data[0] & (0xFFFF)) / 256.0; return (float) gamma;
public float getGamma() { return 0; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/511ee4599fec6e0fd95b9d64823beef0c7439ee1/ICC_ProfileGray.java/buggy/core/src/classpath/java/java/awt/color/ICC_ProfileGray.java
return null;
float[] wp = new float[3]; wp[0] = whitePoint[0]; wp[1] = whitePoint[1]; wp[2] = whitePoint[2]; return wp;
public float[] getMediaWhitePoint() { return null; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/511ee4599fec6e0fd95b9d64823beef0c7439ee1/ICC_ProfileGray.java/buggy/core/src/classpath/java/java/awt/color/ICC_ProfileGray.java
return null;
short[] data = getCurve(icSigGrayTRCTag); if (data == null) throw new IllegalArgumentException("Couldn't read Gray TRC data."); if (data.length <= 1) throw new ProfileDataException("Gamma value, not a TRC table."); return data;
public short[] getTRC() { return null; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/511ee4599fec6e0fd95b9d64823beef0c7439ee1/ICC_ProfileGray.java/buggy/core/src/classpath/java/java/awt/color/ICC_ProfileGray.java
this.profileID = profileID;
header = null; tagTable = null; createProfile(profileID);
ICC_Profile(int profileID) { this.profileID = profileID; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/511ee4599fec6e0fd95b9d64823beef0c7439ee1/ICC_Profile.java/buggy/core/src/classpath/java/java/awt/color/ICC_Profile.java
super(toolkit, checkBox, new JCheckBox()); this.checkBox = checkBox; final JCheckBox jcb = (JCheckBox)jComponent;
super(toolkit, checkBox, new SwingCheckBox(checkBox)); final JCheckBox jcb = (JCheckBox) jComponent;
public SwingCheckboxPeer(SwingToolkit toolkit, Checkbox checkBox) { super(toolkit, checkBox, new JCheckBox()); this.checkBox = checkBox; final JCheckBox jcb = (JCheckBox)jComponent; SwingToolkit.add(checkBox, jcb); SwingToolkit.copyAwtProperties(checkBox, jcb); jcb.setText(checkBox.getLabel()); setState(c...
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/cb141050fd84afdb6e8ef6f8cc3ed4e90608d848/SwingCheckboxPeer.java/buggy/gui/src/awt/org/jnode/awt/swingpeers/SwingCheckboxPeer.java
((JCheckBox)jComponent).setText(label); }
((JCheckBox) jComponent).setText(label); }
public void setLabel(String label) { ((JCheckBox)jComponent).setText(label); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/cb141050fd84afdb6e8ef6f8cc3ed4e90608d848/SwingCheckboxPeer.java/buggy/gui/src/awt/org/jnode/awt/swingpeers/SwingCheckboxPeer.java
((JCheckBox)jComponent).setSelected(state);
((JCheckBox) jComponent).setSelected(state);
public void setState(boolean state) { ((JCheckBox)jComponent).setSelected(state); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/cb141050fd84afdb6e8ef6f8cc3ed4e90608d848/SwingCheckboxPeer.java/buggy/gui/src/awt/org/jnode/awt/swingpeers/SwingCheckboxPeer.java
g.setClip(portBounds);
g.setClip(new Rectangle(0, 0, portBounds.width, portBounds.height));
private void paintSimple(Graphics g, JViewport v, Component view, Point pos, Rectangle viewBounds, Rectangle portBounds) { Rectangle oldClip = g.getClipBounds(); g.setClip(port...
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/f7b0a77266671350e38451a50ce054282a5860ef/BasicViewportUI.java/clean/core/src/classpath/javax/javax/swing/plaf/basic/BasicViewportUI.java
if (pixel < map_size)
if (pixel >= 0 && pixel < map_size)
public final int getRGB (int pixel) { if (pixel < map_size) return rgb[pixel]; return 0; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/f9edc08acdeb1f2f4fe82f01243818bd374a3e46/IndexColorModel.java/buggy/core/src/classpath/java/java/awt/image/IndexColorModel.java
Address sf = VmMagic.getCurrentFrame();
final VmStackFrameEnumerator sfEnum = new VmStackFrameEnumerator(reader);
public static void checkPermission(Permission perm) throws AccessControlException { if (!Unsafe.getCurrentProcessor().isThreadSwitchActive()) { // getContext().checkPermission(perm); // This is an optimized version of // getContext().checkPermission() //...
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/8f674dc620388d2013aaf9ed54e97f8ee02b418d/VmAccessController.java/clean/core/src/core/org/jnode/vm/VmAccessController.java
while (reader.isValid(sf)) { final VmMethod method = reader.getMethod(sf);
while (sfEnum.isValid()) { final VmMethod method = sfEnum.getMethod();
public static void checkPermission(Permission perm) throws AccessControlException { if (!Unsafe.getCurrentProcessor().isThreadSwitchActive()) { // getContext().checkPermission(perm); // This is an optimized version of // getContext().checkPermission() //...
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/8f674dc620388d2013aaf9ed54e97f8ee02b418d/VmAccessController.java/clean/core/src/core/org/jnode/vm/VmAccessController.java
sf = reader.getPrevious(sf);
sfEnum.next();
public static void checkPermission(Permission perm) throws AccessControlException { if (!Unsafe.getCurrentProcessor().isThreadSwitchActive()) { // getContext().checkPermission(perm); // This is an optimized version of // getContext().checkPermission() //...
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/8f674dc620388d2013aaf9ed54e97f8ee02b418d/VmAccessController.java/clean/core/src/core/org/jnode/vm/VmAccessController.java
public final void pop(int type) {
public final int pop() {
public final void pop(int type) { if (tos <= 0) { throw new Error("Stack is empty"); } if (stack[ --tos] != type) { throw new Error("TypeStack[" + tos + "] is not the expected element " + type + " but " + stack[ tos]); } }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/51e4aed2205f326c2698e2154ea7f83ae5dfc2b6/TypeStack.java/clean/core/src/core/org/jnode/vm/bytecode/TypeStack.java
if (stack[ --tos] != type) { throw new Error("TypeStack[" + tos + "] is not the expected element " + type + " but " + stack[ tos]); }
return stack[ --tos];
public final void pop(int type) { if (tos <= 0) { throw new Error("Stack is empty"); } if (stack[ --tos] != type) { throw new Error("TypeStack[" + tos + "] is not the expected element " + type + " but " + stack[ tos]); } }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/51e4aed2205f326c2698e2154ea7f83ae5dfc2b6/TypeStack.java/clean/core/src/core/org/jnode/vm/bytecode/TypeStack.java
private void calculateDay(int[] fields, long day, boolean gregorian) { // the epoch is a Thursday. int weekday = (int) (day + THURSDAY) % 7; if (weekday <= 0) weekday += 7; fields[DAY_OF_WEEK] = weekday; // get a first approximation of the year. This may be one // year too big. int year = 1970 ...
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/d7e10284742ade2934a1d2f7548145b029098f79/GregorianCalendar.java/buggy/core/src/classpath/java/java/util/GregorianCalendar.java
? ((day - 100) * 400) / (365 * 400 + 100 - 4 + 1) : ((day - 100) * 4) / (365 * 4 + 1));
? ((day - 100L) * 400L) / (365L * 400L + 100L - 4L + 1L) : ((day - 100L) * 4L) / (365L * 4L + 1L));
private void calculateDay(int[] fields, long day, boolean gregorian) { // the epoch is a Thursday. int weekday = (int) (day + THURSDAY) % 7; if (weekday <= 0) weekday += 7; fields[DAY_OF_WEEK] = weekday; // get a first approximation of the year. This may be one // year too big. int year = 1970 ...
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/d7e10284742ade2934a1d2f7548145b029098f79/GregorianCalendar.java/buggy/core/src/classpath/java/java/util/GregorianCalendar.java
int leapday = isLeapYear(year, gregorian) ? 1 : 0;
int leapday = isLeapYear(year) ? 1 : 0;
private void calculateDay(int[] fields, long day, boolean gregorian) { // the epoch is a Thursday. int weekday = (int) (day + THURSDAY) % 7; if (weekday <= 0) weekday += 7; fields[DAY_OF_WEEK] = weekday; // get a first approximation of the year. This may be one // year too big. int year = 1970 ...
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/d7e10284742ade2934a1d2f7548145b029098f79/GregorianCalendar.java/buggy/core/src/classpath/java/java/util/GregorianCalendar.java
protected synchronized void computeFields() { boolean gregorian = (time >= gregorianCutover); TimeZone zone = getTimeZone(); fields[ZONE_OFFSET] = zone.getRawOffset(); long localTime = time + fields[ZONE_OFFSET]; long day = localTime / (24 * 60 * 60 * 1000L); int millisInDay = (int) (localTime % (24 * 60 * 6...
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/d7e10284742ade2934a1d2f7548145b029098f79/GregorianCalendar.java/buggy/core/src/classpath/java/java/util/GregorianCalendar.java
int era = isSet[ERA] ? fields[ERA] : AD; int year = isSet[YEAR] ? fields[YEAR] : 1970; if (isLenient() && isSet[MONTH])
int millisInDay = 0; int era = fields[ERA]; int year = fields[YEAR]; int month = fields[MONTH]; int day = fields[DAY_OF_MONTH]; int minute = fields[MINUTE]; int second = fields[SECOND]; int millis = fields[MILLISECOND]; int[] month_days = { 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 }; int[] dayCount = { 0, 31, 59...
protected synchronized void computeTime() { int era = isSet[ERA] ? fields[ERA] : AD; int year = isSet[YEAR] ? fields[YEAR] : 1970; if (isLenient() && isSet[MONTH]) { int month = fields[MONTH]; year += month / 12; month %= 12; if (month < 0) { month += 12; year--; } fields[MONTH] = month; isSet[...
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/d7e10284742ade2934a1d2f7548145b029098f79/GregorianCalendar.java/buggy/core/src/classpath/java/java/util/GregorianCalendar.java
int month = fields[MONTH]; year += month / 12; month %= 12; if (month < 0)
if (isSet[DAY_OF_WEEK])
protected synchronized void computeTime() { int era = isSet[ERA] ? fields[ERA] : AD; int year = isSet[YEAR] ? fields[YEAR] : 1970; if (isLenient() && isSet[MONTH]) { int month = fields[MONTH]; year += month / 12; month %= 12; if (month < 0) { month += 12; year--; } fields[MONTH] = month; isSet[...
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/d7e10284742ade2934a1d2f7548145b029098f79/GregorianCalendar.java/buggy/core/src/classpath/java/java/util/GregorianCalendar.java
month += 12; year--;
int first = getFirstDayOfMonth(year, month); if (isSet[DAY_OF_WEEK_IN_MONTH]) { int offs = fields[DAY_OF_WEEK] - first; if (offs < 0) offs += 7; day = 1 + 7 * (fields[DAY_OF_WEEK_IN_MONTH] - 1); day += offs; } else { day = 1 + 7 * (fields[WEEK_OF_MONTH] - 1); day += fields[DAY_OF_WEEK] - first; }
protected synchronized void computeTime() { int era = isSet[ERA] ? fields[ERA] : AD; int year = isSet[YEAR] ? fields[YEAR] : 1970; if (isLenient() && isSet[MONTH]) { int month = fields[MONTH]; year += month / 12; month %= 12; if (month < 0) { month += 12; year--; } fields[MONTH] = month; isSet[...
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/d7e10284742ade2934a1d2f7548145b029098f79/GregorianCalendar.java/buggy/core/src/classpath/java/java/util/GregorianCalendar.java
fields[MONTH] = month; isSet[YEAR] = true; fields[YEAR] = year;
protected synchronized void computeTime() { int era = isSet[ERA] ? fields[ERA] : AD; int year = isSet[YEAR] ? fields[YEAR] : 1970; if (isLenient() && isSet[MONTH]) { int month = fields[MONTH]; year += month / 12; month %= 12; if (month < 0) { month += 12; year--; } fields[MONTH] = month; isSet[...
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/d7e10284742ade2934a1d2f7548145b029098f79/GregorianCalendar.java/buggy/core/src/classpath/java/java/util/GregorianCalendar.java
if (era == BC) year = 1 - year; int[] daysOfYear = getDayOfYear(year); int hour = 0;
protected synchronized void computeTime() { int era = isSet[ERA] ? fields[ERA] : AD; int year = isSet[YEAR] ? fields[YEAR] : 1970; if (isLenient() && isSet[MONTH]) { int month = fields[MONTH]; year += month / 12; month %= 12; if (month < 0) { month += 12; year--; } fields[MONTH] = month; isSet[...
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/d7e10284742ade2934a1d2f7548145b029098f79/GregorianCalendar.java/buggy/core/src/classpath/java/java/util/GregorianCalendar.java
int minute = isSet[MINUTE] ? fields[MINUTE] : 0; int second = isSet[SECOND] ? fields[SECOND] : 0; int millis = isSet[MILLISECOND] ? fields[MILLISECOND] : 0; int millisInDay;
long allMillis = (((hour * 60L) + minute) * 60L + second) * 1000L + millis; day += allMillis / (24 * 60 * 60 * 1000L); millisInDay = (int) (allMillis % (24 * 60 * 60 * 1000L));
protected synchronized void computeTime() { int era = isSet[ERA] ? fields[ERA] : AD; int year = isSet[YEAR] ? fields[YEAR] : 1970; if (isLenient() && isSet[MONTH]) { int month = fields[MONTH]; year += month / 12; month %= 12; if (month < 0) { month += 12; year--; } fields[MONTH] = month; isSet[...
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/d7e10284742ade2934a1d2f7548145b029098f79/GregorianCalendar.java/buggy/core/src/classpath/java/java/util/GregorianCalendar.java
if (isLenient())
if (month < 0)
protected synchronized void computeTime() { int era = isSet[ERA] ? fields[ERA] : AD; int year = isSet[YEAR] ? fields[YEAR] : 1970; if (isLenient() && isSet[MONTH]) { int month = fields[MONTH]; year += month / 12; month %= 12; if (month < 0) { month += 12; year--; } fields[MONTH] = month; isSet[...
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/d7e10284742ade2934a1d2f7548145b029098f79/GregorianCalendar.java/buggy/core/src/classpath/java/java/util/GregorianCalendar.java
long allMillis = (((hour * 60L) + minute) * 60L + second) * 1000L + millis; daysOfYear[1] += allMillis / (24 * 60 * 60 * 1000L); millisInDay = (int) (allMillis % (24 * 60 * 60 * 1000L));
year += (int) month / 12; month = month % 12; if (month < 0) { month += 12; year--;
protected synchronized void computeTime() { int era = isSet[ERA] ? fields[ERA] : AD; int year = isSet[YEAR] ? fields[YEAR] : 1970; if (isLenient() && isSet[MONTH]) { int month = fields[MONTH]; year += month / 12; month %= 12; if (month < 0) { month += 12; year--; } fields[MONTH] = month; isSet[...
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/d7e10284742ade2934a1d2f7548145b029098f79/GregorianCalendar.java/buggy/core/src/classpath/java/java/util/GregorianCalendar.java
else
} if (month > 11)
protected synchronized void computeTime() { int era = isSet[ERA] ? fields[ERA] : AD; int year = isSet[YEAR] ? fields[YEAR] : 1970; if (isLenient() && isSet[MONTH]) { int month = fields[MONTH]; year += month / 12; month %= 12; if (month < 0) { month += 12; year--; } fields[MONTH] = month; isSet[...
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/d7e10284742ade2934a1d2f7548145b029098f79/GregorianCalendar.java/buggy/core/src/classpath/java/java/util/GregorianCalendar.java
if (hour < 0 || hour >= 24 || minute < 0 || minute > 59 || second < 0 || second > 59 || millis < 0 || millis >= 1000) throw new IllegalArgumentException(); millisInDay = (((hour * 60) + minute) * 60 + second) * 1000 + millis; } time = getLinearTime(year, daysOfYear[0], millisInDay); time += daysOfYear[1] * (24 * 60 ...
year += (month / 12); month = month % 12;
protected synchronized void computeTime() { int era = isSet[ERA] ? fields[ERA] : AD; int year = isSet[YEAR] ? fields[YEAR] : 1970; if (isLenient() && isSet[MONTH]) { int month = fields[MONTH]; year += month / 12; month %= 12; if (month < 0) { month += 12; year--; } fields[MONTH] = month; isSet[...
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/d7e10284742ade2934a1d2f7548145b029098f79/GregorianCalendar.java/buggy/core/src/classpath/java/java/util/GregorianCalendar.java
int[] f = new int[FIELD_COUNT]; calculateDay(f, day, time - rawOffset >= gregorianCutover); year = f[YEAR]; int month = f[MONTH]; day = f[DAY_OF_MONTH]; int weekday = f[DAY_OF_WEEK]; int dstOffset = isSet[DST_OFFSET] ? fields[DST_OFFSET] : (zone.getOffset((year < 0) ? BC : AD, (year < 0) ? 1 - year : year, month, day, ...
month_days[1] = isLeapYear(year) ? 29 : 28; while (day <= 0) { if (month == 0) { year--; month_days[1] = isLeapYear(year) ? 29 : 28; } month = (month + 11) % 12; day += month_days[month];
protected synchronized void computeTime() { int era = isSet[ERA] ? fields[ERA] : AD; int year = isSet[YEAR] ? fields[YEAR] : 1970; if (isLenient() && isSet[MONTH]) { int month = fields[MONTH]; year += month / 12; month %= 12; if (month < 0) { month += 12; year--; } fields[MONTH] = month; isSet[...
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/d7e10284742ade2934a1d2f7548145b029098f79/GregorianCalendar.java/buggy/core/src/classpath/java/java/util/GregorianCalendar.java
while (day > month_days[month]) { day -= (month_days[month]); month = (month + 1) % 12; if (month == 0) { year++; month_days[1] = isLeapYear(year) ? 29 : 28; } } int dayOfYear = dayCount[month] + day - 1; if (isLeapYear(year) && month > 1) dayOfYear++; int relativeDay = (year - 1) * 365 + ((year - 1) >> 2) + dayOfYe...
protected synchronized void computeTime() { int era = isSet[ERA] ? fields[ERA] : AD; int year = isSet[YEAR] ? fields[YEAR] : 1970; if (isLenient() && isSet[MONTH]) { int month = fields[MONTH]; year += month / 12; month %= 12; if (month < 0) { month += 12; year--; } fields[MONTH] = month; isSet[...
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/d7e10284742ade2934a1d2f7548145b029098f79/GregorianCalendar.java/buggy/core/src/classpath/java/java/util/GregorianCalendar.java
long julianDay = ((year * (365L * 4 + 1)) >> 2) + dayOfYear - ((1970 * (365 * 4 + 1)) / 4 + 1 - 13);
long julianDay = (year - 1) * 365L + ((year - 1) >> 2) + (dayOfYear - 1) - EPOCH_DAYS;
private long getLinearDay(int year, int dayOfYear, boolean gregorian) { // The 13 is the number of days, that were omitted in the Gregorian // Calender until the epoch. // We shift right by 2 instead of dividing by 4, to get correct // results for negative years (and this is even more efficient). long julianD...
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/d7e10284742ade2934a1d2f7548145b029098f79/GregorianCalendar.java/buggy/core/src/classpath/java/java/util/GregorianCalendar.java
int gregOffset = (year / 400) - (year / 100) + 2; if (isLeapYear(year, true) && dayOfYear < 31 + 29) --gregOffset; julianDay += gregOffset;
int gregOffset = (int) Math.floor((double) (year - 1) / 400.) - (int) Math.floor((double) (year - 1) / 100.); return julianDay + gregOffset;
private long getLinearDay(int year, int dayOfYear, boolean gregorian) { // The 13 is the number of days, that were omitted in the Gregorian // Calender until the epoch. // We shift right by 2 instead of dividing by 4, to get correct // results for negative years (and this is even more efficient). long julianD...
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/d7e10284742ade2934a1d2f7548145b029098f79/GregorianCalendar.java/buggy/core/src/classpath/java/java/util/GregorianCalendar.java
else julianDay -= 2;
private long getLinearDay(int year, int dayOfYear, boolean gregorian) { // The 13 is the number of days, that were omitted in the Gregorian // Calender until the epoch. // We shift right by 2 instead of dividing by 4, to get correct // results for negative years (and this is even more efficient). long julianD...
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/d7e10284742ade2934a1d2f7548145b029098f79/GregorianCalendar.java/buggy/core/src/classpath/java/java/util/GregorianCalendar.java
int day = (int) (getLinearTime(year, dayOfYear, 0) / (24 * 60 * 60 * 1000L));
boolean greg = isGregorian(year, dayOfYear); int day = (int) getLinearDay(year, dayOfYear, greg);
private int getWeekDay(int year, int dayOfYear) { int day = (int) (getLinearTime(year, dayOfYear, 0) / (24 * 60 * 60 * 1000L)); // The epoch was a thursday. int weekday = (day + THURSDAY) % 7; if (weekday <= 0) weekday += 7; return weekday; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/d7e10284742ade2934a1d2f7548145b029098f79/GregorianCalendar.java/buggy/core/src/classpath/java/java/util/GregorianCalendar.java
if ((year & 3) != 0)
public boolean isLeapYear(int year) { if ((year & 3) != 0) // Only years divisible by 4 can be leap years return false; // compute the linear day of the 29. February of that year. // The 13 is the number of days, that were omitted in the Gregorian // Calender until the epoch. int julianDay = (((year - 1) ...
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/d7e10284742ade2934a1d2f7548145b029098f79/GregorianCalendar.java/buggy/core/src/classpath/java/java/util/GregorianCalendar.java
int julianDay = (((year - 1) * (365 * 4 + 1)) >> 2) + (31 + 29 - (((1970 - 1) * (365 * 4 + 1)) / 4 + 1 - 13)); if (julianDay * (24 * 60 * 60 * 1000L) < gregorianCutover)
if (! isGregorian(year, 31 + 29 - 1))
public boolean isLeapYear(int year) { if ((year & 3) != 0) // Only years divisible by 4 can be leap years return false; // compute the linear day of the 29. February of that year. // The 13 is the number of days, that were omitted in the Gregorian // Calender until the epoch. int julianDay = (((year - 1) ...
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/d7e10284742ade2934a1d2f7548145b029098f79/GregorianCalendar.java/buggy/core/src/classpath/java/java/util/GregorianCalendar.java
public boolean isLeapYear(int year) { if ((year & 3) != 0) // Only years divisible by 4 can be leap years return false; // compute the linear day of the 29. February of that year. // The 13 is the number of days, that were omitted in the Gregorian // Calender until the epoch. int julianDay = (((year - 1) ...
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/d7e10284742ade2934a1d2f7548145b029098f79/GregorianCalendar.java/buggy/core/src/classpath/java/java/util/GregorianCalendar.java
if (!isTimeSet)
if (! isTimeSet)
protected void complete() { if (!isTimeSet) computeTime(); if (!areFieldsSet) computeFields(); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/c65f6a6914005749230b8f31c6890448761cd6f4/Calendar.java/buggy/core/src/classpath/java/java/util/Calendar.java