rem
stringlengths
0
477k
add
stringlengths
0
313k
context
stringlengths
6
599k
meta
stringlengths
141
403
public FSEntry addDirectory(String name) throws IOException { if(isReadOnly()) throw new IOException("Filesystem or directory is mounted read-only!"); //create a new iNode for the file //TODO: access rights, file type, UID and GID should be passed through the FSDirectory interface INode newINode; Ext2Direct...
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/76cdfbaf38c1029347a5829758eac206a20e3b16/Ext2Directory.java/buggy/fs/src/fs/org/jnode/fs/ext2/Ext2Directory.java
synchronized(parentINode) { parentINode.setLinksCount( parentINode.getLinksCount()+1 ); }
parentINode.setLinksCount( parentINode.getLinksCount()+1 );
public FSEntry addDirectory(String name) throws IOException { if(isReadOnly()) throw new IOException("Filesystem or directory is mounted read-only!"); //create a new iNode for the file //TODO: access rights, file type, UID and GID should be passed through the FSDirectory interface INode newINode; Ext2Direct...
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/76cdfbaf38c1029347a5829758eac206a20e3b16/Ext2Directory.java/buggy/fs/src/fs/org/jnode/fs/ext2/Ext2Directory.java
private void addDirectoryRecord(Ext2DirectoryRecord dr) throws IOException, FileSystemException{
private synchronized void addDirectoryRecord(Ext2DirectoryRecord dr) throws IOException, FileSystemException{
private void addDirectoryRecord(Ext2DirectoryRecord dr) throws IOException, FileSystemException{ Ext2File dir = new Ext2File(iNode); //read itself as a file //find the last directory record (if any) Ext2FSEntryIterator iterator = (Ext2FSEntryIterator)iterator(); Ext2DirectoryRecord rec=null; while(iterator.hasNe...
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/76cdfbaf38c1029347a5829758eac206a20e3b16/Ext2Directory.java/buggy/fs/src/fs/org/jnode/fs/ext2/Ext2Directory.java
private void addDirectoryRecord(Ext2DirectoryRecord dr) throws IOException, FileSystemException{ Ext2File dir = new Ext2File(iNode); //read itself as a file //find the last directory record (if any) Ext2FSEntryIterator iterator = (Ext2FSEntryIterator)iterator(); Ext2DirectoryRecord rec=null; while(iterator.hasNe...
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/76cdfbaf38c1029347a5829758eac206a20e3b16/Ext2Directory.java/buggy/fs/src/fs/org/jnode/fs/ext2/Ext2Directory.java
public FSEntry addFile(String name) throws IOException {
public synchronized FSEntry addFile(String name) throws IOException {
public FSEntry addFile(String name) throws IOException { if(isReadOnly()) throw new IOException("Filesystem or directory is mounted read-only!"); //create a new iNode for the file //TODO: access rights, file type, UID and GID should be passed through the FSDirectory interface INode newINode; Ext2DirectoryRec...
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/76cdfbaf38c1029347a5829758eac206a20e3b16/Ext2Directory.java/buggy/fs/src/fs/org/jnode/fs/ext2/Ext2Directory.java
public FSEntry addFile(String name) throws IOException { if(isReadOnly()) throw new IOException("Filesystem or directory is mounted read-only!"); //create a new iNode for the file //TODO: access rights, file type, UID and GID should be passed through the FSDirectory interface INode newINode; Ext2DirectoryRec...
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/76cdfbaf38c1029347a5829758eac206a20e3b16/Ext2Directory.java/buggy/fs/src/fs/org/jnode/fs/ext2/Ext2Directory.java
public FSEntry addFile(String name) throws IOException { if(isReadOnly()) throw new IOException("Filesystem or directory is mounted read-only!"); //create a new iNode for the file //TODO: access rights, file type, UID and GID should be passed through the FSDirectory interface INode newINode; Ext2DirectoryRec...
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/76cdfbaf38c1029347a5829758eac206a20e3b16/Ext2Directory.java/buggy/fs/src/fs/org/jnode/fs/ext2/Ext2Directory.java
protected FSEntry addINode(int iNodeNr, String linkName, int fileType) throws IOException { if(isReadOnly()) throw new IOException("Filesystem or directory is mounted read-only!"); //TODO: access rights, file type, UID and GID should be passed through the FSDirectory interface Ext2DirectoryRecord dr; try{ d...
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/76cdfbaf38c1029347a5829758eac206a20e3b16/Ext2Directory.java/buggy/fs/src/fs/org/jnode/fs/ext2/Ext2Directory.java
public FSEntry getEntry(String name) throws IOException{
public synchronized FSEntry getEntry(String name) throws IOException{
public FSEntry getEntry(String name) throws IOException{ //parse the directory and search for the file FSEntryIterator iterator=iterator(); while(iterator.hasNext()) { FSEntry entry = iterator.next(); if(entry.getName().equals(name)) return entry; } return null; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/76cdfbaf38c1029347a5829758eac206a20e3b16/Ext2Directory.java/buggy/fs/src/fs/org/jnode/fs/ext2/Ext2Directory.java
protected Rectangle modelToView(int position, Shape a, Position.Bias bias)
public Shape modelToView(int position, Shape a, Position.Bias bias)
protected Rectangle modelToView(int position, Shape a, Position.Bias bias) throws BadLocationException { return ((PlainView) view).modelToView(position, a, bias).getBounds(); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/53b78dd1e4587254262f4618d2aa7551de8e0cbf/BasicTextUI.java/clean/core/src/classpath/javax/javax/swing/plaf/basic/BasicTextUI.java
if (view == null) return null;
protected Rectangle modelToView(int position, Shape a, Position.Bias bias) throws BadLocationException { return ((PlainView) view).modelToView(position, a, bias).getBounds(); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/53b78dd1e4587254262f4618d2aa7551de8e0cbf/BasicTextUI.java/clean/core/src/classpath/javax/javax/swing/plaf/basic/BasicTextUI.java
public View create(Element elem) { // subclasses have to implement this to get this functionality return null; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/53b78dd1e4587254262f4618d2aa7551de8e0cbf/BasicTextUI.java/clean/core/src/classpath/javax/javax/swing/plaf/basic/BasicTextUI.java
textComponent = null;
public void uninstallUI(final JComponent component) { super.uninstallUI(component); rootView.setView(null); textComponent.removePropertyChangeListener(updateHandler); textComponent = null; uninstallDefaults(); uninstallListeners(); uninstallKeyboardActions(); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/53b78dd1e4587254262f4618d2aa7551de8e0cbf/BasicTextUI.java/clean/core/src/classpath/javax/javax/swing/plaf/basic/BasicTextUI.java
textComponent = null;
public void uninstallUI(final JComponent component) { super.uninstallUI(component); rootView.setView(null); textComponent.removePropertyChangeListener(updateHandler); textComponent = null; uninstallDefaults(); uninstallListeners(); uninstallKeyboardActions(); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/53b78dd1e4587254262f4618d2aa7551de8e0cbf/BasicTextUI.java/clean/core/src/classpath/javax/javax/swing/plaf/basic/BasicTextUI.java
public void paintIcon(Component c, Graphics g, int x, int y) { // TODO: work out whether/how the icon changes with different component // states (and also different metal themes) Color savedColor = g.getColor(); g.setColor(Color.black); for (int i = 0; i < 5; i++) g.drawLine(x + i, y + i, x...
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/MetalComboBoxIcon.java/clean/core/src/classpath/javax/javax/swing/plaf/metal/MetalComboBoxIcon.java
g.setColor(Color.black);
if (c.isEnabled()) g.setColor(MetalLookAndFeel.getBlack()); else g.setColor(MetalLookAndFeel.getControlDisabled());
public void paintIcon(Component c, Graphics g, int x, int y) { // TODO: work out whether/how the icon changes with different component // states (and also different metal themes) Color savedColor = g.getColor(); g.setColor(Color.black); for (int i = 0; i < 5; i++) g.drawLine(x + i, y + i, x...
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/MetalComboBoxIcon.java/clean/core/src/classpath/javax/javax/swing/plaf/metal/MetalComboBoxIcon.java
if (c > Byte.MAX_VALUE)
if (c > 0x7f)
protected CoderResult encodeLoop (CharBuffer in, ByteBuffer out) { // TODO: Optimize this in the case in.hasArray() / out.hasArray() while (in.hasRemaining ()) { char c = in.get (); if (c > Byte.MAX_VALUE) { in.position (in.position () - 1); return Code...
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/c6bd4d63622475fff01c1920f223e404234d976f/US_ASCII.java/clean/core/src/classpath/gnu/gnu/java/nio/charset/US_ASCII.java
v.setParent(null);
v.setParent(this);
public void setView(View v) { if (view != null) view.setParent(null); if (v != null) v.setParent(null); view = v; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/70a2876c99036463feada99a37295405c146f49b/BasicTextUI.java/clean/core/src/classpath/javax/javax/swing/plaf/basic/BasicTextUI.java
if (highlighter != null && textComponent.getSelectionStart() != textComponent.getSelectionEnd())
if (highlighter != null) { Color oldColor = g.getColor();
protected void paintSafely(Graphics g) { Caret caret = textComponent.getCaret(); Highlighter highlighter = textComponent.getHighlighter(); if (textComponent.isOpaque()) paintBackground(g); if (highlighter != null && textComponent.getSelectionStart() != textComponent.getSelectionEnd()) h...
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/70a2876c99036463feada99a37295405c146f49b/BasicTextUI.java/clean/core/src/classpath/javax/javax/swing/plaf/basic/BasicTextUI.java
g.setColor(oldColor); }
protected void paintSafely(Graphics g) { Caret caret = textComponent.getCaret(); Highlighter highlighter = textComponent.getHighlighter(); if (textComponent.isOpaque()) paintBackground(g); if (highlighter != null && textComponent.getSelectionStart() != textComponent.getSelectionEnd()) h...
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/70a2876c99036463feada99a37295405c146f49b/BasicTextUI.java/clean/core/src/classpath/javax/javax/swing/plaf/basic/BasicTextUI.java
view.setParent(rootView);
protected final void setView(View view) { rootView.setView(view); view.setParent(rootView); textComponent.revalidate(); textComponent.repaint(); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/70a2876c99036463feada99a37295405c146f49b/BasicTextUI.java/clean/core/src/classpath/javax/javax/swing/plaf/basic/BasicTextUI.java
public static void main(String[] args) {
public static void main(String[] args) throws SyntaxErrorException {
public static void main(String[] args) { ParsedArguments cmdLine = HELP_INFO.parse(args); String key = ARG_KEY.getValue(cmdLine); String value = ARG_VALUE.getValue(cmdLine); System.getProperties().setProperty(key, value); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/8475fed231619f209c4398ccad2ba966899e292d/SetCommand.java/clean/shell/src/shell/org/jnode/shell/command/SetCommand.java
jComponent.setLayout(new SwingContainerLayout(this));
public SwingPanelPeer(SwingToolkit toolkit, Panel panel) { super(toolkit, panel, new SwingPanel(panel)); final SwingPanel jPanel = (SwingPanel) jComponent; SwingToolkit.add(panel, jPanel); SwingToolkit.copyAwtProperties(panel, jPanel); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/c772b17b7fb843d3870d0fbcde37f457a2948dbf/SwingPanelPeer.java/buggy/gui/src/awt/org/jnode/awt/swingpeers/SwingPanelPeer.java
public void propertyChange(PropertyChangeEvent event) { }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/963ae61676e8c35a9e0998e0b7de1f942db82a26/BasicRootPaneUI.java/buggy/core/src/classpath/javax/javax/swing/plaf/basic/BasicRootPaneUI.java
public ContentHandler() { }
public ContentHandler() { }
public ContentHandler() { }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/7c463aa3bd840a934d101c434976bb7b25d5b975/ContentHandler.java/buggy/core/src/classpath/java/java/net/ContentHandler.java
fireIntervalAdded(this, list.size(), list.size());
fireIntervalAdded(this, list.size() - 1, list.size());
public void addElement(Object object) { list.add(object); fireIntervalAdded(this, list.size(), list.size()); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/c5671ff077399b85034dffa0f9635da50cef54a9/DefaultComboBoxModel.java/clean/core/src/classpath/javax/javax/swing/DefaultComboBoxModel.java
list.clear(); fireIntervalAdded(this, 0, listSize - 1);
fireIntervalAdded(this, 0, listSize);
public void removeAllElements() { int listSize = getSize(); list.clear(); fireIntervalAdded(this, 0, listSize - 1); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/c5671ff077399b85034dffa0f9635da50cef54a9/DefaultComboBoxModel.java/clean/core/src/classpath/javax/javax/swing/DefaultComboBoxModel.java
bad.minor = Minor.Any;
public static InvalidPolicy extract(Any any) { try { return ((InvalidPolicyHolder) any.extract_Streamable()).value; } catch (ClassCastException cex) { BAD_OPERATION bad = new BAD_OPERATION("InvalidPolicy expected"); bad.initCause(cex); throw bad; } }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/44e3ea509d80974dab547c4d1cf8c070d32bac86/InvalidPolicyHelper.java/buggy/core/src/classpath/org/org/omg/PortableServer/POAPackage/InvalidPolicyHelper.java
int location = e.getKeyLocation();
protected void displayInfo(KeyEvent e, String s){ String charString, keyCodeString, modString, tmpString,isString,locString; char c = e.getKeyChar(); int keyCode = e.getKeyCode(); int modifiers = e.getModifiers(); int location = e.getKeyLocation(); if (Character.isISOCon...
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/3407f8282dc92431059c1c7f5f4f488cf416d272/KeyConfigure.java/clean/tn5250j/src/org/tn5250j/tools/KeyConfigure.java
switch (location) { case KeyEvent.KEY_LOCATION_LEFT: locString = "location = " + location + " (LEFT)"; break; case KeyEvent.KEY_LOCATION_NUMPAD: locString = "location = " + location + " (NUM_PAD)"; break; case KeyEvent.KEY_LOCATION_RIGHT: locString = "location = " + location + " (RIGHT)"; break; case KeyEvent.KEY_LOCAT...
locString = "location = (UNKNOWN)";
protected void displayInfo(KeyEvent e, String s){ String charString, keyCodeString, modString, tmpString,isString,locString; char c = e.getKeyChar(); int keyCode = e.getKeyCode(); int modifiers = e.getModifiers(); int location = e.getKeyLocation(); if (Character.isISOCon...
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/3407f8282dc92431059c1c7f5f4f488cf416d272/KeyConfigure.java/clean/tn5250j/src/org/tn5250j/tools/KeyConfigure.java
dispatchThread.interrupt ();
((ClasspathToolkit) Toolkit.getDefaultToolkit()).wakeNativeQueue(); setShutdown(true);
protected void pop() throws EmptyStackException { if (prev == null) throw new EmptyStackException(); /* The order is important here, we must get the prev lock first, or deadlock could occur as callers usually get here following prev's next pointer, and thus obtain prev's lock before trying to...
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/b0bcdc7c5655d1ed77837894a9de15b7556d346b/EventQueue.java/buggy/core/src/classpath/java/java/awt/EventQueue.java
this.notifyAll();
protected void pop() throws EmptyStackException { if (prev == null) throw new EmptyStackException(); /* The order is important here, we must get the prev lock first, or deadlock could occur as callers usually get here following prev's next pointer, and thus obtain prev's lock before trying to...
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/b0bcdc7c5655d1ed77837894a9de15b7556d346b/EventQueue.java/buggy/core/src/classpath/java/java/awt/EventQueue.java
updateChildRequirements(axis); updateRequirements(axis);
int totalAscent = (int) (span * getAlignment(axis)); int totalDescent = span - totalAscent;
protected void baselineLayout(int span, int axis, int[] offsets, int[] spans) { updateChildRequirements(axis); updateRequirements(axis); // Calculate the spans and offsets using the SizeRequirements uility // methods. SizeRequirements.calculateAlignedPositions(span, requ...
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ff4d557efcee4a2c3a25a9cac2252bc626fb10fe/BoxView.java/clean/core/src/classpath/javax/javax/swing/text/BoxView.java
SizeRequirements.calculateAlignedPositions(span, requirements[axis], childReqs[axis], offsets, spans);
int count = getViewCount(); for (int i = 0; i < count; i++) { View v = getView(i); float align = v.getAlignment(axis); int viewSpan; if (v.getResizeWeight(axis) > 0) { int min = (int) v.getMinimumSpan(axis); int max = (int) v.getMaximumSpan(axis); if (align == 0.0F) viewSpan = Math.max(Math.min(max, totalDescent), min...
protected void baselineLayout(int span, int axis, int[] offsets, int[] spans) { updateChildRequirements(axis); updateRequirements(axis); // Calculate the spans and offsets using the SizeRequirements uility // methods. SizeRequirements.calculateAlignedPositions(span, requ...
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ff4d557efcee4a2c3a25a9cac2252bc626fb10fe/BoxView.java/clean/core/src/classpath/javax/javax/swing/text/BoxView.java
updateChildRequirements(axis);
if (sr == null) sr = new SizeRequirements(); sr.alignment = 0.5F;
protected SizeRequirements baselineRequirements(int axis, SizeRequirements sr) { updateChildRequirements(axis); SizeRequirements res = sr; if (res == null) res = new SizeRequirements(); float minLeft = 0; float minRight = 0; float prefLeft = 0; ...
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ff4d557efcee4a2c3a25a9cac2252bc626fb10fe/BoxView.java/clean/core/src/classpath/javax/javax/swing/text/BoxView.java
SizeRequirements res = sr; if (res == null) res = new SizeRequirements();
int totalAscentMin = 0; int totalAscentPref = 0; int totalAscentMax = 0; int totalDescentMin = 0; int totalDescentPref = 0; int totalDescentMax = 0;
protected SizeRequirements baselineRequirements(int axis, SizeRequirements sr) { updateChildRequirements(axis); SizeRequirements res = sr; if (res == null) res = new SizeRequirements(); float minLeft = 0; float minRight = 0; float prefLeft = 0; ...
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ff4d557efcee4a2c3a25a9cac2252bc626fb10fe/BoxView.java/clean/core/src/classpath/javax/javax/swing/text/BoxView.java
float minLeft = 0; float minRight = 0; float prefLeft = 0; float prefRight = 0; float maxLeft = 0; float maxRight = 0; for (int i = 0; i < childReqs[axis].length; i++)
int count = getViewCount(); for (int i = 0; i < count; i++)
protected SizeRequirements baselineRequirements(int axis, SizeRequirements sr) { updateChildRequirements(axis); SizeRequirements res = sr; if (res == null) res = new SizeRequirements(); float minLeft = 0; float minRight = 0; float prefLeft = 0; ...
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ff4d557efcee4a2c3a25a9cac2252bc626fb10fe/BoxView.java/clean/core/src/classpath/javax/javax/swing/text/BoxView.java
float myMinLeft = childReqs[axis][i].minimum * childReqs[axis][i].alignment; float myMinRight = childReqs[axis][i].minimum - myMinLeft; minLeft = Math.max(myMinLeft, minLeft); minRight = Math.max(myMinRight, minRight); float myPrefLeft = childReqs[axis][i].preferred * childReqs[axis][i].alignment; float myPrefRight = c...
View v = getView(i); float align = v.getAlignment(axis); int span = (int) v.getPreferredSpan(axis); int ascent = (int) (align * span); int descent = span - ascent; totalAscentPref = Math.max(ascent, totalAscentPref); totalDescentPref = Math.max(descent, totalDescentPref); if (v.getResizeWeight(axis) > 0) { span = (i...
protected SizeRequirements baselineRequirements(int axis, SizeRequirements sr) { updateChildRequirements(axis); SizeRequirements res = sr; if (res == null) res = new SizeRequirements(); float minLeft = 0; float minRight = 0; float prefLeft = 0; ...
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ff4d557efcee4a2c3a25a9cac2252bc626fb10fe/BoxView.java/clean/core/src/classpath/javax/javax/swing/text/BoxView.java
int minSize = (int) (minLeft + minRight); int prefSize = (int) (prefLeft + prefRight); int maxSize = (int) (maxLeft + maxRight); float align = prefLeft / (prefRight + prefLeft); if (Float.isNaN(align)) align = 0;
protected SizeRequirements baselineRequirements(int axis, SizeRequirements sr) { updateChildRequirements(axis); SizeRequirements res = sr; if (res == null) res = new SizeRequirements(); float minLeft = 0; float minRight = 0; float prefLeft = 0; ...
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ff4d557efcee4a2c3a25a9cac2252bc626fb10fe/BoxView.java/clean/core/src/classpath/javax/javax/swing/text/BoxView.java
res.alignment = align; res.maximum = maxSize; res.preferred = prefSize; res.minimum = minSize; return res;
sr.preferred = (int) Math.min((long) totalAscentPref + (long) totalDescentPref, Integer.MAX_VALUE); if (sr.preferred > 0) sr.alignment = (float) totalAscentPref / sr.preferred; if (sr.alignment == 0) { sr.minimum = totalDescentMin; sr.maximum = totalDescentMax; } else if (sr.alignment == 1.0F) { sr.minimum = tot...
protected SizeRequirements baselineRequirements(int axis, SizeRequirements sr) { updateChildRequirements(axis); SizeRequirements res = sr; if (res == null) res = new SizeRequirements(); float minLeft = 0; float minRight = 0; float prefLeft = 0; ...
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ff4d557efcee4a2c3a25a9cac2252bc626fb10fe/BoxView.java/clean/core/src/classpath/javax/javax/swing/text/BoxView.java
updateChildRequirements(axis);
SizeRequirements res = sr; if (res == null) res = new SizeRequirements();
protected SizeRequirements calculateMajorAxisRequirements(int axis, SizeRequirements sr) { updateChildRequirements(axis); SizeRequirements result = sr; if (result == null) result = new SizeRequirements(); long minimum = 0; long preferred =...
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ff4d557efcee4a2c3a25a9cac2252bc626fb10fe/BoxView.java/clean/core/src/classpath/javax/javax/swing/text/BoxView.java
SizeRequirements result = sr; if (result == null) result = new SizeRequirements();
float min = 0; float pref = 0; float max = 0;
protected SizeRequirements calculateMajorAxisRequirements(int axis, SizeRequirements sr) { updateChildRequirements(axis); SizeRequirements result = sr; if (result == null) result = new SizeRequirements(); long minimum = 0; long preferred =...
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ff4d557efcee4a2c3a25a9cac2252bc626fb10fe/BoxView.java/clean/core/src/classpath/javax/javax/swing/text/BoxView.java
long minimum = 0; long preferred = 0; long maximum = 0; for (int i = 0; i < children.length; i++)
int n = getViewCount(); for (int i = 0; i < n; i++)
protected SizeRequirements calculateMajorAxisRequirements(int axis, SizeRequirements sr) { updateChildRequirements(axis); SizeRequirements result = sr; if (result == null) result = new SizeRequirements(); long minimum = 0; long preferred =...
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ff4d557efcee4a2c3a25a9cac2252bc626fb10fe/BoxView.java/clean/core/src/classpath/javax/javax/swing/text/BoxView.java
minimum += childReqs[axis][i].minimum; preferred += childReqs[axis][i].preferred; maximum += childReqs[axis][i].maximum;
View child = getView(i); min += child.getMinimumSpan(axis); pref += child.getPreferredSpan(axis); max += child.getMaximumSpan(axis);
protected SizeRequirements calculateMajorAxisRequirements(int axis, SizeRequirements sr) { updateChildRequirements(axis); SizeRequirements result = sr; if (result == null) result = new SizeRequirements(); long minimum = 0; long preferred =...
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ff4d557efcee4a2c3a25a9cac2252bc626fb10fe/BoxView.java/clean/core/src/classpath/javax/javax/swing/text/BoxView.java
if (minimum > Integer.MAX_VALUE) minimum = Integer.MAX_VALUE; if (preferred > Integer.MAX_VALUE) preferred = Integer.MAX_VALUE; if (maximum > Integer.MAX_VALUE) maximum = Integer.MAX_VALUE;
protected SizeRequirements calculateMajorAxisRequirements(int axis, SizeRequirements sr) { updateChildRequirements(axis); SizeRequirements result = sr; if (result == null) result = new SizeRequirements(); long minimum = 0; long preferred =...
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ff4d557efcee4a2c3a25a9cac2252bc626fb10fe/BoxView.java/clean/core/src/classpath/javax/javax/swing/text/BoxView.java
result.minimum = (int) minimum; result.preferred = (int) preferred; result.maximum = (int) maximum; result.alignment = 0.5F; return result;
res.minimum = (int) min; res.preferred = (int) pref; res.maximum = (int) max; res.alignment = 0.5F; return res;
protected SizeRequirements calculateMajorAxisRequirements(int axis, SizeRequirements sr) { updateChildRequirements(axis); SizeRequirements result = sr; if (result == null) result = new SizeRequirements(); long minimum = 0; long preferred =...
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ff4d557efcee4a2c3a25a9cac2252bc626fb10fe/BoxView.java/clean/core/src/classpath/javax/javax/swing/text/BoxView.java
updateChildRequirements(axis);
protected SizeRequirements calculateMinorAxisRequirements(int axis, SizeRequirements sr) { updateChildRequirements(axis); SizeRequirements res = sr; if (res == null) res = new SizeRequirements(); float minLeft = 0; float minRight = 0; f...
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ff4d557efcee4a2c3a25a9cac2252bc626fb10fe/BoxView.java/clean/core/src/classpath/javax/javax/swing/text/BoxView.java
float minLeft = 0; float minRight = 0; float prefLeft = 0; float prefRight = 0; float maxLeft = 0; float maxRight = 0; for (int i = 0; i < childReqs[axis].length; i++)
res.minimum = 0; res.preferred = 0; res.maximum = 0; res.alignment = 0.5F; int n = getViewCount(); for (int i = 0; i < n; i++)
protected SizeRequirements calculateMinorAxisRequirements(int axis, SizeRequirements sr) { updateChildRequirements(axis); SizeRequirements res = sr; if (res == null) res = new SizeRequirements(); float minLeft = 0; float minRight = 0; f...
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ff4d557efcee4a2c3a25a9cac2252bc626fb10fe/BoxView.java/clean/core/src/classpath/javax/javax/swing/text/BoxView.java
float myMinLeft = childReqs[axis][i].minimum * childReqs[axis][i].alignment; float myMinRight = childReqs[axis][i].minimum - myMinLeft; minLeft = Math.max(myMinLeft, minLeft); minRight = Math.max(myMinRight, minRight); float myPrefLeft = childReqs[axis][i].preferred * childReqs[axis][i].alignment; float myPrefRight = c...
View child = getView(i); res.minimum = Math.max((int) child.getMinimumSpan(axis), res.minimum); res.preferred = Math.max((int) child.getPreferredSpan(axis), res.preferred); res.maximum = Math.max((int) child.getMaximumSpan(axis), res.maximum);
protected SizeRequirements calculateMinorAxisRequirements(int axis, SizeRequirements sr) { updateChildRequirements(axis); SizeRequirements res = sr; if (res == null) res = new SizeRequirements(); float minLeft = 0; float minRight = 0; f...
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ff4d557efcee4a2c3a25a9cac2252bc626fb10fe/BoxView.java/clean/core/src/classpath/javax/javax/swing/text/BoxView.java
int minSize = (int) (minLeft + minRight); int prefSize = (int) (prefLeft + prefRight); int maxSize = (int) (maxLeft + maxRight); float align = prefLeft / (prefRight + prefLeft); if (Float.isNaN(align)) align = 0;
protected SizeRequirements calculateMinorAxisRequirements(int axis, SizeRequirements sr) { updateChildRequirements(axis); SizeRequirements res = sr; if (res == null) res = new SizeRequirements(); float minLeft = 0; float minRight = 0; f...
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ff4d557efcee4a2c3a25a9cac2252bc626fb10fe/BoxView.java/clean/core/src/classpath/javax/javax/swing/text/BoxView.java
res.alignment = align; res.maximum = maxSize; res.preferred = prefSize; res.minimum = minSize;
protected SizeRequirements calculateMinorAxisRequirements(int axis, SizeRequirements sr) { updateChildRequirements(axis); SizeRequirements res = sr; if (res == null) res = new SizeRequirements(); float minLeft = 0; float minRight = 0; f...
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ff4d557efcee4a2c3a25a9cac2252bc626fb10fe/BoxView.java/clean/core/src/classpath/javax/javax/swing/text/BoxView.java
if (! isAllocationValid()) layout(a.width, a.height);
protected void childAllocation(int index, Rectangle a) { if (! isAllocationValid()) layout(a.width, a.height); a.x += offsets[X_AXIS][index]; a.y += offsets[Y_AXIS][index]; a.width = spans[X_AXIS][index]; a.height = spans[Y_AXIS][index]; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ff4d557efcee4a2c3a25a9cac2252bc626fb10fe/BoxView.java/clean/core/src/classpath/javax/javax/swing/text/BoxView.java
float align; if (axis == myAxis) align = 0.5F; else {
public float getAlignment(int axis) { float align; if (axis == myAxis) align = 0.5F; else { updateRequirements(axis); align = requirements[axis].alignment; } return align; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ff4d557efcee4a2c3a25a9cac2252bc626fb10fe/BoxView.java/clean/core/src/classpath/javax/javax/swing/text/BoxView.java
align = requirements[axis].alignment; } return align;
return requirements[axis].alignment;
public float getAlignment(int axis) { float align; if (axis == myAxis) align = 0.5F; else { updateRequirements(axis); align = requirements[axis].alignment; } return align; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ff4d557efcee4a2c3a25a9cac2252bc626fb10fe/BoxView.java/clean/core/src/classpath/javax/javax/swing/text/BoxView.java
return span[Y_AXIS];
return span[Y_AXIS] + getTopInset() - getBottomInset();
public int getHeight() { return span[Y_AXIS]; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ff4d557efcee4a2c3a25a9cac2252bc626fb10fe/BoxView.java/clean/core/src/classpath/javax/javax/swing/text/BoxView.java
float max; if (axis == myAxis) max = getPreferredSpan(axis);
updateRequirements(axis); float margin; if (axis == X_AXIS) margin = getLeftInset() + getRightInset();
public float getMaximumSpan(int axis) { float max; if (axis == myAxis) max = getPreferredSpan(axis); else max = Integer.MAX_VALUE; return max; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ff4d557efcee4a2c3a25a9cac2252bc626fb10fe/BoxView.java/clean/core/src/classpath/javax/javax/swing/text/BoxView.java
max = Integer.MAX_VALUE; return max;
margin = getTopInset() + getBottomInset(); return requirements[axis].maximum + margin;
public float getMaximumSpan(int axis) { float max; if (axis == myAxis) max = getPreferredSpan(axis); else max = Integer.MAX_VALUE; return max; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ff4d557efcee4a2c3a25a9cac2252bc626fb10fe/BoxView.java/clean/core/src/classpath/javax/javax/swing/text/BoxView.java
return requirements[axis].minimum;
float margin; if (axis == X_AXIS) margin = getLeftInset() + getRightInset(); else margin = getTopInset() + getBottomInset(); return requirements[axis].minimum + margin;
public float getMinimumSpan(int axis) { updateRequirements(axis); return requirements[axis].minimum; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ff4d557efcee4a2c3a25a9cac2252bc626fb10fe/BoxView.java/clean/core/src/classpath/javax/javax/swing/text/BoxView.java
return requirements[axis].preferred;
float margin; if (axis == X_AXIS) margin = getLeftInset() + getRightInset(); else margin = getTopInset() + getBottomInset(); return requirements[axis].preferred + margin;
public float getPreferredSpan(int axis) { updateRequirements(axis); return requirements[axis].preferred; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ff4d557efcee4a2c3a25a9cac2252bc626fb10fe/BoxView.java/clean/core/src/classpath/javax/javax/swing/text/BoxView.java
return span[X_AXIS];
return span[X_AXIS] + getLeftInset() - getRightInset();
public int getWidth() { return span[X_AXIS]; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ff4d557efcee4a2c3a25a9cac2252bc626fb10fe/BoxView.java/clean/core/src/classpath/javax/javax/swing/text/BoxView.java
result = x > r.x;
result = x > r.x + r.width;
protected boolean isAfter(int x, int y, Rectangle r) { boolean result = false; if (myAxis == X_AXIS) result = x > r.x; else result = y > r.y; return result; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ff4d557efcee4a2c3a25a9cac2252bc626fb10fe/BoxView.java/clean/core/src/classpath/javax/javax/swing/text/BoxView.java
result = y > r.y;
result = y > r.y + r.height;
protected boolean isAfter(int x, int y, Rectangle r) { boolean result = false; if (myAxis == X_AXIS) result = x > r.x; else result = y > r.y; return result; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ff4d557efcee4a2c3a25a9cac2252bc626fb10fe/BoxView.java/clean/core/src/classpath/javax/javax/swing/text/BoxView.java
updateChildRequirements(axis); updateRequirements(axis);
long sumPref = 0; int n = getViewCount(); for (int i = 0; i < n; i++) { View child = getView(i); spans[i] = (int) child.getPreferredSpan(axis); sumPref = spans[i]; }
protected void layoutMajorAxis(int targetSpan, int axis, int[] offsets, int[] spans) { updateChildRequirements(axis); updateRequirements(axis); // Calculate the spans and offsets using the SizeRequirements uility // methods. SizeRequirements.calculateTiledPositions(targ...
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ff4d557efcee4a2c3a25a9cac2252bc626fb10fe/BoxView.java/clean/core/src/classpath/javax/javax/swing/text/BoxView.java
SizeRequirements.calculateTiledPositions(targetSpan, requirements[axis], childReqs[axis], offsets, spans);
long diff = targetSpan - sumPref; float factor = 0.0F; int[] diffs = null; if (diff != 0) { long total = 0; diffs = new int[n]; for (int i = 0; i < n; i++) { View child = getView(i); int span; if (diff < 0) { span = (int) child.getMinimumSpan(axis); diffs[i] = spans[i] - span; } else { span = (int) child.getMaximumSpa...
protected void layoutMajorAxis(int targetSpan, int axis, int[] offsets, int[] spans) { updateChildRequirements(axis); updateRequirements(axis); // Calculate the spans and offsets using the SizeRequirements uility // methods. SizeRequirements.calculateTiledPositions(targ...
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ff4d557efcee4a2c3a25a9cac2252bc626fb10fe/BoxView.java/clean/core/src/classpath/javax/javax/swing/text/BoxView.java
float maxAdjust = Math.abs(total - sumPref); factor = diff / maxAdjust; factor = Math.min(factor, 1.0F); factor = Math.max(factor, -1.0F); } int totalOffs = 0; for (int i = 0; i < n; i++) { offsets[i] = totalOffs; if (diff != 0) { float adjust = factor * diffs[i]; spans[i] += Math.round(adjust); } totalOffs = (int) ...
protected void layoutMajorAxis(int targetSpan, int axis, int[] offsets, int[] spans) { updateChildRequirements(axis); updateRequirements(axis); // Calculate the spans and offsets using the SizeRequirements uility // methods. SizeRequirements.calculateTiledPositions(targ...
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ff4d557efcee4a2c3a25a9cac2252bc626fb10fe/BoxView.java/clean/core/src/classpath/javax/javax/swing/text/BoxView.java
updateChildRequirements(axis); updateRequirements(axis); SizeRequirements.calculateAlignedPositions(targetSpan, requirements[axis], childReqs[axis], offsets, spans);
int count = getViewCount(); for (int i = 0; i < count; i++) { View child = getView(i); int max = (int) child.getMaximumSpan(axis); if (max < targetSpan) { float align = child.getAlignment(axis); offsets[i] = (int) ((targetSpan - max) * align); spans[i] = max; } else { int min = (int) child.getMinimumSpan(axis); offse...
protected void layoutMinorAxis(int targetSpan, int axis, int[] offsets, int[] spans) { updateChildRequirements(axis); updateRequirements(axis); // Calculate the spans and offsets using the SizeRequirements uility // methods. SizeRequirements.calculateAlignedPositions(ta...
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ff4d557efcee4a2c3a25a9cac2252bc626fb10fe/BoxView.java/clean/core/src/classpath/javax/javax/swing/text/BoxView.java
layout(bounds.width, bounds.height);
setSize(bounds.width, bounds.height);
public Shape modelToView(int pos, Shape a, Position.Bias bias) throws BadLocationException { // Make sure everything is allocated properly and then call super if (! isAllocationValid()) { Rectangle bounds = a.getBounds(); layout(bounds.width, bounds.height); } return super.model...
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ff4d557efcee4a2c3a25a9cac2252bc626fb10fe/BoxView.java/clean/core/src/classpath/javax/javax/swing/text/BoxView.java
Rectangle inside = getInsideAllocation(a);
Rectangle alloc; if (a instanceof Rectangle) alloc = (Rectangle) a; else alloc = a.getBounds();
public void paint(Graphics g, Shape a) { Rectangle inside = getInsideAllocation(a); // TODO: Used for debugging. //g.drawRect(inside.x, inside.y, inside.width, inside.height); Rectangle copy = new Rectangle(inside); int count = getViewCount(); for (int i = 0; i < count; ++i) { copy.setB...
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ff4d557efcee4a2c3a25a9cac2252bc626fb10fe/BoxView.java/clean/core/src/classpath/javax/javax/swing/text/BoxView.java
Rectangle copy = new Rectangle(inside);
int x = alloc.x + getLeftInset(); int y = alloc.y + getTopInset(); Rectangle clip = g.getClipBounds(); Rectangle tmp = new Rectangle();
public void paint(Graphics g, Shape a) { Rectangle inside = getInsideAllocation(a); // TODO: Used for debugging. //g.drawRect(inside.x, inside.y, inside.width, inside.height); Rectangle copy = new Rectangle(inside); int count = getViewCount(); for (int i = 0; i < count; ++i) { copy.setB...
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ff4d557efcee4a2c3a25a9cac2252bc626fb10fe/BoxView.java/clean/core/src/classpath/javax/javax/swing/text/BoxView.java
copy.setBounds(inside); childAllocation(i, copy); if (!copy.isEmpty() && g.hitClip(copy.x, copy.y, copy.width, copy.height)) paintChild(g, copy, i);
tmp.x = x + getOffset(X_AXIS, i); tmp.y = y + getOffset(Y_AXIS, i); tmp.width = getSpan(X_AXIS, i); tmp.height = getSpan(Y_AXIS, i); if (tmp.intersects(clip)) paintChild(g, tmp, i);
public void paint(Graphics g, Shape a) { Rectangle inside = getInsideAllocation(a); // TODO: Used for debugging. //g.drawRect(inside.x, inside.y, inside.width, inside.height); Rectangle copy = new Rectangle(inside); int count = getViewCount(); for (int i = 0; i < count; ++i) { copy.setB...
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ff4d557efcee4a2c3a25a9cac2252bc626fb10fe/BoxView.java/clean/core/src/classpath/javax/javax/swing/text/BoxView.java
requirementsValid[Y_AXIS] = false; }
public void preferenceChanged(View child, boolean width, boolean height) { if (width) layoutValid[X_AXIS] = false; if (height) layoutValid[Y_AXIS] = false; super.preferenceChanged(child, width, height); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ff4d557efcee4a2c3a25a9cac2252bc626fb10fe/BoxView.java/clean/core/src/classpath/javax/javax/swing/text/BoxView.java
layoutChanged(X_AXIS); layoutChanged(Y_AXIS);
layoutValid[X_AXIS] = false; requirementsValid[X_AXIS] = false; layoutValid[Y_AXIS] = false; requirementsValid[Y_AXIS] = false;
public void replace(int offset, int length, View[] views) { int numViews = 0; if (views != null) numViews = views.length; // Resize and copy data for cache arrays. // The spansX cache. int oldSize = getViewCount(); int[] newSpansX = new int[oldSize - length + numViews]; System.arraycopy(spa...
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ff4d557efcee4a2c3a25a9cac2252bc626fb10fe/BoxView.java/clean/core/src/classpath/javax/javax/swing/text/BoxView.java
layout((int) width, (int) height);
layout((int) (width - getLeftInset() - getRightInset()), (int) (height - getTopInset() - getBottomInset()));
public void setSize(float width, float height) { layout((int) width, (int) height); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ff4d557efcee4a2c3a25a9cac2252bc626fb10fe/BoxView.java/clean/core/src/classpath/javax/javax/swing/text/BoxView.java
if (! layoutValid[axis])
if (axis != Y_AXIS && axis != X_AXIS) throw new IllegalArgumentException("Illegal axis: " + axis); if (! requirementsValid[axis])
private void updateRequirements(int axis) { if (! layoutValid[axis]) { if (axis == myAxis) requirements[axis] = calculateMajorAxisRequirements(axis, requirements[axis]); else requirements[axis] = calculateMinorAxisRequi...
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ff4d557efcee4a2c3a25a9cac2252bc626fb10fe/BoxView.java/clean/core/src/classpath/javax/javax/swing/text/BoxView.java
requirementsValid[axis] = true;
private void updateRequirements(int axis) { if (! layoutValid[axis]) { if (axis == myAxis) requirements[axis] = calculateMajorAxisRequirements(axis, requirements[axis]); else requirements[axis] = calculateMinorAxisRequi...
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ff4d557efcee4a2c3a25a9cac2252bc626fb10fe/BoxView.java/clean/core/src/classpath/javax/javax/swing/text/BoxView.java
AttributeRange(Map attribs, int begin_index, int end_index) {
AttributeRange(Map attribs, int begin_index, int end_index) {
AttributeRange(Map attribs, int begin_index, int end_index){ this.attribs = attribs; this.begin_index = begin_index; this.end_index = end_index;}
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/1a6944e2b647ccd9f0a45036fbe2dcd289ca1699/AttributedString.java/buggy/core/src/classpath/java/java/text/AttributedString.java
}
}
AttributeRange(Map attribs, int begin_index, int end_index){ this.attribs = attribs; this.begin_index = begin_index; this.end_index = end_index;}
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/1a6944e2b647ccd9f0a45036fbe2dcd289ca1699/AttributedString.java/buggy/core/src/classpath/java/java/text/AttributedString.java
AttributedString(String str) {
public AttributedString(String str) {
AttributedString(String str){ sci = new StringCharacterIterator(str); attribs = new AttributeRange[0];}
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/1a6944e2b647ccd9f0a45036fbe2dcd289ca1699/AttributedString.java/buggy/core/src/classpath/java/java/text/AttributedString.java
}
}
AttributedString(String str){ sci = new StringCharacterIterator(str); attribs = new AttributeRange[0];}
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/1a6944e2b647ccd9f0a45036fbe2dcd289ca1699/AttributedString.java/buggy/core/src/classpath/java/java/text/AttributedString.java
addAttribute(AttributedCharacterIterator.Attribute attrib, Object value) {
public void addAttribute(AttributedCharacterIterator.Attribute attrib, Object value) {
addAttribute(AttributedCharacterIterator.Attribute attrib, Object value){ addAttribute(attrib, value, 0, sci.getEndIndex());}
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/1a6944e2b647ccd9f0a45036fbe2dcd289ca1699/AttributedString.java/buggy/core/src/classpath/java/java/text/AttributedString.java
}
}
addAttribute(AttributedCharacterIterator.Attribute attrib, Object value){ addAttribute(attrib, value, 0, sci.getEndIndex());}
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/1a6944e2b647ccd9f0a45036fbe2dcd289ca1699/AttributedString.java/buggy/core/src/classpath/java/java/text/AttributedString.java
addAttributes(Map attributes, int begin_index, int end_index) {
public void addAttributes(Map attributes, int begin_index, int end_index) {
addAttributes(Map attributes, int begin_index, int end_index){ if (attributes == null) throw new IllegalArgumentException("null attribute"); if ((begin_index < 0) || (end_index > sci.getEndIndex()) || (end_index < begin_index)) throw new IllegalArgumentException("bad range"); AttributeRange[] new_list = n...
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/1a6944e2b647ccd9f0a45036fbe2dcd289ca1699/AttributedString.java/buggy/core/src/classpath/java/java/text/AttributedString.java
}
}
addAttributes(Map attributes, int begin_index, int end_index){ if (attributes == null) throw new IllegalArgumentException("null attribute"); if ((begin_index < 0) || (end_index > sci.getEndIndex()) || (end_index < begin_index)) throw new IllegalArgumentException("bad range"); AttributeRange[] new_list = n...
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/1a6944e2b647ccd9f0a45036fbe2dcd289ca1699/AttributedString.java/buggy/core/src/classpath/java/java/text/AttributedString.java
getIterator() { return(new AttributedStringIterator(sci, attribs, 0, sci.getEndIndex(), null)); }
public AttributedCharacterIterator getIterator() { return(new AttributedStringIterator(sci, attribs, 0, sci.getEndIndex(), null)); }
getIterator(){ return(new AttributedStringIterator(sci, attribs, 0, sci.getEndIndex(), null));}
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/1a6944e2b647ccd9f0a45036fbe2dcd289ca1699/AttributedString.java/buggy/core/src/classpath/java/java/text/AttributedString.java
final int alignedObjectSize = alignInstanceFields(ftable, slotSize); objectSize = alignedObjectSize;
objectSize = alignInstanceFields(ftable, slotSize);
private static void createFields(VmType< ? > cls, FieldData[] fieldDatas, VmSharedStatics sharedStatics, VmIsolatedStatics isolatedStatics, int slotSize, int pragmaFlags) { final int fcount = fieldDatas.length; final VmField[] ftable = new VmField[fcount]; int objectSize =...
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/f4a3411fa3553023d044dfa4aaecd45bd62e5e67/ClassDecoder.java/buggy/core/src/core/org/jnode/vm/classmgr/ClassDecoder.java
final VmType cls = decodeClass(data, rejectNatives, clc, protectionDomain); return cls;
return decodeClass(data, rejectNatives, clc, protectionDomain);
public static final VmType defineClass(String className, ByteBuffer data, boolean rejectNatives, VmClassLoader clc, ProtectionDomain protectionDomain) { cl_init(); final VmType cls = decodeClass(data, rejectNatives, clc, protectionDomain); return cls; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/f4a3411fa3553023d044dfa4aaecd45bd62e5e67/ClassDecoder.java/buggy/core/src/core/org/jnode/vm/classmgr/ClassDecoder.java
set(index, new Integer(data));
set(index, new VmConstInt(data));
protected void setInt(int index, int data) { set(index, new Integer(data)); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/10b9028253f5fe6331eb3ee3c17eb137e07633c9/VmCP.java/buggy/core/src/core/org/jnode/vm/classmgr/VmCP.java
set(index, new Float(data));
set(index, new VmConstFloat(data));
protected void setFloat(int index, float data) { set(index, new Float(data)); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/10b9028253f5fe6331eb3ee3c17eb137e07633c9/VmCP.java/buggy/core/src/core/org/jnode/vm/classmgr/VmCP.java
set(index, new Long(data));
set(index, new VmConstLong(data));
protected void setLong(int index, long data) { set(index, new Long(data)); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/10b9028253f5fe6331eb3ee3c17eb137e07633c9/VmCP.java/buggy/core/src/core/org/jnode/vm/classmgr/VmCP.java
set(index, new Double(data));
set(index, new VmConstDouble(data));
protected void setDouble(int index, double data) { set(index, new Double(data)); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/10b9028253f5fe6331eb3ee3c17eb137e07633c9/VmCP.java/buggy/core/src/core/org/jnode/vm/classmgr/VmCP.java
return ((Integer) get(index)).intValue();
return ((VmConstInt) get(index)).intValue();
public int getInt(int index) { if (index == 0) return 0; else return ((Integer) get(index)).intValue(); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/10b9028253f5fe6331eb3ee3c17eb137e07633c9/VmCP.java/buggy/core/src/core/org/jnode/vm/classmgr/VmCP.java
return ((Double) get(index)).doubleValue();
return ((VmConstDouble) get(index)).doubleValue();
public double getDouble(int index) { return ((Double) get(index)).doubleValue(); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/10b9028253f5fe6331eb3ee3c17eb137e07633c9/VmCP.java/buggy/core/src/core/org/jnode/vm/classmgr/VmCP.java
return ((Float) get(index)).floatValue();
return ((VmConstFloat) get(index)).floatValue();
public float getFloat(int index) { return ((Float) get(index)).floatValue(); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/10b9028253f5fe6331eb3ee3c17eb137e07633c9/VmCP.java/buggy/core/src/core/org/jnode/vm/classmgr/VmCP.java
return ((Long) get(index)).longValue();
return ((VmConstLong) get(index)).longValue();
public long getLong(int index) { return ((Long) get(index)).longValue(); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/10b9028253f5fe6331eb3ee3c17eb137e07633c9/VmCP.java/buggy/core/src/core/org/jnode/vm/classmgr/VmCP.java
setBorder(null);
public PaneButton(Action a) { super(a); setMargin(new Insets(0, 0, 0, 0)); setBorder(null); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/c4eda97e6e5feb8e7650d83d5066d85580f1249c/BasicInternalFrameTitlePane.java/clean/core/src/classpath/javax/javax/swing/plaf/basic/BasicInternalFrameTitlePane.java
enableActions();
String propName = evt.getPropertyName(); if (propName.equals("closable")) { if (evt.getNewValue().equals(Boolean.TRUE)) closeButton.setVisible(true); else closeButton.setVisible(false); } else if (propName.equals("iconifiable")) { if (evt.getNewValue().equals(Boolean.TRUE)) iconButton.setVisible(true); else iconButton....
public void propertyChange(PropertyChangeEvent evt) { // The title and frameIcon are taken care of during painting time. // The only other thing this will care about are the "is----izable" // properties. So we call enable actions to properly handle the // buttons and menu items for us. ...
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/c4eda97e6e5feb8e7650d83d5066d85580f1249c/BasicInternalFrameTitlePane.java/clean/core/src/classpath/javax/javax/swing/plaf/basic/BasicInternalFrameTitlePane.java
enableActions();
Dimension size = c.getSize();
public void layoutContainer(Container c) { enableActions(); Insets insets = c.getInsets(); int width = c.getBounds().width - insets.left - insets.right; int height = c.getBounds().height - insets.top - insets.bottom; // MenuBar is always present and located at the top left corner. D...
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/c4eda97e6e5feb8e7650d83d5066d85580f1249c/BasicInternalFrameTitlePane.java/clean/core/src/classpath/javax/javax/swing/plaf/basic/BasicInternalFrameTitlePane.java
int width = c.getBounds().width - insets.left - insets.right; int height = c.getBounds().height - insets.top - insets.bottom;
int width = size.width - insets.left - insets.right; int height = size.height - insets.top - insets.bottom;
public void layoutContainer(Container c) { enableActions(); Insets insets = c.getInsets(); int width = c.getBounds().width - insets.left - insets.right; int height = c.getBounds().height - insets.top - insets.bottom; // MenuBar is always present and located at the top left corner. D...
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/c4eda97e6e5feb8e7650d83d5066d85580f1249c/BasicInternalFrameTitlePane.java/clean/core/src/classpath/javax/javax/swing/plaf/basic/BasicInternalFrameTitlePane.java
int loc = width + insets.left;
int loc = width + insets.left - 1; int top = insets.top + 1; int buttonWidth = height - 2; int buttonHeight = height - 4; if (closeButton.isVisible()) { loc -= buttonWidth + 2; closeButton.setBounds(loc, top, buttonWidth, buttonHeight); }
public void layoutContainer(Container c) { enableActions(); Insets insets = c.getInsets(); int width = c.getBounds().width - insets.left - insets.right; int height = c.getBounds().height - insets.top - insets.bottom; // MenuBar is always present and located at the top left corner. D...
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/c4eda97e6e5feb8e7650d83d5066d85580f1249c/BasicInternalFrameTitlePane.java/clean/core/src/classpath/javax/javax/swing/plaf/basic/BasicInternalFrameTitlePane.java
Insets i = closeButton.getInsets(); Dimension prefs = new Dimension(iconSize + i.left + i.right, iconSize + i.top + i.bottom); int top = insets.top + (height - prefs.height) / 2; if (closeAction.isEnabled())
if (maxButton.isVisible())
public void layoutContainer(Container c) { enableActions(); Insets insets = c.getInsets(); int width = c.getBounds().width - insets.left - insets.right; int height = c.getBounds().height - insets.top - insets.bottom; // MenuBar is always present and located at the top left corner. D...
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/c4eda97e6e5feb8e7650d83d5066d85580f1249c/BasicInternalFrameTitlePane.java/clean/core/src/classpath/javax/javax/swing/plaf/basic/BasicInternalFrameTitlePane.java