CloneSet389


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
42240.976class_body_declarations[3]
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
14242
plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/display/DataDisplay.java
24293
plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/display/DisplayView.java
Clone Instance
1
Line Count
42
Source Line
42
Source File
plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/display/DataDisplay.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);
        }


Clone Instance
2
Line Count
42
Source Line
93
Source File
plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/display/DisplayView.java

                /**
                 * @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);
                }


Clone AbstractionParameter Count: 4Parameter Bindings

/**
         * @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 Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
11[[#5d5746a0]]
getTextViewer() 
12[[#5d5746a0]]
fSourceViewer 
21[[#5d574660]]
fTextViewer 
22[[#5d574660]]
fSourceViewer 
31[[#b7776e40]]
document 
32[[#b7776e40]]
fSourceViewer.getDocument() 
41[[#b5915680]]
fTextViewer.getSelectionProvider() 
42[[#b5915680]]
fSourceViewer