rem stringlengths 0 477k | add stringlengths 0 313k | context stringlengths 6 599k | meta stringlengths 141 403 |
|---|---|---|---|
public void die() { | public void die() { for (int i = edits.size() - 1; i >= 0; i--) ((UndoableEdit) edits.elementAt(i)).die(); | public void die() { // Variables int index; UndoableEdit current; // Loop through all contained UndoableEdits for (index = edits.size() - 1; index >= 0; index--) { current = (UndoableEdit) edits.elementAt(index); current.die(); } // for: index } // die() | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/8f03053e30bf23122f89e48e88064677b27fdd7c/CompoundEdit.java/clean/core/src/classpath/javax/javax/swing/undo/CompoundEdit.java |
int index; UndoableEdit current; for (index = edits.size() - 1; index >= 0; index--) { current = (UndoableEdit) edits.elementAt(index); current.die(); } } | super.die(); } | public void die() { // Variables int index; UndoableEdit current; // Loop through all contained UndoableEdits for (index = edits.size() - 1; index >= 0; index--) { current = (UndoableEdit) edits.elementAt(index); current.die(); } // for: index } // die() | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/8f03053e30bf23122f89e48e88064677b27fdd7c/CompoundEdit.java/clean/core/src/classpath/javax/javax/swing/undo/CompoundEdit.java |
public String getPresentationName() { if (edits.size() == 0) { return super.getPresentationName(); } else { return lastEdit().getPresentationName(); } } | public String getPresentationName() { UndoableEdit last; last = lastEdit(); if (last == null) return super.getPresentationName(); else return last.getPresentationName(); } | public String getPresentationName() { if (edits.size() == 0) { return super.getPresentationName(); } else { return lastEdit().getPresentationName(); } } // getPresentationName() | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/8f03053e30bf23122f89e48e88064677b27fdd7c/CompoundEdit.java/clean/core/src/classpath/javax/javax/swing/undo/CompoundEdit.java |
public boolean isInProgress() { return inProgress; } | public boolean isInProgress() { return inProgress; } | public boolean isInProgress() { return inProgress; } // isInProgress() | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/8f03053e30bf23122f89e48e88064677b27fdd7c/CompoundEdit.java/clean/core/src/classpath/javax/javax/swing/undo/CompoundEdit.java |
public boolean isSignificant() { | public boolean isSignificant() { for (int i = edits.size() - 1; i >= 0; i--) if (((UndoableEdit) edits.elementAt(i)).isSignificant()) return true; | public boolean isSignificant() { // Variables int index; UndoableEdit current; // Check each edit for (index = 0; index < edits.size(); index++) { current = (UndoableEdit) edits.elementAt(index); if (current.isSignificant() == true) { return true; } } // for: index return false; } // isSignificant() | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/8f03053e30bf23122f89e48e88064677b27fdd7c/CompoundEdit.java/clean/core/src/classpath/javax/javax/swing/undo/CompoundEdit.java |
int index; UndoableEdit current; for (index = 0; index < edits.size(); index++) { current = (UndoableEdit) edits.elementAt(index); if (current.isSignificant() == true) { return true; } } return false; } | return false; } | public boolean isSignificant() { // Variables int index; UndoableEdit current; // Check each edit for (index = 0; index < edits.size(); index++) { current = (UndoableEdit) edits.elementAt(index); if (current.isSignificant() == true) { return true; } } // for: index return false; } // isSignificant() | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/8f03053e30bf23122f89e48e88064677b27fdd7c/CompoundEdit.java/clean/core/src/classpath/javax/javax/swing/undo/CompoundEdit.java |
protected UndoableEdit lastEdit() { if (edits.size() == 0) { return null; } return (UndoableEdit) edits.elementAt(edits.size() - 1); } | protected UndoableEdit lastEdit() { if (edits.size() == 0) return null; else return (UndoableEdit) edits.elementAt(edits.size() - 1); } | protected UndoableEdit lastEdit() { if (edits.size() == 0) { return null; } return (UndoableEdit) edits.elementAt(edits.size() - 1); } // lastEdit() | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/8f03053e30bf23122f89e48e88064677b27fdd7c/CompoundEdit.java/clean/core/src/classpath/javax/javax/swing/undo/CompoundEdit.java |
public boolean addEdit(UndoableEdit anEdit) { return false; } | public boolean addEdit(UndoableEdit edit) { return false; } | public boolean addEdit(UndoableEdit anEdit) { return false; } // addEdit() | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/8f03053e30bf23122f89e48e88064677b27fdd7c/AbstractUndoableEdit.java/buggy/core/src/classpath/javax/javax/swing/undo/AbstractUndoableEdit.java |
public boolean addEdit(UndoableEdit anEdit); | boolean addEdit(UndoableEdit anEdit); | public boolean addEdit(UndoableEdit anEdit); | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/8f03053e30bf23122f89e48e88064677b27fdd7c/UndoableEdit.java/buggy/core/src/classpath/javax/javax/swing/undo/UndoableEdit.java |
public boolean replaceEdit(UndoableEdit anEdit); | boolean replaceEdit(UndoableEdit anEdit); | public boolean replaceEdit(UndoableEdit anEdit); | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/8f03053e30bf23122f89e48e88064677b27fdd7c/UndoableEdit.java/buggy/core/src/classpath/javax/javax/swing/undo/UndoableEdit.java |
public boolean canRedo() { if (alive == true && hasBeenDone == false) { return true; } return false; } | public boolean canRedo() { return alive && !hasBeenDone; } | public boolean canRedo() { if (alive == true && hasBeenDone == false) { return true; } // if return false; } // canRedo() | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/8f03053e30bf23122f89e48e88064677b27fdd7c/AbstractUndoableEdit.java/buggy/core/src/classpath/javax/javax/swing/undo/AbstractUndoableEdit.java |
public boolean canUndo() { if (alive == true && hasBeenDone == true) { return true; } return false; } | public boolean canUndo() { return alive && hasBeenDone; } | public boolean canUndo() { if (alive == true && hasBeenDone == true) { return true; } // if return false; } // canUndo() | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/8f03053e30bf23122f89e48e88064677b27fdd7c/AbstractUndoableEdit.java/buggy/core/src/classpath/javax/javax/swing/undo/AbstractUndoableEdit.java |
public void die() { alive = false; } | public void die() { alive = false; } | public void die() { alive = false; } // die() | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/8f03053e30bf23122f89e48e88064677b27fdd7c/AbstractUndoableEdit.java/buggy/core/src/classpath/javax/javax/swing/undo/AbstractUndoableEdit.java |
public void die(); | void die(); | public void die(); | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/8f03053e30bf23122f89e48e88064677b27fdd7c/UndoableEdit.java/buggy/core/src/classpath/javax/javax/swing/undo/UndoableEdit.java |
public String getPresentationName(); | String getPresentationName(); | public String getPresentationName(); | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/8f03053e30bf23122f89e48e88064677b27fdd7c/UndoableEdit.java/buggy/core/src/classpath/javax/javax/swing/undo/UndoableEdit.java |
public String getRedoPresentationName() { if (getPresentationName().equals("") == true) { return RedoName; } else { return RedoName + " " + getPresentationName(); } } | public String getRedoPresentationName() { String msg, pres; msg = UIManager.getString("AbstractUndoableEdit.redoText"); if (msg == null) msg = RedoName; pres = getPresentationName(); if ((pres == null) || (pres.length() == 0)) return msg; else return msg + ' ' + pres; } | public String getRedoPresentationName() { if (getPresentationName().equals("") == true) { return RedoName; } else { return RedoName + " " + getPresentationName(); } } // getRedoPresentationName() | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/8f03053e30bf23122f89e48e88064677b27fdd7c/AbstractUndoableEdit.java/buggy/core/src/classpath/javax/javax/swing/undo/AbstractUndoableEdit.java |
public String getRedoPresentationName(); | String getRedoPresentationName(); | public String getRedoPresentationName(); | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/8f03053e30bf23122f89e48e88064677b27fdd7c/UndoableEdit.java/buggy/core/src/classpath/javax/javax/swing/undo/UndoableEdit.java |
public String getUndoPresentationName() { if (getPresentationName().equals("") == true) { return UndoName; } else { return UndoName + " " + getPresentationName(); } } | public String getUndoPresentationName() { String msg, pres; msg = UIManager.getString("AbstractUndoableEdit.undoText"); if (msg == null) msg = UndoName; pres = getPresentationName(); if ((pres == null) || (pres.length() == 0)) return msg; else return msg + ' ' + pres; } | public String getUndoPresentationName() { if (getPresentationName().equals("") == true) { return UndoName; } else { return UndoName + " " + getPresentationName(); } } // getUndoPresentationName() | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/8f03053e30bf23122f89e48e88064677b27fdd7c/AbstractUndoableEdit.java/buggy/core/src/classpath/javax/javax/swing/undo/AbstractUndoableEdit.java |
public String getUndoPresentationName(); | String getUndoPresentationName(); | public String getUndoPresentationName(); | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/8f03053e30bf23122f89e48e88064677b27fdd7c/UndoableEdit.java/buggy/core/src/classpath/javax/javax/swing/undo/UndoableEdit.java |
public boolean isSignificant() { return true; } | public boolean isSignificant() { return true; } | public boolean isSignificant() { return true; } // isSignificant() | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/8f03053e30bf23122f89e48e88064677b27fdd7c/AbstractUndoableEdit.java/buggy/core/src/classpath/javax/javax/swing/undo/AbstractUndoableEdit.java |
public boolean isSignificant(); | boolean isSignificant(); | public boolean isSignificant(); | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/8f03053e30bf23122f89e48e88064677b27fdd7c/UndoableEdit.java/buggy/core/src/classpath/javax/javax/swing/undo/UndoableEdit.java |
public void redo() throws CannotRedoException; | void redo() throws CannotRedoException; | public void redo() throws CannotRedoException; | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/8f03053e30bf23122f89e48e88064677b27fdd7c/UndoableEdit.java/buggy/core/src/classpath/javax/javax/swing/undo/UndoableEdit.java |
public String toString() { return null; } | public String toString() { return super.toString() + " hasBeenDone: " + hasBeenDone + " alive: " + alive; } | public String toString() { return null; // TODO } // toString() | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/8f03053e30bf23122f89e48e88064677b27fdd7c/AbstractUndoableEdit.java/buggy/core/src/classpath/javax/javax/swing/undo/AbstractUndoableEdit.java |
public void undo() throws CannotUndoException; | void undo() throws CannotUndoException; | public void undo() throws CannotUndoException; | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/8f03053e30bf23122f89e48e88064677b27fdd7c/UndoableEdit.java/buggy/core/src/classpath/javax/javax/swing/undo/UndoableEdit.java |
(ii) or if this menu is in a menu bar and some other menu in a menu bar was just selected. (If nothing was selected, menu should be pressed before | (ii) or if this menu is in a menu bar and some other menu in a menu bar was just selected and has its popup menu visible. (If nothing was selected, menu should be pressed before | public void mouseEntered(MouseEvent e) { /* When mouse enters menu item, it should be considered selected if (i) if this menu is a submenu in some other menu (ii) or if this menu is in a menu bar and some other menu in a menu bar was just selected. (If nothing was selected, menu... | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/11aafc23ec4e191f57d02c34f8e6bfeb90bed5a2/BasicMenuUI.java/clean/core/src/classpath/javax/javax/swing/plaf/basic/BasicMenuUI.java |
if (! menu.isTopLevelMenu() || (menu.isTopLevelMenu() && (((JMenuBar) menu.getParent()).isSelected() && ! menu.isArmed()))) | if (! menu.isTopLevelMenu() || popupVisible()) | public void mouseEntered(MouseEvent e) { /* When mouse enters menu item, it should be considered selected if (i) if this menu is a submenu in some other menu (ii) or if this menu is in a menu bar and some other menu in a menu bar was just selected. (If nothing was selected, menu... | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/11aafc23ec4e191f57d02c34f8e6bfeb90bed5a2/BasicMenuUI.java/clean/core/src/classpath/javax/javax/swing/plaf/basic/BasicMenuUI.java |
else | public void removeImage(Image image) { synchronized (this) { MediaEntry e = head; MediaEntry prev = null; while (e != null) { if (e.image == image) { if (prev == null) head = e.next; else prev.next = e.next; } prev = e; e = e.next; } } } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/e93a3d254e0493fb3bd08b7a947349f11dd622ae/MediaTracker.java/buggy/core/src/classpath/java/java/awt/MediaTracker.java | |
SizeRequirements sr = super.calculateMajorAxisRequirements(axis, r); return sr; | if (r == null) r = new SizeRequirements(); if (setCSSSpan(r, axis)) { SizeRequirements parent = super.calculateMajorAxisRequirements(axis, null); int margin = axis == X_AXIS ? getLeftInset() + getRightInset() : getTopInset() + getBottomInset(); r.minimum -= margin; r.preferred -= margin; r.maximum -= margin; constra... | protected SizeRequirements calculateMajorAxisRequirements(int axis, SizeRequirements r) { SizeRequirements sr = super.calculateMajorAxisRequirements(axis, r); // FIXME: adjust it if the CSS width or height attribute is specified // and applicable ... | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/a3e083d3100ebabbd539297b5cb2118701b9674e/BlockView.java/clean/core/src/classpath/javax/javax/swing/text/html/BlockView.java |
SizeRequirements sr = super.calculateMinorAxisRequirements(axis, r); return sr; | if (r == null) r = new SizeRequirements(); if (setCSSSpan(r, axis)) { SizeRequirements parent = super.calculateMinorAxisRequirements(axis, null); int margin = axis == X_AXIS ? getLeftInset() + getRightInset() : getTopInset() + getBottomInset(); r.minimum -= margin; r.preferred -= margin; r.maximum -= margin; constra... | protected SizeRequirements calculateMinorAxisRequirements(int axis, SizeRequirements r) { SizeRequirements sr = super.calculateMinorAxisRequirements(axis, r); // FIXME: adjust it if the CSS width or height attribute is specified // and applicable. ... | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/a3e083d3100ebabbd539297b5cb2118701b9674e/BlockView.java/clean/core/src/classpath/javax/javax/swing/text/html/BlockView.java |
if (currPos <= getStartOffset() && (currPos + ev.getLength()) >= getEndOffset()) | if (currPos <= getStartOffset() && (currPos + ev.getLength()) >= getEndOffset()) | public void changedUpdate(DocumentEvent ev, Shape a, ViewFactory f) { super.changedUpdate(ev, a, f); // If more elements were added, then need to set the properties for them int currPos = ev.getOffset(); if (currPos <= getStartOffset() && (currPos + ev.getLength()) >= getEn... | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/a3e083d3100ebabbd539297b5cb2118701b9674e/BlockView.java/clean/core/src/classpath/javax/javax/swing/text/html/BlockView.java |
super.layoutMinorAxis(targetSpan, axis, offsets, spans); | int viewCount = getViewCount(); for (int i = 0; i < viewCount; i++) { View view = getView(i); int min = (int) view.getMinimumSpan(axis); int max; Length length = cssSpans[axis]; if (length != null) { min = Math.max((int) length.getValue(targetSpan), min); max = min; } else max = (int) view.getMaximumSpan(axis); if (m... | protected void layoutMinorAxis(int targetSpan, int axis, int[] offsets, int[] spans) { // FIXME: Not implemented. super.layoutMinorAxis(targetSpan, axis, offsets, spans); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/a3e083d3100ebabbd539297b5cb2118701b9674e/BlockView.java/clean/core/src/classpath/javax/javax/swing/text/html/BlockView.java |
if (axis == getAxis()) return getPreferredSpan(axis); | if (!isLayoutValid(axis)) { if (axis == myAxis) requirements[axis] = calculateMajorAxisRequirements(axis, requirements[axis]); | public float getMaximumSpan(int axis) { if (axis == getAxis()) return getPreferredSpan(axis); else return Integer.MAX_VALUE; } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/8f1176391e1d000d946793693906d6dc8af29e19/BoxView.java/buggy/core/src/classpath/javax/javax/swing/text/BoxView.java |
return Integer.MAX_VALUE; | requirements[axis] = calculateMinorAxisRequirements(axis, requirements[axis]); } return requirements[axis].maximum; | public float getMaximumSpan(int axis) { if (axis == getAxis()) return getPreferredSpan(axis); else return Integer.MAX_VALUE; } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/8f1176391e1d000d946793693906d6dc8af29e19/BoxView.java/buggy/core/src/classpath/javax/javax/swing/text/BoxView.java |
validateLayout(axis); | layoutValid[axis] = true; | protected void layoutMajorAxis(int targetSpan, int axis, int[] offsets, int[] spans) { SizeRequirements[] childReqs = getChildRequirements(axis); // Calculate the spans and offsets using the SizeRequirements uility // methods. SizeRequirements.calculateTiledPositions(targe... | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/8f1176391e1d000d946793693906d6dc8af29e19/BoxView.java/buggy/core/src/classpath/javax/javax/swing/text/BoxView.java |
SizeRequirements total = baselineRequirements(axis, null); SizeRequirements.calculateAlignedPositions(targetSpan, total, childReqs, offsets, spans); validateLayout(axis); | SizeRequirements.calculateAlignedPositions(targetSpan, requirements[axis], childReqs, offsets, spans); layoutValid[axis] = true; | protected void layoutMinorAxis(int targetSpan, int axis, int[] offsets, int[] spans) { SizeRequirements[] childReqs = getChildRequirements(axis); // Calculate the spans and offsets using the SizeRequirements uility // methods. // TODO: This might be an opportunity for perf... | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/8f1176391e1d000d946793693906d6dc8af29e19/BoxView.java/buggy/core/src/classpath/javax/javax/swing/text/BoxView.java |
Rectangle bounds = a.getBounds(); if (bounds.width != getWidth() || bounds.height != getHeight()) setSize(bounds.width, bounds.height); | public void paint(Graphics g, Shape a) { // Adjust size if the size is changed. Rectangle bounds = a.getBounds(); if (bounds.width != getWidth() || bounds.height != getHeight()) setSize(bounds.width, bounds.height); Rectangle inside = getInsideAllocation(a); Rectangle copy = new Rectangle(inside)... | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/8f1176391e1d000d946793693906d6dc8af29e19/BoxView.java/buggy/core/src/classpath/javax/javax/swing/text/BoxView.java | |
int[] newSpansX = new int[oldSize - length + views.length]; System.arraycopy(spansX, 0, newSpansX, 0, offset); System.arraycopy(spansX, offset + length, newSpansX, offset + views.length, | int[] newSpansX = new int[oldSize - length + numViews]; System.arraycopy(spans[X_AXIS], 0, newSpansX, 0, offset); System.arraycopy(spans[X_AXIS], offset + length, newSpansX, offset + numViews, | public void replace(int offset, int length, View[] views) { // Resize and copy data for cache arrays. // The spansX cache. int oldSize = getViewCount(); int[] newSpansX = new int[oldSize - length + views.length]; System.arraycopy(spansX, 0, newSpansX, 0, offset); System.arraycopy(spansX, offset + l... | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/8f1176391e1d000d946793693906d6dc8af29e19/BoxView.java/buggy/core/src/classpath/javax/javax/swing/text/BoxView.java |
spansX = newSpansX; | spans[X_AXIS] = newSpansX; | public void replace(int offset, int length, View[] views) { // Resize and copy data for cache arrays. // The spansX cache. int oldSize = getViewCount(); int[] newSpansX = new int[oldSize - length + views.length]; System.arraycopy(spansX, 0, newSpansX, 0, offset); System.arraycopy(spansX, offset + l... | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/8f1176391e1d000d946793693906d6dc8af29e19/BoxView.java/buggy/core/src/classpath/javax/javax/swing/text/BoxView.java |
int[] newSpansY = new int[oldSize - length + views.length]; System.arraycopy(spansY, 0, newSpansY, 0, offset); System.arraycopy(spansY, offset + length, newSpansY, offset + views.length, | int[] newSpansY = new int[oldSize - length + numViews]; System.arraycopy(spans[Y_AXIS], 0, newSpansY, 0, offset); System.arraycopy(spans[Y_AXIS], offset + length, newSpansY, offset + numViews, | public void replace(int offset, int length, View[] views) { // Resize and copy data for cache arrays. // The spansX cache. int oldSize = getViewCount(); int[] newSpansX = new int[oldSize - length + views.length]; System.arraycopy(spansX, 0, newSpansX, 0, offset); System.arraycopy(spansX, offset + l... | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/8f1176391e1d000d946793693906d6dc8af29e19/BoxView.java/buggy/core/src/classpath/javax/javax/swing/text/BoxView.java |
spansY = newSpansY; | spans[Y_AXIS] = newSpansY; | public void replace(int offset, int length, View[] views) { // Resize and copy data for cache arrays. // The spansX cache. int oldSize = getViewCount(); int[] newSpansX = new int[oldSize - length + views.length]; System.arraycopy(spansX, 0, newSpansX, 0, offset); System.arraycopy(spansX, offset + l... | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/8f1176391e1d000d946793693906d6dc8af29e19/BoxView.java/buggy/core/src/classpath/javax/javax/swing/text/BoxView.java |
int[] newOffsetsX = new int[oldSize - length + views.length]; System.arraycopy(offsetsX, 0, newOffsetsX, 0, offset); System.arraycopy(offsetsX, offset + length, newOffsetsX, offset + views.length, | int[] newOffsetsX = new int[oldSize - length + numViews]; System.arraycopy(offsets[X_AXIS], 0, newOffsetsX, 0, offset); System.arraycopy(offsets[X_AXIS], offset + length, newOffsetsX, offset + numViews, | public void replace(int offset, int length, View[] views) { // Resize and copy data for cache arrays. // The spansX cache. int oldSize = getViewCount(); int[] newSpansX = new int[oldSize - length + views.length]; System.arraycopy(spansX, 0, newSpansX, 0, offset); System.arraycopy(spansX, offset + l... | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/8f1176391e1d000d946793693906d6dc8af29e19/BoxView.java/buggy/core/src/classpath/javax/javax/swing/text/BoxView.java |
offsetsX = newOffsetsX; | offsets[X_AXIS] = newOffsetsX; | public void replace(int offset, int length, View[] views) { // Resize and copy data for cache arrays. // The spansX cache. int oldSize = getViewCount(); int[] newSpansX = new int[oldSize - length + views.length]; System.arraycopy(spansX, 0, newSpansX, 0, offset); System.arraycopy(spansX, offset + l... | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/8f1176391e1d000d946793693906d6dc8af29e19/BoxView.java/buggy/core/src/classpath/javax/javax/swing/text/BoxView.java |
int[] newOffsetsY = new int[oldSize - length + views.length]; System.arraycopy(offsetsY, 0, newOffsetsY, 0, offset); System.arraycopy(offsetsY, offset + length, newOffsetsY, offset + views.length, | int[] newOffsetsY = new int[oldSize - length + numViews]; System.arraycopy(offsets[Y_AXIS], 0, newOffsetsY, 0, offset); System.arraycopy(offsets[Y_AXIS], offset + length, newOffsetsY, offset + numViews, | public void replace(int offset, int length, View[] views) { // Resize and copy data for cache arrays. // The spansX cache. int oldSize = getViewCount(); int[] newSpansX = new int[oldSize - length + views.length]; System.arraycopy(spansX, 0, newSpansX, 0, offset); System.arraycopy(spansX, offset + l... | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/8f1176391e1d000d946793693906d6dc8af29e19/BoxView.java/buggy/core/src/classpath/javax/javax/swing/text/BoxView.java |
offsetsY = newOffsetsY; | offsets[Y_AXIS] = newOffsetsY; | public void replace(int offset, int length, View[] views) { // Resize and copy data for cache arrays. // The spansX cache. int oldSize = getViewCount(); int[] newSpansX = new int[oldSize - length + views.length]; System.arraycopy(spansX, 0, newSpansX, 0, offset); System.arraycopy(spansX, offset + l... | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/8f1176391e1d000d946793693906d6dc8af29e19/BoxView.java/buggy/core/src/classpath/javax/javax/swing/text/BoxView.java |
return 0; | float inset; switch (size) { case View.TOP: inset = topInset; break; case View.BOTTOM: inset = bottomInset; break; case View.LEFT: inset = leftInset; break; case View.RIGHT: inset = rightInset; break; default: inset = 0.0F; } return inset; | public float getInset(int size, View v) { // FIXME: Not implemented. return 0; } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/1bcd4c6d88e5ed1db3364d42f327438e942ed0f0/StyleSheet.java/buggy/core/src/classpath/javax/javax/swing/text/html/StyleSheet.java |
this(bits, | this(bits, | public ColorModel(int bits) { // @classpath-bugfix Fix difference between Sun's class and this class. this(bits, // total bits, sRGB, four channels nArray(bits / 4, 4), // bits for each channel ColorSpace.getInstance(ColorSpace.CS_sRGB), // sRGB true, // has alpha false, // not premultiplied TRANSLUCEN... | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/01db1a0d9fd6e0f94d31c54712f8818b6a6a708e/ColorModel.java/buggy/core/src/classpath/java/java/awt/image/ColorModel.java |
public ColorModel(int bits) { // @classpath-bugfix Fix difference between Sun's class and this class. this(bits, // total bits, sRGB, four channels nArray(bits / 4, 4), // bits for each channel ColorSpace.getInstance(ColorSpace.CS_sRGB), // sRGB true, // has alpha false, // not premultiplied TRANSLUCEN... | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/01db1a0d9fd6e0f94d31c54712f8818b6a6a708e/ColorModel.java/buggy/core/src/classpath/java/java/awt/image/ColorModel.java | ||
throw new AssertionError("BadLocationException must not be thrown " | AssertionError ae; ae = new AssertionError("BadLocationException must not be thrown " | public float getPartialSpan(int p0, int p1) { Element el = getElement(); Document doc = el.getDocument(); Segment seg = new Segment(); try { doc.getText(p0, p1 - p0, seg); } catch (BadLocationException ex) { throw new AssertionError("BadLocationException must not be thrown... | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/74171de2560e91a8fc81940ffc40e047ca41f4a0/GlyphView.java/buggy/core/src/classpath/javax/javax/swing/text/GlyphView.java |
ae.initCause(ex); throw ae; | public float getPartialSpan(int p0, int p1) { Element el = getElement(); Document doc = el.getDocument(); Segment seg = new Segment(); try { doc.getText(p0, p1 - p0, seg); } catch (BadLocationException ex) { throw new AssertionError("BadLocationException must not be thrown... | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/74171de2560e91a8fc81940ffc40e047ca41f4a0/GlyphView.java/buggy/core/src/classpath/javax/javax/swing/text/GlyphView.java | |
throw new AssertionError("BadLocationException should not be " | AssertionError ae; ae = new AssertionError("BadLocationException should not be " | public Segment getText(int p0, int p1) { Segment txt = new Segment(); try { getDocument().getText(p0, p1 - p0, txt); } catch (BadLocationException ex) { throw new AssertionError("BadLocationException should not be " + "thrown here. p0 = " + p0 + "... | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/74171de2560e91a8fc81940ffc40e047ca41f4a0/GlyphView.java/buggy/core/src/classpath/javax/javax/swing/text/GlyphView.java |
ae.initCause(ex); throw ae; | public Segment getText(int p0, int p1) { Segment txt = new Segment(); try { getDocument().getText(p0, p1 - p0, txt); } catch (BadLocationException ex) { throw new AssertionError("BadLocationException should not be " + "thrown here. p0 = " + p0 + "... | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/74171de2560e91a8fc81940ffc40e047ca41f4a0/GlyphView.java/buggy/core/src/classpath/javax/javax/swing/text/GlyphView.java | |
public abstract void setText (CharacterIterator newText); | public void setText (String newText) { setText (new StringCharacterIterator (newText)); } | public abstract void setText (CharacterIterator newText); | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/7f307fb93603fe403e70ef06550dde0db394a5ac/BreakIterator.java/buggy/core/src/classpath/java/java/text/BreakIterator.java |
edits.clear(); elementStack.clear(); | private void finishEdit(DefaultDocumentEvent ev) { // This for loop applies all the changes that were made and updates the // DocumentEvent. for (Iterator i = edits.iterator(); i.hasNext();) { Edit edits = (Edit) i.next(); Element[] removed = new Element[edits.removed.siz... | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ba862f89183b5347853381927a04e1e399fae5db/DefaultStyledDocument.java/clean/core/src/classpath/javax/javax/swing/text/DefaultStyledDocument.java | |
for (int p = 0; | int p; for (p = 0; | protected void insertUpdate(ElementSpec[] data) { // Push the current path to the stack. Element current = root; int index = current.getElementIndex(offset); while (! current.isLeaf()) { Element child = current.getElement(index); int editIndex = child.isLeaf() ? index... | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ba862f89183b5347853381927a04e1e399fae5db/DefaultStyledDocument.java/clean/core/src/classpath/javax/javax/swing/text/DefaultStyledDocument.java |
p++) { | p++); | protected void insertUpdate(ElementSpec[] data) { // Push the current path to the stack. Element current = root; int index = current.getElementIndex(offset); while (! current.isLeaf()) { Element child = current.getElement(index); int editIndex = child.isLeaf() ? index... | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ba862f89183b5347853381927a04e1e399fae5db/DefaultStyledDocument.java/clean/core/src/classpath/javax/javax/swing/text/DefaultStyledDocument.java |
} | protected void insertUpdate(ElementSpec[] data) { // Push the current path to the stack. Element current = root; int index = current.getElementIndex(offset); while (! current.isLeaf()) { Element child = current.getElement(index); int editIndex = child.isLeaf() ? index... | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ba862f89183b5347853381927a04e1e399fae5db/DefaultStyledDocument.java/clean/core/src/classpath/javax/javax/swing/text/DefaultStyledDocument.java | |
writeLock(); | protected void create(ElementSpec[] data) { writeLock(); try { // Clear content if there is some. int len = getLength(); if (len > 0) remove(0, len); // Now we insert the content. StringBuilder b = new StringBuilder(); for (int i = 0; i < data.length; ++i... | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ba862f89183b5347853381927a04e1e399fae5db/DefaultStyledDocument.java/clean/core/src/classpath/javax/javax/swing/text/DefaultStyledDocument.java | |
BranchElement createRoot = (BranchElement) createBranchElement(null, null); Element dummyLeaf = createLeafElement(createRoot, null, 0, 1); createRoot.replace(0, 0, new Element[]{ dummyLeaf }); ElementBuffer createBuffer = new ElementBuffer(createRoot); createBuffer.insert(0, b.length(), data, new DefaultDocumentEve... | buffer.create(len, data, ev); | protected void create(ElementSpec[] data) { writeLock(); try { // Clear content if there is some. int len = getLength(); if (len > 0) remove(0, len); // Now we insert the content. StringBuilder b = new StringBuilder(); for (int i = 0; i < data.length; ++i... | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ba862f89183b5347853381927a04e1e399fae5db/DefaultStyledDocument.java/clean/core/src/classpath/javax/javax/swing/text/DefaultStyledDocument.java |
root.replace(0, removed.length, added); ev.addEdit(new ElementEdit(root, 0, removed, added)); | super.insertUpdate(ev, null); | protected void create(ElementSpec[] data) { writeLock(); try { // Clear content if there is some. int len = getLength(); if (len > 0) remove(0, len); // Now we insert the content. StringBuilder b = new StringBuilder(); for (int i = 0; i < data.length; ++i... | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ba862f89183b5347853381927a04e1e399fae5db/DefaultStyledDocument.java/clean/core/src/classpath/javax/javax/swing/text/DefaultStyledDocument.java |
ev.end(); | protected void create(ElementSpec[] data) { writeLock(); try { // Clear content if there is some. int len = getLength(); if (len > 0) remove(0, len); // Now we insert the content. StringBuilder b = new StringBuilder(); for (int i = 0; i < data.length; ++i... | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ba862f89183b5347853381927a04e1e399fae5db/DefaultStyledDocument.java/clean/core/src/classpath/javax/javax/swing/text/DefaultStyledDocument.java | |
UndoableEdit edit = content.insertString(offset, | Content c = getContent(); UndoableEdit edit = c.insertString(offset, | protected void insert(int offset, ElementSpec[] data) throws BadLocationException { if (data == null || data.length == 0) return; try { // writeLock() and writeUnlock() should always be in a try/finally // block so that locking balance is guaranteed even if some // exception ... | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ba862f89183b5347853381927a04e1e399fae5db/DefaultStyledDocument.java/clean/core/src/classpath/javax/javax/swing/text/DefaultStyledDocument.java |
super.insertUpdate(ev, null); ev.end(); | protected void insert(int offset, ElementSpec[] data) throws BadLocationException { if (data == null || data.length == 0) return; try { // writeLock() and writeUnlock() should always be in a try/finally // block so that locking balance is guaranteed even if some // exception ... | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ba862f89183b5347853381927a04e1e399fae5db/DefaultStyledDocument.java/clean/core/src/classpath/javax/javax/swing/text/DefaultStyledDocument.java | |
int vLength = value.length(); if (maskLength != vLength) throw new ParseException ("stringToValue passed invalid value", vLength); try { convertValue(value, false); } catch (ParseException pe) { throw new ParseException("stringToValue passed invalid value", pe.getErrorOffset()); } if (!getValueContainsLiteralCh... | return super.stringToValue(convertStringToValue(value)); | public Object stringToValue (String value) throws ParseException { int vLength = value.length(); // For value to be a valid it must be the same length as the mask // note this doesn't take into account symbols that occupy more than // one character, this is something we may possibly need to fix. ... | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ba862f89183b5347853381927a04e1e399fae5db/MaskFormatter.java/buggy/core/src/classpath/javax/javax/swing/text/MaskFormatter.java |
public String valueToString (Object value) throws ParseException | public String valueToString(Object value) throws ParseException | public String valueToString (Object value) throws ParseException { String result = super.valueToString(value); int rLength = result.length(); // If value is longer than the mask, truncate it. Note we may need to // account for symbols that are more than one character long. if (rLength > maskLeng... | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ba862f89183b5347853381927a04e1e399fae5db/MaskFormatter.java/buggy/core/src/classpath/javax/javax/swing/text/MaskFormatter.java |
String result = super.valueToString(value); int rLength = result.length(); if (rLength > maskLength) result = result.substring(0, maskLength); result = convertValue(result, true); if (rLength < maskLength) return pad(result, rLength); return result; | String string = value != null ? value.toString() : ""; return convertValueToString(string); | public String valueToString (Object value) throws ParseException { String result = super.valueToString(value); int rLength = result.length(); // If value is longer than the mask, truncate it. Note we may need to // account for symbols that are more than one character long. if (rLength > maskLeng... | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ba862f89183b5347853381927a04e1e399fae5db/MaskFormatter.java/buggy/core/src/classpath/javax/javax/swing/text/MaskFormatter.java |
return ((1 << getType(ch)) & ((1 << UPPERCASE_LETTER) | (1 << LOWERCASE_LETTER) | (1 << TITLECASE_LETTER) | (1 << MODIFIER_LETTER) | (1 << OTHER_LETTER))) != 0; | return isLetter((int)ch); | public static boolean isLetter(char ch) { return ((1 << getType(ch)) & ((1 << UPPERCASE_LETTER) | (1 << LOWERCASE_LETTER) | (1 << TITLECASE_LETTER) | (1 << MODIFIER_LETTER) | (1 << OTHER_LETTER))) != 0; } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/1b7948b90667ad6e59c157b1700e8034e8813d3a/Character.java/buggy/core/src/classpath/5.0/java/lang/Character.java |
throw new CRLException(ioe.toString()); | CRLException crle = new CRLException(ioe.getMessage()); crle.initCause (ioe); throw crle; | public CRL engineGenerateCRL(InputStream inStream) throws CRLException { try { return generateCRL(inStream); } catch (IOException ioe) { throw new CRLException(ioe.toString()); } } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ec415b5ab69e9516c29619bb561ab024d22ce1f2/X509CertificateFactory.java/buggy/core/src/classpath/gnu/gnu/java/security/provider/X509CertificateFactory.java |
throw new CRLException(ioe.toString()); | CRLException crle = new CRLException(ioe.getMessage()); crle.initCause (ioe); throw crle; | public Collection engineGenerateCRLs(InputStream inStream) throws CRLException { LinkedList crls = new LinkedList(); while (true) { try { crls.add(generateCRL(inStream)); } catch (EOFException eof) { break; } catch (IOExcept... | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ec415b5ab69e9516c29619bb561ab024d22ce1f2/X509CertificateFactory.java/buggy/core/src/classpath/gnu/gnu/java/security/provider/X509CertificateFactory.java |
throw new CertificateException(ioe.toString()); | CertificateException ce = new CertificateException(ioe.getMessage()); ce.initCause (ioe); throw ce; | public Certificate engineGenerateCertificate(InputStream inStream) throws CertificateException { try { return generateCert(inStream); } catch (IOException ioe) { throw new CertificateException(ioe.toString()); } } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ec415b5ab69e9516c29619bb561ab024d22ce1f2/X509CertificateFactory.java/buggy/core/src/classpath/gnu/gnu/java/security/provider/X509CertificateFactory.java |
throw new CertificateException(ioe.toString()); | CertificateException ce = new CertificateException(ioe.getMessage()); ce.initCause (ioe); throw ce; | public Collection engineGenerateCertificates(InputStream inStream) throws CertificateException { LinkedList certs = new LinkedList(); while (true) { try { certs.add(generateCert(inStream)); } catch (EOFException eof) { break; } ... | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ec415b5ab69e9516c29619bb561ab024d22ce1f2/X509CertificateFactory.java/buggy/core/src/classpath/gnu/gnu/java/security/provider/X509CertificateFactory.java |
if (inStream == null) throw new CRLException("missing input stream"); | private X509CRL generateCRL(InputStream inStream) throws IOException, CRLException { if (!inStream.markSupported()) inStream = new BufferedInputStream(inStream, 8192); inStream.mark(20); int i = inStream.read(); if (i == -1) throw new EOFException(); // If the input is in binary DER forma... | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ec415b5ab69e9516c29619bb561ab024d22ce1f2/X509CertificateFactory.java/buggy/core/src/classpath/gnu/gnu/java/security/provider/X509CertificateFactory.java | |
if (inStream == null) throw new CertificateException("missing input stream"); | private X509Certificate generateCert(InputStream inStream) throws IOException, CertificateException { if (!inStream.markSupported()) inStream = new BufferedInputStream(inStream, 8192); inStream.mark(20); int i = inStream.read(); if (i == -1) throw new EOFException(); // If the input is in... | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ec415b5ab69e9516c29619bb561ab024d22ce1f2/X509CertificateFactory.java/buggy/core/src/classpath/gnu/gnu/java/security/provider/X509CertificateFactory.java | |
throw new Error("not implemented"); | return Math.max(Line2D.ptSegDistSq(x1, y1, x2, y2, cx1, cy1), Line2D.ptSegDistSq(x1, y1, x2, y2, cx2, cy2)); | public static double getFlatnessSq(double x1, double y1, double cx1, double cy1, double cx2, double cy2, double x2, double y2) { // XXX Implement. throw new Error("not implemented"); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ac6303b96cdaf2d4230daf25a90dd00cc4cb192d/CubicCurve2D.java/clean/core/src/classpath/java/java/awt/geom/CubicCurve2D.java |
private int current; | private int current = 0; | public PathIterator getPathIterator(final AffineTransform at) { return new PathIterator() { /** Current coordinate. */ private int current; public int getWindingRule() { return WIND_NON_ZERO; } public boolean isDone() { return current < 2; } public voi... | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ac6303b96cdaf2d4230daf25a90dd00cc4cb192d/CubicCurve2D.java/clean/core/src/classpath/java/java/awt/geom/CubicCurve2D.java |
return current < 2; | return current >= 2; | public PathIterator getPathIterator(final AffineTransform at) { return new PathIterator() { /** Current coordinate. */ private int current; public int getWindingRule() { return WIND_NON_ZERO; } public boolean isDone() { return current < 2; } public voi... | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ac6303b96cdaf2d4230daf25a90dd00cc4cb192d/CubicCurve2D.java/clean/core/src/classpath/java/java/awt/geom/CubicCurve2D.java |
if (current == 0) | int result; switch (current) | public PathIterator getPathIterator(final AffineTransform at) { return new PathIterator() { /** Current coordinate. */ private int current; public int getWindingRule() { return WIND_NON_ZERO; } public boolean isDone() { return current < 2; } public voi... | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ac6303b96cdaf2d4230daf25a90dd00cc4cb192d/CubicCurve2D.java/clean/core/src/classpath/java/java/awt/geom/CubicCurve2D.java |
if (at != null) at.transform(coords, 0, coords, 0, 1); return SEG_MOVETO; } if (current == 1) { | result = SEG_MOVETO; break; case 1: | public PathIterator getPathIterator(final AffineTransform at) { return new PathIterator() { /** Current coordinate. */ private int current; public int getWindingRule() { return WIND_NON_ZERO; } public boolean isDone() { return current < 2; } public voi... | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ac6303b96cdaf2d4230daf25a90dd00cc4cb192d/CubicCurve2D.java/clean/core/src/classpath/java/java/awt/geom/CubicCurve2D.java |
return SEG_CUBICTO; } throw new NoSuchElementException("cubic iterator out of bounds"); | return result; | public PathIterator getPathIterator(final AffineTransform at) { return new PathIterator() { /** Current coordinate. */ private int current; public int getWindingRule() { return WIND_NON_ZERO; } public boolean isDone() { return current < 2; } public voi... | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ac6303b96cdaf2d4230daf25a90dd00cc4cb192d/CubicCurve2D.java/clean/core/src/classpath/java/java/awt/geom/CubicCurve2D.java |
if (current == 0) | int result; switch (current) | public PathIterator getPathIterator(final AffineTransform at) { return new PathIterator() { /** Current coordinate. */ private int current; public int getWindingRule() { return WIND_NON_ZERO; } public boolean isDone() { return current < 2; } public voi... | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ac6303b96cdaf2d4230daf25a90dd00cc4cb192d/CubicCurve2D.java/clean/core/src/classpath/java/java/awt/geom/CubicCurve2D.java |
if (at != null) at.transform(coords, 0, coords, 0, 1); return SEG_MOVETO; } if (current == 1) { | result = SEG_MOVETO; break; case 1: | public PathIterator getPathIterator(final AffineTransform at) { return new PathIterator() { /** Current coordinate. */ private int current; public int getWindingRule() { return WIND_NON_ZERO; } public boolean isDone() { return current < 2; } public voi... | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ac6303b96cdaf2d4230daf25a90dd00cc4cb192d/CubicCurve2D.java/clean/core/src/classpath/java/java/awt/geom/CubicCurve2D.java |
return SEG_CUBICTO; } throw new NoSuchElementException("cubic iterator out of bounds"); | return result; | public PathIterator getPathIterator(final AffineTransform at) { return new PathIterator() { /** Current coordinate. */ private int current; public int getWindingRule() { return WIND_NON_ZERO; } public boolean isDone() { return current < 2; } public voi... | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ac6303b96cdaf2d4230daf25a90dd00cc4cb192d/CubicCurve2D.java/clean/core/src/classpath/java/java/awt/geom/CubicCurve2D.java |
if (current == 0) | int result; switch (current) | public int currentSegment(float[] coords) { if (current == 0) { coords[0] = (float) getX1(); coords[1] = (float) getY1(); if (at != null) at.transform(coords, 0, coords, 0, 1); return SEG_MOVETO; } if (current == 1) ... | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ac6303b96cdaf2d4230daf25a90dd00cc4cb192d/CubicCurve2D.java/clean/core/src/classpath/java/java/awt/geom/CubicCurve2D.java |
if (at != null) at.transform(coords, 0, coords, 0, 1); return SEG_MOVETO; } if (current == 1) { | result = SEG_MOVETO; break; case 1: | public int currentSegment(float[] coords) { if (current == 0) { coords[0] = (float) getX1(); coords[1] = (float) getY1(); if (at != null) at.transform(coords, 0, coords, 0, 1); return SEG_MOVETO; } if (current == 1) ... | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ac6303b96cdaf2d4230daf25a90dd00cc4cb192d/CubicCurve2D.java/clean/core/src/classpath/java/java/awt/geom/CubicCurve2D.java |
return SEG_CUBICTO; } throw new NoSuchElementException("cubic iterator out of bounds"); | return result; | public int currentSegment(float[] coords) { if (current == 0) { coords[0] = (float) getX1(); coords[1] = (float) getY1(); if (at != null) at.transform(coords, 0, coords, 0, 1); return SEG_MOVETO; } if (current == 1) ... | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ac6303b96cdaf2d4230daf25a90dd00cc4cb192d/CubicCurve2D.java/clean/core/src/classpath/java/java/awt/geom/CubicCurve2D.java |
return current < 2; | return current >= 2; | public boolean isDone() { return current < 2; } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ac6303b96cdaf2d4230daf25a90dd00cc4cb192d/CubicCurve2D.java/clean/core/src/classpath/java/java/awt/geom/CubicCurve2D.java |
public void subdivide(CubicCurve2D l, CubicCurve2D r) | public void subdivide(CubicCurve2D left, CubicCurve2D right) | public void subdivide(CubicCurve2D l, CubicCurve2D r) { if (l == null) l = new CubicCurve2D.Double(); if (r == null) r = new CubicCurve2D.Double(); // Use empty slots at end to share single array. double[] d = new double[] { getX1(), getY1(), getCtrlX1(), getCtrlY1(), ... | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ac6303b96cdaf2d4230daf25a90dd00cc4cb192d/CubicCurve2D.java/clean/core/src/classpath/java/java/awt/geom/CubicCurve2D.java |
if (l == null) l = new CubicCurve2D.Double(); if (r == null) r = new CubicCurve2D.Double(); | public void subdivide(CubicCurve2D l, CubicCurve2D r) { if (l == null) l = new CubicCurve2D.Double(); if (r == null) r = new CubicCurve2D.Double(); // Use empty slots at end to share single array. double[] d = new double[] { getX1(), getY1(), getCtrlX1(), getCtrlY1(), ... | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ac6303b96cdaf2d4230daf25a90dd00cc4cb192d/CubicCurve2D.java/clean/core/src/classpath/java/java/awt/geom/CubicCurve2D.java | |
l.setCurve(d, 0); r.setCurve(d, 6); | if (left != null) left.setCurve(d, 0); if (right != null) right.setCurve(d, 6); | public void subdivide(CubicCurve2D l, CubicCurve2D r) { if (l == null) l = new CubicCurve2D.Double(); if (r == null) r = new CubicCurve2D.Double(); // Use empty slots at end to share single array. double[] d = new double[] { getX1(), getY1(), getCtrlX1(), getCtrlY1(), ... | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ac6303b96cdaf2d4230daf25a90dd00cc4cb192d/CubicCurve2D.java/clean/core/src/classpath/java/java/awt/geom/CubicCurve2D.java |
public static int solveQuadratic(double[] eqn, double[] res) | public static int solveQuadratic(double[] eqn) | public static int solveQuadratic(double[] eqn, double[] res) { // Taken from poly/solve_quadratic.c in the GNU Scientific Library // (GSL), cvs revision 1.7 of 2003-07-26. For the original source, // see http://www.gnu.org/software/gsl/ // // Brian Gough, the author of that code, has granted the //... | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/20002e10b15f0b6d4dcc01a9b59f8f854f0731b1/QuadCurve2D.java/buggy/core/src/classpath/java/java/awt/geom/QuadCurve2D.java |
double a; double b; double c; double disc; c = eqn[0]; b = eqn[1]; a = eqn[2]; if (a == 0) { if (b == 0) return -1; res[0] = -c / b; return 1; } disc = b * b - 4 * a * c; if (disc < 0) return 0; if (disc == 0) { res[0] = -0.5 * b / a; return 1; } if (b == 0) { double r; r = Math.abs(0.5 * Mat... | return solveQuadratic(eqn, eqn); | public static int solveQuadratic(double[] eqn, double[] res) { // Taken from poly/solve_quadratic.c in the GNU Scientific Library // (GSL), cvs revision 1.7 of 2003-07-26. For the original source, // see http://www.gnu.org/software/gsl/ // // Brian Gough, the author of that code, has granted the //... | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/20002e10b15f0b6d4dcc01a9b59f8f854f0731b1/QuadCurve2D.java/buggy/core/src/classpath/java/java/awt/geom/QuadCurve2D.java |
put("Alg.Alias.Signature.RSA", "MD5withRSA"); | public Gnu() { super("GNU", 1.0, "GNU provider v1.0 implementing SHA-1, MD5, DSA, RSA, X.509 Certificates and CRLs, PKIX certificate path validators, Collection cert stores, Diffie-Hellman key agreement and key pair generator"); AccessController.doPrivileged (new PrivilegedAction() { public Object run(... | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/abad947539d38da7392ff914207d1bb7d5538320/Gnu.java/clean/core/src/classpath/gnu/gnu/java/security/provider/Gnu.java | |
put("Alg.Alias.Signature.RSA", "MD5withRSA"); | public Object run() { // Note that all implementation class names are referenced by using // Class.getName(). That way when we staticly link the Gnu provider // we automatically get all the implementation classes. // Signature put("Signature.SHA160withDSS", gnu.java.security.jce... | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/abad947539d38da7392ff914207d1bb7d5538320/Gnu.java/clean/core/src/classpath/gnu/gnu/java/security/provider/Gnu.java | |
ORB orb = Restricted_ORB.Singleton; | ORB orb = OrbRestricted.Singleton; | public static TypeCode type() { ORB orb = Restricted_ORB.Singleton; return orb.create_alias_tc(id(), "FieldName", orb.create_string_tc(0)); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/e9344cb85925e12da0e0cccb4ba0521d8696a226/FieldNameHelper.java/buggy/core/src/classpath/org/org/omg/DynamicAny/FieldNameHelper.java |
if (b.isSelected() && b.isEnabled()) | if (m.isSelected() && m.isEnabled()) | public void paint(Graphics g, JComponent c) { AbstractButton b = (AbstractButton) c; Rectangle tr = new Rectangle(); Rectangle ir = new Rectangle(); Rectangle vr = new Rectangle(); Font f = c.getFont(); g.setFont(f); Icon currentIcon = null; if (b.isSelected() && b.isEnabled()) currentIc... | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/abad947539d38da7392ff914207d1bb7d5538320/BasicRadioButtonUI.java/buggy/core/src/classpath/javax/javax/swing/plaf/basic/BasicRadioButtonUI.java |
else if (!b.isSelected() && b.isEnabled()) | else if (! m.isSelected() && m.isEnabled()) | public void paint(Graphics g, JComponent c) { AbstractButton b = (AbstractButton) c; Rectangle tr = new Rectangle(); Rectangle ir = new Rectangle(); Rectangle vr = new Rectangle(); Font f = c.getFont(); g.setFont(f); Icon currentIcon = null; if (b.isSelected() && b.isEnabled()) currentIc... | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/abad947539d38da7392ff914207d1bb7d5538320/BasicRadioButtonUI.java/buggy/core/src/classpath/javax/javax/swing/plaf/basic/BasicRadioButtonUI.java |
else if (b.isSelected() && !b.isEnabled()) | else if (m.isSelected() && ! m.isEnabled()) | public void paint(Graphics g, JComponent c) { AbstractButton b = (AbstractButton) c; Rectangle tr = new Rectangle(); Rectangle ir = new Rectangle(); Rectangle vr = new Rectangle(); Font f = c.getFont(); g.setFont(f); Icon currentIcon = null; if (b.isSelected() && b.isEnabled()) currentIc... | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/abad947539d38da7392ff914207d1bb7d5538320/BasicRadioButtonUI.java/buggy/core/src/classpath/javax/javax/swing/plaf/basic/BasicRadioButtonUI.java |
else | else | public void paint(Graphics g, JComponent c) { AbstractButton b = (AbstractButton) c; Rectangle tr = new Rectangle(); Rectangle ir = new Rectangle(); Rectangle vr = new Rectangle(); Font f = c.getFont(); g.setFont(f); Icon currentIcon = null; if (b.isSelected() && b.isEnabled()) currentIc... | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/abad947539d38da7392ff914207d1bb7d5538320/BasicRadioButtonUI.java/buggy/core/src/classpath/javax/javax/swing/plaf/basic/BasicRadioButtonUI.java |
if (b.hasFocus() && b.isFocusPainted() && b.isEnabled()) | if (b.hasFocus() && b.isFocusPainted() && m.isEnabled()) | public void paint(Graphics g, JComponent c) { AbstractButton b = (AbstractButton) c; Rectangle tr = new Rectangle(); Rectangle ir = new Rectangle(); Rectangle vr = new Rectangle(); Font f = c.getFont(); g.setFont(f); Icon currentIcon = null; if (b.isSelected() && b.isEnabled()) currentIc... | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/abad947539d38da7392ff914207d1bb7d5538320/BasicRadioButtonUI.java/buggy/core/src/classpath/javax/javax/swing/plaf/basic/BasicRadioButtonUI.java |
huffman.tallyDist(strstart - matchStart, matchLen); | boolean full = huffman.tallyDist(strstart - matchStart, matchLen); | private boolean deflateFast(boolean flush, boolean finish) { if (lookahead < MIN_LOOKAHEAD && !flush) return false; while (lookahead >= MIN_LOOKAHEAD || flush) { if (lookahead == 0) { /* We are flushing everything */ huffman.flushBlock(window, blockStart, strstart - blockStart, fin... | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/4d9dd8abd1355057dc6966b7ca9f4459b3a3e945/DeflaterEngine.java/clean/core/src/classpath/java/java/util/zip/DeflaterEngine.java |
if (!full) | private boolean deflateFast(boolean flush, boolean finish) { if (lookahead < MIN_LOOKAHEAD && !flush) return false; while (lookahead >= MIN_LOOKAHEAD || flush) { if (lookahead == 0) { /* We are flushing everything */ huffman.flushBlock(window, blockStart, strstart - blockStart, fin... | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/4d9dd8abd1355057dc6966b7ca9f4459b3a3e945/DeflaterEngine.java/clean/core/src/classpath/java/java/util/zip/DeflaterEngine.java |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.