auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>public void commitMarker(int count) throws IOException { String key = TxConstants.TransactionLog.NUM_ENTRIES_APPENDED; <START> internalWriter.appendRaw(key.getBytes(), 0, key.getBytes().length, new CommitEntriesCount(count)); <END> }</code><technical_language>Need encoding get bytes here. Also, save bytes in a variable another conversion is required get length</technical_language>

Target:
public void commitMarker(int count) throws IOException { CommitMarkerCodec.writeMarker(internalWriter, count); }
Source:
<code>void removeWatchers() { HashSet<WrappedWatcher> localEntries; synchronized(this) { localEntries = Sets.newHashSet(entries); } for ( WrappedWatcher entry : localEntries ) { try { log.debug("Removing watcher for path: " + entry.path); RemoveWatchesBuilderImpl builder = new RemoveWatchesBuilderImpl(client); builder.prepInternalRemoval(entry); <START> builder.pathInForeground(entry.path); <END> } catch ( Exception e ) { log.error("Could not remove watcher for path: " + entry.path); } } }</code><technical_language>a good idea. do a guaranteed background operation</technical_language>

Target:
void removeWatchers() { HashSet<WrappedWatcher> localEntries; synchronized(this) { localEntries = Sets.newHashSet(entries); } for ( WrappedWatcher entry : localEntries ) { try { log.debug("Removing watcher for path: " + entry.path); RemoveWatchesBuilderImpl builder = new RemoveWatchesBuilderImpl(client); builder.internalRemoval(entry, entry.path); } catch ( Exception e ) { log.error("Could not remove watcher for path: " + entry.path); } } }
Source:
<code>protected boolean set(TileEntityStructure container, Map<Key<?>, Object> map) { @Nullable String author = (String) map.get(Keys.STRUCTURE_AUTHOR); if (author != null) { ((IMixinTileEntityStructure) container).setAuthor(author); } <START> @Nullable Boolean ignoreEntities = (Boolean) map.get(Keys.STRUCTURE_IGNORE_ENTITIES); <END> if (ignoreEntities != null) { container.setIgnoresEntities(ignoreEntities); } @Nullable Float integrity = (Float) map.get(Keys.STRUCTURE_INTEGRITY); if (integrity != null) { container.setIntegrity(integrity); } @Nullable StructureMode mode = (StructureMode) map.get(Keys.STRUCTURE_MODE); if (mode != null) { ((IMixinTileEntityStructure) container).setMode(mode); } @Nullable Vector3i position = (Vector3i) map.get(Keys.STRUCTURE_POSITION); if (position != null) { ((IMixinTileEntityStructure) container).setPosition(position); } @Nullable Boolean powered = (Boolean) map.get(Keys.STRUCTURE_POWERED); if (powered != null) { container.setPowered(powered); } @Nullable Long seed = (Long) map.get(Keys.STRUCTURE_SEED); if (seed != null) { container.setSeed(seed); } @Nullable Boolean showAir = (Boolean) map.get(Keys.STRUCTURE_SHOW_AIR); if (showAir != null) { container.setShowAir(showAir); } @Nullable Boolean showBoundingBox = (Boolean) map.get(Keys.STRUCTURE_SHOW_BOUNDING_BOX); if (showBoundingBox != null) { container.setShowBoundingBox(showBoundingBox); } @Nullable Vector3i size = (Vector3i) map.get(Keys.STRUCTURE_SIZE); if (size != null) { ((IMixinTileEntityStructure) container).setSize(size); } return true; }</code><technical_language>Again, if interface is returning a boolean, this null a valid Boolean instance</technical_language>

Target:
protected boolean set(TileEntityStructure container, Map<Key<?>, Object> map) { @Nullable String author = (String) map.get(Keys.STRUCTURE_AUTHOR); if (author != null) { ((IMixinTileEntityStructure) container).setAuthor(author); } container.setIgnoresEntities((Boolean) map.get(Keys.STRUCTURE_IGNORE_ENTITIES)); container.setIntegrity((Float) map.get(Keys.STRUCTURE_INTEGRITY)); @Nullable StructureMode mode = (StructureMode) map.get(Keys.STRUCTURE_MODE); if (mode != null) { ((IMixinTileEntityStructure) container).setMode(mode); } @Nullable Vector3i position = (Vector3i) map.get(Keys.STRUCTURE_POSITION); if (position != null) { ((IMixinTileEntityStructure) container).setPosition(position); } container.setPowered((Boolean) map.get(Keys.STRUCTURE_POWERED)); @Nullable Long seed = (Long) map.get(Keys.STRUCTURE_SEED); if (seed != null) { container.setSeed(seed); } container.setShowAir((Boolean) map.get(Keys.STRUCTURE_SHOW_AIR)); container.setShowBoundingBox((Boolean) map.get(Keys.STRUCTURE_SHOW_BOUNDING_BOX)); @Nullable Boolean showBoundingBox = (Boolean) map.get(Keys.STRUCTURE_SHOW_BOUNDING_BOX); if (showBoundingBox != null) { } @Nullable Vector3i size = (Vector3i) map.get(Keys.STRUCTURE_SIZE); if (size != null) { ((IMixinTileEntityStructure) container).setSize(size); } return true; }
Source:
<code>protected void removeTagsFromVm(long vmId) { UserVmVO vm = _vmDao.findById(vmId); Long resourceId = _taggedResourceService.getResourceId(vm.getUuid(), ResourceTag.ResourceObjectType.UserVm); List<? extends ResourceTag> resourceTags = _taggedResourceService.listByResourceTypeAndId(ResourceTag.ResourceObjectType.UserVm, resourceId); if (resourceTags.size() > 0) { List<String> resourceIds = Arrays.asList(vm.getUuid()); Map<String, String> tags = new HashMap<>(); _taggedResourceService.deleteTags(resourceIds, ResourceTag.ResourceObjectType.UserVm, tags); <START> s_logger.debug("Tags from vm id: " + vmId + " has been removed."); <END> } }</code><technical_language>adding deleted tags debug message well</technical_language>

Target:
protected void removeTagsFromVm(long vmId) { UserVmVO vm = _vmDao.findById(vmId); Long resourceId = _taggedResourceService.getResourceId(vm.getUuid(), ResourceTag.ResourceObjectType.UserVm); List<? extends ResourceTag> resourceTags = _taggedResourceService.listByResourceTypeAndId(ResourceTag.ResourceObjectType.UserVm, resourceId); if (resourceTags.size() > 0) { List<String> resourceIds = Arrays.asList(vm.getUuid()); _taggedResourceService.deleteTags(resourceIds, ResourceTag.ResourceObjectType.UserVm, null); } }
Source:
<code>public List<EventTypeAuthorizationAttribute> getAdmins() { <START> return admins == null ? null : Collections.unmodifiableList(admins); <END> }</code><technical_language>@v-stepanov Is method marked @Nullable</technical_language>

Target:
public List<AuthorizationAttribute> getAdmins() { return admins; }
Source:
<code>public void setStackName(String stackName) { WebElement stackNameField = seleniumWebDriverHelper.waitVisibility(By.name(Locators.NEW_STACK_NAME)); stackNameField.click(); stackNameField.clear(); stackNameField.sendKeys(stackName); <START> WaitUtils.sleepQuietly(1); <END> }</code><technical_language>replace commands one: seleniumWebDriverHelper.setValue()</technical_language>

Target:
public void setStackName(String stackName) { seleniumWebDriverHelper.waitAndClick(stackNameField); seleniumWebDriverHelper.setValue(stackNameField, stackName); }
Source:
<code>protected CourseAttributes makeAttributes(Course entity) { Assumption.assertNotNull(Const.StatusCodes.DBLEVEL_NULL_INPUT, entity); <START> return CourseAttributes.builder(entity.getUniqueId(), entity.getName(), ZoneId.of(entity.getTimeZone())) <END> .withCreatedAt(entity.getCreatedAt()).build(); }</code><technical_language>want catch DateTimeException, severe log fallback a default time zone, e.g. for existing courses of unsupported time zones</technical_language>

Target:
protected CourseAttributes makeAttributes(Course entity) { Assumption.assertNotNull(Const.StatusCodes.DBLEVEL_NULL_INPUT, entity); ZoneId courseTimeZone; try { courseTimeZone = ZoneId.of(entity.getTimeZone()); } catch (DateTimeException e) { log.severe("Timezone '" + entity.getTimeZone() + "' of course '" + entity.getUniqueId() + "' is not supported. UTC will be used instead."); courseTimeZone = ZoneId.of("UTC"); } return CourseAttributes.builder(entity.getUniqueId(), entity.getName(), courseTimeZone) .withCreatedAt(entity.getCreatedAt()).build(); }
Source:
<code>private static String syntheticName(String base) { <START> return "__$$_" + base + "_" + System.currentTimeMillis(); <END> }</code><technical_language>append :wink:, generate synthetic name if call this function times in millisecond. increment based Context closure decorators synthetic names</technical_language>

Target:
private static String syntheticName(String base) { return "__$$_" + base + "_" + syntheticNameCounter.getAndIncrement(); }
Source:
<code><START> protected void updateEnablement(IAction action) { <END> boolean enabled = isEnabled(); action.setEnabled(enabled); }</code><technical_language>superclass implementation expect action null, super implementation some logic context is active. I need this plugin XML is checking property</technical_language>

Target:
protected void updateEnablement(IAction action) { action.setEnabled(isEnabled()); }
Source:
<code>private String baseUrl() { try { final ServiceInstance instance = serviceProvider.getInstance(); if (instance == null) { throw new ISE("Cannot find instance of indexingService"); } <START> return String.format("http://%s:%s/mmx/indexer/v1", instance.getAddress(), instance.getPort()); <END> } catch (Exception e) { throw Throwables.propagate(e); } }</code><technical_language>/druid/indexer/v1? (/mmx/ weird in open source)</technical_language>

Target:
private String baseUrl() { try { final ServiceInstance instance = serviceProvider.getInstance(); if (instance == null) { throw new ISE("Cannot find instance of indexingService"); } return String.format("http://%s:%s/druid/indexer/v1", instance.getAddress(), instance.getPort()); } catch (Exception e) { throw Throwables.propagate(e); } }
Source:
<code>private boolean canChangeDefaultCallScreening() { <START> boolean canChange = false; try { TelecomManager.from(this).isDefaultCallScreeningApp(mNewComponentName); } catch (SecurityException e) { canChange = true; } return canChange; <END> }</code><technical_language>I more accurate say: String defaultComponentName = Settings.Secure.getStringForUser( mContext.getContentResolver(), Settings.Secure.CALL_SCREENING_DEFAULT_APPLICATION, UserHandle.USER_CURRENT); ComponentName oldComponentName = TextUtils.isNullOrEmpty(defaultComponentName) ? null : ComponentName.unflattenFromString(defaultComponentName); canChange = oldComponentName == null || !defaultComponentName.getPackageName().equals(mNewComponentName.getPackageName()) || !defaultComponentName.equals(mNewComponentName); Essentially saying, if is previous setting asking change a app, another service in app (unlikely case) allow prompt</technical_language>

Target:
private boolean canChangeDefaultCallScreening() { boolean canChange; String defaultComponentName = Settings.Secure .getStringForUser(getApplicationContext().getContentResolver(), Settings.Secure.CALL_SCREENING_DEFAULT_COMPONENT, UserHandle.USER_CURRENT); ComponentName oldComponentName = TextUtils.isEmpty(defaultComponentName) ? null : ComponentName.unflattenFromString(defaultComponentName); canChange = oldComponentName == null || !oldComponentName.getPackageName() .equals(mNewComponentName.getPackageName()) || !oldComponentName.flattenToString() .equals(mNewComponentName.flattenToString()); return canChange; }
Source:
<code>public void testGroupBy3() throws Exception { QueryFactory qf = getQueryFactory(); Query q = qf.from(getModelFactory().getUserImplClass()) .select("name") .groupBy("name") .orderBy("surname", SortOrder.ASC) .build(); <START> <END> q.list(); }</code><technical_language>aggregation in a filtered query? conceptually similar SELECT name person name.startsWith("a") GROUP name work? is test for</technical_language>

Target:
public void testGroupBy3() throws Exception { QueryFactory qf = getQueryFactory(); Query q = qf.from(getModelFactory().getUserImplClass()) .select("name") .groupBy("name") .orderBy("surname") .build(); q.list(); }
Source:
<code>public static Credential retrieveOverridingCredentialFromProject(AbstractProject project) { Credential overridingCredential = null; DeployitNotifier notifier = retrieveDeployitNotifierFromProject(project); if (null != notifier) { overridingCredential = notifier.getOverridingCredential(); <START> if ((null == overridingCredential.getUsername() || "".equals(overridingCredential.getUsername())) <END> && null != overridingCredential.getCredentialsId()) { DeployitNotifier.DeployitDescriptor descriptor = (DeployitNotifier.DeployitDescriptor) notifier.getDescriptor(); String secondaryProxyUrl = overridingCredential.resolveProxyUrl(descriptor.getDeployitClientProxyUrl()); String secondaryServerUrl = overridingCredential.resolveServerUrl(descriptor.getDeployitServerUrl()); SecondaryServerInfo serverInfo = new SecondaryServerInfo(secondaryServerUrl, secondaryProxyUrl); StandardUsernamePasswordCredentials cred = Credential.lookupSystemCredentials(overridingCredential.getCredentialsId(), project); if (null != cred) { overridingCredential = new Credential(overridingCredential.getName(), cred.getUsername(), cred.getPassword(), overridingCredential.getCredentialsId(), serverInfo, false); } } } return overridingCredential; }</code><technical_language>StringUtils.isEmpty(username)</technical_language>

Target:
public static Credential retrieveOverridingCredentialFromProject(AbstractProject project) { Credential overridingCredential = null; DeployitNotifier notifier = retrieveDeployitNotifierFromProject(project); if (null != notifier) { overridingCredential = notifier.getOverridingCredential(); if (StringUtils.isEmpty(overridingCredential.getUsername()) && null != overridingCredential.getCredentialsId()) { DeployitDescriptor descriptor = (DeployitDescriptor) notifier.getDescriptor(); String secondaryProxyUrl = overridingCredential.resolveProxyUrl(descriptor.getDeployitClientProxyUrl()); String secondaryServerUrl = overridingCredential.resolveServerUrl(descriptor.getDeployitServerUrl()); SecondaryServerInfo serverInfo = new SecondaryServerInfo(secondaryServerUrl, secondaryProxyUrl); StandardUsernamePasswordCredentials cred = Credential.lookupSystemCredentials(overridingCredential.getCredentialsId(), project); if (null != cred) { overridingCredential = new Credential(overridingCredential.getName(), cred.getUsername(), cred.getPassword(), overridingCredential.getCredentialsId(), serverInfo, false); } } } return overridingCredential; }
Source:
<code>private boolean pluginNotStarted(String pluginId) { if (pluginId != null) { PluginWrapper pluginWrapper = pluginManager.getPlugin(pluginId); if (PluginState.STARTED != pluginWrapper.getPluginState()) { return true; } <START> log.trace("Checking extensions from plugin '{}'", pluginId); <END> } else { log.trace("Checking extensions from classpath"); } return false; }</code><technical_language>I log messages related extensions part of "pluginNotStarted"</technical_language>

Target:
private boolean pluginNotStarted(String pluginId) { if (pluginId != null) { PluginWrapper pluginWrapper = pluginManager.getPlugin(pluginId); return PluginState.STARTED != pluginWrapper.getPluginState(); } return false; }
Source:
<code>public void setApiUrl(String apiUrl) { if (custom) { <START> this.apiUrl = defaultIfBlank(apiUrl, GITHUB_URL); <END> } else { this.apiUrl = GITHUB_URL; } }</code><technical_language>remove this magic store apiUrl. If forgot url, add new ServerConfig default again</technical_language>

Target:
public void setApiUrl(String apiUrl) { if (customApiUrl) { this.apiUrl = defaultIfBlank(apiUrl, GITHUB_URL); } else { this.apiUrl = GITHUB_URL; } }
Source:
<code>public List<InetAddress> lookup(String hostname) throws UnknownHostException { Domain domain = new Domain(hostname); List<InetAddress> inetAddressList = null; try { <START> inetAddressList = Arrays.asList(dnsManager.queryInetAdress(domain)); <END> } catch (IOException ignored) { } return inetAddressList; }</code><technical_language>queryInetAdress => queryInetAddress</technical_language>

Target:
public List<IDnsNetworkAddress> lookup(String hostname) throws UnknownHostException { Domain domain = new Domain(hostname); List<IDnsNetworkAddress> addressList = null; try { Record[] records = dnsManager.queryRecords(domain); if (records != null && records.length > 0){ addressList = new ArrayList<>(); for (Record record : records) { String source = ""; if (record.source == Record.Source.System) { source = "system"; } else if (record.source == Record.Source.DnspodFree || record.source == Record.Source.DnspodEnterprise) { source = "httpdns"; } else if (record.source == Record.Source.Unknown) { source = "none"; } else { source = "customized"; } DnsNetworkAddress address = new DnsNetworkAddress(hostname, record.value, (long)record.ttl, source, record.timeStamp); addressList.add(address); } } } catch (IOException ignored) { } return addressList; }
Source:
<code>public GHMatrixResponse calculateMatrix(GHMatrixRequest request){ AlgorithmOptions.Builder algoOptsBuilder = buildOptions(request, hopper); AlgorithmOptions tmpOptions = algoOptsBuilder.build(); Graph routingGraph = hopper.getGraphHopperStorage(); if(hopper.isCHEnabled()) { routingGraph = hopper.getGraphHopperStorage().getGraph(CHGraph.class, tmpOptions.getWeighting()); } QueryGraph queryGraph = new QueryGraph(routingGraph); Weighting weighting = hopper.createTurnWeighting(tmpOptions.getWeighting(), queryGraph, tmpOptions.getFlagEncoder()); AlgorithmOptions algoOpts = algoOptsBuilder.weighting(weighting).build(); List<QueryResult> originQNodes = lookupNodes(request.getOrigins(), algoOpts.getFlagEncoder()); List<QueryResult> destinationQNodes = lookupNodes(request.getDestinations(), algoOpts.getFlagEncoder()); List<QueryResult> merged = new ArrayList<>(originQNodes); merged.addAll(destinationQNodes); queryGraph.lookup(merged); List<Integer> originNodes = mapToNodes(originQNodes); <START> List<Integer> destinationNodes = mapToNodes(destinationQNodes); <END> MatrixAlgorithm algorithm = matrixAlgorithmFactory.build(queryGraph, algoOpts); DistanceMatrix matrix = algorithm.calcMatrix(originNodes, destinationNodes); GHMatrixResponse response = toResponse(matrix, request); return response; }</code><technical_language>do need this conversion step</technical_language>

Target:
public GHMatrixResponse calculateMatrix(GHMatrixRequest request){ AlgorithmOptions.Builder algoOptsBuilder = buildOptions(request, hopper); AlgorithmOptions tmpOptions = algoOptsBuilder.build(); Graph routingGraph = hopper.getGraphHopperStorage(); if(hopper.isCHEnabled()) { routingGraph = hopper.getGraphHopperStorage().getGraph(CHGraph.class, tmpOptions.getWeighting()); } QueryGraph queryGraph = new QueryGraph(routingGraph); Weighting weighting = hopper.createTurnWeighting( queryGraph, tmpOptions.getFlagEncoder(), tmpOptions.getWeighting(), tmpOptions.getTraversalMode()); AlgorithmOptions algoOpts = algoOptsBuilder.weighting(weighting).build(); List<QueryResult> originQNodes = lookupNodes(request.getOrigins(), algoOpts.getFlagEncoder()); List<QueryResult> destinationQNodes = lookupNodes(request.getDestinations(), algoOpts.getFlagEncoder()); List<QueryResult> merged = new ArrayList<>(originQNodes); merged.addAll(destinationQNodes); queryGraph.lookup(merged); int[] originNodes = mapToNodes(originQNodes); int[] destinationNodes = mapToNodes(destinationQNodes); MatrixAlgorithm algorithm = matrixAlgorithmFactory.createAlgo(queryGraph, algoOpts); DistanceMatrix matrix = algorithm.calcMatrix(originNodes, destinationNodes); GHMatrixResponse response = toResponse(matrix, request); return response; }
Source:
<code>private FirmwareProvider createFirmwareProvider(Firmware... firmwares) { return new FirmwareProvider() { @Override public Set<Firmware> getFirmwares(ThingTypeUID thingTypeUID, Locale locale) { if (thingTypeUID.equals(thingType.getUID())) { return new HashSet<>(Arrays.asList(firmwares)); } else { <START> return new HashSet<>(); <END> } } @Override public Set<Firmware> getFirmwares(ThingTypeUID thingTypeUID) { return getFirmwares(thingTypeUID, null); } @Override public Firmware getFirmware(FirmwareUID firmwareUID, Locale locale) { for (Firmware firmware : getFirmwares(firmwareUID.getThingTypeUID(), locale)) { if (firmware.getUID().equals(firmwareUID)) { return firmware; } } return null; } @Override public Firmware getFirmware(FirmwareUID firmwareUID) { return getFirmware(firmwareUID, null); } }; }</code><technical_language>this Collections.emptySet()</technical_language>

Target:
private FirmwareProvider createFirmwareProvider(Firmware... firmwares) { return new FirmwareProvider() { @Override public Set<Firmware> getFirmwares(ThingTypeUID thingTypeUID, Locale locale) { if (thingTypeUID.equals(thingType.getUID())) { return new HashSet<>(Arrays.asList(firmwares)); } else { return Collections.emptySet(); } } @Override public Set<Firmware> getFirmwares(ThingTypeUID thingTypeUID) { return getFirmwares(thingTypeUID, null); } @Override public Firmware getFirmware(FirmwareUID firmwareUID, Locale locale) { for (Firmware firmware : getFirmwares(firmwareUID.getThingTypeUID(), locale)) { if (firmware.getUID().equals(firmwareUID)) { return firmware; } } return null; } @Override public Firmware getFirmware(FirmwareUID firmwareUID) { return getFirmware(firmwareUID, null); } }; }
Source:
<code><START> public V get(Object key) { <END> if (singleKey != null) return singleKey.equals(key) ? singleValue : null; if (inner != null) return inner.get(key); return null; }</code><technical_language>I get(null) work correctly if map contains element null key. case if map contains elements</technical_language>

Target:
public V get(Object key) { switch (type) { case EMPTY: return null; case SINGLE: return key == null ? (singleKey == null ? singleValue : null) : (key.equals(singleKey) ? singleValue : null); case MAP: return inner.get(key); } throw new IllegalStateException(); }
Source:
<code>protected void onDraw(Canvas canvas) { super.onDraw(canvas); float centerX = mCanvasWidth / 2; float centerY = mCanvasHeight / 2; <START> canvas.drawCircle(centerX, centerY, 0.7f * Math.min(centerX, centerY), mWhitePaint); <END> }</code><technical_language>Yup</technical_language>

Target:
protected void onDraw(Canvas canvas) { super.onDraw(canvas); final float centerX = mCanvasWidth / 2; final float centerY = mCanvasHeight / 2; final float radius = 0.7f * Math.min(centerX, centerY); canvas.drawCircle(centerX, centerY, radius, mWhitePaint); }
Source:
<code>protected boolean validateVM(VmValidator vmValidator) { return canDoSnapshot(getVm()) && validate(vmValidator.vmNotSavingRestoring()) && <START> validate(vmValidator.vmNotSuspended()); <END> }</code><technical_language>matrix in VdcActionUtils operation blocked in UI well? validate status do in RunVmValidator#validateVmStatusUsingMatrix</technical_language>

Target:
protected boolean validateVM(VmValidator vmValidator) { return canDoSnapshot(getVm()) && validate(vmValidator.vmNotSavingRestoring()) && validate(vmValidator.validateVmStatusUsingMatrix(VdcActionType.CreateAllSnapshotsFromVm)); }
Source:
<code>private void setDepth(N node, N parent) { if (parent == null) { depths.put(node, 0); height = Optional.of(0); } else { int nodeDepth = depths.get(parent) + 1; height = <START> Optional.of(Math.max(nodeDepth, (height.equals(Optional.empty()) ? 0 : height.get()))); <END> depths.put(node, nodeDepth); } }</code><technical_language>try editing this change in place clean syntax; side</technical_language>

Target:
private void setDepth(N node, N parent) { if (parent == null) { depths.put(node, 0); height = Optional.of(0); } else { int nodeDepth = depths.get(parent) + 1; height = Optional.of(Math.max(nodeDepth, height.orElse(0))); depths.put(node, nodeDepth); } }
Source:
<code>public FileMode getMode(File f, FS.Attributes attributes) { <START> if (attributes.isSymbolicLink()) <END> return FileMode.SYMLINK; else if (attributes.isDirectory()) { if (new File(f, Constants.DOT_GIT).exists()) return FileMode.GITLINK; else return FileMode.TREE; } else if (attributes.isExecutable()) return FileMode.EXECUTABLE_FILE; else return FileMode.REGULAR_FILE; }</code><technical_language>style nit: missing braces, style guide changed a while braces single line blocks</technical_language>

Target:
public FileMode getMode(File f, FS.Attributes attributes) { if (attributes.isSymbolicLink()) { return FileMode.SYMLINK; } else if (attributes.isDirectory()) { if (new File(f, Constants.DOT_GIT).exists()) { return FileMode.GITLINK; } else { return FileMode.TREE; } } else if (attributes.isExecutable()) { return FileMode.EXECUTABLE_FILE; } else { return FileMode.REGULAR_FILE; } }
Source:
<code>public AddDeviceResponse getSetConfigurationObjectResponse( @OrganisationIdentification final String organisationIdentification, @RequestPayload final AddDeviceAsyncRequest request) throws OsgpException { final MeterResponseData meterResponseData = this.installationService.dequeueAddSmartMeterResponse(request <START> .getCorrelationUid()); <END> final AddDeviceResponse response = new AddDeviceResponse(); if (meterResponseData != null) { response.setResult(OsgpResultType.fromValue(meterResponseData.getResultType().getValue())); if (meterResponseData.getMessageData() instanceof String) { response.setDescription((String) meterResponseData.getMessageData()); } } else { response.setResult(OsgpResultType.NOT_FOUND); } return response; }</code><technical_language>In SmartMeteringMonitoringEndpoint I response data retrieved a call meterResponseDataService. Calling installationService obtain response data inconsistent sight. If is reason for this difference, I cleaner if obtaining actual response is treated alike in endpoints</technical_language>

Target:
public AddDeviceResponse getSetConfigurationObjectResponse( @OrganisationIdentification final String organisationIdentification, @RequestPayload final AddDeviceAsyncRequest request) { final AddDeviceResponse response = new AddDeviceResponse(); try { final MeterResponseData meterResponseData = this.installationService.dequeueAddSmartMeterResponse(request .getCorrelationUid()); response.setResult(OsgpResultType.fromValue(meterResponseData.getResultType().getValue())); if (meterResponseData.getMessageData() instanceof String) { response.setDescription((String) meterResponseData.getMessageData()); } } catch (final FunctionalException e) { if (e.getExceptionType() == FunctionalExceptionType.UNKNOWN_CORRELATION_UID) { response.setResult(OsgpResultType.NOT_FOUND); } else { response.setResult(OsgpResultType.NOT_OK); } } return response; }
Source:
<code>private void createXsToolsISO() { <START> VMTemplateVO tmplt = _tmpltDao.findByTemplateName(_toolsIsoName); <END> Long id; if (tmplt == null) { id = _tmpltDao.getNextInSequence(Long.class, "id"); VMTemplateVO template = VMTemplateVO.createPreHostIso(id, _toolsIsoName, _toolsIsoName, ImageFormat.ISO, true, true, TemplateType.PERHOST, null, null, true, 64, Account.ACCOUNT_ID_SYSTEM, null, "xen-pv-drv-iso", false, 1, false, HypervisorType.XenServer); _tmpltDao.persist(template); } else { id = tmplt.getId(); tmplt.setTemplateType(TemplateType.PERHOST); tmplt.setUrl(null); _tmpltDao.update(id, tmplt); } }</code><technical_language>I start a question. Do need check XenServers versions used? I mean, simply persist ISOs in database? needing "determine" method. long entries in database (or new in future of us), logic in CitrixResourceBase.java care of rest. I recommend though. strings "guest-tools" "xs-tools" in classes (at I in this PR). extracting enum</technical_language>

Target:
private void createXsToolsISO() { String isoName = "xs-tools.iso"; VMTemplateVO tmplt = _tmpltDao.findByTemplateName(isoName); Long id; if (tmplt == null) { id = _tmpltDao.getNextInSequence(Long.class, "id"); VMTemplateVO template = VMTemplateVO.createPreHostIso(id, isoName, isoName, ImageFormat.ISO, true, true, TemplateType.PERHOST, null, null, true, 64, Account.ACCOUNT_ID_SYSTEM, null, "XenServer Tools Installer ISO (xen-pv-drv-iso)", false, 1, false, HypervisorType.XenServer); _tmpltDao.persist(template); } else { id = tmplt.getId(); tmplt.setTemplateType(TemplateType.PERHOST); tmplt.setUrl(null); _tmpltDao.update(id, tmplt); } }
Source:
<code>public static ExtensionInfo fromPacketExtInfo(PacketExtInfo packetExtInfo) { String rawAlgs = packetExtInfo.getExtNameToValue().get("server-sig-algs"); if (rawAlgs == null) { <START> return new ExtensionInfo(Collections.emptySet()); <END> } Set<String> algsSet = new HashSet<>(); Collections.addAll(algsSet, rawAlgs.split(",")); return new ExtensionInfo(algsSet); }</code><technical_language>Java 7 a problem this. fixed with: java Collections.<String>emptySet()</technical_language>

Target:
public static ExtensionInfo fromPacketExtInfo(PacketExtInfo packetExtInfo) { String rawAlgs = packetExtInfo.getExtNameToValue().get("server-sig-algs"); if (rawAlgs == null) { return new ExtensionInfo(Collections.<String>emptySet()); } Set<String> algsSet = new HashSet<>(); Collections.addAll(algsSet, rawAlgs.split(",")); return new ExtensionInfo(algsSet); }
Source:
<code>SuggestReviewerInfo(GroupBaseInfo g) { <START> this.account = null; <END> this.group = g; }</code><technical_language>Setting account null done JVM object created</technical_language>

Target:
SuggestReviewerInfo(GroupBaseInfo g) { this.group = g; }
Source:
<code>public void setUpClass() throws Exception { <START> Thread.sleep(5000); <END> properties.setProperty("server.ip", "localhost"); properties.setProperty("server.port", aerospikeContainer.getMappedPort(3000).toString()); }</code><technical_language>check this condition a framework Awaitility</technical_language>

Target:
public void setUpClass() throws Exception { log.info("Setting up Aerospike test driver"); properties.setProperty("gora.aerospikestore.server.ip", "localhost"); properties.setProperty("gora.aerospikestore.server.port", aerospikeContainer.getMappedPort(3000).toString()); }
Source:
<code>public void run() { final long oldTimeStamp; <START> if (lastMeasuredTimestamp == 0L) { <END> oldTimeStamp = System.currentTimeMillis(); lastMeasuredTimestamp = oldTimeStamp; } else { oldTimeStamp = lastMeasuredTimestamp; lastMeasuredTimestamp = System.currentTimeMillis(); } final boolean clusterOverloaded = isClusterOverloaded(); final boolean clusterIdle = isClusterIdle(); if (clusterOverloaded) { overloadedTimeElapsed += lastMeasuredTimestamp - oldTimeStamp; } else { overloadedTimeElapsed = 0; } if (clusterIdle) { idleTimeElapsed += lastMeasuredTimestamp - oldTimeStamp; } else { idleTimeElapsed = 0; } if (overloadedTimeElapsed > scaleOutGracePeriod && taskStatsMap.getTaskList().size() < maxTaskNum) { overloadedTimeElapsed = 0; } else if (idleTimeElapsed > scaleInGracePeriod && taskStatsMap.getTaskList().size() > minTaskNum) { idleTimeElapsed = 0; } }</code><technical_language>need this if else if set lastMeasuredTimestamp in constructor</technical_language>

Target:
public void run() { final long oldTimeStamp = lastMeasuredTimestamp; lastMeasuredTimestamp = System.currentTimeMillis(); final boolean clusterOverloaded = isClusterOverloaded(); final boolean clusterIdle = isClusterIdle(); if (clusterOverloaded) { overloadedTimeElapsed += lastMeasuredTimestamp - oldTimeStamp; if (overloadedTimeElapsed > scaleOutGracePeriod && taskStatsMap.getTaskList().size() < maxTaskNum) { overloadedTimeElapsed = 0; return; } } else { overloadedTimeElapsed = 0; } if (clusterIdle) { idleTimeElapsed += lastMeasuredTimestamp - oldTimeStamp; if (idleTimeElapsed > scaleInGracePeriod && taskStatsMap.getTaskList().size() > minTaskNum) { idleTimeElapsed = 0; return; } } else { idleTimeElapsed = 0; } }
Source:
<code>public HtmlLanguageBuilder addSubstitution(SpanType spanType, String alternativeTagName) { spanTypeStringSubstitutions.put(checkNotNull(spanType, "Must provide a spanType <START> for substitution"), <END> checkNotNull(alternativeTagName, "Must provide an alternativeTagName")); return this; }</code><technical_language>consider removing "for substitution" message</technical_language>

Target:
public HtmlLanguageBuilder addSubstitution(SpanType spanType, String alternativeTagName) { checkNotNull(spanType, "Must provide a spanType"); checkNotNull(alternativeTagName, "Must provide an alternativeTagName"); spanTypeStringSubstitutions.put(spanType, alternativeTagName); return this; }
Source:
<code>public SelectGraphWizard(IDataSet data, GraphData gdata) { model = new GraphModel(data); <START> if (edit = (gdata != null) ) { <END> model.setGraph(gdata.graphID); model.setKey(gdata.key); model.setTitle(gdata.title); model.setXSeries(gdata.xSeries); model.setYSeries(gdata.ySeries); } }</code><technical_language>Please write this lines edit = (gdata != null); if (edit) is more readable</technical_language>

Target:
public SelectGraphWizard(IDataSet data, GraphData gdata) { model = new GraphModel(data); edit = (gdata != null); if (edit) { model.setGraph(gdata.graphID); model.setKey(gdata.key); model.setTitle(gdata.title); model.setXSeries(gdata.xSeries); model.setYSeries(gdata.ySeries); } }
Source:
<code><START> public static KeyStroke getKeystrokeOfBestActiveBindingFor(String commandId) { <END> KeyStroke stroke = null; IBindingService bindingService = (IBindingService) PlatformUI .getWorkbench().getAdapter(IBindingService.class); TriggerSequence ts = bindingService .getBestActiveBindingFor("org.eclipse.ui.edit.text.contentAssist.proposals"); if (ts == null) return null; Trigger[] triggers = ts.getTriggers(); for (Trigger t : triggers) { if (t instanceof KeyStroke) stroke = (KeyStroke) t; } return stroke; }</code><technical_language>commandId is in method. string replaced remove parameter rename "getContentAssistKeystroke"</technical_language>

Target:
public static KeyStroke getKeystrokeOfBestActiveBindingFor(String commandId) { IBindingService bindingService = (IBindingService) PlatformUI .getWorkbench().getAdapter(IBindingService.class); TriggerSequence ts = bindingService.getBestActiveBindingFor(commandId); if (ts == null) return null; Trigger[] triggers = ts.getTriggers(); if (triggers.length == 1 && triggers[0] instanceof KeyStroke) return (KeyStroke) triggers[0]; else return null; }
Source:
<code>boolean isSourceAvailable(Source source) { if (source == null) { LOGGER.debug("source is null, therefore not available"); return false; } final Optional<Status> sourceStatusOptional = sourceStatusCache.getCachedValueForSource(source); <START> if (sourceStatusOptional.isPresent()) { <END> return sourceStatusOptional.get() == Status.AVAILABLE; } else { LOGGER.debug("Unknown source status for source id={}", source.getId()); return false; } }</code><technical_language>this instead? suggestion return (boolean) sourceStatusOptional .map(s -> s == Status.AVAILABLE) .orElseGet( () -> { LOGGER.debug("Unknown source status for source id={}", source.getId()); return false; });</technical_language>

Target:
boolean isSourceAvailable(Source source) { if (source == null) { LOGGER.debug("source is null, therefore not available"); return false; } if (LOGGER.isTraceEnabled()) { LOGGER.trace("Checking if source \"{}\" is available...", source.getId()); } return sourceStatusCache .getCachedValueForSource(source) .map( sourceStatus -> { final boolean available = sourceStatus == SourceStatus.AVAILABLE; if (!available) { LOGGER.debug("source \"{}\" is not available", source.getId()); } return available; }) .orElseGet( () -> { LOGGER.debug("Unknown availability for source id={}", source.getId()); return false; }); }
Source:
<code>public boolean basebackend(String backend) { <START> return getBoolean("basebackend?", backend); <END> }</code><technical_language>This method named isBasebackend()</technical_language>

Target:
public boolean basebackend(String backend) { return isBasebackend(backend); }
Source:
<code>public PairDevice(@NonNull String name, @NonNull String guid, boolean connected) { <START> if (name.isEmpty() || guid.isEmpty()) { <END> throw new IllegalArgumentException("Empty name/guid is not allowed"); } mName = name; mGuid = guid; mConnected = connected; }</code><technical_language>Preconditions.checkStringNotEmpty similar other people</technical_language>

Target:
public PairDevice(@NonNull String name, @NonNull String guid, boolean connected) { Preconditions.checkStringNotEmpty(name); Preconditions.checkStringNotEmpty(guid); mName = name; mGuid = guid; mConnected = connected; }
Source:
<code>public RDF4JQuad asQuad(final Statement statement) { <START> return new QuadImpl(statement, salt); <END> }</code><technical_language>is issues static methods accept arbitrary salt UUID, while this internal private salt is guaranteed (as practicable, is reasoning UUID) user submits other methods. prevent errors in future if instance methods for operations, state (the salt, essentially) maintained privately flow user code</technical_language>

Target:
public RDF4JQuad asQuad(final Statement statement) { return rdf4j.createQuadImpl(statement, salt); }
Source:
<code>public void processAst(IASTTranslationUnit ast) { String regex = getRegex(); if (regex == null || regex.isEmpty()) regex = DEF_REGEX; try { <START> fPattern = Pattern.compile(regex, Pattern.MULTILINE | Pattern.DOTALL); <END> } catch (PatternSyntaxException e) { CodanCheckersActivator.log(e); return; } IASTComment[] comments = ast.getComments(); if (comments == null) { setProblem(); return; } Result found = Result.NOT_FOUND; for (IASTComment comment : comments) { found = processComment(comment); if (found == Result.FOUND || found == Result.FOUND_MATCH) break; } if (found != Result.FOUND_MATCH) setProblem(); }</code><technical_language>PS. For worth, example "Copyrsight" miss spelt</technical_language>

Target:
public void processAst(IASTTranslationUnit ast) { multiLine = false; lastOffset = 0; builder.setLength(0); String regex = getRegex(); if (regex == null || regex.isEmpty()) regex = DEF_REGEX; try { fPattern = Pattern.compile(regex, Pattern.MULTILINE | Pattern.DOTALL); } catch (PatternSyntaxException e) { CodanCheckersActivator.log(e); return; } IASTComment[] comments = ast.getComments(); if (comments == null) { setProblem(); return; } Result found = Result.NOT_FOUND; for (IASTComment comment : comments) { found = processComment(comment); if (found == Result.FOUND || found == Result.FOUND_MATCH) break; } if (found == Result.NOT_FOUND && multiLine) { String c = builder.toString(); if (!fPattern.matcher(c).matches()) { setProblem(); } } else if (found != Result.FOUND_MATCH) setProblem(); }
Source:
<code><START> public void toStream(JsonStream writer) throws java.io.IOException { <END> writer.beginObject(); writer.name("id").value(packageName); writer.name("name").value(appName); writer.name("packageName").value(packageName); writer.name("versionName").value(versionName); writer.name("versionCode").value(versionCode); writer.name("version").value(getAppVersion()); writer.name("releaseStage").value(getReleaseStage()); writer.endObject(); }</code><technical_language>a lot of these..</technical_language>

Target:
public void toStream(JsonStream writer) throws IOException { writer.beginObject(); writer.name("id").value(packageName); writer.name("name").value(appName); writer.name("packageName").value(packageName); writer.name("versionName").value(versionName); writer.name("versionCode").value(versionCode); writer.name("version").value(getAppVersion()); writer.name("releaseStage").value(getReleaseStage()); writer.endObject(); }
Source:
<code>public ImageTemplate buildImageTemplateFromNode(String name, String id) { Server server = api.serverApi().getServer(id); if (server == null) throw new NoSuchElementException("Cannot find server with id: " + id); List<Storage> storages = server.storages(); <START> if (storages.isEmpty() || !Iterables.tryFind(storages, matchBootDevice).isPresent()) <END> throw new NoSuchElementException("Server " + id + " does not contain a boot device"); return new ImageTemplateBuilder.CloneImageTemplateBuilder().nodeId(id).name(name).build(); }</code><technical_language>storages.isEmpty() is redundant, remove it. reads as: if (!Iterables.any(storages, matchBootDevice))</technical_language>

Target:
public ImageTemplate buildImageTemplateFromNode(String name, String id) { Server server = api.serverApi().getServer(id); if (server == null) throw new NoSuchElementException("Cannot find server with id: " + id); List<Storage> storages = server.storages(); if (!Iterables.any(storages, matchBootDevice)) throw new NoSuchElementException("Server " + id + " does not contain a boot device"); return new ImageTemplateBuilder.CloneImageTemplateBuilder().nodeId(id).name(name).build(); }
Source:
<code>private static String checkVoltDBKitExistence(String newKitPath) { Path newKit = Paths.get(newKitPath); if (Files.exists(newKit) && Files.isDirectory(newKit)) { try { String version = new String(Files.readAllBytes(Paths.get(newKitPath, "version.txt"))); System.out.println("Check VoltDB Kit: version is " + version); String[] versionNumber = version.split("\\."); if (versionNumber.length < 2) { return "Illegal version string format found in " + newKitPath; } int majorVersion = Integer.parseInt(versionNumber[0].trim()); int minorVersion = Integer.parseInt(versionNumber[1].trim()); if ( majorVersion < MINIMUM_MAJOR_VERSION || (majorVersion == MINIMUM_MAJOR_VERSION && minorVersion < MINIMUM_MINOR_VERSION)) { return "Version of new VoltDB kit is lower than the minimum supported version (v" + MINIMUM_MAJOR_VERSION + "." + MINIMUM_MINOR_VERSION + ")"; } else { return "Success"; } } catch (IOException | NumberFormatException e) { return "Failed to parse version string in the new VoltDB kit"; } } else { <START> return newKitPath + " doesn't exist."; <END> } }</code><technical_language>Return error message for 1. ! Files.exists(newKit) 2. ! Files.isDirectory(newKit) Do early return for cases, save indentations</technical_language>

Target:
private static String checkVoltDBKitExistence(String newKitPath) { Path newKit = Paths.get(newKitPath); if (!Files.exists(newKit)) { return newKitPath + " doesn't exist."; } else if (Files.isDirectory(newKit)) { return newKitPath + " is not a directory."; } try { String version = new String(Files.readAllBytes(Paths.get(newKitPath, "version.txt"))); System.out.println("Check VoltDB Kit: version is " + version); String[] versionNumber = version.split("\\."); if (versionNumber.length < 2) { return "Illegal version string format found in " + newKitPath + ": " + version; } int majorVersion = Integer.parseInt(versionNumber[0].trim()); int minorVersion = Integer.parseInt(versionNumber[1].trim()); if ( majorVersion < MINIMUM_MAJOR_VERSION || (majorVersion == MINIMUM_MAJOR_VERSION && minorVersion < MINIMUM_MINOR_VERSION)) { return "Version of new VoltDB kit is lower than the minimum supported version (v" + MINIMUM_MAJOR_VERSION + "." + MINIMUM_MINOR_VERSION + ")"; } else { return SUCCESS; } } catch (IOException | NumberFormatException e) { return "Failed to parse version string in the new VoltDB kit"; } }
Source:
<code>Set<String> getUpInstances() { Set<String> upInstances = new HashSet<>(); for (MockHelixAdmin helixAdmin : helixAdmins.values()) { upInstances.addAll(helixAdmin.getUpInstances()); } dataCenterToZkAddress.values() .stream() .filter(info -> info.getReplicaType() == ReplicaType.CLOUD_BACKED) <START> .forEach(info -> upInstances.add(ClusterMapUtils.getInstanceName(info.getDcName(), -1))); <END> return upInstances; }</code><technical_language>Suggest a constant for -1 put TestUtil shared tests</technical_language>

Target:
Set<String> getUpInstances() { Set<String> upInstances = new HashSet<>(); for (MockHelixAdmin helixAdmin : helixAdmins.values()) { upInstances.addAll(helixAdmin.getUpInstances()); } dataCenterToZkAddress.values() .stream() .filter(info -> info.getReplicaType() == ReplicaType.CLOUD_BACKED) .forEach(info -> upInstances.add(ClusterMapUtils.getInstanceName(info.getDcName(), UNKNOWN_PORT))); return upInstances; }
Source:
<code>public void shouldUpdatePatientList_allOk() { List<Patient> patientList = new ArrayList<>(); Patient patient = createPatient(1l); patientList.add(patient); String mQuery = "someQuery"; when(StringUtils.notNull(anyString())).thenReturn(true); <START> when(FilterUtil.getPatientsFilteredByQuery(patientList, mQuery)).thenReturn(patientList); <END> when(patientDAO.getAllPatients()).thenReturn(patientList); presenter.setQuery(mQuery); presenter.updatePatientsList(); int NO_STRING_ID = R.string.last_vitals_none_label; verify(view).updateListVisibility(true, NO_STRING_ID, null); verify(view).updateAdapter(patientList); }</code><technical_language>mock this ? This test filtering. In ACUnitTestBase method create Patient, build a list if filtering returns proper list</technical_language>

Target:
public void shouldUpdatePatientList_allOk() { Patient patient = createPatient(1l, mQuery); patientList.add(patient); when(StringUtils.notNull(anyString())).thenReturn(true); when(patientDAO.getAllPatients()).thenReturn(Observable.just(patientList)); presenter.setQuery(mQuery); presenter.updatePatientsList(); verify(view).updateListVisibility(true, NO_STRING_ID, null); verify(view).updateAdapter(patientList); }
Source:
<code>protected ListenableFuture<HttpResponse> invokeAsync(final HttpURLConnection nativeRequest) { <START> throw new UnsupportedOperationException("unsupported operation"); <END> }</code><technical_language>Add some more information users is supported Async calls in general, suggest a HTTP driver</technical_language>

Target:
protected ListenableFuture<HttpResponse> invokeAsync(final HttpURLConnection nativeRequest) { throw new UnsupportedOperationException("Async calls are not supported. " + "Please use ApacheHC or OkHttp driver"); }
Source:
<code>public void write(ChannelHandlerContext ctx, Object msg, ChannelPromise promise) <START> throws Exception { <END> if (requestInProgress) { if (msg instanceof HttpResponse) { HttpResponse response = (HttpResponse) msg; logHeaders("Response", response, publicAccessLogger.getResponseHeaders()); logMessage.append(", "); logMessage.append("status=").append(response.getStatus().code()); logMessage.append(", "); if (!HttpHeaders.isTransferEncodingChunked(response)) { requestInProgress = false; logDurations(); publicAccessLogger.logInfo(logMessage); } else { this.responseFirstChunkStartTimeInMs = System.currentTimeMillis(); } } else if (msg instanceof HttpContent) { HttpContent httpContent = (HttpContent) msg; if (httpContent instanceof LastHttpContent) { requestInProgress = false; logDurations(); publicAccessLogger.logInfo(logMessage); } } else { logger.error("Sending response (writeRequested) that is not of type HttpResponse or HttpChunk. " + "Sending response to " + ctx.channel().remoteAddress() + ". " + "Request is of type " + msg.getClass() + ". " + "No action being taken other than logging this unexpected state."); } } else { logger.error("Sending response (writeRequested) without any request in progress. " + "Sending response to " + ctx.channel().remoteAddress() + ". " + "No action being taken other than logging this unexpected state."); } super.write(ctx, msg, promise); }</code><technical_language>remove throws Exception if functions do throw (or throw a smaller set of exceptions)</technical_language>

Target:
public void write(ChannelHandlerContext ctx, Object msg, ChannelPromise promise) throws Exception { if (request != null) { boolean recognized = false; if (msg instanceof HttpResponse) { recognized = true; HttpResponse response = (HttpResponse) msg; logHeaders("Response", response, publicAccessLogger.getResponseHeaders()); logMessage.append(", "); logMessage.append("status=").append(response.getStatus().code()); logMessage.append(", "); if (HttpHeaders.isTransferEncodingChunked(response)) { responseFirstChunkStartTimeInMs = System.currentTimeMillis(); } } if (msg instanceof LastHttpContent) { recognized = true; logDurations(); publicAccessLogger.logInfo(logMessage.toString()); reset(); } if (!recognized && !(msg instanceof HttpContent)) { logger.error("Sending response (writeRequested) that is not of type HttpResponse or HttpContent. " + "Sending response to " + ctx.channel().remoteAddress() + ". " + "Request is of type " + msg.getClass() + ". " + "No action being taken other than logging this unexpected state."); } } else { logger.error("Sending response (writeRequested) without any request in progress. " + "Sending response to " + ctx.channel().remoteAddress() + ". " + "No action being taken other than logging this unexpected state."); } super.write(ctx, msg, promise); }