auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>public void killedWorker(int port) { LOG.info("killedWorker: removing port " + port + " from the 'assigned port state'"); <START> String taskId = _state.get(Integer.toString(port)); <END> _state.remove(Integer.toString(port)); TaskStatus status = TaskStatus.newBuilder() .setState(TaskState.TASK_FINISHED) .setTaskId(TaskID.newBuilder().setValue(taskId)) .build(); _driver.sendStatusUpdate(status); }</code><technical_language>Integer.toString(port) is kind of a standard of toString method. I String.valueOf(port) better</technical_language>

Target:
public void killedWorker(int port) { LOG.info("killedWorker: executor removing port assignment and sending " + "TASK_FINISHED update to Mesos", _executorId, port); TaskID taskId = _taskAssignments.deregister(port); if (taskId == null) { LOG.error("killedWorker: Executor failed to find TaskID for port {}, so not " + "issuing TaskStatus update to Mesos for this dead task.", _executorId, port); return; } TaskStatus status = TaskStatus.newBuilder() .setState(TaskState.TASK_FINISHED) .setTaskId(taskId) .build(); _driver.sendStatusUpdate(status); }
Source:
<code>private void setupPlaybackScreen() { final Activity activity = getActivity(); findPreference(PREF_PLAYBACK_SPEED_LAUNCHER) .setOnPreferenceClickListener(preference -> { VariableSpeedDialog.showDialog(activity); return true; }); findPreference(PREF_PLAYBACK_REWIND_DELTA_LAUNCHER) .setOnPreferenceClickListener(preference -> { MediaplayerActivity.showSkipPreference(activity, MediaplayerActivity.SkipDirection.SKIP_REWIND); return true; }); findPreference(PREF_PLAYBACK_FAST_FORWARD_DELTA_LAUNCHER) .setOnPreferenceClickListener(preference -> { MediaplayerActivity.showSkipPreference(activity, MediaplayerActivity.SkipDirection.SKIP_FORWARD); return true; }); if (!PictureInPictureUtil.supportsPictureInPicture(activity)) { ListPreference behaviour = (ListPreference) findPreference(UserPreferences.PREF_VIDEO_BEHAVIOR); behaviour.setEntries(R.array.video_background_behavior_options_without_pip); behaviour.setEntryValues(R.array.video_background_behavior_values_without_pip); } findPreference(UserPreferences.PREF_QUEUE_ADD_TO_FRONT).setOnPreferenceChangeListener( (preference, newValue) -> { if (newValue instanceof Boolean) { boolean enableKeepInProgressAtFront = ((Boolean) newValue); <START> checkKeepInProgressAtFrontItemVisibility(enableKeepInProgressAtFront); <END> } return true; }); checkKeepInProgressAtFrontItemVisibility(UserPreferences.enqueueAtFront()); }</code><technical_language>is setting selectable if Enqueue front is enabled? if I press play button of episode is in queue</technical_language>

Target:
private void setupPlaybackScreen() { final Activity activity = getActivity(); findPreference(PREF_PLAYBACK_SPEED_LAUNCHER) .setOnPreferenceClickListener(preference -> { VariableSpeedDialog.showDialog(activity); return true; }); findPreference(PREF_PLAYBACK_REWIND_DELTA_LAUNCHER) .setOnPreferenceClickListener(preference -> { MediaplayerActivity.showSkipPreference(activity, MediaplayerActivity.SkipDirection.SKIP_REWIND); return true; }); findPreference(PREF_PLAYBACK_FAST_FORWARD_DELTA_LAUNCHER) .setOnPreferenceClickListener(preference -> { MediaplayerActivity.showSkipPreference(activity, MediaplayerActivity.SkipDirection.SKIP_FORWARD); return true; }); if (!PictureInPictureUtil.supportsPictureInPicture(activity)) { ListPreference behaviour = (ListPreference) findPreference(UserPreferences.PREF_VIDEO_BEHAVIOR); behaviour.setEntries(R.array.video_background_behavior_options_without_pip); behaviour.setEntryValues(R.array.video_background_behavior_values_without_pip); } buildEnqueueLocationPreference(); }
Source:
<code>protected boolean isExitState(EObject model) { <START> if (currentModel == null) { return false; } if (model == null) { return true; } if (model != currentModel) { } return false; <END> }</code><technical_language>return currentmodel!=null && model == null</technical_language>

Target:
protected boolean isExitState(EObject model) { return currentModel != null && model == null; }
Source:
<code>protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { Path path = (new File(request.getRequestURI())).toPath().normalize(); <START> String requestedUri = path.toString(); <END> if (StringUtils.isNotBlank(getServletContext().getContextPath())) { requestedUri = requestedUri.substring(getServletContext().getContextPath().length()); } String requestedResource = "/index.html"; response.setStatus(HttpStatus.SERVICE_UNAVAILABLE.value()); if (requestedUri.startsWith(assetsPath)) { response.setStatus(HttpStatus.OK.value()); requestedResource = requestedUri; } readResource(requestedResource, response); }</code><technical_language>is work Windows, path / instead of \ wrong request.getRequestURI()</technical_language>

Target:
protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { try { String requestedUri = request.getRequestURI(); if (StringUtils.isNotBlank(getServletContext().getContextPath())) { requestedUri = requestedUri.substring(getServletContext().getContextPath().length()); } String requestedResource = "/index.html"; response.setStatus(HttpStatus.SERVICE_UNAVAILABLE.value()); if (requestedUri.startsWith(assetsPath)) { response.setStatus(HttpStatus.OK.value()); requestedResource = requestedUri; } readResource(requestedResource, response); } catch (Exception e) { e.printStackTrace(); response.sendError(HttpStatus.INTERNAL_SERVER_ERROR.value()); } }
Source:
<code>public List<InputSplit> getSplits( List<InputSplit> splits, Configuration cfg) throws IOException { final List<InputSplit> origSplits = removeIndexFiles(splits); Collections.sort(origSplits, new Comparator<InputSplit>() { public int compare(InputSplit a, InputSplit b) { FileSplit fa = (FileSplit)a, fb = (FileSplit)b; return fa.getPath().compareTo(fb.getPath()); } }); final List<InputSplit> newSplits = new ArrayList<InputSplit>(origSplits.size()); for (int i = 0; i < origSplits.size();) { try { if (cfg.getBoolean(ENABLE_BAI_SPLIT_CALCULATOR, false)) { i = addBAISplits (origSplits, i, newSplits, cfg); } else { i = addIndexedSplits(origSplits, i, newSplits, cfg); <START> } <END> } catch (IOException e) { i = addProbabilisticSplits (origSplits, i, newSplits, cfg); } } return filterByInterval(newSplits, cfg); }</code><technical_language>I this is right. if hadoopbam.bam.enable-bai-splitter is true, if is a splitting-bai file, used, generated for finding splits. I precedence order 1) splitting-bai (if exists), 2) bai (if exists hadoopbam.bam.enable-bai-splitter is true), 3) heuristics. If 1 2 fail, fall 3 also</technical_language>

Target:
public List<InputSplit> getSplits( List<InputSplit> splits, Configuration cfg) throws IOException { final List<InputSplit> origSplits = removeIndexFiles(splits); Collections.sort(origSplits, new Comparator<InputSplit>() { public int compare(InputSplit a, InputSplit b) { FileSplit fa = (FileSplit)a, fb = (FileSplit)b; return fa.getPath().compareTo(fb.getPath()); } }); final List<InputSplit> newSplits = new ArrayList<InputSplit>(origSplits.size()); for (int i = 0; i < origSplits.size();) { try { i = addIndexedSplits (origSplits, i, newSplits, cfg); } catch (IOException | ProviderNotFoundException e) { if (cfg.getBoolean(ENABLE_BAI_SPLIT_CALCULATOR, false)) { try { i = addBAISplits (origSplits, i, newSplits, cfg); } catch (IOException | ProviderNotFoundException e2) { i = addProbabilisticSplits (origSplits, i, newSplits, cfg); } } else { i = addProbabilisticSplits (origSplits, i, newSplits, cfg); } } } return filterByInterval(newSplits, cfg); }
Source:
<code>private static void checkFile(final ModelRepository modelRepo, final File file, final Kind kind) { if (modelRepo != null && file != null) { try { synchronized (FolderObserver.class) { if ((kind == ENTRY_CREATE || kind == ENTRY_MODIFY)) { <START> if (parsers.contains(getExtension(file.getName())) && !file.getName().startsWith(".")) { <END> try (FileInputStream inputStream = FileUtils.openInputStream(file)) { modelRepo.addOrRefreshModel(file.getName(), inputStream); } catch (IOException e) { LoggerFactory.getLogger(FolderObserver.class) .warn("Error while opening file during update: {}", file.getAbsolutePath()); } } else { ignoredFiles.add(file); } } else if (kind == ENTRY_DELETE) { modelRepo.removeModel(file.getName()); } } } catch (Exception e) { LoggerFactory.getLogger(FolderObserver.class).error("Error handling update of file '{}': {}.", file.getAbsolutePath(), e.getMessage(), e); } } }</code><technical_language>This approach. this issue exist? Please note <LINK_2>, <LINK_0> <LINK_1>, same/similar issue</technical_language>

Target:
private static void checkFile(final ModelRepository modelRepo, final File file, final Kind kind) { if (modelRepo != null && file != null) { try { synchronized (FolderObserver.class) { if ((kind == ENTRY_CREATE || kind == ENTRY_MODIFY)) { if (parsers.contains(getExtension(file.getName()))) { try (FileInputStream inputStream = FileUtils.openInputStream(file)) { modelRepo.addOrRefreshModel(file.getName(), inputStream); } catch (IOException e) { LoggerFactory.getLogger(FolderObserver.class) .warn("Error while opening file during update: {}", file.getAbsolutePath()); } } else { ignoredFiles.add(file); } } else if (kind == ENTRY_DELETE) { modelRepo.removeModel(file.getName()); } } } catch (Exception e) { LoggerFactory.getLogger(FolderObserver.class).error("Error handling update of file '{}': {}.", file.getAbsolutePath(), e.getMessage(), e); } } }
Source:
<code>private void upgradeProtocol(ChannelPipeline p, String scheme) throws IOException, GeneralSecurityException { if (p.get(HTTP_HANDLER) != null) { p.remove(HTTP_HANDLER); } if (isSecure(scheme)) { if (p.get(SSL_HANDLER) == null) { <START> p.addFirst(HTTP_HANDLER, createHttpClientCodec); <END> p.addFirst(SSL_HANDLER, new SslHandler(createSSLEngine())); } else { p.addAfter(SSL_HANDLER, HTTP_HANDLER, createHttpClientCodec); } } else { p.addFirst(HTTP_HANDLER, createHttpClientCodec); } }</code><technical_language>missing ()</technical_language>

Target:
private void upgradeProtocol(ChannelPipeline p, String scheme) throws IOException, GeneralSecurityException { if (p.get(HTTP_HANDLER) != null) { p.remove(HTTP_HANDLER); } if (isSecure(scheme)) { if (p.get(SSL_HANDLER) == null) { p.addFirst(HTTP_HANDLER, createHttpClientCodec()); p.addFirst(SSL_HANDLER, new SslHandler(createSSLEngine())); } else { p.addAfter(SSL_HANDLER, HTTP_HANDLER, createHttpClientCodec()); } } else { p.addFirst(HTTP_HANDLER, createHttpClientCodec()); } }
Source:
<code>public CompositeLineConsumer(LineConsumer... lineConsumers) { this.lineConsumers = new ArrayList<>(lineConsumers.length); <START> Arrays.stream(lineConsumers).forEach(this.lineConsumers::add); <END> this.isClosed = false; }</code><technical_language>is Arrays.asList(lineConsumers) working</technical_language>

Target:
public CompositeLineConsumer(LineConsumer... lineConsumers) { this.lineConsumers = new CopyOnWriteArrayList<>(lineConsumers); this.isOpen = true; }
Source:
<code>public void testFinishLocalSetup() throws Exception { final XpathFileGeneratorAuditListener logger = new XpathFileGeneratorAuditListener(System.out); logger.finishLocalSetup(); logger.auditStarted(null); logger.auditFinished(null); <START> assertNotNull("instance should not be null", logger); <END> }</code><technical_language>checking c-tor works is enough, please put in XpathFileGeneratorAuditListener some stream compare stream result expected</technical_language>

Target:
public void testFinishLocalSetup() { final OutputStream out = new ByteArrayOutputStream(); final XpathFileGeneratorAuditListener listener = new XpathFileGeneratorAuditListener(out, AutomaticBean.OutputStreamOptions.CLOSE); listener.finishLocalSetup(); listener.auditStarted(null); listener.auditFinished(null); final String actual = out.toString(); assertTrue("Output should be empty", actual.isEmpty()); }
Source:
<code>public void findAll() throws Exception { <START> List<Capability> capabilities = newArrayList(newCapability().build(), newCapability().build()); <END> driver.addExpectation(onRequestTo("/r/capabilities").withMethod(GET), returnResponse(capabilities)); List<Capability> got = client.findAll(); assertThat(got, deepEquals(capabilities)); }</code><technical_language>Lists.newArrayList</technical_language>

Target:
public void findAll() throws Exception { List<Capability> capabilities = Lists.newArrayList(newCapability().build(), newCapability().build()); driver.addExpectation(onRequestTo("/r/capabilities").withMethod(GET), returnResponse(capabilities)); List<Capability> got = client.findAll(); assertThat(got, deepEquals(capabilities)); }
Source:
<code>public void onNext(T t) { if (fusionMode != ASYNC) { <START> if (!queue.offer(t)) { <END> onError(new IllegalStateException("Queue is full?!")); return; } } drain(); }</code><technical_language>nested ifs collapsed &&</technical_language>

Target:
public void onNext(T t) { if (fusionMode != ASYNC && !queue.offer(t)) { onError(new IllegalStateException("Queue is full?!")); return; } drain(); }
Source:
<code><START> private void API$hideItem(final ItemStack stack) { <END> try { if (this.hideItem == null) this.getHideItemMethod(); this.hideItem.invoke(null, stack); } catch (final Throwable thr) { Throwables.propagate(thr); } }</code><technical_language>'$'</technical_language>

Target:
private void API$hideItem(final ItemStack stack) { try { if (this.hideItem == null) this.hideItem = Class.forName(API).getMethod(HIDE_ITEM, ItemStack.class); this.hideItem.invoke(null, stack); } catch (final Throwable thr) { Throwables.propagate(thr); } }
Source:
<code>public Filter toFilter() { if (extractionFn == null) { return new SelectorFilter(dimension, value); } else { final String valueOrNull = Strings.emptyToNull(value); final DruidCompositePredicate predicate = new DruidCompositePredicate() { @Override public boolean applyLong(long value) { <START> return Objects.equals(valueOrNull, String.valueOf(value)); <END> } @Override public boolean apply(Object input) { return Objects.equals(valueOrNull, input); } @Override public String toString() { return value; } }; return new DimensionPredicateFilter(dimension, predicate, extractionFn); } }</code><technical_language>This convert valueOrNull a long (beforehand - in applyLong) applyLong compare long input</technical_language>

Target:
public Filter toFilter() { if (extractionFn == null) { return new SelectorFilter(dimension, value); } else { final String valueOrNull = Strings.emptyToNull(value); final DruidPredicateFactory predicateFactory = new DruidPredicateFactory() { @Override public Predicate<String> makeStringPredicate() { return new Predicate<String>() { @Override public boolean apply(String input) { return Objects.equals(valueOrNull, input); } }; } @Override public DruidLongPredicate makeLongPredicate() { initLongValue(); if (valueAsLong == null) { return new DruidLongPredicate() { @Override public boolean applyLong(long input) { return false; } }; } else { final long unboxedLong = valueAsLong.longValue(); return new DruidLongPredicate() { @Override public boolean applyLong(long input) { return input == unboxedLong; } }; } } }; return new DimensionPredicateFilter(dimension, predicateFactory, extractionFn); } }
Source:
<code>public void clearApplicationData(Context context, LogoutListener logoutListener) { File cacheDirectory = context.getCacheDir(); File applicationDirectory = new File(cacheDirectory.getParent()); if (applicationDirectory.exists()) { String[] fileNames = applicationDirectory.list(); for (String fileName : fileNames) { if (!fileName.equals("lib")) { FileUtils.deleteFile(new File(applicationDirectory, fileName)); } } } sessionManager.logout() .subscribeOn(Schedulers.io()) .observeOn(AndroidSchedulers.mainThread()) .subscribe(() -> { Timber.d("All accounts have been removed"); clearImageCache(); defaultPrefs.clearAll(); defaultPrefs.putBoolean("firstrun", false); <START> new Thread(this::updateAllDatabases).start(); <END> logoutListener.onLogoutComplete(); }); }</code><technical_language>do this, a) threads expensive b) Rx ability switch threads easily andThen execute another completable logoutListener main thread. If questions Rx please ask</technical_language>

Target:
public void clearApplicationData(Context context, LogoutListener logoutListener) { File cacheDirectory = context.getCacheDir(); File applicationDirectory = new File(cacheDirectory.getParent()); if (applicationDirectory.exists()) { String[] fileNames = applicationDirectory.list(); for (String fileName : fileNames) { if (!fileName.equals("lib")) { FileUtils.deleteFile(new File(applicationDirectory, fileName)); } } } sessionManager.logout() .andThen(Completable.fromAction(() ->{ Timber.d("All accounts have been removed"); clearImageCache(); defaultPrefs.clearAll(); defaultPrefs.putBoolean("firstrun", false); updateAllDatabases(); } )) .subscribeOn(Schedulers.io()) .observeOn(AndroidSchedulers.mainThread()) .subscribe(logoutListener::onLogoutComplete, Timber::e); }
Source:
<code>private void setErrorStyles(boolean validationResult) { if (validationResult) { textbox.getElement().getStyle().setBorderColor(defaultTextBoxColor); <START> errorLabel.setText(errorMessage); <END> } else { String errorColor = "red"; textbox.getElement().getStyle().setBorderColor(errorColor); errorLabel.setText(errorMessage); } }</code><technical_language>I agree this change. If error (i.e., validationResult == true), error messages. This changes semantics in a sense me. Instead, want extend Validator interface a getWarningMessages method instead is more explicit in naming</technical_language>

Target:
private void setErrorStyles(boolean validationResult) { if (validationResult) { if (errorMessage.length() > 0) { String warningColor = "yellow"; textbox.getElement().getStyle().setBorderColor(warningColor); errorLabel.setText(errorMessage); } else { textbox.getElement().getStyle().setBorderColor(defaultTextBoxColor); errorLabel.setText(""); } } else { String errorColor = "red"; textbox.getElement().getStyle().setBorderColor(errorColor); errorLabel.setText(errorMessage); } }
Source:
<code>protected boolean isArray(Object datum) { if (datum == null) return false; Class c = datum.getClass(); return (datum instanceof Collection) <START> || (c.isArray() && !(c.getComponentType() == Byte.TYPE)) <END> || isNonStringMap(datum); }</code><technical_language>I suggest c.getComponentType() != Byte.TYPE instead of !(c.getComponentType() == Byte.TYPE)</technical_language>

Target:
protected boolean isArray(Object datum) { if (datum == null) return false; Class c = datum.getClass(); return (datum instanceof Collection) || (c.isArray() && c.getComponentType() != Byte.TYPE) || isNonStringMap(datum); }
Source:
<code>public void checkPendingAcks() { Date now = new Date(); for (SenderQueueItem qi : pendingAckQueue.values()) { if (now.after(qi.expiry)) { logger.error("Packet " + qi.msg.msgCount + " (" + qi.msg.msgType + ") lost - timeout"); pendingAckQueue.remove(qi.msg.msgCount); if (sequenceRegister.containsKey(qi.msg.msgCount)) { MessageSequencer msgSeq = sequenceRegister.get(qi.msg.msgCount); sequenceRegister.remove(qi.msg.msgCount); msgSeq.packetLost(qi.msg); } else if (qi.retryCount < 3) { qi.retryCount++; logger.debug("Retransmitting packet " + qi.msg.msgCount + " attempt " + qi.retryCount); sendMessage(qi.msg, qi); } else { <START> logger.error("Transmission of packet " + qi.msg.msgCount + " failed 3 times, message was " + qi.msg.msgType + " to address " + qi.msg.dstAddrStr + " => " + qi.msg.rawMsg); <END> } } } }</code><technical_language>switch parameterized logging? logger.error("Transmission of packet failed 3 times, message address => {}", qi.msg.msgCount, qi.msg.msgType, qi.msg.dstAddrStr, qi.msg.rawMsg);</technical_language>

Target:
public void checkPendingAcks() { Date now = new Date(); for (SenderQueueItem qi : pendingAckQueue.values()) { if (now.after(qi.expiry)) { logger.error("Packet " + qi.msg.msgCount + " (" + qi.msg.msgType + ") lost - timeout"); pendingAckQueue.remove(qi.msg.msgCount); if (sequenceRegister.containsKey(qi.msg.msgCount)) { MessageSequencer msgSeq = sequenceRegister.get(qi.msg.msgCount); sequenceRegister.remove(qi.msg.msgCount); msgSeq.packetLost(qi.msg); } else if (qi.retryCount < 3) { qi.retryCount++; logger.debug("Retransmitting packet " + qi.msg.msgCount + " attempt " + qi.retryCount); sendMessage(qi.msg, qi); } else { logger.error("Transmission of packet failed 3 times, message was: to address => {}", qi.msg.msgCount, qi.msg.msgType, qi.msg.dstAddrStr, qi.msg.rawMsg); } } } }
Source:
<code>DepthGenerator(DepthWalk w, Generator s) throws MissingObjectException, IncorrectObjectTypeException, IOException { pending = new FIFORevQueue(); walk = (RevWalk)w; this.depth = w.getDepth(); this.UNSHALLOW = w.getUnshallowFlag(); <START> this.REINTERESTING = walk.newFlag("REINTERESTING"); <END> s.shareFreeList(pending); for (;;) { final RevCommit c = s.next(); if (c == null) break; if ((c.flags & RevWalk.UNINTERESTING) == 0 && !c.has(UNSHALLOW)) { ((DepthWalk.Commit)c).depth = 0; pending.add(c); } } }</code><technical_language>allocate this flag part of DepthWalk? reason is, if a walk reset runs allocate another flag. Do enough times walk suddenly stops working, free flags. Explicitly releasing flag is hard a generator, API walk generator walk is reset. easiest allocate this time UNSHALLOW flag in individual walk classes</technical_language>

Target:
DepthGenerator(DepthWalk w, Generator s) throws MissingObjectException, IncorrectObjectTypeException, IOException { pending = new FIFORevQueue(); walk = (RevWalk)w; this.depth = w.getDepth(); this.UNSHALLOW = w.getUnshallowFlag(); this.REINTERESTING = w.getReinterestingFlag(); s.shareFreeList(pending); for (;;) { final RevCommit c = s.next(); if (c == null) break; if ((c.flags & RevWalk.UNINTERESTING) == 0 && !c.has(UNSHALLOW)) { ((DepthWalk.Commit)c).depth = 0; pending.add(c); } } }
Source:
<code>public void aggregateGroupBySV(int length, int[] groupKeyArray, GroupByResultHolder groupByResultHolder, Map<ExpressionContext, BlockValSet> blockValSetMap) { byte[][] bytesArray = blockValSetMap.get(_expression).getBytesValuesSV(); for (int i = 0; i < length; i++) { int groupKey = groupKeyArray[i]; Geometry value = GeometrySerializer.deserialize(bytesArray[i]); <START> groupByResultHolder.setValueForKey(groupKey, groupByResultHolder.getResult(groupKey) == null ? value : ((Geometry) groupByResultHolder.getResult(groupKey)).union(value)); <END> } }</code><technical_language>optimized reduce result holder lookup suggestion Geometry geometry = groupByResultHolder.getResult(groupKey); if (geometry != null) { geometry.union(value); } else { groupByResultHolder.setValueForKey(groupKey, value); }</technical_language>

Target:
public void aggregateGroupBySV(int length, int[] groupKeyArray, GroupByResultHolder groupByResultHolder, Map<ExpressionContext, BlockValSet> blockValSetMap) { byte[][] bytesArray = blockValSetMap.get(_expression).getBytesValuesSV(); for (int i = 0; i < length; i++) { int groupKey = groupKeyArray[i]; Geometry value = GeometrySerializer.deserialize(bytesArray[i]); Geometry geometry = groupByResultHolder.getResult(groupKey); groupByResultHolder.setValueForKey(groupKey, geometry == null ? value : geometry.union(value)); } }
Source:
<code>public void testListingWithFallbackLinkWithSameMountDirectories() throws Exception { fsTarget.mkdirs(new Path(targetTestRoot, "fallbackDir/user")); fsTarget.mkdirs(new Path(targetTestRoot, "fallbackDir/user1")); <START> String clusterName = Constants.CONFIG_VIEWFS_DEFAULT_MOUNT_TABLE; <END> URI viewFsUri = new URI(FsConstants.VIEWFS_SCHEME, clusterName, "/", null, null); int itemCount = 0; try(FileSystem vfs = FileSystem.get(viewFsUri, conf)) { itemCount = vfs.listStatus(new Path(viewFsUri.toString())).length; } ConfigUtil.addLinkFallback(conf, clusterName, new Path(targetTestRoot, "fallbackDir").toUri()); try (FileSystem vfs = FileSystem.get(viewFsUri, conf)) { FileStatus[] statuses = vfs.listStatus(new Path(viewFsUri.toString())); assertTrue("The same directory name in fallback link should be shaded", statuses.length == itemCount + 1); } }</code><technical_language>add asserts for paths? I fallback paths expected get. display fallback ls paths.. ex: if fallback is : hdfs://nn2/root/ /a /b root folder ls hdfs://nn2/root/ display /a /b displaying qualified names sense differentiate mount links fallback links. in another thought confuse if users uri path directly, interact fs instead of ViewFS. example if return [hdfs://nn1/root/a, hdfs://nn1/root/b] application wants this path, initialize hdfs instead of ViewFS</technical_language>

Target:
public void testListingWithFallbackLinkWithSameMountDirectories() throws Exception { Path dir1 = new Path(targetTestRoot, "fallbackDir/user"); Path dir2 = new Path(targetTestRoot, "fallbackDir/user1"); fsTarget.mkdirs(dir1); fsTarget.mkdirs(dir2); String clusterName = Constants.CONFIG_VIEWFS_DEFAULT_MOUNT_TABLE; URI viewFsUri = new URI(FsConstants.VIEWFS_SCHEME, clusterName, "/", null, null); HashSet<Path> beforeFallback = new HashSet<>(); try(FileSystem vfs = FileSystem.get(viewFsUri, conf)) { for (FileStatus stat : vfs.listStatus(new Path(viewFsUri.toString()))) { beforeFallback.add(stat.getPath()); } } ConfigUtil.addLinkFallback(conf, clusterName, new Path(targetTestRoot, "fallbackDir").toUri()); try (FileSystem vfs = FileSystem.get(viewFsUri, conf)) { HashSet<Path> afterFallback = new HashSet<>(); for (FileStatus stat : vfs.listStatus(new Path(viewFsUri.toString()))) { afterFallback.add(stat.getPath()); } afterFallback.removeAll(beforeFallback); assertTrue("The same directory name in fallback link should be shaded", afterFallback.size() == 1); Path[] fallbackArray = new Path[afterFallback.size()]; Path expected = new Path(viewFsUri.toString(), "user1"); assertEquals("Path did not match", expected, afterFallback.toArray(fallbackArray)[0]); Path childDir = new Path(fallbackArray[0], "child"); vfs.mkdirs(childDir); FileStatus status = fsTarget.getFileStatus(new Path(dir2, "child")); assertTrue(status.isDirectory()); assertTrue(vfs.getFileStatus(childDir).isDirectory()); } }
Source:
<code>protected void executeCommand() { int missingDiskCount = getMissingDiskCount(); if (missingDiskCount <= 0) { setOvfUpdateStep(OvfUpdateStep.OVF_UPLOAD); <START> updateOvfStoreContent(); <END> setSucceeded(failedOvfDisks.isEmpty()); } else { setOvfUpdateStep(OvfUpdateStep.OVF_STORES_CREATION); setSucceeded(createOvfStoreDisks(getMissingDiskCount())); } }</code><technical_language>I process is confusing, failedOvfDisks out of context. a solution updateOvfStoreContent return boolean value, update succeeded not, done createOvfStoreDisks</technical_language>

Target:
protected void executeCommand() { int missingDiskCount = getMissingDiskCount(); if (missingDiskCount <= 0) { setOvfUpdateStep(OvfUpdateStep.OVF_UPLOAD); setSucceeded(updateOvfStoreContent()); } else { setOvfUpdateStep(OvfUpdateStep.OVF_STORES_CREATION); setSucceeded(createOvfStoreDisks(getMissingDiskCount())); } }
Source:
<code>public void testEnterAndDeleteOrder() { long id = sequence++; market.enter(sequence, Side.BUY, 34090, 100); <START> market.delete(sequence); <END> }</code><technical_language>drop id increment sequence here</technical_language>

Target:
public void testEnterAndDeleteOrder() { long id = sequence++; market.enter(id, Side.BUY, 34090, 100); market.delete(id); }
Source:
<code>public byte[] getCacheKey() { try { final ByteArrayOutputStream outputStream = new ByteArrayOutputStream(); for(Map.Entry<String, String> entry : map.entrySet()){ final String key = entry.getKey(); final String val = entry.getValue(); if(!Strings.isNullOrEmpty(key)){ outputStream.write(StringUtils.toUtf8(key)); } if(!Strings.isNullOrEmpty(val)){ outputStream.write(StringUtils.toUtf8(val)); } } return outputStream.toByteArray(); <START> }catch(IOException ex){ <END> throw Throwables.propagate(ex); } }</code><technical_language>formatting</technical_language>

Target:
public byte[] getCacheKey() { try { final ByteArrayOutputStream outputStream = new ByteArrayOutputStream(); for (Map.Entry<String, String> entry : map.entrySet()) { final String key = entry.getKey(); final String val = entry.getValue(); if (!Strings.isNullOrEmpty(key)) { outputStream.write(StringUtils.toUtf8(key)); } outputStream.write((byte)0xFF); if (!Strings.isNullOrEmpty(val)) { outputStream.write(StringUtils.toUtf8(val)); } outputStream.write((byte)0xFF); } return outputStream.toByteArray(); } catch (IOException ex) { throw Throwables.propagate(ex); } }
Source:
<code>public AccountServiceMetrics(MetricRegistry metricRegistry) { startupTimeInMs = metricRegistry.histogram(MetricRegistry.name(HelixAccountService.class, "StartupTimeInMs")); updateAccountTimeInMs = metricRegistry.histogram(MetricRegistry.name(HelixAccountService.class, "UpdateAccountTimeInMs")); fetchRemoteAccountTimeInMs = metricRegistry.histogram(MetricRegistry.name(HelixAccountService.class, "FetchRemoteAccountTimeInMs")); <START> accountUpdateConsumerTimeInMs = <END> metricRegistry.histogram(MetricRegistry.name(HelixAccountService.class, "AccountUpdateListenerTimeInMs")); unrecognizedMessageErrorCount = metricRegistry.counter(MetricRegistry.name(HelixAccountService.class, "UnrecognizedMessageErrorCount")); notifyAccountDataChangeErrorCount = metricRegistry.counter(MetricRegistry.name(HelixAccountService.class, "NotifyAccountDataChangeErrorCount")); updateAccountErrorCount = metricRegistry.counter(MetricRegistry.name(HelixAccountService.class, "UpdateAccountErrorCount")); fetchRemoteAccountErrorCount = metricRegistry.counter(MetricRegistry.name(HelixAccountService.class, "FetchRemoteAccountErrorCount")); remoteDataCorruptionErrorCount = metricRegistry.counter(MetricRegistry.name(HelixAccountService.class, "RemoteDataCorruptionErrorCount")); }</code><technical_language>mismatch variable name metric name</technical_language>

Target:
public AccountServiceMetrics(MetricRegistry metricRegistry) { startupTimeInMs = metricRegistry.histogram(MetricRegistry.name(HelixAccountService.class, "StartupTimeInMs")); updateAccountTimeInMs = metricRegistry.histogram(MetricRegistry.name(HelixAccountService.class, "UpdateAccountTimeInMs")); fetchRemoteAccountTimeInMs = metricRegistry.histogram(MetricRegistry.name(HelixAccountService.class, "FetchRemoteAccountTimeInMs")); accountUpdateConsumerTimeInMs = metricRegistry.histogram(MetricRegistry.name(HelixAccountService.class, "AccountUpdateConsumerTimeInMs")); unrecognizedMessageErrorCount = metricRegistry.counter(MetricRegistry.name(HelixAccountService.class, "UnrecognizedMessageErrorCount")); notifyAccountDataChangeErrorCount = metricRegistry.counter(MetricRegistry.name(HelixAccountService.class, "NotifyAccountDataChangeErrorCount")); updateAccountErrorCount = metricRegistry.counter(MetricRegistry.name(HelixAccountService.class, "UpdateAccountErrorCount")); fetchRemoteAccountErrorCount = metricRegistry.counter(MetricRegistry.name(HelixAccountService.class, "FetchRemoteAccountErrorCount")); remoteDataCorruptionErrorCount = metricRegistry.counter(MetricRegistry.name(HelixAccountService.class, "RemoteDataCorruptionErrorCount")); }
Source:
<code>private static void checkExtensionsForUnit(Unit unit) { <START> System.out.println(); <END> SoldierExtension soldierExtension = (SoldierExtension) unit.getUnitExtension("SoldierExtension"); SergeantExtension sergeantExtension = (SergeantExtension) unit.getUnitExtension("SergeantExtension"); CommanderExtension commanderExtension = (CommanderExtension) unit.getUnitExtension("CommanderExtension"); if (soldierExtension != null) { soldierExtension.soldierReady(); } else { System.out.println(unit.getName() + " without SoldierExtension"); } if (sergeantExtension != null) { sergeantExtension.sergeantReady(); } else { System.out.println(unit.getName() + " without SergeantExtension"); } if (commanderExtension != null) { commanderExtension.commanderReady(); } else { System.out.println(unit.getName() + " without CommanderExtension"); } }</code><technical_language>Please a logging framework instead of System.out.println</technical_language>

Target:
private static void checkExtensionsForUnit(Unit unit) { final Logger logger = LoggerFactory.getLogger(App.class); SoldierExtension soldierExtension = (SoldierExtension) unit.getUnitExtension("SoldierExtension"); SergeantExtension sergeantExtension = (SergeantExtension) unit.getUnitExtension("SergeantExtension"); CommanderExtension commanderExtension = (CommanderExtension) unit.getUnitExtension("CommanderExtension"); if (soldierExtension != null) { soldierExtension.soldierReady(); } else { logger.info(unit.getName() + " without SoldierExtension"); } if (sergeantExtension != null) { sergeantExtension.sergeantReady(); } else { logger.info(unit.getName() + " without SergeantExtension"); } if (commanderExtension != null) { commanderExtension.commanderReady(); } else { logger.info(unit.getName() + " without CommanderExtension"); } }
Source:
<code>private void impl$throwNoteBlockSoundEvent(IBlockState state, World worldIn, BlockPos pos, int id, int param, CallbackInfoReturnable<Boolean> callbackInfo) { if(worldIn.getBlockState(pos.up()).getMaterial() != Material.AIR) { return; } InstrumentProperty instrumentProperty = ((org.spongepowered.api.world.World) worldIn).getBlock(pos.getX(), pos.getY() - 1, pos.getZ()).getProperty(InstrumentProperty.class).orElse(null); if(instrumentProperty == null) { return; } TileEntity tileEntity = worldIn.getTileEntity(pos); if(!(tileEntity instanceof Note)) return; float pitch = (float) Math.pow(2.0D, (double) (param - 12) / 12.0D); <START> if(ShouldFire.PLAY_SOUND_EVENT_NOTE_BLOCK) { <END> try (final CauseStackManager.StackFrame frame = Sponge.getCauseStackManager().pushCauseFrame()) { final PlaySoundEvent.NoteBlock event = SpongeCommonEventFactory.callPlaySoundNoteBLockEvent(frame.getCurrentCause(), (org.spongepowered.api.world.World) worldIn, (Note) tileEntity, pos, this.getInstrument(id), instrumentProperty.getValue(), NoteUtils.getPitch((byte) param), pitch); if (event.isCancelled()) { callbackInfo.setReturnValue(true); } } } }</code><technical_language>place this beginning of method</technical_language>

Target:
private void impl$throwNoteBlockSoundEvent(IBlockState state, World worldIn, BlockPos pos, int id, int param, CallbackInfoReturnable<Boolean> callbackInfo) { if (!ShouldFire.PLAY_SOUND_EVENT_NOTE_BLOCK) { return; } if (worldIn.getBlockState(pos.up()).getMaterial() != Material.AIR) { return; } InstrumentProperty instrumentProperty = ((org.spongepowered.api.world.World) worldIn).getBlock(pos.getX(), pos.getY() - 1, pos.getZ()).getProperty(InstrumentProperty.class).orElse(null); if (instrumentProperty == null) { return; } TileEntity tileEntity = worldIn.getTileEntity(pos); if (!(tileEntity instanceof Note)) { return; } float pitch = (float) Math.pow(2.0D, (double) (param - 12) / 12.0D); try (final CauseStackManager.StackFrame frame = Sponge.getCauseStackManager().pushCauseFrame()) { final PlaySoundEvent.NoteBlock event = SpongeCommonEventFactory.callPlaySoundNoteBLockEvent(frame.getCurrentCause(), (org.spongepowered.api.world.World) worldIn, (Note) tileEntity, pos, this.getInstrument(id), instrumentProperty.getValue(), NotePitchRegistryModule.getPitch((byte) param), pitch); if (event.isCancelled()) { callbackInfo.setReturnValue(true); } } }
Source:
<code>public int run() throws IOException { Preconditions.checkArgument(input != null && output != null, "Both input and output parquet file paths are required."); Preconditions.checkArgument(codec != null, "The codec cannot be null"); Path inPath = new Path(input); Path outPath = new Path(output); CompressionCodecName codecName = CompressionCodecName.valueOf(codec); ParquetMetadata metaData = ParquetFileReader.readFooter(getConf(), inPath, NO_FILTER); MessageType schema = metaData.getFileMetaData().getSchema(); try (TransParquetFileReader reader = new TransParquetFileReader(HadoopInputFile.fromPath(inPath, getConf()), HadoopReadOptions.builder(getConf()).build())) { <START> ParquetFileWriter writer = new ParquetFileWriter(getConf(), schema, outPath, ParquetFileWriter.Mode.CREATE); <END> writer.start(); processBlocks(reader, writer, metaData, schema, metaData.getFileMetaData().getCreatedBy(), codecName); writer.end(metaData.getFileMetaData().getKeyValueMetaData()); } return 0; }</code><technical_language>add writer resource opening code part next reader (by separating ';')</technical_language>

Target:
public int run() throws IOException { Preconditions.checkArgument(input != null && output != null, "Both input and output parquet file paths are required."); Preconditions.checkArgument(codec != null, "The codec cannot be null"); Path inPath = new Path(input); Path outPath = new Path(output); CompressionCodecName codecName = CompressionCodecName.valueOf(codec); ParquetMetadata metaData = ParquetFileReader.readFooter(getConf(), inPath, NO_FILTER); MessageType schema = metaData.getFileMetaData().getSchema(); ParquetFileWriter writer = new ParquetFileWriter(getConf(), schema, outPath, ParquetFileWriter.Mode.CREATE); writer.start(); try (TransParquetFileReader reader = new TransParquetFileReader(HadoopInputFile.fromPath(inPath, getConf()), HadoopReadOptions.builder(getConf()).build())) { compressionConverter.processBlocks(reader, writer, metaData, schema, metaData.getFileMetaData().getCreatedBy(), codecName); } finally { writer.end(metaData.getFileMetaData().getKeyValueMetaData()); } return 0; }
Source:
<code>public void testOptionalNonNull() { OptionalModel expected = new OptionalModel(); <START> expected.field = 1; <END> OptionalModel result = unmarshal(OptionalModel.class, marshal(expected)); assertThat(result, is(expected)); }</code><technical_language>I magic number 1 is magical need Checkstyle suppression. I I 42 in a test yesterday amusing a distracting</technical_language>

Target:
public void testOptionalNonNull() { OptionalModel expected = new OptionalModel(); expected.field = 1; OptionalModel result = unmarshal(gson, OptionalModel.class, marshal(gson, expected)); assertThat(result, is(expected)); }
Source:
<code>public static void resetAllMetrics() { if (sIsResetting) { return; } <START> sIsResetting = true; <END> for (Counter counter : METRIC_REGISTRY.getCounters().values()) { counter.dec(counter.getCount()); } for (String meterName : METRIC_REGISTRY.getMeters().keySet()) { METRIC_REGISTRY.remove(meterName); METRIC_REGISTRY.meter(meterName); } for (String timerName : METRIC_REGISTRY.getTimers().keySet()) { METRIC_REGISTRY.remove(timerName); METRIC_REGISTRY.timer(timerName); } sIsResetting = false; }</code><technical_language>guarantee sIsResetting? Currently guarantee this is a critical section</technical_language>

Target:
public static synchronized void resetAllMetrics() { for (Counter counter : METRIC_REGISTRY.getCounters().values()) { counter.dec(counter.getCount()); } for (String meterName : METRIC_REGISTRY.getMeters().keySet()) { METRIC_REGISTRY.remove(meterName); METRIC_REGISTRY.meter(meterName); } for (String timerName : METRIC_REGISTRY.getTimers().keySet()) { METRIC_REGISTRY.remove(timerName); METRIC_REGISTRY.timer(timerName); } }
Source:
<code>protected void initChannel(final Channel channel) { checkNotNull(channel, "expected non-null channel"); final RntbdRequestManager requestManager = new RntbdRequestManager( this.healthChecker, this.config.maxRequestsPerChannel()); final ChannelPipeline pipeline = channel.pipeline(); pipeline.addFirst( new RntbdContextNegotiator(requestManager, this.config.userAgent()), new RntbdResponseDecoder(), new RntbdRequestEncoder(), requestManager ); if (this.config.wireLogLevel() != null) { pipeline.addFirst(new LoggingHandler(this.config.wireLogLevel())); } pipeline.addFirst( new SslHandler(this.config.sslContext().newEngine(channel.alloc()))); final long idleConnectionTimerResolutionInNanos = config.idleConnectionTimerResolutionInNanos(); <START> pipeline.addFirst( <END> new IdleStateHandler( idleConnectionTimerResolutionInNanos, idleConnectionTimerResolutionInNanos, 0, TimeUnit.NANOSECONDS)); channel.attr(REQUEST_MANAGER).set(requestManager); }</code><technical_language>this adds IdleStateHandler SSLHandler. Is is intentional? code IdleStateHandler SSLHandler</technical_language>

Target:
protected void initChannel(final Channel channel) { checkNotNull(channel, "expected non-null channel"); final RntbdRequestManager requestManager = new RntbdRequestManager( this.healthChecker, this.config.maxRequestsPerChannel()); final long idleConnectionTimerResolutionInNanos = config.idleConnectionTimerResolutionInNanos(); final ChannelPipeline pipeline = channel.pipeline(); pipeline.addFirst( new RntbdContextNegotiator(requestManager, this.config.userAgent()), new RntbdResponseDecoder(), new RntbdRequestEncoder(), requestManager ); if (this.config.wireLogLevel() != null) { pipeline.addFirst(new LoggingHandler(this.config.wireLogLevel())); } pipeline.addFirst( new SslHandler(this.config.sslContext().newEngine(channel.alloc())), new IdleStateHandler( idleConnectionTimerResolutionInNanos, idleConnectionTimerResolutionInNanos, 0, TimeUnit.NANOSECONDS)); channel.attr(REQUEST_MANAGER).set(requestManager); }
Source:
<code>public AbstractImporter create(ImporterConfig config) { <START> return new KafkaStreamImporterVersion2((KafkaStreamImporterConfig) config); <END> }</code><technical_language>version2 call KafkaStreamImporter</technical_language>

Target:
public AbstractImporter create(ImporterConfig config) { return new KafkaTopicPartitionImporter((KafkaStreamImporterConfig) config); }
Source:
<code>public default double yearFraction(LocalDate firstDate, LocalDate secondDate) { <START> return yearFraction(firstDate, secondDate, SIMPLE); <END> }</code><technical_language>Surprising constant is refers is defined this declaration</technical_language>

Target:
public default double yearFraction(LocalDate firstDate, LocalDate secondDate) { return yearFraction(firstDate, secondDate, DayCounts.SIMPLE_SCHEDULE_INFO); }
Source:
<code><START> public NodeCountsProcessor( NodeStore nodeStore, NodeLabelsCache cache, int highLabelId, <END> CountsAccessor.Updater counts, MigrationProgressMonitor.Section progressMonitor ) { this.nodeStore = nodeStore; this.cache = cache; this.anyLabel = highLabelId; this.counts = counts; this.labelCounts = new long[highLabelId + 1]; this.progressMonitor = progressMonitor; }</code><technical_language>This package-private other constructor is removed</technical_language>

Target:
NodeCountsProcessor( NodeStore nodeStore, NodeLabelsCache cache, int highLabelId, CountsAccessor.Updater counts, MigrationProgressMonitor.Section progressMonitor ) { this.nodeStore = nodeStore; this.cache = cache; this.anyLabel = highLabelId; this.counts = counts; this.labelCounts = new long[highLabelId + 1]; this.progressMonitor = progressMonitor; }
Source:
<code>protected String getLocalPackageFileId(File pkgFile) { PackageDefinition packageDefinition = null; try { if (pkgFile.isFile()) { packageDefinition = service.loadPackageFromZip(pkgFile); } else if (pkgFile.isDirectory()) { File manifest = new File(pkgFile, LocalPackage.MANIFEST); packageDefinition = service.loadPackage(manifest); } <START> } catch (PackageException e) { <END> return null; } if (packageDefinition != null) { return packageDefinition.getId(); } return null; }</code><technical_language>Do exception. log error level</technical_language>

Target:
protected String getLocalPackageFileId(File pkgFile) { PackageDefinition packageDefinition = null; try { if (pkgFile.isFile()) { packageDefinition = service.loadPackageFromZip(pkgFile); } else if (pkgFile.isDirectory()) { File manifest = new File(pkgFile, LocalPackage.MANIFEST); packageDefinition = service.loadPackage(manifest); } else { throw new PackageException("Unknown file type (not a file and not a directory) for " + pkgFile); } } catch (PackageException e) { log.error("Error trying to load package id from " + pkgFile, e); return null; } return packageDefinition == null ? null : packageDefinition.getId(); }
Source:
<code>public Object instantiateItem(ViewGroup container, int position) { Fragment fragment = (Fragment) super.instantiateItem(container, position); switch (position) { case 0: mEditorFragment = (EditorFragmentAbstract) fragment; mEditorFragment.setImageLoader(mImageLoader); mEditorFragment.getTitleOrContentChanged().observe(EditPostActivity.this, new Observer<Editable>() { @Override public void onChanged(@Nullable Editable editable) { mHandler.removeCallbacks(mSave); <START> mHandler.postDelayed(mSave, 500); <END> } }); if (mEditorFragment instanceof EditorMediaUploadListener) { mEditorMediaUploadListener = (EditorMediaUploadListener) mEditorFragment; mEditorFragment.setCustomHttpHeader("User-Agent", WordPress.getUserAgent()); reattachUploadingMedia(); } break; case 1: mEditPostSettingsFragment = (EditPostSettingsFragment) fragment; break; case 2: mEditPostPreviewFragment = (EditPostPreviewFragment) fragment; break; } return fragment; }</code><technical_language>replace this a constant</technical_language>

Target:
public Object instantiateItem(ViewGroup container, int position) { Fragment fragment = (Fragment) super.instantiateItem(container, position); switch (position) { case 0: mEditorFragment = (EditorFragmentAbstract) fragment; mEditorFragment.setImageLoader(mImageLoader); mEditorFragment.getTitleOrContentChanged().observe(EditPostActivity.this, new Observer<Editable>() { @Override public void onChanged(@Nullable Editable editable) { mHandler.removeCallbacks(mSave); if (mDebounceCounter < MAX_UNSAVED_POSTS) { mDebounceCounter++; mHandler.postDelayed(mSave, CHANGE_SAVE_DELAY); } else { mHandler.post(mSave); } } }); if (mEditorFragment instanceof EditorMediaUploadListener) { mEditorMediaUploadListener = (EditorMediaUploadListener) mEditorFragment; mEditorFragment.setCustomHttpHeader("User-Agent", WordPress.getUserAgent()); reattachUploadingMedia(); } break; case 1: mEditPostSettingsFragment = (EditPostSettingsFragment) fragment; break; case 2: mEditPostPreviewFragment = (EditPostPreviewFragment) fragment; break; } return fragment; }
Source:
<code>public void mountCamera() { ClientComponent clientComponent = localPlayer.getClientEntity().getComponent(ClientComponent.class); EntityRef targetEntityForCamera = GazeAuthoritySystem.getGazeEntityForCharacter(clientComponent.character); LocationComponent cameraLocation = clientComponent.camera.getComponent(LocationComponent.class); Vector3f cameraPosition; if (cameraLocation == null) { cameraPosition = Vector3f.zero(); } else { cameraPosition = cameraLocation.getLocalPosition(); } <START> Location.attachChild(targetEntityForCamera, clientComponent.camera, cameraPosition, new Quat4f(Quat4f.IDENTITY)); <END> }</code><technical_language>I touched this code, wondering if remove Vector3f cameraPosition declaration place Location.attachChild() calls IF statement. Also, is cameraLocation == null expected typical case? If recommend switching condition cameraLocation != null</technical_language>

Target:
private void mountCamera() { ClientComponent clientComponent = localPlayer.getClientEntity().getComponent(ClientComponent.class); EntityRef targetEntityForCamera = GazeAuthoritySystem.getGazeEntityForCharacter(clientComponent.character); LocationComponent cameraLocation = clientComponent.camera.getComponent(LocationComponent.class); if (cameraLocation != null) { Location.attachChild(targetEntityForCamera, clientComponent.camera, cameraLocation.getLocalPosition(), new Quat4f(Quat4f.IDENTITY)); } else { Location.attachChild(targetEntityForCamera, clientComponent.camera, Vector3f.zero(), new Quat4f(Quat4f.IDENTITY)); } }
Source:
<code>public int hashCode() { final int prime = 31; int result = 1; <START> result = prime * result + ((this.rootNode == null) ? 0 : this.rootNode.hashCode()); <END> return result; }</code><technical_language>Change this.jsonAsString.hashCode()</technical_language>

Target:
public int hashCode() { final int prime = 31; int result = 1; result = prime * result + this.jsonAsString.hashCode(); return result; }
Source:
<code>private void addWorkspaceHandler(final ResolveFunction<Void> readAllMarkerResolveFunc) { <START> eventBus.addHandler(WorkspaceReadyEvent.getType(), new WorkspaceReadyEvent.WorkspaceReadyHandler() { <END> @Override public void onWorkspaceReady(WorkspaceReadyEvent event) { BreakpointStorageImpl.this.onWorkspaceReady(readAllMarkerResolveFunc); } }); }</code><technical_language>lambda</technical_language>

Target:
private void addWorkspaceHandler(final ResolveFunction<Void> readAllMarkerResolveFunc) { eventBus.addHandler(WorkspaceReadyEvent.getType(), event -> BreakpointStorageImpl.this.onWorkspaceReady(readAllMarkerResolveFunc)); }