CloneSet351


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
56230.989class_body_declarations[2]
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
15677
plugins/org.eclipse.jdt.debug/model/org/eclipse/jdt/internal/debug/core/breakpoints/JavaPatternBreakpoint.java
256121
plugins/org.eclipse.jdt.debug/model/org/eclipse/jdt/internal/debug/core/breakpoints/JavaTargetPatternBreakpoint.java
Clone Instance
1
Line Count
56
Source Line
77
Source File
plugins/org.eclipse.jdt.debug/model/org/eclipse/jdt/internal/debug/core/breakpoints/JavaPatternBreakpoint.java

        /**
         * @see JavaBreakpoint#getReferenceTypeName()
         */
        protected String getReferenceTypeName() {
                String name = ""; //$NON-NLS-1$
                try {
                        name = getPattern();
                } catch (CoreException ce) {
                        JDIDebugPlugin.log(ce);
                  }
                return name;
        }

        /**
         * @see JavaBreakpoint#installableReferenceType(ReferenceType)
         */
        protected boolean installableReferenceType(ReferenceType type, JDIDebugTarget target) throws CoreException {
                // if the source name attribute is specified, check for a match with the
                // debug attribute (if available)
                if (getSourceName() != null) {
                        String sourceName = null;
                        try {
                                sourceName = type.sourceName();
                        } catch (AbsentInformationException e) {
                                // unable to compare
                          }
                          catch (VMDisconnectedException e) {
                                if ( !target.isAvailable()) {
                                        return false;
                                }
                                target.targetRequestFailed(MessageFormat.format(JDIDebugBreakpointMessages.JavaPatternBreakpoint_exception_source_name, new String[] {
                                                                                                                                                                      e.toString(), type.name()
                                                                                                                                                                     } ),                         e);
                                // execution will not reach this line, as 
                                // #targetRequestFailed will throw an exception                 
                                return false;
                          }
                          catch (RuntimeException e) {
                                target.targetRequestFailed(MessageFormat.format(JDIDebugBreakpointMessages.JavaPatternBreakpoint_exception_source_name, new String[] {
                                                                                                                                                                      e.toString(), type.name()
                                                                                                                                                                     } ),                         e);
                                // execution will not reach this line, as 
                                // #targetRequestFailed will throw an exception                 
                                return false;
                          }
                        // if the debug attribute matches the source name, attempt installion
                        if (sourceName != null) {
                                if ( !getSourceName().equalsIgnoreCase(sourceName)) {
                                        return false;
                                }
                        }
                }
                String pattern = getPattern();
                String queriedType = type.name();
                if (pattern == null || queriedType == null) {
                        return false;
                }
                if (queriedType.startsWith(pattern)) {
                        // query registered listeners to see if this pattern breakpoint should
                        // be installed in the given target
                        return queryInstallListeners(target, type);
                }
                return false;
        }


Clone Instance
2
Line Count
56
Source Line
121
Source File
plugins/org.eclipse.jdt.debug/model/org/eclipse/jdt/internal/debug/core/breakpoints/JavaTargetPatternBreakpoint.java

        /**
         * @see JavaBreakpoint#getReferenceTypeName()
         */
        protected String getReferenceTypeName() {
                String name = "*"; //$NON-NLS-1$
                try {
                        name = getSourceName();
                } catch (CoreException ce) {
                        JDIDebugPlugin.log(ce);
                  }
                return name;
        }

        /**
         * @see JavaBreakpoint#installableReferenceType(ReferenceType)
         */
        protected boolean installableReferenceType(ReferenceType type, JDIDebugTarget target) throws CoreException {
                // if the source name attribute is specified, check for a match with the
                // debug attribute (if available)
                if (getSourceName() != null) {
                        String sourceName = null;
                        try {
                                sourceName = type.sourceName();
                        } catch (AbsentInformationException e) {
                                // unable to compare
                          }
                          catch (VMDisconnectedException e) {
                                if ( !target.isAvailable()) {
                                        return false;
                                }
                                target.targetRequestFailed(MessageFormat.format(JDIDebugBreakpointMessages.JavaPatternBreakpoint_exception_source_name, new String[] {
                                                                                                                                                                      e.toString(), type.name()
                                                                                                                                                                     } ),                         e);
                                // execution will not reach this line, as 
                                // #targetRequestFailed will throw an exception                 
                                return false;
                          }
                          catch (RuntimeException e) {
                                target.targetRequestFailed(MessageFormat.format(JDIDebugBreakpointMessages.JavaPatternBreakpoint_exception_source_name, new String[] {
                                                                                                                                                                      e.toString(), type.name()
                                                                                                                                                                     } ),                         e);
                                // execution will not reach this line, as 
                                // #targetRequestFailed will throw an exception                 
                                return false;
                          }
                        // if the debug attribute matches the source name, attempt installion
                        if (sourceName != null) {
                                if ( !getSourceName().equalsIgnoreCase(sourceName)) {
                                        return false;
                                }
                        }
                }
                String pattern = getPattern(target);
                String queriedType = type.name();
                if (pattern == null || queriedType == null) {
                        return false;
                }
                if (queriedType.startsWith(pattern)) {
                        // query registered listeners to see if this pattern breakpoint should
                        // be installed in the given target
                        return queryInstallListeners(target, type);
                }
                return false;
        }


Clone AbstractionParameter Count: 3Parameter Bindings

/**
         * @see JavaBreakpoint#getReferenceTypeName()
         */
protected String getReferenceTypeName() {
  String name = [[#variableb8c968e0]]; //$NON-NLS-1$
  try {
    name = [[#variableb8c96820]]();
  }
  catch (CoreException ce) {
    JDIDebugPlugin.log(ce);
  }
  return name;
}

/**
         * @see JavaBreakpoint#installableReferenceType(ReferenceType)
         */
protected boolean installableReferenceType(ReferenceType type, JDIDebugTarget target) throws CoreException {
  // if the source name attribute is specified, check for a match with the
  // debug attribute (if available)
  if (getSourceName() != null) {
    String sourceName = null;
    try {
      sourceName = type.sourceName();
    }
    catch (AbsentInformationException e) {
    // unable to compare
    }
    catch (VMDisconnectedException e) {
      if ( !target.isAvailable()) {
        return false;
      }
      target.targetRequestFailed(MessageFormat.format(JDIDebugBreakpointMessages.JavaPatternBreakpoint_exception_source_name, new String[] {
                                                                                                                                             e.toString(),
                                                                                                                                             type.name()
                                                                                                                                           } ), e);
      // execution will not reach this line, as 
      // #targetRequestFailed will throw an exception                 
      return false;
    }
    catch (RuntimeException e) {
      target.targetRequestFailed(MessageFormat.format(JDIDebugBreakpointMessages.JavaPatternBreakpoint_exception_source_name, new String[] {
                                                                                                                                             e.toString(),
                                                                                                                                             type.name()
                                                                                                                                           } ), e);
      // execution will not reach this line, as 
      // #targetRequestFailed will throw an exception                 
      return false;
    }
    // if the debug attribute matches the source name, attempt installion
    if (sourceName != null) {
      if ( !getSourceName().equalsIgnoreCase(sourceName)) {
        return false;
      }
    }
  }
  String pattern = getPattern [[#variableb8c96800]];
  String queriedType = type.name();
  if (pattern == null || queriedType == null) {
    return false;
  }
  if (queriedType.startsWith(pattern)) {
    // query registered listeners to see if this pattern breakpoint should
    // be installed in the given target
    return queryInstallListeners(target, type);
  }
  return false;
}
 

CloneAbstraction
Parameter Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
11[[#b8c968e0]]
"" 
12[[#b8c968e0]]
"*" 
21[[#b8c96820]]
getPattern 
22[[#b8c96820]]
getSourceName 
31[[#b8c96800]]
() 
32[[#b8c96800]]
(target)