auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
private void markAllBelowAsUnread() { if (listView.getSelectedIndex() >= 0) { for (int i = listView.getSelectedIndex(); i < listView.getItems().size(); i++){ TurboIssue issue = listView.getItems().get(i).getIssue(); issue.markAsUnread(UI.prefs); } parentPanelControl.refresh(); } }

Target:
private void markAllBelowAsUnread() { Optional<GuiElement> item = listView.getSelectedItem(); if (item.isPresent()) { for(int i = listView.getSelectedIndex(); i < listView.getItems().size(); i++){ TurboIssue issue = listView.getItems().get(i).getIssue(); issue.markAsUnread(UI.prefs); } parentPanelControl.refresh(); } }
Source:
public void teardown() { super.teardown(); windowDataManager.teardown(); }

Target:
public void teardown() { windowDataManager.teardown(); }
Source:
public Optional<ConnectorPartitioningHandle> getCommonPartitioningHandle(ConnectorSession session, ConnectorPartitioningHandle left, ConnectorPartitioningHandle right) { HivePartitioningHandle leftHandle = (HivePartitioningHandle) left; HivePartitioningHandle rightHandle = (HivePartitioningHandle) right; if (!leftHandle.getHiveTypes().equals(rightHandle.getHiveTypes())) { return Optional.empty(); } if (!isOptimizedMismatchedBucketCount(session) && leftHandle.getBucketCount() != rightHandle.getBucketCount()) { } int largerBucketCount = Math.max(leftHandle.getBucketCount(), rightHandle.getBucketCount()); int smallerBucketCount = Math.min(leftHandle.getBucketCount(), rightHandle.getBucketCount()); if (largerBucketCount % smallerBucketCount != 0) { return Optional.empty(); } if (Integer.bitCount(largerBucketCount / smallerBucketCount) != 1) { return Optional.empty(); } OptionalInt maxCompatibleBucketCount = min(leftHandle.getMaxCompatibleBucketCount(), rightHandle.getMaxCompatibleBucketCount()); if (maxCompatibleBucketCount.isPresent() && maxCompatibleBucketCount.getAsInt() < smallerBucketCount) { return Optional.empty(); } return Optional.of(new HivePartitioningHandle( smallerBucketCount, leftHandle.getHiveTypes(), maxCompatibleBucketCount)); }

Target:
public Optional<ConnectorPartitioningHandle> getCommonPartitioningHandle(ConnectorSession session, ConnectorPartitioningHandle left, ConnectorPartitioningHandle right) { HivePartitioningHandle leftHandle = (HivePartitioningHandle) left; HivePartitioningHandle rightHandle = (HivePartitioningHandle) right; if (!leftHandle.getHiveTypes().equals(rightHandle.getHiveTypes())) { return Optional.empty(); } if (leftHandle.getBucketCount() == rightHandle.getBucketCount()) { return Optional.of(leftHandle); } if (!isOptimizedMismatchedBucketCount(session)) { return Optional.empty(); } int largerBucketCount = Math.max(leftHandle.getBucketCount(), rightHandle.getBucketCount()); int smallerBucketCount = Math.min(leftHandle.getBucketCount(), rightHandle.getBucketCount()); if (largerBucketCount % smallerBucketCount != 0) { return Optional.empty(); } if (Integer.bitCount(largerBucketCount / smallerBucketCount) != 1) { return Optional.empty(); } OptionalInt maxCompatibleBucketCount = min(leftHandle.getMaxCompatibleBucketCount(), rightHandle.getMaxCompatibleBucketCount()); if (maxCompatibleBucketCount.isPresent() && maxCompatibleBucketCount.getAsInt() < smallerBucketCount) { return Optional.empty(); } return Optional.of(new HivePartitioningHandle( smallerBucketCount, leftHandle.getHiveTypes(), maxCompatibleBucketCount)); }
Source:
private void validateNotRemovingGlusterBrickNetworks() { for (String network : removedNetworks) { Network removedNetwork = getExistingClusterNetworks().get(network); if (removedNetwork == null || removedNetwork.getCluster() == null || !removedNetwork.getCluster().isGluster()) { continue; } List<GlusterBrickEntity> bricks = getDbFacade().getGlusterBrickDao().getAllByClusterAndNetworkId(vds.getVdsGroupId(), removedNetwork.getId()); if (!bricks.isEmpty()) { addViolation(VdcBllMessages.ACTION_TYPE_FAILED_CANNOT_REMOVE_NETWORK_FROM_BRICK, network); } } }

Target:
private void validateNotRemovingGlusterBrickNetworks() { for (String network : removedNetworks) { Network removedNetwork = getExistingClusterNetworks().get(network); if (removedNetwork == null || !removedNetwork.getCluster().isGluster()) { continue; } List<GlusterBrickEntity> bricks = getDbFacade().getGlusterBrickDao().getAllByClusterAndNetworkId(vds.getVdsGroupId(), removedNetwork.getId()); if (!bricks.isEmpty()) { addViolation(VdcBllMessages.ACTION_TYPE_FAILED_CANNOT_REMOVE_NETWORK_FROM_BRICK, network); } } }
Source:
public DaysOfMonthSelector() { selectedItems = initSelectionList(); initWidget(wrapperPanel); daysOfMonth.setBorderWidth(2); showDaysOfMonth(); daysOfMonth.addClickHandler(new ClickHandler() { @Override public void onClick(ClickEvent event) { Cell cellClicked = daysOfMonth.getCellForEvent(event); int cellColumn = cellClicked.getCellIndex(); int cellRow = cellClicked.getRowIndex(); int actualCellIndex = cellRow * DAYS_IN_WEEK + cellColumn + 1; if (!clickedMap.get(actualCellIndex)) { selectedItems.add(Integer.toString(actualCellIndex)); } else { selectedItems.remove(Integer.toString(actualCellIndex)); } } }); }

Target:
public DaysOfMonthSelector() { selectedItems = initSelectionList(); initWidget(wrapperPanel); daysOfMonth.setStyleName("daysOfMonthWidget"); showDaysOfMonth(); daysOfMonth.addClickHandler(new ClickHandler() { @Override public void onClick(ClickEvent event) { Cell cellClicked = daysOfMonth.getCellForEvent(event); int cellColumn = cellClicked.getCellIndex(); int cellRow = cellClicked.getRowIndex(); int actualCellIndex = cellRow * DAYS_IN_WEEK + cellColumn + 1; if (!clickedMap.get(actualCellIndex)) { selectedItems.add(Integer.toString(actualCellIndex)); } else { selectedItems.remove(Integer.toString(actualCellIndex)); } } }); }
Source:
private void downloadDir(String bucketName, String keyPrefix, String dirPath, boolean pause, AmazonS3 s3Client) { getOut().println("downloading to directory: " + dirPath + (pause ? " (pause)" : "")); TransferManager transferManager = TransferManagerBuilder.standard().withS3Client(s3Client).build(); try { MultipleFileDownload xfer = transferManager.downloadDirectory(bucketName, keyPrefix, new File(dirPath)); SchedulerExamplesUtils.showTransferProgress(xfer); SchedulerExamplesUtils.waitForCompletion(xfer); } catch (AmazonServiceException e) { getErr().println(e.getMessage()); System.exit(1); } transferManager.shutdownNow(); }

Target:
private void downloadDir(String bucketName, String keyPrefix, String dirPath, boolean pause, AmazonS3 s3Client) { getOut().println("downloading to directory: " + dirPath + (pause ? " (pause)" : "")); TransferManager transferManager = TransferManagerBuilder.standard().withS3Client(s3Client).build(); try { MultipleFileDownload xfer = transferManager.downloadDirectory(bucketName, keyPrefix, new File(dirPath)); SchedulerExamplesUtils.showTransferProgress(xfer); SchedulerExamplesUtils.waitForCompletion(xfer); } catch (AmazonServiceException e) { getErr().println(e.getMessage()); System.exit(1); } finally { transferManager.shutdownNow(); } }
Source:
public double referencePrice(IborFutureTrade trade, LocalDate valuationDate, double lastMarginPrice) { ArgChecker.notNull(valuationDate, "valuation date"); Optional<LocalDate> tradeDate = trade.getTradeInfo().getTradeDate(); ArgChecker.isTrue(tradeDate.isPresent(), "trade date should be populated"); double referencePrice; if (tradeDate.get().equals(valuationDate)) { referencePrice = trade.getInitialPrice(); } else { referencePrice = lastMarginPrice; } return referencePrice; }

Target:
public double referencePrice(IborFutureTrade trade, LocalDate valuationDate, double lastMarginPrice) { ArgChecker.notNull(valuationDate, "valuation date"); LocalDate tradeDate = trade.getTradeInfo().getTradeDate() .orElseThrow(() -> new IllegalArgumentException("Trade date should be populated")); return (tradeDate.equals(valuationDate) ? trade.getInitialPrice() : lastMarginPrice); }
Source:
public static double getHoursSpentStateTotal(IAtsObject atsObject) throws OseeCoreException { if (atsObject instanceof IAtsAction) { double hours = 0; for (IAtsTeamWorkflow team : AtsCore.getWorkItemService().getTeams((IAtsAction) atsObject)) { if (!AtsCore.getWorkItemService().getWorkData(team).isCancelled()) { hours += getHoursSpentStateTotal(team); } } return hours; } if (atsObject instanceof IAtsWorkItem) { IAtsWorkItem workItem = (IAtsWorkItem) atsObject; return getHoursSpentStateTotal(workItem, AtsCore.getWorkItemService().getCurrentState(workItem)); } return 0; }

Target:
public static double getHoursSpentStateTotal(IAtsObject atsObject) throws OseeCoreException { double hours = 0.0; if (atsObject instanceof IAtsAction) { for (IAtsTeamWorkflow team : AtsCore.getWorkItemService().getTeams((IAtsAction) atsObject)) { if (!AtsCore.getWorkItemService().getWorkData(team).isCancelled()) { hours += getHoursSpentStateTotal(team); } } } else if (atsObject instanceof IAtsWorkItem) { IAtsWorkItem workItem = (IAtsWorkItem) atsObject; hours = getHoursSpentStateTotal(workItem, AtsCore.getWorkItemService().getCurrentState(workItem)); } return hours; }
Source:
public IFileRevision[] getContributors(IProgressMonitor monitor) { if (null == svnRemResource) { return null; } SVNRevision firstRevision = new SVNRevision.Number(1L); SVNRevision.Number previousRevision = new SVNRevision.Number(svnRemResource.getLastChangedRevision() .getNumber()); GetLogsCommand logCmd = new GetLogsCommand(svnRemResource, null, previousRevision, firstRevision, false, 2L, null, true); try { logCmd.run(monitor); } catch (SVNException e) { return null; } final ILogEntry[] entries = logCmd.getLogEntries(); if (entries.length < 2) { return null; } final ISVNRemoteResource remoteResource = entries[entries.length - 1].getRemoteResource(); final IFileRevision[] contributors = new IFileRevision[1]; contributors[0] = new FileRevision() { public IFileRevision withAllProperties(IProgressMonitor monitor) throws CoreException { return this; } public boolean isPropertyMissing() { return false; } public IStorage getStorage(IProgressMonitor monitor) throws CoreException { if (null != remoteResource) { return remoteResource.getStorage(monitor); } return null; } @Override public String getContentIdentifier() { if (null != remoteResource) { return remoteResource.getLastChangedRevision().toString(); } return null; } public String getName() { return remoteResource.getName(); } }; return contributors; }

Target:
public IFileRevision[] getContributors(IProgressMonitor monitor) { if (null == svnRemResource) { return null; } SVNRevision firstRevision = new SVNRevision.Number(1L); SVNRevision.Number previousRevision = new SVNRevision.Number(Long.parseLong(getId())); GetLogsCommand logCmd = new GetLogsCommand(svnRemResource, null, previousRevision, firstRevision, false, 2L, null, true); try { logCmd.run(monitor); } catch (SVNException e) { return null; } final ILogEntry[] entries = logCmd.getLogEntries(); if (entries.length < 2) { return null; } final ISVNRemoteResource remoteResource = entries[entries.length - 1].getRemoteResource(); final IFileRevision[] contributors = new IFileRevision[1]; contributors[0] = new FileRevision() { public IFileRevision withAllProperties(IProgressMonitor monitor) throws CoreException { return this; } public boolean isPropertyMissing() { return false; } public IStorage getStorage(IProgressMonitor monitor) throws CoreException { if (null != remoteResource) { return remoteResource.getStorage(monitor); } return null; } @Override public String getContentIdentifier() { if (null != remoteResource) { return remoteResource.getLastChangedRevision().toString(); } return null; } public String getName() { return remoteResource.getName(); } }; return contributors; }
Source:
public void loadFileContents_fromEmptyFile_emptyString() { createEmptyTestFile(); try { assertEquals("", FileHelper.loadFileContents(TEST_FOLDER, TEST_FILE_NAME)); } catch (IOException e) { fail(e.toString()); } }

Target:
public void loadFileContents_fromEmptyFile_emptyString() throws IOException { createEmptyTestFile(); assertEquals("", FileHelper.getFileContents(TEST_FOLDER, TEST_FILE_NAME)); }
Source:
public void testQuotedColumnNames() { String message = "message IntMessage {" + " required int32 `foo bar`;" + " required int32 `foo.bar`;" + " required int32 `foo``bar`;" + " required int64 `foo@#$bar`;" + "}\n"; MessageType parsed = MessageTypeParser.parseMessageType(message); MessageType expected = Types.buildMessage() .required(INT32).as(INT_8).named("foo bar") .required(INT32).as(INT_16).named("foo.bar") .required(INT32).as(INT_32).named("foo`bar") .required(INT64).as(INT_64).named("foo@#$bar") .named("IntMessage"); assertEquals(expected, parsed); MessageType reparsed = MessageTypeParser.parseMessageType(parsed.toString()); assertEquals(expected, reparsed); }

Target:
public void testQuotedColumnNames() { String message = "message IntMessage {" + " required int32 `foo bar`;" + " required int32 foo.bar;" + " required int32 `foo``bar`;" + " required int64 foo@#$bar;" + "}\n"; MessageType parsed = MessageTypeParser.parseMessageType(message); MessageType expected = Types.buildMessage() .required(INT32).as(INT_8).named("foo bar") .required(INT32).as(INT_16).named("foo.bar") .required(INT32).as(INT_32).named("foo`bar") .required(INT64).as(INT_64).named("foo@#$bar") .named("IntMessage"); assertEquals(expected, parsed); MessageType reparsed = MessageTypeParser.parseMessageType(parsed.toString()); assertEquals(expected, reparsed); }
Source:
public String getPercentageString() { return dataFormat.format(getPercentageFloat()); }

Target:
public String getPercentageString() { float floatPercentage = getPercentageFloat(); if (Float.compare(floatPercentage, 99.995f) >= 0) { return roundDownDataFormat.format(floatPercentage); } else { return dataFormat.format(floatPercentage); } }
Source:
public void onBlockCompletion(ExportRow row) throws RestartBlockException { if (m_ctx.invokes > 0) { try { m_ctx.m_done.tryAcquire(m_ctx.invokes, ACQUIRE_TIMEOUT_MS,TimeUnit.MILLISECONDS); } catch (InterruptedException e) { throw new LoopbackExportException("failed to wait for block callback", e); } } m_restarted = !m_ctx.m_rq.isEmpty(); if (m_restarted) { m_failed = new BitSet(m_ctx.recs); m_resubmit = new BitSet(m_ctx.recs); Reject rj = m_ctx.m_rq.poll(); while (rj != null) { m_failed.set(rj.bix); if (rj.status == ClientResponse.RESPONSE_UNKNOWN) { m_resubmit.set(rj.bix); } rj = m_ctx.m_rq.poll(); } throw new RestartBlockException(true); } else { m_failed = new BitSet(m_ctx.recs); m_resubmit = new BitSet(m_ctx.recs); } }

Target:
public void onBlockCompletion(ExportRow row) throws RestartBlockException { synchronized (this) { if (m_ctx.m_outstandingTransactions.get() > 0 && !m_isShutDown) { try { wait(); } catch (InterruptedException e) { throw new LoopbackExportException("failed to wait for block callback", e); } } } if (m_isShutDown) { return; } m_restarted = !m_ctx.m_rq.isEmpty(); if (m_restarted) { m_failed = new BitSet(m_ctx.recs); m_resubmit = new BitSet(m_ctx.recs); Reject rj = m_ctx.m_rq.poll(); while (rj != null) { m_failed.set(rj.bix); if (rj.status == ClientResponse.RESPONSE_UNKNOWN) { m_resubmit.set(rj.bix); } rj = m_ctx.m_rq.poll(); } throw new RestartBlockException(true); } else { m_failed = new BitSet(m_ctx.recs); m_resubmit = new BitSet(m_ctx.recs); } }
Source:
public void setPortParameters(int baudRate, int dataBits, int stopBits, int parity, int flowControl) throws OperationNotSupportedException { parameters = new SerialPortParameters(baudRate, dataBits, stopBits, parity, flowControl); if (serialPort != null) { try { serialPort.setSerialPortParams(baudRate, dataBits, stopBits, parity); serialPort.setFlowControlMode(flowControl); } catch (UnsupportedCommOperationException e) { throw new OperationNotSupportedException(e.getMessage()); } } }

Target:
public void setPortParameters(int baudRate, int dataBits, int stopBits, int parity, int flowControl) throws InvalidConfigurationException { parameters = new SerialPortParameters(baudRate, dataBits, stopBits, parity, flowControl); if (serialPort != null) { try { serialPort.setSerialPortParams(baudRate, dataBits, stopBits, parity); serialPort.setFlowControlMode(flowControl); } catch (UnsupportedCommOperationException e) { throw new InvalidConfigurationException(e.getMessage(), e); } } }
Source:
public long getEntityOwnerId() { Long volumeId = getVolumeId(); Long snapshotId = getSnapshotId(); Long accountId = null; if (volumeId != null) { Volume volume = _entityMgr.findById(Volume.class, volumeId); if (volume != null) { _accountService.checkAccess(CallContext.current().getCallingAccount(), SecurityChecker.AccessType.UseEntry, false, volume); } else { throw new InvalidParameterValueException("Unable to find volume by id=" + volumeId); } } else { Snapshot snapshot = _entityMgr.findById(Snapshot.class, snapshotId); if (snapshot != null) { _accountService.checkAccess(CallContext.current().getCallingAccount(), SecurityChecker.AccessType.UseEntry, false, snapshot); } else { throw new InvalidParameterValueException("Unable to find snapshot by id=" + snapshotId); } } if(projectId != null){ final Project project = _projectService.getProject(projectId); if (project != null) { if (project.getState() == Project.State.Active) { Account projectAccount= _accountService.getAccount(project.getProjectAccountId()); _accountService.checkAccess(CallContext.current().getCallingAccount(), SecurityChecker.AccessType.UseEntry, false, projectAccount); return project.getProjectAccountId(); } else { final PermissionDeniedException ex = new PermissionDeniedException("Can't add resources to the project with specified projectId in state=" + project.getState() + " as it's no longer active"); ex.addProxyObject(project.getUuid(), "projectId"); throw ex; } } else { throw new InvalidParameterValueException("Unable to find project by id"); } } return CallContext.current().getCallingAccount().getId(); }

Target:
public long getEntityOwnerId() { Long volumeId = getVolumeId(); Long snapshotId = getSnapshotId(); Account callingAccount = CallContext.current().getCallingAccount(); if (volumeId != null) { Volume volume = _entityMgr.findById(Volume.class, volumeId); if (volume != null) { _accountService.checkAccess(callingAccount, SecurityChecker.AccessType.UseEntry, false, volume); } else { throw new InvalidParameterValueException("Unable to find volume by id=" + volumeId); } } else { Snapshot snapshot = _entityMgr.findById(Snapshot.class, snapshotId); if (snapshot != null) { _accountService.checkAccess(callingAccount, SecurityChecker.AccessType.UseEntry, false, snapshot); } else { throw new InvalidParameterValueException("Unable to find snapshot by id=" + snapshotId); } } if(projectId != null){ final Project project = _projectService.getProject(projectId); if (project != null) { if (project.getState() == Project.State.Active) { Account projectAccount= _accountService.getAccount(project.getProjectAccountId()); _accountService.checkAccess(callingAccount, SecurityChecker.AccessType.UseEntry, false, projectAccount); return project.getProjectAccountId(); } else { final PermissionDeniedException ex = new PermissionDeniedException("Can't add resources to the project with specified projectId in state=" + project.getState() + " as it's no longer active"); ex.addProxyObject(project.getUuid(), "projectId"); throw ex; } } else { throw new InvalidParameterValueException("Unable to find project by id"); } } return callingAccount.getId(); }
Source:
public Principal validate(String sessionId) { Principal principal = null; VdcQueryParametersBase params = new VdcQueryParametersBase(); params.setSessionId(sessionId); VdcQueryReturnValue queryReturnValue = backend.RunPublicQuery(VdcQueryType.ValidateSession, params); if (queryReturnValue != null) { VdcUser vdcUser = (VdcUser) queryReturnValue.getReturnValue(); if (vdcUser != null) { principal = new Principal(vdcUser.getUserName(), null, vdcUser.getDomainControler()); sessionHelper.setSessionId(sessionId); current.set(vdcUser); } } if (principal != null) { validateSessionSucceeded(queryReturnValue); } else { validateSessionFailed(queryReturnValue); } return principal; }

Target:
public Principal validate(String sessionId) { Principal principal = null; VdcQueryParametersBase params = new VdcQueryParametersBase(); params.setSessionId(sessionId); VdcQueryReturnValue queryReturnValue = backend.RunPublicQuery(VdcQueryType.ValidateSession, params); if (queryReturnValue != null) { VdcUser vdcUser = queryReturnValue.getReturnValue(); if (vdcUser != null) { principal = new Principal(vdcUser.getUserName(), null, vdcUser.getDomainControler()); sessionHelper.setSessionId(sessionId); current.set(vdcUser); } } if (principal != null) { validateSessionSucceeded(queryReturnValue); } else { validateSessionFailed(queryReturnValue); } return principal; }
Source:
public void removeRelationMembers(PerunSession sess, Group resultGroup, List<Member> changedMembers, int sourceGroupId) throws WrongReferenceAttributeValueException, NotGroupMemberException, WrongAttributeValueException, AlreadyMemberException, InternalErrorException, GroupNotExistsException { List<Member> members; try{ members = removeIndirectMembers(sess, resultGroup, changedMembers, sourceGroupId); if(members.isEmpty()){ return; } List<Integer> relations = groupsManagerImpl.getResultGroupsIds(sess, resultGroup.getId()); for (Integer groupId : relations) { removeRelationMembers(sess, groupsManagerImpl.getGroupById(sess, groupId), members, resultGroup.getId()); } } catch (WrongReferenceAttributeValueException | NotGroupMemberException | WrongAttributeValueException | AlreadyMemberException | GroupNotExistsException | InternalErrorException ex) { log.info("Can't remove member. Cause: {}", ex); } }

Target:
public void removeRelationMembers(PerunSession sess, Group resultGroup, List<Member> changedMembers, int sourceGroupId) throws WrongReferenceAttributeValueException, NotGroupMemberException, WrongAttributeValueException, InternalErrorException, GroupNotExistsException { List<Member> members; members = removeIndirectMembers(sess, resultGroup, changedMembers, sourceGroupId); if(members.isEmpty()){ return; } List<Integer> relations = groupsManagerImpl.getResultGroupsIds(sess, resultGroup.getId()); for (Integer groupId : relations) { removeRelationMembers(sess, groupsManagerImpl.getGroupById(sess, groupId), members, resultGroup.getId()); } }
Source:
public synchronized void register(KalturaMediaServerIndex serverIndex, String appName) { logger.debug("Register [" + liveEntry.id + "]"); if(entryRegistered) return; index = serverIndex; TimerTask setMediaServerTaskBroadcasting = new TimerTask() { @Override public void run() { logger.info("Initial timer task running [" + liveEntry.id + "] - BROADCASTING"); setEntryMediaServer(liveEntry, index, KalturaLiveEntryStatus.BROADCASTING); } }; timer = new Timer("register-" + liveEntry.id, true); timer.schedule(setMediaServerTaskBroadcasting, 0); logger.debug("Scheduled initial timer [" + liveEntry.id + "]"); entryRegistered = true; }

Target:
public synchronized void register(KalturaMediaServerIndex serverIndex, String appName) { logger.debug("Register [" + liveEntry.id + "]"); if(isEntryRegistered()) return; index = serverIndex; TimerTask setMediaServerTaskBroadcasting = new TimerTask() { @Override public void run() { logger.info("Initial timer task running [" + liveEntry.id + "] - BROADCASTING"); setEntryMediaServer(liveEntry, index, KalturaLiveEntryStatus.BROADCASTING); } }; timer = new Timer("register-" + liveEntry.id, true); timer.schedule(setMediaServerTaskBroadcasting, 0); logger.debug("Scheduled initial timer [" + liveEntry.id + "]"); entryRegistered = true; }
Source:
public long getBytesRequiredForTemplate(TemplateInfo templateInfo, StoragePool storagePool) { return 0; }

Target:
public long getBytesRequiredForTemplate(TemplateInfo templateInfo, StoragePool storagePool) { return 0L; }
Source:
public void testPrimaryOwnerChangingDuringReplace() throws Exception { doTest(TestWriteOperation.REPLACE_EXACT); }

Target:
public void testPrimaryOwnerChangingDuringReplace() throws Exception { doTest(TestWriteOperation.REPLACE); }
Source:
protected long obtainEntityId() { return nextEntityId++; }

Target:
private long obtainEntityId() { return nextEntityId++; }
Source:
public KTable<Windowed<K>, V> aggregate(final Initializer<V> initializer, final Merger<? super K, V> sessionMerger) { return aggregate(initializer, sessionMerger, Materialized.with(keySerde, null)); }

Target:
public KTable<Windowed<K>, V> aggregate(final Initializer<V> initializer, final Merger<? super K, V> sessionMerger) { return aggregate(initializer, sessionMerger, Materialized.with(null, null)); }
Source:
public int compareTo(CTFCallsite o) { final long mask32 = 0x00000000ffffffffL; long other = o.ip; long otherHigh = (other >> 32) & mask32; long otherLow = other & mask32; long ownHigh = (ip >> 32) & mask32; long ownLow = ip & mask32; if (ownHigh > otherHigh) { return 1; } if (ownHigh < otherHigh ) { return -1; } if (ownLow > otherLow) { return 1; } if (ownLow < otherLow) { return -1; } return 0; }

Target:
public int compareTo(CTFCallsite o) { long other = o.ip; long otherHigh = (other >> 32) & MASK32; long otherLow = other & MASK32; long ownHigh = (ip >> 32) & MASK32; long ownLow = ip & MASK32; if (ownHigh > otherHigh) { return 1; } if (ownHigh < otherHigh ) { return -1; } if (ownLow > otherLow) { return 1; } if (ownLow < otherLow) { return -1; } return 0; }
Source:
public void onCartographyTable(InventoryClickEvent e) { if (e.getRawSlot() == 2 && e.getInventory().getType() == InventoryType.CARTOGRAPHY && e.getWhoClicked() instanceof Player) { ItemStack item1 = e.getInventory().getContents()[0]; ItemStack item2 = e.getInventory().getContents()[1]; if (checkForUnallowedItems(item1, item2)) { e.setResult(Result.DENY); SlimefunPlugin.getLocalization().sendMessage((Player) e.getWhoClicked(), "cartography_table.not-working", true); } } }

Target:
public void onCartographyTable(InventoryClickEvent e) { if (!SlimefunPlugin.getMinecraftVersion().isAtLeast(MinecraftVersion.MINECRAFT_1_14)) { return; } if (e.getRawSlot() == 2 && e.getInventory().getType() == InventoryType.CARTOGRAPHY && e.getWhoClicked() instanceof Player) { ItemStack item1 = e.getInventory().getContents()[0]; ItemStack item2 = e.getInventory().getContents()[1]; if (checkForUnallowedItems(item1, item2)) { e.setResult(Result.DENY); SlimefunPlugin.getLocalization().sendMessage((Player) e.getWhoClicked(), "cartography_table.not-working", true); } } }
Source:
private synchronized Compute createComputeService() throws IOException, GeneralSecurityException, InterruptedException, GceServiceException { final int maxRetries = 5; int retries = 0; while (cachedComputeService == null && retries < maxRetries) { if (retries > 0) { Thread.sleep(POLL_INTERVAL_MS); } log.info("Creating new ComputeService [%d/%d]", retries + 1, maxRetries); try { HttpTransport httpTransport = GoogleNetHttpTransport.newTrustedTransport(); JsonFactory jsonFactory = JacksonFactory.getDefaultInstance(); GoogleCredential credential = GoogleCredential.getApplicationDefault( httpTransport, jsonFactory ); if (credential.createScopedRequired()) { List<String> scopes = new ArrayList<>(); scopes.add(ComputeScopes.CLOUD_PLATFORM); scopes.add(ComputeScopes.COMPUTE); credential = credential.createScoped(scopes); } if (credential.getClientAuthentication() != null) { throw new GceServiceException("Not using a service account"); } cachedComputeService = new Compute.Builder(httpTransport, jsonFactory, credential) .setApplicationName("DruidAutoscaler") .build(); retries++; } catch (Throwable e) { log.error(e, "Got Exception in creating the ComputeService"); throw e; } } return cachedComputeService; }

Target:
private synchronized Compute createComputeService() throws IOException, GeneralSecurityException, InterruptedException, GceServiceException { final int maxRetries = 5; int retries = 0; while (cachedComputeService == null && retries < maxRetries) { if (retries > 0) { Thread.sleep(POLL_INTERVAL_MS); } log.info("Creating new ComputeService [%d/%d]", retries + 1, maxRetries); try { cachedComputeService = createComputeServiceImpl(); retries++; } catch (Throwable e) { log.error(e, "Got Exception in creating the ComputeService"); throw e; } } return cachedComputeService; }
Source:
public void goToGroupActivity(){ Log.i("Debug", "Kapoue"); Intent intent = new Intent(this, GroupActivity.class); startActivity(intent); }

Target:
public void goToGroupActivity(){ Intent intent = new Intent(this, GroupActivity.class); startActivity(intent); }
Source:
public void handleSecondsSpentInputChange( ChangeEvent event ) { try { Long value = secondsSpentInput.getValue().isEmpty() ? null : Long.parseLong( secondsSpentInput.getValue() ); presenter.onSecondsSpentChange( value ); } catch ( NumberFormatException e ) { } }

Target:
public void handleSecondsSpentInputChange( ChangeEvent event ) { boolean isNumeric = secondsSpentInput.getValue().matches( "\\d+" ); if (isNumeric) { presenter.onSecondsSpentChange( Long.parseLong( secondsSpentInput.getValue() ) ); } else { presenter.onSecondsSpentChange( 0l ); secondsSpentInput.setValue( "0" ); } }
Source:
public void toString_test() { String str = dObjTyped.toString(); assertTrue(str.startsWith("AllJavaTypes = dyn[")); assertTrue(str.endsWith("}]")); }

Target:
public void toString_test() { String str = dObjTyped.toString(); assertTrue(str.startsWith("AllJavaTypes = dynamic[")); assertTrue(str.endsWith("}]")); }
Source:
public void visitSwitchStatement(SwitchStatementTree tree) { if (isWithinSwitch) { context().newIssue(this, tree, MESSAGE); } boolean previousIsWithinSwitch = isWithinSwitch; isWithinSwitch = true; super.visitSwitchStatement(tree); isWithinSwitch = previousIsWithinSwitch; }

Target:
public void visitSwitchStatement(SwitchStatementTree tree) { if (parentSwitchStatement != null) { context().newIssue(this, tree.switchToken(), MESSAGE) .secondary(parentSwitchStatement.switchToken(), MESSAGE_SECONDARY); } SwitchStatementTree previousParentSwitchStatement = parentSwitchStatement; parentSwitchStatement = tree; super.visitSwitchStatement(tree); parentSwitchStatement = previousParentSwitchStatement; }
Source:
public void testOriginalContentTypeIsRetrievedForLegacyContentHeaderType() throws Exception { final CountDownLatch latch = new CountDownLatch(1); MessageHandler messageHandler = new MessageHandler() { @Override public void handleMessage(Message<?> message) throws MessagingException { assertThat(message.getPayload()).isInstanceOf(byte[].class); assertThat(new String(((byte[])message.getPayload()), StandardCharsets.UTF_8)).isEqualTo("{\"message\":\"Hi\"}"); assertThat(message.getHeaders().get(MessageHeaders.CONTENT_TYPE).toString()).isEqualTo("application/json"); latch.countDown(); } }; testSink.input().subscribe(messageHandler); testSink.input().send(MessageBuilder.withPayload("{\"message\":\"Hi\"}".getBytes()) .setHeader(BinderHeaders.BINDER_ORIGINAL_CONTENT_TYPE, "application/json") .build()); assertThat(latch.await(10, TimeUnit.SECONDS)).isTrue(); testSink.input().unsubscribe(messageHandler); }

Target:
public void testOriginalContentTypeIsRetrievedForLegacyContentHeaderType() throws Exception { final CountDownLatch latch = new CountDownLatch(1); MessageHandler messageHandler = new MessageHandler() { @Override public void handleMessage(Message<?> message) throws MessagingException { assertThat(message.getPayload()).isInstanceOf(byte[].class); assertThat(((byte[])message.getPayload())).isEqualTo("{\"message\":\"Hi\"}".getBytes(StandardCharsets.UTF_8)); assertThat(message.getHeaders().get(MessageHeaders.CONTENT_TYPE).toString()).isEqualTo("application/json"); latch.countDown(); } }; testSink.input().subscribe(messageHandler); testSink.input().send(MessageBuilder.withPayload("{\"message\":\"Hi\"}".getBytes()) .setHeader(BinderHeaders.BINDER_ORIGINAL_CONTENT_TYPE, "application/json") .build()); assertThat(latch.await(10, TimeUnit.SECONDS)).isTrue(); testSink.input().unsubscribe(messageHandler); }
Source:
public void testDeserialization() throws Exception { ConfigurationObjectFactory factory = Config.createFactory(new Properties()); DruidProcessingConfig config = factory.build(DruidProcessingConfig.class); Assert.assertEquals(1024 * 1024 * 1024, config.intermediateComputeSizeBytes()); Assert.assertEquals(Integer.MAX_VALUE, config.poolCacheMaxCount()); if (Runtime.getRuntime().availableProcessors() > 1) { Assert.assertTrue(config.getNumThreads() < Runtime.getRuntime().availableProcessors()); } Assert.assertEquals(0, config.columnCacheSizeBytes()); Assert.assertFalse(config.isFifo()); Properties props = new Properties(); props.setProperty("druid.processing.buffer.sizeBytes", "1"); props.setProperty("druid.processing.buffer.poolCacheMaxCount", "1"); props.setProperty("druid.processing.numThreads", "5"); props.setProperty("druid.processing.columnCache.sizeBytes", "1"); props.setProperty("druid.processing.fifo", "true"); factory = Config.createFactory(props); config = factory.buildWithReplacements(DruidProcessingConfig.class, ImmutableMap.of("base_path", "druid.processing")); Assert.assertEquals(1, config.intermediateComputeSizeBytes()); Assert.assertEquals(1, config.poolCacheMaxCount()); Assert.assertEquals(5, config.getNumThreads()); Assert.assertEquals(1, config.columnCacheSizeBytes()); Assert.assertTrue(config.isFifo()); }

Target:
public void testDeserialization() throws Exception { ConfigurationObjectFactory factory = Config.createFactory(new Properties()); DruidProcessingConfig config = factory.build(DruidProcessingConfig.class); Assert.assertEquals(1024 * 1024 * 1024, config.intermediateComputeSizeBytes()); Assert.assertEquals(Integer.MAX_VALUE, config.poolCacheMaxCount()); if (Runtime.getRuntime().availableProcessors() == 1) { Assert.assertTrue(config.getNumThreads() == 1); } else { Assert.assertTrue(config.getNumThreads() < Runtime.getRuntime().availableProcessors()); } Assert.assertEquals(0, config.columnCacheSizeBytes()); Assert.assertFalse(config.isFifo()); Properties props = new Properties(); props.setProperty("druid.processing.buffer.sizeBytes", "1"); props.setProperty("druid.processing.buffer.poolCacheMaxCount", "1"); props.setProperty("druid.processing.numThreads", "5"); props.setProperty("druid.processing.columnCache.sizeBytes", "1"); props.setProperty("druid.processing.fifo", "true"); factory = Config.createFactory(props); config = factory.buildWithReplacements(DruidProcessingConfig.class, ImmutableMap.of("base_path", "druid.processing")); Assert.assertEquals(1, config.intermediateComputeSizeBytes()); Assert.assertEquals(1, config.poolCacheMaxCount()); Assert.assertEquals(5, config.getNumThreads()); Assert.assertEquals(1, config.columnCacheSizeBytes()); Assert.assertTrue(config.isFifo()); }
Source:
byte[] load(String id) throws IOException { File file = new File(folder, filename(id)); if (file.exists() && file.canRead()) { BufferedSource source = Okio.buffer(Okio.source(file)); return source.readByteArray(); } return null; }

Target:
byte[] load(String id) throws IOException { final File file = toFile(id); if (file.exists() && file.canRead()) { BufferedSource source = Okio.buffer(Okio.source(file)); try { return source.readByteArray(); } finally { closeQuitely(source); } } return null; }
Source:
private V put0(Entry<V> entry) { if (size >= (int)(entries.length * SCALE_LOAD_FACTOR)) resize(true); Entry<V> savedEntry = entry; int startKey = savedEntry.key; for (int i = 0; i < entries.length; i++) { int idx = (index(startKey) + i) & (entries.length - 1); Entry<V> curEntry = entries[idx]; if (curEntry == null) { entries[idx] = savedEntry; size++; return null; } else if (curEntry.key == savedEntry.key) { entries[idx] = savedEntry; return curEntry.val; } int curDist = distance(idx, curEntry.key); int savedDist = distance(idx, savedEntry.key); if (curDist < savedDist) { entries[idx] = savedEntry; savedEntry = curEntry; } } throw new IllegalStateException("Unreachable state exception. Insertion position not found. " + "Entry: " + entry + " map state: " + toString()); }

Target:
private V put0(Entry<V> entry) { if (size >= scaleThreshold) resize(true); Entry<V> savedEntry = entry; int startKey = savedEntry.key; for (int i = 0; i < entries.length; i++) { int idx = (index(startKey) + i) & (entries.length - 1); Entry<V> curEntry = entries[idx]; if (curEntry == null) { entries[idx] = savedEntry; size++; return null; } else if (curEntry.key == savedEntry.key) { entries[idx] = savedEntry; return curEntry.val; } int curDist = distance(idx, curEntry.key); int savedDist = distance(idx, savedEntry.key); if (curDist < savedDist) { entries[idx] = savedEntry; savedEntry = curEntry; } } throw new IllegalStateException("Unreachable state exception. Insertion position not found. " + "Entry: " + entry + " map state: " + toString()); }
Source:
private void addDnsConfiguration(ReportedConfigurations result) { boolean dnsResolverConfigurationSupported = FeatureSupported.supportedInConfig(ConfigValues.DnsResolverConfigurationSupported, this.cluster.getCompatibilityVersion()); if (!dnsResolverConfigurationSupported) { return; } List<NameServer> nameServersOfNetworkAttachment = getNameServers(networkAttachment.getDnsResolverConfiguration()); List<NameServer> nameServersOfNetwork = getNameServers(network.getDnsResolverConfiguration()); List<NameServer> nameServersOfHost = getNameServers(reportedDnsResolverConfiguration); boolean engineDefineDnsConfiguration = nameServersOfNetworkAttachment != null || nameServersOfNetwork != null; List<NameServer> expectedNameServers = nameServersOfNetworkAttachment != null ? nameServersOfNetworkAttachment : nameServersOfNetwork; result.add(DNS_CONFIGURATION, addressesAsString(nameServersOfHost), engineDefineDnsConfiguration && isDefaultRouteNetwork ? addressesAsString(expectedNameServers): "", !(engineDefineDnsConfiguration && isDefaultRouteNetwork && !Objects.equals(nameServersOfHost, expectedNameServers))); boolean inSync = !isDefaultRouteNetwork || iface.isIpv4DefaultRoute(); result.add(DEFAULT_ROUTE, iface.isIpv4DefaultRoute(), isDefaultRouteNetwork ? true : "", inSync); }

Target:
private void addDnsConfiguration(ReportedConfigurations result) { List<NameServer> nameServersOfHost = getNameServers(reportedDnsResolverConfiguration); if (isDefaultRouteNetwork) { List<NameServer> expectedNameServers = getExpectedNameServers(); boolean engineDefineDnsConfiguration = expectedNameServers != null; if (engineDefineDnsConfiguration) { result.add(DNS_CONFIGURATION, addressesAsString(nameServersOfHost), addressesAsString(expectedNameServers), Objects.equals(nameServersOfHost, expectedNameServers)); } else { result.add(DNS_CONFIGURATION, addressesAsString(nameServersOfHost), "", true); } } else { result.add(DNS_CONFIGURATION, addressesAsString(nameServersOfHost), "", true); } }
Source:
public JobResultImpl() { allResults = new HashMap<>(); preciousResults = new HashMap<>(); resultMap = new ConcurrentHashMap<>(); }

Target:
public JobResultImpl() { allResults = new HashMap<>(); preciousResults = new HashMap<>(); resultMap = new HashMap<>(); }
Source:
public static String resolveNetworkLocation(DNSToSwitchMapping dnsResolver, BookieSocketAddress addr) { List<String> names = new ArrayList<String>(1); InetSocketAddress inetSocketAddress = addr.getSocketAddress(); if (dnsResolver.useHostName()) { names.add(addr.getHostName()); } else { InetAddress inetAddress = inetSocketAddress.getAddress(); if (null == inetAddress) { addr.getHostName(); } else { names.add(inetAddress.getHostAddress()); } } List<String> rNames = dnsResolver.resolve(names); checkNotNull(rNames, "DNS Resolver should not return null response."); checkState(rNames.size() == 1, "Expected exactly one element"); return rNames.get(0); }

Target:
public static String resolveNetworkLocation(DNSToSwitchMapping dnsResolver, BookieSocketAddress addr) { List<String> names = new ArrayList<String>(1); InetSocketAddress inetSocketAddress = addr.getSocketAddress(); if (dnsResolver.useHostName()) { names.add(addr.getHostName()); } else { InetAddress inetAddress = inetSocketAddress.getAddress(); if (null == inetAddress) { names.add(addr.getHostName()); } else { names.add(inetAddress.getHostAddress()); } } List<String> rNames = dnsResolver.resolve(names); checkNotNull(rNames, "DNS Resolver should not return null response."); checkState(rNames.size() == 1, "Expected exactly one element"); return rNames.get(0); }
Source:
private RoundedImageView createAvatar(final String email) { int sizeInDip = (int) TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, (float) 65, getResources().getDisplayMetrics()); RoundedImageView image = new RoundedImageView(getActivity()); image.setTag(email); image.setCornerRadius(100); image.setBorderWidth(0); image.setPadding(20, 0, 0, 0); image.setLayoutParams(new LinearLayout.LayoutParams(sizeInDip, sizeInDip)); image.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { MainApplication.emailBeingTracked = email; Intent intentLocation = new Intent("LOCATION-UPDATE"); LocalBroadcastManager.getInstance(getActivity()).sendBroadcast(intentLocation); Intent intentMapTab = new Intent("GO_TO_MAP"); LocalBroadcastManager.getInstance(getActivity()).sendBroadcast(intentMapTab); } }); return image; }

Target:
private RoundedImageView createAvatar(final String email) { int sizeInDip = (int) TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, (float) 65, getResources().getDisplayMetrics()); RoundedImageView image = new RoundedImageView(getActivity()); image.setTag(email); image.setCornerRadius(100); image.setBorderWidth(0); image.setPadding(20, 0, 0, 0); image.setLayoutParams(new LinearLayout.LayoutParams(sizeInDip, sizeInDip)); image.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { MainApplication.emailBeingTracked = email; LocalBroadcastManager.getInstance(getActivity()).sendBroadcast(new Intent("LOCATION-UPDATE")); LocalBroadcastManager.getInstance(getActivity()).sendBroadcast(new Intent("GO-TO-MAP")); } }); return image; }
Source:
public void close() { closingChannel = true; if (LOG.isDebugEnabled()) { LOG.debug("close called for sessionid:0x{}", Long.toHexString(sessionId)); } factory.unregisterConnection(this); if (!factory.cnxns.remove(this)) { if (LOG.isDebugEnabled()) { LOG.debug("cnxns size:{}", factory.cnxns.size()); } return; } if (LOG.isDebugEnabled()) { LOG.debug("close in progress for sessionid:0x{}", Long.toHexString(sessionId)); } factory.removeCnxnFromIpMap( this, ((InetSocketAddress)channel.remoteAddress()).getAddress()); if (channel.isOpen()) { channel.writeAndFlush(Unpooled.EMPTY_BUFFER).addListener(new ChannelFutureListener() { @Override public void operationComplete(ChannelFuture future) { future.channel().close().addListener(f -> releaseQueuedBuffer()); } }); } else { channel.eventLoop().execute(this::releaseQueuedBuffer); } }

Target:
public void close() { closingChannel = true; if (LOG.isDebugEnabled()) { LOG.debug("close called for sessionid:0x{}", Long.toHexString(sessionId)); } factory.unregisterConnection(this); if (!factory.cnxns.remove(this)) { if (LOG.isDebugEnabled()) { LOG.debug("cnxns size:{}", factory.cnxns.size()); } return; } if (LOG.isDebugEnabled()) { LOG.debug("close in progress for sessionid:0x{}", Long.toHexString(sessionId)); } factory.removeCnxnFromIpMap( this, ((InetSocketAddress)channel.remoteAddress()).getAddress()); if (zkServer != null) { zkServer.removeCnxn(this); } if (channel.isOpen()) { channel.writeAndFlush(Unpooled.EMPTY_BUFFER).addListener(new ChannelFutureListener() { @Override public void operationComplete(ChannelFuture future) { future.channel().close().addListener(f -> releaseQueuedBuffer()); } }); } else { channel.eventLoop().execute(this::releaseQueuedBuffer); } }
Source:
Map<String, Statistics> getStatistics() { synchronized (statLock) { Map<String, Statistics> out = new HashMap<>(statistics.size() + statLog.size()); out.putAll(statistics); out.putAll(statLog); return out; } }

Target:
Map<String, Statistics> getStatistics() { synchronized (statLock) { Map<String, Statistics> out = new TreeMap<>(); out.putAll(statistics); out.putAll(statLog); return out; } }
Source:
private boolean isExcluded(VariableTree variable) { return isStaticOrFinal(variable) || variable.symbol().metadata().isAnnotatedWith("javax.inject.Inject"); }

Target:
private static boolean isExcluded(VariableTree variable) { return isStaticOrFinal(variable) || variable.symbol().metadata().isAnnotatedWith("javax.inject.Inject"); }
Source:
BiGaussian(MultiKeyMap<Integer, Triplet> horizontalSlice,double mz,int leftBound,int rightBound){ this.horizontalSlice = horizontalSlice; List<SliceSparseMatrix.Triplet> listOfTripletsInSlice = new ArrayList<SliceSparseMatrix.Triplet>(horizontalSlice.values()); listOfIntensities = new ArrayList<Double>(); for(int i=0;i<listOfTripletsInSlice.size();i++){ double intensity = listOfTripletsInSlice.get(i)!=null?listOfTripletsInSlice.get(i).intensity:0; listOfIntensities.add(intensity); } Collections.sort(listOfIntensities); double maxHeight = listOfIntensities.get(listOfIntensities.size()-1); int mu = getScanNumber(maxHeight); int roundedmz = (int) Math.round(mz * 10000); double halfHeight = (double) maxHeight/2; BiGaussianParams.maxHeight = maxHeight; BiGaussianParams.mu = mu; double interpolationLeftSideX = InterpolationX(mu,halfHeight,leftBound,rightBound,roundedmz,Direction.LEFT); BiGaussianParams.sigmaLeft = (mu - interpolationLeftSideX)/Math.sqrt(2*Math.log(2)); double interpolationRightSideX = InterpolationX(mu,halfHeight,leftBound,rightBound,roundedmz,Direction.RIGHT); BiGaussianParams.sigmaRight = ((interpolationRightSideX - mu))/Math.sqrt(2*Math.log(2)); }

Target:
BiGaussian(MultiKeyMap<Integer, Triplet> horizontalSlice, double mz, int leftBound, int rightBound) { maxHeight = horizontalSlice.values().stream().map(x -> x != null ? x.intensity : 0.0) .max(Double::compareTo).orElse(0.0); mu = getScanNumber(horizontalSlice, maxHeight); int roundedmz = (int) Math.round(mz * 10000); double halfHeight = (double) maxHeight / 2; double interpolationLeftSideX = InterpolationX(horizontalSlice, mu, halfHeight, leftBound, rightBound, roundedmz, Direction.LEFT); sigmaLeft = (mu - interpolationLeftSideX) / Math.sqrt(2 * Math.log(2)); double interpolationRightSideX = InterpolationX(horizontalSlice, mu, halfHeight, leftBound, rightBound, roundedmz, Direction.RIGHT); sigmaRight = ((interpolationRightSideX - mu)) / Math.sqrt(2 * Math.log(2)); }
Source:
private static void sendGristMessage(MinecraftServer server, PlayerIdentifier player, ITextComponent message) { if (MinestuckConfig.showGristChanges.get()) { if (player != null) { ServerPlayerEntity client = player.getPlayer(server); if (client != null) { client.sendStatusMessage(message, true); } } } }

Target:
private static void sendGristMessage(MinecraftServer server, PlayerIdentifier player, ITextComponent message) { if(player != null) { ServerPlayerEntity client = player.getPlayer(server); if(client != null) { client.sendStatusMessage(message, true); } } }
Source:
private VdcReturnValueBase runActionImpl(VdcActionType actionType, VdcActionParametersBase parameters, boolean runAsInternal, CommandContext context) { VdcReturnValueBase returnValue = null; returnValue = ExecutionHandler.evaluateCorrelationId(parameters); if (returnValue != null) { log.warnFormat("CanDoAction of action {0} failed. Reasons: {1}", actionType, StringUtils.join(returnValue.getCanDoActionMessages(), ',')); return returnValue; } CommandBase<?> command = CommandsFactory.CreateCommand(actionType, parameters); command.setInternalExecution(runAsInternal); command.setContext(context); ExecutionHandler.prepareCommandForMonitoring(command, actionType, runAsInternal); command.checkCanDoAction(); command.insertAsyncTaskPlaceHolders(); returnValue = command.executeAction(); returnValue.setCorrelationId(parameters.getCorrelationId()); returnValue.setJobId(command.getJobId()); return returnValue; }

Target:
private VdcReturnValueBase runActionImpl(VdcActionType actionType, VdcActionParametersBase parameters, boolean runAsInternal, CommandContext context) { CommandBase<?> command = CommandsFactory.CreateCommand(actionType, parameters); return runAction(command, runAsInternal, context); }