auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>public PositionLinks.Factory build() { return new PositionLinks.Factory() { @Override public PositionLinks create(Optional<JoinFilterFunction> joinFilterFunction) { return new ArrayPositionLinks(positionLinks); } @Override public long checksum() { <START> Hasher hasher = Hashing.md5().newHasher(); <END> IntStream.of(positionLinks) .forEach(hasher::putInt); return hasher.hash().asLong(); } }; }</code><technical_language>Some other function is expensive compute equally good for purpose. I checked MD5 work fast. ignore it</technical_language>

Target:
public PositionLinks.Factory build() { return new PositionLinks.Factory() { @Override public PositionLinks create(Optional<JoinFilterFunction> joinFilterFunction) { return new ArrayPositionLinks(positionLinks); } @Override public long checksum() { return XxHash64.hash(Slices.wrappedIntArray(positionLinks)); } }; }
Source:
<code>public void onBackPressed() { int count = getFragmentManager().getBackStackEntryCount(); if (count == 0) { super.onBackPressed(); } else { getFragmentManager().popBackStack(); } <START> } <END></code><technical_language>Is this implementation necessary? default implementation in Activity do this? Try removing this method running test. pass</technical_language>

Target:
public void onBackPressed() { Fragment currentFragment = fragmentManager .findFragmentById(R.id.fragment_holder); if (currentFragment instanceof About) { fragmentManager.popBackStack(FragmentTags.CARD_LIST, 0); } else { super.onBackPressed(); } }
Source:
<code>public HashSet<AbstractEntity> getEntities(SkillMetadata skillMetadata) { <START> BukkitTagContext tagContext = new BukkitTagContext(null, null, null, false, null); <END> tagContext.contextSource = source; source.contexts.put("entity", new EntityTag(skillMetadata.getCaster().getEntity().getBukkitEntity())); ObjectTag object = TagManager.tagObject(tag, tagContext); List<EntityTag> list = object.asType(ListTag.class, tagContext).filter(EntityTag.class, tagContext); HashSet<AbstractEntity> entities = new HashSet<AbstractEntity>(); for (EntityTag entity : list) { entities.add(BukkitAdapter.adapt(entity.getBukkitEntity())); } return entities; }</code><technical_language>again, CoreUtilities.noDebugContext</technical_language>

Target:
public HashSet<AbstractEntity> getEntities(SkillMetadata skillMetadata) { TagContext tagContext = CoreUtilities.noDebugContext.clone(); tagContext.contextSource = source; source.contexts.put("entity", new EntityTag(skillMetadata.getCaster().getEntity().getBukkitEntity())); ObjectTag object = TagManager.tagObject(tag, tagContext); List<EntityTag> list = object.asType(ListTag.class, tagContext).filter(EntityTag.class, tagContext); HashSet<AbstractEntity> entities = new HashSet<AbstractEntity>(); for (EntityTag entity : list) { entities.add(BukkitAdapter.adapt(entity.getBukkitEntity())); } return entities; }
Source:
<code>public void equal_shouldReturnFalseIfObjectIsNull() { CohortMembership cohortMembership = new CohortMembership(12); <START> boolean result = cohortMembership.equals(null); <END> assertFalse(result); }</code><technical_language>I guess assert temporary result variable</technical_language>

Target:
public void equal_shouldReturnFalseIfObjectIsNull() { CohortMembership cohortMembership = new CohortMembership(12); assertFalse(cohortMembership.equals(null)); }
Source:
<code>private void migrateSections() { this.sections = new ConcurrentHashMap<>(); ExecutorService executor = Executors.newFixedThreadPool(THREAD_POOL_SIZE); for(Map.Entry<Long, School> school : this.schools.entrySet()) { Long sourceSystemSchoolId = Long.valueOf(school.getValue().getSourceSystemId()); sections.put(sourceSystemSchoolId, new ConcurrentHashMap<>()); SectionSyncRunnable sectionRunnable = new SectionSyncRunnable( powerSchool, edPanel, school.getValue(), this.courses.get(sourceSystemSchoolId), this.terms.get(sourceSystemSchoolId), staffAssociator, studentAssociator, this.sections.get(sourceSystemSchoolId), results); executor.execute(sectionRunnable); } executor.shutdown(); try { <START> executor.awaitTermination(TOTAL_TTL_MINUTES, TimeUnit.MINUTES); <END> } catch(InterruptedException e) { System.out.println("Executor thread pool interrupted " + e.getMessage()); } }</code><technical_language>consider checking boolean awaitTermination - false executor shut timeout period (but interrupted). call shutdownNow() and/or log this event investigate (if happen)</technical_language>

Target:
private void migrateSections() { this.sections = new ConcurrentHashMap<>(); ExecutorService executor = Executors.newFixedThreadPool(THREAD_POOL_SIZE); for(Map.Entry<Long, School> school : this.schools.entrySet()) { Long sourceSystemSchoolId = Long.valueOf(school.getValue().getSourceSystemId()); sections.put(sourceSystemSchoolId, new ConcurrentHashMap<>()); SectionSyncRunnable sectionRunnable = new SectionSyncRunnable( powerSchool, edPanel, school.getValue(), this.courses.get(sourceSystemSchoolId), this.terms.get(sourceSystemSchoolId), staffAssociator, studentAssociator, this.sections.get(sourceSystemSchoolId), results); executor.execute(sectionRunnable); } executor.shutdown(); try { if (!executor.awaitTermination(TOTAL_TTL_MINUTES, TimeUnit.MINUTES)) { executor.shutdownNow(); } } catch(InterruptedException e) { System.out.println("Executor thread pool interrupted " + e.getMessage()); } }
Source:
<code>protected Command<AbstractCanvasHandler, CanvasViolation> newCanvasCommand(final AbstractCanvasHandler context) { return new AbstractCanvasCommand() { @Override public CommandResult<CanvasViolation> execute(final AbstractCanvasHandler context) { enableHandlers(true); hidePaletteWidget(false); addDRGEditorToCanvasWidget(); <START> refreshFormPropertiesEvent.fire(new RefreshFormProperties(sessionManager.getCurrentSession(), nodeUUID)); <END> return CanvasCommandResultBuilder.SUCCESS; } @Override public CommandResult<CanvasViolation> undo(final AbstractCanvasHandler context) { enableHandlers(false); hidePaletteWidget(true); editor.setExpression(nodeUUID, hasExpression, hasName); editor.setExitCommand(() -> navigateToExpressionEditor(hasExpression, hasName)); addExpressionEditorToCanvasWidget(); return CanvasCommandResultBuilder.SUCCESS; } }; }</code><technical_language>Personally, I suffix _Event_ is required time implement UberFireEvent interface. IMHO RefreshFormProperties is expressive enough I names short/expressive possible. But, feel free change is ;-)</technical_language>

Target:
protected Command<AbstractCanvasHandler, CanvasViolation> newCanvasCommand(final AbstractCanvasHandler context) { return new AbstractCanvasCommand() { @Override public CommandResult<CanvasViolation> execute(final AbstractCanvasHandler context) { enableHandlers(true); hidePaletteWidget(false); addDRGEditorToCanvasWidget(); refreshFormPropertiesEvent.fire(new RefreshFormPropertiesEvent(sessionManager.getCurrentSession(), nodeUUID)); return CanvasCommandResultBuilder.SUCCESS; } @Override public CommandResult<CanvasViolation> undo(final AbstractCanvasHandler context) { enableHandlers(false); hidePaletteWidget(true); editor.setExpression(nodeUUID, hasExpression, hasName); editor.setExitCommand(() -> navigateToExpressionEditor(hasExpression, hasName)); addExpressionEditorToCanvasWidget(); return CanvasCommandResultBuilder.SUCCESS; } }; }
Source:
<code>public void test1a() { List<String> results = new ArrayList<String>(); final BaragonAgentMetadata agentMetadata = new BaragonAgentMetadata(BASE_URI, AGENT_ID, Optional.of(DOMAIN), new BaragonAgentEc2Metadata(Optional.absent(), Optional.of("us-east-1a"), Optional.absent(), Optional.absent(), Optional.absent()), Optional.absent(), Collections .emptyMap(), true); <START> for (String AZ: availabilityZones) { <END> final UpstreamInfo currentUpstream = new UpstreamInfo("testhost:8080", Optional.absent(), Optional.of(AZ)); final PreferSameRackWeightingHelper helper = new PreferSameRackWeightingHelper(configuration, agentMetadata); CharSequence result = helper.preferSameRackWeightingBalanced(upstreams, currentUpstream, null); results.add(result.toString()); } Assert.assertEquals(Arrays.asList("", "", "backup", "backup", "backup"), results); }</code><technical_language>camelCase for variables in for loops, generally reserve caps for static field names</technical_language>

Target:
public void test1a() { List<String> results = new ArrayList<>(); final BaragonAgentMetadata agentMetadata = generateBaragonAgentMetadata("us-east-1a"); final PreferSameRackWeightingHelper helper = new PreferSameRackWeightingHelper(CONFIGURATION, agentMetadata); for (String availabilityZone: AVAILABILITY_ZONES) { final UpstreamInfo currentUpstream = new UpstreamInfo("testhost:8080", Optional.absent(), Optional.of(availabilityZone)); CharSequence result = helper.preferSameRackWeighting(UPSTREAMS, currentUpstream, allRacks, capacity, totalPendingLoad, null); results.add(result.toString()); } Assert.assertEquals(Arrays.asList("", "", "backup", "backup", "backup"), results); }
Source:
<code>static void checkValidPositionsArray(int[] positions, int offset, int length) { requireNonNull(positions, "positions array is null"); if (offset < 0 || offset > positions.length) { <START> throw new IndexOutOfBoundsException("Invalid offset " + offset + " for positions array with " + positions.length + " elements"); <END> } if (length < 0 || offset + length > positions.length) { throw new IndexOutOfBoundsException("Invalid length " + length + " for positions array with " + positions.length + " elements and offset " + offset); } }</code><technical_language>% args instead of +? below</technical_language>

Target:
static void checkValidPositionsArray(int[] positions, int offset, int length) { requireNonNull(positions, "positions array is null"); if (offset < 0 || offset > positions.length) { throw new IndexOutOfBoundsException(String.format("Invalid offset '%s' for positions array with '%s' elements", offset, positions.length)); } if (length < 0 || offset + length > positions.length) { throw new IndexOutOfBoundsException(String.format("Invalid length '%s' for positions array with '%s' elements and offset: '%s", length, positions.length, offset)); } }
Source:
<code>private void toggleButton(final View parent, final boolean enable) { final View button = parent.findViewById(R.id.button_send); <START> button.setAlpha(enable ? 0.8f : 0.3f); <END> button.setEnabled(enable); }</code><technical_language>Extracting value.xml</technical_language>

Target:
private void toggleButton(final View parent, final boolean enable) { final View button = parent.findViewById(R.id.button_send); button.setAlpha(enable ? ALPHA_ENABLED : ALPHA_DISABLED); button.setEnabled(enable); }
Source:
<code>private List<Entity> getEntities(String extensionName, String jobName, InputStream configStream, ClientResponse clientResponse) { JSONObject responseJson; try { responseJson = new JSONObject(clientResponse.getEntity(String.class)); } catch (JSONException e) { OUT.get().print("Submit failed. Failed to get details for the given extension"); throw new FalconCLIException("Submit failed. Failed to get details for the given extension"); } String extensionType; String extensionBuildLocation; try { extensionType = responseJson.get("type").toString(); extensionBuildLocation = responseJson.get("location").toString(); } catch (JSONException e) { OUT.get().print("Error. " + extensionName + " not found "); throw new FalconCLIException("Submit failed. Failed to get details for the given extension"); } List<Entity> entities = null; if (!extensionType.equals(ExtensionType.CUSTOM.name())) { try { entities = ExtensionHandler.loadAndPrepare(extensionName, jobName, configStream, extensionBuildLocation); } catch (Exception e) { OUT.get().println("Error in building the extension"); throw new FalconCLIException("Submit failed. Failed to get details for the given extension"); } if (entities == null || entities.isEmpty()) { OUT.get().println("No entities got built"); throw new FalconCLIException("Submit failed. Failed to get details for the given extension"); } <START> try { <END> EntityUtil.applyTags(extensionName, jobName, entities); } catch (FalconException e) { OUT.get().println("Error in applying tags to generated entities"); throw new FalconCLIException("Submit failed. Failed to get details for the given extension"); } } return entities; }</code><technical_language>part move ExtensionManager.submitInternal. Client that</technical_language>

Target:
private List<Entity> getEntities(String extensionName, String jobName, InputStream configStream, ClientResponse clientResponse) { JSONObject responseJson; try { responseJson = new JSONObject(clientResponse.getEntity(String.class)); } catch (JSONException e) { OUT.get().print("Submit failed. Failed to get details for the given extension"); throw new FalconCLIException("Submit failed. Failed to get details for the given extension"); } String extensionType; String extensionBuildLocation; try { extensionType = responseJson.get("type").toString(); extensionBuildLocation = responseJson.get("location").toString(); } catch (JSONException e) { OUT.get().print("Error. " + extensionName + " not found "); throw new FalconCLIException("Submit failed. Failed to get details for the given extension"); } List<Entity> entities = null; if (!extensionType.equals(ExtensionType.CUSTOM.name())) { try { entities = ExtensionHandler.loadAndPrepare(extensionName, jobName, configStream, extensionBuildLocation); } catch (Exception e) { OUT.get().println("Error in building the extension"); throw new FalconCLIException("Submit failed. Failed to get details for the given extension"); } if (entities == null || entities.isEmpty()) { OUT.get().println("No entities got built"); throw new FalconCLIException("Submit failed. Failed to get details for the given extension"); } } return entities; }
Source:
<code>public void setModel(M model) { this.model = model; if (selectionChangedHandler != null) { selectionChangedHandler.removeHandler(); } selectionChangedHandler = getSelectionModel().addSelectionChangeHandler(e -> processSelectionChanged()); getSelectionModel().setDataDisplay(this.hasDataDelegate); getSelectionModel().setMultiSelectEnabled(true); getModel().getItemsChangedEvent().addListener((ev, sender, args) -> { getSelectionModel().clear(); List<T> items = getModel().getItemsAsList(); List<Integer> itemsToSelect = selectedIndexes.stream().filter(selectedIndex -> selectedIndex > -1 && selectedIndex < items.size() ).collect(Collectors.toList()); <START> itemsToSelect.forEach(item -> <END> getSelectionModel().setSelected(items.get(item), true)); updateInfoPanel(); }); }</code><technical_language>index</technical_language>

Target:
public void setModel(M model) { this.model = model; if (selectionChangedHandler != null) { selectionChangedHandler.removeHandler(); } selectionChangedHandler = getSelectionModel().addSelectionChangeHandler(e -> processSelectionChanged()); getSelectionModel().setDataDisplay(this.hasDataDelegate); getSelectionModel().setMultiSelectEnabled(true); getModel().getItemsChangedEvent().addListener((ev, sender, args) -> { getSelectionModel().clear(); List<T> items = getModel().getItemsAsList(); List<Integer> itemsToSelect = selectedIndexes.stream().filter(selectedIndex -> selectedIndex > -1 && selectedIndex < items.size() ).collect(Collectors.toList()); itemsToSelect.forEach(index -> getSelectionModel().setSelected(items.get(index), true)); updateInfoPanel(); }); }
Source:
<code>public void invoke(MessageContext messageContext) throws Exception { Exchange exchange = getEndpoint().createExchange(ExchangePattern.InOptionalOut); populateExchangeFromMessageContext(messageContext, exchange); getProcessor().process(exchange); Message responseMessage = null; Source responseBody = null; if (exchange.getException() != null) { throw exchange.getException(); } else if (exchange.getPattern().isOutCapable()) { <START> responseMessage = exchange.getOut(Message.class); <END> } else { responseMessage = exchange.getIn(Message.class); } if (responseMessage != null) { responseBody = responseMessage.getBody(Source.class); WebServiceMessage response = messageContext.getResponse(); configuration.getMessageFilter().filterConsumer(exchange, response); XmlConverter xmlConverter = configuration.getXmlConverter(); xmlConverter.toResult(responseBody, response.getPayloadResult()); } }</code><technical_language>hasOut() instead grab OUT if true IN if false</technical_language>

Target:
public void invoke(MessageContext messageContext) throws Exception { Exchange exchange = getEndpoint().createExchange(ExchangePattern.InOptionalOut); populateExchangeFromMessageContext(messageContext, exchange); getProcessor().process(exchange); if (exchange.getException() != null) { throw exchange.getException(); } else if (exchange.getPattern().isOutCapable()) { Message responseMessage = exchange.hasOut() ? exchange.getOut(Message.class) : exchange.getIn(Message.class); if (responseMessage != null) { Source responseBody = responseMessage.getBody(Source.class); WebServiceMessage response = messageContext.getResponse(); configuration.getMessageFilter().filterConsumer(exchange, response); XmlConverter xmlConverter = configuration.getXmlConverter(); xmlConverter.toResult(responseBody, response.getPayloadResult()); } } }
Source:
<code>public CallStatus run() { RequestMetrics.Context context = metrics.startDiagnosticsRequest(); LOGGER.debug("run: diagnostic"); Error.reset(); Error.push("rest"); Error.push(getClass().getSimpleName()); try { Response.Status healthCheckResponse = Response.Status.OK; Map<String, HealthCheck.Result> healthCheckResults = new LinkedHashMap<>(); for (Map.Entry<String, Result> entry : healthCheckRegistry.runHealthChecks().entrySet()) { if (entry.getValue().isHealthy()) { LOGGER.debug("diagnosticCheck is OK", entry.getKey()); healthCheckResults.put(entry.getKey(), entry.getValue()); } else { String errorDetails = entry.getKey().toString() + " " + entry.getValue().getDetails(); Error.push("diagnosticCheck failed! " + errorDetails); LOGGER.debug("diagnosticCheck failed!", errorDetails); healthCheckResults.put(entry.getKey(), entry.getValue()); <START> healthCheckResponse = Response.Status.SERVICE_UNAVAILABLE; <END> } } return new CallStatus(new CrudCheckResponse(healthCheckResults), healthCheckResponse); } catch (Error e) { context.markRequestException(e); LOGGER.error("diagnosticCheck failure: {}", e); return new CallStatus(e); } catch (Exception e) { context.markRequestException(e); LOGGER.error("diagnosticCheck failure: {}", e); return new CallStatus(Error.get(RestCrudConstants.ERR_REST_CHECK_DIAGNOSTICS, e.toString())); } finally { context.endRequestMonitoring(); } }</code><technical_language>simplify this a touch putting healthCheckResults.put(entry.getKey(), entry.getValue()); of conditional in branches</technical_language>

Target:
public CallStatus run() { RequestMetrics.Context context = metrics.startDiagnosticsRequest(); LOGGER.debug("run: diagnostic"); Error.reset(); Error.push("rest"); Error.push(getClass().getSimpleName()); try { Response.Status healthCheckResponse = Response.Status.OK; Map<String, HealthCheck.Result> healthCheckResults = new LinkedHashMap<>(); for (Map.Entry<String, Result> entry : healthCheckRegistry.runHealthChecks().entrySet()) { healthCheckResults.put(entry.getKey(), entry.getValue()); if (entry.getValue().isHealthy()) { LOGGER.debug("diagnosticCheck is OK", entry.getKey()); } else { String errorDetails = entry.getKey().toString() + " " + entry.getValue().getDetails(); Error.push("diagnosticCheck failed! " + errorDetails); LOGGER.debug("diagnosticCheck failed!", errorDetails); healthCheckResponse = Response.Status.SERVICE_UNAVAILABLE; } } return new CallStatus(new CrudCheckResponse(healthCheckResults), healthCheckResponse); } catch (Error e) { context.markRequestException(e); LOGGER.error("diagnosticCheck failure: {}", e); return new CallStatus(e); } catch (Exception e) { context.markRequestException(e); LOGGER.error("diagnosticCheck failure: {}", e); return new CallStatus(Error.get(RestCrudConstants.ERR_REST_CHECK_DIAGNOSTICS, e.toString())); } finally { context.endRequestMonitoring(); } }
Source:
<code>public String toString() { return "There are " + totalConnectionCount + " total connections, " + activeConnectionCount + " are active and " + idleConnectionCount + " are idle."; <START> } <END></code><technical_language>implement equals hashcode</technical_language>

Target:
public String toString() { return "There are " + getTotalConnectionCount() + " total connections, " + getTotalActiveConnectionCount() + " are active and " + getTotalIdleConnectionCount() + " are idle."; }
Source:
<code>protected void onMethodInvocationFound(MethodInvocationTree mit) { ExpressionTree firstArg = mit.arguments().get(0); if (isInappropriateRegexpStringLiteral(firstArg) || isFileSeparator(firstArg)) { <START> reportIssue(firstArg, ""); <END> } }</code><technical_language>message is missing</technical_language>

Target:
protected void onMethodInvocationFound(MethodInvocationTree mit) { ExpressionTree firstArg = mit.arguments().get(0); if (isInappropriateRegexpStringLiteral(firstArg) || isFileSeparator(firstArg)) { reportIssue(firstArg, "Correct this regular expression."); } }
Source:
<code>public String asCql() { StringBuilder builder = new StringBuilder(); builder.append("TRUNCATE "); if (keyspace != null) { builder.append(keyspace.asCql(true)).append("."); <START> } <END> builder.append(table.asCql(true)); return builder.toString(); }</code><technical_language>internal utility generate qualified names: java StringBuilder builder = new StringBuilder("TRUNCATE "); CqlHelper.qualify(keyspace, table, builder); return builder.toString();</technical_language>

Target:
public String asCql() { StringBuilder builder = new StringBuilder(); builder.append("TRUNCATE "); CqlHelper.qualify(keyspace, table, builder); return builder.toString(); }
Source:
<code>public void updateSignatureState() { final ScriptType type = getType(); if (type != null) { try { final VerifySignature verifySignature = VerifySignature.getInstance(type, getInputStream()); signatureState = (verifySignature == null) ? null : verifySignature.verify(); } catch (final ScriptSignatureException e) { <START> Logger.error(org.eclipse.ease.ui.Activator.PLUGIN_ID, e.getMessage(), e); <END> } } }</code><technical_language>Logger get ID of current bundle, is "o.e.ease.ui.scripts". wrong activator..</technical_language>

Target:
public void updateSignatureState() { final ScriptType type = getType(); if (type != null) { try { final VerifySignature verifySignature = VerifySignature.getInstance(type, getInputStream()); signatureState = (verifySignature == null) ? null : verifySignature.verify(); } catch (final ScriptSignatureException e) { Logger.error(org.eclipse.ease.ui.scripts.Activator.PLUGIN_ID, e.getMessage(), e); } } }
Source:
<code>protected Control createDialogArea(Composite container) { Control c = super.createDialogArea(container); Composite comp = new Composite(container, SWT.NONE); comp.setLayout(new GridLayout(2, false)); <START> <END> addSelectedRadioButton.createWidgets(comp, 2); addSelectedRadioButton.setSelected(selected == Selection.AddSelection); addSelectedRadioButton.addSelectionListener(new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent e) { super.widgetSelected(e); if (addSelectedRadioButton.isSelected()) { selected = Selection.AddSelection; } } }); replaceAllRadioButton.createWidgets(comp, 2); replaceAllRadioButton.setSelected(selected == Selection.ReplaceAll); replaceAllRadioButton.addSelectionListener(new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent e) { super.widgetSelected(e); if (replaceAllRadioButton.isSelected()) { selected = Selection.ReplaceAll; } } }); if (!isSingletonAttribute) { deleteSelectedRadioButton.createWidgets(comp, 2); deleteSelectedRadioButton.addSelectionListener(new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent e) { super.widgetSelected(e); if (deleteSelectedRadioButton.isSelected()) { selected = Selection.DeleteSelected; } } }); } else if (isRemoveAllAllowed) { removeAll.createWidgets(comp, 2); removeAll.addSelectionListener(new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent e) { super.widgetSelected(e); if (removeAll.isSelected()) { selected = Selection.RemoveAll; } } }); } return c; }</code><technical_language>want do this attribute this option, right</technical_language>

Target:
protected Control createDialogArea(Composite container) { Control c = super.createDialogArea(container); Composite comp = new Composite(container, SWT.NONE); comp.setLayout(new GridLayout(2, false)); if (!isSingletonAttribute) { addSelectedRadioButton.createWidgets(comp, 2); addSelectedRadioButton.setSelected(selected == Selection.AddSelection); addSelectedRadioButton.addSelectionListener(new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent e) { super.widgetSelected(e); if (addSelectedRadioButton.isSelected()) { selected = Selection.AddSelection; } } }); } replaceAllRadioButton.createWidgets(comp, 2); replaceAllRadioButton.setSelected(selected == Selection.ReplaceAll); replaceAllRadioButton.addSelectionListener(new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent e) { super.widgetSelected(e); if (replaceAllRadioButton.isSelected()) { selected = Selection.ReplaceAll; } } }); if (!isSingletonAttribute) { deleteSelectedRadioButton.createWidgets(comp, 2); deleteSelectedRadioButton.addSelectionListener(new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent e) { super.widgetSelected(e); if (deleteSelectedRadioButton.isSelected()) { selected = Selection.DeleteSelected; } } }); } else if (isRemoveAllAllowed) { removeAll.createWidgets(comp, 2); removeAll.addSelectionListener(new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent e) { super.widgetSelected(e); if (removeAll.isSelected()) { selected = Selection.RemoveAll; } } }); } return c; }
Source:
<code>protected Object decode(final ChannelHandlerContext ctx, final ByteBuf buffer) throws Exception { final int bufferBytes = buffer.readableBytes(); if (bufferBytes > 0) { ByteBuf lineBuffer = null; do { lineBuffer = (ByteBuf) super.decode(ctx, buffer); if (lineBuffer != null) { final int index = lineBuffer.readableBytes(); <START> final byte[] response = new byte[index]; <END> lineBuffer.getBytes(lineBuffer.readerIndex(), response); if (literalCount == 0 && index > MINIMAL_LITERAL_LENGTH && response[index - LITERAL_INDEX_FROM_TAIL] == '}') { int i; for (i = index - LITERAL_INDEX_FROM_TAIL - 1; i >= 0; i--) { if (response[i] == '{') { break; } } if (i >= 0) { literalCount = ASCIIUtility.parseInt(response, i + 1, index - LITERAL_INDEX_FROM_TAIL); literalBuffer = Unpooled.buffer(index + literalCount); literalBuffer.writeBytes(response); } } else if (literalCount > 0) { literalBuffer.writeBytes(lineBuffer); literalCount = literalCount - index; } } } while (literalCount > 0 && buffer.readableBytes() > 0 && lineBuffer != null); if (literalBuffer != null && literalCount == 0) { ByteBuf lastLineBuffer = (ByteBuf) super.decode(ctx, buffer); final int lastLineIndex = lastLineBuffer.readableBytes(); final byte[] lastLineBytes = new byte[lastLineIndex]; lastLineBuffer.getBytes(lastLineBuffer.readerIndex(), lastLineBytes); literalBuffer.writeBytes(lastLineBytes); ByteBuf result = literalBuffer.copy(); literalCount = 0; literalBuffer = null; return result; } else { return lineBuffer; } } else { return null; } }</code><technical_language>Copy buffer ready</technical_language>

Target:
protected Object decode(final ChannelHandlerContext ctx, final ByteBuf buffer) throws Exception { final int bufferBytes = buffer.readableBytes(); if (bufferBytes > 0) { ByteBuf lineBuffer = null; do { lineBuffer = (ByteBuf) super.decode(ctx, buffer); if (lineBuffer != null) { final int readableBytes = lineBuffer.readableBytes(); if (literalCount > 0) { literalCount = literalCount - readableBytes; if (literalCount <= 0) { literalCount = getLiteralCount(lineBuffer, readableBytes, readableBytes + literalCount); } literalBuffer.writeBytes(lineBuffer); } else { literalCount = getLiteralCount(lineBuffer, readableBytes, 0); if (literalCount > 0) { literalBuffer = Unpooled.buffer(readableBytes + literalCount); literalBuffer.writeBytes(lineBuffer); } } } } while (literalCount > 0 && buffer.readableBytes() > 0 && lineBuffer != null); if (literalBuffer != null && literalCount == 0) { final ByteBuf lastLineBuffer = (ByteBuf) super.decode(ctx, buffer); final int lastLineIndex = lastLineBuffer.readableBytes(); final byte[] lastLineBytes = new byte[lastLineIndex]; lastLineBuffer.getBytes(lastLineBuffer.readerIndex(), lastLineBytes); literalBuffer.writeBytes(lastLineBytes); final ByteBuf result = literalBuffer.copy(); literalBuffer = null; return result; } else { return lineBuffer; } } else { return null; } }
Source:
<code>protected String getClassProperty() { <START> return super.getClassProperty() + " " + FEED_CLASS_VALUE; <END> }</code><technical_language>I replace " " ' ' is character</technical_language>

Target:
protected String getClassProperty() { return super.getClassProperty() + ' ' + FEED_CLASS_VALUE; }
Source:
<code>public Statement apply(TemplateOptions options) { ImmutableList.Builder<Statement> builder = ImmutableList.builder(); if (options.getRunScript() != null) { builder.add(options.getRunScript()); } if (options.getPrivateKey() != null) { builder.add(new InstallRSAPrivateKey(options.getPrivateKey())); } ImmutableList<Statement> bootstrap = builder.build(); if (!bootstrap.isEmpty()) { if (options.getTaskName() == null && !(options.getRunScript() instanceof InitScript)) { <START> options.nameTask("bootstrap"); <END> } return bootstrap.size() == 1 ? bootstrap.get(0) : new StatementList(bootstrap); } return null; }</code><technical_language>Is clear callers options modified this call? Is intention here? /cc @nacx</technical_language>

Target:
public Statement apply(TemplateOptions options) { ImmutableList.Builder<Statement> builder = ImmutableList.builder(); if (options.getRunScript() != null) { builder.add(options.getRunScript()); } if (options.getPrivateKey() != null) { builder.add(new InstallRSAPrivateKey(options.getPrivateKey())); } ImmutableList<Statement> bootstrap = builder.build(); if (bootstrap.isEmpty()) { return null; } if (options.getTaskName() == null && !(options.getRunScript() instanceof InitScript)) { options.nameTask("bootstrap"); } return bootstrap.size() == 1 ? bootstrap.get(0) : new StatementList(bootstrap); }
Source:
<code>private void consumerLoop() { long lastPeriodicProcess = System.currentTimeMillis(); List<AckEntry> rest = new ArrayList<AckEntry>(INCOMING_QUEUE_LENGTH); while (true) { long now = System.currentTimeMillis(); if ((now - lastPeriodicProcess) > QUEUE_POLL_TIME) { processQueues(); lastPeriodicProcess = now; } <START> AckEntry entry = null; <END> try { entry = incomingQueue.poll(QUEUE_POLL_TIME, TimeUnit.MILLISECONDS); } catch (InterruptedException e) { continue; } if (null != entry) { processIncoming(entry); if (incomingQueue.size() > 0) { incomingQueue.drainTo(rest); for (AckEntry ent : rest) { processIncoming(ent); } rest.clear(); } } if (isShutdown.get()) { if (! incomingQueue.isEmpty()) { continue; } assert incomingQueue.isEmpty(); flush(); return; } } }</code><technical_language>need initialize a here. Change final AckEntry entry; is initialized in try block, out of scope continue in catch block</technical_language>

Target:
private void consumerLoop() { long lastPeriodicProcess = System.currentTimeMillis(); List<AckEntry> rest = new ArrayList<AckEntry>(INCOMING_QUEUE_LENGTH); while (true) { final long now = System.currentTimeMillis(); if ((now - lastPeriodicProcess) > QUEUE_POLL_TIME) { processQueues(); lastPeriodicProcess = now; } final AckEntry entry; try { entry = incomingQueue.poll(QUEUE_POLL_TIME, TimeUnit.MILLISECONDS); } catch (InterruptedException e) { continue; } if (null != entry) { processIncoming(entry); if (incomingQueue.size() > 0) { incomingQueue.drainTo(rest); for (AckEntry ent : rest) { processIncoming(ent); } rest.clear(); } } if (isShutdown.get()) { if (! incomingQueue.isEmpty()) { continue; } assert incomingQueue.isEmpty(); flush(); return; } } }
Source:
<code>private F<Boolean,Response> listChargesAndRefunds(ChargeSearchParams searchParams, UriInfo uriInfo) { Long totalCount = chargeDao.getTotalFor(searchParams); Long size = searchParams.getDisplaySize(); if (totalCount > 0 && size > 0) { long lastPage = (totalCount + size - 1)/ size; <START> if (searchParams.getPage() > lastPage || searchParams.getPage() < 1) { <END> return success -> notFoundResponse("the requested page not found"); } } List<ChargeEntity> charges = chargeDao.findAllBy(searchParams); List<ChargeResponse> chargesResponse = charges.stream() .map(charge -> chargeService.buildChargeResponse(uriInfo, charge) ).collect(Collectors.toList()); return success -> new ChargesPaginationResponseBuilder(searchParams, uriInfo) .withChargeResponses(chargesResponse) .withTotalCount(totalCount) .buildResponse(); }</code><technical_language>I understand this duplication is temporary twenty lines literally identical part of listCharges method. remove duplication moving common bits in a private method</technical_language>

Target:
private F<Boolean,Response> listChargesAndRefunds(ChargeSearchParams searchParams, UriInfo uriInfo) { return listCharges(searchParams, uriInfo); }
Source:
<code>public ValueExtractor<?> getCascadedValueExtractor(Class<?> valueType, TypeVariable<?> cascadingTypeParameter) { Map<Class<?>, Map<TypeVariable<?>, TypeVariable<?>>> allBindings = null; if ( cascadingTypeParameter != AnnotatedObject.INSTANCE && cascadingTypeParameter != ArrayElement.INSTANCE ) { allBindings = TypeVariableBindings.getTypeVariableBindings( (Class<?>) cascadingTypeParameter.getGenericDeclaration() ); <START> } <END> List<ValueExtractorDescriptor> typeCompatibleExtractors = valueExtractors.stream() .filter( e -> TypeHelper.isAssignable( TypeHelper.getErasedReferenceType( e.getExtractedType() ), valueType ) ) .collect( Collectors.toList() ); for ( ValueExtractorDescriptor extractorDescriptor : typeCompatibleExtractors ) { TypeVariable<?> cascadingParameterBoundToExtractorType; if ( cascadingTypeParameter != AnnotatedObject.INSTANCE && cascadingTypeParameter != ArrayElement.INSTANCE ) { Map<TypeVariable<?>, TypeVariable<?>> bindingsForExtractorType = allBindings.get( TypeHelper.getErasedReferenceType( extractorDescriptor.getExtractedType() ) ); cascadingParameterBoundToExtractorType = bind( cascadingTypeParameter, bindingsForExtractorType ); } else { cascadingParameterBoundToExtractorType = cascadingTypeParameter; } if ( cascadingParameterBoundToExtractorType.equals( extractorDescriptor.extractedTypeParameter() ) ) { return extractorDescriptor.getValueExtractor(); } } return null; }</code><technical_language>AFAICS a case happen I I prefer initialized empty map in other case</technical_language>

Target:
public ValueExtractorDescriptor getCascadedValueExtractor(Class<?> valueType, TypeVariable<?> cascadingTypeParameter) { Map<Class<?>, Map<TypeVariable<?>, TypeVariable<?>>> allBindings = null; if ( cascadingTypeParameter != AnnotatedObject.INSTANCE && cascadingTypeParameter != ArrayElement.INSTANCE ) { allBindings = TypeVariableBindings.getTypeVariableBindings( (Class<?>) cascadingTypeParameter.getGenericDeclaration() ); } List<ValueExtractorDescriptor> typeCompatibleExtractors = valueExtractors.stream() .filter( e -> TypeHelper.isAssignable( TypeHelper.getErasedReferenceType( e.getExtractedType() ), valueType ) ) .collect( Collectors.toList() ); for ( ValueExtractorDescriptor extractorDescriptor : typeCompatibleExtractors ) { TypeVariable<?> cascadingParameterBoundToExtractorType; if ( cascadingTypeParameter != AnnotatedObject.INSTANCE && cascadingTypeParameter != ArrayElement.INSTANCE ) { Map<TypeVariable<?>, TypeVariable<?>> bindingsForExtractorType = allBindings.get( TypeHelper.getErasedReferenceType( extractorDescriptor.getExtractedType() ) ); cascadingParameterBoundToExtractorType = bind( cascadingTypeParameter, bindingsForExtractorType ); } else { cascadingParameterBoundToExtractorType = cascadingTypeParameter; } if ( cascadingParameterBoundToExtractorType.equals( extractorDescriptor.extractedTypeParameter() ) ) { return extractorDescriptor; } } return null; }
Source:
<code>public RemoteSolrCatalogProvider( FilterAdapter filterAdapter, SolrClient client, SolrFilterDelegateFactory solrFilterDelegateFactory, @Nullable DynamicSchemaResolver resolver) { <START> notNull(filterAdapter, "FilterAdapter cannot be null"); <END> notNull(solrFilterDelegateFactory, "SolrFilterDelegateFactory cannot be null"); this.filterAdapter = filterAdapter; this.client = client; this.solrFilterDelegateFactory = solrFilterDelegateFactory; this.resolver = (resolver == null) ? new DynamicSchemaResolver() : resolver; this.provider = new SolrCatalogProvider(client, filterAdapter, solrFilterDelegateFactory, this.resolver); provider.maskId(getId()); }</code><technical_language>add notNull(solrClient, "..."); here</technical_language>

Target:
public RemoteSolrCatalogProvider( FilterAdapter filterAdapter, SolrClient client, SolrFilterDelegateFactory solrFilterDelegateFactory, @Nullable DynamicSchemaResolver resolver) { this.provider = new SolrCatalogProvider( client, filterAdapter, solrFilterDelegateFactory, (resolver == null) ? new DynamicSchemaResolver() : resolver); provider.maskId(getId()); }
Source:
<code>public void testStatsForValuesNodeWithJustNulls() { PlanNodeStatsEstimate nullAStats = PlanNodeStatsEstimate.builder() .setOutputRowCount(1) .addSymbolStatistics(new Symbol("a"), SymbolStatsEstimate.builder() .setDistinctValuesCount(0) .setNullsFraction(1.0) <START> .setAverageRowSize(0.0) <END> .setHighValue(NaN) .setLowValue(NaN) .build()) .build(); tester().assertStatsFor(pb -> pb .values(ImmutableList.of(pb.symbol("a", BIGINT)), ImmutableList.of( ImmutableList.of(expression("3 + null"))))) .check(outputStats -> outputStats.equalTo(nullAStats)); tester().assertStatsFor(pb -> pb .values(ImmutableList.of(pb.symbol("a", BIGINT)), ImmutableList.of( ImmutableList.of(expression("null"))))) .check(outputStats -> outputStats.equalTo(nullAStats)); tester().assertStatsFor(pb -> pb .values(ImmutableList.of(pb.symbol("a", UNKNOWN)), ImmutableList.of( ImmutableList.of(expression("null"))))) .check(outputStats -> outputStats.equalTo(nullAStats)); }</code><technical_language>NaN NaN</technical_language>

Target:
public void testStatsForValuesNodeWithJustNulls() { PlanNodeStatsEstimate nullAStats = PlanNodeStatsEstimate.builder() .setOutputRowCount(1) .addSymbolStatistics(new Symbol("a"), SymbolStatsEstimate.zero()) .build(); tester().assertStatsFor(pb -> pb .values(ImmutableList.of(pb.symbol("a", BIGINT)), ImmutableList.of( ImmutableList.of(expression("3 + null"))))) .check(outputStats -> outputStats.equalTo(nullAStats)); tester().assertStatsFor(pb -> pb .values(ImmutableList.of(pb.symbol("a", BIGINT)), ImmutableList.of( ImmutableList.of(expression("null"))))) .check(outputStats -> outputStats.equalTo(nullAStats)); tester().assertStatsFor(pb -> pb .values(ImmutableList.of(pb.symbol("a", UNKNOWN)), ImmutableList.of( ImmutableList.of(expression("null"))))) .check(outputStats -> outputStats.equalTo(nullAStats)); }
Source:
<code>public void testGetColumnText() throws Exception { SevereLoggingMonitor loggingMonitor = TestUtil.severeLoggingStart(); TeamWorkFlowArtifact reqArt = (TeamWorkFlowArtifact) DemoTestUtil.getUncommittedActionWorkflow(DemoWorkType.Requirements); TeamWorkFlowArtifact codeArt = (TeamWorkFlowArtifact) DemoTestUtil.getUncommittedActionWorkflow(DemoWorkType.Code); <START> TeamWorkFlowArtifact toolsArt = DemoTestUtil.getToolsTeamWorkflow(); <END> Collection<IAtsVersion> hV = reqArt.getTeamDefinition().getTeamDefinitionHoldingVersions().getVersions(); IAtsVersion[] holdingVersions = hV.toArray(new IAtsVersion[hV.size()]); IAtsChangeSet changes = AtsClientService.get().createChangeSet("Update Found-In-Version Test"); changes.setRelation(reqArt, XFoundInVersionWidget.FOUND_VERSION_RELATION, holdingVersions[0]); changes.executeIfNeeded(); changes = AtsClientService.get().createChangeSet("Update Found-In-Version Test"); changes.setRelation(codeArt, XFoundInVersionWidget.FOUND_VERSION_RELATION, holdingVersions[1]); changes.executeIfNeeded(); Assert.assertEquals(holdingVersions[0].toString(), FoundInVersionColumnUI.getInstance().getColumnText(reqArt, FoundInVersionColumnUI.getInstance(), 0)); Assert.assertEquals(holdingVersions[1].toString(), FoundInVersionColumnUI.getInstance().getColumnText(codeArt, FoundInVersionColumnUI.getInstance(), 0)); Assert.assertEquals("", FoundInVersionColumnUI.getInstance().getColumnText(toolsArt, FoundInVersionColumnUI.getInstance(), 0)); TestUtil.severeLoggingEnd(loggingMonitor); }</code><technical_language>more descriptive file. replace hV teamDefWithVers something. a clearer load a single version AtsClientService.get().getVersionService.get(DemoArtifactTokens.SAW_Bld_1); need workflow loaded. 1. Load codeArt 2. Check "" FIV.getText(codeArt) 3. Add FIV relation codeArt 4. Check fiv.equals(DemoArtifactTokens.SAW_Bld_1)</technical_language>

Target:
public void testGetColumnText() throws Exception { SevereLoggingMonitor loggingMonitor = TestUtil.severeLoggingStart(); TeamWorkFlowArtifact codeArt = (TeamWorkFlowArtifact) DemoTestUtil.getUncommittedActionWorkflow(DemoWorkType.Code); IAtsVersion demoVersion = AtsClientService.get().getVersionService().getVersion(DemoArtifactToken.SAW_Bld_1); Assert.assertEquals("", FoundInVersionColumnUI.getInstance().getColumnText(codeArt, FoundInVersionColumnUI.getInstance(), 0)); IAtsChangeSet changes = AtsClientService.get().createChangeSet("Update Found-In-Version Test"); changes.setRelation(codeArt, XFoundInVersionWidget.FOUND_VERSION_RELATION, demoVersion); changes.executeIfNeeded(); Assert.assertEquals(demoVersion.toString(), FoundInVersionColumnUI.getInstance().getColumnText(codeArt, FoundInVersionColumnUI.getInstance(), 0)); TestUtil.severeLoggingEnd(loggingMonitor); }
Source:
<code>private Answer executeRequest(SyncNuageVspCmsIdCommand cmd) { try { isNuageVspManagerLoaded(); if (cmd.getSyncType() == SyncType.AUDIT || cmd.getSyncType() == SyncType.AUDIT_ONLY) { Pair<Boolean, String> answer = _nuageVspManagerClient.auditNuageVspCmsId(cmd.getNuageVspCmsId(), cmd.getSyncType() == SyncType.AUDIT_ONLY); return new SyncNuageVspCmsIdAnswer(answer.getLeft(), answer.getRight(), cmd.getSyncType()); } else if (cmd.getSyncType() == SyncType.REGISTER) { String registeredNuageVspCmsId = _nuageVspManagerClient.registerNuageVspCmsId(); return new SyncNuageVspCmsIdAnswer(StringUtils.isNotBlank(registeredNuageVspCmsId), registeredNuageVspCmsId, cmd.getSyncType()); } else { boolean success = _nuageVspManagerClient.unregisterNuageVspCmsId(cmd.getNuageVspCmsId()); return new SyncNuageVspCmsIdAnswer(success, cmd.getNuageVspCmsId(), cmd.getSyncType()); } <START> } catch (Exception e) { <END> return new SyncNuageVspCmsIdAnswer(false, null, cmd.getSyncType()); } }</code><technical_language>Log exception error</technical_language>

Target:
private Answer executeRequest(SyncNuageVspCmsIdCommand cmd) { try { isNuageVspManagerLoaded(); if (cmd.getSyncType() == SyncType.AUDIT || cmd.getSyncType() == SyncType.AUDIT_ONLY) { Pair<Boolean, String> answer = _nuageVspManagerClient.auditNuageVspCmsId(cmd.getNuageVspCmsId(), cmd.getSyncType() == SyncType.AUDIT_ONLY); return new SyncNuageVspCmsIdAnswer(answer.getLeft(), answer.getRight(), cmd.getSyncType()); } else if (cmd.getSyncType() == SyncType.REGISTER) { String registeredNuageVspCmsId = _nuageVspManagerClient.registerNuageVspCmsId(); return new SyncNuageVspCmsIdAnswer(StringUtils.isNotBlank(registeredNuageVspCmsId), registeredNuageVspCmsId, cmd.getSyncType()); } else { boolean success = _nuageVspManagerClient.unregisterNuageVspCmsId(cmd.getNuageVspCmsId()); return new SyncNuageVspCmsIdAnswer(success, cmd.getNuageVspCmsId(), cmd.getSyncType()); } } catch (ExecutionException | ConfigurationException e) { s_logger.error("Failure during " + cmd + " on Nuage VSD " + _hostName, e); return new SyncNuageVspCmsIdAnswer(false, null, cmd.getSyncType()); } }
Source:
<code>public Set<ConnectorPlanOptimizer> getConnectorPlanOptimizers() { <START> RowExpressionToSqlTranslator translator = getRowExpressionToSqlTranslator( <END> functionManager, buildFunctionTranslator(getFunctionTranslators())); return ImmutableSet.of(new JdbcComputePushdown( functionManager, functionResolution, determinismEvaluator, expressionOptimizer, translator)); }</code><technical_language>Pass result of buildFunctionTranslator(getFunctionTranslators()) JdbcComputePushdown. translator is a generic row expr translator. Create RowExpressionToSqlTranslator JdbcComputePushdown filter translator</technical_language>

Target:
public Set<ConnectorPlanOptimizer> getConnectorPlanOptimizers() { return ImmutableSet.of(new JdbcComputePushdown( functionManager, functionResolution, determinismEvaluator, expressionOptimizer, identifierQuote, getFunctionTranslators())); }
Source:
<code>private List<EReference> getValidContainmentReferences(EObject eObject) { List<EReference> eReferences = new ArrayList<>(); List<EStructuralFeature> eAllStructuralFeatures = eObject.eClass().getEAllStructuralFeatures(); for (EStructuralFeature eStructuralFeature : eAllStructuralFeatures) { if (eStructuralFeature instanceof EReference) { EReference reference = (EReference) eStructuralFeature; if (reference.isContainment() && <START> this.eReference.getEReferenceType().isSuperTypeOf(reference.getEReferenceType())) <END> { eReferences.add(reference); } } } return eReferences; }</code><technical_language>Inverse order</technical_language>

Target:
private List<EReference> getValidContainmentReferences(EObject eObject) { List<EReference> eReferences = new ArrayList<>(); List<EStructuralFeature> eAllStructuralFeatures = eObject.eClass().getEAllStructuralFeatures(); for (EStructuralFeature eStructuralFeature : eAllStructuralFeatures) { if (eStructuralFeature instanceof EReference) { EReference reference = (EReference) eStructuralFeature; if (reference.isContainment() && reference.getEReferenceType().isSuperTypeOf(this.eReference.getEReferenceType())) { eReferences.add(reference); } } } return eReferences; }
Source:
<code>public static Block bingTileCoordinates(@SqlType(BingTileType.NAME) long input) <START> { <END> BingTile tile = BingTile.decode(input); BlockBuilder tileBlockBuilder = BIGINT.createBlockBuilder(new BlockBuilderStatus(), 2); BIGINT.writeLong(tileBlockBuilder, tile.getX()); BIGINT.writeLong(tileBlockBuilder, tile.getY()); return tileBlockBuilder.build(); }</code><technical_language>comma returns not</technical_language>

Target:
public static Block bingTileCoordinates(@SqlType(BingTileType.NAME) long input) { BingTile tile = BingTile.decode(input); BlockBuilder tileBlockBuilder = INTEGER.createBlockBuilder(new BlockBuilderStatus(), 2); INTEGER.writeLong(tileBlockBuilder, tile.getX()); INTEGER.writeLong(tileBlockBuilder, tile.getY()); return tileBlockBuilder.build(); }