auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>public void testCommandForInputMany() throws Exception { test.clearScreen(); test.waitForCompletion("mock-command-inputmany ", "mock", 5, TimeUnit.SECONDS); test.waitForCompletion("mock-command-inputmany --values ", "--v", 5, TimeUnit.SECONDS); Assert.assertEquals("mock-command-inputmany --values ", test.getBuffer()); test.clearScreen(); Result result = test.execute("mock-command-inputmany --values one", 5, TimeUnit.SECONDS); Assert.assertEquals("Command executed.", result.getMessage()); result = test.execute("mock-command-inputmany --values one two three", 5, TimeUnit.SECONDS); <START> Assert.assertEquals("Command executed.", result.getMessage()); <END> test.clearScreen(); test.waitForStdErrChanged("mock-command-inputmany --values\n", 5, TimeUnit.SECONDS); Assert.assertThat(test.getStdErr(), containsString("Must specify at least one value for --values before continuing.")); }</code><technical_language>displaying values set in UIInputMany</technical_language>

Target:
public void testCommandForInputMany() throws Exception { test.clearScreen(); test.waitForCompletion("mock-command-inputmany ", "mock", 5, TimeUnit.SECONDS); test.waitForCompletion("mock-command-inputmany --values ", "--v", 5, TimeUnit.SECONDS); Assert.assertEquals("mock-command-inputmany --values ", test.getBuffer()); test.clearScreen(); Result result = test.execute("mock-command-inputmany --values one", 5, TimeUnit.SECONDS); Assert.assertEquals("Command executed with input values : one ", result.getMessage()); result = test.execute("mock-command-inputmany --values one two three", 5, TimeUnit.SECONDS); Assert.assertEquals("Command executed with input values : one two three ", result.getMessage()); test.clearScreen(); test.waitForStdErrChanged("mock-command-inputmany --values\n", 5, TimeUnit.SECONDS); Assert.assertThat(test.getStdErr(), containsString("Must specify at least one value for --values before continuing.")); }
Source:
<code>public DatasetStatus deleteDataset(final RelationKey relationKey) throws DbException, InterruptedException { try { Map<Integer, SubQueryPlan> workerPlans = new HashMap<>(); for (Integer workerId : getWorkersForRelation(relationKey, null)) { workerPlans.put(workerId, new SubQueryPlan(new DbDelete(EmptyRelation.of(catalog.getSchema(relationKey)), relationKey, null))); } ListenableFuture<Query> qf = <START> queryManager.submitQuery("delete " + relationKey.toString(), "delete " + relationKey.toString(), <END> "deleting from " + relationKey.toString(getDBMS()), new SubQueryPlan(new SinkRoot(new EOSSource())), workerPlans); try { qf.get(); } catch (ExecutionException e) { throw new DbException("Error executing query", e.getCause()); } } catch (CatalogException e) { throw new DbException(e); } try { catalog.deleteRelationFromCatalog(relationKey); } catch (CatalogException e) { throw new DbException(e); } return getDatasetStatus(relationKey); }</code><technical_language>concerned transactional integrity of this distributed delete. I do distributed transactions in Myria, I a here. I Postgres JDBC driver supports "XA" (two-phase commit), it, map subquery/operator model. I DROP TABLE is transactional in Postgres, do TRUNCATE TABLE DROP TABLE in separate steps</technical_language>

Target:
public DatasetStatus deleteDataset(final RelationKey relationKey) throws DbException, InterruptedException { try { catalog.markRelationDeleted(relationKey); } catch (CatalogException e) { throw new DbException(e); } try { Map<Integer, SubQueryPlan> workerPlans = new HashMap<>(); for (Integer workerId : getWorkersForRelation(relationKey, null)) { workerPlans.put(workerId, new SubQueryPlan(new DbDelete(EmptyRelation.of(catalog.getSchema(relationKey)), relationKey, null))); } ListenableFuture<Query> qf = queryManager.submitQuery("delete " + relationKey.toString(), "delete " + relationKey.toString(), "deleting from " + relationKey.toString(getDBMS()), new SubQueryPlan(new SinkRoot(new EOSSource())), workerPlans); try { qf.get(); } catch (ExecutionException e) { throw new DbException("Error executing query", e.getCause()); } } catch (CatalogException e) { throw new DbException(e); } try { catalog.deleteRelationFromCatalog(relationKey); } catch (CatalogException e) { throw new DbException(e); } return getDatasetStatus(relationKey); }
Source:
<code>private static Session createRecoverableSession(Optional<SelectedRole> role) { return testSessionBuilder() .setIdentity(new Identity( "hive", Optional.empty(), role.map(selectedRole -> ImmutableMap.of("hive", selectedRole)) .orElse(ImmutableMap.of()))) .setSystemProperty(COLOCATED_JOIN, "true") .setSystemProperty(GROUPED_EXECUTION_FOR_AGGREGATION, "true") .setSystemProperty(DYNAMIC_SCHEDULE_FOR_GROUPED_EXECUTION, "true") .setSystemProperty(RECOVERABLE_GROUPED_EXECUTION, "true") <START> .setCatalogSessionProperty(HIVE_CATALOG, USE_REWINDABLE_SPLIT_SOURCE, "true") <END> .setCatalog(HIVE_CATALOG) .setSchema(TPCH_BUCKETED_SCHEMA) .build(); }</code><technical_language>This longer needed. Rewindable split source selected based REWINDABLE_GROUPED_SCHEDULING passed engine</technical_language>

Target:
private static Session createRecoverableSession(Optional<SelectedRole> role) { return testSessionBuilder() .setIdentity(new Identity( "hive", Optional.empty(), role.map(selectedRole -> ImmutableMap.of("hive", selectedRole)) .orElse(ImmutableMap.of()))) .setSystemProperty(COLOCATED_JOIN, "true") .setSystemProperty(GROUPED_EXECUTION_FOR_AGGREGATION, "true") .setSystemProperty(DYNAMIC_SCHEDULE_FOR_GROUPED_EXECUTION, "true") .setSystemProperty(RECOVERABLE_GROUPED_EXECUTION, "true") .setCatalog(HIVE_CATALOG) .setSchema(TPCH_BUCKETED_SCHEMA) .build(); }
Source:
<code>public boolean remove( final short internalAdapterId, String indexName ) { <START> adapterCache.remove(internalAdapterId); <END> if (!adapterCache.containsKey(internalAdapterId)) return false; AdapterToIndexMapping mapping = adapterCache.get(internalAdapterId); final String[] indexNames = mapping.getIndexNames(); boolean found = false; for (int i = 0; i < indexNames.length; i++) { if (indexNames[i].compareTo(indexName) == 0) { found = true; break; } } if (!found) { return false; } if (indexNames.length > 1) { String[] newIndices = new String[indexNames.length - 1]; int count = 0; for (int i = 0; i < indexNames.length; i++) { if (indexNames[i].compareTo(indexName) == 0) { continue; } else { newIndices[count] = indexNames[i]; count++; } } adapterCache.remove(internalAdapterId); adapterCache.put( mapping.getAdapterId(), new AdapterToIndexMapping( internalAdapterId, newIndices)); } else { adapterCache.remove(internalAdapterId); } return true; }</code><technical_language>this line removed</technical_language>

Target:
public boolean remove( final short internalAdapterId, String indexName ) { if (!adapterCache.containsKey(internalAdapterId)) { return false; } AdapterToIndexMapping mapping = adapterCache.get(internalAdapterId); final String[] indexNames = mapping.getIndexNames(); boolean found = false; for (int i = 0; i < indexNames.length; i++) { if (indexNames[i].compareTo(indexName) == 0) { found = true; break; } } if (!found) { return false; } if (indexNames.length > 1) { String[] newIndices = new String[indexNames.length - 1]; int count = 0; for (int i = 0; i < indexNames.length; i++) { if (indexNames[i].compareTo(indexName) == 0) { continue; } else { newIndices[count] = indexNames[i]; count++; } } adapterCache.remove(internalAdapterId); adapterCache.put( mapping.getAdapterId(), new AdapterToIndexMapping( internalAdapterId, newIndices)); } else { adapterCache.remove(internalAdapterId); } return true; }
Source:
<code>public void locate() throws Exception { MultiBranchImpl stuff = r.createProject(MultiBranchImpl.class, "stuff"); stuff.getSourcesList().add(new BranchSource(new SingleSCMSource(null, "dev/flow", new NullSCM()))); stuff.scheduleBuild2(0).getFuture().get(); r.waitUntilNoActivity(); showComputation(stuff); <START> FreeStyleProject master = r.jenkins.getItemByFullName("stuff/"+NameMangler.apply("dev/flow"), FreeStyleProject.class); <END> assertNotNull(master); assertEquals(r.jenkins.getRootPath().child("workspace/stuff_"+ NameMangler.apply("dev/flow").replace('@','_')+"-HEAQQA3VKMJWWMJ2LGY5PBAKURNMTX2PMQ3FG7E2R5NWAUUN4SZQ"), r.jenkins.getWorkspaceFor(master)); DumbSlave slave = r.createOnlineSlave(); assertEquals(slave.getWorkspaceRoot().child("stuff_"+NameMangler.apply("dev/flow").replace('@', '_')+"-HEAQQA3VKMJWWMJ2LGY5PBAKURNMTX2PMQ3FG7E2R5NWAUUN4SZQ"), slave.getWorkspaceFor(master)); FreeStyleProject unrelated = r.createFreeStyleProject("100% crazy"); assertEquals(r.jenkins.getRootPath().child("workspace/100% crazy"), r.jenkins.getWorkspaceFor(unrelated)); }</code><technical_language>Prefer a string constant a reader of test immediately actual item name be-and notice if some change NameMangler potentially causing compatibility issues</technical_language>

Target:
public void locate() throws Exception { MultiBranchImpl stuff = r.createProject(MultiBranchImpl.class, "stuff"); stuff.getSourcesList().add(new BranchSource(new SingleSCMSource(null, "dev/flow", new NullSCM()))); stuff.scheduleBuild2(0).getFuture().get(); r.waitUntilNoActivity(); showComputation(stuff); FreeStyleProject master = r.jenkins.getItemByFullName("stuff/dev-flow.bn29c1", FreeStyleProject.class); assertNotNull(master); assertEquals(r.jenkins.getRootPath().child("workspace/stuff_dev-flow.bn29c1-7W3ZTDHY5QN5BTMYZEFLCFP56UUPM32ZI6RUODUT4HZONWY7MLFA"), r.jenkins.getWorkspaceFor(master)); DumbSlave slave = r.createOnlineSlave(); assertEquals(slave.getWorkspaceRoot().child("stuff_dev-flow.bn29c1-7W3ZTDHY5QN5BTMYZEFLCFP56UUPM32ZI6RUODUT4HZONWY7MLFA"), slave.getWorkspaceFor(master)); FreeStyleProject unrelated = r.createFreeStyleProject("100% crazy"); assertEquals(r.jenkins.getRootPath().child("workspace/100% crazy"), r.jenkins.getWorkspaceFor(unrelated)); }
Source:
<code><START> public SelendroidConfiguration getSelendroidConfiguration() { <END> return serverConfiguration; }</code><technical_language>revert this pass configuration construction of FolderMonitor instead</technical_language>

Target:
protected SelendroidConfiguration getSelendroidConfiguration() { return serverConfiguration; }
Source:
<code>public void pointRead(Blackhole blackhole) throws IOException { Table table = connection.getTable(jobConfig.tableName); String rowPrefix = getRowPrefix(jobConfig.cellsPerRow, jobConfig.cellSize); <START> Result result = table.get(new Get(Bytes.toBytes(rowPrefix + String.format(SUFFIX_FMT, 1)))); <END> for (Cell cell : result.listCells()) { blackhole.consume(cell); } }</code><technical_language>Please randomize row fetching</technical_language>

Target:
public void pointRead(Blackhole blackhole) throws IOException { byte[] rowKey = Bytes.toBytes(READ_ROW_PREFIX + String.format("%010d", getRandomInt(10_000))); Result result = table.get(new Get(rowKey)); for (Cell cell : result.listCells()) { blackhole.consume(cell); } }
Source:
<code>public SecretSeries map(Record r) { <START> Gson gson = new Gson(); <END> Type optionsType = new TypeToken<HashMap<String, String>>() {}.getType(); return new SecretSeries( r.getValue(SECRETS.ID), r.getValue(SECRETS.NAME), r.getValue(SECRETS.DESCRIPTION), r.getValue(SECRETS.CREATEDAT), r.getValue(SECRETS.CREATEDBY), r.getValue(SECRETS.UPDATEDAT), r.getValue(SECRETS.UPDATEDBY), r.getValue(SECRETS.TYPE), gson.fromJson(r.getValue(SECRETS.OPTIONS), optionsType)); }</code><technical_language>Jackson (ObjectMapper)? a similar project Gson, in Keywhiz Dropwizard</technical_language>

Target:
public SecretSeries map(Record r) { return new SecretSeries( r.getValue(SECRETS.ID), r.getValue(SECRETS.NAME), r.getValue(SECRETS.DESCRIPTION), r.getValue(SECRETS.CREATEDAT), r.getValue(SECRETS.CREATEDBY), r.getValue(SECRETS.UPDATEDAT), r.getValue(SECRETS.UPDATEDBY), r.getValue(SECRETS.TYPE), tryToReadMapValue(r, SECRETS.OPTIONS)); }
Source:
<code>public void creatingUserThenDeletingRemovesExternalIdAssignment() throws Exception { String externalId = BridgeUtils.generateGuid(); participant = new StudyParticipant.Builder().copyOf(participant).withExternalId(externalId).build(); ExternalIdentifier idForTest = ExternalIdentifier.create(study.getStudyIdentifier(), externalId); idForTest.setSubstudyId(substudy.getId()); externalIdService.createExternalId(idForTest, false); try { study.setExternalIdValidationEnabled(true); session = userAdminService.createUser(study, participant, null, true, true); DynamoExternalIdentifier identifier = getDynamoExternalIdentifier(session, externalId); assertEquals(session.getHealthCode(), identifier.getHealthCode()); userAdminService.deleteUser(study, session.getId()); identifier = getDynamoExternalIdentifier(session, externalId); assertNull(identifier.getHealthCode()); Account account = Account.create(); account.setId(BridgeUtils.generateGuid()); account.setStudyId(session.getStudyIdentifier().getIdentifier()); <START> account.setHealthCode(session.getHealthCode()); <END> ExternalIdentifier extIdObj = externalIdService.beginAssignExternalId(account, externalId); externalIdService.commitAssignExternalId(extIdObj); } finally { session = null; study.setExternalIdValidationEnabled(false); externalIdService.deleteExternalIdPermanently(study, idForTest); } }</code><technical_language>set a health code, original user deleted</technical_language>

Target:
public void creatingUserThenDeletingRemovesExternalIdAssignment() throws Exception { String externalId = BridgeUtils.generateGuid(); participant = new StudyParticipant.Builder().copyOf(participant).withExternalId(externalId).build(); ExternalIdentifier idForTest = ExternalIdentifier.create(study.getStudyIdentifier(), externalId); idForTest.setSubstudyId(substudy.getId()); externalIdService.createExternalId(idForTest, false); try { study.setExternalIdValidationEnabled(true); session = userAdminService.createUser(study, participant, null, true, true); DynamoExternalIdentifier identifier = getDynamoExternalIdentifier(session, externalId); assertEquals(session.getHealthCode(), identifier.getHealthCode()); userAdminService.deleteUser(study, session.getId()); identifier = getDynamoExternalIdentifier(session, externalId); assertNull(identifier.getHealthCode()); Account account = Account.create(); account.setId(BridgeUtils.generateGuid()); account.setStudyId(session.getStudyIdentifier().getIdentifier()); account.setHealthCode(BridgeUtils.generateGuid()); ExternalIdentifier extIdObj = setupExternalId(account, externalId); externalIdService.commitAssignExternalId(extIdObj); } finally { session = null; study.setExternalIdValidationEnabled(false); externalIdService.deleteExternalIdPermanently(study, idForTest); } }
Source:
<code>private String makeLabel(final String convert) { if (listBox.isMultipleSelect()) { <START> return Arrays.stream(convert.split(",")) <END> .map(s -> getLabel(s)) .collect(Collectors.joining(",")); } else { return getLabel(convert); } }</code><technical_language>Do I want reallllllllly picky here? If enumeration like: [1="one", 2="two, deux", 3="three"] this break. a utility class handle correct splits</technical_language>

Target:
private String makeLabel(final String convert) { if (listBox.isMultipleSelect()) { String[] array = ListSplitter.splitPreserveQuotes("\"", true, convert); return Arrays.stream(array) .map(s -> getLabel(s)) .collect(Collectors.joining(",")); } else { return getLabel(convert); } }
Source:
<code>public static void validate(Map<String, String> props) { final boolean hasTopicsConfig = hasTopicsConfig(props); final boolean hasTopicsRegexConfig = hasTopicsRegexConfig(props); final boolean hasDlqTopicConfig = hasDlqTopicConfig(props); if (hasTopicsConfig && hasTopicsRegexConfig) { throw new ConfigException(SinkTask.TOPICS_CONFIG + " and " + SinkTask.TOPICS_REGEX_CONFIG + " are mutually exclusive options, but both are set."); } if (!hasTopicsConfig && !hasTopicsRegexConfig) { throw new ConfigException("Must configure one of " + SinkTask.TOPICS_CONFIG + " or " + SinkTask.TOPICS_REGEX_CONFIG); } if (hasDlqTopicConfig) { String dlqTopic = props.get(DLQ_TOPIC_NAME_CONFIG).trim(); if (hasTopicsConfig) { <START> String[] topics = props.get(SinkTask.TOPICS_CONFIG).split(","); Arrays.setAll(topics, i -> topics[i].trim()); if (Arrays.asList(topics).contains(dlqTopic)) { <END> throw new ConfigException(DLQ_TOPIC_NAME_CONFIG + " has a topic name which is already in " + SinkTask.TOPICS_CONFIG); } } if (hasTopicsRegexConfig) { String topicsRegexStr = props.get(SinkTask.TOPICS_REGEX_CONFIG); Pattern pattern = Pattern.compile(topicsRegexStr); if (pattern.matcher(dlqTopic).matches()) { throw new ConfigException(DLQ_TOPIC_NAME_CONFIG + " has a topic name which matches in " + SinkTask.TOPICS_REGEX_CONFIG); } } } }</code><technical_language>I a utility method provided ConfigDef class here: suggestion List<String> topics = (List<String>) ConfigDef.parseType(SinkTask.TOPICS_CONFIG, props.get(SinkTask.TOPICS_CONFIG), ConfigDef.Type.LIST); if (topics.contains(dlqTopic)) {</technical_language>

Target:
public static void validate(Map<String, String> props) { final boolean hasTopicsConfig = hasTopicsConfig(props); final boolean hasTopicsRegexConfig = hasTopicsRegexConfig(props); final boolean hasDlqTopicConfig = hasDlqTopicConfig(props); if (hasTopicsConfig && hasTopicsRegexConfig) { throw new ConfigException(SinkTask.TOPICS_CONFIG + " and " + SinkTask.TOPICS_REGEX_CONFIG + " are mutually exclusive options, but both are set."); } if (!hasTopicsConfig && !hasTopicsRegexConfig) { throw new ConfigException("Must configure one of " + SinkTask.TOPICS_CONFIG + " or " + SinkTask.TOPICS_REGEX_CONFIG); } if (hasDlqTopicConfig) { String dlqTopic = props.get(DLQ_TOPIC_NAME_CONFIG).trim(); if (hasTopicsConfig) { List<String> topics = parseTopicsList(props); if (topics.contains(dlqTopic)) { throw new ConfigException(String.format("The DLQ topic '%s' may not be included in the list of " + "topics ('%s=%s') consumed by the connector", dlqTopic, SinkTask.TOPICS_REGEX_CONFIG, topics)); } } if (hasTopicsRegexConfig) { String topicsRegexStr = props.get(SinkTask.TOPICS_REGEX_CONFIG); Pattern pattern = Pattern.compile(topicsRegexStr); if (pattern.matcher(dlqTopic).matches()) { throw new ConfigException(String.format("The DLQ topic '%s' may not be included in the regex matching the " + "topics ('%s=%s') consumed by the connector", dlqTopic, SinkTask.TOPICS_REGEX_CONFIG, topicsRegexStr)); } } } }
Source:
<code>public void visitNode(Tree tree) { MethodTree method = (MethodTree) tree; <START> boolean isPublic = method.modifiers().modifiers().contains(Modifier.PUBLIC) || method.symbol().owner().isInterface(); <END> if (!isPublic && hasTransactionalAnnotation(method)) { addIssue(method, "Make this method \"public\" or remove the \"@Transactional\" annotation"); } }</code><technical_language>check flag symbol</technical_language>

Target:
public void visitNode(Tree tree) { MethodTree method = (MethodTree) tree; boolean isPublic = method.modifiers().contains(Modifier.PUBLIC); if (hasSemantic()) { isPublic = method.symbol().isPublic(); } if (!isPublic && hasTransactionalAnnotation(method)) { addIssue(method, "Make this method \"public\" or remove the \"@Transactional\" annotation"); } }
Source:
<code>private void startSubscription() { LOG.info("{}: Consumer subscribes to {}", this, topicPartitionsToSSP.keySet()); try { synchronized (kafkaConsumer) { <START> kafkaConsumer.assign(topicPartitionsToSSP.keySet()); <END> } } catch (Exception e) { throw new SamzaException("Consumer subscription failed for " + this, e); } }</code><technical_language>Do beneficial ThreadSafeKafkaConsumer wrapper class? part of follow PR</technical_language>

Target:
private void startSubscription() { LOG.info("{}: Consumer subscribes to {}", this, topicPartitionsToOffset.keySet()); try { synchronized (kafkaConsumer) { kafkaConsumer.assign(topicPartitionsToOffset.keySet()); } } catch (Exception e) { throw new SamzaException("Consumer subscription failed for " + this, e); } }
Source:
<code>private SearchResult search(boolean enableScrolling) { Search.Builder builder = new Search.Builder( payloadAsString ); builder.addIndex( indexNames ); if ( enableScrolling ) { builder.setParameter( Parameters.SCROLL, getScrollTimeout() ); builder.setParameter( Parameters.SIZE, getScrollFetchSize() ); } else { builder.setParameter( "from", firstResult ); builder.setParameter( Parameters.SIZE, maxResults != null ? maxResults : MAX_RESULT_WINDOW_SIZE - firstResult ); } if ( sort != null ) { validateSortFields( extendedIntegrator, getQueriedEntityTypes() ); for ( SortField sortField : sort.getSort() ) { builder.addSort( ToElasticsearch.fromLuceneSortField( sortField ) ); } } Search search = builder.build(); if ( QUERY_LOG.isDebugEnabled() ) { try ( ServiceReference<GsonService> gsonService = <START> extendedIntegrator.getServiceManager().requestReference( GsonService.class ) ) { <END> Gson gson = gsonService.get().getGson(); QUERY_LOG.executingElasticsearchQuery( search.getURI(), search.getData( gson ) ); } } try ( ServiceReference<JestClient> client = getExtendedSearchIntegrator().getServiceManager().requestReference( JestClient.class ) ) { return client.get().executeRequest( search ); } }</code><technical_language>need avoid requesting a service reference runtime, is problematic handle requests concurrently && efficiently. (I in other places too, original POC meant cleaned up) pass reference this service constructor in some way, while making reference service is requested initialization</technical_language>

Target:
private SearchResult search(boolean enableScrolling) { Search.Builder builder = new Search.Builder( payloadAsString ); builder.addIndex( indexNames ); if ( enableScrolling ) { builder.setParameter( Parameters.SCROLL, getScrollTimeout() ); builder.setParameter( Parameters.SIZE, getScrollFetchSize() ); } else { builder.setParameter( "from", firstResult ); builder.setParameter( Parameters.SIZE, maxResults != null ? maxResults : MAX_RESULT_WINDOW_SIZE - firstResult ); } if ( sort != null ) { validateSortFields( extendedIntegrator, getQueriedEntityTypes() ); for ( SortField sortField : sort.getSort() ) { builder.addSort( ToElasticsearch.fromLuceneSortField( sortField ) ); } } Search search = builder.build(); if ( QUERY_LOG.isDebugEnabled() ) { try ( ServiceReference<GsonService> gsonService = extendedIntegrator.getServiceManager().requestReference( GsonService.class ) ) { QUERY_LOG.executingElasticsearchQuery( search.getURI(), getPrettyPrintedData( gsonService.get(), search) ); } } try ( ServiceReference<JestClient> client = getExtendedSearchIntegrator().getServiceManager().requestReference( JestClient.class ) ) { return client.get().executeRequest( search ); } }
Source:
<code>protected void endSuccessfully() { setVmTemplateId(getParameters().getVmTemplateId()); <START> setVmId(((CreateImageTemplateParameters)getParameters().getImagesParameters().get(0)).getVmId()); <END> for (VdcActionParametersBase p : getParameters().getImagesParameters()) { Backend.getInstance().EndAction(VdcActionType.CreateImageTemplate, p); } if (reloadVmTemplateFromDB() != null) { endDefaultOperations(); } setSucceeded(true); }</code><technical_language>least, extract '(CreateImageTemplateParameters)getParameters().getImagesParameters().get(0)).getVmId());" method..</technical_language>

Target:
protected void endSuccessfully() { setVmTemplateId(getParameters().getVmTemplateId()); setVmId(getVmIdFromImageParameters()); for (VdcActionParametersBase p : getParameters().getImagesParameters()) { Backend.getInstance().EndAction(VdcActionType.CreateImageTemplate, p); } if (reloadVmTemplateFromDB() != null) { endDefaultOperations(); } setSucceeded(true); }
Source:
<code>public void initialise() { for (EntityRef entity : entityManager.getEntitiesWith(ScoreComponent.class)) { <START> scoreEntity = entity; <END> score = scoreEntity.getComponent(ScoreComponent.class); } if (!scoreEntity.equals(EntityRef.NULL)) { scoreArea = find("scoreArea", UIText.class); scoreArea.bindText(new ReadOnlyBinding<String>() { @Override public String get() { return String.valueOf(score.blackScore); } }); } }</code><technical_language>expecting more entities ScoreComponent.class? If is more one, store of (the one) private EntityRef scoreEntity; Currently, variable is accessed in local scope of initialise</technical_language>

Target:
public void initialise() { }
Source:
<code>public void testWrongSelectionBug534319singleThread() throws Exception { <START> waitForNonConsoleJobs(); <END> int iterations = 5; final String typeName = "Bug534319singleThread"; final String breakpointMethodName = "breakpointMethod"; doTestWrongSelectionBug534319(iterations, typeName, breakpointMethodName); }</code><technical_language>move this doTestWrongSelectionBug534319</technical_language>

Target:
public void testWrongSelectionBug534319singleThread() throws Exception { int iterations = 5; final String typeName = "Bug534319singleThread"; final String breakpointMethodName = "breakpointMethod"; doTestWrongSelectionBug534319(iterations, typeName, breakpointMethodName); }
Source:
<code>public ExpandDims(SameDiff sameDiff, SDVariable[] args, int axis) { super(null, sameDiff, args); <START> if(axis == Integer.MAX_VALUE){ <END> throw new IllegalArgumentException("Cannot perform ExpandDims with axis == Integer.MAX_VALUE"); } this.axis = axis; addIArgument(this.axis); }</code><technical_language>want Nd4jIllegalArgumentException</technical_language>

Target:
public ExpandDims(SameDiff sameDiff, SDVariable[] args, int axis) { super(null, sameDiff, args); if(axis == Integer.MAX_VALUE){ throw new ND4JIllegalArgumentException("Cannot perform ExpandDims with axis == Integer.MAX_VALUE"); } this.axis = axis; addIArgument(this.axis); }
Source:
<code>public void addUser(RoleUser user) { <START> throw new RuntimeException("PluginRoleConfig does not support adding users, should be added through RoleConfigService"); <END> }</code><technical_language>UnsupportedOperationException</technical_language>

Target:
public void addUser(RoleUser user) { throw new UnsupportedOperationException("PluginRoleConfig does not support adding users, should be added through PluginRoleService"); }
Source:
<code>public void handleStateChanged(Watcher.Event.KeeperState state) { switch (state) { case Expired: LOG.warn("Got " + state.toString() + " event for processor=" + processorId + ". Stopping the container and unregister the processor node."); zkUtils.incGeneration(); zkUtils.unregister(); if (leaderElector.amILeader()) { leaderElector.resignLeadership(); } LOG.info("Cancelling all scheduled actions in session expiration for processorId: {}.", processorId); debounceTimer.cancelAllScheduledActions(); <START> debounceTimer.scheduleAfterDebounceTime(ZK_SESSION_ERROR, 0, () -> { <END> if (coordinatorListener != null) { coordinatorListener.onJobModelExpired(); } }); return; case Disconnected: LOG.warn("Got " + state.toString() + " event for processor=" + processorId + ". Scheduling a coordinator stop."); debounceTimer.scheduleAfterDebounceTime(ZK_SESSION_ERROR, new ZkConfig(config).getZkSessionTimeoutMs(), () -> stop()); return; case AuthFailed: case NoSyncConnected: case Unknown: LOG.warn("Got unexpected failure event " + state.toString() + " for processor=" + processorId + ". Stopping the job coordinator."); debounceTimer.scheduleAfterDebounceTime(ZK_SESSION_ERROR, 0, () -> stop()); return; case SyncConnected: LOG.info("Got syncconnected event for processor=" + processorId + "."); debounceTimer.cancelAction(ZK_SESSION_ERROR); return; default: LOG.info("Got ZK event " + state.toString() + " for processor=" + processorId + ". Continue"); return; } }</code><technical_language>cleaner name schedule key "ZK_SESSION_EXPIRED". way, able distinguish "ZK_SESSION_ERROR" refers disconnects/unknown error-codes</technical_language>

Target:
public void handleStateChanged(Watcher.Event.KeeperState state) { switch (state) { case Expired: LOG.warn("Got " + state.toString() + " event for processor=" + processorId + ". Stopping the container and unregister the processor node."); zkUtils.incGeneration(); zkUtils.unregister(); if (leaderElector.amILeader()) { leaderElector.resignLeadership(); } LOG.info("Cancelling all scheduled actions in session expiration for processorId: {}.", processorId); debounceTimer.cancelAllScheduledActions(); debounceTimer.scheduleAfterDebounceTime(ZK_SESSION_EXPIRED, 0, () -> { if (coordinatorListener != null) { coordinatorListener.onJobModelExpired(); } }); return; case Disconnected: LOG.warn("Got " + state.toString() + " event for processor=" + processorId + ". Scheduling a coordinator stop."); debounceTimer.scheduleAfterDebounceTime(ZK_SESSION_ERROR, new ZkConfig(config).getZkSessionTimeoutMs(), () -> stop()); return; case AuthFailed: case NoSyncConnected: case Unknown: LOG.warn("Got unexpected failure event " + state.toString() + " for processor=" + processorId + ". Stopping the job coordinator."); debounceTimer.scheduleAfterDebounceTime(ZK_SESSION_ERROR, 0, () -> stop()); return; case SyncConnected: LOG.info("Got syncconnected event for processor=" + processorId + "."); debounceTimer.cancelAction(ZK_SESSION_ERROR); return; default: LOG.info("Got ZK event " + state.toString() + " for processor=" + processorId + ". Continue"); return; } }
Source:
<code>private RegistryFetch getLatestFullFetch() { if (fullFetchWithDeltaView.get() == null) { Eureka2FullFetchWithDeltaView newView = new Eureka2FullFetchWithDeltaView( registry.forInterest(Interests.forFullRegistry()), refreshIntervalMs, scheduler ); if (!fullFetchWithDeltaView.compareAndSet(null, newView)) { newView.close(); } } <START> return fullFetchWithDeltaView.get().latestCopy().timeout(queryTimeoutMs, TimeUnit.MILLISECONDS).take(1).toBlocking().first(); <END> }</code><technical_language>toBlocking here? Also, if timeout occurs is element returned, this result in NPE</technical_language>

Target:
private Observable<RegistryFetch> getLatestFullFetch() { if (fullFetchWithDeltaView.get() == null) { synchronized (fullFetchWithDeltaView) { if (fullFetchWithDeltaView.get() == null) { Eureka2FullFetchWithDeltaView newView = new Eureka2FullFetchWithDeltaView( registry.forInterest(Interests.forFullRegistry()), refreshIntervalMs, scheduler ); fullFetchWithDeltaView.set(newView); } } } return fullFetchWithDeltaView.get().latestCopy(); }
Source:
<code>public Provider getProvider() { if (ec2 != null) { return ec2; } else if (gce != null) { return gce; } else if (vagrant != null) { return vagrant; <START> } else if(occi != null){ <END> return occi; } else { return baremetal; } }</code><technical_language>please fix whitespace</technical_language>

Target:
public Provider getProvider() { if (ec2 != null) { return ec2; } else if (gce != null) { return gce; } else if (vagrant != null) { return vagrant; } else if(nova != null) { return nova; } else if(occi != null) { return occi; } else { return baremetal; } }
Source:
<code>public static int threadPoolSize() { try { return Integer.parseInt(System.getenv(THREAD_POOL_SIZE)); <START> } catch (NumberFormatException e) { <END> return DEFAULT_THREAD_POOL_SIZE; } }</code><technical_language>log this exception? providing invalid config prevent app starting defaulting? e.g. setting 100) instead of 1000 default 20 nasty problems</technical_language>

Target:
public static int threadPoolSize() { try { return Integer.parseInt(System.getenv(PUBLISHING_THREAD_POOL_SIZE)); } catch (NumberFormatException e) { logBuilder() .addParameter("envVar", PUBLISHING_THREAD_POOL_SIZE) .error(e, "fail to parse environment variable to integer"); throw e; } }
Source:
<code>void fromJupiterEngineDescriptor() { JupiterEngineDescriptor engineTestDescriptor = new JupiterEngineDescriptor( UniqueId.root("engine", "junit-jupiter")); JupiterEngineExtensionContext engineContext = new JupiterEngineExtensionContext(null, engineTestDescriptor); assertAll("engineContext", () -> assertThat(engineContext.getTestClass()).isEmpty(), () -> assertThat(engineContext.getTestMethod()).isEmpty(), () -> assertThat(engineContext.getElement()).isEmpty(), () -> assertEquals(engineTestDescriptor.getDisplayName(), engineContext.getDisplayName()), <START> () -> assertEquals(Optional.empty(), engineContext.getParent()) END> ); }</code><technical_language>simply assertThat() well</technical_language>

Target:
void fromJupiterEngineDescriptor() { JupiterEngineDescriptor engineTestDescriptor = new JupiterEngineDescriptor( UniqueId.root("engine", "junit-jupiter")); JupiterEngineExtensionContext engineContext = new JupiterEngineExtensionContext(null, engineTestDescriptor); assertAll("engineContext", () -> assertThat(engineContext.getTestClass()).isEmpty(), () -> assertThat(engineContext.getTestMethod()).isEmpty(), () -> assertThat(engineContext.getElement()).isEmpty(), () -> assertThat(engineContext.getDisplayName()).isEqualTo(engineTestDescriptor.getDisplayName()), () -> assertThat(engineContext.getParent()).isEmpty() ); }
Source:
<code>private AttributeListAccumulator acquireCachedAttributeAccumulator() { <START> if (mCachedAttributeAccumulator == null) { <END> mCachedAttributeAccumulator = new AttributeListAccumulator(); } else if (mCachedAttributeAccumulator.size() > 0) { mCachedAttributeAccumulator.clear(); } return mCachedAttributeAccumulator; }</code><technical_language>This method a bug. a singleton caching system here, this implementation hand out AttributeListAccumulator more if called a call releaseCachedAttributeAccumulator in-between</technical_language>

Target:
private AttributeListAccumulator acquireCachedAttributeAccumulator() { AttributeListAccumulator accumulator = mCachedAttributeAccumulator; if (accumulator == null) { accumulator = new AttributeListAccumulator(); } mCachedChildrenAccumulator = null; return accumulator; }
Source:
<code><START> private LnClientConnection createConnection() throws IOException { <END> final byte[] authenticationKey = Hex.decode(this.getSecurityKey(SecurityKeyType.E_METER_AUTHENTICATION) .getKey()); final byte[] encryptionKey = Hex.decode(this.getSecurityKey(SecurityKeyType.E_METER_ENCRYPTION).getKey()); LOGGER.info("Keys: = {}", this.getSecurityKey(SecurityKeyType.E_METER_AUTHENTICATION).getKey(), this .getSecurityKey(SecurityKeyType.E_METER_ENCRYPTION).getKey()); final TcpConnectionBuilder tcpConnectionBuilder = new TcpConnectionBuilder(InetAddress.getByName(this.device .getIpAddress())).useGmacAuthentication(authenticationKey, encryptionKey) .enableEncryption(encryptionKey).responseTimeout(10000).logicalDeviceAddress(1).clientAccessPoint(1); final Integer challengeLength = this.device.getChallengeLength(); if (challengeLength != null) { tcpConnectionBuilder.challengeLength(challengeLength); } return tcpConnectionBuilder.buildLnConnection(); }</code><technical_language>In DlmsConnectionFactory method connection refactored return ClientConnection instead of LnClientConnection. If reason to, I this refactoring applied well</technical_language>

Target:
private ClientConnection createConnection() throws IOException { final byte[] authenticationKey = Hex.decode(this.getSecurityKey(SecurityKeyType.E_METER_AUTHENTICATION) .getKey()); final byte[] encryptionKey = Hex.decode(this.getSecurityKey(SecurityKeyType.E_METER_ENCRYPTION).getKey()); final TcpConnectionBuilder tcpConnectionBuilder = new TcpConnectionBuilder(InetAddress.getByName(this.device .getIpAddress())).useGmacAuthentication(authenticationKey, encryptionKey) .enableEncryption(encryptionKey).responseTimeout(this.responseTimeout) .logicalDeviceAddress(this.logicalDeviceAddress).clientAccessPoint(this.clientAccessPoint); final Integer challengeLength = this.device.getChallengeLength(); if (challengeLength != null) { tcpConnectionBuilder.challengeLength(challengeLength); } return tcpConnectionBuilder.buildLnConnection(); }
Source:
<code>public static FileUtils.FileCopyResult unzip( final ByteSource byteSource, final File outDir, final Predicate<Throwable> shouldRetry, boolean cacheLocally ) throws IOException { if (!cacheLocally) { try { return RetryUtils.retry( new Callable<FileUtils.FileCopyResult>() { @Override public FileUtils.FileCopyResult call() throws Exception { return unzip(byteSource.openStream(), outDir); } }, shouldRetry, DEFAULT_RETRY_COUNT ); } catch (Exception e) { throw Throwables.propagate(e); } } <START> final File tmpFile = File.createTempFile("compressionUtilZipCache", ZIP_SUFFIX); <END> try { FileUtils.FileCopyResult copyResult = FileUtils.retryCopy( byteSource, tmpFile, shouldRetry, DEFAULT_RETRY_COUNT ); return unzip(tmpFile, outDir); } finally { if (!tmpFile.delete()) { log.warn("Could not delete zip cache at [%s]", tmpFile.toString()); } } }</code><technical_language>Putting this in else block clearer</technical_language>

Target:
public static FileUtils.FileCopyResult unzip( final ByteSource byteSource, final File outDir, final Predicate<Throwable> shouldRetry, boolean cacheLocally ) throws IOException { if (!cacheLocally) { try { return RetryUtils.retry( new Callable<FileUtils.FileCopyResult>() { @Override public FileUtils.FileCopyResult call() throws Exception { return unzip(byteSource.openStream(), outDir); } }, shouldRetry, DEFAULT_RETRY_COUNT ); } catch (Exception e) { throw Throwables.propagate(e); } } else { final File tmpFile = File.createTempFile("compressionUtilZipCache", ZIP_SUFFIX); try { FileUtils.FileCopyResult copyResult = FileUtils.retryCopy( byteSource, tmpFile, shouldRetry, DEFAULT_RETRY_COUNT ); return unzip(tmpFile, outDir); } finally { if (!tmpFile.delete()) { log.warn("Could not delete zip cache at [%s]", tmpFile.toString()); } } } }
Source:
<code>public Profile validated(final Profile master, final Profile merged) throws IOException { final String[] security = {"architect", "commander"}; for (final String section : security) { if (!Arrays.equals( master.read().xpath( <START> String.format(Profiles.ITEMS, section) <END> ).toArray(), merged.read().xpath( String.format(Profiles.ITEMS, section) ).toArray() )) { throw new Profile.ConfigException( String.format( "You cannot change `%s` section for security reasons", section ) ); } } return merged; }</code><technical_language>@xupyprmv some code duplication read, get xpath get array - extract method</technical_language>

Target:
public Profile validated(final Profile master, final Profile merged) throws IOException { final String commanders = "commanders"; final String[][] security = { {"architect"}, {Profiles.MERGE, commanders}, {"deploy", commanders}, {"release", commanders}, }; for (final String[] section : security) { if (!Arrays.equals( Profiles.section(master, section), Profiles.section(merged, section) )) { throw new Profile.ConfigException( String.format( "You cannot change `%s` section for security reasons", Arrays.toString(section) ) ); } } return merged; }
Source:
<code>public void onItemSelected(AdapterView<?> parent, View view, int position, long id) { <START> String selected = (String) parent.getItemAtPosition(position); <END> ApplicationRecord r = namesToRecords.get(selected); SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(this); prefs.edit().putString(KEY_LAST_APP, r.getUniqueId()).commit(); loadFields(false); CommCareApplication._().initializeAppResources(new CommCareApp(r)); if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) { refreshBreadcrumbBar(); } }</code><technical_language>Kind of sketchy do this name, btw. index is OK (IE: ArrayList of AppRecords in order items)</technical_language>

Target:
public void onItemSelected(AdapterView<?> parent, View view, int position, long id) { ApplicationRecord r = appRecordDropdownList.get(position); SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(this); prefs.edit().putString(KEY_LAST_APP, r.getUniqueId()).commit(); loadFields(false); CommCareApplication._().initializeAppResources(new CommCareApp(r)); if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) { refreshActionBar(); } }
Source:
<code>public static CommandContext createInternalJobContext(EngineLock lock) { ExecutionContext executionContext = new ExecutionContext(); executionContext.setJobRequired(true); executionContext.setMonitored(true); <START> return new CommandContext(new EngineContext()).setExecutionContext(executionContext).setLock(lock); <END> }</code><technical_language>reset compensation</technical_language>

Target:
public static CommandContext createInternalJobContext(EngineLock lock) { ExecutionContext executionContext = new ExecutionContext(); executionContext.setJobRequired(true); executionContext.setMonitored(true); return new CommandContext(new EngineContext()).withExecutionContext(executionContext).withtLock(lock); }
Source:
<code>public FlyingAbilityDataProcessor() { <START> super(EntityPlayer.class, Keys.IS_FLYING); <END> }</code><technical_language>nope.avi</technical_language>

Target:
public FlyingAbilityDataProcessor() { super(EntityPlayer.class, Keys.CAN_FLY); }
Source:
<code>public void testNullModuleIdAndNonMatchingChecks() throws Exception { final String xpath = "NON_MATCHING_QUERY"; final XpathFilterElement filter = new XpathFilterElement( <START> (String) null, null, null, null, xpath); <END> final TreeWalkerAuditEvent ev = getEvent(3, 0, TokenTypes.CLASS_DEF); assertTrue("Event should be accepted", filter.accept(ev)); }</code><technical_language>Please move updates separate commit of PR, is related issue</technical_language>

Target:
public void testNullModuleIdAndNonMatchingChecks() throws Exception { final String xpath = "NON_MATCHING_QUERY"; final XpathFilterElement filter = new XpathFilterElement( "InputXpathFilterElementSuppressByXpath", "NonMatchingRegexp", null, null, xpath); final TreeWalkerAuditEvent ev = getEvent(3, 0, TokenTypes.CLASS_DEF); assertTrue("Event should be accepted", filter.accept(ev)); }
Source:
<code>public String sysIdentifier(String upperName) { <START> return dbSettings.databaseToLower ? StringUtils.toLowerEnglish(upperName) : upperName; <END> }</code><technical_language>assert upperName is uppercase</technical_language>

Target:
public String sysIdentifier(String upperName) { assert isUpperSysIdentifier(upperName); return dbSettings.databaseToLower ? StringUtils.toLowerEnglish(upperName) : upperName; }
Source:
<code>public static String loadTextFileFromAssets(Context context, String fileName) { String fileContent; try { InputStream iStream = context.getAssets().open(fileName); BufferedInputStream bInputStream = new BufferedInputStream(iStream); ByteArrayOutputStream bOutputStream = new ByteArrayOutputStream(); int result = bInputStream.read(); while(result != -1) { byte b = (byte)result; bOutputStream.write(b); result = bInputStream.read(); } fileContent = bOutputStream.toString(); } catch (IOException ioexception) { ioexception.printStackTrace(); <START> return null; <END> } return fileContent; }</code><technical_language>This throw exception caller decide do if fails. code is here, returning null string "null" printed styles tag. print if loading this fails</technical_language>

Target:
public static String loadTextFileFromAssets (Context context, String fileName) throws IOException { InputStream inputStream = context.getAssets().open(fileName); try { OutputStream outputStream = new ByteArrayOutputStream(); try { byte[] buffer = new byte[DEFAULT_BUFFER_SIZE]; for (int n; (n = inputStream.read(buffer)) >= 0;) { outputStream.write(buffer, 0, n); } return outputStream.toString(); } finally { outputStream.close(); } } finally { inputStream.close(); } }
Source:
<code><START> public static int getBrightness( Color color ) { if ( color == null ) { return BRIGHTNESS_THRESHOLD + 1; } final int r = color.getRed(); final int g = color.getGreen(); final int b = color.getBlue(); int brightness = ( r > g ) ? r : g; <END> if ( b > brightness ) { brightness = b; } return brightness; }</code><technical_language>write this scratch</technical_language>

Target:
public static int getBrightness( Color color ) { if ( color == null ) { return BRIGHTNESS_THRESHOLD + 1; } final int r = color.getRed(); final int g = color.getGreen(); final int b = color.getBlue(); int brightness = r > g ? r : g; if ( b > brightness ) { brightness = b; } return brightness; }
Source:
<code>public void loadSettings(TuningContext context) { this.nudge = context.getFloat("auto.full.nudge", 1.0f); this.toteDistance = context.getFloat("auto.full.toteDistance", 7.0f); this.autoZoneDistance = context.getFloat("auto.full.autoZoneDistance", 5.0f); <START> this.strafeDistance = context.getFloat("auto.full.strafeDistance", 2.0f); <END> }</code><technical_language>dots dashes? way, this is consistent</technical_language>

Target:
public void loadSettings(TuningContext context) { this.nudge = context.getFloat("auto-full-nudge", 1.0f); this.toteDistance = context.getFloat("auto-full-toteDistance", 7.0f); this.autoZoneDistance = context.getFloat("auto-full-autoZoneDistance", 5.0f); this.strafeDistance = context.getFloat("auto-full-strafeDistance", 2.0f); }
Source:
<code>private void addAttributeArgument(Argument argument, EntityProjection entityProjection) { String argumentName = argument.getName(); Class<?> entityType = entityProjection.getType(); if (!entityDictionary.isValidField(entityType, argumentName)) { throw new IllegalStateException( String.format("Unknown argument field {%s.%s}.", entityType, argument)); } Attribute argumentAttribute = entityProjection.getAttributeByName(argumentName); com.yahoo.elide.request.Argument elideArgument = com.yahoo.elide.request.Argument.builder() .name(argumentName) .value(argument.getValue()) .build(); if (argumentAttribute == null) { argumentAttribute = Attribute.builder() .type(entityDictionary.getType(entityType, argumentName)) <START> .name(argumentName) <END> .argument(elideArgument) .build(); Set<Attribute> attributes = entityProjection.getAttributes(); attributes.add(argumentAttribute); entityProjection.setAttributes(attributes); } else { argumentAttribute.getArguments().add(elideArgument); } }</code><technical_language>I this is wrong. name of attribute field name - argument name</technical_language>

Target:
private void addAttributeArgument(Argument argument, EntityProjection entityProjection) { String argumentName = argument.getName(); Class<?> entityType = entityProjection.getType(); Attribute argumentAttribute = entityProjection.getAttributeByName(argumentName); com.yahoo.elide.request.Argument elideArgument = com.yahoo.elide.request.Argument.builder() .name(argumentName) .value(variableResolver.resolveValue(argument.getValue())) .build(); if (argumentAttribute == null) { argumentAttribute = Attribute.builder() .type(entityDictionary.getType(entityType, argumentName)) .name(argumentName) .argument(elideArgument) .build(); Set<Attribute> attributes = entityProjection.getAttributes(); attributes.add(argumentAttribute); entityProjection.setAttributes(attributes); } else { argumentAttribute.getArguments().add(elideArgument); } }
Source:
<code>public SchedulerType getBackupSchedulerType() { <START> return SchedulerType.TIME; <END> }</code><technical_language>IMO, HOUR CRON more sense TIME CRON</technical_language>

Target:
public SchedulerType getBackupSchedulerType() { return SchedulerType.HOUR; }
Source:
<code><START> public Object geometryToBingTiles(BenchmarkData data) <END> throws Throwable { return BingTileFunctions.geometryToBingTiles(data.geometry, data.zoomLevel); }</code><technical_language>Add BlackHole blackHole method parameters do blackHole.consume(BingTileFunctions.geometryToBingTiles(data.geometry, data.zoomLevel)); JVM optimize returned object is all. for envelopeToBingTiles call below</technical_language>

Target:
public Object geometryToBingTiles(BenchmarkData data) { return BingTileFunctions.geometryToBingTiles(data.geometry, data.zoomLevel); }