auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
private String createPKCEStateNonce() { return String.format("oauth2code:%s:%s:%s", mPKCEManager.getCodeChallenge(), DbxPKCEManager.CODE_CHALLENGE_METHODS, mTokenAccessType.toString()); }

Target:
private String createPKCEStateNonce() { return String.format(Locale.US, "oauth2code:%s:%s:%s", mPKCEManager.getCodeChallenge(), DbxPKCEManager.CODE_CHALLENGE_METHODS, mTokenAccessType.toString()); }
Source:
public boolean isApplicable() throws CoreException { if (fElements.length == 0) return false; if (fElements.length != fResources.length + fJavaElements.length) return false; for (IResource fResource : fResources) { if (!RefactoringAvailabilityTester.isDeleteAvailable(fResource)) { return false; } } for (IJavaElement fJavaElement : fJavaElements) { if (!RefactoringAvailabilityTester.isDeleteAvailable(fJavaElement)) { return false; } } return true; }

Target:
public boolean isApplicable() throws CoreException { if (fElements.length == 0) return false; if (fElements.length != fResources.length + fJavaElements.length) return false; for (IResource resource : fResources) { if (!RefactoringAvailabilityTester.isDeleteAvailable(resource)) { return false; } } for (IJavaElement javaElement : fJavaElements) { if (!RefactoringAvailabilityTester.isDeleteAvailable(javaElement)) { return false; } } return true; }
Source:
private void updatePostFormatKeysAndNames() { final SiteModel site = getSite(); if (!isAdded() || site == null) { return; } mPostFormatKeys = new ArrayList<>(Arrays.asList(getResources().getStringArray(R.array.post_format_keys))); mPostFormatNames = new ArrayList<>(Arrays.asList(getResources() .getStringArray(R.array.post_format_display_names))); List<PostFormatModel> postFormatModels = mSiteStore.getPostFormats(site); for (PostFormatModel postFormatModel : postFormatModels) { if (!mPostFormatKeys.contains(postFormatModel.getSlug())) { mPostFormatKeys.add(postFormatModel.getSlug()); mPostFormatNames.add(postFormatModel.getDisplayName()); } } }

Target:
private void updatePostFormatKeysAndNames() { final SiteModel site = getSite(); if (site == null) { return; } mPostFormatKeys = new ArrayList<>(mDefaultPostFormatKeys); mPostFormatNames = new ArrayList<>(mDefaultPostFormatNames); List<PostFormatModel> postFormatModels = mSiteStore.getPostFormats(site); for (PostFormatModel postFormatModel : postFormatModels) { if (!mPostFormatKeys.contains(postFormatModel.getSlug())) { mPostFormatKeys.add(postFormatModel.getSlug()); mPostFormatNames.add(postFormatModel.getDisplayName()); } } }
Source:
public void onRevokeLeadership() { synchronized (lock) { if (running) { if (LOG.isDebugEnabled()) { LOG.debug( "Revoke leadership of ({}@{}).", leaderContender.getDescription(), confirmedLeaderSessionID, confirmedLeaderAddress); } issuedLeaderSessionID = null; clearConfirmedLeaderInformation(); leaderContender.revokeLeadership(); leaderElectionDriver.writeLeaderInformation(LeaderInformation.empty()); } else { if (LOG.isDebugEnabled()) { LOG.debug("Ignoring the revoke leadership notification since the " + "has already been closed.", leaderElectionDriver); } } } }

Target:
public void onRevokeLeadership() { synchronized (lock) { if (running) { if (LOG.isDebugEnabled()) { LOG.debug( "Revoke leadership of ({}@{}).", leaderContender.getDescription(), confirmedLeaderSessionID, confirmedLeaderAddress); } issuedLeaderSessionID = null; clearConfirmedLeaderInformation(); } else { if (LOG.isDebugEnabled()) { LOG.debug("Ignoring the revoke leadership notification since the " + "has already been closed.", leaderElectionDriver); } return; } } leaderContender.revokeLeadership(); synchronized (lock) { if (running) { if (issuedLeaderSessionID == null) { if (LOG.isDebugEnabled()) { LOG.debug("Clearing the leader information on {}.", leaderElectionDriver); } leaderElectionDriver.writeLeaderInformation(LeaderInformation.empty()); } } } }
Source:
@Override public Pair<RelTraitSet, List<RelTraitSet>> deriveTraits( final RelTraitSet childTraits, final int childId) { RelCollation collation = childTraits.getCollation(); if (collation == null || collation.getFieldCollations().size() == 0) { return null; } return Pair.of(getTraitSet().replace(collation), ImmutableList.of(childTraits)); }

Target:
@Override public Pair<RelTraitSet, List<RelTraitSet>> deriveTraits( final RelTraitSet childTraits, final int childId) { RelCollation collation = childTraits.getCollation(); if (collation == null || childTraits.isDefaultSansConvention()) { return null; } int maxField = Math.max(getInput().getRowType().getFieldCount(), getProjects().size()); Mappings.TargetMapping mapping = Mappings .create(MappingType.FUNCTION, maxField, maxField); for (Ord<RexNode> node : Ord.zip(getProjects())) { if (node.e instanceof RexInputRef) { mapping.set(((RexInputRef) node.e).getIndex(), node.i); } else if (node.e.isA(SqlKind.CAST)) { final RexNode operand = ((RexCall) node.e).getOperands().get(0); if (operand instanceof RexInputRef) { mapping.set(((RexInputRef) operand).getIndex(), node.i); } } } List<RelFieldCollation> collationFieldsToDerive = new ArrayList<>(); for (RelFieldCollation rc : collation.getFieldCollations()) { if (isCollationOnTrivialExpr(mapping, rc, false)) { collationFieldsToDerive.add(rc); } else { break; } } if (collationFieldsToDerive.size() > 0) { final RelCollation newCollation = RelCollations.of(collationFieldsToDerive).apply(mapping); return Pair.of(traitSet.replace(newCollation), ImmutableList.of(childTraits)); } else { return null; } }
Source:
public int updateStars(int stars , String uuid) throws ApplicationManagementException { if (log.isDebugEnabled()) { log.debug("Stars are received for the application " + uuid); } int newStars=0; try { ConnectionManagerUtil.beginDBTransaction(); int ratedUsers = ApplicationManagementDAOFactory.getCommentDAO().getRatedUser(uuid); int oldStars = ApplicationManagementDAOFactory.getCommentDAO().getStars(uuid); if(ratedUsers==0){ newStars=ApplicationManagementDAOFactory.getCommentDAO().updateStars(stars,uuid); return newStars; }else { int avgStars = ((oldStars*ratedUsers)+stars) / (ratedUsers+1); newStars = ApplicationManagementDAOFactory.getCommentDAO().updateStars(avgStars, uuid); ConnectionManagerUtil.commitDBTransaction(); return newStars; } } catch (ApplicationManagementDAOException e) { ConnectionManagerUtil.rollbackDBTransaction(); log.error("Application Management Exception occurs.", e); } catch (DBConnectionException e) { log.error("DB Connection Exception occurs.", e); } finally { ConnectionManagerUtil.closeDBConnection(); } return newStars; }

Target:
public int updateStars(int stars, String uuid) throws ApplicationManagementException { if (log.isDebugEnabled()) { log.debug("Stars are received for the application " + uuid); } int newStars = 0; try { ConnectionManagerUtil.beginDBTransaction(); int ratedUsers = commentDAO.getRatedUser(uuid); int oldStars = commentDAO.getStars(uuid); if (ratedUsers == 0) { newStars = commentDAO.updateStars(stars, uuid); return newStars; } else { int avgStars = ((oldStars * ratedUsers) + stars) / (ratedUsers + 1); newStars = commentDAO.updateStars(avgStars, uuid); ConnectionManagerUtil.commitDBTransaction(); return newStars; } } catch (ApplicationManagementDAOException e) { ConnectionManagerUtil.rollbackDBTransaction(); throw new ApplicationManagementException( "Updated average stars of the Application with UUID " + uuid + " can not get.", e); } finally { ConnectionManagerUtil.closeDBConnection(); } }
Source:
public List<String> getYarnRecommendedDecommissionHostsForHostGroup(String clusterCrn, YarnScalingServiceV1Response yarnResponse, Map<String, String> hostFqdnsToInstanceId, int maxAllowedDownScale, Optional<Integer> mandatoryDownScaleCount) { Set<String> consideredNodeIds = new HashSet<>(); Integer allowedDownscale = Math.max(maxAllowedDownScale, mandatoryDownScaleCount.orElse(0)); List<String> decommissionNodes = yarnResponse.getScaleDownCandidates().orElse(List.of()).stream() .sorted(Comparator.comparingInt(YarnScalingServiceV1Response.DecommissionCandidate::getAmCount)) .map(YarnScalingServiceV1Response.DecommissionCandidate::getNodeId) .map(nodeFqdn -> nodeFqdn.split(":")[0]) .filter(s -> hostFqdnsToInstanceId.keySet().contains(s)) .map(nodeFqdn -> hostFqdnsToInstanceId.get(nodeFqdn)) .limit(allowedDownscale) .map(nodeId -> { consideredNodeIds.add(nodeId); return nodeId; }) .collect(Collectors.toList()); int forcedCandidatesCount = mandatoryDownScaleCount.orElse(0) - decommissionNodes.size(); if (forcedCandidatesCount > 0) { List forcedCandidates = hostFqdnsToInstanceId.keySet().stream() .filter(nodeId -> !consideredNodeIds.contains(nodeId)) .limit(forcedCandidatesCount).collect(Collectors.toList()); LOGGER.info("Forced downscaling candidates count '{}', candidates '{}' in cluster '{}' to achieve mandatory " + "downscaletarget '{}'.", forcedCandidates.size(), forcedCandidates, clusterCrn, mandatoryDownScaleCount.orElse(0)); decommissionNodes.addAll(forcedCandidates); } return decommissionNodes; }

Target:
public List<String> getYarnRecommendedDecommissionHostsForHostGroup(String clusterCrn, YarnScalingServiceV1Response yarnResponse, Map<String, String> hostFqdnsToInstanceId, int maxAllowedDownScale, Optional<Integer> mandatoryDownScaleCount) { Set<String> consideredNodeIds = new HashSet<>(); Integer allowedDownscale = Math.max(maxAllowedDownScale, mandatoryDownScaleCount.orElse(0)); List<String> decommissionNodes = yarnResponse.getScaleDownCandidates().orElse(List.of()).stream() .map(YarnScalingServiceV1Response.DecommissionCandidate::getNodeId) .map(nodeFqdn -> nodeFqdn.split(":")[0]) .filter(s -> hostFqdnsToInstanceId.keySet().contains(s)) .map(nodeFqdn -> hostFqdnsToInstanceId.get(nodeFqdn)) .limit(allowedDownscale) .map(nodeId -> { consideredNodeIds.add(nodeId); return nodeId; }) .collect(Collectors.toList()); int forcedCandidatesCount = mandatoryDownScaleCount.orElse(0) - decommissionNodes.size(); if (forcedCandidatesCount > 0) { List forcedCandidates = hostFqdnsToInstanceId.keySet().stream() .filter(nodeId -> !consideredNodeIds.contains(nodeId)) .limit(forcedCandidatesCount).collect(Collectors.toList()); LOGGER.info("Forced downscaling candidates count '{}', candidates '{}' in cluster '{}' to achieve mandatory " + "downscaletarget '{}'.", forcedCandidates.size(), forcedCandidates, clusterCrn, mandatoryDownScaleCount.orElse(0)); decommissionNodes.addAll(forcedCandidates); } return decommissionNodes; }
Source:
protected boolean validateInputs() { boolean result = super.validateInputs(); if (result) { returnValue.setExceptionString(""); try { String hostName = getParameters().getVdsHostName(); if (StringUtils.isBlank(hostName)) { returnValue.setExceptionString("Cannot register Host - no Hostname address specified."); result = false; } else { List<VDS> vdssByUniqueId = getVdssByUniqueId(); if (vdssByUniqueId.size() > 1) { returnValue.setExceptionString("Cannot register Host - unique id is ambigious."); result = false; } else if (vdssByUniqueId.size() == 1) { VDS vds = vdssByUniqueId.get(0); if (!VdsHandler.isPendingOvirt(vds)) { returnValue.setExceptionString(VdcBllMessages.VDS_STATUS_NOT_VALID_FOR_UPDATE.name()); result = false; } else { Long otp = getParameters().getOtp(); if (otp != null && !isValidOtp(vds, otp)) { returnValue.setExceptionString(String.format("Invalid OTP for host %s", hostName)); result = false; } } } } } catch (RuntimeException ex) { log.error("RegisterVdsQuery::CanDoAction: An exception has been thrown.", ex); returnValue.setExceptionString(String.format("Cannot register Host - An exception has been thrown: %1$s", ex.getMessage())); result = false; } } return result; }

Target:
protected boolean validateInputs() { boolean result = super.validateInputs(); if (result) { VdcQueryReturnValue returnValue = getQueryReturnValue(); returnValue.setExceptionString(""); try { String hostName = getParameters().getVdsHostName(); if (StringUtils.isBlank(hostName)) { returnValue.setExceptionString("Cannot register Host - no Hostname address specified."); result = false; } else { List<VDS> vdssByUniqueId = getVdssByUniqueId(); if (vdssByUniqueId.size() > 1) { returnValue.setExceptionString("Cannot register Host - unique id is ambigious."); result = false; } else if (vdssByUniqueId.size() == 1) { VDS vds = vdssByUniqueId.get(0); if (!VdsHandler.isPendingOvirt(vds)) { returnValue.setExceptionString(VdcBllMessages.VDS_STATUS_NOT_VALID_FOR_UPDATE.name()); result = false; } else { Long otp = getParameters().getOtp(); if (otp != null && !isValidOtp(vds, otp)) { returnValue.setExceptionString(String.format("Invalid OTP for host %s", hostName)); result = false; } } } } } catch (RuntimeException ex) { log.error("RegisterVdsQuery::CanDoAction: An exception has been thrown.", ex); returnValue.setExceptionString(String.format("Cannot register Host - An exception has been thrown: %1$s", ex.getMessage())); result = false; } } return result; }
Source:
private void throwIfErrorResponse(Response response, String metricsPrefix) throws GatewayClientException, DownstreamException { if (CLIENT_ERROR == response.getStatusInfo().getFamily()) { metricRegistry.counter(metricsPrefix + ".failures").inc(); throw new GatewayClientException( "Unexpected HTTP status code " + response.getStatus() + " from gateway", response); } if (SERVER_ERROR == response.getStatusInfo().getFamily()) { metricRegistry.counter(metricsPrefix + ".failures").inc(); String responseMessage = response.readEntity(String.class); logger.error("Unexpected HTTP status code from gateway, error=[{}]", response.getStatus(), responseMessage); throw new DownstreamException(response.getStatus(), responseMessage); } logger.error("Other unexpected HTTP status code from gateway=[stripe]", response.getStatus()); }

Target:
private void throwIfErrorResponse(Response response, String metricsPrefix) throws GatewayClientException, DownstreamException { switch (response.getStatusInfo().getFamily()) { case SUCCESSFUL: break; case CLIENT_ERROR: metricRegistry.counter(metricsPrefix + ".failures").inc(); throw new GatewayClientException("Unexpected HTTP status code " + response.getStatus() + " from gateway", response); case SERVER_ERROR: metricRegistry.counter(metricsPrefix + ".failures").inc(); String responseMessage = response.readEntity(String.class); logger.error("Unexpected HTTP status code from gateway, error=[{}]", response.getStatus(), responseMessage); throw new DownstreamException(response.getStatus(), responseMessage); default: logger.error("Other HTTP status from gateway=[stripe], response=[]", response); } }
Source:
public CategoryView findCategory(CategoryView parentCategoryView, String category) throws IOException { String cacheKey = "singleCategory:" + CacheParams.createKeyHash(category + parentCategoryView.hashCode()); return CacheUtil.getOrCompute(cache, cacheKey, () -> findCategoryWithoutCache(parentCategoryView, category)); }

Target:
public CategoryView findCategory(CategoryView parentCategoryView, String category) throws IOException { String cacheKey = "singleCategory:" + CacheParams.createKeyHash(category, parentCategoryView.getName()); return CacheUtil.getOrCompute(cache, cacheKey, () -> findCategoryWithoutCache(parentCategoryView, category)); }
Source:
public SDVariable tile(SDVariable iX, int[] repeat) { return tile(iX, repeat);}

Target:
public SDVariable tile(SDVariable iX, int[] repeat) { return tile(null, iX, repeat);}
Source:
private TaskConfigurer getDefaultConfigurer() { verifyEnvironment(); int configurers = this.context.getBeanNamesForType(TaskConfigurer.class).length; if (configurers < 1) { TaskConfigurer taskConfigurer; if(!CollectionUtils.isEmpty(this.dataSources) && this.dataSources.size() == 1) { taskConfigurer = new DefaultTaskConfigurer(this.dataSources.iterator().next()); } else { taskConfigurer = new DefaultTaskConfigurer(null); } this.context.getBeanFactory().registerSingleton("taskConfigurer", taskConfigurer); return taskConfigurer; } else { if(configurers == 1) { return this.context.getBean(TaskConfigurer.class); } else { throw new IllegalStateException("Expected one TaskConfigurer but found " + configurers); } } }

Target:
private TaskConfigurer getDefaultConfigurer() { verifyEnvironment(); int configurers = this.context.getBeanNamesForType(TaskConfigurer.class).length; if (configurers < 1) { TaskConfigurer taskConfigurer; if(!CollectionUtils.isEmpty(this.dataSources) && this.dataSources.size() == 1) { taskConfigurer = new DefaultTaskConfigurer(this.dataSources.iterator().next()); } else { taskConfigurer = new DefaultTaskConfigurer(); } this.context.getBeanFactory().registerSingleton("taskConfigurer", taskConfigurer); return taskConfigurer; } else { if(configurers == 1) { return this.context.getBean(TaskConfigurer.class); } else { throw new IllegalStateException("Expected one TaskConfigurer but found " + configurers); } } }
Source:
public void widgetSelected(SelectionEvent e) { IStructuredSelection selection = viewer.getStructuredSelection(); if (selection != null) { viewer.editElement(selection.getFirstElement(), 0); } }

Target:
public void widgetSelected(SelectionEvent e) { IStructuredSelection selection = viewer.getStructuredSelection(); if (!selection.isEmpty()) { viewer.editElement(selection.getFirstElement(), 0); } }
Source:
public void refreshAccessToken_withoutServiceAccountImpersonation() throws IOException { MockExternalAccountCredentialsTransportFactory transportFactory = new MockExternalAccountCredentialsTransportFactory(); final AwsCredentials awsCredential = (AwsCredentials) AwsCredentials.newBuilder(AWS_CREDENTIAL) .setTokenUrl(transportFactory.transport.getStsUrl()) .setHttpTransportFactory(transportFactory) .setCredentialSource(buildAwsCredentialSource(transportFactory)) .build(); AccessToken accessToken = awsCredential.refreshAccessToken(); assertThat(accessToken.getTokenValue()).isEqualTo(transportFactory.transport.getAccessToken()); }

Target:
public void refreshAccessToken_withoutServiceAccountImpersonation() throws IOException { MockExternalAccountCredentialsTransportFactory transportFactory = new MockExternalAccountCredentialsTransportFactory(); AwsCredentials awsCredential = (AwsCredentials) AwsCredentials.newBuilder(AWS_CREDENTIAL) .setTokenUrl(transportFactory.transport.getStsUrl()) .setHttpTransportFactory(transportFactory) .setCredentialSource(buildAwsCredentialSource(transportFactory)) .build(); AccessToken accessToken = awsCredential.refreshAccessToken(); assertEquals(transportFactory.transport.getAccessToken(), accessToken.getTokenValue()); }
Source:
public void saveShowInMruPartIdsList() { if (!mruPartIds.isEmpty()) { StringBuilder mruList = new StringBuilder(); for (Iterator<String> it = mruPartIds.iterator(); it.hasNext();) { mruList.append(it.next()); if (it.hasNext()) mruList.append(MRU_LIST_SEPARATOR); } getWindowModel().getPersistedState().put(IWorkbenchConstants.TAG_MRU_LIST, mruList.toString()); } }

Target:
public void saveShowInMruPartIdsList() { if (!mruPartIds.isEmpty()) { StringBuilder mruList = new StringBuilder(); for (String partId : mruPartIds) { if (mruList.length() != 0) mruList.append(MRU_LIST_SEPARATOR); mruList.append(partId); } getWindowModel().getPersistedState().put(IWorkbenchConstants.TAG_MRU_LIST, mruList.toString()); } }
Source:
private Pair<ByteBuffer, BlobProperties> getPutMessage(StoreKey id, short accountId, short containerId) throws MessageFormatException, IOException { int blobSize = TestUtils.RANDOM.nextInt(500) + 501; int userMetadataSize = TestUtils.RANDOM.nextInt(blobSize / 2); byte[] blob = new byte[blobSize]; byte[] usermetadata = new byte[userMetadataSize]; TestUtils.RANDOM.nextBytes(blob); TestUtils.RANDOM.nextBytes(usermetadata); BlobProperties blobProperties = new BlobProperties(blobSize, "test", accountId, containerId); MessageFormatInputStream stream = new PutMessageFormatInputStream(id, blobProperties, ByteBuffer.wrap(usermetadata), new ByteBufferInputStream(ByteBuffer.wrap(blob)), blobSize); byte[] message = Utils.readBytesFromStream(stream, (int) stream.getSize()); return new Pair(ByteBuffer.wrap(message), blobProperties); }

Target:
private Pair<ByteBuffer, MessageInfo> getPutMessage(StoreKey id, short accountId, short containerId) throws MessageFormatException, IOException { int blobSize = TestUtils.RANDOM.nextInt(500) + 501; int userMetadataSize = TestUtils.RANDOM.nextInt(blobSize / 2); byte[] blob = new byte[blobSize]; byte[] usermetadata = new byte[userMetadataSize]; TestUtils.RANDOM.nextBytes(blob); TestUtils.RANDOM.nextBytes(usermetadata); BlobProperties blobProperties = new BlobProperties(blobSize, "test", accountId, containerId); MessageFormatInputStream stream = new PutMessageFormatInputStream(id, blobProperties, ByteBuffer.wrap(usermetadata), new ByteBufferInputStream(ByteBuffer.wrap(blob)), blobSize); byte[] message = Utils.readBytesFromStream(stream, (int) stream.getSize()); return new Pair(ByteBuffer.wrap(message), new MessageInfo(id, message.length, Utils.Infinite_Time, accountId, containerId, blobProperties.getCreationTimeInMs())); }
Source:
public List<IBaseEventInfo> getKernelProvider(IProgressMonitor monitor) throws ExecutionException { List<String> command = createCommand(LTTngControlServiceConstants.COMMAND_LIST, LTTngControlServiceConstants.OPTION_KERNEL); ICommandResult result = executeCommand(command, monitor, false); List<IBaseEventInfo> events = new ArrayList<>(); if (result.getErrorOutput().size() > 0) { if (ignoredPattern(result.getErrorOutput(), LTTngControlServiceConstants.LIST_KERNEL_NO_KERNEL_PROVIDER_PATTERN)) { return events; } } if (isError(result)) { throw new ExecutionException(Messages.TraceControl_CommandError + " " + toCommandString(command) + "\n" + result.toString()); } getProviderEventInfo(result.getOutput(), 0, events); return events; }

Target:
public List<IBaseEventInfo> getKernelProvider(IProgressMonitor monitor) throws ExecutionException { List<String> command = createCommand(LTTngControlServiceConstants.COMMAND_LIST, LTTngControlServiceConstants.OPTION_KERNEL); ICommandResult result = executeCommand(command, monitor, false); List<IBaseEventInfo> events = new ArrayList<>(); if (ignoredPattern(result.getErrorOutput(), LTTngControlServiceConstants.LIST_KERNEL_NO_KERNEL_PROVIDER_PATTERN)) { return events; } if (isError(result)) { throw new ExecutionException(Messages.TraceControl_CommandError + " " + toCommandString(command) + "\n" + result.toString()); } getProviderEventInfo(result.getOutput(), 0, events); return events; }
Source:
public TupleDomainFilter toCoercingFilter(TupleDomainFilter filter, Subfield subfield) { if (filter == IS_NULL || filter == IS_NOT_NULL) { return filter; } if (subfield.getPath().size() > 0) { String fieldName = ((Subfield.NestedField) subfield.getPath().get(0)).getName(); for (int i = 0; i < toFieldNames.size(); i++) { if (fieldName.equals(toFieldNames.get(i))) { return coercers[i].toCoercingFilter(filter, subfield.tail(fieldName)); } } verify(false, "Unexpected struct field: " + fieldName); } throw new UnsupportedOperationException("Range filers on struct types are not supported"); }

Target:
public TupleDomainFilter toCoercingFilter(TupleDomainFilter filter, Subfield subfield) { if (filter == IS_NULL || filter == IS_NOT_NULL) { return filter; } if (subfield.getPath().size() > 0) { String fieldName = ((Subfield.NestedField) subfield.getPath().get(0)).getName(); for (int i = 0; i < toFieldNames.size(); i++) { if (fieldName.equals(toFieldNames.get(i))) { HiveCoercer coercer = coercers[i]; if (coercer == null) { return filter; } return coercer.toCoercingFilter(filter, subfield.tail(fieldName)); } } throw new IllegalArgumentException("Struct field not found: " + fieldName); } throw new UnsupportedOperationException("Range filers on struct types are not supported"); }
Source:
protected void put(final String key, final Object value, final T element) { Map<Object, Set<T>> keyMap = this.index.get(key); if (null == keyMap) { Map<Object, Set<T>> tmpMap = new ConcurrentHashMap<>(); this.index.putIfAbsent(key, tmpMap); keyMap = this.index.get(key); } Set<T> objects = keyMap.get(value); if (null == objects) { Set<T> tmpObjects = ConcurrentHashMap.newKeySet(); keyMap.putIfAbsent(value, tmpObjects); objects = keyMap.get(value); } objects.add(element); }

Target:
protected void put(final String key, final Object value, final T element) { Map<Object, Set<T>> keyMap = this.index.get(key); if (null == keyMap) { this.index.putIfAbsent(key, new ConcurrentHashMap<Object, Set<T>>()); keyMap = this.index.get(key); } Set<T> objects = keyMap.get(value); if (null == objects) { keyMap.putIfAbsent(value, ConcurrentHashMap.newKeySet()); objects = keyMap.get(value); } objects.add(element); }
Source:
private String uriWithoutExtension(String requestUri) { int suffixStart = requestUri.lastIndexOf("."); if (suffixStart >= 0) { return requestUri.substring(0, suffixStart); } return null; }

Target:
private String uriWithoutExtension(String requestUri) { int suffixStart = requestUri.lastIndexOf("."); if (suffixStart >= 0) { return requestUri.substring(0, suffixStart); } return requestUri; }
Source:
public void processRequest(HttpExchange httpExchange, HashMap<String, String> paramMap) { Debug.println("/test/vertex", paramMap.toString()); String jobId = paramMap.get(ServerUtils.JOB_ID_KEY); String superstepId = paramMap.get(ServerUtils.SUPERSTEP_ID_KEY); String vertexId = paramMap.get(ServerUtils.VERTEX_ID_KEY); try { if (jobId == null || superstepId == null || vertexId == null) { throw new IllegalArgumentException("Missing mandatory parameters"); } Long superstepNo = Long.parseLong(paramMap.get(ServerUtils.SUPERSTEP_ID_KEY)); if (superstepNo < -1) { this.statusCode = HttpURLConnection.HTTP_BAD_REQUEST; this.response = String.format("%s must be an integer >= -1.", ServerUtils.SUPERSTEP_ID_KEY); return; } GiraphVertexScenarioWrapper giraphScenarioWrapper = ServerUtils.readScenarioFromTrace(jobId, superstepNo, vertexId.trim(), DebugTrace.VERTEX_ALL); ComputationComputeTestGenerator testGenerator = new ComputationComputeTestGenerator(); this.statusCode = HttpURLConnection.HTTP_OK; this.response = testGenerator.generateTest(giraphScenarioWrapper, null ); this.responseContentType = MediaType.TEXT_PLAIN; } catch (IllegalArgumentException e) { this.statusCode = HttpURLConnection.HTTP_BAD_REQUEST; this.response = String.format("Invalid parameters. %s, %s and %s are mandatory parameter.", ServerUtils.JOB_ID_KEY, ServerUtils.SUPERSTEP_ID_KEY, ServerUtils.VERTEX_ID_KEY); } catch (ClassNotFoundException e) { this.statusCode = HttpURLConnection.HTTP_INTERNAL_ERROR; this.response = "Internal Server Error"; } catch (IOException|InstantiationException|IllegalAccessException e) { this.statusCode = HttpURLConnection.HTTP_BAD_REQUEST; this.response = "Could not read the debug trace for this vertex."; } }

Target:
public void processRequest(HttpExchange httpExchange, HashMap<String, String> paramMap) { Debug.println("/test/vertex", paramMap.toString()); String jobId = paramMap.get(ServerUtils.JOB_ID_KEY); String superstepId = paramMap.get(ServerUtils.SUPERSTEP_ID_KEY); String vertexId = paramMap.get(ServerUtils.VERTEX_ID_KEY); try { if (jobId == null || superstepId == null || vertexId == null) { throw new IllegalArgumentException("Missing mandatory parameters"); } Long superstepNo = Long.parseLong(paramMap.get(ServerUtils.SUPERSTEP_ID_KEY)); if (superstepNo < -1) { throw new NumberFormatException(); } GiraphVertexScenarioWrapper giraphScenarioWrapper = ServerUtils.readScenarioFromTrace(jobId, superstepNo, vertexId.trim(), DebugTrace.VERTEX_ALL); ComputationComputeTestGenerator testGenerator = new ComputationComputeTestGenerator(); this.statusCode = HttpURLConnection.HTTP_OK; this.response = testGenerator.generateTest(giraphScenarioWrapper, null ); this.responseContentType = MediaType.TEXT_PLAIN; } catch (Exception e) { this.handleException(e, String.format("Invalid parameters. %s, %s and %s are mandatory parameter.", ServerUtils.JOB_ID_KEY, ServerUtils.SUPERSTEP_ID_KEY, ServerUtils.VERTEX_ID_KEY)); } }
Source:
public void unschedule(String scheduleName) { final ScheduleInfo scheduleInfo = getSchedule(scheduleName); if (scheduleInfo != null) { Launcher launcher = this.taskPlatform.getLaunchers().get(0); launcher.getScheduler().unschedule(scheduleInfo.getScheduleName()); this.auditRecordService.populateAndSaveAuditRecord( AuditOperationType.SCHEDULE, AuditActionType.DELETE, scheduleInfo.getScheduleName(), scheduleInfo.getTaskDefinitionName()); } }

Target:
public void unschedule(String scheduleName) { final ScheduleInfo scheduleInfo = getSchedule(scheduleName); if (scheduleInfo != null) { Launcher launcher = getDefaultLauncher(); launcher.getScheduler().unschedule(scheduleInfo.getScheduleName()); this.auditRecordService.populateAndSaveAuditRecord( AuditOperationType.SCHEDULE, AuditActionType.DELETE, scheduleInfo.getScheduleName(), scheduleInfo.getTaskDefinitionName()); } }
Source:
private CMSFeatureFlags() { this.isDatasetImportEnabled = Boolean.valueOf(getConfigValue(ENABLE_DATASET_IMPORT)); this.isCMDAuthEnabled = Boolean.valueOf(getConfigValue(ENABLE_CMD_AUTH)); info().data(ENABLE_DATASET_IMPORT, isDatasetImportEnabled).log("CMS feature flags configurations"); }

Target:
private CMSFeatureFlags() { this.isDatasetImportEnabled = Boolean.valueOf(getConfigValue(ENABLE_DATASET_IMPORT)); this.isCMDAuthEnabled = Boolean.valueOf(getConfigValue(ENABLE_CMD_AUTH)); info().data(ENABLE_DATASET_IMPORT, isDatasetImportEnabled) .data(ENABLE_CMD_AUTH, isCMDAuthEnabled) .log("CMS feature flags configurations"); }
Source:
public void fire(Project.NameKey project, String ref, ObjectId oldObjectId, ObjectId newObjectId) { ObjectId old = oldObjectId != null ? oldObjectId : ObjectId.zeroId(); Event event = new Event(project, ref, old.name(), newObjectId.name()); for (GitReferenceUpdatedListener l : listeners) { l.onGitReferenceUpdated(event); } }

Target:
public void fire(Project.NameKey project, String ref, ObjectId oldObjectId, ObjectId newObjectId) { ObjectId o = oldObjectId != null ? oldObjectId : ObjectId.zeroId(); ObjectId n = newObjectId != null ? newObjectId : ObjectId.zeroId(); Event event = new Event(project, ref, o.name(), n.name()); for (GitReferenceUpdatedListener l : listeners) { l.onGitReferenceUpdated(event); } }
Source:
public List<CatalogPartitionSpec> listPartitions(ObjectPath tablePath, CatalogPartitionSpec partitionSpec) throws TableNotExistException, TableNotPartitionedException, PartitionNotExistException, CatalogException { checkNotNull(tablePath, "Table path cannot be null"); checkNotNull(partitionSpec, "CatalogPartitionSpec cannot be null"); Table hiveTable = getHiveTable(tablePath); ensurePartitionedTable(tablePath, hiveTable); try { List<String> partialVals = HiveReflectionUtils.getPvals(hiveShim, hiveTable.getPartitionKeys(), partitionSpec.getPartitionSpec()); if (partialVals.size() == 1 && StringUtils.isNullOrWhitespaceOnly(partialVals.get(0))) { throw new PartitionNotExistException(getName(), tablePath, partitionSpec); } else { return client.listPartitionNames(tablePath.getDatabaseName(), tablePath.getObjectName(), partialVals, (short) -1).stream().map(HiveCatalog::createPartitionSpec).collect(Collectors.toList()); } } catch (PartitionNotExistException e) { throw new PartitionNotExistException(getName(), tablePath, partitionSpec, e); } catch (TException e) { throw new CatalogException( String.format("Failed to list partitions of table %s", tablePath), e); } }

Target:
public List<CatalogPartitionSpec> listPartitions(ObjectPath tablePath, CatalogPartitionSpec partitionSpec) throws TableNotExistException, TableNotPartitionedException, PartitionSpecInvalidException, CatalogException { checkNotNull(tablePath, "Table path cannot be null"); checkNotNull(partitionSpec, "CatalogPartitionSpec cannot be null"); Table hiveTable = getHiveTable(tablePath); ensurePartitionedTable(tablePath, hiveTable); checkValidPartitionSpec(partitionSpec, getFieldNames(hiveTable.getPartitionKeys()), tablePath); try { List<String> partialVals = HiveReflectionUtils.getPvals(hiveShim, hiveTable.getPartitionKeys(), partitionSpec.getPartitionSpec()); return client.listPartitionNames(tablePath.getDatabaseName(), tablePath.getObjectName(), partialVals, (short) -1).stream().map(HiveCatalog::createPartitionSpec).collect(Collectors.toList()); } catch (TException e) { throw new CatalogException( String.format("Failed to list partitions of table %s", tablePath), e); } }
Source:
private String getBrowserAcceptHeader(EpdqTemplateData templateData) { return Optional.ofNullable(templateData.getAuthCardDetails().getAcceptHeader()).orElse(DEFAULT_BROWSER_ACCEPT_HEADER); }

Target:
String getBrowserAcceptHeader(EpdqTemplateData templateData) { return super.getBrowserAcceptHeader(templateData); }
Source:
public void itemizeTraceEntry(TimeChartAnalysisEntry timeAnalysisEntry) { Iterator<ITimeEvent> iterator = timeAnalysisEntry.getTimeEventsIterator(); TimeChartEvent event = null; boolean hasNext = true; while (hasNext) { synchronized (timeAnalysisEntry) { hasNext = iterator.hasNext(); while (true) { event = (TimeChartEvent) iterator.next(); if (event.getTime() + event.getDuration() > startTime && event.getTime() < stopTime && event.getDuration() > fMaxDuration && event.getNbEvents() > 1) { break; } } } if (hasNext) { if (event.getItemizedEntry() == null) { itemizeEvent(event); } else { itemizeTraceEntry(event.getItemizedEntry()); } } } }

Target:
public void itemizeTraceEntry(TimeChartAnalysisEntry timeAnalysisEntry) { Iterator<ITimeEvent> iterator = timeAnalysisEntry.getTimeEventsIterator(); TimeChartEvent event = null; boolean hasNext = true; while (hasNext) { synchronized (timeAnalysisEntry) { while ((hasNext = iterator.hasNext()) == true) { event = (TimeChartEvent) iterator.next(); if (event.getTime() + event.getDuration() > startTime && event.getTime() < stopTime && event.getDuration() > fMaxDuration && event.getNbEvents() > 1) { break; } } } if (hasNext && event != null) { if (event.getItemizedEntry() == null) { itemizeEvent(event); } else { itemizeTraceEntry(event.getItemizedEntry()); } } } }
Source:
public PageProperties getProperties() { if (hasProperties()) { return properties; } else { return null; } }

Target:
public PageProperties getProperties() { return properties; }
Source:
@Override public Object execute(GridClientConfiguration clientCfg, Logger log) throws Exception { try (GridClient client = Command.startClient(clientCfg)) { VisorCacheGroupEncryptionTaskResult<Double> res = executeTaskByNameOnNode( client, VisorReencryptionRateTask.class.getName(), taskArg, BROADCAST_UUID, clientCfg ); boolean read = taskArg.rate() == null; Map<UUID, IgniteException> exceptions = res.exceptions(); for (Map.Entry<UUID, IgniteException> entry : exceptions.entrySet()) { log.info(INDENT + "Node " + entry.getKey() + ":"); log.info(String.format("%sfailed to %s re-encryption rate: %s.", DOUBLE_INDENT, (read ? "get" : "limit"), entry.getValue().getMessage())); } Map<UUID, Double> results = res.results(); for (Map.Entry<UUID, Double> entry : results.entrySet()) { log.info(INDENT + "Node " + entry.getKey() + ":"); double rateLimit = read ? entry.getValue() : taskArg.rate(); if (rateLimit == 0) log.info(DOUBLE_INDENT + "re-encryption rate is not limited."); else { log.info(String.format("%sre-encryption rate %s limited to %.2f MB/s.", DOUBLE_INDENT, (read ? "is" : "has been"), rateLimit)); } } return null; } catch (Throwable e) { log.severe("Failed to perform operation."); log.severe(CommandLogger.errorMessage(e)); throw e; } }

Target:
@Override public Object execute(GridClientConfiguration clientCfg, Logger log) throws Exception { try (GridClient client = Command.startClient(clientCfg)) { VisorCacheGroupEncryptionTaskResult<Double> res = executeTaskByNameOnNode( client, VisorReencryptionRateTask.class.getName(), taskArg, BROADCAST_UUID, clientCfg ); Map<UUID, IgniteException> exceptions = res.exceptions(); for (Map.Entry<UUID, IgniteException> entry : exceptions.entrySet()) { log.info(INDENT + "Node " + entry.getKey() + ":"); log.info(DOUBLE_INDENT + "failed to get/set re-encryption rate limit: " + entry.getValue().getMessage()); } Map<UUID, Double> results = res.results(); boolean read = taskArg.rate() == null; for (Map.Entry<UUID, Double> entry : results.entrySet()) { log.info(INDENT + "Node " + entry.getKey() + ":"); double rateLimit = read ? entry.getValue() : taskArg.rate(); if (rateLimit == 0) log.info(DOUBLE_INDENT + "re-encryption rate is not limited."); else { log.info(String.format("%sre-encryption rate %s limited to %.2f MB/s.", DOUBLE_INDENT, (read ? "is" : "has been"), rateLimit)); } } if (read) return null; log.info(""); log.info("Note: the changed value of the re-encryption rate limit is not persisted. " + "When the node is restarted, the value will be set from the configuration."); log.info(""); return null; } catch (Throwable e) { log.severe("Failed to perform operation."); log.severe(CommandLogger.errorMessage(e)); throw e; } }
Source:
public void testTLSDefaults() throws Exception { final LogContext logContext = new LogContext(); sslServerConfigs = serverCertStores.getTrustingConfig(clientCertStores); sslClientConfigs = clientCertStores.getTrustingConfig(serverCertStores); assertEquals(SslConfigs.DEFAULT_SSL_PROTOCOL, sslServerConfigs.get(SslConfigs.SSL_PROTOCOL_CONFIG)); assertEquals(SslConfigs.DEFAULT_SSL_PROTOCOL, sslClientConfigs.get(SslConfigs.SSL_PROTOCOL_CONFIG)); channelBuilder = new SslChannelBuilder(Mode.CLIENT, null, false, logContext); channelBuilder.configure(sslServerConfigs); selector = new Selector(5000, new Metrics(), time, "MetricGroup", channelBuilder, logContext); server = createEchoServer(SecurityProtocol.SSL); createSelector(sslClientConfigs); final String node = "0"; InetSocketAddress addr = new InetSocketAddress("localhost", server.port()); selector.connect(node, addr, BUFFER_SIZE, BUFFER_SIZE); NetworkTestUtils.waitForChannelClose(selector, node, ChannelState.State.READY); server.verifyAuthenticationMetrics(1, 0); }

Target:
public void testTLSDefaults() throws Exception { sslServerConfigs = serverCertStores.getTrustingConfig(clientCertStores); sslClientConfigs = clientCertStores.getTrustingConfig(serverCertStores); assertEquals(SslConfigs.DEFAULT_SSL_PROTOCOL, sslServerConfigs.get(SslConfigs.SSL_PROTOCOL_CONFIG)); assertEquals(SslConfigs.DEFAULT_SSL_PROTOCOL, sslClientConfigs.get(SslConfigs.SSL_PROTOCOL_CONFIG)); server = createEchoServer(SecurityProtocol.SSL); createSelector(sslClientConfigs); InetSocketAddress addr = new InetSocketAddress("localhost", server.port()); selector.connect("0", addr, BUFFER_SIZE, BUFFER_SIZE); NetworkTestUtils.checkClientConnection(selector, "0", 10, 100); server.verifyAuthenticationMetrics(1, 0); selector.close(); checkAuthentiationFailed("1", "TLSv1.1"); server.verifyAuthenticationMetrics(1, 1); checkAuthentiationFailed("2", "TLSv1"); server.verifyAuthenticationMetrics(1, 2); }
Source:
private List<ProgramEnrollment> filterPrograms(List<ProgramEnrollment> programEnrollments, String programName, String activeProgram) { List<ProgramEnrollment> programEnrollmentsList; List<ProgramEnrollment> result; programEnrollmentsList = filterByProgramName(programEnrollments, programName); result = isActiveProgram(activeProgram) ? filterByActiveProgramOnly(programEnrollmentsList) : programEnrollmentsList; return result; }

Target:
private List<ProgramEnrollment> filterPrograms(List<ProgramEnrollment> programEnrollments, String programName, String activeProgram) { List<ProgramEnrollment> programEnrollmentsList = filterByProgramName(programEnrollments, programName); List<ProgramEnrollment> result; result = isActiveProgram(activeProgram) ? filterByActiveProgramOnly(programEnrollmentsList) : programEnrollmentsList; return result; }
Source:
public static Instant parseInstant(String value) { DateTimeFormatter formatter = DateTimeFormatter.ISO_INSTANT; try { return Instant.parse( value ); } catch (DateTimeParseException e) { throw log.unableToParseTemporal( Instant.class, value, formatter, e ); } }

Target:
public static Instant parseInstant(String value) { try { return Instant.parse( value ); } catch (DateTimeParseException e) { throw log.unableToParseTemporal( Instant.class, value, DateTimeFormatter.ISO_INSTANT, e ); } }
Source:
public void fetchLogs() { try { HttpResponse resp = client.execute(getLogRequest(false)); parseResponse(resp); } catch (IOException exp) { callback.error(exp.getMessage()); } finally { callback.close(); } }

Target:
public void fetchLogs() { try { callback.open(); HttpResponse resp = client.execute(getLogRequest(false)); parseResponse(resp); } catch (IOException exp) { callback.error(exp.getMessage()); } finally { callback.close(); } }
Source:
public void testTransferSizeUploadFileCOW() { DiskImage readyImage = initReadyImageForUpload(); readyImage.setVolumeFormat(VolumeFormat.COW); readyImage.setStorageTypes(Collections.singletonList(StorageType.NFS)); transferImageCommand.getParameters().setTransferType(TransferType.Upload); transferImageCommand.handleImageIsReadyForTransfer(); assertEquals(transferImageCommand.getParameters().getTransferSize(), Math.ceil(readyImage.getSize() * StorageConstants.QCOW_OVERHEAD_FACTOR) + StorageConstants.QCOW_MINIMAL_OVERHEAD); }

Target:
public void testTransferSizeUploadFileCOW() { DiskImage readyImage = initReadyImageForUpload(); readyImage.setVolumeFormat(VolumeFormat.COW); readyImage.setStorageTypes(Collections.singletonList(StorageType.NFS)); readyImage.setSize(393216L); transferImageCommand.getParameters().setTransferType(TransferType.Upload); transferImageCommand.handleImageIsReadyForTransfer(); assertTrue(transferImageCommand.getParameters().getTransferSize() > readyImage.getSize() * StorageConstants.QCOW_OVERHEAD_FACTOR); }
Source:
public void entryIngested( T entry, GeoWaveRow... rows ) { if (rows != null) { if (rows.length == 1) { getPartitionStatistic( getPartitionKey(rows[0].getPartitionKey())).entryIngested( entry, rows); } else { Map<ByteArrayId, List<GeoWaveRow>> rowsPerPartition = new HashMap<>(); for (final GeoWaveRow row : rows) { ByteArrayId p = getPartitionKey(row.getPartitionKey()); List<GeoWaveRow> r = rowsPerPartition.get(p); if (r == null) { r = new ArrayList<>(); rowsPerPartition.put( p, r); } r.add(row); } for (Entry<ByteArrayId, List<GeoWaveRow>> e : rowsPerPartition.entrySet()) { getPartitionStatistic( e.getKey()).entryIngested( entry, e.getValue().toArray( new GeoWaveRow[e.getValue().size()])); } } } }

Target:
public void entryIngested( T entry, GeoWaveRow... rows ) { if (rows != null) { for (final GeoWaveRow row : rows) { getPartitionStatistic( getPartitionKey(row.getPartitionKey())).entryIngested( entry, row); } } }
Source:
public ScpCommand(String remoteHost, String fromFile, String toFile, boolean isDir) { super(new String[]{}); String template = "scp %s %s:%s localhost:%s"; if (isDir) { template = "scp -r %s %s:%s localhost:%s"; } mCommand = new String[]{"bash", "-c", String.format(template, ShellUtils.COMMON_SSH_OPTS, remoteHost, fromFile, toFile) }; mHostName = remoteHost; }

Target:
public ScpCommand(String remoteHost, String fromFile, String toFile, boolean isDir) { super(new String[]{"bash", "-c", String.format(isDir ? "scp -r %s %s:%s localhost:%s" : "scp %s %s:%s localhost:%s", ShellUtils.COMMON_SSH_OPTS, remoteHost, fromFile, toFile) }); mHostName = remoteHost; }
Source:
private CacheTopology buildCacheTopology(List<Address> clusterMembers, List<CacheTopology> partitionTopologies) { log.trace("buildCacheTopology"); int unionTopologyId = 0; ConsistentHash currentCHUnion = null; ConsistentHashFactory chFactory = getJoinInfo().getConsistentHashFactory(); ConsistentHash latestTopologyCh = null; for (CacheTopology topology : partitionTopologies) { if (topology.getTopologyId() > unionTopologyId) { unionTopologyId = topology.getTopologyId(); latestTopologyCh = topology.getCurrentCH(); } if (currentCHUnion == null) { currentCHUnion = topology.getCurrentCH(); } else { currentCHUnion = chFactory.union(currentCHUnion, topology.getCurrentCH()); } } updateClusterMembers(clusterMembers); List<Address> members = getMembers(); if (members.isEmpty()) { log.tracef("Cache %s has no members left, skipping topology update", cacheName); return null; } if (currentCHUnion != null) { currentCHUnion = chFactory.updateMembers(currentCHUnion, members, getCapacityFactors()); } unionTopologyId += 2; return new CacheTopology(unionTopologyId, currentCHUnion, null, isMissingData(latestTopologyCh, clusterMembers)); }

Target:
private CacheTopology buildCacheTopology(List<Address> clusterMembers, List<CacheTopology> partitionTopologies) { log.trace("buildCacheTopology"); int unionTopologyId = 0; ConsistentHash currentCHUnion = null; ConsistentHashFactory chFactory = getJoinInfo().getConsistentHashFactory(); ConsistentHash latestTopologyCh = null; for (CacheTopology topology : partitionTopologies) { if (topology.getTopologyId() > unionTopologyId) { unionTopologyId = topology.getTopologyId(); latestTopologyCh = topology.getCurrentCH(); } if (currentCHUnion == null) { currentCHUnion = topology.getCurrentCH(); } else { currentCHUnion = chFactory.union(currentCHUnion, topology.getCurrentCH()); } } updateClusterMembers(clusterMembers); List<Address> members = getMembers(); if (members.isEmpty()) { log.tracef("Cache %s has no members left, skipping topology update", cacheName); return null; } if (currentCHUnion != null) { currentCHUnion = chFactory.updateMembers(currentCHUnion, members, getCapacityFactors()); } unionTopologyId += 2; return new CacheTopology(unionTopologyId, currentCHUnion, null, isDataLost(latestTopologyCh, clusterMembers)); }
Source:
public Set<java.util.Map.Entry<K, V>> entrySet() { return hashOps.entries().entrySet(); }

Target:
public Set<java.util.Map.Entry<K, V>> entrySet() { Map<K, V> entries = hashOps.entries(); checkResult(entries); return entries.entrySet(); }
Source:
protected String getQuickAccessTriggerSequenceFormat() { if (triggerSequenceFormat == null) { IBindingService bindingService = SearchField.this.window.getContext().get(IBindingService.class); for (Binding b : bindingService.getBindings()) { if (b.getParameterizedCommand() != null && QUICK_ACCESS_COMMAND_ID.equalsIgnoreCase(b.getParameterizedCommand().getId())) { this.triggerSequenceFormat = b.getTriggerSequence().format(); break; } } } return triggerSequenceFormat; }

Target:
public String getQuickAccessTriggerSequenceFormat() { if (quickAccessTriggerSequenceFormat == null) { updateQuickAccessTriggerSequenceFormat(); } return quickAccessTriggerSequenceFormat; }
Source:
public final void setup(final Channel channel, final CommandReceiver receiver) { this.channel = channel; setup(new ByteArrayReceiver() { public void handle(byte[] payload) { try { Command cmd = Command.readFrom(channel, payload); } catch (IOException | ClassNotFoundException e) { LOGGER.log(Level.WARNING, "Failed to construct Command in channel " + channel.getName(), e); } } public void terminate(IOException e) { receiver.terminate(e); } }); }

Target:
public final void setup(final Channel channel, final CommandReceiver receiver) { this.channel = channel; setup(new ByteArrayReceiver() { public void handle(byte[] payload) { try { Command cmd = Command.readFrom(channel, payload); receiver.handle(cmd); } catch (IOException | ClassNotFoundException e) { LOGGER.log(Level.WARNING, "Failed to construct Command in channel " + channel.getName(), e); } } public void terminate(IOException e) { receiver.terminate(e); } }); }