auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public MathJaxBackgroundRenderer(MathJax mathjax, DocDisplay docDisplay) { mathjax_ = mathjax; docDisplay_ = docDisplay; renderTimer_ = new Timer() { @Override public void run() { Range range = MathJaxUtil.getLatexRange(docDisplay_); if (range == null) return; mathjax_.renderLatex(range, true); } }; docDisplay_.addFocusHandler(new FocusHandler() { @Override public void onFocus(FocusEvent event) { beginMonitoring(); } }); docDisplay_.addEditorModeChangedHandler(new EditorModeChangedEvent.Handler() { @Override public void onEditorModeChanged(EditorModeChangedEvent event) { beginMonitoring(); } }); docDisplay_.addBlurHandler(new BlurHandler() { @Override public void onBlur(BlurEvent event) { endMonitoring(); } }); }

Target:
public MathJaxBackgroundRenderer(MathJax mathjax, DocDisplay docDisplay) { mathjax_ = mathjax; docDisplay_ = docDisplay; handlers_ = new ArrayList<HandlerRegistration>(); renderTimer_ = new Timer() { @Override public void run() { Range range = MathJaxUtil.getLatexRange(docDisplay_); if (range == null) return; mathjax_.renderLatex(range, true); } }; handlers_.add(docDisplay_.addFocusHandler(new FocusHandler() { @Override public void onFocus(FocusEvent event) { beginMonitoring(); } })); handlers_.add(docDisplay_.addEditorModeChangedHandler(new EditorModeChangedEvent.Handler() { @Override public void onEditorModeChanged(EditorModeChangedEvent event) { beginMonitoring(); } })); handlers_.add(docDisplay_.addBlurHandler(new BlurHandler() { @Override public void onBlur(BlurEvent event) { endMonitoring(); } })); handlers_.add(docDisplay_.addAttachHandler(new AttachEvent.Handler() { @Override public void onAttachOrDetach(AttachEvent event) { if (!event.isAttached()) resetHandlers(); } })); }
Source:
private FBO getFbo() { return frameBuffersManager.get(fboName); }

Target:
private FBO getFbo() { return fboManager.get(fboName); }
Source:
public boolean getScenes(VeluxBridge bridge) { logger.trace("getScenes() called."); GetScenes bcp = bridge.bridgeAPI().getScenes(); if ((bridge.bridgeCommunicate(bcp)) && (bcp.isCommunicationSuccessful())) { for (VeluxScene scene : bcp.getScenes()) { logger.trace("getScenes() found scene {}.", scene.toString()); VeluxScene veluxScene = new VeluxScene(scene); logger.trace("getScenes() storing scene {}.", veluxScene); if (!channel.existingScenes.isRegistered(veluxScene)) { channel.existingScenes.register(veluxScene); } logger.trace("getScenes() stored scene {}.", veluxScene); } logger.debug("getScenes() finally has found scenes {}.", channel.existingScenes); return true; } else { logger.trace("getScenes() finished with failure."); return false; } }

Target:
public boolean getScenes(VeluxBridge bridge) { logger.trace("getScenes() called."); GetScenes bcp = bridge.bridgeAPI().getScenes(); if (bridge.bridgeCommunicate(bcp) && bcp.isCommunicationSuccessful()) { for (VeluxScene scene : bcp.getScenes()) { logger.trace("getScenes() found scene {}.", scene.toString()); VeluxScene veluxScene = new VeluxScene(scene); logger.trace("getScenes() storing scene {}.", veluxScene); if (!channel.existingScenes.isRegistered(veluxScene)) { channel.existingScenes.register(veluxScene); } logger.trace("getScenes() stored scene {}.", veluxScene); } logger.debug("getScenes() finally has found scenes {}.", channel.existingScenes); return true; } else { logger.trace("getScenes() finished with failure."); return false; } }
Source:
public void setup(HttpClient httpClient, ConfigurationServiceVersion serviceVersion) throws InvalidKeyException, NoSuchAlgorithmException { if (interceptorManager.isPlaybackMode()) { connectionString = "Endpoint=http://localhost:8080;Id=0000000000000;Secret=MDAwMDAw"; String endpoint = new ConfigurationClientCredentials(connectionString).getBaseUri(); client = new ConfigurationClientBuilder() .connectionString(connectionString) .endpoint(endpoint) .httpClient(interceptorManager.getPlaybackClient()) .buildClient(); } else { connectionString = Configuration.getGlobalConfiguration().get(AZURE_APPCONFIG_CONNECTION_STRING); tokenCredential = new DefaultAzureCredentialBuilder().build(); String endpoint = new ConfigurationClientCredentials(connectionString).getBaseUri(); client = new ConfigurationClientBuilder() .httpClient(httpClient) .credential(tokenCredential) .endpoint(endpoint) .addPolicy(interceptorManager.getRecordPolicy()) .serviceVersion(serviceVersion) .buildClient(); } }

Target:
private void setup(HttpClient httpClient, ConfigurationServiceVersion serviceVersion) throws InvalidKeyException, NoSuchAlgorithmException { if (interceptorManager.isPlaybackMode()) { connectionString = "Endpoint=http://localhost:8080;Id=0000000000000;Secret=MDAwMDAw"; String endpoint = new ConfigurationClientCredentials(connectionString).getBaseUri(); client = new ConfigurationClientBuilder() .connectionString(connectionString) .endpoint(endpoint) .httpClient(interceptorManager.getPlaybackClient()) .buildClient(); } else { connectionString = Configuration.getGlobalConfiguration().get(AZURE_APPCONFIG_CONNECTION_STRING); tokenCredential = new DefaultAzureCredentialBuilder().build(); String endpoint = new ConfigurationClientCredentials(connectionString).getBaseUri(); client = new ConfigurationClientBuilder() .httpClient(httpClient) .credential(tokenCredential) .endpoint(endpoint) .addPolicy(interceptorManager.getRecordPolicy()) .serviceVersion(serviceVersion) .buildClient(); } }
Source:
public static String getDistanceUnit(long userId) { String unit = Context.getPermissionsManager().getUser(userId).getDistanceUnit(); if (unit == null || Context.getPermissionsManager().getServer().getForceSettings()) { unit = Context.getPermissionsManager().getServer().getDistanceUnit(); } return unit != null ? unit : "km"; }

Target:
public static String getDistanceUnit(long userId) { return (String) Context.getPermissionsManager().lookupPreference(userId, "distanceUnit", "km"); }
Source:
public static Router loadGraph(GraphConfig config) { File graphFile = new File(config.getPath(), GRAPH_FILENAME); LOG.info("Loading graph from file '{}'", graphFile.getPath()); try (InputStream is = new FileInputStream(graphFile)) { final Graph newGraph = Graph.load(is); JsonNode jsonConfig = config.routerConfig(newGraph.routerConfig); Router newRouter = new Router(newGraph); newRouter.startup(jsonConfig); return newRouter; } catch (Exception e) { LOG.error("Exception while loading graph: {}", e); return null; } }

Target:
public static Router loadGraph(GraphConfig config) { File graphFile = new File(config.getPath(), GRAPH_FILENAME); LOG.info("Loading graph from file '{}'", graphFile.getPath()); try (InputStream is = new FileInputStream(graphFile)) { Graph newGraph = Graph.load(is); JsonNode jsonConfig = config.routerConfig(newGraph.routerConfig); Router newRouter = new Router(newGraph); newRouter.startup(jsonConfig); return newRouter; } catch (Exception e) { LOG.error("Exception while loading graph: {}", e); return null; } }
Source:
private void assertReplicationFactorMismatchError(Exception ex) { assertThat(ex.getMessage(), is("Your current Cassandra keyspace (atlasdb) has a replication " + "factor not matching your Atlas Cassandra configuration. Change them to match, but be mindful" + " of what steps you'll need to take to correctly repair or cleanup existing data in your " + "cluster.")); }

Target:
private void assertReplicationFactorMismatchError(Exception ex) { assertThat(ex.getMessage(), is("Your current Cassandra keyspace (atlasdb) has a replication" + " factor not matching your Atlas Cassandra configuration. Change them to match, but be mindful" + " of what steps you'll need to take to correctly repair or cleanup existing data in your cluster.")); }
Source:
public void build() throws ConversionException { final List<BaseColumn> expandedColumns = dtable.getExpandedColumns(); for (int sourceIndex = 0; sourceIndex < expandedColumns.size(); sourceIndex++) { final BaseColumn baseColumn = expandedColumns.get(sourceIndex); if (baseColumn instanceof AttributeCol52) { makeAttribute((AttributeCol52) baseColumn); } else if (baseColumn instanceof MetadataCol52) { } else if (baseColumn instanceof ConditionCol52) { makeCondition((ConditionCol52) baseColumn); } else if (baseColumn instanceof ActionCol52) { makeAction(baseColumn); } else if (baseColumn instanceof RowNumberCol52) { continue; } else if (baseColumn instanceof DescriptionCol52) { } else { throw new IllegalArgumentException("TODO REMOTE THIS"); } columnIndex++; } }

Target:
public void build() { final List<BaseColumn> expandedColumns = dtable.getExpandedColumns(); for (int sourceIndex = 0; sourceIndex < expandedColumns.size(); sourceIndex++) { final BaseColumn baseColumn = expandedColumns.get(sourceIndex); if (baseColumn instanceof AttributeCol52) { makeAttribute((AttributeCol52) baseColumn); } else if (baseColumn instanceof MetadataCol52) { } else if (baseColumn instanceof ConditionCol52) { makeCondition((ConditionCol52) baseColumn); } else if (baseColumn instanceof ActionCol52) { makeAction(baseColumn); } else if (baseColumn instanceof RowNumberCol52) { continue; } else if (baseColumn instanceof DescriptionCol52) { } else { throw new IllegalArgumentException("TODO REMOTE THIS"); } columnIndex++; } }
Source:
public void canCreateAndListIndexerNames() { String indexName = createIndex(); String dataSourceName = createDataSource(); SearchIndexer indexer1 = createBaseTestIndexerObject(indexName, dataSourceName); indexer1.setName("a" + indexer1.getName()); SearchIndexer indexer2 = createBaseTestIndexerObject(indexName, dataSourceName); indexer2.setName("b" + indexer2.getName()); searchIndexerClient.createIndexer(indexer1); indexersToDelete.add(indexer1.getName()); searchIndexerClient.createIndexer(indexer2); indexersToDelete.add(indexer2.getName()); Iterator<String> indexersRes = searchIndexerClient.listIndexerNames(Context.NONE) .iterator(); String actualIndexer = indexersRes.next(); assertNotNull(actualIndexer); assertEquals(indexer1.getName(), actualIndexer); actualIndexer = indexersRes.next(); assertNotNull(actualIndexer); assertEquals(indexer2.getName(), actualIndexer); assertFalse(indexersRes.hasNext()); }

Target:
public void canCreateAndListIndexerNames() { String indexName = createIndex(); String dataSourceName = createDataSource(); SearchIndexer indexer1 = createBaseTestIndexerObject(indexName, dataSourceName); mutateName(indexer1, "a" + indexer1.getName()); SearchIndexer indexer2 = createBaseTestIndexerObject(indexName, dataSourceName); mutateName(indexer2, "b" + indexer2.getName()); searchIndexerClient.createIndexer(indexer1); indexersToDelete.add(indexer1.getName()); searchIndexerClient.createIndexer(indexer2); indexersToDelete.add(indexer2.getName()); Iterator<String> indexersRes = searchIndexerClient.listIndexerNames(Context.NONE) .iterator(); String actualIndexer = indexersRes.next(); assertNotNull(actualIndexer); assertEquals(indexer1.getName(), actualIndexer); actualIndexer = indexersRes.next(); assertNotNull(actualIndexer); assertEquals(indexer2.getName(), actualIndexer); assertFalse(indexersRes.hasNext()); }
Source:
public Map<Integer, String> getInstanceIdLocationIdMap(final List<Integer> instanceIds) { Map<Integer, String> instanceIdLocationIdMap = new HashMap<>(); final StringBuilder sql = new StringBuilder().append("SELECT ").append(" geo.nd_geolocation_id as instanceId, geo.value as value ").append("FROM ") .append(" nd_geolocationprop geo ").append("WHERE ").append(" geo.nd_geolocation_id in (:geolocationIds) ") .append(" AND geo.type_id = 8190"); try { final Query query = this.getSession().createSQLQuery(sql.toString()).addScalar("instanceId").addScalar("value").setParameterList("geolocationIds", instanceIds); final List<Object> results = query.list(); for (final Object obj : results) { final Object[] row = (Object[]) obj; instanceIdLocationIdMap.put((Integer) row[0], (String) row[1]); } return instanceIdLocationIdMap; } catch (final MiddlewareQueryException e) { final String message = "Error with getInstanceIdLocationIdMap() query from instanceIds: " + instanceIds; GeolocationPropertyDao.LOG.error(message, e); throw new MiddlewareQueryException(message, e); } }

Target:
public Map<Integer, String> getInstanceIdLocationIdMap(final List<Integer> instanceIds) { Map<Integer, String> instanceIdLocationIdMap = new HashMap<>(); final StringBuilder sql = new StringBuilder().append("SELECT ").append(" geo.nd_geolocation_id as instanceId, geo.value as value ").append("FROM ") .append(" nd_geolocationprop geo ").append("WHERE ").append(" geo.nd_geolocation_id in (:geolocationIds) ") .append(" AND geo.type_id = :locationVariableId"); try { final Query query = this.getSession().createSQLQuery(sql.toString()).addScalar("instanceId").addScalar("value") .setParameterList("geolocationIds", instanceIds).setParameter("locationVariableId", TermId.LOCATION_ID.getId()); final List<Object> results = query.list(); for (final Object obj : results) { final Object[] row = (Object[]) obj; instanceIdLocationIdMap.put((Integer) row[0], (String) row[1]); } return instanceIdLocationIdMap; } catch (final MiddlewareQueryException e) { final String message = "Error with getInstanceIdLocationIdMap() query from instanceIds: " + instanceIds; GeolocationPropertyDao.LOG.error(message, e); throw new MiddlewareQueryException(message, e); } }
Source:
public void onNext(final PullResponseItem item) { super.onNext(item); String status = item.getStatus(); String id = item.getId(); if (item.getProgressDetail() != null) { allLayers.add(id); } if (status != null && status.equalsIgnoreCase("Download complete")) { downloadedLayers.add(id); } if (status != null && status.equalsIgnoreCase("Pull complete")) { pulledLayers.add(id); } if (item.getProgressDetail() != null) { Long total = item.getProgressDetail().getTotal(); Long current = item.getProgressDetail().getCurrent(); if (total != null && total > totalSizes.getOrDefault(id, 0L)) { totalSizes.put(id, total); } if (current != null && current > currentSizes.getOrDefault(id, 0L)) { currentSizes.put(id, current); } } if (status != null && (status.startsWith("Pulling from") || status.contains("complete"))) { long totalSize = totalLayerSize(); long currentSize = downloadedLayerSize(); int pendingCount = allLayers.size() - downloadedLayers.size(); String friendlyTotalSize; if (pendingCount > 0) { friendlyTotalSize = "? MB"; } else { friendlyTotalSize = byteCountToDisplaySize(totalSize); } logger.info("Pulling image layers: pending, downloaded, extracted, ({}/{})", format("%2d", pendingCount), format("%2d", downloadedLayers.size()), format("%2d", pulledLayers.size()), byteCountToDisplaySize(currentSize), friendlyTotalSize); } if (status != null && status.contains("complete")) { completed = true; } }

Target:
public void onNext(final PullResponseItem item) { super.onNext(item); final String statusLowercase = item.getStatus() != null ? item.getStatus().toLowerCase() : ""; final String id = item.getId(); if (item.getProgressDetail() != null) { allLayers.add(id); } if (statusLowercase.equalsIgnoreCase("download complete")) { downloadedLayers.add(id); } if (statusLowercase.equalsIgnoreCase("pull complete")) { pulledLayers.add(id); } if (item.getProgressDetail() != null) { Long total = item.getProgressDetail().getTotal(); Long current = item.getProgressDetail().getCurrent(); if (total != null && total > totalSizes.getOrDefault(id, 0L)) { totalSizes.put(id, total); } if (current != null && current > currentSizes.getOrDefault(id, 0L)) { currentSizes.put(id, current); } } if (statusLowercase.startsWith("pulling from" ) || statusLowercase.contains("complete" )) { long totalSize = totalLayerSize(); long currentSize = downloadedLayerSize(); int pendingCount = allLayers.size() - downloadedLayers.size(); String friendlyTotalSize; if (pendingCount > 0) { friendlyTotalSize = "? MB"; } else { friendlyTotalSize = byteCountToDisplaySize(totalSize); } logger.info("Pulling image layers: pending, downloaded, extracted, ({}/{})", format("%2d", pendingCount), format("%2d", downloadedLayers.size()), format("%2d", pulledLayers.size()), byteCountToDisplaySize(currentSize), friendlyTotalSize); } if (statusLowercase.contains("complete")) { completed = true; } }
Source:
public SuccessOrFailure isReady(DockerComposeRule rule) { return SuccessOrFailure.onResultOf(() -> CassandraKeyValueServiceImpl.createForTesting(getConfig()) .isInitialized()); }

Target:
public SuccessOrFailure isReady(DockerComposeRule rule) { try (CassandraKeyValueService cassandraKeyValueService = CassandraKeyValueServiceImpl.createForTesting( getConfigWithProxy(Containers.getSocksProxy(name).address()))) { return SuccessOrFailure.onResultOf(cassandraKeyValueService::isInitialized); } catch (Exception e) { return SuccessOrFailure.failure(e.getMessage()); } }
Source:
public void open(final InputStream stream) throws IOException, DbException { buffer = new TupleBatchBuffer(getSchema()); InputStream inputStream; inputStream = new BufferedInputStream(stream); if (isLittleEndian) { dataInput = new LittleEndianDataInputStream(inputStream); } else { dataInput = new DataInputStream(inputStream); } }

Target:
public void open(final InputStream stream) throws IOException, DbException { buffer = new TupleBatchBuffer(schema); InputStream inputStream = new BufferedInputStream(stream); if (isLittleEndian) { dataInput = new LittleEndianDataInputStream(inputStream); } else { dataInput = new DataInputStream(inputStream); } }
Source:
final MetaTypeService getMetaTypeService() { BundleContext context = getContext(); if (serviceTracker == null && context != null) { serviceTracker = new ServiceTracker<>(context, META_TYPE_NAME, null); serviceTracker.open(); } return (serviceTracker != null) ? (MetaTypeService) serviceTracker.getService() : null; }

Target:
final MetaTypeService getMetaTypeService() { BundleContext context = getContext(); if (serviceTracker == null) { serviceTracker = new ServiceTracker<>(context, META_TYPE_NAME, null); serviceTracker.open(); } return (MetaTypeService) serviceTracker.getService(); }
Source:
public Boolean doesLastNRecentBlogActivitiesContain(int n, String blogPostContent, String blogPostName, String userName) { Boolean ifPassed = false; for (int i = 0; i < n; i++) { ifPassed = ifNewBlogDetailsPresent(activitiesList.get(i), blogPostContent, blogPostName, userName); if (ifPassed == true) { break; } } return ifPassed; }

Target:
public Boolean doesLastNRecentBlogActivitiesContain(int n, String blogPostContent, String blogPostName, String userName) { if(n < editActivitiesList.size()){ n = editActivitiesList.size(); } Boolean ifPassed = false; for (int i = 0; i < n; i++) { ifPassed = ifNewBlogDetailsPresent(activitiesList.get(i), blogPostContent, blogPostName, userName); if (ifPassed == true) { break; } } return ifPassed; }
Source:
public <T> T getSoleAttributeValue(IAttributeType attributeType, DeletionFlag flag, T defaultValue) { T value = defaultValue; Attribute<T> attribute = null; try { attribute = getSoleAttribute(attributeType, flag); } catch (AttributeDoesNotExist ex) { } if (attribute != null) { value = attribute.getValue(); } return value; }

Target:
public <T> T getSoleAttributeValue(IAttributeType attributeType, DeletionFlag flag, T defaultValue) { T value = defaultValue; Attribute<T> attribute = null; try { attribute = getSoleAttribute(attributeType, flag); value = attribute.getValue(); } catch (AttributeDoesNotExist ex) { } return value; }
Source:
public void onEvent(Event event) { if (!(event instanceof CommitEvent)) { return; } else { EKBCommit commit = ((CommitEvent) event).getCommit(); if (commit == lastCommit) { return; } LOGGER.warn("caught event: ({})", event.toString(), watchfile.getAbsolutePath()); ModelDescription localModelDesc = new ModelDescription(modelType, "3.0.0.SNAPSHOT"); List<Object> sourceModels = new ArrayList<Object>(); for (OpenEngSBModel model : commit.getInserts()) { ModelDescription tempModelDesc = new ModelDescription(model.getClass(), "3.0.0.SNAPSHOT"); if (transformationEngine.isTransformationPossible(tempModelDesc, localModelDesc)) { LOGGER.warn("transform!"); sourceModels.add(transformationEngine.performTransformation(tempModelDesc, localModelDesc, model)); } } if (sourceModels.size() > 0) { try { ignoreLastModification = true; fileSerializer.writeFile(watchfile, (List) sourceModels); } catch (IOException e) { throw new RuntimeException(e); } } } }

Target:
public void onEvent(Event event) { if (!(event instanceof CommitEvent)) { logger.debug("caught non-commit-event - only updating local models", event.toString()); try { update(); } catch (IOException e) { throw new RuntimeException(e); } return; } EKBCommit commit = ((CommitEvent) event).getCommit(); if (commit.equals(lastCommit)) { logger.debug("caught event with our own commit ({}) - ignoring", commit.toString()); return; } logger.debug("caught commit event: {}", event.toString()); OpenEngSBModel tempModel; try { tempModel = (OpenEngSBModel) modelType.newInstance(); } catch (InstantiationException e) { throw new RuntimeException(e); } catch (IllegalAccessException e) { throw new RuntimeException(e); } ModelDescription localModelDesc = new ModelDescription(modelType, ModelUtils.retrieveModelVersionAsString(tempModel)); List<Object> sourceModels = new ArrayList<Object>(); for (OpenEngSBModel model : commit.getInserts()) { ModelDescription tempModelDesc = new ModelDescription(model.getClass(), ModelUtils.retrieveModelVersionAsString(model)); if (transformationEngine.isTransformationPossible(tempModelDesc, localModelDesc)) { logger.debug("transforming from model to {}", tempModelDesc.toString(), localModelDesc.toString()); sourceModels.add(transformationEngine.performTransformation(tempModelDesc, localModelDesc, model)); } } if (sourceModels.size() > 0) { try { ignoreLastModification = true; fileSerializer.writeFile(watchfile, (List) sourceModels); } catch (IOException e) { throw new RuntimeException(e); } } }
Source:
public InstancesResult getStatus(String type, String entity, String startStr, String endStr, String colo, List<LifeCycle> lifeCycles, String filterBy, String orderBy, String sortOrder, Integer offset, Integer numResults, Boolean allAttempts) { checkColo(colo); checkType(type); try { lifeCycles = checkAndUpdateLifeCycle(lifeCycles, type); validateParams(type, entity); validateInstanceFilterByClause(filterBy); Entity entityObject = EntityUtil.getEntity(type, entity); Pair<Date, Date> startAndEndDate = getStartAndEndDate(entityObject, startStr, endStr, numResults); AbstractWorkflowEngine wfEngine = getWorkflowEngine(entityObject); InstancesResult instancesResult = getInstanceResultSubset(wfEngine.getStatus(entityObject, startAndEndDate.first, startAndEndDate.second, lifeCycles, allAttempts), filterBy, orderBy, sortOrder, offset, numResults); if (StringUtils.isNotEmpty(startStr) && StringUtils.isEmpty(sortOrder)){ ArrayUtils.reverse(instancesResult.getInstances()); } instancesResult.setCollection(ArrayUtils.subarray(instancesResult.getInstances(), offset, (offset + numResults))); return instancesResult; } catch (FalconException e) { LOG.error("Failed to get instances status", e); throw FalconWebException.newAPIException(e.getMessage()); } }

Target:
public InstancesResult getStatus(String type, String entity, String startStr, String endStr, String colo, List<LifeCycle> lifeCycles, String filterBy, String orderBy, String sortOrder, Integer offset, Integer numResults, Boolean allAttempts) { checkColo(colo); checkType(type); try { lifeCycles = checkAndUpdateLifeCycle(lifeCycles, type); validateParams(type, entity); validateInstanceFilterByClause(filterBy); Entity entityObject = EntityUtil.getEntity(type, entity); Pair<Date, Date> startAndEndDate = getStartAndEndDate(entityObject, startStr, endStr, numResults); AbstractWorkflowEngine wfEngine = getWorkflowEngine(entityObject); return getInstanceResultSubset(wfEngine.getStatus(entityObject, startAndEndDate.first, startAndEndDate.second, lifeCycles, allAttempts), filterBy, orderBy, sortOrder, offset, numResults, startStr); } catch (FalconException e) { LOG.error("Failed to get instances status", e); throw FalconWebException.newAPIException(e.getMessage()); } }
Source:
public void delete(FieldVariable fieldVar) throws DotDataException { fac.delete(fieldVar); Field field = this.find(fieldVar.fieldId()); ContentTypeAPI tapi = APILocator.getContentTypeAPI(this.userAPI.getSystemUser()); ContentType type; try { type = tapi.find(field.contentTypeId()); tapi.updateModDate(type); } catch (DotSecurityException e) { throw new DotDataException("Error updating Content Type mode_date for FieldVariable("+fieldVar.id()+")"+e.getMessage()); } }

Target:
public void delete(FieldVariable fieldVar) throws DotDataException { fac.delete(fieldVar); Field field = this.find(fieldVar.fieldId()); ContentTypeAPI contentTypeAPI = APILocator.getContentTypeAPI(this.userAPI.getSystemUser()); ContentType type; try { type = contentTypeAPI.find(field.contentTypeId()); contentTypeAPI.updateModDate(type); } catch (DotSecurityException e) { throw new DotDataException("Error updating Content Type mode_date for FieldVariable("+fieldVar.id()+"). "+e.getMessage()); } }
Source:
public void test401ShouldRetry() { HttpCommand command = createMock(HttpCommand.class); HttpRequest request = createMock(HttpRequest.class); HttpResponse response = createMock(HttpResponse.class); @SuppressWarnings("unchecked") LoadingCache<Credentials, Auth> cache = createMock(LoadingCache.class); BackoffLimitedRetryHandler backoffHandler = createMock(BackoffLimitedRetryHandler.class); expect(command.getCurrentRequest()).andReturn(request); cache.invalidateAll(); expectLastCall(); expect(response.getPayload()).andReturn(Payloads.newStringPayload("token expired, please renew")).anyTimes(); expect(command.incrementFailureCount()).andReturn(0).anyTimes(); expect(response.getStatusCode()).andReturn(401).atLeastOnce(); replay(command); replay(response); replay(cache); RetryOnRenew retry = new RetryOnRenew(cache, backoffHandler); assertTrue(retry.shouldRetryRequest(command, response)); verify(command); verify(response); verify(cache); }

Target:
public void test401ShouldRetry() { HttpCommand command = createMock(HttpCommand.class); HttpRequest request = createMock(HttpRequest.class); HttpResponse response = createMock(HttpResponse.class); @SuppressWarnings("unchecked") LoadingCache<Credentials, Auth> cache = createMock(LoadingCache.class); BackoffLimitedRetryHandler backoffHandler = createMock(BackoffLimitedRetryHandler.class); expect(command.getCurrentRequest()).andReturn(request); cache.invalidateAll(); expectLastCall(); expect(response.getPayload()).andReturn(Payloads.newStringPayload("token expired, please renew")).anyTimes(); expect(response.getStatusCode()).andReturn(401).atLeastOnce(); replay(command); replay(response); replay(cache); replay(backoffHandler); RetryOnRenew retry = new RetryOnRenew(cache, backoffHandler); assertTrue(retry.shouldRetryRequest(command, response)); verify(command); verify(response); verify(cache); verify(backoffHandler); }
Source:
public void doesNotFireIfConstraintHasNotChanged() { Map<String, Domain> filterConstraint = ImmutableMap.<String, Domain>builder() .put("nationkey", singleValue(BIGINT, 44L)) .build(); ColumnHandle columnHandle = new TpchColumnHandle("nationkey", BIGINT); tester().assertThat(pickTableLayout) .on(p -> p.filter(expression("nationkey = BIGINT '44'"), p.tableScan( nationTableHandle, ImmutableList.of(p.symbol("nationkey", BIGINT)), ImmutableMap.of(p.symbol("nationkey", BIGINT), new TpchColumnHandle("nationkey", BIGINT)), TupleDomain.withColumnDomains(ImmutableMap.of(columnHandle, filterConstraint.get("nationkey"))), expression("nationkey = BIGINT '44'"), Optional.of(DUMMY_TABLE_LAYOUT_HANDLE)))) .doesNotFire(); }

Target:
public void doesNotFireIfConstraintHasNotChanged() { Map<String, Domain> filterConstraint = ImmutableMap.<String, Domain>builder() .put("nationkey", singleValue(BIGINT, 44L)) .build(); ColumnHandle columnHandle = new TpchColumnHandle("nationkey", BIGINT); tester.assertThat(pickTableLayout) .on(p -> p.filter(expression("nationkey = BIGINT '44'"), p.tableScan( nationTableHandle, ImmutableList.of(p.symbol("nationkey", BIGINT)), ImmutableMap.of(p.symbol("nationkey", BIGINT), new TpchColumnHandle("nationkey", BIGINT)), TupleDomain.withColumnDomains(ImmutableMap.of(columnHandle, filterConstraint.get("nationkey"))), expression("nationkey = BIGINT '44'"), Optional.of(DUMMY_TABLE_LAYOUT_HANDLE)))) .doesNotFire(); }
Source:
public CircularBuffer(int capacity) { buffer = (E[]) new Object[capacity]; }

Target:
public CircularBuffer(int capacity) { Preconditions.checkArgument(capacity > 0, "Capacity must be greater than 0."); buffer = (E[]) new Object[capacity]; }
Source:
public void commit() throws SQLException { checkClosed(); if (strict && getAutoCommit()) { throw new SQLException("The Crate JDBC driver does not support manual commit. " + "The commit operation is not allowed."); } }

Target:
public void commit() throws SQLException { checkClosed(); if (getAutoCommit() && strict) { throw new SQLFeatureNotSupportedException("The commit operation is not allowed. " + "The Crate JDBC driver does not support manual commit."); } }
Source:
public static String getNormalizedString(String input) { int end = Math.min(input.length(), MAX_CHARS - 1); String stringLessThan63chars = input.substring(0, end); String normilizedString = removeSpecialCharactersInTheEnd(stringLessThan63chars); return normilizedString; }

Target:
public static String getNormalizedString(String input) { int end = Math.min(input.length(), MAX_CHARS - 1); String stringLessThan63chars = input.substring(0, end); String normalizedString = removeSpecialCharactersInTheEnd(stringLessThan63chars); return normalizedString; }
Source:
private void connect() { int delay = 0; logger.debug("Reconnecting web socket to Plex"); while (!isConnected()) { try { Thread.sleep(delay); open(); } catch (IOException e) { logger.error("Error reconnecting to Plex", e); } catch (InterruptedException e) { logger.error("Interrupted while reconnecting to Plex", e); } catch (ExecutionException e) { logger.error("Error reconnecting to Plex", e); } delay = RECONNECT_DELAY; } }

Target:
private void connect() { int delay = 0; logger.debug("Connecting web socket to Plex"); while (!isConnected()) { try { Thread.sleep(delay); open(); } catch (IOException e) { logger.error("Error connecting to Plex", e); } catch (InterruptedException e) { logger.error("Interrupted while reconnecting to Plex", e); } catch (ExecutionException e) { logger.error("Error connecting to Plex", e); } delay = RECONNECT_DELAY; } }
Source:
SQLiteLimits(int id) { this.id = id; }

Target:
private SQLiteLimits(int id) { this.id = id; }
Source:
public static Expr.NumericBinding withMap(final Map<String, ?> bindings) { return new Expr.NumericBinding() { @Override public Number get(String name) { return (Number)bindings.get(name); } }; }

Target:
public static Expr.ObjectBinding withMap(final Map<String, ?> bindings) { return new Expr.ObjectBinding() { @Override public Number get(String name) { return (Number)bindings.get(name); } }; }
Source:
private SelectionKey keyForId(String id) { SelectionKey key = this.keyMap.get(id); if (key == null) { throw new IllegalStateException( "Attempt to write to socket for which there is no open connection. Connection id " + id); } return key; }

Target:
private SelectionKey keyForId(String id) { return this.keyMap.get(id); }
Source:
private void createNewGeoRepSession() { if(getWindow() != null || getEntity() == null) { return; } final UIConstants constants = ConstantsManager.getInstance().getConstants(); if(getEntity().getStatus() == GlusterStatus.DOWN) { ConfirmationModel cModel = new ConfirmationModel(); cModel.setTitle(constants.newGeoRepSessionTitle()); cModel.setMessage(constants.geoRepCreateFailedMasterDownMessage()); UICommand okCommand = new UICommand("closeConfirmWindow", this); okCommand.setTitle(ConstantsManager.getInstance().getConstants().ok()); okCommand.setIsDefault(true); cModel.getCommands().add(okCommand); setConfirmWindow(cModel); } else { GlusterVolumeEntity selectedMasterVolume = getEntity(); final GlusterVolumeGeoRepCreateModel geoRepCreateModel = new GlusterVolumeGeoRepCreateModel(selectedMasterVolume); geoRepCreateModel.startProgress(constants.fetchingDataMessage()); setWindow(geoRepCreateModel); geoRepCreateModel.getShowEligibleVolumes().setEntity(true); UICommand ok = new UICommand("onCreateSession", this); ok.setTitle(constants.ok()); ok.setIsDefault(true); geoRepCreateModel.getCommands().add(ok); UICommand close = new UICommand("close", this); close.setTitle(constants.cancel()); close.setIsCancel(true); geoRepCreateModel.getCommands().add(close); } }

Target:
private void createNewGeoRepSession() { if (getWindow() != null || getEntity() == null) { return; } final UIConstants constants = ConstantsManager.getInstance().getConstants(); GlusterVolumeEntity selectedMasterVolume = getEntity(); final GlusterVolumeGeoRepCreateModel geoRepCreateModel = new GlusterVolumeGeoRepCreateModel(selectedMasterVolume); setWindow(geoRepCreateModel); geoRepCreateModel.getShowEligibleVolumes().setEntity(true); UICommand ok = new UICommand("onCreateSession", this); ok.setTitle(constants.ok()); ok.setIsDefault(true); geoRepCreateModel.getCommands().add(ok); UICommand close = new UICommand("close", this); close.setTitle(constants.cancel()); close.setIsCancel(true); geoRepCreateModel.getCommands().add(close); }
Source:
public <T extends E> Indexed<T> append(T entry) { final long index = getNextIndex(); final byte[] bytes = serializer.encode(entry); final int length = bytes.length; if (length > maxEntrySize) { throw new StorageException.TooLarge("Entry size cannot exceed " + maxEntrySize + " bytes"); } final Checksum crc32 = new CRC32(); crc32.update(bytes, 0, length); final long checksum = crc32.getValue(); int position = buffer.position(); buffer.writeInt(length) .writeUnsignedInt(checksum) .write(bytes); Indexed<E> indexedEntry = new Indexed<>(index, entry, length); this.lastEntry = indexedEntry; this.cache.put(indexedEntry); this.index.index(index, position); return (Indexed<T>) indexedEntry; }

Target:
public <T extends E> Indexed<T> append(T entry) { final long index = getNextIndex(); final byte[] bytes = serializer.encode(entry); final int length = bytes.length; if (length > maxEntrySize) { throw new StorageException.TooLarge("Entry size " + length + " exceeds maximum allowed bytes (" + maxEntrySize + ")"); } final Checksum crc32 = new CRC32(); crc32.update(bytes, 0, length); final long checksum = crc32.getValue(); int position = buffer.position(); buffer.writeInt(length) .writeUnsignedInt(checksum) .write(bytes); Indexed<E> indexedEntry = new Indexed<>(index, entry, length); this.lastEntry = indexedEntry; this.cache.put(indexedEntry); this.index.index(index, position); return (Indexed<T>) indexedEntry; }
Source:
protected void onLoad() { super.onLoad(); $(listBox.getElement()).off("change"); $(listBox.getElement()).change((e, param) -> { try { ValueChangeEvent.fire(this, getValue()); } catch (IndexOutOfBoundsException ex) { GWT.log("ListBox value change handler threw an exception.", ex); } return true; }); initializeMaterial(); }

Target:
protected void onLoad() { super.onLoad(); $(listBox.getElement()).change((e, param) -> { try { ValueChangeEvent.fire(this, getValue()); } catch (IndexOutOfBoundsException ex) { GWT.log("ListBox value change handler threw an exception.", ex); } return true; }); initializeMaterial(); }
Source:
public void doGet(HttpServletRequest req, HttpServletResponse resp) { servletName = Const.PublicActionNames.PUBLIC_IMAGE_SERVE_ACTION; action = Const.PublicActionNames.PUBLIC_IMAGE_SERVE_ACTION; requestParameters = req.getParameterMap(); String blobKey = getBlobKeyFromRequest(); try { if (blobKey.isEmpty()) { String message = "Failed to serve image with URL : blobKey is missing"; logMessage(req, message); resp.sendError(1, "No image found"); } else { resp.setContentType("image/png"); BlobstoreService blobstoreService = BlobstoreServiceFactory.getBlobstoreService(); blobstoreService.serve(new BlobKey(blobKey), resp); String url = req.getRequestURL().toString() + "?blob-key=" + blobKey; String message = "Public image request with URL: <br>" + "<a href=\"" + url + "\" target=\"_blank\" rel=\"noopener noreferrer\" >" + url + "</a>"; logMessage(req, message); } } catch (IOException e) { UserType userType = new GateKeeper().getCurrentUser(); String url = HttpRequestHelper.getRequestedUrl(req); Map<String, String[]> params = HttpRequestHelper.getParameterMap(req); log.warning(new ActivityLogGenerator() .generateServletActionFailureLogMessage(url, params, e, userType)); } }

Target:
public void doGet(HttpServletRequest req, HttpServletResponse resp) { servletName = Const.PublicActionNames.PUBLIC_IMAGE_SERVE_ACTION; action = Const.PublicActionNames.PUBLIC_IMAGE_SERVE_ACTION; requestParameters = req.getParameterMap(); String blobKey = getBlobKeyFromRequest(); try { if (blobKey.isEmpty()) { String message = "Failed to serve image with URL : blobKey is missing"; logMessage(req, message); resp.sendError(1, "No image found"); } else { resp.setContentType("image/png"); BlobstoreService blobstoreService = BlobstoreServiceFactory.getBlobstoreService(); blobstoreService.serve(new BlobKey(blobKey), resp); String url = req.getRequestURL().toString() + "?blob-key=" + blobKey; String message = "Public image request with URL: <br>" + "<a href=\"" + url + "\" target=\"_blank\" rel=\"noopener noreferrer\" >" + url + "</a>"; logMessage(req, message); } } catch (IOException e) { UserType userType = new GateKeeper().getCurrentUser(); String url = HttpRequestHelper.getRequestedUrl(req); Map<String, String[]> params = HttpRequestHelper.getParameterMap(req); log.warning(new LogMessageGenerator() .generateActionFailureLogMessage(url, params, e, userType)); } }
Source:
public void testLoadingInvalidUberJar() throws Exception { pluginPath.newFile("test.jar"); DelegatingClassLoader classLoader = new DelegatingClassLoader( Collections.singletonList(pluginPath.getRoot().getAbsolutePath())); classLoader.initLoaders(); }

Target:
public void testLoadingInvalidUberJar() throws Exception { pluginDir.newFile("invalid.jar"); DelegatingClassLoader classLoader = new DelegatingClassLoader( Collections.singletonList(pluginDir.getRoot().getAbsolutePath())); classLoader.initLoaders(); }
Source:
public void apply(OnlineCommandContext ctx) throws Exception { Address secretServerIdentitiesAddress = securityRealmAddress.and("server-identity", "secret"); Operations ops = new Operations(ctx.client); if (replaceExisting) { Batch batch = new Batch(); boolean secretServerIdentityExists = ops.exists(secretServerIdentitiesAddress); if (secretServerIdentityExists) { batch.remove(secretServerIdentitiesAddress); } ops.batch(batch); new Administration(ctx.client).reloadIfRequired(); } Batch batch = new Batch(); batch.add(secretServerIdentitiesAddress, Values.empty() .and("value", password)); ops.batch(batch); }

Target:
public void apply(OnlineCommandContext ctx) throws Exception { Address secretServerIdentitiesAddress = securityRealmAddress.and("server-identity", "secret"); Operations ops = new Operations(ctx.client); if (replaceExisting) { boolean secretServerIdentityExists = ops.exists(secretServerIdentitiesAddress); if (secretServerIdentityExists) { ops.remove(secretServerIdentitiesAddress); } new Administration(ctx.client).reloadIfRequired(); } ops.add(secretServerIdentitiesAddress, Values.empty() .and("value", password)); }
Source:
public void removeCache(String name) { log.debugf("Remove cache %s", name); if (persistentCaches.contains(name)) { persistentCaches.remove(name); storeAll(); } GlobalComponentRegistry globalComponentRegistry = cacheManager.getGlobalComponentRegistry(); ComponentRegistry cacheComponentRegistry = globalComponentRegistry.getNamedComponentRegistry(name); if (cacheComponentRegistry != null) { cacheComponentRegistry.getComponent(PersistenceManager.class).setClearOnStop(true); cacheComponentRegistry.getComponent(CacheJmxRegistration.class).setUnregisterCacheMBean(true); cacheComponentRegistry.getComponent(PassivationManager.class).skipPassivationOnStop(true); Cache<?, ?> cache = cacheManager.getCache(name, false); if (cache != null) { cache.stop(); } } globalComponentRegistry.removeCache(name); globalComponentRegistry.getComponent(ConfigurationManager.class).removeConfiguration(name); globalComponentRegistry.getComponent(DependencyGraph.class, CACHE_DEPENDENCY_GRAPH).remove(name); }

Target:
public void removeCache(String name) { log.debugf("Remove cache %s", name); if (persistentCaches.remove(name)) { storeAll(); } GlobalComponentRegistry globalComponentRegistry = cacheManager.getGlobalComponentRegistry(); ComponentRegistry cacheComponentRegistry = globalComponentRegistry.getNamedComponentRegistry(name); if (cacheComponentRegistry != null) { cacheComponentRegistry.getComponent(PersistenceManager.class).setClearOnStop(true); cacheComponentRegistry.getComponent(CacheJmxRegistration.class).setUnregisterCacheMBean(true); cacheComponentRegistry.getComponent(PassivationManager.class).skipPassivationOnStop(true); Cache<?, ?> cache = cacheManager.getCache(name, false); if (cache != null) { cache.stop(); } } globalComponentRegistry.removeCache(name); globalComponentRegistry.getComponent(ConfigurationManager.class).removeConfiguration(name); globalComponentRegistry.getComponent(DependencyGraph.class, CACHE_DEPENDENCY_GRAPH).remove(name); }
Source:
FetchRequest(@NonNull Set<ObjectId> wantIds, int depth, @NonNull Set<ObjectId> clientShallowCommits, long filterBlobLimit, @NonNull Set<String> clientCapabilities) { this.wantIds = Objects.requireNonNull(wantIds); this.depth = depth; this.clientShallowCommits = Objects .requireNonNull(clientShallowCommits); this.filterBlobLimit = filterBlobLimit; this.clientCapabilities = Objects.requireNonNull(clientCapabilities); }

Target:
FetchRequest(@NonNull Set<ObjectId> wantIds, int depth, @NonNull Set<ObjectId> clientShallowCommits, long filterBlobLimit, @NonNull Set<String> clientCapabilities) { this.wantIds = requireNonNull(wantIds); this.depth = depth; this.clientShallowCommits = requireNonNull(clientShallowCommits); this.filterBlobLimit = filterBlobLimit; this.clientCapabilities = requireNonNull(clientCapabilities); }
Source:
private static int getHash(long key) { int hash = (int) ((key >>> 32) ^ key); hash = ((hash >>> 16) ^ hash) * 0x45d9f3b; hash = ((hash >>> 16) ^ hash) * 0x45d9f3b; hash = (hash >>> 16) ^ hash; return hash; }

Target:
static int getHash(long key) { int hash = (int) ((key >>> 32) ^ key); hash = ((hash >>> 16) ^ hash) * 0x45d9f3b; hash = ((hash >>> 16) ^ hash) * 0x45d9f3b; hash = (hash >>> 16) ^ hash; return hash; }
Source:
public IDataChartDescriptor<?, ?> getX(int index) { return checkNotNull(fSeries.get(index)).getX(); }

Target:
public IDataChartDescriptor<?, ?> getX(int index) { return fSeries.get(index).getX(); }
Source:
private int getFeatureFlagID() { int featureFlagID; if (prefs.contains(PrefKeys.getFeatureFlagID())) { featureFlagID = prefs.getInt(PrefKeys.getFeatureFlagID(), 0); } else { featureFlagID = new Random().nextInt(); prefs.edit().putInt(PrefKeys.getFeatureFlagID(), featureFlagID).apply(); } return featureFlagID & Integer.MAX_VALUE; }

Target:
private int getFeatureFlagID() { int featureFlagID; if (prefs.contains(PrefKeys.getFeatureFlagID())) { featureFlagID = prefs.getInt(PrefKeys.getFeatureFlagID(), 0); } else { featureFlagID = new Random().nextInt(Integer.MAX_VALUE); prefs.edit().putInt(PrefKeys.getFeatureFlagID(), featureFlagID).apply(); } return featureFlagID & Integer.MAX_VALUE; }
Source:
public static boolean isAlarmExpired(final Alarm alarm, final DateTime currentTime, final DateTimeZone timeZone){ if(alarm.isRepeated){ return false; } final DateTime ringTime = new DateTime(alarm.year, alarm.month, alarm.day, alarm.hourOfDay, alarm.minuteOfHour, 0, timeZone); if(ringTime.isBefore(currentTime)){ return true; } return false; }

Target:
public static boolean isAlarmExpired(final Alarm alarm, final DateTime currentTime, final DateTimeZone timeZone){ if(alarm.isRepeated){ return false; } final DateTime ringTime = new DateTime(alarm.year, alarm.month, alarm.day, alarm.hourOfDay, alarm.minuteOfHour, 0, timeZone); return ringTime.isBefore(currentTime); }
Source:
protected SAMRecord getNextRecord() { final SAMRecord result = nextRec; nextRec = null; while (nextRec == null && unfilteredIterator.hasNext()) { SAMRecord nextRecord = unfilteredIterator.next(); switch (compareToFilter(nextRecord)) { case MATCHES_FILTER: nextRec = nextRecord; break; case CONTINUE_ITERATION: continue; case STOP_ITERATION: nextRec = null; return result; default: throw new SAMException("Unexpected return from compareToFilter"); } } return result; }

Target:
protected SAMRecord getNextRecord() { final SAMRecord result = nextRec; nextRec = null; while (nextRec == null && unfilteredIterator.hasNext()) { SAMRecord nextRecord = unfilteredIterator.next(); switch (compareToFilter(nextRecord)) { case MATCHES_FILTER: nextRec = nextRecord; break; case CONTINUE_ITERATION: continue; case STOP_ITERATION: return result; default: throw new SAMException("Unexpected return from compareToFilter"); } } return result; }
Source:
public void dispose() { super.dispose(); if (fWaitCursor != null) { fWaitCursor.dispose(); } for (Job j : getUpdateJobsGlobal().values()) { j.cancel(); } for (Job j : getUpdateJobsPartial().values()) { j.cancel(); } TmfStatisticsTreeManager.removeStatTreeRoot(getTreeID()); fModel.clear(); }

Target:
public void dispose() { super.dispose(); if (fWaitCursor != null) { fWaitCursor.dispose(); } for (Job j : fUpdateJobsGlobal.values()) { j.cancel(); } for (Job j : fUpdateJobsPartial.values()) { j.cancel(); } TmfStatisticsTreeManager.removeStatTreeRoot(getTreeID()); fPieChartViewer.reinitializeCharts(); }
Source:
public QueryDataIterator() { this.cctxsIter = cctxs.iterator(); this.nodeQryIter = Collections.emptyIterator(); this.qriesIter = Collections.emptyIterator(); this.localQryIter = Collections.emptyIterator(); }

Target:
public QueryDataIterator() { cctxsIter = cctxs.iterator(); nodeQryIter = Collections.emptyIterator(); qriesIter = Collections.emptyIterator(); localQryIter = Collections.emptyIterator(); }
Source:
protected int getScanProgress(int contextId) { AccessControlScannerThread scannerThread = threadManager.getScannerThread(contextId); if (scannerThread.isRunning() || scannerThread.hasRun()) { double progress = scannerThread.getScanProgress() * 1.0 / scannerThread.getScanMaximumProgress() * 100; return (int) Math.round(progress); } else { log.error("Access control scan not running for context: " + contextId); throw new IllegalStateException("A scan is not running for context: " + contextId); } }

Target:
protected int getScanProgress(int contextId) { AccessControlScannerThread scannerThread = threadManager.getScannerThread(contextId); if (scannerThread.isRunning() || scannerThread.hasRun()) { double progress = scannerThread.getScanProgress() * 1.0 / scannerThread.getScanMaximumProgress() * 100; return (int) Math.round(progress); } else { throw new IllegalStateException("A scan is not running for context: " + contextId); } }
Source:
CompletableFuture<Void> getFailureOp(CommitData cd) { return CompletableFuture.runAsync(() -> { cd.commitObserver.commitFailed(cd.getShortCollisionMessage()); }, env.getSharedResources().getSyncCommitExecutor()); }

Target:
CompletableFuture<Void> getFailureOp(CommitData cd) { cd.commitObserver.commitFailed(cd.getShortCollisionMessage()); return CompletableFuture.completedFuture(NULLS.get()); }
Source:
public SecurityConfig(String[] authIdsForHooks, String[] authIdsForRoots) { super(); this.authIdsForHookExecution = authIdsForHooks; this.authIdsForRootInstallation = authIdsForRoots; }

Target:
public SecurityConfig(String[] authIdsForHooks, String[] authIdsForRoots) { this.authIdsForHookExecution = authIdsForHooks; this.authIdsForRootInstallation = authIdsForRoots; }
Source:
private Slice toSlice(Object object) { kryo.writeClassAndObject(serializationBuffer, object); serializationBuffer.close(); return serializationBuffer.toSlice(); }

Target:
private Slice toSlice(Object object) { kryo.writeClassAndObject(serializationBuffer, object); return serializationBuffer.toSlice(); }