CloneSet179


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
39240.976class_body_declarations[6]
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
139476
plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/java/CompletionProposalComputerDescriptor.java
239235
plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/java/ProposalSorterHandle.java
Clone Instance
1
Line Count
39
Source Line
476
Source File
plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/java/CompletionProposalComputerDescriptor.java

        private IStatus createExceptionStatus(InvalidRegistryObjectException x) {
                // extension has become invalid - log & disable
                String blame = createBlameMessage();
                String reason = JavaTextMessages.CompletionProposalComputerDescriptor_reason_invalid;
                return new Status(IStatus.INFO, JavaPlugin.getPluginId(), IStatus.OK, blame + " " + reason, x); //$NON-NLS-1$
        }

        private IStatus createExceptionStatus(CoreException x) {
                // unable to instantiate the extension - log & disable
                String blame = createBlameMessage();
                String reason = JavaTextMessages.CompletionProposalComputerDescriptor_reason_instantiation;
                return new Status(IStatus.ERROR, JavaPlugin.getPluginId(), IStatus.OK, blame + " " + reason, x); //$NON-NLS-1$
        }

        private IStatus createExceptionStatus(RuntimeException x) {
                // misbehaving extension - log & disable
                String blame = createBlameMessage();
                String reason = JavaTextMessages.CompletionProposalComputerDescriptor_reason_runtime_ex;
                return new Status(IStatus.WARNING, JavaPlugin.getPluginId(), IStatus.OK, blame + " " + reason, x); //$NON-NLS-1$
        }

        private IStatus createAPIViolationStatus(String operation) {
                String blame = createBlameMessage();
                Object[] args = {
                                operation
                         };
                String reason = Messages.format(JavaTextMessages.CompletionProposalComputerDescriptor_reason_API, args);
                return new Status(IStatus.WARNING, JavaPlugin.getPluginId(), IStatus.OK, blame + " " + reason, null); //$NON-NLS-1$
        }

        private IStatus createPerformanceStatus(String operation) {
                String blame = createBlameMessage();
                Object[] args = {
                                operation
                         };
                String reason = Messages.format(JavaTextMessages.CompletionProposalComputerDescriptor_reason_performance, args);
                return new Status(IStatus.WARNING, JavaPlugin.getPluginId(), IStatus.OK, blame + " " + reason, null); //$NON-NLS-1$
        }

        private String createBlameMessage() {
                Object[] args = {
                                 getName(), fElement.getDeclaringExtension().getContributor().getName()
                         };
                String disable = Messages.format( JavaTextMessages.CompletionProposalComputerDescriptor_blame_message, args);
                return disable;
        }


Clone Instance
2
Line Count
39
Source Line
235
Source File
plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/java/ProposalSorterHandle.java

        private Status createExceptionStatus(InvalidRegistryObjectException x) {
                // extension has become invalid - log & disable
                String disable = createBlameMessage();
                String reason = JavaTextMessages.CompletionProposalComputerDescriptor_reason_invalid;
                return new Status(IStatus.INFO, JavaPlugin.getPluginId(), IStatus.OK, disable + " " + reason, x); //$NON-NLS-1$
        }

        private Status createExceptionStatus(CoreException x) {
                // unable to instantiate the extension - log & disable
                String disable = createBlameMessage();
                String reason = JavaTextMessages.CompletionProposalComputerDescriptor_reason_instantiation;
                return new Status(IStatus.ERROR, JavaPlugin.getPluginId(), IStatus.OK, disable + " " + reason, x); //$NON-NLS-1$
        }

        private Status createExceptionStatus(RuntimeException x) {
                // misbehaving extension - log & disable
                String disable = createBlameMessage();
                String reason = JavaTextMessages.CompletionProposalComputerDescriptor_reason_runtime_ex;
                return new Status(IStatus.WARNING, JavaPlugin.getPluginId(), IStatus.OK, disable + " " + reason, x); //$NON-NLS-1$
        }

        private Status createAPIViolationStatus(String operation) {
                String disable = createBlameMessage();
                Object[] args = {
                                operation
                         };
                String reason = Messages.format(JavaTextMessages.CompletionProposalComputerDescriptor_reason_API, args);
                return new Status(IStatus.WARNING, JavaPlugin.getPluginId(), IStatus.OK, disable + " " + reason, null); //$NON-NLS-1$
        }

        private Status createPerformanceStatus(String operation) {
                String disable = createBlameMessage();
                Object[] args = {
                                operation
                         };
                String reason = Messages.format(JavaTextMessages.CompletionProposalComputerDescriptor_reason_performance, args);
                return new Status(IStatus.WARNING, JavaPlugin.getPluginId(), IStatus.OK, disable + " " + reason, null); //$NON-NLS-1$
        }

        private String createBlameMessage() {
                Object[] args = {
                                 getName(), getId()
                         };
                String disable = Messages.format(JavaTextMessages.ProposalSorterHandle_blame, args);
                return disable;
        }


Clone AbstractionParameter Count: 4Parameter Bindings

private [[#variable63f6ad20]] createExceptionStatus(InvalidRegistryObjectException x) {
  // extension has become invalid - log & disable
  String  [[#variablebeebdbe0]]= createBlameMessage();
  String reason = JavaTextMessages.CompletionProposalComputerDescriptor_reason_invalid;
  return new Status(IStatus.INFO, JavaPlugin.getPluginId(), IStatus.OK,  [[#variablebeebdbe0]] + " " + reason, x); //$NON-NLS-1$
}

private [[#variable63f6ad20]] createExceptionStatus(CoreException x) {
  // unable to instantiate the extension - log & disable
  String  [[#variablebeebdbe0]]= createBlameMessage();
  String reason = JavaTextMessages.CompletionProposalComputerDescriptor_reason_instantiation;
  return new Status(IStatus.ERROR, JavaPlugin.getPluginId(), IStatus.OK,  [[#variablebeebdbe0]] + " " + reason, x); //$NON-NLS-1$
}

private [[#variable63f6ad20]] createExceptionStatus(RuntimeException x) {
  // misbehaving extension - log & disable
  String  [[#variablebeebdbe0]]= createBlameMessage();
  String reason = JavaTextMessages.CompletionProposalComputerDescriptor_reason_runtime_ex;
  return new Status(IStatus.WARNING, JavaPlugin.getPluginId(), IStatus.OK,  [[#variablebeebdbe0]] + " " + reason, x); //$NON-NLS-1$
}

private [[#variable63f6ad20]] createAPIViolationStatus(String operation) {
  String  [[#variablebeebdbe0]]= createBlameMessage();
  Object[] args = {
             operation
           };
  String reason = Messages.format(JavaTextMessages.CompletionProposalComputerDescriptor_reason_API, args);
  return new Status(IStatus.WARNING, JavaPlugin.getPluginId(), IStatus.OK,  [[#variablebeebdbe0]] + " " + reason, null); //$NON-NLS-1$
}

private [[#variable63f6ad20]] createPerformanceStatus(String operation) {
  String  [[#variablebeebdbe0]]= createBlameMessage();
  Object[] args = {
             operation
           };
  String reason = Messages.format(JavaTextMessages.CompletionProposalComputerDescriptor_reason_performance, args);
  return new Status(IStatus.WARNING, JavaPlugin.getPluginId(), IStatus.OK,  [[#variablebeebdbe0]] + " " + reason, null); //$NON-NLS-1$
}

private String createBlameMessage() {
  Object[] args = {
             getName(),
              [[#variablebeebdb60]]
           };
  String disable = Messages.format(JavaTextMessages. [[#variable63f6aca0]], args);
  return disable;
}
 

CloneAbstraction
Parameter Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
11[[#63f6ad20]]
IStatus 
12[[#63f6ad20]]
Status 
21[[#beebdbe0]]
blame 
22[[#beebdbe0]]
disable 
31[[#beebdb60]]
fElement.getDeclaringExtension().getContributor().getName() 
32[[#beebdb60]]
getId() 
41[[#63f6aca0]]
CompletionProposalComputerDescriptor_blame_message 
42[[#63f6aca0]]
ProposalSorterHandle_blame