auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>public static SpeedUnit getPreferredSpeedUnit(Context context){ SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context); <START> String speedUnit = prefs.getString(context.getResources().getString(R.string.pref_speedunit), "pace"); <END> assert speedUnit != null; switch(speedUnit){ case "speed": return SpeedUnit.SPEED; case "pace": default: return SpeedUnit.PACE; } }</code><technical_language>SPEED_UNIT instead of hardcoding "pace"</technical_language>

Target:
public static SpeedUnit getPreferredSpeedUnit(Context context){ SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context); String speedUnit = prefs.getString(context.getResources().getString(R.string.pref_speedunit), SpeedUnit.PACE.getValue()); assert speedUnit != null; switch(speedUnit){ case Constants.SPEED_UNIT.SPEED: return SpeedUnit.SPEED; case Constants.SPEED_UNIT.PACE: default: return SpeedUnit.PACE; } }
Source:
<code>private Response makeSyncRequest(PostRequest syncPost) throws CommCareSessionException { Hashtable<String, String> params = syncPost.getEvaluatedParams(sessionWrapper.getEvaluationContext()); String url = buildUrl(syncPost.getUrl().toString()); printStream.println(String.format("Syncing with url %s and parameters %s", url, params)); MultipartBody postBody = buildPostBody(params); String credential = Credentials.basic(username, password); Request request = new Request.Builder() .url(url) .method("POST", RequestBody.create(null, new byte[0])) .header("Authorization", credential) .post(postBody) .build(); try { OkHttpClient client = new OkHttpClient(); return client.newCall(request).execute(); } catch (IOException e) { <START> throw new CommCareSessionException("Exception while making sync request", e); <END> } }</code><technical_language>in theory this IOException easily represent a number of outcomes, right? A session exception's kill session entirely. imagine more sense for this a retry-able event expresses error (in case error phone debugging)</technical_language>

Target:
private Response makeSyncRequest(PostRequest syncPost) throws CommCareSessionException, IOException { Hashtable<String, String> params = syncPost.getEvaluatedParams(sessionWrapper.getEvaluationContext()); String url = buildUrl(syncPost.getUrl().toString()); printStream.println(String.format("Syncing with url %s and parameters %s", url, params)); MultipartBody postBody = buildPostBody(params); String credential = Credentials.basic(username, password); Request request = new Request.Builder() .url(url) .method("POST", RequestBody.create(null, new byte[0])) .header("Authorization", credential) .post(postBody) .build(); OkHttpClient client = new OkHttpClient(); return client.newCall(request).execute(); }
Source:
<code>public void removeRemoteSource(TaskId sourceTaskId) { requireNonNull(sourceTaskId, "sourceTaskId is null"); log.debug("Removing remote source %s from task %s", sourceTaskId, taskId); for (ExchangeClient exchangeClient : ImmutableList.copyOf(exchangeClientManager.getExchangeClients())) { exchangeClient.removeRemoteSource(sourceTaskId); <START> } <END> }</code><technical_language>ImmutableList.copyOf is unnecessary. IIRC for methods return a copy of internal collection, do do another copyOf call, rely is returned callee</technical_language>

Target:
public void removeRemoteSource(TaskId sourceTaskId) { requireNonNull(sourceTaskId, "sourceTaskId is null"); log.debug("Removing remote source %s from task %s", sourceTaskId, taskId); taskExchangeClientManager.getExchangeClients() .forEach(exchangeClient -> exchangeClient.removeRemoteSource(sourceTaskId)); }
Source:
<code>public void testExistingTryGetProperty(){ Properties properties = System.getProperties(); properties.setProperty("MyNiceProp","MyNiceValue"); <START> assertEquals(ConfigurationUtils.tryGetProperty("MyNiceProp"),"MyNiceValue"); <END> }</code><technical_language>continue AssertJ</technical_language>

Target:
public void testExistingTryGetProperty(){ Properties properties = System.getProperties(); properties.setProperty("MyNiceProp","MyNiceValue"); assertThat(ConfigurationUtils.tryGetProperty("MyNiceProp")).isEqualTo("MyNiceValue"); }
Source:
<code>public void setAmendCommitMessage() { service.log(appContext.getDevMachine(), project.getLocation(), null, false) .then(log -> { final List<Revision> commits = log.getCommits(); String message = ""; <START> if (commits != null && (!commits.isEmpty())) { <END> final Revision tip = commits.get(0); if (tip != null) { message = tip.getMessage(); } } CommitPresenter.this.view.setMessage(message); CommitPresenter.this.view.setEnableCommitButton(!message.isEmpty()); }) .catchError(error -> { if (getErrorCode(error.getCause()) == ErrorCodes.INIT_COMMIT_WAS_NOT_PERFORMED) { dialogFactory.createMessageDialog(constant.commitTitle(), constant.initCommitWasNotPerformed(), null).show(); } else { CommitPresenter.this.view.setMessage(""); notificationManager.notify(constant.logFailed(), FAIL, NOT_EMERGE_MODE); } }); }</code><technical_language><LINK_0></technical_language>

Target:
public void setAmendCommitMessage() { service.log(appContext.getDevMachine(), project.getLocation(), null, -1, -1, false) .then(log -> { String message = ""; final Revision revision = getFirst(log.getCommits(), null); if (revision != null) { message = revision.getMessage(); } CommitPresenter.this.view.setMessage(message); CommitPresenter.this.view.setEnableCommitButton(!message.isEmpty()); }) .catchError(error -> { if (getErrorCode(error.getCause()) == ErrorCodes.INIT_COMMIT_WAS_NOT_PERFORMED) { dialogFactory.createMessageDialog(constant.commitTitle(), constant.initCommitWasNotPerformed(), null).show(); } else { CommitPresenter.this.view.setMessage(""); notificationManager.notify(constant.logFailed(), FAIL, NOT_EMERGE_MODE); } }); }
Source:
<code>private BsonDocument asCommandDocument(final ConnectionDescription description) { BsonDocument command = new BsonDocument("findandmodify", new BsonString(namespace.getCollectionName())); putIfNotNull(command, "query", getFilter()); putIfNotNull(command, "fields", getProjection()); putIfNotNull(command, "sort", getSort()); putIfNotZero(command, "maxTimeMS", getMaxTime(MILLISECONDS)); command.put("remove", BsonBoolean.TRUE); <START> if (writeConcern != null & serverIsAtLeastVersionThreeDotTwo(description)) { <END> command.put("writeConcern", writeConcern.asDocument()); } return command; }</code><technical_language>This be: serverIsAtLeastVersionThreeDotTwo(description) && !writeConcern.isServerDefault() && writeConcern.isAcknowledged() I driver sending writeConcern : { w : 0} writeConcern : server</technical_language>

Target:
private BsonDocument asCommandDocument(final ConnectionDescription description) { BsonDocument command = new BsonDocument("findandmodify", new BsonString(namespace.getCollectionName())); putIfNotNull(command, "query", getFilter()); putIfNotNull(command, "fields", getProjection()); putIfNotNull(command, "sort", getSort()); putIfNotZero(command, "maxTimeMS", getMaxTime(MILLISECONDS)); command.put("remove", BsonBoolean.TRUE); if (serverIsAtLeastVersionThreeDotTwo(description) && writeConcern.isAcknowledged() && !writeConcern.isServerDefault()) { command.put("writeConcern", writeConcern.asDocument()); } return command; }
Source:
<code>private EntitlementSpecifier sanityAndReorderBPOrStandaloneSpecFirst(final Catalog catalog, final SubscriptionBaseWithAddOnsSpecifier subscriptionBaseWithAddOnsSpecifier, final DateTime effectiveDate, final Collection<EntitlementSpecifier> outputEntitlementSpecifier) throws SubscriptionBaseApiException { EntitlementSpecifier baseOrStandalonePlanSpecifier = null; final Collection<EntitlementSpecifier> addOnSpecifiers = new ArrayList<EntitlementSpecifier>(); try { for (final EntitlementSpecifier cur : subscriptionBaseWithAddOnsSpecifier.getEntitlementSpecifiers()) { final boolean isBase = isBaseSpecifier(catalog, effectiveDate, cur); final boolean isStandalone = isStandaloneSpecifier(catalog, effectiveDate, cur); final boolean isBaseOrStandaloneSpecifier = isBase || isStandalone; if (isBaseOrStandaloneSpecifier) { if (baseOrStandalonePlanSpecifier == null && (isStandalone || (isBase && subscriptionBaseWithAddOnsSpecifier.getBundleId() == null))) { baseOrStandalonePlanSpecifier = cur; } else { <START> throw new SubscriptionBaseApiException(ErrorCode.SUB_CREATE_INVALID_ENTITLEMENT_SPECIFIER); <END> } } else { addOnSpecifiers.add(cur); } } } catch (final CatalogApiException e) { throw new SubscriptionBaseApiException(e); } if (baseOrStandalonePlanSpecifier != null) { outputEntitlementSpecifier.add(baseOrStandalonePlanSpecifier); } outputEntitlementSpecifier.addAll(addOnSpecifiers); return baseOrStandalonePlanSpecifier; }</code><technical_language>support creating multiple STANDALONE in call -- subscriptionBaseWithAddOnsSpecifier</technical_language>

Target:
private EntitlementSpecifier sanityAndReorderBPOrStandaloneSpecFirst(final Catalog catalog, final SubscriptionBaseWithAddOnsSpecifier subscriptionBaseWithAddOnsSpecifier, final DateTime effectiveDate, final Collection<EntitlementSpecifier> outputEntitlementSpecifier) throws SubscriptionBaseApiException { EntitlementSpecifier baseOrStandalonePlanSpecifier = null; final Collection<EntitlementSpecifier> addOnSpecifiers = new ArrayList<EntitlementSpecifier>(); try { for (final EntitlementSpecifier cur : subscriptionBaseWithAddOnsSpecifier.getEntitlementSpecifiers()) { final boolean isBase = isBaseSpecifier(catalog, effectiveDate, cur); final boolean isStandalone = isStandaloneSpecifier(catalog, effectiveDate, cur); final boolean isBaseOrStandaloneSpecifier = isBase || isStandalone; if (isBaseOrStandaloneSpecifier) { if (baseOrStandalonePlanSpecifier == null) { baseOrStandalonePlanSpecifier = cur; } else { throw new SubscriptionBaseApiException(ErrorCode.SUB_CREATE_INVALID_ENTITLEMENT_SPECIFIER); } } else { addOnSpecifiers.add(cur); } } } catch (final CatalogApiException e) { throw new SubscriptionBaseApiException(e); } if (baseOrStandalonePlanSpecifier != null) { outputEntitlementSpecifier.add(baseOrStandalonePlanSpecifier); } outputEntitlementSpecifier.addAll(addOnSpecifiers); return baseOrStandalonePlanSpecifier; }
Source:
<code>public Iterable<RoleDTO> getRoles() { Collection<? extends RoleInfo> roles = this.userService.listRoles(); return roles.stream().map(this.modelTranslator.getStreamMapper(RoleInfo.class, RoleDTO.class)) <START> .collect(Collectors.toSet()); <END> }</code><technical_language>reason change this returning a Set. return a Stream here, x-java-response: type: java.util.stream.Stream Iterable (check other examples in spec file)</technical_language>

Target:
public Stream<RoleDTO> getRoles() { Collection<? extends RoleInfo> roles = this.userService.listRoles(); return roles.stream().map(this.modelTranslator.getStreamMapper(RoleInfo.class, RoleDTO.class)); }
Source:
<code>public void flush() throws IOException { <START> synchronized ( InfinispanJF.this ) END> { if ( closed ) { throw new IOException( "Cannot write to closed stream!" ); } } doFlush( false ); }</code><technical_language>yeah I needed. misunderstanding of atomicity there</technical_language>

Target:
public void flush() throws IOException { if ( closed ) { throw new IOException( "Cannot write to closed stream!" ); } doFlush( false ); }
Source:
<code>public void register(Object object) { Class<?> listenerClass = object.getClass(); if(!Modifier.isPublic(listenerClass.getModifiers())){ throw new IllegalArgumentException("Event Subscriber class needs to be public"); } List<SubscriberMethod> methods = new ArrayList<SubscriberMethod>(); do { for (Method m : listenerClass.getDeclaredMethods()) { if (m.isAnnotationPresent(com.cloudant.sync.event.Subscribe.class)) { if (!Modifier.isPublic(m.getModifiers())){ <START> throw new IllegalArgumentException("Subscriber method with @Subscribe is required to be public"); <END> } Class[] params = m.getParameterTypes(); if (params.length == 1) { methods.add(new SubscriberMethod(m, params[0])); } else { throw new IllegalArgumentException("Subscriber method is required to have only 1 parameter"); } } } } while ((listenerClass = listenerClass.getSuperclass()) != null); listeners.put(object, methods); }</code><technical_language>Exception message name method is fault (fully qualified)</technical_language>

Target:
public void register(Object object) { Class<?> listenerClass = object.getClass(); if(!Modifier.isPublic(listenerClass.getModifiers())){ throw new IllegalArgumentException(String.format(Locale.ENGLISH, "Event Subscriber class %s needs to be public", listenerClass.getName())); } List<SubscriberMethod> methods = new ArrayList<SubscriberMethod>(); do { for (Method m : listenerClass.getDeclaredMethods()) { if (m.isAnnotationPresent(com.cloudant.sync.event.Subscribe.class)) { if (!Modifier.isPublic(m.getModifiers())){ throw new IllegalArgumentException(String.format(Locale.ENGLISH, "Subscriber method %s#%s is required to be public", listenerClass.getName(), m.getName())); } Class[] params = m.getParameterTypes(); if (params.length == 1) { if(!Notification.class.isAssignableFrom(params[0])){ throw new IllegalArgumentException(String.format(Locale.ENGLISH, "Subscriber method %s#%s parameter is required to be assignable %s", listenerClass.getName(), m.getName(), Notification.class.getCanonicalName())); } methods.add(new SubscriberMethod(m, params[0])); } else { throw new IllegalArgumentException(String.format(Locale.ENGLISH, "Subscriber method %s#%s is required to have only 1 parameter", listenerClass.getName(), m.getName())); } } } } while ((listenerClass = listenerClass.getSuperclass()) != null); listeners.put(object, methods); }
Source:
<code><START> public Parameter(final ParameterModifier typeModifier, <END> final String parameterType, final String name, final ParameterPointerType parameterPointerType, final boolean isRequired) { this.parameterType = parameterType; this.typeModifier = typeModifier; this.name = name; this.parameterPointerType = parameterPointerType; this.isRequired = isRequired; this.documentation = null; }</code><technical_language>This constructor explicit constructor invocation</technical_language>

Target:
public Parameter(final ParameterModifier typeModifier, final String parameterType, final String name, final ParameterPointerType parameterPointerType, final boolean isRequired) { this( typeModifier, parameterType, name, parameterPointerType, isRequired, null); }
Source:
<code>public void internalReceiveCommand(String itemName, Command command) { logger.debug("received command from " + itemName); String serialNumber = null; for (MaxCubeBindingProvider provider : providers) { serialNumber = provider.getSerialNumber(itemName); if (serialNumber != null) break; } if (serialNumber == null) return; Device device = findDevice(serialNumber, devices); if (device == null) return; String rfAddress = device.getRFAddress(); if (command instanceof DecimalType) { DecimalType decimalType = (DecimalType) command; S_Command scmd = new S_Command(rfAddress, decimalType.doubleValue()); String commandString = scmd.getCommandString(); Socket socket = null; try { socket = new Socket(ip, port); PrintWriter out = new PrintWriter(socket.getOutputStream(), true); out.print(commandString); socket.close(); } catch (UnknownHostException e) { e.printStackTrace(); } catch (IOException e) { <START> e.printStackTrace(); <END> } } }</code><technical_language>please remove printStackTrace() implement proper logging</technical_language>

Target:
public void internalReceiveCommand(String itemName, Command command) { logger.debug("Received command from " + itemName); String serialNumber = null; for (MaxCubeBindingProvider provider : providers) { serialNumber = provider.getSerialNumber(itemName); if (serialNumber != null) break; } if (serialNumber == null) return; Device device = findDevice(serialNumber, devices); if (device == null) return; String rfAddress = device.getRFAddress(); if (command instanceof DecimalType) { DecimalType decimalType = (DecimalType) command; S_Command scmd = new S_Command(rfAddress, decimalType.doubleValue()); String commandString = scmd.getCommandString(); Socket socket = null; try { socket = new Socket(ip, port); PrintWriter out = new PrintWriter(socket.getOutputStream(), true); out.print(commandString); socket.close(); } catch (UnknownHostException e) { logger.warn("Cannot establish connection with MAX!cube lan gateway while sending command to '{}'", ip); } catch (IOException e) { logger.warn("Cannot write data from MAX!cube lan gateway while connecting to '{}'", ip); } } }
Source:
<code>public void visitFunctionDef(FunctionDef functionDef) { <START> symbols.add(new SymbolImpl(functionDef.name().name(), null)); <END> }</code><technical_language>global statements located functions? Example: # other.py def f(): global x x = 42 f() # main.py import other print(other.x)</technical_language>

Target:
public void visitFunctionDef(FunctionDef functionDef) { symbols.add(symbol(functionDef.name())); }
Source:
<code><START> private String substFinalName(String finalname) { <END> final String markerVarBeg = "${"; final String markerVarEnd = "}"; boolean startsWithVariable = finalname.startsWith(markerVarBeg) && finalname.contains(markerVarEnd); if (startsWithVariable) { String marker = finalname.substring(markerVarBeg.length(), finalname.indexOf(markerVarEnd)); switch (marker) { case "karaf.base": return this.homeDirectory + finalname.substring(finalname.indexOf(markerVarEnd) + markerVarEnd.length()); case "karaf.etc": return this.etcDirectory + finalname.substring(finalname.indexOf(markerVarEnd) + markerVarEnd.length()); default: break; } } return finalname; }</code><technical_language>Useless (at in target of this class)</technical_language>

Target:
private String substFinalName(String finalname) { final String markerVarBeg = "${"; final String markerVarEnd = "}"; boolean startsWithVariable = finalname.startsWith(markerVarBeg) && finalname.contains(markerVarEnd); if (startsWithVariable) { String marker = finalname.substring(markerVarBeg.length(), finalname.indexOf(markerVarEnd)); switch (marker) { case "karaf.home": case "karaf.base": return this.baseDirectory + finalname.substring(finalname.indexOf(markerVarEnd) + markerVarEnd.length()); case "karaf.etc": return this.etcDirectory + finalname.substring(finalname.indexOf(markerVarEnd) + markerVarEnd.length()); default: break; } } return finalname; }
Source:
<code>private IStatus updateScanQueue(IProgressMonitor monitor, final Set<String> filesToScan, final List<String> traceTypes) throws InterruptedException { for (String fileToScan : filesToScan) { for (String traceCat : traceTypes) { TraceValidationHelper tv = new TraceValidationHelper(fileToScan, traceCat); if (!fResults.containsKey(tv)) { if (!fTracesToScan.contains(tv)) { fTracesToScan.put(tv); monitor.subTask(tv.getTraceToScan()); if (monitor.isCanceled()) { <START> ((ImportTraceWizardScanPage) fScanPage).refresh(); <END> return CANCEL_STATUS; } } } } } ((ImportTraceWizardScanPage) fScanPage).refresh(); return Status.OK_STATUS; }</code><technical_language>reason fScanPage declared a ImportTraceWizardScanPage instead</technical_language>

Target:
private IStatus updateScanQueue(IProgressMonitor monitor, final Set<String> filesToScan, final List<String> traceTypes) throws InterruptedException { for (String fileToScan : filesToScan) { for (String traceCat : traceTypes) { TraceValidationHelper tv = new TraceValidationHelper(fileToScan, traceCat); if (!fResults.containsKey(tv)) { if (!fTracesToScan.contains(tv)) { fTracesToScan.put(tv); monitor.subTask(tv.getTraceToScan()); if (monitor.isCanceled()) { fScanPage.refresh(); return CANCEL_STATUS; } } } } } fScanPage.refresh(); return Status.OK_STATUS; }
Source:
<code>public void prepareServerSpecificServicesMBean() { if (getDatabaseSession() != null && shouldRegisterRuntimeBean) { <START> this.setRuntimeServicesMBean(new MBeanOpenEJBRuntimeServices(getDatabaseSession())); <END> } }</code><technical_language>ensure mBeanServer a toggle "skip jmx" instance</technical_language>

Target:
public void prepareServerSpecificServicesMBean() { if (isRuntimeServicesEnabledDefault() && getDatabaseSession() != null && shouldRegisterRuntimeBean) { this.setRuntimeServicesMBean(new MBeanOpenEJBRuntimeServices(getDatabaseSession())); } }
Source:
<code>protected final Runnable pollScheduledTask(long nanoTime) { assert inEventLoop(); Queue<ScheduledFutureTask<?>> scheduledTaskQueue = this.scheduledTaskQueue; ScheduledFutureTask<?> scheduledTask = scheduledTaskQueue == null ? null : scheduledTaskQueue.peek(); <START> if (scheduledTask == null || scheduledTask.deadlineNanos() > nanoTime) { <END> return null; } scheduledTaskQueue.remove(); return scheduledTask; }</code><technical_language>Replace direct comparison nanoTime differences scheduledTask.deadlineNanos() - nanoTime > 0</technical_language>

Target:
protected final Runnable pollScheduledTask(long nanoTime) { assert inEventLoop(); Queue<ScheduledFutureTask<?>> scheduledTaskQueue = this.scheduledTaskQueue; ScheduledFutureTask<?> scheduledTask = scheduledTaskQueue == null ? null : scheduledTaskQueue.peek(); if (scheduledTask == null || scheduledTask.deadlineNanos() - nanoTime > 0) { return null; } scheduledTaskQueue.remove(); return scheduledTask; }
Source:
<code>public <START> Response<TreeSet<String>> apply(ChangeResource <END> req) throws AuthException, OrmException, IOException, BadRequestException { ChangeControl control = req.getControl(); ChangeNotes notes = control.getNotes().load(); Set<String> hashtags = notes.getHashtags(); if (hashtags == null) { hashtags = ImmutableSet.of(); } return Response.ok(new TreeSet<String>(hashtags)); }</code><technical_language>Response<? extends Set<String>></technical_language>

Target:
public Response<? extends Set<String>> apply(ChangeResource req) throws AuthException, OrmException, IOException, BadRequestException { ChangeControl control = req.getControl(); ChangeNotes notes = control.getNotes().load(); Set<String> hashtags = notes.getHashtags(); if (hashtags == null) { hashtags = ImmutableSet.of(); } return Response.ok(new TreeSet<String>(hashtags)); }
Source:
<code>public void compareTo() { RealmInteger ri1 = new RealmInteger(10); RealmInteger ri2 = new RealmInteger("11"); assertEquals(ri1.compareTo(ri2), -1); ri2.decrement(1); assertEquals(ri1.compareTo(ri2), 0); ri2.decrement(1); <START> assertEquals(ri1.compareTo(ri2), 1); <END> }</code><technical_language>Incorrect order of arguments. Expected first</technical_language>

Target:
public void compareTo() { RealmInteger ri1 = new RealmInteger(10); RealmInteger ri2 = new RealmInteger("11"); assertEquals(-1, ri1.compareTo(ri2)); ri2.decrement(1); assertEquals(0, ri1.compareTo(ri2)); ri2.decrement(1); assertEquals(1, ri1.compareTo(ri2)); }
Source:
<code>public static ScenarioTemplate Deserialize(File inputFile) { ScenarioTemplate resultingTemplate = null; try { JAXBContext context = JAXBContext.newInstance(ScenarioTemplate.class); Unmarshaller um = context.createUnmarshaller(); <START> JAXBElement<ScenarioTemplate> templateElement = um.unmarshal(new StreamSource(inputFile), ScenarioTemplate.class); <END> resultingTemplate = templateElement.getValue(); } catch(Exception e) { MekHQ.getLogger().error(ScenarioTemplate.class, "Deserialize", "Error Deserializing Scenario Template", e); } return resultingTemplate; }</code><technical_language>StreamSource, MekHqXmlUtil.createSafeXmlSource</technical_language>

Target:
public static ScenarioTemplate Deserialize(File inputFile) { ScenarioTemplate resultingTemplate = null; try { JAXBContext context = JAXBContext.newInstance(ScenarioTemplate.class); Unmarshaller um = context.createUnmarshaller(); Source inputSource = MekHqXmlUtil.createSafeXmlSource(new FileInputStream(inputFile)); JAXBElement<ScenarioTemplate> templateElement = um.unmarshal(inputSource, ScenarioTemplate.class); resultingTemplate = templateElement.getValue(); } catch(Exception e) { MekHQ.getLogger().error(ScenarioTemplate.class, "Deserialize", "Error Deserializing Scenario Template", e); } return resultingTemplate; }
Source:
<code>private static void cleanup() { try { client.getDatabase(databaseId).delete().block(); } catch (Exception e) { <START> } <END> }</code><technical_language>Please log exception here</technical_language>

Target:
private static void cleanup() { try { client.getDatabase(DATABASE_ID).delete().block(); } catch (Exception e) { } }
Source:
<code>private SolrQuery getRealTimeQuery(SolrQuery originalQuery, Collection<String> ids) { if (LOGGER.isDebugEnabled()) { LOGGER.debug("originalQuery: {}", getQueryParams(originalQuery)); } SolrQuery realTimeQuery = new SolrQuery(); for (Map.Entry<String, String[]> entry : originalQuery.getMap().entrySet()) { <START> if (entry.getKey().equals(CommonParams.Q)) { <END> realTimeQuery.set(CommonParams.FQ, entry.getValue()); } else { realTimeQuery.set(entry.getKey(), entry.getValue()); } } realTimeQuery.set(CommonParams.QT, GET_QUERY_HANDLER); realTimeQuery.set(IDS_KEY, ids.toArray(new String[ids.size()])); if (LOGGER.isDebugEnabled()) { LOGGER.debug("realTimeQuery: {}", getQueryParams(realTimeQuery)); } return realTimeQuery; }</code><technical_language>this CommonParams.FQ</technical_language>

Target:
private SolrQuery getRealTimeQuery(SolrQuery originalQuery, Collection<String> ids) { if (LOGGER.isDebugEnabled()) { LOGGER.debug("originalQuery: {}", getQueryParams(originalQuery)); } SolrQuery realTimeQuery = new SolrQuery(); for (Map.Entry<String, String[]> entry : originalQuery.getMap().entrySet()) { if (CommonParams.Q.equals(entry.getKey())) { realTimeQuery.set(CommonParams.FQ, entry.getValue()); } else { realTimeQuery.set(entry.getKey(), entry.getValue()); } } realTimeQuery.set(CommonParams.QT, GET_QUERY_HANDLER); realTimeQuery.set(IDS_KEY, ids.toArray(new String[ids.size()])); if (LOGGER.isDebugEnabled()) { LOGGER.debug("realTimeQuery: {}", getQueryParams(realTimeQuery)); } return realTimeQuery; }
Source:
<code>public void deleteCommand(@ApiParam("The id of the workspace") @PathParam("id") String id, @ApiParam("The name of the command to remove") @PathParam("name") String commandName) throws ServerException, BadRequestException, NotFoundException, ConflictException, ForbiddenException { final WorkspaceImpl workspace = workspaceManager.getWorkspace(id); if (workspace.getConfig().getCommands().removeIf(command -> command.getName().equals(commandName))) { workspaceManager.updateWorkspace(id, workspace); } else { <START> throw new NotFoundException(String.format("Command with name '%s' was not found in workspace with id %s", commandName, id)); <END> } }</code><technical_language>provide name of workspace id is "user friendly"</technical_language>

Target:
public void deleteCommand(@ApiParam("The id of the workspace") @PathParam("id") String id, @ApiParam("The name of the command to remove") @PathParam("name") String commandName) throws ServerException, BadRequestException, NotFoundException, ConflictException, ForbiddenException { final WorkspaceImpl workspace = workspaceManager.getWorkspace(id); if (workspace.getConfig().getCommands().removeIf(command -> command.getName().equals(commandName))) { workspaceManager.updateWorkspace(id, workspace); } else { throw new NotFoundException( String.format("Command with name '%s' was not found in workspace '%s'", commandName, workspace.getConfig().getName())); } }
Source:
<code>protected void loadConfig() { <START> Comparator<ConfigProviderFactory> comparator = (f1, f2) -> { END> boolean b1 = f1.isFallback(); boolean b2 = f2.isFallback(); return b1 ^ b2 ? (b2 ? -1 : 1) : 0; }; ServiceLoader<ConfigProviderFactory> loader = ServiceLoader.load(ConfigProviderFactory.class, KeycloakApplication.class.getClassLoader()); Optional<Config.ConfigProvider> provider = StreamSupport.stream(loader.spliterator(), false) .sorted(comparator) .peek(p -> logger.infov("Trying ConfigProvider: {0}", p.getClass().getName())) .map(ConfigProviderFactory::create) .filter(Optional::isPresent) .map(Optional::get) .findFirst(); Config.init(provider.orElseThrow(() -> new RuntimeException("No valid ConfigProvider(s) found"))); }</code><technical_language>need this,</technical_language>

Target:
protected void loadConfig() { ServiceLoader<ConfigProviderFactory> loader = ServiceLoader.load(ConfigProviderFactory.class, KeycloakApplication.class.getClassLoader()); try { ConfigProviderFactory factory = loader.iterator().next(); logger.infov("Using ConfigProvider: {0}", factory.getClass().getName()); Config.init(factory.create().orElseThrow(() -> new RuntimeException("Failed to load Keycloak configuration"))); } catch (NoSuchElementException e) { throw new RuntimeException("No valid ConfigProvider found"); } }
Source:
<code>private void readVal(Field f, Object o, DataInputStream in) throws DeserializationException, IOException, IllegalAccessException { <START> synchronized (fieldOrderings) { <END> Persisting p = f.getAnnotation(Persisting.class); Class type = f.getType(); try { f.setAccessible(true); if (type.equals(String.class)) { String read = ExtUtil.readString(in); f.set(o, p.nullable() ? ExtUtil.nullIfEmpty(read) : read); return; } else if (type.equals(Integer.TYPE)) { f.setInt(o, ExtUtil.readInt(in)); return; } else if (type.equals(Date.class)) { f.set(o, ExtUtil.readDate(in)); return; } else if (type.isArray()) { if (type.getComponentType().equals(Byte.TYPE)) { f.set(o, ExtUtil.readBytes(in)); return; } } else if (type.equals(Boolean.TYPE)) { f.setBoolean(o, ExtUtil.readBool(in)); return; } } finally { f.setAccessible(false); } throw new DeserializationException("Couldn't read persisted type " + f.getType().toString()); } }</code><technical_language>able synchronize 'f' instead, protect of methods manipulate field while allowing others read/written</technical_language>

Target:
private void readVal(Field f, Object o, DataInputStream in) throws DeserializationException, IOException, IllegalAccessException { synchronized (f) { Persisting p = f.getAnnotation(Persisting.class); Class type = f.getType(); try { f.setAccessible(true); if (type.equals(String.class)) { String read = ExtUtil.readString(in); f.set(o, p.nullable() ? ExtUtil.nullIfEmpty(read) : read); return; } else if (type.equals(Integer.TYPE)) { f.setInt(o, ExtUtil.readInt(in)); return; } else if (type.equals(Date.class)) { f.set(o, ExtUtil.readDate(in)); return; } else if (type.isArray()) { if (type.getComponentType().equals(Byte.TYPE)) { f.set(o, ExtUtil.readBytes(in)); return; } } else if (type.equals(Boolean.TYPE)) { f.setBoolean(o, ExtUtil.readBool(in)); return; } } finally { f.setAccessible(false); } throw new DeserializationException("Couldn't read persisted type " + f.getType().toString()); } }
Source:
<code>public void fetchAvailableEngines(List<CategoryDTO> categoryDTOS, Consumer<List<EngineCategoryDTO>> callback) { final InteractiveScriptSession interactiveScriptSession = scriptInterpreter.createInteractiveSession(); List<EngineCategoryDTO> engines = Collections.synchronizedList(new ArrayList<>()); for (CategoryDTO categoryDTO : categoryDTOS) { final String engineName = categoryDTO.getName(); interactiveScriptSession.eval("include([\"Engines\", \"" + engineName + "\", \"Engine\", \"Object\"]);", ignored -> interactiveScriptSession.eval("new " + engineName + "().getAvailableVersions()", output -> { final EngineCategoryDTO engineCategoryDTO = new EngineCategoryDTO.Builder() .withName(engineName) .withDescription(engineName) .withSubCategories(unSerialize(output)) .build(); engines.add(engineCategoryDTO); }, this::throwError), this::throwError); } <START> callback.accept(engines); <END> }</code><technical_language>Is case callback method is called **after** interactiveScriptSession eval calls successfully terminated</technical_language>

Target:
public void fetchAvailableEngines(List<CategoryDTO> categoryDTOS, Consumer<List<EngineCategoryDTO>> callback) { final InteractiveScriptSession interactiveScriptSession = scriptInterpreter.createInteractiveSession(); StringBuilder includesBuilder = new StringBuilder(); StringBuilder constructorsBuilder = new StringBuilder(); constructorsBuilder.append("function fetchEngines() {\n"); constructorsBuilder.append("var engines = [];\n"); for (CategoryDTO categoryDTO : categoryDTOS) { final String engineName = categoryDTO.getName(); includesBuilder.append("include([\"Engines\", \"" + engineName + "\", \"Engine\", \"Object\"]);\n"); constructorsBuilder .append("engines[\"" + engineName + "\"] = new " + engineName + "().getAvailableVersions();\n"); } constructorsBuilder.append("return engines;\n"); constructorsBuilder.append("}\n"); constructorsBuilder.append("fetchEngines();"); interactiveScriptSession.eval(includesBuilder.toString(), ignored -> interactiveScriptSession.eval(constructorsBuilder.toString(), output -> { List<EngineCategoryDTO> engines = new ArrayList<>(); for (Map.Entry<String, Object> entry : ((Map<String, Object>) output).entrySet()) { final EngineCategoryDTO engineCategoryDTO = new EngineCategoryDTO.Builder() .withName(entry.getKey()) .withDescription(entry.getKey()) .withSubCategories(unSerialize(entry.getValue())) .build(); engines.add(engineCategoryDTO); } callback.accept(engines); }, this::throwError), this::throwError); }
Source:
<code>public void complete() { <START> abq.add(Optional.<T>empty()); <END> }</code><technical_language>this flop additions this enqueued</technical_language>

Target:
public void complete() { completedLatch.assertOpen("Unexpected additional complete signal received!"); completedLatch.close(); abq.add(Optional.<T>empty()); }
Source:
<code>private void initToolTips() { <START> numberOfCoresTooltip.setText(constants.numOfCoresTooltipBasicDetails()); <END> }</code><technical_language>similar</technical_language>

Target:
private void initToolTips() { numberOfCoresTooltip.setHtml(templates.numOfCoresTooltipBasicDetails()); }
Source:
<code>public <C> void addListener(Object listener, CacheEventFilter<? super K, ? super V> filter, CacheEventConverter<? super K, ? super V, C> converter) { ListenerHolder listenerHolder = new ListenerHolder(listener, encoder, wrapper); Cache unwrapped = super.unwrapCache(this.cache); <START> if(unwrapped instanceof CacheImpl) { <END> ((CacheImpl)unwrapped).addListener(listenerHolder, filter, converter); } else { super.addListener(listener); } }</code><technical_language>Nitpick: space</technical_language>

Target:
public <C> void addListener(Object listener, CacheEventFilter<? super K, ? super V> filter, CacheEventConverter<? super K, ? super V, C> converter) { ListenerHolder listenerHolder = new ListenerHolder(listener, keyEncoderClass, valueEncoderClass, keyWrapperClass, valueWrapperClass); Cache unwrapped = super.unwrapCache(this.cache); if (unwrapped instanceof CacheImpl) { ((CacheImpl) unwrapped).addListener(listenerHolder, filter, converter); } else { super.addListener(listener); } }
Source:
<code>private void authenticateWithSSO(HttpServletRequest req) throws ServletException { String headerAuthorization = req.getHeader(FiltersHelper.Constants.HEADER_AUTHORIZATION); HttpURLConnection connection = null; try { connection = create(new URL("<LINK_0>")); connection.setDoInput(true); connection.setDoOutput(true); connection.setRequestMethod("POST"); connection.setRequestProperty(FiltersHelper.Constants.HEADER_AUTHORIZATION, headerAuthorization); connection.setRequestProperty("Content-Type", "application/x-www-form-urlencoded"); <START> connection.setRequestProperty("Content-Length", "" + Integer.toString(headerAuthorization.getBytes().length)); <END> connection.setRequestProperty("Content-Language", "en-US"); ByteArrayOutputStream os = new ByteArrayOutputStream(); copy(connection.getInputStream(), os); connection.connect(); createUserSession(req, new String(os.toByteArray(), "UTF-8")); } catch (Exception e) { log.error("Exception obtaining ticket from sso", e.getMessage()); } finally { if (connection != null) { connection.disconnect(); } } }</code><technical_language>content length is considering header</technical_language>

Target:
private void authenticateWithSSO(HttpServletRequest req) throws ServletException { String headerAuthorization = req.getHeader(FiltersHelper.Constants.HEADER_AUTHORIZATION); HttpURLConnection connection = null; try { connection = create(new URL("http://localhost/ovirt-engine/sso/login-credentials")); connection.setDoInput(true); connection.setDoOutput(true); connection.setRequestMethod("POST"); connection.setRequestProperty(FiltersHelper.Constants.HEADER_AUTHORIZATION, headerAuthorization); connection.setRequestProperty("Content-Type", "application/x-www-form-urlencoded"); connection.setRequestProperty("Content-Language", "en-US"); try (ByteArrayOutputStream os = new ByteArrayOutputStream()) { try (InputStream input = connection.getInputStream()) { copy(input, os); } connection.connect(); createUserSession(req, new String(os.toByteArray(), "UTF-8")); } } catch (Exception e) { log.error("Exception obtaining ticket from sso", e.getMessage()); } finally { if (connection != null) { connection.disconnect(); } } }
Source:
<code>public List<MimeMessage> generateFeedbackSessionClosingEmails(FeedbackSessionAttributes session) throws MessagingException, IOException { List<StudentAttributes> students = new ArrayList<StudentAttributes>(); if (fsLogic.isFeedbackSessionForStudentsToAnswer(session)) { List<StudentAttributes> studentsForCourse = studentsLogic.getStudentsForCourse(session.getCourseId()); for (StudentAttributes student : studentsForCourse) { try { if (!fsLogic.isFeedbackSessionFullyCompletedByStudent(session.getFeedbackSessionName(), session.getCourseId(), student.email)) { students.add(student); } } catch (EntityDoesNotExistException e) { <START> log.warning("Course " + session.getCourseId() + " does not exist or " <END> + "session " + session.getFeedbackSessionName() + " does not exist"); break; } } } String template = EmailTemplates.USER_FEEDBACK_SESSION_CLOSING; CourseAttributes course = coursesLogic.getCourse(session.getCourseId()); List<InstructorAttributes> instructors = instructorsLogic.getInstructorsForCourse(session.getCourseId()); List<MimeMessage> emails = generateFeedbackSessionEmailBases(course, session, students, instructors, template, EmailType.FEEDBACK_CLOSING.getSubject()); for (MimeMessage email : emails) { email.setContent(email.getContent().toString().replace("${status}", "is closing soon"), "text/html"); } return emails; }</code><technical_language>serious if this happens. increase this a log severe</technical_language>

Target:
public List<MimeMessage> generateFeedbackSessionClosingEmails(FeedbackSessionAttributes session) throws MessagingException, IOException { List<StudentAttributes> students = new ArrayList<StudentAttributes>(); if (fsLogic.isFeedbackSessionForStudentsToAnswer(session)) { List<StudentAttributes> studentsForCourse = studentsLogic.getStudentsForCourse(session.getCourseId()); for (StudentAttributes student : studentsForCourse) { try { if (!fsLogic.isFeedbackSessionFullyCompletedByStudent(session.getFeedbackSessionName(), session.getCourseId(), student.email)) { students.add(student); } } catch (EntityDoesNotExistException e) { log.severe("Course " + session.getCourseId() + " does not exist or " + "session " + session.getFeedbackSessionName() + " does not exist"); break; } } } String template = EmailTemplates.USER_FEEDBACK_SESSION_CLOSING; CourseAttributes course = coursesLogic.getCourse(session.getCourseId()); List<InstructorAttributes> instructors = instructorsLogic.getInstructorsForCourse(session.getCourseId()); List<MimeMessage> emails = generateFeedbackSessionEmailBases(course, session, students, instructors, template, EmailType.FEEDBACK_CLOSING.getSubject()); for (MimeMessage email : emails) { email.setContent(email.getContent().toString().replace("${status}", "is closing soon"), "text/html"); } return emails; }
Source:
<code>public Mono<Void> runAsync() { return blobContainerAsyncClient.listBlobs() <START> .ignoreElements() <END> .then(); }</code><technical_language>add ignoreElements()? Is this more similar sync implementation</technical_language>

Target:
public Mono<Void> runAsync() { return blobContainerAsyncClient.listBlobs() .then(); }
Source:
<code><START> public ZkBucketDataAccessor(String zkAddr) { <END> HelixZkClient zkClient = DedicatedZkClientFactory.getInstance() .buildZkClient(new HelixZkClient.ZkConnectionConfig(zkAddr)); zkClient.setZkSerializer(new DummySerializer()); _zkSerializer = new ZNRecordJacksonSerializer(); _zkBaseDataAccessor = new ZkBaseDataAccessor(zkClient); }</code><technical_language>I idea of more necessary initialization works constructor level. class' concerns. A simple setter public ZkBucketDataAccessor(ZkSerializer zkSerializer, BaseDataAccessor baseDataAccessor) { _zkSerializer = zkSerializer; _zkBaseDataAccessor = zkBaseDataAccessor; }</technical_language>

Target:
public ZkBucketDataAccessor(String zkAddr) { this(zkAddr, DEFAULT_BUCKET_SIZE, DEFAULT_NUM_VERSIONS); }
Source:
<code>public void cleanup( @PathVariable("id") Set<Long> ids, @RequestParam(defaultValue = "CLEANUP", name="action") TaskExecutionControllerDeleteAction[] actions) { final Set<TaskExecutionControllerDeleteAction> actionsAsSet = new HashSet<>(Arrays.asList(actions)); final SortedSet<Long> nonExistingTaskExecutions = new TreeSet<>(); <START> for (Long id : ids) { <END> final TaskExecution taskExecution = this.explorer.getTaskExecution(id); if (taskExecution == null) { nonExistingTaskExecutions.add(id); } } if (!nonExistingTaskExecutions.isEmpty()) { if (nonExistingTaskExecutions.size() == 1) { throw new NoSuchTaskExecutionException(nonExistingTaskExecutions.first()); } else { throw new NoSuchTaskExecutionException(nonExistingTaskExecutions); } } if (actionsAsSet.contains(TaskExecutionControllerDeleteAction.CLEANUP)) { for (Long id : ids) { this.taskDeleteService.cleanupExecution(id); } } if (actionsAsSet.contains(TaskExecutionControllerDeleteAction.REMOVE_DATA)) { this.taskDeleteService.deleteOneOrMoreTaskExecutions(ids); } }</code><technical_language>I evaluation of non-existent ids exist in service controller</technical_language>

Target:
public void cleanup( @PathVariable("id") Set<Long> ids, @RequestParam(defaultValue = "CLEANUP", name="action") TaskExecutionControllerDeleteAction[] actions) { final Set<TaskExecutionControllerDeleteAction> actionsAsSet = new HashSet<>(Arrays.asList(actions)); this.taskDeleteService.cleanupExecutions(actionsAsSet, ids); }
Source:
<code>public Classpath getProviderClasspath() throws ArtifactResolutionException, ArtifactNotFoundException { final Map<String, Artifact> pluginArtifactMap = getPluginArtifactMap(); Class<?> c = AbstractSurefireMojo.this.getClass(); Artifact plugin; <START> if ( c.getName().equals( "org.apache.maven.plugin.failsafe.IntegrationTestMojo" ) ) <END> { plugin = pluginArtifactMap.get( "org.apache.maven.plugins:maven-failsafe-plugin" ); } else { plugin = pluginArtifactMap.get( "org.apache.maven.plugins:maven-surefire-plugin" ); } return dependencyResolver.addProviderToClasspath( pluginArtifactMap, plugin ); }</code><technical_language>I guess this is in method getProviderClasspath() Please split method in two. call protected abstract Artifact getMojoArtifact() original statement return dependencyResolver.addProviderToClasspath( pluginArtifactMap, plugin ); plugin is Artifact. force subclasse implement getMojoArtifact means surefire mojo implement follows: final Map<String, Artifact> pluginArtifactMap = getPluginArtifactMap(); Artifact plugin = pluginArtifactMap.get( "org.apache.maven.plugins:maven-surefire-plugin" );</technical_language>

Target:
public Classpath getProviderClasspath() throws ArtifactResolutionException, ArtifactNotFoundException { return dependencyResolver.addProviderToClasspath( pluginArtifactMap, getMojoArtifact() ); }
Source:
<code>private boolean canCreateContainerInTarget() { <START> boolean containerCanBeCreateInTarget = false; <END> if (nodeContainer != null) { containerCanBeCreateInTarget = permissionAuthority.canEditInstance(nodeContainer) && nodeContainer.getTarget() != null && !nodeContainer.getTarget().eIsProxy(); } else { if (diagram != null) { containerCanBeCreateInTarget = permissionAuthority.canEditInstance(diagram); if (containerCanBeCreateInTarget && diagram instanceof DSemanticDecorator) { containerCanBeCreateInTarget = ((DSemanticDecorator) diagram).getTarget() != null && !((DSemanticDecorator) diagram).getTarget().eIsProxy(); } } } return containerCanBeCreateInTarget; }</code><technical_language>containerCanBeCreateInTarget -> containerCanBeCreatedInTarget</technical_language>

Target:
private boolean canCreateContainerInTarget() { boolean containerCanBeCreatedInTarget = false; if (nodeContainer != null) { containerCanBeCreatedInTarget = permissionAuthority.canEditInstance(nodeContainer); if (containerCanBeCreatedInTarget) { EObject target = nodeContainer.getTarget(); containerCanBeCreatedInTarget = target != null && !target.eIsProxy(); } } else if (diagram != null) { containerCanBeCreatedInTarget = permissionAuthority.canEditInstance(diagram); if (containerCanBeCreatedInTarget && diagram instanceof DSemanticDecorator) { EObject target = ((DSemanticDecorator) diagram).getTarget(); containerCanBeCreatedInTarget = target != null && !target.eIsProxy(); } } return containerCanBeCreatedInTarget; }
Source:
<code>protected BlobAsyncClientBase(HttpPipeline pipeline, String url, BlobServiceVersion serviceVersion, String accountName, String containerName, String blobName, String snapshot, CpkInfo customerProvidedKey) { this.azureBlobStorage = new AzureBlobStorageBuilder() .pipeline(pipeline) .url(url) .version(serviceVersion.getVersion()) .build(); this.serviceVersion = serviceVersion; this.accountName = accountName; this.containerName = containerName; this.blobName = blobName; this.snapshot = snapshot; this.customerProvidedKey = customerProvidedKey; this.blobPropertyHelper = null; BlobHelper.PropertyAccessor propertyAccessor = new BlobHelper.PropertyAccessor() { @Override public BlobHelper getHelper(final BlobAsyncClientBase client) { return client.blobPropertyHelper; } @Override public AzureBlobStorageImpl getAzureBlobStorageImpl(final BlobAsyncClientBase client) { return client.azureBlobStorage; } @Override public CpkInfo getCustomerProvidedKey(final BlobAsyncClientBase client) { return client.customerProvidedKey; } }; <START> BlobHelper.setPropertyAccessor(propertyAccessor); <END> }</code><technical_language>set property accessor - is need for intermediate propertyAccessor variable</technical_language>

Target:
protected BlobAsyncClientBase(HttpPipeline pipeline, String url, BlobServiceVersion serviceVersion, String accountName, String containerName, String blobName, String snapshot, CpkInfo customerProvidedKey) { this.azureBlobStorage = new AzureBlobStorageBuilder() .pipeline(pipeline) .url(url) .version(serviceVersion.getVersion()) .build(); this.serviceVersion = serviceVersion; this.accountName = accountName; this.containerName = containerName; this.blobName = blobName; this.snapshot = snapshot; this.customerProvidedKey = customerProvidedKey; BlobHelper.setAsyncPropertyAccessor(new BlobPropertyAccessor()); }
Source:
<code><START> public AddDistributedCache(Builder builder) { <END> super(builder, CacheType.DISTRIBUTED_CACHE); this.asyncMarshalling = builder.asyncMarshalling; this.mode = builder.mode; this.queueFlushInterval = builder.queueFlushInterval; this.remoteTimeout = builder.remoteTimeout; this.capacityFactor = builder.capacityFactor; this.consistentHashStrategy = builder.consistentHashStrategy; this.l1lifespan = builder.l1lifespan; this.owners = builder.owners; this.segments = builder.segments; }</code><technical_language>private, called builder</technical_language>

Target:
private AddDistributedCache(Builder builder) { super(builder, CacheType.DISTRIBUTED_CACHE); this.asyncMarshalling = builder.asyncMarshalling; this.mode = builder.mode; this.queueFlushInterval = builder.queueFlushInterval; this.remoteTimeout = builder.remoteTimeout; this.capacityFactor = builder.capacityFactor; this.consistentHashStrategy = builder.consistentHashStrategy; this.l1lifespan = builder.l1lifespan; this.owners = builder.owners; this.segments = builder.segments; }