auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public boolean handleExisting(WriteMode writeMode, long lastModForSource, Configuration entries) { boolean exists; long lastModForTarget = -1; if (view != null) { exists = true; } else { try { view = Datasets.load(uri); exists = true; } catch (DatasetNotFoundException e) { exists = false; } } if (exists && view instanceof LastModifiedAccessor) { lastModForTarget = ((LastModifiedAccessor) view).getLastModified(); } if (exists) { switch (writeMode) { case DEFAULT: LOG.error("Dataset view " + view + " already exists!"); throw new CrunchRuntimeException("Dataset view already exists: " + view); case OVERWRITE: LOG.info("Deleting all data from: " + view); boolean deleted = view.deleteAll(); if (!deleted) { LOG.warn("No data was deleted."); } break; case APPEND: LOG.info("Writing to existing dataset view: " + view); break; case CHECKPOINT: boolean ready = true; if (ready && lastModForTarget > lastModForSource) { LOG.info("Re-starting pipeline from checkpoint: " + view); break; } else { if (!ready) { LOG.info("Checkpoint is not ready. Deleting data from existing " + "checkpoint dataset view: " + view); } else { LOG.info("Source data has recent updates. Deleting data from existing " + "checkpoint dataset view: " + view); } deleted = view.deleteAll(); if (!deleted) { LOG.warn("No data was deleted."); } return false; } default: throw new CrunchRuntimeException("Unknown WriteMode: " + writeMode); } } else { LOG.info("Writing to new dataset view: " + view); } return exists; }

Target:
public boolean handleExisting(WriteMode writeMode, long lastModForSource, Configuration entries) { if (view == null) { try { view = Datasets.load(uri); } catch (DatasetNotFoundException e) { LOG.info("Writing to new dataset/view: " + uri); return true; } } boolean exists = !view.isEmpty(); if (exists) { switch (writeMode) { case DEFAULT: LOG.error("Dataset/view " + view + " already exists!"); throw new CrunchRuntimeException("Dataset/view already exists: " + view); case OVERWRITE: LOG.info("Deleting all data from: " + view); delete(view); break; case APPEND: LOG.info("Writing to existing dataset/view: " + view); break; case CHECKPOINT: boolean ready = true; long lastModForTarget = -1; if (view instanceof LastModifiedAccessor) { lastModForTarget = ((LastModifiedAccessor) view).getLastModified(); } if (ready && lastModForTarget > lastModForSource) { LOG.info("Re-starting pipeline from checkpoint dataset/view: " + view); break; } else { if (!ready) { LOG.info("Checkpoint is not ready. Deleting data from existing " + "checkpoint dataset/view: " + view); } else { LOG.info("Source data has recent updates. Deleting data from existing " + "checkpoint dataset/view: " + view); } delete(view); return false; } default: throw new CrunchRuntimeException("Unknown WriteMode: " + writeMode); } } else { LOG.info("Writing to empty dataset/view: " + view); } return exists; }
Source:
private Set<BucketRegion> setupBucketRegions( PartitionedRegionDataStore partitionedRegionDataStore, BucketAdvisor bucketAdvisor) { final int numBuckets = 2; HashSet<BucketRegion> bucketRegions = new HashSet<>(); for (int i = 0; i < numBuckets; i++) { BucketRegion bucketRegion = mock(BucketRegion.class); when(bucketRegion.getBucketAdvisor()).thenReturn(bucketAdvisor); when(bucketRegion.size()).thenReturn(1); when(bucketRegion.getId()).thenReturn(i); bucketRegions.add(bucketRegion); } when(partitionedRegionDataStore.getAllLocalBucketRegions()).thenReturn(bucketRegions); when(partitionedRegionDataStore.getAllLocalPrimaryBucketRegions()).thenReturn(bucketRegions); return bucketRegions; }

Target:
private Set<BucketRegion> setupBucketRegions( PartitionedRegionDataStore partitionedRegionDataStore, BucketAdvisor bucketAdvisor) { final int numBuckets = 2; Set<BucketRegion> bucketRegions = new HashSet<>(); for (int i = 0; i < numBuckets; i++) { BucketRegion bucketRegion = mock(BucketRegion.class); when(bucketRegion.getBucketAdvisor()).thenReturn(bucketAdvisor); when(bucketRegion.size()).thenReturn(1); when(bucketRegion.getId()).thenReturn(i); bucketRegions.add(bucketRegion); } when(partitionedRegionDataStore.getAllLocalBucketRegions()).thenReturn(bucketRegions); when(partitionedRegionDataStore.getAllLocalPrimaryBucketRegions()).thenReturn(bucketRegions); return bucketRegions; }
Source:
public void init() { Path trustStorePath = Paths.get(SecurityConstants.getTruststorePath()); if (!trustStorePath.isAbsolute()) { Path ddfHomePath = Paths.get(System.getProperty("ddf.home")); trustStorePath = Paths.get(ddfHomePath.toString(), trustStorePath.toString()); } try (InputStream inputStream = Files.newInputStream(trustStorePath)) { KeyStore trustStore = SecurityConstants.newTruststore(); trustStore.load(inputStream, SecurityConstants.getTruststorePassword().toCharArray()); merlin = new Merlin(); merlin.setKeyStore(trustStore); } catch (KeyStoreException | IOException | NoSuchAlgorithmException | CertificateException e) { LOGGER.warn("Unable to read merlin properties file. Unable to validate certificates.", e); } }

Target:
public void init() { Path trustStorePath = Paths.get(SecurityConstants.getTruststorePath()); if (!trustStorePath.isAbsolute()) { Path ddfHomePath = Paths.get(System.getProperty("ddf.home")); trustStorePath = Paths.get(ddfHomePath.toString(), trustStorePath.toString()); } try (InputStream inputStream = Files.newInputStream(trustStorePath)) { KeyStore trustStore = SecurityConstants.newTruststore(); trustStore.load(inputStream, SecurityConstants.getTruststorePassword().toCharArray()); merlin = new Merlin(); merlin.setKeyStore(trustStore); } catch (KeyStoreException | IOException | NoSuchAlgorithmException | CertificateException e) { LOGGER.warn("Unable to read merlin properties file. Unable to validate certificates.", e); } Init.init(); }
Source:
private void writeLastModified(String group) { if (readOnlyMode) { throw new ReadOnlyModeException(); } try { byte[] bytes = objectMapper.writeValueAsBytes( Collections.singletonMap("lastModified", System.currentTimeMillis())); ObjectMetadata objectMetadata = new ObjectMetadata(); objectMetadata.setContentLength(bytes.length); objectMetadata.setContentMD5( new String(org.apache.commons.codec.binary.Base64.encodeBase64(DigestUtils.md5(bytes)))); if (serverSideEncryption != null && serverSideEncryption.toString().equalsIgnoreCase("AES256")) { objectMetadata.setSSEAlgorithm(ObjectMetadata.AES_256_SERVER_SIDE_ENCRYPTION); } else if (serverSideEncryption != null && serverSideEncryption.toString().equalsIgnoreCase("AWSKMS")) { objectMetadata.setSSEAlgorithm(SSEAlgorithm.KMS.getAlgorithm()); } amazonS3.putObject( bucket, buildTypedFolder(rootFolder, group) + "/last-modified.json", new ByteArrayInputStream(bytes), objectMetadata); } catch (JsonProcessingException e) { throw new IllegalStateException(e); } }

Target:
private void writeLastModified(String group) { if (readOnlyMode) { throw new ReadOnlyModeException(); } try { byte[] bytes = objectMapper.writeValueAsBytes( Collections.singletonMap("lastModified", System.currentTimeMillis())); ObjectMetadata objectMetadata = new ObjectMetadata(); objectMetadata.setContentLength(bytes.length); objectMetadata.setContentMD5( new String(org.apache.commons.codec.binary.Base64.encodeBase64(DigestUtils.md5(bytes)))); if (serverSideEncryption != null && serverSideEncryption.equals(ServerSideEncryption.AES256)) { objectMetadata.setSSEAlgorithm(ObjectMetadata.AES_256_SERVER_SIDE_ENCRYPTION); } else if (serverSideEncryption != null && serverSideEncryption.equals(ServerSideEncryption.AWSKMS)) { objectMetadata.setSSEAlgorithm(SSEAlgorithm.KMS.getAlgorithm()); } amazonS3.putObject( bucket, buildTypedFolder(rootFolder, group) + "/last-modified.json", new ByteArrayInputStream(bytes), objectMetadata); } catch (JsonProcessingException e) { throw new IllegalStateException(e); } }
Source:
protected HttpConnection httpOpen(String method, URL u) throws IOException { final Proxy proxy = HttpSupport.proxyFor(proxySelector, u); HttpConnection conn = connectionFactory.create(u, proxy); if (!http.sslVerify && "https".equals(u.getProtocol())) { disableSslVerify(conn); } conn.setRequestMethod(method); conn.setUseCaches(false); conn.setRequestProperty(HDR_ACCEPT_ENCODING, ENCODING_GZIP); conn.setRequestProperty(HDR_PRAGMA, "no-cache"); conn.setRequestProperty(HDR_USER_AGENT, userAgent); int timeOut = getTimeout(); if (timeOut != -1) { int effTimeOut = timeOut * 1000; conn.setConnectTimeout(effTimeOut); conn.setReadTimeout(effTimeOut); } if (this.headers != null && !this.headers.isEmpty()) { for (Iterator iterator = this.headers.keySet().iterator(); iterator .hasNext();) { String key = (String) iterator.next(); String value = this.headers.get(key); conn.setRequestProperty(key, value); } } authMethod.configureRequest(conn); return conn; }

Target:
protected HttpConnection httpOpen(String method, URL u) throws IOException { final Proxy proxy = HttpSupport.proxyFor(proxySelector, u); HttpConnection conn = connectionFactory.create(u, proxy); if (!http.sslVerify && "https".equals(u.getProtocol())) { disableSslVerify(conn); } conn.setRequestMethod(method); conn.setUseCaches(false); conn.setRequestProperty(HDR_ACCEPT_ENCODING, ENCODING_GZIP); conn.setRequestProperty(HDR_PRAGMA, "no-cache"); conn.setRequestProperty(HDR_USER_AGENT, userAgent); int timeOut = getTimeout(); if (timeOut != -1) { int effTimeOut = timeOut * 1000; conn.setConnectTimeout(effTimeOut); conn.setReadTimeout(effTimeOut); } if (this.headers != null && !this.headers.isEmpty()) { for (Map.Entry<String, String> entry : this.headers.entrySet()) { conn.setRequestProperty(entry.getKey(), entry.getValue()); } } authMethod.configureRequest(conn); return conn; }
Source:
private long readLong() { try { long val = dataInput.readLong(); totalBytesRead += Long.SIZE >> 3; return val; } catch (IOException e) { throw new ClientConnectionException(e); } }

Target:
private long readLong() { try { long val = dataInput.readLong(); totalBytesRead += Long.BYTES; return val; } catch (IOException e) { throw handleIOError(e); } }
Source:
public boolean isExpired(Date invocationDate) { if (getExpires() != null) { Date currentInvocationDate = invocationDate == null ? new Date() : invocationDate; return getExpires().before(currentInvocationDate); } return false; }

Target:
public boolean isExpired(Date invocationDate) { if (getExpires() != null) { return getExpires().before(invocationDate == null ? new Date() : invocationDate); } return false; }
Source:
protected void validateJob() { if( validateJob != null ) { validateJob.cancel(); } validateJob = new Job("Validate Wizard"){ protected IStatus run(IProgressMonitor monitor) { Display.getDefault().asyncExec(new Runnable(){ @Override public void run() { validate(); }}); return Status.OK_STATUS; } }; validateJob.setSystem(true); validateJob.schedule(1200); }

Target:
protected void validateJob() { if (validateJob != null) { validateJob.cancel(); } setComplete(false); handle.update(); validateJob = new Job("Validate JMX Connection Wizard") { protected IStatus run(IProgressMonitor monitor) { Display.getDefault().asyncExec(new Runnable() { @Override public void run() { validate(); } }); return Status.OK_STATUS; } }; validateJob.setSystem(true); validateJob.schedule(750); }
Source:
private void saveWorkflowTask(final WorkflowProcessor processor) throws DotDataException { WorkflowTask task = processor.getTask(); if (null == task) { task = new WorkflowTask(); } Role r = roleAPI.getUserRole(processor.getUser()); if (task.isNew()) { DotPreconditions.isTrue(UtilMethods.isSet(processor.getContentlet().getIdentifier()), () -> getWorkflowContentNeedsBeSaveMessage(processor.getUser()), DotWorkflowException.class); task.setCreatedBy(r.getId()); task.setWebasset(processor.getContentlet().getIdentifier()); task.setLanguageId(processor.getContentlet().getLanguageId()); if (processor.getWorkflowMessage() != null) { task.setDescription(processor.getWorkflowMessage()); } } task.setTitle(processor.getContentlet().getTitle()); task.setModDate(new Date()); if (processor.getNextAssign() != null) { task.setAssignedTo(processor.getNextAssign().getId()); } task.setStatus(processor.getNextStep().getId()); saveWorkflowTask(task, processor); if (processor.getWorkflowMessage() != null) { WorkflowComment comment = new WorkflowComment(); comment.setComment(processor.getWorkflowMessage()); comment.setWorkflowtaskId(task.getId()); comment.setCreationDate(new Date()); comment.setPostedBy(r.getId()); saveComment(comment); } }

Target:
private void saveWorkflowTask(final WorkflowProcessor processor) throws DotDataException { WorkflowTask task = processor.getTask(); if (null == task) { task = new WorkflowTask(); } final Role r = roleAPI.getUserRole(processor.getUser()); if (task.isNew()) { DotPreconditions.isTrue(UtilMethods.isSet(processor.getContentlet().getIdentifier()), () -> getWorkflowContentNeedsBeSaveMessage(processor.getUser()), DotWorkflowException.class); task.setCreatedBy(r.getId()); task.setWebasset(processor.getContentlet().getIdentifier()); task.setLanguageId(processor.getContentlet().getLanguageId()); if (processor.getWorkflowMessage() != null) { task.setDescription(processor.getWorkflowMessage()); } } task.setTitle(processor.getContentlet().getTitle()); task.setModDate(new Date()); if (processor.getNextAssign() != null) { task.setAssignedTo(processor.getNextAssign().getId()); } task.setStatus(processor.getNextStep().getId()); saveWorkflowTask(task, processor); if (processor.getWorkflowMessage() != null) { WorkflowComment comment = new WorkflowComment(); comment.setComment(processor.getWorkflowMessage()); comment.setWorkflowtaskId(task.getId()); comment.setCreationDate(new Date()); comment.setPostedBy(r.getId()); saveComment(comment); } }
Source:
void init() { assignColors(); channelTabScrollPaneVBox.setMinWidth(preferencesService.getPreferences().getChatPrefs().getChannelTabScrollPaneWidth()); channelTabScrollPaneVBox.setPrefWidth(preferencesService.getPreferences().getChatPrefs().getChannelTabScrollPaneWidth()); }

Target:
void init() { channelTabScrollPaneVBox.setMinWidth(preferencesService.getPreferences().getChat().getChannelTabScrollPaneWidth()); channelTabScrollPaneVBox.setPrefWidth(preferencesService.getPreferences().getChat().getChannelTabScrollPaneWidth()); addChatColorListener(); }
Source:
public ExclusionListFilter(Iterable<String> excludedUris, Iterable<String> excludedIds) { this.excludedUris = ImmutableSet.copyOf(excludedUris); this.excludedIds = ImmutableSet.copyOf(excludedIds); this.codec = SubstitutionTableNumberCodec.lowerCaseOnly(); }

Target:
private ExclusionListFilter(Iterable<String> excludedUris, Iterable<String> excludedIds) { this.excludedUris = ImmutableSet.copyOf(excludedUris); this.excludedIds = ImmutableSet.copyOf(excludedIds); this.codec = SubstitutionTableNumberCodec.lowerCaseOnly(); }
Source:
public List<LinkAddress> getInternalAddresses() { return mInternalAddressList; }

Target:
public List<LinkAddress> getInternalAddresses() { return Collections.unmodifiableList(mInternalAddressList); }
Source:
public void makeCatalog(TabInfoImpl ti,SchemaDescriptor sd, TransactionController tc,ColumnOrdering[] columnOrder, String version) throws StandardException{ DataDescriptorGenerator ddg=getDataDescriptorGenerator(); Properties heapProperties=new Properties(); heapProperties.setProperty("tableDisplayName", ti.getTableName()); if (version != null) { heapProperties.setProperty("catalogVersion", version); } ti.setHeapConglomerate( createConglomerate( tc, ti.getCatalogRowFactory().makeEmptyRowForLatestVersion(), heapProperties, columnOrder, 100) ); if(ti.getNumberOfIndexes()>0){ bootStrapSystemIndexes(sd,tc,ddg,ti); } addSystemTableToDictionary(ti,sd,tc,ddg); }

Target:
public void makeCatalog(TabInfoImpl ti,SchemaDescriptor sd, TransactionController tc,ColumnOrdering[] columnOrder, String version) throws StandardException{ DataDescriptorGenerator ddg=getDataDescriptorGenerator(); Properties heapProperties=new Properties(); heapProperties.setProperty("tableDisplayName", ti.getTableName()); if (version != null) { heapProperties.setProperty("catalogVersion", version); } ti.setHeapConglomerate( createConglomerate( tc, ti.getCatalogRowFactory().makeEmptyRowForLatestVersion(), heapProperties, columnOrder, Conglomerate.Priority.HIGH) ); if(ti.getNumberOfIndexes()>0){ bootStrapSystemIndexes(sd,tc,ddg,ti); } addSystemTableToDictionary(ti,sd,tc,ddg); }
Source:
private Metacard getWorkspaceMetacard(String queryId) { Filter filter = filterBuilder.allOf(getWorkspaceQueryFilters(queryId)); Query query = new QueryImpl(filter); QueryRequest queryRequest = new QueryRequestImpl(query); Metacard workspaceMetacard = null; try { QueryResponse queryResponse = catalogFramework.query(queryRequest); workspaceMetacard = queryResponse .getResults() .stream() .map(Result::getMetacard) .filter(Objects::nonNull) .findFirst() .orElse(null); } catch (UnsupportedQueryException | SourceUnavailableException | FederationException e) { LOGGER.debug("Error querying for query id: {}.", queryId, e); } return workspaceMetacard; }

Target:
private Metacard getWorkspaceMetacard(String queryId) { Query query = new QueryImpl(getWorkspaceQueryFilters(queryId)); QueryRequest queryRequest = new QueryRequestImpl(query); List<Result> resultList = ResultIterable.resultIterable(catalogFramework::query, queryRequest) .stream() .collect(Collectors.toList()); return resultList .stream() .map(Result::getMetacard) .filter(Objects::nonNull) .findFirst() .orElse(null); }
Source:
private void evalState() { if (done) { txtInteractiveMessages.setText(Localization.get("mult.install.state.done")); this.transplantStyle(txtInteractiveMessages, R.layout.template_text_notification); btnInstallMultimedia.setEnabled(false); return; } String location = editFileLocation.getText().toString(); if ("".equals(location)) { txtInteractiveMessages.setText(Localization.get("mult.install.state.empty")); this.transplantStyle(txtInteractiveMessages, R.layout.template_text_notification); btnInstallMultimedia.setEnabled(false); return; } if (!(location.startsWith("content://") || (new File(location)).exists())) { txtInteractiveMessages.setText(Localization.get("mult.install.state.invalid.path")); this.transplantStyle(txtInteractiveMessages, R.layout.template_text_notification_problem); btnInstallMultimedia.setEnabled(false); } else { txtInteractiveMessages.setText(Localization.get("mult.install.state.ready")); this.transplantStyle(txtInteractiveMessages, R.layout.template_text_notification); btnInstallMultimedia.setEnabled(true); } }

Target:
private void evalState() { if (done) { txtInteractiveMessages.setText(Localization.get("mult.install.state.done")); this.transplantStyle(txtInteractiveMessages, R.layout.template_text_notification); btnInstallMultimedia.setEnabled(false); return; } String location = editFileLocation.getText().toString(); if ("".equals(location)) { txtInteractiveMessages.setText(Localization.get("mult.install.state.empty")); this.transplantStyle(txtInteractiveMessages, R.layout.template_text_notification); btnInstallMultimedia.setEnabled(false); return; } if (!location.startsWith("content://") && !(new File(location)).exists()) { txtInteractiveMessages.setText(Localization.get("mult.install.state.invalid.path")); this.transplantStyle(txtInteractiveMessages, R.layout.template_text_notification_problem); btnInstallMultimedia.setEnabled(false); } else { txtInteractiveMessages.setText(Localization.get("mult.install.state.ready")); this.transplantStyle(txtInteractiveMessages, R.layout.template_text_notification); btnInstallMultimedia.setEnabled(true); } }
Source:
public boolean isAlive() { return this == HostJobStatus.running || this == HostJobStatus.pending; }

Target:
public boolean isAlive() { return this == running || this == pending; }
Source:
public void testWaitForEventsTimesOutIfMasterBusy() { final AtomicBoolean keepSubmittingTasks = new AtomicBoolean(true); final ClusterService clusterService = internalCluster().getInstance(ClusterService.class, internalCluster().getMasterName()); clusterService.submitStateUpdateTask("looping task", new ClusterStateUpdateTask(Priority.LOW) { @Override public ClusterState execute(ClusterState currentState) { return currentState; } @Override public void onFailure(String source, Exception e) { throw new AssertionError(source, e); } @Override public void clusterStateProcessed(String source, ClusterState oldState, ClusterState newState) { if (keepSubmittingTasks.get()) { clusterService.submitStateUpdateTask("looping task", this); } } }); final ClusterHealthResponse clusterHealthResponse = client().admin().cluster().prepareHealth() .setWaitForEvents(Priority.LANGUID) .setTimeout(TimeValue.timeValueSeconds(1)).get(TimeValue.timeValueSeconds(30)); assertTrue(clusterHealthResponse.isTimedOut()); keepSubmittingTasks.set(false); }

Target:
public void testWaitForEventsTimesOutIfMasterBusy() { final AtomicBoolean keepSubmittingTasks = new AtomicBoolean(true); final ClusterService clusterService = internalCluster().getInstance(ClusterService.class, internalCluster().getMasterName()); final PlainActionFuture<Void> completionFuture = new PlainActionFuture<>(); clusterService.submitStateUpdateTask("looping task", new ClusterStateUpdateTask(Priority.LOW) { @Override public ClusterState execute(ClusterState currentState) { return currentState; } @Override public void onFailure(String source, Exception e) { completionFuture.onFailure(e); throw new AssertionError(source, e); } @Override public void clusterStateProcessed(String source, ClusterState oldState, ClusterState newState) { if (keepSubmittingTasks.get()) { clusterService.submitStateUpdateTask("looping task", this); } else { completionFuture.onResponse(null); } } }); try { final ClusterHealthResponse clusterHealthResponse = client().admin().cluster().prepareHealth() .setWaitForEvents(Priority.LANGUID) .setTimeout(TimeValue.timeValueSeconds(1)) .get(TimeValue.timeValueSeconds(30)); assertTrue(clusterHealthResponse.isTimedOut()); } finally { keepSubmittingTasks.set(false); completionFuture.actionGet(TimeValue.timeValueSeconds(30)); } }
Source:
public void loadNextPage() { if (currentPage == 0 && objects.size() == 0 && runningQueries.size() == 0) { loadObjects(0, false); } else { loadObjects(currentPage + 1, false); } }

Target:
public void loadNextPage() { if (objects.size() == 0 && runningQueries.size() == 0) { loadObjects(0, false); } else { loadObjects(currentPage + 1, false); } }
Source:
private Service createService() { return new Service() { @Override public String getId() { return "serviceid"; } }; }

Target:
private Service createService() { return CoreAuthenticationTestUtils.getService("serviceid"); }
Source:
public LightblueHttpClient(LightblueClientConfiguration configuration) { this(configuration, DEFAULT_MAPPER); }

Target:
public LightblueHttpClient(LightblueClientConfiguration configuration) { this(configuration, JSON.getDefaultObjectMapper()); }
Source:
public void test303(Scenario scenario) throws Exception { start(scenario, new RedirectHandler()); Response response = client.newRequest("localhost", connector.getLocalPort()) .scheme(scenario.getScheme()) .path("/303/localhost/done") .timeout(5, TimeUnit.SECONDS) .send(); assertNotNull(response); assertEquals(200, response.getStatus()); assertFalse(response.getHeaders().contains(HttpHeader.LOCATION.asString())); }

Target:
public void test303(Scenario scenario) throws Exception { start(scenario, new RedirectHandler()); Response response = client.newRequest("localhost", connector.getLocalPort()) .scheme(scenario.getScheme()) .path("/303/localhost/done") .timeout(5, TimeUnit.SECONDS) .send(); assertNotNull(response); assertEquals(200, response.getStatus()); assertFalse(response.getHeaders().contains(HttpHeader.LOCATION)); }
Source:
public FeatureTypeStyle transform(MBStyle styleContext, Double minScaleDenominator, Double maxScaleDenominator) { FeatureTypeStyle style = transform(styleContext); for (Rule rule : style.rules()) { if (minScaleDenominator != null) { rule.setMinScaleDenominator(minScaleDenominator); } if (maxScaleDenominator != null) { rule.setMaxScaleDenominator(maxScaleDenominator); } } return style; }

Target:
public FeatureTypeStyle transform(MBStyle styleContext, Double minScaleDenominator, Double maxScaleDenominator) { FeatureTypeStyle style = transform(styleContext); if (style == null) { return null; } for (Rule rule : style.rules()) { if (minScaleDenominator != null) { rule.setMinScaleDenominator(minScaleDenominator); } if (maxScaleDenominator != null) { rule.setMaxScaleDenominator(maxScaleDenominator); } } return style; }
Source:
public Iterable<Edge> getEdges(Direction direction, String label, FetchHints fetchHints, Authorizations authorizations) { getFetchHints().validateHasEdgeFetchHints(direction); return getGraph().getEdges(getEdgeIds(direction, labelToArrayOrNull(label), authorizations), fetchHints, authorizations); }

Target:
public Iterable<Edge> getEdges(Direction direction, String label, FetchHints fetchHints, Authorizations authorizations) { getFetchHints().validateHasEdgeFetchHints(direction, label); return getGraph().getEdges(getEdgeIds(direction, labelToArrayOrNull(label), authorizations), fetchHints, authorizations); }
Source:
private Set<Integer> segmentsToProcess(IteratorSupplier<R> supplier, KeyTrackingConsumer<Object, R> results, Set<Integer> segmentsToProcess, UUID id) { String strId = id == null ? "local" : "identifier " + id; if (!results.lostSegments.isEmpty()) { segmentsToProcess = new HashSet<>(results.lostSegments); results.lostSegments.clear(); log.tracef("Found %s lost segments for %s", segmentsToProcess, strId); } else { supplier.close(); log.tracef("Finished rehash aware operation for %s", strId); } return segmentsToProcess; }

Target:
private Set<Integer> segmentsToProcess(IteratorSupplier<R> supplier, KeyTrackingConsumer<Object, R> results, Set<Integer> segmentsToProcess, UUID id) { String strId = id == null ? "local" : id.toString(); if (!results.lostSegments.isEmpty()) { segmentsToProcess = new HashSet<>(results.lostSegments); results.lostSegments.clear(); log.tracef("Found %s lost segments for %s", segmentsToProcess, strId); } else { supplier.close(); log.tracef("Finished rehash aware operation for %s", strId); } return segmentsToProcess; }
Source:
protected String getAuthenticationMethod(final HttpServletRequest request, final WebApplicationService targetService) { logger.debug("Attempting to extract multifactor authentication method from registered service attribute..."); final RegisteredService registeredService = this.servicesManager.findServiceBy(targetService); if (registeredService == null) { logger.debug("No registered service is found. Delegating to the next argument extractor in the chain..."); return null; } if (!(registeredService instanceof RegisteredServiceWithAttributes)) { logger.debug("Registered service is not capable of defining an mfa attribute. "); return determineDefaultAuthenticationMethod(); } final Map<String, Object> extraAttributes = RegisteredServiceWithAttributes.class.cast(registeredService) .getExtraAttributes(); if (extraAttributes != null && extraAttributes.containsKey("mfa_role")) { logger.debug("Deferring mfa authn method for Principal Attribute Resolver"); return null; } final String authenticationMethod = String.class.cast(extraAttributes.get(this.authenticationMethodAttribute)); if (!StringUtils.hasText(authenticationMethod)) { logger.debug("Registered service does not define authentication method attribute [{}]. ", this.authenticationMethodAttribute); return determineDefaultAuthenticationMethod(); } return authenticationMethod; }

Target:
protected String getAuthenticationMethod(final HttpServletRequest request, final WebApplicationService targetService) { logger.debug("Attempting to extract multifactor authentication method from registered service attribute..."); if (mfaRoleProcessor != null) { final String mfaRolesResult = checkMfaRoles(targetService); if (!StringUtils.isEmpty(mfaRolesResult)) { return mfaRolesResult; } } final RegisteredService registeredService = this.servicesManager.findServiceBy(targetService); if (registeredService == null) { logger.debug("No registered service is found. Delegating to the next argument extractor in the chain..."); return null; } if (!(registeredService instanceof RegisteredServiceWithAttributes)) { logger.debug("Registered service is not capable of defining an mfa attribute. "); return determineDefaultAuthenticationMethod(); } final Map<String, Object> extraAttributes = RegisteredServiceWithAttributes.class.cast(registeredService) .getExtraAttributes(); if (extraAttributes != null && extraAttributes.containsKey("mfa_role")) { logger.debug("Deferring mfa authn method for Principal Attribute Resolver"); return null; } final String authenticationMethod = String.class.cast(extraAttributes.get(this.authenticationMethodAttribute)); if (!StringUtils.hasText(authenticationMethod)) { logger.debug("Registered service does not define authentication method attribute [{}]. ", this.authenticationMethodAttribute); return determineDefaultAuthenticationMethod(); } return authenticationMethod; }
Source:
private static int inversePremultipliedColor(int color, int alpha) { return (255*color + alpha-1) / alpha; }

Target:
static int inversePremultipliedColor(int color, int alpha) { return (255*color + alpha-1) / alpha; }
Source:
private boolean isQueryAnnotationPresentOn(Method method) { Annotation[] annotations = method.getDeclaredAnnotations(); if (annotations.length == 0) { return false; } for (Annotation annotation : annotations) { if (annotation.annotationType().isAnnotationPresent(QueryAnnotation.class)) { return true; } } return false; }

Target:
private boolean isQueryAnnotationPresentOn(Method method) { return AnnotationUtils.findAnnotation(method, QueryAnnotation.class) != null; }
Source:
public void CardinalityOfFilterComparisonSimplification() { MaterializedResult result = computeActual("" + "SELECT cardinality(filter(array_agg(orderkey), x -> x < 3)) = 2 " + "FROM orders " + "WHERE orderkey < 20"); assertEquals(result.getRowCount(), 1); assertEquals(result.getMaterializedRows().get(0).getField(0), true); }

Target:
public void CardinalityOfFilterComparisonSimplification() { MaterializedResult result = computeActual("" + "SELECT cardinality(filter(array_agg(orderkey), x -> x % 3 = 0)) = 1 " + "FROM orders " + "WHERE orderkey < 20"); assertEquals(result.getRowCount(), 1); Assert.assertEquals(result.getMaterializedRows().get(0).getField(0), true); }
Source:
private TaskExecution invokeOnTaskStartup(TaskExecution taskExecution){ TaskExecution listenerTaskExecution = getTaskExecutionCopy(taskExecution); if (this.taskExecutionListeners != null) { try { for (TaskExecutionListener taskExecutionListener : this.taskExecutionListeners) { taskExecutionListener.onTaskStartup(listenerTaskExecution); } } catch (Throwable listenerException) { logger.warn(listenerException); this.listenerFailed = true; this.taskExecution.setErrorMessage(listenerException.getMessage()); this.listenerException = listenerException; throw listenerException; } } return listenerTaskExecution; }

Target:
private TaskExecution invokeOnTaskStartup(TaskExecution taskExecution){ TaskExecution listenerTaskExecution = getTaskExecutionCopy(taskExecution); if (this.taskExecutionListeners != null) { try { for (TaskExecutionListener taskExecutionListener : this.taskExecutionListeners) { taskExecutionListener.onTaskStartup(listenerTaskExecution); } } catch (Throwable currentListenerException) { logger.error(currentListenerException); this.listenerFailed = true; this.taskExecution.setErrorMessage(currentListenerException.getMessage()); this.listenerException = currentListenerException; throw currentListenerException; } } return listenerTaskExecution; }
Source:
protected List<AbstractNode> createChildren() { DetailAST currentChild = detailAst; final List<AbstractNode> result = new ArrayList<>(); while (currentChild != null) { final int index = result.size(); final ElementNode child = new ElementNode(this, this, currentChild, 0, index); result.add(child); currentChild = currentChild.getNextSibling(); } return result; }

Target:
protected List<AbstractNode> createChildren() { return XpathUtil.createChildren(this, this, detailAst); }
Source:
public void visitNode(Tree tree) { MethodInvocationTree methodInvTree = (MethodInvocationTree) tree; MethodTree methodDeclaration = (MethodTree) methodInvTree.symbol().declaration(); if (methodDeclaration == null) { return; } ParametersList formalParameterList = parametersByMethod.computeIfAbsent(methodInvTree.symbol(), m -> new ParametersList(methodDeclaration)); List<IdentifierTree> argumentsList = methodInvTree.arguments().stream().map(this::argumentToIdentifier).collect(Collectors.toList()); if (matchingNames(formalParameterList, argumentsList)) { List<VariableTree> matchingTypesWrongOrder = matchingTypesWrongOrder(formalParameterList, argumentsList); if (!matchingTypesWrongOrder.isEmpty()) { List<JavaFileScannerContext.Location> flow = matchingTypesWrongOrder.stream().map(param -> new JavaFileScannerContext.Location("Formal Parameters", param)) .collect(Collectors.toList()); reportIssue(methodInvTree.arguments(), "Parameters to " + methodInvTree.symbol().name() + " have the same names but not the same order as the method arguments.", flow, null); } } }

Target:
public void visitNode(Tree tree) { MethodInvocationTree methodInvTree = (MethodInvocationTree) tree; MethodTree methodDeclaration = (MethodTree) methodInvTree.symbol().declaration(); if (methodDeclaration == null) { return; } ParametersList formalParameterList = parametersByMethod.computeIfAbsent(methodInvTree.symbol(), m -> new ParametersList(methodDeclaration)); List<IdentifierTree> argumentsList = methodInvTree.arguments().stream().map(this::argumentToIdentifier).collect(Collectors.toList()); if (matchingNames(formalParameterList, argumentsList)) { List<VariableTree> matchingTypesWrongOrder = matchingTypesWrongOrder(formalParameterList, argumentsList); if (!matchingTypesWrongOrder.isEmpty()) { List<JavaFileScannerContext.Location> flow = matchingTypesWrongOrder.stream().map(param -> new JavaFileScannerContext.Location("Misplaced Parameter", param)) .collect(Collectors.toList()); reportIssue(methodInvTree.arguments(), "Parameters to " + methodInvTree.symbol().name() + " have the same names but not the same order as the method arguments.", flow, null); } } }
Source:
public GetRecordsRetrievalStrategy createGetRecordsRetrievalStrategy(@NonNull final ShardInfo shardInfo, @NonNull final MetricsFactory metricsFactory) { return new SynchronousGetRecordsRetrievalStrategy( new KinesisDataFetcher(kinesisClient, shardInfo.streamName().orElse(streamName), shardInfo.shardId(), maxRecords, metricsFactory, kinesisRequestTimeout)); }

Target:
public GetRecordsRetrievalStrategy createGetRecordsRetrievalStrategy(@NonNull final ShardInfo shardInfo, @NonNull final MetricsFactory metricsFactory) { final StreamIdentifier streamIdentifier = shardInfo.streamIdentifierSerOpt().isPresent() ? StreamIdentifier.multiStreamInstance(shardInfo.streamIdentifierSerOpt().get()) : StreamIdentifier.singleStreamInstance(streamName); return new SynchronousGetRecordsRetrievalStrategy( new KinesisDataFetcher(kinesisClient, streamIdentifier, shardInfo.shardId(), maxRecords, metricsFactory, kinesisRequestTimeout)); }
Source:
public Response update(@PathParam("id") long id, AttributeAlias entity) throws SQLException { Context.getPermissionsManager().checkReadonly(getUserId()); if (!Context.getPermissionsManager().isAdmin(getUserId())) { AttributeAlias oldAttrbuteAlias = Context.getAliasesManager().getAttributeAliasById(entity.getId()); if (oldAttrbuteAlias != null && oldAttrbuteAlias.getDeviceId() != entity.getDeviceId()) { Context.getPermissionsManager().checkDevice(getUserId(), oldAttrbuteAlias.getDeviceId()); } Context.getPermissionsManager().checkDevice(getUserId(), entity.getDeviceId()); } Context.getAliasesManager().updateAttributeAlias(entity); return Response.ok(entity).build(); }

Target:
public Response update(@PathParam("id") long id, AttributeAlias entity) throws SQLException { Context.getPermissionsManager().checkReadonly(getUserId()); if (!Context.getPermissionsManager().isAdmin(getUserId())) { AttributeAlias oldEntity = Context.getAliasesManager().getAttributeAlias(entity.getId()); Context.getPermissionsManager().checkDevice(getUserId(), oldEntity.getDeviceId()); Context.getPermissionsManager().checkDevice(getUserId(), entity.getDeviceId()); } Context.getAliasesManager().updateAttributeAlias(entity); return Response.ok(entity).build(); }
Source:
public void testResolvingIgnoreCaseOrderIsUnsupported() { HazelcastSortAccessor hazelcastSortAccessor = new HazelcastSortAccessor(); RevisionSort revisionSort = RevisionSort.asc(); KeyValueQuery<Object> keyValueQuery = new KeyValueQuery<Object>((Sort) revisionSort); Sort.Order[] sortOrderArray = new Sort.Order[4]; Sort.Order sortOrderA = Sort.Order.asc("Cannot resolve nest mates of a latent type description: "); sortOrderArray[0] = sortOrderA; Sort.Order sortOrderB = sortOrderA.ignoreCase(); sortOrderArray[1] = sortOrderB; Sort sort = Sort.by(sortOrderArray); keyValueQuery.setSort(sort); hazelcastSortAccessor.resolve(keyValueQuery); }

Target:
public void testResolvingIgnoreCaseOrderIsUnsupported() { HazelcastSortAccessor hazelcastSortAccessor = new HazelcastSortAccessor(); KeyValueQuery<Object> keyValueQuery = new KeyValueQuery<>(RevisionSort.asc()); Sort.Order sortOrderA = Sort.Order.asc("Cannot resolve nest mates of a latent type description: "); Sort.Order sortOrderB = sortOrderA.ignoreCase(); keyValueQuery.setSort(Sort.by(sortOrderA, sortOrderB)); hazelcastSortAccessor.resolve(keyValueQuery); }
Source:
public String choose(VolumeChooserEnvironment env, String[] options) { final String choice; try { choice = chooser.choose(env, options); if (!(ArrayUtils.contains(options, choice))) { String msg = "The configured volume chooser, '" + chooser.getClass() + "', or one of its delegates returned a volume not in the set of options provided"; log.error(msg); throw new RuntimeException(msg); } } catch (AccumuloException e) { log.error("Failure occurred in the configured chooser.", e); throw new RuntimeException(e); } return choice; }

Target:
public String choose(VolumeChooserEnvironment env, String[] options) { final String choice; choice = chooser.choose(env, options); if (!(ArrayUtils.contains(options, choice))) { String msg = "The configured volume chooser, '" + chooser.getClass() + "', or one of its delegates returned a volume not in the set of options provided"; throw new VolumeChooserException(msg); } return choice; }
Source:
public void testBCFKS() throws CertificateException, NoSuchAlgorithmException, KeyStoreException, IOException { System.out.println("Testing BCFKS..."); Certificate jkscert = generateCertificate(); String filename = "testks.bcfks"; String alias = "alias"; char[] password = "password".toCharArray(); boolean bcfailed = false; try { generateKeyStoreWithKey(filename, "bcfks", alias, password, jkscert); generateKeyStoreWithKey(filename+"b", "bcfks", alias, password, jkscert); generateKeyStoreWithKey(filename+"c", "bcfks", alias, password, jkscert); } catch (Exception e) { bcfailed = true; } Assume.assumeFalse("BC provider not found, skipping BC keystore recognition", bcfailed); KeyStore loadedStore = KeyStoreUtil.loadKeyStore(providerSupplier, null, new FileInputStream(new File(workingDir, filename)), filename, password); Assert.assertNotNull(loadedStore); Certificate loadedCert = loadedStore.getCertificate(alias); Assert.assertEquals(jkscert, loadedCert); }

Target:
public void testBCFKS() throws CertificateException, KeyStoreException, IOException { System.out.println("Testing BCFKS..."); Certificate jkscert = generateCertificate(); String filename = "testks.bcfks"; String alias = "alias"; char[] password = "password".toCharArray(); boolean bcfailed = false; try { generateKeyStoreWithKey(filename, "bcfks", alias, password, jkscert); } catch (Exception e) { bcfailed = true; } Assume.assumeFalse("BC elytronProvider not found, skipping BC keystore recognition", bcfailed); KeyStore loadedStore = KeyStoreUtil.loadKeyStore(providerSupplier, null, new FileInputStream(new File(workingDir, filename)), filename, password); Assert.assertNotNull(loadedStore); Certificate loadedCert = loadedStore.getCertificate(alias); Assert.assertEquals(jkscert, loadedCert); }
Source:
long gtk_draw (long widget, long cairo) { if ((state & OBSCURED) != 0) return 0; if (!hooksPaint ()) return 0; GdkRectangle rect = new GdkRectangle (); GDK.gdk_cairo_get_clip_rectangle (cairo, rect); Event event = new Event (); event.count = 1; Rectangle eventBounds = DPIUtil.autoScaleDown (new Rectangle (rect.x, rect.y, rect.width, rect.height)); if ((style & SWT.MIRRORED) != 0) eventBounds.x = DPIUtil.autoScaleDown (getClientWidth ()) - eventBounds.width - eventBounds.x; event.setBounds (eventBounds); GCData data = new GCData (); if (GTK.GTK_VERSION <= OS.VERSION (3, 9, 0) || GTK.GTK_VERSION >= OS.VERSION (3, 14, 13)) { data.cairo = cairo; } GC gc = event.gc = GC.gtk_new (this, data); gc.setClipping (eventBounds.x, eventBounds.y, eventBounds.width, eventBounds.height); drawWidget (gc); sendEvent (SWT.Paint, event); gc.dispose (); event.gc = null; return 0; }

Target:
long gtk_draw (long widget, long cairo) { if ((state & OBSCURED) != 0) return 0; if (!hooksPaint ()) return 0; GdkRectangle rect = new GdkRectangle (); GDK.gdk_cairo_get_clip_rectangle (cairo, rect); Event event = new Event (); event.count = 1; Rectangle eventBounds = DPIUtil.autoScaleDown (new Rectangle (rect.x, rect.y, rect.width, rect.height)); if ((style & SWT.MIRRORED) != 0) eventBounds.x = DPIUtil.autoScaleDown (getClientWidth ()) - eventBounds.width - eventBounds.x; event.setBounds (eventBounds); GCData data = new GCData (); if (GTK.GTK_VERSION <= OS.VERSION (3, 9, 0) || GTK.GTK_VERSION >= OS.VERSION (3, 14, 0)) { data.cairo = cairo; } GC gc = event.gc = GC.gtk_new (this, data); gc.setClipping (eventBounds.x, eventBounds.y, eventBounds.width, eventBounds.height); drawWidget (gc); sendEvent (SWT.Paint, event); gc.dispose (); event.gc = null; return 0; }
Source:
public Mono<Boolean> releaseInitializationLock() { String lockId = this.getStoreLockName(); CosmosItemProperties doc = new CosmosItemProperties(); doc.id(lockId); CosmosItemRequestOptions requestOptions = this.requestOptionsFactory.createRequestOptions( ServiceItemLease.fromDocument(doc)); if (requestOptions == null) { requestOptions = new CosmosItemRequestOptions(); } AccessCondition accessCondition = new AccessCondition(); accessCondition.type(AccessConditionType.IF_MATCH); accessCondition.condition(this.lockETag); requestOptions.accessCondition(accessCondition); CosmosItem docItem = this.client.getContainerClient().getItem(lockId, lockId); return this.client.deleteItem(docItem, requestOptions) .map(documentResourceResponse -> { if (documentResourceResponse.item() != null) { this.lockETag = null; return true; } else { return false; } }) .onErrorResume(throwable -> { if (throwable instanceof CosmosClientException) { CosmosClientException e = (CosmosClientException) throwable; if (e.statusCode() == ChangeFeedHelper.HTTP_STATUS_CODE_CONFLICT) { logger.info("Lease synchronization document was acquired by a different instance"); return Mono.just(false); } } logger.warn("Unexpected exception thrown", throwable); return Mono.error(throwable); }); }

Target:
public Mono<Boolean> releaseInitializationLock() { String lockId = this.getStoreLockName(); CosmosItemProperties doc = new CosmosItemProperties(); doc.id(lockId); CosmosItemRequestOptions requestOptions = this.requestOptionsFactory.createRequestOptions( ServiceItemLease.fromDocument(doc)); if (requestOptions == null) { requestOptions = new CosmosItemRequestOptions(); } AccessCondition accessCondition = new AccessCondition(); accessCondition.type(AccessConditionType.IF_MATCH); accessCondition.condition(this.lockETag); requestOptions.accessCondition(accessCondition); CosmosItem docItem = this.client.getContainerClient().getItem(lockId, lockId); return this.client.deleteItem(docItem, requestOptions) .map(documentResourceResponse -> { if (documentResourceResponse.item() != null) { this.lockETag = null; return true; } else { return false; } }) .onErrorResume(throwable -> { if (throwable instanceof CosmosClientException) { CosmosClientException e = (CosmosClientException) throwable; if (e.statusCode() == ChangeFeedHelper.HTTP_STATUS_CODE_CONFLICT) { logger.info("Lease synchronization document was acquired by a different instance"); return Mono.just(false); } } logger.error("Unexpected exception thrown", throwable); return Mono.error(throwable); }); }
Source:
public Notification get(final int number) { return new MkNotification(number); }

Target:
public Notification get(final int number) { return this.notifications.get(number); }
Source:
protected String getSubsystemXsdPath() throws IOException { return "schema/wildfly-remoting_3_0.xsd"; }

Target:
protected String getSubsystemXsdPath() throws Exception { return "schema/wildfly-remoting_3_0.xsd"; }
Source:
@Test public void testRequestResponseMalformed() throws Throwable { server().enqueue("'"); try { request(false); } catch (Throwable caught) { assertThat(caught instanceof MalformedJsonException, is(true)); return; } fail("Expected exception was not thrown"); }

Target:
@Test(expected = MalformedJsonException.class) public void testRequestResponseMalformed() throws Throwable { server().enqueue("'"); request(false); }
Source:
protected void initChannel(SocketChannel ch) throws Exception { ch.config() .setSendBufferSize(http2ClientConfig.nettySendBufferSize) .setReceiveBufferSize(http2ClientConfig.nettyReceiveBufferSize) .setWriteBufferWaterMark(new WriteBufferWaterMark(http2ClientConfig.http2InitialWindowSize, 2 * http2ClientConfig.http2InitialWindowSize)); ChannelPipeline pipeline = ch.pipeline(); InetSocketAddress peerAddress = ch.remoteAddress(); String peerHost = peerAddress.getHostName(); int peerPort = peerAddress.getPort(); SslHandler sslHandler = new SslHandler(sslFactory.createSSLEngine(peerHost, peerPort, SSLFactory.Mode.SERVER)); pipeline.addLast("SslHandler", sslHandler); pipeline.addLast("securityChecker", serverSecurityHandler); pipeline.addLast(Http2FrameCodecBuilder.forServer() .initialSettings(Http2Settings.defaultSettings() .maxFrameSize(http2ClientConfig.http2FrameMaxSize) .initialWindowSize(http2ClientConfig.http2InitialWindowSize)) .frameLogger(new Http2FrameLogger(LogLevel.DEBUG, "server")) .build()).addLast("Http2MultiplexHandler", new Http2MultiplexHandler(http2ServerStreamHandler)); pipeline.addLast(closeOnExceptionHandler); }

Target:
protected void initChannel(SocketChannel ch) throws Exception { ch.config() .setSendBufferSize(http2ClientConfig.nettySendBufferSize) .setReceiveBufferSize(http2ClientConfig.nettyReceiveBufferSize) .setWriteBufferWaterMark(new WriteBufferWaterMark(http2ClientConfig.http2InitialWindowSize, 2 * http2ClientConfig.http2InitialWindowSize)); ChannelPipeline pipeline = ch.pipeline(); pipeline.addLast("ConnectionStatsHandler", connectionStatsHandler); InetSocketAddress peerAddress = ch.remoteAddress(); String peerHost = peerAddress.getHostName(); int peerPort = peerAddress.getPort(); SslHandler sslHandler = new SslHandler(sslFactory.createSSLEngine(peerHost, peerPort, SSLFactory.Mode.SERVER)); pipeline.addLast("SslHandler", sslHandler); pipeline.addLast("SecurityChecker", serverSecurityHandler); pipeline.addLast("Http2FrameCodec", Http2FrameCodecBuilder.forServer() .initialSettings(Http2Settings.defaultSettings() .maxFrameSize(http2ClientConfig.http2FrameMaxSize) .initialWindowSize(http2ClientConfig.http2InitialWindowSize)) .frameLogger(new Http2FrameLogger(LogLevel.DEBUG, "server")) .build()); pipeline.addLast("Http2MultiplexHandler", new Http2MultiplexHandler(http2ServerStreamHandler)); pipeline.addLast("CloseOnExceptionHandler", closeOnExceptionHandler); }