if (getInitialContextFactory() != null && getInitialContextFactory().trim().length() > 0) { if (LOGGER.isDebugEnabled()) { LOGGER.debug("Using InitialContext [" + getInitialContextFactory() + "]"); } table.put(Context.INITIAL_CONTEXT_FACTORY, getInitialContextFactory()); }
if (getContextProvider() != null && getContextProvider().trim().length() > 0) { if (LOGGER.isDebugEnabled()) { LOGGER.debug("Using Provider [" + getContextProvider() + "]"); } table.put(Context.PROVIDER_URL, getContextProvider()); }
Clone fragments detected by clone detection tool
File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/protocol/jms/sampler/JMSSampler.java File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/protocol/jms/sampler/JMSSampler.java
Method name: Context getInitialContext() Method name: Context getInitialContext()
Number of AST nodes: 4 Number of AST nodes: 4
1
if (getInitialContextFactory() != null && getInitialContextFactory().trim().length() > 0) {
1
if (getContextProvider() != null && getContextProvider().trim().length() > 0) {
2
			if (LOGGER.isDebugEnabled()) {
2
			if (LOGGER.isDebugEnabled()) {
3
				LOGGER.debug("Using InitialContext [" + getInitialContextFactory() + "]");
3
				LOGGER.debug("Using Provider [" + getContextProvider() + "]");
4
			}
4
			}
5
			table.put(Context.INITIAL_CONTEXT_FACTORY, getInitialContextFactory());
5
			table.put(Context.PROVIDER_URL, getContextProvider());
6
		}
6
		}
Summary
Number of common nesting structure subtrees1
Number of refactorable cases1
Number of non-refactorable cases0
Time elapsed for finding largest common nesting structure subtrees (ms)0.3
Clones locationClones are in the same method
Number of node comparisons8
  1. {Refactorable}
    Mapping Summary
    Number of mapped statements4
    Number of unmapped statements in the first code fragment0
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)1.1
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    2
    if (getInitialContextFactory() != null && getInitialContextFactory().trim().length() > 0)
    2
    if (getInitialContextFactory() != null && getInitialContextFactory().trim().length() > 0)
    6
    if (getContextProvider() != null && getContextProvider().trim().length() > 0)
    Differences
    Expression1Expression2Difference
    getInitialContextFactorygetContextProviderMETHOD_INVOCATION_NAME_MISMATCH
    getInitialContextFactorygetContextProviderMETHOD_INVOCATION_NAME_MISMATCH
    6
    if (getContextProvider() != null && getContextProvider().trim().length() > 0)
    3
    if (LOGGER.isDebugEnabled())
    7
    if (LOGGER.isDebugEnabled())
    4
    LOGGER.debug("Using InitialContext [" + getInitialContextFactory() + "]");
    4
    LOGGER.debug("Using InitialContext [" + getInitialContextFactory() + "]");
    8
    LOGGER.debug("Using Provider [" + getContextProvider() + "]");
    Differences
    Expression1Expression2Difference
    "Using InitialContext [""Using Provider ["LITERAL_VALUE_MISMATCH
    getInitialContextFactorygetContextProviderMETHOD_INVOCATION_NAME_MISMATCH
    8
    LOGGER.debug("Using Provider [" + getContextProvider() + "]");
    5
    table.put(Context.INITIAL_CONTEXT_FACTORY, getInitialContextFactory());
    5
    table.put(Context.INITIAL_CONTEXT_FACTORY, getInitialContextFactory());
    9
    table.put(Context.PROVIDER_URL, getContextProvider());
    Differences
    Expression1Expression2Difference
    INITIAL_CONTEXT_FACTORYPROVIDER_URLVARIABLE_NAME_MISMATCH
    getInitialContextFactorygetContextProviderMETHOD_INVOCATION_NAME_MISMATCH
    9
    table.put(Context.PROVIDER_URL, getContextProvider());
    Precondition Violations (0)
    Row Violation