auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>@Override public void openTestPlayerPicker() { AlertDialog.Builder builder = new AlertDialog.Builder(getActivity()); final String[] file_types = PlayerTestConstants.FILE_TYPES; builder.setTitle("Player Tests") <START> .setNegativeButton("Cancel", <END> new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialogInterface, int index) { dialogInterface.dismiss(); } }) .setSingleChoiceItems(file_types, -1, new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialogInterface, int index) { dialogInterface.dismiss(); presenter.debugVideoSelected(index); } }); builder.show(); }</code><technical_language>add this string resources</technical_language>

Target:
@Override public void openTestPlayerPicker() { AlertDialog.Builder builder = new AlertDialog.Builder(getActivity()); final String[] file_types = PlayerTestConstants.FILE_TYPES; builder.setTitle(R.string.overview_player_test) .setNegativeButton(R.string.cancel, new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialogInterface, int index) { dialogInterface.dismiss(); } }) .setSingleChoiceItems(file_types, -1, new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialogInterface, int index) { dialogInterface.dismiss(); presenter.debugVideoSelected(index); } }); builder.show(); }
Source:
<code>public static List<Granularity> granularitiesFinerThan(final Granularity gran0) { final DateTime epoch = new DateTime(0); final List<Granularity> retVal = Lists.newArrayList(); final DateTime origin = (gran0 instanceof PeriodGranularity) ? ((PeriodGranularity) gran0).getOrigin() : null; final DateTimeZone tz = (gran0 instanceof PeriodGranularity) ? ((PeriodGranularity) gran0).getTimeZone() : null; <START> for (GranularityType gran : GranularityType.values()) { <END> if (gran == GranularityType.ALL || gran == GranularityType.NONE) { continue; } final Granularity segmentGranularity = GranularityType.createGranularity(gran.name(), origin, tz); if (segmentGranularity.bucket(epoch).toDurationMillis() <= gran0.bucket(epoch).toDurationMillis()) { retVal.add(segmentGranularity); } } Collections.sort( retVal, new Comparator<Granularity>() { @Override public int compare(Granularity g1, Granularity g2) { return Longs.compare(g2.bucket(epoch).toDurationMillis(), g1.bucket(epoch).toDurationMillis()); } } ); return retVal; }</code><technical_language>prepare a list, excludes</technical_language>

Target:
public static List<Granularity> granularitiesFinerThan(final Granularity gran0) { final DateTime epoch = new DateTime(0); final List<Granularity> retVal = Lists.newArrayList(); final DateTime origin = (gran0 instanceof PeriodGranularity) ? ((PeriodGranularity) gran0).getOrigin() : null; final DateTimeZone tz = (gran0 instanceof PeriodGranularity) ? ((PeriodGranularity) gran0).getTimeZone() : null; for (GranularityType gran : GranularityType.values()) { if (gran == GranularityType.ALL || gran == GranularityType.NONE) { continue; } final Granularity segmentGranularity = gran.create(origin, tz); if (segmentGranularity.bucket(epoch).toDurationMillis() <= gran0.bucket(epoch).toDurationMillis()) { retVal.add(segmentGranularity); } } Collections.sort( retVal, new Comparator<Granularity>() { @Override public int compare(Granularity g1, Granularity g2) { return Longs.compare(g2.bucket(epoch).toDurationMillis(), g1.bucket(epoch).toDurationMillis()); } } ); return retVal; }
Source:
<code>public void send(final Pooled<ByteBuffer> pooled, final boolean close) { connection.getIoThread().execute(() -> { synchronized (queue) { XnioExecutor.Key heartKey1 = RemoteWriteListener.this.heartKey; if (heartKey1 != null) heartKey1.remove(); if (closed) { pooled.free(); return; } if (close) { closed = true; } boolean free = true; try { final SaslWrapper wrapper = saslWrapper; if (wrapper != null) { final ByteBuffer buffer = pooled.getResource(); final ByteBuffer source = buffer.duplicate(); buffer.clear(); wrapper.wrap(buffer, source); buffer.flip(); } final boolean empty = queue.isEmpty(); queue.add(pooled); free = false; if (empty) { connection.getIoThread().execute(flushTask); } } catch (IOException e) { handleException(e, false); <START> Pooled<ByteBuffer> unqueued; <END> while ((unqueued = queue.poll()) != null) { unqueued.free(); } } finally { if (free) { pooled.free(); } } } }); }</code><technical_language>this a difference</technical_language>

Target:
public void send(final Pooled<ByteBuffer> pooled, final boolean close) { connection.getIoThread().execute(() -> { synchronized (queue) { this.expireTime = System.currentTimeMillis() + heartbeatInterval; if (closed) { pooled.free(); return; } if (close) { closed = true; } boolean free = true; try { final SaslWrapper wrapper = saslWrapper; if (wrapper != null) { final ByteBuffer buffer = pooled.getResource(); final ByteBuffer source = buffer.duplicate(); buffer.clear(); wrapper.wrap(buffer, source); buffer.flip(); } final boolean empty = queue.isEmpty(); queue.add(pooled); free = false; if (empty) { connection.getIoThread().execute(flushTask); } } catch (IOException e) { handleException(e, false); Pooled<ByteBuffer> unqueued; while ((unqueued = queue.poll()) != null) { unqueued.free(); } } finally { if (free) { pooled.free(); } } } }); }
Source:
<code>public void addEvents(List<IEventDeclaration> events) throws CTFReaderException { <START> if (fEvents != Collections.EMPTY_LIST) { <END> throw new CTFReaderException("Cannot add to an already populated list"); } fEvents = ImmutableList.<IEventDeclaration> copyOf(events); }</code><technical_language>I thinking simply: for (IEventDeclaration event : events) { addEvent(event); }</technical_language>

Target:
public void addEvents(List<IEventDeclaration> events) throws CTFReaderException { if (fEvents != Collections.EMPTY_LIST) { ImmutableList.Builder<IEventDeclaration> builder = new ImmutableList.Builder<>(); int i = 0; for (; i < fEvents.size(); i++) { if ((events.size() > i)) { if (fEvents.get(i) == UNASSIGNED) { builder.add(events.get(i)); } else if (events.get(i) != UNASSIGNED) { throw new CTFReaderException("Both lists have an event defined at position " + i); } } else { builder.add(fEvents.get(i)); } } if (i < events.size()) { builder.addAll(events.subList(i, events.size())); } fEvents = builder.build(); } else { fEvents = ImmutableList.<IEventDeclaration> copyOf(events); } }
Source:
<code>public void exportCSV() { Toast.makeText(this, R.string.txt_exporting_history, Toast.LENGTH_LONG).show(); String baseDir = Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOWNLOADS).getAbsolutePath(); Log.d("dir", baseDir); String fileName = "exportHistoryOFF" + new SimpleDateFormat("yyyy-MM-dd-HH-mm-ss").format(new Date()) + ".csv"; String filePath = baseDir + File.separator + fileName; File f = new File(filePath); CSVWriter writer; FileWriter fileWriter; try { if (f.exists() && !f.isDirectory()) { fileWriter = new FileWriter(filePath, true); writer = new CSVWriter(fileWriter); } else { writer = new CSVWriter(new FileWriter(filePath)); } <START> String[] headers = res.getStringArray(R.array.headers); <END> writer.writeNext(headers); List<HistoryProduct> listHistoryProducts = mHistoryProductDao.loadAll(); for (HistoryProduct hp : listHistoryProducts) { String[] line = {hp.getBarcode(), hp.getTitle(), hp.getBrands()}; writer.writeNext(line); } writer.close(); Toast.makeText(this, R.string.txt_history_exported, Toast.LENGTH_LONG).show(); } catch (IOException e) { e.printStackTrace(); } }</code><technical_language>build fails here: <LINK_0> replace res getResources() work</technical_language>

Target:
public void exportCSV() { Toast.makeText(this, R.string.txt_exporting_history, Toast.LENGTH_LONG).show(); String baseDir = Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOWNLOADS).getAbsolutePath(); Log.d("dir", baseDir); String fileName = "exportHistoryOFF" + new SimpleDateFormat("yyyy-MM-dd-HH-mm-ss").format(new Date()) + ".csv"; String filePath = baseDir + File.separator + fileName; File f = new File(filePath); CSVWriter writer; FileWriter fileWriter; try { if (f.exists() && !f.isDirectory()) { fileWriter = new FileWriter(filePath, true); writer = new CSVWriter(fileWriter); } else { writer = new CSVWriter(new FileWriter(filePath)); } String[] headers = getResources().getStringArray(R.array.headers); writer.writeNext(headers); List<HistoryProduct> listHistoryProducts = mHistoryProductDao.loadAll(); for (HistoryProduct hp : listHistoryProducts) { String[] line = {hp.getBarcode(), hp.getTitle(), hp.getBrands()}; writer.writeNext(line); } writer.close(); Toast.makeText(this, R.string.txt_history_exported, Toast.LENGTH_LONG).show(); } catch (IOException e) { e.printStackTrace(); } }
Source:
<code>public void validateServerBinConfiguration(Field[] fields) { <START> if (isSingleBinEnabled) { <END> if (fields.length != 1) { LOG.error( "Aerospike server is single bin enabled and cannot allow multiple bin operations"); throw new RuntimeException("Aerospike server is single bin enabled and cannot allow " + "multiple bin operations"); } } }</code><technical_language>This lines of if statements merged</technical_language>

Target:
public void validateServerBinConfiguration(Field[] fields) { if (isSingleBinEnabled && fields.length != 1) { LOG.error("Aerospike server is single bin enabled and cannot allow multiple bin operations"); throw new RuntimeException("Aerospike server is single bin enabled and cannot allow " + "multiple bin operations"); } }
Source:
<code>@Override public void finishRecover() throws StorageException { lock.writeLock().lock(); <START> try { <END> updateAllocatedPages(); recover = false; } finally { lock.writeLock().unlock(); } }</code><technical_language>I understand refactoring? usages of new method related ticket, is</technical_language>

Target:
@Override public void finishRecover() throws StorageException { lock.writeLock().lock(); try { if (inited) { long newSize = Math.max(pageSize, fileIO.size() - headerSize()); if (newSize % pageSize != 0) newSize += pageSize - newSize % pageSize; long delta = newSize - allocated.getAndSet(newSize); assert delta % pageSize == 0 : delta; allocatedTracker.add(delta / pageSize); } recover = false; } catch (IOException e) { throw new StorageException("Failed to finish recover partition file [file=" + getFileAbsolutePath() + "]", e); } finally { lock.writeLock().unlock(); } }
Source:
<code>Delete(String keyspace, String table, List<Selector> columns) { super(keyspace); this.table = table; this.columns = columns; this.where = new Where(this); this.usings = new Options(this); this.conditions = new Conditions(this); for (Selector sel : columns) { if (sel instanceof CollectionElementSelector) { <START> if (((CollectionElementSelector) sel).key instanceof Integer) { <END> setNonIdempotentOps(); } } } }</code><technical_language>I this is wrong: return true for maps integer keys. need create separate subclasses find another distinguish list element deletions other cases</technical_language>

Target:
Delete(String keyspace, String table, List<Selector> columns) { this(keyspace, table, null, null, columns); }
Source:
<code>private void logUnsatisfiedRequest(Map<PerformanceIndex, Long> requestPerfToCheck) { StringBuilder sb = new StringBuilder(); <START> sb.append("Unsatisfied request: ").append(request.getUri()).append(" method=").append(request.getRestMethod()); <END> if (request.getRestMethod() == RestMethod.POST) { sb.append("; location=").append((String) getHeader(RestUtils.Headers.LOCATION)); } sb.append("; status=").append(responseStatus.getStatusCode()); Object blobSize = getHeader(RestUtils.Headers.BLOB_SIZE); if (blobSize != null) { sb.append("; blob size=").append((String) blobSize); } for (Map.Entry<PerformanceIndex, Long> entry : requestPerfToCheck.entrySet()) { sb.append("; ").append(entry.getKey().toString()).append(": ").append(entry.getValue()); if (entry.getKey() == PerformanceIndex.AverageBandwidth) { sb.append("bytes/sec"); } else { sb.append("ms"); } } logger.warn(sb.toString()); }</code><technical_language>"; method=" uri=request.getUri() match other key pairs</technical_language>

Target:
private void logUnsatisfiedRequest(Map<PerformanceIndex, Long> requestPerfToCheck) { StringBuilder sb = new StringBuilder(); sb.append("Unsatisfied request: uri=").append(request.getUri()).append("; method=").append(request.getRestMethod()); if (request.getRestMethod() == RestMethod.POST) { sb.append("; location=").append((String) getHeader(RestUtils.Headers.LOCATION)); } sb.append("; status=").append(responseStatus.getStatusCode()); Object blobSize = getHeader(RestUtils.Headers.BLOB_SIZE); if (blobSize != null) { sb.append("; blob size=").append((String) blobSize); } for (Map.Entry<PerformanceIndex, Long> entry : requestPerfToCheck.entrySet()) { sb.append("; ").append(entry.getKey().toString()).append("=").append(entry.getValue()); if (entry.getKey() == PerformanceIndex.AverageBandwidth) { sb.append("bytes/sec"); } else { sb.append("ms"); } } logger.warn(sb.toString()); }
Source:
<code>protected void execute(ProcessContext process) throws Exception { VirtualFile sourceFile = process.require(SOURCE_PARAMETER); Optional<VirtualFile> destinationDirectory = DESTINATION_PARAMETER.get(process.getContext()); boolean shouldOverwriteExisting = process.require(OVERWRITE_EXISTING_FILES_PARAMETER); final VirtualFile targetDirectory = destinationDirectory.orElseGet(() -> vfs.resolve(sourceFile.parent().path())); <START> sourceFile.tryDownload().ifPresent(handleArchiveExtraction(process, shouldOverwriteExisting, targetDirectory)); <END> }</code><technical_language>suggestion sourceFile.tryDownload().ifPresent(handle -> handleArchiveExtraction(process, handle, shouldOverwriteExisting, targetDirectory));</technical_language>

Target:
protected void execute(ProcessContext process) throws Exception { VirtualFile sourceFile = process.require(SOURCE_PARAMETER); Optional<VirtualFile> destinationDirectory = DESTINATION_PARAMETER.get(process.getContext()); boolean shouldOverwriteExisting = process.require(OVERWRITE_EXISTING_FILES_PARAMETER); final VirtualFile targetDirectory = destinationDirectory.orElseGet(() -> vfs.resolve(sourceFile.parent().path())); sourceFile.tryDownload() .ifPresent(handle -> handleArchiveExtraction(process, handle, shouldOverwriteExisting, targetDirectory)); }
Source:
<code>public static Stub authenticateStub(Stub stub, String sessionCookie, String backendURL) { long soTimeout = 5 * 60 * 1000; ServiceClient client = stub._getServiceClient(); Options option = client.getOptions(); option.setManageSession(true); option.setTimeOutInMilliSeconds(soTimeout); <START> System.out.println("XXXXXXXXXXXXXXXXXXX" + <END> backendURL + client.getServiceContext().getAxisService().getName().replaceAll("[^a-zA-Z]", "")); option.setProperty(org.apache.axis2.transport.http.HTTPConstants.COOKIE_STRING, sessionCookie); option.setTo(new EndpointReference(backendURL + client.getServiceContext().getAxisService().getName().replaceAll("[^a-zA-Z]", ""))); if (log.isDebugEnabled()) { log.debug("AuthenticateStub : Stub created with session " + sessionCookie); } return stub; }</code><technical_language>is a system.out here</technical_language>

Target:
public static Stub authenticateStub(Stub stub, String sessionCookie, String backendURL) { long soTimeout = 5 * 60 * 1000; ServiceClient client = stub._getServiceClient(); Options option = client.getOptions(); option.setManageSession(true); option.setTimeOutInMilliSeconds(soTimeout); option.setProperty(org.apache.axis2.transport.http.HTTPConstants.COOKIE_STRING, sessionCookie); option.setTo(new EndpointReference(backendURL + client.getServiceContext().getAxisService().getName().replaceAll("[^a-zA-Z]", ""))); if (log.isDebugEnabled()) { log.debug("AuthenticateStub : Stub created with session " + sessionCookie); } return stub; }
Source:
<code>protected Value<Boolean> getValueGetter() { <START> return Sponge.getRegistry().getValueFactory().createValue((Key<Value<Boolean>>) this.usedKey, getValue(), this.defaultValue); <END> }</code><technical_language>this.value instead of getValue() (and similar occurancaes)? Similar AbstractSingleCatalogData</technical_language>

Target:
protected Value<Boolean> getValueGetter() { return Sponge.getRegistry().getValueFactory().createValue((Key<Value<Boolean>>) this.usedKey, this.value, this.defaultValue); }
Source:
<code>public FVClassifier(FVEventLoop loop, SocketChannel sock) { this.loop = loop; this.switchName = "unidentified:" + sock.toString(); this.factory = new FVMessageFactory(); this.stats = new SendRecvDropStats(); try { this.msgStream = new FVMessageAsyncStream(sock, this.factory, this, this.stats); } catch (IOException e) { <START> logger.error(this.getName()+"IOException in constructor!"); <END> e.printStackTrace(); } this.sock = sock; this.switchInfo = null; this.doneID = false; this.floodPermsSlice = ""; this.slicerMap = new HashMap<String, FVSlicer>(); this.xidTranslator = new XidTranslator(); this.missSendLength = 128; this.switchFlowMap = null; this.activePorts = new HashSet<Short>(); this.wantStatsDescHack = true; FlowvisorImpl.addListener(this); try { setFlowTracking(FlowvisorImpl.getProxy().gettrack_flows()); } catch (ConfigError e) { setFlowTracking(false); } }</code><technical_language>concatenating log message pass parameter Objects.... concatenating string is inefficient</technical_language>

Target:
public FVClassifier(FVEventLoop loop, SocketChannel sock) { this.loop = loop; this.switchName = "unidentified:" + sock.toString(); this.factory = new FVMessageFactory(); this.stats = new SendRecvDropStats(); try { this.msgStream = new FVMessageAsyncStream(sock, this.factory, this, this.stats); } catch (IOException e) { logger.error(this.getName(),"IOException in constructor!"); e.printStackTrace(); } this.sock = sock; this.switchInfo = null; this.doneID = false; this.floodPermsSlice = ""; this.slicerMap = new HashMap<String, FVSlicer>(); this.xidTranslator = new XidTranslator(); this.missSendLength = 128; this.switchFlowMap = null; this.activePorts = new HashSet<Short>(); this.wantStatsDescHack = true; FlowvisorImpl.addListener(this); try { setFlowTracking(FlowvisorImpl.getProxy().gettrack_flows()); } catch (ConfigError e) { setFlowTracking(false); } }
Source:
<code>public static EnvironmentVariableConfig fromJSON(JsonReader jsonReader) { String name = jsonReader.getString("name"); Boolean secure = jsonReader.optBoolean("secure").orElse(false); Optional<String> optValue = jsonReader.optString("value"); Optional<String> optEncValue = jsonReader.optString("encrypted_value"); if (!optValue.isPresent() && !optEncValue.isPresent()) { HaltApiResponses.haltBecauseOfReason("Environment variable must contain either 'value' or 'encrypted_value'"); } String value = secure ? optValue.orElse(null) : jsonReader.getString("value"); String encryptedValue = optEncValue.orElse(null); try { EnvironmentVariableConfig environmentVariableConfig = new EnvironmentVariableConfig(); <START> environmentVariableConfig.deserialize(name, value, secure, encryptedValue); <END> return environmentVariableConfig; } catch (CryptoException e) { throw new InvalidGoCipherTextRuntimeException(e.getMessage(), e); } }</code><technical_language>perform this check environmentVariableConfig.deserialize handles it? <LINK_0></technical_language>

Target:
public static EnvironmentVariableConfig fromJSON(JsonReader jsonReader) { String name = jsonReader.getString("name"); Boolean secure = jsonReader.optBoolean("secure").orElse(false); Optional<String> optValue = jsonReader.optString("value"); Optional<String> optEncValue = jsonReader.optString("encrypted_value"); if (!optValue.isPresent() && !optEncValue.isPresent()) { HaltApiResponses.haltBecauseOfReason("Environment variable must contain either 'value' or 'encrypted_value'"); } String value = secure ? optValue.orElse(null) : jsonReader.getString("value"); String encryptedValue = optEncValue.orElse(null); EnvironmentVariableConfig environmentVariableConfig = new EnvironmentVariableConfig(); try { environmentVariableConfig.deserialize(name, value, secure, encryptedValue); } catch (CryptoException e) { environmentVariableConfig.addError(name, e.getMessage()); } return environmentVariableConfig; }
Source:
<code>public int sample_value() { checkHasParams(); if (lambda < 15) return sampleSmall(lambda); double alpha = 7.0 / 8.0; int m = (int) Math.floor(alpha * lambda); double x = Gamma.sampleVal(m, 1); int r; if (x < lambda) { Poisson poiss = new Poisson(); poiss.setParams(lambda - x); r = m + poiss.sample_value(); } else { <START> r = Binomial.sampleVal(m - 1, lambda / x); <END> } return r; }</code><technical_language>do this static function? I suppose human calling function named sample_value</technical_language>

Target:
public int sample_value() { checkHasParams(); return sample_value(lambda); }
Source:
<code>protected void makeChangesAndCommit(String projectName) throws Exception { changeFilesInProject(); <START> Thread.sleep(1000); END> commit(projectName); }</code><technical_language>commit is DirCache a while</technical_language>

Target:
protected void makeChangesAndCommit(String projectName) throws Exception { changeFilesInProject(); commit(projectName); }
Source:
<code>public void testEnforceValidityErrorsAndWarnings() throws Exception { Dictionary<String, Object> markerPluginProps = configureValidationMarkerPlugin( Collections.singletonList(SAMPLE_VALIDATOR), true, true, getAdminConfig()); ingestXmlFromResourceWaitForFailure(WARNING_METACARD); String cleanId = ingestXmlFromResourceAndWait(CLEAN_METACARD); ingestXmlFromResourceWaitForFailure(ERROR_METACARD); query(cleanId, TRANSFORMER_XML, HttpStatus.SC_OK); String warningData = getFileContent(WARNING_METACARD); String errorData = getFileContent(ERROR_METACARD); update(cleanId, warningData, MediaType.APPLICATION_XML, HttpStatus.SC_BAD_REQUEST); update(cleanId, errorData, MediaType.APPLICATION_XML, HttpStatus.SC_BAD_REQUEST); <START> configureValidationMarkerPlugin(markerPluginProps, getAdminConfig()); <END> }</code><technical_language>is reset if test failed before</technical_language>

Target:
public void testEnforceValidityErrorsAndWarnings() throws Exception { Dictionary<String, Object> markerPluginProps = configureValidationMarkerPlugin( Collections.singletonList(SAMPLE_VALIDATOR), true, true, getAdminConfig()); try { ingestXmlFromResourceWaitForFailure(WARNING_METACARD); String cleanId = ingestXmlFromResourceAndWait(CLEAN_METACARD); ingestXmlFromResourceWaitForFailure(ERROR_METACARD); query(cleanId, TRANSFORMER_XML, HttpStatus.SC_OK); String warningData = getFileContent(WARNING_METACARD); String errorData = getFileContent(ERROR_METACARD); update(cleanId, warningData, MediaType.APPLICATION_XML, HttpStatus.SC_BAD_REQUEST); update(cleanId, errorData, MediaType.APPLICATION_XML, HttpStatus.SC_BAD_REQUEST); } finally { configureValidationMarkerPlugin(markerPluginProps, getAdminConfig()); } }
Source:
<code>public DatacenterIdListFilters paginationOptions(final PaginationOptions paginationOptions) { if (paginationOptions.orderBy() != null) { this.queryParameters.put("orderBy", paginationOptions.orderBy()); } if (paginationOptions.pageNumber() != null) { this.queryParameters.put("pageNumber", paginationOptions.pageNumber()); } if (paginationOptions.pageSize() != null) { this.queryParameters.put("pageSize", paginationOptions.pageSize()); <START> } <END> return this; }</code><technical_language>Just: java public DatacenterIdListFilters paginationOptions(final PaginationOptions paginationOptions) { this.queryParameters.putAll(paginationOptions.buildQueryParameters()); return this; } avoid duplicating logic</technical_language>

Target:
public DatacenterIdListFilters paginationOptions(final PaginationOptions paginationOptions) { this.queryParameters.putAll(paginationOptions.buildQueryParameters()); return this; }
Source:
<code>public static UdpOutboundChannelAdapterSpec outboundMulticastAdapter(String destinationExpression) { <START> return new UdpMulticastOutboundChannelAdapterSpec(destinationExpression); <END> }</code><technical_language>I return type of method UdpMulticastOutboundChannelAdapterSpec well. access timeToLive() method target code</technical_language>

Target:
public static UdpMulticastOutboundChannelAdapterSpec outboundMulticastAdapter(String destinationExpression) { return new UdpMulticastOutboundChannelAdapterSpec(destinationExpression); }
Source:
<code><START> private Tuple getFunctionSpecificInput(String funcName, int dataStart, int dataEnd) { <END> if (funcName.equals("first_value")) { if (dataStart <= dataEnd && dataStart >= 0 && dataStart < accumulatedInTuples.size()) { return accumulatedInTuples.get(dataStart); } } else if (funcName.equals("last_value")) { if (dataStart <= dataEnd && dataEnd >= 0 && dataEnd < accumulatedInTuples.size()) { return accumulatedInTuples.get(dataEnd); } } return null; }</code><technical_language>WindowAggFunc is designed abstract kinds of window functions, function inherited WindowAggFunc some work. this code implementation of FirstValue LastValue simpler, I this is opposed design. In addition, I this kind of function-specific routine implementation of WindowAggExec complex. Do reasons</technical_language>

Target:
private Tuple getFunctionSpecificInput(String funcName, int dataStart, int dataEnd) { if (funcName.equals("first_value")) { dataStart = Math.max(dataStart, 0); if (dataStart <= dataEnd && dataStart < accumulatedInTuples.size()) { return accumulatedInTuples.get(dataStart); } } else if (funcName.equals("last_value")) { dataEnd = Math.min(dataEnd, accumulatedInTuples.size() - 1); if (dataStart <= dataEnd && dataEnd >= 0) { return accumulatedInTuples.get(dataEnd); } } return null; }
Source:
<code><START> public void resetAllRuleConfigValues() { <END> for (RuleConfig rc : ruleConfigs.values()) { rc.reset(); } }</code><technical_language>reset values in config file too</technical_language>

Target:
public void resetAllRuleConfigValues() { for (RuleConfig rc : ruleConfigs.values()) { rc.reset(); this.getConfig().setProperty(rc.getKey(), rc.getValue()); } }
Source:
<code>public Response registerPushApplication(PushApplication pushApp) { try { validateModelClass(pushApp); } catch (ConstraintViolationException cve) { return createBadRequestResponse(cve.getConstraintViolations()).build(); } try { pushAppService.addPushApplication(pushApp); <START> } catch (IllegalArgumentException e) { <END> return Response.status(Status.CONFLICT).entity(e.getMessage()).build(); } URI uri = UriBuilder .fromResource(PushApplicationEndpoint.class) .path(pushApp.getPushApplicationID()) .build(); return Response .created(uri) .entity(pushApp) .build(); }</code><technical_language>This works application ID is committed. work if clients try create new apps ID time, conflict notified transaction committed. @matzew thoughts</technical_language>

Target:
public Response registerPushApplication(PushApplication pushApp) { try { validateModelClass(pushApp); } catch (ConstraintViolationException cve) { return createBadRequestResponse(cve.getConstraintViolations()).build(); } try { pushAppService.addPushApplication(pushApp); } catch (IllegalArgumentException e) { return Response.status(Status.CONFLICT).entity(e.getMessage()).build(); } final URI uri = UriBuilder.fromResource(PushApplicationEndpoint.class) .path(pushApp.getPushApplicationID()) .build(); return Response .created(uri) .entity(pushApp) .build(); }
Source:
<code>public LogReplicationEntry processMsgAndBuffer(LogReplicationEntry dataMessage) { if (verifyMessageType(dataMessage) == false) return null; long preTs = getPreSeq(dataMessage); long currentTs = getCurrentSeq(dataMessage); if (preTs == lastProcessedSeq) { log.trace("Received in order message={}, lastProcessed={}", currentTs, lastProcessedSeq); sinkManager.processMessage(dataMessage); ackCnt++; lastProcessedSeq = getCurrentSeq(dataMessage); processBuffer(); } else if (currentTs > lastProcessedSeq && buffer.size() < maxSize) { <START> log.debug("Received unordered message, buffer={}, lastProcessed={}", currentTs, lastProcessedSeq); <END> buffer.put(preTs, dataMessage); } if (shouldAck()) { LogReplicationEntryMetadata metadata = makeAckMessage(dataMessage); return new LogReplicationEntry(metadata, new byte[0]); } return null; }</code><technical_language>currentTs instead of buffer</technical_language>

Target:
public LogReplicationEntry processMsgAndBuffer(LogReplicationEntry dataMessage) { if (!verifyMessageType(dataMessage)) { log.warn("Received invalid message type {}", dataMessage.getMetadata()); return null; } long preTs = getPreSeq(dataMessage); long currentTs = getCurrentSeq(dataMessage); if (preTs <= lastProcessedSeq && currentTs > lastProcessedSeq) { log.trace("Received in order message={}, lastProcessed={}", currentTs, lastProcessedSeq); sinkManager.processMessage(dataMessage); ackCnt++; lastProcessedSeq = getCurrentSeq(dataMessage); processBuffer(); } else if (currentTs > lastProcessedSeq && buffer.size() < maxSize) { log.debug("Received unordered message, currentTs={}, lastProcessed={}", currentTs, lastProcessedSeq); buffer.put(preTs, dataMessage); } if (shouldAck()) { LogReplicationEntryMetadata metadata = makeAckMessage(dataMessage); log.trace("Sending an ACK {}", metadata); return new LogReplicationEntry(metadata); } return null; }
Source:
<code>public void testTimedMetric() { <START> WebClient.create(base.toExternalForm()) <END> .path("/weather/day/status") .get(String.class); final String metricPath = "/metrics/application/weather_day_status"; assertPrometheusFormat(metricPath); assertJsonFormat(metricPath); }</code><technical_language>Client (jaxrs) instead of a cxf api - forgetting close client ;)</technical_language>

Target:
public void testTimedMetric() { WebTarget webTarget = client.target(base.toExternalForm()); webTarget .path("/weather/day/status") .request().buildGet().invoke(); final String metricPath = "/metrics/application/weather_day_status"; assertPrometheusFormat(metricPath); assertJsonFormat(metricPath); }
Source:
<code>public WebApplicationExceptionCatchingFilter(ContainerRequestFilter underlying) { <START> this.underlying = underlying; <END> }</code><technical_language>I add a precondition check underlying null</technical_language>

Target:
public WebApplicationExceptionCatchingFilter(ContainerRequestFilter underlying) { Preconditions.checkNotNull(underlying, "Underlying ContainerRequestFilter is not set"); this.underlying = underlying; }
Source:
<code>public Intent build() { if (mAllowNewEmailAccounts != null) { for (IdpConfig provider : mProviders) { if (provider.getProviderId().equals(EmailAuthProvider.PROVIDER_ID)) { <START> mProviders.set(mProviders.indexOf(provider), new IdpConfig.EmailBuilder() <END> .setAllowNewAccounts(mAllowNewEmailAccounts) .build()); break; } } } return super.build(); }</code><technical_language>If loop contains indexOf a loop indexes, a for-each loop</technical_language>

Target:
public Intent build() { if (mAllowNewEmailAccounts != null) { for (int i = 0; i < mProviders.size(); i++) { if (mProviders.get(i).getProviderId().equals(EmailAuthProvider.PROVIDER_ID)) { mProviders.set(i, new IdpConfig.EmailBuilder() .setAllowNewAccounts(mAllowNewEmailAccounts) .build()); break; } } } return super.build(); }
Source:
<code>public void beforeSigningInTest() { passwordCredentialType = signingInPage.getCredentialType(PasswordCredentialModel.TYPE); <START> RealmRepresentation realm = testRealmResource().toRepresentation(); <END> testingClient.testing().ldap(TEST).createLDAPProvider(ldapRule.getConfig(), true); log.infof("LDAP Provider created"); String userName = "johnkeycloak"; String firstName = "Jonh"; String lastName = "Doe"; String email = "john@email.org"; testingClient.server().run(session -> { LDAPTestContext ctx = LDAPTestContext.init(session); RealmModel appRealm = ctx.getRealm(); LDAPTestUtils.removeAllLDAPUsers(ctx.getLdapProvider(), appRealm); LDAPObject john = LDAPTestUtils.addLDAPUser(ctx.getLdapProvider(), appRealm, userName, firstName, lastName, email, null, "1234"); LDAPTestUtils.updateLDAPPassword(ctx.getLdapProvider(), john, PASSWORD); }); testRealmLoginPage.setAuthRealm(testRealmPage); testRealmAccountPage.setAuthRealm(testRealmPage); testUser = createUserRepresentation(userName, email, firstName, lastName, true); setPasswordFor(testUser, PASSWORD); resetTestRealmSession(); }</code><technical_language>This is anywhere</technical_language>

Target:
public void beforeSigningInTest() { passwordCredentialType = signingInPage.getCredentialType(PasswordCredentialModel.TYPE); testingClient.testing().ldap(TEST).createLDAPProvider(ldapRule.getConfig(), true); log.infof("LDAP Provider created"); String userName = "johnkeycloak"; String firstName = "Jonh"; String lastName = "Doe"; String email = "john@email.org"; testingClient.server().run(session -> { LDAPTestContext ctx = LDAPTestContext.init(session); RealmModel appRealm = ctx.getRealm(); LDAPTestUtils.removeAllLDAPUsers(ctx.getLdapProvider(), appRealm); LDAPObject john = LDAPTestUtils.addLDAPUser(ctx.getLdapProvider(), appRealm, userName, firstName, lastName, email, null, "1234"); LDAPTestUtils.updateLDAPPassword(ctx.getLdapProvider(), john, PASSWORD); }); testRealmLoginPage.setAuthRealm(testRealmPage); testRealmAccountPage.setAuthRealm(testRealmPage); testUser = createUserRepresentation(userName, email, firstName, lastName, true); setPasswordFor(testUser, PASSWORD); resetTestRealmSession(); }
Source:
<code>public Constraint getRequiredConstraint(Action.ActionEffect actionEffect, JmxAction action, JmxTarget target) { <START> return (action.getImpact() == JmxAction.Impact.EXTRA_SENSITIVE || target.isNonFacadeMBeansSensitive() || isSensitiveAction(action.composeAction(), actionEffect) || isSensitiveResource(target, actionEffect)) ? SENSITIVE : NOT_SENSITIVE; <END> }</code><technical_language>isSensitiveAction() isSensitiveResource() return false, calls dropped</technical_language>

Target:
public Constraint getRequiredConstraint(Action.ActionEffect actionEffect, JmxAction action, JmxTarget target) { return (action.getImpact() == JmxAction.Impact.CLASSLOADING || target.isNonFacadeMBeansSensitive()) ? SENSITIVE : NOT_SENSITIVE; }
Source:
<code>public long getLatestModificationTimeStamp(JSONArray records) throws JSONException { long maxTimeStamp = -1; for (int i = 0; i < records.length(); i++) { <START> String timeStampStr = JSONObjectHelper.optString(records.getJSONObject(i), modificationDateFieldName); <END> if (timeStampStr == null) { maxTimeStamp = -1; break; } try { long timeStamp = Constants.TIMESTAMP_FORMAT.parse(timeStampStr).getTime(); maxTimeStamp = Math.max(timeStamp, maxTimeStamp); } catch (Exception e) { Log.w("SyncDownTarget.getLatestModificationTimeStamp", "Could not parse modification date field " + modificationDateFieldName, e); maxTimeStamp = -1; break; } } return maxTimeStamp; }</code><technical_language>getters instead field protected</technical_language>

Target:
public long getLatestModificationTimeStamp(JSONArray records) throws JSONException { long maxTimeStamp = -1; for (int i = 0; i < records.length(); i++) { String timeStampStr = JSONObjectHelper.optString(records.getJSONObject(i), getModificationDateFieldName()); if (timeStampStr == null) { maxTimeStamp = -1; break; } try { long timeStamp = Constants.TIMESTAMP_FORMAT.parse(timeStampStr).getTime(); maxTimeStamp = Math.max(timeStamp, maxTimeStamp); } catch (Exception e) { Log.w("SyncDownTarget.getLatestModificationTimeStamp", "Could not parse modification date field " + getModificationDateFieldName(), e); maxTimeStamp = -1; break; } } return maxTimeStamp; }
Source:
<code>private boolean shouldRetryRemotelyClosed(Exception exception, int retryCount, HttpRequest httpRequest) { boolean shouldRetry = exception instanceof IOException && containsIgnoreCase(exception.getMessage(), REMOTELY_CLOSED) && supportsRetry(httpRequest.getMethod()) && retryCount > 0; if (shouldRetry) { boolean entitySupportRetry = entitySupportRetry(httpRequest); <START> if (entitySupportRetry) <END> { logger.warn("Sending HTTP message failed with `" + IOException.class.getCanonicalName() + ": " + REMOTELY_CLOSED + "`. Request will be retried " + retryCount + " time(s) before failing."); } else { logger.warn("Sending HTTP message failed with `" + IOException.class.getCanonicalName() + ": " + REMOTELY_CLOSED + "`. Request will not be retried because entity not support retry."); shouldRetry = false; } } return shouldRetry; }</code><technical_language>method in condition</technical_language>

Target:
private boolean shouldRetryRemotelyClosed(Exception exception, int retryCount, HttpRequest httpRequest) { boolean shouldRetry = exception instanceof IOException && containsIgnoreCase(exception.getMessage(), REMOTELY_CLOSED) && supportsRetry(httpRequest.getMethod()) && retryCount > 0; if (shouldRetry) { if (entitySupportRetry(httpRequest)) { logger.warn("Sending HTTP message failed with `" + IOException.class.getCanonicalName() + ": " + REMOTELY_CLOSED + "`. Request will be retried " + retryCount + " time(s) before failing."); } else { if(logger.isDebugEnabled()) { logger.debug("Sending HTTP message failed with `" + IOException.class.getCanonicalName() + ": " + REMOTELY_CLOSED + "`. Request will not be retried because entity not support retry."); } shouldRetry = false; } } return shouldRetry; }
Source:
<code>public synchronized void deleteQuery(final String queryId) { synchronized (executionDags) { final DAG<ExecutionVertex, MISTEdge> executionPlan = executionPlanDagMap.remove(queryId); final Collection<ExecutionVertex> vertices = executionPlan.getVertices(); for (final ExecutionVertex vertex : vertices) { final VertexInfo vertexInfo = vertexInfoMap.remove(vertex); vertexInfo.setRefCount(vertexInfo.getRefCount() - 1); if (vertexInfo.getRefCount() == 0) { final DAG<ExecutionVertex, MISTEdge> targetDag = vertexInfo.getPhysicalExecutionDag(); final ExecutionVertex deleteVertex = vertexInfo.getPhysicalExecutionVertex(); <START> targetDag.removeVertex(vertexInfo.getPhysicalExecutionVertex()); <END> if (deleteVertex.getType() == ExecutionVertex.Type.SOURCE) { final PhysicalSource src = (PhysicalSource)deleteVertex; executionDags.remove(src.getConfiguration()); try { src.close(); } catch (Exception e) { e.printStackTrace(); } } } } } }</code><technical_language>targetDag.removeVerterx(deleteVertex)</technical_language>

Target:
public synchronized void deleteQuery(final String queryId) { synchronized (executionDags) { final DAG<ExecutionVertex, MISTEdge> executionPlan = executionPlanDagMap.remove(queryId); final Collection<ExecutionVertex> vertices = executionPlan.getVertices(); for (final ExecutionVertex vertex : vertices) { final VertexInfo vertexInfo = vertexInfoMap.remove(vertex); vertexInfo.setRefCount(vertexInfo.getRefCount() - 1); if (vertexInfo.getRefCount() == 0) { final DAG<ExecutionVertex, MISTEdge> targetDag = vertexInfo.getPhysicalExecutionDag(); final ExecutionVertex deleteVertex = vertexInfo.getPhysicalExecutionVertex(); targetDag.removeVertex(deleteVertex); if (deleteVertex.getType() == ExecutionVertex.Type.SOURCE) { final PhysicalSource src = (PhysicalSource)deleteVertex; executionDags.remove(src.getConfiguration()); try { src.close(); } catch (Exception e) { e.printStackTrace(); } } } } } }
Source:
<code>public AbstractCorrelatingMessageHandler(MessageGroupProcessor processor, MessageGroupStore store, CorrelationStrategy correlationStrategy, ReleaseStrategy releaseStrategy) { Assert.notNull(processor); Assert.notNull(store); setMessageStore(store); this.outputProcessor = processor; this.correlationStrategy = correlationStrategy == null ? new HeaderAttributeCorrelationStrategy(IntegrationMessageHeaderAccessor.CORRELATION_ID) : correlationStrategy; this.releaseStrategy = releaseStrategy == null ? new SequenceSizeReleaseStrategy() : releaseStrategy; <START> super.messagingTemplate.setSendTimeout(DEFAULT_SEND_TIMEOUT); <END> sequenceAware = this.releaseStrategy instanceof SequenceSizeReleaseStrategy; }</code><technical_language>??? this. of course. I revert changes for messagingTemplate PR is clear</technical_language>

Target:
public AbstractCorrelatingMessageHandler(MessageGroupProcessor processor, MessageGroupStore store, CorrelationStrategy correlationStrategy, ReleaseStrategy releaseStrategy) { Assert.notNull(processor); Assert.notNull(store); setMessageStore(store); this.outputProcessor = processor; this.correlationStrategy = correlationStrategy == null ? new HeaderAttributeCorrelationStrategy(IntegrationMessageHeaderAccessor.CORRELATION_ID) : correlationStrategy; this.releaseStrategy = releaseStrategy == null ? new SequenceSizeReleaseStrategy() : releaseStrategy; this.messagingTemplate.setSendTimeout(DEFAULT_SEND_TIMEOUT); sequenceAware = this.releaseStrategy instanceof SequenceSizeReleaseStrategy; }
Source:
<code>void delete(final String rawPath, final MantaHttpHeaders requestHeaders, final Integer pruneDepth) throws IOException { Validate.notBlank(rawPath, "rawPath must not be blank"); String path = formatPath(rawPath); <START> if (pruneDepth == null || pruneDepth == DEFAULT_PRUNE_DEPTH <END> || startsWith(path, config.getMantaBucketsDirectory())) { LOG.debug("DELETE {}", path); httpHelper.httpDelete(path, requestHeaders); } else { PruneEmptyParentDirectoryStrategy.pruneParentDirectories(this, requestHeaders, path, pruneDepth); } }</code><technical_language>startsWith in a hot operation delete inefficient, consider optimizations - crazy</technical_language>

Target:
void delete(final String rawPath, final MantaHttpHeaders requestHeaders, final Integer pruneDepth) throws IOException { Validate.notBlank(rawPath, "rawPath must not be blank"); String path = formatPath(rawPath); if (pruneDepth == null || pruneDepth == DEFAULT_PRUNE_DEPTH) { LOG.debug("DELETE {}", path); httpHelper.httpDelete(path, requestHeaders); } else if (path.startsWith(config.getMantaBucketsDirectory())) { LOG.debug("DELETE {}", path); LOG.warn("Prune Directory settings should be disabled in a Buckets Environment"); httpHelper.httpDelete(path, requestHeaders); } else { PruneEmptyParentDirectoryStrategy.pruneParentDirectories(this, requestHeaders, path, pruneDepth); } }
Source:
<code>void sendNativeSetupNotification() { setChanged(); super.notifyObservers(new Message(NativeInterface.MessageType.INSTALL, config)); <START> final Client client = this; <END> try { Async.run(new Runnable() { @Override public void run() { enqueuePendingNativeReports(); } }); } catch (RejectedExecutionException ex) { Logger.warn("Failed to enqueue native reports, will retry next launch: ", ex); } }</code><technical_language>this variable is unused</technical_language>

Target:
void sendNativeSetupNotification() { setChanged(); super.notifyObservers(new Message(NativeInterface.MessageType.INSTALL, config)); try { Async.run(new Runnable() { @Override public void run() { enqueuePendingNativeReports(); } }); } catch (RejectedExecutionException ex) { Logger.warn("Failed to enqueue native reports, will retry next launch: ", ex); } }
Source:
<code>VM createDbVm() { VM vm = new VM(); vm.setDynamicData(new VmDynamic()); vm.setId(id); vm.setName(name()); vm.setRunOnVds(SRC_HOST_ID); <START> vm.setElapsedTime(-1.0d); <END> return vm; }</code><technical_language>I change is related elapsed-time, is this change needed</technical_language>

Target:
VM createDbVm() { VM vm = new VM(); vm.setDynamicData(new VmDynamic()); vm.setId(id); vm.setName(name()); vm.setRunOnVds(SRC_HOST_ID); return vm; }
Source:
<code>protected Key() { accountId = new Account.Id(); projectName = new Project.NameKey(); <START> fileMatchRegex = new RegexKey(DEFAULT_REGEX); <END> }</code><technical_language>set in this constructor. no-arg constructor here</technical_language>

Target:
protected Key() { accountId = new Account.Id(); projectName = new Project.NameKey(); filter = new Filter(); }
Source:
<code>public WheelchairFlagEncoder(int speedBits, double speedFactor) { super(speedBits, speedFactor); restrictions.add("wheelchair"); setBlockByDefault(false); absoluteBarriers.add("handrail"); absoluteBarriers.add("wall"); absoluteBarriers.add("turnstile"); potentialBarriers.add("kerb"); potentialBarriers.add("cattle_grid"); potentialBarriers.add("motorcycle_barrier"); safeHighwayTags.add("footway"); safeHighwayTags.add("pedestrian"); safeHighwayTags.add("living_street"); safeHighwayTags.add("residential"); safeHighwayTags.add("service"); safeHighwayTags.add("platform"); avoidHighwayTags.add("trunk"); avoidHighwayTags.add("trunk_link"); avoidHighwayTags.add("primary"); avoidHighwayTags.add("primary_link"); avoidHighwayTags.add("secondary"); avoidHighwayTags.add("secondary_link"); avoidHighwayTags.add("tertiary"); avoidHighwayTags.add("tertiary_link"); <START> avoidHighwayTags.add("steps"); <END> avoidHighwayTags.add("track"); avoidSurfaces.add("cobblestone"); avoidSurfaces.add("gravel"); avoidSurfaces.add("sand"); avoidSmoothness.add("bad"); avoidSmoothness.add("very_bad"); avoidSmoothness.add("horrible"); avoidSmoothness.add("very_horrible"); avoidSmoothness.add("impassable"); allowedHighwayTags.addAll(safeHighwayTags); allowedHighwayTags.addAll(avoidHighwayTags); allowedHighwayTags.add("cycleway"); allowedHighwayTags.add("unclassified"); allowedHighwayTags.add("road"); maxPossibleSpeed = FERRY_SPEED; speedDefault = MEAN_SPEED; init(); }</code><technical_language>accept steps</technical_language>

Target:
public WheelchairFlagEncoder(int speedBits, double speedFactor) { super(speedBits, speedFactor); restrictions.add("wheelchair"); setBlockByDefault(false); absoluteBarriers.add("handrail"); absoluteBarriers.add("wall"); absoluteBarriers.add("turnstile"); potentialBarriers.add("kerb"); potentialBarriers.add("cattle_grid"); potentialBarriers.add("motorcycle_barrier"); safeHighwayTags.add("footway"); safeHighwayTags.add("pedestrian"); safeHighwayTags.add("living_street"); safeHighwayTags.add("residential"); safeHighwayTags.add("service"); safeHighwayTags.add("platform"); excludeHighwayTags.add("trunk"); excludeHighwayTags.add("trunk_link"); excludeHighwayTags.add("primary"); excludeHighwayTags.add("primary_link"); excludeHighwayTags.add("secondary"); excludeHighwayTags.add("secondary_link"); excludeHighwayTags.add("tertiary"); excludeHighwayTags.add("tertiary_link"); excludeHighwayTags.add("steps"); excludeHighwayTags.add("track"); excludeSurfaces.add("cobblestone"); excludeSurfaces.add("gravel"); excludeSurfaces.add("sand"); excludeSmoothness.add("bad"); excludeSmoothness.add("very_bad"); excludeSmoothness.add("horrible"); excludeSmoothness.add("very_horrible"); excludeSmoothness.add("impassable"); allowedHighwayTags.addAll(safeHighwayTags); allowedHighwayTags.addAll(excludeHighwayTags); allowedHighwayTags.add("cycleway"); allowedHighwayTags.add("unclassified"); allowedHighwayTags.add("road"); maxPossibleSpeed = FERRY_SPEED; speedDefault = MEAN_SPEED; speedTwoDirections = true; init(); }
Source:
<code>private List<RequestInfo> pollForRequests() { idsToDelete.clear(); <START> putManager.getIdsToDelete(idsToDelete); <END> for (String blobId : idsToDelete) { deleteManager .submitDeleteBlobOperation(operationIdGenerator.incrementAndGet(), blobId, new FutureResult<Void>(), null); } List<RequestInfo> requests = new ArrayList<RequestInfo>(); putManager.poll(requests); getManager.poll(requests); deleteManager.poll(requests); return requests; }</code><technical_language>If getIdsToDelete() return a list of blob Ids, avoid idsToDelete.clear(). call idsToDelete = putManager.getIdsToDelete() everytime</technical_language>

Target:
private List<RequestInfo> pollForRequests() { idsToDelete.clear(); putManager.getIdsToDelete(idsToDelete); for (String blobId : idsToDelete) { deleteManager.submitDeleteBlobOperation(blobId, new FutureResult<Void>(), null); } List<RequestInfo> requests = new ArrayList<RequestInfo>(); putManager.poll(requests); getManager.poll(requests); deleteManager.poll(requests); return requests; }