rem
stringlengths
0
477k
add
stringlengths
0
313k
context
stringlengths
6
599k
meta
stringlengths
141
403
public void setWTime(long time) {
public synchronized void setWTime(long time) {
public void setWTime(long time) { Ext2Utils.set32(data, 48, time); setDirty(true); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/76cdfbaf38c1029347a5829758eac206a20e3b16/Superblock.java/clean/fs/src/fs/org/jnode/fs/ext2/Superblock.java
public void update() throws IOException {
public synchronized void update() throws IOException {
public void update() throws IOException { if(isDirty()) { log.debug("Updating superblock copies"); byte[] oldData; //update the main copy if(getFirstDataBlock()==0) { oldData=fs.getBlock(0); //the block size is an integer multiply of 1024, and if getFirstDataBlock==0, it's //at least 2048 bytes ...
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/76cdfbaf38c1029347a5829758eac206a20e3b16/Superblock.java/clean/fs/src/fs/org/jnode/fs/ext2/Superblock.java
public static synchronized double random() {
public static synchronized double random() {
public static synchronized double random() { if (rand == null) rand = new Random(); return rand.nextDouble(); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/0bfec329053442bf284a75378b15938abd962e63/Math.java/buggy/core/src/classpath/java/java/lang/Math.java
g.fillOval(0, 0, iconSize, iconSize);
g.fillOval(0, 0, ICON_SIZE, ICON_SIZE);
public void paintIcon(Component c, Graphics g, int x, int y) { g.translate(x, y); Color saved = g.getColor(); // Should be purple. g.setColor(Color.RED); g.fillOval(0, 0, iconSize, iconSize); g.setColor(Color.BLACK); g.drawOval(16, 6, 4, 4); Polygon bottomI = new Polygon(new int[] { 15, 15, 13, 13, 23, 23, 2...
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ff4d557efcee4a2c3a25a9cac2252bc626fb10fe/BasicOptionPaneUI.java/buggy/core/src/classpath/javax/javax/swing/plaf/basic/BasicOptionPaneUI.java
g.fillRect(0, 0, iconSize, iconSize);
g.fillRect(0, 0, ICON_SIZE, ICON_SIZE);
public void paintIcon(Component c, Graphics g, int x, int y) { g.translate(x, y); Color saved = g.getColor(); g.setColor(Color.GREEN); g.fillRect(0, 0, iconSize, iconSize); g.setColor(Color.BLACK); g.drawOval(11, 2, 16, 16); g.drawOval(14, 5, 10, 10); g.setColor(Color.GREEN); g.fillRect(0, 10, iconSize, icon...
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ff4d557efcee4a2c3a25a9cac2252bc626fb10fe/BasicOptionPaneUI.java/buggy/core/src/classpath/javax/javax/swing/plaf/basic/BasicOptionPaneUI.java
g.fillRect(0, 10, iconSize, iconSize - 10);
g.fillRect(0, 10, ICON_SIZE, ICON_SIZE - 10);
public void paintIcon(Component c, Graphics g, int x, int y) { g.translate(x, y); Color saved = g.getColor(); g.setColor(Color.GREEN); g.fillRect(0, 0, iconSize, iconSize); g.setColor(Color.BLACK); g.drawOval(11, 2, 16, 16); g.drawOval(14, 5, 10, 10); g.setColor(Color.GREEN); g.fillRect(0, 10, iconSize, icon...
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ff4d557efcee4a2c3a25a9cac2252bc626fb10fe/BasicOptionPaneUI.java/buggy/core/src/classpath/javax/javax/swing/plaf/basic/BasicOptionPaneUI.java
JInternalFrame inf = (JInternalFrame) SwingUtilities.getAncestorOfClass(JInternalFrame.class, optionPane);
JInternalFrame inf = (JInternalFrame) SwingUtilities.getAncestorOfClass( JInternalFrame.class, optionPane);
public void actionPerformed(ActionEvent e) { Object value = new Integer(JOptionPane.CLOSED_OPTION); Object[] options = optionPane.getOptions(); if (options != null) value = new Integer(buttonIndex); else { String text = ((JButton) e.getSource()).getText(); if (text.equals(OK_STRING...
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ff4d557efcee4a2c3a25a9cac2252bc626fb10fe/BasicOptionPaneUI.java/buggy/core/src/classpath/javax/javax/swing/plaf/basic/BasicOptionPaneUI.java
return iconSize;
return ICON_SIZE;
public int getIconHeight() { return iconSize; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ff4d557efcee4a2c3a25a9cac2252bc626fb10fe/BasicOptionPaneUI.java/buggy/core/src/classpath/javax/javax/swing/plaf/basic/BasicOptionPaneUI.java
return iconSize;
return ICON_SIZE;
public int getIconWidth() { return iconSize; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ff4d557efcee4a2c3a25a9cac2252bc626fb10fe/BasicOptionPaneUI.java/buggy/core/src/classpath/javax/javax/swing/plaf/basic/BasicOptionPaneUI.java
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)) resetSelectedValue(); else if (e.getPropertyName().equals(JOptionPane.INITIAL_VALU...
String property = e.getPropertyName(); if (property.equals(JOptionPane.ICON_PROPERTY) || property.equals(JOptionPane.INITIAL_SELECTION_VALUE_PROPERTY) || property.equals(JOptionPane.INITIAL_VALUE_PROPERTY) || property.equals(JOptionPane.MESSAGE_PROPERTY) || property.equals(JOptionPane.MESSAGE_TYPE_PROPERTY) || property...
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/ff4d557efcee4a2c3a25a9cac2252bc626fb10fe/BasicOptionPaneUI.java/buggy/core/src/classpath/javax/javax/swing/plaf/basic/BasicOptionPaneUI.java
Container newButtons = createButtonArea(); optionPane.remove(buttonContainer); optionPane.add(newButtons); buttonContainer = newButtons;
uninstallComponents(); installComponents(); optionPane.validate();
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/ff4d557efcee4a2c3a25a9cac2252bc626fb10fe/BasicOptionPaneUI.java/buggy/core/src/classpath/javax/javax/swing/plaf/basic/BasicOptionPaneUI.java
else if (e.getPropertyName().equals(JOptionPane.MESSAGE_PROPERTY) || e.getPropertyName().equals(JOptionPane.WANTS_INPUT_PROPERTY) || e.getPropertyName().equals(JOptionPane.SELECTION_VALUES_PROPERTY)) { optionPane.remove(messageAreaContainer); messageAreaContainer = createMessageArea(); optionPane.add(messageAreaContai...
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/ff4d557efcee4a2c3a25a9cac2252bc626fb10fe/BasicOptionPaneUI.java/buggy/core/src/classpath/javax/javax/swing/plaf/basic/BasicOptionPaneUI.java
configureLabel(iconLabel);
protected void addIcon(Container top) { JLabel iconLabel = null; Icon icon = getIcon(); if (icon != null) { iconLabel = new JLabel(icon); top.add(iconLabel, BorderLayout.WEST); } }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ff4d557efcee4a2c3a25a9cac2252bc626fb10fe/BasicOptionPaneUI.java/buggy/core/src/classpath/javax/javax/swing/plaf/basic/BasicOptionPaneUI.java
container.add(new JLabel((Icon) msg), cons);
JLabel label = new JLabel((Icon) msg); configureLabel(label); container.add(label, cons);
protected void addMessageComponents(Container container, GridBagConstraints cons, Object msg, int maxll, boolean internallyCreated) { if (msg == null) return; hasCustomComponents = internallyCreated; if (msg instanceof Object[]) ...
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ff4d557efcee4a2c3a25a9cac2252bc626fb10fe/BasicOptionPaneUI.java/buggy/core/src/classpath/javax/javax/swing/plaf/basic/BasicOptionPaneUI.java
addMessageComponents(container, cons, new JLabel(msg.toString()), maxll, true);
{ JLabel label = new JLabel(msg.toString()); configureLabel(label); addMessageComponents(container, cons, label, maxll, true); }
protected void addMessageComponents(Container container, GridBagConstraints cons, Object msg, int maxll, boolean internallyCreated) { if (msg == null) return; hasCustomComponents = internallyCreated; if (msg instanceof Object[]) ...
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ff4d557efcee4a2c3a25a9cac2252bc626fb10fe/BasicOptionPaneUI.java/buggy/core/src/classpath/javax/javax/swing/plaf/basic/BasicOptionPaneUI.java
if ((remainder.length() > maxll || remainder.contains("\n")))
if (remainder.length() > maxll || remainder.contains("\n"))
protected void burstStringInto(Container c, String d, int maxll) { if (d == null || c == null) return; int newlineIndex = d.indexOf('\n'); String line; String remainder; if (newlineIndex >= 0 && newlineIndex < maxll) { line = d.substring(0, newlineIndex); remainder = d.substrin...
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ff4d557efcee4a2c3a25a9cac2252bc626fb10fe/BasicOptionPaneUI.java/buggy/core/src/classpath/javax/javax/swing/plaf/basic/BasicOptionPaneUI.java
c.add(new JLabel(remainder));
JLabel l = new JLabel(remainder); configureLabel(l); c.add(l); }
protected void burstStringInto(Container c, String d, int maxll) { if (d == null || c == null) return; int newlineIndex = d.indexOf('\n'); String line; String remainder; if (newlineIndex >= 0 && newlineIndex < maxll) { line = d.substring(0, newlineIndex); remainder = d.substrin...
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ff4d557efcee4a2c3a25a9cac2252bc626fb10fe/BasicOptionPaneUI.java/buggy/core/src/classpath/javax/javax/swing/plaf/basic/BasicOptionPaneUI.java
Border b = UIManager.getBorder("OptionPane.buttonAreaBorder"); if (b != null) buttonPanel.setBorder(b);
protected Container createButtonArea() { JPanel buttonPanel = new JPanel(); buttonPanel.setLayout(createLayoutManager()); addButtonComponents(buttonPanel, getButtons(), getInitialValueIndex()); return buttonPanel; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ff4d557efcee4a2c3a25a9cac2252bc626fb10fe/BasicOptionPaneUI.java/buggy/core/src/classpath/javax/javax/swing/plaf/basic/BasicOptionPaneUI.java
Border messageBorder = UIManager.getBorder("OptionPane.messageAreaBorder"); if (messageBorder != null) messageArea.setBorder(messageBorder);
protected Container createMessageArea() { JPanel messageArea = new JPanel(); messageArea.setLayout(new BorderLayout()); addIcon(messageArea); JPanel rightSide = new JPanel(); rightSide.setBorder(BorderFactory.createEmptyBorder(10, 10, 10, 10)); rightSide.setLayout(new GridBagLayout()); GridBagCo...
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ff4d557efcee4a2c3a25a9cac2252bc626fb10fe/BasicOptionPaneUI.java/buggy/core/src/classpath/javax/javax/swing/plaf/basic/BasicOptionPaneUI.java
protected Container createSeparator() { // FIXME: Figure out what this method is supposed to return and where // this should be added to the OptionPane. return null; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ff4d557efcee4a2c3a25a9cac2252bc626fb10fe/BasicOptionPaneUI.java/buggy/core/src/classpath/javax/javax/swing/plaf/basic/BasicOptionPaneUI.java
( optionPane.getMessageType() == JOptionPane.QUESTION_MESSAGE ) ?
(optionPane.getMessageType() == JOptionPane.QUESTION_MESSAGE) ?
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/ff4d557efcee4a2c3a25a9cac2252bc626fb10fe/BasicOptionPaneUI.java/buggy/core/src/classpath/javax/javax/swing/plaf/basic/BasicOptionPaneUI.java
hasCustomComponents = false; Container msg = createMessageArea(); if (msg != null) { ((JComponent) msg).setBorder(messageBorder); msg.setForeground(messageForeground); messageAreaContainer = msg; optionPane.add(msg); }
optionPane.add(createMessageArea());
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/ff4d557efcee4a2c3a25a9cac2252bc626fb10fe/BasicOptionPaneUI.java/buggy/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/ff4d557efcee4a2c3a25a9cac2252bc626fb10fe/BasicOptionPaneUI.java/buggy/core/src/classpath/javax/javax/swing/plaf/basic/BasicOptionPaneUI.java
Container button = createButtonArea(); if (button != null) { ((JComponent) button).setBorder(buttonBorder); buttonContainer = button; optionPane.add(button); } optionPane.setBorder(BorderFactory.createEmptyBorder(12, 12, 11, 11)); optionPane.invalidate();
optionPane.add(createButtonArea());
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/ff4d557efcee4a2c3a25a9cac2252bc626fb10fe/BasicOptionPaneUI.java/buggy/core/src/classpath/javax/javax/swing/plaf/basic/BasicOptionPaneUI.java
messageBorder = UIManager.getBorder("OptionPane.messageAreaBorder"); messageForeground = UIManager.getColor("OptionPane.messageForeground"); buttonBorder = UIManager.getBorder("OptionPane.buttonAreaBorder");
protected void installDefaults() { LookAndFeel.installColorsAndFont(optionPane, "OptionPane.background", "OptionPane.foreground", "OptionPane.font"); LookAndFeel.installBorder(optionPane, "OptionPane.border"); optionPane.setOpaque(true)...
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ff4d557efcee4a2c3a25a9cac2252bc626fb10fe/BasicOptionPaneUI.java/buggy/core/src/classpath/javax/javax/swing/plaf/basic/BasicOptionPaneUI.java
throws NotImplementedException
protected void installKeyboardActions() throws NotImplementedException { // FIXME: implement. }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ff4d557efcee4a2c3a25a9cac2252bc626fb10fe/BasicOptionPaneUI.java/buggy/core/src/classpath/javax/javax/swing/plaf/basic/BasicOptionPaneUI.java
Object[] bindings = (Object[]) SharedUIDefaults.get("OptionPane.windowBindings"); InputMap inputMap = LookAndFeel.makeComponentInputMap(optionPane, bindings); SwingUtilities.replaceUIInputMap(optionPane, JComponent.WHEN_IN_FOCUSED_WINDOW, inputMap); SwingUtilities.replaceUIActionMap(optionPane, getActionMap());
protected void installKeyboardActions() throws NotImplementedException { // FIXME: implement. }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ff4d557efcee4a2c3a25a9cac2252bc626fb10fe/BasicOptionPaneUI.java/buggy/core/src/classpath/javax/javax/swing/plaf/basic/BasicOptionPaneUI.java
messageBorder = null; buttonBorder = null; messageForeground = null;
protected void uninstallDefaults() { optionPane.setFont(null); optionPane.setForeground(null); optionPane.setBackground(null); minimumSize = null; messageBorder = null; buttonBorder = null; messageForeground = null; // FIXME: ImageIcons don't seem to work properly /* warningIcon = null;...
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ff4d557efcee4a2c3a25a9cac2252bc626fb10fe/BasicOptionPaneUI.java/buggy/core/src/classpath/javax/javax/swing/plaf/basic/BasicOptionPaneUI.java
throws NotImplementedException
protected void uninstallKeyboardActions() throws NotImplementedException { // FIXME: implement. }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ff4d557efcee4a2c3a25a9cac2252bc626fb10fe/BasicOptionPaneUI.java/buggy/core/src/classpath/javax/javax/swing/plaf/basic/BasicOptionPaneUI.java
SwingUtilities.replaceUIInputMap(optionPane, JComponent. WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, null); SwingUtilities.replaceUIActionMap(optionPane, null);
protected void uninstallKeyboardActions() throws NotImplementedException { // FIXME: implement. }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ff4d557efcee4a2c3a25a9cac2252bc626fb10fe/BasicOptionPaneUI.java/buggy/core/src/classpath/javax/javax/swing/plaf/basic/BasicOptionPaneUI.java
return delimiter;
return (String) ((XMLAttribute) attribHash.get("delimiter")).getAttribValue();
public String getDelimiter() { return delimiter; }
4483 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4483/7b14aeaf462bb0c9a7085ad2f9dbcdebf0fc3916/DelimitedXMLDataIOStyle.java/buggy/src/gov/nasa/gsfc/adc/xdf/DelimitedXMLDataIOStyle.java
return recordTerminator;
return (String) ((XMLAttribute) attribHash.get("recordTerminator")).getAttribValue();
public String getRecordTerminator() { return recordTerminator; }
4483 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4483/7b14aeaf462bb0c9a7085ad2f9dbcdebf0fc3916/DelimitedXMLDataIOStyle.java/buggy/src/gov/nasa/gsfc/adc/xdf/DelimitedXMLDataIOStyle.java
return repeatable;
return (String) ((XMLAttribute) attribHash.get("repeatable")).getAttribValue();
public String getRepeatable() { return repeatable; }
4483 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4483/7b14aeaf462bb0c9a7085ad2f9dbcdebf0fc3916/DelimitedXMLDataIOStyle.java/buggy/src/gov/nasa/gsfc/adc/xdf/DelimitedXMLDataIOStyle.java
attribHash.put("delimiter", new XMLAttribute(new String(" "), Constants.STRING_TYPE)); attribHash.put("repeatable", new XMLAttribute(new String("yes"), Constants.STRING_TYPE)); attribHash.put("recordTerminator", new XMLAttribute(Constants.NEW_LINE, Constants.STRING_TYPE));
attribHash.put("delimiter", new XMLAttribute(DefaultDelimiter, Constants.STRING_TYPE)); attribHash.put("repeatable", new XMLAttribute(DefaultRepeatable, Constants.STRING_TYPE)); attribHash.put("recordTerminator", new XMLAttribute(DefaultRecordTerminator, Constants.STRING_TYPE));
private void init() { classXDFNodeName = "textDelimiter"; attribOrder.add(0,"delimiter"); attribOrder.add(0,"repeatable"); attribOrder.add(0,"recordTerminator"); attribHash.put("delimiter", new XMLAttribute(new String(" "), Constants.STRING_TYPE)); attribHash.put("repeatable", new ...
4483 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4483/7b14aeaf462bb0c9a7085ad2f9dbcdebf0fc3916/DelimitedXMLDataIOStyle.java/buggy/src/gov/nasa/gsfc/adc/xdf/DelimitedXMLDataIOStyle.java
String delimiter = getDelimiter(); String repeatable = getRepeatable(); String recordTerminator = getRecordTerminator();
private void nestedToXDF(OutputStream outputstream, String indent, int which, int stop) { if (which > stop) { if (sPrettyXDFOutput) { writeOut(outputstream, Constants.NEW_LINE); writeOut(outputstream, indent); } writeOut(outputstream, "<" + classXDFNodeName); if (delimiter !=null...
4483 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4483/7b14aeaf462bb0c9a7085ad2f9dbcdebf0fc3916/DelimitedXMLDataIOStyle.java/buggy/src/gov/nasa/gsfc/adc/xdf/DelimitedXMLDataIOStyle.java
public String setDelimiter (String strDelimiter)
public void setDelimiter (String strDelimiter)
public String setDelimiter (String strDelimiter) { delimiter=strDelimiter; return delimiter; }
4483 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4483/7b14aeaf462bb0c9a7085ad2f9dbcdebf0fc3916/DelimitedXMLDataIOStyle.java/buggy/src/gov/nasa/gsfc/adc/xdf/DelimitedXMLDataIOStyle.java
delimiter=strDelimiter; return delimiter;
((XMLAttribute) attribHash.get("delimiter")).setAttribValue(strDelimiter);
public String setDelimiter (String strDelimiter) { delimiter=strDelimiter; return delimiter; }
4483 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4483/7b14aeaf462bb0c9a7085ad2f9dbcdebf0fc3916/DelimitedXMLDataIOStyle.java/buggy/src/gov/nasa/gsfc/adc/xdf/DelimitedXMLDataIOStyle.java
public String setRecordTerminator (String strRecordTerminator)
public void setRecordTerminator (String strRecordTerminator)
public String setRecordTerminator (String strRecordTerminator) { recordTerminator = strRecordTerminator; return recordTerminator; }
4483 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4483/7b14aeaf462bb0c9a7085ad2f9dbcdebf0fc3916/DelimitedXMLDataIOStyle.java/buggy/src/gov/nasa/gsfc/adc/xdf/DelimitedXMLDataIOStyle.java
recordTerminator = strRecordTerminator; return recordTerminator;
((XMLAttribute) attribHash.get("recordTerminator")).setAttribValue(strRecordTerminator);
public String setRecordTerminator (String strRecordTerminator) { recordTerminator = strRecordTerminator; return recordTerminator; }
4483 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4483/7b14aeaf462bb0c9a7085ad2f9dbcdebf0fc3916/DelimitedXMLDataIOStyle.java/buggy/src/gov/nasa/gsfc/adc/xdf/DelimitedXMLDataIOStyle.java
public String setRepeatable (String strIsRepeatable)
public void setRepeatable (String strIsRepeatable)
public String setRepeatable (String strIsRepeatable) { if (!strIsRepeatable.equals("yes") && !strIsRepeatable.equals("no") ) { Log.error("*repeatable* attribute can only be set to yes or no"); Log.error("tend to set as" + strIsRepeatable); Log.error("invalid. ignoring request"); return null; ...
4483 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4483/7b14aeaf462bb0c9a7085ad2f9dbcdebf0fc3916/DelimitedXMLDataIOStyle.java/buggy/src/gov/nasa/gsfc/adc/xdf/DelimitedXMLDataIOStyle.java
if (!strIsRepeatable.equals("yes") && !strIsRepeatable.equals("no") ) { Log.error("*repeatable* attribute can only be set to yes or no"); Log.error("tend to set as" + strIsRepeatable); Log.error("invalid. ignoring request"); return null; } repeatable=strIsRepeatable; return repeatable;
if (!strIsRepeatable.equals("yes") && !strIsRepeatable.equals("no") ) { Log.error("*repeatable* attribute can only be set to yes|no"); Log.error("tend to set as" + strIsRepeatable); Log.error("invalid. ignoring request"); return; } ((XMLAttribute) attribHash.get("repeatable")).setAttribValue(strIsRepeatable);
public String setRepeatable (String strIsRepeatable) { if (!strIsRepeatable.equals("yes") && !strIsRepeatable.equals("no") ) { Log.error("*repeatable* attribute can only be set to yes or no"); Log.error("tend to set as" + strIsRepeatable); Log.error("invalid. ignoring request"); return null; ...
4483 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4483/7b14aeaf462bb0c9a7085ad2f9dbcdebf0fc3916/DelimitedXMLDataIOStyle.java/buggy/src/gov/nasa/gsfc/adc/xdf/DelimitedXMLDataIOStyle.java
this.endOffset = offset + length;
public void insert(int offset, int length, ElementSpec[] data, DefaultDocumentEvent ev) { this.offset = offset; this.length = length; documentEvent = ev; // Push the root and the paragraph at offset onto the element stack. elementStack.clear(); elementStack.pus...
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/a78ab2f492456918e4f5c52be600854882e139fc/DefaultStyledDocument.java/buggy/core/src/classpath/javax/javax/swing/text/DefaultStyledDocument.java
Element[] add = new Element[] {newEl1, newEl2}; Element[] remove = new Element[] {current, next};
Element[] add = new Element[] { newEl1, newEl2 }; Element[] remove = new Element[] { current, next };
private void insertContentTag(ElementSpec tag) { prepareContentInsertion(); int len = tag.getLength(); int dir = tag.getDirection(); if (dir == ElementSpec.JoinPreviousDirection) { // The mauve tests to this class show that a JoinPrevious insertion // does not add any...
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/a78ab2f492456918e4f5c52be600854882e139fc/DefaultStyledDocument.java/buggy/core/src/classpath/javax/javax/swing/text/DefaultStyledDocument.java
private void insertContentTag(ElementSpec tag) { prepareContentInsertion(); int len = tag.getLength(); int dir = tag.getDirection(); if (dir == ElementSpec.JoinPreviousDirection) { // The mauve tests to this class show that a JoinPrevious insertion // does not add any...
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/a78ab2f492456918e4f5c52be600854882e139fc/DefaultStyledDocument.java/buggy/core/src/classpath/javax/javax/swing/text/DefaultStyledDocument.java
Element[] removed;
Element[] removed = new Element[] {current};
private void insertContentTag(ElementSpec tag) { prepareContentInsertion(); int len = tag.getLength(); int dir = tag.getDirection(); if (dir == ElementSpec.JoinPreviousDirection) { // The mauve tests to this class show that a JoinPrevious insertion // does not add any...
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/a78ab2f492456918e4f5c52be600854882e139fc/DefaultStyledDocument.java/buggy/core/src/classpath/javax/javax/swing/text/DefaultStyledDocument.java
private void insertContentTag(ElementSpec tag) { prepareContentInsertion(); int len = tag.getLength(); int dir = tag.getDirection(); if (dir == ElementSpec.JoinPreviousDirection) { // The mauve tests to this class show that a JoinPrevious insertion // does not add any...
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/a78ab2f492456918e4f5c52be600854882e139fc/DefaultStyledDocument.java/buggy/core/src/classpath/javax/javax/swing/text/DefaultStyledDocument.java
added[0] = createLeafElement(paragraph, tag.getAttributes(), offset, offset + length);
added[0] = createLeafElement(paragraph, tagAtts, offset, endOffset);
private void insertContentTag(ElementSpec tag) { prepareContentInsertion(); int len = tag.getLength(); int dir = tag.getDirection(); if (dir == ElementSpec.JoinPreviousDirection) { // The mauve tests to this class show that a JoinPrevious insertion // does not add any...
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/a78ab2f492456918e4f5c52be600854882e139fc/DefaultStyledDocument.java/buggy/core/src/classpath/javax/javax/swing/text/DefaultStyledDocument.java
added[0] = createLeafElement(paragraph, tag.getAttributes(), offset, offset + length);
added[0] = createLeafElement(paragraph, tagAtts, offset, endOffset);
private void insertContentTag(ElementSpec tag) { prepareContentInsertion(); int len = tag.getLength(); int dir = tag.getDirection(); if (dir == ElementSpec.JoinPreviousDirection) { // The mauve tests to this class show that a JoinPrevious insertion // does not add any...
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/a78ab2f492456918e4f5c52be600854882e139fc/DefaultStyledDocument.java/buggy/core/src/classpath/javax/javax/swing/text/DefaultStyledDocument.java
removed = new Element[] { current };
private void insertContentTag(ElementSpec tag) { prepareContentInsertion(); int len = tag.getLength(); int dir = tag.getDirection(); if (dir == ElementSpec.JoinPreviousDirection) { // The mauve tests to this class show that a JoinPrevious insertion // does not add any...
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/a78ab2f492456918e4f5c52be600854882e139fc/DefaultStyledDocument.java/buggy/core/src/classpath/javax/javax/swing/text/DefaultStyledDocument.java
else if (current.getEndOffset() - length == offset)
else if (current.getEndOffset() == endOffset)
private void insertContentTag(ElementSpec tag) { prepareContentInsertion(); int len = tag.getLength(); int dir = tag.getDirection(); if (dir == ElementSpec.JoinPreviousDirection) { // The mauve tests to this class show that a JoinPrevious insertion // does not add any...
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/a78ab2f492456918e4f5c52be600854882e139fc/DefaultStyledDocument.java/buggy/core/src/classpath/javax/javax/swing/text/DefaultStyledDocument.java
added[1] = createLeafElement(paragraph, tag.getAttributes(), offset, offset + length); removed = new Element[] { current };
added[1] = createLeafElement(paragraph, tagAtts, offset, endOffset);
private void insertContentTag(ElementSpec tag) { prepareContentInsertion(); int len = tag.getLength(); int dir = tag.getDirection(); if (dir == ElementSpec.JoinPreviousDirection) { // The mauve tests to this class show that a JoinPrevious insertion // does not add any...
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/a78ab2f492456918e4f5c52be600854882e139fc/DefaultStyledDocument.java/buggy/core/src/classpath/javax/javax/swing/text/DefaultStyledDocument.java
added[1] = createLeafElement(paragraph, tag.getAttributes(), offset, offset + length);
added[1] = createLeafElement(paragraph, tagAtts, offset, endOffset);
private void insertContentTag(ElementSpec tag) { prepareContentInsertion(); int len = tag.getLength(); int dir = tag.getDirection(); if (dir == ElementSpec.JoinPreviousDirection) { // The mauve tests to this class show that a JoinPrevious insertion // does not add any...
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/a78ab2f492456918e4f5c52be600854882e139fc/DefaultStyledDocument.java/buggy/core/src/classpath/javax/javax/swing/text/DefaultStyledDocument.java
removed = new Element[] { current };
private void insertContentTag(ElementSpec tag) { prepareContentInsertion(); int len = tag.getLength(); int dir = tag.getDirection(); if (dir == ElementSpec.JoinPreviousDirection) { // The mauve tests to this class show that a JoinPrevious insertion // does not add any...
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/a78ab2f492456918e4f5c52be600854882e139fc/DefaultStyledDocument.java/buggy/core/src/classpath/javax/javax/swing/text/DefaultStyledDocument.java
return "section";
return SectionElementName;
public String getName() { return "section"; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/a78ab2f492456918e4f5c52be600854882e139fc/DefaultStyledDocument.java/buggy/core/src/classpath/javax/javax/swing/text/DefaultStyledDocument.java
BranchElement paragraph = (BranchElement) createBranchElement(section, null);
BranchElement paragraph = new BranchElement(section, null);
protected AbstractDocument.AbstractElement createDefaultRoot() { Element[] tmp; // FIXME: Create a SecionElement here instead of a BranchElement. // Use createBranchElement() and createLeafElement instead. SectionElement section = new SectionElement(); BranchElement paragraph = (BranchElement) cr...
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/a78ab2f492456918e4f5c52be600854882e139fc/DefaultStyledDocument.java/buggy/core/src/classpath/javax/javax/swing/text/DefaultStyledDocument.java
return (Style) attributes.getResolveParent();
AttributeSet a = attributes.getResolveParent(); if (a instanceof Style) return (Style) a; return null;
public Style getLogicalStyle(int position) { Element paragraph = getParagraphElement(position); AttributeSet attributes = paragraph.getAttributes(); return (Style) attributes.getResolveParent(); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/a78ab2f492456918e4f5c52be600854882e139fc/DefaultStyledDocument.java/buggy/core/src/classpath/javax/javax/swing/text/DefaultStyledDocument.java
for (int i = offset; i < endOffset; ++i)
int segmentEnd = txt.offset + txt.count; for (int i = txt.offset; i < segmentEnd; ++i)
protected void insertUpdate(DefaultDocumentEvent ev, AttributeSet attr) { super.insertUpdate(ev, attr); int offset = ev.getOffset(); int length = ev.getLength(); int endOffset = offset + length; Segment txt = new Segment(); try { getText(offset, length, txt); } catch (BadLocatio...
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/a78ab2f492456918e4f5c52be600854882e139fc/DefaultStyledDocument.java/buggy/core/src/classpath/javax/javax/swing/text/DefaultStyledDocument.java
if (i == endOffset - 1) { if (next.getAttributes().isEqual(attr)) spec.setDirection(ElementSpec.JoinNextDirection); } else if (specs.size() == 0) { if (prev.getAttributes().isEqual(attr)) spec.setDirection(ElementSpec.JoinPreviousDirection); }
protected void insertUpdate(DefaultDocumentEvent ev, AttributeSet attr) { super.insertUpdate(ev, attr); int offset = ev.getOffset(); int length = ev.getLength(); int endOffset = offset + length; Segment txt = new Segment(); try { getText(offset, length, txt); } catch (BadLocatio...
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/a78ab2f492456918e4f5c52be600854882e139fc/DefaultStyledDocument.java/buggy/core/src/classpath/javax/javax/swing/text/DefaultStyledDocument.java
ElementSpec startTag = new ElementSpec(null,
ElementSpec startTag = new ElementSpec(paragraphAttributes,
protected void insertUpdate(DefaultDocumentEvent ev, AttributeSet attr) { super.insertUpdate(ev, attr); int offset = ev.getOffset(); int length = ev.getLength(); int endOffset = offset + length; Segment txt = new Segment(); try { getText(offset, length, txt); } catch (BadLocatio...
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/a78ab2f492456918e4f5c52be600854882e139fc/DefaultStyledDocument.java/buggy/core/src/classpath/javax/javax/swing/text/DefaultStyledDocument.java
offset += len;
protected void insertUpdate(DefaultDocumentEvent ev, AttributeSet attr) { super.insertUpdate(ev, attr); int offset = ev.getOffset(); int length = ev.getLength(); int endOffset = offset + length; Segment txt = new Segment(); try { getText(offset, length, txt); } catch (BadLocatio...
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/a78ab2f492456918e4f5c52be600854882e139fc/DefaultStyledDocument.java/buggy/core/src/classpath/javax/javax/swing/text/DefaultStyledDocument.java
{ ElementSpec spec = new ElementSpec(attr, ElementSpec.ContentType, len);
specs.add(new ElementSpec(attr, ElementSpec.ContentType, len)); ElementSpec last = (ElementSpec) specs.lastElement(); if (next.getAttributes().isEqual(attr)) last.setDirection(ElementSpec.JoinNextDirection);
protected void insertUpdate(DefaultDocumentEvent ev, AttributeSet attr) { super.insertUpdate(ev, attr); int offset = ev.getOffset(); int length = ev.getLength(); int endOffset = offset + length; Segment txt = new Segment(); try { getText(offset, length, txt); } catch (BadLocatio...
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/a78ab2f492456918e4f5c52be600854882e139fc/DefaultStyledDocument.java/buggy/core/src/classpath/javax/javax/swing/text/DefaultStyledDocument.java
if (specs.size() == 0) {
ElementSpec first = (ElementSpec) specs.firstElement();
protected void insertUpdate(DefaultDocumentEvent ev, AttributeSet attr) { super.insertUpdate(ev, attr); int offset = ev.getOffset(); int length = ev.getLength(); int endOffset = offset + length; Segment txt = new Segment(); try { getText(offset, length, txt); } catch (BadLocatio...
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/a78ab2f492456918e4f5c52be600854882e139fc/DefaultStyledDocument.java/buggy/core/src/classpath/javax/javax/swing/text/DefaultStyledDocument.java
spec.setDirection(ElementSpec.JoinPreviousDirection); } else if (next.getAttributes().isEqual(attr)) spec.setDirection(ElementSpec.JoinNextDirection); specs.add(spec); }
first.setDirection(ElementSpec.JoinPreviousDirection);
protected void insertUpdate(DefaultDocumentEvent ev, AttributeSet attr) { super.insertUpdate(ev, attr); int offset = ev.getOffset(); int length = ev.getLength(); int endOffset = offset + length; Segment txt = new Segment(); try { getText(offset, length, txt); } catch (BadLocatio...
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/a78ab2f492456918e4f5c52be600854882e139fc/DefaultStyledDocument.java/buggy/core/src/classpath/javax/javax/swing/text/DefaultStyledDocument.java
new DefaultDocumentEvent(offset, length,
new DefaultDocumentEvent( offset, length,
public void setCharacterAttributes(int offset, int length, AttributeSet attributes, boolean replace) { DefaultDocumentEvent ev = new DefaultDocumentEvent(offset, length, DocumentEvent.EventType.CHANGE); // Modify the element structure so that the interval begins at an element /...
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/a78ab2f492456918e4f5c52be600854882e139fc/DefaultStyledDocument.java/buggy/core/src/classpath/javax/javax/swing/text/DefaultStyledDocument.java
public void setCharacterAttributes(int offset, int length, AttributeSet attributes, boolean replace) { DefaultDocumentEvent ev = new DefaultDocumentEvent(offset, length, DocumentEvent.EventType.CHANGE); // Modify the element structure so that the interval begins at an element /...
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/a78ab2f492456918e4f5c52be600854882e139fc/DefaultStyledDocument.java/buggy/core/src/classpath/javax/javax/swing/text/DefaultStyledDocument.java
int paragraphCount = root.getElementCount(); for (int pindex = 0; pindex < paragraphCount; pindex++)
int end = offset + length; Element curr; for (int pos = offset; pos < end; ) { curr = getCharacterElement(pos); if (pos == curr.getEndOffset()) break; MutableAttributeSet a = (MutableAttributeSet) curr.getAttributes(); ev.addEdit(new AttributeUndoableEdit(curr, attributes, replace)); if (replace) a.removeAttributes(...
public void setCharacterAttributes(int offset, int length, AttributeSet attributes, boolean replace) { DefaultDocumentEvent ev = new DefaultDocumentEvent(offset, length, DocumentEvent.EventType.CHANGE); // Modify the element structure so that the interval begins at an element /...
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/a78ab2f492456918e4f5c52be600854882e139fc/DefaultStyledDocument.java/buggy/core/src/classpath/javax/javax/swing/text/DefaultStyledDocument.java
Element paragraph = root.getElement(pindex); if ((paragraph.getStartOffset() > offset + length) || (paragraph.getEndOffset() < offset)) continue; int contentCount = paragraph.getElementCount(); for (int cindex = 0; cindex < contentCount; cindex++) { Element content = paragraph.getElement(cindex); if ((content.getSt...
writeUnlock();
public void setCharacterAttributes(int offset, int length, AttributeSet attributes, boolean replace) { DefaultDocumentEvent ev = new DefaultDocumentEvent(offset, length, DocumentEvent.EventType.CHANGE); // Modify the element structure so that the interval begins at an element /...
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/a78ab2f492456918e4f5c52be600854882e139fc/DefaultStyledDocument.java/buggy/core/src/classpath/javax/javax/swing/text/DefaultStyledDocument.java
fireChangedUpdate(ev);
public void setCharacterAttributes(int offset, int length, AttributeSet attributes, boolean replace) { DefaultDocumentEvent ev = new DefaultDocumentEvent(offset, length, DocumentEvent.EventType.CHANGE); // Modify the element structure so that the interval begins at an element /...
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/a78ab2f492456918e4f5c52be600854882e139fc/DefaultStyledDocument.java/buggy/core/src/classpath/javax/javax/swing/text/DefaultStyledDocument.java
throw new AssertionError("paragraph elements are expected to be" + "instances of javax.swing.text.AbstractDocument.AbstractElement");
throw new AssertionError("paragraph elements are expected to be" + "instances of AbstractDocument.AbstractElement"); } finally { writeUnlock(); }
public void setLogicalStyle(int position, Style style) { Element el = getParagraphElement(position); if (el instanceof AbstractElement) { AbstractElement ael = (AbstractElement) el; ael.setResolveParent(style); } else throw new AssertionError("paragraph elements are expected to ...
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/a78ab2f492456918e4f5c52be600854882e139fc/DefaultStyledDocument.java/buggy/core/src/classpath/javax/javax/swing/text/DefaultStyledDocument.java
int index = offset; while (index < offset + length)
try
public void setParagraphAttributes(int offset, int length, AttributeSet attributes, boolean replace) { int index = offset; while (index < offset + length) { AbstractElement par = (AbstractElement) getParagraphElement(index); ...
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/a78ab2f492456918e4f5c52be600854882e139fc/DefaultStyledDocument.java/buggy/core/src/classpath/javax/javax/swing/text/DefaultStyledDocument.java
AbstractElement par = (AbstractElement) getParagraphElement(index); AttributeContext ctx = getAttributeContext();
writeLock(); DefaultDocumentEvent ev = new DefaultDocumentEvent ( offset, length, DocumentEvent.EventType.CHANGE); Element rootElement = getDefaultRootElement(); int startElement = rootElement.getElementIndex(offset); int endElement = rootElement.getElementIndex(offset + length - 1); if (endElement < startElem...
public void setParagraphAttributes(int offset, int length, AttributeSet attributes, boolean replace) { int index = offset; while (index < offset + length) { AbstractElement par = (AbstractElement) getParagraphElement(index); ...
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/a78ab2f492456918e4f5c52be600854882e139fc/DefaultStyledDocument.java/buggy/core/src/classpath/javax/javax/swing/text/DefaultStyledDocument.java
par.removeAttributes(par); par.addAttributes(attributes); index = par.getElementCount();
a.removeAttributes(a); a.addAttributes(attributes); } fireChangedUpdate(ev); fireUndoableEditUpdate(new UndoableEditEvent(this, ev)); } finally { writeUnlock();
public void setParagraphAttributes(int offset, int length, AttributeSet attributes, boolean replace) { int index = offset; while (index < offset + length) { AbstractElement par = (AbstractElement) getParagraphElement(index); ...
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/a78ab2f492456918e4f5c52be600854882e139fc/DefaultStyledDocument.java/buggy/core/src/classpath/javax/javax/swing/text/DefaultStyledDocument.java
throw new AssertionError("BadLocationException must not be thrown " + "here. start=" + start + ", end=" + end
AssertionError as; as = new AssertionError("BadLocationException thrown " + "here. start=" + start + ", end=" + end
public LeafElement(Element parent, AttributeSet attributes, int start, int end) { super(parent, attributes); try { startPos = parent.getDocument().createPosition(start); endPos = parent.getDocument().createPosition(end); } catch (BadLocationException ex) { throw new Ass...
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/045a5b41cdfa747889101d3993040acf89788bc4/AbstractDocument.java/buggy/core/src/classpath/javax/javax/swing/text/AbstractDocument.java
as.initCause(ex); throw as; }
public LeafElement(Element parent, AttributeSet attributes, int start, int end) { super(parent, attributes); try { startPos = parent.getDocument().createPosition(start); endPos = parent.getDocument().createPosition(end); } catch (BadLocationException ex) { throw new Ass...
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/045a5b41cdfa747889101d3993040acf89788bc4/AbstractDocument.java/buggy/core/src/classpath/javax/javax/swing/text/AbstractDocument.java
void setParagraphAttributes(int offset, int length, AttributeSet set, boolean replace);
void setParagraphAttributes(int offset, int length, AttributeSet set, boolean replace);
void setParagraphAttributes(int offset, int length, AttributeSet set, boolean replace);
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/963ae61676e8c35a9e0998e0b7de1f942db82a26/StyledDocument.java/buggy/core/src/classpath/javax/javax/swing/text/StyledDocument.java
public String getContentTypeFor(String filename) {
public String getContentTypeFor(String filename) {
public String getContentTypeFor(String filename) { int index = filename.lastIndexOf("."); if (index != -1) { if (index == filename.length()) return ("application/octet-stream"); else filename = filename.substring(index + 1); } String type = (String) mime_types.get(filename); if (type == null) return (...
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/7c463aa3bd840a934d101c434976bb7b25d5b975/MimeTypeMapper.java/clean/core/src/classpath/java/java/net/MimeTypeMapper.java
if (index != -1) {
if (index != -1) {
public String getContentTypeFor(String filename) { int index = filename.lastIndexOf("."); if (index != -1) { if (index == filename.length()) return ("application/octet-stream"); else filename = filename.substring(index + 1); } String type = (String) mime_types.get(filename); if (type == null) return (...
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/7c463aa3bd840a934d101c434976bb7b25d5b975/MimeTypeMapper.java/clean/core/src/classpath/java/java/net/MimeTypeMapper.java
sessions.requestFocus();
void jbInit() throws Exception { // make it non resizable setResizable(true); this.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE); // create some reusable borders and layouts Border etchedBorder = BorderFactory.createEtchedBorder(); BorderLayout borderLayout = new BorderLayout(); ...
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/ec83ee5cb44579b417e5f46e342abb6c99c93d78/Connect.java/clean/tn5250j/src/org/tn5250j/Connect.java
updateColorSelection(newSelection);
private void applyAttributes() { if (!getStringProperty("font").equals( (String)fontsList.getSelectedItem()) ) { changes.firePropertyChange("font", getStringProperty("font"), (String)fontsList.getSelectedItem()); setProper...
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/bc7e11ab017c3feeba41d87e99dba276258b7c41/SessionAttributes.java/clean/tn5250j/src/org/tn5250j/SessionAttributes.java
if (defaultPrinter.isSelected()) { changes.firePropertyChange("defaultPrinter", getStringProperty("defaultPrinter"), "Yes"); setProperty("defaultPrinter","Yes"); } else { changes.firePropertyChange("defaultPrinter", getStringProperty("defaultPrinter"), "No"); setProperty("defaultPrinter","No"); }
private void applyAttributes() { if (!getStringProperty("font").equals( (String)fontsList.getSelectedItem()) ) { changes.firePropertyChange("font", getStringProperty("font"), (String)fontsList.getSelectedItem()); setProper...
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/bc7e11ab017c3feeba41d87e99dba276258b7c41/SessionAttributes.java/clean/tn5250j/src/org/tn5250j/SessionAttributes.java
attrib = new DefaultMutableTreeNode(LangTool.getString("sa.nodePrinter")); top.add(attrib);
private void createNodes(DefaultMutableTreeNode top) { DefaultMutableTreeNode attrib = null; attrib = new DefaultMutableTreeNode(LangTool.getString("sa.nodeColors")); top.add(attrib); attrib = new DefaultMutableTreeNode(LangTool.getString("sa.nodeDisplay")); top.add(attrib); ...
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/bc7e11ab017c3feeba41d87e99dba276258b7c41/SessionAttributes.java/clean/tn5250j/src/org/tn5250j/SessionAttributes.java
updateColorSelection(newSelection);
if (newSelection.equals(LangTool.getString("sa.bg"))) { jcc.setColor(getColorProperty("colorBg")); } if (newSelection.equals(LangTool.getString("sa.blue"))) { jcc.setColor(getColorProperty("colorBlue")); } if (newSelection.equals(LangTool.getString("sa.red"))) { jcc.setColor(getColorProperty("colorRed")); } if (newSel...
private void jbInit() throws Exception { changes = new PropertyChangeSupport(this); Dimension ps = null; // fonts Font[] fonts = GraphicsEnvironment.getLocalGraphicsEnvironment().getAllFonts(); // define fonts panel final JPanel fp = new JPanel(); fp.setLayout(new BorderLayout());...
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/bc7e11ab017c3feeba41d87e99dba276258b7c41/SessionAttributes.java/clean/tn5250j/src/org/tn5250j/SessionAttributes.java
if (nodeInfo.toString().equals(LangTool.getString("sa.nodePrinter"))) { jp.removeAll(); jp.add(pp,BorderLayout.CENTER); jp.setPreferredSize(cpp.getPreferredSize()); jp.validate(); jpm.repaint(); }
private void jbInit() throws Exception { changes = new PropertyChangeSupport(this); Dimension ps = null; // fonts Font[] fonts = GraphicsEnvironment.getLocalGraphicsEnvironment().getAllFonts(); // define fonts panel final JPanel fp = new JPanel(); fp.setLayout(new BorderLayout());...
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/bc7e11ab017c3feeba41d87e99dba276258b7c41/SessionAttributes.java/clean/tn5250j/src/org/tn5250j/SessionAttributes.java
updateColorSelection(newSelection);
if (newSelection.equals(LangTool.getString("sa.bg"))) { jcc.setColor(getColorProperty("colorBg")); } if (newSelection.equals(LangTool.getString("sa.blue"))) { jcc.setColor(getColorProperty("colorBlue")); } if (newSelection.equals(LangTool.getString("sa.red"))) { jcc.setColor(getColorProperty("colorRed")); } if (newSel...
public void actionPerformed(ActionEvent e) { JComboBox cb = (JComboBox)e.getSource(); String newSelection = (String)cb.getSelectedItem(); updateColorSelection(newSelection); }
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/bc7e11ab017c3feeba41d87e99dba276258b7c41/SessionAttributes.java/clean/tn5250j/src/org/tn5250j/SessionAttributes.java
if (nodeInfo.toString().equals(LangTool.getString("sa.nodePrinter"))) { jp.removeAll(); jp.add(pp,BorderLayout.CENTER); jp.setPreferredSize(cpp.getPreferredSize()); jp.validate(); jpm.repaint(); }
public void valueChanged(TreeSelectionEvent e) { DefaultMutableTreeNode node = (DefaultMutableTreeNode) tree.getLastSelectedPathComponent(); if (node == null) return; Object nodeInfo = node.getUserObject(); if (nodeInfo.to...
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/bc7e11ab017c3feeba41d87e99dba276258b7c41/SessionAttributes.java/clean/tn5250j/src/org/tn5250j/SessionAttributes.java
throw new BAD_OPERATION();
BAD_OPERATION bad = new BAD_OPERATION(); bad.initCause(ex); bad.minor = Minor.Any; throw bad;
public static NotFoundReason extract(Any a) { try { return ((NotFoundReasonHolder) a.extract_Streamable()).value; } catch (ClassCastException ex) { throw new BAD_OPERATION(); } }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/44e3ea509d80974dab547c4d1cf8c070d32bac86/NotFoundReasonHelper.java/buggy/core/src/classpath/org/org/omg/CosNaming/NamingContextPackage/NotFoundReasonHelper.java
super ("US-ASCII", new String[]{"ISO646-US"});
/* Canonical charset name chosen according to: * http: */ super ("US-ASCII", new String[] { /* These names are provided by * http: */ "iso-ir-6", "ANSI_X3.4-1986", "ISO_646.irv:1991", "ASCII", "ISO646-US", "ASCII", "us", "IBM367", "cp367", "csASCII", /* These names are provided by * http: */ "ANSI_X3.4-1968", "iso_646....
US_ASCII () { super ("US-ASCII", new String[]{"ISO646-US"}); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/d7e10284742ade2934a1d2f7548145b029098f79/US_ASCII.java/buggy/core/src/classpath/gnu/gnu/java/nio/charset/US_ASCII.java
bad.minor = Minor.Activation;
public final org.omg.CORBA.Object _this_object(ORB an_orb) { if (delegate != null) return delegate.this_object(this); else { if (an_orb instanceof ORB_1_4) { ORB_1_4 m_orb = (ORB_1_4) an_orb; gnuPOA dp = (gnuPOA) _default_POA(); if (dp == null) ...
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/44e3ea509d80974dab547c4d1cf8c070d32bac86/Servant.java/buggy/core/src/classpath/org/org/omg/PortableServer/Servant.java
g.setColor(darkShadow); g.drawRect(x, y, w - 2, h - 2);
if (c.isEnabled()) { g.setColor(darkShadow); g.drawRect(x, y, w - 2, h - 2);
public void paintBorder(Component c, Graphics g, int x, int y, int w, int h) { ButtonModel bmodel = null; if (c instanceof AbstractButton) bmodel = ((AbstractButton) c).getModel(); Color darkShadow = MetalLookAndFeel.getControlDarkShadow(); Color shadow...
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/MetalBorders.java/clean/core/src/classpath/javax/javax/swing/plaf/metal/MetalBorders.java
if (!bmodel.isPressed())
if (!bmodel.isPressed()) { g.setColor(light); g.drawRect(x + 1, y + 1, w - 2, h - 2); g.setColor(middle); g.drawRect(x + 1, y + h - 2, 0, 0); g.drawRect(x + w - 2, y + 1, 0, 0); } else { g.setColor(light); g.drawLine(x + w - 1, y + 1, x + w - 1, y + h - 1); g.drawLine(x + 1, y + h - 1, x + w - 1, y + h - 1); g.se...
public void paintBorder(Component c, Graphics g, int x, int y, int w, int h) { ButtonModel bmodel = null; if (c instanceof AbstractButton) bmodel = ((AbstractButton) c).getModel(); Color darkShadow = MetalLookAndFeel.getControlDarkShadow(); Color shadow...
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/MetalBorders.java/clean/core/src/classpath/javax/javax/swing/plaf/metal/MetalBorders.java
g.setColor(light); g.drawRect(x + 1, y + 1, w - 2, h - 2); g.setColor(middle); g.drawRect(x + 1, y + h - 2, 0, 0); g.drawRect(x + w - 2, y + 1, 0, 0); } else { g.setColor(light); g.drawLine(x + w - 1, y + 1, x + w - 1, y + h - 1); g.drawLine(x + 1, y + h - 1, x + w - 1, y + h - 1); g.setColor(middle); g.drawLine(...
g.setColor(MetalLookAndFeel.getInactiveControlTextColor()); g.drawRect(x, y, w - 2, h - 2);
public void paintBorder(Component c, Graphics g, int x, int y, int w, int h) { ButtonModel bmodel = null; if (c instanceof AbstractButton) bmodel = ((AbstractButton) c).getModel(); Color darkShadow = MetalLookAndFeel.getControlDarkShadow(); Color shadow...
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/MetalBorders.java/clean/core/src/classpath/javax/javax/swing/plaf/metal/MetalBorders.java
g.setColor(MetalLookAndFeel.getControl());
if (f.isSelected()) g.setColor(MetalLookAndFeel.getPrimaryControlShadow()); else g.setColor(MetalLookAndFeel.getControlShadow());
public void paintBorder(Component c, Graphics g, int x, int y, int w, int h) { JInternalFrame f = (JInternalFrame) c; if (f.isSelected()) g.setColor(MetalLookAndFeel.getPrimaryControlDarkShadow()); else g.setColor(MetalLookAndFeel.getControlDarkShadow()); /...
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/MetalBorders.java/clean/core/src/classpath/javax/javax/swing/plaf/metal/MetalBorders.java
{ if (c.isEnabled())
{ JTextComponent tc = (JTextComponent) c; if (tc.isEnabled() && tc.isEditable())
public void paintBorder(Component c, Graphics g, int x, int y, int w, int h) { if (c.isEnabled()) super.paintBorder(c, g, x, y, w, h); else { Color savedColor = g.getColor(); g.setColor(MetalLookAndFeel.getControlShadow()); g.drawRect(x, y, w - 1...
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/MetalBorders.java/clean/core/src/classpath/javax/javax/swing/plaf/metal/MetalBorders.java
if (isRootPaneCheckingEnabled()) throw new Error("rootPaneChecking is enabled - adding components disallowed.");
if (comp == rootPane)
protected void addImpl(Component comp, Object constraints, int index) { if (isRootPaneCheckingEnabled()) throw new Error("rootPaneChecking is enabled - adding components disallowed."); super.addImpl(comp, constraints, index); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/159638d634951eb718c5e3a0917ef516d5a44797/JDialog.java/clean/core/src/classpath/javax/javax/swing/JDialog.java
else { if (isRootPaneCheckingEnabled()) throw new Error("Do not add directly to JDialog." + " Use getContentPane().add instead."); getContentPane().add(comp, constraints, index); }
protected void addImpl(Component comp, Object constraints, int index) { if (isRootPaneCheckingEnabled()) throw new Error("rootPaneChecking is enabled - adding components disallowed."); super.addImpl(comp, constraints, index); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/159638d634951eb718c5e3a0917ef516d5a44797/JDialog.java/clean/core/src/classpath/javax/javax/swing/JDialog.java
setRootPaneCheckingEnabled(false);
protected void dialogInit() { // FIXME: Do a check on GraphicsEnvironment.isHeadless() setRootPaneCheckingEnabled(false); setLocale(JComponent.getDefaultLocale()); getRootPane(); // will do set/create setRootPaneCheckingEnabled(true); invalidate(); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/159638d634951eb718c5e3a0917ef516d5a44797/JDialog.java/clean/core/src/classpath/javax/javax/swing/JDialog.java
getRootPane(); setRootPaneCheckingEnabled(true);
getRootPane();
protected void dialogInit() { // FIXME: Do a check on GraphicsEnvironment.isHeadless() setRootPaneCheckingEnabled(false); setLocale(JComponent.getDefaultLocale()); getRootPane(); // will do set/create setRootPaneCheckingEnabled(true); invalidate(); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/159638d634951eb718c5e3a0917ef516d5a44797/JDialog.java/clean/core/src/classpath/javax/javax/swing/JDialog.java
initStageDone = true;
protected void dialogInit() { // FIXME: Do a check on GraphicsEnvironment.isHeadless() setRootPaneCheckingEnabled(false); setLocale(JComponent.getDefaultLocale()); getRootPane(); // will do set/create setRootPaneCheckingEnabled(true); invalidate(); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/159638d634951eb718c5e3a0917ef516d5a44797/JDialog.java/clean/core/src/classpath/javax/javax/swing/JDialog.java
public void remove(Component comp) { // The path changes if the component == root. if (comp == rootPane) super.remove(rootPane); else getContentPane().remove(comp); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/159638d634951eb718c5e3a0917ef516d5a44797/JDialog.java/clean/core/src/classpath/javax/javax/swing/JDialog.java
if (operation == DO_NOTHING_ON_CLOSE || operation == HIDE_ON_CLOSE || operation == DISPOSE_ON_CLOSE)
/* Reference implementation allows invalid operations to be specified. If so, getDefaultCloseOperation must return the invalid code, and the behaviour defaults to DO_NOTHING_ON_CLOSE. processWindowEvent above handles this */
public void setDefaultCloseOperation(int operation) { if (operation == DO_NOTHING_ON_CLOSE || operation == HIDE_ON_CLOSE || operation == DISPOSE_ON_CLOSE) close_action = operation; else // accept illegal value and set the property to the default value, // that's what the reference implementa...
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/159638d634951eb718c5e3a0917ef516d5a44797/JDialog.java/clean/core/src/classpath/javax/javax/swing/JDialog.java