auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>public void writeDoesNotPopulateTimestampCache() { Transaction transaction = txMgr.runTaskWithRetry(txn -> { put(txn, TEST_TABLE, "row", "column", "test"); return txn; <START> }); <END> assertThat(timestampCache.getCommitTimestampIfPresent(transaction.getTimestamp())).isNull(); }</code><technical_language>cleaner in terms of minimum visibility return timestamp transaction task</technical_language>

Target:
public void writeDoesNotPopulateTimestampCache() { Long writerStartTimestamp = txMgr.runTaskWithRetry(txn -> { put(txn, TEST_TABLE, "row", "column", "test"); return txn.getTimestamp(); }); assertThat(timestampCache.getCommitTimestampIfPresent(writerStartTimestamp)).isNull(); }
Source:
<code>public void persistParticipantInformation(final ParticipantInformation participantInformation) { if (LOG.isTraceEnabled()) { LOG.trace("RecoveryManager.persistParticipantInformation: participantInformation=" + participantInformation); } if (!isRecoverableParticipant(participantInformation.getParticipant())) { if (LOG.isTraceEnabled()) { LOG.trace("RecoveryManager.persistParticipantInformation: participant is not recoverable"); } return; } try { final RecoveryStore recoveryStore = StoreManager.getRecoveryStore(); final OutputObjectState state = getParticipantInformationOutputState(participantInformation); final Uid uid = new Uid(participantInformation.getId()); <START> committedParticipants.put(participantInformation.getId(), uid); <END> recoveryStore.write_committed(uid, PARTICIPANT_INFORMATION_RECORD_TYPE, state); } catch (Exception e) { LOG.warn("Failure while persisting participant information.", e); } }</code><technical_language>I note this is in map store is updated</technical_language>

Target:
public void persistParticipantInformation(final ParticipantInformation participantInformation) { if (LOG.isTraceEnabled()) { LOG.trace("RecoveryManager.persistParticipantInformation: participantInformation=" + participantInformation); } if (!isRecoverableParticipant(participantInformation.getParticipant())) { if (LOG.isTraceEnabled()) { LOG.trace("RecoveryManager.persistParticipantInformation: participant is not recoverable"); } return; } try { final RecoveryStore recoveryStore = StoreManager.getRecoveryStore(); final OutputObjectState state = getParticipantInformationOutputState(participantInformation); final Uid uid = new Uid(participantInformation.getId()); recoveryStore.write_committed(uid, PARTICIPANT_INFORMATION_RECORD_TYPE, state); persistedParticipants.put(participantInformation.getId(), uid); } catch (Exception e) { LOG.warn("Failure while persisting participant information.", e); } }
Source:
<code>public TcpClientConnector(int numberOfThreads, int connectTimeoutMillis, int idleTimeout) { this.numberOfThreads = numberOfThreads; this.connectionIdleTimeoutSeconds = idleTimeout; this.connectTimeoutMillis = connectTimeoutMillis; <START> this.listenUri = URI.create(String.format("%s://0.0.0.0:0", getSupportedScheme())); <END> }</code><technical_language>I is point this is a client connector initiates connections servers serve connections initiated others</technical_language>

Target:
public TcpClientConnector(int numberOfThreads, int connectTimeoutMillis, int idleTimeout) { this.numberOfThreads = numberOfThreads; this.connectionIdleTimeoutSeconds = idleTimeout; this.connectTimeoutMillis = connectTimeoutMillis; this.listenUri = URI.create(String.format("%s://%s:%d", getSupportedScheme(), localSocketAddress.getHostString(), localSocketAddress.getPort())); }
Source:
<code>public ExecutionResult execute(Item item) { ProcessType processType = getProcessType(item); if (getProject().getLanguage() != ECodeLanguage.JAVA || processType == null) { return ExecutionResult.NOTHING_TO_DO; } String[] componentsName = new String[] { "tLDAPConnection", "tLDAPAttributesInput", "tLDAPInput", "tLDAPOutput", "tLDAPRenameEntry" }; IComponentConversion changeAlwaysTrustValue = new IComponentConversion() { public void transform(NodeType node) { ElementParameterType advancedCa = ComponentUtilities.getNodeProperty(node, "ADVANCEDCA"); if(advancedCa != null) { boolean isAdvancedCa = "true".equalsIgnoreCase(advancedCa.getValue()); if(isAdvancedCa) { ComponentUtilities.getNodeProperty(node, "ALWAYS_TRUST").setValue("true"); } } } }; for (String name : componentsName) { IComponentFilter filter = new NameComponentFilter(name); try { ModifyComponentsAction.searchAndModify(item, processType, filter, Arrays .<IComponentConversion> asList(changeAlwaysTrustValue)); } catch (PersistenceException e) { ExceptionHandler.process(e); return ExecutionResult.FAILURE; } } <START> return ExecutionResult.SUCCESS_WITH_ALERT; <END> }</code><technical_language>Please SUCCESS_NO_ALERT</technical_language>

Target:
public ExecutionResult execute(Item item) { ProcessType processType = getProcessType(item); if (getProject().getLanguage() != ECodeLanguage.JAVA || processType == null) { return ExecutionResult.NOTHING_TO_DO; } String[] componentsName = new String[] { "tLDAPConnection", "tLDAPAttributesInput", "tLDAPInput", "tLDAPOutput", "tLDAPRenameEntry" }; IComponentConversion changeAlwaysTrustValue = new IComponentConversion() { public void transform(NodeType node) { ElementParameterType advancedCa = ComponentUtilities.getNodeProperty(node, "ADVANCEDCA"); if(advancedCa != null) { boolean isAdvancedCa = "true".equalsIgnoreCase(advancedCa.getValue()); if(isAdvancedCa) { ComponentUtilities.getNodeProperty(node, "ALWAYS_TRUST").setValue("true"); } } } }; for (String name : componentsName) { IComponentFilter filter = new NameComponentFilter(name); try { ModifyComponentsAction.searchAndModify(item, processType, filter, Arrays .<IComponentConversion> asList(changeAlwaysTrustValue)); } catch (PersistenceException e) { ExceptionHandler.process(e); return ExecutionResult.FAILURE; } } return ExecutionResult.SUCCESS_NO_ALERT; }
Source:
<code>public void rewindLifespan(Lifespan lifespan, ConnectorPartitionHandle partitionHandle) { <START> checkState(state == State.INITIALIZED || state == State.SPLITS_ADDED); <END> scheduleGroups.put(lifespan, new ScheduleGroup(partitionHandle)); splitSource.rewind(partitionHandle); }</code><technical_language>State.NO_MORE_SPLITS allowed in here</technical_language>

Target:
public synchronized void rewindLifespan(Lifespan lifespan, ConnectorPartitionHandle partitionHandle) { checkState(state == State.INITIALIZED || state == State.SPLITS_ADDED, "Current state %s is not rewindable", state); scheduleGroups.remove(lifespan); splitSource.rewind(partitionHandle); }
Source:
<code>protected void Perform() { final VM vm = getVm(); final IVdcUser currentUser = getCurrentUser(); final String domainController = currentUser != null ? currentUser.getDomainControler() : ""; final String password = currentUser != null ? currentUser.getPassword() : ""; setSucceeded(Backend .getInstance() .getResourceManager() .RunVdsCommand( VDSCommandType.VmLogon, new VmLogonVDSCommandParameters(getVdsId(), vm.getvm_guid(), domainController, getUserName(), password)).getSucceeded()); if (getSucceeded() && currentUser != null) { vm.setguest_cur_user_name(currentUser.getUserName()); vm.setguest_cur_user_id(currentUser.getUserId()); <START> DbFacade.getInstance().getVmDynamicDAO().update(vm.getDynamicData()); <END> } }</code><technical_language>set succeded is finished</technical_language>

Target:
protected void Perform() { final VM vm = getVm(); final IVdcUser currentUser = getCurrentUser(); final String domainController = currentUser != null ? currentUser.getDomainControler() : ""; final String password = currentUser != null ? currentUser.getPassword() : ""; final boolean sentToVM = Backend .getInstance() .getResourceManager() .RunVdsCommand( VDSCommandType.VmLogon, new VmLogonVDSCommandParameters(getVdsId(), vm.getvm_guid(), domainController, getUserName(), password)).getSucceeded(); if (sentToVM && currentUser != null) { vm.setguest_cur_user_name(currentUser.getUserName()); vm.setguest_cur_user_id(currentUser.getUserId()); DbFacade.getInstance().getVmDynamicDAO().update(vm.getDynamicData()); } setSucceeded(sentToVM); }
Source:
<code>public String toString() { StringBuilder sb = new StringBuilder(); sb.append("FRAGMENT_TASK (FROM "); sb.append(CoreUtils.hsIdToString(m_coordinatorHSId)); <START> sb.append(") FOR TXN ").append(m_txnId); <END> sb.append(" FOR REPLAY ").append(isForReplay()); sb.append(", SP HANDLE: ").append(TxnEgo.txnIdToString(getSpHandle())); sb.append("\n"); if (m_isReadOnly) sb.append(" READ, COORD "); else sb.append(" WRITE, COORD "); sb.append(CoreUtils.hsIdToString(m_coordinatorHSId)); if (!m_emptyForRestart) { for (FragmentData item : m_items) { sb.append("\n=====\n"); sb.append(item.toString()); } } else { sb.append("\n=====\n"); sb.append(" FRAGMENT EMPTY FOR RESTART SERIALIZATION"); } if (m_isFinal) sb.append("\n THIS IS THE FINAL TASK"); if (m_taskType == USER_PROC) { sb.append("\n THIS IS A USER TASK"); } else if (m_taskType == SYS_PROC_PER_PARTITION) { sb.append("\n THIS IS A SYSPROC RUNNING PER PARTITION"); } else if (m_taskType == SYS_PROC_PER_SITE) { sb.append("\n THIS IS A SYSPROC TASK RUNNING PER EXECUTION SITE"); } else { sb.append("\n UNKNOWN FRAGMENT TASK TYPE"); } if (m_emptyForRestart) sb.append("\n THIS IS A NULL FRAGMENT TASK USED FOR RESTART"); return sb.toString(); }</code><technical_language>Accidental change</technical_language>

Target:
public String toString() { StringBuilder sb = new StringBuilder(); sb.append("FRAGMENT_TASK (FROM "); sb.append(CoreUtils.hsIdToString(m_coordinatorHSId)); sb.append(") FOR TXN ").append(TxnEgo.txnIdToString(m_txnId)); sb.append(" FOR REPLAY ").append(isForReplay()); sb.append(", SP HANDLE: ").append(TxnEgo.txnIdToString(getSpHandle())); sb.append("\n"); if (m_isReadOnly) sb.append(" READ, COORD "); else sb.append(" WRITE, COORD "); sb.append(CoreUtils.hsIdToString(m_coordinatorHSId)); if (!m_emptyForRestart) { for (FragmentData item : m_items) { sb.append("\n=====\n"); sb.append(item.toString()); } } else { sb.append("\n=====\n"); sb.append(" FRAGMENT EMPTY FOR RESTART SERIALIZATION"); } if (m_isFinal) sb.append("\n THIS IS THE FINAL TASK"); if (m_taskType == USER_PROC) { sb.append("\n THIS IS A USER TASK"); } else if (m_taskType == SYS_PROC_PER_PARTITION) { sb.append("\n THIS IS A SYSPROC RUNNING PER PARTITION"); } else if (m_taskType == SYS_PROC_PER_SITE) { sb.append("\n THIS IS A SYSPROC TASK RUNNING PER EXECUTION SITE"); } else { sb.append("\n UNKNOWN FRAGMENT TASK TYPE"); } if (m_emptyForRestart) sb.append("\n THIS IS A NULL FRAGMENT TASK USED FOR RESTART"); return sb.toString(); }
Source:
<code>public List<DocumentRevs> getRevisions(String documentId, Collection<String> revisionIds, Collection<String> attsSince, boolean pullAttachmentsInline) { List<OpenRevision> openRevisions = couchClient.getDocWithOpenRevisions(documentId, revisionIds, attsSince, pullAttachmentsInline); List<DocumentRevs> documentRevs = new ArrayList<DocumentRevs>(); for(OpenRevision openRev : openRevisions) { if(openRev instanceof OkOpenRevision) { documentRevs.add(((OkOpenRevision) openRev).getDocumentRevs()); } else { MissingOpenRevision missing = (MissingOpenRevision) openRev; logger.info(String.format(Locale.ENGLISH, <START> "Revision %s for document %s is missing, generating stub.", <END> missing.getRevision(), documentId)); DocumentRevs stub = new DocumentRevs(); stub.setRev(((MissingOpenRevision) openRev).getRevision()); stub.setId(documentId); documentRevs.add(stub); } } return documentRevs; }</code><technical_language>Strange double space %s</technical_language>

Target:
public List<DocumentRevs> getRevisions(String documentId, Collection<String> revisionIds, Collection<String> attsSince, boolean pullAttachmentsInline) { List<OpenRevision> openRevisions = couchClient.getDocWithOpenRevisions(documentId, revisionIds, attsSince, pullAttachmentsInline); List<DocumentRevs> documentRevs = new ArrayList<DocumentRevs>(); for(OpenRevision openRev : openRevisions) { if(openRev instanceof OkOpenRevision) { documentRevs.add(((OkOpenRevision) openRev).getDocumentRevs()); } else { throw new RuntimeException("Missing open revision for document:" + documentId + ", revisions: " + Arrays.asList(revisionIds)); } } return documentRevs; }
Source:
<code>protected boolean isKerboseEnabled() { if (!StringUtils.isAnyEmpty(getProperty(ZEPPELIN_SUBMARINE_AUTH_TYPE)) && getProperty(ZEPPELIN_SUBMARINE_AUTH_TYPE) <START> .equalsIgnoreCase("kerberos")) { <END> return true; } return false; }</code><technical_language>indentation? merge this line</technical_language>

Target:
protected boolean isKerboseEnabled() { String authType = getProperty(ZEPPELIN_SUBMARINE_AUTH_TYPE, ""); if (StringUtils.equals(authType, "kerberos")) { return true; } return false; }
Source:
<code>public TimeSeries timeSeries(LogsMessage logsMessage, Double[] output) throws NumberFormatException { Match match = grok().match(logsMessage.getLogLine()); match.captures(); if (match.getEnd() == 0) return null; Map<String, Object> matches = match.toMap(); if (output != null) { if (matches.containsKey(valueLabel)) { output[0] = Double.parseDouble((String) matches.get(valueLabel)); } else { output[0] = null; } } TimeSeries.Builder builder = TimeSeries.newBuilder(); String dynamicName = expandTemplate(metricName, matches); String sourceName = StringUtils.isBlank(hostName) ? logsMessage.hostOrDefault("parsed-logs") : expandTemplate(hostName, matches); Map<String, String> tags = Maps.newTreeMap(); for (int i = 0; i < tagKeys.size(); i++) { String tagKey = tagKeys.get(i); if (tagValues.size() > 0) { String value = expandTemplate(tagValues.get(i), matches); <START> if(value.trim().length() > 0) { <END> tags.put(tagKey, value); } } else { String tagValueLabel = tagValueLabels.get(i); if (!matches.containsKey(tagValueLabel)) { logger.severe("Application error: unparsed tag key."); continue; } String value = (String) matches.get(tagValueLabel); if(value.trim().length() > 0) { tags.put(tagKey, value); } } } builder.setAnnotations(tags); return builder.setMetric(dynamicName).setHost(sourceName).build(); }</code><technical_language>StringUtils.isNotBlank()</technical_language>

Target:
public TimeSeries timeSeries(LogsMessage logsMessage, Double[] output) throws NumberFormatException { Match match = grok().match(logsMessage.getLogLine()); match.captures(); if (match.getEnd() == 0) return null; Map<String, Object> matches = match.toMap(); if (output != null) { if (matches.containsKey(valueLabel)) { output[0] = Double.parseDouble((String) matches.get(valueLabel)); } else { output[0] = null; } } TimeSeries.Builder builder = TimeSeries.newBuilder(); String dynamicName = expandTemplate(metricName, matches); String sourceName = StringUtils.isBlank(hostName) ? logsMessage.hostOrDefault("parsed-logs") : expandTemplate(hostName, matches); Map<String, String> tags = Maps.newTreeMap(); for (int i = 0; i < tagKeys.size(); i++) { String tagKey = tagKeys.get(i); if (tagValues.size() > 0) { String value = expandTemplate(tagValues.get(i), matches); if(StringUtils.isNotBlank(value)) { tags.put(tagKey, value); } } else { String tagValueLabel = tagValueLabels.get(i); if (!matches.containsKey(tagValueLabel)) { logger.severe("Application error: unparsed tag key."); continue; } String value = (String) matches.get(tagValueLabel); if(StringUtils.isNotBlank(value)) { tags.put(tagKey, value); } } } builder.setAnnotations(tags); return builder.setMetric(dynamicName).setHost(sourceName).build(); }
Source:
<code>private void getAccessToken(String code) { String clientSecret = getString(R.string.mapbox_auth_flow_secret); OkHttpClient client = new OkHttpClient(); Request request = new Request.Builder() .addHeader("User-Agent", "Android Dev Preview") .addHeader("Content-Type", "application/x-www-form-urlencoded") .url(ACCESS_TOKEN_URL) .post(RequestBody.create(MediaType.parse("application/x-www-form-urlencoded"), "grant_type=authorization_code&client_id=" + clientId + "&client_secret=" + clientSecret <START> + "&redirect_uri=" + redirectUri + "&code=" + code)) <END> .build(); client.newCall(request).enqueue(new okhttp3.Callback() { @Override public void onFailure(okhttp3.Call call, IOException exception) { Log.d("AccountRetrievalService", "onFailure: " + exception); } @Override public void onResponse(okhttp3.Call call, okhttp3.Response response) throws IOException { String json = response.body().string(); try { JSONObject data = new JSONObject(json); String accessToken = data.optString("access_token"); try { getUsernameFromJwt(accessToken); } catch (Exception exception) { exception.printStackTrace(); } getUserInfo(username, accessToken); } catch (JSONException exception) { exception.printStackTrace(); } } }); }</code><technical_language>Uri.Builder here</technical_language>

Target:
private void getAccessToken(String code) { String clientSecret = getString(R.string.mapbox_auth_flow_secret); String query = new Uri.Builder() .appendQueryParameter("grant_type", "authorization_code") .appendQueryParameter("client_id", clientId) .appendQueryParameter("client_secret", clientSecret) .appendQueryParameter("redirect_uri", redirectUri) .appendQueryParameter("code", code) .build().getQuery(); OkHttpClient client = new OkHttpClient(); Request request = new Request.Builder() .addHeader("User-Agent", "Android Dev Preview") .addHeader("Content-Type", "application/x-www-form-urlencoded") .url(ACCESS_TOKEN_URL) .post(RequestBody.create(MediaType.parse("application/x-www-form-urlencoded"), query)) .build(); client.newCall(request).enqueue(new okhttp3.Callback() { @Override public void onFailure(okhttp3.Call call, IOException exception) { Log.d("AccountRetrievalService", "onFailure: " + exception); } @Override public void onResponse(okhttp3.Call call, okhttp3.Response response) throws IOException { String json = response.body().string(); try { JSONObject data = new JSONObject(json); String accessToken = data.optString("access_token"); try { getUsernameFromJwt(accessToken); } catch (Exception exception) { exception.printStackTrace(); } getUserInfo(username, accessToken); } catch (JSONException exception) { exception.printStackTrace(); } } }); }
Source:
<code>public void parseOptionMap(Map<String, String[]> parameters, Set<String> argNames) throws CmdLineException { ArrayList<String> tmp = new ArrayList<String>(); for (Map.Entry<String, String[]> ent : parameters.entrySet()) { String name = ent.getKey(); <START> if (name.equals("token")) { <END> continue; } if (!name.startsWith("-")) { if (name.length() == 1) { name = "-" + name; } else { name = "--" + name; } } if (findHandler(name) instanceof BooleanOptionHandler) { boolean on = false; for (String value : ent.getValue()) { on = toBoolean(ent.getKey(), value); } if (on) { tmp.add(name); } } else { for (String value : ent.getValue()) { if (!argNames.contains(ent.getKey())) { tmp.add(name); } tmp.add(value); } } } parser.parseArgument(tmp.toArray(new String[tmp.size()])); }</code><technical_language>This is good argument for calling _token instead of token. a valid command line flag named --_token. day a flag named --token somewhere</technical_language>

Target:
public void parseOptionMap(Map<String, String[]> parameters, Set<String> argNames) throws CmdLineException { ArrayList<String> tmp = new ArrayList<String>(); for (Map.Entry<String, String[]> ent : parameters.entrySet()) { String name = ent.getKey(); if (name.equals("_token")) { continue; } if (!name.startsWith("-")) { if (name.length() == 1) { name = "-" + name; } else { name = "--" + name; } } if (findHandler(name) instanceof BooleanOptionHandler) { boolean on = false; for (String value : ent.getValue()) { on = toBoolean(ent.getKey(), value); } if (on) { tmp.add(name); } } else { for (String value : ent.getValue()) { if (!argNames.contains(ent.getKey())) { tmp.add(name); } tmp.add(value); } } } parser.parseArgument(tmp.toArray(new String[tmp.size()])); }
Source:
<code>private static Field getField(Object svc, String fieldName) throws NoSuchFieldException { Field field = null; Class clazz = svc.getClass(); while (!(clazz == Object.class || field != null)) { try { field = clazz.getDeclaredField(fieldName); break; } catch (NoSuchFieldException e) { <START> } <END> clazz = clazz.getSuperclass(); } if (field == null) { throw new NoSuchFieldException("Field not found"); } return field; }</code><technical_language>previous PR review: Sonar Lint complain if log exception</technical_language>

Target:
private static Field getField(Object svc, String fieldName) throws NoSuchFieldException { Field field = null; Class clazz = svc.getClass(); while (!(clazz == Object.class || field != null)) { try { field = clazz.getDeclaredField(fieldName); break; } catch (NoSuchFieldException e) { } clazz = clazz.getSuperclass(); } if (field == null) { throw new NoSuchFieldException(String.format("Field not found: %s", fieldName)); } return field; }
Source:
<code>private void parseOptions(String argv) { OptionParser parser = new OptionParser(); parser.accepts( "host" ).withRequiredArg(); parser.accepts( "password" ).withRequiredArg(); parser.accepts( "user" ).withRequiredArg(); parser.accepts( "port" ).withRequiredArg(); parser.accepts( "producer" ).withRequiredArg(); OptionSet options = parser.parse(argv); if ( options.has("host")) this.mysqlHost = (String) options.valueOf("host"); if ( options.has("password")) this.mysqlPassword = (String) options.valueOf("password"); if ( options.has("user")) this.mysqlUser = (String) options.valueOf("user"); if ( options.has("port")) this.mysqlPort = Integer.valueOf((String) options.valueOf("port")); if ( options.has("producer")) <START> this.producer = (String) options.valueOf("producer"); <END> }</code><technical_language>rename producer -> producerType. a getProducer() in creates producer object</technical_language>

Target:
private void parseOptions(String argv) { OptionParser parser = new OptionParser(); parser.accepts( "host" ).withRequiredArg(); parser.accepts( "password" ).withRequiredArg(); parser.accepts( "user" ).withRequiredArg(); parser.accepts( "port" ).withRequiredArg(); parser.accepts( "producer" ).withRequiredArg(); OptionSet options = parser.parse(argv); if ( options.has("host")) this.mysqlHost = (String) options.valueOf("host"); if ( options.has("password")) this.mysqlPassword = (String) options.valueOf("password"); if ( options.has("user")) this.mysqlUser = (String) options.valueOf("user"); if ( options.has("port")) this.mysqlPort = Integer.valueOf((String) options.valueOf("port")); if ( options.has("producer")) this.producerType = (String) options.valueOf("producer"); }
Source:
<code>public CompletableFuture<Object> invokeAsync(ComponentRegistry componentRegistry) { <START> gtxToCheck.removeIf(globalTransaction -> componentRegistry.getTransactionTable().containsLocalTx(globalTransaction)); <END> return CompletableFuture.completedFuture(gtxToCheck); }</code><technical_language>Please extract componentRegistry.getTransactionTable() a local variable lambda, if expensive line shorter</technical_language>

Target:
public CompletionStage<?> invokeAsync(ComponentRegistry componentRegistry) { TransactionTable txTable = componentRegistry.getTransactionTable(); gtxToCheck.removeIf(txTable::containsLocalTx); return CompletableFuture.completedFuture(gtxToCheck); }
Source:
<code>public Solution[] computeOptimizationProblemForAllDifferentSolutions(SuitableOptions cloudOffers, QualityInformation requirements, Topology topology, int numPlansToGenerate) { <START> return super.filterUniqueSolutions( <END> computeOptimizationProblem(cloudOffers, requirements, topology, numPlansToGenerate)); }</code><technical_language>is necessary super here</technical_language>

Target:
public Solution[] computeOptimizationProblemForAllDifferentSolutions(SuitableOptions cloudOffers, QualityInformation requirements, Topology topology, int numPlansToGenerate) { return filterUniqueSolutions(computeOptimizationProblem(cloudOffers, requirements, topology, numPlansToGenerate)); }
Source:
<code>private String buildRequest(VariantAnnotation annotation) { StringBuilder sb = new StringBuilder(annotation.getVariantId()); <START> sb.insert(0,"chr"); <END> return sb.toString(); }</code><technical_language>check if start chr</technical_language>

Target:
private String buildRequest(VariantAnnotation annotation) { StringBuilder sb = new StringBuilder(annotation.getVariantId()); if(!sb.toString().startsWith("chr")) { sb.insert(0,"chr"); } return sb.toString(); }
Source:
<code>public List<String> getUsages() { return Arrays.asList(new String[] { <START> buildCommandUsage(SUBCMD_LIST + " <itemname> <namespace>", <END> "lists the metadata for the specific item in the given namespace"), buildCommandUsage(SUBCMD_REMOVE + " <itemname> <namespace>", "removes metadata for the specific item in the given namespace"), buildCommandUsage(SUBCMD_ADD + " <itemName> <namespace> <value> [{key1=value1, key2=value2, ...}]", "adds or updates metadata value (and optional config values) for the specific item in the given namespace") }); }</code><technical_language>cosmetic: <itemname> is spelled <itemName> in other item related commands</technical_language>

Target:
public List<String> getUsages() { return Arrays.asList(new String[] { buildCommandUsage(SUBCMD_LIST + " <itemName> <namespace>", "lists the metadata for the specific item in the given namespace"), buildCommandUsage(SUBCMD_REMOVE + " <itemName> <namespace>", "removes metadata for the specific item in the given namespace"), buildCommandUsage(SUBCMD_ADD + " <itemName> <namespace> <value> [{key1=value1, key2=value2, ...}]", "adds or updates metadata value (and optional config values) for the specific item in the given namespace") }); }
Source:
<code>public void initializeDefaultPreferences() <START> { <END> IPreferenceStore store = getPreferenceStore(); DiagramGeneralPreferencePage.initDefaults(store); DiagramAppearancePreferencePage.initDefaults(store); DiagramConnectionsPreferencePage.initDefaults(store); DiagramPrintingPreferencePage.initDefaults(store); DiagramRulersAndGridPreferencePage.initDefaults(store); }</code><technical_language>remove this change this patch unrelated <?></technical_language>

Target:
public void initializeDefaultPreferences() { IPreferenceStore store = getPreferenceStore(); DiagramsPreferencePage.initDefaults(store); AppearancePreferencePage.initDefaults(store); ConnectionsPreferencePage.initDefaults(store); PrintingPreferencePage.initDefaults(store); RulerGridPreferencePage.initDefaults(store); }
Source:
<code>public final CloseFuture closeAsync() { CloseFuture future = closeFuture.get(); if (future != null) return future; phase.set(Phase.CLOSING); <START> for (SettableFuture<Connection> pendingBorrow : pendingBorrows) { <END> pendingBorrow.setException(new ConnectionException(host.getSocketAddress(), "Pool is shutdown")); } future = new CloseFuture.Forwarding(discardAvailableConnections()); return closeFuture.compareAndSet(null, future) ? future : closeFuture.get(); }</code><technical_language>pool phase protect enqueuing borrows for a Pool is closed, a possibility a request added pendingBorrows afterwards? possibility slim, happen: 1. thread-X: Enters borrowConnection, pool phase is READY code proceeds. 2. thread-Y: Enters closeAsync, sets phase CLOSING, fails futures in pendingBorrows. 3. thread-X: Notices connections.isEmptyevaluates true, spawns new connection calls enqueue. other condition enqueue called. is a future in pendingBorrows completes right? window tiny possible. able reproduce in a debugger adding some breakpoints</technical_language>

Target:
final CloseFuture closeAsync() { CloseFuture future = closeFuture.get(); if (future != null) return future; phase.set(Phase.CLOSING); for (SettableFuture<Connection> pendingBorrow : pendingBorrows) { pendingBorrow.setException(new ConnectionException(host.getSocketAddress(), "Pool is shutdown")); } future = new CloseFuture.Forwarding(discardAvailableConnections()); return closeFuture.compareAndSet(null, future) ? future : closeFuture.get(); }
Source:
<code>public static void start(final Stage primaryStage) { GridPane grid = new GridPane(); grid.setPadding(new javafx.geometry.Insets(10, 10, 10, 10)); grid.setVgap(20); grid.setHgap(20); Button backButton; backButton = new Button("Back"); GridPane.setConstraints(backButton, 3, 20); Label label = new Label("Hier komen settings lijstjes ofzo?"); GridPane.setConstraints(label, 10, 10); grid.getChildren().addAll(backButton, label); backButton.setOnAction(new EventHandler<ActionEvent>() { public void handle(ActionEvent event) { StartScreen.start(primaryStage); } }); <START> settings = new Scene(grid, 640, 480); <END> primaryStage.setScene(settings); primaryStage.show(); }</code><technical_language>values WIDTH HEIGHT constants</technical_language>

Target:
public static void start(final Stage primaryStage) { GridPane grid = new GridPane(); grid.setPadding(new javafx.geometry.Insets(10, 10, 10, 10)); grid.setVgap(20); grid.setHgap(20); Button backButton; backButton = new Button("Back"); GridPane.setConstraints(backButton, 3, 20); Label label = new Label("Hier komen settings lijstjes ofzo?"); GridPane.setConstraints(label, 10, 10); grid.getChildren().addAll(backButton, label); backButton.setOnAction(new EventHandler<ActionEvent>() { public void handle(ActionEvent event) { StartScreen.start(primaryStage); } }); settings = new Scene(grid, GameWindow.WIDTH, GameWindow.HEIGHT); primaryStage.setScene(settings); primaryStage.show(); }
Source:
<code>void close() { isOpen.set(false); try { chunkFillerThread.join(NonBlockingRouter.SHUTDOWN_WAIT_MS); } catch (InterruptedException e) { logger.error("Caught interrupted exception while waiting for chunkFillerThread to finish"); Thread.currentThread().interrupt(); } Iterator<PutOperation> iter = putOperations.values().iterator(); while (iter.hasNext()) { PutOperation op = iter.next(); router.completeOperation(op.getFuture(), op.getCallback(), null, <START> new RouterException("Cannot accept operation because Router is closed", RouterErrorCode.RouterClosed)); <END> iter.remove(); } }</code><technical_language>complete operation? (Since accepted)</technical_language>

Target:
void close() { isOpen.set(false); try { chunkFillerThread.join(NonBlockingRouter.SHUTDOWN_WAIT_MS); } catch (InterruptedException e) { logger.error("Caught interrupted exception while waiting for chunkFillerThread to finish"); Thread.currentThread().interrupt(); } Iterator<PutOperation> iter = putOperations.iterator(); while (iter.hasNext()) { PutOperation op = iter.next(); NonBlockingRouter.completeOperation(op.getFuture(), op.getCallback(), null, new RouterException("Aborted operation because Router is closed", RouterErrorCode.RouterClosed)); iter.remove(); } }
Source:
<code>public String pop() { <START> String value = lines.remove(lines.lastKey()); <END> return value; }</code><technical_language>Return simplified: return lines.remove(lines.lastKey()); :)</technical_language>

Target:
public String pop() { return lines.remove(lines.lastKey()); }
Source:
<code>public static void getHDFSEntities(NavApiCient client, MetadataExtractor extractor, String marker){ Iterable<Map<String, Object>> HdfsAll = extractor.extractMetadata(marker, "sourceType:HDFS", null).getEntities(); getFirstResult(HdfsAll); Iterable<Map<String, Object>> HdfsSingleSource = extractor.extractMetadata(marker, "sourceType:HDFS AND " + <START> "identity: 4fb48492c18e21ae5be9c2f7faeffe62", null).getEntities(); <END> getFirstResult(HdfsSingleSource); }</code><technical_language>hard coded id</technical_language>

Target:
public static void getHDFSEntities(NavApiCient client, MetadataExtractor extractor, String marker){ Iterable<Map<String, Object>> HdfsAll = extractor.extractMetadata(marker, null, "sourceType:HDFS", null) .getEntities(); getFirstResult(HdfsAll); Source hdfsSource = client.getOnlySource(SourceType.HDFS); Iterable<Map<String, Object>> HdfsSingleSource = extractor.extractMetadata(marker, null, "sourceType:HDFS AND " + "sourceId:" + hdfsSource.getIdentity(), null).getEntities(); getFirstResult(HdfsSingleSource); }
Source:
<code>public static Path getApexDFSRootDir(FileSystem fs, Configuration conf) throws IOException { String apexDfsRootDir = conf.get(APEX_APP_DFS_ROOT_DIR); if (StringUtils.isBlank(apexDfsRootDir)) { return getDTDFSRootDir(fs, conf); } boolean useImpersonated = conf.getBoolean(StramUserLogin.DT_APP_PATH_IMPERSONATED, false); <START> return processDFSRootDirHelper(fs, conf, apexDfsRootDir, useImpersonated, true); <END> }</code><technical_language>this method is is responsible for returning correct folder based impersonation process method is more of a general method, this method calculates short user name passes short user name process method instead of impersonated flag</technical_language>

Target:
public static Path getApexDFSRootDir(FileSystem fs, Configuration conf) { String apexDfsRootDir = conf.get(APEX_APP_DFS_ROOT_DIR); boolean useImpersonated = conf.getBoolean(StramUserLogin.DT_APP_PATH_IMPERSONATED, false); String userShortName = null; if (useImpersonated) { try { userShortName = UserGroupInformation.getCurrentUser().getShortUserName(); } catch (IOException ex) { LOG.warn("Error getting current/login user name {}", apexDfsRootDir, ex); } } if (!useImpersonated || userShortName == null) { return getDTDFSRootDir(fs, conf); } if (StringUtils.isBlank(apexDfsRootDir)) { apexDfsRootDir = getDefaultRootFolder(); } return evalDFSRootDir(fs, conf, apexDfsRootDir, userShortName, true); }
Source:
<code>public void TestTraceBehavior() throws Exception { logger.info("Starting test encoding1={}, encoding2={}, sampled={}", encoding1, encoding2, sampled); String host = tchannel.getListeningHost(); Downstream request = new Downstream( SERVER_NAME, "s3", encoding1, host + ":" + tchannel.getPort(), new Downstream( SERVER_NAME, "s4", encoding2, host + ":" + tchannel.getPort(), null ) ); String baggage = "luggage-" + System.currentTimeMillis(); Span span = tracer.buildSpan("root").startManual(); span.setBaggageItem(BAGGAGE_KEY, baggage); if (sampled) { Tags.SAMPLING_PRIORITY.set(span, 1); } tchannel.getTracingContext().pushSpan(span); Response response = traceBehavior.handleRequest(new Request("s2", request)); logger.info("Response: {}", response); span.finish(); SpanContext spanContext = span.context(); <START> String traceId = String.format("%s", spanContext.toTraceId()); <END> validate(response, traceId, baggage, 2); if (sampled) { for (int i = 0; i < 100; i++) { if (reporter.getSpans().size() == 5) { break; } Thread.sleep(10); } assertEquals(5, reporter.getSpans().size()); } }</code><technical_language>toTraceId returns a string, need call format()</technical_language>

Target:
public void TestTraceBehavior() throws Exception { logger.info("Starting test encoding1={}, encoding2={}, sampled={}", encoding1, encoding2, sampled); String host = tchannel.getListeningHost(); Downstream request = new Downstream( SERVER_NAME, "s3", encoding1, host + ":" + tchannel.getPort(), new Downstream( SERVER_NAME, "s4", encoding2, host + ":" + tchannel.getPort(), null ) ); String baggage = "luggage-" + System.currentTimeMillis(); Span span = tracer.buildSpan("root").startManual(); span.setBaggageItem(BAGGAGE_KEY, baggage); if (sampled) { Tags.SAMPLING_PRIORITY.set(span, 1); } tchannel.getTracingContext().pushSpan(span); Response response = traceBehavior.handleRequest(new Request("s2", request)); logger.info("Response: {}", response); span.finish(); String traceId = span.context().toTraceId(); validate(response, traceId, baggage, 2); if (sampled) { for (int i = 0; i < 100; i++) { if (reporter.getSpans().size() == 5) { break; } Thread.sleep(10); } assertEquals(5, reporter.getSpans().size()); } }
Source:
<code>private void bindAndInit(final InteractiveUIContent interactiveUI, CheckboxTableViewer descriptorViewer) { if (isSimple) { <START> interactiveUI.select(defaultSelection); <END> if (defaultCheck != null) { IItemDescriptor<T> defaultCheckedElement = defaultCheck.iterator().next(); interactiveUI.checkElement(defaultCheckedElement); if (dataHolder != null) { dataHolder.setData(Collections.singleton(defaultCheckedElement)); } } descriptorViewer.addCheckStateListener(new SingleCheckListener<T>(dataHolder, descriptorViewer, Display.getDefault().getActiveShell())); } else { interactiveUI.select(defaultSelection); if (defaultCheck != null) { if (dataHolder != null) { dataHolder.setData(defaultCheck); } } if (dataHolder != null) { bindMultipleData(DataHolder.DATA_FIELD_NAME, interactiveUI.getViewer(), dataHolder); } } }</code><technical_language>This is common if else; move out of if block</technical_language>

Target:
private void bindAndInit(final InteractiveUIContent interactiveUI, CheckboxTableViewer descriptorViewer) { if (defaultSelection != null) { interactiveUI.select(defaultSelection); } if (isSimple) { if (defaultCheck != null) { IItemDescriptor<T> defaultCheckedElement = defaultCheck.iterator().next(); interactiveUI.checkElement(defaultCheckedElement); if (dataHolder != null) { dataHolder.setData(Collections.singleton(defaultCheckedElement)); } } descriptorViewer.addCheckStateListener(new SingleCheckListener<T>(dataHolder, descriptorViewer, Display.getDefault().getActiveShell())); } else { if (dataHolder != null) { if (defaultCheck != null) { dataHolder.setData(defaultCheck); } bindMultipleData(DataHolder.DATA_FIELD_NAME, interactiveUI.getViewer(), dataHolder); } } }
Source:
<code>public static void extractArchive(File sourceBundle, File root) throws IOException { ZipFile zipfile = new ZipFile(sourceBundle); Enumeration<? extends ZipEntry> e = zipfile.entries(); while (e.hasMoreElements()) { ZipEntry ze = e.nextElement(); File file = new File(root, ze.getName()); if (ze.isDirectory()) { file.mkdirs(); } else { try (InputStream in = zipfile.getInputStream(ze); FileOutputStream out = new FileOutputStream(file)) { <START> assertNotNull(in); <END> copyFile(in, out); } } } }</code><technical_language>do assert? IOexception</technical_language>

Target:
public static void extractArchive(File sourceBundle, File root) throws IOException { ZipFile zipfile = new ZipFile(sourceBundle); Enumeration<? extends ZipEntry> e = zipfile.entries(); while (e.hasMoreElements()) { ZipEntry ze = e.nextElement(); File file = new File(root, ze.getName()); if (ze.isDirectory()) { file.mkdirs(); } else { try (InputStream in = zipfile.getInputStream(ze); FileOutputStream out = new FileOutputStream(file)) { if (in == null) { throw new IOException("Cannot get InputStream for " + ze); } copyFile(in, out); } } } }
Source:
<code>private boolean equalsNetCapabilitiesRequestable(NetworkCapabilities that) { return ((this.mNetworkCapabilities & ~NON_REQUESTABLE_CAPABILITIES) == (that.mNetworkCapabilities & ~NON_REQUESTABLE_CAPABILITIES)); <START> } <END></code><technical_language>this method check unwanted capabilities well. (Or another method called equalsUnwantedNetCapabilitiesRequestable.)</technical_language>

Target:
private boolean equalsNetCapabilitiesRequestable(NetworkCapabilities that) { return ((this.mNetworkCapabilities & ~NON_REQUESTABLE_CAPABILITIES) == (that.mNetworkCapabilities & ~NON_REQUESTABLE_CAPABILITIES)) && ((this.mUnwantedNetworkCapabilities & ~NON_REQUESTABLE_CAPABILITIES) == (that.mUnwantedNetworkCapabilities & ~NON_REQUESTABLE_CAPABILITIES)); }
Source:
<code>protected Constraint serviceLocationSpread(ConstraintFactory factory) { <START> throw new UnsupportedOperationException("ConstraintCollectors.countDistinct should not count null as a distinct value"); <END> }</code><technical_language>MrProcessAssignment a null location? filters out a machine. machines a null location? If so, add a filter groupBy</technical_language>

Target:
protected Constraint serviceLocationSpread(ConstraintFactory factory) { return factory.from(MrService.class) .join(MrProcessAssignment.class, equal(Function.identity(), MrProcessAssignment::getService)) .groupBy((service, processAssignment) -> service, ConstraintCollectors.countDistinct((service, processAssignment) -> processAssignment.getLocation())) .filter((service, distinctLocationCount) -> distinctLocationCount < service.getLocationSpread()) .penalizeLong(MrConstraints.SERVICE_LOCATION_SPREAD, HardSoftLongScore.ONE_HARD, (service, distinctLocationCount) -> service.getLocationSpread() - distinctLocationCount); }
Source:
<code>public void testSendingWhileResumingInvokesEndpointContextMatcher() throws Exception { TestEndpointContextMatcher endpointMatcher = new TestEndpointContextMatcher(3); client.setEndpointContextMatcher(endpointMatcher); LatchDecrementingRawDataChannel channel = serverHelper.givenAnEstablishedSession(client, false); client.forceResumeAllSessions(); RawData outboundMessage = RawData.outbound(new byte[] { 0x01 }, new AddressEndpointContext(serverHelper.serverEndpoint), null, false); CountDownLatch latch = new CountDownLatch(1); channel.setLatch(latch); client.send(outboundMessage); assertThat(endpointMatcher.await(TIMEOUT_IN_MILLIS, TimeUnit.MILLISECONDS), is(true)); assertThat(endpointMatcher.getConnectionEndpointContext(2), is(notNullValue())); <START> assertTrue("DTLS client timed out after " + MAX_TIME_TO_WAIT_SECS + " seconds waitng for response!", latch.await(MAX_TIME_TO_WAIT_SECS, TimeUnit.SECONDS)); <END> }</code><technical_language>typo : waitng</technical_language>

Target:
public void testSendingWhileResumingInvokesEndpointContextMatcher() throws Exception { TestEndpointContextMatcher endpointMatcher = new TestEndpointContextMatcher(3); client.setEndpointContextMatcher(endpointMatcher); LatchDecrementingRawDataChannel channel = serverHelper.givenAnEstablishedSession(client, false); client.forceResumeAllSessions(); RawData outboundMessage = RawData.outbound(new byte[] { 0x01 }, new AddressEndpointContext(serverHelper.serverEndpoint), null, false); CountDownLatch latch = new CountDownLatch(1); channel.setLatch(latch); client.send(outboundMessage); assertThat(endpointMatcher.await(TIMEOUT_IN_MILLIS, TimeUnit.MILLISECONDS), is(true)); assertThat(endpointMatcher.getConnectionEndpointContext(2), is(notNullValue())); assertTrue("DTLS client timed out after " + MAX_TIME_TO_WAIT_SECS + " seconds waiting for response!", latch.await(MAX_TIME_TO_WAIT_SECS, TimeUnit.SECONDS)); }
Source:
<code>private static String getEntityPath(ClientLogger logger, MessagingEntityType entityType, String queueName, String topicName, String subscriptionName, SubQueue subQueue) { String entityPath; switch (entityType) { case QUEUE: entityPath = queueName; break; case SUBSCRIPTION: if (isNullOrEmpty(subscriptionName)) { throw logger.logExceptionAsError(new IllegalStateException(String.format( "topicName (%s) must have a subscriptionName associated with it.", topicName))); } entityPath = String.format(Locale.ROOT, SUBSCRIPTION_ENTITY_PATH_FORMAT, topicName, subscriptionName); break; default: throw logger.logExceptionAsError( new IllegalArgumentException("Unknown entity type: " + entityType)); } switch (subQueue) { case NONE: case TRANSFER_QUEUE: break; case DEAD_LETTER_QUEUE: entityPath += "/$deadletterqueue"; break; default: <START> logger.warning("Unsupported value of subqueue type {}.", subQueue); <END> } return entityPath; }</code><technical_language>I throw instead of logging it</technical_language>

Target:
private static String getEntityPath(ClientLogger logger, MessagingEntityType entityType, String queueName, String topicName, String subscriptionName, SubQueue subQueue) { String entityPath; switch (entityType) { case QUEUE: entityPath = queueName; break; case SUBSCRIPTION: if (isNullOrEmpty(subscriptionName)) { throw logger.logExceptionAsError(new IllegalStateException(String.format( "topicName (%s) must have a subscriptionName associated with it.", topicName))); } entityPath = String.format(Locale.ROOT, SUBSCRIPTION_ENTITY_PATH_FORMAT, topicName, subscriptionName); break; default: throw logger.logExceptionAsError( new IllegalArgumentException("Unknown entity type: " + entityType)); } if (subQueue == null) { return entityPath; } switch (subQueue) { case NONE: break; case TRANSFER_DEAD_LETTER_QUEUE: entityPath += TRANSFER_DEAD_LETTER_QUEUE_NAME_SUFFIX; break; case DEAD_LETTER_QUEUE: entityPath += DEAD_LETTER_QUEUE_NAME_SUFFIX; break; default: throw logger.logExceptionAsError(new IllegalArgumentException("Unsupported value of subqueue type: " + subQueue)); } return entityPath; }
Source:
<code>protected ExternalDataObject convertToExternalDataObject(Person person) { ExternalDataObject externalDataObject = new ExternalDataObject(sourceIdentifier); String lastName = ""; String firstName = ""; if (person.getName().getFamilyName() != null) { lastName = person.getName().getFamilyName().getValue(); externalDataObject.addMetadata(new MockMetadataValue("person", "familyName", null, null, lastName)); } if (person.getName().getGivenNames() != null) { firstName = person.getName().getGivenNames().getValue(); externalDataObject.addMetadata(new MockMetadataValue("person", "givenName", null, null, firstName)); } externalDataObject.setId(person.getName().getPath()); externalDataObject .addMetadata(new MockMetadataValue("dc", "identifier", "orcid", null, person.getName().getPath())); externalDataObject .addMetadata(new MockMetadataValue("dc", "identifier", "uri", null, orcidUrl + person.getName().getPath())); if (!StringUtils.isBlank(lastName) && !StringUtils.isBlank(firstName)) { externalDataObject.setDisplayValue(lastName + ", " + firstName); externalDataObject.setValue(lastName + ", " + firstName); } else if (StringUtils.isBlank(firstName)) { externalDataObject.setDisplayValue(lastName); externalDataObject.setValue(lastName); } else if (StringUtils.isBlank(lastName)) { externalDataObject.setDisplayValue(firstName); externalDataObject.setValue(firstName); } <START> return externalDataObject; <END> }</code><technical_language>If relevant, addressed in another Pull Request</technical_language>

Target:
protected ExternalDataObject convertToExternalDataObject(Person person) { ExternalDataObject externalDataObject = new ExternalDataObject(sourceIdentifier); String lastName = ""; String firstName = ""; if (person.getName().getFamilyName() != null) { lastName = person.getName().getFamilyName().getValue(); externalDataObject.addMetadata(new MetadataValueDTO("person", "familyName", null, null, lastName)); } if (person.getName().getGivenNames() != null) { firstName = person.getName().getGivenNames().getValue(); externalDataObject.addMetadata(new MetadataValueDTO("person", "givenName", null, null, firstName)); } externalDataObject.setId(person.getName().getPath()); externalDataObject .addMetadata(new MetadataValueDTO("dc", "identifier", "orcid", null, person.getName().getPath())); externalDataObject .addMetadata(new MetadataValueDTO("dc", "identifier", "uri", null, orcidUrl + person.getName().getPath())); if (!StringUtils.isBlank(lastName) && !StringUtils.isBlank(firstName)) { externalDataObject.setDisplayValue(lastName + ", " + firstName); externalDataObject.setValue(lastName + ", " + firstName); } else if (StringUtils.isBlank(firstName)) { externalDataObject.setDisplayValue(lastName); externalDataObject.setValue(lastName); } else if (StringUtils.isBlank(lastName)) { externalDataObject.setDisplayValue(firstName); externalDataObject.setValue(firstName); } return externalDataObject; }
Source:
<code>public void testMakesTempBackupEntriesUnlimited() { String mapName = randomMapName(); HazelcastInstance instance = instances[0]; putKeys(instance, mapName, 30, 0, 20); setTtl(instance, mapName, 0, 20, 0, TimeUnit.SECONDS); <START> sleepAtLeastMillis(30100); <END> for (int i = 0; i < CLUSTER_SIZE; i++) { assertKeys(instances, mapName, 0, 20); } }</code><technical_language>10s long, 30s, test qualify a @QuickTest? Also, happen some records expire setTtl(0) reaches backups, if sufficiently long hiccups, a issue</technical_language>

Target:
public void testMakesTempBackupEntriesUnlimited() { String mapName = randomMapName(); HazelcastInstance instance = instances[0]; putKeys(instance, mapName, 15, 0, 20); setTtl(instance, mapName, 0, 20, 0, TimeUnit.SECONDS); sleepAtLeastMillis(15100); for (int i = 0; i < CLUSTER_SIZE; i++) { assertKeys(instances, mapName, 0, 20); } }