auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>public void shouldNotSaveTaskWithInvalidRetryIntervalValue() { Task t = new Task("name", trigger, asList(action)); t.setRetryIntervalInMilliseconds(-10); <START> taskService.save(t); <END> }</code><technical_language>verify in finally block, save performed</technical_language>

Target:
public void shouldNotSaveTaskWithInvalidRetryIntervalValue() { Task t = new Task("name", trigger, asList(action)); t.setRetryIntervalInMilliseconds(-10); try { taskService.save(t); } finally { verifyZeroInteractions(tasksDataService); } }
Source:
<code>protected PrivateKey engineGeneratePrivate(KeySpec keySpec) throws InvalidKeySpecException { if (keySpec instanceof PKCS8EncodedKeySpec ) { return new IosRSAKey.IosRSAPrivateKey(((PKCS8EncodedKeySpec) keySpec).getEncoded()); <START> } <END> if (keySpec instanceof X509EncodedKeySpec || keySpec instanceof PKCS8EncodedKeySpec ) { X509EncodedKeySpec x509Spec = (X509EncodedKeySpec) keySpec; return new IosRSAKey.IosRSAPrivateKey(x509Spec.getEncoded()); } else if (keySpec instanceof RSAPrivateKeySpec) { return new IosRSAKey.IosRSAPrivateKey((RSAPrivateKeySpec) keySpec); } throw new InvalidKeySpecException( "Must use PKCS8EncodedKeySpec; was " + keySpec.getClass().getName()); }</code><technical_language>Fix indention (should align code)</technical_language>

Target:
protected PrivateKey engineGeneratePrivate(KeySpec keySpec) throws InvalidKeySpecException { if (keySpec instanceof PKCS8EncodedKeySpec ) { return new IosRSAKey.IosRSAPrivateKey(((PKCS8EncodedKeySpec) keySpec).getEncoded()); } if (keySpec instanceof X509EncodedKeySpec) { X509EncodedKeySpec x509Spec = (X509EncodedKeySpec) keySpec; return new IosRSAKey.IosRSAPrivateKey(x509Spec.getEncoded()); } else if (keySpec instanceof RSAPrivateKeySpec) { return new IosRSAKey.IosRSAPrivateKey((RSAPrivateKeySpec) keySpec); } throw new InvalidKeySpecException( "Must use PKCS8EncodedKeySpec, X509EncodedKeySpec or RSAPrivateKeySpec; was " + keySpec.getClass().getName()); }
Source:
<code>public BaseRobot() { super(); setupInjectionModule(); <START> pdp = injector.getInstance(PowerDistributionPanelWPIAdapter.class); <END> brownoutLatch.addObserver((Observable o, Object arg) -> { if(arg instanceof EdgeType) { EdgeType edge = (EdgeType)arg; if(edge == EdgeType.RisingEdge) { log.warn("Entering brownout"); } else if(edge == EdgeType.FallingEdge) { log.info("Leaving brownout"); } } }); }</code><technical_language>This work here. gotta in initializeSystems next other created</technical_language>

Target:
public BaseRobot() { super(); setupInjectionModule(); brownoutLatch.addObserver((Observable o, Object arg) -> { if(arg instanceof EdgeType) { EdgeType edge = (EdgeType)arg; if(edge == EdgeType.RisingEdge) { log.warn("Entering brownout"); } else if(edge == EdgeType.FallingEdge) { log.info("Leaving brownout"); } } }); }
Source:
<code>private List<PersistedEntry> enhancedGetFeedPage(final String feedName, final Date markerTimestamp, final long markerId, final PageDirection direction, final String searchString, final int pageSize) { List<PersistedEntry> feedPage = new LinkedList<PersistedEntry>(); TimerContext context = null; boolean noCats = searchString.trim().isEmpty(); try { switch (direction) { case FORWARD: if ( noCats ) { context = startTimer(String.format("db-get-feed-page-forward-with-cats-%s", <START> getMetricBucketForPageSize(pageSize))); <END> } else { context = startTimer( String.format("db-get-feed-page-forward-%s", getMetricBucketForPageSize(pageSize))); } feedPage = getFeedForward( feedName, markerTimestamp, markerId, searchString, pageSize, feedHeadDelayInSeconds ); Collections.reverse(feedPage); break; case BACKWARD: if ( noCats ) { context = startTimer(String.format("db-get-feed-page-backward-with-cats-%s", getMetricBucketForPageSize(pageSize))); } else { context = startTimer( String.format("db-get-feed-page-backward-%s", getMetricBucketForPageSize(pageSize))); } feedPage = getFeedBackward( feedName, markerTimestamp, markerId, searchString, pageSize ); break; } } finally { stopTimer(context); } return feedPage; }</code><technical_language>metric name if statement conflicting... If category searches, db-get-feed-page-forward-with-cats-x ?</technical_language>

Target:
private List<PersistedEntry> enhancedGetFeedPage(final String feedName, final Date markerTimestamp, final long markerId, final PageDirection direction, final String searchString, final int pageSize) { List<PersistedEntry> feedPage = new LinkedList<PersistedEntry>(); TimerContext context = null; boolean hasCats = !searchString.trim().isEmpty(); try { switch (direction) { case FORWARD: if ( hasCats ) { context = startTimer(String.format("db-get-feed-page-forward-with-cats-%s", getMetricBucketForPageSize(pageSize))); } else { context = startTimer( String.format("db-get-feed-page-forward-%s", getMetricBucketForPageSize(pageSize))); } feedPage = getFeedForward( feedName, markerTimestamp, markerId, searchString, pageSize, feedHeadDelayInSeconds ); Collections.reverse(feedPage); break; case BACKWARD: if ( hasCats ) { context = startTimer(String.format("db-get-feed-page-backward-with-cats-%s", getMetricBucketForPageSize(pageSize))); } else { context = startTimer( String.format("db-get-feed-page-backward-%s", getMetricBucketForPageSize(pageSize))); } feedPage = getFeedBackward( feedName, markerTimestamp, markerId, searchString, pageSize ); break; } } finally { stopTimer(context); } return feedPage; }
Source:
<code>public String getGroupName() { if (!isInGroup()) return ""; return actualName.substring(0, actualName.indexOf(getDelimiter(actualName).get())); <START> } <END></code><technical_language>Group name stored a variable calculate demand</technical_language>

Target:
public String getGroupName() { return groupName; }
Source:
<code>public boolean adjustCountryCentroid(Location location, Map<Integer, HealthMapCountry> countryMap) { if (location.getPrecision() == LocationPrecision.COUNTRY) { HealthMapCountry country = countryMap.get(location.getHealthMapCountryId()); if (country != null) { Point centroid = country.getCentroidOverride(); if (centroid != null) { Point originalPoint = location.getGeom(); message = String.format(REPLACED_MESSAGE, originalPoint.getX(), originalPoint.getY(), centroid.getX(), centroid.getY()); <START> location.setGeom(country.getCentroidOverride()); <END> return true; } } } return false; }</code><technical_language>minor, location.setGeom(centroid);</technical_language>

Target:
public boolean adjustCountryCentroid(Location location, Map<Integer, HealthMapCountry> countryMap) { if (location.getPrecision() == LocationPrecision.COUNTRY) { HealthMapCountry country = countryMap.get(location.getHealthMapCountryId()); if (country != null) { Point centroid = country.getCentroidOverride(); if (centroid != null) { Point originalPoint = location.getGeom(); Point clonedCentroid = (Point) centroid.clone(); message = String.format(REPLACED_MESSAGE, originalPoint.getX(), originalPoint.getY(), centroid.getX(), centroid.getY()); location.setGeom(clonedCentroid); return true; } } } return false; }
Source:
<code>public AccountStatus getStatus(IAccount account) { <START> if (account.getAccessToken() == null) { <END> return AccountStatus.NEEDS_LOGIN; } long lastRefreshed = account.getLastRefreshedTime(); long current = System.currentTimeMillis(); if (current > account.getAccessTokenExpiryTime()) { if (current > account.getRefreshTokenExpiryTime()) { return AccountStatus.NEEDS_LOGIN; } else { return AccountStatus.NEEDS_REFRESH; } } if (((current - lastRefreshed) > OSIOCoreConstants.DURATION_24_HOURS) || ((current - lastRefreshed) > ((account.getAccessTokenExpiryTime() - current) / 2))) { return AccountStatus.NEEDS_REFRESH; } return AccountStatus.VALID; }</code><technical_language>possibly, good add check for null == account</technical_language>

Target:
public AccountStatus getStatus(IAccount account) { if (account.getAccessToken() == null) { return AccountStatus.NEEDS_LOGIN; } long lastRefreshed = account.getLastRefreshedTime(); long current = System.currentTimeMillis(); if (current > account.getAccessTokenExpiryTime()) { if (current > account.getRefreshTokenExpiryTime()) { return AccountStatus.NEEDS_LOGIN; } else { return AccountStatus.NEEDS_REFRESH; } } if (wasRefreshed24HAgo(lastRefreshed, current) || wasRefreshedMoreThanHalfTheTotalValidPeriod(account.getAccessTokenExpiryTime(), lastRefreshed, current)) { return AccountStatus.NEEDS_REFRESH; } return AccountStatus.VALID; }
Source:
<code>private void checkIfUserIsOwner(String noteId, String errorMsg) { Set<String> userAndRoles = Sets.newHashSet(); userAndRoles.add(SecurityUtils.getPrincipal()); userAndRoles.addAll(SecurityUtils.getRoles()); <START> if (!notebookAuthorization.hasReadAuthorization(userAndRoles, noteId)) { <END> throw new UnauthorizedException(errorMsg); } }</code><technical_language>hasReadAuthorization changed isOwner</technical_language>

Target:
private void checkIfUserIsOwner(String noteId, String errorMsg) { Set<String> userAndRoles = Sets.newHashSet(); userAndRoles.add(SecurityUtils.getPrincipal()); userAndRoles.addAll(SecurityUtils.getRoles()); if (!notebookAuthorization.isOwner(userAndRoles, noteId)) { throw new UnauthorizedException(errorMsg); } }
Source:
<code>public void updateModel(final @Nullable Object dataInput) { final TableViewer tableViewer = getTableViewer(); Display.getDefault().asyncExec(() -> { if (!tableViewer.getTable().isDisposed()) { tableViewer.getTable().setTopIndex(0); ISelection selection = tableViewer.getSelection(); ISegment selected = null; if (!selection.isEmpty() && selection instanceof StructuredSelection) { Object firstElement = ((StructuredSelection) selection).getFirstElement(); if (firstElement instanceof ISegment) { selected = (ISegment) firstElement; } } if (dataInput == null) { tableViewer.setSelection(StructuredSelection.EMPTY); tableViewer.setInput(null); tableViewer.setItemCount(0); return; } addPackListener(); tableViewer.setInput(dataInput); SegmentStoreContentProvider contentProvider = (SegmentStoreContentProvider) getTableViewer().getContentProvider(); tableViewer.setItemCount((int) Math.min(Integer.MAX_VALUE, contentProvider.getSegmentCount())); boolean found = false; if (selected != null && dataInput instanceof ISegmentStore<?>) { ISegmentStore<?> store = (ISegmentStore<?>) dataInput; <START> for (ISegment segment : store.getIntersectingElements(selected.getStart())) { <END> if (isSameish(segment, selected)) { selection = new StructuredSelection(segment); tableViewer.setSelection(selection, true); found = true; break; } } } if (!found) { tableViewer.setSelection(StructuredSelection.EMPTY); } } }); }</code><technical_language>compare start/end of segment selected one? a segment overlapping selection start, aspects</technical_language>

Target:
public void updateModel(final @Nullable Object dataInput) { final TableViewer tableViewer = getTableViewer(); Display.getDefault().asyncExec(() -> { if (!tableViewer.getTable().isDisposed()) { tableViewer.getTable().setTopIndex(0); ISelection selection = tableViewer.getSelection(); ISegment selected = null; if (!selection.isEmpty() && selection instanceof StructuredSelection) { Object firstElement = ((StructuredSelection) selection).getFirstElement(); if (firstElement instanceof ISegment) { selected = (ISegment) firstElement; } } if (dataInput == null) { tableViewer.setSelection(StructuredSelection.EMPTY); tableViewer.setInput(null); tableViewer.setItemCount(0); return; } addPackListener(); tableViewer.setInput(dataInput); SegmentStoreContentProvider contentProvider = (SegmentStoreContentProvider) getTableViewer().getContentProvider(); tableViewer.setItemCount((int) Math.min(Integer.MAX_VALUE, contentProvider.getSegmentCount())); boolean found = false; if (selected != null && dataInput instanceof ISegmentStore<?>) { ISegmentStore<?> store = (ISegmentStore<?>) dataInput; for (ISegment segment : store.getIntersectingElements(selected.getEnd())) { if (isSameish(segment, selected)) { selection = new StructuredSelection(segment); tableViewer.setSelection(selection, true); found = true; break; } } } if (!found) { tableViewer.setSelection(StructuredSelection.EMPTY); } } }); }
Source:
<code>private void performLogin(ConnectorConfig config, PartnerConnection connection) throws ConnectionException { config.setServiceEndpoint(config.getAuthEndpoint()); LoginResult loginResult = connection.login(config.getUsername(), config.getPassword()); if (loginResult.isPasswordExpired()) { <START> throw new ConnectionException(SalesforceRuntime.getI18nMessage("error.expiredPassword")); <END> } config.setSessionId(loginResult.getSessionId()); config.setServiceEndpoint(loginResult.getServerUrl()); connection.setSessionHeader(loginResult.getSessionId()); }</code><technical_language>do SalesforceRuntime messages, SalesforceSourceOrSink messages</technical_language>

Target:
private void performLogin(ConnectorConfig config, PartnerConnection connection) throws ConnectionException { config.setServiceEndpoint(config.getAuthEndpoint()); LoginResult loginResult = connection.login(config.getUsername(), config.getPassword()); if (loginResult.isPasswordExpired()) { throw new ConnectionException(MESSAGES.getMessage("error.expiredPassword")); } config.setSessionId(loginResult.getSessionId()); config.setServiceEndpoint(loginResult.getServerUrl()); connection.setSessionHeader(loginResult.getSessionId()); }
Source:
<code>private boolean canStop(int x) { if ((x & 127) == 0) { long t = System.nanoTime() - startNs; <START> return cost >= 0 && 10 * t > cost * TimeUnit.MILLISECONDS.toNanos(1); <END> } return false; }</code><technical_language>This change generates worse larger bytecode before</technical_language>

Target:
private boolean canStop(int x) { return (x & 127) == 0 && cost >= 0 && 10 * (System.nanoTime() - startNs) > cost * TimeUnit.MILLISECONDS.toNanos(1); }
Source:
<code>public void rollback(Xid xid) throws XAException { <START> log.infof("rollback xid: [%s]", xid); <END> checker.addRollback(); }</code><technical_language>tracef</technical_language>

Target:
public void rollback(Xid xid) throws XAException { log.tracef("rollback xid: [%s]", xid); checker.addRollback(); }
Source:
<code>Preset(String presetName) throws ParseError { <START> if (presetName == null) <END> throw new ParseError("Preset name cannot be null"); Collection<TaggingPreset> ts = TaggingPresets.getTaggingPresets(); ps = new ArrayList<>(); for (TaggingPreset t : ts) { String name = t.getSimpleName(); if (name != null && name.equalsIgnoreCase(presetName)) ps.add(t); } if (ps.isEmpty()) throw new ParseError(tr("Unknown preset name: ") + presetName); }</code><technical_language>{</technical_language>

Target:
Preset(String presetName) throws ParseError { if (presetName == null) { throw new ParseError("The name of the preset is required"); } this.presets = TaggingPresets.getTaggingPresets() .stream() .filter(preset -> presetName.equalsIgnoreCase(preset.getSimpleName())) .collect(Collectors.toList()); if (this.presets.isEmpty()) { throw new ParseError(tr("Unknown preset name: ") + presetName); } }
Source:
<code>protected AbstractBigtableConnection(Configuration conf, boolean managed, ExecutorService pool, User user) throws IOException { if (managed) { throw new IllegalArgumentException("Bigtable does not support managed connections."); } this.conf = conf; try { this.options = BigtableOptionsFactory.fromConfiguration(conf); } catch (IOException ioe) { LOG.error("Error loading BigtableOptions from Configuration.", ioe); throw ioe; } this.batchPool = pool; this.closed = false; this.session = new BigtableSession(options); <START> synchronized (resourceLimitedLock) { <END> if (resourceLimiter == null) { int defaultRpcCount = AsyncExecutor.MAX_INFLIGHT_RPCS_DEFAULT * options.getChannelCount(); int maxInflightRpcs = conf.getInt(MAX_INFLIGHT_RPCS_KEY, defaultRpcCount); long maxMemory = conf.getLong( BIGTABLE_BUFFERED_MUTATOR_MAX_MEMORY_KEY, AsyncExecutor.ASYNC_MUTATOR_MAX_MEMORY_DEFAULT); this.resourceLimiter = new ResourceLimiter(maxMemory, maxInflightRpcs); } } }</code><technical_language>please put this in a synchronized static method a separate Lock? better, create a ResourceLimiter singleton</technical_language>

Target:
protected AbstractBigtableConnection(Configuration conf, boolean managed, ExecutorService pool, User user) throws IOException { if (managed) { throw new IllegalArgumentException("Bigtable does not support managed connections."); } this.conf = conf; try { this.options = BigtableOptionsFactory.fromConfiguration(conf); } catch (IOException ioe) { LOG.error("Error loading BigtableOptions from Configuration.", ioe); throw ioe; } this.batchPool = pool; this.closed = false; this.session = new BigtableSession(options); initializeResourceLimiter(conf, options); }
Source:
<code>public Symbol cast(DataType<?> targetType, boolean tryCast) { if (targetType.equals(valueType())) { return this; <START> } else if (ArrayType.unnest(targetType).equals(DataTypes.UNTYPED_OBJECT) <END> && valueType().id() == DataTypes.UNTYPED_OBJECT.id()) { return this; } return CastFunctionResolver.generateCastFunction(this, targetType, tryCast); }</code><technical_language>+1:</technical_language>

Target:
public Symbol cast(DataType<?> targetType, boolean tryCast) { if (targetType.equals(valueType())) { return this; } else if (ArrayType.unnest(targetType).equals(DataTypes.UNTYPED_OBJECT) && valueType().id() == targetType.id()) { return this; } return CastFunctionResolver.generateCastFunction(this, targetType, tryCast); }
Source:
<code>public void loggingAppenderStop() { listAppender.stop(); <START> System.setProperty("oak.repository.property.logWarnStringSizeThreshold", ""); <END> }</code><technical_language>want TemporarySystemProperty ... rule reset sys props initial state test. Similarly for logger, easier (better??) LogCustomizer</technical_language>

Target:
public void loggingAppenderStop() { listAppender.stop(); }
Source:
<code>private void doTestSmartMarkAsPlayed_Skip_ForEpisode(int itemIdxNegAllowed) throws Exception { setSmartMarkAsPlayedPreference(60); setSkipKeepsEpisodePreference(false); uiTestUtils.addLocalFeedData(true); int fiIdx; if (itemIdxNegAllowed >= 0) { fiIdx = itemIdxNegAllowed; } else { fiIdx = DBReader.getQueue().size() + itemIdxNegAllowed; } final FeedItem feedItem = DBReader.getQueue().get(fiIdx); gotoQueueScreen(); playFromQueue(fiIdx); skipEpisode(); <START> Thread.sleep(1000); END> assertThat("Ensure smart mark as play will lead to the item removed from the queue", DBReader.getQueue(), not(hasItems(feedItem))); assertThat(DBReader.getFeedItem(feedItem.getId()).isPlayed(), is(true)); }</code><technical_language>I this, honest. Tests ages complete. this done Awaitility</technical_language>

Target:
private void doTestSmartMarkAsPlayed_Skip_ForEpisode(int itemIdxNegAllowed) throws Exception { setSmartMarkAsPlayedPreference(60); setSkipKeepsEpisodePreference(false); uiTestUtils.addLocalFeedData(true); int fiIdx; if (itemIdxNegAllowed >= 0) { fiIdx = itemIdxNegAllowed; } else { fiIdx = DBReader.getQueue().size() + itemIdxNegAllowed; } final FeedItem feedItem = DBReader.getQueue().get(fiIdx); gotoQueueScreen(); playFromQueue(fiIdx); skipEpisode(); Awaitility.await() .atMost(1000, MILLISECONDS) .untilAsserted(() -> { assertThat("Ensure smart mark as play will lead to the item removed from the queue", DBReader.getQueue(), not(hasItems(feedItem))); }); assertThat(DBReader.getFeedItem(feedItem.getId()).isPlayed(), is(true)); }
Source:
<code><START> public CompletableFuture<org.apache.bookkeeper.client.api.LedgerEntries> read(long firstEntry, long lastEntry) { <END> if (firstEntry < 0 || firstEntry > lastEntry) { LOG.error("IncorrectParameterException on ledgerId:{} firstEntry:{} lastEntry:{}", new Object[] { ledgerId, firstEntry, lastEntry }); return FutureUtils.exception(new BKIncorrectParameterException()); } if (lastEntry > lastAddConfirmed) { LOG.error("ReadException on ledgerId:{} firstEntry:{} lastEntry:{}", new Object[] { ledgerId, firstEntry, lastEntry }); return FutureUtils.exception(new BKReadException()); } return readEntriesInternalAsync(firstEntry, lastEntry); }</code><technical_language>nit: I need fully qualified path name. CompletableFuture<LedgerEntries></technical_language>

Target:
public CompletableFuture<LedgerEntries> read(long firstEntry, long lastEntry) { if (firstEntry < 0 || firstEntry > lastEntry) { LOG.error("IncorrectParameterException on ledgerId:{} firstEntry:{} lastEntry:{}", new Object[] { ledgerId, firstEntry, lastEntry }); return FutureUtils.exception(new BKIncorrectParameterException()); } if (lastEntry > lastAddConfirmed) { LOG.error("ReadException on ledgerId:{} firstEntry:{} lastEntry:{}", new Object[] { ledgerId, firstEntry, lastEntry }); return FutureUtils.exception(new BKReadException()); } return readEntriesInternalAsync(firstEntry, lastEntry); }
Source:
<code>private String getMedia(JSONObject data) { String imageURL = ""; if (data.has("videos")) { JSONObject videosObject = data.getJSONObject("videos"); if (!videosObject.isNull("standard_resolution")) { imageURL = videosObject.getJSONObject("standard_resolution").getString("url"); } } else if (data.has("images")) { JSONObject imagesObject = data.getJSONObject("images"); if (!imagesObject.isNull("standard_resolution")) { imageURL = imagesObject.getJSONObject("standard_resolution").getString("url"); <START> } <END> } return imageURL; }</code><technical_language>Is necessary object of names (videosObject, imagesObject) for this ? This is pure code duplication me</technical_language>

Target:
private String getMedia(JSONObject data) { String imageURL = ""; JSONObject mediaObject; if (data.has("videos")) { mediaObject = data.getJSONObject("videos"); if (!videosObject.isNull("standard_resolution")) { imageURL = videosObject.getJSONObject("standard_resolution").getString("url"); } } else if (data.has("images")) { mediaObject = data.getJSONObject("images"); if (!imagesObject.isNull("standard_resolution")) { imageURL = imagesObject.getJSONObject("standard_resolution").getString("url"); } } return imageURL; }
Source:
<code>public <START> long getStorageDomainOverCommitPercent() <END> { return storageDomainOverCommitPercent; }</code><technical_language>left int</technical_language>

Target:
public int getStorageDomainOverCommitPercent() { return storageDomainOverCommitPercent; }
Source:
<code>protected Control createDialogArea(Composite parent) { Composite main = new Composite(parent, SWT.NONE); GridDataFactory.fillDefaults().grab(true, true).applyTo(main); main.setLayout(new GridLayout(1, false)); TreeViewer groupsViewer = new TreeViewer(main, SWT.BORDER | SWT.V_SCROLL); GridDataFactory.fillDefaults().grab(true, true) .applyTo(groupsViewer.getControl()); groupsViewer.setLabelProvider( <START> WorkbenchLabelProvider.getDecoratingWorkbenchLabelProvider()); <END> groupsViewer.setContentProvider( new DeleteRepositoryGroupTreeContentProvider()); groupsViewer.setInput(groupsToDelete); setTitle(UIText.RepositoriesView_RepoGroup_Delete_Title); setMessage(UIText.RepositoriesView_RepoGroup_Delete_Confirm); return main; }</code><technical_language>new RepositoryTreeNodeLabelProvider() OK, lose gitflow decorator, get styled labels consistent rest of EGit. (And if fix blinking problem, automatically gitflow decorator back, too.)</technical_language>

Target:
protected Control createDialogArea(Composite parent) { Composite main = new Composite(parent, SWT.NONE); GridDataFactory.fillDefaults().grab(true, true).applyTo(main); main.setLayout(new GridLayout(1, false)); TreeViewer groupsViewer = new TreeViewer(main, SWT.BORDER | SWT.V_SCROLL); GridDataFactory.fillDefaults().grab(true, true) .applyTo(groupsViewer.getControl()); groupsViewer.setLabelProvider(new RepositoryTreeNodeLabelProvider()); groupsViewer.setContentProvider( new DeleteRepositoryGroupTreeContentProvider()); groupsViewer.setInput(groupsToDelete); setTitle(UIText.RepositoriesView_RepoGroup_Delete_Title); setMessage(UIText.RepositoriesView_RepoGroup_Delete_Confirm); return main; }
Source:
<code>public Object result(@PathParam("executionId") String executionId) throws IOException, MessagingException { if (isCompleted(executionId)) { Object output = getResult(executionId); String error = getError(executionId); cleanup(executionId); if (error != null) { throw new NuxeoException(error, HttpServletResponse.SC_INTERNAL_SERVER_ERROR); } if (output instanceof Map) { <START> Object url = ((Map) output).get("url"); <END> if (url instanceof String) { String baseUrl = VirtualHostHelper.getBaseURL(ctx.getRequest()); return redirect(baseUrl + url); } } return ResponseHelper.getResponse(output, request, HttpServletResponse.SC_OK); } throw new WebResourceNotFoundException("Execution with id=" + executionId + " not found"); }</code><technical_language>Map<?, ?> a constant for "url"</technical_language>

Target:
public Object result(@PathParam("executionId") String executionId) throws IOException, MessagingException { if (isCompleted(executionId)) { Object output = getResult(executionId); String error = getError(executionId); cleanup(executionId); if (error != null) { throw new NuxeoException(error, HttpServletResponse.SC_INTERNAL_SERVER_ERROR); } if (output instanceof Map) { Object url = ((Map<?, ?>) output).get(RESULT_URL_KEY); if (url instanceof String) { String baseUrl = VirtualHostHelper.getBaseURL(ctx.getRequest()); return redirect(baseUrl + url); } } return ResponseHelper.getResponse(output, request, HttpServletResponse.SC_OK); } throw new WebResourceNotFoundException("Execution with id=" + executionId + " not found"); }
Source:
<code>protected boolean containsKeyInternal(Object key) { Data keyData = toDataWithStrategy(key); int partitionId = partitionService.getPartitionId(keyData); MapOperation containsKeyOperation = operationProvider.createContainsKeyOperation(name, keyData); containsKeyOperation.setThreadId(getThreadId()); containsKeyOperation.setServiceName(SERVICE_NAME); try { Future future = operationService.invokeOnPartition(SERVICE_NAME, containsKeyOperation, partitionId); return (Boolean) toObject(future.get()); <START> } catch (Throwable t) { <END> throw rethrow(t); } finally { if (statisticsEnabled) { LocalMapStatsProvider localMapStatsProvider = mapServiceContext.getLocalMapStatsProvider(); localMapStatsProvider.getLocalMapStatsImpl(name).incrementOtherOperations(); } } }</code><technical_language>update stats succeeded operations</technical_language>

Target:
protected boolean containsKeyInternal(Object key) { Data keyData = toDataWithStrategy(key); int partitionId = partitionService.getPartitionId(keyData); MapOperation containsKeyOperation = operationProvider.createContainsKeyOperation(name, keyData); containsKeyOperation.setThreadId(getThreadId()); containsKeyOperation.setServiceName(SERVICE_NAME); try { Future future = operationService.invokeOnPartition(SERVICE_NAME, containsKeyOperation, partitionId); Object object = future.get(); if (statisticsEnabled) { LocalMapStatsProvider localMapStatsProvider = mapServiceContext.getLocalMapStatsProvider(); localMapStatsProvider.getLocalMapStatsImpl(name).incrementOtherOperations(); } return (Boolean) toObject(object); } catch (Throwable t) { throw rethrow(t); } }
Source:
<code>public NatRule(Condition condition, Action action, boolean dnat) { super(condition, action); this.dnat = dnat; <START> if (!action.equals(Action.ACCEPT) && <END> !action.equals(Action.CONTINUE) && !action.equals(Action.RETURN)) { throw new IllegalArgumentException("A nat rule's action " + "must be one of: ACCEPT, CONTINUE, or RETURN."); } }</code><technical_language>again, scala type in java code</technical_language>

Target:
public NatRule(Condition condition, Action action, boolean dnat) { super(condition, action); this.dnat = dnat; if (!action.equals(Action.ACCEPT) && !action.equals(Action.CONTINUE) && !action.equals(Action.RETURN)) throw new IllegalArgumentException("A nat rule's action " + "must be one of: ACCEPT, CONTINUE, or RETURN."); }
Source:
<code>public void testBufferedMutatorWithNullAndEmptyValues() throws Exception { BufferedMutatorParams params = new BufferedMutatorParams(sharedTestEnv.getDefaultTableName()); try (BufferedMutator bm = getConnection().getBufferedMutator(params)) { Exception actualError = null; try { bm.mutate((List<? extends Mutation>) null); } catch (Exception ex) { actualError = ex; } assertNotNull(actualError); actualError = null; try { bm.mutate(ImmutableList.<Mutation>of()); } catch (Exception ex) { actualError = ex; } assertNull(actualError); actualError = null; try { <START> bm.mutate(new Put(new byte[0])); <END> } catch (Exception ex) { actualError = ex; } assertNotNull(actualError); } }</code><technical_language>please test for empty & null cell values & qualifiers</technical_language>

Target:
public void testBufferedMutatorWithNullAndEmptyValues() throws Exception { BufferedMutatorParams params = new BufferedMutatorParams(sharedTestEnv.getDefaultTableName()); try (BufferedMutator bm = getConnection().getBufferedMutator(params)) { Exception actualError = null; try { bm.mutate((List<? extends Mutation>) null); } catch (Exception ex) { actualError = ex; } assertNotNull(actualError); actualError = null; try { bm.mutate(ImmutableList.<Mutation>of()); } catch (Exception ex) { actualError = ex; } assertNull(actualError); actualError = null; try { bm.mutate(new Put(new byte[0])); } catch (Exception ex) { actualError = ex; } assertNotNull(actualError); actualError = null; try { byte[] rowKey = dataHelper.randomData("test-row"); bm.mutate(new Put(rowKey).addColumn(COLUMN_FAMILY, null, value)); } catch (Exception ex) { actualError = ex; } assertNull(actualError); try { byte[] rowKey = dataHelper.randomData("test-row"); bm.mutate(new Put(rowKey).addColumn(COLUMN_FAMILY, new byte[0], value)); } catch (Exception ex) { actualError = ex; } assertNull(actualError); try { byte[] rowKey = dataHelper.randomData("test-row"); bm.mutate(new Put(rowKey).addColumn(COLUMN_FAMILY, qualifier, null)); } catch (Exception ex) { actualError = ex; } assertNull(actualError); try { byte[] rowKey = dataHelper.randomData("test-row"); bm.mutate(new Put(rowKey).addColumn(COLUMN_FAMILY, qualifier, new byte[0])); } catch (Exception ex) { actualError = ex; } assertNull(actualError); } }
Source:
<code>public void init(Context context) { this.tagToRateLimiterMap = Collections.unmodifiableMap(tagToTargetRateMap.entrySet().stream() .map(e -> { String tag = e.getKey(); int effectiveRate = <START> e.getValue() / context.getContainerContext().getContainerModel().getTasks().keySet().size(); <END> LOGGER.info(String.format("Effective rate limit for task %s and tag %s is %d", context.getTaskContext().getTaskModel().getTaskName(), tag, effectiveRate)); return new ImmutablePair<>(tag, com.google.common.util.concurrent.RateLimiter.create(effectiveRate)); }) .collect(Collectors.toMap(ImmutablePair::getKey, ImmutablePair::getValue)) ); initialized = true; }</code><technical_language>Minor: extract local variable size. more understandable</technical_language>

Target:
public void init(Context context) { this.tagToRateLimiterMap = Collections.unmodifiableMap(tagToTargetRateMap.entrySet().stream() .map(e -> { String tag = e.getKey(); int numTasksInContainer = context.getContainerContext().getContainerModel().getTasks().keySet().size(); int effectiveRate = e.getValue() / numTasksInContainer; TaskName taskName = context.getTaskContext().getTaskModel().getTaskName(); LOGGER.info(String.format("Effective rate limit for task %s and tag %s is %d", taskName, tag, effectiveRate)); return new ImmutablePair<>(tag, com.google.common.util.concurrent.RateLimiter.create(effectiveRate)); }) .collect(Collectors.toMap(ImmutablePair::getKey, ImmutablePair::getValue)) ); initialized = true; }
Source:
<code>public void setUp() throws Exception { server = newRepo("server"); client = newRepo("client"); <START> testProtocol = new TestProtocol<>(null, <END> new ReceivePackFactory<Object>() { @Override public ReceivePack create(Object req, Repository db) throws ServiceNotEnabledException, ServiceNotAuthorizedException { return new ReceivePack(db); } }); uri = testProtocol.register(ctx, server); try (TestRepository<?> clientRepo = new TestRepository<>(client)) { obj1 = clientRepo.commit().noFiles().message("test commit 1") .create(); obj2 = clientRepo.commit().noFiles().message("test commit 2") .create(); } }</code><technical_language>nit: unrelated change</technical_language>

Target:
public void setUp() throws Exception { server = newRepo("server"); client = newRepo("client"); testProtocol = new TestProtocol<>(null, new ReceivePackFactory<Object>() { @Override public ReceivePack create(Object req, Repository db) throws ServiceNotEnabledException, ServiceNotAuthorizedException { return new ReceivePack(db); } }); uri = testProtocol.register(ctx, server); try (TestRepository<?> clientRepo = new TestRepository<>(client)) { commitObj1 = clientRepo.commit().noFiles().message("test commit 1") .create(); commitObj2 = clientRepo.commit().noFiles().message("test commit 2") .create(); } }
Source:
<code>public void testCompareLocalWithShared() { <START> StorageDomain sd_shared = new StorageDomain(); sd_shared.setStorageType(StorageType.NFS); StorageDomain sd_local = new StorageDomain(); sd_local.setStorageType(StorageType.LOCALFS); int comparatorReturnValue = comparator.compare(sd_local, sd_shared); assertTrue(comparatorReturnValue < 0); <END> }</code><technical_language>work, existing test infrastructure? a bit easier shorter: storageDomain1.setStorageType(StorageType.NFS); storageDomain2.setStorageType(StorageType.LOCALFS); assertSmallerThan(storageDomain1, storageDomain2);</technical_language>

Target:
public void testCompareLocalWithShared() { storageDomain1.setStorageType(StorageType.NFS); storageDomain2.setStorageType(StorageType.LOCALFS); assertSmallerThan(storageDomain2, storageDomain1); }
Source:
<code>public void testIssue729() throws InterruptedException, IOException { int port = Utils.findOpenPort(); <START> ZContext ctx = new ZContext(); <END> Socket sub = ctx.createSocket(SocketType.SUB); Socket pub = ctx.createSocket(SocketType.PUB); sub.bind("tcp://127.0.0.1:" + port); pub.connect("tcp://127.0.0.1:" + port); boolean subscribe = sub.subscribe(""); assertTrue("SUB Socket could not subscribe", subscribe); ZPoller zPoller = new ZPoller(ctx); zPoller.register(new ZPoller.ZPollItem(sub, null, ZPoller.POLLIN)); Thread server = new Thread(new Runnable() { @Override public void run() { while (true) { pub.send("hello"); try { Thread.sleep(100); } catch (InterruptedException ignored) { } } } }); server.start(); int rc = zPoller.poll(-1); server.interrupt(); assertThat("ZPoller does not understand SUB socket signaled", rc, is(1)); boolean pollin = zPoller.pollin(sub); assertTrue(pollin); String hello = sub.recvStr(); assertThat("recieved message are not identical to what has been sent", hello, is("hello")); }</code><technical_language>context needs closed</technical_language>

Target:
public void testIssue729() throws InterruptedException, IOException { int port = Utils.findOpenPort(); ZContext ctx = new ZContext(); Socket sub = ctx.createSocket(SocketType.SUB); Socket pub = ctx.createSocket(SocketType.PUB); sub.bind("tcp://127.0.0.1:" + port); pub.connect("tcp://127.0.0.1:" + port); boolean subscribe = sub.subscribe(""); assertTrue("SUB Socket could not subscribe", subscribe); ZPoller zPoller = new ZPoller(ctx); try { zPoller.register(new ZPoller.ZPollItem(sub, null, ZPoller.POLLIN)); Thread server = new Thread(new Runnable() { @Override public void run() { while (true) { pub.send("hello"); try { Thread.sleep(100); } catch (InterruptedException ignored) { } } } }); server.start(); int rc = zPoller.poll(-1); server.interrupt(); assertThat("ZPoller does not understand SUB socket signaled", rc, is(1)); boolean pollin = zPoller.pollin(sub); assertTrue(pollin); String hello = sub.recvStr(); assertThat("recieved message are not identical to what has been sent", hello, is("hello")); } finally { zPoller.close(); ctx.close(); } }
Source:
<code>public void report(SortedMap<String, Gauge> gauges, SortedMap<String, Counter> counters, SortedMap<String, Histogram> histograms, SortedMap<String, Meter> meters, SortedMap<String, Timer> timers) { if (loggerProxy.isEnabled(marker)) { StringBuilder b = threadLocalStringBuilder.get(); for (Entry<String, Gauge> entry : gauges.entrySet()) { logGauge(b, entry.getKey(), entry.getValue()); } <START> if (!getDisabledMetricAttributes().contains(COUNT)) { <END> for (Entry<String, Counter> entry : counters.entrySet()) { logCounter(b, entry.getKey(), entry.getValue()); } } for (Entry<String, Histogram> entry : histograms.entrySet()) { logHistogram(b, entry.getKey(), entry.getValue()); } for (Entry<String, Meter> entry : meters.entrySet()) { logMeter(b, entry.getKey(), entry.getValue()); } for (Entry<String, Timer> entry : timers.entrySet()) { logTimer(b, entry.getKey(), entry.getValue()); } } }</code><technical_language>count is filtering counters. filter count attribute of histograms, meters, timers. Users filter counters MetricFilter</technical_language>

Target:
public void report(SortedMap<String, Gauge> gauges, SortedMap<String, Counter> counters, SortedMap<String, Histogram> histograms, SortedMap<String, Meter> meters, SortedMap<String, Timer> timers) { if (loggerProxy.isEnabled(marker)) { StringBuilder b = new StringBuilder(); for (Entry<String, Gauge> entry : gauges.entrySet()) { logGauge(b, entry.getKey(), entry.getValue()); } for (Entry<String, Counter> entry : counters.entrySet()) { logCounter(b, entry.getKey(), entry.getValue()); } for (Entry<String, Histogram> entry : histograms.entrySet()) { logHistogram(b, entry.getKey(), entry.getValue()); } for (Entry<String, Meter> entry : meters.entrySet()) { logMeter(b, entry.getKey(), entry.getValue()); } for (Entry<String, Timer> entry : timers.entrySet()) { logTimer(b, entry.getKey(), entry.getValue()); } } }
Source:
<code>public void traceRangeUpdated(TmfTraceRangeUpdatedSignal signal) { if (signal.getTrace() != fTrace) { return; } <START> boolean drawTimeRangeHistogram = fTraceStartTime == 0; <END> TmfTimeRange fullRange = signal.getRange(); fTraceStartTime = fullRange.getStartTime().normalize(0, ITmfTimestamp.NANOSECOND_SCALE).getValue(); fTraceEndTime = fullRange.getEndTime().normalize(0, ITmfTimestamp.NANOSECOND_SCALE).getValue(); fFullTraceHistogram.setFullRange(fTraceStartTime, fTraceEndTime); fTimeRangeHistogram.setFullRange(fTraceStartTime, fTraceEndTime); if (drawTimeRangeHistogram) { long startTime = fTrace.getCurrentRange().getStartTime().normalize(0, ITmfTimestamp.NANOSECOND_SCALE).getValue(); long duration = fTrace.getCurrentRange().getEndTime().normalize(0, ITmfTimestamp.NANOSECOND_SCALE).getValue() - startTime; fCurrentTimestamp = fTrace.getCurrentTime().normalize(0, ITmfTimestamp.NANOSECOND_SCALE).getValue(); fCurrentEventTimeControl.setValue(fCurrentTimestamp); fTimeSpanControl.setValue(duration); fFullTraceHistogram.setTimeRange(startTime, duration); fTimeRangeHistogram.setTimeRange(startTime, duration); sendTimeRangeRequest(startTime, startTime + duration); } sendFullRangeRequest(fullRange); }</code><technical_language>This line changed (see below) too. small histogram is re-initialized mouse scroll in small histogram fail. boolean drawTimeRangeHistogram = fTraceStartTime == fTraceEndTime;</technical_language>

Target:
public void traceRangeUpdated(TmfTraceRangeUpdatedSignal signal) { if (signal.getTrace() != fTrace) { return; } TmfTimeRange fullRange = signal.getRange(); fTraceStartTime = fullRange.getStartTime().normalize(0, ITmfTimestamp.NANOSECOND_SCALE).getValue(); fTraceEndTime = fullRange.getEndTime().normalize(0, ITmfTimestamp.NANOSECOND_SCALE).getValue(); fFullTraceHistogram.setFullRange(fTraceStartTime, fTraceEndTime); fTimeRangeHistogram.setFullRange(fTraceStartTime, fTraceEndTime); sendFullRangeRequest(fullRange); }
Source:
<code>public static TenantId getTenantId(Event event) { checkNotNull(event); <START> return EventEnvelope.of(event) <END> .getTenantId(); }</code><technical_language>discussed vocally, get rid of this performance issue, want create EventEnvelope time delegate execution methods</technical_language>

Target:
public static TenantId getTenantId(Event event) { checkNotNull(event); ActorContext actorContext = getActorContext(event); return actorContext.getTenantId(); }
Source:
<code><START> String getPinotPredicate(TupleDomain<ColumnHandle> constraintSummary) <END> { ImmutableList.Builder<String> pinotFilterBuilder = ImmutableList.builder(); Map<ColumnHandle, Domain> columnHandleDomainMap = constraintSummary.getDomains().get(); for (ColumnHandle k : columnHandleDomainMap.keySet()) { Domain domain = columnHandleDomainMap.get(k); String columnPredicate = getColumnPredicate(domain, ((PinotColumnHandle) k).getColumnName()); if (!columnPredicate.isEmpty()) { pinotFilterBuilder.add("(" + columnPredicate + ")"); } } return Joiner.on(" AND ").join(pinotFilterBuilder.build()); }</code><technical_language>static</technical_language>

Target:
static String getPinotPredicate(TupleDomain<ColumnHandle> constraintSummary) { ImmutableList.Builder<String> pinotFilterBuilder = ImmutableList.builder(); Map<ColumnHandle, Domain> columnHandleDomainMap = constraintSummary.getDomains().get(); for (ColumnHandle k : columnHandleDomainMap.keySet()) { Domain domain = columnHandleDomainMap.get(k); String columnPredicate = getColumnPredicate(domain, ((PinotColumnHandle) k).getColumnName()); if (!columnPredicate.isEmpty()) { pinotFilterBuilder.add("(" + columnPredicate + ")"); } } return Joiner.on(" AND ").join(pinotFilterBuilder.build()); }
Source:
<code>public IStatus run(IProgressMonitor monitor) { final StringBuilder sb = new StringBuilder(); monitor.beginTask(Messages.CopyToClipboardJob_Name, (int) (fEnd - fStart + 1)); if <START> (fColumns != <END> null) { boolean needTab = false; for (TmfEventTableColumn column : fColumns) { if (needTab) { sb.append('\t'); } sb.append(column.getHeaderName()); needTab = true; } sb.append('\n'); } copy(sb, monitor); Display.getDefault().syncExec(new Runnable() { @Override public void run() { if (sb.length() == 0) { return; } Clipboard clipboard = new Clipboard(Display.getDefault()); clipboard.setContents(new Object[] { sb.toString() }, new Transfer[] { TextTransfer.getInstance() }); } }); monitor.done(); return Status.OK_STATUS; }</code><technical_language>sense call copy if fColumns is null? null</technical_language>

Target:
public IStatus run(IProgressMonitor monitor) { final StringBuilder sb = new StringBuilder(); monitor.beginTask(Messages.CopyToClipboardJob_Name, (int) (fEndRank - fStartRank + 1)); boolean needTab = false; for (TmfEventTableColumn column : fColumns) { if (needTab) { sb.append('\t'); } sb.append(column.getHeaderName()); needTab = true; } sb.append(LINE_SEPARATOR); copy(sb, monitor); Display.getDefault().syncExec(new Runnable() { @Override public void run() { if (sb.length() == 0) { return; } Clipboard clipboard = new Clipboard(Display.getDefault()); clipboard.setContents(new Object[] { sb.toString() }, new Transfer[] { TextTransfer.getInstance() }); } }); monitor.done(); return Status.OK_STATUS; }
Source:
<code>public static SignedCertificateTimestamp decode(InputStream input, Origin origin) throws SerializationException { int version = Serialization.readNumber(input, CTConstants.VERSION_LENGTH); if <START> (version != CTConstants.SCT_VERSION_V1) { <END> throw new SerializationException("Unsupported SCT version " + version); } return new SignedCertificateTimestamp( version, Serialization.readFixedBytes(input, CTConstants.LOGID_LENGTH), Serialization.readLong(input, CTConstants.TIMESTAMP_LENGTH), Serialization.readVariableBytes(input, CTConstants.EXTENSIONS_LENGTH_BYTES), DigitallySigned.decode(input), origin ); }</code><technical_language>break add V2 SCTs :)</technical_language>

Target:
public static SignedCertificateTimestamp decode(InputStream input, Origin origin) throws SerializationException { int version = Serialization.readNumber(input, CTConstants.VERSION_LENGTH); if (version != Version.V1.ordinal()) { throw new SerializationException("Unsupported SCT version " + version); } return new SignedCertificateTimestamp( Version.V1, Serialization.readFixedBytes(input, CTConstants.LOGID_LENGTH), Serialization.readLong(input, CTConstants.TIMESTAMP_LENGTH), Serialization.readVariableBytes(input, CTConstants.EXTENSIONS_LENGTH_BYTES), DigitallySigned.decode(input), origin ); }
Source:
<code><START> protected boolean runSafe() { <END> TrackerStatus status = activeSegments.get(segmentId); TrackerStatus[] newStatus = status.split(); int newSegmentId = newStatus[1].getSegment().getSegmentId(); tokenStore.initializeSegment(newStatus[1].getTrackingToken(), getName(), newSegmentId); activeSegments.put(segmentId, newStatus[0]); return true; }</code><technical_language>adding a log statement. (The for merging instruction)</technical_language>

Target:
protected boolean runSafe() { logger.info("Processing split instruction for segment in processor [{}]", segmentId, getName()); TrackerStatus status = activeSegments.get(segmentId); TrackerStatus[] newStatus = status.split(); int newSegmentId = newStatus[1].getSegment().getSegmentId(); tokenStore.initializeSegment(newStatus[1].getTrackingToken(), getName(), newSegmentId); activeSegments.put(segmentId, newStatus[0]); return true; }
Source:
<code>public int deduceIdealSplitWeight(final IntervalList intervalList, final int nCount) { final int splitWidth = super.deduceIdealSplitWeight(intervalList, nCount); final int widestIntervalLength = intervalList.getIntervals().stream() <START> .map(Interval::length) <END> .max(Comparator.comparing(Integer::valueOf)) .orElse(1); return Math.max(widestIntervalLength, splitWidth); }</code><technical_language>Slight improvement, mapToInt(), e.g. final int widestIntervalLength = intervalList.getIntervals().stream() .mapToInt(Interval::length) .max() .orElse(1);</technical_language>

Target:
public int deduceIdealSplitWeight(final IntervalList intervalList, final int nCount) { final int splitWidth = super.deduceIdealSplitWeight(intervalList, nCount); final int widestIntervalLength = intervalList.getIntervals().stream() .mapToInt(Interval::length) .max() .orElse(1); return Math.max(widestIntervalLength, splitWidth); }
Source:
<code>private float[] calculateHighData(byte[] valueByte) { logger.debug("Received High Data value: {}", byteArrayToHexString(valueByte)); float[] highData = new float[10]; if (sensorFusion[0] == 0x00) { <START> int Ax = shortSignedAtOffset(valueByte, 0); <END> int Ay = shortSignedAtOffset(valueByte, 2); int Az = shortSignedAtOffset(valueByte, 4); int Gx = shortSignedAtOffset(valueByte, 6); int Gy = shortSignedAtOffset(valueByte, 8); int Gz = shortSignedAtOffset(valueByte, 10); highData[0] = Ax; highData[1] = Ay; highData[2] = Az; highData[3] = Gx; highData[4] = Gy; highData[5] = Gz; highData[6] = 0; highData[7] = 0; highData[8] = 0; highData[9] = 0; } else { float dataM = fromByteArrayToFloat(splitBytesArray(valueByte, 0)); float dataX = fromByteArrayToFloat(splitBytesArray(valueByte, 4)); float dataY = fromByteArrayToFloat(splitBytesArray(valueByte, 8)); float dataZ = fromByteArrayToFloat(splitBytesArray(valueByte, 12)); highData[0] = 0; highData[1] = 0; highData[2] = 0; highData[3] = 0; highData[4] = 0; highData[5] = 0; highData[6] = dataM; highData[7] = dataX; highData[8] = dataY; highData[9] = dataZ; } return highData; }</code><technical_language>review variable names here. lowercase</technical_language>

Target:
private float[] calculateHighData(byte[] valueByte) { logger.debug("Received High Data value: {}", byteArrayToHexString(valueByte)); float[] highData = new float[10]; if (sensorFusion[0] == 0x00) { int ax = shortSignedAtOffset(valueByte, 0); int ay = shortSignedAtOffset(valueByte, 2); int az = shortSignedAtOffset(valueByte, 4); int gx = shortSignedAtOffset(valueByte, 6); int gy = shortSignedAtOffset(valueByte, 8); int gz = shortSignedAtOffset(valueByte, 10); highData[0] = ax; highData[1] = ay; highData[2] = az; highData[3] = gx; highData[4] = gy; highData[5] = gz; highData[6] = 0; highData[7] = 0; highData[8] = 0; highData[9] = 0; } else { float dataM = fromByteArrayToFloat(splitBytesArray(valueByte, 0)); float dataX = fromByteArrayToFloat(splitBytesArray(valueByte, 4)); float dataY = fromByteArrayToFloat(splitBytesArray(valueByte, 8)); float dataZ = fromByteArrayToFloat(splitBytesArray(valueByte, 12)); highData[0] = 0; highData[1] = 0; highData[2] = 0; highData[3] = 0; highData[4] = 0; highData[5] = 0; highData[6] = dataM; highData[7] = dataX; highData[8] = dataY; highData[9] = dataZ; } return highData; }