auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>private SSLContext buildSslContext() throws SSLInitializationException { final SSLContext sslContext; try { final SSLContextBuilder sslContextBuilder = new SSLContextBuilder(); sslContextBuilder.setProtocol(configuration.getProtocol()); <START> sslContextBuilder.setProvider(configuration.getProvider()); <END> loadKeyMaterial(sslContextBuilder); loadTrustMaterial(sslContextBuilder); sslContext = sslContextBuilder.build(); } catch (Exception e) { throw new SSLInitializationException(e.getMessage(), e); } return sslContext; }</code><technical_language>sense set provider if configuration.getProvider() null</technical_language>

Target:
private SSLContext buildSslContext() throws SSLInitializationException { final SSLContext sslContext; try { final SSLContextBuilder sslContextBuilder = new SSLContextBuilder(); sslContextBuilder.setProtocol(configuration.getProtocol()); final String configuredProvider = configuration.getProvider(); if (configuredProvider != null) { sslContextBuilder.setProvider(configuredProvider); } loadKeyMaterial(sslContextBuilder); loadTrustMaterial(sslContextBuilder); sslContext = sslContextBuilder.build(); } catch (Exception e) { throw new SSLInitializationException(e.getMessage(), e); } return sslContext; }
Source:
<code>public long computeNextDeliveryTimestamp(long delay, TimeUnit unit) { if (delay > 0) { try { return ZonedDateTime.now() .plus(delay, Temporals.chronoUnit(unit)) .toInstant() .toEpochMilli(); } catch (ArithmeticException e) { LOGGER.warn("The was caused by conversation {}({}) followed by addition to current timestamp. Falling back to Long.MAX_VALUE.", <START> e.getMessage(), delay, unit.name()); <END> return Long.MAX_VALUE; } } return NO_DELAY; }</code><technical_language>Generally, logging exception, log stacktrace. able jump incriminated code section. cool fallback to... propose: LOGGER.warn("Exception encountered while computed JMS next delivery (delay {}). Fallback ms", delay, unit.name(), Long.MAX, e);</technical_language>

Target:
public long computeNextDeliveryTimestamp(long delay, TimeUnit unit) { if (delay > 0) { try { return ZonedDateTime.now() .plus(delay, Temporals.chronoUnit(unit)) .toInstant() .toEpochMilli(); } catch (ArithmeticException e) { LOGGER.warn("Exception encountered while computed JMS next delivery (delay {}). Fallback to (Long.MAX_VALUE) ms", delay, unit.name(), Long.MAX_VALUE, e); return Long.MAX_VALUE; } } return NO_DELAY; }
Source:
<code>private void initPositionListFromGeoJsonFile() { featureCollection = FeatureCollection.fromJson(loadGeoJsonFromAsset("boston_charge_stations.geojson")); pointList = new ArrayList<>(); for (Feature singleLocation : featureCollection.features()) { Point singleLocationPoint = (Point) singleLocation.geometry(); <START> pointList.add(singleLocationPoint); <END> } }</code><technical_language>add item list declaring a local variable passing in</technical_language>

Target:
private void initPositionListFromGeoJsonFile() { featureCollection = FeatureCollection.fromJson(loadGeoJsonFromAsset("boston_charge_stations.geojson")); pointList = new ArrayList<>(); for (Feature singleLocation : featureCollection.features()) { pointList.add((Point) singleLocation.geometry()); } }
Source:
<code>public boolean disconnect() { if (outpoint.fromTx != null) { TransactionOutput output = outpoint.fromTx.getOutput((int) outpoint.getIndex()); outpoint.fromTx = null; <START> if (output.getSpentBy() == this) { <END> output.markAsUnspent(); return true; } else { return false; } } else { if (outpoint.connectedOutput != null) { TransactionOutput output = outpoint.connectedOutput; outpoint.connectedOutput = null; if (output.getSpentBy() == this) { output.markAsUnspent(); return true; } else { return false; } } else { return false; } } }</code><technical_language>This part of code (up line 370) extracted end of method. Currently duplicated</technical_language>

Target:
public boolean disconnect() { TransactionOutput connectedOutput; if (outpoint.fromTx != null) { connectedOutput = outpoint.fromTx.getOutput((int) outpoint.getIndex()); outpoint.fromTx = null; } else if (outpoint.connectedOutput != null) { connectedOutput = outpoint.connectedOutput; outpoint.connectedOutput = null; } else { return false; } if (connectedOutput!=null && connectedOutput.getSpentBy() == this) { connectedOutput.markAsUnspent(); return true; } else { return false; } }
Source:
<code>public static Scanner factory(String key) { if (StringUtils.isAlphanumeric(key)) { return new Scanner(key); } else { <START> throw new IllegalArgumentException("plugin key must be alphanumeric, strictly"); <END> } }</code><technical_language>"scanner key ...". this restriction applies Scanners..</technical_language>

Target:
public static Scanner factory(String key) { if (StringUtils.isAlphanumeric(key)) { return new Scanner(key); } else { throw new IllegalArgumentException("scanner key must be alphanumeric, strictly"); } }
Source:
<code>public Object postProcessBeforeInitialization(Object bean, String beanName) throws BeansException { if (!this.capturedAutoChannelCandidates && this.beanFactory != null) { Object autoCreateChannelCandidates = beanFactory.getBean("$autoCreateChannelCandidates"); if (autoCreateChannelCandidates != null){ @SuppressWarnings("unchecked") Collection<String> autoCreateChannelCandidatesNames = (Collection<String>) new DirectFieldAccessor(autoCreateChannelCandidates).getPropertyValue("channelNames"); this.siBeanNames.addAll(autoCreateChannelCandidatesNames); } this.capturedAutoChannelCandidates = true; } if (bean instanceof MBeanExporter && !(bean instanceof IntegrationMBeanExporter)) { MBeanExporter mbeanExporter = (MBeanExporter) bean; DirectFieldAccessor mbeDfa = new DirectFieldAccessor(mbeanExporter); @SuppressWarnings("unchecked") Set<String> excludedNames = (Set<String>) mbeDfa.getPropertyValue(EXCLUDED_BEANS_PROPERTY_NAME); if (excludedNames != null) { siBeanNames.addAll(excludedNames); } mbeDfa.setPropertyValue(EXCLUDED_BEANS_PROPERTY_NAME, siBeanNames); } String className = ClassUtils.getUserClass(bean).getName(); if (StringUtils.hasText(className)){ if (className.startsWith(SI_ROOT_PACKAGE) && !(className.endsWith(IntegrationMBeanExporter.class.getName()))){ <START> siBeanNames.add(beanName); <END> } } return bean; }</code><technical_language>late add this list - (other) MBeanExporter instantiated registers MBeans in afterPropertiesSet(). this a BFPP. I guess issue resolve is annotation BPP is adding more beans. build excludedBeans in afterPropertiesSet() instead? (No work early instantiation of beans). need figure out notified of new beans created Annotation post processor</technical_language>

Target:
public Object postProcessBeforeInitialization(Object bean, String beanName) throws BeansException { if (!this.capturedAutoChannelCandidates && this.beanFactory != null) { Object autoCreateChannelCandidates = beanFactory.getBean("$autoCreateChannelCandidates"); if (autoCreateChannelCandidates != null){ @SuppressWarnings("unchecked") Collection<String> autoCreateChannelCandidatesNames = (Collection<String>) new DirectFieldAccessor(autoCreateChannelCandidates).getPropertyValue("channelNames"); this.siBeanNames.addAll(autoCreateChannelCandidatesNames); } this.capturedAutoChannelCandidates = true; } if (bean instanceof MBeanExporter && !(bean instanceof IntegrationMBeanExporter)) { MBeanExporter mbeanExporter = (MBeanExporter) bean; DirectFieldAccessor mbeDfa = new DirectFieldAccessor(mbeanExporter); @SuppressWarnings("unchecked") Set<String> excludedNames = (Set<String>) mbeDfa.getPropertyValue(EXCLUDED_BEANS_PROPERTY_NAME); if (excludedNames != null) { siBeanNames.addAll(excludedNames); } mbeDfa.setPropertyValue(EXCLUDED_BEANS_PROPERTY_NAME, siBeanNames); } return bean; }
Source:
<code>public boolean createOrUpdateAndStartSupervisor(SupervisorSpec spec) { <START> Preconditions.checkState(started, "SupervisorManager not started"); <END> Preconditions.checkNotNull(spec, "spec"); Preconditions.checkNotNull(spec.getId(), "spec.getId()"); synchronized (lock) { possiblyStopAndRemoveSupervisorInternal(spec.getId(), false); return createAndStartSupervisorInternal(spec, true); } }</code><technical_language>want this lock</technical_language>

Target:
public boolean createOrUpdateAndStartSupervisor(SupervisorSpec spec) { Preconditions.checkState(started, "SupervisorManager not started"); Preconditions.checkNotNull(spec, "spec"); Preconditions.checkNotNull(spec.getId(), "spec.getId()"); synchronized (lock) { Preconditions.checkState(started, "SupervisorManager not started"); possiblyStopAndRemoveSupervisorInternal(spec.getId(), false); return createAndStartSupervisorInternal(spec, true); } }
Source:
<code><START> protected String testForInvalidValue(final String value) { <END> if (value == null || value.isEmpty() || invalidValues == null) { return null; } String testValue; if (!isCaseSensitive) { testValue = value.toLowerCase(); } else { testValue = value; } if (invalidValues.contains(testValue)) { return invalidValueErrorMessage; } else { return null; } }</code><technical_language>private? package protected access</technical_language>

Target:
private String testForInvalidValue(final String value) { if (value == null || value.isEmpty() || invalidValues == null) { return null; } String testValue; if (!isCaseSensitive) { testValue = value.toLowerCase(); } else { testValue = value; } if (invalidValues.contains(testValue)) { return invalidValueErrorMessage; } else { return null; } }
Source:
<code>public Optional<Entity> getEntityFromUUID(UUID uuid) { for (net.minecraft.entity.Entity entity : this.loadedEntityList) { if (entity.getUniqueID().equals(uuid)) { <START> return Optional.of((Entity) entity); <END> } } return Optional.absent(); }</code><technical_language>is a do this, WorldServer holds a Map of 'entitiesByUuid' lookup entity</technical_language>

Target:
public Optional<Entity> getEntityFromUUID(UUID uuid) { if ((Object) this instanceof WorldServer) { return Optional.fromNullable((Entity) ((WorldServer) (Object) this).getEntityFromUuid(uuid)); } for (net.minecraft.entity.Entity entity : this.loadedEntityList) { if (entity.getUniqueID().equals(uuid)) { return Optional.of((Entity) entity); } } return Optional.absent(); }
Source:
<code>public void updatePeriodicData() { <START> log.info("test"); <END> if (!isNavXReady && (classInstantiationTime + 1 < Timer.getFPGATimestamp())) { System.out.println("REACHED"); log.info("reached"); setCurrentHeading(FACING_AWAY_FROM_DRIVERS); isNavXReady = true; } updatePose(); }</code><technical_language>remove this log line</technical_language>

Target:
public void updatePeriodicData() { if (!isNavXReady && (classInstantiationTime + 1 < Timer.getFPGATimestamp())) { setCurrentHeading(FACING_AWAY_FROM_DRIVERS); isNavXReady = true; } updatePose(); }
Source:
<code>public Optional<HttpUrl> redirectToNext(HttpUrl existingUrl) { Optional<Integer> existingUrlIndex = indexFor(existingUrl); int numAttempts = 0; int potentialNextIndex = existingUrlIndex.orElse(currentUrl.get()); while (numAttempts < baseUrls.size()) { potentialNextIndex = (potentialNextIndex + 1) % baseUrls.size(); <START> Boolean maybeInCache = this.failedUrls.getIfPresent(baseUrls.get(potentialNextIndex)); <END> if (maybeInCache == null) { return redirectTo(existingUrl, baseUrls.get(potentialNextIndex)); } numAttempts++; } return Optional.empty(); }</code><technical_language>remove this</technical_language>

Target:
public Optional<HttpUrl> redirectToNext(HttpUrl existingUrl) { Optional<Integer> existingUrlIndex = indexFor(existingUrl); int numAttempts = 0; int potentialNextIndex = existingUrlIndex.orElse(currentUrl.get()); while (numAttempts < baseUrls.size()) { potentialNextIndex = (potentialNextIndex + 1) % baseUrls.size(); UrlAvailability isFailed = failedUrls.getIfPresent(baseUrls.get(potentialNextIndex)); if (isFailed == null) { return redirectTo(existingUrl, baseUrls.get(potentialNextIndex)); } numAttempts++; } return redirectTo(existingUrl, baseUrls.get((existingUrlIndex.orElse(currentUrl.get()) + 1) % baseUrls.size())); }
Source:
<code>public Map<String, Object> toSoyData(Paginator paginator, @Nullable String revision, DateFormatter df) throws IOException { Map<String, Object> data = Maps.newHashMapWithExpectedSize(3); List<Map<String, Object>> entries = Lists.newArrayListWithCapacity(paginator.getLimit()); for (RevCommit c : paginator) { if (verbose) { entries.add(new CommitSoyData().setRevWalk(paginator.getWalk()).toSoyData(req, c, <START> Field.setOf(FIELDS, Field.DIFF_TREE), df)); <END> } else { entries.add(new CommitSoyData().toSoyData(req, c, FIELDS, df)); } } data.put("entries", entries); ObjectId next = paginator.getNextStart(); if (next != null) { data.put("nextUrl", copyAndCanonicalize(view, revision) .replaceParam(LogServlet.START_PARAM, next.name()) .toUrl()); } ObjectId prev = paginator.getPreviousStart(); if (prev != null) { GitilesView.Builder prevView = copyAndCanonicalize(view, revision); if (!prevView.getRevision().getId().equals(prev)) { prevView.replaceParam(LogServlet.START_PARAM, prev.name()); } data.put("previousUrl", prevView.toUrl()); } return data; }</code><technical_language>Factor this out a constant VERBOSE_FIELDS</technical_language>

Target:
public Map<String, Object> toSoyData(Paginator paginator, @Nullable String revision, DateFormatter df) throws IOException { Map<String, Object> data = Maps.newHashMapWithExpectedSize(3); List<Map<String, Object>> entries = Lists.newArrayListWithCapacity(paginator.getLimit()); for (RevCommit c : paginator) { if (verbose) { entries.add(new CommitSoyData().setRevWalk(paginator.getWalk()).toSoyData(req, c, VERBOSE_FIELDS, df)); } else { entries.add(new CommitSoyData().toSoyData(req, c, FIELDS, df)); } } data.put("entries", entries); ObjectId next = paginator.getNextStart(); if (next != null) { data.put("nextUrl", copyAndCanonicalize(view, revision) .replaceParam(LogServlet.START_PARAM, next.name()) .toUrl()); } ObjectId prev = paginator.getPreviousStart(); if (prev != null) { GitilesView.Builder prevView = copyAndCanonicalize(view, revision); if (!prevView.getRevision().getId().equals(prev)) { prevView.replaceParam(LogServlet.START_PARAM, prev.name()); } data.put("previousUrl", prevView.toUrl()); } return data; }
Source:
<code>public TouchInterceptFrameLayout(@NonNull Context context) { this(context, null); <START> setTag("TIFL"); <END> }</code><technical_language>extracted static final variables</technical_language>

Target:
public TouchInterceptFrameLayout(@NonNull Context context) { this(context, null); init(); }
Source:
<code>List<? extends ConstraintViolation> validate(Message message) { final Map<FieldDescriptor, Object> options = messageDescriptor.getOptions() .getAllFields(); for (FieldDescriptor optionDescriptor : options.keySet()) { if (OPTION_REQUIRED_FIELD.equals(optionDescriptor.getName())) { final JavaType optionType = optionDescriptor.getJavaType(); if (optionType == JavaType.STRING) { final String requiredFieldExpression = (String) options.get(optionDescriptor); final ImmutableList<RequiredFieldOption> fieldOptions = parse(requiredFieldExpression); if (!alternativeFound(message, fieldOptions)) { ConstraintViolation requiredFieldNotFound = ConstraintViolation.newBuilder() .setMsgFormat("None of the fields match the " + <START> "`required_field` definition: %s") <END> .addParam(requiredFieldExpression) .build(); violations.add(requiredFieldNotFound); } } else { log().warn("`{}` is not of string type. Found: {}", OPTION_REQUIRED_FIELD, optionType); } } } return violations.build(); }</code><technical_language>Extract message format a variable. check formatting here</technical_language>

Target:
List<? extends ConstraintViolation> validate(Message message) { final Map<FieldDescriptor, Object> options = messageDescriptor.getOptions() .getAllFields(); for (FieldDescriptor optionDescriptor : options.keySet()) { if (OPTION_REQUIRED_FIELD.equals(optionDescriptor.getName())) { final JavaType optionType = optionDescriptor.getJavaType(); if (optionType == JavaType.STRING) { final String requiredFieldExpression = (String) options.get(optionDescriptor); final ImmutableList<RequiredFieldOption> fieldOptions = parse(requiredFieldExpression); if (!alternativeFound(message, fieldOptions)) { final String msgFormat = "None of the fields match the `required_field` definition: %s"; ConstraintViolation requiredFieldNotFound = ConstraintViolation.newBuilder() .setMsgFormat(msgFormat) .addParam(requiredFieldExpression) .build(); violations.add(requiredFieldNotFound); } } else { log().warn("`{}` is not of string type. Found: {}", OPTION_REQUIRED_FIELD, optionType); } } } return violations.build(); }
Source:
<code>public final boolean shouldTraverse(NodeTraversal nodeTraversal, Node n, Node parent) { if (isDone()) { return false; } if (n.isScript() || n.isModuleBody()) { return true; } int line = n.getLineno(); if (getLastLineOfCurrentComment() > line) { return true; } while (hasRemainingComments() && !isCommentAdjacentToLine(line)) { if (getFirstLineOfNextComment() - getLastLineOfCurrentComment() > 1) { parent.addChildBefore(newFloatingComment(currentCommentGroup), n); } addNextCommentTo(currentCommentGroup); } if (getLastLineOfCurrentComment() == line) { linkCommentGroupToNode(currentCommentGroup, n); <START> <END> } else if (getLastLineOfCurrentComment() == line - 1) { linkCommentGroupToNode(currentCommentGroup, n); } else if (!hasRemainingComments()) { parent.addChildBefore(newFloatingComment(currentCommentGroup), n); } addNextCommentTo(currentCommentGroup); return true; }</code><technical_language>nit: empty lines</technical_language>

Target:
public final boolean shouldTraverse(NodeTraversal nodeTraversal, Node n, Node parent) { if (isDone()) { return false; } if (n.isScript() || n.isModuleBody()) { return true; } int line = n.getLineno(); if (getLastLineOfCurrentComment() > line) { return true; } while (hasRemainingComments() && !isCommentAdjacentToLine(line)) { if (getLastLineOfCurrentComment() > line) { return true; } if (getFirstLineOfNextComment() - getLastLineOfCurrentComment() > 1) { parent.addChildBefore(newFloatingCommentFromBuffer(), n); } addNextCommentToBuffer(); } if (getLastLineOfCurrentComment() == line) { linkCommentBufferToNode(n); } else if (getLastLineOfCurrentComment() == line - 1) { linkCommentBufferToNode(n); } else if (!hasRemainingComments()) { parent.addChildBefore(newFloatingCommentFromBuffer(), n); } addNextCommentToBuffer(); return true; }
Source:
<code>public void systemConfigFSShouldUseGITasScheme() { SpacesAPI spacesAPI = mock(SpacesAPI.class); producer.resolveFSURI(spacesAPI, SpacesAPI.DEFAULT_SPACE, "system"); <START> verify(spacesAPI).resolveFileSystemURI(SpacesAPI.Scheme.DEFAULT,SpacesAPI.DEFAULT_SPACE, "system" ); <END> }</code><technical_language>a constant for "system" exist</technical_language>

Target:
public void systemConfigFSShouldUseGITasScheme() { SpacesAPI spacesAPI = mock(SpacesAPI.class); producer.resolveFSURI(spacesAPI, SpacesAPI.DEFAULT_SPACE, SystemConfigProducer.SYSTEM); verify(spacesAPI).resolveFileSystemURI(SpacesAPI.Scheme.DEFAULT, SpacesAPI.DEFAULT_SPACE, SystemConfigProducer.SYSTEM); }
Source:
<code>private ListenableFuture<Void> initInternal(Context context, AppConfig appConfig) { <START> if (mInitialized.getAndSet(true)) { return mInitInternalFuture; } <END> mInitInternalFuture = CallbackToFutureAdapter.getFuture( completer -> { mCameraExecutor.execute(() -> { mContext = context.getApplicationContext(); mCameraFactory = appConfig.getCameraFactory(null); if (mCameraFactory == null) { completer.setException(new IllegalStateException( "Invalid app configuration provided. Missing CameraFactory.")); return; } mSurfaceManager = appConfig.getDeviceSurfaceManager(null); if (mSurfaceManager == null) { completer.setException(new IllegalStateException( "Invalid app configuration provided. Missing " + "CameraDeviceSurfaceManager.")); return; } mSurfaceManager.init(); mDefaultConfigFactory = appConfig.getUseCaseConfigRepository(null); if (mDefaultConfigFactory == null) { completer.setException(new IllegalStateException( "Invalid app configuration provided. Missing " + "UseCaseConfigFactory.")); return; } if (mCameraExecutor instanceof CameraExecutor) { CameraExecutor executor = (CameraExecutor) mCameraExecutor; executor.init(mCameraFactory); } mCameraRepository.init(mCameraFactory); completer.set(null); }); return "CameraX initInternal"; }); return mInitInternalFuture; }</code><technical_language>initInternal() called instance, right? replace this with: Preconditions.checkState(!mInitialized.getAndSet(true), "CameraX.initInternal() called instance");</technical_language>

Target:
private ListenableFuture<Void> initInternal(Context context, AppConfig appConfig) { Preconditions.checkState(!mInitialized.getAndSet(true), "CameraX.initInternal() should only be called once per instance"); return CallbackToFutureAdapter.getFuture( completer -> { mCameraExecutor.execute(() -> { mContext = context.getApplicationContext(); mCameraFactory = appConfig.getCameraFactory(null); if (mCameraFactory == null) { completer.setException(new IllegalArgumentException( "Invalid app configuration provided. Missing CameraFactory.")); return; } mSurfaceManager = appConfig.getDeviceSurfaceManager(null); if (mSurfaceManager == null) { completer.setException(new IllegalArgumentException( "Invalid app configuration provided. Missing " + "CameraDeviceSurfaceManager.")); return; } mSurfaceManager.init(); mDefaultConfigFactory = appConfig.getUseCaseConfigRepository(null); if (mDefaultConfigFactory == null) { completer.setException(new IllegalArgumentException( "Invalid app configuration provided. Missing " + "UseCaseConfigFactory.")); return; } if (mCameraExecutor instanceof CameraExecutor) { CameraExecutor executor = (CameraExecutor) mCameraExecutor; executor.init(mCameraFactory); } mCameraRepository.init(mCameraFactory); completer.set(null); }); return "CameraX initInternal"; }); }
Source:
<code>public void onVoteClicked(String value) { PlaceRequest place = new PlaceRequest.Builder() .nameToken(NameTokens.CONFIRM_VOTE) <START> .with("value", value) <END> .build(); placeManager.revealPlace(place); }</code><technical_language>extract "value" a Parameters class reuse in other prepareFromRequest</technical_language>

Target:
public void onVoteClicked(String value) { PlaceRequest place = new PlaceRequest.Builder() .nameToken(NameTokens.CONFIRM_VOTE) .with(NameTokens.VALUE_PARAM, value) .build(); placeManager.revealPlace(place); }
Source:
<code>private void redeployJobModule(CuratorFramework client, final Job job, RuntimeModuleDeploymentProperties deploymentProperties) throws Exception { ModuleDescriptor moduleDescriptor = job.getJobModuleDescriptor(); ModuleDeploymentStatus deploymentStatus = null; ModuleDeployment moduleDeployment = new ModuleDeployment(job, moduleDescriptor, deploymentProperties); if (deploymentProperties.getCount() > 0) { try { deploymentStatus = deployModule(client, moduleDeployment, instantiateContainerMatcher(client, moduleDescriptor)); } catch (NoContainerException e) { <START> logger.warn("No containers available for redeployment of for stream {}", <END> moduleDescriptor.getModuleLabel(), job.getName()); } finally { updateDeploymentUnitState(client, moduleDeployment, deploymentStatus); } } else { logUnwantedRedeployment(deploymentProperties.getCriteria(), moduleDescriptor.getModuleLabel()); } }</code><technical_language>Need replace "stream" "job" in this log message</technical_language>

Target:
private void redeployJobModule(CuratorFramework client, final Job job, RuntimeModuleDeploymentProperties deploymentProperties) throws Exception { ModuleDescriptor moduleDescriptor = job.getJobModuleDescriptor(); ModuleDeploymentStatus deploymentStatus = null; ModuleDeployment moduleDeployment = new ModuleDeployment(job, moduleDescriptor, deploymentProperties); if (deploymentProperties.getCount() > 0) { try { deploymentStatus = deployModule(client, moduleDeployment, instantiateContainerMatcher(client, moduleDescriptor)); } catch (NoContainerException e) { logger.warn("No containers available for redeployment of for job {}", moduleDescriptor.getModuleLabel(), job.getName()); } finally { updateDeploymentUnitState(client, moduleDeployment, deploymentStatus); } } else { logUnwantedRedeployment(deploymentProperties.getCriteria(), moduleDescriptor.getModuleLabel()); } }
Source:
<code>private void initCHPreparationHandler() { if (chPreparationHandler.hasCHProfiles()) { return; } Map<String, ProfileConfig> profilesByName = getProfilesByName(); for (CHProfileConfig chConfig : chPreparationHandler.getCHProfileConfigs()) { ProfileConfig profile = profilesByName.get(chConfig.getProfile()); <START> assert profile != null : "there is no profile " + chConfig.getProfile(); <END> FlagEncoder encoder = encodingManager.getEncoder(profile.getVehicle()); if (profile.isTurnCosts()) { assert encoder.supportsTurnCosts() : "encoder " + encoder + " should support turn costs"; int uTurnCosts = profile.hints().getInt(Routing.U_TURN_COSTS, INFINITE_U_TURN_COSTS); TurnCostProvider turnCostProvider = new DefaultTurnCostProvider(encoder, ghStorage.getTurnCostStorage(), uTurnCosts); chPreparationHandler.addCHProfile(CHProfile.edgeBased(profile.getName(), createWeighting(new HintsMap(profile.getWeighting()), encoder, turnCostProvider))); } else { chPreparationHandler.addCHProfile(CHProfile.nodeBased(profile.getName(), createWeighting(new HintsMap(profile.getWeighting()), encoder, NO_TURN_COST_PROVIDER))); } } }</code><technical_language>I prefer throw IllegalStateException for is called instead of assert, assert is active for tests. / do assert</technical_language>

Target:
private void initCHPreparationHandler() { if (chPreparationHandler.hasCHProfiles()) { return; } for (CHProfileConfig chConfig : chPreparationHandler.getCHProfileConfigs()) { ProfileConfig profile = profilesByName.get(chConfig.getProfile()); FlagEncoder encoder = encodingManager.getEncoder(profile.getVehicle()); if (profile.isTurnCosts()) { assert encoder.supportsTurnCosts() : "encoder " + encoder + " should support turn costs"; int uTurnCosts = profile.getHints().getInt(Routing.U_TURN_COSTS, INFINITE_U_TURN_COSTS); TurnCostProvider turnCostProvider = new DefaultTurnCostProvider(encoder, ghStorage.getTurnCostStorage(), uTurnCosts); chPreparationHandler.addCHProfile(CHProfile.edgeBased(profile.getName(), createWeighting(new HintsMap(profile.getWeighting()), encoder, turnCostProvider))); } else { chPreparationHandler.addCHProfile(CHProfile.nodeBased(profile.getName(), createWeighting(new HintsMap(profile.getWeighting()), encoder, NO_TURN_COST_PROVIDER))); } } }
Source:
<code>public static void verifyReadyForGodMode() { if (IS_GODMODE_ENABLED && isCiEnvironment() && !isGodModeTest()) { fail("GodMode should only be run locally, not in a CI environment. Please revert the change " <START> + "to the test properties template file that enabled GodMode in CI."); <END> } if (!isDevServer()) { fail("GodMode regeneration works only in dev server."); } if (isStudentMotdUrlEmpty()) { fail("Student MOTD URL defined in app.student.motd.url in build.properties " + "must not be empty. It is advised to use test-student-motd.html to test it."); } }</code><technical_language>this, defer BaseUiTestCase's @BeforeSuite and/or EmailGeneratorTest's @BeforeClass? java @BeforeSuite // @BeforeClass public static void checkIfGodModeEnabledInCi() { if (TestProperties.IS_GODMODE_ENABLED && TestProperties.isCiEnvironment()) { fail(...); } } If hack his/her in CI, immediately cut short test run</technical_language>

Target:
public static void verifyReadyForGodMode() { if (!isDevServer()) { fail("GodMode regeneration works only in dev server."); } if (isStudentMotdUrlEmpty()) { fail("Student MOTD URL defined in app.student.motd.url in build.properties " + "must not be empty. It is advised to use test-student-motd.html to test it."); } }
Source:
<code>public void parseServiceCreationConfiguration() throws SAXException, JAXBException, ParserConfigurationException, IOException { final URL resource = XmlConfigurationTest.class.getResource("/configs/default-serializer.xml"); ConfigurationParser rootParser = new ConfigurationParser(resource.toExternalForm()); DefaultSerializationProviderConfigurationParser parser = new DefaultSerializationProviderConfigurationParser(); managerBuilder = parser.parseServiceCreationConfiguration(rootParser.getConfigRoot(), classLoader, managerBuilder); Configuration xmlConfig = managerBuilder.build(); assertThat(xmlConfig.getServiceCreationConfigurations().size(), is(1)); ServiceCreationConfiguration configuration = xmlConfig.getServiceCreationConfigurations().iterator().next(); assertThat(configuration, instanceOf(DefaultSerializationProviderConfiguration.class)); DefaultSerializationProviderConfiguration factoryConfiguration = (DefaultSerializationProviderConfiguration) configuration; <START> assertThat(factoryConfiguration.getDefaultSerializers().size(), is(4)); <END> assertThat(factoryConfiguration.getDefaultSerializers().get(CharSequence.class), Matchers.<Class<? extends Serializer>>equalTo(TestSerializer.class)); assertThat(factoryConfiguration.getDefaultSerializers().get(Number.class), Matchers.<Class<? extends Serializer>>equalTo(TestSerializer2.class)); assertThat(factoryConfiguration.getDefaultSerializers().get(Long.class), Matchers.<Class<? extends Serializer>>equalTo(TestSerializer3.class)); assertThat(factoryConfiguration.getDefaultSerializers().get(Integer.class), Matchers.<Class<? extends Serializer>>equalTo(TestSerializer4.class)); }</code><technical_language>assertj nicer ;-) assertThat(factoryConfiguration.getDefaultSerializers()).hasSize(4);</technical_language>

Target:
public void parseServiceCreationConfiguration() throws SAXException, JAXBException, ParserConfigurationException, IOException, ClassNotFoundException { Configuration xmlConfig = parseXmlConfiguration("/configs/default-serializer.xml"); assertThat(xmlConfig.getServiceCreationConfigurations()).hasSize(1); ServiceCreationConfiguration configuration = xmlConfig.getServiceCreationConfigurations().iterator().next(); assertThat(configuration).isExactlyInstanceOf(DefaultSerializationProviderConfiguration.class); DefaultSerializationProviderConfiguration factoryConfiguration = (DefaultSerializationProviderConfiguration) configuration; Map<Class<?>, Class<? extends Serializer<?>>> defaultSerializers = factoryConfiguration.getDefaultSerializers(); assertThat(defaultSerializers).hasSize(4); assertThat(defaultSerializers.get(CharSequence.class)).isEqualTo(TestSerializer.class); assertThat(defaultSerializers.get(Number.class)).isEqualTo(TestSerializer2.class); assertThat(defaultSerializers.get(Long.class)).isEqualTo(TestSerializer3.class); assertThat(defaultSerializers.get(Integer.class)).isEqualTo(TestSerializer4.class); }
Source:
<code>private static String getDocumentProviderPathKitkatOrHigher(final Context context, final Uri uri) { final boolean isKitKat = Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT; if (isKitKat && DocumentsContract.isDocumentUri(context, uri)) { if (isExternalStorageDocument(uri)) { final String docId = DocumentsContract.getDocumentId(uri); final String[] split = docId.split(":"); final String type = split[0]; if ("primary".equalsIgnoreCase(type)) { return Environment.getExternalStorageDirectory() + "/" + split[1]; } } else if (isDownloadsDocument(uri)) { final String id = DocumentsContract.getDocumentId(uri); <START> final Uri contentUri = ContentUris.withAppendedId( <END> Uri.parse("content://downloads/public_downloads"), Long.valueOf(id)); return getDataColumn(context, contentUri, null, null); } else if (isMediaDocument(uri)) { final String docId = DocumentsContract.getDocumentId(uri); final String[] split = docId.split(":"); final String type = split[0]; Uri contentUri = null; if ("image".equals(type)) { contentUri = MediaStore.Images.Media.EXTERNAL_CONTENT_URI; } else if ("video".equals(type)) { contentUri = MediaStore.Video.Media.EXTERNAL_CONTENT_URI; } else if ("audio".equals(type)) { contentUri = MediaStore.Audio.Media.EXTERNAL_CONTENT_URI; } final String selection = "_id=?"; final String[] selectionArgs = new String[] { split[1] }; return getDataColumn(context, contentUri, selection, selectionArgs); } } return null; }</code><technical_language>Is some avoid hard-coding downloads path here? This fragile</technical_language>

Target:
private static String getDocumentProviderPathKitkatOrHigher(final Context context, final Uri uri) { final boolean isKitKat = Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT; if (isKitKat && DocumentsContract.isDocumentUri(context, uri)) { if (isExternalStorageDocument(uri)) { final String docId = DocumentsContract.getDocumentId(uri); final String[] split = docId.split(":"); final String type = split[0]; if ("primary".equalsIgnoreCase(type)) { return Environment.getExternalStorageDirectory() + "/" + split[1]; } } else if (isDownloadsDocument(uri)) { final String id = DocumentsContract.getDocumentId(uri); final Uri contentUri = ContentUris.withAppendedId( Uri.parse("content://downloads/public_downloads"), Long.valueOf(id)); return getDataColumn(context, contentUri, null, null); } else if (isMediaDocument(uri)) { final String docId = DocumentsContract.getDocumentId(uri); final String[] split = docId.split(":"); final String type = split[0]; Uri contentUri = null; if ("image".equals(type)) { contentUri = MediaStore.Images.Media.EXTERNAL_CONTENT_URI; } else if ("video".equals(type)) { contentUri = MediaStore.Video.Media.EXTERNAL_CONTENT_URI; } else if ("audio".equals(type)) { contentUri = MediaStore.Audio.Media.EXTERNAL_CONTENT_URI; } final String selection = MediaStore.MediaColumns._ID + "=?"; final String[] selectionArgs = new String[] { split[1] }; return getDataColumn(context, contentUri, selection, selectionArgs); } } return null; }
Source:
<code>public void copyFile_shouldNotCopyTheOutputstreamIfInputstreamIsNull() throws Exception { InputStream input = null; ByteArrayOutputStream output = spy(new ByteArrayOutputStream()); OpenmrsUtil.copyFile(input, output); assertEquals(null, input); <START> assertNotEquals(null, output); <END> verify(output, times(1)).close(); }</code><technical_language>assertNull assertNotNull</technical_language>

Target:
public void copyFile_shouldNotCopyTheOutputstreamIfInputstreamIsNull() throws Exception { InputStream input = null; ByteArrayOutputStream output = spy(new ByteArrayOutputStream()); OpenmrsUtil.copyFile(input, output); assertNull(input); assertNotNull(output); verify(output, times(1)).close(); }
Source:
<code>public TypeProvider getTypes() { <START> return TypeProvider.mutable(symbols); <END> }</code><technical_language>is this mutable? I usage of getAllTypes modify underlying table, I missed</technical_language>

Target:
public TypeProvider getTypes() { return TypeProvider.viewOf(symbols); }
Source:
<code>public void Placeholders_001_PublishedProvider() { WikiBasePageObject base = new WikiBasePageObject(driver); base.logInCookie(credentials.userName, credentials.password, wikiURL); base.openRandomArticle(wikiURL); String articleTitle = PageContent.articleNamePrefix + base.getTimeStamp(); <START> VisualEditModePageObject visualEditMode = base.goToArticleDefaultContentEditPage(wikiURL, articleTitle); <END> ArticlePageObject article = (ArticlePageObject) visualEditMode.submit(PageType.Article); article.verifyArticleTitle(articleTitle); VetAddVideoComponentObject vetAddingVideo = article.clickAddVideoPlaceholder(); VetOptionsComponentObject vetOptions = vetAddingVideo.addVideoByUrl(VideoContent.youtubeVideoURL); vetOptions.submit(); article.verifyVideo(); }</code><technical_language>goToArticleDefaultContentEditPage? this method does</technical_language>

Target:
public void Placeholders_001_PublishedProvider() { WikiBasePageObject base = new WikiBasePageObject(driver); base.logInCookie(credentials.userName, credentials.password, wikiURL); base.openRandomArticle(wikiURL); String articleTitle = PageContent.articleNamePrefix + base.getTimeStamp(); VisualEditModePageObject visualEditMode = base.goToArticleDefaultContentEditPage(wikiURL, articleTitle); ArticlePageObject article = visualEditMode.submitArticle(); article.verifyArticleTitle(articleTitle); VetAddVideoComponentObject vetAddingVideo = article.clickAddVideoPlaceholder(); VetOptionsComponentObject vetOptions = vetAddingVideo.addVideoByUrl(VideoContent.youtubeVideoURL); vetOptions.submit(); article.verifyVideo(); }
Source:
<code>protected EnvVars buildEnv(AbstractProject<?, ?> job) { EnvVars env = new EnvVars(); for (EnvironmentContributor contributor : EnvironmentContributor.all()) { try { contributor.buildEnvironmentFor(job, env, TaskListener.NULL); } catch (Throwable e) { <START> LOGGER.log(Level.WARNING, "Unhandled exception. Skipping environment contributor" + contributor, e); <END> } } return env; }</code><technical_language>please templating for logging instead of concatenation - simplifies reading</technical_language>

Target:
protected EnvVars buildEnv(AbstractProject<?, ?> job) { EnvVars env = new EnvVars(); for (EnvironmentContributor contributor : EnvironmentContributor.all()) { try { contributor.buildEnvironmentFor(job, env, TaskListener.NULL); } catch (Throwable e) { LOGGER.warn("Unhandled exception. Skipping environment contributor " + contributor, e); } } return env; }
Source:
<code>@JavaScriptMethod public synchronized String[][] clearDangerousApprovedSignatures() throws IOException { Jenkins.getInstance().checkPermission(Jenkins.RUN_SCRIPTS); TreeSet<String> newApprovedSignatures = new TreeSet<>(); for (String signature : approvedSignatures) { if(!StaticWhitelist.isBlacklisted(signature)){ newApprovedSignatures.add(signature); } } approvedSignatures.clear(); <START> approvedSignatures.addAll(newApprovedSignatures); <END> TreeSet<String> newAclApprovedSignatures = new TreeSet<>(); for (String signature : aclApprovedSignatures) { if(!StaticWhitelist.isBlacklisted(signature)){ newAclApprovedSignatures.add(signature); } } aclApprovedSignatures.clear(); aclApprovedSignatures.addAll(newAclApprovedSignatures); save(); return reconfigure(); }</code><technical_language>more simply: java Iterator<String> = approvedSignatures.iterator(); while (it.hasNext()) { if (StaticWhitelist.isBlacklisted(it.next())) { it.remove(); } }</technical_language>

Target:
@JavaScriptMethod public synchronized String[][] clearDangerousApprovedSignatures() throws IOException { Jenkins.getInstance().checkPermission(Jenkins.RUN_SCRIPTS); Iterator<String> it = approvedSignatures.iterator(); while (it.hasNext()) { if (StaticWhitelist.isBlacklisted(it.next())) { it.remove(); } } it = aclApprovedSignatures.iterator(); while (it.hasNext()) { if (StaticWhitelist.isBlacklisted(it.next())) { it.remove(); } } save(); return reconfigure(); }
Source:
<code>private static Map<String, String> authDictionary() { <START> final String[] authMessages = { <END> "General Server Error", "Username Not Found", "Bad Credentials", "Disabled LDAP Service", "Corrupted Configuration", "MS Active Directory", "Account Disabled", "Account Expired", "Account Locked", "Logon Not Permitted At Time", "Logon Not Permitted At Workstation", "Password Expired", "Password Reset Required", "Wrong IP Address", "Access Denied" }; final Map<String, String> dict = new HashMap<>(); for (int i = 0; i < authMessages.length; i++) { dict.put(String.format("code %02d", i + 1), authMessages[i]); } return dict; }</code><technical_language>reason of suggestion resolve errors a map eliminate error caused accidental lines swapping simplify finding message code running program. Current implementation allow it</technical_language>

Target:
private static Map<String, String> authDictionary() { final Map<String, String> dict = new HashMap<>(); dict.put("code 01", "General Server Error"); dict.put("code 02", "Username Not Found"); dict.put("code 03", "Bad Credentials"); dict.put("code 04", "Disabled LDAP Service"); dict.put("code 05", "Corrupted Configuration"); dict.put("code 06", "MS Active Directory"); dict.put("code 07", "Account Disabled"); dict.put("code 08", "Account Expired"); dict.put("code 09", "Account Locked"); dict.put("code 10", "Logon Not Permitted At Time"); dict.put("code 11", "Logon Not Permitted At Workstation"); dict.put("code 12", "Password Expired"); dict.put("code 13", "Password Reset Required"); dict.put("code 14", "Wrong IP Address"); dict.put("code 15", "Access Denied"); return Collections.unmodifiableMap(dict); }
Source:
<code>public static GlusterHook map(GlusterHookEntity entity, GlusterHook hook) { GlusterHook model = hook != null ? hook : new GlusterHook(); if (entity.getId() != null) { model.setId(entity.getId().toString()); } if (entity.getClusterId() != null) { model.setCluster(new Cluster()); model.getCluster().setId(entity.getClusterId().toString()); } if (entity.getHookKey() != null) { model.setName(entity.getHookKey()); } if (entity.getGlusterCommand() != null) { model.setGlusterCommand(entity.getGlusterCommand()); } if (entity.getStage() != null) { model.setGlusterStage(map(entity.getStage(),null)); <START> } <END> if (entity.getStatus() != null) { model.setHookStatus(map(entity.getStatus(),null)); } if (entity.getContentType() != null) { model.setContentType(map(entity.getContentType(), null)); } if (entity.getChecksum() != null) { model.setChecksum(entity.getChecksum()); } if (entity.getContent() != null) { model.setContent(entity.getContent()); } if (entity.getConflictStatus() != null) { model.setConflictStatus(entity.getConflictStatus()); model.setConflicts(mapConflicts(entity)); } if (entity.getServerHooks() != null && !entity.getServerHooks().isEmpty()) { model.setServerHooks(new GlusterServerHooks()); for (GlusterServerHook serverHookEntity : entity.getServerHooks()) { model.getServerHooks().getGlusterServerHooks().add(map(serverHookEntity)); } } return model; }</code><technical_language>reason for mapping direction</technical_language>

Target:
public static GlusterHook map(GlusterHookEntity entity, GlusterHook hook) { GlusterHook model = hook != null ? hook : new GlusterHook(); if (entity.getId() != null) { model.setId(entity.getId().toString()); } if (entity.getClusterId() != null) { model.setCluster(new Cluster()); model.getCluster().setId(entity.getClusterId().toString()); } if (entity.getHookKey() != null) { model.setName(entity.getHookKey()); } if (entity.getGlusterCommand() != null) { model.setGlusterCommand(entity.getGlusterCommand()); } if (entity.getStage() != null) { model.setStage(map(entity.getStage(),null)); } if (entity.getStatus() != null) { model.setStatus(map(entity.getStatus(),null)); } if (entity.getContentType() != null) { model.setContentType(map(entity.getContentType(), null)); } if (entity.getChecksum() != null) { model.setChecksum(entity.getChecksum()); } if (entity.getContent() != null) { model.setContent(entity.getContent()); } if (entity.getConflictStatus() != null) { model.setConflictStatus(entity.getConflictStatus()); model.setConflicts(mapConflicts(entity)); } if (entity.getServerHooks() != null && !entity.getServerHooks().isEmpty()) { model.setServerHooks(new GlusterServerHooks()); for (GlusterServerHook serverHookEntity : entity.getServerHooks()) { model.getServerHooks().getGlusterServerHooks().add(map(serverHookEntity)); } } return model; }
Source:
<code>private void startContainerScrub() { boolean enabled = config.getBoolean( HddsConfigKeys.HDDS_CONTAINERSCRUB_ENABLED, HddsConfigKeys.HDDS_CONTAINERSCRUB_ENABLED_DEFAULT); if (!enabled) { LOG.info("Background container scrubber has been disabled by {}", HddsConfigKeys.HDDS_CONTAINERSCRUB_ENABLED); } else { if (this.scrubber == null) { this.scrubber = new ContainerScrubber(containerSet, config); } <START> if (this.scrubber.isHalted()) { <END> scrubber.up(); } } }</code><technical_language>I need this check here, scrubber up() is care of multiple starts. public void up() { this.halt = false; if (this.scrubThread == null) { this.scrubThread = new Thread(this); scrubThread.start(); } else { LOG.info("Scrubber called multiple times. Scrub thread up."); } }</technical_language>

Target:
private void startContainerScrub() { boolean enabled = config.getBoolean( HddsConfigKeys.HDDS_CONTAINERSCRUB_ENABLED, HddsConfigKeys.HDDS_CONTAINERSCRUB_ENABLED_DEFAULT); if (!enabled) { LOG.info("Background container scrubber has been disabled by {}", HddsConfigKeys.HDDS_CONTAINERSCRUB_ENABLED); } else { if (this.scrubber == null) { this.scrubber = new ContainerScrubber(containerSet, config); } scrubber.up(); } }
Source:
<code>public void buyFromBank(Market m, String symbol, int volume) throws StockMarketExpection { Stock stockBeingPurchased = m.getStockForSymbol(symbol); if <START> (stockBeingPurchased.getPrice() * volume > <END> this.cashInHand) { throw new StockMarketExpection("Trader.buyFromBank: Not enough cash on hand to make purchase. Trader: " + this.name); } cashInHand = (cashInHand - stockBeingPurchased.getPrice() * volume); BuyOrder order = new BuyOrder(symbol, volume, stockBeingPurchased.getPrice(), this); addToPosition(order); }</code><technical_language>a new variable for this expression</technical_language>

Target:
public void buyFromBank(Market m, String symbol, int volume) throws StockMarketExpection { Stock stockBeingPurchased = m.getStockForSymbol(symbol); double totalCostOfStockPurchase = stockBeingPurchased.getPrice() * volume; if (totalCostOfStockPurchase > this.cashInHand) { throw new StockMarketExpection("Trader.buyFromBank: Not enough cash on hand to make purchase. Trader: " + this.name); } cashInHand = (cashInHand - totalCostOfStockPurchase); BuyOrder order = new BuyOrder(symbol, volume, stockBeingPurchased.getPrice(), this); addToPosition(order); }
Source:
<code>public String getFamilyName() { <START> return "Export function..."; <END> }</code><technical_language>Is ... depends onTheFly parameter</technical_language>

Target:
public String getFamilyName() { return "Export function"; }
Source:
<code>public long extractTimestampMillis(final Message message) { class ThriftTemplate implements TFieldIdEnum { private final String mFieldName; public ThriftTemplate(final String fieldName) { this.mFieldName = fieldName; } @Override public short getThriftFieldId() { return 1; } @Override public String getFieldName() { return mFieldName; } } try { long timestamp = mDeserializer.partialDeserializeI64(message.getPayload(), new ThriftTemplate(mConfig.getMessageTimestampName())); return toMillis(timestamp); } catch (TException e) { <START> throw new RuntimeException(e); <END> } }</code><technical_language>re-throwing, add relevant exception type method signature caller do properly filtering based exception type</technical_language>

Target:
public long extractTimestampMillis(final Message message) throws TException { class ThriftTemplate implements TFieldIdEnum { private final String mFieldName; public ThriftTemplate(final String fieldName) { this.mFieldName = fieldName; } @Override public short getThriftFieldId() { return 1; } @Override public String getFieldName() { return mFieldName; } } long timestamp = mDeserializer.partialDeserializeI64(message.getPayload(), new ThriftTemplate(mConfig.getMessageTimestampName())); return toMillis(timestamp); }
Source:
<code>protected void configure(HttpSecurity http) throws Exception { http .apply( <START> Saml2ServiceProviderConfigurer.saml2Login() <END> ) .and() .authorizeRequests() .mvcMatchers("/login", "/logged-out").permitAll() .and() .logout() .logoutSuccessUrl("/logged-out") .and() ; }</code><technical_language>adding saml2Login() HttpSecurity in this PR in another? If in this PR, update this call http</technical_language>

Target:
protected void configure(HttpSecurity http) throws Exception { http .authorizeRequests() .anyRequest().authenticated() .and() .saml2Login() ; }