Source:
<code>public List<ITestNGMethod> getSkipCausedBy() { if (this.m_status != SKIP) { <START> return Lists.newArrayList(); <END> } if (skipAnalysed) { return Collections.unmodifiableList(skippedDueTo); } skipAnalysed = true; Set<ITestResult> skippedConfigs = m_context.getFailedConfigurations().getAllResults(); for (ITestResult skippedConfig : skippedConfigs) { if (isGlobalFailure(skippedConfig) || isRelated(skippedConfig) || belongToSameGroup(skippedConfig)) { skippedDueTo.add(skippedConfig.getMethod()); return Collections.unmodifiableList(skippedDueTo); } } List<String> upstreamMethods = Arrays.asList(m_method.getMethodsDependedUpon()); if (upstreamMethods.isEmpty()) { List<String> upstreamGroups = Arrays.asList(m_method.getGroupsDependedUpon()); if (upstreamGroups.isEmpty()) { return Collections.unmodifiableList(skippedDueTo); } List<ITestResult> allFailures = Lists.newArrayList(m_context.getFailedTests().getAllResults()); allFailures.addAll(m_context.getFailedButWithinSuccessPercentageTests().getAllResults()); skippedDueTo = allFailures.stream() .map(ITestResult::getMethod) .filter(each -> { List<String> currentMethodGroups = Arrays.asList(each.getGroups()); List<String> interection = Lists.intersection(upstreamGroups, currentMethodGroups); return !interection.isEmpty(); }).collect(Collectors.toList()); return Collections.unmodifiableList(skippedDueTo); } List<ITestResult> allfailures = Lists.newArrayList(m_context.getFailedTests().getAllResults()); allfailures.addAll(m_context.getFailedButWithinSuccessPercentageTests().getAllResults()); skippedDueTo = allfailures.stream() .map(ITestResult::getMethod) .filter(each -> upstreamMethods.contains(each.getQualifiedName())) .collect(Collectors.toList()); return Collections.unmodifiableList(skippedDueTo); }</code><technical_language>2 calls return 2 instances</technical_language>

Target:
public List<ITestNGMethod> getSkipCausedBy() { if (this.m_status != SKIP || skipAnalysed) { return Collections.unmodifiableList(skippedDueTo); } skipAnalysed = true; Set<ITestResult> skippedConfigs = m_context.getFailedConfigurations().getAllResults(); for (ITestResult skippedConfig : skippedConfigs) { if (isGlobalFailure(skippedConfig) || isRelated(skippedConfig)) { skippedDueTo.add(skippedConfig.getMethod()); } if (belongToSameGroup(skippedConfig)) { skippedDueTo.add(skippedConfig.getMethod()); } } if (!skippedDueTo.isEmpty()) { return Collections.unmodifiableList(skippedDueTo); } if (m_method.getMethodsDependedUpon().length==0) { if (m_method.getGroupsDependedUpon().length==0) { return Collections.emptyList(); } List<String> upstreamGroups = Arrays.asList(m_method.getGroupsDependedUpon()); List<ITestResult> allFailures = Lists.merge(m_context.getFailedTests().getAllResults(), m_context.getFailedButWithinSuccessPercentageTests().getAllResults()); skippedDueTo = allFailures.stream() .map(ITestResult::getMethod) .filter(method -> { List<String> currentMethodGroups = Arrays.asList(method.getGroups()); List<String> interection = Lists.intersection(upstreamGroups, currentMethodGroups); return !interection.isEmpty(); }).collect(Collectors.toList()); return Collections.unmodifiableList(skippedDueTo); } List<String> upstreamMethods = Arrays.asList(m_method.getMethodsDependedUpon()); List<ITestResult> allfailures = Lists.merge(m_context.getFailedTests().getAllResults(), m_context.getFailedButWithinSuccessPercentageTests().getAllResults()); skippedDueTo = allfailures.stream() .map(ITestResult::getMethod) .filter(method -> upstreamMethods.contains(method.getQualifiedName())) .collect(Collectors.toList()); return Collections.unmodifiableList(skippedDueTo); }