auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>private void setHandlersEnabled(boolean enable) { setLocalDocumentModificationHandlersEnabled(enable); <START> setLocalEditorStatusChangeHandlerEnabled(enable); <END> setLocalTextSelectionChangeHandlersEnabled(enable); setLocalViewPortChangeHandlersEnabled(enable); }</code><technical_language>setLocalEditorStatusChangeHandlersEnabled</technical_language>

Target:
private void setHandlersEnabled(boolean enable) { setLocalDocumentModificationHandlersEnabled(enable); setLocalEditorStatusChangeHandlersEnabled(enable); setLocalTextSelectionChangeHandlersEnabled(enable); setLocalViewPortChangeHandlersEnabled(enable); }
Source:
<code>public MariaDbStatement(MariaDbConnection connection, int resultSetScrollType, int resultSetConcurrency) { this.protocol = connection.getProtocol(); this.connection = connection; this.canUseServerTimeout = connection.canUseServerTimeout(); this.resultSetScrollType = resultSetScrollType; this.resultSetConcurrency = resultSetConcurrency; this.lock = this.connection.lock; this.options = this.protocol.getOptions(); try { setFetchSize(this.options.defaultFetchSize); } catch(SQLException e) { <START> logger.warn("defaultFetchSize is invalid, using default of 0"); <END> } }</code><technical_language>a try catch a warning for statement avoided. "defaultFetchSize" validated beforehand, initialize fetchSize defaultFetchSize. in DefaultOptions.optionCoherenceValidation that</technical_language>

Target:
public MariaDbStatement(MariaDbConnection connection, int resultSetScrollType, int resultSetConcurrency) { this.protocol = connection.getProtocol(); this.connection = connection; this.canUseServerTimeout = connection.canUseServerTimeout(); this.resultSetScrollType = resultSetScrollType; this.resultSetConcurrency = resultSetConcurrency; this.lock = this.connection.lock; this.options = this.protocol.getOptions(); this.fetchSize = this.options.defaultFetchSize; }
Source:
<code>private Response addSAN(StorageDomain model, StorageType storageType, storage_domain_static entity, Guid hostId) { <START> boolean overrideLuns = model.getStorage().isOverrideLuns() != null ? <END> model.getStorage().isOverrideLuns().booleanValue() : false; return performCreation(VdcActionType.AddSANStorageDomain, getSanAddParams(entity, hostId, getLunIds(model.getStorage(), storageType, hostId), overrideLuns), ID_RESOLVER); }</code><technical_language>isOverrideLuns() operate value, basically stil NPE OverrideLuns is NULL, do: model.getStorage().isSetOverrideLuns() ? model.getStorage().isOverrideLuns() : false;</technical_language>

Target:
private Response addSAN(StorageDomain model, StorageType storageType, storage_domain_static entity, Guid hostId) { boolean overrideLuns = model.getStorage().isSetOverrideLuns() ? model.getStorage().isOverrideLuns() : false; return performCreation(VdcActionType.AddSANStorageDomain, getSanAddParams(entity, hostId, getLunIds(model.getStorage(), storageType, hostId), overrideLuns), ID_RESOLVER); }
Source:
<code>public QueryTreeNode getChild(int index) { <START> assert false; <END> return null; }</code><technical_language>throw UnsupportedOperationException("Not Implemented") consistent node CurrentDatetimeOperatorNode</technical_language>

Target:
public QueryTreeNode getChild(int index) { throw new UnsupportedOperationException("Not Implemented"); }
Source:
<code>public static boolean checkIfNamesContainNameByProperties(Collection<ConceptName> names, ConceptName searched) { for(ConceptName name : names){ <START> if(Objects.equals(name.getUuid(), searched.getUuid())) return true; <END> else if(Objects.equals(name.getName(), searched.getName()) &&Objects.equals(name.getConceptNameType(), searched.getConceptNameType()) &&Objects.equals(name.getLocale(), searched.getLocale())){ return true; } } return false; }</code><technical_language>code convention is if clause statements curly braces statements a new line</technical_language>

Target:
public static boolean checkIfNamesContainNameByProperties(Collection<ConceptName> names, ConceptName searched) { for(ConceptName name : names){ if(Objects.equals(name.getUuid(), searched.getUuid())){ return true; } else if(Objects.equals(name.getName(), searched.getName()) &&Objects.equals(name.getConceptNameType(), searched.getConceptNameType()) &&Objects.equals(name.getLocale(), searched.getLocale())){ return true; } } return false; }
Source:
<code>public FileMode getIndexFileMode(final DirCacheIterator indexIter) { final FileMode wtMode = getEntryFileMode(); if (indexIter == null) return wtMode; final FileMode iMode = indexIter.getEntryFileMode(); <START> if (getOptions().isFileMode() && iMode != FileMode.GITLINK && iMode != FileMode.TREE) <END> return wtMode; if (FileMode.REGULAR_FILE == wtMode && FileMode.EXECUTABLE_FILE == iMode) return iMode; if (FileMode.EXECUTABLE_FILE == wtMode && FileMode.REGULAR_FILE == iMode) return iMode; if (FileMode.GITLINK == iMode && FileMode.TREE == wtMode) return iMode; if (FileMode.TREE == iMode && FileMode.GITLINK == wtMode) return iMode; return wtMode; }</code><technical_language>missing braces, more</technical_language>

Target:
public FileMode getIndexFileMode(final DirCacheIterator indexIter) { final FileMode wtMode = getEntryFileMode(); if (indexIter == null) { return wtMode; } final FileMode iMode = indexIter.getEntryFileMode(); if (getOptions().isFileMode() && iMode != FileMode.GITLINK && iMode != FileMode.TREE) { return wtMode; } if (FileMode.REGULAR_FILE == wtMode && FileMode.EXECUTABLE_FILE == iMode) { return iMode; } if (FileMode.EXECUTABLE_FILE == wtMode && FileMode.REGULAR_FILE == iMode) { return iMode; } if (FileMode.GITLINK == iMode && FileMode.TREE == wtMode) { return iMode; } if (FileMode.TREE == iMode && FileMode.GITLINK == wtMode) { return iMode; } return wtMode; }
Source:
<code>public void flush(final String value) { <START> if (Objects.isNull(value) || value.isEmpty()) { <END> ((ScenarioGrid) gridWidget).getEventBus().fireEvent( new ScenarioNotificationEvent( ScenarioSimulationEditorConstants.INSTANCE.headerTitleEmptyError(), NotificationEvent.NotificationType.ERROR)); return; } if (scenarioHeaderMetaData != null) { scenarioHeaderMetaData.setEditingMode(false); if (Objects.equals(value, scenarioHeaderMetaData.getTitle())) { return; } } internalFlush(value); }</code><technical_language>call value.trim().isEmpty()</technical_language>

Target:
public void flush(final String value) { if (Objects.isNull(value) || value.trim().isEmpty()) { ((ScenarioGrid) gridWidget).getEventBus().fireEvent( new ScenarioNotificationEvent( ScenarioSimulationEditorConstants.INSTANCE.headerTitleEmptyError(), NotificationEvent.NotificationType.ERROR)); return; } if (scenarioHeaderMetaData != null) { scenarioHeaderMetaData.setEditingMode(false); if (Objects.equals(value, scenarioHeaderMetaData.getTitle())) { return; } } internalFlush(value); }
Source:
<code>public void loadNbt(CompoundTag tag) { super.loadNbt(tag); final Material[] item = {null}; if (!tag.readString("Item", itemString -> item[0] = ItemIds.getItem(itemString))) { tag.readInt("Item", itemInt -> item[0] = Material.getMaterial(itemInt)); } <START> if (item[0] != null) { <END> tag.readInt("Data", data -> this.contents = item[0].getNewData((byte) data)); } }</code><technical_language>if I this. readX allow for chaining andThen similar (maybe need a method for failures well). if necessary, move bool returns if tag exists a new method</technical_language>

Target:
public void loadNbt(CompoundTag tag) { super.loadNbt(tag); tag.tryGetMaterial("Item").ifPresent( item -> this.contents = item.getNewData( (byte) (int) (tag.tryGetInt("Data").orElse(0)))); }
Source:
<code>public void teardown() { try { csvMapReader.close(); } catch (IOException e) { <START> logger.error("Error while closing csv map reader {}", e.getMessage()); <END> } try { csvBeanReader.close(); } catch (IOException e) { logger.error("Error while closing csv bean reader {}", e.getMessage()); } }</code><technical_language>throw exception</technical_language>

Target:
public void teardown() { try { csvMapReader.close(); } catch (IOException e) { logger.error("Error while closing csv map reader {}", e.getMessage()); DTThrowable.wrapIfChecked(e); } try { csvBeanReader.close(); } catch (IOException e) { logger.error("Error while closing csv bean reader {}", e.getMessage()); DTThrowable.wrapIfChecked(e); } }
Source:
<code>public Response commit(Action action) { <START> action.setAsync(false); <END> RestoreAllSnapshotsParameters restoreParams = new RestoreAllSnapshotsParameters(parentId, guid); Response response = doAction(VdcActionType.RestoreAllSnapshots, restoreParams, action, PollingType.JOB); return response; }</code><technical_language>this action sync</technical_language>

Target:
public Response commit(Action action) { RestoreAllSnapshotsParameters restoreParams = new RestoreAllSnapshotsParameters(parentId, guid); Response response = doAction(VdcActionType.RestoreAllSnapshots, restoreParams, action); return response; }
Source:
<code>public void testCopyBlob() throws Exception { ByteSource byteSource = TestUtils.randomByteSource().slice(0, 1024); AzureBlob object = getApi().newBlob(); object.getProperties().setName("from"); object.setPayload(byteSource.read()); getApi().putBlob(privateContainer, object); URI copySource = view.getSigner().signGetBlob(privateContainer, "from").getEndpoint(); <START> getApi().copyBlob(copySource, privateContainer, "to", Optional.<CopyBlobOptions>absent()); <END> AzureBlob getBlob = getApi().getBlob(privateContainer, "to"); assertEquals(ByteStreams2.toByteArrayAndClose(getBlob.getPayload().openStream()), byteSource.read()); }</code><technical_language>Do need clean this afterwards? is done somewhere</technical_language>

Target:
public void testCopyBlob() throws Exception { ByteSource byteSource = TestUtils.randomByteSource().slice(0, 1024); AzureBlob object = getApi().newBlob(); object.getProperties().setName("from"); object.setPayload(byteSource.read()); getApi().putBlob(privateContainer, object); URI copySource = view.getSigner().signGetBlob(privateContainer, "from").getEndpoint(); getApi().copyBlob(copySource, privateContainer, "to", CopyBlobOptions.NONE); AzureBlob getBlob = getApi().getBlob(privateContainer, "to"); assertEquals(ByteStreams2.toByteArrayAndClose(getBlob.getPayload().openStream()), byteSource.read()); assertThat(getBlob.getProperties().getMetadata().isEmpty()); }
Source:
<code>public static RowMapper<UserWithRoleRecord> buildResultMapper() { return (rs, ctx) -> { <START> final UserWithRoleRecord userData = <END> UserWithRoleRecord.builder() .userId(rs.getInt(USER_ID_COLUMN) == 0 ? null : rs.getInt(USER_ID_COLUMN)) .role(rs.getString(ROLE_COLUMN)) .username(rs.getString(USERNAME_COLUMN)) .build(); Postconditions.assertState(userData.role != null); if (userData.role.equals(UserRole.HOST)) { Postconditions.assertState(userData.username == null); Postconditions.assertState(userData.userId == null); } else if (userData.role.equals(UserRole.ANONYMOUS)) { Postconditions.assertState(userData.userId == null); Postconditions.assertState(userData.username != null); } else { Postconditions.assertState(userData.userId != null); Postconditions.assertState(userData.username != null); } return userData; }; }</code><technical_language>suggestion final UserWithRoleRecord userRecord =</technical_language>

Target:
public static RowMapper<UserWithRoleRecord> buildResultMapper() { return (rs, ctx) -> { final var userWithRoleRecord = UserWithRoleRecord.builder() .userId(rs.getInt(USER_ID_COLUMN) == 0 ? null : rs.getInt(USER_ID_COLUMN)) .role(rs.getString(ROLE_COLUMN)) .username(rs.getString(USERNAME_COLUMN)) .build(); Postconditions.assertState(userWithRoleRecord.role != null); if (userWithRoleRecord.role.equals(UserRole.HOST)) { Postconditions.assertState(userWithRoleRecord.username == null); Postconditions.assertState(userWithRoleRecord.userId == null); } else if (userWithRoleRecord.role.equals(UserRole.ANONYMOUS)) { Postconditions.assertState(userWithRoleRecord.userId == null); Postconditions.assertState(userWithRoleRecord.username != null); } else { Postconditions.assertState(userWithRoleRecord.userId != null); Postconditions.assertState(userWithRoleRecord.username != null); } return userWithRoleRecord; }; }
Source:
<code>public void testMoveProjectWithinGitRepoMoveFromLevelZeroDownOne() throws Exception { boolean buggy = Platform.getBundle("org.eclipse.core.runtime").getVersion() <START> .compareTo(Version.parseVersion("3.7.0")) < 0; <END> try { dotestMoveProjectWithinRepo("P/", "Project-1", "P/Project-1/", "P2", "P/Project-1/"); if (buggy) fail("ResoruceException expected"); } catch (ResourceException e) { if (!buggy) throw e; } }</code><technical_language>This test fails machine (Version: 3.7.0 Build id: I20110613-1736). work? Bug 307410 prevent user entering a subfolder of current folder "move" dialog. do removing this test</technical_language>

Target:
public void testMoveProjectWithinGitRepoMoveFromLevelZeroDownOne() throws Exception { try { dotestMoveProjectWithinRepo("P/", "Project-1", "P/Project-1/", "P2", "P/Project-1/"); fail("ResourceException expected, core functionality dangerously broken and therefore forbidden"); } catch (ResourceException e) { } }
Source:
<code>private void internalEndSuccessfully() { log.info("Ending command '{}' successfully.", getClass().getName()); boolean clearCompensation = true; <START> try { <END> endSuccessfully(); } catch (Exception e) { clearCompensation = false; } finally { if (getCommandCompensationPhase() == CommandCompensationPhase.END_COMMAND) { if (clearCompensation) { getCompensationContext().cleanupCompensationDataAfterSuccessfulCommand(); } else { compensate(); } } } }</code><technical_language>appears incorporate this logic CommandBase.endActionInTransactionScope() finally block of method is: if (TransactionSupport.current() == null) { try { getCompensationContext().cleanupCompensationDataAfterSuccessfulCommand(); } catch (RuntimeException e) { logExceptionAndCompensate(e); } } else { try { if (!exceptionOccurred && TransactionSupport.current().getStatus() == Status.STATUS_ACTIVE) { getCompensationContext().cleanupCompensationDataAfterSuccessfulCommand(); } else { compensate(); } } catch (SystemException e) { logExceptionAndCompensate(e); } }</technical_language>

Target:
private void internalEndSuccessfully() { log.info("Ending command '{}' successfully.", getClass().getName()); endSuccessfully(); }
Source:
<code>private void linkWebHook(final ReleaseWebHookResource resource) { if (resource == null) { <START> throw new InvalidParameterException("event parameter is null"); <END> } AbstractProject project = validateAndGetJenkinsProject(resource); String webHookNameToLink = resource.getWebHookName(); ReleaseWebHook webHook = validateAndGetReleaseWebHookByName(webHookNameToLink); ReleaseWebHookAction action = getReleaseWebHookActionFromProject(project); if (action != null && action.getWebHookNames() != null) { for (ReleaseWebHookName webHookName : action.getWebHookNames()) { if (webHookName.getWebHookName().equalsIgnoreCase(webHookNameToLink)) { logger.fine(String.format("WebHook %s already added in the project %s", webHookNameToLink, project.getName())); return; } } } ReleaseWebHookName webHookName = new ReleaseWebHookName(webHookNameToLink); if (action == null) { List<ReleaseWebHookName> webHookNames = new ArrayList<ReleaseWebHookName>(); webHookNames.add(webHookName); action = new ReleaseWebHookAction(webHookNames); DescribableList<Publisher, Descriptor<Publisher>> publishersList = project.getPublishersList(); publishersList.add(action); } else { List<ReleaseWebHookName> webHookNames = action.getWebHookNames() != null ? action.getWebHookNames() : new ArrayList<ReleaseWebHookName>(); webHookNames.add(webHookName); action.setWebHookNames(webHookNames); } saveProject(project); }</code><technical_language>fix message</technical_language>

Target:
private void linkWebHook(final ReleaseWebHookResource resource) { if (resource == null) { throw new InvalidParameterException("resource is null"); } AbstractProject project = validateAndGetJenkinsProject(resource); String webHookNameToLink = resource.getWebHookName(); ReleaseWebHook webHook = validateAndGetReleaseWebHookByName(webHookNameToLink); ReleaseWebHookAction action = getReleaseWebHookActionFromProject(project); if (action != null && action.getWebHookReferences() != null) { for (ReleaseWebHookReference webHookReference : action.getWebHookReferences()) { if (webHookReference.getWebHookName().equalsIgnoreCase(webHookNameToLink)) { logger.fine(String.format("WebHook %s already added in the project %s", webHookNameToLink, project.getName())); return; } } } ReleaseWebHookReference webHookReference = new ReleaseWebHookReference(webHookNameToLink); if (action == null) { List<ReleaseWebHookReference> webHookReferences = new ArrayList<ReleaseWebHookReference>(); webHookReferences.add(webHookReference); action = new ReleaseWebHookAction(webHookReferences); DescribableList<Publisher, Descriptor<Publisher>> publishersList = project.getPublishersList(); publishersList.add(action); } else { List<ReleaseWebHookReference> webHookReferences = action.getWebHookReferences(); if (webHookReferences == null) { webHookReferences = new ArrayList<ReleaseWebHookReference>(); } webHookReferences.add(webHookReference); action.setWebHookReferences(webHookReferences); logger.fine(String.format("WebHook %s is linked to project %s", webHookReference, project)); } saveProject(project); }
Source:
<code>public static WebSocketAction getWebSocketActionFromString(String webSocketAction) { for (WebSocketAction lWebSocketAction : WebSocketAction.values()) { if (lWebSocketAction.toString().equals(webSocketAction)) { return lWebSocketAction; } } <START> return null; <END> }</code><technical_language>Again, please Optionals</technical_language>

Target:
public static Optional<WebSocketAction> getWebSocketActionFromString(String webSocketAction) { for (WebSocketAction lWebSocketAction : WebSocketAction.values()) { if (lWebSocketAction.toString().equals(webSocketAction)) { return Optional.of(lWebSocketAction); } } return Optional.empty(); }
Source:
<code><START> public void testAmazonAppStoreInstallSourceIsParsedCorrectly() { <END> InstallSource installSource = InstallSource.fromInstallerPackageName("com.amazon.venezia"); assertTrue(installSource instanceof AmazonAppStoreInstallSource); assertEquals("Amazon Appstore", installSource.toString()); }</code><technical_language><b>Reporter: </b>PMD<br /><b>Violation: </b><a target="_blank" href="<LINK_0>">JUnitTestContainsTooManyAsserts</a><br /><b>Notes: </b>JUnit tests more 1 assert(s)</technical_language>

Target:
public void testAmazonAppStoreInstallSourceIsParsedCorrectly() { InstallSource installSource = InstallSource.fromInstallerPackageName("com.amazon.venezia"); assertTrue( "Package name is correctly identified as belonging to the Amazon Appstore", installSource instanceof AmazonAppStoreInstallSource); assertEquals( "Amazon Appstore install source has correct description", "Amazon Appstore", installSource.toString()); }
Source:
<code>public void verifyPagination(){ String firstLinkOnFirstPage = listOfLinks.get(0).getAttribute("href"); String lastLinkOnFirstPage = listOfLinks.get(listOfLinks.size()-1).getAttribute("href"); <START> waitForElementByElement(nextResultsButton); <END> nextResultsButton.click(); String firstLinkOnSecondPage = listOfLinks.get(0).getAttribute("href"); String lastLinkOnSecondPage = listOfLinks.get(listOfLinks.size()-1).getAttribute("href"); Assertion.assertNotEquals(firstLinkOnFirstPage, firstLinkOnSecondPage); Assertion.assertNotEquals(lastLinkOnFirstPage, lastLinkOnSecondPage); waitForElementByElement(previousResultsButton); previousResultsButton.click(); String firstLinkAfterBack = listOfLinks.get(0).getAttribute("href"); String lastLinkAfterBack = listOfLinks.get(listOfLinks.size()-1).getAttribute("href"); Assertion.assertEquals(firstLinkOnFirstPage, firstLinkAfterBack); Assertion.assertEquals(lastLinkOnFirstPage, lastLinkAfterBack); }</code><technical_language>yo wait for I</technical_language>

Target:
public void verifyPagination(){ String firstLinkOnFirstPage = listOfLinks.get(0).getAttribute("href"); String lastLinkOnFirstPage = listOfLinks.get(listOfLinks.size()-1).getAttribute("href"); nextResultsButton.click(); String firstLinkOnSecondPage = listOfLinks.get(0).getAttribute("href"); String lastLinkOnSecondPage = listOfLinks.get(listOfLinks.size()-1).getAttribute("href"); Assertion.assertNotEquals(firstLinkOnFirstPage, firstLinkOnSecondPage); Assertion.assertNotEquals(lastLinkOnFirstPage, lastLinkOnSecondPage); previousResultsButton.click(); String firstLinkAfterBack = listOfLinks.get(0).getAttribute("href"); String lastLinkAfterBack = listOfLinks.get(listOfLinks.size()-1).getAttribute("href"); Assertion.assertEquals(firstLinkOnFirstPage, firstLinkAfterBack); Assertion.assertEquals(lastLinkOnFirstPage, lastLinkAfterBack); }
Source:
<code>public Gateway3DSAuthorisationResponse authorise3dsResponse(Auth3dsResponseGatewayRequest request) { Either<GatewayError, GatewayClient.Response> response = authoriseClient.postRequestFor(null, request.getGatewayAccount(), build3dsResponseAuthOrder(request)); <START> GatewayResponse<BaseAuthoriseResponse> gatewayResponse = GatewayResponseGenerator.getWorldpayGatewayResponse(authoriseClient, response, WorldpayOrderStatusResponse.class); <END> if (gatewayResponse.getBaseResponse().isPresent()) { return new Gateway3DSAuthorisationResponse(gatewayResponse.getBaseResponse().get().authoriseStatus(), gatewayResponse.getBaseResponse().get().getTransactionId()); } return new Gateway3DSAuthorisationResponse(BaseAuthoriseResponse.AuthoriseStatus.EXCEPTION, null); }</code><technical_language>This block replaced functional style Java, example in Epdq</technical_language>

Target:
public Gateway3DSAuthorisationResponse authorise3dsResponse(Auth3dsResponseGatewayRequest request) { Either<GatewayError, GatewayClient.Response> response = authoriseClient.postRequestFor(null, request.getGatewayAccount(), build3dsResponseAuthOrder(request)); GatewayResponse<BaseAuthoriseResponse> gatewayResponse = GatewayResponseGenerator.getWorldpayGatewayResponse(authoriseClient, response, WorldpayOrderStatusResponse.class); return gatewayResponse.getBaseResponse().map( baseResponse -> Gateway3DSAuthorisationResponse.of(baseResponse.authoriseStatus(), baseResponse.getTransactionId())) .orElseGet(Gateway3DSAuthorisationResponse::ofException); }
Source:
<code>public KalturaLiveChannel get(String liveChannelId, int partnerId) throws KalturaApiException{ KalturaClient impersonateClient = impersonate(partnerId); KalturaLiveChannel liveEntry = impersonateClient.getLiveChannelService().get(liveChannelId); synchronized (entries) { <START> LiveEntryCache c = entries.get(liveEntry.id); <END> if (c == null) { entries.put(liveEntry.id, new LiveEntryCache(liveEntry)); } else { c.setLiveEntry(liveEntry); } addReferrer(liveEntry.id, this); } return liveEntry; }</code><technical_language>Move updateEntryCache KalturaLiveManager</technical_language>

Target:
public KalturaLiveChannel get(String liveChannelId, int partnerId) throws KalturaApiException{ KalturaClient impersonateClient = impersonate(partnerId); KalturaLiveChannel liveEntry = impersonateClient.getLiveChannelService().get(liveChannelId); synchronized (entries) { updateEntryCache(liveEntry); addReferrer(liveEntry.id, this); } return liveEntry; }
Source:
<code>public boolean isInstalled(@NotNull IDevice device, @NotNull File apk, @NotNull String pkgName) throws IOException { String serial = device.getSerialNumber(); Map<String, InstallState> cache = myCache.get(serial); if (cache == null) { return false; } InstallState state = cache.get(pkgName); if (state == null) { return false; } String lastUpdateTime = getLastUpdateTime(device, pkgName, <START> 500, TimeUnit.MILLISECONDS); <END> return lastUpdateTime != null && lastUpdateTime.equals(state.lastUpdateTime) && state.hash.equals(hash(apk)); }</code><technical_language>nit: move "500, TimeUnit.MILLISECONDS" function needed argument</technical_language>

Target:
public boolean isInstalled(@NotNull IDevice device, @NotNull File apk, @NotNull String pkgName) throws IOException { String serial = device.getSerialNumber(); Map<String, InstallState> cache = myCache.get(serial); if (cache == null) { return false; } InstallState state = cache.get(pkgName); if (state == null) { return false; } String lastUpdateTime = getLastUpdateTime(device, pkgName); return lastUpdateTime != null && lastUpdateTime.equals(state.lastUpdateTime) && state.hash.equals(hash(apk)); }
Source:
<code>public StreamCodec<T> getStreamCodec() { if (inputPort != null) { return inputPort.getStreamCodec(); <START> } else { <END> return null; } }</code><technical_language>else is redundant, write ternary operator</technical_language>

Target:
public StreamCodec<T> getStreamCodec() { return inputPort == null ? null : inputPort.getStreamCodec(); }
Source:
<code>public Account getAccount(@NonNull String username) throws RetroHttpException { final Account account = userService.getAccount(username); EventBus.getDefault().post(new AccountDataLoadedEvent(account)); PrefManager prefManager = new PrefManager(MainApplication.instance(), PrefManager.Pref.LOGIN); if (prefManager.getCurrentUserProfile() != null) { if (username.equals(prefManager.getCurrentUserProfile().username)) { prefManager.put(PrefManager.Key.PROFILE_IMAGE, gson.toJson(account.getProfileImage())); } <START> } <END> return account; }</code><technical_language>In order persisted profile image fields date, need update setProfileImage(), deleteProfileImage() methods, updateAccount() method well</technical_language>

Target:
public Account getAccount(@NonNull String username) throws HttpException { final Account account = userService.getAccount(username); EventBus.getDefault().post(new AccountDataLoadedEvent(account)); loginPrefs.setProfileImage(username, account.getProfileImage()); return account; }
Source:
<code>public Future<VdcReturnValueBase> executeAsyncCommand(final VdcActionType actionType, final VdcActionParametersBase parameters) { final CommandBase<?> command = CommandsFactory.createCommand(actionType, parameters); <START> command.persistCommand(command.getParameters().getParentCommand(), true); <END> return executor.submit(new Callable<VdcReturnValueBase>() { @Override public VdcReturnValueBase call() throws Exception { return executeCommand(command); } }); }</code><technical_language>if task is rejected next line, command stay in DB cleaning job clean it</technical_language>

Target:
public Future<VdcReturnValueBase> executeAsyncCommand(final VdcActionType actionType, final VdcActionParametersBase parameters) { final CommandBase<?> command = CommandsFactory.createCommand(actionType, parameters); command.persistCommand(command.getParameters().getParentCommand(), true); try { return executor.submit(new Callable<VdcReturnValueBase>() { @Override public VdcReturnValueBase call() throws Exception { return executeCommand(command); } }); } catch (RejectedExecutionException ex) { command.setCommandStatus(CommandStatus.REJECTED); cmdCallBackMap.put(command.getCommandId(), command.getCallBack() == null ? new CommandCallBack() : command.getCallBack()); return null; } }
Source:
<code>public void show(Activity activity) { super.show(activity); boolean success = false; try { String url = interaction.getUrl(); Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(url)); switch (interaction.getTarget()) { case New: intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); break; case Self: break; default: break; } activity.startActivity(intent); success = true; } catch (ActivityNotFoundException e) { Log.w("NavigateToLink Error: ", e); } finally { <START> String data = String.format("{\"url\":\"%s\",\"target\":\"%s\",\"success\":%b}", interaction.getUrl(), interaction.getTarget().lowercaseName(), success); <END> EngagementModule.engageInternal(activity, interaction, NavigateToLinkInteraction.EVENT_NAME_NAVIGATE, data); activity.finish(); } }</code><technical_language>do worry potentially in url needs escaping JSON</technical_language>

Target:
public void show(Activity activity) { super.show(activity); boolean success = false; try { String url = interaction.getUrl(); Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(url)); switch (interaction.getTarget()) { case New: intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); break; case Self: break; default: break; } activity.startActivity(intent); success = true; } catch (ActivityNotFoundException e) { Log.w("NavigateToLink Error: ", e); } finally { JSONObject data = new JSONObject(); try { data.put(NavigateToLinkInteraction.KEY_URL, interaction.getUrl()); data.put(NavigateToLinkInteraction.KEY_TARGET, interaction.getTarget().lowercaseName()); data.put(NavigateToLinkInteraction.EVENT_KEY_SUCCESS, success); } catch (JSONException e) { Log.e("Error creating Event data object.", e); } EngagementModule.engageInternal(activity, interaction, NavigateToLinkInteraction.EVENT_NAME_NAVIGATE, data.toString()); activity.finish(); } }
Source:
<code>public void read( ByteBuffer headerData ) { state = headerData.get(); if ( state == BYTE_FAILED ) { short messageLength = headerData.getShort(); byte[] failureMessageBytes = new byte[messageLength]; headerData.get( failureMessageBytes ); <START> failureMessage = new String( failureMessageBytes, Charset.forName( "UTF-8" ) ); <END> } }</code><technical_language>StandardCharsets.UTF_8</technical_language>

Target:
public void read( ByteBuffer headerData ) { state = headerData.get(); if ( state == BYTE_FAILED ) { short messageLength = headerData.getShort(); byte[] failureMessageBytes = new byte[messageLength]; headerData.get( failureMessageBytes ); failureMessage = new String( failureMessageBytes, StandardCharsets.UTF_8 ); } }
Source:
<code>public static PcapFile getPcapFile(Path filePath) throws IOException, BadPcapFileException { if (Files.notExists(filePath) || !Files.isRegularFile(filePath) || Files.size(filePath) < PcapFileValues.GLOBAL_HEADER_SIZE) { throw new BadPcapFileException("Bad Pcap File."); } if (!Files.isReadable(filePath)) { throw new BadPcapFileException("File is not readable."); } <START> try { <END> FileChannel fileChannel = (FileChannel) checkNotNull(Files.newByteChannel(filePath)); ByteBuffer header = ByteBuffer.allocate(PcapFileValues.PCAPNG_BLOCK_HEADER_SIZE); fileChannel.read(header); header.flip(); int blockType = header.getInt(); if (blockType == PcapFileValues.PCAPNG_SHB) { return new PcapNgFile(filePath); } return new PcapOldFile(filePath); } catch (IOException e) { e.printStackTrace(); return new PcapOldFile(filePath); } }</code><technical_language>try-with-resource block: try (FileChannel fileChannel = ...) { // resource } automatically close resource exiting block</technical_language>

Target:
public static PcapFile getPcapFile(Path filePath) throws IOException, BadPcapFileException { if (Files.notExists(filePath) || !Files.isRegularFile(filePath) || Files.size(filePath) < PcapFileValues.GLOBAL_HEADER_SIZE) { throw new BadPcapFileException("Bad Pcap File."); } if (!Files.isReadable(filePath)) { throw new BadPcapFileException("File is not readable."); } try (FileChannel fileChannel = (FileChannel) checkNotNull(Files.newByteChannel(filePath))) { ByteBuffer header = ByteBuffer.allocate(PcapNgFileValues.BLOCK_HEADER_SIZE); fileChannel.read(header); header.flip(); int blockType = header.getInt(); if (blockType == PcapNgFileValues.SHB) { return new PcapNgFile(filePath); } return new PcapOldFile(filePath); } }
Source:
<code>protected void commitPendingUploads( final JobContext context, final ActiveCommit pending) throws IOException { if (pending.isEmpty()) { LOG.warn("{}: No pending uploads to commit", getRole()); } try (DurationInfo ignored = new DurationInfo(LOG, "committing the output of %s task(s)", pending.size()); CommitOperations.CommitContext commitContext = initiateCommitOperation()) { <START> <END> Tasks.foreach(pending.getSourceFiles()) .stopOnFailure() .executeWith(buildThreadPool(context)) .onFailure((path, exception) -> loadAndAbort(commitContext, pending, path, true, false)) .abortWith(path -> loadAndAbort(commitContext, pending, path, true, false)) .revertWith(path -> loadAndRevert(commitContext, pending, path)) .run(path -> loadAndCommit(commitContext, pending, path)); } }</code><technical_language>CommitContext longer require close called? Tasks call handles of failure abort cases</technical_language>

Target:
protected void commitPendingUploads( final JobContext context, final ActiveCommit pending) throws IOException { if (pending.isEmpty()) { LOG.warn("{}: No pending uploads to commit", getRole()); } try (DurationInfo ignored = new DurationInfo(LOG, "committing the output of %s task(s)", pending.size()); CommitOperations.CommitContext commitContext = initiateCommitOperation()) { Tasks.foreach(pending.getSourceFiles()) .stopOnFailure() .suppressExceptions(false) .executeWith(buildThreadPool(context)) .abortWith(path -> loadAndAbort(commitContext, pending, path, true, false)) .revertWith(path -> loadAndRevert(commitContext, pending, path)) .run(path -> loadAndCommit(commitContext, pending, path)); } }
Source:
<code><START> private static File getCanonicalFile(final File file) { <END> try { return file.getCanonicalFile(); } catch (final IOException e) { return file.getAbsoluteFile(); } }</code><technical_language>is need hide methods in tests, reusing code more difficult discovery features in IDEs CTRL-space for method names</technical_language>

Target:
public static File getCanonicalFile(final File file) { try { return file.getCanonicalFile(); } catch (final IOException e) { return file.getAbsoluteFile(); } }
Source:
<code>public static void customizeHeader(JTableHeader header) { header.setOpaque(false); <START> header.setBackground(UIManager.getColor("ToolBar.background")); <END> header.setBorder(UIManager.getBorder("MenuBar.border")); }</code><technical_language>add a static import for UIManager methods reduce code verbosity</technical_language>

Target:
public static void customizeHeader(JTableHeader header) { header.setOpaque(false); header.setBackground(getColor("ToolBar.background")); header.setBorder(getBorder("MenuBar.border")); }
Source:
<code>public AdHocPlannedStmtBatch( AdHocPlannerWork work, List<AdHocPlannedStatement> stmts, int partitionParamIndex, VoltType partitionParamType, Object partitionParamValue, String errors) { this.work = work; this.clientHandle = work.clientHandle; this.connectionId = work.connectionId; this.hostname = (work.clientData == null) ? "" : ((Connection)work.clientData).getHostnameAndIPAndPort(); this.adminConnection = work.adminConnection; this.clientData = work.clientData; this.plannedStatements = stmts; boolean allReadOnly = true; for (AdHocPlannedStatement plannedStmt : stmts) { if (!plannedStmt.core.readOnly) { allReadOnly = false; break; } } this.readOnly = allReadOnly; <START> boolean highVolume = false; <END> for (AdHocPlannedStatement plannedStmt : stmts) { if (plannedStmt.core.highVolume) { highVolume = true; break; } } this.highVolume = highVolume; this.partitionParamIndex = partitionParamIndex; this.partitionParamType = partitionParamType; this.partitionParamValue = partitionParamValue; this.errorMsg = errors; }</code><technical_language>me, defining a local name a member is asking for trouble. a lesser degree, is m_ prefix convention -- some of enjoy life edge</technical_language>

Target:
public AdHocPlannedStmtBatch( AdHocPlannerWork work, List<AdHocPlannedStatement> stmts, int partitionParamIndex, VoltType partitionParamType, Object partitionParamValue, String errors) { this.work = work; this.clientHandle = work.clientHandle; this.connectionId = work.connectionId; this.hostname = (work.clientData == null) ? "" : ((Connection)work.clientData).getHostnameAndIPAndPort(); this.adminConnection = work.adminConnection; this.clientData = work.clientData; this.plannedStatements = stmts; boolean allReadOnly = true; for (AdHocPlannedStatement plannedStmt : stmts) { if (!plannedStmt.core.readOnly) { allReadOnly = false; break; } } this.readOnly = allReadOnly; boolean anyHighVolume = false; for (AdHocPlannedStatement plannedStmt : stmts) { if (plannedStmt.core.highVolume) { anyHighVolume = true; break; } } this.highVolume = anyHighVolume; this.partitionParamIndex = partitionParamIndex; this.partitionParamType = partitionParamType; this.partitionParamValue = partitionParamValue; this.errorMsg = errors; }
Source:
<code>public List<JsonObject> findDocuments(String query, String sort, Integer offset, Integer size) throws DataException { SearchRestClient restClient = initiateRestClient(); List<JsonObject> searchResults = new ArrayList<>(); String response = restClient.getDocument(query, sort, offset, size); <START> JsonReader jsonReader = Json.createReader(new StringReader(response)); <END> JsonObject jsonObject = jsonReader.readObject(); if (jsonObject.containsKey("hits")) { JsonObject hits = jsonObject.getJsonObject("hits"); JsonArray inHits = hits.getJsonArray("hits"); if (!inHits.isEmpty()) { for (Object hit : inHits) { searchResults.add((JsonObject) hit); } } } else { searchResults.add(jsonObject); } return searchResults; }</code><technical_language>here. JsonReader is closeable a try-with-resources statement for closing object is a good idea</technical_language>

Target:
public List<JsonObject> findDocuments(String query, String sort, Integer offset, Integer size) throws DataException { SearchRestClient restClient = initiateRestClient(); List<JsonObject> searchResults = new ArrayList<>(); String response = restClient.getDocument(query, sort, offset, size); try (JsonReader jsonReader = Json.createReader(new StringReader(response))) { JsonObject jsonObject = jsonReader.readObject(); if (jsonObject.containsKey("hits")) { JsonObject hits = jsonObject.getJsonObject("hits"); JsonArray inHits = hits.getJsonArray("hits"); if (!inHits.isEmpty()) { for (Object hit : inHits) { searchResults.add((JsonObject) hit); } } } else { searchResults.add(jsonObject); } } return searchResults; }
Source:
<code>protected Map<Address, Float> unionCapacityFactors(AbstractConsistentHash ch2) { Map<Address, Float> unionCapacityFactors = null; if (this.capacityFactors != null || ch2.capacityFactors != null) { <START> unionCapacityFactors = new HashMap<Address, Float>(); <END> if (this.capacityFactors != null) { unionCapacityFactors.putAll(this.getCapacityFactors()); } else { for (Address node : this.members) { unionCapacityFactors.put(node, 1.0f); } } if (ch2.capacityFactors != null) { unionCapacityFactors.putAll(ch2.getCapacityFactors()); } else { for (Address node : ch2.members) { unionCapacityFactors.put(node, 1.0f); } } } return unionCapacityFactors; }</code><technical_language>explicit type replaced <></technical_language>

Target:
protected Map<Address, Float> unionCapacityFactors(AbstractConsistentHash ch2) { Map<Address, Float> unionCapacityFactors = null; if (this.capacityFactors != null || ch2.capacityFactors != null) { unionCapacityFactors = new HashMap<>(); if (this.capacityFactors != null) { unionCapacityFactors.putAll(this.getCapacityFactors()); } else { for (Address node : this.members) { unionCapacityFactors.put(node, 1.0f); } } if (ch2.capacityFactors != null) { unionCapacityFactors.putAll(ch2.getCapacityFactors()); } else { for (Address node : ch2.members) { unionCapacityFactors.put(node, 1.0f); } } } return unionCapacityFactors; }
Source:
<code>private void setListCommentsPerPatchSet(GerritRepository gerritRepository, String changeId, String revisionId) { Iterator<DisplayFileInfo> displayFile = fFilesDisplay.values().iterator(); Map<String, ArrayList<CommentInfo>> mapCommentInfo = queryComments(gerritRepository, changeId, revisionId, new NullProgressMonitor()); while (displayFile.hasNext()) { DisplayFileInfo displayFileInfo = displayFile.next(); Iterator<Map.Entry<String, ArrayList<CommentInfo>>> commentIter = mapCommentInfo.entrySet().iterator(); while (commentIter.hasNext()) { Entry<String, ArrayList<CommentInfo>> entryComment = commentIter.next(); System.out.println("Comments files: " + entryComment.getKey()); System.out.println("Count comment: " + entryComment.getValue().size()); if (displayFileInfo.getold_path().equals(entryComment.getKey())) { displayFileInfo.setComments(entryComment.getValue()); break; } } } <START> System.err.println("setListCommentsPerPatchSet <END> return"); }</code><technical_language>remove log</technical_language>

Target:
private void setListCommentsPerPatchSet(GerritRepository gerritRepository, String changeId, String revisionId) { Iterator<DisplayFileInfo> displayFile = fFilesDisplay.values().iterator(); Map<String, ArrayList<CommentInfo>> mapCommentInfo = queryComments(gerritRepository, changeId, revisionId, new NullProgressMonitor()); while (displayFile.hasNext()) { DisplayFileInfo displayFileInfo = displayFile.next(); Iterator<Map.Entry<String, ArrayList<CommentInfo>>> commentIter = mapCommentInfo.entrySet().iterator(); while (commentIter.hasNext()) { Entry<String, ArrayList<CommentInfo>> entryComment = commentIter.next(); if (displayFileInfo.getold_path().equals(entryComment.getKey())) { displayFileInfo.setComments(entryComment.getValue()); break; } } } }
Source:
<code>public static InventoryCrafting toNativeInventory(GridInventory inv) { Fabric<IInventory> fabric = ((GridInventoryAdapter) inv).getInventory(); Iterator<IInventory> inventories = fabric.allInventories().iterator(); InventoryCrafting inventoryCrafting = (InventoryCrafting) inventories.next(); <START> if(inventories.hasNext()) <END> throw new IllegalStateException("Another inventory found: " + inventories.next()); return inventoryCrafting; }</code><technical_language>if ( missing braces</technical_language>

Target:
public static InventoryCrafting toNativeInventory(GridInventory inv) { Fabric<IInventory> fabric = ((GridInventoryAdapter) inv).getInventory(); Iterator<IInventory> inventories = fabric.allInventories().iterator(); InventoryCrafting inventoryCrafting = (InventoryCrafting) inventories.next(); if (inventories.hasNext()) { throw new IllegalStateException("Another inventory found: " + inventories.next()); } return inventoryCrafting; }
Source:
<code>public void testTimeouts() { List list = new ArrayList<>(); for (int i = 0; i < 15; i++) { <START> list.add(i); <END> } queue.take(10, 10); queue.offer(list, 10); }</code><technical_language>IntStream.range()</technical_language>

Target:
public void testTimeouts() throws InterruptedException { List list = new ArrayList(); IntStream.range(0, 15).forEach(t -> list.add(t)); queue.offer(list, 10); queue.offer(list, 10); }
Source:
<code>public String space(ParsedCommand cmd) { UserContext uc = cliContext.userContext; <START> Long spaceUsed = uc.getTotalSpaceUsed(uc.signer.publicKeyHash, uc.signer.publicKeyHash).join(); <END> return "Total space used "+ spaceUsed; }</code><technical_language>do this in constant time context.getSpaceUsage()</technical_language>

Target:
public String space(ParsedCommand cmd) { UserContext uc = cliContext.userContext; long spaceUsed = uc.getSpaceUsage().join(); long spaceMB = spaceUsed / 1024 / 1024; return "Total space used: " + spaceMB + " MiB."; }
Source:
<code>public void testSalesforceInputPropertiesMigration() throws IOException { Deserialized<TSalesforceInputProperties> deser = Properties.Helper.fromSerializedPersistent( TestUtils.getResourceAsString(getClass(), "tSalesforceInputProperties_621.json"), TSalesforceInputProperties.class); <START> assertTrue("should be true, but not", deser.migrated); <END> TSalesforceInputProperties properties = deser.object; String apiVersion = properties.connection.apiVersion.getValue(); assertEquals("\"34.0\"", apiVersion); }</code><technical_language>Label "should true, not" meaningful</technical_language>

Target:
public void testSalesforceInputPropertiesMigration() throws IOException { Deserialized<TSalesforceInputProperties> deser = Properties.Helper.fromSerializedPersistent( TestUtils.getResourceAsString(getClass(), "tSalesforceInputProperties_621.json"), TSalesforceInputProperties.class); assertTrue("the property should be migrated, the migration returned false instead of true", deser.migrated); TSalesforceInputProperties properties = deser.object; String apiVersion = properties.connection.apiVersion.getValue(); assertEquals("\"34.0\"", apiVersion); }
Source:
<code>protected boolean isLinkUrlValidForGroupCode(AccountingXmlDocumentBackupLink accountingXmlDocumentBackupLink, Collection<WebServiceCredential> credentials) { if (CollectionUtils.isEmpty(credentials)) { <START> LOG.debug("isLinkUrlValidForGroupCode, no credential values for group code, so is invalid"); <END> return false; } else { for (WebServiceCredential cred : credentials) { if (isCredentialUsedForValidatingBackupLinkURL(cred) && isCredentialBaseURLInBackupLinkURL(accountingXmlDocumentBackupLink, cred)) { LOG.debug("isLinkUrlValidForGroupCode, found a CREDENTIAL_BASE_URL in the credentials table that is in the back up link URL"); return true; } } } return false; }</code><technical_language>this a LOG.error</technical_language>

Target:
protected boolean isLinkUrlValidForGroupCode(AccountingXmlDocumentBackupLink accountingXmlDocumentBackupLink, Collection<WebServiceCredential> credentials) { if (CollectionUtils.isEmpty(credentials)) { LOG.error("isLinkUrlValidForGroupCode, no credential values for group code, so link is invalid"); return false; } else { for (WebServiceCredential cred : credentials) { if (isCredentialUsedForValidatingBackupLinkURL(cred) && isCredentialBaseURLInBackupLinkURL(accountingXmlDocumentBackupLink, cred)) { LOG.debug("isLinkUrlValidForGroupCode, found a CREDENTIAL_BASE_URL in the credentials table that is in the back up link URL"); return true; } } } return false; }
Source:
<code>public String convertToDatabaseColumn(LocalDate attribute) { String retVal = (attribute == null) ? null : Base64.getEncoder().encodeToString(SecretKeyUtil.encryptDate(attribute)); if (retVal == null) { <START> throw new IllegalStateException("YD-441: lastStatusChangeTime cannot be null. Input value: " + attribute); <END> } return retVal; }</code><technical_language>This exception message wrong..</technical_language>

Target:
public String convertToDatabaseColumn(LocalDate attribute) { return (attribute == null) ? null : Base64.getEncoder().encodeToString(SecretKeyUtil.encryptDate(attribute)); }
Source:
<code>private static String getServerInstanceURI(int port) throws Exception { <START> return ServerUtils.getHostAddress(null).getHostAddress() + ":" + port; <END> }</code><technical_language>raw ip address a good of it, in case is dual network card etc. a fqdn names a config get address provide in zookeeper discover url for this hms. code HMS binds * for</technical_language>

Target:
private static String getServerInstanceURI(int port) throws Exception { String hostName; if (msHost != null && !msHost.trim().isEmpty()) { hostName = msHost; } else { hostName = InetAddress.getLocalHost().getHostName(); } return hostName + ":" + port; }
Source:
<code>private char complement(char nt) { switch (nt) { case 'A': return 'T'; case 'C': return 'G'; case 'G': return 'C'; case 'T': case 'U': <START> return 'C'; <END> case 'R': return 'Y'; case 'Y': return 'R'; case 'S': return 'S'; case 'W': return 'W'; case 'K': return 'M'; case 'M': return 'K'; case 'B': return 'V'; case 'D': return 'H'; case 'H':// ACT return 'D'; case 'V':// ACG return 'B'; case 'N': return 'N'; default: return nt; } }</code><technical_language>return 'A'</technical_language>

Target:
private char complement(char nt) { switch (nt) { case 'A': return 'T'; case 'C': return 'G'; case 'G': return 'C'; case 'T': case 'U': return 'A'; case 'R': return 'Y'; case 'Y': return 'R'; case 'S': return 'S'; case 'W': return 'W'; case 'K': return 'M'; case 'M': return 'K'; case 'B': return 'V'; case 'D': return 'H'; case 'H':// ACT return 'D'; case 'V':// ACG return 'B'; case 'N': return 'N'; default: return nt; } }
Source:
<code><START> public Date getLastPollTime() { <END> return lastPollTime; }</code><technical_language>used, needed</technical_language>

Target:
public long getLastPollTime() { return lastPollTime; }
Source:
<code>public boolean tryFastMoveTo(VirtualFile newParent) { try { if (moveHandler == null) { <START> return false; <END> } return moveHandler.apply(this, newParent); } catch (Exception e) { throw handleErrorInCallback(e, "moveHandler"); } }</code><technical_language>I inverting this if check improve readability/flow woudl consistent other methods in this class</technical_language>

Target:
public boolean tryFastMoveTo(VirtualFile newParent) { try { if (!canFastMove()) { return false; } return moveHandler.apply(this, newParent); } catch (Exception e) { throw handleErrorInCallback(e, "moveHandler"); } }