auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); if (getArguments() != null) { fieldName = getArguments().getString(NAME); listener.setActionBarTitle(fieldName); <START> sendCurrentDate(); <END> } }</code><technical_language>a UI/UX consideration - worth noting today's date is highly user wants, stewardship events added carried out. I this initial thought "If default accepting today's date, majority of users choose". turns out ok</technical_language>

Target:
public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); if (getArguments() != null) { fieldName = getArguments().getString(NAME); changeListener.setActionBarTitle(fieldName); sendCurrentDate(); } }
Source:
<code>private void refreshChannelAdapters() { <START> Set<String> groups = redisOperations.boundSetOps(CONSUMER_GROUPS_KEY_PREFIX + bindingName).members(); <END> for (String group : groups) { if (!adapters.containsKey(group)) { String channel = String.format("%s.%s", this.bindingName, group); adapters.put(group, createProducerEndpoint(channel, accessor)); } } }</code><technical_language>If groups (and subscriptions) durable - based <LINK_0>, sense shut adapters for groups listening anymore</technical_language>

Target:
private void refreshChannelAdapters() { Set<String> groups = redisOperations.boundZSetOps(CONSUMER_GROUPS_KEY_PREFIX + bindingName).rangeByScore(1, Double.MAX_VALUE); for (String group : groups) { if (!adapters.containsKey(group)) { String channel = String.format("%s.%s", this.bindingName, group); adapters.put(group, createProducerEndpoint(channel, accessor)); } } }
Source:
<code>void handleResponse(ResponseInfo responseInfo) { checkExpiredInflightRequests(); <START> completeOperationIfDone(); <END> DeleteRequest deleteRequest = (DeleteRequest) responseInfo.getRequest(); InflightRequestInfo inflightRequestInfo = inflightRequestInfos.remove(deleteRequest.getCorrelationId()); if (inflightRequestInfo != null) { ReplicaId replica = inflightRequestInfo.replica; if (responseInfo.getError() != null) { updateOnRouterErrorCode(replica, RouterErrorCode.OperationTimedOut); } else { try { DeleteResponse deleteResponse = DeleteResponse.readFrom(new DataInputStream(new ByteBufferInputStream(responseInfo.getResponse()))); if (deleteResponse.getCorrelationId() != deleteRequest.getCorrelationId()) { logger.error("The correlation id in the DeleteResponse " + deleteResponse.getCorrelationId() + " is not the same as the correlation id in the associated DeleteRequest: " + deleteRequest .getCorrelationId()); operationException = new RouterException("Received wrong response that is not for the corresponding request.", RouterErrorCode.UnexpectedInternalError); completeOperation(); return; } else { updateOnServerErrorCode(replica, deleteResponse.getError()); } } catch (IOException e) { logger.error("Unable to recover a deleteResponse from received stream."); updateOnRouterErrorCode(replica, RouterErrorCode.UnexpectedInternalError); } } completeOperationIfDone(); } }</code><technical_language>if operation is complete, do need proceed</technical_language>

Target:
void handleResponse(ResponseInfo responseInfo) { DeleteRequest deleteRequest = (DeleteRequest) responseInfo.getRequest(); InflightRequestInfo inflightRequestInfo = inflightRequestInfos.remove(deleteRequest.getCorrelationId()); if (inflightRequestInfo == null) { return; } ReplicaId replica = inflightRequestInfo.replica; if (responseInfo.getError() != null) { responseHandler.onRequestResponseException(replica, new IOException(("NetworkClient error."))); updateOperationState(replica, RouterErrorCode.OperationTimedOut); } else { try { DeleteResponse deleteResponse = DeleteResponse.readFrom(new DataInputStream(new ByteBufferInputStream(responseInfo.getResponse()))); if (deleteResponse.getCorrelationId() != deleteRequest.getCorrelationId()) { logger.error("The correlation id in the DeleteResponse " + deleteResponse.getCorrelationId() + " is not the same as the correlation id in the associated DeleteRequest: " + deleteRequest .getCorrelationId()); setOperationException( new RouterException("Received wrong response that is not for the corresponding request.", RouterErrorCode.UnexpectedInternalError)); updateOperationState(replica, RouterErrorCode.UnexpectedInternalError); return; } else { responseHandler.onRequestResponseError(replica, deleteResponse.getError()); processServerError(replica, deleteResponse.getError()); } } catch (IOException e) { logger.error("Unable to recover a deleteResponse from received stream."); updateOperationState(replica, RouterErrorCode.UnexpectedInternalError); } } checkAndMaybeComplete(); }
Source:
<code>private void createMessage(BriefObjectMetadata metadata, String username, Boolean force) { PID pid = metadata.getPid(); Datastream originalDs = metadata.getDatastreamObject(ORIGINAL_FILE.getId()); <START> Datastream hasThumbnail = metadata.getDatastreamObject(THUMBNAIL_SMALL.getId()); <END> if (originalDs == null && hasThumbnail == null) { return; } PID originalPid = (originalDs != null) ? DatastreamPids.getOriginalFilePid(pid) : pid; Document msg = makeEnhancementOperationBody(username, originalPid, force); messageSender.sendMessage(msg); }</code><technical_language>Hmm, I leave enhancement processors decide if needs done object do here, need remember update in future if more types of derivatives added for non-files. suggest removing this conditional 119. shortcut jump original ds is fine keep</technical_language>

Target:
private void createMessage(BriefObjectMetadata metadata, String username, Boolean force) { PID pid = metadata.getPid(); Datastream originalDs = metadata.getDatastreamObject(ORIGINAL_FILE.getId()); PID originalPid = (originalDs != null) ? DatastreamPids.getOriginalFilePid(pid) : pid; Document msg = makeEnhancementOperationBody(username, originalPid, force); messageSender.sendMessage(msg); }
Source:
<code>public void setEnabled(boolean enabled, Composite parent) { super.setEnabled(enabled, parent); group.setEnabled(enabled); for (Control <START> element : <END> group.getChildren()) { element.setEnabled(enabled); } }</code><technical_language>rename 'child'</technical_language>

Target:
public void setEnabled(boolean enabled, Composite parent) { super.setEnabled(enabled, parent); group.setEnabled(enabled); for (Control child : group.getChildren()) { child.setEnabled(enabled); } }
Source:
<code>public void testValueLoaderWithLocking() throws Exception { CountDownLatch waitUntilThread1LocksValueGetter = new CountDownLatch(1); Future<String> thread1 = fork(() -> cache.get("test", () -> { waitUntilThread1LocksValueGetter.countDown(); TimeUnit.MILLISECONDS.sleep(10); return "thread1"; })); Future<String> thread2 = fork(() -> { <START> waitUntilThread1LocksValueGetter.await(); <END> return cache.get("test", () -> "thread2"); }); String valueObtainedByThread1 = thread1.get(); String valueObtainedByThread2 = thread2.get(); Cache.ValueWrapper valueAfterGetterIsDone = cache.get("test"); assertNotNull(valueAfterGetterIsDone); assertEquals("thread1", valueAfterGetterIsDone.get()); assertEquals("thread1", valueObtainedByThread1); assertEquals("thread1", valueObtainedByThread2); }</code><technical_language>more @slaskawi, please a timeout (e.g. 10 seconds)</technical_language>

Target:
public void testValueLoaderWithLocking() throws Exception { CountDownLatch waitUntilThread1LocksValueGetter = new CountDownLatch(1); Future<String> thread1 = fork(() -> cache.get("test", () -> { waitUntilThread1LocksValueGetter.countDown(); return "thread1"; })); Future<String> thread2 = fork(() -> { waitUntilThread1LocksValueGetter.await(30, TimeUnit.SECONDS); return cache.get("test", () -> "thread2"); }); String valueObtainedByThread1 = thread1.get(); String valueObtainedByThread2 = thread2.get(); Cache.ValueWrapper valueAfterGetterIsDone = cache.get("test"); assertNotNull(valueAfterGetterIsDone); assertEquals("thread1", valueAfterGetterIsDone.get()); assertEquals("thread1", valueObtainedByThread1); assertEquals("thread1", valueObtainedByThread2); }
Source:
<code>public TranslatedExpression<T> translate(FunctionMetadata functionMetadata, RowExpression original, TranslatedExpression<T>... translatedArguments) { <START> return translate(functionMetadata, original, Arrays.asList(translatedArguments)); <END> }</code><technical_language>ImmutableList.of</technical_language>

Target:
public TranslatedExpression<T> translate(FunctionMetadata functionMetadata, RowExpression original, TranslatedExpression<T>... translatedArguments) throws Throwable { return translate(functionMetadata, original, ImmutableList.copyOf(translatedArguments)); }
Source:
<code>public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } PrestoWarning that = (PrestoWarning) o; return code == that.code && <START> Objects.equals(message, that.message); <END> }</code><technical_language>unnecessary line break</technical_language>

Target:
public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } PrestoWarning that = (PrestoWarning) o; return Objects.equals(warningCode, that.warningCode) && Objects.equals(message, that.message); }
Source:
<code>public void getVisitType(final GetVisitTypeCallbackListener callbackListener) { <START> RestApi restApi = RestServiceBuilder.createService(RestApi.class); <END> Call<Results<VisitType>> call = restApi.getVisitType(); call.enqueue(new Callback<Results<VisitType>>() { @Override public void onResponse(Call<Results<VisitType>> call, Response<Results<VisitType>> response) { if (response.isSuccessful()) { callbackListener.onGetVisitTypeResponse(response.body().getResults().get(0)); } else { callbackListener.onErrorResponse(response.message()); } } @Override public void onFailure(Call<Results<VisitType>> call, Throwable t) { callbackListener.onErrorResponse(t.getMessage()); } }); }</code><technical_language>@Rimjhim28 , investigate VisitApi constructor is called calling this getVisitType method? [this line ](<LINK_0> would've initialized restApi</technical_language>

Target:
public void getVisitType(final GetVisitTypeCallbackListener callbackListener) { Call<Results<VisitType>> call = restApi.getVisitType(); call.enqueue(new Callback<Results<VisitType>>() { @Override public void onResponse(Call<Results<VisitType>> call, Response<Results<VisitType>> response) { if (response.isSuccessful()) { callbackListener.onGetVisitTypeResponse(response.body().getResults().get(0)); } else { callbackListener.onErrorResponse(response.message()); } } @Override public void onFailure(Call<Results<VisitType>> call, Throwable t) { callbackListener.onErrorResponse(t.getMessage()); } }); }
Source:
<code>public void updateHandler(IIssue issue, String handler, Date modifyDate) { int oldActor = getUserID(issue.getAssignto()); IQueryValueSet valueSet = new MySQLQuerySet(); valueSet.addTableName("mantis_bug_table"); valueSet.addInsertValue("handler_id", Integer.toString(getUserID(handler))); int oldStatus = ITSEnum.getStatus(issue.getStatus()); if (oldStatus != ITSEnum.ASSIGNED_STATUS) { valueSet.addInsertValue("status", Integer.toString(ITSEnum.ASSIGNED_STATUS)); } valueSet.addEqualCondition("id", Long.toString(issue.getIssueID())); String updateQuery = valueSet.getUpdateQuery(); getControl().execute(updateQuery); <START> String newActor = getUserID(handler) + ""; <END> String oldActorString = ""; if (oldActor > 0) { oldActorString = String.valueOf(oldActor); } HistoryObject history = new HistoryObject( issue.getIssueID(), issue.getIssueType(), HistoryObject.TYPE_HANDLER, oldActorString, newActor, System.currentTimeMillis()); history.save(); }</code><technical_language>Username</technical_language>

Target:
public void updateHandler(IIssue issue, String handler, Date modifyDate) { int oldActor = getUserID(issue.getAssignto()); IQueryValueSet valueSet = new MySQLQuerySet(); valueSet.addTableName("mantis_bug_table"); valueSet.addInsertValue("handler_id", Integer.toString(getUserID(handler))); int oldStatus = ITSEnum.getStatus(issue.getStatus()); if (oldStatus != ITSEnum.ASSIGNED_STATUS) { valueSet.addInsertValue("status", Integer.toString(ITSEnum.ASSIGNED_STATUS)); } valueSet.addEqualCondition("id", Long.toString(issue.getIssueID())); String updateQuery = valueSet.getUpdateQuery(); getControl().execute(updateQuery); String newUsername = getUserID(handler) + ""; String oldActorString = ""; if (oldActor > 0) { oldActorString = String.valueOf(oldActor); } HistoryObject handlerHistory = new HistoryObject( issue.getIssueID(), issue.getIssueType(), HistoryObject.TYPE_HANDLER, oldActorString, newUsername, System.currentTimeMillis()); handlerHistory.save(); }
Source:
<code>public void initialize(Context context) { context.registerSyntaxNodeConsumer(Kind.CALL_EXPR, ctx -> { PyCallExpressionTree callExpression = (PyCallExpressionTree) ctx.syntaxNode(); <START> List<PyArgumentTree> arguments = callExpression.arguments() != null ? callExpression.arguments().arguments() : Collections.emptyList(); <END> String qualifiedName = getQualifiedName(callExpression, ctx); if (CRYPTOGRAPHY.matcher(qualifiedName).matches()) { new CryptographyModuleCheck().checkArguments(ctx, arguments); } else if (CRYPTO.matcher(qualifiedName).matches()) { new CryptoModuleCheck().checkArguments(ctx, arguments); } else if (CRYPTODOME.matcher(qualifiedName).matches()) { new CryptodomeModuleCheck().checkArguments(ctx, arguments); } }); }</code><technical_language>a dedicated method CallExpression</technical_language>

Target:
public void initialize(Context context) { context.registerSyntaxNodeConsumer(Kind.CALL_EXPR, ctx -> { PyCallExpressionTree callExpression = (PyCallExpressionTree) ctx.syntaxNode(); List<PyArgumentTree> arguments = callExpression.arguments(); String qualifiedName = getQualifiedName(callExpression, ctx); if (CRYPTOGRAPHY.matcher(qualifiedName).matches()) { new CryptographyModuleCheck().checkArguments(ctx, arguments); } else if (CRYPTO.matcher(qualifiedName).matches()) { new CryptoModuleCheck().checkArguments(ctx, arguments); } else if (CRYPTODOME.matcher(qualifiedName).matches()) { new CryptodomeModuleCheck().checkArguments(ctx, arguments); } }); }
Source:
<code>public void beforeMethod() throws Exception { _gSetupTool.addCluster(_clusterName, true); _manager = HelixManagerFactory .getZKHelixManager(_clusterName, "Admin", InstanceType.ADMINISTRATOR, ZK_ADDR); _manager.connect(); _gSetupTool.addInstanceToCluster(_clusterName, _instanceName); _participant = new MockParticipantManager(ZK_ADDR, _clusterName, _instanceName); StateModelFactory<StateModel> stateModelFactory = <START> new MasterSlaveStateModelFactory(_instanceName, 0); <END> StateMachineEngine stateMach = _participant.getStateMachineEngine(); stateMach.registerStateModelFactory("MasterSlave", stateModelFactory); Map<String, TaskFactory> taskFactoryReg = new HashMap<>(); _participant.getStateMachineEngine().registerStateModelFactory(TaskConstants.STATE_MODEL_NAME, new TaskStateModelFactory(_participant, taskFactoryReg)); _participant.syncStart(); _controller = new ClusterControllerManager(ZK_ADDR, _clusterName, null); _controller.syncStart(); }</code><technical_language>Is 0 a magic number</technical_language>

Target:
public void beforeMethod() throws Exception { _gSetupTool.addCluster(CLUSTER_NAME, true); _manager = HelixManagerFactory .getZKHelixManager(CLUSTER_NAME, "Admin", InstanceType.ADMINISTRATOR, ZK_ADDR); _manager.connect(); _gSetupTool.addInstanceToCluster(CLUSTER_NAME, INSTANCE_NAME); _participant = new MockParticipantManager(ZK_ADDR, CLUSTER_NAME, INSTANCE_NAME); StateModelFactory<StateModel> stateModelFactory = new MasterSlaveStateModelFactory(INSTANCE_NAME); StateMachineEngine stateMach = _participant.getStateMachineEngine(); stateMach.registerStateModelFactory(MASTER_SLAVE_STATE_MODEL, stateModelFactory); Map<String, TaskFactory> taskFactoryReg = new HashMap<>(); _participant.getStateMachineEngine().registerStateModelFactory(TaskConstants.STATE_MODEL_NAME, new TaskStateModelFactory(_participant, taskFactoryReg)); _participant.syncStart(); _controller = new ClusterControllerManager(ZK_ADDR, CLUSTER_NAME, null); _controller.syncStart(); }
Source:
<code>public Config getConfig() { <START> return (Config) getFromMetricsMessage(GROUP_NAME_FOR_DIAGNOSTICS_MANAGER, CONFIG); <END> }</code><technical_language>serialize Map<String, String> getFromMetricsMessage return a Map<String, String> needs converted Config this: new MapConfig(getFromMetricsMessage(GROUP_NAME_FOR_DIAGNOSTICS_MANAGER, CONFIG));</technical_language>

Target:
public Config getConfig() { return new MapConfig((Map<String, String>) getFromMetricsMessage(GROUP_NAME_FOR_DIAGNOSTICS_MANAGER, CONFIG_METRIC_NAME)); }
Source:
<code>public void organisation_should_not_have_notice_for_language() { final Entity result = (Entity) map(RpslObject.parse("" + "organisation: ORG-AC1-TEST\n" + "org-name: Acme Carpets\n" + "org-type: OTHER\n" + "address: Singel 258\n" + "e-mail: bitbucket@ripe.net\n" + "descr: Acme Carpet Organisation\n" + "remark: some remark\n" + "phone: +31 1234567\n" + "fax-no: +31 98765432\n" + "geoloc: 52.375599 4.899902\n" + "language: DK\n" + "admin-c: TP1-TEST\n" + "abuse-c: ABU-TEST\n" + "mnt-by: FRED-MNT\n" + "source: TEST")); assertThat(result.getLang(), is("DK")); final List<Notice> notices = result.getNotices(); assertThat(notices, hasSize(1)); <START> assertNull(notices.get(0)); <END> }</code><technical_language>is a null notice</technical_language>

Target:
public void organisation_should_not_have_notice_for_language() { final Entity result = (Entity) map(RpslObject.parse("" + "organisation: ORG-AC1-TEST\n" + "org-name: Acme Carpets\n" + "org-type: OTHER\n" + "address: Singel 258\n" + "e-mail: bitbucket@ripe.net\n" + "descr: Acme Carpet Organisation\n" + "remark: some remark\n" + "phone: +31 1234567\n" + "fax-no: +31 98765432\n" + "geoloc: 52.375599 4.899902\n" + "language: DK\n" + "admin-c: TP1-TEST\n" + "abuse-c: ABU-TEST\n" + "mnt-by: FRED-MNT\n" + "source: TEST")); assertThat(result.getLang(), is("DK")); final List<Notice> notices = result.getNotices(); assertThat(notices, hasSize(1)); assertThat(notices.get(0).getTitle(), is("Terms And Condition")); }
Source:
<code>private boolean matchesFilter(StackTraceElement[] stackTraces) { for (StackTraceElement element : stackTraces) { <START> String fullyQualifiedMethodName = element.getClassName() + '.' + element.getMethodName(); <END> for (String filter : filters) { if (fullyQualifiedMethodName.equals(filter)) { return true; } } } return false; }</code><technical_language>This line executed times. Do filter comparison creating temporary objects. This achieved preprocessing of filters</technical_language>

Target:
private boolean matchesFilter(StackTraceElement[] stackTraces) { for (StackTraceElement element : stackTraces) { for (Filter filter : filters ) { if (element.getMethodName().equals(filter.methodName) && element.getClassName().equals(filter.className)) { return true; } } } return false; }
Source:
<code>public void reject(@PathVariable(value = "proposalId") Long proposalId) { Proposal proposal = proposalRepository.findOne(proposalId); proposal.setStatus(ProposalStatus.REJECTED); <START> } <END></code><technical_language>funny mutualize code send status?</technical_language>

Target:
public void reject(@PathVariable(value = "proposalId") Long proposalId) { changeProposalStatus(proposalId, ProposalStatus.REJECTED); }
Source:
<code>private void handleSuccess(List<Media> collection) { if (collection == null || collection.isEmpty()) { initErrorView(); hasMoreImages = false; return; } if (gridAdapter == null) { setAdapter(collection); } else { if (gridAdapter.containsAll(collection)) { hasMoreImages = false; return; } gridAdapter.addItems(collection); try { ((CategoryImagesActivity) getContext()).viewPagerNotifyDataSetChanged(); }catch (Exception e){ e.printStackTrace(); } try { ((CategoryDetailsActivity) getContext()).viewPagerNotifyDataSetChanged(); }catch (Exception e){ e.printStackTrace(); } try { ((ExploreActivity) getContext()).viewPagerNotifyDataSetChanged(); }catch (Exception e){ e.printStackTrace(); } } progressBar.setVisibility(GONE); isLoading = false; statusTextView.setVisibility(GONE); for (Media m : collection) { <START> replaceTitlesWithCaptions(m.getDisplayTitle(), mediaSize++); <END> } }</code><technical_language>I fix problem replacing replaceTitlesWithCaptions(m.getDisplayTitle(), mediaSize++); replaceTitlesWithCaptions(m.get(), mediaSize++); performing this API call instead: <LINK_0> Notice this query ids= instead of titles=. removes problem of hardcode ".jpg"</technical_language>

Target:
private void handleSuccess(List<Media> collection) { if (collection == null || collection.isEmpty()) { initErrorView(); hasMoreImages = false; return; } if (gridAdapter == null) { setAdapter(collection); } else { if (gridAdapter.containsAll(collection)) { hasMoreImages = false; return; } gridAdapter.addItems(collection); try { ((CategoryImagesActivity) getContext()).viewPagerNotifyDataSetChanged(); }catch (Exception e){ e.printStackTrace(); } try { ((CategoryDetailsActivity) getContext()).viewPagerNotifyDataSetChanged(); }catch (Exception e){ e.printStackTrace(); } try { ((ExploreActivity) getContext()).viewPagerNotifyDataSetChanged(); }catch (Exception e){ e.printStackTrace(); } } progressBar.setVisibility(GONE); isLoading = false; statusTextView.setVisibility(GONE); for (Media m : collection) { replaceTitlesWithCaptions("M"+m.getPageId(), mediaSize++); } }
Source:
<code>public DynamicTableSource createDynamicTableSource(Context context) { createTableFactoryHelper(this, context).validateExcept(FIELDS); Configuration options = new Configuration(); context.getCatalogTable().getOptions().forEach(options::setString); TableSchema schema = TableSchemaUtils.getPhysicalSchema(context.getCatalogTable().getSchema()); DataGenerator[] fieldGenerators = new DataGenerator[schema.getFieldCount()]; Set<ConfigOption<?>> optionalOptions = new HashSet<>(); for (int i = 0; i < fieldGenerators.length; i++) { String name = schema.getFieldNames()[i]; DataType type = schema.getFieldDataTypes()[i]; ConfigOption<String> kind = key(FIELDS + "." + name + "." + KIND) .stringType().defaultValue(RANDOM); DataGeneratorContainer container = createContainer(name, type, options.get(kind), options); fieldGenerators[i] = container.generator; optionalOptions.add(kind); optionalOptions.addAll(container.options); } <START> FactoryUtil.validateFactoryOptions(new HashSet<>(), optionalOptions, options); <END> Set<String> consumedOptionKeys = new HashSet<>(); consumedOptionKeys.add(CONNECTOR.key()); consumedOptionKeys.add(ROWS_PER_SECOND.key()); optionalOptions.stream().map(ConfigOption::key).forEach(consumedOptionKeys::add); FactoryUtil.validateUnconsumedKeys(factoryIdentifier(), options.keySet(), consumedOptionKeys); return new DataGenTableSource(fieldGenerators, schema, options.get(ROWS_PER_SECOND)); }</code><technical_language>Call requiredOptions() instead of new HashSet<>()</technical_language>

Target:
public DynamicTableSource createDynamicTableSource(Context context) { Configuration options = new Configuration(); context.getCatalogTable().getOptions().forEach(options::setString); TableSchema schema = TableSchemaUtils.getPhysicalSchema(context.getCatalogTable().getSchema()); DataGenerator[] fieldGenerators = new DataGenerator[schema.getFieldCount()]; Set<ConfigOption<?>> optionalOptions = new HashSet<>(); for (int i = 0; i < fieldGenerators.length; i++) { String name = schema.getFieldNames()[i]; DataType type = schema.getFieldDataTypes()[i]; ConfigOption<String> kind = key(FIELDS + "." + name + "." + KIND) .stringType().defaultValue(RANDOM); DataGeneratorContainer container = createContainer(name, type, options.get(kind), options); fieldGenerators[i] = container.generator; optionalOptions.add(kind); optionalOptions.addAll(container.options); } FactoryUtil.validateFactoryOptions(requiredOptions(), optionalOptions, options); Set<String> consumedOptionKeys = new HashSet<>(); consumedOptionKeys.add(CONNECTOR.key()); consumedOptionKeys.add(ROWS_PER_SECOND.key()); optionalOptions.stream().map(ConfigOption::key).forEach(consumedOptionKeys::add); FactoryUtil.validateUnconsumedKeys(factoryIdentifier(), options.keySet(), consumedOptionKeys); return new DataGenTableSource(fieldGenerators, schema, options.get(ROWS_PER_SECOND)); }
Source:
<code>private ChannelFuture setupServerBootstrap( SocketAddress listenAddress, ChannelInitializer<?> channelInitializer) throws InterruptedException { ServerBootstrap serverBootstrap = new ServerBootstrap().group(serverGroup.clientToProxyBossPool, serverGroup.clientToProxyWorkerPool); Map<ChannelOption, Object> channelOptions = new HashMap<>(); channelOptions.put(ChannelOption.SO_BACKLOG, 128); channelOptions.put(ChannelOption.SO_LINGER, -1); channelOptions.put(ChannelOption.TCP_NODELAY, true); channelOptions.put(ChannelOption.SO_KEEPALIVE, true); LOG.debug("Proxy listening with " + serverGroup.channelType); serverBootstrap.channel(serverGroup.channelType); for (Map.Entry<ChannelOption, Object> optionEntry : channelOptions.entrySet()) { serverBootstrap = serverBootstrap.option(optionEntry.getKey(), optionEntry.getValue()); } for (Map.Entry<ChannelOption, ?> optionEntry : serverGroup.transportChannelOptions.entrySet()) { serverBootstrap = serverBootstrap.option(optionEntry.getKey(), optionEntry.getValue()); } serverBootstrap.childHandler(channelInitializer); serverBootstrap.validate(); <START> LOG.debug("Binding to : " + listenAddress); <END> serverStatusManager.localStatus(InstanceInfo.InstanceStatus.UP); return serverBootstrap.bind(listenAddress).sync(); }</code><technical_language>This is a useful log statement multiple ports bound</technical_language>

Target:
private ChannelFuture setupServerBootstrap( SocketAddress listenAddress, ChannelInitializer<?> channelInitializer) throws InterruptedException { ServerBootstrap serverBootstrap = new ServerBootstrap().group(serverGroup.clientToProxyBossPool, serverGroup.clientToProxyWorkerPool); Map<ChannelOption, Object> channelOptions = new HashMap<>(); channelOptions.put(ChannelOption.SO_BACKLOG, 128); channelOptions.put(ChannelOption.SO_LINGER, -1); channelOptions.put(ChannelOption.TCP_NODELAY, true); channelOptions.put(ChannelOption.SO_KEEPALIVE, true); LOG.info("Proxy listening with " + serverGroup.channelType); serverBootstrap.channel(serverGroup.channelType); for (Map.Entry<ChannelOption, Object> optionEntry : channelOptions.entrySet()) { serverBootstrap = serverBootstrap.option(optionEntry.getKey(), optionEntry.getValue()); } for (Map.Entry<ChannelOption, ?> optionEntry : serverGroup.transportChannelOptions.entrySet()) { serverBootstrap = serverBootstrap.option(optionEntry.getKey(), optionEntry.getValue()); } serverBootstrap.childHandler(channelInitializer); serverBootstrap.validate(); LOG.info("Binding to : " + listenAddress); serverStatusManager.localStatus(InstanceInfo.InstanceStatus.UP); return serverBootstrap.bind(listenAddress).sync(); }
Source:
<code>public void setKeywords(List<KeywordInfo> keywords) { if (keywords == null) { this.keywords = new ArrayList<>(); } <START> this.keywords = keywords; <END> }</code><technical_language>set this.keywords a null value, set null? I guess wanted like: if (keywords == null) { keywords = new ArrayList<>(); } this.keywords = keywords;</technical_language>

Target:
public void setKeywords(List<KeywordInfo> keywords) { this.keywords = keywords == null ? new ArrayList<>() : keywords; }
Source:
<code>public MimeMessage sendErrorReport(HttpServletRequest req, Throwable error) { MimeMessage email = null; try { String requestMethod = req.getMethod(); String requestUserAgent = req.getHeader("User-Agent"); String requestPath = req.getServletPath(); String requestUrl = req.getRequestURL().toString(); String requestParam = HttpRequestHelper.printRequestParameters(req); email = generateSystemErrorEmail(error, requestMethod, requestUserAgent, requestPath, requestUrl, requestParam, Config.inst().getAppVersion()); forceSendEmailThroughGaeWithoutLogging(email); log.severe("Sent crash report: " + Emails.getEmailInfo(email)); } catch (Exception e) { log.severe("Crash report failed to send. Detailed error stack trace: " <START> + TeammatesException.toStringWithStackTrace(error).replace("\\n","<br>")); <END> logSevereForErrorInSendingItem("crash report", email, e); } return email; }</code><technical_language>this inserted toStringWithStackTrace() itslef</technical_language>

Target:
public MimeMessage sendErrorReport(HttpServletRequest req, Throwable error) { MimeMessage email = null; try { String requestMethod = req.getMethod(); String requestUserAgent = req.getHeader("User-Agent"); String requestPath = req.getServletPath(); String requestUrl = req.getRequestURL().toString(); String requestParam = HttpRequestHelper.printRequestParameters(req); email = generateSystemErrorEmail(error, requestMethod, requestUserAgent, requestPath, requestUrl, requestParam, Config.inst().getAppVersion()); forceSendEmailThroughGaeWithoutLogging(email); log.severe("Sent crash report: " + Emails.getEmailInfo(email)); } catch (Exception e) { log.severe("Crash report failed to send. Detailed error stack trace: " + TeammatesException.toStringWithStackTrace(error)); logSevereForErrorInSendingItem("crash report", email, e); } return email; }
Source:
<code>public final void run() { if (forcedRepairAction == RepairAction.RESET) { resetAndStop(node); } else if (forcedRepairAction == RepairAction.UNLOCK_CONFIG) { <START> forceUnlock(); <END> } else { nomadRepair(); } logger.info("Command successful!" + lineSeparator()); }</code><technical_language>I system test for config-tool repair unlock</technical_language>

Target:
public final void run() { if (forcedRepairAction == RepairAction.RESET) { resetAndStop(node); } else if (forcedRepairAction == RepairAction.UNLOCK) { forceUnlock(); } else { nomadRepair(); } logger.info("Command successful!" + lineSeparator()); }
Source:
<code>public HivePrincipal getHivePrincipal(PrincipalDesc principal) throws HiveException { <START> return AuthorizationUtils.getHivePrincipal(principal); <END> }</code><technical_language>weird. Do need getHivePrincipal for AuthorizationUtils? move implementation of APIs translator. remove in AuthorizationUtils</technical_language>

Target:
public HivePrincipal getHivePrincipal(PrincipalDesc principal) throws HiveException { if (principal == null) { return null; } return AuthorizationUtils.getHivePrincipal(principal.getName(), principal.getType()); }
Source:
<code>public ClientHttpResponse intercept(HttpRequest request, byte[] body, ClientHttpRequestExecution execution) throws IOException { final ClientHttpResponse response = execution.execute(request, body); if (logger.isWarnEnabled()) { final List<String> deprecated = response.getHeaders().get(Header.GDC_DEPRECATED); if (deprecated != null && !deprecated.isEmpty()) { <START> logger.warn("Resource path={} deprecated {}", request.getURI().getPath(), deprecated.get(0)); <END> } } return response; }</code><technical_language>I add information version used, string header is guaranteed it</technical_language>

Target:
public ClientHttpResponse intercept(HttpRequest request, byte[] body, ClientHttpRequestExecution execution) throws IOException { final ClientHttpResponse response = execution.execute(request, body); if (logger.isWarnEnabled()) { final List<String> deprecated = response.getHeaders().get(Header.GDC_DEPRECATED); if (deprecated != null && !deprecated.isEmpty()) { final List<String> versionHeaders = request.getHeaders().get(Header.GDC_VERSION); final String version = versionHeaders != null && !versionHeaders.isEmpty() ? versionHeaders.get(0) : "UNKNOWN"; logger.warn("Resource path={} version={} deprecated {}", request.getURI().getPath(), version, deprecated.get(0)); } } return response; }
Source:
<code><START> public static <T> T createModel(Class<T> model, List<OpenEngSBModelEntry> entries) { <END> checkIfClassIsModel(model); try { T instance = model.newInstance(); for (OpenEngSBModelEntry entry : entries) { try { String setterName = getSetterName(entry.getKey()); Method method = model.getMethod(setterName, entry.getType()); method.invoke(instance, entry.getValue()); } catch (NoSuchMethodException e) { ((OpenEngSBModel) instance).addOpenEngSBModelEntry(entry); } catch (IllegalArgumentException e) { e.printStackTrace(); } catch (InvocationTargetException e) { e.printStackTrace(); } } return instance; } catch (InstantiationException e) { e.printStackTrace(); } catch (IllegalAccessException e) { e.printStackTrace(); } catch (SecurityException e) { e.printStackTrace(); } return null; }</code><technical_language>simply a model instead of checking for one</technical_language>

Target:
public static <T> T createModel(Class<T> model, List<OpenEngSBModelEntry> entries) { checkIfClassIsModel(model); try { T instance = model.newInstance(); for (OpenEngSBModelEntry entry : entries) { try { String setterName = getSetterName(entry.getKey()); Method method = model.getMethod(setterName, entry.getType()); method.invoke(instance, entry.getValue()); } catch (NoSuchMethodException e) { ((OpenEngSBModel) instance).addOpenEngSBModelEntry(entry); } catch (IllegalArgumentException e) { LOGGER.error("IllegalArgumentException while trying to set values for the new model.", e); } catch (InvocationTargetException e) { LOGGER.error("InvocationTargetException while trying to set values for the new model.", e); } } return instance; } catch (InstantiationException e) { LOGGER.error("InstantiationException while creating a new model instance.", e); } catch (IllegalAccessException e) { LOGGER.error("IllegalAccessException while creating a new model instance.", e); } catch (SecurityException e) { LOGGER.error("SecurityException while creating a new model instance.", e); } return null; }
Source:
<code>public static Slice hmacMd5( @SqlType(StandardTypes.VARBINARY) Slice slice, @SqlType(StandardTypes.VARBINARY) Slice key) { <START> return Slices.wrappedBuffer(Hashing.hmacMd5(key.getBytes()).hashBytes(slice.getBytes()).asBytes()); <END> }</code><technical_language>static import wrappedBuffer</technical_language>

Target:
public static Slice hmacMd5( @SqlType(StandardTypes.VARBINARY) Slice slice, @SqlType(StandardTypes.VARBINARY) Slice key) { return wrappedBuffer(Hashing.hmacMd5(key.getBytes()).hashBytes(slice.getBytes()).asBytes()); }
Source:
<code><START> public long getFilterBlobLimit() { <END> return filterSpec.getBlobLimit(); }</code><technical_language>I this "final"</technical_language>

Target:
public final long getFilterBlobLimit() { return filterSpec.getBlobLimit(); }
Source:
<code>private void validateOriginalInstanceValues(InstanceAdapter instanceAdapter) { TaskAdapter taskAdapter = instanceAdapter.taskAdapter(); <START> if (new First<>(new Sieved<>(taskAdapter::isUpdated, ORIGINAL_INSTANCE_FIELD_ADAPTERS)).isPresent()) <END> { throw new IllegalArgumentException("Recurrence values can not be modified through the instances table."); } }</code><technical_language>Copy-paste in exception message below</technical_language>

Target:
private void validateOriginalInstanceValues(InstanceAdapter instanceAdapter) { TaskAdapter taskAdapter = instanceAdapter.taskAdapter(); if (new First<>(new Sieved<>(taskAdapter::isUpdated, ORIGINAL_INSTANCE_FIELD_ADAPTERS)).isPresent()) { throw new IllegalArgumentException("ORIGINAL_INSTANCE_* fields can not be updated through the instances table."); } }
Source:
<code><START> private static String findMode(String bondOptions){ <END> char[] bondOptionsChars = bondOptions.toCharArray(); int length = bondOptions.length(); int index = 0; if (!bondOptions.startsWith(MODE_FOR_SEARCH)){ if ((index = bondOptions.indexOf(" " + MODE_FOR_SEARCH)) == -1){ return null; } index++; } index = index + MODE_FOR_SEARCH.length(); while(index < length && Character.isSpace(bondOptionsChars[index])){ index++; } if (index >= length || bondOptionsChars[index] != '='){ return null; } index++; while(index < length && Character.isSpace(bondOptionsChars[index])){ index++; } StringBuffer buffer = new StringBuffer(); while(index < length && Character.isDigit(bondOptionsChars[index])){ buffer.append(bondOptionsChars[index]); index++; } if (index < length && !Character.isSpace(bondOptionsChars[index])){ return null; } if (buffer.length() == 0){ return null; } return buffer.toString(); }</code><technical_language>problem, do want, I care. (^ *| +) javascript work. Is a real argumentation for reluctant quantified ("*?") instead of normal greedy ("*") possesive ("++") instead of greedy one("+")? *this* is unsupported part in javascript, rest work fine</technical_language>

Target:
private static String findMode(String bondOptions){ char[] bondOptionsChars = bondOptions.toCharArray(); int length = bondOptions.length(); int index = 0; if (!bondOptions.startsWith(MODE_FOR_SEARCH)){ if ((index = bondOptions.indexOf(" " + MODE_FOR_SEARCH)) == -1){ return null; } index++; } index = index + MODE_FOR_SEARCH.length(); while(index < length && Character.isSpace(bondOptionsChars[index])){ index++; } if (index >= length || bondOptionsChars[index] != '='){ return null; } index++; while(index < length && Character.isSpace(bondOptionsChars[index])){ index++; } StringBuilder bondModeBuilder = new StringBuilder(); while(index < length && Character.isDigit(bondOptionsChars[index])){ bondModeBuilder.append(bondOptionsChars[index]); index++; } if (index < length && !Character.isSpace(bondOptionsChars[index])){ return null; } if (bondModeBuilder.length() == 0){ return null; } return bondModeBuilder.toString(); }
Source:
<code><START> public void setProperties(Set<Property> properties) { <END> this.properties = properties; }</code><technical_language>Similarly, want create a new Set based set received, ensure contents changed some external object</technical_language>

Target:
public Node setProperties(Set<Property> properties) { if (details == null) { throw new IllegalArgumentException("Null value not permitted"); } this.properties = properties; return this; }
Source:
<code>public TxnUnlockBackupOperation(String name, Data dataKey, String ownerUuid, long lockThreadId) { super(name, dataKey); this.ownerUuid = ownerUuid; <START> this.lockThreadId = lockThreadId; <END> }</code><technical_language>reuse KeyBasedMapOperation#threadId there</technical_language>

Target:
public TxnUnlockBackupOperation(String name, Data dataKey, String ownerUuid, long lockThreadId) { super(name, dataKey); this.ownerUuid = ownerUuid; this.threadId = lockThreadId; }
Source:
<code>private void writeExternalData(final FileOutputStream edfos) throws IOException { while (!externalData.isEmpty()) { <START> Object[] ed = externalData.poll(); <END> for (Object oo : ed) { if (oo == null) { continue; } if (oo instanceof StringWrapper) { StringWrapper sw = (StringWrapper) oo; byte[] bytes = sw.s.getBytes(); byte[] header = ActorExecutionTrace.getExtDataHeader(sw.actorId, sw.dataId, bytes.length); if (edfos != null) { edfos.getChannel().write(ByteBuffer.wrap(header)); edfos.getChannel().write(ByteBuffer.wrap(bytes)); edfos.flush(); } externalBytes += bytes.length + 12; } else if (oo instanceof TwoDArrayWrapper) { writeArray((TwoDArrayWrapper) oo, edfos); } else { byte[] data = (byte[]) oo; externalBytes += data.length; if (edfos != null) { edfos.getChannel().write(ByteBuffer.wrap(data)); edfos.flush(); } } } } }</code><technical_language>ed? I understand abbreviations</technical_language>

Target:
private void writeExternalData(final FileOutputStream edfos) throws IOException { while (!externalData.isEmpty()) { Object[] external = externalData.poll(); for (Object oo : external) { if (oo == null) { continue; } if (oo instanceof StringWrapper) { StringWrapper sw = (StringWrapper) oo; byte[] bytes = sw.s.getBytes(); byte[] header = ActorExecutionTrace.getExtDataHeader(sw.actorId, sw.dataId, bytes.length); if (edfos != null) { edfos.getChannel().write(ByteBuffer.wrap(header)); edfos.getChannel().write(ByteBuffer.wrap(bytes)); edfos.flush(); } externalBytes += bytes.length + 12; } else if (oo instanceof TwoDArrayWrapper) { writeArray((TwoDArrayWrapper) oo, edfos); } else { byte[] data = (byte[]) oo; externalBytes += data.length; if (edfos != null) { edfos.getChannel().write(ByteBuffer.wrap(data)); edfos.flush(); } } } } }
Source:
<code>public void execute(IProgressMonitor monitor) throws CoreException { IWorkspaceRunnable action = new IWorkspaceRunnable() { @Override public void run(IProgressMonitor actMonitor) throws CoreException { String taskName = NLS.bind( CoreText.CreateLocalBranchOperation_CreatingBranchMessage, name); SubMonitor progress = SubMonitor.convert(actMonitor, taskName, 1); try (Git git = new Git(repository)) { if (ref != null) { SetupUpstreamMode mode; if (upstreamConfig == null) mode = SetupUpstreamMode.NOTRACK; else mode = SetupUpstreamMode.SET_UPSTREAM; git.branchCreate().setName(name).setStartPoint( ref.getName()).setUpstreamMode(mode).call(); } else git.branchCreate().setName(name).setStartPoint(commit) .setUpstreamMode(SetupUpstreamMode.NOTRACK) .call(); } catch (Exception e) { throw new CoreException(Activator.error(e.getMessage(), e)); } if (upstreamConfig != null) { StoredConfig config = repository.getConfig(); config.setEnum(ConfigConstants.CONFIG_BRANCH_SECTION, name, ConfigConstants.CONFIG_KEY_REBASE, upstreamConfig); try { config.save(); } catch (IOException e) { throw new CoreException(Activator.error(e.getMessage(), e)); } } <START> progress.worked(1); <END> } }; ResourcesPlugin.getWorkspace().run(action, getSchedulingRule(), IWorkspace.AVOID_UPDATE, monitor); }</code><technical_language>Delete. Reporting progress end of a method is a no-op</technical_language>

Target:
public void execute(IProgressMonitor monitor) throws CoreException { IWorkspaceRunnable action = new IWorkspaceRunnable() { @Override public void run(IProgressMonitor actMonitor) throws CoreException { String taskName = NLS.bind( CoreText.CreateLocalBranchOperation_CreatingBranchMessage, name); SubMonitor progress = SubMonitor.convert(actMonitor); progress.setTaskName(taskName); try (Git git = new Git(repository)) { if (ref != null) { SetupUpstreamMode mode; if (upstreamConfig == null) mode = SetupUpstreamMode.NOTRACK; else mode = SetupUpstreamMode.SET_UPSTREAM; git.branchCreate().setName(name).setStartPoint( ref.getName()).setUpstreamMode(mode).call(); } else git.branchCreate().setName(name).setStartPoint(commit) .setUpstreamMode(SetupUpstreamMode.NOTRACK) .call(); } catch (Exception e) { throw new CoreException(Activator.error(e.getMessage(), e)); } if (upstreamConfig != null) { StoredConfig config = repository.getConfig(); config.setEnum(ConfigConstants.CONFIG_BRANCH_SECTION, name, ConfigConstants.CONFIG_KEY_REBASE, upstreamConfig); try { config.save(); } catch (IOException e) { throw new CoreException(Activator.error(e.getMessage(), e)); } } } }; ResourcesPlugin.getWorkspace().run(action, getSchedulingRule(), IWorkspace.AVOID_UPDATE, monitor); }
Source:
<code>public FakeTestNGMethod(Class<?> clazz, String methodName, XmlTest xmlTest) { <START> this(clazz, methodName); <END> this.xmlTest = xmlTest; }</code><technical_language>Usually, do opposite: constructor parameters call constructor more parameters (with default values). java public FakeTestNGMethod(Class<?> clazz, String methodName) { this(clazz, methodName, null); }</technical_language>

Target:
public FakeTestNGMethod(Class<?> clazz, String methodName, XmlTest xmlTest) { ConstructorOrMethod temp = null; Method[] methods = ReflectionHelper.getLocalMethods(clazz); for (Method method : methods) { if (method.getName().equalsIgnoreCase(methodName)) { temp = new ConstructorOrMethod(method); break; } } this.xmlTest = xmlTest; this.clazz = clazz; this.consMethod = temp; }
Source:
<code>public void getGenericPasswordForOptions(String service, Promise promise) { try { service = getDefaultServiceIfNull(service); CipherStorage currentCipherStorage = getCipherStorageForCurrentAPILevel(); final DecryptionResult decryptionResult; ResultSet resultSet = prefsStorage.getEncryptedEntry(service); if (resultSet == null) { Log.e(KEYCHAIN_MODULE, "No entry found for service: " + service); promise.resolve(false); return; } if (resultSet.cipherStorageName.equals(currentCipherStorage.getCipherStorageName())) { decryptionResult = currentCipherStorage.decrypt(service, resultSet.usernameBytes, resultSet.passwordBytes); } else { CipherStorage oldCipherStorage = getCipherStorageByName(resultSet.cipherStorageName); decryptionResult = oldCipherStorage.decrypt(service, resultSet.usernameBytes, resultSet.passwordBytes); <START> try { <END> EncryptionResult encryptionResult = currentCipherStorage.encrypt(service, decryptionResult.username, decryptionResult.password, decryptionResult.getSecurityLevel()); prefsStorage.storeEncryptedEntry(service, encryptionResult); oldCipherStorage.removeKey(service); } catch (CryptoFailedException e) { Log.e(KEYCHAIN_MODULE, "Migrating to a less safe storage is not allowed. Keeping the old one"); } } WritableMap credentials = Arguments.createMap(); credentials.putString("service", service); credentials.putString("username", decryptionResult.username); credentials.putString("password", decryptionResult.password); promise.resolve(credentials); } catch (KeyStoreAccessException e) { Log.e(KEYCHAIN_MODULE, e.getMessage()); promise.reject(E_KEYSTORE_ACCESS_ERROR, e); } catch (CryptoFailedException e) { Log.e(KEYCHAIN_MODULE, e.getMessage()); promise.reject(E_CRYPTO_FAILED, e); } }</code><technical_language>do refactor entire if / else part a separate method (that return a decryptionResult I suppose)? getGenericPasswordForOptions is a bit lengthy. Thanks</technical_language>

Target:
public void getGenericPasswordForOptions(String service, Promise promise) { try { service = getDefaultServiceIfNull(service); CipherStorage currentCipherStorage = getCipherStorageForCurrentAPILevel(); ResultSet resultSet = prefsStorage.getEncryptedEntry(service); if (resultSet == null) { Log.e(KEYCHAIN_MODULE, "No entry found for service: " + service); promise.resolve(false); return; } final DecryptionResult decryptionResult = decryptCredentials(service, currentCipherStorage, resultSet); WritableMap credentials = Arguments.createMap(); credentials.putString("service", service); credentials.putString("username", decryptionResult.username); credentials.putString("password", decryptionResult.password); promise.resolve(credentials); } catch (KeyStoreAccessException e) { Log.e(KEYCHAIN_MODULE, e.getMessage()); promise.reject(E_KEYSTORE_ACCESS_ERROR, e); } catch (CryptoFailedException e) { Log.e(KEYCHAIN_MODULE, e.getMessage()); promise.reject(E_CRYPTO_FAILED, e); } }
Source:
<code>public void testGetPermittedStorageDomains() { List<StorageDomain> result = dao.getPermittedStorageDomainsByStoragePool(EXISTING_USER_ID, ActionGroup.CONFIGURE_VM_STORAGE, <START> Guid.createGuidFromString("6d849ebf-755f-4552-ad09-9a090cda105d")); <END> assertNotNull(result); assertFalse(result.isEmpty()); assertEquals(result.get(0).getId(), existingDomain.getId()); }</code><technical_language>new Guid(String) - this literal null</technical_language>

Target:
public void testGetPermittedStorageDomains() { List<StorageDomain> result = dao.getPermittedStorageDomainsByStoragePool(EXISTING_USER_ID, ActionGroup.CONFIGURE_VM_STORAGE, new Guid("6d849ebf-755f-4552-ad09-9a090cda105d")); assertNotNull(result); assertFalse(result.isEmpty()); assertEquals(result.get(0).getId(), existingDomain.getId()); }