Previous CloneSet | Next CloneSet | Back to Main Report |
Clone Mass | Clones in CloneSet | Parameter Count | Clone Similarity | Syntax Category [Sequence Length] |
---|---|---|---|---|
42 | 2 | 4 | 0.976 | class_body_declarations[3] |
Clone Abstraction | Parameter Bindings |
Clone Instance (Click to see clone) | Line Count | Source Line | Source File |
---|---|---|---|
1 | 42 | 42 | plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/display/DataDisplay.java |
2 | 42 | 93 | plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/display/DisplayView.java |
| ||||
/** * @see IDataDisplay#clear() */ public void clear() { IDocument document = getTextViewer().getDocument(); if (document != null) { document.set(""); //$NON-NLS-1$ } } /** * @see IDataDisplay#displayExpression(String) */ public void displayExpression(String expression) { IDocument document = fTextViewer.getDocument(); int offset = document.getLength(); try { // add a cariage return if needed. if (offset != document.getLineInformationOfOffset(offset).getOffset()) { expression = System.getProperty("line.separator") + expression.trim(); //$NON-NLS-1$ } document.replace(offset, 0, expression); fTextViewer.setSelectedRange(offset + expression.length(), 0); fTextViewer.revealRange(offset, expression.length()); } catch (BadLocationException ble) { JDIDebugUIPlugin.log(ble); } } /** * @see IDataDisplay#displayExpressionValue(String) */ public void displayExpressionValue(String value) { value = System.getProperty("line.separator") + '\t' + value; //$NON-NLS-1$ ITextSelection selection = (ITextSelection) fTextViewer.getSelectionProvider().getSelection(); int offset = selection.getOffset() + selection.getLength(); int length = value.length(); try { fTextViewer.getDocument().replace(offset, 0, value); } catch (BadLocationException ble) { JDIDebugUIPlugin.log(ble); } fTextViewer.setSelectedRange(offset + length, 0); fTextViewer.revealRange(offset, length); } |
| ||||
/** * @see IDataDisplay#clear() */ public void clear() { IDocument document = fSourceViewer.getDocument(); if (document != null) { document.set(""); //$NON-NLS-1$ } } /** * @see IDataDisplay#displayExpression(String) */ public void displayExpression(String expression) { IDocument document = fSourceViewer.getDocument(); int offset = document.getLength(); try { // add a cariage return if needed. if (offset != document.getLineInformationOfOffset(offset).getOffset()) { expression = System.getProperty("line.separator") + expression.trim(); //$NON-NLS-1$ } fSourceViewer.getDocument().replace(offset, 0, expression); fSourceViewer.setSelectedRange(offset + expression.length(), 0); fSourceViewer.revealRange(offset, expression.length()); } catch (BadLocationException ble) { JDIDebugUIPlugin.log(ble); } } /** * @see IDataDisplay#displayExpressionValue(String) */ public void displayExpressionValue(String value) { value = System.getProperty("line.separator") + '\t' + value; //$NON-NLS-1$ ITextSelection selection = (ITextSelection) fSourceViewer.getSelection(); int offset = selection.getOffset() + selection.getLength(); int length = value.length(); try { fSourceViewer.getDocument().replace(offset, 0, value); } catch (BadLocationException ble) { JDIDebugUIPlugin.log(ble); } fSourceViewer.setSelectedRange(offset + length, 0); fSourceViewer.revealRange(offset, length); } |
| |||
/** * @see IDataDisplay#clear() */ /** * @see IDataDisplay#clear() */ public void clear() { IDocument document = [[#variable5d5746a0]].getDocument(); if (document != null) { document.set(""); //$NON-NLS-1$ } } /** * @see IDataDisplay#displayExpression(String) */ /** * @see IDataDisplay#displayExpression(String) */ public void displayExpression(String expression) { IDocument document = [[#variable5d574660]].getDocument(); int offset = document.getLength(); try { // add a cariage return if needed. if (offset != document.getLineInformationOfOffset(offset).getOffset()) { expression = System.getProperty("line.separator") + expression.trim(); //$NON-NLS-1$ } [[#variableb7776e40]].replace(offset, 0, expression); [[#variable5d574660]].setSelectedRange(offset + expression.length(), 0); [[#variable5d574660]].revealRange(offset, expression.length()); } catch (BadLocationException ble) { JDIDebugUIPlugin.log(ble); } } /** * @see IDataDisplay#displayExpressionValue(String) */ /** * @see IDataDisplay#displayExpressionValue(String) */ public void displayExpressionValue(String value) { value = System.getProperty("line.separator") + '\t' + value; //$NON-NLS-1$ ITextSelection selection = (ITextSelection) [[#variableb5915680]].getSelection(); int offset = selection.getOffset() + selection.getLength(); int length = value.length(); try { [[#variable5d574660]].getDocument().replace(offset, 0, value); } catch (BadLocationException ble) { JDIDebugUIPlugin.log(ble); } [[#variable5d574660]].setSelectedRange(offset + length, 0); [[#variable5d574660]].revealRange(offset, length); } |
CloneAbstraction |
Parameter Index | Clone Instance | Parameter Name | Value |
---|---|---|---|
1 | 1 | [[#5d5746a0]] | getTextViewer() |
1 | 2 | [[#5d5746a0]] | fSourceViewer |
2 | 1 | [[#5d574660]] | fTextViewer |
2 | 2 | [[#5d574660]] | fSourceViewer |
3 | 1 | [[#b7776e40]] | document |
3 | 2 | [[#b7776e40]] | fSourceViewer.getDocument() |
4 | 1 | [[#b5915680]] | fTextViewer.getSelectionProvider() |
4 | 2 | [[#b5915680]] | fSourceViewer |