Previous CloneSet | Next CloneSet | Back to Main Report |
Clone Mass | Clones in CloneSet | Parameter Count | Clone Similarity | Syntax Category [Sequence Length] |
---|---|---|---|---|
56 | 2 | 3 | 0.989 | class_body_declarations[2] |
Clone Abstraction | Parameter Bindings |
Clone Instance (Click to see clone) | Line Count | Source Line | Source File |
---|---|---|---|
1 | 56 | 77 | plugins/org.eclipse.jdt.debug/model/org/eclipse/jdt/internal/debug/core/breakpoints/JavaPatternBreakpoint.java |
2 | 56 | 121 | 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 = 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; } |
| ||||
/** * @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; } |
| |||
/** * @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 Index | Clone Instance | Parameter Name | Value |
---|---|---|---|
1 | 1 | [[#b8c968e0]] | "" |
1 | 2 | [[#b8c968e0]] | "*" |
2 | 1 | [[#b8c96820]] | getPattern |
2 | 2 | [[#b8c96820]] | getSourceName |
3 | 1 | [[#b8c96800]] | () |
3 | 2 | [[#b8c96800]] | (target) |