auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
protected Map<String, String> getTemplateParameterList(ContractsGrantsInvoiceDocument document) { Map<String, String> templateParameters = super.getTemplateParameterList(document); Map<String, String> localParameterMap = getInstitutionTemplateParameters(document); if(!localParameterMap.isEmpty()) { templateParameters.putAll(localParameterMap); } return templateParameters; }

Target:
protected Map<String, String> getTemplateParameterList(ContractsGrantsInvoiceDocument document) { Map<String, String> templateParameters = new HashMap<String, String>(); templateParameters.putAll(super.getTemplateParameterList(document)); Map<String, String> localParameterMap = getInstitutionTemplateParameters(document); if(!localParameterMap.isEmpty()) { templateParameters.putAll(localParameterMap); } return templateParameters; }
Source:
public CompletableFuture<Multihash> uploadChunk(CryptreeNode metadata, Location location, SigningPrivateKeyAndPublicHash writer) { if (! writer.publicKeyHash.equals(location.writer)) throw new IllegalStateException("Non matching location writer and signing writer key!"); try { byte[] metaBlob = metadata.serialize(); return dhtClient.put(location.writer, writer.secret.signatureOnly(metaBlob), metaBlob) .thenCompose(blobHash -> tree.put(writer, location.getMapKey(), metadata.committedHash(), blobHash) .thenApply(res -> blobHash)); } catch (Exception e) { LOG.info(e.getMessage()); throw new RuntimeException(e); } }

Target:
public CompletableFuture<Multihash> uploadChunk(CryptreeNode metadata, Location location, SigningPrivateKeyAndPublicHash writer) { if (! writer.publicKeyHash.equals(location.writer)) throw new IllegalStateException("Non matching location writer and signing writer key!"); try { byte[] metaBlob = metadata.serialize(); return dhtClient.put(location.writer, writer.secret.signatureOnly(metaBlob), metaBlob) .thenCompose(blobHash -> tree.put(writer, location.getMapKey(), metadata.committedHash(), blobHash) .thenApply(res -> blobHash)); } catch (Exception e) { LOG.severe(e.getMessage()); throw new RuntimeException(e); } }
Source:
public GlusterVolume update(GlusterVolume incomingVolume) { validateParameters(incomingVolume, "id", "status"); QueryIdResolver<Guid> volumeResolver = new QueryIdResolver<Guid>(VdcQueryType.GetGlusterVolumeById, IdQueryParameters.class); GlusterVolumeEntity entity = getEntity(volumeResolver, true); return performUpdate(incomingVolume, entity, map(entity), volumeResolver, VdcActionType.UpdateGlusterVolume, new UpdateParametersProvider()); }

Target:
public GlusterVolume update(GlusterVolume incomingVolume) { validateParameters(incomingVolume, "id", "status", "status.detail"); QueryIdResolver<Guid> volumeResolver = new QueryIdResolver<Guid>(VdcQueryType.GetGlusterVolumeById, IdQueryParameters.class); GlusterVolumeEntity entity = getEntity(volumeResolver, true); return performUpdate(incomingVolume, entity, map(entity), volumeResolver, VdcActionType.UpdateGlusterVolume, new UpdateParametersProvider()); }
Source:
UnlockWorkflow(@UnlockWindow Stage window, @UnlockWindow Vault vault, VaultService vaultService, AtomicReference<char[]> password, @Named("savePassword") AtomicBoolean savePassword, @Named("savedPassword") Optional<char[]> savedPassword, UserInteractionLock<PasswordEntry> passwordEntryLock, Optional<KeychainManager> keychain, @FxmlScene(FxmlFile.UNLOCK) Lazy<Scene> unlockScene, @FxmlScene(FxmlFile.UNLOCK_SUCCESS) Lazy<Scene> successScene, @FxmlScene(FxmlFile.UNLOCK_INVALID_MOUNT_POINT) Lazy<Scene> invalidMountPointScene, ErrorComponent.Builder errorComponent) { this.window = window; this.vault = vault; this.vaultService = vaultService; this.password = password; this.savePassword = savePassword; this.savedPassword = savedPassword; this.passwordEntryLock = passwordEntryLock; this.keychain = keychain; this.unlockScene = unlockScene; this.successScene = successScene; this.invalidMountPointScene = invalidMountPointScene; this.errorComponent = errorComponent; setOnScheduled(event -> vault.setState(VaultState.PROCESSING)); setOnSucceeded(event -> vault.setState(VaultState.UNLOCKED)); setOnCancelled(event -> vault.setState(VaultState.LOCKED)); setOnFailed(event -> { vault.setState(VaultState.LOCKED); Throwable throwable = event.getSource().getException(); if (throwable instanceof InvalidMountPointException) { handleInvalidMountPoint((InvalidMountPointException) throwable); } else { handleGenericError(throwable); } }); }

Target:
UnlockWorkflow(@UnlockWindow Stage window, @UnlockWindow Vault vault, VaultService vaultService, AtomicReference<char[]> password, @Named("savePassword") AtomicBoolean savePassword, @Named("savedPassword") Optional<char[]> savedPassword, UserInteractionLock<PasswordEntry> passwordEntryLock, Optional<KeychainManager> keychain, @FxmlScene(FxmlFile.UNLOCK) Lazy<Scene> unlockScene, @FxmlScene(FxmlFile.UNLOCK_SUCCESS) Lazy<Scene> successScene, @FxmlScene(FxmlFile.UNLOCK_INVALID_MOUNT_POINT) Lazy<Scene> invalidMountPointScene, ErrorComponent.Builder errorComponent) { this.window = window; this.vault = vault; this.vaultService = vaultService; this.password = password; this.savePassword = savePassword; this.savedPassword = savedPassword; this.passwordEntryLock = passwordEntryLock; this.keychain = keychain; this.unlockScene = unlockScene; this.successScene = successScene; this.invalidMountPointScene = invalidMountPointScene; this.errorComponent = errorComponent; setOnFailed(event -> { Throwable throwable = event.getSource().getException(); if (throwable instanceof InvalidMountPointException) { handleInvalidMountPoint((InvalidMountPointException) throwable); } else { handleGenericError(throwable); } }); }
Source:
private int getPermittedLimit() { if (!enforceVisibility) { return Integer.MAX_VALUE; } return userProvider.get().getCapabilities() .getRange(GlobalCapability.QUERY_LIMIT) .getMax(); }

Target:
private int getPermittedLimit() { if (enforceVisibility) { return userProvider.get().getCapabilities() .getRange(GlobalCapability.QUERY_LIMIT) .getMax(); } return Integer.MAX_VALUE; }
Source:
public void shouldCreateNewAutoGenerationOption() throws Exception { long originalCount = getAllCount(); SimpleObject autoGenerationOption = new SimpleObject(); autoGenerationOption.add("identifierType", IDENTIFIER_TYPE_UUID); autoGenerationOption.add("location", LOCATION); autoGenerationOption.add("source", SOURCE); autoGenerationOption.add("automaticGenerationEnabled", true); autoGenerationOption.add("manualEntryEnabled", true); String json = new ObjectMapper().writeValueAsString(autoGenerationOption); MockHttpServletRequest req = request(RequestMethod.POST, getURI()); req.setContent(json.getBytes()); SimpleObject newAutoGenerationOption = deserialize(handle(req)); assertNotNull(PropertyUtils.getProperty(newAutoGenerationOption, "uuid")); assertEquals(originalCount + 1, getAllCount()); assertNotNull( PropertyUtils.getProperty(newAutoGenerationOption, "source")); assertNotNull( PropertyUtils.getProperty(newAutoGenerationOption, "location")); assertNotNull(PropertyUtils.getProperty(newAutoGenerationOption, "identifierType")); assertEquals(true, PropertyUtils.getProperty(newAutoGenerationOption, "automaticGenerationEnabled")); assertEquals(true, PropertyUtils.getProperty(newAutoGenerationOption, "manualEntryEnabled")); }

Target:
public void shouldCreateNewAutoGenerationOption() throws Exception { long originalCount = getAllCount(); SimpleObject autoGenerationOption = new SimpleObject(); autoGenerationOption.add("identifierType", IDENTIFIER_TYPE_UUID); autoGenerationOption.add("location", LOCATION); autoGenerationOption.add("source", SOURCE); autoGenerationOption.add("automaticGenerationEnabled", true); autoGenerationOption.add("manualEntryEnabled", true); String json = new ObjectMapper().writeValueAsString(autoGenerationOption); MockHttpServletRequest req = request(RequestMethod.POST, getURI()); req.setContent(json.getBytes()); SimpleObject response = deserialize(handle(req)); assertEquals(originalCount + 1, getAllCount()); Object autogenerationOptionUuid = PropertyUtils.getProperty(response, "uuid"); AutoGenerationOption newAutoGenerationOption = identifierSourceService .getAutoGenerationOption(Integer.parseInt(autogenerationOptionUuid.toString())); assertEquals(SOURCE, newAutoGenerationOption.getSource().getUuid()); assertEquals(LOCATION, newAutoGenerationOption.getLocation().getUuid()); assertEquals(IDENTIFIER_TYPE_UUID, newAutoGenerationOption.getIdentifierType().getUuid()); assertEquals(true, newAutoGenerationOption.isAutomaticGenerationEnabled()); assertEquals(true, newAutoGenerationOption.isManualEntryEnabled()); }
Source:
public ClassLoaderModel build() { Optional<Plugin> pluginOptional = empty(); if (processSharedLibraries || processAdditionalPluginLibraries) { pluginOptional = findMuleMavenPluginDeclaration(); } if (processSharedLibraries) { pluginOptional.ifPresent(this::exportSharedLibrariesResourcesAndPackages); } if (processAdditionalPluginLibraries) { pluginOptional.ifPresent(this::processAdditionalPluginLibraries); } localPackages.removeAll(packages); localResources.removeAll(resources); return super.build(); }

Target:
public ClassLoaderModel build() { Optional<Plugin> pluginOptional = empty(); if (processSharedLibraries || processAdditionalPluginLibraries) { pluginOptional = findMuleMavenPluginDeclaration(); } if (processSharedLibraries) { pluginOptional.ifPresent(this::exportSharedLibrariesResourcesAndPackages); } if (processAdditionalPluginLibraries) { pluginOptional.ifPresent(this::processAdditionalPluginLibraries); } return super.build(); }
Source:
public void addDeviceModel(@Identification final String organisationIdentification, final String manufacturerId, final String modelCode, final String description) throws FunctionalException { final Organisation organisation = this.domainHelperService.findOrganisation(organisationIdentification); this.domainHelperService.isAllowed(organisation, PlatformFunction.CREATE_DEVICEMODEL); final Manufacturer manufacturer = this.manufacturerRepository.findByManufacturerId(manufacturerId); if (manufacturer == null) { LOGGER.info("Manufacturer doesn't exixts."); throw new FunctionalException(FunctionalExceptionType.EXISTING_MANUFACTURER, ComponentType.WS_CORE, new ExistingEntityException(Manufacturer.class, manufacturerId)); } final DeviceModel savedDeviceModel = this.deviceModelRepository.findByManufacturerIdAndModelCode(manufacturer, modelCode); if (savedDeviceModel != null) { LOGGER.info("DeviceModel already exixts."); throw new FunctionalException(FunctionalExceptionType.EXISTING_DEVICEMODEL, ComponentType.WS_CORE, new ExistingEntityException(DeviceModel.class, manufacturerId)); } else { final DeviceModel deviceModel = new DeviceModel(manufacturer, modelCode, description); this.deviceModelRepository.save(deviceModel); } }

Target:
public void addDeviceModel(@Identification final String organisationIdentification, final String manufacturerId, final String modelCode, final String description) throws FunctionalException { final Organisation organisation = this.domainHelperService.findOrganisation(organisationIdentification); this.domainHelperService.isAllowed(organisation, PlatformFunction.CREATE_DEVICEMODEL); final Manufacturer manufacturer = this.manufacturerRepository.findByManufacturerId(manufacturerId); if (manufacturer == null) { LOGGER.info("Manufacturer doesn't exixts."); throw new FunctionalException(FunctionalExceptionType.EXISTING_MANUFACTURER, ComponentType.WS_CORE, new UnknownEntityException(Manufacturer.class, manufacturerId)); } final DeviceModel savedDeviceModel = this.deviceModelRepository.findByManufacturerIdAndModelCode(manufacturer, modelCode); if (savedDeviceModel != null) { LOGGER.info("DeviceModel already exixts."); throw new FunctionalException(FunctionalExceptionType.EXISTING_DEVICEMODEL, ComponentType.WS_CORE, new ExistingEntityException(DeviceModel.class, manufacturerId)); } else { final DeviceModel deviceModel = new DeviceModel(manufacturer, modelCode, description); this.deviceModelRepository.save(deviceModel); } }
Source:
public void run() { try { serverChannel.register(nioSelector, SelectionKey.OP_ACCEPT); startupComplete(); int currentProcessor = 0; while (isRunning()) { int ready = nioSelector.select(selectTimeOutMs); if (ready > 0) { Set<SelectionKey> keys = nioSelector.selectedKeys(); Iterator<SelectionKey> iter = keys.iterator(); while (iter.hasNext() && isRunning()) { SelectionKey key = null; try { key = iter.next(); iter.remove(); if (key.isAcceptable()) { accept(key, processors.get(currentProcessor)); } else { throw new IllegalStateException("Unrecognized key state for acceptor thread."); } currentProcessor = (currentProcessor + 1) % processors.size(); } catch (Exception e) { logger.debug("Error in accepting new connection", e); } } } } logger.debug("Closing server socket and selector."); serverChannel.close(); nioSelector.close(); shutdownComplete(); } catch (Exception e) { logger.error("Error during shutdown of acceptor thread {}", e); } }

Target:
public void run() { try { serverChannel.register(nioSelector, SelectionKey.OP_ACCEPT); startupComplete(); int currentProcessor = 0; while (isRunning()) { int ready = nioSelector.select(selectTimeOutMs); if (ready > 0) { Set<SelectionKey> keys = nioSelector.selectedKeys(); Iterator<SelectionKey> iter = keys.iterator(); while (iter.hasNext() && isRunning()) { SelectionKey key = null; try { key = iter.next(); iter.remove(); if (key.isAcceptable()) { accept(key, processors.get(currentProcessor)); } else { throw new IllegalStateException("Unrecognized key state for acceptor thread."); } currentProcessor = (currentProcessor + 1) % processors.size(); } catch (Exception e) { key.cancel(); metrics.acceptConnectionErrorCount.inc(); logger.debug("Error in accepting new connection", e); } } } } logger.debug("Closing server socket and selector."); serverChannel.close(); nioSelector.close(); shutdownComplete(); } catch (Exception e) { metrics.acceptorShutDownErrorCount.inc(); logger.error("Error during shutdown of acceptor thread", e); } }
Source:
static public void setLevel(int value) { level.set(value); }

Target:
static void setLevel(int value) { level.set(value); }
Source:
public void fail_to_subtract_too_big_values() { final Duration duration1 = seconds(Long.MAX_VALUE); final Duration duration2 = seconds(Long.MAX_VALUE / 2); com.google.protobuf.util.Durations.subtract(duration1, duration2); }

Target:
public void fail_to_subtract_too_big_values() { final Duration duration1 = seconds(Long.MAX_VALUE); final Duration duration2 = seconds(Long.MAX_VALUE / 2); subtract(duration1, duration2); }
Source:
public OutputStream write(String item, IProgressMonitor monitor) throws IOException { File file = getFile(item); return new BufferedOutputStream(new FileOutputStream(file)); }

Target:
public OutputStream write(String item, IProgressMonitor monitor) throws IOException { File file = getFile(item); return new FileOutputStream(file); }
Source:
protected boolean reconstructMaster() { proceedStorageDomainTreatmentByDomainType(true); if (getParameters().isInactive() && !getStorageDomain().getId().equals(_newMasterStorageDomainId)) { executeInNewTransaction(new TransactionMethod<Void>() { @Override public Void runInTransaction() { setStorageDomainStatus(StorageDomainStatus.InActive, getCompensationContext()); calcStoragePoolStatusByDomainsStatus(); getCompensationContext().stateChanged(); return null; } }); } if (_isLastMaster) { return stopSpm(); } boolean commandSucceeded = stopSpm(); final List<String> disconnectPoolFormats = Config.<List<String>> GetValue( ConfigValues.DisconnectPoolOnReconstruct); if (commandSucceeded && disconnectPoolFormats.contains(getNewMaster(true).getStorageFormat().getValue())) { commandSucceeded = runVdsCommand( VDSCommandType.DisconnectStoragePool, new DisconnectStoragePoolVDSCommandParameters(getVds().getId(), getStoragePool().getId(), getVds().getVdsSpmId()) ).getSucceeded(); } if (!commandSucceeded) { return false; } List<StoragePoolIsoMap> domains = getStoragePoolIsoMapDAO() .getAllForStoragePool(getStoragePool().getId()); setActionReturnValue(true); return runVdsCommand(VDSCommandType.ReconstructMaster, new ReconstructMasterVDSCommandParameters(getVds().getId(), getVds().getVdsSpmId(), getStoragePool().getId(), getStoragePool().getName(), _newMasterStorageDomainId, domains, getStoragePool().getmaster_domain_version())).getSucceeded(); }

Target:
protected boolean reconstructMaster() { proceedStorageDomainTreatmentByDomainType(true); if (getParameters().isInactive() && !getStorageDomain().getId().equals(_newMasterStorageDomainId)) { executeInNewTransaction(new TransactionMethod<Void>() { @Override public Void runInTransaction() { setStorageDomainStatus(StorageDomainStatus.InActive, getCompensationContext()); calcStoragePoolStatusByDomainsStatus(); getCompensationContext().stateChanged(); return null; } }); } if (_isLastMaster) { return stopSpm(); } boolean commandSucceeded = stopSpm(); final List<String> disconnectPoolFormats = Config.<List<String>> getValue( ConfigValues.DisconnectPoolOnReconstruct); if (commandSucceeded && disconnectPoolFormats.contains(getNewMaster(true).getStorageFormat().getValue())) { commandSucceeded = runVdsCommand( VDSCommandType.DisconnectStoragePool, new DisconnectStoragePoolVDSCommandParameters(getVds().getId(), getStoragePool().getId(), getVds().getVdsSpmId()) ).getSucceeded(); } if (!commandSucceeded) { return false; } List<StoragePoolIsoMap> domains = getStoragePoolIsoMapDAO() .getAllForStoragePool(getStoragePool().getId()); setActionReturnValue(true); return runVdsCommand(VDSCommandType.ReconstructMaster, new ReconstructMasterVDSCommandParameters(getVds().getId(), getVds().getVdsSpmId(), getStoragePool().getId(), getStoragePool().getName(), _newMasterStorageDomainId, domains, getStoragePool().getmaster_domain_version())).getSucceeded(); }
Source:
public MetaTagDataLoader(final NodeDao nodeDao, final SessionUtils sessionUtils, final EntityScopeProvider entityScopeProvider) { this.nodeDao = nodeDao; this.sessionUtils = sessionUtils; this.entityScopeProvider = entityScopeProvider; setConfig(new MetaTagConfiguration(Maps.fromProperties(System.getProperties()))); }

Target:
public MetaTagDataLoader(final NodeDao nodeDao, final SessionUtils sessionUtils, final EntityScopeProvider entityScopeProvider) { this.nodeDao = Objects.requireNonNull(nodeDao, "nodeDao must not be null"); this.sessionUtils = Objects.requireNonNull(sessionUtils, "sessionUtils must not be null"); this.entityScopeProvider = Objects.requireNonNull(entityScopeProvider, "entityScopeProvider must not be null"); setConfig(new MetaTagConfiguration(Maps.fromProperties(System.getProperties()))); }
Source:
public static void store(Object entity) throws EntityStorageException { if (!entity.getClass().isAnnotationPresent(Entity.class)) { throw new EntityStorageException("Entity to store is missing the Entity annotation."); } try { Session session = openNewSession(); session.beginTransaction(); session.save(entity); session.getTransaction().commit(); session.close(); } catch (ConstraintViolationException e) { System.out.println("Coughed constraint violation exception"); } catch (HsqlException e) { System.out.println("Coughed generic exception"); } }

Target:
public static void store(Object entity) throws EntityStorageException { if (!entity.getClass().isAnnotationPresent(Entity.class)) { throw new EntityStorageException("Entity to store is missing the Entity annotation."); } Session session = openNewSession(); session.beginTransaction(); session.save(entity); session.getTransaction().commit(); session.close(); }
Source:
public TableInstance createImmutable(JdbcTableDefinition tableDefinition, TableHandle tableHandle) { TableName tableName = createImmutableTableName(tableHandle); LOGGER.debug("creating immutable table {}", tableName); if (!tableExists(tableName)) { createTable(tableDefinition, tableName); JdbcTableDataSource dataSource = tableDefinition.getDataSource(); insertData(tableName, dataSource); } return new JdbcTableInstance(tableName, tableDefinition); }

Target:
public TableInstance createImmutable(JdbcTableDefinition tableDefinition, TableHandle tableHandle) { TableName tableName = createImmutableTableName(tableHandle); LOGGER.debug("creating immutable table {}", tableName); if (!tableExists(tableName)) { createTable(tableDefinition, tableName); JdbcTableDataSource dataSource = tableDefinition.getDataSource(); insertData(tableName, dataSource); } else { LOGGER.info("Table already exists, skipping creation of immutable table", tableName.getNameInDatabase()); } return new JdbcTableInstance(tableName, tableDefinition); }
Source:
protected static void mountFromHostToContainer(GenericContainer container, String sourceDirectory, String targetDirectory) { String osName = System.getProperty("os.name").toLowerCase(); if (osName.startsWith("mac os x")) { MountableFile mountableDirectory = MountableFile.forHostPath(sourceDirectory); container.withCopyFileToContainer(mountableDirectory, targetDirectory); } else { container.withFileSystemBind(sourceDirectory, targetDirectory); } }

Target:
protected void mountFromHostToContainer(GenericContainer container, String sourceDirectory, String targetDirectory) { String osName = System.getProperty("os.name").toLowerCase(); if (osName.startsWith("mac os x")) { MountableFile mountableDirectory = MountableFile.forHostPath(sourceDirectory); container.withCopyFileToContainer(mountableDirectory, targetDirectory); } else { container.withFileSystemBind(sourceDirectory, targetDirectory); } }
Source:
private void handleTransferComplete(final FileTransfer fileTransfer) { this.activeFileTransfers.remove(fileTransfer); this.concurrentTransfersSemaphore.release(); System.out.println(">>> " + this.concurrentTransfersSemaphore.availablePermits()); }

Target:
private void handleTransferComplete(final FileTransfer fileTransfer) { this.activeFileTransfers.remove(fileTransfer); this.concurrentTransfersSemaphore.release(); }
Source:
protected void initializeClientConfiguration() { if (this.casPrefixUrl != null && !this.casPrefixUrl.endsWith("/")) { this.casPrefixUrl += "/"; } if (CommonHelper.isBlank(this.casPrefixUrl)) { this.casPrefixUrl = this.casLoginUrl.replaceFirst("/login$", "/$"); } else if (CommonHelper.isBlank(this.casLoginUrl)) { this.casLoginUrl = this.casPrefixUrl + "login"; } }

Target:
protected void initializeClientConfiguration() { if (this.casPrefixUrl != null && !this.casPrefixUrl.endsWith("/")) { this.casPrefixUrl += "/"; } if (CommonHelper.isBlank(this.casPrefixUrl)) { this.casPrefixUrl = this.casLoginUrl.replaceFirst("/login$", "/"); } else if (CommonHelper.isBlank(this.casLoginUrl)) { this.casLoginUrl = this.casPrefixUrl + "login"; } }
Source:
private ASTValue evalStatementList(WordsEnvironment environment) { for (int i = 0; i < children.size(); i++) { try { children.get(i).eval(environment); } catch (WordsException e) { System.err.println(e.toString()); System.err.print("> "); } } return null; }

Target:
private ASTValue evalStatementList(WordsEnvironment environment) { for (int i = 0; i < children.size(); i++) { try { children.get(i).eval(environment); } catch (WordsRuntimeException e) { WordsProgramException decoratedException = new WordsProgramException(children.get(i), e); System.err.println(); System.err.println(decoratedException); System.out.print("> "); } } return null; }
Source:
Aggregate<T> newInstance(Callable<T> factoryMethod) throws Exception; default Aggregate<T> loadOrCreate(String aggregateIdentifier, Long expectedVersion, Callable<T> factoryMethod) { throw new UnsupportedOperationException("loadOrCreate not implemented on this repository"); }

Target:
Aggregate<T> newInstance(Callable<T> factoryMethod) throws Exception; default Aggregate<T> loadOrCreate(String aggregateIdentifier, Callable<T> factoryMethod) throws Exception { throw new UnsupportedOperationException("loadOrCreate not implemented on this repository"); }
Source:
private List<Position> collectNoFormatCodePositions(IASTTranslationUnit translationUnit) { if (translationUnit == null || !this.preferences.use_fomatter_comment_tag) { return Collections.emptyList(); } String fileName = translationUnit.getFilePath(); if (fileName == null) { return Collections.emptyList(); } List<Position> positions = new ArrayList<>(); int inactiveCodeStart = -1; boolean inInactiveCode = false; Stack<Boolean> inactiveCodeStack = new Stack<>(); IASTComment[] commentsStmts = translationUnit.getComments(); for (IASTComment commentStmt : commentsStmts) { IASTComment statement = commentStmt; if (!statement.isPartOfTranslationUnitFile()) { continue; } IASTNodeLocation nodeLocation = statement.getFileLocation(); if (nodeLocation == null) { continue; } String coment = new String(statement.getComment()); if (coment.contains(this.preferences.comment_formatter_off_tag)) { inactiveCodeStack.push(Boolean.valueOf(inInactiveCode)); if (statement.isActive()) { if (!inInactiveCode) { inactiveCodeStart = nodeLocation.getNodeOffset() + nodeLocation.getNodeLength(); inInactiveCode = true; } } } else if (coment.contains(this.preferences.comment_formatter_on_tag)) { try { boolean wasInInactiveCode = inactiveCodeStack.pop().booleanValue(); if (inInactiveCode && !wasInInactiveCode) { int inactiveCodeEnd = nodeLocation.getNodeOffset(); positions.add(new Position(inactiveCodeStart, inactiveCodeEnd - inactiveCodeStart)); } inInactiveCode = wasInInactiveCode; } catch (EmptyStackException e) { } } } return positions; }

Target:
private List<Position> collectNoFormatCodePositions(IASTTranslationUnit translationUnit) { if (translationUnit == null || !this.preferences.use_fomatter_comment_tag) { return Collections.emptyList(); } String fileName = translationUnit.getFilePath(); if (fileName == null) { return Collections.emptyList(); } List<Position> positions = new ArrayList<>(); int inactiveCodeStart = -1; boolean inInactiveCode = false; IASTComment[] commentsStmts = translationUnit.getComments(); for (IASTComment commentStmt : commentsStmts) { IASTComment statement = commentStmt; if (!statement.isPartOfTranslationUnitFile()) { continue; } IASTNodeLocation nodeLocation = statement.getFileLocation(); if (nodeLocation == null) { continue; } String comment = new String(statement.getComment()); int offPos = comment.lastIndexOf(this.preferences.comment_formatter_off_tag); int onPos = comment.lastIndexOf(this.preferences.comment_formatter_on_tag); if (offPos != -1 && offPos > onPos) { if (!inInactiveCode) { inactiveCodeStart = nodeLocation.getNodeOffset() + nodeLocation.getNodeLength(); inInactiveCode = true; } } else if (onPos != -1 && onPos > offPos) { if (inInactiveCode) { int inactiveCodeEnd = nodeLocation.getNodeOffset(); positions.add(new Position(inactiveCodeStart, inactiveCodeEnd - inactiveCodeStart)); } inInactiveCode = false; } } return positions; }
Source:
public Mono<ShouldRetryResult> shouldRetry(Exception exception) { return this.retryWithRetryPolicy.shouldRetry(exception) .flatMap((retryWithResult) -> { if (retryWithResult.shouldRetry) { return Mono.just(retryWithResult); } return this.goneRetryPolicy.shouldRetry(exception) .flatMap((goneRetryResult) -> { if (!goneRetryResult.shouldRetry) { logger.warn("Operation will NOT be retried. Exception:", exception); stopStopWatch(this.durationTimer); } return Mono.just(goneRetryResult); }); }); }

Target:
public Mono<ShouldRetryResult> shouldRetry(Exception exception) { return this.retryWithRetryPolicy.shouldRetry(exception) .flatMap((retryWithResult) -> { if (retryWithResult.shouldRetry) { return Mono.just(retryWithResult); } return this.goneRetryPolicy.shouldRetry(exception) .flatMap((goneRetryResult) -> { if (!goneRetryResult.shouldRetry) { logger.debug("Operation will NOT be retried. Exception:", exception); this.end = Instant.now(); } return Mono.just(goneRetryResult); }); }); }
Source:
private Object fetchTaskStatusDetails() { GlusterVolumeTaskStatusEntity entity = null; VDSReturnValue returnValue = new VDSReturnValue(); try { returnValue = runVdsCommand(VDSCommandType.GetGlusterVolumeRebalanceStatus, new GlusterVolumeVDSParameters(getUpServerId(clusterId), volume.getName())); entity = (GlusterVolumeTaskStatusEntity) returnValue.getReturnValue(); List<Step> stepsList = getStepDao().getStepsByExternalId(asyncTask.getStepId()); if (stepsList != null && !stepsList.isEmpty()) { entity.setStartTime(stepsList.get(0).getStartTime()); } } catch (Exception err) { returnValue.setSucceeded(false); returnValue.setExceptionString(err.toString()); } return returnValue; }

Target:
private GlusterVolumeTaskStatusEntity fetchTaskStatusDetails() { VDSReturnValue returnValue = runVdsCommand(VDSCommandType.GetGlusterVolumeRebalanceStatus, new GlusterVolumeVDSParameters(getUpServerId(clusterId), volume.getName())); GlusterVolumeTaskStatusEntity entity = (GlusterVolumeTaskStatusEntity) returnValue.getReturnValue(); List<Step> stepsList = getStepDao().getStepsByExternalId(asyncTask.getTaskId()); if (stepsList != null && !stepsList.isEmpty()) { entity.setStartTime(stepsList.get(0).getStartTime()); } return entity; }
Source:
public void after() throws IOException { deployer.undeploy(PICKETLINK_STS); deployer.undeploy(PICKETLINK_STS_WS); }

Target:
public void after() throws Exception { deployer.undeploy(PICKETLINK_STS); deployer.undeploy(PICKETLINK_STS_WS); this.serverConfigurationCleanup(); }
Source:
public static int unsignedCompare(long left, long right) { final long a = left + Long.MIN_VALUE; final long b = right + Long.MIN_VALUE; return Long.valueOf(a).compareTo(Long.valueOf(b)); }

Target:
public static int unsignedCompare(long left, long right) { final long a = left + Long.MIN_VALUE; final long b = right + Long.MIN_VALUE; if (a < b) { return -1; } else if (a > b) { return 1; } return 0; }
Source:
public void cancelEveryFlowWithoutDbUpdate() { for (String resourceType : InMemoryResourceStateStore.getResourceTypes()) { for (Long resourceId : InMemoryResourceStateStore.getAllResourceId(resourceType)) { InMemoryResourceStateStore.putResource(resourceType, resourceId, PollGroup.CANCELLED); } } for (String id : runningFlows.getRunningFlowIds()) { String flowChainId = runningFlows.getFlowChainId(id); if (flowChainId != null) { flowChains.removeFullFlowChain(flowChainId); } runningFlows.remove(id); } }

Target:
public void cancelEveryFlowWithoutDbUpdate() { for (String resourceType : InMemoryResourceStateStore.getResourceTypes()) { for (Long resourceId : InMemoryResourceStateStore.getAllResourceId(resourceType)) { InMemoryResourceStateStore.putResource(resourceType, resourceId, PollGroup.CANCELLED); } } for (String id : runningFlows.getRunningFlowIds()) { cancelFlowWithoutDbUpdate(id); } }
Source:
public PageContent createPageContent(final Cart cart, final Form<? extends AddDiscountCodeFormData> form) { final CartPageContent cartPageContent = pageContentFactory.create(cart); cartPageContent.getCart().setAddDiscountCodeForm(form); return cartPageContent; }

Target:
public PageContent createPageContent(final Cart cart, final Form<? extends AddDiscountCodeFormData> form) { final CartPageContent cartPageContent = pageContentFactory.create(cart, form); return cartPageContent; }
Source:
public List<HostAndPort> getAddresses() { return Collections.singletonList(address); }

Target:
public List<HostAndPort> getAddresses() { return ImmutableList.of(address); }
Source:
public void close() { try { closer.close(); closed = true; } catch (IOException e) { throw new RuntimeException(e); } }

Target:
public void close() { try { closer.close(); closed = true; } catch (IOException e) { throw new UncheckedIOException(e); } }
Source:
public void notifyData(Collection<Data> data) { if (distributed) { NotifyData nData = new NotifyData(currentNode, data, Data.class); Integer key = nData.hashCode(); if (log.isDebugEnabled()) { log.debugf("Sending data [%s]", nData); } dataCache.getAdvancedCache().withFlags(Flag.IGNORE_RETURN_VALUES) .putAsync(key, nData, LIFESPAN, TimeUnit.MILLISECONDS); } }

Target:
public void notifyData(Collection<Data> data) { if (distributed) { NotifyData nData = new NotifyData(currentNode, data, Data.class); Integer key = nData.hashCode(); log.debugf("Sending data [%s]", nData); dataCache.getAdvancedCache().withFlags(Flag.IGNORE_RETURN_VALUES) .putAsync(key, nData, LIFESPAN, TimeUnit.MILLISECONDS); } }
Source:
public void convertToMavenProject(String projectName, String defaultPackaging, boolean withDependencies){ PackageExplorerPart pexplorer = new PackageExplorerPart(); pexplorer.open(); new WaitUntil(new ProjectExists(projectName)); pexplorer.getProject(projectName).select(); new ContextMenuItem("Configure","Convert to Maven Project").select(); AbstractWait.sleep(TimePeriod.DEFAULT); new DefaultShell("Create new POM"); assertEquals("Project " +projectName+" packaging should be set to "+defaultPackaging, defaultPackaging, new LabeledCombo(new DefaultGroup("Artifact"),"Packaging:").getText()); new PushButton("Finish").click(); try{ new DefaultShell("Convert to Maven Dependencies"); new WaitUntil(new ControlIsEnabled(new PushButton("Finish")), TimePeriod.LONG); if(withDependencies){ new PushButton("Finish").click(); } else { new PushButton("Skip Dependency Conversion").click(); } new WaitWhile(new ShellIsAvailable("Convert to Maven Dependencies")); } catch (CoreLayerException ex){ } finally { new WaitWhile(new ShellIsAvailable("Create new POM")); new WaitWhile(new JobIsRunning(),TimePeriod.VERY_LONG); } }

Target:
public void convertToMavenProject(String projectName, String defaultPackaging, boolean withDependencies){ PackageExplorerPart pexplorer = new PackageExplorerPart(); pexplorer.open(); new WaitUntil(new ProjectExists(projectName)); pexplorer.getProject(projectName).select(); new ContextMenuItem("Configure","Convert to Maven Project").select(); new DefaultShell("Create new POM"); assertEquals("Project " +projectName+" packaging should be set to "+defaultPackaging, defaultPackaging, new LabeledCombo(new DefaultGroup("Artifact"),"Packaging:").getText()); new PushButton("Finish").click(); try{ new DefaultShell("Convert to Maven Dependencies"); new WaitUntil(new ControlIsEnabled(new PushButton("Finish")), TimePeriod.LONG); if(withDependencies){ new PushButton("Finish").click(); } else { new PushButton("Skip Dependency Conversion").click(); } new WaitWhile(new ShellIsAvailable("Convert to Maven Dependencies")); } catch (CoreLayerException ex){ } finally { new WaitWhile(new ShellIsAvailable("Create new POM")); new WaitWhile(new JobIsRunning(),TimePeriod.VERY_LONG); } }
Source:
private org.osgi.service.cm.Configuration getConfigurationWithContext(String serviceId) throws IOException, InvalidSyntaxException { org.osgi.service.cm.Configuration[] configs = configurationAdmin .listConfigurations("(&(service.pid=" + serviceId + "))"); if (configs == null) { return null; } if (configs.length > 1) { throw new IllegalStateException("More than one configuration with PID " + serviceId + " exists"); } return configs[0]; }

Target:
private org.osgi.service.cm.Configuration getConfigurationWithContext(String serviceId) throws IOException, InvalidSyntaxException { org.osgi.service.cm.Configuration[] configs = configurationAdmin .listConfigurations("(&(" + Constants.SERVICE_PID + "=" + serviceId + "))"); if (configs == null) { return null; } if (configs.length > 1) { throw new IllegalStateException("More than one configuration with PID " + serviceId + " exists"); } return configs[0]; }
Source:
private void setUpDefaults() { if (Android.isDebugging()) { hostEdit.append(BackendEndpoints.Community.HOST); portEdit.append(BackendEndpoints.Community.PORT); } }

Target:
private void setUpDefaults() { if (Android.isDebugging()) { hostEdit.setText(BackendEndpoints.Community.HOST); portEdit.setText(BackendEndpoints.Community.PORT); } }
Source:
public void transform(NodeType node) { String versionLabel = componentType.getVersionParameter(); String distributionLabel = componentType.getDistributionParameter(); if (!versionsLabel.contains(ComponentUtilities.getNodePropertyValue(node, versionLabel))) { ComponentUtilities.setNodeValue(node, distributionLabel, DEFAULT_DISTRIBUTION); ComponentUtilities.setNodeValue(node, versionLabel, DEFAULT_VERSION); } }

Target:
public void transform(NodeType node) { String versionLabel = componentType.getVersionParameter(); String distributionLabel = componentType.name(); if (!versionsLabel.contains(ComponentUtilities.getNodePropertyValue(node, versionLabel))) { try { ComponentUtilities.setNodeValue(node, distributionLabel, DEFAULT_DISTRIBUTION); }catch(IllegalArgumentException distException) { distException.printStackTrace(); } try { ComponentUtilities.setNodeValue(node, versionLabel, defaultVersion); }catch(IllegalArgumentException versionException) { versionException.printStackTrace(); } } }
Source:
private void setUpDaoMocks() { when(diskDao.getAllFromDisksIncludingSnapshotsByDiskId(diskWithSnapshots.getId(), getUser().getId(), getQueryParameters().isFiltered())).thenReturn(getDiskWithSnapshotsList()); disksMap.keySet().forEach(diskId -> when(diskDao.getAllFromDisksIncludingSnapshotsByDiskId(diskId, getUser().getId(), getQueryParameters().isFiltered())).thenReturn(Collections.singletonList(disksMap.get(diskId))) ); }

Target:
private void setUpDaoMocks() { when(diskDao.getAllFromDisksIncludingSnapshotsByDiskId(diskWithSnapshots.getId(), getUser().getId(), getQueryParameters().isFiltered())).thenReturn(getDiskWithSnapshotsList()); disksMap.keySet().stream().filter(diskId -> !diskId.equals(diskWithSnapshots.getId())).forEach(diskId -> when(diskDao.getAllFromDisksIncludingSnapshotsByDiskId(diskId, getUser().getId(), getQueryParameters().isFiltered())).thenReturn(Collections.singletonList(disksMap.get(diskId))) ); }
Source:
public AuthConfig lookupAuthConfig(DockerImageName dockerImageName) { log.debug("Looking up auth config for image: {}", dockerImageName); log.debug("RegistryAuthLocator has configFile: ({}) and commandPathPrefix: {}", configFile, configFile.exists() ? "exists" : "does not exist", commandPathPrefix); try { final JsonNode config = OBJECT_MAPPER.readTree(configFile); final String reposName = dockerImageName.getRegistry(); final AuthConfig existingAuthConfig = findExistingAuthConfig(config, reposName); if (existingAuthConfig != null) { return existingAuthConfig; } final AuthConfig helperAuthConfig = authConfigUsingHelper(config, reposName); if (helperAuthConfig != null) { return helperAuthConfig; } final AuthConfig storeAuthConfig = authConfigUsingStore(config, reposName); if (storeAuthConfig != null) { return storeAuthConfig; } } catch (Exception e) { log.error("Failure when attempting to lookup auth config (dockerImageName: {}, configFile: {}. " + "Falling back to docker-java default behaviour", dockerImageName, configFile, e); } return defaultAuthConfig; }

Target:
public AuthConfig lookupAuthConfig(DockerImageName dockerImageName) { if (SystemUtils.IS_OS_WINDOWS) { log.debug("RegistryAuthLocator is not supported on Windows. Please help test or improve it and update " + "<LINK_0>"); return defaultAuthConfig; } log.debug("Looking up auth config for image: {}", dockerImageName); log.debug("RegistryAuthLocator has configFile: ({}) and commandPathPrefix: {}", configFile, configFile.exists() ? "exists" : "does not exist", commandPathPrefix); try { final JsonNode config = OBJECT_MAPPER.readTree(configFile); final String reposName = dockerImageName.getRegistry(); final AuthConfig existingAuthConfig = findExistingAuthConfig(config, reposName); if (existingAuthConfig != null) { return existingAuthConfig; } final AuthConfig helperAuthConfig = authConfigUsingHelper(config, reposName); if (helperAuthConfig != null) { return helperAuthConfig; } final AuthConfig storeAuthConfig = authConfigUsingStore(config, reposName); if (storeAuthConfig != null) { return storeAuthConfig; } } catch (Exception e) { log.error("Failure when attempting to lookup auth config (dockerImageName: {}, configFile: {}. " + "Falling back to docker-java default behaviour", dockerImageName, configFile, e); } return defaultAuthConfig; }
Source:
public static long[][] filterGridLocs(StorageBroker sb, SecurityDispatcher secDisp, TileLayer tileLayer, String gridSetId, MimeType mime, long[][] linkGridLocs) throws GeoWebCacheException { for(int i=0;i<linkGridLocs.length; i++) { if(linkGridLocs[i][2] > 0) { ConveyorTile tile = new ConveyorTile(sb, tileLayer.getName(), gridSetId, linkGridLocs[i], mime, null, null, null); try { tile.setTileLayer(tileLayer); secDisp.checkSecurity(tile); tileLayer.applyRequestFilters(tile); } catch(SecurityException ex) { linkGridLocs[i][2] = -1; } catch(GreenTileException e) { } catch(RequestFilterException e) { linkGridLocs[i][2] = -1; continue; } if (mime.equals(XMLMime.kml)) { try { tileLayer.getTile(tile); } catch (IOException ioe) { log.error(ioe.getMessage()); linkGridLocs[i][2] = -1; } catch (GeoWebCacheException gwce) { linkGridLocs[i][2] = -1; } if (tile.getStatus() == 204) { linkGridLocs[i][2] = -1; } else if (tile.getStatus() != 200) { throw new GeoWebCacheException( "Unexpected response code from server " + tile.getStatus()); } } } } return linkGridLocs; }

Target:
public static long[][] filterGridLocs(StorageBroker sb, SecurityDispatcher secDisp, TileLayer tileLayer, String gridSetId, MimeType mime, long[][] linkGridLocs) throws GeoWebCacheException { for(int i=0;i<linkGridLocs.length; i++) { if(linkGridLocs[i][2] > 0) { ConveyorTile tile = new ConveyorTile(sb, tileLayer.getName(), gridSetId, linkGridLocs[i], mime, null, null, null); tile.setTileLayer(tileLayer); try { secDisp.checkSecurity(tile); tileLayer.applyRequestFilters(tile); } catch(SecurityException ex) { linkGridLocs[i][2] = -1; } catch(GreenTileException e) { } catch(RequestFilterException e) { linkGridLocs[i][2] = -1; continue; } if (mime.equals(XMLMime.kml)) { try { tileLayer.getTile(tile); } catch (IOException ioe) { log.error(ioe.getMessage()); linkGridLocs[i][2] = -1; } catch (GeoWebCacheException gwce) { linkGridLocs[i][2] = -1; } if (tile.getStatus() == 204) { linkGridLocs[i][2] = -1; } else if (tile.getStatus() != 200) { throw new GeoWebCacheException( "Unexpected response code from server " + tile.getStatus()); } } } } return linkGridLocs; }
Source:
public String toString() { final StringBuilder sb = new StringBuilder("StreamResponseCommand{"); sb.append(", id=").append(id); sb.append("complete=").append(complete); sb.append(", response=").append(response); sb.append('}'); return sb.toString(); }

Target:
public String toString() { final StringBuilder sb = new StringBuilder("StreamResponseCommand{"); sb.append("id=").append(id); sb.append(", complete=").append(complete); sb.append(", response=").append(response); sb.append('}'); return sb.toString(); }
Source:
public void flattenModule(LogicalPlan parentDAG, Configuration conf) { module.populateDAG(dag, conf); for (ModuleMeta subModuleMeta : dag.getAllModules()) { subModuleMeta.flattenModule(dag, conf); subModuleMeta.setParentModuleName(this.name); } dag.applyStreamLinks(); parentDAG.addDAGToCurrentDAG(dag, this.name); }

Target:
public void flattenModule(LogicalPlan parentDAG, Configuration conf) { module.populateDAG(dag, conf); for (ModuleMeta subModuleMeta : dag.getAllModules()) { subModuleMeta.setParent(this); subModuleMeta.flattenModule(dag, conf); } dag.applyStreamLinks(); parentDAG.addDAGToCurrentDAG(this); }
Source:
protected void onPushOpen(Context context, Intent intent) { super.onPushOpen(context, intent); final CourseUpdateNotificationPayload payload = ParseHandleHelper.extractPayload(intent); final String courseId = payload == null ? "" : payload.getCourseId(); EventBus.getDefault().postSticky(new CourseAnnouncementEvent( CourseAnnouncementEvent.EventType.MESSAGE_TAPPED, courseId)); Class activity = ParseHandleHelper.getActivityClass(payload); if (activity == CourseDetailTabActivity.class) { Bundle courseBundle = new Bundle(); courseBundle.putBoolean(Router.EXTRA_ANNOUNCEMENTS, true); courseBundle.putString(Router.EXTRA_COURSE_ID, payload.getCourseId()); Intent resultIntent = new Intent(context, CourseDetailTabActivity.class); resultIntent.setAction(Long.toString(System.currentTimeMillis())); resultIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS); resultIntent.putExtra(Router.EXTRA_BUNDLE, courseBundle); context.startActivity(resultIntent); } }

Target:
protected void onPushOpen(Context context, Intent intent) { ParseAnalytics.trackAppOpenedInBackground(intent); final BaseNotificationPayload payload = ParseHandleHelper.extractPayload(intent); if (null != payload && null != payload.getAction()) { switch (payload.getAction()) { case ParseHandleHelper.COURSE_ANNOUNCEMENT_ACTION: { final String courseId = ((CourseUpdateNotificationPayload) payload).getCourseId(); segment.trackNotificationTapped(courseId); router.showCourseAnnouncementFromNotification(context, courseId); return; } } } segment.trackNotificationTapped(null); context.startActivity(new Intent(context, MyCoursesListActivity.class)); }
Source:
public void createTable(TableElement tableDef) throws OseeCoreException { String toExecute = "CREATE TABLE " + tableDef.getName() + " ( \n"; toExecute += handleColumnCreationSection(tableDef.getColumns()); toExecute += handleConstraintCreationSection(tableDef.getConstraints(), tableDef.getFullyQualifiedTableName()); toExecute += handleConstraintCreationSection(tableDef.getForeignKeyConstraints(), tableDef.getFullyQualifiedTableName()); toExecute += " \n)\n"; getLogger().debug("Creating Table: [%s]", tableDef.getFullyQualifiedTableName()); ConnectionHandler.runPreparedUpdate(toExecute); }

Target:
public void createTable(TableElement tableDef) throws OseeCoreException { StringBuilder builder = new StringBuilder(); builder.append("CREATE TABLE ").append(tableDef.getName()).append(" ( \n"); builder.append(handleColumnCreationSection(tableDef.getColumns())); builder.append(handleConstraintCreationSection(tableDef.getConstraints(), tableDef.getFullyQualifiedTableName())); builder.append(handleConstraintCreationSection(tableDef.getForeignKeyConstraints(), tableDef.getFullyQualifiedTableName())); builder.append(" \n)\n"); getLogger().debug("Creating Table: [%s]", tableDef.getFullyQualifiedTableName()); ConnectionHandler.runPreparedUpdate(builder.toString()); }
Source:
@WorkerThread @Override public void onMessage(RelayMessage message) { kitty.trace("→ onMessage(%s)", message.getID()); String id = message.getID(); SendMessageWithPromiseEvent callbackEvent = promiseCallbacks.get(id); promiseCallbacks.remove(id); if (state.contains(STATE.STOPPED)) { if (callbackEvent != null) { callbackEvent.future.cancel(true); } return; } ping.onMessage(); RelayObject[] objects = message.getObjects() == null ? NULL : message.getObjects(); if (callbackEvent != null) { callbackEvent.future.complete(objects); for (RelayObject object : objects) BufferList.handleMessage(object, callbackEvent.originalMessageId); } else { for (RelayObject object : objects) BufferList.handleMessage(object, id); } }

Target:
@WorkerThread @Override public void onMessage(RelayMessage message) { kitty.trace("→ onMessage(%s)", message.getID()); if (state.contains(STATE.STOPPED)) return; ping.onMessage(); RelayObject[] objects = message.getObjects() == null ? NULL : message.getObjects(); String id = message.getID(); for (RelayObject object : objects) BufferList.handleMessage(object, id); }
Source:
public Map<String, RangeSet<String>> getDomain() { Map<String, RangeSet<String>> retMap = new HashMap<>(); Range<String> range; if (start == null && end == null) { range = Range.all(); } else if (start == null) { range = Range.atMost(end); } else if (end == null) { range = Range.atLeast(start); } else { range = Range.closed(start, end); } retMap.put(dimension, ImmutableRangeSet.of(range)); return retMap; }

Target:
public Map<String, Range<String>> getDomain() { Range<String> range; if (start == null && end == null) { range = Range.all(); } else if (start == null) { range = Range.atMost(end); } else if (end == null) { range = Range.atLeast(start); } else { range = Range.closed(start, end); } return ImmutableMap.of(dimension, range); }