auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>@Override public String getBroadcastAddress() { String sensorName = getConfig(BROADCAST_ADDRESS_SENSOR); if (Strings.isNonBlank(sensorName)) return Entities.submit(this, DependentConfiguration.attributeWhenReady(this, Sensors.newStringSensor(sensorName))).getUnchecked(); String snitchName = getConfig(CassandraNode.ENDPOINT_SNITCH_NAME); if (snitchName.equals("Ec2MultiRegionSnitch") || snitchName.contains("MultiCloudSnitch")) { return getAttribute(CassandraNode.ADDRESS); } else if (!getDriver().isClustered()) { return getListenAddress(); } else { String hostname = getAttribute(CassandraNode.HOSTNAME); try { String resolvedAddress = getDriver().getResolvedAddress(hostname); if (resolvedAddress==null) { log.debug("Cassandra using broadcast address "+getListenAddress()+" for "+this+" because hostname "+hostname+" could not be resolved at remote machine"); return getListenAddress(); } if (resolvedAddress.equals("127.0.0.1")) { log.debug("Cassandra using broadcast address "+getListenAddress()+" for "+this+" because hostname "+hostname+" resolves to 127.0.0.1"); return getListenAddress(); } return hostname; <START> } catch (Exception e) { <END> log.warn("Error resolving hostname "+hostname+" for "+this+": "+e, e); return hostname; } } }</code><technical_language>Exceptions.propagateIfFatal()? catch other generic Exception</technical_language>

Target:
@Override public String getBroadcastAddress() { String sensorName = getConfig(BROADCAST_ADDRESS_SENSOR); if (Strings.isNonBlank(sensorName)) return Entities.submit(this, DependentConfiguration.attributeWhenReady(this, Sensors.newStringSensor(sensorName))).getUnchecked(); String snitchName = getConfig(CassandraNode.ENDPOINT_SNITCH_NAME); if (snitchName.equals("Ec2MultiRegionSnitch") || snitchName.contains("MultiCloudSnitch")) { return getAttribute(CassandraNode.ADDRESS); } else if (!getDriver().isClustered()) { return getListenAddress(); } else { String hostname = getAttribute(CassandraNode.HOSTNAME); try { String resolvedAddress = getDriver().getResolvedAddress(hostname); if (resolvedAddress==null) { log.debug("Cassandra using broadcast address "+getListenAddress()+" for "+this+" because hostname "+hostname+" could not be resolved at remote machine"); return getListenAddress(); } if (resolvedAddress.equals("127.0.0.1")) { log.debug("Cassandra using broadcast address "+getListenAddress()+" for "+this+" because hostname "+hostname+" resolves to 127.0.0.1"); return getListenAddress(); } return hostname; } catch (Exception e) { Exceptions.propagateIfFatal(e); log.warn("Error resolving hostname "+hostname+" for "+this+": "+e, e); return hostname; } } }
Source:
<code>public void checkAndSendAsync(boolean withAttachment) { this.asyncMailSender.submit(() -> { try { boolean sent = doCheckAndSend(withAttachment); if (sent) { jlogger.info(jobState.getId(), "sent notification email for finished job to " + getTo()); } } catch (JobEmailNotificationException e) { jlogger.warn(jobState.getId(), "failed to send email notification to " + e.getEmailTarget() + ": " + e.getMessage()); logger.trace("Stack trace:", e); <START> } catch (Exception e) { <END> logger.trace("Stack trace:", e); } }); }</code><technical_language>please add jlogger.warn(jobState.getId(), "failed send email notification " + e.getEmailTarget() + ": " + e.getMessage()); "failed send email notification " + e.getEmailTarget() + ": " + e.getMessage());</technical_language>

Target:
public void checkAndSendAsync(boolean withAttachment) { this.asyncMailSender.submit(() -> { try { boolean sent = doCheckAndSend(withAttachment); if (sent) { jlogger.info(jobState.getId(), "sent notification email for finished job to " + getTo()); } } catch (JobEmailNotificationException e) { jlogger.warn(jobState.getId(), "failed to send email notification to " + e.getEmailTarget() + ": " + e.getMessage()); logger.trace("Stack trace:", e); } catch (Exception e) { jlogger.warn(jobState.getId(), "failed to send email notification: " + e.getMessage()); logger.trace("Stack trace:", e); } }); }
Source:
<code><START> public static < T extends RealType< T > > IntervalView< T > expandValue( final RandomAccessibleInterval< T > source, final T t, final long... border ) <END> { return expandValue( ( RandomAccessibleInterval ) source, ( Object ) t, border ); }</code><technical_language>This relaxed Type<T> instead of RealType<T>, no</technical_language>

Target:
public static < T > IntervalView< T > expandValue( final RandomAccessibleInterval< T > source, final T t, final long... border ) { return interval( extendValue( source, t ), Intervals.expand( source, border ) ); }
Source:
<code>public ItemInteractionHandler getItemHandler() { return (e, p, item) -> { if (isItem(item)) { if(e.getClickedBlock() != null) { String target = BlockStorage.checkID(e.getClickedBlock()); if ("ANCIENT_PEDESTAL".equals(target) || "ANCIENT_ALTAR".equals(target)) <START> return false; <END> } if (p.getGameMode() != GameMode.CREATIVE) ItemUtils.consumeItem(item, false); p.getWorld().playSound(p.getLocation(), Sound.ENTITY_GENERIC_EAT, 1, 1); p.addPotionEffect(new PotionEffect(PotionEffectType.SPEED, 600, 3)); return true; } else return false; }; }</code><technical_language>This return true. True means "Yes this Item me". false telling Slimefun for items match..</technical_language>

Target:
public ItemInteractionHandler getItemHandler() { return (e, p, item) -> { if (isItem(item)) { if (e.getClickedBlock() != null) if (e.getClickedBlock().getType() == Material.DISPENSER || e.getClickedBlock().getType() == Material.ENCHANTING_TABLE) return true; if (p.getGameMode() != GameMode.CREATIVE) ItemUtils.consumeItem(item, false); p.getWorld().playSound(p.getLocation(), Sound.ENTITY_GENERIC_EAT, 1, 1); p.addPotionEffect(new PotionEffect(PotionEffectType.SPEED, 600, 3)); return true; } else return false; }; }
Source:
<code><START> public void registerAt(Class<? extends Filter> filter, <END> Class<? extends Filter> atFilter) { Integer position = getOrder(atFilter); if (position == null) { throw new IllegalArgumentException( "Cannot register after unregistered Filter " + atFilter); } put(filter, position + 1); }</code><technical_language>new registerAt method implementation existing registerAfter method. case for reuse</technical_language>

Target:
public void registerAt(Class<? extends Filter> filter, Class<? extends Filter> atFilter) { Integer position = getOrder(atFilter); if (position == null) { throw new IllegalArgumentException( "Cannot register after unregistered Filter " + atFilter); } put(filter, position); }
Source:
<code>public NodeSet select(int number, List<Node> matchedNodes) { if (number <= 0 || matchedNodes.size() == 0) { return new NodeSet(); } HashMap<Integer, List<InetAddress>> hostsMap = new HashMap<>(); for (InetAddress host : nodesOnHost.keySet()) { boolean busyNode = false; for (Node nodeOnHost : nodesOnHost.get(host)) { if (!matchedNodes.contains(nodeOnHost)) { busyNode = true; break; } } if (!busyNode) { int nodesNumber = nodesOnHost.get(host).size(); if (!hostsMap.containsKey(nodesNumber)) { hostsMap.put(nodesNumber, new LinkedList<InetAddress>()); } hostsMap.get(nodesNumber).add(host); } } if (hostsMap.size() == 0) { return new NodeSet(); } List<Integer> sortedCapacities = new LinkedList<>(hostsMap.keySet()); Collections.sort(sortedCapacities); NodeSet result = new NodeSet(); for (Integer i : sortedCapacities) { for (InetAddress host : hostsMap.get(i)) { Set<Node> hostNodes = nodesOnHost.get(host); int sz = hostNodes.size(); if (sz > 0) { result.add(hostNodes.iterator().next()); if (sz > 1) { List<Node> newExtraNodes = new LinkedList<>(subListLHS(hostNodes, 1, sz)); if (result.getExtraNodes() == null) { result.setExtraNodes(new LinkedList<Node>()); } result.getExtraNodes().addAll(newExtraNodes); } <START> if (--number <= 0) { <END> return result; } } } } return result; }</code><technical_language>![MAJOR](<LINK_1> Refactor this code nest more 3 if/for/while/switch/try statements. [![rule](<LINK_2>](<LINK_0></technical_language>

Target:
public NodeSet select(int number, List<Node> matchedNodes) { if (number <= 0 || matchedNodes.size() == 0) { return new NodeSet(); } HashMap<Integer, List<InetAddress>> hostsMap = new HashMap<>(); for (InetAddress host : nodesOnHost.keySet()) { boolean busyNode = false; for (Node nodeOnHost : nodesOnHost.get(host)) { if (!matchedNodes.contains(nodeOnHost)) { busyNode = true; break; } } if (!busyNode) { int nodesNumber = nodesOnHost.get(host).size(); if (!hostsMap.containsKey(nodesNumber)) { hostsMap.put(nodesNumber, new LinkedList<InetAddress>()); } hostsMap.get(nodesNumber).add(host); } } if (hostsMap.size() == 0) { return new NodeSet(); } List<Integer> sortedCapacities = new LinkedList<>(hostsMap.keySet()); Collections.sort(sortedCapacities); NodeSet result = new NodeSet(); for (Integer i : sortedCapacities) { for (InetAddress host : hostsMap.get(i)) { Set<Node> hostNodes = nodesOnHost.get(host); int nbNodes = hostNodes.size(); if (nbNodes > 0) { result.add(hostNodes.iterator().next()); if (nbNodes > 1) { List<Node> newExtraNodes = new LinkedList<>(subListLHS(hostNodes, 1, nbNodes)); if (result.getExtraNodes() == null) { result.setExtraNodes(new LinkedList<Node>()); } result.getExtraNodes().addAll(newExtraNodes); } if (--number <= 0) { return result; } } } } return result; }
Source:
<code>public void HiViBTFShouldRequestForMEGAAdUnitVAST() throws UnsupportedEncodingException { <START> final String adUnit = "/5441/wka1a.VIDEO/uap_bfaa/desktop/oasis-article/_project43-life"; <END> checkRequestForAdUnit(AdsDataProvider.UAP_HIVI_PAGE, adUnit); }</code><technical_language>BTF uap_bfaa in ad unit</technical_language>

Target:
public void HiViBTFShouldRequestForMEGAAdUnitVAST() throws UnsupportedEncodingException { final String adUnit = "/5441/wka1a.VIDEO/uap_bfab/desktop/oasis-article/_project43-life"; checkRequestForAdUnit(AdsDataProvider.UAP_HIVI_PAGE, adUnit, new String[]{AdsContent.BOTTOM_LB}); }
Source:
<code>public boolean isValid(CruiseConfig preprocessedConfig) { boolean isValid = validateRemovePipelines(preprocessedConfig); isValid = isValid && validateRemoveAgents(preprocessedConfig); <START> isValid = isValid && validateRemoveEnvironmentVariables(preprocessedConfig); <END> return isValid && super.isValid(preprocessedConfig); }</code><technical_language>get preprocessedEnvironmentConfig pass instead of finding in functions</technical_language>

Target:
public boolean isValid(CruiseConfig preprocessedConfig) { EnvironmentConfig preprocessedEnvironmentConfig = preprocessedConfig.getEnvironments().find(environmentConfig.name()); boolean isValid = validateRemovalOfInvalidEntities(); if (preprocessedEnvironmentConfig instanceof MergeEnvironmentConfig) { isValid = validateRemovalOfRemoteEntities(preprocessedEnvironmentConfig); } return isValid && super.isValid(preprocessedConfig); }
Source:
<code>public void editBuffersPerSliceInvalid() throws Exception { final int value = -1; <START> ModelNodeResult modelNodeResult = operations.readAttribute(BUFFER_POOL_ADDRESS, BUFFERS_PER_SLICE); <END> modelNodeResult.assertSuccess(); try { new ConfigChecker.Builder(client, BUFFER_POOL_ADDRESS) .configFragment(page.getConfigFragment()) .editAndSave(ConfigChecker.InputType.TEXT, BUFFERS_PER_SLICE, String.valueOf(value)) .verifyFormNotSaved(); } finally { operations.writeAttribute(BUFFER_POOL_ADDRESS, BUFFERS_PER_SLICE, modelNodeResult.value()); } }</code><technical_language>Please rename originalBuffersPerSliceResult originalResult</technical_language>

Target:
public void editBuffersPerSliceInvalid() throws Exception { final int value = -1; final ModelNodeResult originalNodeResult = operations.readAttribute(BUFFER_POOL_ADDRESS, BUFFERS_PER_SLICE); originalNodeResult.assertSuccess(); try { new ConfigChecker.Builder(client, BUFFER_POOL_ADDRESS) .configFragment(page.getConfigFragment()) .editAndSave(ConfigChecker.InputType.TEXT, BUFFERS_PER_SLICE, String.valueOf(value)) .verifyFormNotSaved(); } finally { operations.writeAttribute(BUFFER_POOL_ADDRESS, BUFFERS_PER_SLICE, originalNodeResult.value()); } }
Source:
<code><START> public KafkaMessageDrivenChannelAdapter kafkaMessageDrivenChannelAdapter() throws IllegalAccessException, InstantiationException, ClassNotFoundException { <END> final KafkaMessageDrivenChannelAdapter kafkaMessageDrivenChannelAdapter = new KafkaMessageDrivenChannelAdapter(container()); kafkaMessageDrivenChannelAdapter.setKeyDecoder(getKeyDecoder()); kafkaMessageDrivenChannelAdapter.setPayloadDecoder(getPayloadDecoder()); kafkaMessageDrivenChannelAdapter.setOutputChannel(source.output()); return kafkaMessageDrivenChannelAdapter; }</code><technical_language>ClassNotFoundException is redundant already</technical_language>

Target:
public KafkaMessageDrivenChannelAdapter kafkaMessageDrivenChannelAdapter() throws IllegalAccessException, InstantiationException { final KafkaMessageDrivenChannelAdapter kafkaMessageDrivenChannelAdapter = new KafkaMessageDrivenChannelAdapter(container()); kafkaMessageDrivenChannelAdapter.setKeyDecoder(getKeyDecoder()); kafkaMessageDrivenChannelAdapter.setPayloadDecoder(getPayloadDecoder()); kafkaMessageDrivenChannelAdapter.setOutputChannel(source.output()); return kafkaMessageDrivenChannelAdapter; }
Source:
<code>private void updateClanMenu(Player player) { clanService.getClanByTag(player.getClan()) .thenAccept(optionalClan -> JavaFxUtil.runLater(() -> updateClanMenu(optionalClan))) .exceptionally(throwable -> { <START> log.error("Clan was not updated", throwable); <END> return null; }); }</code><technical_language>warn</technical_language>

Target:
private void updateClanMenu(Player player) { clanService.getClanByTag(player.getClan()) .thenAccept(optionalClan -> JavaFxUtil.runLater(() -> updateClanMenu(optionalClan))) .exceptionally(throwable -> { log.warn("Clan was not updated", throwable); return null; }); }
Source:
<code>public boolean equals(Object obj) { if (this == obj) { return true; } <START> if (obj == null || !(obj instanceof QueryState)) { <END> return false; } QueryState other = (QueryState) obj; if (metaDataOperation != other.metaDataOperation) { return false; } if (!Arrays.equals(operationArgs, other.operationArgs)) { return false; } if (sql == null) { if (other.sql != null) { return false; } } else if (!sql.equals(other.sql)) { return false; } return true; }</code><technical_language>obj == null is redundant - do instanceof</technical_language>

Target:
public boolean equals(Object obj) { if (this == obj) { return true; } if (!(obj instanceof QueryState)) { return false; } QueryState other = (QueryState) obj; if (metaDataOperation != other.metaDataOperation) { return false; } if (!Arrays.deepEquals(operationArgs, other.operationArgs)) { return false; } if (sql == null) { if (other.sql != null) { return false; } } else if (!sql.equals(other.sql)) { return false; } return true; }
Source:
<code>public static byte evalCRC(byte[] data, int length) { int crc = 0; int i, j; for (j = 0; j < length; j++) { crc ^= (data[j] << 8); for (i = 0; i < 8; i++) { if ((crc & 0x8000) != 0) { crc ^= (0x1070 << 3); } crc <<= 1; } } byte result = (byte) (crc >> 8); if (logger.isTraceEnabled()) { <START> logger.trace("Counting CRC8 of: " + arrayToString(data, length)); <END> logger.trace("CRC8 result: 0x" + Integer.toHexString(result & 0xFF).toUpperCase()); } return result; }</code><technical_language>parameterized logging instead of string concatenation</technical_language>

Target:
public static byte evalCRC(byte[] data, int length) { int crc = 0; int i, j; for (j = 0; j < length; j++) { crc ^= (data[j] << 8); for (i = 0; i < 8; i++) { if ((crc & 0x8000) != 0) { crc ^= (0x1070 << 3); } crc <<= 1; } } byte result = (byte) (crc >> 8); if (logger.isTraceEnabled()) { logger.trace("Counting CRC8 of: {}", arrayToString(data, length)); logger.trace("CRC8 result: 0x{}", Integer.toHexString(result & 0xFF).toUpperCase()); } return result; }
Source:
<code>static void writeToFileInDirectory(String data, String directory, String filename) { File file = new File(directory, filename); FileOutputStream outputStream = null; try { file.createNewFile(); <START> outputStream = new FileOutputStream(file, true); <END> outputStream.write(data.getBytes()); outputStream.flush(); outputStream.close(); } catch (Exception e) { e.printStackTrace(); } finally { try { if (outputStream != null) { outputStream.flush(); outputStream.close(); } } catch (IOException e) { Log.e("Exception", "File write failed: " + e.toString()); } } }</code><technical_language>true parameter contents appended end of file, instead of re-creating file new data. This simply new FileOutputStream(file, true), defaults false</technical_language>

Target:
static void writeToFileInDirectory(String data, String directory, String filename) { File file = new File(directory, filename); FileOutputStream outputStream = null; try { file.createNewFile(); outputStream = new FileOutputStream(file); outputStream.write(data.getBytes()); outputStream.flush(); outputStream.close(); } catch (Exception e) { e.printStackTrace(); } finally { try { if (outputStream != null) { outputStream.flush(); outputStream.close(); } } catch (IOException e) { Log.e("Exception", "File write failed: " + e.toString()); } } }
Source:
<code>public void testWritingEmptySymbol() throws Exception { iw = makeWriter(); <START> iw.writeSymbol("a"); <END> IonReader in = reread(); in.next(); IonAssert.checkSymbol("a", in); }</code><technical_language>This writing empty symbol, name suggests</technical_language>

Target:
public void testWritingEmptySymbol() throws Exception { iw = makeWriter(); iw.writeSymbol(""); IonReader in = reread(); in.next(); IonAssert.checkSymbol("", in); }
Source:
<code>void fillChunks() { try { PutChunk chunkToFill; if (!chunkFillingCompleted && !operationCompleted) { do { if (channelReadBuffer == null) { channelReadBuffer = chunkFillerChannel.getNextChunk(0); } if (channelReadBuffer != null) { chunkToFill = getChunkToFill(); if (chunkToFill == null) { maybeStartTrackingWaitTime(); break; } else { maybeUpdateTrackedWaitTime(); bytesFilledSoFar += chunkToFill.fillFrom(channelReadBuffer); if (chunkToFill.isReady()) { routerMetrics.waitTimeForFreeChunkAvailabilityMs.update(waitTimeForNextChunkAvailabilityMs); <START> resetWaitTimeTracking(); <END> } if (!channelReadBuffer.hasRemaining()) { chunkFillerChannel.resolveOldestChunk(null); channelReadBuffer = null; } } } else { break; } } while (bytesFilledSoFar < blobSize); if (bytesFilledSoFar == blobSize) { chunkFillingCompleted = true; } } } catch (Exception e) { setOperationExceptionAndComplete(new RouterException("PutOperation fillChunks encountered unexpected error", e, RouterErrorCode.UnexpectedInternalError)); } }</code><technical_language>need this block function. suffice update metric in maybeUpdateTrackedWaitTime() ditch resetWaitTimeTracking() altogether? drop waitTimeForNextChunkAvailabilityMs variable</technical_language>

Target:
void fillChunks() { try { PutChunk chunkToFill; if (!chunkFillingCompleted && !operationCompleted) { do { if (channelReadBuffer == null) { channelReadBuffer = chunkFillerChannel.getNextChunk(0); } if (channelReadBuffer != null) { maybeStopTrackingWaitForChannelDataTime(); chunkToFill = getChunkToFill(); if (chunkToFill == null) { maybeStartTrackingWaitForChunkTime(); break; } else { maybeStopTrackingWaitForChunkTime(); bytesFilledSoFar += chunkToFill.fillFrom(channelReadBuffer); if (chunkToFill.isReady()) { updateChunkFillerWaitTimeMetrics(); } if (!channelReadBuffer.hasRemaining()) { chunkFillerChannel.resolveOldestChunk(null); channelReadBuffer = null; } } } else { if (getFreeChunk() != null) { maybeStartTrackingWaitForChannelDataTime(); } break; } } while (bytesFilledSoFar < blobSize); if (bytesFilledSoFar == blobSize) { chunkFillingCompleted = true; } } } catch (Exception e) { setOperationExceptionAndComplete(new RouterException("PutOperation fillChunks encountered unexpected error", e, RouterErrorCode.UnexpectedInternalError)); } }
Source:
<code>public void setBounds(int x, int y, int width, int height) { super.setBounds(x, y, width, height); Dimension currentSize = <START> getSize(); <END> if (myGraphicsLayoutRenderer != null && !currentSize.equals(myLastSize)) { myGraphicsLayoutRenderer.setSize(currentSize); myLastSize = currentSize; } }</code><technical_language>Dimension myLastSize = getSize(); call super, need this a member variable</technical_language>

Target:
public void setBounds(int x, int y, int width, int height) { Dimension previousSize = getSize(); super.setBounds(x, y, width, height); Dimension currentSize = getSize(); if (myGraphicsLayoutRenderer != null && !currentSize.equals(previousSize)) { myGraphicsLayoutRenderer.setSize(currentSize); } }
Source:
<code>public boolean shouldAudit(StructuredEvent structuredEvent) { OperationDetails operation = structuredEvent.getOperation(); FlowResourceAuditEventConverter flowResourceAuditEventConverter = getConverter(operation.getResourceType()); if (flowResourceAuditEventConverter == null) { return false; } boolean crn = Crn.isCrn(operation.getResourceCrn()); <START> return flowResourceAuditEventConverter.shouldAudit((StructuredFlowEvent) structuredEvent) && crn; <END> }</code><technical_language>swap sides of && is a short-circuit operator crn is</technical_language>

Target:
public boolean shouldAudit(StructuredEvent structuredEvent) { OperationDetails operation = structuredEvent.getOperation(); FlowResourceAuditEventConverter flowResourceAuditEventConverter = getConverter(operation.getResourceType()); if (flowResourceAuditEventConverter == null) { return false; } boolean crn = Crn.isCrn(operation.getResourceCrn()); return crn && flowResourceAuditEventConverter.shouldAudit((StructuredFlowEvent) structuredEvent); }
Source:
<code>public String toString() { StringBuilder sb = new StringBuilder(); <START> sb.append("DataTableName: ").append(dataTableName).append(","); <END> sb.append("IndexTableName: ").append(indexTableName).append(","); sb.append("ScanMaxTimestamp: ").append(scanMaxTimestamp).append(","); sb.append("DataTableRowKey: ").append(Bytes.toString(dataTableRowKey)).append(","); sb.append("IndexTableRowKey: ").append(Bytes.toString(indexTableRowKey)).append(","); sb.append("DataTableRowTimestamp: ").append(dataTableRowTimestamp).append(","); sb.append("IndexTableRowTimestamp: ").append(indexTableRowTimestamp).append(","); sb.append("ErrorMessage: ").append(errorMessage).append(","); sb.append("ExpectedValue: ").append(Bytes.toString(expectedValue)).append(","); sb.append("ActualValue: ").append(Bytes.toString(actualValue)).append(","); sb.append("PhaseValue: ").append(Bytes.toString(phaseValue)); return sb.toString(); }</code><technical_language>reuse strings table values? DTName, ITName. easier track reuse</technical_language>

Target:
public String toString() { StringBuilder sb = new StringBuilder(); sb.append(IndexVerificationOutputRepository.DATA_TABLE_NAME + ": ").append(dataTableName).append(","); sb.append(IndexVerificationOutputRepository.INDEX_TABLE_NAME + ": ").append(indexTableName).append(","); sb.append(SCAN_MAX_TIMESTAMP).append(": ").append(scanMaxTimestamp).append(","); sb.append(IndexVerificationOutputRepository.DATA_TABLE_ROW_KEY + ": ").append(Bytes.toString(dataTableRowKey)).append(","); sb.append(IndexVerificationOutputRepository.INDEX_TABLE_ROW_KEY + ": ").append(Bytes.toString(indexTableRowKey)).append(","); sb.append(IndexVerificationOutputRepository.DATA_TABLE_TS + ": ").append(dataTableRowTimestamp).append(","); sb.append(IndexVerificationOutputRepository.INDEX_TABLE_TS + ": ").append(indexTableRowTimestamp).append(","); sb.append(IndexVerificationOutputRepository.ERROR_MESSAGE + ": ").append(errorMessage).append(","); sb.append(IndexVerificationOutputRepository.EXPECTED_VALUE + ": ").append(Bytes.toString(expectedValue)).append(","); sb.append(IndexVerificationOutputRepository.ACTUAL_VALUE + ": ").append(Bytes.toString(actualValue)).append( ","); sb.append(IndexVerificationOutputRepository.VERIFICATION_PHASE + ": ").append(Bytes.toString(phaseValue)); return sb.toString(); }
Source:
<code>public Map<String, ShardingKeyTrieNode> getChildren() { <START> return Collections.unmodifiableMap(_children); <END> }</code><technical_language>1. map is final 2. is set method update map. put in unmodifiable map in constructor? need create a map get</technical_language>

Target:
public Map<String, ShardingKeyTrieNode> getChildren() { return _children; }
Source:
<code><START> private void reconnectExceptionally(final String message) throws DatabaseEngineException { try { getConnection(); } catch (final Exception e) { throw new DatabaseEngineException(message, e); } } <END></code><technical_language>Subclasses this. method _protected_, code replaced a call this method in subclasses</technical_language>

Target:
protected void reconnectExceptionally(final String message) throws DatabaseEngineException { try { getConnection(); } catch (final Exception e) { throw new DatabaseEngineException(message, e); } }
Source:
<code>public NonAnnotatedVariantsMongoReader(MongoOperations template, String collectionsVariantsName, String studyId) { if (studyId == null) { throw new IllegalArgumentException("NonAnnotatedVariantsMongoReader needs a non-null studyId " + <START> "(it can take a studyId or an empty string for reading every study)"); <END> } delegateReader = new MongoDbCursorItemReader(); delegateReader.setTemplate(template); delegateReader.setCollection(collectionsVariantsName); BasicDBObjectBuilder queryBuilder = BasicDBObjectBuilder.start(); if (!studyId.isEmpty()) { queryBuilder.add(STUDY_KEY, studyId); } DBObject query = queryBuilder.add("annot.ct.so", new BasicDBObject("$exists", false)).get(); delegateReader.setQuery(query); String[] fields = {"chr", "start", "end", "ref", "alt"}; delegateReader.setFields(fields); converter = new DBObjectToVariantConverter(); }</code><technical_language>I discussed #100 , convinced this interface. do of allowing study ID null, check empty adding a condition? ensure cases of "unspecified study" behave way</technical_language>

Target:
public NonAnnotatedVariantsMongoReader(MongoOperations template, String collectionsVariantsName, String studyId) { delegateReader = new MongoDbCursorItemReader(); delegateReader.setTemplate(template); delegateReader.setCollection(collectionsVariantsName); BasicDBObjectBuilder queryBuilder = BasicDBObjectBuilder.start(); if (studyId != null && !studyId.isEmpty()) { queryBuilder.add(STUDY_KEY, studyId); } DBObject query = queryBuilder.add("annot.ct.so", new BasicDBObject("$exists", false)).get(); delegateReader.setQuery(query); String[] fields = {"chr", "start", "end", "ref", "alt"}; delegateReader.setFields(fields); converter = new DBObjectToVariantConverter(); }
Source:
<code>public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (!(obj instanceof FileAndName)) { return false; } FileAndName other = (FileAndName) obj; if (fConfiguration == null) { if (other.fConfiguration != null) { return false; } } else if (!fConfiguration.equals(other.fConfiguration)) { return false; } if (file == null) { if (other.file != null) { return false; } } else if (!file.equals(other.file)) { return false; <START> } <END> return true; }</code><technical_language>consider name</technical_language>

Target:
public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (!(obj instanceof FileAndName)) { return false; } FileAndName other = (FileAndName) obj; if (fTraceTypeId == null) { if (other.fTraceTypeId != null) { return false; } } else if (!fTraceTypeId.equals(other.fTraceTypeId)) { return false; } if (fFile == null) { if (other.fFile != null) { return false; } } else if (!fFile.equals(other.fFile)) { return false; } return true; }
Source:
<code>public boolean isType(TileEntity tile, EnumFacing dir) { <START> if(tile instanceof IGridHost && tile.hasCapability(LPStorageMonitorableAccessor.STORAGE_MONITORABLE_ACCESSOR_CAPABILITY, dir)) { <END> return true; } return false; }</code><technical_language>Formatting</technical_language>

Target:
public boolean isType(TileEntity tile, EnumFacing dir) { return tile instanceof IGridHost && tile.hasCapability(LPStorageMonitorableAccessor.STORAGE_MONITORABLE_ACCESSOR_CAPABILITY, dir); }
Source:
<code>public void duplicatedUse() { Response response = keycloakUtil.createUser("developer"); assertThat(409,is(response.getStatus())); response.close(); <START> } <END></code><technical_language>method getAllGroupsSize in KeycloakUtil written here</technical_language>

Target:
public void duplicatedUse() { Response response = keycloakUtil.createUser("developer"); assertThat(409,is(response.getStatus())); response.close(); assertThat(7,is(keycloakUtil.getAllGroupsSize())); }
Source:
<code>public String getQuestionResultStatisticsHtml(List<FeedbackResponseAttributes> responses, FeedbackQuestionAttributes question, String studentEmail, FeedbackSessionResultsBundle bundle, String view) { if ("student".equals(view) || responses.isEmpty()) { return ""; } Map<String, Integer> answerFrequency = new LinkedHashMap<String, Integer>(); int numChoicesSelected = getNumberOfResponse(responses, answerFrequency); if (numChoicesSelected == -1) { return ""; } DecimalFormat df = new DecimalFormat("#.##"); StringBuilder fragments = new StringBuilder(); for (Entry<String, Integer> entry : answerFrequency.entrySet()) { fragments.append(Templates.populateTemplate(FormTemplates.MCQ_RESULT_STATS_OPTIONFRAGMENT, Slots.MCQ_CHOICE_VALUE, entry.getKey(), Slots.COUNT, entry.getValue().toString(), Slots.PERCENTAGE, <START> df.format(100 * divideOrReturnZero((double) entry.getValue(), numChoicesSelected)))); <END> } return Templates.populateTemplate(FormTemplates.MCQ_RESULT_STATS, Slots.FRAGMENTS, fragments.toString()); }</code><technical_language>a need explicitly case this double method signature double, int</technical_language>

Target:
public String getQuestionResultStatisticsHtml(List<FeedbackResponseAttributes> responses, FeedbackQuestionAttributes question, String studentEmail, FeedbackSessionResultsBundle bundle, String view) { if ("student".equals(view) || responses.isEmpty()) { return ""; } Map<String, Integer> answerFrequency = new LinkedHashMap<String, Integer>(); int numChoicesSelected = getNumberOfResponses(responses, answerFrequency); if (numChoicesSelected == -1) { return ""; } DecimalFormat df = new DecimalFormat("#.##"); StringBuilder fragments = new StringBuilder(); for (Entry<String, Integer> entry : answerFrequency.entrySet()) { fragments.append(Templates.populateTemplate(FormTemplates.MCQ_RESULT_STATS_OPTIONFRAGMENT, Slots.MCQ_CHOICE_VALUE, entry.getKey(), Slots.COUNT, entry.getValue().toString(), Slots.PERCENTAGE, df.format(100 * divideOrReturnZero(entry.getValue(), numChoicesSelected)))); } return Templates.populateTemplate(FormTemplates.MCQ_RESULT_STATS, Slots.FRAGMENTS, fragments.toString()); }
Source:
<code><START> protected void onSuccess() { <END> java.io.File tempFile = new java.io.File(tempFilePath); java.io.File finalFile = new java.io.File(finalFilePath); boolean renamedOk = tempFile.renameTo(finalFile); if (renamedOk) { fileTaskMap.remove(fileId); callback.onFileReceived(fileId, documentId, fileName); } else { onFailure(new FileDownloadException("Cannot rename downloaded file", fileId)); } }</code><technical_language>David, this is executed onPostExecute, renaming files in UI thread. Ideally, do this in doInBackground (same for deleting partially deleted file in onCancelled) I this possible, missing anything: - download file in doInBackground - block reads/writes streams, check isCancelled(). Rename deleted temp file here. - do in onCancelled / onPostExecute</technical_language>

Target:
protected void onSuccess() { fileTaskMap.remove(fileId); callback.onFileReceived(fileId, documentId, fileName); }
Source:
<code>public Dialog onCreateDialog(Bundle savedInstanceState) { final Activity activity = getActivity(); <START> @SuppressLint("InflateParams") View view = LayoutInflater.from(getActivity()).inflate(R.layout.color_picker_dialog, null); <END> mProgress = view.findViewById(android.R.id.progress); mPalette = view.findViewById(R.id.color_picker); mPalette.init(mSize, mColumns, this); if (mColors != null) { showPaletteView(); } return new AlertDialog.Builder(activity) .setTitle(mTitleResId) .setView(view) .create(); }</code><technical_language>**getActivity()** called result is in **activity** I suggest replacing SuppressLint a inflate method: View view = View.inflate(activity, R.layout.color_picker_dialog, null);</technical_language>

Target:
public Dialog onCreateDialog(Bundle savedInstanceState) { final Activity activity = getActivity(); View view = View.inflate(activity, R.layout.color_picker_dialog, null); mProgress = view.findViewById(android.R.id.progress); mPalette = view.findViewById(R.id.color_picker); mPalette.init(mSize, mColumns, this); if (mColors != null) { showPaletteView(); } return new AlertDialog.Builder(activity) .setTitle(mTitleResId) .setView(view) .create(); }
Source:
<code>public void visitNode(Tree tree) { ClassTree classTree = (ClassTree) tree; if (classTree.symbol().isAbstract()) { for (Tree member : classTree.members()) { if (member.is(Tree.Kind.METHOD)) { <START> checkMethod((MethodTree) member); <END> } } } }</code><technical_language>rely semantic anyway, I check if owner of method is abstract, avoid a loop. Moreover, is semantic</technical_language>

Target:
public void visitNode(Tree tree) { if (!hasSemantic()) { return; } Symbol.MethodSymbol method = ((MethodTree) tree).symbol(); if (method.isAbstract() && method.owner().isAbstract()) { checkMethod((JavaSymbol.MethodJavaSymbol) method); } }
Source:
<code>void switchMediaUnit() throws NoSuchMetadataFieldException { try { metadataPanel.preservePhysical(); } catch (InvalidMetadataValueException e) { <START> logger.info(e.getLocalizedMessage()); <END> } metadataPanel.showPhysical(structurePanel.getSelectedMediaUnit()); if (structurePanel.getSelectedMediaUnit().isPresent()) { galleryPanel.updateSelection(structurePanel.getSelectedMediaUnit().get()); for (GalleryMediaContent galleryMediaContent : galleryPanel.getMedias()) { if (structurePanel.getSelectedMediaUnit().get().getMediaFiles().values().contains(galleryMediaContent.getPreviewUri())) { structurePanel.updateLogicalNodeSelection(galleryMediaContent); break; } } } }</code><technical_language>Stack trace is nice (but necessary): suggestion logger.info(e.getLocalizedMessage(), e);</technical_language>

Target:
void switchMediaUnit() throws NoSuchMetadataFieldException { try { metadataPanel.preservePhysical(); } catch (InvalidMetadataValueException e) { logger.info(e.getLocalizedMessage(), e); } Optional<MediaUnit> selectedMediaUnit = structurePanel.getSelectedMediaUnit(); metadataPanel.showPhysical(selectedMediaUnit); if (selectedMediaUnit.isPresent()) { galleryPanel.updateSelection(selectedMediaUnit.get()); for (GalleryMediaContent galleryMediaContent : galleryPanel.getMedias()) { if (selectedMediaUnit.get().getMediaFiles().values().contains(galleryMediaContent.getPreviewUri())) { structurePanel.updateLogicalNodeSelection(galleryMediaContent); break; } } } }
Source:
<code>private void switchToTabInConfig(String label) { By selector = ByJQuery.selector("div.gwt-Label:contains(" + label + ")"); <START> Graphene.waitModel(browser).until().element(selector).is().visible(); <END> browser.findElement(selector).click(); }</code><technical_language>Is slow? reported</technical_language>

Target:
private void switchToTabInConfig(String label) { getConfig().switchTo(label); }
Source:
<code>public void migrate(Context context) throws Exception { runner.execute(context.getConnection(), Arrays.asList( SqlCommand.from(ALTER_STREAM_DEFINITION_TABLE_DESC), <START> SqlCommand.from(ALTER_STREAM_DEFINITION_TABLE_ORIG_DEF), <END> SqlCommand.from(ALTER_TASK_DEFINITION_TABLE))); }</code><technical_language>in a migration for existing db, copy current definition original? I original anymore have. field is empty</technical_language>

Target:
public void migrate(Context context) throws Exception { runner.execute(context.getConnection(), Arrays.asList( SqlCommand.from(ALTER_STREAM_DEFINITION_TABLE_DESC), SqlCommand.from(ALTER_STREAM_DEFINITION_TABLE_ORIG_DEF), SqlCommand.from(ALTER_TASK_DEFINITION_TABLE), SqlCommand.from(UPDATE_STREAM_DEFINITION_TABLE_ORIG_DEF))); ; }
Source:
<code>public String getDescription() { <START> return "Returns the type of o as a string ('string', 'date', 'number', 'array', 'boolean', 'error' or a class name)"; <END> }</code><technical_language>suggestion return "Returns type of o a string ('string', 'date', 'number', 'array', 'boolean'). string 'error' is returned if evaluated"; bug is fixed, return a Java class name? tempted pare this simply "Returns type of o a string."</technical_language>

Target:
public String getDescription() { return "Returns the type of o as a string ('string', 'date', 'number', 'array', 'boolean' or a class name)"; }
Source:
<code>private void startCounterCache() { if (counterCacheStarted.compareAndSet(false, true)) { SecurityActions.getGlobalComponentRegistry(cacheManager) .getComponent(Executor.class, KnownComponentNames.ASYNC_OPERATIONS_EXECUTOR) .execute(() -> { String oldName = Thread.currentThread().getName(); try { <START> SecurityActions.setThreadName(threadName()); <END> cacheManager.getCache(CounterModuleLifecycle.COUNTER_CACHE_NAME); } finally { SecurityActions.setThreadName(oldName); } }); } }</code><technical_language>I original issue in threadName get cache configuration, requires a security action</technical_language>

Target:
private void startCounterCache() { if (counterCacheStarted.compareAndSet(false, true)) { SecurityActions.getGlobalComponentRegistry(cacheManager) .getComponent(Executor.class, KnownComponentNames.ASYNC_OPERATIONS_EXECUTOR) .execute(() -> { String oldName = Thread.currentThread().getName(); try { GlobalConfiguration configuration = SecurityActions.getCacheManagerConfiguration(cacheManager); String threadName = "CounterCacheStartThread," + configuration.transport().nodeName(); SecurityActions.setThreadName(threadName); cacheManager.getCache(CounterModuleLifecycle.COUNTER_CACHE_NAME); } finally { SecurityActions.setThreadName(oldName); } }); } }
Source:
<code>private boolean stopSamzaContainer() { boolean hasContainerShutdown = true; if (container != null) { try { container.shutdown(); LOGGER.info("Waiting ms for the container: to shutdown.", taskShutdownMs, container); hasContainerShutdown = containerShutdownLatch.await(taskShutdownMs, TimeUnit.MILLISECONDS); } catch (Exception e) { <START> LOGGER.error("Exception occurred when shutting down the container: {}.", container, e); <END> hasContainerShutdown = false; } LOGGER.info(String.format("Shutdown status of container: %s for stream processor: %s is: %b.", container, processorId, hasContainerShutdown)); } if (!hasContainerShutdown && containerException == null) { containerException = new TimeoutException("Container shutdown timed out."); } return hasContainerShutdown; }</code><technical_language>ICSE is a timeout. set containerException this value, log this set hasContainerShutdown = false</technical_language>

Target:
private boolean stopSamzaContainer() { boolean hasContainerShutdown = true; if (container != null) { try { container.shutdown(); LOGGER.info("Waiting ms for the container: to shutdown.", taskShutdownMs, container); hasContainerShutdown = containerShutdownLatch.await(taskShutdownMs, TimeUnit.MILLISECONDS); } catch (InterruptedException e) { LOGGER.error("Exception occurred when shutting down the container: {}.", container, e); hasContainerShutdown = false; if (containerException != null) { containerException = e; } } LOGGER.info(String.format("Shutdown status of container: %s for stream processor: %s is: %b.", container, processorId, hasContainerShutdown)); } if (!hasContainerShutdown && containerException == null) { containerException = new TimeoutException("Container shutdown timed out after " + taskShutdownMs + " ms."); } return hasContainerShutdown; }
Source:
<code>public boolean isTrashed(CoreSession session, DocumentRef docRef) { Boolean isTrashed = session.getDocumentSystemProp(docRef, SYSPROP_IS_TRASHED, Boolean.class); <START> return isTrashed != null && isTrashed.booleanValue(); <END> }</code><technical_language>Simpler: Boolean.TRUE.equals(isTrashed)</technical_language>

Target:
public boolean isTrashed(CoreSession session, DocumentRef docRef) { Boolean isTrashed = session.getDocumentSystemProp(docRef, SYSPROP_IS_TRASHED, Boolean.class); return Boolean.TRUE.equals(isTrashed); }
Source:
<code>private List<OutputFieldInfo> generateOutputFieldInfoForRecord(Schema.Field field, int levelToLimitFlattening) { List<OutputFieldInfo> outputFieldInfos = new ArrayList<>(); Schema schema = field.getSchema(); List<Schema.Field> fields; <START> if (schema.isNullable()) { <END> fields = schema.getNonNullable().getFields(); } else { fields = schema.getFields(); } if (fields == null || fields.size() == 0) { return outputFieldInfos; } for (Schema.Field subField : fields) { outputFieldInfos.addAll(flattenField(subField, levelToLimitFlattening - 1)); } List<OutputFieldInfo> result = new ArrayList<>(); for (OutputFieldInfo outputFieldInfo : outputFieldInfos) { result.add(OutputFieldInfo.fromChild(outputFieldInfo, field)); } return result; }</code><technical_language>This single line ternary operator</technical_language>

Target:
private List<OutputFieldInfo> generateOutputFieldInfoForRecord(Schema.Field field, int levelToLimitFlattening) { List<OutputFieldInfo> outputFieldInfos = new ArrayList<>(); Schema schema = field.getSchema(); List<Schema.Field> fields; fields = schema.isNullable() ? schema.getNonNullable().getFields() : schema.getFields(); if (fields == null || fields.size() == 0) { return outputFieldInfos; } for (Schema.Field subField : fields) { outputFieldInfos.addAll(flattenField(subField, levelToLimitFlattening - 1)); } List<OutputFieldInfo> result = new ArrayList<>(); for (OutputFieldInfo outputFieldInfo : outputFieldInfos) { result.add(OutputFieldInfo.fromChild(outputFieldInfo, field)); } return result; }
Source:
<code>List<Field> transform(final List<MeasurementVariable> measurementVariables) { final List<Field> fields = new LinkedList<>(); for (final MeasurementVariable measurementVariable : measurementVariables) { final Field field = new Field(measurementVariable); if (field.getId() == TermId.OBS_UNIT_ID.getId()) { <START> field.setName(PLOT.concat(" ").concat(field.getName())); <END> } if (field.getId() == TermId.SEASON_VAR.getId()) { field.setName(this.getMessage("label.printing.field.season")); } fields.add(field); } return fields; }</code><technical_language>StringUtils.SPACE</technical_language>

Target:
List<Field> transform(final List<MeasurementVariable> measurementVariables) { final List<Field> fields = new LinkedList<>(); for (final MeasurementVariable measurementVariable : measurementVariables) { final Field field = new Field(measurementVariable); if (field.getId().equals(TermId.OBS_UNIT_ID.getId())) { field.setName(PLOT.concat(StringUtils.SPACE).concat(field.getName())); } if (field.getId().equals(TermId.SEASON_VAR.getId())) { field.setName(this.getMessage("label.printing.field.season")); } fields.add(field); } return fields; }
Source:
<code>public RedisClientFactory(String url, List<String> replicaUrls) throws URISyntaxException { JedisPoolConfig poolConfig = new JedisPoolConfig(); poolConfig.setTestOnBorrow(true); URI redisURI = new URI(url); this.host = redisURI.getHost(); this.port = redisURI.getPort(); this.password = JedisURIHelper.getPassword(redisURI); <START> JedisPool masterPool = new JedisPool(poolConfig, host, port, Protocol.DEFAULT_TIMEOUT, null); <END> List<JedisPool> replicaPools = new LinkedList<>(); for (String replicaUrl : replicaUrls) { URI replicaURI = new URI(replicaUrl); replicaPools.add(new JedisPool(poolConfig, replicaURI.getHost(), replicaURI.getPort(), 500, Protocol.DEFAULT_TIMEOUT, null, Protocol.DEFAULT_DATABASE, null, false, null , null, null)); } this.jedisPool = new ReplicatedJedisPool(masterPool, replicaPools); }</code><technical_language>creating pools include password here? is null</technical_language>

Target:
public RedisClientFactory(String url, List<String> replicaUrls) throws URISyntaxException { JedisPoolConfig poolConfig = new JedisPoolConfig(); poolConfig.setTestOnBorrow(true); URI redisURI = new URI(url); this.host = redisURI.getHost(); this.port = redisURI.getPort(); this.password = JedisURIHelper.getPassword(redisURI); JedisPool masterPool = new JedisPool(poolConfig, redisURI, Protocol.DEFAULT_TIMEOUT); List<JedisPool> replicaPools = new LinkedList<>(); for (String replicaUrl : replicaUrls) { replicaPools.add(new JedisPool(poolConfig, new URI(replicaUrl), 500, Protocol.DEFAULT_TIMEOUT)); } this.jedisPool = new ReplicatedJedisPool(masterPool, replicaPools); }
Source:
<code>public MemoryMappedFileWordList(final RandomAccessFile raf, final boolean caseSensitive, final int cachePercent) throws IOException { super(raf, caseSensitive, cachePercent); final FileChannel channel = file.getChannel(); buffer = channel.map(FileChannel.MapMode.READ_ONLY, 0, channel.size()); final int fileBytes = buffer.capacity(); final int cacheSize = (fileBytes / HUNDRED_PERCENT) * cachePercent; <START> final int cacheOffset = cacheSize == 0 ? fileBytes : cacheSize > fileBytes ? 1 : fileBytes / cacheSize; <END> long pos = 0; String a; String b = null; while (buffer.hasRemaining()) { a = readLine(buffer); if (b != null && comparator.compare(a, b) < 0) { throw new IllegalArgumentException("File is not sorted correctly for this comparator"); } b = a; if (cacheSize > 0 && size % cacheOffset == 0) { cache.put(size, pos); } pos = buffer.position(); size++; } }</code><technical_language>Consider renaming this variable. I study code carefully determine purpose, name help. struggling suggest improvements, consider cacheModulus cacheFrequency</technical_language>

Target:
public MemoryMappedFileWordList(final RandomAccessFile raf, final boolean caseSensitive, final int cachePercent) throws IOException { super(raf, caseSensitive, cachePercent); final FileChannel channel = file.getChannel(); buffer = channel.map(FileChannel.MapMode.READ_ONLY, 0, channel.size()); initialize(cachePercent); }
Source:
<code>public void clear() { for (DimensionProperty p : properties) { <START> if(p!=null) <END> p.clear(); } properties.clear(); }</code><technical_language>Need {}</technical_language>

Target:
public void clear() { for (DimensionProperty p : properties) { if (p != null) { p.clear(); } } properties.clear(); }
Source:
<code>public OpenShiftInternalRuntime getRuntime() throws InfrastructureException { Optional<KubernetesRuntimeState> runtimeStateOpt = runtimeStatuses.get(getIdentity()); String workspaceId = getIdentity().getWorkspaceId(); if (!runtimeStateOpt.isPresent()) { return runtimeFactory.create( this, projectFactory.create(workspaceId), getEnvironment().getWarnings()); } KubernetesRuntimeState runtimeState = runtimeStateOpt.get(); <START> LOG.debug("Restoring runtime in workspace '{}'", runtimeState.getRuntimeId(), workspaceId); <END> OpenShiftInternalRuntime runtime = runtimeFactory.create( this, projectFactory.create(workspaceId, runtimeState.getNamespace()), getEnvironment().getWarnings()); runtime.scheduleRuntimeStateChecks(); return runtime; }</code><technical_language>Please do change in KubernetesInfrastructure</technical_language>

Target:
public OpenShiftInternalRuntime getRuntime() throws InfrastructureException { Optional<KubernetesRuntimeState> runtimeStateOpt = runtimeStatuses.get(getIdentity()); String workspaceId = getIdentity().getWorkspaceId(); if (!runtimeStateOpt.isPresent()) { return runtimeFactory.create( this, projectFactory.create(workspaceId), getEnvironment().getWarnings()); } KubernetesRuntimeState runtimeState = runtimeStateOpt.get(); RuntimeIdentity runtimeId = runtimeState.getRuntimeId(); LOG.debug( "Restoring runtime `{}:{}:{}`", runtimeId.getWorkspaceId(), runtimeId.getEnvName(), runtimeId.getOwnerId()); OpenShiftInternalRuntime runtime = runtimeFactory.create( this, projectFactory.create(workspaceId, runtimeState.getNamespace()), getEnvironment().getWarnings()); runtime.scheduleRuntimeStateChecks(); return runtime; }