auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>public static FxSwap ofForwardPoints( CurrencyAmount amount, FxRate nearRate, double decimalForwardPoints, LocalDate nearDate, LocalDate farDate) { Currency currency1 = amount.getCurrency(); ArgChecker.isTrue( nearRate.getPair().contains(currency1), <START> Messages.format("Amount and FX rate have a currency in common: and {}", amount, nearDate)); <END> FxRate farRate = FxRate.of(nearRate.getPair(), nearRate.fxRate(nearRate.getPair()) + decimalForwardPoints); FxSingle nearLeg = FxSingle.of(amount, nearRate, nearDate); FxSingle farLeg = FxSingle.of(amount.negated(), farRate, farDate); return of(nearLeg, farLeg); }</code><technical_language>Message be: "Amount FX rate **must** a currency in common: {}", parameter **nearRate** nearDate</technical_language>

Target:
public static FxSwap ofForwardPoints( CurrencyAmount amount, FxRate nearRate, double decimalForwardPoints, LocalDate nearDate, LocalDate farDate) { Currency currency1 = amount.getCurrency(); ArgChecker.isTrue( nearRate.getPair().contains(currency1), Messages.format("Amount and FX rate have no currency in common: and {}", amount, nearRate)); FxRate farRate = FxRate.of(nearRate.getPair(), nearRate.fxRate(nearRate.getPair()) + decimalForwardPoints); FxSingle nearLeg = FxSingle.of(amount, nearRate, nearDate); FxSingle farLeg = FxSingle.of(amount.negated(), farRate, farDate); return of(nearLeg, farLeg); }
Source:
<code><START> public InstructorAttributes getCopy() { <END> return builder(courseId, name, email) .withGoogleId(googleId).withKey(key).withRole(role).withDisplayedName(displayedName) .withPrivileges(privileges).withIsDisplayedToStudents(isDisplayedToStudents).withIsArchived(isArchived) .build(); }</code><technical_language>is shadow copy technically, fields immutable (so issue fields)</technical_language>

Target:
public InstructorAttributes getCopy() { return builder(googleId, courseId, name, email) .withKey(key).withRole(role).withDisplayedName(displayedName) .withPrivileges(privileges).withIsDisplayedToStudents(isDisplayedToStudents).withIsArchived(isArchived) .build(); }
Source:
<code>private String restoreAsync( SolrClient client, String collection, String backupLocation, String backupName) throws IOException, SolrServerException { if (canRestore(client, collection)) { CollectionAdminRequest.Restore restore = CollectionAdminRequest.AsyncCollectionAdminRequest.restoreCollection( collection, backupName) .setLocation(backupLocation); String requestId = restore.processAsync(client); LOGGER.debug("Restore request Id: {}", requestId); return requestId; } else { <START> LOGGER.info("Unable to restore: {}, collection already exists", collection); <END> return null; } }</code><technical_language>do restore() restoreAsync() print log messages levels in else case</technical_language>

Target:
private String restoreAsync( SolrClient client, String collection, String backupLocation, String backupName) throws IOException, SolrServerException { if (canRestore(client, collection)) { CollectionAdminRequest.Restore restore = CollectionAdminRequest.AsyncCollectionAdminRequest.restoreCollection( collection, backupName) .setLocation(backupLocation); String requestId = restore.processAsync(client); LOGGER.debug("Restore request Id: {}", requestId); return requestId; } else { printErrorMessage( String.format("Unable to restore %s, collection already exists.", collection)); LOGGER.debug("Unable to restore: {}, collection already exists", collection); return null; } }
Source:
<code>public int getPluginId() { <START> return 90303; <END> }</code><technical_language>Done in: <LINK_0></technical_language>

Target:
public int getPluginId() { return 90002; }
Source:
<code>public static CsvFile of(CharSource source, boolean headerRow) { ArgChecker.notNull(source, "source"); List<ImmutableList<String>> lines; try { lines = parse(source); } catch (IOException e) { throw new UncheckedIOException(e); } if (headerRow) { if (lines.isEmpty()) { throw new IllegalArgumentException("Could not read header row from empty CSV file"); } ImmutableList<String> headers = lines.remove(0); ImmutableList<String> searchHeaders = headers.stream() .map(h -> h.toLowerCase()) <START> .collect(Builder<String>::new, Builder<String>::add, (b1, b2) -> b1.addAll(b2.build())) <END> .build(); ImmutableList<ImmutableList<String>> dataLines = ImmutableList.copyOf(lines); return new CsvFile(headers, searchHeaders, dataLines); } else { return new CsvFile(ImmutableList.copyOf(lines)); } }</code><technical_language>Guavate.toImmutableList()</technical_language>

Target:
public static CsvFile of(CharSource source, boolean headerRow) { ArgChecker.notNull(source, "source"); List<ImmutableList<String>> lines; try { lines = parse(source); } catch (IOException ex) { throw new UncheckedIOException(ex); } if (headerRow) { if (lines.isEmpty()) { throw new IllegalArgumentException("Could not read header row from empty CSV file"); } ImmutableList<String> headers = lines.remove(0); ImmutableList<ImmutableList<String>> dataLines = ImmutableList.copyOf(lines); return new CsvFile(headers, dataLines); } else { return new CsvFile(ImmutableList.copyOf(lines)); } }
Source:
<code>private void clearAllNotifications() { int numChildren = mStackScroller.getChildCount(); final ArrayList<View> viewsToHide = new ArrayList<View>(numChildren); for (int i = 0; i < numChildren; i++) { final View child = mStackScroller.getChildAt(i); if (child instanceof ExpandableNotificationRow) { if (mStackScroller.canChildBeDismissed(child)) { if (child.getVisibility() == View.VISIBLE) { viewsToHide.add(child); } } ExpandableNotificationRow row = (ExpandableNotificationRow) child; List<ExpandableNotificationRow> children = row.getNotificationChildren(); if (row.areChildrenExpanded() && children != null) { for (ExpandableNotificationRow childRow : children) { if (childRow.getVisibility() == View.VISIBLE) { viewsToHide.add(childRow); } } } } } if (viewsToHide.isEmpty()) { animateCollapsePanels(CommandQueue.FLAG_EXCLUDE_NONE); return; } addPostCollapseAction(new Runnable() { @Override public void run() { mStackScroller.setDismissAllInProgress(false); try { <START> mBarService.onClearAllNotifications(mCurrentUserId); <END> } catch (Exception ex) { } for (View v : viewsToHide) { if (!(v instanceof ExpandableNotificationRow)) { continue; } StatusBarNotification sbn = ((ExpandableNotificationRow)v).getStatusBarNotification(); if (!sbn.isClearable()) { mStackScroller.snapView(v, false ); } } } }); performDismissAllAnimations(viewsToHide); }</code><technical_language>this is done in another service clears clearable ones, clearability updated there</technical_language>

Target:
private void clearAllNotifications() { int numChildren = mStackScroller.getChildCount(); final ArrayList<View> viewsToHide = new ArrayList<View>(numChildren); for (int i = 0; i < numChildren; i++) { final View child = mStackScroller.getChildAt(i); if (child instanceof ExpandableNotificationRow) { if (mStackScroller.canChildBeDismissed(child)) { if (child.getVisibility() == View.VISIBLE) { viewsToHide.add(child); } } ExpandableNotificationRow row = (ExpandableNotificationRow) child; List<ExpandableNotificationRow> children = row.getNotificationChildren(); if (row.areChildrenExpanded() && children != null) { for (ExpandableNotificationRow childRow : children) { if (childRow.getVisibility() == View.VISIBLE) { viewsToHide.add(childRow); } } } } } if (viewsToHide.isEmpty()) { animateCollapsePanels(CommandQueue.FLAG_EXCLUDE_NONE); return; } addPostCollapseAction(new Runnable() { @Override public void run() { mStackScroller.setDismissAllInProgress(false); try { mBarService.onClearAllNotifications(mCurrentUserId); } catch (Exception ex) { } } }); performDismissAllAnimations(viewsToHide); }
Source:
<code>private List<ElasticsearchEdge> getElasticsearchEdges(SearchHits hits, FetchHints fetchHints, Authorizations authorizations) { return StreamUtils.stream(hits) .map(hit -> { String inVertexId = null; String outVertexId = null; String label = null; <START> if (fetchHints.equals(FetchHints.EDGE_REFS)) { <END> inVertexId = hit.getField(Elasticsearch5SearchIndex.IN_VERTEX_ID_FIELD_NAME).getValue(); outVertexId = hit.getField(Elasticsearch5SearchIndex.OUT_VERTEX_ID_FIELD_NAME).getValue(); label = hit.getField(Elasticsearch5SearchIndex.EDGE_LABEL_FIELD_NAME).getValue(); } String elementId = hit.getField(Elasticsearch5SearchIndex.ELEMENT_ID_FIELD_NAME).getValue(); return new ElasticsearchEdge( getGraph(), elementId, label, inVertexId, outVertexId, fetchHints, authorizations ); }).collect(Collectors.toList()); }</code><technical_language>need this check. FetchHints.EDGE_REFS applied vertices. in, out, label in search result anyway</technical_language>

Target:
private List<ElasticsearchEdge> getElasticsearchEdges(SearchHits hits, FetchHints fetchHints, Authorizations authorizations) { return stream(hits) .map(hit -> { String inVertexId = hit.getField(Elasticsearch5SearchIndex.IN_VERTEX_ID_FIELD_NAME).getValue(); String outVertexId = hit.getField(Elasticsearch5SearchIndex.OUT_VERTEX_ID_FIELD_NAME).getValue(); String label = hit.getField(Elasticsearch5SearchIndex.EDGE_LABEL_FIELD_NAME).getValue(); String elementId = hit.getField(Elasticsearch5SearchIndex.ELEMENT_ID_FIELD_NAME).getValue(); return new ElasticsearchEdge( getGraph(), elementId, label, inVertexId, outVertexId, fetchHints, authorizations ); }).collect(Collectors.toList()); }
Source:
<code>public void testNoSetting() throws <START> IOException, InterruptedException { <END> Process start = processBuilder.start(); start.waitFor(); assertEquals( "http.proxyHost: null, http.proxyPort: null, https.proxyHost: null, https.proxyPort: null", getOutput(start)); }</code><technical_language>enough declare Exception here? exception fail test, of specific type</technical_language>

Target:
public void testNoSetting() throws Exception { Process start = processBuilder.start(); start.waitFor(); assertEquals( "http.proxyHost: null, http.proxyPort: null, https.proxyHost: null, https.proxyPort: null", getOutput(start)); }
Source:
<code>public void initialize() { <START> if(Config.<Boolean>getValue(ConfigValues.BackupCheckPeriodInHours)) { <END> log.info("Start initializing {}", getClass().getSimpleName()); Integer backupCheckPeriodInHours = Config.<Integer> getValue(ConfigValues.BackupCheckPeriodInHours); if (backupCheckPeriodInHours > 0) { SchedulerUtilQuartzImpl.getInstance().scheduleAFixedDelayJob(this, "backupCheck", new Class[]{}, new Object[]{}, backupCheckPeriodInHours, backupCheckPeriodInHours, TimeUnit.HOURS); log.info("Finished initializing {}", getClass().getSimpleName()); } } }</code><technical_language>refer BackupCheckPeriodInHours a boolean ? This return false. Please fetch is Integer apply logic if this feature is enabled not. If this feature enable - please add a warning engine.log consider warning audit log</technical_language>

Target:
public void initialize() { log.info("Start initializing {}", getClass().getSimpleName()); Integer backupCheckPeriodInHours = Config.<Integer>getValue(ConfigValues.BackupCheckPeriodInHours); if (backupCheckPeriodInHours > 0) { SchedulerUtilQuartzImpl.getInstance().scheduleAFixedDelayJob(this, "backupCheck", new Class[] { }, new Object[] { }, backupCheckPeriodInHours, backupCheckPeriodInHours, TimeUnit.HOURS); log.info("Finished initializing {}", getClass().getSimpleName()); } }
Source:
<code>public ValidationResult isSparsifySupported() { <START> if (disk.getDiskStorageType() == DiskStorageType.IMAGE) { <END> StorageDomain diskStorageDomain = Injector.get(StorageDomainDao.class) .get(((DiskImage) disk).getStorageIds().get(0)); if (diskStorageDomain.getStorageType().isFileDomain()) { return ValidationResult.VALID; } else if (diskStorageDomain.getStorageType().isBlockDomain()) { if (disk.isWipeAfterDelete() && !diskStorageDomain.getSupportsDiscardZeroesData()) { return new ValidationResult(EngineMessage .ACTION_TYPE_FAILED_DISK_SPARSIFY_NOT_SUPPORTED_BY_UNDERLYING_STORAGE_WHEN_WAD_IS_ENABLED, getStorageDomainNameVarReplacement(diskStorageDomain), getDiskAliasVarReplacement()); } return ValidationResult.VALID; } return new ValidationResult(EngineMessage.ACTION_TYPE_FAILED_DISK_SPARSIFY_NOT_SUPPORTED_BY_STORAGE_TYPE, getDiskAliasVarReplacement(), getStorageDomainNameVarReplacement(diskStorageDomain), ReplacementUtils.createSetVariableString("storageType", diskStorageDomain.getStorageType())); } return new ValidationResult(EngineMessage.ACTION_TYPE_FAILED_DISK_SPARSIFY_NOT_SUPPORTED_BY_DISK_STORAGE_TYPE, getDiskAliasVarReplacement(), ReplacementUtils.createSetVariableString("diskStorageType", disk.getDiskStorageType())); }</code><technical_language>This method is barely readable, please change early return image? return error File domain? return valid rest</technical_language>

Target:
public ValidationResult isSparsifySupported() { if (disk.getDiskStorageType() != DiskStorageType.IMAGE) { return new ValidationResult( EngineMessage.ACTION_TYPE_FAILED_DISK_SPARSIFY_NOT_SUPPORTED_BY_DISK_STORAGE_TYPE, getDiskAliasVarReplacement(), ReplacementUtils.createSetVariableString("diskStorageType", disk.getDiskStorageType())); } StorageDomain diskStorageDomain = Injector.get(StorageDomainDao.class) .get(((DiskImage) disk).getStorageIds().get(0)); if (diskStorageDomain.getStorageType().isFileDomain()) { return ValidationResult.VALID; } if (diskStorageDomain.getStorageType().isBlockDomain()) { if (disk.isWipeAfterDelete() && !diskStorageDomain.getSupportsDiscardZeroesData()) { return new ValidationResult(EngineMessage .ACTION_TYPE_FAILED_DISK_SPARSIFY_NOT_SUPPORTED_BY_UNDERLYING_STORAGE_WHEN_WAD_IS_ENABLED, getStorageDomainNameVarReplacement(diskStorageDomain), getDiskAliasVarReplacement()); } return ValidationResult.VALID; } return new ValidationResult(EngineMessage.ACTION_TYPE_FAILED_DISK_SPARSIFY_NOT_SUPPORTED_BY_STORAGE_TYPE, getDiskAliasVarReplacement(), getStorageDomainNameVarReplacement(diskStorageDomain), ReplacementUtils.createSetVariableString("storageType", diskStorageDomain.getStorageType())); }
Source:
<code>public void testFailFastHeaderTooLong() { EmbeddedChannel fastFailCh = new EmbeddedChannel(new HAProxyMessageDecoder(true)); String headerPart1 = "PROXY TCP4 192.168.0.1 192.168.0.11 56324 " + "000000000000000000000000000000000000000000000000000000000000000000000443"; exceptionRule.expect(HAProxyProtocolException.class); exceptionRule.expectMessage("over " + headerPart1.length()); <START> fastFailCh.writeInbound(copiedBuffer(headerPart1, CharsetUtil.US_ASCII)); <END> }</code><technical_language>please call slowFailCh.finishAndReleaseAll() in a finally block assert return value</technical_language>

Target:
public void testFailFastHeaderTooLong() { EmbeddedChannel fastFailCh = new EmbeddedChannel(new HAProxyMessageDecoder(true)); try { String headerPart1 = "PROXY TCP4 192.168.0.1 192.168.0.11 56324 " + "000000000000000000000000000000000000000000000000000000000000000000000443"; exceptionRule.expect(HAProxyProtocolException.class); exceptionRule.expectMessage("over " + headerPart1.length()); assertFalse(fastFailCh.writeInbound(copiedBuffer(headerPart1, CharsetUtil.US_ASCII))); } finally { assertFalse(fastFailCh.finishAndReleaseAll()); } }
Source:
<code>public @Nullable Integer resolve(ITmfEvent event) { try { <START> return resolve(event, false, new NullProgressMonitor()); <END> } catch (InterruptedException e) { return null; } }</code><technical_language>static private NullProgressMonitor is passed instead of creating a NullProgressMonitor for event</technical_language>

Target:
public @Nullable Integer resolve(ITmfEvent event) { try { return resolve(event, false, NULL_MONITOR); } catch (InterruptedException e) { return null; } }
Source:
<code>public PreparedStatement lookupStatement(GenericStatement statement) throws StandardException{ GenericStorablePreparedStatement ps = getDataDictionary().getDataDictionaryCache().statementCacheFind(statement); if (ps==null) { <START> String sqlText = statement.getSource().toUpperCase(); if ((sqlText.startsWith("CREATE") || sqlText.startsWith("DECLARE")) && sqlText.contains("IF NOT EXISTS")){ return null; } <END> ps = new GenericStorablePreparedStatement(statement); getDataDictionary().getDataDictionaryCache().statementCacheAdd(statement,ps); } synchronized(ps){ if(ps.upToDate()){ GeneratedClass ac=ps.getActivationClass(); int currentClasses=getLanguageConnectionFactory().getClassFactory().getClassLoaderVersion(); if(ac.getClassLoaderVersion()!=currentClasses){ ps.makeInvalid(DependencyManager.INTERNAL_RECOMPILE_REQUEST,this); } } } return ps; }</code><technical_language>do need this</technical_language>

Target:
public PreparedStatement lookupStatement(GenericStatement statement) throws StandardException{ GenericStorablePreparedStatement ps = getDataDictionary().getDataDictionaryCache().statementCacheFind(statement); if (ps==null) { ps = new GenericStorablePreparedStatement(statement); getDataDictionary().getDataDictionaryCache().statementCacheAdd(statement,ps); } synchronized(ps){ if(ps.upToDate()){ GeneratedClass ac=ps.getActivationClass(); int currentClasses=getLanguageConnectionFactory().getClassFactory().getClassLoaderVersion(); if(ac.getClassLoaderVersion()!=currentClasses){ ps.makeInvalid(DependencyManager.INTERNAL_RECOMPILE_REQUEST,this); } } } return ps; }
Source:
<code>public void dispose() { phone.mCM.unregisterForSIMReady(this); phone.mCM.unregisterForOffOrNotAvailable( this); phone.mCM.unSetOnIccRefresh(this); <START> this.removeCallbacksAndMessages(null); <END> this.recordsLoadedRegistrants = null; this.mCphsInfo = null; this.efMWIS = null; this.efCPHS_MWI =null; this.mEfCff = null; this.mEfCfis = null; this.spnState = null; this.adnCache = null; this.mVmConfig = null; this.spdiNetworks = null; this.phone = null; }</code><technical_language>this.removeCallbacksAndMessages(null) instead. Done in Patch set 2</technical_language>

Target:
public void dispose() { phone.mCM.unregisterForSIMReady(this); phone.mCM.unregisterForOffOrNotAvailable( this); phone.mCM.unSetOnIccRefresh(this); }
Source:
<code>protected AbstractIndexedFastaSequenceFile(final Path path) throws FileNotFoundException { <START> this(path, new FastaSequenceIndex((findRequiredFastaIndexFile(path)))); <END> }</code><technical_language>extra ()</technical_language>

Target:
protected AbstractIndexedFastaSequenceFile(final Path path) throws FileNotFoundException { this(path, new FastaSequenceIndex(findRequiredFastaIndexFile(path))); }
Source:
<code>public VViewModelProperties inherit() { final VDefaultViewModelProperties properties = VViewFactory.eINSTANCE.createDefaultViewModelProperties(); <START> properties.getInheritableProperties().addAll(getInheritableProperties().entrySet()); <END> return properties; }</code><technical_language>needs cloning</technical_language>

Target:
public VViewModelProperties inherit() { final VDefaultViewModelProperties properties = VViewFactory.eINSTANCE.createDefaultViewModelProperties(); for (final Entry<String, Object> entry : getInheritableProperties().entrySet()) { properties.getInheritableProperties().put(entry.getKey(), entry.getValue()); } return properties; }
Source:
<code>public void channelRead(ChannelHandlerContext ctx, Object msg) throws Exception { if (msg instanceof ByteBuf) { CodecOutputList out = CodecOutputList.newInstance(); try { ByteBuf data = (ByteBuf) msg; first = cumulation == null; if (first) { cumulation = data; } else { cumulation = cumulator.cumulate(ctx.alloc(), cumulation, data); } callDecode(ctx, cumulation, out); } catch (DecoderException e) { throw e; } catch (Exception e) { throw new DecoderException(e); } finally { if (cumulation != null && !cumulation.isReadable()) { numReads = 0; cumulation.release(); cumulation = null; } else if (++ numReads >= discardAfterReads) { numReads = 0; discardSomeReadBytes(); } int size = out.size(); if (size == 0) { decodeWasNull = true; } else if (size == 1) { ctx.fireChannelRead(out.get(0)); } else { <START> ArrayList<Object> ret = new ArrayList<Object>(size); <END> for (int i = 0; i < size; i++) { ret.add(out.get(i)); } ctx.fireChannelRead(ret); } out.recycle(); } } else { ctx.fireChannelRead(msg); } }</code><technical_language>return out list (instead of alloc/copy new list), if get subsequently recycled. Ideally consuming handler recycle need more type (maybe define a RecyclableList interface). @normanmaurer wondering existing RecyclableArrayList instead of "custom" CodecOutputList. Is ensure reused Recycler is globally disabled</technical_language>

Target:
public void channelRead(ChannelHandlerContext ctx, Object msg) throws Exception { if (msg instanceof ByteBuf) { CodecOutputList out = CodecOutputList.newInstance(); try { ByteBuf data = (ByteBuf) msg; first = cumulation == null; if (first) { cumulation = data; } else { cumulation = cumulator.cumulate(ctx.alloc(), cumulation, data); } callDecode(ctx, cumulation, out); } catch (DecoderException e) { throw e; } catch (Exception e) { throw new DecoderException(e); } finally { if (cumulation != null && !cumulation.isReadable()) { numReads = 0; cumulation.release(); cumulation = null; } else if (++ numReads >= discardAfterReads) { numReads = 0; discardSomeReadBytes(); } int size = out.size(); firedChannelRead |= out.insertSinceRecycled(); fireChannelRead(ctx, out, size); out.recycle(); } } else { ctx.fireChannelRead(msg); } }
Source:
<code>public void forEach(Consumer<E> consumer) { for (Entry<Provider<E>, Collection<E>> entry : elementMap.entrySet()) { entry.getValue().forEach(consumer); <START> } <END> }</code><technical_language>new methods a protected modifier instead of a public modifier</technical_language>

Target:
protected void forEach(Consumer<E> consumer) { for (Entry<Provider<E>, Collection<E>> entry : elementMap.entrySet()) { entry.getValue().forEach(consumer); } }
Source:
<code>public void testListTablesWithEmptyElement() throws IOException { try (Admin admin = getConnection().getAdmin()) { sharedTestEnv.createTable(sharedTestEnv.newTestTableName()); Exception actualError = null; <START> try {; <END> assertTrue(admin.listTables((Pattern) null).length > 0); } catch (Exception e) { actualError = e; } assertNull(actualError); try { admin.listTables((String) null); } catch (Exception e) { actualError = e; } assertNotNull(actualError); assertTrue(actualError instanceof NullPointerException); actualError = null; try { assertEquals(0, admin.listTables("").length); } catch (Exception e) { actualError = e; } assertNull(actualError); } }</code><technical_language>I ; is a typo</technical_language>

Target:
public void testListTablesWithEmptyElement() throws IOException { try (Admin admin = getConnection().getAdmin()) { sharedTestEnv.createTable(sharedTestEnv.newTestTableName()); assertTrue(admin.listTables((Pattern) null).length > 0); Exception actualError = null; try { admin.listTables((String) null); } catch (Exception e) { actualError = e; } assertNotNull(actualError); assertTrue(actualError instanceof NullPointerException); assertEquals(0, admin.listTables("").length); } }
Source:
<code>private void checkAndHandleIfGivenMBusAlreadyCoupled(final SmartMeter mbusDevice) throws FunctionalException { if (mbusDevice.getGatewayDevice() != null) { LOGGER.info("The given M-bus device is coupled to gateway on channel {}", mbusDevice.getDeviceIdentification(), mbusDevice.getGatewayDevice().getDeviceIdentification(), mbusDevice.getChannel()); throw new FunctionalException(FunctionalExceptionType.GIVEN_MBUS_DEVICE_ALREADY_COUPLED, <START> ComponentType.DOMAIN_SMART_METERING, new ChannelAlreadyOccupiedException(mbusDevice.getChannel())); <END> } }</code><technical_language>ChannelAlreadyOccupiedException appropriate. M-Bus device connected a gateway in OSGP DB (which a request). exception a channel gateway device request is occupied, case</technical_language>

Target:
private void checkAndHandleIfGivenMBusAlreadyCoupled(final SmartMeter mbusDevice) throws FunctionalException { if (mbusDevice.getGatewayDevice() != null) { LOGGER.info("The given M-bus device is already coupled to gateway on channel {}", mbusDevice.getDeviceIdentification(), mbusDevice.getGatewayDevice().getDeviceIdentification(), mbusDevice.getChannel()); throw new FunctionalException(FunctionalExceptionType.GIVEN_MBUS_DEVICE_ALREADY_COUPLED, ComponentType.DOMAIN_SMART_METERING, new OsgpException(ComponentType.DOMAIN_SMART_METERING, mbusDevice.getDeviceIdentification() + " is already coupled to gateway " + mbusDevice.getGatewayDevice().getDeviceIdentification())); } }
Source:
<code>public boolean isSupported() { String mimeType = file.getMIMEType(); if (StringUtils.isEmpty(mimeType)) { FileTypeDetector fileTypeDetector = null; try { fileTypeDetector = new FileTypeDetector(); } catch (FileTypeDetector.FileTypeDetectorInitException ex) { <START> logger.log(Level.WARNING, "Unable to create file type detector for determining MIME type."); <END> return false; } mimeType = fileTypeDetector.getMIMEType(file); if (!StringUtils.isEmpty(mimeType)) file.setMIMEType(mimeType); } return PLAIN_TEXT_MIME_TYPE.equals(mimeType); }</code><technical_language>@rcordovano wondering if log this severe? I typically try reserve severe for errors compromise case, I if unable instantiate FileTypeDetector class, needs investigated</technical_language>

Target:
public boolean isSupported() { String mimeType = file.getMIMEType(); if (StringUtils.isEmpty(mimeType)) { FileTypeDetector fileTypeDetector = null; try { fileTypeDetector = new FileTypeDetector(); } catch (FileTypeDetector.FileTypeDetectorInitException ex) { logger.log(Level.SEVERE, "Unable to create file type detector for determining MIME type."); return false; } mimeType = fileTypeDetector.getMIMEType(file); } return PLAIN_TEXT_MIME_TYPE.equals(mimeType); }
Source:
<code>public void close() { <START> typeToRepositoryMap.clear(); <END> }</code><technical_language>need close StandStorage well</technical_language>

Target:
public void close() throws Exception { typeToRepositoryMap.clear(); storage.close(); }
Source:
<code>public void setJobOverrideProperty(final Project project, final Flow flow, final Props prop, final String jobName, final String source, final User modifier) throws ProjectManagerException { final Props oldProps; if (Double.compare(flow.getAzkabanFlowVersion(), Constants.AZKABAN_FLOW_VERSION_2_0) == 0) { final int flowVersion = this.projectLoader.getLatestFlowVersion(flow.getProjectId(), flow .getVersion(), source); final File flowFile = this.projectLoader.getUploadedFlowFile(flow.getProjectId(), flow .getVersion(), flowVersion, source); final String path = flow.getId() + Constants.PATH_DELIMITER + jobName; oldProps = FlowLoaderUtils.getPropsFromYamlFile(path, flowFile); FlowLoaderUtils.setPropsInYamlFile(path, flowFile, prop); this.projectLoader .uploadFlowFile(flow.getProjectId(), flow.getVersion(), flowVersion + 1, flowFile); if (flowFile != null && flowFile.exists()) { flowFile.delete(); } } else { <START> prop.setSource(jobName + ".jor"); <END> oldProps = this.projectLoader.fetchProjectProperty(project, prop.getSource()); if (oldProps == null) { this.projectLoader.uploadProjectProperty(project, prop); } else { this.projectLoader.updateProjectProperty(project, prop); } } final String diffMessage = PropsUtils.getPropertyDiff(oldProps, prop); this.projectLoader.postEvent(project, EventType.PROPERTY_OVERRIDE, modifier.getUserId(), diffMessage); return; }</code><technical_language>is ".jor" ? a constant variable a meaningful name</technical_language>

Target:
public void setJobOverrideProperty(final Project project, final Flow flow, final Props prop, final String jobName, final String source, final User modifier) throws ProjectManagerException { File tempDir = null; Props oldProps = null; if (FlowLoaderUtils.isAzkabanFlowVersion20(flow.getAzkabanFlowVersion())) { try { tempDir = Files.createTempDir(); final int flowVersion = this.projectLoader.getLatestFlowVersion(flow.getProjectId(), flow .getVersion(), source); final File flowFile = this.projectLoader.getUploadedFlowFile(flow.getProjectId(), flow .getVersion(), source, flowVersion, tempDir); final String path = flow.getId() + Constants.PATH_DELIMITER + jobName; oldProps = FlowLoaderUtils.getPropsFromYamlFile(path, flowFile); FlowLoaderUtils.setPropsInYamlFile(path, flowFile, prop); this.projectLoader .uploadFlowFile(flow.getProjectId(), flow.getVersion(), flowFile, flowVersion + 1); } catch (final Exception e) { this.logger.error("Failed to set job override property. " + e); } finally { FlowLoaderUtils.cleanUpDir(tempDir); } } else { prop.setSource(jobName + Constants.JOB_OVERRIDE_SUFFIX); oldProps = this.projectLoader.fetchProjectProperty(project, prop.getSource()); if (oldProps == null) { this.projectLoader.uploadProjectProperty(project, prop); } else { this.projectLoader.updateProjectProperty(project, prop); } } final String diffMessage = PropsUtils.getPropertyDiff(oldProps, prop); this.projectLoader.postEvent(project, EventType.PROPERTY_OVERRIDE, modifier.getUserId(), diffMessage); return; }
Source:
<code>public String toString() { <START> return super.getNodeId() + ":" + super.getPort() + " topology: " + topologyId; <END> }</code><technical_language>Please String.format() this</technical_language>

Target:
public String toString() { return String.format("%s:%s topologyId:%s", super.getNodeId(), super.getPort(), topologyId); }
Source:
<code>public Person mapFromCursor(@NonNull Cursor cursor) { final Person person = Person.newPerson( cursor.getLong(cursor.getColumnIndexOrThrow(UsersTable.COLUMN_ID)), cursor.getString(cursor.getColumnIndexOrThrow(UsersTable.COLUMN_NICK)) ); List<Car> cars = new ArrayList<Car>(); <START> while (cursor.moveToNext()) { <END> cars.add(Car.newCar( cursor.getLong(cursor.getColumnIndexOrThrow(CarsTable.COLUMN_ID)), person.getId(), cursor.getString(cursor.getColumnIndexOrThrow(CarsTable.COLUMN_MODEL)) )); } person.setCars(cars); return person; }</code><technical_language>I need do separate request db retrieve cars of this person</technical_language>

Target:
public Person mapFromCursor(@NonNull Cursor cursor) { final StorIOSQLite storIOSQLite = storIOSQLiteFromPerformGet.get(); final String personUuid = cursor.getString(cursor.getColumnIndexOrThrow(PersonsTable.COLUMN_UUID)); final String personName = cursor.getString(cursor.getColumnIndexOrThrow(PersonsTable.COLUMN_NAME)); final List<Car> personCars = storIOSQLite .get() .listOfObjects(Car.class) .withQuery(Query.builder() .table(CarsTable.TABLE_NAME) .where(CarsTable.COLUMN_PERSON_UUID + "=?") .whereArgs(personUuid) .build()) .prepare() .executeAsBlocking(); return new Person.Builder(personName).uuid(personUuid).cars(personCars).build(); }
Source:
<code>private static ModClusterServiceMBean getService(OperationContext context) throws OperationFailedException { PathAddress proxyAddress = LegacyMetricOperationsRegistration.translateProxyPath(context, context.getCurrentAddress()); ServiceName serviceName = ProxyConfigurationResourceDefinition.Capability.SERVICE.getServiceName(proxyAddress); <START> return new ActiveServiceSupplier<ModClusterServiceMBean>(context.getServiceRegistry(false), serviceName).get(); <END> }</code><technical_language>For a lot of of this method, this context.getServiceRegistry(true). need for getService(context) != null checks, for other if handler is changing state 'true'. * <strong>Note:</strong> is important {@code modify} parameter accurately reflect * caller intends modifications object reachable, indirectly, returned * {@link ServiceRegistry}. This includes modifying {@link ServiceController}, * {@link org.jboss.msc.service.Service}, {@link org.jboss.msc.value.Value} object reachable a value. * * @param modify {@code true} if operation modifying object reachable indirectly * returned {@link ServiceRegistry}, {@code false}</technical_language>

Target:
private static ModClusterServiceMBean getService(OperationContext context) throws OperationFailedException { PathAddress proxyAddress = LegacyMetricOperationsRegistration.translateProxyPath(context, context.getCurrentAddress()); ServiceName serviceName = ProxyConfigurationResourceDefinition.Capability.SERVICE.getServiceName(proxyAddress); return new ActiveServiceSupplier<ModClusterServiceMBean>(context.getServiceRegistry(true), serviceName).get(); }
Source:
<code>private void ensureBucket(Storage storage) throws IOException { <START> Logger log = LoggerFactory.getLogger(getClass()); <END> try { Bucket bkt = storage.buckets().get(bucket).execute(); boolean has_versioning = bkt.getVersioning().getEnabled(); log.info("Bucket versioning is {}.", has_versioning ? "enabled" : "DISABLED"); } catch (HttpResponseException e) { if (e.getStatusCode() == 404) { log.warn("Bucket does not exist. Create it in project={}", bucket, project); Bucket.Versioning versioning = new Bucket.Versioning().setEnabled(true); Bucket spec = new Bucket().setName(bucket).setVersioning(versioning); try { storage.buckets().insert(project, spec).execute(); } catch (IOException e2) { log.error("Could not create bucket={} in project={}: {}", bucket, project, e2); } } else { log.error("Could not get bucket={}: {}", bucket, e); return; } } }</code><technical_language>Logger defined statically class</technical_language>

Target:
private void ensureBucket(Storage storage) throws IOException { try { Bucket bkt = storage.buckets().get(bucket).execute(); boolean has_versioning = bkt.getVersioning().getEnabled(); log.info("Using Google Cloud Storage bucket={} in project={}", bucket, project); log.info("Bucket versioning is {}.", has_versioning ? "enabled" : "DISABLED"); } catch (HttpResponseException e) { if (e.getStatusCode() == 404) { log.warn("Bucket does not exist. Create it in project={}", bucket, project); Bucket.Versioning versioning = new Bucket.Versioning().setEnabled(true); Bucket spec = new Bucket().setName(bucket).setVersioning(versioning); try { storage.buckets().insert(project, spec).execute(); } catch (IOException e2) { log.error("Could not create bucket={} in project={}: {}", bucket, project, e2); } } else { log.error("Could not get bucket={}: {}", bucket, e); return; } } }
Source:
<code>public int read() throws IOException { int readLength = super.read(); if (readLength > 0) byteCount += readLength; <START> return readLength; <END> }</code><technical_language>this method implemented return addToByteCount(super.read());</technical_language>

Target:
public int read() throws IOException { return addToByteCount(super.read()); }
Source:
<code>private JsonObject introspectAccessToken(URL tokenIntrospectionUrl, String clientId, String clientSecret, String token, SSLContext sslContext, HostnameVerifier hostnameVerifier) throws RealmUnavailableException { checkNotNullParam("token", token); try { return HttpClient.builder().sslContext(sslContext).hostNameVerifier(hostnameVerifier).build() .post(tokenIntrospectionUrl) .header(HttpClient.HttpHeader.contentType("application/x-www-form-urlencoded")) .header(HttpClient.HttpHeader.authorizationBasic(clientId, clientSecret)) .param("token", token) .param("token_type_hint", "access_token") <START> .execute((inputStream, throwable) -> { <END> if (throwable != null) { throw log.httpClientUnexpectedResponseFromServer(throwable); } return Json.createReader(inputStream).readObject(); }); } catch (Exception cause) { throw log.tokenRealmOAuth2TokenIntrospectionFailed(cause); } }</code><technical_language>Is of this information sensitive want leaking out? If configuration a http address server redirects https follow redirect automatically report error</technical_language>

Target:
private JsonObject introspectAccessToken(URL tokenIntrospectionUrl, String clientId, String clientSecret, String token, SSLContext sslContext, HostnameVerifier hostnameVerifier) throws RealmUnavailableException { Assert.checkNotNullParam("clientId", clientId); Assert.checkNotNullParam("clientSecret", clientSecret); Assert.checkNotNullParam("token", token); HttpURLConnection connection = null; try { connection = openConnection(tokenIntrospectionUrl, sslContext, hostnameVerifier); HashMap<String, String> parameters = new HashMap<>(); parameters.put("token", token); parameters.put("token_type_hint", "access_token"); byte[] params = buildParameters(parameters); connection.setDoOutput(true); connection.setRequestMethod("POST"); connection.setRequestProperty("Content-Type", "application/x-www-form-urlencoded"); connection.setRequestProperty("Content-Length", String.valueOf(params.length)); connection.setRequestProperty("Authorization", "Basic " + CodePointIterator.ofString(clientId + ":" + clientSecret).asUtf8().base64Encode().drainToString()); try (OutputStream outputStream = connection.getOutputStream()) { outputStream.write(params); } try (InputStream inputStream = new BufferedInputStream(connection.getInputStream())) { return Json.createReader(inputStream).readObject(); } } catch (IOException ioe) { if (connection != null && connection.getErrorStream() != null) { InputStream errorStream = connection.getErrorStream(); try (BufferedReader reader = new BufferedReader(new InputStreamReader(errorStream))) { StringBuffer response = reader.lines().reduce(new StringBuffer(), StringBuffer::append, (buffer1, buffer2) -> buffer1); log.errorf(ioe, "Unexpected response from token introspection endpoint [%s]. Response: [%s]", tokenIntrospectionUrl, response); } catch (IOException e) { throw log.tokenRealmOAuth2TokenIntrospectionFailed(ioe); } } else { throw log.tokenRealmOAuth2TokenIntrospectionFailed(ioe); } } catch (Exception e) { throw log.tokenRealmOAuth2TokenIntrospectionFailed(e); } return null; }
Source:
<code><START> public void mark(String requestId, String peerAddressAndPort) { <END> if (requestId == null || peerAddressAndPort == null) { return; } rids.put(peerAddressAndPort, requestId); }</code><technical_language>Override</technical_language>

Target:
public void mark(String requestId, String peerAddressAndPort) { if (requestId == null || peerAddressAndPort == null || timingRecords.get(makeProbeKey(peerAddressAndPort, Probe.ACCEPT)) == null) { return; } rids.put(peerAddressAndPort, requestId); }
Source:
<code>private void firstTimeCleanup() { if (logger.isInfoEnabled()) logger.info("Initial CallManager cleanup. Will check running state calls in DB and update state of the calls."); String instanceId = RestcommConfiguration.getInstance().getMain().getInstanceId(); Sid sid = new Sid(instanceId); final CallDetailRecordsDao callDetailRecordsDao = storage.getCallDetailRecordsDao(); List<CallDetailRecord> results= callDetailRecordsDao.getInCompleteCallDetailRecordsByInstanceId(sid); <START> for (CallDetailRecord result : results) { <END> CallDetailRecord updatedResult = result.setStatus(CallStateChanged.State.COMPLETED.name()); if (logger.isDebugEnabled()) { logger.debug("Call From: " + updatedResult.getFrom() + " change status from " + result.getStatus() + " to COMPLETED"); } callDetailRecordsDao.updateCallDetailRecord(updatedResult); } results = callDetailRecordsDao.getInCompleteCallDetailRecordsByInstanceId(sid); if (logger.isInfoEnabled()) { logger.info("There are: " + results.size() + " calls in progress after cleanup."); } }</code><technical_language>is a avoid this loop cost of this operation</technical_language>

Target:
private void firstTimeCleanup() { if (logger.isInfoEnabled()) logger.info("Initial CallManager cleanup. Will check running state calls in DB and update state of the calls."); String instanceId = RestcommConfiguration.getInstance().getMain().getInstanceId(); Sid sid = new Sid(instanceId); final CallDetailRecordsDao callDetailRecordsDao = storage.getCallDetailRecordsDao(); callDetailRecordsDao.updateInCompleteCallDetailRecordsToCompletedByInstanceId(sid); List<CallDetailRecord> results = callDetailRecordsDao.getInCompleteCallDetailRecordsByInstanceId(sid); if (logger.isInfoEnabled()) { logger.info("There are: " + results.size() + " calls in progress after cleanup."); } }
Source:
<code>public void testForInvalidAttributeId() throws MiddlewareQueryException { final BindingResult bindingResult = new MapBindingResult(new HashMap<String, String>(), "Program"); <START> final Integer attributeById = 1; <END> Mockito.doReturn(null).when(this.germplasmDataManager).getAttributeById(attributeById); this.attributeValidator.validateAttributeIds(bindingResult, Lists.newArrayList(String.valueOf(attributeById))); Assert.assertTrue(bindingResult.hasErrors()); }</code><technical_language>@vmaletta random values</technical_language>

Target:
public void testForInvalidAttributeId() throws MiddlewareQueryException { final BindingResult bindingResult = new MapBindingResult(new HashMap<String, String>(), "Program"); final Integer attributeById = Integer.valueOf(RandomStringUtils.randomNumeric(1)); Mockito.doReturn(null).when(this.germplasmDataManager).getAttributeById(attributeById); this.attributeValidator.validateAttributeIds(bindingResult, Lists.newArrayList(String.valueOf(attributeById))); Assert.assertTrue(bindingResult.hasErrors()); }
Source:
<code>public List<Long> getFlightViewTimes(int flightId) { if (flightViewTimes.containsKey(flightId)) return flightViewTimes.get(flightId); <START> return null; <END> }</code><technical_language>Returning empty list is nicer caller null; eliminates a null check</technical_language>

Target:
public List<Long> getFlightViewTimes(int flightId) { if (flightViewTimes.containsKey(flightId)) return flightViewTimes.get(flightId); return Collections.<Long>emptyList(); }
Source:
<code>private void resetPlaybackState(final StreamInfo info) { if (info == null) return; <START> Log.d(TAG, "resetPlaybackState() called"); <END> final Disposable d = recordManager.resetStreamState(info) .observeOn(AndroidSchedulers.mainThread()) .onErrorComplete() .subscribe( ignored -> { }, error -> Log.e(TAG, "resetPlaybackState() failure: ", error) ); databaseUpdateReactor.add(d); }</code><technical_language>suggestion if (DEBUG) Log.d(TAG, "resetPlaybackState() called");</technical_language>

Target:
private void resetPlaybackState(final StreamInfo info) { if (info == null) return; if (DEBUG) Log.d(TAG, "resetPlaybackState() called"); final Disposable d = recordManager.resetStreamState(info) .observeOn(AndroidSchedulers.mainThread()) .onErrorComplete() .subscribe( ignored -> { }, error -> { if (DEBUG) Log.e(TAG, "resetPlaybackState() failure: ", error); } ); databaseUpdateReactor.add(d); }
Source:
<code>protected boolean canAuthenticate(final WebContext context) { val grantType = context.getRequestParameter(OAuth20Constants.GRANT_TYPE); if (grantType.isPresent() && OAuth20Utils.isGrantType(grantType.get(), OAuth20GrantTypes.PASSWORD)) { LOGGER.debug("Skipping Client credential authentication to use password authentication"); return false; } val code = context.getRequestParameter(OAuth20Constants.CODE); if (!code.isEmpty()) { LOGGER.debug("Checking if the OAuth code issued contains code challenge"); val token = this.ticketRegistry.getTicket(code.get(), OAuthCode.class); if (token != null && token.getCodeChallenge() != null) { <START> LOGGER.debug("The OAuth code issued contains code challenge which requires PKCE Autentication", code.get()); <END> return false; } } return true; }</code><technical_language>Typo; authentication in case</technical_language>

Target:
protected boolean canAuthenticate(final WebContext context) { val grantType = context.getRequestParameter(OAuth20Constants.GRANT_TYPE); if (grantType.isPresent() && OAuth20Utils.isGrantType(grantType.get(), OAuth20GrantTypes.PASSWORD)) { LOGGER.debug("Skipping Client credential authentication to use password authentication"); return false; } val code = context.getRequestParameter(OAuth20Constants.CODE); if (!code.isEmpty()) { LOGGER.debug("Checking if the OAuth code issued contains code challenge"); val token = this.ticketRegistry.getTicket(code.get(), OAuthCode.class); if (token != null && token.getCodeChallenge() != null) { LOGGER.debug("The OAuth code issued contains code challenge which requires PKCE Authentication", code.get()); return false; } } return true; }
Source:
<code>public void addFlightPathPoint(LatLong coord) { final LatLng position = CoordToLatLang(coord); if (maxFlightPathSize > 0) { if (mFlightPath == null) { PolylineOptions flightPathOptions = new PolylineOptions(); flightPathOptions.color(FLIGHT_PATH_DEFAULT_COLOR) .width(FLIGHT_PATH_DEFAULT_WIDTH).zIndex(1); mFlightPath = (Polyline)getBaiduMap().addOverlay(flightPathOptions); } List<LatLng> oldFlightPath = mFlightPath.getPoints(); <START> if (oldFlightPath.size() > maxFlightPathSize) { <END> oldFlightPath.remove(0); } oldFlightPath.add(position); mFlightPath.setPoints(oldFlightPath); } }</code><technical_language>@droneboost this a while loop</technical_language>

Target:
public void addFlightPathPoint(LatLong coord) { final LatLng position = CoordToLatLng(coord); if (mMaxFlightPathSize > 0) { if (mFlightPath == null) { PolylineOptions flightPathOptions = new PolylineOptions(); flightPathOptions.color(FLIGHT_PATH_DEFAULT_COLOR) .width(FLIGHT_PATH_DEFAULT_WIDTH).zIndex(1); mFlightPath = (Polyline)getBaiduMap().addOverlay(flightPathOptions); } List<LatLng> oldFlightPath = mFlightPath.getPoints(); while (oldFlightPath.size() > mMaxFlightPathSize) { oldFlightPath.remove(0); } oldFlightPath.add(position); if (oldFlightPath.size() >=2) { mFlightPath.setPoints(oldFlightPath); } } }
Source:
<code>public void fetchEmergencyURI() throws Exception { Request request = newRequest().addHeader("HOST", "localhost:8080"); Venue venue = new Venue(new VenueGroup("group"), new VenueType("type"), Lists.newArrayList(new VenueName("info", new Language("en")))); CivicLocation civic = new CivicLocation("country", "city", "street", "number", "postCode"); GeoLocation geo = new GeoLocation(65.65656565, 75.75757575); <START> final NewAccessPoint ap = new NewAccessPoint(new ID("operatorID"), "ip", new MacAddress("aa:bb"), "sn", "model", venue, geo, civic, new CapabilityList(Lists.newArrayList(new Capability(256, "ANQP Query List"), new Capability(257, "ANQP Capability list")))); <END> context.checking(new Expectations() {{ oneOf(repository).findById("id1"); will(returnValue(Optional.of(ap))); }}); Reply<?> reply = service.fetchEmergencyAlertURI("id1", request); assertThat(reply, containsValue("localhost:8080/r/emergency-alerts")); }</code><technical_language>builder</technical_language>

Target:
public void fetchEmergencyURI() throws Exception { final NewAccessPoint ap = newAP().build(); context.checking(new Expectations() {{ oneOf(request).header("Host"); will(returnValue("localhost:8080")); oneOf(repository).findById("id1"); will(returnValue(Optional.of(ap))); }}); Reply<?> reply = service.fetchEmergencyAlertURI("id1", request); assertThat(reply, containsValue("localhost:8080/r/emergency-alerts")); }
Source:
<code>public static <T extends FlowElement> MarshallingMessageDecorator<T> flowElementDecorator() { return MarshallingMessageDecorator.of(o -> Optional.ofNullable(o.getName()) <START> .orElseGet(() -> o.getId()), <END> g -> g.getClass().getSimpleName()); }</code><technical_language>method reference instead of o.getId()</technical_language>

Target:
public static <T extends FlowElement> MarshallingMessageDecorator<T> flowElementDecorator() { return MarshallingMessageDecorator.of(o -> Optional.ofNullable(o.getName()) .orElseGet(o::getId), g -> g.getClass().getSimpleName()); }
Source:
<code>public synchronized void unlock(UUID requestId) { <START> if (requestId.equals(currentHolder)) { <END> currentHolder = null; processQueue(); } }</code><technical_language>else { // remove request queue. }</technical_language>

Target:
public synchronized void unlock(UUID requestId) { checkIsCurrentHolder(requestId); currentHolder = null; processQueue(); }