auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>public List<BithumbTransactionHistoryResponse.BithumbTransactionHistory> getBithumbTrades( CurrencyPair currencyPair) throws IOException { <START> final BithumbResponse<List<BithumbTransactionHistoryResponse.BithumbTransactionHistory>> <END> transactionHistory = bithumb.transactionHistory(BithumbUtils.getBaseCurrency(currencyPair)); return transactionHistory.getData(); }</code><technical_language>classes reading of this worse</technical_language>

Target:
public List<BithumbTransactionHistory> getBithumbTrades(CurrencyPair currencyPair) throws IOException { final BithumbResponse<List<BithumbTransactionHistory>> transactionHistory = bithumb.transactionHistory(BithumbUtils.getBaseCurrency(currencyPair)); return transactionHistory.getData(); }
Source:
<code>public CosmosDataAccessor(DocumentClient documentClient, AzureCloudConfig azureCloudConfig, AzureMetrics azureMetrics) { <START> this.documentClient = documentClient; <END> this.cosmosCollectionLink = azureCloudConfig.cosmosCollectionLink; this.azureMetrics = azureMetrics; this.maxRetries = azureCloudConfig.cosmosMaxRetries; }</code><technical_language>minor: this missed</technical_language>

Target:
public CosmosDataAccessor(DocumentClient documentClient, AzureCloudConfig azureCloudConfig, AzureMetrics azureMetrics) { this(documentClient, azureCloudConfig.cosmosCollectionLink, azureCloudConfig.cosmosMaxRetries, azureMetrics); }
Source:
<code>public Snapshot archiveSnapshot(Long snapshotId) { SnapshotInfo snapshotOnPrimary = snapshotFactory.getSnapshot(snapshotId, DataStoreRole.Primary); if (snapshotOnPrimary == null || !snapshotOnPrimary.getStatus().equals(ObjectInDataStoreStateMachine.State.Ready)) { throw new CloudRuntimeException("Can only archive snapshots present on primary storage. " + "Cannot find snapshot " + snapshotId + " on primary storage"); } SnapshotInfo snapshotOnSecondary = snapshotSrv.backupSnapshot(snapshotOnPrimary); <START> snapshotSrv.deleteSnapshot(snapshotOnPrimary); <END> SnapshotVO snapshotVO = _snapshotDao.findById(snapshotOnSecondary.getId()); snapshotVO.setLocationType(Snapshot.LocationType.SECONDARY); _snapshotDao.persist(snapshotVO); return snapshotOnSecondary; }</code><technical_language>@syed, I check status of deleting snapshot primary storage. Due reason, if fails delete user informed a proper error message. Thanks</technical_language>

Target:
public Snapshot archiveSnapshot(Long snapshotId) { SnapshotInfo snapshotOnPrimary = snapshotFactory.getSnapshot(snapshotId, DataStoreRole.Primary); if (snapshotOnPrimary == null || !snapshotOnPrimary.getStatus().equals(ObjectInDataStoreStateMachine.State.Ready)) { throw new CloudRuntimeException("Can only archive snapshots present on primary storage. " + "Cannot find snapshot " + snapshotId + " on primary storage"); } SnapshotInfo snapshotOnSecondary = snapshotSrv.backupSnapshot(snapshotOnPrimary); SnapshotVO snapshotVO = _snapshotDao.findById(snapshotOnSecondary.getId()); snapshotVO.setLocationType(Snapshot.LocationType.SECONDARY); _snapshotDao.persist(snapshotVO); try { snapshotSrv.deleteSnapshot(snapshotOnPrimary); } catch (Exception e) { throw new CloudRuntimeException("Snapshot archived to Secondary Storage but there was an error deleting " + " the snapshot on Primary Storage. Please manually delete the primary snapshot " + snapshotId, e); } return snapshotOnSecondary; }
Source:
<code>public static <T, I> I get(T obj, String fieldName, Class<I> outputClass) { try { Field f1 = obj.getClass().getDeclaredField(fieldName); <START> AccessController.doPrivileged(new PrivilegedAction<T>() { <END> @Override public T run() { f1.setAccessible(true); return null; } }); return (I) f1.get(obj); } catch (NoSuchFieldException | IllegalAccessException e) { throw LOGGER.logExceptionAsError(new RuntimeException(e)); } }</code><technical_language>question checking Field.isAccessible</technical_language>

Target:
public static <T, I> I get(T obj, String fieldName, Class<I> outputClass) { try { Field field = obj.getClass().getDeclaredField(fieldName); if (!field.isAccessible()) { AccessController.doPrivileged(new PrivilegedAction<T>() { @Override public T run() { field.setAccessible(true); return null; } }); } return (I) field.get(obj); } catch (NoSuchFieldException | IllegalAccessException e) { throw LOGGER.logExceptionAsError(new RuntimeException(e)); } }
Source:
<code>private void failDueToRunning() throws LifecycleException { final int managementPort = getContainerConfiguration().getManagementPort(); throw new LifecycleException( String.format("The port %1$d is already in use. It means that either the server might be already running " + <START> "or there is another process using port %1$d.\n" + <END> "Managed containers do not support connecting to running server instances due to the " + "possible harmful effect of connecting to the wrong server.\n" + "Please stop server (or another process) before running, " + "change to another type of container (e.g. remote) or use jboss.socket.binding.port-offset variable " + "to change the default port.\n" + "To disable this check and allow Arquillian to connect to a running server, " + "set allowConnectingToRunningServer to true in the container configuration", managementPort)); }</code><technical_language>replace usage of \n %n platform independent</technical_language>

Target:
private void failDueToRunning() throws LifecycleException { final int managementPort = getContainerConfiguration().getManagementPort(); throw new LifecycleException( String.format("The port %1$d is already in use. It means that either the server might be already running " + "or there is another process using port %1$d.%n" + "Managed containers do not support connecting to running server instances due to the " + "possible harmful effect of connecting to the wrong server.%n" + "Please stop server (or another process) before running, " + "change to another type of container (e.g. remote) or use jboss.socket.binding.port-offset variable " + "to change the default port.%n" + "To disable this check and allow Arquillian to connect to a running server, " + "set allowConnectingToRunningServer to true in the container configuration", managementPort)); }
Source:
<code>public static JdbcKeyValueService create(JdbcKeyValueConfiguration config) { JdbcDataSourceConfiguration dataSourceConfig = config.getDataSourceConfig(); SQLDialect sqlDialect = SQLDialect.valueOf(dataSourceConfig.getSqlDialect()); DataSource dataSource = dataSourceConfig.createDataSource(); Settings settings = new Settings(); settings.setRenderNameStyle(RenderNameStyle.AS_IS); <START> final JdbcKeyValueService kvs = new JdbcKeyValueService(settings, config.getTablePrefix(), sqlDialect, <END> dataSource, config.getBatchSizeForReads()); kvs.run(new Function<DSLContext, Void>() { @Override public Void apply(DSLContext ctx) { String partialSql = ctx.createTable(kvs.METADATA_TABLE) .column(TABLE_NAME, VARCHAR.nullable(false)) .column(METADATA, BLOB.nullable(false)) .getSQL(); int endIndex = partialSql.lastIndexOf(')'); String fullSql = partialSql.substring(0, endIndex) + "," + " CONSTRAINT pk_" + kvs.METADATA_TABLE.getName() + " PRIMARY KEY (" + TABLE_NAME.getName() + ")" + partialSql.substring(endIndex); try { ctx.execute(fullSql); } catch (DataAccessException e) { kvs.handleTableCreationException(e); } return null; } }); return kvs; }</code><technical_language>tempted pass in config instead of this batchSize argument number down</technical_language>

Target:
public static JdbcKeyValueService create(JdbcKeyValueConfiguration config) { JdbcDataSourceConfiguration dataSourceConfig = config.getDataSourceConfig(); SQLDialect sqlDialect = SQLDialect.valueOf(dataSourceConfig.getSqlDialect()); DataSource dataSource = dataSourceConfig.createDataSource(); Settings settings = new Settings(); settings.setRenderNameStyle(RenderNameStyle.AS_IS); final JdbcKeyValueService kvs = new JdbcKeyValueService( settings, sqlDialect, dataSource, config.getTablePrefix(), config.getBatchSizeForReads()); kvs.run(new Function<DSLContext, Void>() { @Override public Void apply(DSLContext ctx) { String partialSql = ctx.createTable(kvs.METADATA_TABLE) .column(TABLE_NAME, VARCHAR.nullable(false)) .column(METADATA, BLOB.nullable(false)) .getSQL(); int endIndex = partialSql.lastIndexOf(')'); String fullSql = partialSql.substring(0, endIndex) + "," + " CONSTRAINT pk_" + kvs.METADATA_TABLE.getName() + " PRIMARY KEY (" + TABLE_NAME.getName() + ")" + partialSql.substring(endIndex); try { ctx.execute(fullSql); } catch (DataAccessException e) { kvs.handleTableCreationException(e); } return null; } }); return kvs; }
Source:
<code>public String getDockerFileContent(String execCommand, int container) { <START> String commandBuiler = EcsContext.PART1 + EcsContext.CMD; <END> commandBuiler = commandBuiler + EcsContext.ECSNETWORK; commandBuiler = replacePortNumbers(container, commandBuiler); commandBuiler = commandBuiler.replaceAll("TOPOLOGY_NAME", EcsContext.topologyName(config)); commandBuiler = commandBuiler.replaceAll("container_number", "executor" + String.valueOf(container)); commandBuiler = commandBuiler.replace("heron_executor", execCommand); return commandBuiler; }</code><technical_language>Favor StringBuilder string concat. yet, String.format(..)</technical_language>

Target:
protected String getDockerFileContent(String execCommand, int container) throws IOException { String commandBuiler = new String(Files.readAllBytes( Paths.get(EcsContext.ecsComposeTemplate(config)))); commandBuiler = commandBuiler.replaceAll("TOPOLOGY_NAME", EcsContext.topologyName(config)); commandBuiler = commandBuiler.replaceAll("CONTAINER_NUMBER", "executor" + String.valueOf(container)); commandBuiler = commandBuiler.replace("HERON_EXECUTOR", execCommand); commandBuiler = commandBuiler.replace("FREEPORTS", nfreePorts); System.out.println("commandBuiler :\n" + commandBuiler); return commandBuiler; }
Source:
<code>public void testPutFileParallel() throws InterruptedException, IOException, TimeoutException { File payloadFile = File.createTempFile("testPutFileParallel", "png"); Files.write(createTestInput(), payloadFile); final Payload testPayload = Payloads.newFilePayload(payloadFile); final byte[] md5 = md5Supplier(testPayload); testPayload.getContentMetadata().setContentType("image/png"); final AtomicInteger blobCount = new AtomicInteger(); final String container = getContainerName(); try { Map<Integer, ListenableFuture<?>> responses = Maps.newHashMap(); for (int i = 0; i < 10; i++) { responses.put(i, this.exec.submit(new Callable<Void>() { @Override public Void call() throws Exception { String name = blobCount.incrementAndGet() + ""; Blob blob = view.getBlobStore().blobBuilder(name).payload(testPayload).build(); view.getBlobStore().putBlob(container, blob); assertConsistencyAwareBlobExists(container, name); blob = view.getBlobStore().getBlob(container, name); assert Arrays.equals(md5Supplier(blob.getPayload()), md5) : String.format( "md5 didn't match on %s/%s", container, name); view.getBlobStore().removeBlob(container, name); assertConsistencyAwareBlobDoesntExist(container, name); return null; } })); } Map<Integer, Exception> exceptions = awaitCompletion(responses, exec, 30000l, Logger.CONSOLE, "putFileParallel"); assert exceptions.size() == 0 : exceptions; } finally { returnContainer(container); <START> payloadFile.delete(); <END> } }</code><technical_language>returnContainer fail this run</technical_language>

Target:
public void testPutFileParallel() throws InterruptedException, IOException, TimeoutException { File payloadFile = File.createTempFile("testPutFileParallel", "png"); Files.write(createTestInput(), payloadFile); final Payload testPayload = Payloads.newFilePayload(payloadFile); final byte[] md5 = md5Supplier(testPayload); testPayload.getContentMetadata().setContentType("image/png"); final AtomicInteger blobCount = new AtomicInteger(); final String container = getContainerName(); try { Map<Integer, ListenableFuture<?>> responses = Maps.newHashMap(); for (int i = 0; i < 10; i++) { responses.put(i, this.exec.submit(new Callable<Void>() { @Override public Void call() throws Exception { String name = blobCount.incrementAndGet() + ""; Blob blob = view.getBlobStore().blobBuilder(name).payload(testPayload).build(); view.getBlobStore().putBlob(container, blob); assertConsistencyAwareBlobExists(container, name); blob = view.getBlobStore().getBlob(container, name); assert Arrays.equals(md5Supplier(blob.getPayload()), md5) : String.format( "md5 didn't match on %s/%s", container, name); view.getBlobStore().removeBlob(container, name); assertConsistencyAwareBlobDoesntExist(container, name); return null; } })); } Map<Integer, Exception> exceptions = awaitCompletion(responses, exec, 30000l, Logger.CONSOLE, "putFileParallel"); assert exceptions.size() == 0 : exceptions; } finally { payloadFile.delete(); returnContainer(container); } }
Source:
<code>public void elementShouldBeFocused(String locator) { if (!isFocused(locator)) { <START> throw new SeleniumLibraryNonFatalException(String.format("Element %s is disabled.", locator)); <END> } }</code><technical_language>message "isn't focused" instead of "is disabled"</technical_language>

Target:
public void elementShouldBeFocused(String locator) { if (!isFocused(locator)) { throw new SeleniumLibraryNonFatalException(String.format("Element %s is not focused.", locator)); } }
Source:
<code>protected void remove() { if (getWindow() != null) { return; } ConfirmationModel window = new ConfirmationModel(); setWindow(window); window.setTitle(ConstantsManager.getInstance().getConstants().removeUnregisteredTemplatesTitle()); window.setHelpTag(HelpTag.remove_unregistered_template); window.setHashName("remove_unregistered_templates"); List<String> items = getSelectedItems().stream() .map(item -> (VmTemplate) item) .filter(vmTemplate -> <START> vmTemplate.getId().isNullOrEmpty(Guid.Empty)) <END> .map(VmTemplate::getName) .collect(Collectors.toList()); window.setItems(items); UICommand onRemoveUiCommand = UICommand.createDefaultOkUiCommand("OnRemove", this); window.getCommands().add(onRemoveUiCommand); UICommand cancelUiCommand = UICommand.createCancelUiCommand("Cancel", this); window.getCommands().add(cancelUiCommand); }</code><technical_language>true. be: Guid.isNullOrEmpty(vmTemplate.getId())</technical_language>

Target:
protected void remove() { if (getWindow() != null) { return; } ConfirmationModel window = new ConfirmationModel(); setWindow(window); window.setTitle(ConstantsManager.getInstance().getConstants().removeUnregisteredTemplatesTitle()); window.setHelpTag(HelpTag.remove_unregistered_template); window.setHashName("remove_unregistered_templates"); List<String> items = getSelectedItems().stream() .map(item -> (VmTemplate) item) .filter(vmTemplate -> !Guid.isNullOrEmpty(vmTemplate.getId())) .map(VmTemplate::getName) .collect(Collectors.toList()); window.setItems(items); UICommand onRemoveUiCommand = UICommand.createDefaultOkUiCommand("OnRemove", this); window.getCommands().add(onRemoveUiCommand); UICommand cancelUiCommand = UICommand.createCancelUiCommand("Cancel", this); window.getCommands().add(cancelUiCommand); }
Source:
<code>public LogicalPlan apply(Filter filter, Captures captures) { var projectSet = captures.get(projectSetCapture); var queryParts = AndOperator.split(filter.query()); <START> LinkedList<Symbol> toPushDown = new LinkedList<>(); <END> LinkedList<Symbol> toKeep = new LinkedList<>(); for (var part : queryParts) { if (!SymbolVisitors.any(MoveFilterBeneathProjectSet::isTableFunction, part) && projectSet.standaloneOutputs().containsAll(extractColumns(part))) { toPushDown.add(part); } else { toKeep.add(part); } } if (toPushDown.isEmpty()) { return null; } else if (toKeep.isEmpty()) { return transpose(filter, projectSet); } else { var newProjectSet = projectSet.replaceSources( List.of(new Filter(projectSet.source(), AndOperator.join(toPushDown)))); return new Filter(newProjectSet, AndOperator.join(toKeep)); } }</code><technical_language>this a LinkedList? ArrayLists tend cheaper</technical_language>

Target:
public LogicalPlan apply(Filter filter, Captures captures) { var projectSet = captures.get(projectSetCapture); var queryParts = AndOperator.split(filter.query()); ArrayList<Symbol> toPushDown = new ArrayList<>(); ArrayList<Symbol> toKeep = new ArrayList<>(); for (var part : queryParts) { if (!SymbolVisitors.any(MoveFilterBeneathProjectSet::isTableFunction, part) && projectSet.standaloneOutputs().containsAll(extractColumns(part))) { toPushDown.add(part); } else { toKeep.add(part); } } if (toPushDown.isEmpty()) { return null; } else if (toKeep.isEmpty()) { return transpose(filter, projectSet); } else { var newProjectSet = projectSet.replaceSources( List.of(new Filter(projectSet.source(), AndOperator.join(toPushDown)))); return new Filter(newProjectSet, AndOperator.join(toKeep)); } }
Source:
<code>public void writeTo(Resource file) throws JDOMException, IOException { OutputStream out = path.out(); try { IOUtils.write(body, out); } finally { out.close(); <START> } <END> }</code><technical_language>@NielsCharlier try-with-resources</technical_language>

Target:
public void writeTo(Resource file) throws JDOMException, IOException { try (OutputStream out = path.out()) { IOUtils.write(body, out); } }
Source:
<code>protected void saveData(JsonObject json, BiomeTextureMap data) { Queue<Integer> queue = new PriorityQueue<>(data.textureMap.keySet()); while (!queue.isEmpty()) { int biomeID = queue.poll(); if (biomeID >= 0 && biomeID < 256) { <START> String key = Biome.REGISTRY.getObjectById(biomeID).getRegistryName().toString(); <END> json.addProperty(key, data.textureMap.get(biomeID).name); } } }</code><technical_language>java String key = ((ForgeRegistry<Biome>) ForgeRegistries.BIOMES).getValue(biomeID); Forge provided classes Vanilla ones</technical_language>

Target:
protected void saveData(JsonObject json, BiomeTextureMap data) { Queue<Biome> queue = new PriorityQueue<>(data.textureMap.keySet()); while (!queue.isEmpty()) { Biome biome = queue.poll(); int biomeID = Biome.getIdForBiome(biome); if (biomeID >= 0 && biomeID < 256) { String key = CustomFormatter.getRegistryString(biome); json.addProperty(key, data.textureMap.get(biome).name); } } }
Source:
<code>public ArrayList<SimpleEvent> getEventsInWeek(int year, int week) { ArrayList<SimpleEvent> events = new ArrayList<>(); Cursor cursor = db.query(TABLE_EVENTS, new String[]{Events.KEY, Events.NAME, Events.TYPE, Events.DISTRICT, Events.START, <START> Events.END, Events.LOCATION, Events.VENUE, Events.OFFICIAL, Events.DISTRICT_STRING}, <END> Events.KEY + " LIKE ? AND " + Events.WEEK + " = ?", new String[]{Integer.toString(year) + "%", Integer.toString(week)}, null, null, null, null ); if (cursor != null && cursor.moveToFirst()) { do { SimpleEvent event = new SimpleEvent(); event.setEventKey(cursor.getString(0)); event.setEventName(cursor.getString(1)); event.setEventType(EventHelper.TYPE.values()[cursor.getInt(2)]); event.setDistrictEnum(cursor.getInt(3)); event.setStartDate(cursor.getString(4)); event.setEndDate(cursor.getString(5)); event.setLocation(cursor.getString(6)); event.setOfficial(cursor.getInt(7) == 1); event.setDistrictTitle(cursor.getString(8)); events.add(event); } while (cursor.moveToNext()); cursor.close(); return events; } else { Log.w(Constants.LOG_TAG, "Failed to find events in " + year + " week " + week); return null; } }</code><technical_language>forgot update cursor indexes</technical_language>

Target:
public ArrayList<SimpleEvent> getEventsInWeek(int year, int week) { ArrayList<SimpleEvent> events = new ArrayList<>(); Cursor cursor = db.query(TABLE_EVENTS, new String[]{Events.KEY, Events.NAME, Events.TYPE, Events.DISTRICT, Events.START, Events.END, Events.LOCATION, Events.VENUE, Events.OFFICIAL, Events.DISTRICT_STRING}, Events.KEY + " LIKE ? AND " + Events.WEEK + " = ?", new String[]{Integer.toString(year) + "%", Integer.toString(week)}, null, null, null, null ); if (cursor != null && cursor.moveToFirst()) { do { SimpleEvent event = new SimpleEvent(); event.setEventKey(cursor.getString(0)); event.setEventName(cursor.getString(1)); event.setEventType(EventHelper.TYPE.values()[cursor.getInt(2)]); event.setDistrictEnum(cursor.getInt(3)); event.setStartDate(cursor.getString(4)); event.setEndDate(cursor.getString(5)); event.setLocation(cursor.getString(6)); event.setVenue(cursor.getString(7)); event.setOfficial(cursor.getInt(8) == 1); event.setDistrictTitle(cursor.getString(9)); events.add(event); } while (cursor.moveToNext()); cursor.close(); return events; } else { Log.w(Constants.LOG_TAG, "Failed to find events in " + year + " week " + week); return null; } }
Source:
<code>public void onLoadFinished(Loader<Cursor> loader, Cursor data) { data.moveToFirst(); route.buildFromCursor(data, DBAdapter.getInstance()); <START> data.close(); <END> adapter.clear(); adapter.addAll(route.getStops()); adapter.notifyDataSetChanged(); updateMapItems((ArrayList) route.getVehicles(), true); if (swipeRefreshLayout.isRefreshing()) { getActivity().runOnUiThread(new Runnable() { @Override public void run() { swipeRefreshLayout.setRefreshing(false); } }); } refreshMapInfoWindow(); }</code><technical_language>need close cursor, Loader care of for</technical_language>

Target:
public void onLoadFinished(Loader<Cursor> loader, Cursor data) { data.moveToFirst(); route.buildFromCursor(data, DBAdapter.getInstance()); adapter.clear(); adapter.addAll(route.getStops()); adapter.notifyDataSetChanged(); updateMapItems((ArrayList) route.getVehicles(), true); if (swipeRefreshLayout.isRefreshing()) { getActivity().runOnUiThread(new Runnable() { @Override public void run() { swipeRefreshLayout.setRefreshing(false); } }); } refreshMapInfoWindow(); }
Source:
<code>protected String getEventSubscriptionScope(ActivityExecution execution, EventSubscriptionEntity subscription) { String subscriptionScope = null; if (subscription.getConfiguration() != null) { <START> Pattern pattern = Pattern.compile("\"scope\"\\s*:\\s*\"([^\"]+)\",?"); <END> Matcher matcher = pattern.matcher(subscription.getConfiguration()); if (matcher.find()) { subscriptionScope = matcher.group(1); } } return subscription.getEventName() + ":" + getSignalExecutionScope(execution, subscriptionScope); }</code><technical_language>this a static field</technical_language>

Target:
protected String getEventSubscriptionScope(ActivityExecution execution, EventSubscriptionEntity subscription) { String subscriptionScope = null; if (subscription.getConfiguration() != null) { Matcher matcher = scopeRegexPattern.matcher(subscription.getConfiguration()); if (matcher.find()) { subscriptionScope = matcher.group(1); } } return getSignalExecutionScope(execution, subscription.getEventName(), subscriptionScope); }
Source:
<code>public Object[][] loadTestMeasureBaselineDivergenceInput() { final String[] params = <START> new String[]{"bestline", "someMatchBestPossible", "noMatchBestPossible"}; <END> return TestInputLoader .loadTestInputs("TestResourceUsageCalculator.MeasureBaselineDivergence.json", params); }</code><technical_language>"bestline"? "baseline"</technical_language>

Target:
public Object[][] loadTestMeasureBaselineDivergenceInput() { final String[] params = new String[]{"baseline", "someMatchBestPossible", "noMatchBestPossible"}; return TestInputLoader .loadTestInputs("TestResourceUsageCalculator.MeasureBaselineDivergence.json", params); }
Source:
<code>public void should_throw_illegal_state_exception_if_null_answer() throws Throwable { Invocation invocation = createMethodInvocation(); try { <START> new ThrowsException(null) <END> .answer(invocation); } catch (IllegalStateException expected) { } }</code><technical_language>contribute a fix fail early null passed constructor? This cleaner (earlier feedback)</technical_language>

Target:
public void should_throw_illegal_state_exception_if_null_answer() throws Throwable { Invocation invocation = createMethodInvocation(); try { new ThrowsException(null).answer(invocation); fail(); } catch (IllegalStateException expected) { } }
Source:
<code>public void setup(Method method) throws Exception { Util.print("test name: " + method.getName()); <START> bundles[0] = new Bundle(); <END> bundles[0] = Util.readELBundles()[0][0]; bundles[0] = new Bundle(bundles[0], cluster.getEnvFileName(), cluster.getPrefix()); bundles[0].setInputFeedDataPath(feedInputPath); bundles[0].setProcessWorkflow(aggregateWorkflowDir); }</code><technical_language>need for bundles[0] = new Bundle();</technical_language>

Target:
public void setup(Method method) throws Exception { Util.print("test name: " + method.getName()); bundles[0] = Util.readELBundles()[0][0]; bundles[0] = new Bundle(bundles[0], cluster.getEnvFileName(), cluster.getPrefix()); bundles[0].setInputFeedDataPath(feedInputPath); bundles[0].setProcessWorkflow(aggregateWorkflowDir); }
Source:
<code>private synchronized IConnectionRegistryProvider[] getProviders() { if( registryProviders == null ) { loadProviders(); } List<ProviderPair> l = new ArrayList<ProviderPair>(Arrays.asList(registryProviders)); Comparator<ProviderPair> c = (e1, e2) -> e2.getWeight() - e1.getWeight(); List<IConnectionRegistryProvider> ret = l.stream().sorted(c).map(ProviderPair::getProvider).collect(Collectors.toList()); <START> return (IConnectionRegistryProvider[]) ret.toArray(new IConnectionRegistryProvider[ret.size()]); <END> }</code><technical_language>![MINOR](<LINK_1> 'Severity: MINOR') Remove this unnecessary cast "IConnectionRegistryProvider[]". [![rule](<LINK_0>](<LINK_2></technical_language>

Target:
private synchronized IConnectionRegistryProvider[] getProviders() { if( registryProviders == null ) { loadProviders(); } List<ProviderPair> l = new ArrayList<ProviderPair>(Arrays.asList(registryProviders)); Comparator<ProviderPair> c = (e1, e2) -> e2.getWeight() - e1.getWeight(); List<IConnectionRegistryProvider> ret = l.stream().sorted(c).map(ProviderPair::getProvider).collect(Collectors.toList()); return ret.toArray(new IConnectionRegistryProvider[ret.size()]); }
Source:
<code>public void addPassMsgs(Set<String> msgs) { <START> _passMsgs.addAll(msgs); <END> }</code><technical_language>This throw a NPE if msgs is null. want add a null check. for other methods</technical_language>

Target:
public void addPassMsgs(Set<String> msgs) { if (msgs != null) { _passMsgs.addAll(msgs); } }
Source:
<code>public ResourceReference parse(String rawReference) { StringBuilder content = new StringBuilder(rawReference); ResourceReference parsedURILinks = parseURILinks(rawReference); <START> ResourceReference parsedInterWikiLinks = parseInterWikiLinks(content); <END> ResourceReference resourceReference; if (parsedURILinks != null) { resourceReference = parsedURILinks; } else if (parsedInterWikiLinks != null) { resourceReference = parsedInterWikiLinks; } else if (!isInWikiMode()) { resourceReference = new ResourceReference(rawReference, ResourceType.URL); resourceReference.setTyped(false); } else { return parseDocumentLink(content); } return resourceReference; }</code><technical_language>sense do this knowing if need in place</technical_language>

Target:
public ResourceReference parse(String rawReference) { ResourceReference resourceReference = parseURILinks(rawReference); StringBuilder content = new StringBuilder(rawReference); if (resourceReference == null) { resourceReference = parseInterWikiLinks(content); if (resourceReference == null) { if (!isInWikiMode()) { resourceReference = new ResourceReference(rawReference, ResourceType.URL); resourceReference.setTyped(false); } } } if (resourceReference != null) { return resourceReference; else { return parseDocumentLink(content); } } }
Source:
<code>public boolean onOptionsItemSelected(MenuItem item) { int id = item.getItemId(); if (mDrawerToggle.onOptionsItemSelected(item)) { <START> return true; <END> } return super.onOptionsItemSelected(item); }</code><technical_language>simplified return mDrawerToggle.onOptionsItemSelected(item) || super.onOptionsItemSelected(item);</technical_language>

Target:
public boolean onOptionsItemSelected(MenuItem item) { return (mDrawerToggle.onOptionsItemSelected(item)) || super.onOptionsItemSelected(item); }
Source:
<code>public void populateDAG(DAG dag, Configuration conf) { JsonGenerator generator = dag.addOperator("JsonGenerator", JsonGenerator.class); JsonParser parser = dag.addOperator("JsonParser", JsonParser.class); ConsoleOutputOperator pojo = dag.addOperator("Pojo", ConsoleOutputOperator.class); ConsoleOutputOperator jsonObject = dag.addOperator("JsonObject", ConsoleOutputOperator.class); ConsoleOutputOperator error = dag.addOperator("Error", ConsoleOutputOperator.class); dag.addStream("json", generator.out, parser.in); dag.addStream("pojo", parser.out, pojo.input); dag.addStream("jsonObject", parser.parsedOutput, jsonObject.input); dag.addStream("error", parser.err, error.input); <START> dag.getMeta(parser).getMeta(parser.out).getAttributes().put(Context.PortContext.TUPLE_CLASS, Campaign.class); <END> }</code><technical_language>set TUPLE_CLASS properties.xml</technical_language>

Target:
public void populateDAG(DAG dag, Configuration conf) { JsonGenerator generator = dag.addOperator("JsonGenerator", JsonGenerator.class); JsonParser parser = dag.addOperator("JsonParser", JsonParser.class); JsonFormatter formatter = dag.addOperator("JsonFormatter", JsonFormatter.class); ConsoleOutputOperator jsonString = dag.addOperator("JsonString", ConsoleOutputOperator.class); ConsoleOutputOperator jsonObject = dag.addOperator("JsonObject", ConsoleOutputOperator.class); ConsoleOutputOperator error = dag.addOperator("Error", ConsoleOutputOperator.class); dag.addStream("json", generator.out, parser.in); dag.addStream("pojo", parser.out, formatter.in); dag.addStream("jsonString", formatter.out, jsonString.input); dag.addStream("jsonObject", parser.parsedOutput, jsonObject.input); dag.addStream("error", parser.err, error.input); }
Source:
<code>private Set<String> getTranslationKeys(File file) { Set<String> keys = new HashSet<>(); try (InputStream inStream = Files.newInputStream(file.toPath())) { final Properties translations = new Properties(); translations.load(inStream); keys = translations.stringPropertyNames(); } catch (final IOException | IllegalArgumentException ex) { logException(ex, file); <START> } <END> return keys; }</code><technical_language>IAE is runtime exception -<LINK_0> other happen too. is catch exceptions Exception log it</technical_language>

Target:
private Set<String> getTranslationKeys(File file) { Set<String> keys = new HashSet<>(); try (InputStream inStream = Files.newInputStream(file.toPath())) { final Properties translations = new Properties(); translations.load(inStream); keys = translations.stringPropertyNames(); } catch (final Exception ex) { logException(ex, file); } return keys; }
Source:
<code><START> public LockRpcClient getLockService(@Safe @PathParam("namespace") String namespace) { <END> return getOrCreateServices(namespace).getLockService(); }</code><technical_language>this is weird, this is server, rpc client, a service resource</technical_language>

Target:
public LockResource getLockService(@Safe @PathParam("namespace") String namespace) { return getOrCreateServices(namespace).getLockService(); }
Source:
<code>public Object process(Node nd, Stack<Node> stack, NodeProcessorCtx ctx, Object... nodeOutputs) throws SemanticException { TableScanOperator scanOp = (TableScanOperator) nd; ColumnPrunerProcCtx cppCtx = (ColumnPrunerProcCtx) ctx; List<String> cols = cppCtx .genColLists((Operator<? extends OperatorDesc>) nd); if (cols == null && !scanOp.getConf().isGatherStats() ) { scanOp.setNeededColumnIDs(null); return null; } cols = cols == null ? new ArrayList<String>() : cols; cppCtx.getPrunedColLists().put((Operator<? extends OperatorDesc>) nd, cols); cppCtx.getPrunedNestedColLists().put((Operator<? extends OperatorDesc>) nd, cppCtx.genNestedColPaths((Operator<? extends OperatorDesc>) nd)); RowSchema inputRS = scanOp.getSchema(); setupNeededColumns(scanOp, inputRS, cols); scanOp.setNeededNestedColumnPaths( <START> cppCtx.genNestedColPaths((Operator<? extends OperatorDesc>) nd)); <END> return null; }</code><technical_language>Do need call genNestedColPaths twice? store result somewhere</technical_language>

Target:
public Object process(Node nd, Stack<Node> stack, NodeProcessorCtx ctx, Object... nodeOutputs) throws SemanticException { TableScanOperator scanOp = (TableScanOperator) nd; ColumnPrunerProcCtx cppCtx = (ColumnPrunerProcCtx) ctx; List<String> cols = cppCtx .genColLists((Operator<? extends OperatorDesc>) nd); if (cols == null && !scanOp.getConf().isGatherStats() ) { scanOp.setNeededColumnIDs(null); return null; } cols = cols == null ? new ArrayList<String>() : cols; List nestedCols = cppCtx.genNestedColPaths((Operator<? extends OperatorDesc>) nd); cppCtx.getPrunedColLists().put((Operator<? extends OperatorDesc>) nd, cols); cppCtx.getPrunedNestedColLists().put((Operator<? extends OperatorDesc>) nd, nestedCols); RowSchema inputRS = scanOp.getSchema(); setupNeededColumns(scanOp, inputRS, cols); scanOp.setNeededNestedColumnPaths(nestedCols); return null; }
Source:
<code>public double logTransitionProbability(final CopyNumberTriState currentState, final Target fromTarget, final CopyNumberTriState nextState, final Target nextPosition) { Utils.nonNull(currentState); Utils.nonNull(nextState); Utils.nonNull(fromTarget); Utils.nonNull(nextPosition); final double distance = calculateDistance(fromTarget, nextPosition); double logProb = Double.NEGATIVE_INFINITY; try { logProb = logTransitionProbabilityCache.logProbability((int) distance, nextState, currentState); <START> } catch (NullPointerException ex) { <END> System.out.println(distance + " " + currentState.name() + " " + fromTarget.getName() + " " + nextState.name() + " " + nextPosition.getName()); } return logProb; }</code><technical_language>A here: - logger methods for printing output. - non-idiomatic, confusing, catch block throw exception is in effect else block in logProb is set Double.NEGATIVE_INFINITY. - able write return logTransitionProbabilityCache.logProbability((int) distance, nextState, currentState). If can't, this method validate arguments logTransitionProbabilityCache refactored handle new flexibility in CopyNumberTriState</technical_language>

Target:
public double logTransitionProbability(final CopyNumberTriState currentState, final Target fromTarget, final CopyNumberTriState nextState, final Target nextPosition) { Utils.nonNull(currentState); Utils.nonNull(nextState); Utils.nonNull(fromTarget); Utils.nonNull(nextPosition); final double distance = calculateDistance(fromTarget, nextPosition); return logTransitionProbabilityCache.logProbability((int) distance, nextState, currentState); }
Source:
<code>private void getFileAsHttpResponse(File file) throws IOException { long size = file.length(); <START> if (size > Integer.MAX_VALUE) { <END> statusCode = HttpStatus.SC_BAD_REQUEST; return; } int len = (int) size; if (fileProtocol.getMaxContentLength() >= 0 && len > fileProtocol.getMaxContentLength()) len = fileProtocol.getMaxContentLength(); content = new byte[len]; InputStream is = new FileInputStream(file); int offset = 0; int n = 0; while (offset < len && (n = is.read(content, offset, len - offset)) >= 0) { offset += n; } if (offset < len) { LOG.warn("not enough bytes read from file: {}", file.getPath()); } is.close(); metadata.setValue(HttpHeaders.CONTENT_LENGTH, new Long(size).toString()); metadata.setValue(HttpHeaders.LAST_MODIFIED, formatDate(file.lastModified())); statusCode = HttpStatus.SC_OK; }</code><technical_language>check content is null - case a file exist set content empty array instead. get a NPE exception in fetcher is unnecessary</technical_language>

Target:
private void getFileAsHttpResponse(File file) throws IOException { long size = file.length(); if (size > Integer.MAX_VALUE) { statusCode = HttpStatus.SC_BAD_REQUEST; return; } try { content = IOUtils.toByteArray(new FileInputStream(file), size); } catch (IOException | IllegalArgumentException e) { LOG.error("Exception while fetching file response ", file.getPath(), e); statusCode = HttpStatus.SC_METHOD_FAILURE; return; } metadata.setValue(HttpHeaders.CONTENT_LENGTH, new Long(size).toString()); metadata.setValue(HttpHeaders.LAST_MODIFIED, formatDate(file.lastModified())); statusCode = HttpStatus.SC_OK; }
Source:
<code>public void run() { <START> if (Bukkit.isPrimaryThread()) <END> throw new IllegalStateException("Cannot run profile fetcher on main thread."); List<ProfileRequest> requests; synchronized (sync) { if (queue.isEmpty()) return; requests = new ArrayList<ProfileRequest>(queue); queue.clear(); } profileFetcher.fetch(requests); }</code><technical_language>this calls Thread.currentThread(), slow execution a bit. I avoid calling more personally</technical_language>

Target:
public void run() { List<ProfileRequest> requests; synchronized (sync) { if (queue.isEmpty()) return; requests = new ArrayList<ProfileRequest>(queue); queue.clear(); } profileFetcher.fetchRequests(requests); }
Source:
<code>public void shouldReceiveServerInfoAfterInit() throws Throwable { SocketClient socket = mock( SocketClient.class ); SocketConnection conn = new SocketConnection( socket, SERVER_INFO, DEV_NULL_LOGGER ); <START> when( socket.address() ).thenReturn( new BoltServerAddress( URI.create( "<LINK_0>" ) ) ); <END> ArrayList<Message> serverResponses = new ArrayList<>(); serverResponses.add( new SuccessMessage( Values.parameters( "server", "super-awesome" ).asMap( Values.ofValue() ) ) ); final Iterator<Message> iterator = serverResponses.iterator(); doAnswer( new Answer<Object>() { @Override public Object answer( InvocationOnMock invocation ) throws Throwable { Object[] arguments = invocation.getArguments(); SocketResponseHandler responseHandler = ( SocketResponseHandler ) arguments[0]; iterator.next().dispatch( responseHandler ); return null; } } ).when( socket ).receiveOne( any( SocketResponseHandler.class ) ); doCallRealMethod().when( socket ).receiveAll( any(SocketResponseHandler.class) ); conn.init( "java-driver-1.1", parameters( "scheme", "none" ).asMap( Values.ofValue() ) ); ServerInfo server = conn.server(); assertThat( server.address(), equalTo( "neo4j.com:9000" ) ); assertThat( server.version(), equalTo( "super-awesome" ) ); }</code><technical_language>Unrelated, is this http://</technical_language>

Target:
public void shouldReceiveServerInfoAfterInit() throws Throwable { SocketClient socket = mock( SocketClient.class ); SocketConnection conn = new SocketConnection( socket, SERVER_INFO, DEV_NULL_LOGGER ); when( socket.address() ).thenReturn( new BoltServerAddress( "neo4j.com:9000" ) ); ArrayList<Message> serverResponses = new ArrayList<>(); serverResponses.add( new SuccessMessage( Values.parameters( "server", "super-awesome" ).asMap( Values.ofValue() ) ) ); final Iterator<Message> iterator = serverResponses.iterator(); doAnswer( new Answer<Object>() { @Override public Object answer( InvocationOnMock invocation ) throws Throwable { Object[] arguments = invocation.getArguments(); SocketResponseHandler responseHandler = ( SocketResponseHandler ) arguments[0]; iterator.next().dispatch( responseHandler ); return null; } } ).when( socket ).receiveOne( any( SocketResponseHandler.class ) ); doCallRealMethod().when( socket ).receiveAll( any(SocketResponseHandler.class) ); conn.init( "java-driver-1.1", parameters( "scheme", "none" ).asMap( Values.ofValue() ) ); ServerInfo server = conn.server(); assertThat( server.address(), equalTo( "neo4j.com:9000" ) ); assertThat( server.version(), equalTo( "super-awesome" ) ); }
Source:
<code>private UpdateFirmwareResponseDto executeFirmwareUpdate(final DlmsConnectionHolder conn, final DlmsDevice device, final String firmwareIdentification) throws ProtocolAdapterException { if (this.firmwareRepository.isAvailable(firmwareIdentification)) { return this.updateFirmwareCommandExecutor.execute(conn, device, firmwareIdentification); } else { <START> throw new ProtocolAdapterException("Firmware Unavailable"); <END> } }</code><technical_language>EXCEPTION_MSG_FIRMWARE_FILE_NOT_AVAILABLE</technical_language>

Target:
private UpdateFirmwareResponseDto executeFirmwareUpdate(final DlmsConnectionHolder conn, final DlmsDevice device, final String firmwareIdentification) throws ProtocolAdapterException { if (this.firmwareRepository.isAvailable(firmwareIdentification)) { return this.updateFirmwareCommandExecutor.execute(conn, device, firmwareIdentification); } else { throw new ProtocolAdapterException(EXCEPTION_MSG_FIRMWARE_FILE_NOT_AVAILABLE); } }
Source:
<code>public void email(final String self, final Friend friend, final String text) throws IOException { this.postman.send( new Envelope.MIME() .with(new StRecipient(friend.alias(), friend.email())) .with( new StSubject( String.format( "#%d: %s", this.bout.number(), this.bout.title() ) ) ) .with( new StReplyTo( String.format( "%s%s", EmCatch.encrypt( String.format( "%s|%d", self, this.bout.number() ) ), <START> "@reply.netbout.com" <END> ) ) ) .with( new EnHTML( Joiner.on('\n').join( new Markdown.Default().html(text), "<p>--<br/>to reply click here: ", String.format( "<LINK_0>", this.bout.number() ), "</p><p style=\"color:#C8C8C8;font-size:2px;\">", String.format( "%d</p>", System.nanoTime() ), new GmailViewAction(this.bout.number()).xml() ) ) ) ); }</code><technical_language>@exper0 if in line string more readable readable</technical_language>

Target:
public void email(final String self, final Friend friend, final String text) throws IOException { this.postman.send( new Envelope.MIME() .with(new StRecipient(friend.alias(), friend.email())) .with( new StSubject( String.format( "#%d: %s", this.bout.number(), this.bout.title() ) ) ) .with( new StReplyTo( String.format( "%s@reply.netbout.com", EmCatch.encrypt( String.format( "%s|%d", self, this.bout.number() ) ) ) ) ) .with( new EnHTML( Joiner.on('\n').join( new Markdown.Default().html(text), "<p>--<br/>to reply click here: ", String.format( "<LINK_0>", this.bout.number() ), "</p><p style=\"color:#C8C8C8;font-size:2px;\">", String.format( "%d</p>", System.nanoTime() ), new GmailViewAction(this.bout.number()).xml() ) ) ) ); }
Source:
<code><START> private static boolean isWebServiceDeployed(String webServiceName, String endpoint) { <END> log.info("waiting " + 90000 + " millis for web service deployment " + webServiceName); HttpResponse response; long startTime = System.currentTimeMillis(); while ((System.currentTimeMillis() - startTime) < 90000) { try { response = HttpRequestUtil.sendGetRequest(endpoint, null); if (!response.getData().isEmpty()) { return true; } } catch (IOException ignored) { } try { Thread.sleep(500); } catch (InterruptedException ignored) { } } return false; }</code><technical_language>is reason for making this method static</technical_language>

Target:
private boolean isWebServiceDeployed(String webServiceName, String endpoint) { log.info("waiting " + 90000 + " millis for web service deployment " + webServiceName); HttpResponse response; long startTime = System.currentTimeMillis(); while ((System.currentTimeMillis() - startTime) < 90000) { try { response = HttpRequestUtil.sendGetRequest(endpoint, null); if (!response.getData().isEmpty()) { return true; } } catch (IOException ignored) { } try { Thread.sleep(500); } catch (InterruptedException ignored) { } } return false; }
Source:
<code>public MobileOptions(Capabilities source) { <START> this(); <END> merge(source); }</code><technical_language>is this call needed</technical_language>

Target:
public MobileOptions(Capabilities source) { merge(source); }
Source:
<code>public void testLocalTimeMax() throws SQLException { PreparedStatement pstmt = con.prepareStatement("INSERT INTO timetable (tt) VALUES (?)"); pstmt.setObject(1, LocalTime.MAX); pstmt.executeUpdate(); pstmt.setObject(1, LocalTime.MIN); pstmt.executeUpdate(); ResultSet rs = con.createStatement().executeQuery("select tt from timetable order by id asc"); Assert.assertTrue(rs.next()); LocalTime localTime = (LocalTime)rs.getObject(1,LocalTime.class); <START> Assert.assertTrue( localTime == LocalTime.MAX); <END> Assert.assertTrue(rs.next()); localTime = (LocalTime)rs.getObject(1, LocalTime.class); Assert.assertTrue( localTime == LocalTime.MIN); }</code><technical_language>Please assertEquals(a, b) (avoid assertTrue(expression))</technical_language>

Target:
public void testLocalTimeMax() throws SQLException { PreparedStatement pstmt = con.prepareStatement("INSERT INTO timetable (tt) VALUES (?)"); pstmt.setObject(1, LocalTime.MAX); pstmt.executeUpdate(); pstmt.setObject(1, LocalTime.MIN); pstmt.executeUpdate(); ResultSet rs = con.createStatement().executeQuery("select tt from timetable order by id asc"); Assert.assertTrue(rs.next()); LocalTime localTime = (LocalTime)rs.getObject(1,LocalTime.class); Assert.assertEquals( LocalTime.MAX, localTime); Assert.assertTrue(rs.next()); localTime = (LocalTime)rs.getObject(1, LocalTime.class); Assert.assertEquals( LocalTime.MIN, localTime); }
Source:
<code>public void testElementWithGenericNode() { FaxResponse.Builder builder = new FaxResponse.Builder(); GenericNode.Builder genericBuilder = new GenericNode.Builder("genericTag"); GenericNode node = genericBuilder.build(); FaxResponse elem = builder.addChild(node).build(); Assert.assertEquals( "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" + "<Response>" + <START> "<genericTag/>"+ <END> "</Response>", elem.toXml() ); }</code><technical_language>Add space +</technical_language>

Target:
public void testElementWithGenericNode() { GenericNode.Builder genericBuilder = new GenericNode.Builder("genericTag").addText("Some text"); GenericNode node = genericBuilder.build(); FaxResponse.Builder builder = new FaxResponse.Builder(); FaxResponse elem = builder.addChild(node).build(); Assert.assertEquals( "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" + "<Response>" + "<genericTag>" + "Some text" + "</genericTag>" + "</Response>", elem.toXml() ); }
Source:
<code>public PayloadImpl(String data, String metadata) { <START> this(data, Charset.defaultCharset(), metadata, Charset.defaultCharset()); <END> }</code><technical_language>defaultCharset() sense for a network centric application? more UTF_* opinionated instead</technical_language>

Target:
public PayloadImpl(String data, String metadata) { this(data, StandardCharsets.UTF_8, metadata, StandardCharsets.UTF_8); }
Source:
<code>ChannelsProvider(List<String> channels) { Preconditions.checkArgument(channels != null, "channels can be empty but not null"); <START> this.channels = channels; <END> log.info("Slack toggles channels: " + this.channels); }</code><technical_language>Defensive copy created</technical_language>

Target:
ChannelsProvider(List<String> channels) { Preconditions.checkArgument(channels != null, "channels can be empty but not null"); this.channels = new LinkedList<>(channels); log.info("Slack toggles channels: " + channels); }
Source:
<code>private static boolean isNumericOrGeometricPredicate( IndexQuery predicate ) { if ( predicate.type() == IndexQuery.IndexQueryType.exact ) { IndexQuery.ExactPredicate exactPredicate = (IndexQuery.ExactPredicate) predicate; return isNumberGeometryOrArray(exactPredicate.value()); } else return predicate.type() == IndexQuery.IndexQueryType.range && <START> (predicate.valueGroup() == ValueGroup.NUMBER || predicate.valueGroup() == ValueGroup.GEOMETRY); <END> }</code><technical_language>I this is harder read, previously searched for specific types fell return false default. Now, fall is folded a more complicated expression</technical_language>

Target:
private static boolean isNumericOrGeometricPredicate( IndexQuery predicate ) { if ( predicate.type() == IndexQuery.IndexQueryType.exact ) { IndexQuery.ExactPredicate exactPredicate = (IndexQuery.ExactPredicate) predicate; if ( isNumberGeometryOrArray( exactPredicate.value() ) ) { return true; } } else if ( predicate.type() == IndexQuery.IndexQueryType.range && ( predicate.valueGroup() == ValueGroup.NUMBER || predicate.valueGroup() == ValueGroup.GEOMETRY ) ) { return true; } return false; }