auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>public OutputStream decorate(OutputStream logger) throws IOException, InterruptedException { return new LineTransformationOutputStream() { @Override protected void eol(byte[] b, int len) throws IOException { String s = new String(b, 0, len, StandardCharsets.UTF_8); for (String value : values) { s = mask(s, value); } logger.write(s.getBytes(StandardCharsets.UTF_8)); } @Override public void flush() throws IOException { logger.flush(); } @Override public void close() throws IOException { super.close(); logger.close(); } private String mask(String s, String value) { <START> if (value != null && value.length() > 0) { <END> s = s.replace(value, secretReplacement); } return s; } }; }</code><technical_language>suggestion if (!value.isEmpty()) {</technical_language>

Target:
public OutputStream decorate(OutputStream logger) throws IOException, InterruptedException { return new LineTransformationOutputStream() { @Override protected void eol(byte[] b, int len) throws IOException { String s = new String(b, 0, len, StandardCharsets.UTF_8); for (String value : values) { s = s.replace(value, "********"); } logger.write(s.getBytes(StandardCharsets.UTF_8)); } @Override public void flush() throws IOException { logger.flush(); } @Override public void close() throws IOException { super.close(); logger.close(); } }; }
Source:
<code>public void getWorkflowDefinitionByCollectionId_nonValidUUID() throws Exception { String token = getAuthToken(eperson.getEmail(), password); String nonValidUUID = "TestNonValidUUID"; getClient(token).perform(get(WORKFLOW_DEFINITIONS_ENDPOINT + "/search/findByCollection?uuid=" + nonValidUUID)) <START> .andExpect(status().is(HttpStatus.SC_BAD_REQUEST)) <END> .andExpect(status().reason(containsString("Failed to convert " + nonValidUUID))); }</code><technical_language>@MarieVerdonck : This simplified writing .andExpect(status().isBadRequest()); similar code in other in codebase</technical_language>

Target:
public void getWorkflowDefinitionByCollectionId_nonValidUUID() throws Exception { String token = getAuthToken(eperson.getEmail(), password); String nonValidUUID = "TestNonValidUUID"; getClient(token).perform(get(WORKFLOW_DEFINITIONS_ENDPOINT + "/search/findByCollection?uuid=" + nonValidUUID)) .andExpect(status().isBadRequest()) .andExpect(status().reason(containsString("Failed to convert " + nonValidUUID))); }
Source:
<code>public static Boolean containVariantTumorTypeSummary(Integer entrezGeneId, String key) { return (variantTumorTypeSummary.containsKey(entrezGeneId) <START> && variantTumorTypeSummary.get(entrezGeneId).containsKey(key)) ? true : false; <END> }</code><technical_language>containsKey return boolean directly, need ternary expression. do null check "variantTumorTypeSummary.get(entrezGeneId)" call containsKey()</technical_language>

Target:
public static Boolean containVariantTumorTypeSummary(Integer entrezGeneId, String key) { return variantTumorTypeSummary.containsKey(entrezGeneId) && variantTumorTypeSummary.get(entrezGeneId).containsKey(key); }
Source:
<code>public String getActualCpuTopology() { <START> if (actualCpuTopology < 0) { <END> return ConstantsManager.getInstance().getConstants().notAvailableLabel(); } else { return String.valueOf(actualCpuTopology); } }</code><technical_language>< 0? isnt Integer null? (like other fields in vm dynamic)</technical_language>

Target:
public String getActualCpuTopology() { if (actualCpuTopology > 0) { return String.valueOf(actualCpuTopology); } else { return ConstantsManager.getInstance().getConstants().notAvailableLabel(); } }
Source:
<code>public LocalMultiwayProducer(final Operator child, final ExchangePairID[] operatorIDs) { super( child, operatorIDs, new int[] {IPCConnectionPool.SELF_IPC_ID}, <START> new BroadcastDistributeFunction(operatorIDs.length)); <END> }</code><technical_language>this two-arg version of BroadcastDistributeFunction() destination (the current worker)</technical_language>

Target:
public LocalMultiwayProducer(final Operator child, final ExchangePairID[] operatorIDs) { super( child, operatorIDs, new int[] {IPCConnectionPool.SELF_IPC_ID}, new BroadcastDistributeFunction()); this.distributeFunction.setDestinations(1, operatorIDs.length); }
Source:
<code>public boolean visit(LambdaExpression node) { fCurrentMethodsAndLambdas.push(node); <START> return visit((Expression) node); <END> }</code><technical_language>written as: return super.visit(node); for consistency</technical_language>

Target:
public boolean visit(LambdaExpression node) { fCurrentMethodsAndLambdas.push(node); return super.visit(node); }
Source:
<code>private void setUpTimeLockBlockInRuntimeConfig() { <START> when(runtimeConfig.timelockRuntime()).thenReturn(Optional.of(mockTimelockRuntimeConfig)); <END> }</code><technical_language>nit: mockTimelockRuntimeConfig is a mock. Also, a good idea inline this variable</technical_language>

Target:
private void setUpTimeLockBlockInRuntimeConfig() { when(runtimeConfig.timelockRuntime()).thenReturn( Optional.of(ImmutableTimeLockRuntimeConfig.builder() .serversList(rawRemoteServerConfig) .build())); }
Source:
<code>void handleSigInt() { UserConsole.getLogger().info( "Received SIGINT, terminating job (status: {})", executionContext.getCurrentJobStatus() ); executionContext.setJobKilProvenance(ExecutionContext.KillProvenance.SYSTEM_SIGNAL); <START> stateMachine.stop(); <END> }</code><technical_language>Wrong spelling setJobKilProvenance - missing l</technical_language>

Target:
void handleSigInt() { UserConsole.getLogger().info( "Received SIGINT, terminating job (status: {})", executionContext.getCurrentJobStatus() ); executionContext.setJobKillSource(ExecutionContext.KillSource.SYSTEM_SIGNAL); stateMachine.stop(); }
Source:
<code>public static void destroy(Entity e) { if (isManaged(e)) { if (!isReadOnly(e)) { if (e instanceof Startable) Entities.invokeEffector((EntityLocal)e, e, Startable.STOP).getUnchecked(); if (e instanceof EntityInternal) ((EntityInternal)e).destroy(); } unmanage(e); <START> log.debug("destroyed and unmanaged "+e+"; mgmt now "+ <END> (e.getApplicationId()==null ? "(no app)" : e.getApplication().getManagementContext())+" - managed? "+isManaged(e)); } else { log.debug("skipping destroy of "+e+": not managed"); } }</code><technical_language>Message strictly true if isReadOnly true. do need handle isReadOnly in start, above</technical_language>

Target:
public static void destroy(Entity e) { if (isManaged(e)) { if (isReadOnly(e)) { unmanage(e); log.debug("destroyed and unmanaged read-only copy of "+e); } else { if (e instanceof Startable) Entities.invokeEffector((EntityLocal)e, e, Startable.STOP).getUnchecked(); if (e instanceof EntityInternal) ((EntityInternal)e).destroy(); unmanage(e); log.debug("destroyed and unmanaged "+e+"; mgmt now "+ (e.getApplicationId()==null ? "(no app)" : e.getApplication().getManagementContext())+" - managed? "+isManaged(e)); } } else { log.debug("skipping destroy of "+e+": not managed"); } }
Source:
<code>private ConfigurationObject getConfigurationObject(final List<GetResult> resultList) throws ProtocolAdapterException { final DataObject resultData = resultList.get(0).resultData(); LOGGER.info("Configuration object current complex data: {}", this.dlmsHelperService.getDebugInfo(resultData)); final LinkedList<DataObject> linkedList = resultData.value(); final DataObject GprsOperationModeData = linkedList.get(0); GprsOperationModeType gprsOperationMode = null; if (((Number) GprsOperationModeData.value()).longValue() == 1) { gprsOperationMode = GprsOperationModeType.ALWAYS_ON; } else { gprsOperationMode = GprsOperationModeType.TRIGGERED; } final DataObject flagsData = linkedList.get(1); if (flagsData == null) { throw new ProtocolAdapterException("DataObject expected to contain a configuration object is null."); } if (!(flagsData.value() instanceof BitString)) { throw new ProtocolAdapterException("Value in DataObject is not a BitString: " <START> + resultData.value().getClass().getName()); <END> } final byte[] flagByteArray = ((BitString) flagsData.value()).bitString(); return new ConfigurationObject(gprsOperationMode, new ConfigurationFlags( this.configurationObjectHelperService.toConfigurationFlags(flagByteArray))); }</code><technical_language>If jDLMS library return null for resultData.value() (maybe doesn't), this lead a NullPointerException in some cases</technical_language>

Target:
private ConfigurationObject getConfigurationObject(final List<GetResult> resultList) throws ProtocolAdapterException { final DataObject resultData = resultList.get(0).resultData(); LOGGER.info("Configuration object current complex data: {}", this.dlmsHelperService.getDebugInfo(resultData)); final LinkedList<DataObject> linkedList = resultData.value(); if (linkedList == null || linkedList.isEmpty()) { throw new ProtocolAdapterException( "Expected data in result while retrieving current configuration object, but got nothing"); } final DataObject GprsOperationModeData = linkedList.get(0); if (GprsOperationModeData == null) { throw new ProtocolAdapterException( "Expected Gprs operation mode data in result while retrieving current configuration object, but got nothing"); } GprsOperationModeType gprsOperationMode = null; if (((Number) GprsOperationModeData.value()).longValue() == 1) { gprsOperationMode = GprsOperationModeType.ALWAYS_ON; } else if (((Number) GprsOperationModeData.value()).longValue() == 2) { gprsOperationMode = GprsOperationModeType.TRIGGERED; } final DataObject flagsData = linkedList.get(1); if (flagsData == null) { throw new ProtocolAdapterException( "Expected flag bit data in result while retrieving current configuration object, but got nothing"); } if (!(flagsData.value() instanceof BitString)) { throw new ProtocolAdapterException("Value in DataObject is not a BitString: " + resultData.value().getClass().getName()); } final byte[] flagByteArray = ((BitString) flagsData.value()).bitString(); return new ConfigurationObject(gprsOperationMode, new ConfigurationFlags( this.configurationObjectHelperService.toConfigurationFlags(flagByteArray))); }
Source:
<code>protected void executeCommand() { initConnectionList(true); Set<StorageType> storageTypes = Collections.emptySet(); for (Map.Entry<StorageType, List<StorageServerConnections>> connectionToType : getConnectionsTypeMap().entrySet()) { disconnectStorageByType(connectionToType.getKey(), connectionToType.getValue()); <START> storageTypes.add(connectionToType.getKey()); <END> } for (StorageType storageType : storageTypes) { if (!StorageHelperDirector.getInstance().getItem(storageType).disconnectHostFromStoragePoolServersCommandCompleted(getParameters())) { auditLogDirector.log(new AuditLogableBase(getParameters().getVdsId()), AuditLogType.FAILED_TO_REGISTER_LIBVIRT_SECRET_ON_VDS); } } }</code><technical_language>add element Collections.emptySet() ? Regadless - this is redundant - do need loops</technical_language>

Target:
protected void executeCommand() { initConnectionList(true); Set<StorageType> storageTypes = new HashSet<StorageType>(); for (Map.Entry<StorageType, List<StorageServerConnections>> connectionToType : getConnectionsTypeMap().entrySet()) { disconnectStorageByType(connectionToType.getKey(), connectionToType.getValue()); if (!storageTypes.contains(connectionToType.getKey())) { storageTypes.add(connectionToType.getKey()); if (!StorageHelperDirector.getInstance().getItem(connectionToType.getKey()).disconnectHostFromStoragePoolServersCommandCompleted(getParameters())) { auditLogDirector.log(new AuditLogableBase(getParameters().getVdsId()), AuditLogType.FAILED_TO_REGISTER_LIBVIRT_SECRET_ON_VDS); } } } }
Source:
<code>private Map<DisplayType, VmDeviceType> parseDisplayProtocols(int osId, Version version) { Map<DisplayType, VmDeviceType> parseDisplayProtocols = new HashMap<DisplayType, VmDeviceType>(); String displayProtocolValue = getValueByVersion(idToUnameLookup.get(osId), "displayProtocols", version); if (displayProtocolValue != null) { <START> String[] displayProtocolList = displayProtocolValue.split(","); <END> if (displayProtocolList != null && displayProtocolList.length > 0) { for (String displayProtocol : displayProtocolList) { String[] displayProtocolSplit = displayProtocol.split("/"); if (displayProtocolSplit != null && displayProtocolSplit.length == 2) { DisplayType displayType = DisplayType.valueOf(displayProtocolSplit[0].trim()); VmDeviceType vmDeviceType = VmDeviceType.getByName(displayProtocolSplit[1].trim()); if (displayType != null && vmDeviceType != null) { parseDisplayProtocols.put(displayType, vmDeviceType); } } } } } return parseDisplayProtocols; }</code><technical_language>pls forEach loose unneeded boilerplate for (String candidate : displayProtocol.split(",")) { Pair<String, String> pairts = parseDisplayProtocol(candidate) // Pair cleaner .... rest } parseDisplayProtocol(String candidate) { ... similar }</technical_language>

Target:
private Map<DisplayType, VmDeviceType> parseDisplayProtocols(int osId, Version version) { Map<DisplayType, VmDeviceType> parseDisplayProtocols = new HashMap<DisplayType, VmDeviceType>(); String displayProtocolValue = getValueByVersion(idToUnameLookup.get(osId), "displayProtocols", version); for (String displayProtocol : displayProtocolValue.split(",")) { Pair<String, String> pairs = parseDisplayProtocol(displayProtocol); if (pairs != null) { parseDisplayProtocols.put(DisplayType.valueOf(pairs.getFirst()), VmDeviceType.getByName(pairs.getSecond())); } } return parseDisplayProtocols; }
Source:
<code>private void logFeedback(String feedbackText, String userResponse, String fileName) { Boolean wasGoodReminder; <START> if (userResponse.equals("yes")) { <END> wasGoodReminder = true; } else { wasGoodReminder = false; } ObaAnalytics.reportDestinationReminderFeedback(mFirebaseAnalytics, wasGoodReminder , ((!isEmpty(feedbackText))? feedbackText : null), fileName); Log.d (TAG, "User feedback logged to Firebase Analytics :: wasGoodReminder - " + wasGoodReminder + ", feedbackText - " + ((!isEmpty(feedbackText))? feedbackText : null) + ", filename - " + fileName); }</code><technical_language>please change this hard-coded string a constant, in donottranslate.xml</technical_language>

Target:
private void logFeedback(String feedbackText, String userResponse, String fileName) { Boolean wasGoodReminder; if (userResponse.equals(Application.get().getString(R.string.analytics_label_destination_reminder_yes))) { wasGoodReminder = true; } else { wasGoodReminder = false; } ObaAnalytics.reportDestinationReminderFeedback(mFirebaseAnalytics, wasGoodReminder , ((!isEmpty(feedbackText))? feedbackText : null), fileName); Log.d (TAG, "User feedback logged to Firebase Analytics :: wasGoodReminder - " + wasGoodReminder + ", feedbackText - " + ((!isEmpty(feedbackText))? feedbackText : null) + ", filename - " + fileName); }
Source:
<code>private ConfigEntry.ConfigType configType(DescribeConfigsResponse.ConfigType type) { if (type == null) { return ConfigEntry.ConfigType.UNKNOWN; } ConfigEntry.ConfigType configType; switch (type) { case BOOLEAN: configType = ConfigEntry.ConfigType.BOOLEAN; break; case CLASS: configType = ConfigEntry.ConfigType.CLASS; break; case DOUBLE: configType = ConfigEntry.ConfigType.DOUBLE; break; case INT: configType = ConfigEntry.ConfigType.INT; break; case LIST: configType = ConfigEntry.ConfigType.LIST; break; case LONG: configType = ConfigEntry.ConfigType.LONG; break; case PASSWORD: configType = ConfigEntry.ConfigType.PASSWORD; break; case SHORT: configType = ConfigEntry.ConfigType.SHORT; break; case STRING: configType = ConfigEntry.ConfigType.STRING; break; case UNKNOWN: configType = ConfigEntry.ConfigType.UNKNOWN; break; default: <START> throw new IllegalArgumentException("Unexpected config type " + type); <END> } return configType; }</code><technical_language>this return UNKNOWN a type in a new version client about</technical_language>

Target:
private ConfigEntry.ConfigType configType(DescribeConfigsResponse.ConfigType type) { if (type == null) { return ConfigEntry.ConfigType.UNKNOWN; } ConfigEntry.ConfigType configType; switch (type) { case BOOLEAN: configType = ConfigEntry.ConfigType.BOOLEAN; break; case CLASS: configType = ConfigEntry.ConfigType.CLASS; break; case DOUBLE: configType = ConfigEntry.ConfigType.DOUBLE; break; case INT: configType = ConfigEntry.ConfigType.INT; break; case LIST: configType = ConfigEntry.ConfigType.LIST; break; case LONG: configType = ConfigEntry.ConfigType.LONG; break; case PASSWORD: configType = ConfigEntry.ConfigType.PASSWORD; break; case SHORT: configType = ConfigEntry.ConfigType.SHORT; break; case STRING: configType = ConfigEntry.ConfigType.STRING; break; default: configType = ConfigEntry.ConfigType.UNKNOWN; } return configType; }
Source:
<code>public void onNext(final AggregationMessage aggregationMessage) { final AvroClockMsg rcvMsg = codec.decode(aggregationMessage.getData().array()); final String workerId = aggregationMessage.getSourceId().toString(); switch (rcvMsg.getType()) { case RequestInitClockMsg: final int workerClock = initializeWorkerClock(workerId); final byte[] data = codec.encode(getReplyInitialClockMessage(globalMinimumClock, workerClock)); int retryCount = 0; while (true) { if (retryCount++ > MAXIMUM_RETRY_COUNTS) { throw new RuntimeException(String.format("Sending initialization message to %s has failed %d times", workerId, MAXIMUM_RETRY_COUNTS + 1)); } try { aggregationMaster.send(AGGREGATION_CLIENT_NAME, workerId, data); break; } catch (final NetworkException e) { LOG.log(Level.INFO, String.format("ClockManager failed to send initialization message to %s", workerId), e); } } break; case TickMsg: tickClock(workerId); break; case NetworkWaitingTimeMsg: <START> LOG.entering(ClockManager.MessageHandler.class.getSimpleName(), "onNext"); <END> LOG.log(Level.INFO, "Total network waiting time for clock of {0}: {1}", new Object[]{workerId, rcvMsg.getNetworkWaitingTimeMsg()}); LOG.exiting(ClockManager.MessageHandler.class.getSimpleName(), "onNext"); break; default: throw new RuntimeException("Unexpected message type: " + rcvMsg.getType().toString()); } }</code><technical_language>This log irrelevant location. move this line L242 remove this. for L272</technical_language>

Target:
public void onNext(final AggregationMessage aggregationMessage) { final AvroClockMsg rcvMsg = codec.decode(aggregationMessage.getData().array()); final String workerId = aggregationMessage.getSourceId().toString(); switch (rcvMsg.getType()) { case RequestInitClockMsg: final int workerClock = initializeWorkerClock(workerId); final byte[] data = codec.encode(getReplyInitialClockMessage(globalMinimumClock, workerClock)); int retryCount = 0; while (true) { if (retryCount++ > MAXIMUM_RETRY_COUNTS) { throw new RuntimeException(String.format("Sending initialization message to %s has failed %d times", workerId, MAXIMUM_RETRY_COUNTS + 1)); } try { aggregationMaster.send(AGGREGATION_CLIENT_NAME, workerId, data); break; } catch (final NetworkException e) { LOG.log(Level.INFO, String.format("ClockManager failed to send initialization message to %s", workerId), e); } } break; case TickMsg: tickClock(workerId); break; default: throw new RuntimeException("Unexpected message type: " + rcvMsg.getType().toString()); } }
Source:
<code>public void exceptionCaught(ChannelHandlerContext ctx, Throwable thr) { if (thr.getCause() instanceof IllegalArgumentException) { <START> if ("empty text".equals(thr.getCause().getMessage())) { <END> } else { log.error(thr.getCause().getMessage(), thr.getCause()); } } else if (thr.getCause() instanceof TooLongFrameException) { log.warn(String.format("Long frame from %s", ctx.channel().remoteAddress())); HttpResponder.respond(ctx, null, HttpResponseStatus.BAD_REQUEST); } else { log.warn("Exception event received: ", thr); } }</code><technical_language>wonderful! :-P I fine there, if message changes (like versions) break</technical_language>

Target:
public void exceptionCaught(ChannelHandlerContext ctx, Throwable thr) { if (thr.getCause() instanceof TooLongFrameException) { log.warn(String.format("Long frame from %s", ctx.channel().remoteAddress())); HttpResponder.respond(ctx, null, HttpResponseStatus.BAD_REQUEST); } else { log.warn(String.format("Exception event received from %s: ", ctx.channel().remoteAddress()), thr); } }
Source:
<code>public static Context updateContext(Context context, String language) { final Locale newLocale = LocaleParser.findBestMatchingLocaleForLanguage(language); Locale.setDefault(newLocale); final Resources resources = context.getResources(); final Configuration config = resources.getConfiguration(); final Configuration newConfig = copyWithNewLocale(config, newLocale); if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) { return context.createConfigurationContext(newConfig); } else { <START> resources.updateConfiguration(newConfig, resources.getDisplayMetrics()); <END> return context; } }</code><technical_language>"deprecated of API 25": 'updateConfiguration(android.content.res.Configuration, android.util.DisplayMetrics)' is deprecated of API 25: Android 7.1.1 (Nougat) 24, I thought min api level of createConfigurationContext <= 19. is a reason createConfigurationContext</technical_language>

Target:
public static Context updateContext(Context context, String language) { final Locale newLocale = LocaleParser.findBestMatchingLocaleForLanguage(language); Locale.setDefault(newLocale); final Resources resources = context.getResources(); final Configuration config = resources.getConfiguration(); final Configuration newConfig = copyWithNewLocale(config, newLocale); return context.createConfigurationContext(newConfig); }
Source:
<code>protected PlotSeriesDto generatePlotSeriesDto(MetricDto metricDto) { double yMinimum = Double.MAX_VALUE; List<PointDto> list = new ArrayList<PointDto>(); List<MetricValueDto> metricList = new ArrayList<MetricValueDto>(); for(MetricValueDto value :metricDto.getValues()) { metricList.add(value); } Collections.sort(metricList, new Comparator<MetricValueDto>() { @Override public int compare(MetricValueDto o1, MetricValueDto o2) { <START> if (o2.getSessionId() < o1.getSessionId()) { <END> return 1; } else { return -1; } } }); for (MetricValueDto value: metricList) { double temp = Double.parseDouble(value.getValue()); list.add(new PointDto(value.getSessionId(), temp)); if (yMinimum == Double.MAX_VALUE || temp < yMinimum) yMinimum = temp; } String legend = metricDto.getMetricName().getMetricDisplayName(); PlotDatasetDto pdd = new PlotDatasetDto( list, legend, ColorCodeGenerator.getHexColorCode() ); StringBuilder headerBuilder = new StringBuilder(); headerBuilder.append(metricDto.getMetricName().getTest().getTaskName()). append(", "). append(metricDto.getMetricName().getMetricName()); PlotSeriesDto psd = new PlotSeriesDto( Arrays.asList(pdd), "Sessions" , metricDto.getMetricName().getMetricName(), headerBuilder.toString() ); psd.setYAxisMin(yMinimum); return psd; }</code><technical_language>return o2.getSessionId().compareTo(o1.getSessionId())</technical_language>

Target:
protected PlotSeriesDto generatePlotSeriesDto(MetricDto metricDto) { double yMinimum = Double.MAX_VALUE; List<PointDto> list = new ArrayList<PointDto>(); List<MetricValueDto> metricList = new ArrayList<MetricValueDto>(); for(MetricValueDto value :metricDto.getValues()) { metricList.add(value); } Collections.sort(metricList, new Comparator<MetricValueDto>() { @Override public int compare(MetricValueDto o1, MetricValueDto o2) { return o2.getSessionId() < o1.getSessionId() ? 1 : -1; } }); for (MetricValueDto value: metricList) { double temp = Double.parseDouble(value.getValue()); list.add(new PointDto(value.getSessionId(), temp)); if (yMinimum == Double.MAX_VALUE || temp < yMinimum) yMinimum = temp; } String legend = metricDto.getMetricName().getMetricDisplayName(); PlotDatasetDto pdd = new PlotDatasetDto( list, legend, ColorCodeGenerator.getHexColorCode() ); StringBuilder headerBuilder = new StringBuilder(); headerBuilder.append(metricDto.getMetricName().getTest().getTaskName()). append(", "). append(metricDto.getMetricName().getMetricName()); PlotSeriesDto psd = new PlotSeriesDto( Arrays.asList(pdd), "Sessions" , metricDto.getMetricName().getMetricName(), headerBuilder.toString() ); psd.setYAxisMin(yMinimum); return psd; }
Source:
<code>public Element getElement(Object node) { if (node == null) { return null; } EObject notationElement = getNativeWidget(node); <START> CSSDOMSemanticElementHelper helper = new CSSDOMSemanticElementHelper(); <END> View canonicalNotationElement = helper.findPrimaryView(notationElement); if (canonicalNotationElement.getDiagram() == null) { return null; } return super.getElement(canonicalNotationElement); }</code><technical_language>I CSSDOMSemanticElemntHelper Singleton</technical_language>

Target:
public Element getElement(Object node) { if (node == null) { return null; } EObject notationElement = getNativeWidget(node); View canonicalNotationElement = CSSDOMSemanticElementHelper.getInstance().findPrimaryView(notationElement); if (canonicalNotationElement.getDiagram() == null) { return null; } return super.getElement(canonicalNotationElement); }
Source:
<code>public void setCurrentGroupExprData(Expression expr, Object obj) { Integer index = exprToIndexInGroupByData.get(expr); if (index != null) { if (currentGroupByExprData[index] != null) { throw DbException.throwInternalError(); <START> } <END> currentGroupByExprData[index] = obj; return; } index = exprToIndexInGroupByData.size(); exprToIndexInGroupByData.put(expr, index); if (index >= currentGroupByExprData.length) { currentGroupByExprData = Arrays.copyOf(currentGroupByExprData, currentGroupByExprData.length * 2); if (currentGroupsKey != null) { groupByData.put(currentGroupsKey, currentGroupByExprData); } } currentGroupByExprData[index] = obj; }</code><technical_language>assert instead. existing callers of this method ensure current is null theirself</technical_language>

Target:
public void setCurrentGroupExprData(Expression expr, Object obj) { Integer index = exprToIndexInGroupByData.get(expr); if (index != null) { assert currentGroupByExprData[index] == null; currentGroupByExprData[index] = obj; return; } index = exprToIndexInGroupByData.size(); exprToIndexInGroupByData.put(expr, index); if (index >= currentGroupByExprData.length) { currentGroupByExprData = Arrays.copyOf(currentGroupByExprData, currentGroupByExprData.length * 2); if (currentGroupsKey != null) { groupByData.put(currentGroupsKey, currentGroupByExprData); } } currentGroupByExprData[index] = obj; }
Source:
<code><START> public String getProviderUrl() { <END> return redirectUrl; }</code><technical_language>This is a super nitpick changed name of this method getProviderUrl change redirectUrl variables providerUrl</technical_language>

Target:
public String getProviderUrl() { return providerUrl; }
Source:
<code>public List<Double> getAttributeAsDoubleList(String key, Double defaultValue) { return getAttributeAsList(key, x -> { if (x == null || x == VCFConstants.MISSING_VALUE_v4) { return defaultValue; } else if (x instanceof Double) { return (Double) x; } else { <START> return Double.valueOf((String)x); END> } } ); }</code><technical_language>question double[]</technical_language>

Target:
public List<Double> getAttributeAsDoubleList(String key, Double defaultValue) { return getAttributeAsList(key, x -> { if (x == null || x == VCFConstants.MISSING_VALUE_v4) { return defaultValue; } else if (x instanceof Number) { return ((Number) x).doubleValue(); } else { return Double.valueOf((String)x); } }); }
Source:
<code>public static ArrayList<VmNetworkInterface> buildVmNetworkInterfacesFromDevices(Map<String, Object> vmStruct) { ArrayList<VmNetworkInterface> nics = new ArrayList<>(); Object[] devices = (Object[]) vmStruct.get("devices"); if (devices != null) { for (Object device : devices) { Map<String, Object> deviceMap = (Map<String, Object>) device; if (VdsProperties.VM_INTERFACE_DEVICE_TYPE.equals(deviceMap.get(VdsProperties.Type))) { VmNetworkInterface nic = new VmNetworkInterface(); <START> nic.setId(deviceMap.get(VdsProperties.DeviceId) != null ? new Guid((String)deviceMap.get(VdsProperties.DeviceId)) : null); <END> nic.setMacAddress((String) deviceMap.get(VdsProperties.MAC_ADDR)); nic.setName((String) deviceMap.get(VdsProperties.Name)); nic.setNetworkName((String) deviceMap.get(VdsProperties.NETWORK)); nic.setType(VmInterfaceType.valueOf((String) deviceMap.get(VdsProperties.NIC_TYPE)).getValue()); if (deviceMap.containsKey(VdsProperties.Model)) { String model = (String) deviceMap.get(VdsProperties.Model); for (VmInterfaceType type : VmInterfaceType.values()) { if (model.equals(type.getInternalName())) { nic.setType(type.getValue()); break; } } } nics.add(nic); } } } return nics; }</code><technical_language>createGuidFromString(candidate) instead of new Guid... handle null - line is longer 120 chars (notice dashed line), split line. shorter 100 is better</technical_language>

Target:
public static ArrayList<VmNetworkInterface> buildVmNetworkInterfacesFromDevices(Map<String, Object> vmStruct) { ArrayList<VmNetworkInterface> nics = new ArrayList<>(); Object[] devices = (Object[]) vmStruct.get(VdsProperties.Devices); if (devices != null) { for (Object device : devices) { Map<String, Object> deviceMap = (Map<String, Object>) device; if (VdsProperties.VM_INTERFACE_DEVICE_TYPE.equals(deviceMap.get(VdsProperties.Type))) { VmNetworkInterface nic = new VmNetworkInterface(); nic.setId(Guid.createGuidFromString((String)deviceMap.get(VdsProperties.DeviceId))); nic.setMacAddress((String) deviceMap.get(VdsProperties.MAC_ADDR)); nic.setName((String) deviceMap.get(VdsProperties.Name)); nic.setNetworkName((String) deviceMap.get(VdsProperties.NETWORK)); nic.setType(VmInterfaceType.valueOf((String) deviceMap.get(VdsProperties.NIC_TYPE)).getValue()); if (deviceMap.containsKey(VdsProperties.Model)) { String model = (String) deviceMap.get(VdsProperties.Model); for (VmInterfaceType type : VmInterfaceType.values()) { if (model.equals(type.getInternalName())) { nic.setType(type.getValue()); break; } } } nics.add(nic); } } } return nics; }
Source:
<code>public void reportTaskResult(TaskResult taskResult) throws JMSException { TextMessage message = session.createTextMessage("taskresult:" + propertiesBean.getProperty("engine.unique.id") + ":" + taskResult.serializeToString()); synchronized(producer) { producer.send(message, DeliveryMode.PERSISTENT, 2, 0); } <START> log.debug("[{}] TaskResult for destination sent to dispatcher.", taskResult.getTaskId(), <END> taskResult.getDestinationId()); }</code><technical_language>Please in info level</technical_language>

Target:
public void reportTaskResult(TaskResult taskResult) throws JMSException { TextMessage message = session.createTextMessage("taskresult:" + propertiesBean.getProperty("engine.unique.id") + ":" + taskResult.serializeToString()); synchronized(producer) { producer.send(message, DeliveryMode.PERSISTENT, 2, 0); } log.info("[{}] TaskResult for destination sent to dispatcher.", taskResult.getTaskId(), taskResult.getDestinationId()); }
Source:
<code>private static void processFile(File file, final CommandContext cmdCtx) throws IOException { try ( BufferedReader reader = new BufferedReader(new FileReader(file))) { String line = reader.readLine(); while (cmdCtx.getExitCode() == 0 && !cmdCtx.isTerminated() && line != null) { LOGGER.debug("Executing command " + line.trim()); cmdCtx.handle(line.trim()); line = reader.readLine(); } } catch (Throwable e) { <START> LOGGER.error("Unexpected exception processing commands ", e); <END> throw new IllegalStateException("Failed to process file '" + file.getAbsolutePath() + "'", e); } String warnFile = WildFlySecurityManager.getPropertyPrivileged("org.wildfly.internal.cli.boot.hook.script.warn.file", null); if (warnFile != null) { File warns = new File(warnFile); if (warns.exists()) { for (String line : Files.readAllLines(warns.toPath())) { LOGGER.warn(line); } } } String errorFile = WildFlySecurityManager.getPropertyPrivileged("org.wildfly.internal.cli.boot.hook.script.error.file", null); if (errorFile != null) { File errors = new File(errorFile); if (errors.exists()) { LOGGER.error("Error applying " + file + " CLI script. The Operations were executed but " + "there were unexpected values. See list of errors in " + errors); for (String line : Files.readAllLines(errors.toPath())) { LOGGER.error(line); } } } if (cmdCtx.getExitCode() != 0 || cmdCtx.isTerminated()) { throw new RuntimeException("Error applying " + file + " CLI script."); } }</code><technical_language>error log i18ned</technical_language>

Target:
private static void processFile(File file, final CommandContext cmdCtx) throws IOException { try ( BufferedReader reader = new BufferedReader(new FileReader(file))) { String line = reader.readLine(); while (cmdCtx.getExitCode() == 0 && !cmdCtx.isTerminated() && line != null) { ROOT_LOGGER.executeCommand(line.trim()); cmdCtx.handle(line.trim()); line = reader.readLine(); } } catch (Throwable e) { throw ROOT_LOGGER.unexpectedException(e, file); } String warnFile = WildFlySecurityManager.getPropertyPrivileged("org.wildfly.internal.cli.boot.hook.script.warn.file", null); if (warnFile != null) { File warns = new File(warnFile); if (warns.exists()) { StringBuilder warnBuilder = new StringBuilder(); for (String line : Files.readAllLines(warns.toPath())) { warnBuilder.append(line).append("\n"); } ROOT_LOGGER.warn(warnBuilder.toString()); } } String errorFile = WildFlySecurityManager.getPropertyPrivileged("org.wildfly.internal.cli.boot.hook.script.error.file", null); if (errorFile != null) { File errors = new File(errorFile); if (errors.exists()) { ROOT_LOGGER.unexpectedErrors(file, errors); StringBuilder errorBuilder = new StringBuilder(); for (String line : Files.readAllLines(errors.toPath())) { errorBuilder.append(line).append("\n"); } ROOT_LOGGER.error(errorBuilder.toString()); } } if (cmdCtx.getExitCode() != 0 || cmdCtx.isTerminated()) { throw new RuntimeException("Error applying " + file + " CLI script."); } }
Source:
<code>public void setProducer(final Producer producer) { <END> }</code><technical_language>subscriber producer emit if request too</technical_language>

Target:
public void setProducer(final Producer producer) { producer.request(Long.MAX_VALUE); }
Source:
<code>private LinkedHashSet<TypeaheadSearchResp> getMatch(Map<String, Set<Gene>> map, List<String> keywords, Boolean exactMatch) { LinkedHashSet<TypeaheadSearchResp> result = new LinkedHashSet<>(); if (map == null || keywords == null) { return result; } if (exactMatch == null) exactMatch = false; for (Map.Entry<String, Set<Gene>> entry : map.entrySet()) { if (entry.getValue().size() > 0) { for (Gene gene : entry.getValue()) { Set<Alteration> alterations = AlterationUtils.getAllAlterations(gene); <START> for (String keyword : keywords) { <END> if (!keyword.equals(entry.getKey())) result.addAll(convertVariant(AlterationUtils.lookupVariant(keyword, exactMatch, alterations), keyword)); } } } } return result; }</code><technical_language>function name "getMatch", if statement "!"</technical_language>

Target:
private LinkedHashSet<TypeaheadSearchResp> getMatch(Map<String, Set<Gene>> map, List<String> keywords, Boolean exactMatch) { LinkedHashSet<TypeaheadSearchResp> result = new LinkedHashSet<>(); if (map == null || keywords == null) { return result; } if (exactMatch == null) exactMatch = false; for (Map.Entry<String, Set<Gene>> entry : map.entrySet()) { if (entry.getValue().size() > 0) { for (Gene gene : entry.getValue()) { Set<Alteration> alterations = AlterationUtils.getAllAlterations(gene); if (keywords.size() > 2) { Set<Alteration> keywordsMatches = null; for (String keyword : keywords) { if (!keyword.equals(entry.getKey())) { List<Alteration> matches = AlterationUtils.lookupVariant(keyword, exactMatch, alterations); if (matches != null) { if (keywordsMatches == null) { keywordsMatches = new HashSet<>(); keywordsMatches.addAll(matches); } else { List<Alteration> intersection = (List<Alteration>) CollectionUtils.intersection(keywordsMatches, matches); keywordsMatches = new HashSet<>(); keywordsMatches.addAll(intersection); } } } } result.addAll(convertVariant(new ArrayList<>(keywordsMatches), "")); } else { for (String keyword : keywords) { if (!keyword.equals(entry.getKey())) result.addAll(convertVariant(AlterationUtils.lookupVariant(keyword, exactMatch, alterations), keyword)); } } } } } return result; }
Source:
<code>void done(K key, T value) throws PromiseResolvedException; void fail(K key, Throwable error) throws PromiseResolvedException; void failAll(Throwable error) throws PromiseResolvedException; boolean failAllRemaining(Throwable error); Collection<BatchEntry<T>> values(); <START> Set<Map.Entry<K, BatchEntry<T>>> entires(); <END> static <K, T> BatchBuilder<K, T> builder() { return new BatchBuilder<>(); }</code><technical_language>do expose those</technical_language>

Target:
void done(K key, T value) throws PromiseResolvedException; void fail(K key, Throwable error) throws PromiseResolvedException; int failAll(Throwable error); Collection<BatchEntry<T>> values(); Set<Map.Entry<K, BatchEntry<T>>> entries(); static <K, T> BatchBuilder<K, T> builder() { return new BatchBuilder<>(); }
Source:
<code><START> public void setExecutor(StripedExecutorService executor) { <END> this.executor = executor; }</code><technical_language>prevent setting executor while connector is running? get concurrency issues hasInternalExecutor flag. Is necessary this setter instead of setting in constructor? executor field final. atm accessing executor threads locking making volatile</technical_language>

Target:
public final synchronized void setExecutor(StripedExecutorService executor) { if (running.get()) { throw new IllegalStateException("cannot set executor while connector is running"); } else { this.executor = executor; } }
Source:
<code>protected <T> T list(Class<T> clazz) { <START> return get(clazz,uri("/artifacts/"+ artifactType.value())).execute(); <END> }</code><technical_language>add path /artifacts/ <LINK_0> reference instead? search&replace in other methods</technical_language>

Target:
protected <T> T list(Class<T> clazz) { return get(clazz,uri(PATH_ARTIFACTS+URI_SEP+ artifactType.value())).execute(); }
Source:
<code>public void afterUpdate(boolean isUpdateSucceeded) { if (!isUpdateSucceeded && newBlobID != null) { try { logger.info("Removing blob " + newBlobID + " since the update failed"); router.get().deleteBlob(newBlobID, SERVICE_ID).get(); } catch (Exception e) { logger.error("Failed to delete blob={} because of {}", newBlobID, e); accountServiceMetrics.accountDeletesToAmbryServerErrorCount.inc(); } } if (isUpdateSucceeded && oldBlobIDsToDelete != null) { for (String blobID : oldBlobIDsToDelete) { try { logger.info("Removing blob " + blobID); router.get().deleteBlob(blobID, SERVICE_ID).get(); } catch (Exception e) { <START> logger.error("Failed to delete blob={} because of {}", blobID, e); <END> accountServiceMetrics.accountDeletesToAmbryServerErrorCount.inc(); } } } }</code><technical_language>minor: out {}. Otherwise, exception message in log instead of stack trace</technical_language>

Target:
public void afterUpdate(boolean isUpdateSucceeded) { if (!isUpdateSucceeded && newBlobID != null) { try { logger.info("Removing blob " + newBlobID + " since the update failed"); router.get().deleteBlob(newBlobID, SERVICE_ID).get(); } catch (Exception e) { logger.error("Failed to delete blob=" + newBlobID, e); accountServiceMetrics.accountDeletesToAmbryServerErrorCount.inc(); } } if (isUpdateSucceeded && oldBlobIDsToDelete != null) { for (String blobID : oldBlobIDsToDelete) { try { logger.info("Removing blob " + blobID); router.get().deleteBlob(blobID, SERVICE_ID).get(); } catch (Exception e) { logger.error("Failed to delete blob=" + blobID, e); accountServiceMetrics.accountDeletesToAmbryServerErrorCount.inc(); } } } }
Source:
<code>private KItem(Term kLabel, Term kList, TermContext termContext, Tool tool) { super(Kind.KITEM); this.kLabel = kLabel; this.kList = kList; Definition definition = termContext.definition(); if (kLabel instanceof KLabelConstant && kList instanceof KList && !((KList) kList).hasFrame()) { KLabelConstant kLabelConstant = (KLabelConstant) kLabel; CacheTableColKey cacheTabColKey = null; CacheTableValue cacheTabVal = null; boolean enableCache = (tool != Tool.KOMPILE) && definition.sortPredicateRulesOn(kLabelConstant).isEmpty(); if (enableCache) { cacheTabColKey = new CacheTableColKey(kLabelConstant, (KList) kList); <START> cacheTabVal = definition.SORT_CACHE_TABLE.get(cacheTabColKey); <END> if (cacheTabVal != null) { sort = cacheTabVal.sort; isExactSort = cacheTabVal.isExactSort; possibleSorts = cacheTabVal.possibleSorts; return; } } cacheTabVal = computeSort(kLabelConstant, (KList) kList, termContext, tool); if (enableCache) { definition.SORT_CACHE_TABLE.put(cacheTabColKey, cacheTabVal); } sort = cacheTabVal.sort; isExactSort = cacheTabVal.isExactSort; possibleSorts = cacheTabVal.possibleSorts; } else { if (kLabel instanceof KLabelInjection) { assert kList.equals(KList.EMPTY); isExactSort = true; } else { isExactSort = false; } sort = kind.asSort(); possibleSorts = Collections.singleton(sort); } }</code><technical_language>I prefer expose this map KItem</technical_language>

Target:
private KItem(Term kLabel, Term kList, TermContext termContext, Tool tool) { super(Kind.KITEM); this.kLabel = kLabel; this.kList = kList; Definition definition = termContext.definition(); if (kLabel instanceof KLabelConstant && kList instanceof KList && !((KList) kList).hasFrame()) { KLabelConstant kLabelConstant = (KLabelConstant) kLabel; CacheTableColKey cacheTabColKey = null; CacheTableValue cacheTabVal = null; boolean enableCache = (tool != Tool.KOMPILE) && definition.sortPredicateRulesOn(kLabelConstant).isEmpty(); if (enableCache) { cacheTabColKey = new CacheTableColKey(kLabelConstant, (KList) kList); cacheTabVal = definition.getSortCacheTable().get(cacheTabColKey); if (cacheTabVal != null) { sort = cacheTabVal.sort; isExactSort = cacheTabVal.isExactSort; possibleSorts = cacheTabVal.possibleSorts; return; } } cacheTabVal = computeSort(kLabelConstant, (KList) kList, termContext, tool); if (enableCache) { definition.getSortCacheTable().put(cacheTabColKey, cacheTabVal); } sort = cacheTabVal.sort; isExactSort = cacheTabVal.isExactSort; possibleSorts = cacheTabVal.possibleSorts; } else { if (kLabel instanceof KLabelInjection) { assert kList.equals(KList.EMPTY); isExactSort = true; } else { isExactSort = false; } sort = kind.asSort(); possibleSorts = Collections.singleton(sort); } }
Source:
<code>public String etagFor(EnvironmentConfig entityFromServer) { <START> if (entityFromServer instanceof MergeEnvironmentConfig || entityFromServer instanceof UnknownEnvironmentConfig) { <END> return md5Hex(valueOf(hash(entityFromServer))); } return entityHashingService.md5ForEntity(entityFromServer); }</code><technical_language>this logic entityHashingService.md5ForEntity(EnvironmentConfig)? md5Hex computation logic 2 places. moreover, controller logic of etag computation</technical_language>

Target:
public String etagFor(EnvironmentConfig entityFromServer) { return entityHashingService.md5ForEntity(entityFromServer); }
Source:
<code>private void mergeProperties(Properties properties, Map<String, String> configurationMap) { if (properties != null) { <START> for (final String name : properties.stringPropertyNames()) <END> if (!configurationMap.containsKey(name)) { configurationMap.put(name, properties.getProperty(name)); } } }</code><technical_language>Please add braces surrounding for loop block. this is confusing read</technical_language>

Target:
private static void mergeProperties(Properties properties, Map<String, String> configurationMap) { if (properties != null) { for (final String name : properties.stringPropertyNames()) { if (!configurationMap.containsKey(name)) { configurationMap.put(name, properties.getProperty(name)); } } } }
Source:
<code>public static void main(String[] args) { System.out.println(" +----------------------------------------------+"); System.out.println(" | XBee Java Library Handle IO Samples Sample |"); System.out.println(" +----------------------------------------------+\n"); XBeeDevice localDevice = new XBeeDevice(PORT, BAUD_RATE); try { localDevice.open(); RemoteXBeeDevice remoteDevice = new RemoteXBeeDevice(localDevice, REMOTE_64_BIT_ADDRESS); <START> remoteDevice.setDestinationAddress(localDevice.get64BitAddress()); <END> remoteDevice.setIOConfiguration(IOLINE_IN, IOMode.DIGITAL_IN); remoteDevice.setDIOChangeDetection(CHANGE_DETECTION_MASK); remoteDevice.setIOSamplingRate(IO_SAMPLING_RATE); localDevice.startListeningForIOSamples(new IIOSampleReceiveListener() { @Override public void ioSampleReceived(IOSample ioSample, RemoteXBeeDevice remoteDevice) { System.out.println("New sample received from " + remoteDevice.get64BitAddress() + " >> " + IOLINE_IN + ": " + ioSample.getDigitalValue(IOLINE_IN)); } }); } catch (XBeeException e) { e.printStackTrace(); localDevice.close(); System.exit(1); } }</code><technical_language>discuss adding a new method changing this set a Device destination instead of address. Rest of methods (send methods) destination a Device. consistent, ask @perezdeheredia</technical_language>

Target:
public static void main(String[] args) { System.out.println(" +----------------------------------------------+"); System.out.println(" | XBee Java Library Handle IO Samples Sample |"); System.out.println(" +----------------------------------------------+\n"); XBeeDevice localDevice = new XBeeDevice(PORT, BAUD_RATE); try { localDevice.open(); RemoteXBeeDevice remoteDevice = new RemoteXBeeDevice(localDevice, REMOTE_64_BIT_ADDRESS); remoteDevice.setDestinationAddress(localDevice.get64BitAddress()); remoteDevice.setIOConfiguration(DIGITAL_LINE, IOMode.DIGITAL_IN); remoteDevice.setIOConfiguration(ANALOG_LINE, IOMode.ADC); remoteDevice.setDIOChangeDetection(MONITORED_LINES); remoteDevice.setIOSamplingRate(IO_SAMPLING_RATE); localDevice.startListeningForIOSamples(new IIOSampleReceiveListener() { @Override public void ioSampleReceived(RemoteXBeeDevice remoteDevice, IOSample ioSample) { System.out.println("New sample received from " + remoteDevice.get64BitAddress() + " - " + ioSample); } }); } catch (XBeeException e) { e.printStackTrace(); localDevice.close(); System.exit(1); } }
Source:
<code>public ShortBranchComponentsWithIssues(AnalysisMetadataHolder analysisMetadataHolder, DbClient dbClient) { this.analysisMetadataHolder = analysisMetadataHolder; <START> this.dbClient = dbClient; <END> }</code><technical_language>IMO remove</technical_language>

Target:
public ShortBranchComponentsWithIssues(AnalysisMetadataHolder analysisMetadataHolder, DbClient dbClient) { this.uuid = analysisMetadataHolder.getUuid(); this.dbClient = dbClient; }
Source:
<code>public String encodeUrlToUtf8(String urlStr) { urlStr = urlStr.replaceAll("http://", ""); try { urlStr = URLEncoder.encode(urlStr, "UTF-8"); } catch (UnsupportedEncodingException exp) { LOGGER.error("Failed to encode url [" + urlStr + "] to utf-8", exp); } urlStr = "http://" + urlStr; <START> getContext().getResponse(); <END> return urlStr; }</code><technical_language>do need call getResponse</technical_language>

Target:
public String encodeUrlToUtf8(String urlStr) { return getCelementsWebService().encodeUrlToUtf8(urlStr); }
Source:
<code>private void acquireLease() { try { if (lockStore.acquire(lock.getLockId())) { lock.input(LockEvent.LEASE_ACQUIRED); } } <START> catch (WrongClusterException wce) { <END> log.error("Lock: could not acquire lease due to trying to connect to a wrong cluster {}", lock.getLockId(), wce); throw wce; } catch (Exception e) { log.error("Lock: could not acquire lease {}", lock.getLockId(), e); } }</code><technical_language>a test verifies LR is correctly restarted able resume</technical_language>

Target:
private void acquireLease() { try { if (lockStore.acquire(lock.getLockId())) { lock.input(LockEvent.LEASE_ACQUIRED); } } catch (Exception e) { log.error("Lock: could not acquire lease {}", lock.getLockId(), e); } }