auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>protected void initSelectedType() { VmInterfaceType selectedNicType = VmInterfaceType.forValue(getNic().getType()); <START> if (selectedNicType == null || !supportedVnicTypes.contains(selectedNicType)) { <END> selectedNicType = getDeafultNicTypeByProfile(); } getNicType().setItems(supportedVnicTypes, selectedNicType); }</code><technical_language>Please add a null check for 'supportedVnicTypes'</technical_language>

Target:
protected void initSelectedType() { VmInterfaceType selectedNicType = VmInterfaceType.forValue(getNic().getType()); final Collection<VmInterfaceType> vnicTypes = supportedVnicTypes == null ? new ArrayList<VmInterfaceType>() : supportedVnicTypes; if (selectedNicType == null || !vnicTypes.contains(selectedNicType)) { selectedNicType = getDeafultNicTypeByProfile(); } if (getNicType().getItems() != vnicTypes) { getNicType().setItems(vnicTypes, selectedNicType); } else { getNicType().setSelectedItem(selectedNicType); } }
Source:
<code>public synchronized T getDataset() { <START> return dataset; <END> }</code><technical_language>clear dataset is updated other set in constructors of subclasses. I synchronizing this method gains for performance loss</technical_language>

Target:
public T getDataset() { return dataset; }
Source:
<code>public List<ReadOnlyRepo<T>> getStack(long tid) { String txpath = getTXPath(tid); outer: while (true) { List<String> ops; try { ops = zk.getChildren(txpath); } catch (KeeperException.NoNodeException e) { <START> return null; <END> } catch (KeeperException | InterruptedException e1) { throw new RuntimeException(e1); } ops = new ArrayList<String>(ops); Collections.sort(ops, Collections.reverseOrder()); ArrayList<ReadOnlyRepo<T>> dops = new ArrayList<>(); for (String child : ops) { if (child.startsWith("repo_")) { byte[] ser; try { ser = zk.getData(txpath + "/" + child, null); dops.add((ReadOnlyRepo<T>) deserialize(ser)); } catch (KeeperException.NoNodeException e) { continue outer; } catch (KeeperException | InterruptedException e) { throw new RuntimeException(e); } } } return dops; } }</code><technical_language>Empty list instead of null</technical_language>

Target:
public List<ReadOnlyRepo<T>> getStack(long tid) { String txpath = getTXPath(tid); outer: while (true) { List<String> ops; try { ops = zk.getChildren(txpath); } catch (KeeperException.NoNodeException e) { return Collections.emptyList(); } catch (KeeperException | InterruptedException e1) { throw new RuntimeException(e1); } ops = new ArrayList<String>(ops); Collections.sort(ops, Collections.reverseOrder()); ArrayList<ReadOnlyRepo<T>> dops = new ArrayList<>(); for (String child : ops) { if (child.startsWith("repo_")) { byte[] ser; try { ser = zk.getData(txpath + "/" + child, null); @SuppressWarnings("unchecked") ReadOnlyRepo<T> repo = (ReadOnlyRepo<T>) deserialize(ser); dops.add(repo); } catch (KeeperException.NoNodeException e) { continue outer; } catch (KeeperException | InterruptedException e) { throw new RuntimeException(e); } } } return dops; } }
Source:
<code>private boolean isFieldAssignment(AssignmentExpressionTree tree) { ExpressionTree variableTree = tree.variable(); <START> if (variableTree.is(Kind.IDENTIFIER)) { <END> Symbol variableSymbol = getSemanticModel().getReference((IdentifierTree) variableTree); return variableSymbol.owner().isKind(Symbol.TYP); } return false; }</code><technical_language>expressions this.field = null</technical_language>

Target:
private boolean isFieldAssignment(AssignmentExpressionTree tree) { ExpressionTree variable = tree.variable(); if (variable.is(Kind.MEMBER_SELECT)) { MemberSelectExpressionTree memberSelectExpressionTree = (MemberSelectExpressionTree) variable; if (!isThis(memberSelectExpressionTree.expression())) { return false; } variable = memberSelectExpressionTree.identifier(); } if (variable.is(Kind.IDENTIFIER)) { Symbol variableSymbol = getSemanticModel().getReference((IdentifierTree) variable); return variableSymbol != null && variableSymbol.owner().isKind(Symbol.TYP); } return false; }
Source:
<code>private Result cloneResult(Result result) { Metacard metacard = result.getMetacard(); Metacard clonedMetacard = new MetacardImpl(metacard, metacard.getMetacardType()); Result clonedResult = new ResultImpl(clonedMetacard); ((ResultImpl) clonedResult).setDistanceInMeters(result.getDistanceInMeters()); <START> ((ResultImpl) clonedResult).setRelevanceScore(result.getRelevanceScore()); <END> return clonedResult; }</code><technical_language>ResultImpl clonedResult =..</technical_language>

Target:
private Result cloneResult(Result result) { Metacard metacard = result.getMetacard(); Metacard clonedMetacard = new MetacardImpl(metacard, metacard.getMetacardType()); ResultImpl clonedResult = new ResultImpl(clonedMetacard); clonedResult.setDistanceInMeters(result.getDistanceInMeters()); clonedResult.setRelevanceScore(result.getRelevanceScore()); return clonedResult; }
Source:
<code>protected boolean isConfigured() { <START> return generator.getNuxeoHome() .toPath() .resolve("conf") .resolve("Catalina") .resolve("localhost") .resolve(getContextName() + ".xml") .toFile() .exists(); <END> }</code><technical_language>Files.exists(generator.getNuxeoHome().toPath().resolve(Path.of("conf", "Catalina", "localhost", getContextName() + ".xml")))</technical_language>

Target:
protected boolean isConfigured() { Path nuxeoContext = Path.of("conf", "Catalina", "localhost", getContextName() + ".xml"); return Files.exists(generator.getNuxeoHome().toPath().resolve(nuxeoContext)); }
Source:
<code>public TradfriCoapClient(URI uri) { super(uri); setTimeout(TIMEOUT); logger = LoggerFactory.getLogger(getClass()); commandsQueue = new LinkedBlockingQueue<>(); <START> commandExecutorThread = new Thread(() -> { <END> while (true) { try { PayloadCallbackPair payloadCallbackPair = TradfriCoapClient.this.commandsQueue.take(); logger.debug("Proccessing payload: {}", payloadCallbackPair.payload); if (STOP_EXECUTOR.equals(payloadCallbackPair.payload)) { break; } TradfriCoapClient.this.put(new TradfriCoapHandler(payloadCallbackPair.callback), payloadCallbackPair.payload, MediaTypeRegistry.TEXT_PLAIN); Thread.sleep(Optional.ofNullable(payloadCallbackPair.delay).orElse(DEFAULT_DELAY_MILLIS)); } catch (InterruptedException e) { logger.debug("commandExecutorThread was interrupted", e); } } }); commandExecutorThread.setDaemon(true); }</code><technical_language>do create a new Thread own? [guidelines](<LINK_0> this is allowed. Please scheduler submit method run immediately. if this is binding Lifx implements a throttle mechanism, offer a general throttling implementation bindings</technical_language>

Target:
public TradfriCoapClient(URI uri) { super(uri); setTimeout(TIMEOUT); logger = LoggerFactory.getLogger(getClass()); commandsQueue = new LinkedList<>(); commandExecutor = () -> { while (true) { try { int delayTime = 0; synchronized (this.commandsQueue) { PayloadCallbackPair payloadCallbackPair = TradfriCoapClient.this.commandsQueue.poll(); if (payloadCallbackPair != null) { logger.debug("Proccessing payload: {}", payloadCallbackPair.payload); TradfriCoapClient.this.put(new TradfriCoapHandler(payloadCallbackPair.callback), payloadCallbackPair.payload, MediaTypeRegistry.TEXT_PLAIN); delayTime = Optional.ofNullable(payloadCallbackPair.delay).orElse(DEFAULT_DELAY_MILLIS); } else { return; } } Thread.sleep(delayTime); } catch (InterruptedException e) { logger.debug("commandExecutorThread was interrupted", e); } } }; job = null; }
Source:
<code><START> public void testNoSuchUserException() throws DotSecurityException, NoSuchUserException, DotInvalidTokenException, SystemException, PortalException, DotDataException { <END> UserManager userManager = getUserManagerThrowingException( new NoSuchUserException("") ); final User user = APILocator.getUserAPI().loadUserById("dotcms.org.1"); final JsonWebTokenService jsonWebTokenService = mock(JsonWebTokenService.class); final UserToken jwtBean = new UserToken(UUID.randomUUID().toString(), "dotcms.org.1", new Date(), 100000, user.getRememberMeToken()); when(jsonWebTokenService.parseToken(eq("token1"))).thenReturn(jwtBean); ResetPasswordResource resetPasswordResource = new ResetPasswordResource(userManager, responseUtil, jsonWebTokenService); Response response = resetPasswordResource.resetPassword(request, resetPasswordForm); RestUtilTest.verifyErrorResponse(response, Response.Status.BAD_REQUEST.getStatusCode(), "please-enter-a-valid-login"); }</code><technical_language>![Codacy](<LINK_0> Issue found: [JUnit tests include assert() fail()](<LINK_1></technical_language>

Target:
public void testNoSuchUserException() throws DotSecurityException, NoSuchUserException, DotInvalidTokenException, DotDataException { UserManager userManager = getUserManagerThrowingException( new NoSuchUserException("") ); final JsonWebTokenService jsonWebTokenService = mock(JsonWebTokenService.class); final UserToken jwtBean = new UserToken.Builder().id(UUIDGenerator.generateUuid()) .subject(DOTCMS_ORG_1).modificationDate(new Date()).expiresDate(100000).build(); when(jsonWebTokenService.parseToken(eq("token1"))).thenReturn(jwtBean); ResetPasswordResource resetPasswordResource = new ResetPasswordResource(userManager, responseUtil, jsonWebTokenService); Response response = resetPasswordResource.resetPassword(request, resetPasswordForm); RestUtilTest.verifyErrorResponse(response, Response.Status.BAD_REQUEST.getStatusCode(), "please-enter-a-valid-login"); }
Source:
<code>public String createPlaceholder(final String path) { if (path == null || path.length() == 0) { try { final FcrepoResponse r = getClient().post(new URI(baseUri), null, null); assertSuccess(r); return uriToPath(r.getLocation().toString()); } catch (FcrepoOperationFailedException | URISyntaxException e) { throw new RuntimeException(e); } } else if (!exists(path)) { createResource(path); return path; <START> } else { <END> return path; } }</code><technical_language>need for else here</technical_language>

Target:
public String createPlaceholder(final String path) { if (path == null || path.length() == 0) { try { final FcrepoResponse r = getClient().post(new URI(baseUri), null, null); assertSuccess(r); return uriToPath(r.getLocation().toString()); } catch (FcrepoOperationFailedException | URISyntaxException e) { throw new RuntimeException(e); } } else if (!exists(path)) { createResource(path); } return path; }
Source:
<code>public void run() { log.info("Starting"); if (setState(State.STARTING) == null) { log.info("StreamThread already shutdown. Not running"); return; } boolean cleanRun = false; try { runLoop(); cleanRun = true; <START> } catch (final StreamsException e) { <END> log.error("Encountered the following Streams exception during processing, " + "this indicates an unrecoverable error and the thread is going to shutdown: ", e); throw e; } catch (final KafkaException e) { log.error("Encountered the following unexpected Kafka exception during processing, " + "this indicates an internal error and thread is going to shutdown:", e); throw e; } catch (final Exception e) { log.error("Encountered the following unexpected exception during processing " + "and the thread is going to shutdown:", e); throw e; } finally { completeShutdown(cleanRun); } }</code><technical_language>Do need distinguish StreamsException KafkaException (StreamsException is a KafkaException fatal)? similar question KafkaException Exception? error messages provide value</technical_language>

Target:
public void run() { log.info("Starting"); if (setState(State.STARTING) == null) { log.info("StreamThread already shutdown. Not running"); return; } boolean cleanRun = false; try { runLoop(); cleanRun = true; } catch (final KafkaException e) { log.error("Encountered the following unexpected Kafka exception during processing, " + "this usually indicate Streams internal errors:", e); throw e; } catch (final Exception e) { log.error("Encountered the following error during processing:", e); throw e; } finally { completeShutdown(cleanRun); } }
Source:
<code>private boolean executeBatch( BoltConnection connection ) { Thread currentThread = Thread.currentThread(); String originalName = currentThread.getName(); <START> String newName = String.format( "%s [%s] ", originalName, connection.remoteAddress(), connector ); <END> currentThread.setName( newName ); try { return connection.processNextBatch(); } finally { currentThread.setName( originalName ); } }</code><technical_language>Pattern match arguments</technical_language>

Target:
private boolean executeBatch( BoltConnection connection ) { Thread currentThread = Thread.currentThread(); String originalName = currentThread.getName(); String newName = String.format( "%s [%s] ", originalName, connection.remoteAddress() ); currentThread.setName( newName ); try { return connection.processNextBatch(); } finally { currentThread.setName( originalName ); } }
Source:
<code>public boolean checkRootBySuAccess() { if (new ShellExecutor().executeCommand(SU_CHECK_COMMAND) != null) { if (Constants.DEBUG_MODE_ENABLED) { <START> Log.d(TAG, "su command enabled"); <END> } return true; } else { return false; } }</code><technical_language>Wrong grammar. log line ideally "su command is enabled"</technical_language>

Target:
public boolean checkRootBySuAccess() { if (new ShellExecutor().executeCommand(SU_CHECK_COMMAND) != null) { if (Constants.DEBUG_MODE_ENABLED) { Log.d(TAG, "su command is enabled"); } return true; } else { return false; } }
Source:
<code>public void appendTest() throws IOException { doAppendTest(new Appender() { @Override public void append(LogSegment segment, ByteBuffer buffer) throws IOException { int writeSize = buffer.remaining(); int written = segment.appendFrom(buffer); assertEquals("Size written did not match size of buffer provided", writeSize, written); } }); doAppendTest(new Appender() { @Override public void append(LogSegment segment, ByteBuffer buffer) throws IOException { int writeSize = buffer.remaining(); segment.appendFrom(Channels.newChannel(new ByteBufferInputStream(buffer)), writeSize); assertFalse("The buffer was not completely written", buffer.hasRemaining()); } }); doAppendTest(new Appender() { @Override public void append(LogSegment segment, ByteBuffer buffer) throws IOException { <START> assumeTrue(Platform.isLinux()); <END> int writeSize = buffer.remaining(); segment.appendFromDirectly(buffer.array(), 0, writeSize); } }); }</code><technical_language>this a if doAppendTest()</technical_language>

Target:
public void appendTest() throws IOException { doAppendTest(new Appender() { @Override public void append(LogSegment segment, ByteBuffer buffer) throws IOException { int writeSize = buffer.remaining(); int written = segment.appendFrom(buffer); assertEquals("Size written did not match size of buffer provided", writeSize, written); } }); doAppendTest(new Appender() { @Override public void append(LogSegment segment, ByteBuffer buffer) throws IOException { int writeSize = buffer.remaining(); segment.appendFrom(Channels.newChannel(new ByteBufferInputStream(buffer)), writeSize); assertFalse("The buffer was not completely written", buffer.hasRemaining()); } }); if (Utils.isLinux()) { doAppendTest(new Appender() { @Override public void append(LogSegment segment, ByteBuffer buffer) throws IOException { int writeSize = buffer.remaining(); segment.appendFromDirectly(buffer.array(), 0, writeSize); } }); } }
Source:
<code>public static void main(String[] args) throws Exception { CommandLine cmdLine = new CommandLine(); OptionSet options = cmdLine.parser().parse(args); Config orgConfig = cmdLine.loadConfig(options); <START> Config config = Util.rewriteConfig(orgConfig); <END> LocalApplicationRunner runner = new LocalApplicationRunner(config); WikipediaApplication app = new WikipediaApplication(); runner.run(app); runner.waitForFinish(); }</code><technical_language>Do need do config rewriting? new configs add? If not, remove it</technical_language>

Target:
public static void main(String[] args) { CommandLine cmdLine = new CommandLine(); OptionSet options = cmdLine.parser().parse(args); Config orgConfig = cmdLine.loadConfig(options); Config config = Util.rewriteConfig(orgConfig); LocalApplicationRunner runner = new LocalApplicationRunner(config); WikipediaApplication app = new WikipediaApplication(); runner.run(app); runner.waitForFinish(); }
Source:
<code>public void testChar() throws NoConnectionsException, IOException, ProcCallException { System.out.println("STARTING test CHAR"); if (isHSQL()) return; <START> <END> Client client = getClient(); ClientResponse cr; VoltTable result; cr = client.callProcedure("P1.insert", 1, "Xin@VoltDB", 1, 1.0, new Timestamp(1000000000000L)); assertEquals(ClientResponse.SUCCESS, cr.getStatus()); result = client.callProcedure("CHAR", 36158, 1).getResults()[0]; assertTrue(result.advanceRow()); assertEquals("贾", result.getString(1)); result = client.callProcedure("CHAR", 37995, 1).getResults()[0]; assertTrue(result.advanceRow()); assertEquals("鑫", result.getString(1)); String voltDB = "VoltDB"; for (int i = 0; i < voltDB.length(); i++) { char ch = voltDB.charAt(i); result = client.callProcedure("CHAR", (int)ch, 1).getResults()[0]; assertTrue(result.advanceRow()); assertEquals(String.valueOf(ch), result.getString(1)); } result = client.callProcedure("CHAR", null, 1).getResults()[0]; assertTrue(result.advanceRow()); assertEquals(null, result.getString(1)); }</code><technical_language>While working this file put braces return. necessary, a good idea</technical_language>

Target:
public void testChar() throws NoConnectionsException, IOException, ProcCallException { System.out.println("STARTING test CHAR"); if (isHSQL()) { return; } Client client = getClient(); ClientResponse cr; VoltTable result; cr = client.callProcedure("P1.insert", 1, "Xin@VoltDB", 1, 1.0, new Timestamp(1000000000000L)); assertEquals(ClientResponse.SUCCESS, cr.getStatus()); result = client.callProcedure("CHAR", 36158, 1).getResults()[0]; assertTrue(result.advanceRow()); assertEquals("贾", result.getString(1)); result = client.callProcedure("CHAR", 37995, 1).getResults()[0]; assertTrue(result.advanceRow()); assertEquals("鑫", result.getString(1)); String voltDB = "VoltDB"; for (int i = 0; i < voltDB.length(); i++) { char ch = voltDB.charAt(i); result = client.callProcedure("CHAR", (int)ch, 1).getResults()[0]; assertTrue(result.advanceRow()); assertEquals(String.valueOf(ch), result.getString(1)); } result = client.callProcedure("CHAR", null, 1).getResults()[0]; assertTrue(result.advanceRow()); assertEquals(null, result.getString(1)); }
Source:
<code>private void saveAccessTokenToSession(AccessToken accessToken) { ServletRequestAttributes attr = (ServletRequestAttributes) RequestContextHolder.currentRequestAttributes(); <START> attr.getRequest().getSession(false).setAttribute(accessToken.applicationIdUri, accessToken); <END> }</code><technical_language>Yes, right</technical_language>

Target:
private void saveAccessTokenToSession(AccessToken accessToken) { ServletRequestAttributes attr = (ServletRequestAttributes) RequestContextHolder.currentRequestAttributes(); attr.getRequest().getSession(false).setAttribute(ACCESS_TOKEN + accessToken.applicationIdUri, accessToken); }
Source:
<code>public void nearbyStationsAddress() throws Exception { <START> nearbyStationsAddress(44826434, -0557312); <END> }</code><technical_language>Literals starting 0 interpreted octal. this is want do</technical_language>

Target:
public void nearbyStationsAddress() throws Exception { nearbyStationsAddress(44826434, -557312); }
Source:
<code>public List<OpenRevision> getDocWithOpenRevisions(String id, Collection<String> revisions, Collection<String> attsSince, boolean pullAttachmentsInline) { Misc.checkNotNullOrEmpty(id, "id"); <START> Misc.checkArgument(revisions.size() > 0, "Need at lease one open revision"); <END> Map<String, Object> options = new HashMap<String, Object>(); options.put("revs", true); if (pullAttachmentsInline) { options.put("attachments", true); if (attsSince != null) { options.put("atts_since", jsonHelper.toJson(attsSince)); } } else { options.put("attachments", false); options.put("att_encoding_info", true); } options.put("open_revs", jsonHelper.toJson(revisions)); return this.getDocument(id, options, new TypeReference<List<OpenRevision>>() { }); }</code><technical_language>While correct error message</technical_language>

Target:
public List<OpenRevision> getDocWithOpenRevisions(String id, Collection<String> revisions, Collection<String> attsSince, boolean pullAttachmentsInline) { Misc.checkNotNullOrEmpty(id, "id"); Misc.checkArgument(revisions.size() > 0, "Need at least one open revision"); Map<String, Object> options = new HashMap<String, Object>(); options.put("revs", true); if (pullAttachmentsInline) { options.put("attachments", true); if (attsSince != null) { options.put("atts_since", jsonHelper.toJson(attsSince)); } } else { options.put("attachments", false); options.put("att_encoding_info", true); } options.put("open_revs", jsonHelper.toJson(revisions)); return this.getDocument(id, options, new TypeReference<List<OpenRevision>>() { }); }
Source:
<code>public DockerSlave provision(StreamTaskListener listener) throws IOException, Descriptor.FormException, DockerException { PrintStream logger = listener.getLogger(); logger.println("Launching " + image ); Node.Mode mode = Node.Mode.NORMAL; <START> RetentionStrategy retentionStrategy = new CloudRetentionStrategy(idleTerminationMinutes()); <END> List<? extends NodeProperty<?>> nodeProperties = new ArrayList(); InspectContainerResponse containerInspectResponse = provisionNew(); String containerId = containerInspectResponse.getId(); ComputerLauncher launcher = new DockerComputerLauncher(this, containerInspectResponse); String nodeDescription = "Docker Node [" + image + " on "; try { nodeDescription += getParent().getDisplayName(); } catch(Exception ex) { nodeDescription += "???"; } nodeDescription += "]"; String slaveName = containerId.substring(0,12); try { slaveName = slaveName + "@" + getParent().getDisplayName(); } catch(Exception ex) { LOGGER.warning("Error fetching name of cloud"); } return new DockerSlave(this, containerId, slaveName, nodeDescription, remoteFs, numExecutors, mode, memoryLimit, cpuShares, labelString, launcher, retentionStrategy, nodeProperties); }</code><technical_language>Please of CloudRetentionStrategy optional, eg. multiple executors configured</technical_language>

Target:
public DockerSlave provision(StreamTaskListener listener) throws IOException, Descriptor.FormException, DockerException { PrintStream logger = listener.getLogger(); logger.println("Launching " + image ); Node.Mode mode = Node.Mode.NORMAL; RetentionStrategy retentionStrategy = null; if (numExecutors == 1) { retentionStrategy = new OnceRetentionStrategy(idleTerminationMinutes()); } else { retentionStrategy = new CloudRetentionStrategy(idleTerminationMinutes()); } List<? extends NodeProperty<?>> nodeProperties = new ArrayList(); InspectContainerResponse containerInspectResponse = provisionNew(); String containerId = containerInspectResponse.getId(); ComputerLauncher launcher = new DockerComputerLauncher(this, containerInspectResponse); String nodeDescription = "Docker Node [" + image + " on "; try { nodeDescription += getParent().getDisplayName(); } catch(Exception ex) { nodeDescription += "???"; } nodeDescription += "]"; String slaveName = containerId.substring(0,12); try { slaveName = slaveName + "@" + getParent().getDisplayName(); } catch(Exception ex) { LOGGER.warning("Error fetching name of cloud"); } return new DockerSlave(this, containerId, slaveName, nodeDescription, remoteFs, numExecutors, mode, memoryLimit, cpuShares, labelString, launcher, retentionStrategy, nodeProperties); }
Source:
<code>public Renderable compile(Class<?> page, final Template template) { Renderable renderable = new Renderable() { @Override public void render(Object bound, Respond respond) { HttpServletRequest request = httpServletRequestProvider.get(); HttpServletResponse response = httpServletResponseProvider.get(); RequestDispatcher requestDispatcher = request.getRequestDispatcher(template.getName()); try { requestDispatcher.include(request, response); } catch (ServletException e) { <START> e.printStackTrace(); <END> throw new RuntimeException("Could not include the response for path=" + template.getName(), e); } catch (IOException e) { e.printStackTrace(); throw new RuntimeException("Could not include the response for path=" + template.getName(), e); } } @Override public <T extends Renderable> Set<T> collect(Class<T> clazz) { throw new IllegalStateException( "The collect method should not be called while rendering a JSP template."); } }; return renderable; }</code><technical_language>plz remove printStackTrace? I dont printing in SB, is done logging</technical_language>

Target:
public Renderable compile(Class<?> page, final Template template) { Renderable renderable = new Renderable() { @Override public void render(Object bound, Respond respond) { HttpServletRequest request = httpServletRequestProvider.get(); HttpServletResponse response = httpServletResponseProvider.get(); RequestDispatcher requestDispatcher = request.getRequestDispatcher(template.getName()); request.setAttribute("pageFlow", bound); try { requestDispatcher.include(request, response); } catch (ServletException e) { throw new RuntimeException("Could not include the JSP response for path=" + template.getName(), e); } catch (IOException e) { throw new RuntimeException("Could not include the JSP response for path=" + template.getName(), e); } } @Override public <T extends Renderable> Set<T> collect(Class<T> clazz) { throw new IllegalStateException( "The collect method should not be called while rendering a JSP template."); } }; return renderable; }
Source:
<code>public RestRequest continueProcessing(RestRequest request, RestChannel channel) throws Exception { try { <START> if (enabled && threadContext.getTransient(OPENSHIFT_REQUEST_CONTEXT) != null) { <END> OpenshiftRequestContext requestContext = threadContext.getTransient(OPENSHIFT_REQUEST_CONTEXT); request = utils.modifyRequest(request, requestContext, channel); if (requestContext != OpenshiftRequestContext.EMPTY) { utils.logRequest(request); final String kbnVersion = getKibanaVersion(request); kibanaSeed.setDashboards(requestContext, kbnVersion, cdmProjectPrefix); aclManager.syncAcl(requestContext); } } } catch (Exception e) { LOGGER.error("Error handling request", e); } return request; }</code><technical_language>side question, do need check for enabled anymore? deprecate feature</technical_language>

Target:
public RestRequest continueProcessing(RestRequest request, RestChannel channel) throws Exception { try { if (threadContext.getTransient(OPENSHIFT_REQUEST_CONTEXT) != null) { OpenshiftRequestContext requestContext = threadContext.getTransient(OPENSHIFT_REQUEST_CONTEXT); request = utils.modifyRequest(request, requestContext, channel); if (requestContext != OpenshiftRequestContext.EMPTY) { utils.logRequest(request); final String kbnVersion = getKibanaVersion(request); kibanaSeed.setDashboards(requestContext, kbnVersion, cdmProjectPrefix); aclManager.syncAcl(requestContext); } } } catch (Exception e) { LOGGER.error("Error handling request", e); } return request; }
Source:
<code>void testDoubleSplitAndMerge() throws Exception { tokenStore.initializeTokenSegments(testSubject.getName(), 1); List<EventMessage<?>> handledEvents = new CopyOnWriteArrayList<>(); when(mockHandler.handle(any())).thenAnswer(i -> handledEvents.add(i.getArgument(0))); publishEvents(10); testSubject.start(); waitForActiveThreads(1); assertWithin( 50, TimeUnit.MILLISECONDS, () -> assertTrue(testSubject.splitSegment(0).join(), "Expected split to succeed") ); waitForActiveThreads(1); assertWithin( 50, TimeUnit.MILLISECONDS, () -> assertTrue(testSubject.splitSegment(0).join(), "Expected split to succeed") ); waitForActiveThreads(1); assertArrayEquals(new int[]{0, 1, 2}, tokenStore.fetchSegments(testSubject.getName())); publishEvents(20); waitForProcessingStatus(0, EventTrackerStatus::isCaughtUp); assertFalse(testSubject.processingStatus().get(0).isMerging()); <START> assertTrue(testSubject.mergeSegment(0).join(), "Expected merge to succeed"); <END> assertArrayEquals(new int[]{0, 1}, tokenStore.fetchSegments(testSubject.getName())); publishEvents(10); waitForSegmentStart(0); waitForProcessingStatus(0, est -> est.getSegment().getMask() == 1 && est.isCaughtUp()); assertTrue(testSubject.mergeSegment(0).join(), "Expected merge to succeed"); assertArrayEquals(new int[]{0}, tokenStore.fetchSegments(testSubject.getName())); assertWithin(3, TimeUnit.SECONDS, () -> assertEquals(40, handledEvents.size())); }</code><technical_language>check this mergeSegment call status isMerging returns true</technical_language>

Target:
void testDoubleSplitAndMerge() throws Exception { tokenStore.initializeTokenSegments(testSubject.getName(), 1); List<EventMessage<?>> handledEvents = new CopyOnWriteArrayList<>(); int segmentId = 0; when(mockHandler.handle(any())).thenAnswer(i -> handledEvents.add(i.getArgument(0))); publishEvents(10); testSubject.start(); waitForActiveThreads(1); assertWithin( 50, TimeUnit.MILLISECONDS, () -> assertTrue(testSubject.splitSegment(segmentId).join(), "Expected split to succeed") ); waitForActiveThreads(1); assertWithin( 50, TimeUnit.MILLISECONDS, () -> assertTrue(testSubject.splitSegment(segmentId).join(), "Expected split to succeed") ); waitForActiveThreads(1); assertArrayEquals(new int[]{0, 1, 2}, tokenStore.fetchSegments(testSubject.getName())); publishEvents(20); waitForProcessingStatus(segmentId, EventTrackerStatus::isCaughtUp); assertFalse(testSubject.processingStatus().get(segmentId).isMerging()); assertTrue(testSubject.mergeSegment(segmentId).join(), "Expected merge to succeed"); assertArrayEquals(new int[]{0, 1}, tokenStore.fetchSegments(testSubject.getName())); publishEvents(10); waitForSegmentStart(segmentId); waitForProcessingStatus(segmentId, est -> est.getSegment().getMask() == 1 && est.isCaughtUp()); assertTrue(testSubject.mergeSegment(segmentId).join(), "Expected merge to succeed"); assertArrayEquals(new int[]{0}, tokenStore.fetchSegments(testSubject.getName())); assertWithin(3, TimeUnit.SECONDS, () -> assertEquals(40, handledEvents.size())); }
Source:
<code>public void setWasVillager(boolean value) { <START> villager = value; <END> }</code><technical_language>Store this in datatable Add a DefaultedKey in VanillaData</technical_language>

Target:
public void setWasVillager(boolean value) { getHolder().getData().put(VanillaData.WAS_VILLAGER, value); }
Source:
<code>public void testCreateScalingPolicyFail() throws IOException, InterruptedException { MockWebServer server = mockOpenStackServer(); server.enqueue(addCommonHeaders(new MockResponse().setBody(stringFromResource("/access.json")))); server.enqueue(addCommonHeaders(new MockResponse().setResponseCode(404).setBody(stringFromResource("/autoscale_policy_create_response.json")))); try { AutoscaleApi autoscaleApi = api(server.getUrl("/").toString(), "rackspace-autoscale", overrides); PolicyApi api = autoscaleApi.getPolicyApiForZoneAndGroup("DFW", "groupId1"); List<ScalingPolicy> scalingPolicies = Lists.newArrayList(); ScalingPolicy scalingPolicy = ScalingPolicy.builder() .cooldown(1800) .type(ScalingPolicyType.WEBHOOK) .name("scale up by one server") .targetType(ScalingPolicyTargetType.INCREMENTAL) .target("1") .build(); scalingPolicies.add(scalingPolicy); FluentIterable<ScalingPolicyResponse> scalingPolicyResponse = api.create(scalingPolicies); assertAuthentication(server); assertRequest(server.takeRequest(), "POST", "/v1.0/888888/groups/groupId1/policies", "/autoscale_policy_create_request.json"); <START> assertTrue(scalingPolicyResponse.size() == 0); <END> } finally { server.shutdown(); } }</code><technical_language>scalingPolicyResponse.isEmpty(), "Expected empty response was: " + scalingPolicyResponse, that</technical_language>

Target:
public void testCreateScalingPolicyFail() throws IOException, InterruptedException { MockWebServer server = mockOpenStackServer(); server.enqueue(addCommonHeaders(new MockResponse().setBody(stringFromResource("/access.json")))); server.enqueue(addCommonHeaders(new MockResponse().setResponseCode(404).setBody(stringFromResource("/autoscale_policy_create_response.json")))); try { AutoscaleApi autoscaleApi = api(server.getUrl("/").toString(), "rackspace-autoscale", overrides); PolicyApi api = autoscaleApi.getPolicyApiForZoneAndGroup("DFW", "groupId1"); List<ScalingPolicy> scalingPolicies = Lists.newArrayList(); ScalingPolicy scalingPolicy = ScalingPolicy.builder() .cooldown(1800) .type(ScalingPolicyType.WEBHOOK) .name("scale up by one server") .targetType(ScalingPolicyTargetType.INCREMENTAL) .target("1") .build(); scalingPolicies.add(scalingPolicy); FluentIterable<ScalingPolicyResponse> scalingPolicyResponse = api.create(scalingPolicies); assertAuthentication(server); assertRequest(server.takeRequest(), "POST", "/v1.0/888888/groups/groupId1/policies", "/autoscale_policy_create_request.json"); assertTrue(scalingPolicyResponse.isEmpty(), "Expected no policy response, but was: " + scalingPolicyResponse); } finally { server.shutdown(); } }
Source:
<code>protected void multiInternal(MultiOperationRecord request, MultiCallback cb, Object ctx) throws IllegalArgumentException { RequestHeader h = new RequestHeader(); switch (request.getOpKind()) { case TRANSACTION: h.setType(ZooDefs.OpCode.multi); break; case READ: h.setType(ZooDefs.OpCode.multiRead); break; default: <START> throw new IllegalArgumentException("Invalid kind of op"); <END> } MultiResponse response = new MultiResponse(); cnxn.queuePacket(h, new ReplyHeader(), request, response, cb, null, null, ctx, null); }</code><technical_language>Please rephrase: "Unsupported OpKind: " + request.getOpKind() (or string formatter)</technical_language>

Target:
protected void multiInternal(MultiOperationRecord request, MultiCallback cb, Object ctx) throws IllegalArgumentException { RequestHeader h = new RequestHeader(); switch (request.getOpKind()) { case TRANSACTION: h.setType(ZooDefs.OpCode.multi); break; case READ: h.setType(ZooDefs.OpCode.multiRead); break; default: throw new IllegalArgumentException("Unsupported OpKind: " + request.getOpKind()); } MultiResponse response = new MultiResponse(); cnxn.queuePacket(h, new ReplyHeader(), request, response, cb, null, null, ctx, null); }
Source:
<code>public void testParseValidator() { String type = "parse"; Cli<?> parser = Cli.builder("validator") .withCommand(DruidJsonValidator.class) .build(); Object command = parser.parse( "validator", "-f", "simple_test_data_record_parser.json", <START> "-r", "simple_test_data.tsv", <END> "-t", type ); Assert.assertNotNull(command); DruidJsonValidator druidJsonValidator = (DruidJsonValidator) command; druidJsonValidator.run(); }</code><technical_language>cut data size small enough explicit string in for supposed return</technical_language>

Target:
public void testParseValidator() { String type = "parse"; Cli<?> parser = Cli.builder("validator") .withCommand(DruidJsonValidator.class) .build(); Object command = parser.parse( "validator", "-f", "simple_test_data_record_parser.json", "-r", "simple_test_data.tsv", "-t", type ); Assert.assertNotNull(command); Writer writer = new StringWriter() { @Override public void write(String str) { super.write(str + '\n'); } }; DruidJsonValidator druidJsonValidator = (DruidJsonValidator) command; druidJsonValidator.setLogWriter(writer); druidJsonValidator.run(); String expected = "loading parse spec from resource 'simple_test_data_record_parser.json'\n" + "loading data from resource 'simple_test_data.tsv'\n" + "2014-10-20T00:00:00.000Z\tproduct_1\n"; Assert.assertEquals(expected, writer.toString()); }
Source:
<code>static ServiceAccountCredentials fromJson( Map<String, Object> json, HttpTransportFactory transportFactory) throws IOException { String clientId = (String) json.get("client_id"); String clientEmail = (String) json.get("client_email"); String privateKeyPkcs8 = (String) json.get("private_key"); String privateKeyId = (String) json.get("private_key_id"); String projectId = (String) json.get("project_id"); String tokenServerUriStringFromCreds = (String) json.get("token_uri"); <START> String quotaProject = (String) json.get("quota_project_id"); <END> URI tokenServerUriFromCreds = null; try { if (tokenServerUriStringFromCreds != null) { tokenServerUriFromCreds = new URI(tokenServerUriStringFromCreds); } } catch (URISyntaxException e) { throw new IOException("Token server URI specified in 'token_uri' could not be parsed."); } if (clientId == null || clientEmail == null || privateKeyPkcs8 == null || privateKeyId == null) { throw new IOException( "Error reading service account credential from JSON, " + "expecting 'client_id', 'client_email', 'private_key' and 'private_key_id'."); } return fromPkcs8( clientId, clientEmail, privateKeyPkcs8, privateKeyId, null, transportFactory, tokenServerUriFromCreds, null, projectId, quotaProject); }</code><technical_language>suggestion String quotaProjectId = (String) json.get("quota_project_id");</technical_language>

Target:
static ServiceAccountCredentials fromJson( Map<String, Object> json, HttpTransportFactory transportFactory) throws IOException { String clientId = (String) json.get("client_id"); String clientEmail = (String) json.get("client_email"); String privateKeyPkcs8 = (String) json.get("private_key"); String privateKeyId = (String) json.get("private_key_id"); String projectId = (String) json.get("project_id"); String tokenServerUriStringFromCreds = (String) json.get("token_uri"); String quotaProjectId = (String) json.get("quota_project_id"); URI tokenServerUriFromCreds = null; try { if (tokenServerUriStringFromCreds != null) { tokenServerUriFromCreds = new URI(tokenServerUriStringFromCreds); } } catch (URISyntaxException e) { throw new IOException("Token server URI specified in 'token_uri' could not be parsed."); } if (clientId == null || clientEmail == null || privateKeyPkcs8 == null || privateKeyId == null) { throw new IOException( "Error reading service account credential from JSON, " + "expecting 'client_id', 'client_email', 'private_key' and 'private_key_id'."); } return fromPkcs8( clientId, clientEmail, privateKeyPkcs8, privateKeyId, null, transportFactory, tokenServerUriFromCreds, null, projectId, quotaProjectId); }
Source:
<code>public void onNegativeClicked(@NonNull String instanceTag) { switch (instanceTag) { case TAG_ADD_SITE_ICON_DIALOG: break; case TAG_CHANGE_SITE_ICON_DIALOG: AnalyticsTracker.track(Stat.MY_SITE_ICON_REMOVED); showSiteIconProgressBar(true); mSiteSettings.setSiteIconMediaId(0); mSiteSettings.saveSettings(); break; case TAG_QUICK_START_DIALOG: <START> AnalyticsTracker.track(AnalyticsTracker.Stat.QUICK_START_REQUEST_NEGATIVE_TAPPED); <END> break; default: AppLog.e(T.EDITOR, "Dialog instanceTag is not recognized"); throw new UnsupportedOperationException("Dialog instanceTag is not recognized"); } }</code><technical_language>remove unnecessary AnalyticsTracker qualification AnalyticsTracker.Stat.QUICK_START_REQUEST_NEGATIVE_TAPPED produce AnalyticsTracker.track(Stat.QUICK_START_REQUEST_NEGATIVE_TAPPED); for simplicity</technical_language>

Target:
public void onNegativeClicked(@NonNull String instanceTag) { switch (instanceTag) { case TAG_ADD_SITE_ICON_DIALOG: break; case TAG_CHANGE_SITE_ICON_DIALOG: AnalyticsTracker.track(Stat.MY_SITE_ICON_REMOVED); showSiteIconProgressBar(true); mSiteSettings.setSiteIconMediaId(0); mSiteSettings.saveSettings(); break; case TAG_QUICK_START_DIALOG: AnalyticsTracker.track(Stat.QUICK_START_REQUEST_DIALOG_NEGATIVE_TAPPED); break; default: AppLog.e(T.EDITOR, "Dialog instanceTag is not recognized"); throw new UnsupportedOperationException("Dialog instanceTag is not recognized"); } }
Source:
<code>public ReadRowsRequest getRequest() { <START> if (request.get().getTableName().isEmpty()) { <END> BigtableInstanceName bigtableInstanceName = new BigtableInstanceName(getProjectId(), getInstanceId()); String fullTableName = bigtableInstanceName.toTableNameStr(getTableId()); request = StaticValueProvider.of(request.get().toBuilder().setTableName(fullTableName).build()); } return request.get(); }</code><technical_language>Please move this logic constructor request final</technical_language>

Target:
public ReadRowsRequest getRequest() { return request.get(); }
Source:
<code>public Connection getConnection() { Connection conn = null; try { <START> conn= DriverManager.getConnection(DB_URL, USER, PASSWORD); <END> } catch (SQLException e) { e.printStackTrace(); } return conn; }</code><technical_language>need formatting</technical_language>

Target:
public Connection getConnection() throws SQLException { return DriverManager.getConnection(DB_URL, USER, PASSWORD); }
Source:
<code>public static void configureFetchNotes(RemoteConfig remoteConfig) { String notesRef = Constants.R_NOTES + "*"; List<RefSpec> fetchRefSpecs = remoteConfig.getFetchRefSpecs(); for (RefSpec refSpec : fetchRefSpecs) { <START> if (refSpec.matchSource(notesRef)) <END> return; } remoteConfig.addFetchRefSpec(new RefSpec(notesRef + ":" + notesRef)); }</code><technical_language>put braces if block please</technical_language>

Target:
public static void configureFetchNotes(RemoteConfig remoteConfig) { String notesRef = Constants.R_NOTES + "*"; List<RefSpec> fetchRefSpecs = remoteConfig.getFetchRefSpecs(); for (RefSpec refSpec : fetchRefSpecs) { if (refSpec.matchSource(notesRef)) { return; } } remoteConfig.addFetchRefSpec(new RefSpec(notesRef + ":" + notesRef)); }
Source:
<code>private void updateAddtionClusterFeatureList(Set<AdditionalClusterFeature> featuresAvailable, Set<AdditionalClusterFeature> featuresEnabled) { List<AdditionalClusterFeature> features = new ArrayList<>(); List<AdditionalClusterFeature> selectedFeatures = new ArrayList<>(); for (AdditionalClusterFeature feature : featuresAvailable) { features.add(feature); if (featuresEnabled.contains(feature)) { selectedFeatures.add(feature); } } List<List<AdditionalClusterFeature>> <START> listOfFeatures = <END> new ArrayList<>(); listOfFeatures.add(features); getAdditionalClusterFeatures().setItems(listOfFeatures, selectedFeatures); }</code><technical_language>clusterFeatureList</technical_language>

Target:
private void updateAddtionClusterFeatureList(Set<AdditionalClusterFeature> featuresAvailable, Set<AdditionalClusterFeature> featuresEnabled) { List<AdditionalClusterFeature> features = new ArrayList<>(); List<AdditionalClusterFeature> selectedFeatures = new ArrayList<>(); for (AdditionalClusterFeature feature : featuresAvailable) { features.add(feature); if (featuresEnabled.contains(feature)) { selectedFeatures.add(feature); } } List<List<AdditionalClusterFeature>> clusterFeatureList = new ArrayList<>(); clusterFeatureList.add(features); getAdditionalClusterFeatures().setItems(clusterFeatureList, selectedFeatures); }
Source:
<code>public void setUp() throws Exception { mongoConfiguration = new MongoConfiguration(); <START> mongoConnector = new MongoConnector(mongoConfiguration); <END> mongoConnector.connect(); mongoConnector.getDB().dropDatabase(); mongoConnector = new MongoConnector(mongoConfiguration); mongoConnector.connect(); CoreConfiguration coreConfiguration = Main.getConfiguration(null); core = new Main(coreConfiguration); }</code><technical_language>This test a non-default pipeline, integration tests in Core Mongo implementation</technical_language>

Target:
public void setUp() throws Exception { mongoConfiguration = new MongoConfiguration(); mongoConfiguration.setNamespace("hydra-test-FullScaleIT"); mongoConnector = new MongoConnector(mongoConfiguration); mongoConnector.connect(); mongoConnector.getDB().dropDatabase(); mongoConnector = new MongoConnector(mongoConfiguration); mongoConnector.connect(); CoreConfiguration coreConfiguration = new CoreMapConfiguration(mongoConfiguration, new MapConfiguration()); core = new Main(coreConfiguration); }
Source:
<code>protected void actionPerformed(GuiButton button) throws IOException { super.actionPerformed(button); if(button == btnPrevRecipe) { container.nextSubRecipe(-1); } else if(button == btnNextRecipe) { container.nextSubRecipe(1); } else if(button == btnSortName) { container.setSortComparator(new ComparatorName()); } else if(button == btnSortHunger) { container.setSortComparator(new ComparatorHunger(Minecraft.getMinecraft().thePlayer)); } else if(button == btnSortSaturation) { container.setSortComparator(new ComparatorSaturation(Minecraft.getMinecraft().thePlayer)); } <START> for (GuiButton sortButton : this.sortButtons) { <END> if (sortButton instanceof GuiButtonSortCustom && button == sortButton) { container.setSortComparator(((GuiButtonSortCustom)sortButton).getComparator()); } } }</code><technical_language>handling essentially (inbuilt sorting buttons custom sorting buttons) separately, a lot cleaner if inbuilt buttons moved ICustomSortButton interface a single implementation for buttons. CfB register buttons API other mods (that's a lot of things). remove need for instanceof GuiButtonSortCustom GuiButton class then. finally, done that, renamed remove "Custom" part, inbuilt custom then</technical_language>

Target:
protected void actionPerformed(GuiButton button) throws IOException { super.actionPerformed(button); if(button == btnPrevRecipe) { container.nextSubRecipe(-1); } else if(button == btnNextRecipe) { container.nextSubRecipe(1); } for (GuiButton sortButton : this.sortButtons) { if (sortButton instanceof GuiButtonSort && button == sortButton) { container.setSortComparator(((GuiButtonSort)sortButton).getComparator(Minecraft.getMinecraft().thePlayer)); } } }
Source:
<code>public CompletableFuture<Void> visitKeySetCommand(InvocationContext ctx, KeySetCommand command) throws Throwable { if (ctx.isOriginLocal()) { TypeConverter<Object, Object, Object, Object> converter = determineTypeConverter(command.getFlags()); CacheSet<K> set = (CacheSet<K>) ctx.forkInvocationSync(command); return ctx.shortCircuit(new AbstractDelegatingKeyCacheSet<K, V>(Caches.getCacheWithFlags(cache, command), set) { @Override public CloseableIterator<K> iterator() { return new CloseableIteratorMapper<>(super.iterator(), k -> (K) converter.unboxKey(k)); } @Override public CloseableSpliterator<K> spliterator() { return new IteratorAsSpliterator.Builder<>(iterator()) .setEstimateRemaining(super.spliterator().estimateSize()) .setCharacteristics(Spliterator.CONCURRENT | Spliterator.DISTINCT | Spliterator.NONNULL) .get(); } protected CacheStream<K> getStream(boolean parallel) { DistributionManager dm = cache.getAdvancedCache().getDistributionManager(); CloseableSpliterator<K> closeableSpliterator = super.spliterator(); CacheStream<K> stream = new LocalCacheStream<>(new KeyStreamSupplier<>(cache, dm != null ? dm.getConsistentHash() : null, () -> StreamSupport.stream(closeableSpliterator, parallel)), parallel, cache.getAdvancedCache().getComponentRegistry()); <START> stream.onClose(() -> closeableSpliterator.close()); <END> return new TypeConverterStream(stream, converter, entryFactory); } }); } return ctx.continueInvocation(); }</code><technical_language>related this PR :)</technical_language>

Target:
public CompletableFuture<Void> visitKeySetCommand(InvocationContext ctx, KeySetCommand command) throws Throwable { if (ctx.isOriginLocal()) { TypeConverter<Object, Object, Object, Object> converter = determineTypeConverter(command.getFlags()); CacheSet<K> set = (CacheSet<K>) ctx.forkInvocationSync(command); return ctx.shortCircuit(new AbstractDelegatingKeyCacheSet<K, V>(Caches.getCacheWithFlags(cache, command), set) { @Override public CloseableIterator<K> iterator() { return new CloseableIteratorMapper<>(super.iterator(), k -> (K) converter.unboxKey(k)); } @Override public CloseableSpliterator<K> spliterator() { return new IteratorAsSpliterator.Builder<>(iterator()) .setEstimateRemaining(super.spliterator().estimateSize()) .setCharacteristics(Spliterator.CONCURRENT | Spliterator.DISTINCT | Spliterator.NONNULL) .get(); } protected CacheStream<K> getStream(boolean parallel) { DistributionManager dm = cache.getAdvancedCache().getDistributionManager(); CloseableSpliterator<K> closeableSpliterator = super.spliterator(); CacheStream<K> stream = new LocalCacheStream<>(new KeyStreamSupplier<>(cache, dm != null ? dm.getConsistentHash() : null, () -> StreamSupport.stream(closeableSpliterator, parallel)), parallel, cache.getAdvancedCache().getComponentRegistry()); stream.onClose(closeableSpliterator::close); return new TypeConverterStream(stream, converter, entryFactory); } }); } return ctx.continueInvocation(); }