rem stringlengths 0 477k | add stringlengths 0 313k | context stringlengths 6 599k | meta stringlengths 141 403 |
|---|---|---|---|
tnvt (Screen5250 screen52) { | tnvt (Properties props, Screen5250 screen52, boolean type, boolean support132) { | tnvt (Screen5250 screen52) { this(screen52,false,false); } | 1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/e95e8529e0583c40804063baff9fc99787c4f55b/tnvt.java/clean/tn5250j/src/org/tn5250j/tnvt.java |
this(screen52,false,false); | enhanced = type; this.support132 = support132; | tnvt (Screen5250 screen52) { this(screen52,false,false); } | 1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/e95e8529e0583c40804063baff9fc99787c4f55b/tnvt.java/clean/tn5250j/src/org/tn5250j/tnvt.java |
sessProps = null; if (props != null) sessProps = props; if (sessProps.getProperty(SESSION_CODE_PAGE) != null) { setCodePage(sessProps.getProperty(SESSION_CODE_PAGE)); } else { setCodePage("37"); } this.screen52 = screen52; dataIncluded = new boolean[24]; baosp = new ByteArrayOutputStream(); baosrsp = new ByteArrayO... | tnvt (Screen5250 screen52) { this(screen52,false,false); } | 1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/e95e8529e0583c40804063baff9fc99787c4f55b/tnvt.java/clean/tn5250j/src/org/tn5250j/tnvt.java | |
public void addAddedElement (Element e) | public void addAddedElement(Element e) | public void addAddedElement (Element e) { if (!added.contains(e)) added.add(e); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/5806c07c3eeedb0f4f92b9fbacf30c0f55915c25/DefaultStyledDocument.java/clean/core/src/classpath/javax/javax/swing/text/DefaultStyledDocument.java |
if (!added.contains(e)) | if (!contains(added, e)) | public void addAddedElement (Element e) { if (!added.contains(e)) added.add(e); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/5806c07c3eeedb0f4f92b9fbacf30c0f55915c25/DefaultStyledDocument.java/clean/core/src/classpath/javax/javax/swing/text/DefaultStyledDocument.java |
public void addAddedElements (Element[] e) | public void addAddedElements(Element[] e) | public void addAddedElements (Element[] e) { if (e == null || e.length == 0) return; for (int i = 0; i < e.length; i++) { if (!added.contains(e[i])) added.add(e[i]); } } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/5806c07c3eeedb0f4f92b9fbacf30c0f55915c25/DefaultStyledDocument.java/clean/core/src/classpath/javax/javax/swing/text/DefaultStyledDocument.java |
if (!added.contains(e[i])) | if (!contains(added, e[i])) | public void addAddedElements (Element[] e) { if (e == null || e.length == 0) return; for (int i = 0; i < e.length; i++) { if (!added.contains(e[i])) added.add(e[i]); } } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/5806c07c3eeedb0f4f92b9fbacf30c0f55915c25/DefaultStyledDocument.java/clean/core/src/classpath/javax/javax/swing/text/DefaultStyledDocument.java |
public void addRemovedElement (Element e) | public void addRemovedElement(Element e) | public void addRemovedElement (Element e) { if (!removed.contains(e)) removed.add(e); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/5806c07c3eeedb0f4f92b9fbacf30c0f55915c25/DefaultStyledDocument.java/clean/core/src/classpath/javax/javax/swing/text/DefaultStyledDocument.java |
if (!removed.contains(e)) | if (!contains(removed, e)) | public void addRemovedElement (Element e) { if (!removed.contains(e)) removed.add(e); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/5806c07c3eeedb0f4f92b9fbacf30c0f55915c25/DefaultStyledDocument.java/clean/core/src/classpath/javax/javax/swing/text/DefaultStyledDocument.java |
public void addRemovedElements (Element[] e) | public void addRemovedElements(Element[] e) | public void addRemovedElements (Element[] e) { if (e == null || e.length == 0) return; for (int i = 0; i < e.length; i++) { if (!removed.contains(e[i])) removed.add(e[i]); } } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/5806c07c3eeedb0f4f92b9fbacf30c0f55915c25/DefaultStyledDocument.java/clean/core/src/classpath/javax/javax/swing/text/DefaultStyledDocument.java |
if (!removed.contains(e[i])) | if (!contains(removed, e[i])) | public void addRemovedElements (Element[] e) { if (e == null || e.length == 0) return; for (int i = 0; i < e.length; i++) { if (!removed.contains(e[i])) removed.add(e[i]); } } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/5806c07c3eeedb0f4f92b9fbacf30c0f55915c25/DefaultStyledDocument.java/clean/core/src/classpath/javax/javax/swing/text/DefaultStyledDocument.java |
{ | { if (length == 0) return; | public void change(int offset, int length, DefaultDocumentEvent ev) { this.offset = offset; this.length = length; documentEvent = ev; changeUpdate(); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/5806c07c3eeedb0f4f92b9fbacf30c0f55915c25/DefaultStyledDocument.java/clean/core/src/classpath/javax/javax/swing/text/DefaultStyledDocument.java |
this.pos = offset; | public void change(int offset, int length, DefaultDocumentEvent ev) { this.offset = offset; this.length = length; documentEvent = ev; changeUpdate(); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/5806c07c3eeedb0f4f92b9fbacf30c0f55915c25/DefaultStyledDocument.java/clean/core/src/classpath/javax/javax/swing/text/DefaultStyledDocument.java | |
Element[] res = split(el, offset, 0); | Element[] res = split(el, offset, 0, el.getElementIndex(offset)); | protected void changeUpdate() { // Split up the element at the start offset if necessary. Element el = getCharacterElement(offset); Element[] res = split(el, offset, 0); BranchElement par = (BranchElement) el.getParentElement(); if (res[1] != null) { int index = par.getEl... | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/5806c07c3eeedb0f4f92b9fbacf30c0f55915c25/DefaultStyledDocument.java/clean/core/src/classpath/javax/javax/swing/text/DefaultStyledDocument.java |
int index = par.getElementIndex(offset); | protected void changeUpdate() { // Split up the element at the start offset if necessary. Element el = getCharacterElement(offset); Element[] res = split(el, offset, 0); BranchElement par = (BranchElement) el.getParentElement(); if (res[1] != null) { int index = par.getEl... | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/5806c07c3eeedb0f4f92b9fbacf30c0f55915c25/DefaultStyledDocument.java/clean/core/src/classpath/javax/javax/swing/text/DefaultStyledDocument.java | |
added = new Element[]{ res[1] }; | added = new Element[] { res[1] }; | protected void changeUpdate() { // Split up the element at the start offset if necessary. Element el = getCharacterElement(offset); Element[] res = split(el, offset, 0); BranchElement par = (BranchElement) el.getParentElement(); if (res[1] != null) { int index = par.getEl... | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/5806c07c3eeedb0f4f92b9fbacf30c0f55915c25/DefaultStyledDocument.java/clean/core/src/classpath/javax/javax/swing/text/DefaultStyledDocument.java |
removed = new Element[]{ el }; added = new Element[]{ res[0], res[1] }; | removed = new Element[] { el }; added = new Element[] { res[0], res[1] }; | protected void changeUpdate() { // Split up the element at the start offset if necessary. Element el = getCharacterElement(offset); Element[] res = split(el, offset, 0); BranchElement par = (BranchElement) el.getParentElement(); if (res[1] != null) { int index = par.getEl... | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/5806c07c3eeedb0f4f92b9fbacf30c0f55915c25/DefaultStyledDocument.java/clean/core/src/classpath/javax/javax/swing/text/DefaultStyledDocument.java |
Edit edit = getEditForParagraphAndIndex(par, index); | protected void changeUpdate() { // Split up the element at the start offset if necessary. Element el = getCharacterElement(offset); Element[] res = split(el, offset, 0); BranchElement par = (BranchElement) el.getParentElement(); if (res[1] != null) { int index = par.getEl... | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/5806c07c3eeedb0f4f92b9fbacf30c0f55915c25/DefaultStyledDocument.java/clean/core/src/classpath/javax/javax/swing/text/DefaultStyledDocument.java | |
res = split(el, endOffset, 0); | res = split(el, endOffset, 0, el.getElementIndex(endOffset)); | protected void changeUpdate() { // Split up the element at the start offset if necessary. Element el = getCharacterElement(offset); Element[] res = split(el, offset, 0); BranchElement par = (BranchElement) el.getParentElement(); if (res[1] != null) { int index = par.getEl... | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/5806c07c3eeedb0f4f92b9fbacf30c0f55915c25/DefaultStyledDocument.java/clean/core/src/classpath/javax/javax/swing/text/DefaultStyledDocument.java |
if (res[1] != null) | if (res[0] != null) | protected void changeUpdate() { // Split up the element at the start offset if necessary. Element el = getCharacterElement(offset); Element[] res = split(el, offset, 0); BranchElement par = (BranchElement) el.getParentElement(); if (res[1] != null) { int index = par.getEl... | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/5806c07c3eeedb0f4f92b9fbacf30c0f55915c25/DefaultStyledDocument.java/clean/core/src/classpath/javax/javax/swing/text/DefaultStyledDocument.java |
int index = par.getElementIndex(offset); | protected void changeUpdate() { // Split up the element at the start offset if necessary. Element el = getCharacterElement(offset); Element[] res = split(el, offset, 0); BranchElement par = (BranchElement) el.getParentElement(); if (res[1] != null) { int index = par.getEl... | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/5806c07c3eeedb0f4f92b9fbacf30c0f55915c25/DefaultStyledDocument.java/clean/core/src/classpath/javax/javax/swing/text/DefaultStyledDocument.java | |
added = new Element[]{ res[1] }; | added = new Element[] { res[1] }; | protected void changeUpdate() { // Split up the element at the start offset if necessary. Element el = getCharacterElement(offset); Element[] res = split(el, offset, 0); BranchElement par = (BranchElement) el.getParentElement(); if (res[1] != null) { int index = par.getEl... | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/5806c07c3eeedb0f4f92b9fbacf30c0f55915c25/DefaultStyledDocument.java/clean/core/src/classpath/javax/javax/swing/text/DefaultStyledDocument.java |
removed = new Element[]{ el }; added = new Element[]{ res[0], res[1] }; | removed = new Element[] { el }; added = new Element[] { res[0], res[1] }; | protected void changeUpdate() { // Split up the element at the start offset if necessary. Element el = getCharacterElement(offset); Element[] res = split(el, offset, 0); BranchElement par = (BranchElement) el.getParentElement(); if (res[1] != null) { int index = par.getEl... | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/5806c07c3eeedb0f4f92b9fbacf30c0f55915c25/DefaultStyledDocument.java/clean/core/src/classpath/javax/javax/swing/text/DefaultStyledDocument.java |
Edit edit = getEditForParagraphAndIndex(par, index); | protected void changeUpdate() { // Split up the element at the start offset if necessary. Element el = getCharacterElement(offset); Element[] res = split(el, offset, 0); BranchElement par = (BranchElement) el.getParentElement(); if (res[1] != null) { int index = par.getEl... | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/5806c07c3eeedb0f4f92b9fbacf30c0f55915c25/DefaultStyledDocument.java/clean/core/src/classpath/javax/javax/swing/text/DefaultStyledDocument.java | |
{ BranchElement paragraph = (BranchElement)elementStack.peek(); int index = paragraph.getElementIndex(offset); | { BranchElement paragraph = (BranchElement) elementStack.peek(); int index = paragraph.getElementIndex(offset); | private void createFracture(ElementSpec[] data) { // FIXME: This method is not complete. We must handle the elementStack // properly and make sure the appropriate Elements are pushed onto the // top of the stack so future inserts go to the appropriate paragraph. BranchElement paragraph = (B... | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/5806c07c3eeedb0f4f92b9fbacf30c0f55915c25/DefaultStyledDocument.java/clean/core/src/classpath/javax/javax/swing/text/DefaultStyledDocument.java |
{ Element newEl1 = createLeafElement(paragraph, child.getAttributes(), child.getStartOffset(), offset); | { Element newEl1 = createLeafElement(paragraph, atts, child.getStartOffset(), offset); | private void createFracture(ElementSpec[] data) { // FIXME: This method is not complete. We must handle the elementStack // properly and make sure the appropriate Elements are pushed onto the // top of the stack so future inserts go to the appropriate paragraph. BranchElement paragraph = (B... | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/5806c07c3eeedb0f4f92b9fbacf30c0f55915c25/DefaultStyledDocument.java/clean/core/src/classpath/javax/javax/swing/text/DefaultStyledDocument.java |
edit.addRemovedElement(child); | private void createFracture(ElementSpec[] data) { // FIXME: This method is not complete. We must handle the elementStack // properly and make sure the appropriate Elements are pushed onto the // top of the stack so future inserts go to the appropriate paragraph. BranchElement paragraph = (B... | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/5806c07c3eeedb0f4f92b9fbacf30c0f55915c25/DefaultStyledDocument.java/clean/core/src/classpath/javax/javax/swing/text/DefaultStyledDocument.java | |
this.endOffset = offset + length; | public void insert(int offset, int length, ElementSpec[] data, DefaultDocumentEvent ev) { if (length == 0) return; this.offset = offset; this.length = length; this.endOffset = offset + length; documentEvent = ev; // Push the root and the paragraph at off... | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/5806c07c3eeedb0f4f92b9fbacf30c0f55915c25/DefaultStyledDocument.java/clean/core/src/classpath/javax/javax/swing/text/DefaultStyledDocument.java | |
edits.clear(); elementStack.clear(); Element current = root; int index; while (!current.isLeaf()) { index = current.getElementIndex(offset); elementStack.push(current); current = current.getElement(index); } | edits.removeAllElements(); elementStack.removeAllElements(); lastFractured = null; fracNotCreated = false; | public void insert(int offset, int length, ElementSpec[] data, DefaultDocumentEvent ev) { if (length == 0) return; this.offset = offset; this.length = length; this.endOffset = offset + length; documentEvent = ev; // Push the root and the paragraph at off... | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/5806c07c3eeedb0f4f92b9fbacf30c0f55915c25/DefaultStyledDocument.java/clean/core/src/classpath/javax/javax/swing/text/DefaultStyledDocument.java |
addEdit(e, curr.index, removed, added); | ElementEdit ee = new ElementEdit(e, curr.index, removed, added); ev.addEdit(ee); | public void insert(int offset, int length, ElementSpec[] data, DefaultDocumentEvent ev) { if (length == 0) return; this.offset = offset; this.length = length; this.endOffset = offset + length; documentEvent = ev; // Push the root and the paragraph at off... | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/5806c07c3eeedb0f4f92b9fbacf30c0f55915c25/DefaultStyledDocument.java/clean/core/src/classpath/javax/javax/swing/text/DefaultStyledDocument.java |
if (dir == ElementSpec.JoinPreviousDirection) | if (dir == ElementSpec.JoinNextDirection) | private void insertContentTag(ElementSpec tag) { int len = tag.getLength(); int dir = tag.getDirection(); AttributeSet tagAtts = tag.getAttributes(); if (dir == ElementSpec.JoinPreviousDirection) { // The mauve tests to this class show that a JoinPrevious insertion //... | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/5806c07c3eeedb0f4f92b9fbacf30c0f55915c25/DefaultStyledDocument.java/clean/core/src/classpath/javax/javax/swing/text/DefaultStyledDocument.java |
} else if (dir == ElementSpec.JoinNextDirection) { BranchElement paragraph = (BranchElement) elementStack.peek(); int index = paragraph.getElementIndex(offset); | int index = paragraph.getElementIndex(pos); | private void insertContentTag(ElementSpec tag) { int len = tag.getLength(); int dir = tag.getDirection(); AttributeSet tagAtts = tag.getAttributes(); if (dir == ElementSpec.JoinPreviousDirection) { // The mauve tests to this class show that a JoinPrevious insertion //... | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/5806c07c3eeedb0f4f92b9fbacf30c0f55915c25/DefaultStyledDocument.java/clean/core/src/classpath/javax/javax/swing/text/DefaultStyledDocument.java |
if (target.isLeaf() && paragraph.getElementCount() > (index + 1)) | Edit edit = getEditForParagraphAndIndex(paragraph, index); if (paragraph.getStartOffset() > pos) { Element first = paragraph.getElement(0); Element newEl = createLeafElement(paragraph, first.getAttributes(), pos, first.getEndOffset()); edit.addAddedElement(newEl); edit.addRemovedElement(first); } else if (paragraph.ge... | private void insertContentTag(ElementSpec tag) { int len = tag.getLength(); int dir = tag.getDirection(); AttributeSet tagAtts = tag.getAttributes(); if (dir == ElementSpec.JoinPreviousDirection) { // The mauve tests to this class show that a JoinPrevious insertion //... | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/5806c07c3eeedb0f4f92b9fbacf30c0f55915c25/DefaultStyledDocument.java/clean/core/src/classpath/javax/javax/swing/text/DefaultStyledDocument.java |
Element newEl1 = createLeafElement(paragraph, target.getAttributes(), target.getStartOffset(), offset); Element newEl2 = createLeafElement(paragraph, next.getAttributes(), offset, next.getEndOffset()); Edit edit = getEditForParagraphAndIndex(paragraph, index); | Element newEl = createLeafElement(paragraph, next.getAttributes(), pos, next.getEndOffset()); edit.addAddedElement(newEl); edit.addRemovedElement(next); | private void insertContentTag(ElementSpec tag) { int len = tag.getLength(); int dir = tag.getDirection(); AttributeSet tagAtts = tag.getAttributes(); if (dir == ElementSpec.JoinPreviousDirection) { // The mauve tests to this class show that a JoinPrevious insertion //... | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/5806c07c3eeedb0f4f92b9fbacf30c0f55915c25/DefaultStyledDocument.java/clean/core/src/classpath/javax/javax/swing/text/DefaultStyledDocument.java |
edit.addRemovedElement(next); edit.addAddedElement (newEl1); edit.addAddedElement (newEl2); } } else if (dir == ElementSpec.OriginateDirection) { BranchElement paragraph = (BranchElement) elementStack.peek(); int index = paragraph.getElementIndex(offset); Element current = paragraph.getElement(index); Element[] added;... | private void insertContentTag(ElementSpec tag) { int len = tag.getLength(); int dir = tag.getDirection(); AttributeSet tagAtts = tag.getAttributes(); if (dir == ElementSpec.JoinPreviousDirection) { // The mauve tests to this class show that a JoinPrevious insertion //... | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/5806c07c3eeedb0f4f92b9fbacf30c0f55915c25/DefaultStyledDocument.java/clean/core/src/classpath/javax/javax/swing/text/DefaultStyledDocument.java | |
added = new Element[3]; added[0] = splitRes[0]; added[1] = createLeafElement(paragraph, tagAtts, offset, endOffset); added[2] = splitRes[1]; | BranchElement parent = (BranchElement) paragraph.getParentElement(); int i = parent.getElementIndex(pos); BranchElement next = (BranchElement) parent.getElement(i + 1); AttributeSet atts = tag.getAttributes(); if (next != null) { Element nextLeaf = next.getElement(0); Edit e = getEditForParagraphAndIndex(next, 0); Ele... | private void insertContentTag(ElementSpec tag) { int len = tag.getLength(); int dir = tag.getDirection(); AttributeSet tagAtts = tag.getAttributes(); if (dir == ElementSpec.JoinPreviousDirection) { // The mauve tests to this class show that a JoinPrevious insertion //... | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/5806c07c3eeedb0f4f92b9fbacf30c0f55915c25/DefaultStyledDocument.java/clean/core/src/classpath/javax/javax/swing/text/DefaultStyledDocument.java |
Edit edit = getEditForParagraphAndIndex(paragraph, index); edit.addRemovedElements(removed); edit.addAddedElements(added); | private void insertContentTag(ElementSpec tag) { int len = tag.getLength(); int dir = tag.getDirection(); AttributeSet tagAtts = tag.getAttributes(); if (dir == ElementSpec.JoinPreviousDirection) { // The mauve tests to this class show that a JoinPrevious insertion //... | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/5806c07c3eeedb0f4f92b9fbacf30c0f55915c25/DefaultStyledDocument.java/clean/core/src/classpath/javax/javax/swing/text/DefaultStyledDocument.java | |
offset += len; | else { int end = pos + len; Element leaf = createLeafElement(paragraph, tag.getAttributes(), pos, end); if (paragraph.getElementCount() > 0) { int index = paragraph.getElementIndex(pos); Element target = paragraph.getElement(index); boolean onlyContent = target.isLeaf(); BranchElement toRec = paragraph; if (!onlyCon... | private void insertContentTag(ElementSpec tag) { int len = tag.getLength(); int dir = tag.getDirection(); AttributeSet tagAtts = tag.getAttributes(); if (dir == ElementSpec.JoinPreviousDirection) { // The mauve tests to this class show that a JoinPrevious insertion //... | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/5806c07c3eeedb0f4f92b9fbacf30c0f55915c25/DefaultStyledDocument.java/clean/core/src/classpath/javax/javax/swing/text/DefaultStyledDocument.java |
private void insertFirstContentTag(ElementSpec[] data) { // FIXME: This method is not complete. It needs to properly recreate the // leaves when the spec's direction is JoinPreviousDirection. ElementSpec first = data[0]; BranchElement paragraph = (BranchElement) elementStack.peek(); ... | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/5806c07c3eeedb0f4f92b9fbacf30c0f55915c25/DefaultStyledDocument.java/clean/core/src/classpath/javax/javax/swing/text/DefaultStyledDocument.java | ||
if (current.getEndOffset() != newEndOffset) | if (current.getEndOffset() != newEndOffset && !onlyContent) | private void insertFirstContentTag(ElementSpec[] data) { // FIXME: This method is not complete. It needs to properly recreate the // leaves when the spec's direction is JoinPreviousDirection. ElementSpec first = data[0]; BranchElement paragraph = (BranchElement) elementStack.peek(); ... | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/5806c07c3eeedb0f4f92b9fbacf30c0f55915c25/DefaultStyledDocument.java/clean/core/src/classpath/javax/javax/swing/text/DefaultStyledDocument.java |
Element newEl1 = createLeafElement(paragraph, current.getAttributes(), current.getStartOffset(), newEndOffset); | Element newEl1 = createLeafElement(paragraph, current.getAttributes(), current.getStartOffset(), newEndOffset); edit.addAddedElement(newEl1); | private void insertFirstContentTag(ElementSpec[] data) { // FIXME: This method is not complete. It needs to properly recreate the // leaves when the spec's direction is JoinPreviousDirection. ElementSpec first = data[0]; BranchElement paragraph = (BranchElement) elementStack.peek(); ... | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/5806c07c3eeedb0f4f92b9fbacf30c0f55915c25/DefaultStyledDocument.java/clean/core/src/classpath/javax/javax/swing/text/DefaultStyledDocument.java |
edit.addAddedElement(newEl1); if (current.getEndOffset() != newEndOffset) { } | offset = newEndOffset; | private void insertFirstContentTag(ElementSpec[] data) { // FIXME: This method is not complete. It needs to properly recreate the // leaves when the spec's direction is JoinPreviousDirection. ElementSpec first = data[0]; BranchElement paragraph = (BranchElement) elementStack.peek(); ... | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/5806c07c3eeedb0f4f92b9fbacf30c0f55915c25/DefaultStyledDocument.java/clean/core/src/classpath/javax/javax/swing/text/DefaultStyledDocument.java |
Element[] removed = new Element[] { current, next }; Element newEl1 = createLeafElement(paragraph, current.getAttributes(), current.getStartOffset(), offset); Element[] added = new Element[2]; added[0] = newEl1; if (data.length == 1) added[1] = createLeafElement(paragraph, next.getAttributes(), offset, next.getEndOffse... | if (onlyContent) newEl1 = createLeafElement(paragraph, next.getAttributes(), offset, next.getEndOffset()); | private void insertFirstContentTag(ElementSpec[] data) { // FIXME: This method is not complete. It needs to properly recreate the // leaves when the spec's direction is JoinPreviousDirection. ElementSpec first = data[0]; BranchElement paragraph = (BranchElement) elementStack.peek(); ... | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/5806c07c3eeedb0f4f92b9fbacf30c0f55915c25/DefaultStyledDocument.java/clean/core/src/classpath/javax/javax/swing/text/DefaultStyledDocument.java |
added[1] = createLeafElement(paragraph, next.getAttributes(), offset, newEndOffset); edit.addRemovedElements(removed); edit.addAddedElements(added); | { newEl1 = createLeafElement(paragraph, next.getAttributes(), offset, newEndOffset); offset = newEndOffset; | private void insertFirstContentTag(ElementSpec[] data) { // FIXME: This method is not complete. It needs to properly recreate the // leaves when the spec's direction is JoinPreviousDirection. ElementSpec first = data[0]; BranchElement paragraph = (BranchElement) elementStack.peek(); ... | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/5806c07c3eeedb0f4f92b9fbacf30c0f55915c25/DefaultStyledDocument.java/clean/core/src/classpath/javax/javax/swing/text/DefaultStyledDocument.java |
break; case ElementSpec.OriginateDirection: if (current.getStartOffset() != offset) { Element newEl1 = createLeafElement(paragraph, current.getAttributes(), current.getStartOffset(), offset); | private void insertFirstContentTag(ElementSpec[] data) { // FIXME: This method is not complete. It needs to properly recreate the // leaves when the spec's direction is JoinPreviousDirection. ElementSpec first = data[0]; BranchElement paragraph = (BranchElement) elementStack.peek(); ... | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/5806c07c3eeedb0f4f92b9fbacf30c0f55915c25/DefaultStyledDocument.java/clean/core/src/classpath/javax/javax/swing/text/DefaultStyledDocument.java | |
} Element newEl2 = createLeafElement(paragraph, first.getAttributes(), offset, newEndOffset); | private void insertFirstContentTag(ElementSpec[] data) { // FIXME: This method is not complete. It needs to properly recreate the // leaves when the spec's direction is JoinPreviousDirection. ElementSpec first = data[0]; BranchElement paragraph = (BranchElement) elementStack.peek(); ... | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/5806c07c3eeedb0f4f92b9fbacf30c0f55915c25/DefaultStyledDocument.java/clean/core/src/classpath/javax/javax/swing/text/DefaultStyledDocument.java | |
edit.addAddedElement(newEl2); if (current.getEndOffset() != endOffset && (data.length == 1)) { Element newCurrent = createLeafElement(paragraph, current.getAttributes(), newEndOffset, current.getEndOffset()); edit.addAddedElement(newCurrent); | edit.addRemovedElement(next); | private void insertFirstContentTag(ElementSpec[] data) { // FIXME: This method is not complete. It needs to properly recreate the // leaves when the spec's direction is JoinPreviousDirection. ElementSpec first = data[0]; BranchElement paragraph = (BranchElement) elementStack.peek(); ... | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/5806c07c3eeedb0f4f92b9fbacf30c0f55915c25/DefaultStyledDocument.java/clean/core/src/classpath/javax/javax/swing/text/DefaultStyledDocument.java |
offset = newEndOffset; | private void insertFirstContentTag(ElementSpec[] data) { // FIXME: This method is not complete. It needs to properly recreate the // leaves when the spec's direction is JoinPreviousDirection. ElementSpec first = data[0]; BranchElement paragraph = (BranchElement) elementStack.peek(); ... | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/5806c07c3eeedb0f4f92b9fbacf30c0f55915c25/DefaultStyledDocument.java/clean/core/src/classpath/javax/javax/swing/text/DefaultStyledDocument.java | |
private void insertFracture(ElementSpec tag) { // FIXME: This method may be incomplete. We must make sure the // appropriate edits were added and the correct paragraph element // is pushed onto the top of the elementStack so future inserts go // to the right paragraph. // This i... | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/5806c07c3eeedb0f4f92b9fbacf30c0f55915c25/DefaultStyledDocument.java/clean/core/src/classpath/javax/javax/swing/text/DefaultStyledDocument.java | ||
BranchElement previous = (BranchElement) parent.getElement(parentIndex); BranchElement newBranch = (BranchElement) createBranchElement(parent, previous.getAttributes()); int previousIndex = previous.getElementIndex(offset); int numReplaced = previous.getElementCount() - previousIndex; Element previ... | AttributeSet parentAtts = parent.getAttributes(); Element toFracture = parent.getElement(parentIndex); int parSize = parent.getElementCount(); Edit edit = getEditForParagraphAndIndex(parent, parentIndex); Element frac = toFracture; int leftIns = 0; int indexOfFrac = toFracture.getElementIndex(offset); int size = toFra... | private void insertFracture(ElementSpec tag) { // FIXME: This method may be incomplete. We must make sure the // appropriate edits were added and the correct paragraph element // is pushed onto the top of the elementStack so future inserts go // to the right paragraph. // This i... | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/5806c07c3eeedb0f4f92b9fbacf30c0f55915c25/DefaultStyledDocument.java/clean/core/src/classpath/javax/javax/swing/text/DefaultStyledDocument.java |
Element current = par.getElement(par.getElementIndex(offset)); Element[] res = split(current, offset, 0); | private Element insertParagraph(BranchElement par, int offset) { Element current = par.getElement(par.getElementIndex(offset)); Element[] res = split(current, offset, 0); int index = par.getElementIndex(offset); Element ret; if (res[1] != null) { Element[] removed; ... | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/5806c07c3eeedb0f4f92b9fbacf30c0f55915c25/DefaultStyledDocument.java/clean/core/src/classpath/javax/javax/swing/text/DefaultStyledDocument.java | |
added = new Element[]{ res[1] }; | added = new Element[] { res[1] }; | private Element insertParagraph(BranchElement par, int offset) { Element current = par.getElement(par.getElementIndex(offset)); Element[] res = split(current, offset, 0); int index = par.getElementIndex(offset); Element ret; if (res[1] != null) { Element[] removed; ... | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/5806c07c3eeedb0f4f92b9fbacf30c0f55915c25/DefaultStyledDocument.java/clean/core/src/classpath/javax/javax/swing/text/DefaultStyledDocument.java |
added = new Element[]{ ret, res[1] }; | added = new Element[] { ret, res[1] }; | private Element insertParagraph(BranchElement par, int offset) { Element current = par.getElement(par.getElementIndex(offset)); Element[] res = split(current, offset, 0); int index = par.getElementIndex(offset); Element ret; if (res[1] != null) { Element[] removed; ... | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/5806c07c3eeedb0f4f92b9fbacf30c0f55915c25/DefaultStyledDocument.java/clean/core/src/classpath/javax/javax/swing/text/DefaultStyledDocument.java |
removed = new Element[]{ current }; | removed = new Element[] { current }; | private Element insertParagraph(BranchElement par, int offset) { Element current = par.getElement(par.getElementIndex(offset)); Element[] res = split(current, offset, 0); int index = par.getElementIndex(offset); Element ret; if (res[1] != null) { Element[] removed; ... | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/5806c07c3eeedb0f4f92b9fbacf30c0f55915c25/DefaultStyledDocument.java/clean/core/src/classpath/javax/javax/swing/text/DefaultStyledDocument.java |
added = new Element[]{ res[0], res[1] }; | added = new Element[] { res[0], res[1] }; | private Element insertParagraph(BranchElement par, int offset) { Element current = par.getElement(par.getElementIndex(offset)); Element[] res = split(current, offset, 0); int index = par.getElementIndex(offset); Element ret; if (res[1] != null) { Element[] removed; ... | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/5806c07c3eeedb0f4f92b9fbacf30c0f55915c25/DefaultStyledDocument.java/clean/core/src/classpath/javax/javax/swing/text/DefaultStyledDocument.java |
added = new Element[]{ res[0], ret, res[1] }; | added = new Element[] { res[0], ret, res[1] }; | private Element insertParagraph(BranchElement par, int offset) { Element current = par.getElement(par.getElementIndex(offset)); Element[] res = split(current, offset, 0); int index = par.getElementIndex(offset); Element ret; if (res[1] != null) { Element[] removed; ... | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/5806c07c3eeedb0f4f92b9fbacf30c0f55915c25/DefaultStyledDocument.java/clean/core/src/classpath/javax/javax/swing/text/DefaultStyledDocument.java |
Edit edit = getEditForParagraphAndIndex(par, index); edit.addRemovedElements(removed); edit.addAddedElements(added); | e.addAddedElements(added); e.addRemovedElements(removed); | private Element insertParagraph(BranchElement par, int offset) { Element current = par.getElement(par.getElementIndex(offset)); Element[] res = split(current, offset, 0); int index = par.getElementIndex(offset); Element ret; if (res[1] != null) { Element[] removed; ... | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/5806c07c3eeedb0f4f92b9fbacf30c0f55915c25/DefaultStyledDocument.java/clean/core/src/classpath/javax/javax/swing/text/DefaultStyledDocument.java |
Edit edit = getEditForParagraphAndIndex(par, index); edit.addAddedElement(ret); | e.addAddedElement(ret); | private Element insertParagraph(BranchElement par, int offset) { Element current = par.getElement(par.getElementIndex(offset)); Element[] res = split(current, offset, 0); int index = par.getElementIndex(offset); Element ret; if (res[1] != null) { Element[] removed; ... | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/5806c07c3eeedb0f4f92b9fbacf30c0f55915c25/DefaultStyledDocument.java/clean/core/src/classpath/javax/javax/swing/text/DefaultStyledDocument.java |
if (data[0].getType() == ElementSpec.ContentType) | int type = data[0].getType(); if (type == ElementSpec.ContentType) | protected void insertUpdate(ElementSpec[] data) { int i = 0; if (data[0].getType() == ElementSpec.ContentType) { // If the first tag is content we must treat it separately to allow // for joining properly to previous Elements and to ensure that // no extra LeafElements... | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/5806c07c3eeedb0f4f92b9fbacf30c0f55915c25/DefaultStyledDocument.java/clean/core/src/classpath/javax/javax/swing/text/DefaultStyledDocument.java |
insertFirstContentTag(data); | protected void insertUpdate(ElementSpec[] data) { int i = 0; if (data[0].getType() == ElementSpec.ContentType) { // If the first tag is content we must treat it separately to allow // for joining properly to previous Elements and to ensure that // no extra LeafElements... | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/5806c07c3eeedb0f4f92b9fbacf30c0f55915c25/DefaultStyledDocument.java/clean/core/src/classpath/javax/javax/swing/text/DefaultStyledDocument.java | |
int index = paragraph.getElementIndex(offset); elementStack.push(paragraph.getElement(index)); break; case ElementSpec.OriginateDirection: Element current = (Element) elementStack.peek(); Element newParagraph = insertParagraph((BranchElement) current, offset); elementStack.push(newParagraph); | int ix = paragraph.getElementIndex(pos) + 1; elementStack.push(paragraph.getElement(ix)); | protected void insertUpdate(ElementSpec[] data) { int i = 0; if (data[0].getType() == ElementSpec.ContentType) { // If the first tag is content we must treat it separately to allow // for joining properly to previous Elements and to ensure that // no extra LeafElements... | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/5806c07c3eeedb0f4f92b9fbacf30c0f55915c25/DefaultStyledDocument.java/clean/core/src/classpath/javax/javax/swing/text/DefaultStyledDocument.java |
offset = pos; | protected void insertUpdate(ElementSpec[] data) { int i = 0; if (data[0].getType() == ElementSpec.ContentType) { // If the first tag is content we must treat it separately to allow // for joining properly to previous Elements and to ensure that // no extra LeafElements... | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/5806c07c3eeedb0f4f92b9fbacf30c0f55915c25/DefaultStyledDocument.java/clean/core/src/classpath/javax/javax/swing/text/DefaultStyledDocument.java | |
pos = offset; | public void remove(int offs, int len, DefaultDocumentEvent ev) { offset = offs; length = len; documentEvent = ev; removeUpdate(); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/5806c07c3eeedb0f4f92b9fbacf30c0f55915c25/DefaultStyledDocument.java/clean/core/src/classpath/javax/javax/swing/text/DefaultStyledDocument.java | |
Edit edit = getEditForParagraphAndIndex((BranchElement)root, removeStart); | Edit edit = getEditForParagraphAndIndex((BranchElement) root, removeStart); | protected void removeUpdate() { int startParagraph = root.getElementIndex(offset); int endParagraph = root.getElementIndex(offset + length); Element[] empty = new Element[0]; int removeStart = -1; int removeEnd = -1; for (int i = startParagraph; i < endParagraph; i++) { ... | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/5806c07c3eeedb0f4f92b9fbacf30c0f55915c25/DefaultStyledDocument.java/clean/core/src/classpath/javax/javax/swing/text/DefaultStyledDocument.java |
private Element[] split(Element el, int offset, int space) { | private Element[] split(Element el, int offset, int space, int editIndex) { | private Element[] split(Element el, int offset, int space) { // If we are at an element boundary, then return an empty array. if ((offset == el.getStartOffset() || offset == el.getEndOffset()) && space == 0 && el.isLeaf()) return new Element[2]; // If the element is an instance of ... | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/5806c07c3eeedb0f4f92b9fbacf30c0f55915c25/DefaultStyledDocument.java/clean/core/src/classpath/javax/javax/swing/text/DefaultStyledDocument.java |
private Element[] split(Element el, int offset, int space) { // If we are at an element boundary, then return an empty array. if ((offset == el.getStartOffset() || offset == el.getEndOffset()) && space == 0 && el.isLeaf()) return new Element[2]; // If the element is an instance of ... | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/5806c07c3eeedb0f4f92b9fbacf30c0f55915c25/DefaultStyledDocument.java/clean/core/src/classpath/javax/javax/swing/text/DefaultStyledDocument.java | ||
Element[] result = split(child, offset, space); | Element[] result = split(child, offset, space, editIndex); | private Element[] split(Element el, int offset, int space) { // If we are at an element boundary, then return an empty array. if ((offset == el.getStartOffset() || offset == el.getEndOffset()) && space == 0 && el.isLeaf()) return new Element[2]; // If the element is an instance of ... | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/5806c07c3eeedb0f4f92b9fbacf30c0f55915c25/DefaultStyledDocument.java/clean/core/src/classpath/javax/javax/swing/text/DefaultStyledDocument.java |
if (!(result[1] == null)) | if (result[1] != null) | private Element[] split(Element el, int offset, int space) { // If we are at an element boundary, then return an empty array. if ((offset == el.getStartOffset() || offset == el.getEndOffset()) && space == 0 && el.isLeaf()) return new Element[2]; // If the element is an instance of ... | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/5806c07c3eeedb0f4f92b9fbacf30c0f55915c25/DefaultStyledDocument.java/clean/core/src/classpath/javax/javax/swing/text/DefaultStyledDocument.java |
added = new Element[]{}; } | added = new Element[] {}; } | private Element[] split(Element el, int offset, int space) { // If we are at an element boundary, then return an empty array. if ((offset == el.getStartOffset() || offset == el.getEndOffset()) && space == 0 && el.isLeaf()) return new Element[2]; // If the element is an instance of ... | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/5806c07c3eeedb0f4f92b9fbacf30c0f55915c25/DefaultStyledDocument.java/clean/core/src/classpath/javax/javax/swing/text/DefaultStyledDocument.java |
{ | { | private Element[] split(Element el, int offset, int space) { // If we are at an element boundary, then return an empty array. if ((offset == el.getStartOffset() || offset == el.getEndOffset()) && space == 0 && el.isLeaf()) return new Element[2]; // If the element is an instance of ... | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/5806c07c3eeedb0f4f92b9fbacf30c0f55915c25/DefaultStyledDocument.java/clean/core/src/classpath/javax/javax/swing/text/DefaultStyledDocument.java |
added = new Element[]{result[0]}; | added = new Element[] { result[0] }; | private Element[] split(Element el, int offset, int space) { // If we are at an element boundary, then return an empty array. if ((offset == el.getStartOffset() || offset == el.getEndOffset()) && space == 0 && el.isLeaf()) return new Element[2]; // If the element is an instance of ... | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/5806c07c3eeedb0f4f92b9fbacf30c0f55915c25/DefaultStyledDocument.java/clean/core/src/classpath/javax/javax/swing/text/DefaultStyledDocument.java |
Edit edit = getEditForParagraphAndIndex((BranchElement)el, index); | Edit edit = getEditForParagraphAndIndex((BranchElement) el, editIndex); | private Element[] split(Element el, int offset, int space) { // If we are at an element boundary, then return an empty array. if ((offset == el.getStartOffset() || offset == el.getEndOffset()) && space == 0 && el.isLeaf()) return new Element[2]; // If the element is an instance of ... | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/5806c07c3eeedb0f4f92b9fbacf30c0f55915c25/DefaultStyledDocument.java/clean/core/src/classpath/javax/javax/swing/text/DefaultStyledDocument.java |
BranchElement newPar = (BranchElement) createBranchElement(el.getParentElement(), el.getAttributes()); Edit edit2 = getEditForParagraphAndIndex(newPar, 0); edit2.addAddedElements(newAdded); res = new Element[]{ null, newPar }; } else | BranchElement newPar = (BranchElement) new BranchElement(el.getParentElement(), el.getAttributes()); newPar.replace(0, 0, newAdded); res = new Element[] { null, newPar }; } else | private Element[] split(Element el, int offset, int space) { // If we are at an element boundary, then return an empty array. if ((offset == el.getStartOffset() || offset == el.getEndOffset()) && space == 0 && el.isLeaf()) return new Element[2]; // If the element is an instance of ... | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/5806c07c3eeedb0f4f92b9fbacf30c0f55915c25/DefaultStyledDocument.java/clean/core/src/classpath/javax/javax/swing/text/DefaultStyledDocument.java |
added = new Element[0]; Edit edit = getEditForParagraphAndIndex((BranchElement)el, index); | Edit edit = getEditForParagraphAndIndex((BranchElement) el, editIndex); | private Element[] split(Element el, int offset, int space) { // If we are at an element boundary, then return an empty array. if ((offset == el.getStartOffset() || offset == el.getEndOffset()) && space == 0 && el.isLeaf()) return new Element[2]; // If the element is an instance of ... | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/5806c07c3eeedb0f4f92b9fbacf30c0f55915c25/DefaultStyledDocument.java/clean/core/src/classpath/javax/javax/swing/text/DefaultStyledDocument.java |
edit.addAddedElements(added); BranchElement newPar = (BranchElement) createBranchElement(el.getParentElement(), el.getAttributes()); Edit edit2 = getEditForParagraphAndIndex(newPar, 0); edit2.addAddedElements(removed); res = new Element[]{ null, newPar }; | BranchElement newPar = (BranchElement) new BranchElement(el.getParentElement(), el.getAttributes()); newPar.replace(0, 0, removed); res = new Element[] { null, newPar }; | private Element[] split(Element el, int offset, int space) { // If we are at an element boundary, then return an empty array. if ((offset == el.getStartOffset() || offset == el.getEndOffset()) && space == 0 && el.isLeaf()) return new Element[2]; // If the element is an instance of ... | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/5806c07c3eeedb0f4f92b9fbacf30c0f55915c25/DefaultStyledDocument.java/clean/core/src/classpath/javax/javax/swing/text/DefaultStyledDocument.java |
Element el2 = createLeafElement(par, el.getAttributes(), offset + space, el.getEndOffset()); res = new Element[]{ el1, el2 }; | Element el2 = createLeafElement(par, el.getAttributes(), offset + space, el.getEndOffset()); res = new Element[] { el1, el2 }; | private Element[] split(Element el, int offset, int space) { // If we are at an element boundary, then return an empty array. if ((offset == el.getStartOffset() || offset == el.getEndOffset()) && space == 0 && el.isLeaf()) return new Element[2]; // If the element is an instance of ... | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/5806c07c3eeedb0f4f92b9fbacf30c0f55915c25/DefaultStyledDocument.java/clean/core/src/classpath/javax/javax/swing/text/DefaultStyledDocument.java |
BranchElement root = (BranchElement) getDefaultRootElement(); int start = root.getStartOffset(); int end = root.getEndOffset(); if (position >= end) position = end - 1; else if (position < start) position = start; | Element e = getDefaultRootElement(); while (!e.isLeaf()) e = e.getElement(e.getElementIndex(position)); | public Element getParagraphElement(int position) { BranchElement root = (BranchElement) getDefaultRootElement(); int start = root.getStartOffset(); int end = root.getEndOffset(); if (position >= end) position = end - 1; else if (position < start) position = start; Element par = root.posit... | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/5806c07c3eeedb0f4f92b9fbacf30c0f55915c25/DefaultStyledDocument.java/clean/core/src/classpath/javax/javax/swing/text/DefaultStyledDocument.java |
Element par = root.positionToElement(position); assert par != null : "The paragraph element must not be null"; return par; | if (e != null) return e.getParentElement(); return e; | public Element getParagraphElement(int position) { BranchElement root = (BranchElement) getDefaultRootElement(); int start = root.getStartOffset(); int end = root.getEndOffset(); if (position >= end) position = end - 1; else if (position < start) position = start; Element par = root.posit... | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/5806c07c3eeedb0f4f92b9fbacf30c0f55915c25/DefaultStyledDocument.java/clean/core/src/classpath/javax/javax/swing/text/DefaultStyledDocument.java |
if (parent.getElementCount() > parent.getElementIndex(offset) + 1) | if (parent.getElementCount() > (parent.getElementIndex(offset) + 1)) | short handleInsertAfterNewline(Vector specs, int offset, int endOffset, Element prevParagraph, Element paragraph, AttributeSet a) { if (prevParagraph.getParentElement() == paragraph.getParentElement()) { specs.add(new ElementSpec(a, Element... | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/5806c07c3eeedb0f4f92b9fbacf30c0f55915c25/DefaultStyledDocument.java/clean/core/src/classpath/javax/javax/swing/text/DefaultStyledDocument.java |
} else { | short handleInsertAfterNewline(Vector specs, int offset, int endOffset, Element prevParagraph, Element paragraph, AttributeSet a) { if (prevParagraph.getParentElement() == paragraph.getParentElement()) { specs.add(new ElementSpec(a, Element... | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/5806c07c3eeedb0f4f92b9fbacf30c0f55915c25/DefaultStyledDocument.java/clean/core/src/classpath/javax/javax/swing/text/DefaultStyledDocument.java | |
DefaultDocumentEvent ev = new DefaultDocumentEvent(offset, | DefaultDocumentEvent ev = new DefaultDocumentEvent(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/5806c07c3eeedb0f4f92b9fbacf30c0f55915c25/DefaultStyledDocument.java/clean/core/src/classpath/javax/javax/swing/text/DefaultStyledDocument.java |
AttributeSet paragraphAttributes = getParagraphElement(endOffset).getAttributes(); | AttributeSet paragraphAttributes = getParagraphElement(endOffset).getAttributes(); | protected void insertUpdate(DefaultDocumentEvent ev, AttributeSet attr) { super.insertUpdate(ev, attr); // If the attribute set is null, use an empty attribute set. if (attr == null) attr = SimpleAttributeSet.EMPTY; int offset = ev.getOffset(); int length = ev.getLength(); int endOffset = offs... | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/5806c07c3eeedb0f4f92b9fbacf30c0f55915c25/DefaultStyledDocument.java/clean/core/src/classpath/javax/javax/swing/text/DefaultStyledDocument.java |
finalStartDirection = handleInsertAfterNewline(specs, offset, endOffset, | finalStartDirection = handleInsertAfterNewline(specs, offset, endOffset, | protected void insertUpdate(DefaultDocumentEvent ev, AttributeSet attr) { super.insertUpdate(ev, attr); // If the attribute set is null, use an empty attribute set. if (attr == null) attr = SimpleAttributeSet.EMPTY; int offset = ev.getOffset(); int length = ev.getLength(); int endOffset = offs... | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/5806c07c3eeedb0f4f92b9fbacf30c0f55915c25/DefaultStyledDocument.java/clean/core/src/classpath/javax/javax/swing/text/DefaultStyledDocument.java |
if (((ElementSpec) specs.get(i)).getType() == ElementSpec.StartTagType) finalStartTag = (ElementSpec)specs.get(i); | if (((ElementSpec) specs.get(i)).getType() == ElementSpec.StartTagType) finalStartTag = (ElementSpec) specs.get(i); | protected void insertUpdate(DefaultDocumentEvent ev, AttributeSet attr) { super.insertUpdate(ev, attr); // If the attribute set is null, use an empty attribute set. if (attr == null) attr = SimpleAttributeSet.EMPTY; int offset = ev.getOffset(); int length = ev.getLength(); int endOffset = offs... | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/5806c07c3eeedb0f4f92b9fbacf30c0f55915c25/DefaultStyledDocument.java/clean/core/src/classpath/javax/javax/swing/text/DefaultStyledDocument.java |
protected void insertUpdate(DefaultDocumentEvent ev, AttributeSet attr) { super.insertUpdate(ev, attr); // If the attribute set is null, use an empty attribute set. if (attr == null) attr = SimpleAttributeSet.EMPTY; int offset = ev.getOffset(); int length = ev.getLength(); int endOffset = offs... | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/5806c07c3eeedb0f4f92b9fbacf30c0f55915c25/DefaultStyledDocument.java/clean/core/src/classpath/javax/javax/swing/text/DefaultStyledDocument.java | ||
Element currentRun = prevParagraph.getElement(prevParagraph.getElementIndex(offset)); | Element currentRun = prevParagraph.getElement(prevParagraph.getElementIndex(offset)); | protected void insertUpdate(DefaultDocumentEvent ev, AttributeSet attr) { super.insertUpdate(ev, attr); // If the attribute set is null, use an empty attribute set. if (attr == null) attr = SimpleAttributeSet.EMPTY; int offset = ev.getOffset(); int length = ev.getLength(); int endOffset = offs... | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/5806c07c3eeedb0f4f92b9fbacf30c0f55915c25/DefaultStyledDocument.java/clean/core/src/classpath/javax/javax/swing/text/DefaultStyledDocument.java |
&& finalStartTag.getDirection() == ElementSpec.JoinFractureDirection | && finalStartTag.getDirection() == ElementSpec.JoinFractureDirection | protected void insertUpdate(DefaultDocumentEvent ev, AttributeSet attr) { super.insertUpdate(ev, attr); // If the attribute set is null, use an empty attribute set. if (attr == null) attr = SimpleAttributeSet.EMPTY; int offset = ev.getOffset(); int length = ev.getLength(); int endOffset = offs... | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/5806c07c3eeedb0f4f92b9fbacf30c0f55915c25/DefaultStyledDocument.java/clean/core/src/classpath/javax/javax/swing/text/DefaultStyledDocument.java |
ElementSpec[] elSpecs = (ElementSpec[]) specs.toArray(new ElementSpec[specs.size()]); | ElementSpec[] elSpecs = (ElementSpec[]) specs.toArray(new ElementSpec[specs.size()]); | protected void insertUpdate(DefaultDocumentEvent ev, AttributeSet attr) { super.insertUpdate(ev, attr); // If the attribute set is null, use an empty attribute set. if (attr == null) attr = SimpleAttributeSet.EMPTY; int offset = ev.getOffset(); int length = ev.getLength(); int endOffset = offs... | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/5806c07c3eeedb0f4f92b9fbacf30c0f55915c25/DefaultStyledDocument.java/clean/core/src/classpath/javax/javax/swing/text/DefaultStyledDocument.java |
AttributeSet attributes, boolean replace) | AttributeSet attributes, boolean replace) | public void setCharacterAttributes(int offset, int length, AttributeSet attributes, boolean replace) { // Exit early if length is 0, so no DocumentEvent is created or fired. if (length == 0) return; try { // Must obtain a write lock for this method. writeLock() and /... | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/5806c07c3eeedb0f4f92b9fbacf30c0f55915c25/DefaultStyledDocument.java/clean/core/src/classpath/javax/javax/swing/text/DefaultStyledDocument.java |
DefaultDocumentEvent ev = new DefaultDocumentEvent( offset, | DefaultDocumentEvent ev = new DefaultDocumentEvent(offset, | public void setCharacterAttributes(int offset, int length, AttributeSet attributes, boolean replace) { // Exit early if length is 0, so no DocumentEvent is created or fired. if (length == 0) return; try { // Must obtain a write lock for this method. writeLock() and /... | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/5806c07c3eeedb0f4f92b9fbacf30c0f55915c25/DefaultStyledDocument.java/clean/core/src/classpath/javax/javax/swing/text/DefaultStyledDocument.java |
for (int pos = offset; pos < end; ) | for (int pos = offset; pos < end;) | public void setCharacterAttributes(int offset, int length, AttributeSet attributes, boolean replace) { // Exit early if length is 0, so no DocumentEvent is created or fired. if (length == 0) return; try { // Must obtain a write lock for this method. writeLock() and /... | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/5806c07c3eeedb0f4f92b9fbacf30c0f55915c25/DefaultStyledDocument.java/clean/core/src/classpath/javax/javax/swing/text/DefaultStyledDocument.java |
DefaultDocumentEvent ev = new DefaultDocumentEvent (start, | DefaultDocumentEvent ev = new DefaultDocumentEvent(start, | public void setLogicalStyle(int position, Style style) { Element el = getParagraphElement(position); // getParagraphElement doesn't return null but subclasses might so // we check for null here. if (el == null) return; try { writeLock(); if (el instanceof AbstractElement) { ... | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/5806c07c3eeedb0f4f92b9fbacf30c0f55915c25/DefaultStyledDocument.java/clean/core/src/classpath/javax/javax/swing/text/DefaultStyledDocument.java |
throw new AssertionError("paragraph elements are expected to be" | throw new AssertionError( "paragraph elements are expected to be" | public void setLogicalStyle(int position, Style style) { Element el = getParagraphElement(position); // getParagraphElement doesn't return null but subclasses might so // we check for null here. if (el == null) return; try { writeLock(); if (el instanceof AbstractElement) { ... | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/5806c07c3eeedb0f4f92b9fbacf30c0f55915c25/DefaultStyledDocument.java/clean/core/src/classpath/javax/javax/swing/text/DefaultStyledDocument.java |
AttributeSet attributes, boolean replace) | AttributeSet attributes, boolean replace) | public void setParagraphAttributes(int offset, int length, AttributeSet attributes, boolean replace) { try { // Must obtain a write lock for this method. writeLock() and // writeUnlock() should always be in try/finally blo... | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/5806c07c3eeedb0f4f92b9fbacf30c0f55915c25/DefaultStyledDocument.java/clean/core/src/classpath/javax/javax/swing/text/DefaultStyledDocument.java |
DefaultDocumentEvent ev = new DefaultDocumentEvent ( offset, | DefaultDocumentEvent ev = new DefaultDocumentEvent(offset, | public void setParagraphAttributes(int offset, int length, AttributeSet attributes, boolean replace) { try { // Must obtain a write lock for this method. writeLock() and // writeUnlock() should always be in try/finally blo... | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/5806c07c3eeedb0f4f92b9fbacf30c0f55915c25/DefaultStyledDocument.java/clean/core/src/classpath/javax/javax/swing/text/DefaultStyledDocument.java |
if (e.getPropertyName().equals(JProgressBar.INDETERMINATE_CHANGED_PROPERTY)) | if (e.getPropertyName().equals("inderterminate")) | public void propertyChange(PropertyChangeEvent e) { // Only need to listen for indeterminate changes. // All other things are done on a repaint. if (e.getPropertyName().equals(JProgressBar.INDETERMINATE_CHANGED_PROPERTY)) if (((Boolean) e.getNewValue()).booleanValue()) startAnimationTimer(); els... | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/53b78dd1e4587254262f4618d2aa7551de8e0cbf/BasicProgressBarUI.java/clean/core/src/classpath/javax/javax/swing/plaf/basic/BasicProgressBarUI.java |
public void incrementAnimationIndex() | protected void incrementAnimationIndex() | public void incrementAnimationIndex() { animationIndex++; //numFrames is like string length, it should be named numFrames or something if (animationIndex >= numFrames) animationIndex = 0; progressBar.repaint(); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/53b78dd1e4587254262f4618d2aa7551de8e0cbf/BasicProgressBarUI.java/clean/core/src/classpath/javax/javax/swing/plaf/basic/BasicProgressBarUI.java |
protected MetalPropertyListener() { } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/963ae61676e8c35a9e0998e0b7de1f942db82a26/MetalSliderUI.java/buggy/core/src/classpath/javax/javax/swing/plaf/metal/MetalSliderUI.java | ||
if (e.getPropertyName().equals(JSlider.ORIENTATION_CHANGED_PROPERTY)) | if (e.getPropertyName().equals("orientation")) | public void propertyChange(PropertyChangeEvent e) { // Check for orientation changes. if (e.getPropertyName().equals(JSlider.ORIENTATION_CHANGED_PROPERTY)) recalculateIfOrientationChanged(); else if (e.getPropertyName().equals(JSlider.MODEL_CHANGED_PROPERTY)) { BoundedRangeModel oldMod... | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/53b78dd1e4587254262f4618d2aa7551de8e0cbf/BasicSliderUI.java/buggy/core/src/classpath/javax/javax/swing/plaf/basic/BasicSliderUI.java |
else if (e.getPropertyName().equals(JSlider.MODEL_CHANGED_PROPERTY)) | else if (e.getPropertyName().equals("model")) | public void propertyChange(PropertyChangeEvent e) { // Check for orientation changes. if (e.getPropertyName().equals(JSlider.ORIENTATION_CHANGED_PROPERTY)) recalculateIfOrientationChanged(); else if (e.getPropertyName().equals(JSlider.MODEL_CHANGED_PROPERTY)) { BoundedRangeModel oldMod... | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/53b78dd1e4587254262f4618d2aa7551de8e0cbf/BasicSliderUI.java/buggy/core/src/classpath/javax/javax/swing/plaf/basic/BasicSliderUI.java |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.