auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>public ByteBuf internalReadEntry(long ledgerId, long entryId, long location) throws IOException, Bookie.NoEntryException { EntryLogBufferedReadChannel bc = null; try { <START> long entryLogId = logIdForOffset(location); <END> long pos = location & 0xffffffffL; ByteBuf sizeBuff = sizeBuffer.get(); sizeBuff.clear(); pos -= 4; bc = getChannelForLogId(entryLogId); if (readFromLogChannel(entryLogId, bc, sizeBuff, pos) != sizeBuff.capacity()) { throw new Bookie.NoEntryException("Short read from entrylog " + entryLogId, ledgerId, entryId); } pos += 4; int entrySize = sizeBuff.readInt(); if (entrySize > maxSaneEntrySize) { LOG.warn("Sanity check failed for entry size of " + entrySize + " at location " + pos + " in " + entryLogId); } if (entrySize < MIN_SANE_ENTRY_SIZE) { LOG.error("Read invalid entry length {}", entrySize); throw new IOException("Invalid entry length " + entrySize); } ByteBuf data = PooledByteBufAllocator.DEFAULT.directBuffer(entrySize, entrySize); int rc = readFromLogChannel(entryLogId, bc, data, pos); if (rc != entrySize) { data.release(); throw new Bookie.NoEntryException("Short read for " + ledgerId + "@" + entryId + " in " + entryLogId + "@" + pos + "(" + rc + "!=" + entrySize + ")", ledgerId, entryId); } data.writerIndex(entrySize); return data; } catch (FileNotFoundException e) { FileNotFoundException newe = new FileNotFoundException(e.getMessage() + " for " + ledgerId + " with location " + location); newe.setStackTrace(e.getStackTrace()); throw newe; } finally { if (null != bc) { bc.release(); } } }</code><technical_language>is this change for? pretty before, exception handling changed</technical_language>

Target:
public ByteBuf internalReadEntry(long ledgerId, long entryId, long location) throws IOException, Bookie.NoEntryException { long entryLogId = logIdForOffset(location); long pos = location & 0xffffffffL; ByteBuf sizeBuff = sizeBuffer.get(); sizeBuff.clear(); pos -= 4; try (EntryLogBufferedReadChannel bc = getChannelForLogId(entryLogId)){ if (readFromLogChannel(entryLogId, bc, sizeBuff, pos) != sizeBuff.capacity()) { throw new Bookie.NoEntryException("Short read from entrylog " + entryLogId, ledgerId, entryId); } pos += 4; int entrySize = sizeBuff.readInt(); if (entrySize > maxSaneEntrySize) { LOG.warn("Sanity check failed for entry size of at location in {}", entrySize, pos, entryLogId); } if (entrySize < MIN_SANE_ENTRY_SIZE) { LOG.error("Read invalid entry length {}", entrySize); throw new IOException("Invalid entry length " + entrySize); } ByteBuf data = PooledByteBufAllocator.DEFAULT.directBuffer(entrySize, entrySize); int rc = readFromLogChannel(entryLogId, bc, data, pos); if (rc != entrySize) { data.release(); throw new Bookie.NoEntryException("Short read for " + ledgerId + "@" + entryId + " in " + entryLogId + "@" + pos + "(" + rc + "!=" + entrySize + ")", ledgerId, entryId); } data.writerIndex(entrySize); return data; } catch (FileNotFoundException e) { FileNotFoundException newe = new FileNotFoundException(e.getMessage() + " for " + ledgerId + " with location " + location); newe.setStackTrace(e.getStackTrace()); throw newe; } }
Source:
<code>public Flux<T> all() { return Flux.defer(() -> { String statement = assembleEntityQuery(false); <START> System.out.println(statement); <END> return template.getCouchbaseClientFactory().getCluster().reactive().query(statement, buildQueryOptions()) .onErrorMap(throwable -> { if (throwable instanceof RuntimeException) { return template.potentiallyConvertRuntimeException((RuntimeException) throwable); } else { return throwable; } }).flatMapMany(ReactiveQueryResult::rowsAsObject).map(row -> { String id = row.getString("__id"); long cas = row.getLong("__cas"); row.removeKey("__id"); row.removeKey("__cas"); return template.support().decodeEntity(id, row.toString(), cas, domainType); }); }); }</code><technical_language>leftovers</technical_language>

Target:
public Flux<T> all() { return Flux.defer(() -> { String statement = assembleEntityQuery(false); return template.getCouchbaseClientFactory().getCluster().reactive().query(statement, buildQueryOptions()) .onErrorMap(throwable -> { if (throwable instanceof RuntimeException) { return template.potentiallyConvertRuntimeException((RuntimeException) throwable); } else { return throwable; } }).flatMapMany(ReactiveQueryResult::rowsAsObject).map(row -> { String id = row.getString("__id"); long cas = row.getLong("__cas"); row.removeKey("__id"); row.removeKey("__cas"); return template.support().decodeEntity(id, row.toString(), cas, domainType); }); }); }
Source:
<code>public StyledString getStyledText(Object element) { String text = getText(element); StyledString styledString = null; if (text != null) { <START> styledString = new StyledString(text); <END> if (element instanceof ITmfStyledProjectModelElement) { Styler styler = ((ITmfStyledProjectModelElement) element).getStyler(); if (styler != null) { styledString = new StyledString(text, styler); } } boolean displayTimeRange = Activator.getDefault().getPreferenceStore().getBoolean(ITmfUIPreferences.TRACE_DISPLAY_RANGE_PROJECTEXPLORER); if (displayTimeRange && element instanceof TmfTraceElement) { styledString.append(formatTraceRange(((TmfTraceElement) element).getElementUnderTraceFolder())); } } return styledString; }</code><technical_language>checking if styledstring is null assigning it</technical_language>

Target:
public StyledString getStyledText(Object element) { String text = getText(element); StyledString styledString = null; if (text != null) { if (element instanceof ITmfStyledProjectModelElement) { Styler styler = ((ITmfStyledProjectModelElement) element).getStyler(); if (styler != null) { styledString = new StyledString(text, styler); } } if (styledString == null) { styledString = new StyledString(text); } boolean displayTimeRange = Activator.getDefault().getPreferenceStore().getBoolean(ITmfUIPreferences.TRACE_DISPLAY_RANGE_PROJECTEXPLORER); if (displayTimeRange && element instanceof TmfTraceElement) { styledString.append(formatTraceRange(((TmfTraceElement) element).getElementUnderTraceFolder())); } } return styledString; }
Source:
<code>public Set<String> getBlacklist(List<Map<String, Set<Integer>>> supervisorsWithFailures, Cluster cluster, Topologies topologies) { Map<String, Integer> countMap = new HashMap<>(); for (Map<String, Set<Integer>> item : supervisorsWithFailures) { Set<String> supervisors = item.keySet(); for (String supervisor : supervisors) { int supervisorCount = countMap.getOrDefault(supervisor, 0); countMap.put(supervisor, supervisorCount + 1); } } for (Map.Entry<String, Integer> entry : countMap.entrySet()) { String supervisor = entry.getKey(); int count = entry.getValue(); if (count >= toleranceCount) { if (!blacklist.containsKey(supervisor)) { LOG.debug("Added supervisor to blacklist", supervisor); LOG.debug("supervisorsWithFailures : {}", supervisorsWithFailures); reporter.reportBlacklist(supervisor, supervisorsWithFailures); blacklist.put(supervisor, resumeTime / nimbusMonitorFreqSecs); } } } Set<String> toRelease = releaseBlacklistWhenNeeded(cluster, new ArrayList<>(blacklist.keySet())); <START> cluster.setQuarantinedSupervisors(toRelease); <END> if (toRelease != null) { LOG.debug("Releasing nodes because of low resources", toRelease.size()); for (String key : toRelease) { blacklist.remove(key); } } return blacklist.keySet(); }</code><technical_language>I this a side effect of this getBlacklist function. I for a resolve this</technical_language>

Target:
public Set<String> getBlacklist(List<Map<String, Set<Integer>>> supervisorsWithFailures, Cluster cluster, Topologies topologies) { Map<String, Integer> countMap = new HashMap<>(); for (Map<String, Set<Integer>> item : supervisorsWithFailures) { Set<String> supervisors = item.keySet(); for (String supervisor : supervisors) { int supervisorCount = countMap.getOrDefault(supervisor, 0); countMap.put(supervisor, supervisorCount + 1); } } for (Map.Entry<String, Integer> entry : countMap.entrySet()) { String supervisor = entry.getKey(); int count = entry.getValue(); if (count >= toleranceCount) { if (!blacklist.containsKey(supervisor)) { LOG.debug("Added supervisor to blacklist", supervisor); LOG.debug("supervisorsWithFailures : {}", supervisorsWithFailures); reporter.reportBlacklist(supervisor, supervisorsWithFailures); blacklist.put(supervisor, resumeTime / nimbusMonitorFreqSecs); } } } Set<String> toRelease = releaseBlacklistWhenNeeded(cluster, new ArrayList<>(blacklist.keySet())); if (toRelease != null) { LOG.debug("Releasing nodes because of low resources", toRelease.size()); cluster.setGreyListedSupervisors(toRelease); for (String key : toRelease) { blacklist.remove(key); } } return blacklist.keySet(); }
Source:
<code>public Mutex getMutexForHttpSession(final String sessionId) { Assert.requireNonBlank(sessionId, "sessionId"); <START> WeakReference<Mutex> mutexReference = sessionMutexMap.get(sessionId); <END> Assert.requireNonNull(mutexReference, "mutexReference"); return mutexReference.get(); }</code><technical_language>final</technical_language>

Target:
public Mutex getMutexForHttpSession(final String sessionId) { Assert.requireNonBlank(sessionId, "sessionId"); final WeakReference<Mutex> mutexReference = sessionMutexMap.get(sessionId); Assert.requireNonNull(mutexReference, "mutexReference"); return mutexReference.get(); }
Source:
<code>public Plan(PlanNode root, Map<Symbol, Type> types, Lookup lookup, Session session) { requireNonNull(root, "root is null"); requireNonNull(types, "types is null"); requireNonNull(lookup, "lookup is null"); this.root = root; this.types = ImmutableMap.copyOf(types); this.planNodeCosts = getPlanNodes(root) .stream() <START> .collect(toImmutableMap(PlanNode::getId, node -> lookup.getCost(node, session, types))); <END> }</code><technical_language>This means compute costs for nodes if need</technical_language>

Target:
public Plan(PlanNode root, Map<Symbol, Type> types, Lookup lookup, Session session) { requireNonNull(root, "root is null"); requireNonNull(types, "types is null"); requireNonNull(lookup, "lookup is null"); this.root = root; this.types = ImmutableMap.copyOf(types); this.planNodeStatsEstimates = getPlanNodes(root) .stream() .collect(toImmutableMap(PlanNode::getId, node -> lookup.getStats(node, session, types))); }
Source:
<code>private Row fetchNodeInfo(Host host, Connection c) throws ConnectionException, BusyConnectionException, ExecutionException, InterruptedException { boolean isConnectedHost = c.address.equals(host.getSocketAddress()); if (isConnectedHost || host.getBroadcastSocketAddress() != null) { String query; if (isConnectedHost) { query = SELECT_LOCAL; } else { InetSocketAddress broadcastAddress = host.getBroadcastSocketAddress(); query = isPeersV2 ? SELECT_PEERS_V2 + " WHERE peer='" + broadcastAddress.getAddress().getHostAddress() + "' AND peer_port=" + broadcastAddress.getPort() : SELECT_PEERS + " WHERE peer='" + broadcastAddress.getAddress().getHostAddress() + "'"; } DefaultResultSetFuture future = new DefaultResultSetFuture(null, cluster.protocolVersion(), new Requests.Query(query)); c.write(future); Row row = future.get().one(); if (row != null) { return row; } else { InetSocketAddress address = host.getBroadcastSocketAddress(); String addressToUse = address.getPort() != 0 ? address.toString() : address.getAddress().toString(); logger.debug( "Could not find peer with broadcast address {}, " + "falling back to a full system.peers scan to fetch info for " + "(this can happen if the broadcast address changed)", address, host); } <START> } <END> ListenableFuture<ResultSet> future = selectPeersFuture(c); for (Row row : future.get()) { InetSocketAddress addr = nativeAddressForPeerHost(row, c.address, cluster); if (addr != null && addr.equals(host.getSocketAddress())) return row; } return null; }</code><technical_language>a bit lost here: do read broadcastSocketAddress again? addressToUse is used. address is in log message</technical_language>

Target:
private Row fetchNodeInfo(Host host, Connection c) throws ConnectionException, BusyConnectionException, ExecutionException, InterruptedException { boolean isConnectedHost = c.address.equals(host.getSocketAddress()); if (isConnectedHost || host.getBroadcastSocketAddress() != null) { String query; if (isConnectedHost) { query = SELECT_LOCAL; } else { InetSocketAddress broadcastAddress = host.getBroadcastSocketAddress(); query = isPeersV2 ? SELECT_PEERS_V2 + " WHERE peer='" + broadcastAddress.getAddress().getHostAddress() + "' AND peer_port=" + broadcastAddress.getPort() : SELECT_PEERS + " WHERE peer='" + broadcastAddress.getAddress().getHostAddress() + "'"; } DefaultResultSetFuture future = new DefaultResultSetFuture(null, cluster.protocolVersion(), new Requests.Query(query)); c.write(future); Row row = future.get().one(); if (row != null) { return row; } else { InetSocketAddress address = host.getBroadcastSocketAddress(); String addressToUse = address.getPort() != 0 ? address.toString() : address.getAddress().toString(); logger.debug( "Could not find peer with broadcast address {}, " + "falling back to a full system.peers scan to fetch info for " + "(this can happen if the broadcast address changed)", addressToUse, host); } } ListenableFuture<ResultSet> future = selectPeersFuture(c); for (Row row : future.get()) { InetSocketAddress addr = nativeAddressForPeerHost(row, c.address, cluster); if (addr != null && addr.equals(host.getSocketAddress())) return row; } return null; }
Source:
<code>public void forwardMergeBranchExcludeChange() throws Exception { indexRevision(MAIN, NEW_DATA); indexRevision(MAIN, NEW_DATA2); String child = createBranch(MAIN, "a"); indexChange(child, NEW_DATA, CHANGED_DATA); assertState(child, MAIN, BranchState.FORWARD); branching() .prepareMerge(child, MAIN) .exclude(STORAGE_KEY1) .squash(true) .merge(); assertState(MAIN, child, BranchState.FORWARD); assertState(child, MAIN, BranchState.BEHIND); assertNotNull(getRevision(MAIN, RevisionData.class, STORAGE_KEY2)); <START> assertNotNull(getRevision(MAIN, RevisionData.class, STORAGE_KEY1)); <END> assertEquals(getRevision(MAIN, RevisionData.class, STORAGE_KEY1), NEW_DATA); }</code><technical_language>Unnecessary assertion, please remove</technical_language>

Target:
public void forwardMergeBranchExcludeChange() throws Exception { indexRevision(MAIN, NEW_DATA); indexRevision(MAIN, NEW_DATA2); String child = createBranch(MAIN, "a"); indexChange(child, NEW_DATA, CHANGED_DATA); assertState(child, MAIN, BranchState.FORWARD); branching() .prepareMerge(child, MAIN) .exclude(STORAGE_KEY1) .squash(true) .merge(); assertState(MAIN, child, BranchState.FORWARD); assertState(child, MAIN, BranchState.BEHIND); assertNotNull(getRevision(MAIN, RevisionData.class, STORAGE_KEY2)); assertEquals(getRevision(MAIN, RevisionData.class, STORAGE_KEY1), NEW_DATA); }
Source:
<code>public SimpleRabbitListenerContainerFactory consumerBatchContainerFactory() { SimpleRabbitListenerContainerFactory factory = new SimpleRabbitListenerContainerFactory(); factory.setConnectionFactory(rabbitConnectionFactory()); factory.setConsumerTagStrategy(consumerTagStrategy()); factory.setBatchListener(true); factory.setContainerConfigurer(container -> { container.setConsumerBatchEnabled(true); <START> container.setDeBatchingEnabled(true); <END> container.setBatchSize(2); }); return factory; }</code><technical_language>options populated SimpleRabbitListenerContainerFactory etBatchListener(true) is used</technical_language>

Target:
public SimpleRabbitListenerContainerFactory consumerBatchContainerFactory() { SimpleRabbitListenerContainerFactory factory = new SimpleRabbitListenerContainerFactory(); factory.setConnectionFactory(rabbitConnectionFactory()); factory.setConsumerTagStrategy(consumerTagStrategy()); factory.setBatchListener(true); factory.setBatchSize(2); factory.setConsumerBatchEnabled(true); return factory; }
Source:
<code>public static String parent(String deckName) { int index = deckName.lastIndexOf("::"); if (index == -1) { return null; } <START> if (deckName.charAt(index-1) == ':') { <END> index -= 1; } return deckName.substring(0, index); }</code><technical_language>request feel great I for anki - this bug happened e.g. if a straight port</technical_language>

Target:
public static String parent(String deckName) { List<String> parts = Arrays.asList(deckName.split("::", -1)); if (parts.size() < 2) { return null; } else { parts = parts.subList(0, parts.size() - 1); return TextUtils.join("::", parts); } }
Source:
<code>public void reset(Checkpoint checkpoint) throws Exception { TRACE.log(TraceLevel.DEBUG, "Reset to checkpoint " + checkpoint.getSequenceId(), CONSISTEN_ASPECT); if (fFileToWrite != null) <START> fFileToWrite.close(); <END> String path = (String)checkpoint.getInputStream().readObject(); long tupleCnt = checkpoint.getInputStream().readLong(); long size = checkpoint.getInputStream().readLong(); int fileNum = checkpoint.getInputStream().readInt(); if (dynamicFilename) { rawFileName = (String) checkpoint.getInputStream().readObject(); if (rawFileName == null) rawFileName = ""; } createFile(path); fFileToWrite.setTupleCnt(tupleCnt); fFileToWrite.setSize(size); fFileToWrite.setAppend(true); currentFileName = path; this.fileNum = fileNum; unsetRestarting(); }</code><technical_language>close file instead of calling closeFile()? of tasks of closeFile() is interrupt fileTimerThread set null. this change, reset() leave thread running in background. I concerned this unusual problems file expiration processing continues</technical_language>

Target:
public void reset(Checkpoint checkpoint) throws Exception { TRACE.log(TraceLevel.DEBUG, "Reset to checkpoint " + checkpoint.getSequenceId(), CONSISTEN_ASPECT); if (fFileToWrite != null) closeFile(); String path = (String)checkpoint.getInputStream().readObject(); long tupleCnt = checkpoint.getInputStream().readLong(); long size = checkpoint.getInputStream().readLong(); int fileNum = checkpoint.getInputStream().readInt(); if (dynamicFilename) { rawFileName = (String) checkpoint.getInputStream().readObject(); if (rawFileName == null) rawFileName = ""; } createFile(path); fFileToWrite.setTupleCnt(tupleCnt); fFileToWrite.setSize(size); fFileToWrite.setAppend(true); currentFileName = path; this.fileNum = fileNum; unsetRestarting(); }
Source:
<code>public void service(Mail mail) { <START> String logs = ""; <END> logs += logComment(); try { logs += logHeaders(mail) + logBody(mail) + logAttribute(mail); switch (logLevel) { case INFO: logger.info(logs); break; case DEBUG: logger.debug(logs); break; case ERROR: logger.error(logs); break; case WARN: logger.warn(logs); break; default: logger.info(logs); break; } } catch (MessagingException | IOException e) { logger.error("Error logging message.", e); } if (!passThrough) { mail.setState(Mail.GHOST); } }</code><technical_language>a stringBuilder build end of request avoid variable re-allocation</technical_language>

Target:
public void service(Mail mail) { StringBuilder logs = new StringBuilder(); logs.append(commentLog()); try { logs.append(headersLog(mail)); logs.append(bodyLog(mail)); logs.append(attributeLog(mail)); logLevel.log().accept(logger, logs.toString()); } catch (MessagingException | IOException e) { logger.error("Error logging message.", e); } if (!passThrough) { mail.setState(Mail.GHOST); } }
Source:
<code>public void createPartControl(Composite parent) { String name = getViewSite().getSecondaryId(); if (name != null) { name = TmfViewFactory.getBaseSecId(name); } if (name != null) { fViewInfo.setName(name); } fPresentationProvider = new XmlPresentationProvider(name); <START> TimeGraphViewer timeGraphViewer = getTimeGraphViewer(); <END> timeGraphViewer.getTimeGraphControl().colorSettingsChanged(timeGraphViewer.getTimeGraphProvider().getStateTable()); super.createPartControl(parent); }</code><technical_language>NPE: timeGraphViewer is null super is called. I next line is necessary</technical_language>

Target:
public void createPartControl(Composite parent) { String name = getViewSite().getSecondaryId(); if (name != null) { name = TmfViewFactory.getBaseSecId(name); } if (name != null) { fViewInfo.setName(name); } fPresentationProvider = new XmlPresentationProvider(name); super.createPartControl(parent); TimeGraphViewer timeGraphViewer = getTimeGraphViewer(); timeGraphViewer.getTimeGraphControl().colorSettingsChanged(timeGraphViewer.getTimeGraphProvider().getStateTable()); }
Source:
<code>public NewHostModel() { super(); getExternalHostName().getSelectedItemChangedEvent().addListener(new IEventListener() { @Override public void eventRaised(Event ev, Object sender, EventArgs args) { hostName_SelectedItemChanged(); } }); getExternalHostName().setIsAvailable(ApplicationModeHelper.getUiMode() != ApplicationMode.GlusterOnly); getExternalDiscoveredHosts().getSelectedItemChangedEvent().addListener(new IEventListener() { @Override public void eventRaised(Event ev, Object sender, EventArgs args) { discoverHostName_SelectedItemChanged(); } }); getExternalDiscoveredHosts().setIsAvailable(ApplicationModeHelper.getUiMode() != ApplicationMode.GlusterOnly); getExternalHostProviderEnabled().setIsAvailable(ApplicationModeHelper.getUiMode() != ApplicationMode.GlusterOnly); getProviders().getSelectedItemChangedEvent().addListener(new IEventListener() { @Override public void eventRaised(Event ev, Object sender, EventArgs args) { getProviders().setIsChangable(false); providers_SelectedItemChanged(); if (getIsDiscorveredHosts().getEntity() != null) { updateHostList(getIsDiscorveredHosts().getEntity()); } else { <START> updateHostList(true); <END> updateHostList(false); } } }); getProviders().setIsAvailable(ApplicationModeHelper.getUiMode() != ApplicationMode.GlusterOnly); getProviderSearchFilter().setIsAvailable(ApplicationModeHelper.getUiMode() != ApplicationMode.GlusterOnly); getProviderSearchFilterLabel().setIsAvailable(ApplicationModeHelper.getUiMode() != ApplicationMode.GlusterOnly); getExternalHostProviderEnabled().setEntity(false); setEnableSearchHost(false); }</code><technical_language>update twice</technical_language>

Target:
public NewHostModel() { super(); getExternalHostName().getSelectedItemChangedEvent().addListener(new IEventListener() { @Override public void eventRaised(Event ev, Object sender, EventArgs args) { hostName_SelectedItemChanged(); } }); getExternalHostName().setIsAvailable(ApplicationModeHelper.getUiMode() != ApplicationMode.GlusterOnly); getExternalDiscoveredHosts().getSelectedItemChangedEvent().addListener(new IEventListener() { @Override public void eventRaised(Event ev, Object sender, EventArgs args) { discoverHostName_SelectedItemChanged(); } }); getExternalDiscoveredHosts().setIsAvailable(ApplicationModeHelper.getUiMode() != ApplicationMode.GlusterOnly); getExternalHostProviderEnabled().setIsAvailable(ApplicationModeHelper.getUiMode() != ApplicationMode.GlusterOnly); getProviders().getSelectedItemChangedEvent().addListener(new IEventListener() { @Override public void eventRaised(Event ev, Object sender, EventArgs args) { getProviders().setIsChangable(false); providers_SelectedItemChanged(); updateHostList(); } }); getProviders().setIsAvailable(ApplicationModeHelper.getUiMode() != ApplicationMode.GlusterOnly); getProviderSearchFilter().setIsAvailable(ApplicationModeHelper.getUiMode() != ApplicationMode.GlusterOnly); getProviderSearchFilterLabel().setIsAvailable(ApplicationModeHelper.getUiMode() != ApplicationMode.GlusterOnly); getExternalHostProviderEnabled().setEntity(false); setEnableSearchHost(false); }
Source:
<code>public BeaconImpl() { <START> this.id(ID); <END> this.name(NAME); this.apiVersion(APIVERSION); this.organization(new BeaconOrganizationImpl()); this.description(DESCRIPTION); this.version(VERSION); this.welcomeUrl(WELCOME_URL); this.alternativeUrl(ALTERNATIVE_URL); this.createDateTime(CREATED_DATE_TIME); this.updateDateTime(UPDATE_DATE_TIME); }</code><technical_language>intention methods called attribute name is chain calls in: java id(ID).name(NAME).apiVersion(APIVERSION); For non-chained calls, idiom is setters: java setId(ID); setName(NAME); In this case, called constructor returning retrieving this natural, I favor setters</technical_language>

Target:
public BeaconImpl() { setId(ID); setName(NAME); setApiVersion(API_VERSION); setOrganization(new BeaconOrganizationImpl()); setDescription(DESCRIPTION); setVersion(VERSION); setWelcomeUrl(WELCOME_URL); }
Source:
<code>public java.io.InputStream searchAsInputStream(DiscoverQuery query) throws SearchServiceException, java.io.IOException { if(getSolr() == null) { return null; } HttpHost hostURL = (HttpHost)(getSolr().getHttpClient().getParams().getParameter(ClientPNames.DEFAULT_HOST)); HttpPost post = new HttpPost(hostURL.toHostString()); List<NameValuePair> postParameters = new ArrayList<>(); <START> postParameters.add(new BasicNameValuePair("q",query.toString())); <END> HttpResponse response = getSolr().getHttpClient().execute(post); return response.getEntity().getContent(); }</code><technical_language>I postParameters is attached request</technical_language>

Target:
public java.io.InputStream searchAsInputStream(DiscoverQuery query) throws SearchServiceException, java.io.IOException { if(getSolr() == null) { return null; } HttpHost hostURL = (HttpHost)(getSolr().getHttpClient().getParams().getParameter(ClientPNames.DEFAULT_HOST)); HttpPost post = new HttpPost(hostURL.toHostString()); List<NameValuePair> postParameters = new ArrayList<>(); postParameters.add(new BasicNameValuePair("q",query.toString())); post.setEntity(new UrlEncodedFormEntity(postParameters)); HttpResponse response = getSolr().getHttpClient().execute(post); return response.getEntity().getContent(); }
Source:
<code>public void shouldInjectParamValueModificationInGeneralParam() { VariantMultipartFormParameters variant = new VariantMultipartFormParameters(); HttpMessage message = createMessage(); String paramName = "person"; String newValue = "injected"; variant.setMessage(message); variant.setParameter(message, new NameValuePair(NameValuePair.TYPE_POST_DATA, paramName, DEFAULT_PARAM_CONTENT, 1), paramName, newValue); StringBuilder testBodyBuilder = new StringBuilder(320); <START> testBodyBuilder.append("--------------------------d74496d66958873e").append(CRLF); <END> testBodyBuilder.append("Content-Disposition: form-data; name=\"person\"").append(CRLF); testBodyBuilder.append(CRLF); testBodyBuilder.append(newValue).append(CRLF); testBodyBuilder.append("--------------------------d74496d66958873e").append(CRLF); testBodyBuilder.append("Content-Disposition: form-data; name=\"somefile\"; filename=\"file.ext\"").append(CRLF); testBodyBuilder.append("Content-Type: ").append(DEFAULT_CONTENT_TYPE).append(CRLF); testBodyBuilder.append(CRLF); testBodyBuilder.append(DEFAULT_FILE_PARAM_CONTENT).append(CRLF); testBodyBuilder.append("--------------------------d74496d66958873e--").append(CRLF); assertTrue(message.getRequestBody().toString().equals(testBodyBuilder.toString())); }</code><technical_language>changing createMessage allow pass 4 fields call values? reduce duplication check correct structure</technical_language>

Target:
public void shouldInjectParamValueModificationInGeneralParam() { VariantMultipartFormParameters variant = new VariantMultipartFormParameters(); HttpMessage message = createMessage(); String paramName = "person"; String newValue = "injected"; variant.setMessage(message); variant.setParameter(message, new NameValuePair(NameValuePair.TYPE_POST_DATA, paramName, DEFAULT_PARAM_CONTENT, 1), paramName, newValue); HttpMessage newMsg = createMessage(newValue, DEFAULT_FILE_NAME, DEFAULT_CONTENT_TYPE, DEFAULT_FILE_PARAM_CONTENT); assertThat(message.getRequestBody().toString(), equalTo(newMsg.getRequestBody().toString())); }
Source:
<code>public boolean finished() { <START> return !processFuture.isCancelled() && !processFuture.isDone(); <END> }</code><technical_language>processFuture.isDone() instead of negation</technical_language>

Target:
public boolean finished() { return processFuture.isDone(); }
Source:
<code>public Page getOutput() { if (!pageBuilder.isFull() && probe != null) { processProbe(); } if (pageBuilder.isFull()) { <START> Page page = pageBuilder.build(); <END> pageBuilder.reset(); return page; } if (finishing) { Page page = null; if (!pageBuilder.isEmpty()) { page = pageBuilder.build(); pageBuilder.reset(); } finished = true; return page; } return null; }</code><technical_language>place this getOutput()</technical_language>

Target:
public Page getOutput() { verify(!finished); if (!pageBuilder.isFull() && probe != null) { processProbe(); } if (pageBuilder.isFull()) { Page page = pageBuilder.build(); pageBuilder.reset(); return page; } if (finishing && probe == null) { Page page = null; if (!pageBuilder.isEmpty()) { page = pageBuilder.build(); pageBuilder.reset(); } pagesSpatialIndexFactory.probeOperatorFinished(); pagesSpatialIndexFuture = null; finished = true; return page; } return null; }
Source:
<code>public GerritClient getAdminClient() { if (adminClient == null) { <START> String adminUsername = "admin@mylyn.eclipse.org"; <END> String adminPassword = "mylyntest"; WebLocation location = new WebLocation(GerritFixture.current().getRepositoryUrl(), adminUsername, adminPassword, new IProxyProvider() { public Proxy getProxyForHost(String host, String proxyType) { return WebUtil.getProxyForUrl(GerritFixture.current().getRepositoryUrl()); } }); TaskRepository repository = TasksUiPlugin.getRepositoryManager().getRepository( GerritFixture.current().getRepositoryUrl()); adminClient = new GerritClient(repository, location); } return adminClient; }</code><technical_language>GerritFixture.current().getCredentials(PrivilegeLevel.ADMIN). (We a change this works)</technical_language>

Target:
public GerritClient getAdminClient() { if (adminClient == null) { UserCredentials credentials = GerritFixture.current().getCredentials(PrivilegeLevel.ADMIN); WebLocation location = new WebLocation(GerritFixture.current().getRepositoryUrl(), credentials.getUserName(), credentials.getPassword(), new IProxyProvider() { public Proxy getProxyForHost(String host, String proxyType) { return WebUtil.getProxyForUrl(GerritFixture.current().getRepositoryUrl()); } }); TaskRepository repository = TasksUiPlugin.getRepositoryManager().getRepository( GerritFixture.current().getRepositoryUrl()); adminClient = new GerritClient(repository, location); } return adminClient; }
Source:
<code>public Response <START> getEvents(@PathParam(value <END> = "name") String traceName, ControlFlowViewRequestFilter req) { TraceModel traceModel = traceManager.get(traceName); if (traceModel == null) { return Response.status(Status.NOT_FOUND).entity("No Such Trace").build(); } ITimeGraphDataProvider provider = analysisManager.getTimeGraphProvider(traceModel, CONTROL_FLOW); if (provider == null) { return Response.status(Status.METHOD_NOT_ALLOWED).entity("Analysis cannot run").build(); } TmfModelResponse<List<ITimeGraphRowModel>> response = provider.fetchRowModel(new TimeGraphQueryFilter(req.getEntries(), req.getStart(), req.getEnd(), req.getResolution()), null); if (response.getStatus() == TmfModelResponse.Status.CANCELLED || response.getStatus() == TmfModelResponse.Status.FAILED) { return Response.serverError().entity(response.getStatusMessage()).build(); } return Response.ok() .entity(response.getModel()).build(); }</code><technical_language>do arrows too</technical_language>

Target:
public Response getEvents(@PathParam(value = "name") String traceName, ControlFlowViewRequestFilter req) { TraceModel traceModel = traceManager.get(traceName); if (traceModel == null) { return Response.status(Status.NOT_FOUND).entity("No Such Trace").build(); } ITimeGraphDataProvider provider = analysisManager.getTimeGraphProvider(traceModel, CONTROL_FLOW); if (provider == null) { return Response.status(Status.METHOD_NOT_ALLOWED).entity("Analysis cannot run").build(); } TmfModelResponse<List<ITimeGraphRowModel>> response = provider.fetchRowModel(new TimeGraphQueryFilter(req.getEntries(), req.getStart(), req.getEnd(), req.getResolution()), null); if (response.getStatus() == TmfModelResponse.Status.CANCELLED || response.getStatus() == TmfModelResponse.Status.FAILED) { return Response.serverError().entity(response.getStatusMessage()).build(); } return Response.ok() .entity(response).build(); }
Source:
<code>protected void init(final ImmutableMap<String, Object> execEnvVars) throws DbException { Preconditions.checkNotNull(emitExpressions); Schema inputSchema = Objects.requireNonNull(getChild().getSchema()); List<GenericEvaluator> evals = new ArrayList<>(); final ExpressionOperatorParameter parameters = new ExpressionOperatorParameter( inputSchema, null, getNodeID(), getPythonFunctionRegistrar()); for (Expression expr : emitExpressions) { GenericEvaluator evaluator; if (expr.isConstant()) { evaluator = new ConstantEvaluator(expr, parameters); } else if (expr.isRegisteredPythonUDF()) { evaluator = new PythonUDFEvaluator(expr, parameters); } else { evaluator = new GenericEvaluator(expr, parameters); } <START> evaluator.compile(); <END> Preconditions.checkArgument(!evaluator.needsState()); evals.add(evaluator); } setEmitEvaluators(evals); outputBuffer = new TupleBatchBuffer(generateSchema()); }</code><technical_language>do clients need call compile()? evaluator compile in constructor lazily evaluation</technical_language>

Target:
protected void init(final ImmutableMap<String, Object> execEnvVars) throws DbException { Preconditions.checkNotNull(emitExpressions); Schema inputSchema = Objects.requireNonNull(getChild().getSchema()); List<GenericEvaluator> evals = new ArrayList<>(); final ExpressionOperatorParameter parameters = new ExpressionOperatorParameter( inputSchema, null, getNodeID(), getPythonFunctionRegistrar()); for (Expression expr : emitExpressions) { GenericEvaluator evaluator; if (expr.isConstant()) { evaluator = new ConstantEvaluator(expr, parameters); } else if (expr.isRegisteredPythonUDF()) { evaluator = new PythonUDFEvaluator(expr, parameters); } else { evaluator = new GenericEvaluator(expr, parameters); } Preconditions.checkArgument(!evaluator.needsState()); evals.add(evaluator); } setEmitEvaluators(evals); outputBuffer = new TupleBatchBuffer(generateSchema()); }
Source:
<code>public ChannelFuture write(Object obj) { if (obj instanceof HttpContent) { <START> metrics.bytesWritten(remoteAddress(), ((HttpContent) obj).content().readableBytes()); <END> } return lastWriteFuture = super.write(obj); }</code><technical_language>costly</technical_language>

Target:
public ChannelFuture write(Object obj) { if (metrics.isEnabled()) { long bytes = getBytes(obj); if (bytes == -1) { log.warn("Metrics could not be updated to include bytes written because of unknown object " + obj.getClass() + " being written."); } else { bytesWritten += bytes; } } return lastWriteFuture = super.write(obj); }
Source:
<code>private void emailExportEntityList(List entities, Map<String, String> headerMap, TableWriter tableWriter, boolean showNullsCells) throws IOException { Set<String> keys = headerMap.keySet(); String[] fields = keys.toArray(new String[keys.size()]); try { tableWriter.writeHeader(fields); for (Object entity : entities) { Map<String, String> row = buildRow(entity, headerMap); if (showNullsCells) { for (Entry<String, String> entry : row.entrySet()) { if (entry.getValue() == null) { <START> String key = entry.getKey(); <END> row.put(key, "NULL"); } } } tableWriter.writeRow(row, fields); } } catch (IOException e) { throw new IOException("IO Error when writing data", e); } finally { tableWriter.close(); } }</code><technical_language>@rubenmartin entry.setValue("NULL") instead</technical_language>

Target:
private void emailExportEntityList(List entities, Map<String, String> headerMap, TableWriter tableWriter, boolean showNullsCells) throws IOException { Set<String> keys = headerMap.keySet(); String[] fields = keys.toArray(new String[keys.size()]); try { tableWriter.writeHeader(fields); for (Object entity : entities) { Map<String, String> row = buildRow(entity, headerMap); if (showNullsCells) { for (Entry<String, String> entry : row.entrySet()) { if (entry.getValue() == null) { entry.setValue(NULL); } } } tableWriter.writeRow(row, fields); } } catch (IOException e) { throw new IOException("IO Error when writing data", e); } finally { tableWriter.close(); } }
Source:
<code>public void publishFinish(IProgressMonitor monitor) throws CoreException { super.publishFinish(monitor); final File localFolder = getDeploymentsRootFolder(); <START> syncPodsToDirectory(localFolder, monitor); <END> deleteOldDeployments(getServer()); syncDirectoryToPods(localFolder, monitor); final IResource resource = OpenShiftServerUtils.getResource(getServer(), monitor); loadPodPathIfEmpty(resource, monitor); }</code><technical_language>is syncPodsToDirectory done publishFinish? done start of publish operation, publishStart something? concern is if this is done publish, buggy. For example: User changes Sample.war. publishStart() is called, publishModule(etc) is called. copy in new changes of Sample.war, syncPodsToDirectory end overwriting changes? if this is correct current concern</technical_language>

Target:
public void publishFinish(IProgressMonitor monitor) throws CoreException { super.publishFinish(monitor); final File localFolder = getDeploymentsRootFolder(); syncDirectoryToPods(localFolder, monitor); final IResource resource = OpenShiftServerUtils.getResource(getServer(), monitor); loadPodPathIfEmpty(resource, monitor); }
Source:
<code>public void testPublishWithNullVideoTitle() { byte[] testBytes = {}; <START> String testString = "Test"; <END> when(urlService.inputStreamToByteArray(inputStream)).thenReturn(testBytes); when(facebookService.publishToFacebook(any(byte[].class), any(String.class), any(String.class), any(String.class), any(String.class))).thenReturn(testString); Response response = resource.publish(key, "Test", inputStream, contentDisposition, "photo", "Test", null); String result = (String) response.getEntity(); assertEquals(response.getStatusInfo(), Response.Status.OK); assertEquals(result, "Test"); }</code><technical_language>need this local variable, put String literal "Test" in thenReturn() method line 230</technical_language>

Target:
public void testPublishWithNullVideoTitle() { byte[] testBytes = {}; when(urlService.inputStreamToByteArray(inputStream)).thenReturn(testBytes); when(facebookService.publishToFacebook(any(byte[].class), any(String.class), any(String.class), any(String.class), any(String.class))).thenReturn("Test"); Response response = resource.publish(key, "Test", inputStream, contentDisposition, "photo", "Test", null); String result = (String) response.getEntity(); assertEquals(response.getStatusInfo(), Response.Status.OK); assertEquals(result, "Test"); }
Source:
<code>public int hashCode() { int hashCode = 0; if (this.isSystemLibrary()) { hashCode++; } for (int i = 0; i < this.entries.length; i++) { <START> hashCode = hashCode * 17 + this.entries.hashCode(); <END> } return hashCode; }</code><technical_language>is a bug here, reported JDT (470535)</technical_language>

Target:
public int hashCode() { int hashCode = 0; if (this.isSystemLibrary()) { hashCode++; } for (int i = 0; i < this.entries.length; i++) { hashCode = hashCode * 17 + this.entries[i].hashCode(); } return hashCode; }
Source:
<code>public void extractErrors() throws Exception { String errorField1 = "field1"; String errorField2 = "field2"; Form form = Mockito.mock(Form.class); Map<String, List<ValidationError>> errorMap = new HashMap<String, List<ValidationError>>(); errorMap.put(errorField1, Arrays.asList(new ValidationError("errorkey1", "errorMessage1"), new ValidationError("errorkey2", "errorMessage2"))); errorMap.put(errorField2, Collections.singletonList(new ValidationError("errorkey21", "errorMessage21"))); <START> Mockito.when(form.errors()).thenReturn(errorMap); <END> ErrorsBean result = formResolver.extractErrors(form); List<ErrorBean> errors = result.getGlobalErrors(); checkError(errors.get(0), errorField1, "errorkey1", "errorMessage1"); checkError(errors.get(1), errorField1, "errorkey2", "errorMessage2"); checkError(errors.get(2), errorField2, "errorkey21", "errorMessage21"); }</code><technical_language>I extract this: java Form form = Mockito.mock(Form.class); Map<String, List<ValidationError>> errorMap = new HashMap<String, List<ValidationError>>(); errorMap.put(errorField1, Arrays.asList(new ValidationError("errorkey1", "errorMessage1"), new ValidationError("errorkey2", "errorMessage2"))); errorMap.put(errorField2, Collections.singletonList(new ValidationError("errorkey21", "errorMessage21"))); Mockito.when(form.errors()).thenReturn(errorMap); a method, called for example formWithSomeErrorsForFields(field1, field2) This test is keeping important parts, boilerplate elsewhere</technical_language>

Target:
public void extractErrors() throws Exception { String errorField1 = "field1"; String errorField2 = "field2"; Form form = formWithSomeErrorsForFields(errorField1, errorField2); ErrorsBean result = formResolver.extractErrors(form); List<ErrorBean> errors = result.getGlobalErrors(); checkError(errors.get(0), errorField1, "errorkey1", "errorMessage1"); checkError(errors.get(1), errorField1, "errorkey2", "errorMessage2"); checkError(errors.get(2), errorField2, "errorkey21", "errorMessage21"); }
Source:
<code>public void processExplosion(CallbackInfo ci) { List<Object> cause = Lists.newArrayList(); if (this.shooter != null) { cause.add(NamedCause.igniter(this.shooter)); } cause.add(NamedCause.source(this)); this.shooter = null; ExplosionEvent.Pre event = SpongeEventFactory.createExplosionEventPre(Cause.of(cause), (World) this.worldObj); <START> SpongeImpl.postEvent(event); <END> if (event.isCancelled()) { ci.cancel(); } }</code><technical_language>postEvent returns cancellation status. inline (and prefer for leaner mixins)</technical_language>

Target:
public void processExplosion(CallbackInfo ci) { List<Object> cause = Lists.newArrayList(); if (this.shooter != null) { cause.add(NamedCause.igniter(this.shooter)); } cause.add(NamedCause.source(this)); this.shooter = null; ExplosionEvent.Pre event = SpongeEventFactory.createExplosionEventPre(Cause.of(cause), (World) this.worldObj); if (SpongeImpl.postEvent(event)) { ci.cancel(); } }
Source:
<code>public GeographyPointValue(double longitude, double latitude) { <START> m_latitude = latitude + 0.0; <END> m_longitude = longitude + 0.0; if (m_latitude < -90.0 || m_latitude > 90.0) { throw new IllegalArgumentException("Latitude out of range in GeographyPointValue constructor"); } if (m_longitude < -180.0 || m_longitude > 180.0) { throw new IllegalArgumentException("Longitude out of range in GeographyPointValue constructor"); } }</code><technical_language>This esoteric. wrong -0.0 here</technical_language>

Target:
public GeographyPointValue(double longitude, double latitude) { m_latitude = latitude; m_longitude = longitude; if (m_latitude < -90.0 || m_latitude > 90.0) { throw new IllegalArgumentException("Latitude out of range in GeographyPointValue constructor"); } if (m_longitude < -180.0 || m_longitude > 180.0) { throw new IllegalArgumentException("Longitude out of range in GeographyPointValue constructor"); } }
Source:
<code>public synchronized void save(Note note, AuthenticationInfo subject) throws IOException { super.save(note, subject); if (this.enableWebHDFS) <START> uploadNoteListToHDFS(note); <END> }</code><technical_language>do about: * sense pass user subject instead of user environment HDFSCommand * this function name uploading list instead of a single note</technical_language>

Target:
public synchronized void save(Note note, AuthenticationInfo subject) throws IOException { super.save(note, subject); if (this.enableWebHDFS) { uploadNoteToHDFS(note); } }
Source:
<code>public void printNfoldCorrssvalidationNbAcc(int classesNum, double thres, int minWordsAppearenceCount) { double acc = 0; double precision = 0; double recall = 0; double total = 0; double confusionMatrix[][] = new double[classesNum][classesNum]; for (int i = 0; i < folds.length; i++) { DocumentCollection train = getTrain(i); DocumentCollection test = getTest(i); FeatureMap map = new FeatureMap(); map.addDocs(train, minWordsAppearenceCount, false); MemoryEfficientNB nb = new MemoryEfficientNB(train, map, classesNum); acc += nb.getAcc(test) / ((double) folds.length); for (int j = 0; j < test.docs.size(); j++) { total++; Document d = test.docs.elementAt(j); int label = nb.classify(d, thres); if (label > -1) { recall++; confusionMatrix[d.classID][label]++; <START> } <END> if (label == d.classID) precision++; } } logger.info("Accuracy: " + acc); logger.info("Within " + thres + " confidence threshold:"); logger.info("\tPrecision=" + precision / recall); logger.info("\tRecall=" + recall / total); logger.info("\tConfusion matrix within confidence threshold:"); for (int i = 0; i < classesNum; i++) { for (int j = 0; j < classesNum; j++) System.out.print(confusionMatrix[i][j] + "\t"); logger.info(""); } }</code><technical_language>Actually, in this case print this report STDOUT log file</technical_language>

Target:
public void printNfoldCorrssvalidationNbAcc(int classesNum, double thres, int minWordsAppearenceCount) { double acc = 0; double precision = 0; double recall = 0; double total = 0; double confusionMatrix[][] = new double[classesNum][classesNum]; for (int i = 0; i < folds.length; i++) { DocumentCollection train = getTrain(i); DocumentCollection test = getTest(i); FeatureMap map = new FeatureMap(); map.addDocs(train, minWordsAppearenceCount, false); MemoryEfficientNB nb = new MemoryEfficientNB(train, map, classesNum); acc += nb.getAcc(test) / ((double) folds.length); for (int j = 0; j < test.docs.size(); j++) { total++; Document d = test.docs.elementAt(j); int label = nb.classify(d, thres); if (label > -1) { recall++; confusionMatrix[d.classID][label]++; } if (label == d.classID) precision++; } } System.out.println("Accuracy: " + acc); System.out.println("Within " + thres + " confidence threshold:"); System.out.println("\tPrecision=" + precision / recall); System.out.println("\tRecall=" + recall / total); System.out.println("\tConfusion matrix within confidence threshold:"); for (int i = 0; i < classesNum; i++) { for (int j = 0; j < classesNum; j++) logger.info(confusionMatrix[i][j] + "\t"); System.out.println(); } }
Source:
<code>protected JComponent createCenterPanel() { JPanel panel = new JPanel(new BorderLayout()); <START> StringBuilder sb = new StringBuilder(); <END> File licenseDir = new File(PathManager.getHomePath(), "license"); assert licenseDir.exists(); for (File file : TemplateUtils.listFiles(licenseDir)) { sb.append("<br><br>"); String licenseText = null; try { licenseText = Files.toString(file, Charsets.UTF_8); licenseText = licenseText.replaceAll("\\<.*?\\>", ""); } catch (IOException e) { e.printStackTrace(); } if (licenseText != null) { sb.append(licenseText.replace("\n", "<br>")); } } String text = "<html>" + sb.toString() + "</html>"; JBScrollPane pane = new JBScrollPane(new JBLabel(text)); pane.setPreferredSize(new Dimension(600, 400)); panel.add(pane, BorderLayout.CENTER); return panel; }</code><technical_language>initial size 5000</technical_language>

Target:
protected JComponent createCenterPanel() { JPanel panel = new JPanel(new BorderLayout()); StringBuilder sb = new StringBuilder(5000); File licenseDir = new File(PathManager.getHomePath(), "license"); assert licenseDir.exists() : licenseDir; for (File file : TemplateUtils.listFiles(licenseDir)) { sb.append("<br><br>"); String licenseText = null; try { licenseText = Files.toString(file, Charsets.UTF_8); licenseText = licenseText.replaceAll("\\<.*?\\>", ""); sb.append(licenseText.replace("\n", "<br>")); } catch (IOException e) { e.printStackTrace(); } } String text = "<html>" + sb.toString() + "</html>"; JBScrollPane pane = new JBScrollPane(new JBLabel(text)); pane.setPreferredSize(new Dimension(600, 400)); panel.add(pane, BorderLayout.CENTER); return panel; }
Source:
<code>public static long xxHash64(@SqlType(StandardTypes.REAL) long value) { <START> return XxHash64.hash((int) value); <END> }</code><technical_language>remove cast int</technical_language>

Target:
public static long xxHash64(@SqlType(StandardTypes.REAL) long value) { return XxHash64.hash(floatToIntBits(intBitsToFloat((int) value))); }