CloneSet569


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
22260.974class_body_declarations[2]
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
122775
plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/formatter/LineWrappingTabPage.java
222799
plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/formatter/LineWrappingTabPage.java
Clone Instance
1
Line Count
22
Source Line
775
Source File
plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/formatter/LineWrappingTabPage.java

        protected void wrappingStyleChanged(int wrappingStyle) {
               Iterator iterator = fSelectionState.fElements.iterator();
               String currentKey;
                while (iterator.hasNext()) {
                        currentKey = ((Category) iterator.next()).key;
                        try {
                            changeWrappingStyle(currentKey, wrappingStyle);
                        } catch (IllegalArgumentException e) {
                                fWorkingValues.put(currentKey, DefaultCodeFormatterConstants.createAlignmentValue(false, wrappingStyle, DefaultCodeFormatterConstants.INDENT_DEFAULT));
                                JavaPlugin.log(new Status(IStatus.ERROR, JavaPlugin.getPluginId(), IStatus.OK, 
                                        Messages.format(FormatterMessages.LineWrappingTabPage_error_invalid_value, currentKey), e));
                          }
                }
                fSelectionState.refreshState(fSelection);
        }

        private void changeWrappingStyle(String currentKey, int wrappingStyle) throws IllegalArgumentException {
            String value = (String) fWorkingValues.get(currentKey);
                value = DefaultCodeFormatterConstants.setWrappingStyle(value, wrappingStyle);
                if (value == null)
                    throw new IllegalArgumentException();
                fWorkingValues.put(currentKey, value);
        }


Clone Instance
2
Line Count
22
Source Line
799
Source File
plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/formatter/LineWrappingTabPage.java

        protected void indentStyleChanged(int indentStyle) {
            Iterator iterator = fSelectionState.fElements.iterator();
            String currentKey;
        while (iterator.hasNext()) {
            currentKey = ((Category) iterator.next()).key;
                try {
                changeIndentStyle(currentKey, indentStyle);
                } catch (IllegalArgumentException e) {
                        fWorkingValues.put(currentKey, DefaultCodeFormatterConstants.createAlignmentValue(false, DefaultCodeFormatterConstants.WRAP_NO_SPLIT, indentStyle));
                        JavaPlugin.log(new Status(IStatus.ERROR, JavaPlugin.getPluginId(), IStatus.OK, 
                                Messages.format(FormatterMessages.LineWrappingTabPage_error_invalid_value, currentKey), e));
                  }
        }
        fSelectionState.refreshState(fSelection);
        }

        private void changeIndentStyle(String currentKey, int indentStyle) throws IllegalArgumentException {
                String value = (String) fWorkingValues.get(currentKey);
                value = DefaultCodeFormatterConstants.setIndentStyle(value, indentStyle);
                if (value == null)
                    throw new IllegalArgumentException();
                fWorkingValues.put(currentKey, value);
        }


Clone AbstractionParameter Count: 6Parameter Bindings

protected void [[#variablebd9f6360]](int  [[#variablebd9f62e0]]) {
  Iterator iterator = fSelectionState.fElements.iterator();
  String currentKey;
  while (iterator.hasNext()) {
    currentKey = ((Category) iterator.next()).key;
    try {
       [[#variablebd9f61e0]](currentKey,  [[#variablebd9f62e0]]);
    }
    catch (IllegalArgumentException e) {
      fWorkingValues.put(currentKey, DefaultCodeFormatterConstants.createAlignmentValue(false,  [[#variablebd9f6200]],  [[#variablebd9f61a0]]));
      JavaPlugin.log(new Status(IStatus.ERROR, JavaPlugin.getPluginId(), IStatus.OK, Messages.format(FormatterMessages.LineWrappingTabPage_error_invalid_value, currentKey), e));
    }
  }
  fSelectionState.refreshState(fSelection);
}

private void [[#variablebd9f61e0]](String currentKey, int  [[#variablebd9f62e0]]) throws IllegalArgumentException {
  String value = (String) fWorkingValues.get(currentKey);
  value = DefaultCodeFormatterConstants. [[#variablebd9f6160]](value,  [[#variablebd9f62e0]]);
  if (value == null)
    throw new IllegalArgumentException();
  fWorkingValues.put(currentKey, value);
}
 

CloneAbstraction
Parameter Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
11[[#bd9f6360]]
indentStyleChanged 
12[[#bd9f6360]]
wrappingStyleChanged 
21[[#bd9f62e0]]
indentStyle 
22[[#bd9f62e0]]
wrappingStyle 
31[[#bd9f61e0]]
changeIndentStyle 
32[[#bd9f61e0]]
changeWrappingStyle 
41[[#bd9f6200]]
DefaultCodeFormatterConstants.WRAP_NO_SPLIT 
42[[#bd9f6200]]
wrappingStyle 
51[[#bd9f61a0]]
indentStyle 
52[[#bd9f61a0]]
DefaultCodeFormatterConstants.INDENT_DEFAULT 
61[[#bd9f6160]]
setIndentStyle 
62[[#bd9f6160]]
setWrappingStyle