auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>public void testTooLowSCNWithTTL() throws Exception { int ttl = 2; String fullTableName = createTableWithTTL(ttl); Thread.sleep(ttl * 1000 + 1000); Properties props = new Properties(); props.setProperty(PhoenixRuntime.CURRENT_SCN_ATTRIB, <START> Long.toString(EnvironmentEdgeManager.currentTime() - (ttl + 1)* 1000)); <END> try (Connection connscn = DriverManager.getConnection(getUrl(), props)) { connscn.createStatement().executeQuery("select * from " + fullTableName); } catch (SQLException se){ assertEquals(SQLExceptionCode.CANNOT_QUERY_TABLE_WITH_SCN_OLDER_THAN_TTL.getErrorCode(), se.getErrorCode()); assertTrue("Wrong error message", se.getMessage(). contains(SQLExceptionCode.CANNOT_QUERY_TABLE_WITH_SCN_OLDER_THAN_TTL.getMessage())); assertEquals(SQLExceptionCode.CANNOT_QUERY_TABLE_WITH_SCN_OLDER_THAN_TTL.getSQLState(), se.getSQLState()); return; } Assert.fail("We should have thrown an exception for the too-early SCN"); }</code><technical_language>nit: (ttl+1)*1000 a new variable reused 108 111</technical_language>

Target:
public void testTooLowSCNWithTTL() throws Exception { int ttl = 2; String fullTableName = createTableWithTTL(ttl); int sleepTime = (ttl + 1)* 1000; Thread.sleep(sleepTime); Properties props = new Properties(); props.setProperty(PhoenixRuntime.CURRENT_SCN_ATTRIB, Long.toString(EnvironmentEdgeManager.currentTime() - sleepTime)); try (Connection connscn = DriverManager.getConnection(getUrl(), props)) { connscn.createStatement(). executeQuery(String.format("select * from %s", fullTableName)); } catch (SQLException se){ SQLExceptionCode code = SQLExceptionCode.CANNOT_QUERY_TABLE_WITH_SCN_OLDER_THAN_TTL; assertSqlExceptionCode(code, se); return; } Assert.fail("We should have thrown an exception for the too-early SCN"); }
Source:
<code>public Parameters empiBatchOnAllTargets( @OperationParam(name= ProviderConstants.EMPI_BATCH_RUN_CRITERIA,min = 0 , max = 1) StringType theCriteria, ServletRequestDetails theRequestDetails) { String criteria = convertCriteriaToString(theCriteria); <START> long submittedCount = myEmpiSubmitSvc.runEmpiOnAllTargetTypes(criteria); <END> return buildEmpiOutParametersWithCount(submittedCount); }</code><technical_language>If renaming operation SUBMIT anyhow, good change name of EmpiSubmitSvc.runEmpiOnAllTargetTypes EmpiSubmitSvc.submitAllTargetTypesToEmpi</technical_language>

Target:
public Parameters empiBatchOnAllTargets( @OperationParam(name= ProviderConstants.EMPI_BATCH_RUN_CRITERIA,min = 0 , max = 1) StringType theCriteria, ServletRequestDetails theRequestDetails) { String criteria = convertCriteriaToString(theCriteria); long submittedCount = myEmpiSubmitSvc.submitAllTargetTypesToEmpi(criteria); return buildEmpiOutParametersWithCount(submittedCount); }
Source:
<code>protected TransportWriteAction(Settings settings, String actionName, TransportService transportService, ClusterService clusterService, IndicesService indicesService, ThreadPool threadPool, ShardStateAction shardStateAction, ActionFilters actionFilters, Writeable.Reader<Request> request, Writeable.Reader<ReplicaRequest> replicaRequest, String executor, boolean forceExecutionOnPrimary, WriteMemoryLimits writeMemoryLimits) { super(settings, actionName, transportService, clusterService, indicesService, threadPool, shardStateAction, actionFilters, <START> request, replicaRequest, ThreadPool.Names.SAME, true, forceExecutionOnPrimary); <END> this.executor = executor; this.writeMemoryLimits = writeMemoryLimits; }</code><technical_language>passing here? TRA executing actions SAME? similar kind of manual dispatch logic exists in TRA? I missing</technical_language>

Target:
protected TransportWriteAction(Settings settings, String actionName, TransportService transportService, ClusterService clusterService, IndicesService indicesService, ThreadPool threadPool, ShardStateAction shardStateAction, ActionFilters actionFilters, Writeable.Reader<Request> request, Writeable.Reader<ReplicaRequest> replicaRequest, String executor, boolean forceExecutionOnPrimary, WriteMemoryLimits writeMemoryLimits) { super(settings, actionName, transportService, clusterService, indicesService, threadPool, shardStateAction, actionFilters, request, replicaRequest, ThreadPool.Names.SAME, true, forceExecutionOnPrimary); this.executor = executor; this.forceExecutionOnPrimary = forceExecutionOnPrimary; this.writeMemoryLimits = writeMemoryLimits; }
Source:
<code>private void processSnapshotMessage(LogReplicationEntry message) { switch (message.getMetadata().getMessageMetadataType()) { case SNAPSHOT_MESSAGE: snapshotWriter.apply(message); break; case SNAPSHOT_END: <START> dataConsistent.set(false); <END> logReplicationMetadataManager.setDataConsistentOnStandby(dataConsistent.get()); snapshotWriter.snapshotTransferDone(message); completeSnapshotApply(message); dataConsistent.set(true); logReplicationMetadataManager.setDataConsistentOnStandby(dataConsistent.get()); break; default: log.warn("Message type should not be applied as snapshot sync.", message.getMetadata().getMessageMetadataType()); } }</code><technical_language>This class a receive method receive messages. some logic process a SNAPSHOT_START marker, I set dataConsistent false in processSnapshotStart. starting transfer of a snapshot sync, point snapshot_end is received applied is set true</technical_language>

Target:
private void processSnapshotMessage(LogReplicationEntry message) { switch (message.getMetadata().getMessageMetadataType()) { case SNAPSHOT_MESSAGE: snapshotWriter.apply(message); break; case SNAPSHOT_END: setDataConsistent(false); snapshotWriter.snapshotTransferDone(message); completeSnapshotApply(message); setDataConsistent(true); break; default: log.warn("Message type should not be applied as snapshot sync.", message.getMetadata().getMessageMetadataType()); } }
Source:
<code>public void test_of_CurrencyAndValueSchedule() { ValueSchedule valueSchedule = ValueSchedule.of(1000d, ValueStep.of(1, ValueAdjustment.ofReplace(2000d))); NotionalSchedule test = NotionalSchedule.of(GBP, valueSchedule); assertEquals(test.getCurrency(), GBP); assertEquals(test.getAmount(), valueSchedule); assertEquals(test.getFxReset(), Optional.empty()); assertEquals(test.isInitialExchange(), false); <START> assertEquals(test.isInitialExchange(), false); <END> assertEquals(test.isIntermediateExchange(), false); assertEquals(test.isFinalExchange(), false); }</code><technical_language>Duplicate line</technical_language>

Target:
public void test_of_CurrencyAndValueSchedule() { ValueSchedule valueSchedule = ValueSchedule.of(1000d, ValueStep.of(1, ValueAdjustment.ofReplace(2000d))); NotionalSchedule test = NotionalSchedule.of(GBP, valueSchedule); assertEquals(test.getCurrency(), GBP); assertEquals(test.getAmount(), valueSchedule); assertEquals(test.getFxReset(), Optional.empty()); assertEquals(test.isInitialExchange(), false); assertEquals(test.isIntermediateExchange(), false); assertEquals(test.isFinalExchange(), false); }
Source:
<code>public void trackCreateChannel(String userId) { Bundle bundle = new Bundle(); bundle.putString(USER_ID, userId); <START> firebaseAnalytics.logEvent("create_channel", bundle); <END> }</code><technical_language>Some of strings in constants, some local variables in methods themselves. Is this OK? strings constants</technical_language>

Target:
public void trackCreateChannel(String userId) { Bundle bundle = new Bundle(); bundle.putString(PARAM_USER_ID, userId); firebaseAnalytics.logEvent(EVENT_CREATE_CHANNEL, bundle); }
Source:
<code>private void startAllOperatorCoordinators() { final Collection<OperatorCoordinatorHolder> coordinators = getAllCoordinators(); try { for (OperatorCoordinatorHolder coordinator : coordinators) { coordinator.start(); } } catch (Throwable t) { ExceptionUtils.rethrowIfFatalErrorOrOOM(t); coordinators.forEach(IOUtils::closeQuietly); <START> failJob(new FlinkRuntimeException("Failed to start the operator coordinators", t)); <END> } }</code><technical_language>I this change in this PR</technical_language>

Target:
private void startAllOperatorCoordinators() { final Collection<OperatorCoordinatorHolder> coordinators = getAllCoordinators(); try { for (OperatorCoordinatorHolder coordinator : coordinators) { coordinator.start(); } } catch (Throwable t) { ExceptionUtils.rethrowIfFatalErrorOrOOM(t); coordinators.forEach(IOUtils::closeQuietly); throw new FlinkRuntimeException("Failed to start the operator coordinators", t); } }
Source:
<code>private void updateExistingPaymentWorksVendorInStagingTable(Integer id, String pmwRequestStatus, String kfsVendorProcessingStatus, String kfsAchProcessingStatus, String kfsVendorDocumentNumber, String supplierUploadStatus, Timestamp processingTimeStamp, Integer vendorHeaderGeneratedIdentifier, Integer vendorDetailAssignedIdentifier, String kfsAchDocumentNumber) { try { <START> PreparedStatement preparedSqlStatement = buildUpdateExistingPaymentWorksVendorInStagingTableSql(id, pmwRequestStatus, kfsVendorProcessingStatus, kfsAchProcessingStatus, kfsVendorDocumentNumber, supplierUploadStatus, processingTimeStamp, vendorHeaderGeneratedIdentifier, vendorDetailAssignedIdentifier, kfsAchDocumentNumber); <END> preparedSqlStatement.executeUpdate(); int updatedRowCount = preparedSqlStatement.getUpdateCount(); LOG.info("updateExistingPaymentWorksVendorInStagingTable updated " + updatedRowCount + " record" + (updatedRowCount == 1 ? "" : "s")); } catch (SQLException ex) { LOG.error("updateExistingPaymentWorksVendorInStagingTable", ex); } }</code><technical_language>If intend a PreparedStatement directly, I suggest closing statement in a "finally" block clean resources. If want a simpler alternative, try of JdbcTemplate.update() methods instead, SQL string argument query args other helper classes subsequent args. way, JdbcTemplate handle creating closing PreparedStatement for you. (This DAO extends a getJdbcTemplate() method for convenience.)</technical_language>

Target:
private void updateExistingPaymentWorksVendorInStagingTable(Integer id, String pmwRequestStatus, String kfsVendorProcessingStatus, String kfsAchProcessingStatus, String kfsVendorDocumentNumber, String supplierUploadStatus, Timestamp processingTimeStamp, Integer vendorHeaderGeneratedIdentifier, Integer vendorDetailAssignedIdentifier, String kfsAchDocumentNumber) { int updatedRowCount = buildUpdateExistingPaymentWorksVendorInStagingTableSql(id, pmwRequestStatus, kfsVendorProcessingStatus, kfsAchProcessingStatus, kfsVendorDocumentNumber, supplierUploadStatus, processingTimeStamp, vendorHeaderGeneratedIdentifier, vendorDetailAssignedIdentifier, kfsAchDocumentNumber); LOG.info("updateExistingPaymentWorksVendorInStagingTable updated " + updatedRowCount + " record" + (updatedRowCount == 1 ? "" : "s")); }
Source:
<code>private void send() { if (json) { try { requestBuilder.async().post(Entity.entity(objectMapper.writeValueAsString(payload), mediaType), this); } catch (JsonProcessingException e) { <START> throw new RuntimeException("Failed to serialize payload to json: " + payload); <END> } } else { requestBuilder.async().get(this); } }</code><technical_language>I need append payload here. long if content sense if a reference</technical_language>

Target:
private void send() { if (json) { try { Entity<String> entity = Entity.entity(objectMapper.writeValueAsString(payload), mediaType); requestBuilder.async().post(entity, this); } catch (JsonProcessingException e) { throw new RuntimeException("Failed to serialize location to json", e); } } else { requestBuilder.async().get(this); } }
Source:
<code>private static List<String> parseCommaSeparatedAttributes(String body, String attribute) { <START> Pattern pattern = Pattern.compile(attribute + "(.*)"); <END> Matcher matcher = pattern.matcher(body); if (matcher.find()) { return Arrays.asList(matcher.group(1).split(",")); } return Collections.emptyList(); }</code><technical_language>suggestion Pattern pattern = Pattern.compile(Pattern.quote(attribute) + "\\s*(.*)");</technical_language>

Target:
private static String[] parseCommaSeparatedAttributes(String body, String attribute) { Pattern pattern = Pattern.compile(Pattern.quote(attribute) + ":\\s*(.*)"); Matcher matcher = pattern.matcher(body); if (matcher.find()) { return matcher.group(1).split(","); } return new String[0]; }
Source:
<code><START> public static Expression filterConjuncts(Expression expression, Predicate<Expression> predicate) <END> { List<Expression> conjuncts = extractConjuncts(expression).stream() .filter(predicate) .collect(toList()); return combineConjuncts(conjuncts); }</code><technical_language>conjuncts in API (no List, expression). private</technical_language>

Target:
private static Expression filterConjuncts(Expression expression, Predicate<Expression> predicate) { List<Expression> conjuncts = extractConjuncts(expression).stream() .filter(predicate) .collect(toList()); return combineConjuncts(conjuncts); }
Source:
<code>private AESKeyVersion(Builder builder) throws BuilderException { super(builder); <START> this.keySize = builder.keySize; <END> this.mode = builder.mode; this.padding = builder.padding; this.algModePadding = "AES/" + this.mode + "/" + padding + "padding"; try { if (builder.keyVersionMatterInitVectorProvided) { initVector = builder.initVector; secretKey = new SecretKeySpec(builder.keyVersionMatter, 0, keySize.bytes(), "AES"); } else { KeyGenerator keyGen = KeyGenerator.getInstance("AES"); keyGen.init(keySize.bits()); secretKey = keyGen.generateKey(); SecureRandom prng = new SecureRandom(); initVector = new byte[16]; prng.nextBytes(initVector); } this.encryptingCipher = Cipher.getInstance(this.algModePadding); switch (this.mode) { case ECB: encryptingCipher.init(Cipher.ENCRYPT_MODE, this.secretKey); break; default: encryptingCipher.init(Cipher.ENCRYPT_MODE, this.secretKey, new IvParameterSpec(this.initVector)); } this.decryptingCipher = Cipher.getInstance(this.algModePadding); switch (this.mode) { case ECB: decryptingCipher.init(Cipher.DECRYPT_MODE, secretKey); break; default: decryptingCipher.init(Cipher.DECRYPT_MODE, secretKey, new IvParameterSpec(initVector)); } } catch (Exception e) { throw new BuilderException("Building AESKeyVersion failed", e); } }</code><technical_language>clear if keySize is in bits bytes this line of code</technical_language>

Target:
private AESKeyVersion(Builder builder) throws BuilderException { super(builder); this.keyVersionLengthInBytes = builder.keyVersionLengthInBytes; this.mode = builder.mode; this.padding = builder.padding; this.algModePadding = "AES/" + this.mode + "/" + padding + "padding"; try { if (builder.keyVersionMatterInitVectorProvided) { initVector = builder.initVector.clone(); secretKey = new SecretKeySpec(builder.keyVersionMatter, 0, this.keyLengthInBytes(), "AES"); } else { KeyGenerator keyGen = KeyGenerator.getInstance("AES"); keyGen.init(this.keyLengthInBits()); secretKey = keyGen.generateKey(); SecureRandom prng = new SecureRandom(); initVector = new byte[IV_SIZE]; prng.nextBytes(initVector); } this.encryptingCipher = Cipher.getInstance(this.algModePadding); switch (this.mode) { case ECB: encryptingCipher.init(Cipher.ENCRYPT_MODE, this.secretKey); break; case CBC: case OFB: case CFB: case CTR: encryptingCipher.init(Cipher.ENCRYPT_MODE, this.secretKey, new IvParameterSpec(this.initVector)); break; default: throw new BuilderException("Unrecognized mode"); } this.decryptingCipher = Cipher.getInstance(this.algModePadding); switch (this.mode) { case ECB: decryptingCipher.init(Cipher.DECRYPT_MODE, secretKey); break; case CBC: case OFB: case CFB: case CTR: decryptingCipher.init(Cipher.DECRYPT_MODE, secretKey, new IvParameterSpec(initVector)); break; default: throw new BuilderException("Unrecognized mode"); } } catch (Exception e) { throw new BuilderException("Building AESKeyVersion failed", e); } }
Source:
<code>protected boolean needsBalance(TableName tableName, Cluster c) { ClusterLoadState cs = new ClusterLoadState(c.clusterState); if (cs.getNumServers() < MIN_SERVER_BALANCE) { if (LOG.isDebugEnabled()) { LOG.debug("Not running balancer because only " + cs.getNumServers() + " active regionserver(s)"); } return false; } if(areSomeRegionReplicasColocated(c)) return true; <START> if(idleRegionExist(c)) return true; <END> float average = cs.getLoadAverage(); int floor = (int) Math.floor(average * (1 - slop)); int ceiling = (int) Math.ceil(average * (1 + slop)); if (!(cs.getMaxLoad() > ceiling || cs.getMinLoad() < floor)) { NavigableMap<ServerAndLoad, List<RegionInfo>> serversByLoad = cs.getServersByLoad(); if (LOG.isTraceEnabled()) { LOG.trace("Skipping load balancing because balanced cluster; " + "servers=" + cs.getNumServers() + " regions=" + cs.getNumRegions() + " average=" + average + " mostloaded=" + serversByLoad.lastKey().getLoad() + " leastloaded=" + serversByLoad.firstKey().getLoad()); } return false; } return true; }</code><technical_language>please { } for statement</technical_language>

Target:
protected boolean needsBalance(TableName tableName, Cluster c) { ClusterLoadState cs = new ClusterLoadState(c.clusterState); if (cs.getNumServers() < MIN_SERVER_BALANCE) { if (LOG.isDebugEnabled()) { LOG.debug("Not running balancer because only " + cs.getNumServers() + " active regionserver(s)"); } return false; } if(areSomeRegionReplicasColocated(c)) return true; if(idleRegionServerExist(c)) { return true; } float average = cs.getLoadAverage(); int floor = (int) Math.floor(average * (1 - slop)); int ceiling = (int) Math.ceil(average * (1 + slop)); if (!(cs.getMaxLoad() > ceiling || cs.getMinLoad() < floor)) { NavigableMap<ServerAndLoad, List<RegionInfo>> serversByLoad = cs.getServersByLoad(); if (LOG.isTraceEnabled()) { LOG.trace("Skipping load balancing because balanced cluster; " + "servers=" + cs.getNumServers() + " regions=" + cs.getNumRegions() + " average=" + average + " mostloaded=" + serversByLoad.lastKey().getLoad() + " leastloaded=" + serversByLoad.firstKey().getLoad()); } return false; } return true; }
Source:
<code>private void renvAction(final String action) { String errorMessage = "Error during " + action; ProgressIndicator indicator = globalDisplay_.getProgressIndicator(errorMessage); indicator.onProgress("Performing " + action.toLowerCase() + "..."); renvServer_.renvActions(action, new ServerRequestCallback<JsArray<RenvAction>>() { @Override public void onResponseReceived(JsArray<RenvAction> response) { indicator.onCompleted(); if (response.length() == 0) { globalDisplay_.showMessage( GlobalDisplay.MSG_INFO, "Up to Date", "The project is already up to date."); return; } final OperationWithInput<Void> operation = (Void input) -> { String code = "renv::" + action.toLowerCase() + "(confirm = FALSE)"; events_.fireEvent(new SendToConsoleEvent(code, true)); }; RenvActionDialog dialog = new RenvActionDialog(action, response, operation); dialog.showModal(); } @Override public void onError(ServerError error) { Debug.logError(error); <START> indicator.onError(errorMessage); <END> } }); }</code><technical_language>pass error message progress indicator here</technical_language>

Target:
private void renvAction(final String action) { String errorMessage = "Error during " + action; ProgressIndicator indicator = globalDisplay_.getProgressIndicator(errorMessage); indicator.onProgress("Performing " + action.toLowerCase() + "..."); renvServer_.renvActions(action, new ServerRequestCallback<JsArray<RenvAction>>() { @Override public void onResponseReceived(JsArray<RenvAction> response) { indicator.onCompleted(); if (response.length() == 0) { globalDisplay_.showMessage( GlobalDisplay.MSG_INFO, "Up to Date", "The project is already up to date."); return; } final OperationWithInput<Void> operation = (Void input) -> { String code = "renv::" + action.toLowerCase() + "(confirm = FALSE)"; events_.fireEvent(new SendToConsoleEvent(code, true)); }; RenvActionDialog dialog = new RenvActionDialog(action, response, operation); dialog.showModal(); } @Override public void onError(ServerError error) { Debug.logError(error); indicator.onError(error.getUserMessage()); } }); }
Source:
<code>NettyPartitionRequestClient createPartitionRequestClient(ConnectionID connectionId) throws IOException, InterruptedException { Object entry; NettyPartitionRequestClient client = null; while (client == null) { entry = clients.get(connectionId); if (entry != null) { if (entry instanceof NettyPartitionRequestClient) { client = (NettyPartitionRequestClient) entry; } else { ConnectingChannel future = (ConnectingChannel) entry; client = future.waitForChannel(); clients.replace(connectionId, future, client); } <END> } else { ConnectingChannel connectingChannel = new ConnectingChannel(connectionId, this); Object old = clients.putIfAbsent(connectionId, connectingChannel); if (old == null) { int count = 0; ChannelException exception = null; do { try { exception = null; connectingChannel.error = null; LOG.info("Connecting to at attempt", connectionId.getAddress(), count); nettyClient.connect(connectionId.getAddress()).addListener(connectingChannel); client = connectingChannel.waitForChannel(); clients.replace(connectionId, connectingChannel, client); } catch (ChannelException e) { LOG.error("Failed times to connect to {}", count, connectionId.getAddress(), e); exception = e; } count++; } while (count <= retryNumber); if (exception != null) { throw exception; } } else if (old instanceof ConnectingChannel) { <START> try { client = ((ConnectingChannel) old).waitForChannel(); } catch (IOException e) { LOG.info("Continue to waitForChannel until the original thread has completed or failed"); } clients.replace(connectionId, old, client); } else { client = (NettyPartitionRequestClient) old; } } if (!client.incrementReferenceCounter()) { destroyPartitionRequestClient(connectionId, client); client = null; } } return client; }</code><technical_language>do this change/log message</technical_language>

Target:
NettyPartitionRequestClient createPartitionRequestClient(ConnectionID connectionId) { NettyPartitionRequestClient client = null; while (client == null) { client = (NettyPartitionRequestClient) clients.computeIfAbsent(connectionId, unused -> { int tried = 0; while (true) { ConnectingChannel connectingChannel = null; try { connectingChannel = new ConnectingChannel(connectionId, this); nettyClient.connect(connectionId.getAddress()).addListener(connectingChannel); return connectingChannel.waitForChannel(); } catch (IOException | InterruptedException | ChannelException e) { LOG.error("Failed times to connect to {}", tried, connectionId.getAddress(), e); if (++tried > retryNumber) { throw new CompletionException(e); } } } }); if (!client.incrementReferenceCounter()) { destroyPartitionRequestClient(connectionId, client); client = null; } } return client; }
Source:
<code>protected void executeCommand() { getNetwork().setId(Guid.newGuid()); NetworkUtils.setNetworkVdsmName(getNetwork()); TransactionSupport.executeInNewTransaction(() -> { networkDao.save(getNetwork()); if (getNetwork().isVmNetwork() && getParameters().isVnicProfileRequired()) { vnicProfileDao.save(networkHelper.createVnicProfile(getNetwork())); } networkHelper.addPermissionsOnNetwork(getUserId(), getNetwork().getId()); return null; }); <START> postSaveAction(); <END> getReturnValue().setActionReturnValue(getNetwork().getId()); setSucceeded(true); }</code><technical_language>If this fails, reported this: ActionReturnValue attachReturnValue = attachToClusters(); if (!attachReturnValue.getSucceeded()) { propagateFailure(attachReturnValue); return; } I if is rollback command if this fails</technical_language>

Target:
protected void executeCommand() { getNetwork().setId(Guid.newGuid()); NetworkUtils.setNetworkVdsmName(getNetwork()); TransactionSupport.executeInNewTransaction(() -> { networkDao.save(getNetwork()); if (getNetwork().isVmNetwork() && getParameters().isVnicProfileRequired()) { vnicProfileDao.save(networkHelper.createVnicProfile(getNetwork())); } networkHelper.addPermissionsOnNetwork(getUserId(), getNetwork().getId()); return null; }); ActionReturnValue clusterReturnValue = attachToClusters(); if (clusterReturnValue.getSucceeded()) { getReturnValue().setActionReturnValue(getNetwork().getId()); } setSucceeded(clusterReturnValue.getSucceeded()); }
Source:
<code>public void setup() throws Exception { context.registerSerializer("spotify100", Spotify100Serializer.class); context.registerSerializer("spotify100proto", Spotify100ProtoSerializer.class); <START> context.registerSerializer("spotify100protobatch", Spotify100ProtoBatchSerializer.class); <END> context.registerSerializer("to-string", ToStringSerializer.class); }</code><technical_language>this a separate class instead of adding method Spotify100ProtoSerializer? add a dummy implementation anyway, logically sense classes for serialization methods</technical_language>

Target:
public void setup() throws Exception { context.registerSerializer("spotify100", Spotify100Serializer.class); context.registerSerializer("spotify100proto", Spotify100ProtoSerializer.class); context.registerSerializer("to-string", ToStringSerializer.class); }
Source:
<code>public void verifyClosedAccountMessage() { waitForElementByElement(messagePlaceholder); Assertion.assertEquals( <START> "Your account has been disabled by Wikia.", <END> messagePlaceholder.getText() ); }</code><technical_language>move a field in class. Check if SpecialUserLogin is dependent user language. If figure out a test</technical_language>

Target:
public void verifyClosedAccountMessage() { waitForElementByElement(messagePlaceholder); Assertion.assertEquals( disabledAccountMessage, messagePlaceholder.getText() ); }
Source:
<code>public DataBag exec(Tuple input) throws IOException { String inputString = null; <START> if(input.size() == 0) { <END> return null; } if(input.size() == 1) { inputString = input.get(0).toString(); } if(input.size() == 2) { modelPath = input.get(1).toString(); inputString = input.get(0).toString(); } if(inputString == null || inputString == "") { return null; } DataBag outBag = bf.newDefaultBag(); if(isFirst == true || this.tokenizer == null) { String loadFile = getFilename(); InputStream file = new FileInputStream(loadFile); InputStream buffer = new BufferedInputStream(file); TokenizerModel model = new TokenizerModel(buffer); this.tokenizer = new TokenizerME(model); isFirst = false; } String tokens[] = this.tokenizer.tokenize(inputString); for(String token : tokens) { Tuple outTuple = tf.newTuple(token); outBag.add(outTuple); } return outBag; }</code><technical_language>throw error if size 1</technical_language>

Target:
public DataBag exec(Tuple input) throws IOException { String inputString = null; if(input.size() == 0) { return null; } if(input.size() == 1) { inputString = input.get(0).toString(); } if(inputString == null || inputString == "") { return null; } DataBag outBag = bf.newDefaultBag(); if(isFirst == true || this.tokenizer == null) { String loadFile = getFilename(); InputStream file = new FileInputStream(loadFile); InputStream buffer = new BufferedInputStream(file); TokenizerModel model = new TokenizerModel(buffer); this.tokenizer = new TokenizerME(model); isFirst = false; } String tokens[] = this.tokenizer.tokenize(inputString); for(String token : tokens) { Tuple outTuple = tf.newTuple(token); outBag.add(outTuple); } return outBag; }
Source:
<code>public void enqueueLog(Path wal) { if (!this.filterInWALs.test(wal)) { LOG.trace("NOT replicating {}", wal); return; } String logPrefix = AbstractFSWALProvider.getWALPrefixFromWALName(wal.getName()); PriorityBlockingQueue<Path> queue = queues.get(logPrefix); if (queue == null) { queue = new PriorityBlockingQueue<>(queueSizePerGroup, new LogsComparator()); queues.put(logPrefix, queue); if (this.isSourceActive() && this.walEntryFilter != null) { tryStartNewShipper(logPrefix, queue); } } queue.put(wal); if (LOG.isTraceEnabled()) { LOG.trace("{} Added wal to queue of source {}.", logPeerId(), logPrefix, this.replicationQueueInfo.getQueueId()); } this.metrics.incrSizeOfLogQueue(); int queueSize = queue.size(); if (queueSize > this.logQueueWarnThreshold) { LOG.warn("{} WAL group queue size: exceeds value of " <START> + "replication.source.wal.queue.warn: {}", logPeerId(), <END> logPrefix, queueSize, logQueueWarnThreshold); } }</code><technical_language>changing this config name in this patch</technical_language>

Target:
public void enqueueLog(Path wal) { if (!this.filterInWALs.test(wal)) { LOG.trace("NOT replicating {}", wal); return; } String logPrefix = AbstractFSWALProvider.getWALPrefixFromWALName(wal.getName()); PriorityBlockingQueue<Path> queue = queues.get(logPrefix); if (queue == null) { queue = new PriorityBlockingQueue<>(queueSizePerGroup, new LogsComparator()); queues.put(logPrefix, queue); if (this.isSourceActive() && this.walEntryFilter != null) { tryStartNewShipper(logPrefix, queue); } } queue.put(wal); if (LOG.isTraceEnabled()) { LOG.trace("{} Added wal to queue of source {}.", logPeerId(), logPrefix, this.replicationQueueInfo.getQueueId()); } this.metrics.incrSizeOfLogQueue(); int queueSize = queue.size(); if (queueSize > this.logQueueWarnThreshold) { LOG.warn("{} WAL group queue size: exceeds value of " + "replication.source.log.queue.warn: {}", logPeerId(), logPrefix, queueSize, logQueueWarnThreshold); } }
Source:
<code>private void populateSYSNATURALNUMBERS(TransactionController tc) throws StandardException{ TabInfoImpl ti = getNonCoreTI(SYSNATURALNUMBERS_CATALOG_NUM); <START> for (int i = 1; i <= 2048; i++) { <END> NaturalNumberDescriptor nnd = new NaturalNumberDescriptor(i); ExecRow row = ti.getCatalogRowFactory().makeRow(nnd, null); ti.insertRow(row, tc); } }</code><technical_language>2048? a constant in opinion</technical_language>

Target:
private void populateSYSNATURALNUMBERS(TransactionController tc) throws StandardException{ SYSNATURALNUMBERSRowFactory.populateSYSNATURALNUMBERS(getNonCoreTI(SYSNATURALNUMBERS_CATALOG_NUM), tc); }
Source:
<code>public URI recentChanges(Date startTime, JSONObject continueObject, int batchSize) { URIBuilder builder = apiBuilder(); builder.addParameter("action", "query"); builder.addParameter("list", "recentchanges"); builder.addParameter("rcdir", "newer"); builder.addParameter("rcprop", "title|ids|timestamp"); <START> StringBuilder nsBuilder = new StringBuilder(); <END> for (long i : entityNamespaces) { nsBuilder.append(i).append("|"); } nsBuilder.deleteCharAt(nsBuilder.length() - 1); builder.addParameter("rcnamespace", nsBuilder.toString()); builder.addParameter("rclimit", Integer.toString(batchSize)); if (continueObject == null) { builder.addParameter("continue", ""); builder.addParameter("rcstart", outputDateFormat().format(startTime)); } else { builder.addParameter("continue", continueObject.get("continue").toString()); builder.addParameter("rccontinue", continueObject.get("rccontinue").toString()); } return build(builder); }</code><technical_language>Modern Java need StringBuilder more. Simply += build a regular string, this is fast. StringUtils array of longs, this</technical_language>

Target:
public URI recentChanges(Date startTime, JSONObject continueObject, int batchSize) { URIBuilder builder = apiBuilder(); builder.addParameter("action", "query"); builder.addParameter("list", "recentchanges"); builder.addParameter("rcdir", "newer"); builder.addParameter("rcprop", "title|ids|timestamp"); builder.addParameter("rcnamespace", getEntityNamespacesString("|")); builder.addParameter("rclimit", Integer.toString(batchSize)); if (continueObject == null) { builder.addParameter("continue", ""); builder.addParameter("rcstart", outputDateFormat().format(startTime)); } else { builder.addParameter("continue", continueObject.get("continue").toString()); builder.addParameter("rccontinue", continueObject.get("rccontinue").toString()); } return build(builder); }
Source:
<code>public Builder() { options = new BigtableOptions(); options.appProfileId = BIGTABLE_APP_PROFILE_DEFAULT; options.dataHost = isDirectPathEnabled() ? BIGTABLE_DIRECTPATH_DATA_HOST_DEFAULT : BIGTABLE_DATA_HOST_DEFAULT; options.adminHost = BIGTABLE_ADMIN_HOST_DEFAULT; options.port = BIGTABLE_PORT_DEFAULT; options.dataChannelCount = BIGTABLE_DATA_CHANNEL_COUNT_DEFAULT; options.usePlaintextNegotiation = false; options.useCachedDataPool = false; options.useGCJClient = false; <START> options.bulkOptions = BulkOptions.builder().build(); <END> options.retryOptions = new RetryOptions.Builder().build(); options.callOptionsConfig = CallOptionsConfig.builder().build(); options.credentialOptions = CredentialOptions.defaultCredentials(); options.useBatch = false; }</code><technical_language>Please initialize this setMaxInflightRpcs(BIGTABLE_MAX_INFLIGHT_RPCS_PER_CHANNEL_DEFAULT * BIGTABLE_DATA_CHANNEL_COUNT_DEFAULT)</technical_language>

Target:
public Builder() { options = new BigtableOptions(); options.appProfileId = BIGTABLE_APP_PROFILE_DEFAULT; options.dataHost = isDirectPathEnabled() ? BIGTABLE_DIRECTPATH_DATA_HOST_DEFAULT : BIGTABLE_DATA_HOST_DEFAULT; options.adminHost = BIGTABLE_ADMIN_HOST_DEFAULT; options.port = BIGTABLE_PORT_DEFAULT; options.dataChannelCount = BIGTABLE_DATA_CHANNEL_COUNT_DEFAULT; options.usePlaintextNegotiation = false; options.useCachedDataPool = false; options.useGCJClient = false; options.bulkOptions = BulkOptions.builder() .setMaxInflightRpcs( BulkOptions.BIGTABLE_MAX_INFLIGHT_RPCS_PER_CHANNEL_DEFAULT * options.dataChannelCount) .build(); options.retryOptions = new RetryOptions.Builder().build(); options.callOptionsConfig = CallOptionsConfig.builder().build(); options.credentialOptions = CredentialOptions.defaultCredentials(); options.useBatch = false; }
Source:
<code>private boolean needToRemoveLabel(Boolean isNativeContainer, String dataMode) { if(!isNativeContainer) { return true; } <START> if(!dataMode.isEmpty() && dataMode!=null <END> && (dataMode.equals(NetworkConstants.NETWORK_MODE_HOST) || dataMode.equals(NetworkConstants.NETWORK_MODE_CONTAINER))) { return true; } return false; }</code><technical_language>!StringUtils.isEmpty(dataMode) cover conditions. Current check hit NPE dataMode is null</technical_language>

Target:
private boolean needToRemoveLabel(Boolean isNativeContainer, String dataMode) { if(!isNativeContainer) { return true; } if(!StringUtils.isEmpty(dataMode) && (dataMode.equals(NetworkConstants.NETWORK_MODE_HOST) || dataMode.equals(NetworkConstants.NETWORK_MODE_CONTAINER))) { return true; } return false; }
Source:
<code>public Tracking<RAW, BASE> track(Collection<RAW> rawInput, Collection<BASE> baseInput) { Tracking<RAW, BASE> tracking = new Tracking<>(rawInput, baseInput); <START> match(tracking, LineAndLineHashKey::new, true); <END> match(tracking, LineHashAndMessageKey::new, true); return tracking; }</code><technical_language>factory is same. If want INSTANCE, creating a static member field</technical_language>

Target:
public Tracking<RAW, BASE> track(Collection<RAW> rawInput, Collection<BASE> baseInput) { Tracking<RAW, BASE> tracking = new Tracking<>(rawInput, baseInput); match(tracking, LineAndLineHashKey::new); match(tracking, LineHashAndMessageKey::new); return tracking; }
Source:
<code>private List<String> getMavenArtifactsRelatedArgs (String mavenArtifacts) { List<String> args = new ArrayList<>(); if (mavenArtifacts != null && !mavenArtifacts.isEmpty()) { args.add("--artifacts"); args.add(mavenArtifacts); args.add("--artifactRepositories"); args.add((String) conf.get("mavenRepoUrl")); <START> String proxyUrl = (String) conf.get("httpProxyUrl"); <END> if (StringUtils.isNotEmpty(proxyUrl)) { args.add("--proxyUrl"); args.add(proxyUrl); String proxyUsername = (String) conf.get("httpProxyUsername"); String proxyPassword = (String) conf.get("httpProxyPassword"); if (proxyUsername != null && proxyPassword != null) { args.add("--proxyUsername"); args.add(proxyUsername); args.add("--proxyPassword"); args.add(proxyPassword); } } } return args; }</code><technical_language>constant here</technical_language>

Target:
private List<String> getMavenArtifactsRelatedArgs (String mavenArtifacts) { List<String> args = new ArrayList<>(); if (mavenArtifacts != null && !mavenArtifacts.isEmpty()) { args.add("--artifacts"); args.add(mavenArtifacts); args.add("--artifactRepositories"); args.add((String) conf.get("mavenRepoUrl")); String proxyUrl = (String) conf.get(com.hortonworks.streamline.common.Constants.CONFIG_HTTP_PROXY_URL); if (StringUtils.isNotEmpty(proxyUrl)) { args.add("--proxyUrl"); args.add(proxyUrl); String proxyUsername = (String) conf.get(com.hortonworks.streamline.common.Constants.CONFIG_HTTP_PROXY_USERNAME); String proxyPassword = (String) conf.get(com.hortonworks.streamline.common.Constants.CONFIG_HTTP_PROXY_PASSWORD); if (proxyUsername != null && proxyPassword != null) { args.add("--proxyUsername"); args.add(proxyUsername); args.add("--proxyPassword"); args.add(proxyPassword); } } } return args; }
Source:
<code><START> protected void fireRefreshFormPropertiesEvent() { <END> final ClientSession session = sessionManager.getCurrentSession(); if (session != null) { final CanvasHandler canvasHandler = session.getCanvasHandler(); if (canvasHandler != null) { refreshFormPropertiesEvent.fire(new RefreshFormProperties(session, nodeUUID)); } } }</code><technical_language>Wondering if fire event in do in CanvasLayoutUtils.fireElementSelectedEvent</technical_language>

Target:
protected void fireRefreshFormPropertiesEvent() { final ClientSession session = sessionManager.getCurrentSession(); if (session != null) { final CanvasHandler canvasHandler = session.getCanvasHandler(); if (canvasHandler != null) { refreshFormPropertiesEvent.fire(new RefreshFormPropertiesEvent(session, nodeUUID)); } } }
Source:
<code>public static String buildJsonArray(List<UpdateData> updateData) { final OutputStream os = new ByteArrayOutputStream(); final ObjectMapper mapper = new ObjectMapper(); <START> String json = ""; <END> try { mapper.writeValue(os, updateData); final byte[] data = ((ByteArrayOutputStream) os).toByteArray(); json = new String(data, "UTF-8"); } catch (IOException e) { throw new RuntimeException(e); } return json; }</code><technical_language>instead write final String json;</technical_language>

Target:
public static String buildJsonArray(List<UpdateData> updateData) { final OutputStream os = new ByteArrayOutputStream(); final ObjectMapper mapper = new ObjectMapper(); final String json; try { mapper.writeValue(os, updateData); final byte[] data = ((ByteArrayOutputStream) os).toByteArray(); json = new String(data, "UTF-8"); } catch (IOException e) { throw new RuntimeException(e); } return json; }
Source:
<code>private static void validateCurrentVersion(Devfile devFile) throws DevfileFormatException { if (Strings.isNullOrEmpty(devFile.getApiVersion())) { throw new DevfileFormatException("Provided Devfile has no spec version specified"); } if (!CURRENT_API_VERSION.equals(devFile.getApiVersion())) { throw new DevfileFormatException( <START> format("Provided Devfile has unsupported version '%s'", devFile.getApiVersion())); <END> } }</code><technical_language>related changes, please consider adding supported version in error message</technical_language>

Target:
private static void validateCurrentVersion(Devfile devFile) throws DevfileFormatException { if (Strings.isNullOrEmpty(devFile.getApiVersion())) { throw new DevfileFormatException("Provided Devfile has no API version specified"); } if (!CURRENT_API_VERSION.equals(devFile.getApiVersion())) { throw new DevfileFormatException( format( "Provided Devfile has unsupported version '%s'. The following versions are" + " supported: %s", devFile.getApiVersion(), singleton(CURRENT_API_VERSION))); } }
Source:
<code>public void open(ExecutionContext ctx) throws Exception { super.open(ctx); ValueStateDescriptor<BaseRow> stateDesc = new ValueStateDescriptor<>("preRowState", rowTypeInfo); StateTtlConfig ttlConfig = createTtlConfig(minRetentionTime, stateCleaningEnabled); if (ttlConfig.isEnabled()) { <START> stateDesc.enableTimeToLive(ttlConfig); <END> } state = ctx.getRuntimeContext().getState(stateDesc); }</code><technical_language>need check here, enable a StateTtlConfig.DISABLED is okay</technical_language>

Target:
public void open(ExecutionContext ctx) throws Exception { super.open(ctx); ValueStateDescriptor<BaseRow> stateDesc = new ValueStateDescriptor<>("preRowState", rowTypeInfo); StateTtlConfig ttlConfig = createTtlConfig(minRetentionTime); if (ttlConfig.isEnabled()) { stateDesc.enableTimeToLive(ttlConfig); } state = ctx.getRuntimeContext().getState(stateDesc); }
Source:
<code>public void run(InputStream importStream, AgentPrincipals agent, String uuid, String mimeType) throws Exception { PID pid = PIDs.get(uuid); aclService.assertHasAccess("User does not have permission to add/update collection thumbnails", pid, agent.getPrincipals(), Permission.editDescription); try { if (!containsIgnoreCase(mimeType, "image")) { throw new IllegalArgumentException("Uploaded file is not an image"); } String thumbnailBasePath = idToPath(uuid, HASHED_PATH_DEPTH, HASHED_PATH_SIZE); <START> String filePath = storagePath.resolve(thumbnailBasePath).resolve(uuid).toString(); <END> File finalLocation = new File(filePath); copyInputStreamToFile(importStream, finalLocation); Document msg = makeEnhancementOperationBody(agent.getUsername(), pid, false); messageSender.sendMessage(msg); log.info("Job to to add thumbnail to collection has been queued by {}", uuid, agent.getUsername()); } catch (IllegalArgumentException e) { log.error("Uploaded file for collection is not an image file", uuid); throw e; } }</code><technical_language>Call .toFile() instead of toString()</technical_language>

Target:
public void run(InputStream importStream, AgentPrincipals agent, String uuid, String mimeType) throws Exception { PID pid = PIDs.get(uuid); aclService.assertHasAccess("User does not have permission to add/update collection thumbnails", pid, agent.getPrincipals(), Permission.editDescription); if (!containsIgnoreCase(mimeType, "image")) { log.error("Uploaded file for collection is not an image file", uuid); throw new IllegalArgumentException("Uploaded file is not an image"); } String thumbnailBasePath = idToPath(uuid, HASHED_PATH_DEPTH, HASHED_PATH_SIZE); File finalLocation = storagePath.resolve(thumbnailBasePath).resolve(uuid).toFile(); copyInputStreamToFile(importStream, finalLocation); Document msg = makeEnhancementOperationBody(agent.getUsername(), pid, false); messageSender.sendMessage(msg); log.info("Job to to add thumbnail to object has been queued by {}", uuid, agent.getUsername()); }
Source:
<code>public void doFilter(ServletRequest req, ServletResponse resp, FilterChain chain) throws IOException, ServletException { try { <START> String requestUUID = UUID.randomUUID().toString(); <END> LOGGER.debug(HEADER_REQUEST_UUID + ": " + requestUUID); MDC.put(HEADER_REQUEST_UUID, requestUUID); if (req instanceof HttpServletRequest) { ((HttpServletRequest) req).setAttribute(HEADER_REQUEST_UUID, requestUUID); } else { LOGGER.info("ServletRequest of type: " + req.getClass()); } if (resp instanceof HttpServletResponse) { ((HttpServletResponse) resp).setHeader(HEADER_REQUEST_UUID, requestUUID); } else { LOGGER.info("ServletResponse of type: " + resp.getClass()); } chain.doFilter(req, resp); } finally { MDC.remove(HEADER_REQUEST_UUID); } }</code><technical_language>This returns a large hard read garbage. Instead, a static AtomicInteger addAndGet()? problems ,multiple hosts, a static hostname variable is initialized once, concatenated int? lightbluecrud1-1234, more human readable</technical_language>

Target:
public void doFilter(ServletRequest req, ServletResponse resp, FilterChain chain) throws IOException, ServletException { try { String requestUUID = String.valueOf(UUID.randomUUID().getMostSignificantBits()); LOGGER.debug(HEADER_REQUEST_UUID + ": " + requestUUID); MDC.put(HEADER_REQUEST_UUID, requestUUID); if (req instanceof HttpServletRequest) { ((HttpServletRequest) req).setAttribute(HEADER_REQUEST_UUID, requestUUID); } else { LOGGER.info("ServletRequest of type: " + req.getClass()); } if (resp instanceof HttpServletResponse) { ((HttpServletResponse) resp).setHeader(HEADER_REQUEST_UUID, requestUUID); } else { LOGGER.info("ServletResponse of type: " + resp.getClass()); } chain.doFilter(req, resp); } finally { MDC.remove(HEADER_REQUEST_UUID); } }
Source:
<code>private static char[] encodeHex(byte[] data, char[] toDigits) { int l = data.length; char[] out = new char[l << 1]; int i = 0; <START> for (int var5 = 0; i < l; ++i) { <END> out[var5++] = toDigits[(240 & data[i]) >>> 4]; out[var5++] = toDigits[15 & data[i]]; } return out; }</code><technical_language>is this called var5</technical_language>

Target:
private static char[] encodeHex(byte[] data, char[] toDigits) { int l = data.length; char[] out = new char[l << 1]; int i = 0; for (int j = 0; i < l; ++i) { out[j++] = toDigits[(240 & data[i]) >>> 4]; out[j++] = toDigits[15 & data[i]]; } return out; }
Source:
<code>@Override public void load(Request request, int networkPolicy, Callback callback) { try { Source source = Okio.source(getInputStream(request)); callback.onSuccess(new Result(null, source, DISK, getFileExifRotation(request.uri))); } catch (Exception e) { <START> callback.onError(e); <END> } }</code><technical_language>same. called 2x</technical_language>

Target:
@Override public void load(Request request, int networkPolicy, Callback callback) { boolean signaledCallback = false; try { Source source = Okio.source(getInputStream(request)); signaledCallback = true; callback.onSuccess(new Result(null, source, DISK, getFileExifRotation(request.uri))); } catch (Exception e) { if (!signaledCallback) { callback.onError(e); } } }
Source:
<code>public static NumberRange<Double> getMinMax( ListFeatureCollection fc, Expression attributeExpression) { <START> double min = <END> fc.stream() .mapToDouble(f -> attributeExpression.evaluate(f, Double.class)) .min() .getAsDouble(); double max = fc.stream() .mapToDouble(f -> attributeExpression.evaluate(f, Double.class)) .max() .getAsDouble(); return new NumberRange<>(Double.class, min, max); }</code><technical_language>while streams cool, this win a single loop generating min max together</technical_language>

Target:
public static NumberRange<Double> getMinMax( ListFeatureCollection fc, Expression attributeExpression) { DoubleSummaryStatistics stats = fc.stream() .collect( Collectors.summarizingDouble( f -> attributeExpression.evaluate(f, Double.class))); return new NumberRange<>(Double.class, stats.getMin(), stats.getMax()); }
Source:
<code>public org.codice.solr.client.solrj.SolrClient newClient(String coreName) { Args.notEmpty(coreName, "Cannot create Solr client. Missing core name."); <START> if (getSolrDir() != null) { <END> ConfigurationStore.getInstance().setDataDirectoryPath(getSolrDir()); } LOGGER.debug( "Solr({}): Creating an HTTP Solr client using url [{}]", coreName, getCoreUrl(coreName)); return new SolrClientAdapter(coreName, () -> createSolrHttpClient(coreName)); }</code><technical_language>Please saved info a local variable avoid calling getSolrDir() ends a privileged action time</technical_language>

Target:
public org.codice.solr.client.solrj.SolrClient newClient(String coreName) { Args.notEmpty(coreName, "Cannot create Solr client. Solr core name"); String solrDir = getProperty(SOLR_DATA_DIR); Args.notEmpty(solrDir, "Cannot create Solr client. Solr data directory"); ConfigurationStore.getInstance().setDataDirectoryPath(solrDir); LOGGER.debug( "Solr({}): Creating an HTTP Solr client using url [{}]", coreName, getCoreUrl(coreName)); return new SolrClientAdapter(coreName, () -> createSolrHttpClient(coreName)); }