auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>public IStructuredSelection findSelection(IEditorInput anInput) { IFile file = ResourceUtil.getFile(anInput); if (file != null) { try { String traceTypeId = file.getPersistentProperty(TmfCommonConstants.TRACETYPE); if (traceTypeId == null) { return StructuredSelection.EMPTY; } final TmfNavigatorContentProvider ncp = new TmfNavigatorContentProvider(); ncp.getChildren(file.getProject()); final TmfProjectElement project = TmfProjectRegistry.getProject(file.getProject()); if (traceTypeId.equals(TmfExperiment.class.getCanonicalName())) { for (final ITmfProjectModelElement projectElement : project.getExperimentsFolder().getChildren()) { if (projectElement.getName().equals(file.getParent().getName())) { return new StructuredSelection(projectElement); } } } else if (traceTypeId.equals(TmfTrace.class.getCanonicalName())) { for (final ITmfProjectModelElement projectElement : project.getTracesFolder().getChildren()) { if (projectElement.getName().equals(file.getParent().getName())) { return new StructuredSelection(projectElement); } } } else { for (final ITmfProjectModelElement projectElement : project.getTracesFolder().getChildren()) { <START> if ((projectElement.getResource().equals(file)) || (projectElement.getName().equals(file.getParent().getName()))) { <END> return new StructuredSelection(projectElement); } } } } catch (CoreException e) { return StructuredSelection.EMPTY; } } return StructuredSelection.EMPTY; }</code><technical_language>part of if-clause is unnecessary, file's parent is Traces folder</technical_language>

Target:
public IStructuredSelection findSelection(IEditorInput anInput) { IFile file = ResourceUtil.getFile(anInput); if (file != null) { try { String traceTypeId = file.getPersistentProperty(TmfCommonConstants.TRACETYPE); if (traceTypeId == null) { return StructuredSelection.EMPTY; } final TmfNavigatorContentProvider ncp = new TmfNavigatorContentProvider(); ncp.getChildren(file.getProject()); final TmfProjectElement project = TmfProjectRegistry.getProject(file.getProject()); if (traceTypeId.equals(TmfExperiment.class.getCanonicalName())) { for (final ITmfProjectModelElement projectElement : project.getExperimentsFolder().getChildren()) { if (projectElement.getName().equals(file.getParent().getName())) { return new StructuredSelection(projectElement); } } } else if (traceTypeId.equals(TmfTrace.class.getCanonicalName())) { for (final ITmfProjectModelElement projectElement : project.getTracesFolder().getChildren()) { if (projectElement.getName().equals(file.getParent().getName())) { return new StructuredSelection(projectElement); } } } else { for (final ITmfProjectModelElement projectElement : project.getTracesFolder().getChildren()) { if (projectElement.getResource().equals(file)) { return new StructuredSelection(projectElement); } } } } catch (CoreException e) { return StructuredSelection.EMPTY; } } return StructuredSelection.EMPTY; }
Source:
<code>public Layer instantiate(NeuralNetConfiguration conf, Collection<IterationListener> iterationListeners, int layerIndex, INDArray layerParamsView, boolean initializeParams) { <START> LayerValidation.assertNInNOutSet("GravesLSTM", getLayerName(), layerIndex, getNIn(), getNOut()); <END> org.deeplearning4j.nn.layers.recurrent.LSTM ret = new org.deeplearning4j.nn.layers.recurrent.LSTM(conf); ret.setListeners(iterationListeners); ret.setIndex(layerIndex); ret.setParamsViewArray(layerParamsView); Map<String, INDArray> paramTable = initializer().init(conf, layerParamsView, initializeParams); ret.setParamTable(paramTable); ret.setConf(conf); return ret; }</code><technical_language>this LSTM GravesLSTM</technical_language>

Target:
public Layer instantiate(NeuralNetConfiguration conf, Collection<IterationListener> iterationListeners, int layerIndex, INDArray layerParamsView, boolean initializeParams) { LayerValidation.assertNInNOutSet("LSTM", getLayerName(), layerIndex, getNIn(), getNOut()); org.deeplearning4j.nn.layers.recurrent.LSTM ret = new org.deeplearning4j.nn.layers.recurrent.LSTM(conf); ret.setListeners(iterationListeners); ret.setIndex(layerIndex); ret.setParamsViewArray(layerParamsView); Map<String, INDArray> paramTable = initializer().init(conf, layerParamsView, initializeParams); ret.setParamTable(paramTable); ret.setConf(conf); return ret; }
Source:
<code>protected void after(ActionInvocation invocation, String result) throws Exception { <START> Map<String, Object> ses = ActionContext.getContext().getSession(); <END> if ( ses != null) { unlock(ses); } }</code><technical_language>local variable ses replaced session (e.g. in before()). here: Map<String, Object> session = ActionContext.getContext().getSession(); if (session != null) { unlock(session); }</technical_language>

Target:
protected void after(ActionInvocation invocation, String result) throws Exception { Map<String, Object> session = ActionContext.getContext().getSession(); if ( session != null) { unlock(session); } }
Source:
<code>private boolean fillPossiblePathsToTarget(Class<?> targetType, Class<?> currentType, Set<Class<?>> result, Map<Class<?>, Boolean> visitedTypes, boolean isStart) { if (targetType.equals(currentType)) { if (isStart) { <START> if (!result.contains(currentType)) { <END> result.add(currentType); } } return true; } List<Class<?>> options = CanonicalPath.VALID_PROGRESSIONS.get(currentType); if (options == null || options.isEmpty()) { return false; } if (options != null && options.contains(targetType) && isStart) { result.add(targetType); return true; } boolean matched = false; for (Class<?> option : options) { if (!visitedTypes.containsKey(option)) { visitedTypes.put(option, false); if (fillPossiblePathsToTarget(targetType, option, result, visitedTypes, false)) { if (isStart) { result.add(option); } visitedTypes.put(option, true); matched = true; } } else { matched |= visitedTypes.get(option); } } return matched; }</code><technical_language>Is this necessary? result is a set, a straight add cheaper a check + add - try if element is present</technical_language>

Target:
private boolean fillPossiblePathsToTarget(Class<?> targetType, Class<?> currentType, Set<Class<?>> result, Map<Class<?>, Boolean> visitedTypes, boolean isStart) { if (targetType.equals(currentType)) { if (isStart) { result.add(currentType); } return true; } List<Class<?>> options = CanonicalPath.VALID_PROGRESSIONS.get(currentType); if (options == null || options.isEmpty()) { return false; } if (options != null && options.contains(targetType) && isStart) { result.add(targetType); return true; } boolean matched = false; for (Class<?> option : options) { if (!visitedTypes.containsKey(option)) { visitedTypes.put(option, false); if (fillPossiblePathsToTarget(targetType, option, result, visitedTypes, false)) { if (isStart) { result.add(option); } visitedTypes.put(option, true); matched = true; } } else { matched |= visitedTypes.get(option); } } return matched; }
Source:
<code>public void onActivityResumed(Activity activity) { <START> if (isInBackground) { <END> isInBackground = false; for (Pojo pojo : KissApplication.getApplication(activity).getDataHandler().getApplications()) { if (!(pojo instanceof AppPojo)) continue; AppPojo appPojo = (AppPojo) pojo; ComponentName componentName = new ComponentName(appPojo.packageName, appPojo.activityName); MemoryCacheHelper.cacheAppIconDrawable(activity, componentName, appPojo.userHandle); } } }</code><technical_language>possibilities: 1. icons loaded in memory. 2. icons loaded in memory. of involve checking if app background. that: MemoryCacheHelper.cacheAppIconDrawable(activity, componentName, appPojo.userHandle); checks if icons loaded. change function name loadAppIconDrawableIfNecessary() check for a boolean (and remove background checks)</technical_language>

Target:
public void onActivityResumed(Activity activity) { for (Pojo pojo : KissApplication.getApplication(activity).getDataHandler().getApplications()) { if (!(pojo instanceof AppPojo)) continue; AppPojo appPojo = (AppPojo) pojo; ComponentName componentName = new ComponentName(appPojo.packageName, appPojo.activityName); MemoryCacheHelper.cacheAppIconDrawable(activity, componentName, appPojo.userHandle); } }
Source:
<code><START> private void populateReviews(List<TaskReview> reviewContainers) { <END> for (ITask review : reviews) { try { int codeReviewVal = Integer.parseInt(review.getAttribute(Messages.CodeReviewAttribute)); int verifiedVal = Integer.parseInt(review.getAttribute(Messages.VerifiedAttribute)); reviewContainers.add(new TaskReview(review.getSummary(), codeReviewVal, verifiedVal, "")); hasIncoming = true; } catch (NumberFormatException e) { StatusHandler .log(new Status(IStatus.ERROR, ID_TASK_EDITOR_REVIEWS_PART, "Error parsing to integer", e)); } } }</code><technical_language>Is reviewContainers used? member inside</technical_language>

Target:
private void populateReviews(List<TaskReview> reviewContainers) throws NumberFormatException { for (ITask review : reviews) { int codeReviewVal = Integer .parseInt(review.getAttribute(Messages.TaskEditorReviewsPart_CodeReviewAttribute)); int verifiedVal = Integer.parseInt(review.getAttribute(Messages.TaskEditorReviewsPart_VerifiedAttribute)); boolean incoming = false; if (review.getSynchronizationState() == ITask.SynchronizationState.INCOMING) { hasIncoming = true; incoming = true; } reviewContainers.add( new TaskReview(review.getSummary(), codeReviewVal, verifiedVal, "", incoming, review.getUrl())); } }
Source:
<code>public Response<Certificate> mergeCertificateWithResponse(MergeCertificateOptions mergeCertificateConfig, Context context) { <START> Objects.requireNonNull(mergeCertificateConfig, "The merge certificate configuration cannot be null."); <END> return client.mergeCertificateWithResponse(mergeCertificateConfig, context).block(); }</code><technical_language>suggestion Objects.requireNonNull(mergeCertificateConfig, "'mergeCertificateConfig' null.");</technical_language>

Target:
public Response<Certificate> mergeCertificateWithResponse(MergeCertificateOptions mergeCertificateConfig, Context context) { Objects.requireNonNull(mergeCertificateConfig, "'mergeCertificateConfig' cannot be null."); return client.mergeCertificateWithResponse(mergeCertificateConfig, context).block(); }
Source:
<code>public static String modPtr(Element propertyOrParameter) { <START> String ptr = ""; END> Ptr cppPtr = UMLUtil.getStereotypeApplication(propertyOrParameter, Ptr.class); if (cppPtr != null) { ptr = (cppPtr.getDeclaration() != null) ? cppPtr.getDeclaration() : "*"; } else { if (propertyOrParameter instanceof Property) { if (((Property) propertyOrParameter).getAggregation() == AggregationKind.SHARED_LITERAL) { ptr += "*"; } else { ptr = ""; } } else { ptr = ""; } } boolean ptrOrRef = GenUtils.hasStereotype(propertyOrParameter, Ref.class) || GenUtils.hasStereotype(propertyOrParameter, Ptr.class); if (propertyOrParameter instanceof Parameter) { ParameterDirectionKind directionKind = ((Parameter) propertyOrParameter).getDirection(); if (directionKind == ParameterDirectionKind.OUT_LITERAL || directionKind == ParameterDirectionKind.INOUT_LITERAL) { if (!ptrOrRef) { ptr += CppCodeGenUtils.getOutInoutOp(); } } } return ptr; }</code><technical_language>Remove this initialisation (not required more, if replace += below)</technical_language>

Target:
public static String modPtr(Element propertyOrParameter) { String ptr; Ptr cppPtr = UMLUtil.getStereotypeApplication(propertyOrParameter, Ptr.class); if (cppPtr != null) { ptr = (cppPtr.getDeclaration() != null) ? cppPtr.getDeclaration() : "*"; } else { if (propertyOrParameter instanceof Property && ((Property) propertyOrParameter).getAggregation() == AggregationKind.SHARED_LITERAL) { ptr = "*"; } else { ptr = ""; } } boolean ptrOrRef = GenUtils.hasStereotype(propertyOrParameter, Ref.class) || GenUtils.hasStereotype(propertyOrParameter, Ptr.class); if (propertyOrParameter instanceof Parameter) { ParameterDirectionKind directionKind = ((Parameter) propertyOrParameter).getDirection(); if (directionKind == ParameterDirectionKind.OUT_LITERAL || directionKind == ParameterDirectionKind.INOUT_LITERAL) { if (!ptrOrRef) { ptr += CppCodeGenUtils.getOutInoutOp(); } } } return ptr; }
Source:
<code>public void removeVariable(final String identifier) { Variable variable = getVariable(identifier); if (variable == null) <START> throw new RuntimeException("variable identifier to remove <" + identifier + "> not found."); <END> fVariables.remove(variable); }</code><technical_language>throw exception here, simply ignore</technical_language>

Target:
public void removeVariable(final String identifier) { Variable variable = getVariable(identifier); if (variable == null) return; removeVariable(variable); }
Source:
<code>public void cancel(@Nullable Call<?> call) { if (call == null) { return; } call.cancel(); <START> call = null; <END> }</code><technical_language>set a reference copy null</technical_language>

Target:
public void cancel(@Nullable Call<?> call) { if (call == null) { return; } call.cancel(); }
Source:
<code>@Override public void closeConnection() { try { <START> if (subscription != null) subscription.close(); <END> if (connection != null) connection.close(); } catch (Exception e) { log.error("An error occurred while closing the connection. ", e); } connection = null; subscription = null; }</code><technical_language>is technically correct braces for a single line statement inside, is if add braces for clarity</technical_language>

Target:
@Override public void closeConnection() { try { if (subscription != null) { subscription.close(); } if (connection != null) { connection.close(); } } catch (InterruptedException | IOException | TimeoutException e) { log.error("An error occurred while closing the connection. ", e); } connection = null; subscription = null; }
Source:
<code>public static List<String> extractTags(final List<String> repoTags) { if(repoTags.isEmpty()) { return Collections.emptyList(); } final List<String> tags = new ArrayList<>(); for(String repoTag : repoTags) { final int indexOfColonChar = repoTag.indexOf(':'); if(indexOfColonChar == -1) { continue; } tags.add(repoTag.substring(indexOfColonChar+1)); } <START> Collections.sort(tags); <END> return tags; }</code><technical_language>order matter ? is sorting UI do model</technical_language>

Target:
public static List<String> extractTags(final List<String> repoTags) { if(repoTags.isEmpty()) { return Collections.emptyList(); } final List<String> tags = new ArrayList<>(); for(String repoTag : repoTags) { final int indexOfColonChar = repoTag.indexOf(':'); if(indexOfColonChar == -1) { continue; } tags.add(repoTag.substring(indexOfColonChar+1)); } return tags; }
Source:
<code>public Optional<ConsumerGroup> describeConsumerGroup(SubscriptionName subscription) { ConsumerGroupId consumerGroupId = kafkaNamesMapper.toConsumerGroupId(subscription); try { return describeConsumerGroup(consumerGroupId); } catch (Exception e) { <START> logger.error("Failed to describe group with id: " + consumerGroupId.asString(), e); <END> return Optional.empty(); } }</code><technical_language>avoid string concatenation logging: java logger.error("Failed describe group id: {}", consumerGroupId.asString(), e);</technical_language>

Target:
public Optional<ConsumerGroup> describeConsumerGroup(SubscriptionName subscription) { ConsumerGroupId consumerGroupId = kafkaNamesMapper.toConsumerGroupId(subscription); try { return describeConsumerGroup(consumerGroupId); } catch (Exception e) { logger.error("Failed to describe group with id: {}", consumerGroupId.asString(), e); return Optional.empty(); } }
Source:
<code>private void getAccessToken(String code) { OkHttpClient client = new OkHttpClient(); Request request = new Request.Builder() .addHeader("User-Agent", "Android Dev Preview") .addHeader("Content-Type", "application/x-www-form-urlencoded") .url(ACCESS_TOKEN_URL) .post(RequestBody.create(MediaType.parse("application/x-www-form-urlencoded"), "grant_type=authorization_code&client_id=" + CLIENT_ID + "&client_secret=" + CLIENT_SECRET + "&redirect_uri=" + REDIRECT_URI + "&code=" + code)) .build(); <START> client.newCall(request).enqueue(new okhttp3.Callback() { <END> @Override public void onFailure(okhttp3.Call call, IOException exception) { } @Override public void onResponse(okhttp3.Call call, okhttp3.Response response) throws IOException { String json = response.body().string(); JSONObject data = null; try { data = new JSONObject(json); String accessToken = data.optString("access_token"); try { getUsernameFromJwt(accessToken); } catch (Exception exception) { exception.printStackTrace(); } getUserInfo(username, accessToken); } catch (JSONException exception) { exception.printStackTrace(); } } }); }</code><technical_language>do need okhttp3? Retrofit2 okhttp3. Is special case get Retrofit2</technical_language>

Target:
private void getAccessToken(String code) { String clientSecret = getString(R.string.mapbox_auth_flow_secret); Log.d("AccountRetrievalService", "getAccessToken: clientSecret = " + clientSecret); OkHttpClient client = new OkHttpClient(); Request request = new Request.Builder() .addHeader("User-Agent", "Android Dev Preview") .addHeader("Content-Type", "application/x-www-form-urlencoded") .url(ACCESS_TOKEN_URL) .post(RequestBody.create(MediaType.parse("application/x-www-form-urlencoded"), "grant_type=authorization_code&client_id=" + clientId + "&client_secret=" + clientSecret + "&redirect_uri=" + redirectUri + "&code=" + code)) .build(); client.newCall(request).enqueue(new okhttp3.Callback() { @Override public void onFailure(okhttp3.Call call, IOException exception) { Log.d("AccountRetrievalService", "onFailure: " + exception); } @Override public void onResponse(okhttp3.Call call, okhttp3.Response response) throws IOException { String json = response.body().string(); try { JSONObject data = new JSONObject(json); String accessToken = data.optString("access_token"); try { getUsernameFromJwt(accessToken); } catch (Exception exception) { exception.printStackTrace(); } getUserInfo(username, accessToken); } catch (JSONException exception) { exception.printStackTrace(); } } }); }
Source:
<code>public JwtAuthenticationToken build() { final Jwt token = jwt.build(); <START> return new JwtAuthenticationToken(token, authoritiesConverter.convert(token)); <END> }</code><technical_language>this out user do jwt -> jwt.claim("scope", Arrays.asList(scopes))</technical_language>

Target:
public JwtAuthenticationToken build() { final Jwt token = jwt.build(); return new JwtAuthenticationToken(token, getAuthorities(token)); }
Source:
<code>private ResultScanner<Row> streamRows(ReadRowsRequest request) { boolean isGet = request.getTargetCase() == ReadRowsRequest.TargetCase.ROW_KEY; <START> PooledChannel reservedChannel = isGet ? null : channelPool.reserveChannel(); <END> Channel channel = isGet ? channelPool : reservedChannel; if (isGet) { reservedChannel = null; channel = channelPool; } else { reservedChannel = channelPool.reserveChannel(); channel = reservedChannel; } ClientCall<ReadRowsRequest, ReadRowsResponse> readRowsCall = channel.newCall(BigtableServiceGrpc.METHOD_READ_ROWS, CallOptions.DEFAULT); CancellationToken cancellationToken = createCancellationToken(reservedChannel, readRowsCall); int timeout = retryOptions.getReadPartialRowTimeoutMillis(); int streamingBufferSize = retryOptions.getStreamingBufferSize(); int batchRequestSize = retryOptions.getStreamingBatchSize(); ResponseQueueReader responseQueueReader = new ResponseQueueReader(timeout, streamingBufferSize, batchRequestSize, batchRequestSize, readRowsCall); StreamingBigtableResultScanner resultScanner = new StreamingBigtableResultScanner(responseQueueReader, cancellationToken); clientCallService.asyncServerStreamingCall( readRowsCall, request, createClientCallListener(reservedChannel, resultScanner)); if (batchRequestSize > 1) { readRowsCall.request(batchRequestSize - 1); } return resultScanner; }</code><technical_language>Channel channel = channelPool; if (!isGet) { channel = channelPool.reserveChannel(); } ... CancellationToken cancellationToken = createCancellationToken(channel, readRowsCall);</technical_language>

Target:
private ResultScanner<Row> streamRows(ReadRowsRequest request) { boolean isGet = request.getTargetCase() == ReadRowsRequest.TargetCase.ROW_KEY; Channel channel = isGet ? channelPool : channelPool.reserveChannel(); ClientCall<ReadRowsRequest, ReadRowsResponse> readRowsCall = channel.newCall(BigtableServiceGrpc.METHOD_READ_ROWS, CallOptions.DEFAULT); CancellationToken cancellationToken = createCancellationToken(channel, readRowsCall); int timeout = retryOptions.getReadPartialRowTimeoutMillis(); int streamingBufferSize = retryOptions.getStreamingBufferSize(); int batchRequestSize = retryOptions.getStreamingBatchSize(); ResponseQueueReader responseQueueReader = new ResponseQueueReader(timeout, streamingBufferSize, batchRequestSize, batchRequestSize, readRowsCall); StreamingBigtableResultScanner resultScanner = new StreamingBigtableResultScanner(responseQueueReader, cancellationToken); clientCallService.asyncServerStreamingCall( readRowsCall, request, createClientCallListener(channel, resultScanner)); if (batchRequestSize > 1) { readRowsCall.request(batchRequestSize - 1); } return resultScanner; }
Source:
<code>public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) { super.onCreateView(inflater, container, savedInstanceState); View root = inflater.inflate(R.layout.nav_list, container, false); ListView navList = root.findViewById(R.id.nav_list); navAdapter = new NavListAdapter(itemAccess, getActivity()); navList.setAdapter(navAdapter); navList.setOnItemClickListener(this); navList.setOnItemLongClickListener(this); registerForContextMenu(navList); updateSelection(); root.findViewById(R.id.nav_settings).setOnClickListener(v -> startActivity(new Intent(getActivity(), PreferenceActivity.class))); getContext().getSharedPreferences(PREF_NAME, Context.MODE_PRIVATE) .registerOnSharedPreferenceChangeListener(this); progressBar = root.findViewById(R.id.progressBar); <START> progressBar.bringToFront(); <END> return root; }</code><technical_language>Instead of calling this, please move progress bar in layout xml file</technical_language>

Target:
public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) { super.onCreateView(inflater, container, savedInstanceState); View root = inflater.inflate(R.layout.nav_list, container, false); progressBar = root.findViewById(R.id.progressBar); ListView navList = root.findViewById(R.id.nav_list); navAdapter = new NavListAdapter(itemAccess, getActivity()); navList.setAdapter(navAdapter); navList.setOnItemClickListener(this); navList.setOnItemLongClickListener(this); registerForContextMenu(navList); updateSelection(); root.findViewById(R.id.nav_settings).setOnClickListener(v -> startActivity(new Intent(getActivity(), PreferenceActivity.class))); getContext().getSharedPreferences(PREF_NAME, Context.MODE_PRIVATE) .registerOnSharedPreferenceChangeListener(this); return root; }
Source:
<code>public void setMap(MapBean map) { this.map = map; Image image; if (map.getLargeThumbnailUrl() != null) { image = mapService.loadPreview(map.getLargeThumbnailUrl(), PreviewSize.LARGE); } else { image = IdenticonUtil.createIdenticon(map.getId()); } thumbnailImageView.setImage(image); nameLabel.setText(map.getDisplayName()); authorLabel.setText(Optional.ofNullable(map.getAuthor()).orElse(i18n.get("map.unknownAuthor"))); numberOfPlaysLabel.setText(i18n.number(map.getNumberOfPlays())); MapSize size = map.getSize(); sizeLabel.setText(i18n.get("mapPreview.size", size.getWidthInKm(), size.getHeightInKm())); maxPlayersLabel.setText(i18n.number(map.getPlayers())); if (mapService.isOfficialMap(map.getFolderName())) { <START> installButton.setDisable(false); uninstallButton.setDisable(false); <END> installButton.setVisible(false); uninstallButton.setVisible(false); } else { ObservableList<MapBean> installedMaps = mapService.getInstalledMaps(); JavaFxUtil.addListener(installedMaps, new WeakListChangeListener<>(installStatusChangeListener)); setInstalled(mapService.isInstalled(map.getFolderName())); } ObservableList<Review> reviews = map.getReviews(); JavaFxUtil.addListener(reviews, new WeakInvalidationListener(reviewsChangedListener)); reviewsChangedListener.invalidated(reviews); }</code><technical_language>Dont thin invisible buttons fired ok</technical_language>

Target:
public void setMap(MapBean map) { this.map = map; Image image; if (map.getLargeThumbnailUrl() != null) { image = mapService.loadPreview(map.getLargeThumbnailUrl(), PreviewSize.LARGE); } else { image = IdenticonUtil.createIdenticon(map.getId()); } thumbnailImageView.setImage(image); nameLabel.setText(map.getDisplayName()); authorLabel.setText(Optional.ofNullable(map.getAuthor()).orElse(i18n.get("map.unknownAuthor"))); numberOfPlaysLabel.setText(i18n.number(map.getNumberOfPlays())); MapSize size = map.getSize(); sizeLabel.setText(i18n.get("mapPreview.size", size.getWidthInKm(), size.getHeightInKm())); maxPlayersLabel.setText(i18n.number(map.getPlayers())); if (mapService.isOfficialMap(map.getFolderName())) { installButton.setVisible(false); uninstallButton.setVisible(false); } else { ObservableList<MapBean> installedMaps = mapService.getInstalledMaps(); JavaFxUtil.addListener(installedMaps, new WeakListChangeListener<>(installStatusChangeListener)); setInstalled(mapService.isInstalled(map.getFolderName())); } ObservableList<Review> reviews = map.getReviews(); JavaFxUtil.addListener(reviews, new WeakInvalidationListener(reviewsChangedListener)); reviewsChangedListener.invalidated(reviews); }
Source:
<code>private static void appendConditionalAttributes(Subject subject, StringBuilder messageBuilder) { String attributes = System.getProperty(EXTRA_ATTRIBUTES_PROP); if (subject == null) { subject = ThreadContext.getSubject(); } if (attributes != null) { List<String> attributeList = Arrays.asList(attributes.split(",")); for (String attribute : attributeList) { List<String> attributeValueList = SubjectUtils.getAttribute(subject, attribute); <START> if (attributeValueList != null && !attributeValueList.isEmpty()) { <END> messageBuilder.append(" " + attribute + " : " + attributeValueList.get(0)); } } } }</code><technical_language>CollectionUtils</technical_language>

Target:
private static void appendConditionalAttributes(Subject subject, StringBuilder messageBuilder) { String attributes = System.getProperty(EXTRA_ATTRIBUTES_PROP); if (attributes == null) { return; } if (subject == null) { subject = ThreadContext.getSubject(); } List<String> attributeList = Arrays.asList(attributes.split(",")); for (String attribute : attributeList) { List<String> attributeValueList = SubjectUtils.getAttribute(subject, attribute); if (CollectionUtils.isNotEmpty(attributeValueList)) { messageBuilder.append(" ").append(attribute).append(" : "); if (attributeValueList.size() > 1) { messageBuilder.append(attributeValueList); } else { messageBuilder.append(attributeValueList.get(0)); } } } }
Source:
<code>public boolean matches(Scan scan) { <START> int offset = scanNumberRange == null ? 1 : scanNumberRange.lowerEndpoint(); <END> return matches(scan, offset); }</code><technical_language>in case scanNumberRange==null, I offset set 1, scan number in file. is necessarily 1</technical_language>

Target:
public boolean matches(Scan scan) { int offset; if (scanNumberRange != null) offset = scanNumberRange.lowerEndpoint(); else { if (scan.getDataFile() != null && scan.getDataFile().getScanNumbers().length > 0) offset = scan.getDataFile().getScanNumbers()[0]; else offset = 1; } return matches(scan, offset); }
Source:
<code><START> public synchronized ListenableFuture<Supplier<PagesSpatialIndex>> createPagesSpatialIndex() <END> { activeProbeOperators.retain(); if (pagesSpatialIndex != null) { return immediateFuture(pagesSpatialIndex); } SettableFuture<Supplier<PagesSpatialIndex>> future = SettableFuture.create(); pagesSpatialIndexFutures.add(future); return future; }</code><technical_language>i noted in operator, this return ListenableFuture<PagesSpatialIndex></technical_language>

Target:
public synchronized ListenableFuture<PagesSpatialIndex> createPagesSpatialIndex() { activeProbeOperators.retain(); if (pagesSpatialIndex != null) { return immediateFuture(pagesSpatialIndex.get()); } SettableFuture<PagesSpatialIndex> future = SettableFuture.create(); pagesSpatialIndexFutures.add(future); return future; }
Source:
<code><START> public long startMillis() { <END> return _startTime.getMillis(); }</code><technical_language>I prefer returned a DateTime improve model instead Jackson annotations control render format. Thoughts</technical_language>

Target:
private long startMillis() { return _startTime.getMillis(); }
Source:
<code>public void executeTask() throws MojoExecutionException, MojoFailureException { serverId = wizard.promptForExistingServerIdIfMissing(serverId); Server server = Server.loadServer(serverId); if(server.hasWatchedProjects()){ boolean pullingError = false; Set<Project> watchedProjects = server.getWatchedProjects(); for(Project project: watchedProjects) { wizard.showMessage(String.format(UPDATING_MODULE_MESSAGE, project.getArtifactId())); if (pullLatestUpstream(project.getPath())) { wizard.showMessage(String.format(PULL_SUCCESS_MESSAGE, project.getArtifactId())); } else { getLog().error(String.format(PULL_ERROR_MESSAGE, project.getArtifactId(), failureReason)); getLog().error(UPDATE_MANUALLY_MESSAGE); pullingError = true; } } if(pullingError){ <START> throw new MojoExecutionException("Some modules could not be updated automatically, please see error messages above"); <END> } }else { wizard.showMessage(String.format(NO_WATCHED_MODULES_MESSAGE, serverId)); } }</code><technical_language>list modules updated updated end</technical_language>

Target:
public void executeTask() throws MojoExecutionException, MojoFailureException { serverId = wizard.promptForExistingServerIdIfMissing(serverId); Server server = Server.loadServer(serverId); if(server.hasWatchedProjects()){ Set<Project> watchedProjects = server.getWatchedProjects(); CompositeException allExceptions = new CompositeException("Could not updated latest changes"); for(Project project: watchedProjects) { try { pullLatestUpstream(project.getPath()); updatedModules.add(project.getArtifactId()); } catch (Exception e) { allExceptions.add(project.getPath(), e); try { cleanUp(project.getPath(), project.getArtifactId()); notUpdatedModules.add(project.getArtifactId() + DASH + String.format(CONFLICT_ERROR_MESSAGE, e.getMessage())); } catch (IllegalStateException e1) { allExceptions.add(project.getPath(), e1); notUpdatedModules.add(project.getArtifactId() + DASH + String.format(CONFLICT_ERROR_MESSAGE, e.getMessage()) + ". " + e1.getMessage()); } } } displayUpdatedModules(); displayNotUpdatedModules(); allExceptions.checkAndThrow(); }else { wizard.showMessage(String.format(NO_WATCHED_MODULES_MESSAGE, serverId)); } }
Source:
<code><START> public void setOnlyReloadable(String parseOptionKey) { <END> if (Boolean.parseBoolean(parseOptionKey)) { onlyReloadable = true; } else { onlyReloadable = false; } }</code><technical_language>a matter of taste, tought already: onlyReloadable = Boolean.parseBoolean(parseOptionKey));</technical_language>

Target:
public void setOnlyReloadable(String parseOptionKey) { onlyReloadable = Boolean.parseBoolean(parseOptionKey); }
Source:
<code>public void initialise() { <START> sceneOpaqueFbo = displayResolutionDependentFBOs.get(SCENE_OPAQUE); <END> playerCamera = worldRenderer.getActiveCamera(); wireframeStateChange = new SetWireframe(true); RenderingDebugConfig renderingDebugConfig = config.getRendering().getDebug(); new WireframeTrigger(renderingDebugConfig, this); addDesiredStateChange(new LookThrough(playerCamera)); addDesiredStateChange(new SetViewportToSizeOf(SCENE_OPAQUE, displayResolutionDependentFBOs)); addDesiredStateChange(new EnableMaterial(DEFAULT_TEXTURED_MATERIAL.toString())); }</code><technical_language>Please move..</technical_language>

Target:
public void initialise() { wireframeStateChange = new SetWireframe(true); RenderingDebugConfig renderingDebugConfig = config.getRendering().getDebug(); new WireframeTrigger(renderingDebugConfig, this); playerCamera = worldRenderer.getActiveCamera(); addDesiredStateChange(new LookThrough(playerCamera)); addDesiredStateChange(new SetViewportToSizeOf(READONLY_GBUFFER, displayResolutionDependentFBOs)); sceneOpaqueFbo = displayResolutionDependentFBOs.get(READONLY_GBUFFER); addDesiredStateChange(new EnableMaterial(DEFAULT_TEXTURED_MATERIAL.toString())); }
Source:
<code>public void testPath() { Path path = new Path(Book.class, dictionary, "genre"); ImmutableList<PathElement> pathElements = ImmutableList.of( new PathElement(Book.class, String.class, "genre")); assertEquals("example_Book", path.getAlias()); assertEquals("genre", path.getFieldPath()); assertEquals(pathElements, path.getPathElements()); assertEquals(Optional.of(pathElements.get(0)), path.lastElement()); assertEquals("[Book].genre", path.toString()); path = new Path(Book.class, dictionary, "this.editor.firstName"); pathElements = ImmutableList.of( <START> new PathElement(getClassType(Book.class), null, "this"), <END> new PathElement(Book.class, Editor.class, "editor"), new PathElement(Editor.class, String.class, "firstName")); assertEquals("example_Book_editor", path.getAlias()); assertEquals("this.editor.firstName", path.getFieldPath()); assertEquals(pathElements, path.getPathElements()); assertEquals(Optional.of(pathElements.get(2)), path.lastElement()); assertEquals("[Book].this/[Book].editor/[Editor].firstName", path.toString()); }</code><technical_language>others change too</technical_language>

Target:
public void testPath() { Path path = new Path(Book.class, dictionary, "genre"); ImmutableList<PathElement> pathElements = ImmutableList.of( new PathElement(Book.class, String.class, "genre")); assertEquals("example_Book", path.getAlias()); assertEquals("genre", path.getFieldPath()); assertEquals(pathElements, path.getPathElements()); assertEquals(Optional.of(pathElements.get(0)), path.lastElement()); assertEquals("[Book].genre", path.toString()); path = new Path(Book.class, dictionary, "this.editor.firstName"); pathElements = ImmutableList.of( new PathElement(Book.class, null, "this"), new PathElement(Book.class, Editor.class, "editor"), new PathElement(Editor.class, String.class, "firstName")); assertEquals("example_Book_editor", path.getAlias()); assertEquals("this.editor.firstName", path.getFieldPath()); assertEquals(pathElements, path.getPathElements()); assertEquals(Optional.of(pathElements.get(2)), path.lastElement()); assertEquals("[Book].this/[Book].editor/[Editor].firstName", path.toString()); }
Source:
<code>public ViewBinder(@NonNull final RepositoryView view, @NonNull final RepositoryViewModel viewModel) { <START> this.view = view; <END> this.viewModel = viewModel; }</code><technical_language>please assert</technical_language>

Target:
public ViewBinder(@NonNull final RepositoryView view, @NonNull final RepositoryViewModel viewModel) { Preconditions.checkNotNull(view, "View cannot be null."); Preconditions.checkNotNull(viewModel, "ViewModel cannot be null."); this.view = view; this.viewModel = viewModel; }
Source:
<code>public HashCodeBuilder(final int prime) { <START> super(); <END> this.prime = prime; }</code><technical_language>IMHO, explicit Object constructor is redundant</technical_language>

Target:
public HashCodeBuilder(final int prime) { this.prime = prime; }
Source:
<code>private SortedSet<String> readTags(String itemName) { MetadataKey key = new MetadataKey(TAG_NAMESPACE, itemName); SortedSet<String> tags = new TreeSet<>(); if (metadataRegistry != null) { Metadata metadata = metadataRegistry.get(key); if (metadata != null) { <START> tags.addAll(Arrays.asList(metadata.getValue().split("\\" + TAG_SEPARATOR))); <END> } } return tags; }</code><technical_language>string "\\" depends TAG_SEPARATOR, I externalize a constant</technical_language>

Target:
private SortedSet<String> readTags(String itemName) { MetadataKey key = new MetadataKey(TAG_NAMESPACE, itemName); SortedSet<String> tags = new TreeSet<>(); Metadata metadata = metadataRegistry.get(key); if (metadata != null) { tags.addAll(Arrays.asList(metadata.getValue().split(TAG_SPLIT_REGEX))); } return tags; }
Source:
<code>private static boolean enableDynamicCodeGeneration() { boolean enabled = !DalvikVmChecker.isDalvikVm(); String property = System.getProperty("msgpack.dynamic-codegen.enabled"); <START> if (property != null) { <END> enabled = Boolean.parseBoolean(property); } return enabled; }</code><technical_language>MessagePack is running Dalvik VM, javassist if "msgpack.dynamic-codegen.enabled" set true. this? return !DalvikVmChecker.isDalvikVm() && Boolean.valueOf(System.getProperties().getProperty("msgpack.dynamic-codegen.enabled", "true"));</technical_language>

Target:
private static boolean enableDynamicCodeGeneration() { return !DalvikVmChecker.isDalvikVm() && Boolean.parseBoolean(System.getProperties().getProperty("msgpack.dynamic-codegen.enabled", "true")); }
Source:
<code>private List<NetworkSend> prepareSends(List<ResponseInfo> responseInfoList) { List<NetworkSend> sends = new ArrayList<NetworkSend>(); ListIterator<RequestMetadata> iter = pendingRequests.listIterator(); while (iter.hasNext()) { RequestMetadata requestMetadata = iter.next(); if (time.milliseconds() - requestMetadata.requestQueuedTimeMs > checkoutTimeoutMs) { responseInfoList.add( new ResponseInfo(requestMetadata.requestInfo.getRequest(), NetworkClientErrorCode.ConnectionUnavailable, null)); iter.remove(); } else { iter.previous(); break; } } while (iter.hasNext()) { RequestMetadata requestMetadata = iter.next(); try { String host = requestMetadata.requestInfo.getHost(); Port port = requestMetadata.requestInfo.getPort(); String connId = connectionTracker.checkOutConnection(host, port); if (connId == null) { if (connectionTracker.mayCreateNewConnection(host, port)) { <START> connId = selector.connect(new InetSocketAddress(host, port.getPort()), networkConfig.socketSendBufferBytes, <END> networkConfig.socketReceiveBufferBytes, port.getPortType()); connectionTracker.addNewConnection(host, port, connId); } } else { sends.add(new NetworkSend(connId, requestMetadata.requestInfo.getRequest(), networkRequestMetrics, time)); requestMetadata.connId = connId; connectionIdToRequestInFlight.put(connId, requestMetadata); iter.remove(); } } catch (IOException e) { logger.error("Received exception while checking out a connection", e); } } return sends; }</code><technical_language>Is this returns null (or in other words, a selector fails create a connection desired host,port)</technical_language>

Target:
private List<NetworkSend> prepareSends(List<ResponseInfo> responseInfoList) { List<NetworkSend> sends = new ArrayList<NetworkSend>(); ListIterator<RequestMetadata> iter = pendingRequests.listIterator(); while (iter.hasNext()) { RequestMetadata requestMetadata = iter.next(); if (time.milliseconds() - requestMetadata.requestQueuedTimeMs > checkoutTimeoutMs) { responseInfoList.add( new ResponseInfo(requestMetadata.requestInfo.getRequest(), NetworkClientErrorCode.ConnectionUnavailable, null)); iter.remove(); } else { iter.previous(); break; } } while (iter.hasNext()) { RequestMetadata requestMetadata = iter.next(); try { String host = requestMetadata.requestInfo.getHost(); Port port = requestMetadata.requestInfo.getPort(); String connId = connectionTracker.checkOutConnection(host, port); if (connId == null) { if (connectionTracker.mayCreateNewConnection(host, port)) { connId = selector.connect(new InetSocketAddress(host, port.getPort()), networkConfig.socketSendBufferBytes, networkConfig.socketReceiveBufferBytes, port.getPortType()); connectionTracker.startTrackingInitiatedConnection(host, port, connId); } } else { sends.add(new NetworkSend(connId, requestMetadata.requestInfo.getRequest(), null, time)); connectionIdToRequestInFlight.put(connId, requestMetadata); iter.remove(); } } catch (IOException e) { logger.error("Received exception while checking out a connection", e); } } return sends; }
Source:
<code>public List<LogrotateAdditionalFile> getExtrasFiles() { final List<SingularityExecutorLogrotateAdditionalFile> original = configuration.getLogrotateAdditionalFiles(); final List<LogrotateAdditionalFile> transformed = new ArrayList<>(original.size()); for (SingularityExecutorLogrotateAdditionalFile additionalFile : original) { String dateformat; if (additionalFile.getDateformat().isPresent()) { dateformat = additionalFile.getDateformat().get().startsWith("-") ? additionalFile.getDateformat().get().substring(1) : additionalFile.getDateformat().get(); } else { dateformat = configuration.getLogrotateExtrasDateformat().startsWith("-") ? configuration.getLogrotateExtrasDateformat().substring(1) : configuration.getLogrotateExtrasDateformat(); } transformed.add( new LogrotateAdditionalFile( taskDefinition.getTaskDirectoryPath().resolve(additionalFile.getFilename()).toString(), additionalFile.getExtension().or(Strings.emptyToNull(Files.getFileExtension(additionalFile.getFilename()))), dateformat, <START> additionalFile.getLogrotateFrequencyOverride() <END> )); } return transformed; }</code><technical_language>want consistent indent merge master</technical_language>

Target:
public List<LogrotateAdditionalFile> getExtrasFiles() { return getAllExtraFiles().stream() .filter(p -> !p.getLogrotateFrequencyOverride().equals(SingularityExecutorLogrotateFrequency.HOURLY.getLogrotateValue())) .collect(Collectors.toList()); }
Source:
<code>public static void viewBlogStats(Context context, SiteModel site) { <START> if (site == null) { <END> ToastUtils.showToast(context, R.string.stats_cannot_be_started, ToastUtils.Duration.SHORT); } else { Intent intent = new Intent(context, org.wordpress.android.ui.stats.refresh.StatsActivity.class); intent.putExtra(WordPress.SITE, site); context.startActivity(intent); } }</code><technical_language>record this in tracks somewhere? try get bottom of this, if crashing</technical_language>

Target:
public static void viewBlogStats(Context context, SiteModel site) { if (site == null) { AppLog.e(T.STATS, "SiteModel is null when opening the stats."); AnalyticsTracker.track( STATS_ACCESS_ERROR, ActivityLauncher.class.getName(), "NullPointerException", "Failed to open Stats because of the null SiteModel" ); ToastUtils.showToast(context, R.string.stats_cannot_be_started, ToastUtils.Duration.SHORT); } else { Intent intent = new Intent(context, org.wordpress.android.ui.stats.refresh.StatsActivity.class); intent.putExtra(WordPress.SITE, site); context.startActivity(intent); } }
Source:
<code>public void testQueryFullProcessImageName() { HANDLE h = Kernel32.INSTANCE.OpenProcess(0, false, Kernel32.INSTANCE.GetCurrentProcessId()); assertNotNull("Failed (" + Kernel32.INSTANCE.GetLastError() + ") to get process handle", h); char[] path = new char[WinDef.MAX_PATH]; IntByReference lpdwSize = new IntByReference(path.length); boolean b = Kernel32.INSTANCE.QueryFullProcessImageName(h, 0, path, lpdwSize); <START> Kernel32.INSTANCE.CloseHandle(h); <END> assertTrue("Failed (" + Kernel32.INSTANCE.GetLastError() + ") to query process image name", b); assertTrue("Failed to query process image name, empty path returned", lpdwSize.getValue() > 0); }</code><technical_language>This code in a _finally_ clause: java HANDLE h = ...obtain handle... ...ensure OK handle... try { char[] path = new char[WinDef.MAX_PATH]; IntByReference lpdwSize = new IntByReference(path.length); boolean b = Kernel32.INSTANCE.QueryFullProcessImageName(h, 0, path, lpdwSize); assert... assert... } finally { . ..close handle... }</technical_language>

Target:
public void testQueryFullProcessImageName() { HANDLE h = Kernel32.INSTANCE.OpenProcess(0, false, Kernel32.INSTANCE.GetCurrentProcessId()); assertNotNull("Failed (" + Kernel32.INSTANCE.GetLastError() + ") to get process handle", h); try { char[] path = new char[WinDef.MAX_PATH]; IntByReference lpdwSize = new IntByReference(path.length); boolean b = Kernel32.INSTANCE.QueryFullProcessImageName(h, 0, path, lpdwSize); assertTrue("Failed (" + Kernel32.INSTANCE.GetLastError() + ") to query process image name", b); assertTrue("Failed to query process image name, empty path returned", lpdwSize.getValue() > 0); } finally { Kernel32.INSTANCE.CloseHandle(h); } }
Source:
<code><START> public void setNickname(String nickname) <END> { this.nickname = nickname; }</code><technical_language>whats case of this method</technical_language>

Target:
public void setNickname(String nickname) { this._nickname = nickname; }
Source:
<code>public AuditLogType getAuditLogTypeValue() { addCustomValue("SessionID", StringUtils.isEmpty(sessionId) ? UNKNOWN : sessionId); addCustomValue("SourceIP", StringUtils.isEmpty(sourceIp) ? UNKNOWN : sourceIp); if (getActionReturnValue() == CreateUserSessionsError.NUM_OF_SESSIONS_EXCEEDED) { addCustomValue("NumMaxSessions", String.valueOf(EngineLocalConfig.getInstance().getInteger("ENGINE_MAX_USER_SESSIONS"))); <START> return AuditLogType.USER_NUM_SESSIONS_EXCEEDED; <END> } else { return getSucceeded() ? AuditLogType.USER_VDC_SESSION_TERMINATED : AuditLogType.USER_VDC_SESSION_TERMINATION_FAILED; } }</code><technical_language>do need this</technical_language>

Target:
public AuditLogType getAuditLogTypeValue() { addCustomValue("SessionID", StringUtils.isEmpty(sessionId) ? UNKNOWN : sessionId); addCustomValue("SourceIP", StringUtils.isEmpty(sourceIp) ? UNKNOWN : sourceIp); return getSucceeded() ? AuditLogType.USER_VDC_SESSION_TERMINATED : AuditLogType.USER_VDC_SESSION_TERMINATION_FAILED; }
Source:
<code>public void setNotificationUrl(String url) { <START> if ((url.startsWith("http://") || url.startsWith("https://")) && url.contains(".")) { <END> this.url = url; } }</code><technical_language>* <LINK_0> * <LINK_1> work well</technical_language>

Target:
public void setNotificationUrl(String url) { if (URLUtil.isHttpUrl(url) || URLUtil.isHttpsUrl(url)) { this.url = url; } }
Source:
<code>public static String getStackTrace(Throwable throwable) { final StringWriter sw = new StringWriter(); final PrintWriter pw = new PrintWriter(sw, true); throwable.printStackTrace(pw); <START> return sw.getBuffer().toString(); <END> }</code><technical_language>totally is necessary I close writer a try-with-resources</technical_language>

Target:
public static String getStackTrace(Throwable throwable) { StringWriter sw = null; PrintWriter pw = null; try { sw = new StringWriter(); pw = new PrintWriter(sw, true); throwable.printStackTrace(pw); return sw.getBuffer().toString(); } finally { Closeables.closeQuietly(sw, pw); } }
Source:
<code>public void start() { URL log4jProperties = SarosServer.class .getResource(LOGGING_CONFIG_FILE); PropertyConfigurator.configure(log4jProperties); ArrayList<IContextFactory> factories = new ArrayList<IContextFactory>(); factories.add(new ServerContextFactory()); context = new ContainerContext(factories, null); <START> context.initialize(); <END> connectToXMPPServer(); context.getComponent(ISarosSessionManager.class).startSession(new HashMap<>()); }</code><technical_language>please create a lifecycle object ? is some setup stuff in context classes belong if this code is moved lifecylce class this approach fails badly</technical_language>

Target:
public void start() { URL log4jProperties = SarosServer.class .getResource(LOGGING_CONFIG_FILE); PropertyConfigurator.configure(log4jProperties); lifecycle.start(); }
Source:
<code>public ServerContext getServerContext() { try { <START> return new ServerContext(config.getAccumuloSiteFile().toURI().toURL()); <END> } catch (MalformedURLException e) { throw new IllegalStateException("Failed to create ServerContext", e); } }</code><technical_language>This created for mini... fail, providing configuration file... created</technical_language>

Target:
public synchronized ServerContext getServerContext() { if (context == null) { context = new ServerContext(siteConfig); } return context; }
Source:
<code>public static boolean keysContainCollationsOrderless( List<Integer> keys, List<RelCollation> collations) { <START> final List<Integer> distinctKeys = Util.distinctList(keys); <END> for (RelCollation collation : collations) { if (containsOrderless(distinctKeys, collation)) { return true; } } return false; }</code><technical_language>containsOrderless a Util.distinctList(keys), skip here. applies collationsContainKeysOrderless</technical_language>

Target:
public static boolean keysContainCollationsOrderless( List<Integer> keys, List<RelCollation> collations) { for (RelCollation collation : collations) { if (containsOrderless(keys, collation)) { return true; } } return false; }