auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public static <T> ArrayList<T> Intersection(ArrayList<ArrayList<T>> lists) { ArrayList<T> result = new ArrayList<T>(); if (lists != null) { result.addAll(lists.get(0)); for (ArrayList<T> list : lists) { result.retainAll(list); } } return result; }

Target:
public static <T> ArrayList<T> Intersection(ArrayList<ArrayList<T>> lists) { ArrayList<T> result = new ArrayList<T>(); if (lists != null && !lists.isEmpty()) { result.addAll(lists.get(0)); for (ArrayList<T> list : lists) { result.retainAll(list); } } return result; }
Source:
synchronized void cleanupPreemptionList() { Iterator<FSAppAttempt> iterator = resourcesPreemptedForApp.keySet().iterator(); while (iterator.hasNext()) { FSAppAttempt app = iterator.next(); boolean removeApp = false; if (app.isStopped() || Resources.equals( app.getPendingDemand(), Resources.none())) { Resources.subtractFrom(totalResourcesPreempted, resourcesPreemptedForApp.get(app)); iterator.remove(); } } }

Target:
private synchronized void cleanupPreemptionList() { Iterator<FSAppAttempt> iterator = resourcesPreemptedForApp.keySet().iterator(); while (iterator.hasNext()) { FSAppAttempt app = iterator.next(); if (app.isStopped() || !app.isStarved()) { Resources.subtractFrom(totalResourcesPreempted, resourcesPreemptedForApp.get(app)); appIdToAppMap.remove(app.getApplicationAttemptId()); iterator.remove(); } } }
Source:
public void onAssignmentChange(List<DatastreamTask> tasks) { List<DatastreamTask> tasksAdded = tasks.stream().filter(x -> !_taskHandlers.containsKey(x)).collect(Collectors.toList()); List<DatastreamTask> tasksRemoved = _taskHandlers.keySet().stream().filter(x -> !tasks.contains(x)).collect(Collectors.toList()); stopAndRemoveHandlers(tasksRemoved); Map<DatastreamTask, SnapshotTaskHandler> addedHandlers = tasksAdded.stream() .collect(Collectors.toMap(Function.identity(), x -> new SnapshotTaskHandler(x, _tableInfoProvider, _defaultUserName, _defaultPassword, _bufferSizeInRows, _sqlTimeout))); addedHandlers.values().stream().forEach(_executorService::submit); _taskHandlers.putAll(addedHandlers); }

Target:
public void onAssignmentChange(List<DatastreamTask> tasks) { LOG.info(String.format("Mysql snapshot connector is assigned tasks %s", tasks)); List<DatastreamTask> tasksAdded = tasks.stream().filter(x -> !_taskHandlers.containsKey(x)).collect(Collectors.toList()); List<DatastreamTask> tasksRemoved = _taskHandlers.keySet().stream().filter(x -> !tasks.contains(x)).collect(Collectors.toList()); stopAndRemoveHandlers(tasksRemoved); Map<DatastreamTask, SnapshotTaskHandler> addedHandlers = tasksAdded.stream() .collect(Collectors.toMap(Function.identity(), x -> new SnapshotTaskHandler(x, _tableInfoProvider, getUsername(x), getPassword(x), _bufferSizeInRows, _sqlTimeout))); addedHandlers.values().stream().forEach(_executorService::submit); _taskHandlers.putAll(addedHandlers); }
Source:
public static List<Phonenumber> extractTelecoms(PRPAMT201306UV02ParameterList params) { LOG.trace("Entering HL7DbParser201305.ExtractTelecoms method..."); List<Phonenumber> phonenumbers = new ArrayList<>(); Phonenumber phonenumber; if (CollectionUtils.isNotEmpty(params.getPatientTelecom()) && params.getPatientTelecom().get(0) != null) { for (PRPAMT201306UV02PatientTelecom patientTelecom : params.getPatientTelecom()) { String telecom = hl7ParserUtils.extractTelecom(patientTelecom); if (hl7ParserUtils.extractTelecom(patientTelecom) != null) { phonenumber = new Phonenumber(); phonenumber.setValue(telecom); phonenumbers.add(phonenumber); } } } else { LOG.info("message does not contain a patientTelecom"); } LOG.trace("Exiting HL7DbParser201305.ExtractTelecoms method..."); return phonenumbers; }

Target:
public static List<Phonenumber> extractTelecoms(PRPAMT201306UV02ParameterList params) { LOG.trace("Entering HL7DbParser201305.ExtractTelecoms method..."); List<Phonenumber> phonenumbers = new ArrayList<>(); Phonenumber phonenumber; if (CollectionUtils.isNotEmpty(params.getPatientTelecom()) && params.getPatientTelecom().get(0) != null) { for (PRPAMT201306UV02PatientTelecom patientTelecom : params.getPatientTelecom()) { String telecom = hl7ParserUtils.extractTelecom(patientTelecom); if (telecom != null) { phonenumber = new Phonenumber(); phonenumber.setValue(telecom); phonenumbers.add(phonenumber); } } } else { LOG.info("message does not contain a patientTelecom"); } LOG.trace("Exiting HL7DbParser201305.ExtractTelecoms method..."); return phonenumbers; }
Source:
public StreamingResponseBody streamEvents( @PathVariable("subscription_id") final String subscriptionId, @RequestParam(value = "window_size", required = false, defaultValue = "100") final int windowSize, @RequestParam(value = "commit_timeout", required = false, defaultValue = "30") final int commitTimeout, @RequestParam(value = "batch_limit", required = false, defaultValue = "1") final int batchLimit, @RequestParam(value = "stream_limit", required = false) final Integer streamLimit, @RequestParam(value = "batch_flush_timeout", required = false, defaultValue = "30") final int batchTimeout, @RequestParam(value = "stream_timeout", required = false) final Long streamTimeout, @RequestParam(value = "stream_keep_alive_limit", required = false) final Integer streamKeepAliveLimit, final NativeWebRequest request, final HttpServletResponse response) throws IOException { return outputStream -> { SubscriptionStreamer streamer = null; final SubscriptionOutputImpl output = new SubscriptionOutputImpl(response, outputStream); try { streamer = subscriptionStreamerFactory.build( subscriptionId, StreamParameters.of(batchLimit, streamLimit, batchTimeout, streamTimeout, streamKeepAliveLimit, windowSize, commitTimeout), output); streamer.stream(); } catch (final NoSuchSubscriptionException e) { output.onException(e); } catch (final InterruptedException ex) { LOG.warn("Interrupted while streaming with " + streamer, ex); Thread.currentThread().interrupt(); } finally { outputStream.close(); } }; }

Target:
public StreamingResponseBody streamEvents( @PathVariable("subscription_id") final String subscriptionId, @RequestParam(value = "window_size", required = false, defaultValue = "100") final int windowSize, @RequestParam(value = "commit_timeout", required = false, defaultValue = "30") final int commitTimeout, @RequestParam(value = "batch_limit", required = false, defaultValue = "1") final int batchLimit, @RequestParam(value = "stream_limit", required = false) final Integer streamLimit, @RequestParam(value = "batch_flush_timeout", required = false, defaultValue = "30") final int batchTimeout, @RequestParam(value = "stream_timeout", required = false) final Long streamTimeout, @RequestParam(value = "stream_keep_alive_limit", required = false) final Integer streamKeepAliveLimit, final NativeWebRequest request, final HttpServletResponse response) throws IOException { return outputStream -> { SubscriptionStreamer streamer = null; final SubscriptionOutputImpl output = new SubscriptionOutputImpl(response, outputStream); try { streamer = subscriptionStreamerFactory.build( subscriptionId, StreamParameters.of(batchLimit, streamLimit, batchTimeout, streamTimeout, streamKeepAliveLimit, windowSize, commitTimeout), output); streamer.stream(); } catch (final InterruptedException ex) { LOG.warn("Interrupted while streaming with " + streamer, ex); Thread.currentThread().interrupt(); } catch (final Exception e) { output.onException(e); } finally { outputStream.close(); } }; }
Source:
protected void handleStateChange(ConnectionState newState) { switch (newState) { case CONNECTED: LOG.debug("Connected to ZooKeeper quorum. Leader retrieval can start."); break; case SUSPENDED: synchronized (lock) { LOG.warn("Connection to ZooKeeper suspended. Can no longer retrieve the leader from " + "ZooKeeper."); notifyLeaderLoss(); } break; case RECONNECTED: LOG.info("Connection to ZooKeeper was reconnected. Leader retrieval can be restarted."); break; case LOST: synchronized (lock) { LOG.warn("Connection to ZooKeeper lost. Can no longer retrieve the leader from " + "ZooKeeper."); notifyLeaderLoss(); } break; } }

Target:
protected void handleStateChange(ConnectionState newState) { switch (newState) { case CONNECTED: LOG.debug("Connected to ZooKeeper quorum. Leader retrieval can start."); break; case SUSPENDED: LOG.warn("Connection to ZooKeeper suspended. Can no longer retrieve the leader from " + "ZooKeeper."); synchronized (lock) { notifyLeaderLoss(); } break; case RECONNECTED: LOG.info("Connection to ZooKeeper was reconnected. Leader retrieval can be restarted."); break; case LOST: LOG.warn("Connection to ZooKeeper lost. Can no longer retrieve the leader from " + "ZooKeeper."); synchronized (lock) { notifyLeaderLoss(); } break; } }
Source:
private void process(File file, URL dest, boolean expectContinue) throws Exception { log("putting " + file + " to " + dest + " with expectContinue=" + expectContinue, Project.MSG_VERBOSE); if (fFilterSets.hasFilters() || !fFilterChains.isEmpty()) { Resource filteredResult; File tempFile=null; if (fInMemoryFiltering){ filteredResult = new StringResource(); }else{ tempFile = File.createTempFile("filterResult", ".tmp"); filteredResult = new FileResource(tempFile); } try{ ResourceUtils.copyResource(new FileResource(file), filteredResult, fFilterSets, fFilterChains, false, false, false, fInputEncoding, fOutputEncoding, getProject()); getSardine().put(dest.toString(), filteredResult.getInputStream(), fContentType, expectContinue); } finally { FileUtils.delete(tempFile); } } else { getSardine().put(dest.toString(), new FileInputStream(file), fContentType, expectContinue); } }

Target:
private void process(File file, URL dest, boolean expectContinue) throws Exception { log("putting " + file + " to " + dest + " with expectContinue=" + expectContinue, Project.MSG_VERBOSE); if (filterSets.hasFilters() || !filterChains.isEmpty()) { Resource filteredResult; File tempFile = null; if (inMemoryFiltering) { filteredResult = new StringResource(); } else { tempFile = File.createTempFile("filterResult", ".tmp"); filteredResult = new FileResource(tempFile); } try { ResourceUtils.copyResource(new FileResource(file), filteredResult, filterSets, filterChains, false, false, false, inputEncoding, outputEncoding, getProject()); getSardine().put(dest.toString(), filteredResult.getInputStream(), contentType, expectContinue); } finally { FileUtils.delete(tempFile); } } else { getSardine().put(dest.toString(), file, contentType, expectContinue); } }
Source:
private Map<String, List<Integer>> generateOptionPointsMapping( List<FeedbackResponseAttributes> responses) { Map<String, List<Integer>> optionPoints = new TreeMap<String, List<Integer>>(new Comparator<String>() { @Override public int compare(String s1, String s2) { return s2.compareTo(s1); } }); for (FeedbackResponseAttributes response : responses) { FeedbackConstantSumResponseDetails frd = (FeedbackConstantSumResponseDetails) response.getResponseDetails(); for (int i = 0; i < frd.getAnswerList().size(); i++) { String optionReceivingPoints = distributeToRecipients ? response.recipient : String.valueOf(i); int pointsReceived = frd.getAnswerList().get(i); updateOptionPointsMapping(optionPoints, optionReceivingPoints, pointsReceived); } } return optionPoints; }

Target:
private Map<String, List<Integer>> generateOptionPointsMapping( List<FeedbackResponseAttributes> responses) { Map<String, List<Integer>> optionPoints = new HashMap<String, List<Integer>>(); for (FeedbackResponseAttributes response : responses) { FeedbackConstantSumResponseDetails frd = (FeedbackConstantSumResponseDetails) response.getResponseDetails(); for (int i = 0; i < frd.getAnswerList().size(); i++) { String optionReceivingPoints = distributeToRecipients ? response.recipient : String.valueOf(i); int pointsReceived = frd.getAnswerList().get(i); updateOptionPointsMapping(optionPoints, optionReceivingPoints, pointsReceived); } } return optionPoints; }
Source:
protected void configure(HttpSecurity http) throws Exception { http .authorizeRequests() .antMatchers("/message/**").hasAuthority("SCOPE_message:read") .anyRequest().authenticated() .and() .oauth2ResourceServer() .opaque() .introspectionUri(this.introspectionUri) .introspectionClientId(this.clientId) .introspectionClientSecret(this.clientSecret); }

Target:
protected void configure(HttpSecurity http) throws Exception { http .authorizeRequests() .mvcMatchers("/message/**").hasAuthority("SCOPE_message:read") .anyRequest().authenticated() .and() .oauth2ResourceServer() .opaqueToken() .introspectionUri(this.introspectionUri) .introspectionClientCredentials(this.clientId, this.clientSecret); }
Source:
public static void updateSpecificActionJobCompleted(Guid entityId, VdcActionType actionType, boolean status) { try { JobRepositoryFactory.getJobRepository().getJobsByEntityAndAction(entityId, actionType).stream() .peek(job -> JobRepositoryFactory.getJobRepository().updateCompletedJobAndSteps(job)) .filter(job -> job.getStatus() == JobExecutionStatus.STARTED) .peek(job -> job.markJobEnded(status)); List<Job> jobs = JobRepositoryFactory.getJobRepository().getJobsByEntityAndAction(entityId, actionType); } catch (RuntimeException e) { log.error("Exception", e); } }

Target:
public static void updateSpecificActionJobCompleted(Guid entityId, VdcActionType actionType, boolean status) { try { Stream<Job> stream = JobRepositoryFactory.getJobRepository().getJobsByEntityAndAction(entityId, actionType).stream(); stream .filter(job -> job.getStatus() == JobExecutionStatus.STARTED) .peek(job -> job.markJobEnded(status)); stream .peek(job -> JobRepositoryFactory.getJobRepository().updateCompletedJobAndSteps(job)); } catch (RuntimeException e) { log.error("Exception", e); } }
Source:
public void configure(Config conf) { encoding = ConfUtils.getString(conf, "file.encoding", "UTF-8"); maxContentLength = ConfUtils.getInt(conf, "file.content.limit", 64 * 1024); crawlParent = ConfUtils.getBoolean(conf, "crawlParent", true); }

Target:
public void configure(Config conf) { encoding = ConfUtils.getString(conf, "file.encoding", "UTF-8"); crawlParent = ConfUtils.getBoolean(conf, "file.crawl.parent", false); }
Source:
public long getIdentifier() { return md5().hashString(identity.toString(), UTF_8).asLong(); }

Target:
public long getIdentifier() { return identifier; }
Source:
public void testDeserializeFromStringNormalCase() throws IOException { String srcRegex = "-"; String replaceString = "_"; String serializedString = createSerializedString(srcRegex, replaceString); RegexMountPointResolvedDstPathReplaceInterceptor interceptor = RegexMountPointResolvedDstPathReplaceInterceptor .deserializeFromString(serializedString); Assert.assertTrue(interceptor.getSrcRegexString().equals(srcRegex)); Assert.assertTrue(interceptor.getReplaceString().equals(replaceString)); Assert.assertTrue(interceptor.getSrcRegexPattern() == null); interceptor.initialize(); Assert.assertTrue( interceptor.getSrcRegexPattern().toString().equals(srcRegex)); }

Target:
public void testDeserializeFromStringNormalCase() throws IOException { String srcRegex = "-"; String replaceString = "_"; String serializedString = createSerializedString(srcRegex, replaceString); RegexMountPointResolvedDstPathReplaceInterceptor interceptor = RegexMountPointResolvedDstPathReplaceInterceptor .deserializeFromString(serializedString); Assert.assertEquals(srcRegex, interceptor.getSrcRegexString()); Assert.assertEquals(replaceString, interceptor.getReplaceString()); Assert.assertNull(interceptor.getSrcRegexPattern()); interceptor.initialize(); Assert.assertEquals(srcRegex, interceptor.getSrcRegexPattern().toString()); }
Source:
private void addDefaultAcls(OmBucketInfo omBucketInfo, OmVolumeArgs omVolumeArgs) { List<OzoneAcl> acls = new ArrayList<>(); if (omBucketInfo.getAcls() != null) { acls.addAll(omBucketInfo.getAcls()); } omVolumeArgs.getAclMap().getDefaultAclList().forEach( defaultAcl -> acls.add( OzoneAcl.fromProtobufWithAccessType(defaultAcl))); omBucketInfo.setAcls(acls); }

Target:
private void addDefaultAcls(OmBucketInfo omBucketInfo, OmVolumeArgs omVolumeArgs) { List<OzoneAcl> acls = new ArrayList<>(); if (omBucketInfo.getAcls() != null) { acls.addAll(omBucketInfo.getAcls()); } List<OzoneAcl> defaultVolumeAclList = omVolumeArgs.getAclMap() .getDefaultAclList().stream().map(OzoneAcl::fromProtobuf) .collect(Collectors.toList()); OzoneAclUtil.inheritDefaultAcls(acls, defaultVolumeAclList); omBucketInfo.setAcls(acls); }
Source:
public CalcSubscription(@Nullable Double amount, @Nullable Double discountAmount, @Nullable Double discountPercent, @Nullable String period, @Nullable Double price, SubscriptionResource resource, @Nullable Date startTime, @Nullable Date endTime) { checkArgument(!(endTime == null && period == null), "Subscription period should be configured with endTime or period"); this.amount = amount; this.discountAmount = discountAmount; this.discountPercent = discountPercent; this.period = period; this.price = price; this.resource = checkNotNull(resource); this.startTime = startTime; this.endTime = endTime; }

Target:
public CalcSubscription(@Nullable Double amount, @Nullable Double discountAmount, @Nullable Double discountPercent, @Nullable String period, @Nullable Double price, SubscriptionResource resource, @Nullable Date startTime, @Nullable Date endTime) { checkArgument(!(endTime == null && period == null), "Subscription period should be configured with endTime or period"); this.amount = amount; this.discountAmount = discountAmount; this.discountPercent = discountPercent; this.period = period; this.price = price; this.resource = checkNotNull(resource, "resource"); this.startTime = startTime; this.endTime = endTime; }
Source:
private void addFailureCausesFromData(StringBuilder message, FailureCauseDisplayData displayData) { for (FoundFailureCause failureCause : displayData.getFoundFailureCauses()) { if (message.length() > 0) { message.append("\n\n"); } message.append(failureCause.getDescription()); message.append(" ( ") .append(Jenkins.getInstance().getRootUrl()) .append(displayData.getLinks().getBuildUrl()) .append(" )"); } if (displayData.getDownstreamFailureCauses().isEmpty() && displayData.getFoundFailureCauses().isEmpty()) { message.append("Unknown (") .append(Jenkins.getInstance().getRootUrl()) .append(displayData.getLinks().getBuildUrl()) .append(")"); } }

Target:
private void addFailureCausesFromData(StringBuilder message, FailureCauseDisplayData displayData) { for (FoundFailureCause failureCause : displayData.getFoundFailureCauses()) { if (message.length() > 0) { message.append("\n\n"); } message.append(failureCause.getDescription()); message.append(" ( ") .append(Jenkins.getInstance().getRootUrl()) .append(displayData.getLinks().getBuildUrl()) .append(" )"); } if (displayData.getDownstreamFailureCauses().isEmpty() && displayData.getFoundFailureCauses().isEmpty()) { if (message.length() > 0) { message.append("\n\n"); } message.append(PluginImpl.getInstance().getNoCausesMessage()) .append(" ( ") .append(Jenkins.getInstance().getRootUrl()) .append(displayData.getLinks().getBuildUrl()) .append(" )"); } }
Source:
public void shouldReadReuseFromEnvironmentOnly() { assertFalse("no reuse by default", newConfig().environmentSupportsReuse()); classpathProperties.setProperty("testcontainers.reuse.enable", "true"); assertFalse("reuse is not affected by classpath properties", newConfig().environmentSupportsReuse()); environmentProperties.setProperty("testcontainers.reuse.enable", "true"); assertTrue("reuse enabled", newConfig().environmentSupportsReuse()); environmentProperties.setProperty("ryuk.container.image", " testcontainersofficial/ryuk:0.3.0 "); assertEquals("Whitespaces still exists in image property", "testcontainersofficial/ryuk:0.3.0",newConfig().getRyukImage()); }

Target:
public void shouldReadReuseFromEnvironmentOnly() { assertFalse("no reuse by default", newConfig().environmentSupportsReuse()); classpathProperties.setProperty("testcontainers.reuse.enable", "true"); assertFalse("reuse is not affected by classpath properties", newConfig().environmentSupportsReuse()); environmentProperties.setProperty("testcontainers.reuse.enable", "true"); assertTrue("reuse enabled", newConfig().environmentSupportsReuse()); }
Source:
public void incrementCounter(final String name, final long value) { if (!assertIsOpen()) { return; } final ConcurrentLinkedDeque<Quantity> counters = getOrCreateDeque(_counterSamples, name); final TsdCounter counter = _counters.compute(name, (key, existingValue) -> { if (existingValue == null) { final TsdCounter newCounter = TsdCounter.newInstance(key, _isOpen); counters.add(newCounter); return newCounter; } return existingValue; }); counter.increment(value); }

Target:
public void incrementCounter(final String name, final long value) { if (!assertIsOpen()) { return; } final TsdCounter counter = _counters.compute(name, _createCounterBiFunction); counter.increment(value); }
Source:
public void savePageStructures() throws ParserConfigurationException { Package gtPackage = packageService.selectByCode(packageCode); Map<UUID, Iterator<Page>> translationPageDirectoryIteratorMap = Maps.newHashMap(); for(Translation translation : translationService.selectByPackageId(gtPackage.getId())) { Language languageRepresentedByTranslation = languageService.selectLanguageById(translation.getLanguageId()); translationPageDirectoryIteratorMap.put(translation.getId(), new PageDirectory(packageCode, languageRepresentedByTranslation.getPath()).buildPages().iterator()); } List<Page> baseEnglishPages = new PageDirectory(packageCode, "en").buildPages(); for(UUID translationId : translationPageDirectoryIteratorMap.keySet()) { Iterator<Page> i = translationPageDirectoryIteratorMap.get(translationId); Iterator<Page> baseIterator = baseEnglishPages.iterator(); for( ; i.hasNext();) { Page translatedPage = i.next(); PageStructure pageStructure = new PageStructure(); pageStructure.setId(UUID.randomUUID()); pageStructure.setXmlContent(translatedPage.getXmlContent()); pageStructure.setFilename(translatedPage.getFilename()); pageStructure.setTranslationId(translationId); pageStructureService.insert(pageStructure); TranslatableElements translatableElements = new TranslatableElements(baseIterator.next().getXmlContent(), translatedPage.getXmlContent(), translatedPage.getFilename(), translationId, pageStructure.getId()); translatableElements.save(translationElementService); pageStructureService.update(pageStructure); } } }

Target:
public void savePageStructures() { Package gtPackage = packageService.selectByCode(packageCode); Map<UUID, Iterator<Page>> translationPageDirectoryIteratorMap = Maps.newHashMap(); for(Translation translation : translationService.selectByPackageId(gtPackage.getId())) { Language languageRepresentedByTranslation = languageService.selectLanguageById(translation.getLanguageId()); translationPageDirectoryIteratorMap.put(translation.getId(), new PageDirectory(packageCode, languageRepresentedByTranslation.getPath()).buildPages().iterator()); } List<Page> baseEnglishPages = new PageDirectory(packageCode, "en").buildPages(); for(UUID translationId : translationPageDirectoryIteratorMap.keySet()) { Iterator<Page> i = translationPageDirectoryIteratorMap.get(translationId); Iterator<Page> baseIterator = baseEnglishPages.iterator(); for( ; i.hasNext();) { Page translatedPage = i.next(); PageStructure pageStructure = new PageStructure(); pageStructure.setId(UUID.randomUUID()); pageStructure.setXmlContent(translatedPage.getXmlContent()); pageStructure.setFilename(translatedPage.getFilename()); pageStructure.setTranslationId(translationId); pageStructureService.insert(pageStructure); TranslatableElements translatableElements = new TranslatableElements(baseIterator.next().getXmlContent(), translatedPage.getXmlContent(), translatedPage.getFilename(), translationId, pageStructure.getId()); translatableElements.save(translationElementService); pageStructureService.update(pageStructure); } } }
Source:
public Ingredient(String tag, List<IngredientName> names, List<IngredientsRelation> parents, List<IngredientsRelation> children, String wikiDataId) { this.tag = tag; this.names = names; this.parents = parents; this.children = children; this.wikiDataId = wikiDataId; this.isWikiDataIdPresent = true; }

Target:
public Ingredient(String tag, List<IngredientName> names, List<IngredientsRelation> parents, List<IngredientsRelation> children, String wikiDataId) { this.tag = tag; this.names = names; this.parents = parents; this.children = children; this.wikiDataId = wikiDataId; }
Source:
private static Token getMissedHtmlTag(RecognitionException exception) { Token htmlTagNameStart = null; final Interval sourceInterval = exception.getCtx().getSourceInterval(); final List<Token> tokenList = ((BufferedTokenStream) exception.getInputStream()) .getTokens(sourceInterval.a, sourceInterval.b); final Deque<Token> stack = new ArrayDeque<>(); for (int i = 0; i < tokenList.size(); i++) { final Token token = tokenList.get(i); if (token.getType() == JavadocParser.HTML_TAG_NAME && tokenList.get(i - 1).getType() == JavadocTokenTypes.START) { stack.push(token); } else if (token.getType() == JavadocParser.HTML_TAG_NAME && !stack.isEmpty()) { if (stack.peek().getText().equals(token.getText())) { stack.pop(); } else { htmlTagNameStart = stack.pop(); } } } if (htmlTagNameStart == null) { htmlTagNameStart = stack.pop(); } return htmlTagNameStart; }

Target:
private static Token getMissedHtmlTag(RecognitionException exception) { Token htmlTagNameStart = null; final Interval sourceInterval = exception.getCtx().getSourceInterval(); final List<Token> tokenList = ((BufferedTokenStream) exception.getInputStream()) .getTokens(sourceInterval.a, sourceInterval.b); final Deque<Token> stack = new ArrayDeque<>(); int prevTokenType = JavadocTokenTypes.EOF; for (final Token token : tokenList) { final int javadocTokenType = mapAntlrTokenTypeToJavadocTokenType(token.getType()); if (javadocTokenType == JavadocTokenTypes.HTML_TAG_NAME && prevTokenType == JavadocTokenTypes.START) { stack.push(token); } else if (javadocTokenType == JavadocTokenTypes.HTML_TAG_NAME && !stack.isEmpty()) { if (stack.peek().getText().equals(token.getText())) { stack.pop(); } else { htmlTagNameStart = stack.pop(); } } prevTokenType = javadocTokenType; } if (htmlTagNameStart == null) { htmlTagNameStart = stack.pop(); } return htmlTagNameStart; }
Source:
protected Expression getExpressionFromContainer(Container container, long expressionDefinitionId) { if (container != null) { final Expression expression = container.accept(this, expressionDefinitionId); if (expression != null) { return expression; } } return null; }

Target:
protected Expression getExpressionFromContainer(Container container, long expressionDefinitionId) { return container != null ? container.accept(this, expressionDefinitionId) : null; }
Source:
public void cancel(DefaultGoPublisher publisher, EnvironmentVariableContext environmentVariableContext, TaskExtension taskExtension) { publisher.consumeLineWithPrefix("Cancel task: " + cancelBuilder.getDescription()); try { cancelBuilder.build(new BuildLogElement(), publisher, environmentVariableContext, taskExtension); publisher.consumeLineWithPrefix("Task status: cancelled"); } catch (Exception e) { LOGGER.error("", e); } }

Target:
public void cancel(DefaultGoPublisher publisher, EnvironmentVariableContext environmentVariableContext, TaskExtension taskExtension) { publisher.taggedConsumeLineWithPrefix(DefaultGoPublisher.CANCEL_TASK_START, "On Cancel Task: " + cancelBuilder.getDescription()); try { cancelBuilder.build(new BuildLogElement(), publisher, environmentVariableContext, taskExtension); publisher.taggedConsumeLineWithPrefix(DefaultGoPublisher.CANCEL_TASK_PASS, "On Cancel Task completed"); } catch (Exception e) { publisher.taggedConsumeLineWithPrefix(DefaultGoPublisher.CANCEL_TASK_FAIL, "On Cancel Task failed"); LOGGER.error("", e); } }
Source:
protected IStatus run(IProgressMonitor monitor) { IStatus status = Status.OK_STATUS; try { SubmoduleWalk walk = SubmoduleWalk.forIndex(repo); boolean refresh = false; while (walk.next()) { for (StagingEntry entry : nodes) { boolean isSubmodule = entry.getPath().equals( walk.getPath()); entry.setSubmodule(isSubmodule); if (isSubmodule) refresh = true; } } if (refresh) stagingView.refreshViewersPreservingExpandedElements(); } catch (IOException e) { status = Activator.createErrorStatus( UIText.StagingViewContentProvider_SubmoduleError, e); } return status; }

Target:
protected IStatus run(IProgressMonitor monitor) { IStatus status = Status.OK_STATUS; try { SubmoduleWalk walk = SubmoduleWalk.forIndex(repo); boolean refresh = false; while (walk.next() && !monitor.isCanceled()) { for (StagingEntry entry : nodes) { boolean isSubmodule = entry.getPath().equals( walk.getPath()); entry.setSubmodule(isSubmodule); if (isSubmodule) refresh = true; } } if (refresh) stagingView.refreshViewersPreservingExpandedElements(); } catch (IOException e) { status = Activator.createErrorStatus( UIText.StagingViewContentProvider_SubmoduleError, e); } return status; }
Source:
public void contextDisposed() { super.contextDisposed(); eventBroker.unsubscribe(itemUpdater); eventBroker.unsubscribe(labelUpdater); eventBroker.unsubscribe(selectionUpdater); eventBroker.unsubscribe(enabledUpdater); eventBroker.unsubscribe(toBeRenderedUpdater); ContextInjectionFactory.uninject(MenuManagerEventHelper.getInstance() .getShowHelper(), context); MenuManagerEventHelper.getInstance().setShowHelper(null); ContextInjectionFactory.uninject( MenuManagerEventHelper.getInstance() .getHideHelper(), context); MenuManagerEventHelper.getInstance().setHideHelper(null); context.remove(MenuManagerRendererFilter.class); Display display = context.get(Display.class); if (display != null && !display.isDisposed() && rendererFilter != null) { display.removeFilter(SWT.Show, rendererFilter); display.removeFilter(SWT.Hide, rendererFilter); display.removeFilter(SWT.Dispose, rendererFilter); } if (rendererFilter != null) { ContextInjectionFactory.uninject(rendererFilter, context); rendererFilter = null; } context.remove(MenuManagerRenderer.class); }

Target:
public void contextDisposed() { eventBroker.unsubscribe(itemUpdater); eventBroker.unsubscribe(labelUpdater); eventBroker.unsubscribe(selectionUpdater); eventBroker.unsubscribe(enabledUpdater); eventBroker.unsubscribe(toBeRenderedUpdater); ContextInjectionFactory.uninject(MenuManagerEventHelper.getInstance() .getShowHelper(), context); MenuManagerEventHelper.getInstance().setShowHelper(null); ContextInjectionFactory.uninject( MenuManagerEventHelper.getInstance() .getHideHelper(), context); MenuManagerEventHelper.getInstance().setHideHelper(null); context.remove(MenuManagerRendererFilter.class); Display display = context.get(Display.class); if (display != null && !display.isDisposed() && rendererFilter != null) { display.removeFilter(SWT.Show, rendererFilter); display.removeFilter(SWT.Hide, rendererFilter); display.removeFilter(SWT.Dispose, rendererFilter); } if (rendererFilter != null) { ContextInjectionFactory.uninject(rendererFilter, context); rendererFilter = null; } context.remove(MenuManagerRenderer.class); super.contextDisposed(); }
Source:
public void validateUpdateDatastreams(List<Datastream> datastreams, List<Datastream> allDatastreams) throws DatastreamValidationException { for (Datastream newDatastream : datastreams) { List<Datastream> existingDatastreams = allDatastreams.stream().filter(ds -> ds.getName() .equals(newDatastream.getName())).collect(Collectors.toList()); Validate.isTrue(existingDatastreams.size() == 1, "Bad state: Multiple datastreams exist with the " + "same name " + existingDatastreams); Datastream existingDatastream = existingDatastreams.get(0); if (newDatastream.equals(existingDatastream)) { continue; } if (!doesSourceMatch(newDatastream, existingDatastream) || !doesDestinationMatch(newDatastream, existingDatastream)) { throw new DatastreamValidationException(String.format("Only metadata update is allowed. " + "Source and destination cannot be updated. Old stream: {%s}; New stream: {%s}", existingDatastream, newDatastream)); } if (newDatastream.hasMetadata() && existingDatastream.hasMetadata() && newDatastream.getMetadata().equals(existingDatastream.getMetadata())) { throw new DatastreamValidationException(String.format("Only metadata update is allowed. " + "Old stream: {%s}; New stream: {%s}", existingDatastream, newDatastream)); } } }

Target:
public void validateUpdateDatastreams(List<Datastream> datastreams, List<Datastream> allDatastreams) throws DatastreamValidationException { for (Datastream newDatastream : datastreams) { List<Datastream> existingDatastreams = allDatastreams.stream().filter(ds -> ds.getName() .equals(newDatastream.getName())).collect(Collectors.toList()); Validate.isTrue(existingDatastreams.size() == 1, "Bad state: Multiple datastreams exist with the " + "same name " + existingDatastreams); Datastream existingDatastream = existingDatastreams.get(0); if (newDatastream.equals(existingDatastream)) { LOG.info(String.format("Skipping update for datastream {%s} due to no change", existingDatastream)); continue; } if (!doesSourceMatch(newDatastream, existingDatastream) || !doesDestinationMatch(newDatastream, existingDatastream)) { throw new DatastreamValidationException(String.format("Only metadata update is allowed. " + "Source and destination cannot be updated. Old stream: {%s}; New stream: {%s}", existingDatastream, newDatastream)); } if (newDatastream.hasMetadata() && existingDatastream.hasMetadata() && newDatastream.getMetadata().equals(existingDatastream.getMetadata())) { throw new DatastreamValidationException(String.format("Only metadata update is allowed. " + "Old stream: {%s}; New stream: {%s}", existingDatastream, newDatastream)); } } }
Source:
public String buildInsertSelective(ProviderContext context) { final String tableName = context.getMapperType().getAnnotation(BaseMapper.Meta.class).tableName(); Map<String, String> columnMap = getColumnMap(context); StringBuffer sqlBuffer = new StringBuffer(); sqlBuffer.append("<script>"); sqlBuffer.append("insert into "); sqlBuffer.append(tableName); sqlBuffer.append("<trim prefix=\"(\" suffix=\")\" suffixOverrides=\",\">"); for (Map.Entry<String, String> entry : columnMap.entrySet()) { sqlBuffer.append("<if test=\"").append(entry.getValue()).append(" != null\">"); sqlBuffer.append(entry.getKey()).append(","); sqlBuffer.append("</if>"); } sqlBuffer.append("</trim>"); sqlBuffer.append("<trim prefix=\"VALUES (\" suffix=\")\" suffixOverrides=\",\">"); for (String field : columnMap.values()) { sqlBuffer.append("<if test=\"").append(field).append(" != null\">"); sqlBuffer.append("#{").append(field).append("} ,"); sqlBuffer.append("</if>"); } sqlBuffer.append("</trim>"); sqlBuffer.append("</script>"); return sqlBuffer.toString(); }

Target:
public String buildInsertSelective(ProviderContext context) { final String tableName = context.getMapperType().getAnnotation(BaseMapper.Meta.class).tableName(); Map<String, String> columnMap = getColumnMap(context); StringBuilder sqlBuffer = new StringBuilder(); sqlBuffer.append("<script>"); sqlBuffer.append("insert into "); sqlBuffer.append(tableName); sqlBuffer.append("<trim prefix=\"(\" suffix=\")\" suffixOverrides=\",\">"); for (Map.Entry<String, String> entry : columnMap.entrySet()) { sqlBuffer.append("<if test=\"").append(entry.getValue()).append(" != null\">"); sqlBuffer.append(entry.getKey()).append(","); sqlBuffer.append("</if>"); } sqlBuffer.append("</trim>"); sqlBuffer.append("<trim prefix=\"VALUES (\" suffix=\")\" suffixOverrides=\",\">"); for (String field : columnMap.values()) { sqlBuffer.append("<if test=\"").append(field).append(" != null\">"); sqlBuffer.append("#{").append(field).append("} ,"); sqlBuffer.append("</if>"); } sqlBuffer.append("</trim>"); sqlBuffer.append("</script>"); return sqlBuffer.toString(); }
Source:
public List<Comment> getComment(String uuid) throws CommentManagementException{ if (log.isDebugEnabled()) { log.debug("Getting comment with the application release(" +uuid + ") from the database"); } Connection conn; PreparedStatement stmt = null; ResultSet rs ; String sql = ""; List<Comment> comments=new ArrayList<>(); try { conn = this.getDBConnection(); sql += "SELECT COMMENT_TEXT FROM AP_APP_COMMENT WHERE (SELECT ID FROM AP_APP_RELEASE where UUID=?)AND " + "(SELECT AP_APP_ID FROM AP_APP_RELEASE where UUID=?);"; stmt = conn.prepareStatement(sql); stmt.setString(1, uuid); stmt.setString(2,uuid); rs=stmt.executeQuery(); while (rs.next()) { Comment comment=new Comment(); comment.setId(rs.getInt("ID")); comment.setTenantId(rs.getInt("TENANT_ID")); comment.setComment(rs.getString("COMMENT_TEXT")); comment.setCreatedAt(rs.getTimestamp("CREATED_AT")); comment.setCreatedBy(rs.getString("CREATED_BY")); comment.setModifiedAt(rs.getTimestamp("MODEFIED_AT")); comment.setModifiedBy(rs.getString("MODEFIED_AT")); comment.setParent(rs.getInt("PARENT_ID")); comments.add(comment); } } catch (DBConnectionException e) { log.error("DB Connection Exception occurs.", e); } catch (SQLException e) { throw new CommentManagementException("Error occurred while retrieving comments", e); } finally { Util.cleanupResources(stmt, null); } return comments; }

Target:
public List<Comment> getComment(String uuid) throws CommentManagementException { if (log.isDebugEnabled()) { log.debug("Getting comment with the application release(" + uuid + ") from the database"); } Connection conn; PreparedStatement statement = null; ResultSet rs; List<Comment> comments = new ArrayList<>(); try { conn = this.getDBConnection(); sql = "SELECT COMMENT_TEXT FROM AP_APP_COMMENT WHERE (SELECT ID FROM AP_APP_RELEASE where UUID=?)AND " + "(SELECT AP_APP_ID FROM AP_APP_RELEASE where UUID=?);"; statement = conn.prepareStatement(sql); statement.setString(1, uuid); statement.setString(2, uuid); rs = statement.executeQuery(); while (rs.next()) { Comment comment = new Comment(); comment.setId(rs.getInt("ID")); comment.setTenantId(rs.getInt("TENANT_ID")); comment.setComment(rs.getString("COMMENT_TEXT")); comment.setCreatedAt(rs.getTimestamp("CREATED_AT")); comment.setCreatedBy(rs.getString("CREATED_BY")); comment.setModifiedAt(rs.getTimestamp("MODEFIED_AT")); comment.setModifiedBy(rs.getString("MODEFIED_AT")); comment.setParent(rs.getInt("PARENT_ID")); comments.add(comment); } } catch (DBConnectionException e) { log.error("DB Connection Exception occurred while retrieving comments", e); } catch (SQLException e) { throw new CommentManagementException("SQL Error occurred while retrieving comments", e); } finally { Util.cleanupResources(statement, null); } return comments; }
Source:
protected void cleanTransactionsTable() { LOG.info("cleanTransactionsTable, cleaning CorporateBilledCorporatePaidTransaction table"); businessObjectService.deleteMatching(CorporateBilledCorporatePaidTransaction.class, new HashMap()); }

Target:
protected void cleanTransactionsTable() { LOG.info("cleanTransactionsTable, cleaning CorporateBilledCorporatePaidTransaction table"); businessObjectService.deleteMatching(CorporateBilledCorporatePaidTransaction.class, new HashMap<String, String>()); }
Source:
@Override public void run(@Nonnull JSession session) throws Exception { Set<JDefinedClass> classesToEmit = Sets.newHashSet(); for (JDefinedClassOrInterface type : session.getTypesToEmit()) { if (type instanceof JDefinedClass) { classesToEmit.add((JDefinedClass) type); } } State state = new State(); for (JDefinedClass thisClass : classesToEmit) { JClass superClass = thisClass.getSuperClass(); if (!(superClass instanceof JDefinedClass) || !classesToEmit.contains(superClass)) { trackOverridingChains(thisClass, state); } } for (JMethod method : state.effectivelyFinalMethods) { if (!method.isAbstract()) { assert !method.isStatic() && !method.isPrivate() && !(method instanceof JConstructor); EffectivelyFinalMarker.markAsEffectivelyFinal(method); if (!preserveReflections()) { method.setFinal(); tracer.getStatistic(METHODS_FINALIZED).incValue(); } } } }

Target:
@Override public void run(@Nonnull JSession session) throws Exception { Set<JDefinedClass> classesToEmit = Sets.newHashSet(); for (JDefinedClassOrInterface type : session.getTypesToEmit()) { if (type instanceof JDefinedClass) { classesToEmit.add((JDefinedClass) type); } } State state = new State(); for (JDefinedClass thisClass : classesToEmit) { JClass superClass = thisClass.getSuperClass(); if (!(superClass instanceof JDefinedClass) || !classesToEmit.contains(superClass)) { trackOverridingChains(thisClass, state); } } for (JMethod method : state.effectivelyFinalMethods) { if (!method.isAbstract() && !method.isFinal()) { assert !method.isStatic() && !method.isPrivate() && !(method instanceof JConstructor); EffectivelyFinalMethodMarker.markAsEffectivelyFinal(method); if (!preserveReflections()) { method.setFinal(); tracer.getStatistic(METHODS_FINALIZED).incValue(); } } } }
Source:
private static void raw(BitstampAccountServiceRaw accountService) throws IOException { BitstampBalance bitstampBalance = accountService.getBitstampBalance(); System.out.println("BitstampBalance: " + bitstampBalance); BitstampDepositAddress depositAddress = accountService.getBitstampBitcoinDepositAddress(); System.out.println("BitstampDepositAddress address: " + depositAddress); accountService.withdrawSepa( new BigDecimal("150"), "Kovin Kostner", "BY13NBRB3600900000002Z00AB00", "DABAIE2D", "Minsk, Belarus, Main street 2", "197372", "Minsk", Country.Belarus.alpha2); accountService.withdrawInternational( new BigDecimal("150"), "Kovin Kostner", "BY13NBRB3600900000002Z00AB00", "DABAIE2D", "Minsk, Belarus, Main street 2", "197372", "Minsk", Country.Belarus.alpha2, "Great Bank", "Great Bank Address", "Great Bank Postal Code", "Great Bank City", "Bank Country Alpha 2 code", BankCurrency.AUD ); }

Target:
private static void raw(BitstampAccountServiceRaw accountService) throws IOException { BitstampBalance bitstampBalance = accountService.getBitstampBalance(); System.out.println("BitstampBalance: " + bitstampBalance); BitstampDepositAddress depositAddress = accountService.getBitstampBitcoinDepositAddress(); System.out.println("BitstampDepositAddress address: " + depositAddress); accountService.withdrawSepa( new BigDecimal("150"), "Test User", "BY13NBRB3600900000002Z00AB00", "DABAIE2D", "Minsk, Belarus, Main street 2", "197372", "Minsk", Country.Belarus.alpha2); accountService.withdrawInternational( new BigDecimal("150"), "Test User", "BY13NBRB3600900000002Z00AB00", "DABAIE2D", "Minsk, Belarus, Main street 2", "197372", "Minsk", Country.Belarus.alpha2, "Great Bank", "Great Bank Address", "Great Bank Postal Code", "Great Bank City", "Bank Country Alpha 2 code", BankCurrency.AUD ); }
Source:
private List<String> getProviderStringList(List<Result> providerList) { List<String> list = new ArrayList<String>(); switch (edit_new) { case 0: list.add("Set Provider"); for (int i = 0; i < providerList.size(); i++) { list.add(providerList.get(i).getDisplay()); } break; case 1: list.add(info.get(1)); for (int i = 0; i < providerList.size(); i++) { list.add(providerList.get(i).getDisplay()); } break; default: list.add("Set Provider"); for (int i = 0; i < providerList.size(); i++) { list.add(providerList.get(i).getDisplay()); } break; } return list; }

Target:
private List<String> getProviderStringList(List<Result> providerList) { List<String> list = new ArrayList<String>(); switch (edit_new) { case "new_form": list.add("Set Provider"); for (int i = 0; i < providerList.size(); i++) { list.add(providerList.get(i).getDisplay()); } break; case "edit_form": list.add(info.get(1)); for (int i = 0; i < providerList.size(); i++) { list.add(providerList.get(i).getDisplay()); } break; default: list.add("Set Provider"); for (int i = 0; i < providerList.size(); i++) { list.add(providerList.get(i).getDisplay()); } break; } return list; }
Source:
private void getUnSyncedEntries(Map<String, Object> map) { Object[] healInfos = (Object[]) map.get(BRICKS); for (Object healInfoObj : healInfos) { Map<String, String> healInfo = (Map<String, String>) healInfoObj; String hostUuid = (String) healInfo.get(HOST_UUID); GlusterServer glusterServer = dbUtils.getServerByUuid(Guid.createGuidFromString(hostUuid)); String brickName = (String) healInfo.get(NAME); String[] brickParts = brickName.split(":", -1); if (brickParts.length != 2) { throw new RuntimeException("Invalid brick representation [" + brickName + "]"); } if (glusterServer == null) { log.warn("Could not fetch heal info for brick '{}' - server uuid '{}' not found", brickName, hostUuid); return; } GlusterBrickEntity brick = dbUtils.getGlusterBrickByServerUuidAndBrickDir(glusterServer.getId(), brickParts[1]); String status = (String) healInfo.get(STATUS); Integer entries = null; if ("Connected".equals(status)) { entries = Integer.valueOf((String) healInfo.get(NO_OF_ENTRIES)); } unSyncedEntries.put(brick.getId(), entries); } }

Target:
private void getUnSyncedEntries(Map<String, Object> map) { Object[] healInfos = (Object[]) map.get(BRICKS); for (Object healInfoObj : healInfos) { Map<String, String> healInfo = (Map<String, String>) healInfoObj; String status = (String) healInfo.get(STATUS); Integer entries = null; if ("Connected".equals(status)) { String hostUuid = (String) healInfo.get(HOST_UUID); GlusterServer glusterServer = dbUtils.getServerByUuid(Guid.createGuidFromString(hostUuid)); String brickName = (String) healInfo.get(NAME); String[] brickParts = brickName.split(":", -1); if (brickParts.length != 2) { throw new RuntimeException("Invalid brick representation [" + brickName + "]"); } if (glusterServer == null) { log.warn("Could not fetch heal info for brick '{}' - server uuid '{}' not found", brickName, hostUuid); return; } GlusterBrickEntity brick = dbUtils.getGlusterBrickByServerUuidAndBrickDir(glusterServer.getId(), brickParts[1]); entries = Integer.valueOf((String) healInfo.get(NO_OF_ENTRIES)); unSyncedEntries.put(brick.getId(), entries); } } }
Source:
private static void addAllLogicalStructures( List<JavaLogicalStructure> pluginContributedJavaLogicalStructures) { for (JavaLogicalStructure javaLogicalStructure : pluginContributedJavaLogicalStructures) { addLogicalStructure(javaLogicalStructure); } }

Target:
private static void addAllLogicalStructures( List<JavaLogicalStructure> pluginContributedJavaLogicalStructures) { for (JavaLogicalStructure logicalStructure : pluginContributedJavaLogicalStructures) { addLogicalStructure(logicalStructure); } }
Source:
private static Stream<Symbol.MethodSymbol> getAllMembers(Symbol.TypeSymbol symbol) { if ("java.lang.Object".equals(symbol.type().fullyQualifiedName())) { return Stream.empty(); } Stream<Symbol.MethodSymbol> members = symbol.memberSymbols().stream().filter(Symbol::isMethodSymbol).map(Symbol.MethodSymbol.class::cast); Type superClass = symbol.superClass(); if (superClass != null) { members = Stream.concat(members, getAllMembers(superClass.symbol())); } Stream<Symbol.MethodSymbol> defaultMethodsFromInterfaces = symbol.interfaces().stream() .flatMap(i -> getAllMembers(i.symbol())) .filter(m -> ((JavaSymbol.MethodJavaSymbol) m).isDefault()); for (Symbol s : symbol.memberSymbols()) { if (s instanceof Symbol.TypeSymbol) { if (s.metadata().isAnnotatedWith("org.junit.jupiter.api.Nested")) { members = Stream.concat(members, getAllMembers((Symbol.TypeSymbol) s)); } } } members = Stream.concat(members, defaultMethodsFromInterfaces); return members; }

Target:
private static Stream<Symbol.MethodSymbol> getAllMembers(Symbol.TypeSymbol symbol) { if ("java.lang.Object".equals(symbol.type().fullyQualifiedName())) { return Stream.empty(); } Stream<Symbol.MethodSymbol> members = symbol.memberSymbols().stream().filter(Symbol::isMethodSymbol).map(Symbol.MethodSymbol.class::cast); Type superClass = symbol.superClass(); if (superClass != null) { members = Stream.concat(members, getAllMembers(superClass.symbol())); } Stream<Symbol.MethodSymbol> defaultMethodsFromInterfaces = symbol.interfaces().stream() .flatMap(i -> getAllMembers(i.symbol())) .filter(m -> ((JavaSymbol.MethodJavaSymbol) m).isDefault()); for (Symbol s : symbol.memberSymbols()) { if (s.isTypeSymbol() && s.metadata().isAnnotatedWith("org.junit.jupiter.api.Nested")) { members = Stream.concat(members, getAllMembers((Symbol.TypeSymbol) s)); } } members = Stream.concat(members, defaultMethodsFromInterfaces); return members; }