auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>protected InstantOperatorInfo getInstantOpInfo() { final InstantOperatorInfo.Builder iOpInfoBuilder = InstantOperatorInfo.newBuilder(); iOpInfoBuilder.setInstantOperatorType(InstantOperatorTypeEnum.AGGREGATE_WINDOW); <START> final List<ByteBuffer> serializedObjectList = new ArrayList<>(); <END> serializedObjectList.add(ByteBuffer.wrap(SerializationUtils.serialize(aggregateFunc))); iOpInfoBuilder.setObjects(serializedObjectList); iOpInfoBuilder.setKeyIndex(null); return iOpInfoBuilder.build(); }</code><technical_language>object -> function</technical_language>

Target:
protected InstantOperatorInfo getInstantOpInfo() { final InstantOperatorInfo.Builder iOpInfoBuilder = InstantOperatorInfo.newBuilder(); iOpInfoBuilder.setInstantOperatorType(InstantOperatorTypeEnum.AGGREGATE_WINDOW); final List<ByteBuffer> serializedFunctionList = new ArrayList<>(); serializedFunctionList.add(ByteBuffer.wrap(SerializationUtils.serialize(aggregateFunc))); iOpInfoBuilder.setFunctions(serializedFunctionList); iOpInfoBuilder.setKeyIndex(null); return iOpInfoBuilder.build(); }
Source:
<code><START> private void executeProtocolViolationTest(EmbeddedChannel outChannel, EmbeddedChannel inChannel, <END> int testDataLength, WebSocketCloseStatus expectedStatus, String errorMessage) { CorruptedWebSocketFrameException corrupted = null; try { testBinaryWithLen(outChannel, inChannel, testDataLength); } catch (CorruptedWebSocketFrameException e) { corrupted = e; } BinaryWebSocketFrame exceedingFrame = inChannel.readInbound(); Assert.assertNull(exceedingFrame); Assert.assertNotNull(corrupted); Assert.assertEquals(expectedStatus, corrupted.getCloseStatus()); Assert.assertEquals(errorMessage, corrupted.getMessage()); }</code><technical_language>please call inChannel.finish() outChannel.finish() assert return</technical_language>

Target:
private void executeProtocolViolationTest(EmbeddedChannel outChannel, EmbeddedChannel inChannel, int testDataLength, WebSocketCloseStatus expectedStatus, String errorMessage) { CorruptedWebSocketFrameException corrupted = null; try { testBinaryWithLen(outChannel, inChannel, testDataLength); } catch (CorruptedWebSocketFrameException e) { corrupted = e; } BinaryWebSocketFrame exceedingFrame = inChannel.readInbound(); Assert.assertNull(exceedingFrame); Assert.assertNotNull(corrupted); Assert.assertEquals(expectedStatus, corrupted.closeStatus()); Assert.assertEquals(errorMessage, corrupted.getMessage()); }
Source:
<code>public void testListFields() throws Exception { StringMetadataField stringField = newFieldInstance("testListFields"); addFieldToAccount(stringField); ApiResponse result = cloudinary.api().listMetadataFields(); <START> assertNotNull(result); <END> }</code><technical_language>assert rest</technical_language>

Target:
public void testListFields() throws Exception { StringMetadataField stringField = newFieldInstance("testListFields"); addFieldToAccount(stringField); ApiResponse result = cloudinary.api().listMetadataFields(); assertNotNull(result); assertNotNull(result.get("metadata_fields")); assertTrue(((List)result.get("metadata_fields")).size() > 0); }
Source:
<code>void handle(EventEnvelope event) { checkState(isActive(), "Dispatched an event of type `%s` to the non-active subscription with ID `%s`.", <START> event.typeUrl(), subscription.getId().getValue()); <END> detectUpdate(event).ifPresent(this::deliverUpdate); }</code><technical_language>do formatter follow this style of wrapping next chained calls next lines, format cases manually</technical_language>

Target:
void handle(EventEnvelope event) { checkActive(event); detectUpdate(event).ifPresent(this::deliverUpdate); }
Source:
<code>public SamzaSqlRelMessage(List<String> fieldNames, List<Object> fieldValues, SamzaSqlRelMsgMetadata metadata) { <START> Validate.isTrue(fieldNames.size() == fieldValues.size(), "Field Names and values are not of same length."); <END> int keyIndex = fieldNames.indexOf(KEY_NAME); Object key = null; if (keyIndex != -1) { key = fieldValues.get(keyIndex); } this.key = key; this.samzaSqlRelRecord = new SamzaSqlRelRecord(fieldNames, fieldValues); this.samzaSqlRelMsgMetadata = metadata; }</code><technical_language>validate metadata is null ? callers samza sql. So, ok mandate non-null metadata</technical_language>

Target:
public SamzaSqlRelMessage(List<String> fieldNames, List<Object> fieldValues, SamzaSqlRelMsgMetadata metadata) { Validate.isTrue(fieldNames.size() == fieldValues.size(), "Field Names and values are not of same length."); Validate.notNull(metadata, "Message metadata is NULL"); int keyIndex = fieldNames.indexOf(KEY_NAME); Object key = null; if (keyIndex != -1) { key = fieldValues.get(keyIndex); } this.key = key; this.samzaSqlRelRecord = new SamzaSqlRelRecord(fieldNames, fieldValues); this.samzaSqlRelMsgMetadata = metadata; }
Source:
<code>private Map<String, Object> generateHeldLocks(ConcurrentMap<HeldLocksToken, LockServiceImpl.HeldLocks<HeldLocksToken>> heldLocksTokenMap) { List<Map<String, Object>> mappedLockListGroupedByToken = heldLocksTokenMap.entrySet().stream() .map(heldLocksTokenMapEntry -> getDescriptorToTokenMap(heldLocksTokenMapEntry.getKey(), heldLocksTokenMapEntry.getValue())) .collect(Collectors.toList()); Map<String, Object> mappedLocksToToken = Maps.newConcurrentMap(); <START> mappedLockListGroupedByToken.forEach(mappedLocksToToken::putAll); <END> return nameObjectForYamlConvertion(mappedLocksToToken, HELD_LOCKS_TITLE); }</code><technical_language>combine lines mapping collapses map want. need a concurrentmap here</technical_language>

Target:
private Map<String, Object> generateHeldLocks(ConcurrentMap<HeldLocksToken, LockServiceImpl.HeldLocks<HeldLocksToken>> heldLocksTokenMap) { Map<String, Object> mappedLocksToToken = Maps.newHashMap(); heldLocksTokenMap.forEach((token, locks) -> { mappedLocksToToken.putAll(getDescriptorToTokenMap(token, locks)); }); return nameObjectForYamlConvertion(HELD_LOCKS_TITLE, mappedLocksToToken); }
Source:
<code>public static boolean isHeaderUseHeuristics() { return Utilities.stringToBoolean( <START> getPropertyValue(GrobidPropertyKeys.PROP_HEADER_USE_HEURISTICS, "false") <END> ); }</code><technical_language>I put true default</technical_language>

Target:
public static boolean isHeaderUseHeuristics() { return Utilities.stringToBoolean( getPropertyValue(GrobidPropertyKeys.PROP_HEADER_USE_HEURISTICS, "true") ); }
Source:
<code>public void testRoomAvailabilityCanBeEnabledOrDisabledWithEnableDisableButton() { HomeAdminPage homeAdminPage = new HomeAdminPage(); <START> RoomsPage confRoomsPage = homeAdminPage.clickConferenceRoomsLink(); <END> confRoomsPage.enableDisableIcon(roomName); Assert.assertTrue(confRoomsPage.stateEnableDisableBtn(roomName)); confRoomsPage.enableDisableIcon(roomName); Assert.assertTrue(confRoomsPage.stateEnableDisableBtn(roomName)); }</code><technical_language>change confRoomsPage roomsPage</technical_language>

Target:
public void testRoomAvailabilityCanBeEnabledOrDisabledWithEnableDisableButton() { HomeAdminPage homeAdminPage = new HomeAdminPage(); RoomsPage roomsPage = homeAdminPage.clickConferenceRoomsLink(); roomsPage.enableDisableIcon(roomName); Assert.assertTrue(roomsPage.isRoomDisabled(roomName)); roomsPage.enableDisableIcon(roomName); Assert.assertTrue(roomsPage.isRoomEnabled(roomName)); }
Source:
<code>public static double logProbToPhredScore(final double rawLogProb, final boolean complement) { if (rawLogProb > MAX_LOG_PROB) { throw new GATKException( <START> String.format("numerical instability problem: the log-probability is too large: %g > 0.0 " + <END> "(with maximum tolerance %g)", rawLogProb, MAX_LOG_PROB)); } final double logProbEqOrLessThan0 = Math.min(0.0, rawLogProb); final double finalLogProb = complement ? logProbComplement(logProbEqOrLessThan0) : logProbEqOrLessThan0; final double absoluteQualScore = QualityUtils.phredScaleLog10ErrorRate(finalLogProb * INV_LN_10); final double exactValue = Math.min(MAX_QUAL_SCORE, absoluteQualScore); return roundPhred(exactValue); }</code><technical_language>This start a new line</technical_language>

Target:
public static double logProbToPhredScore(final double rawLogProb, final boolean complement) { if (rawLogProb > MAX_LOG_PROB) { throw new GATKException(String.format("numerical instability problem: the log-probability is too" + " large: %g > 0.0 (with maximum tolerance %g)", rawLogProb, MAX_LOG_PROB)); } final double logProbEqOrLessThan0 = Math.min(0.0, rawLogProb); final double finalLogProb = complement ? logProbComplement(logProbEqOrLessThan0) : logProbEqOrLessThan0; final double absoluteQualScore = QualityUtils.phredScaleLog10ErrorRate(finalLogProb * INV_LN_10); final double exactValue = Math.min(MAX_QUAL_SCORE, absoluteQualScore); return roundPhred(exactValue); }
Source:
<code>public void uploadFailRatingDialogNotShowing() { onView(withId(R.id.next)) .perform(click()); onView(withText(R.string.next)) <START> .perform(click()); <END> InstrumentationRegistry.getInstrumentation().runOnMainSync(() -> { activityTestRule.getActivity().showUploadDialog(); activityTestRule.getActivity().onReceiveResult(0, bundle); }); onView(withText(R.string.rating_dialog_rate_now)) .check(doesNotExist()); }</code><technical_language>I suspect set number of uploaded projects 1, rating dialog shown in case sharedPreferences.edit() .putInt(NUMBER_OF_UPLOADED_PROJECTS, 1) .commit();</technical_language>

Target:
public void uploadFailRatingDialogNotShowing() { sharedPreferences.edit() .putInt(NUMBER_OF_UPLOADED_PROJECTS, 1) .commit(); onView(withId(R.id.next)) .perform(click()); onView(withText(R.string.next)) .perform(click()); InstrumentationRegistry.getInstrumentation().runOnMainSync(() -> { activityTestRule.getActivity().showUploadDialog(); activityTestRule.getActivity().onReceiveResult(0, bundle); }); onView(withText(R.string.rating_dialog_rate_now)) .check(doesNotExist()); }
Source:
<code>public void launchDaemon() { LOG.info("Starting supervisor for storm version '{}'.", VersionInfo.getVersion()); try { Map<String, Object> conf = getConf(); if (ConfigUtils.isLocalMode(conf)) { throw new IllegalArgumentException("Cannot start server in local mode!"); } launch(); Utils.addShutdownHookWithForceKillIn1Sec(this::close); <START> registerGauge(name(SUPERVISOR, "num-slots-used-gauge"), () -> SupervisorUtils.supervisorWorkerIds(conf).size()); <END> StormMetricsRegistry.startMetricsReporters(conf); launchSupervisorThriftServer(conf); } catch (Exception e) { LOG.error("Failed to start supervisor\n", e); System.exit(1); } }</code><technical_language>This is personal preference, I static method imports tend code readable. fine static import is well-known assertThat in a test, registerGauge show this method exists this class</technical_language>

Target:
public void launchDaemon() { LOG.info("Starting supervisor for storm version '{}'.", VersionInfo.getVersion()); try { Map<String, Object> conf = getConf(); if (ConfigUtils.isLocalMode(conf)) { throw new IllegalArgumentException("Cannot start server in local mode!"); } launch(); Utils.addShutdownHookWithForceKillIn1Sec(this::close); StormMetricsRegistry.registerGauge("supervisor:num-slots-used-gauge", () -> SupervisorUtils.supervisorWorkerIds(conf).size()); StormMetricsRegistry.startMetricsReporters(conf); launchSupervisorThriftServer(conf); } catch (Exception e) { LOG.error("Failed to start supervisor\n", e); System.exit(1); } }
Source:
<code>protected <T> void doExecute(SelectContext<T> context) { Query query = context.getRawQuery(); <START> if (query == null) { <END> return; } ResourceEntity<T> resourceEntity = new ResourceEntity<>(metadataService.getLrEntity(context.getType())); sizeConstructor.construct(resourceEntity, query.getStart(), query.getLimit()); includeConstructor.construct(resourceEntity, query.getInclude()); excludeConstructor.construct(resourceEntity, query.getExclude()); sortConstructor.construct(resourceEntity, query.getSort()); mapByConstructor.construct(resourceEntity, query.getMapBy()); expConstructor.construct(resourceEntity, query.getCayenneExp()); context.setEntity(resourceEntity); }</code><technical_language>If "query" is null, init ResourceEntity. stage do job</technical_language>

Target:
protected <T> void doExecute(SelectContext<T> context) { ResourceEntity<T> resourceEntity = new ResourceEntity<>(metadataService.getLrEntity(context.getType())); Query query = context.getRawQuery(); if (query != null) { sizeConstructor.construct(resourceEntity, query.getStart(), query.getLimit()); includeConstructor.construct(resourceEntity, query.getInclude()); excludeConstructor.construct(resourceEntity, query.getExclude()); sortConstructor.construct(resourceEntity, query.getSort()); mapByConstructor.construct(resourceEntity, query.getMapBy()); expConstructor.construct(resourceEntity, query.getCayenneExp()); } context.setEntity(resourceEntity); }
Source:
<code>public void testListEntriesOld() throws IOException, ApiException { String[] commandArray = new String[] { "--config", TestUtility.getConfigFileLocation(true), "tool", "list" }; <START> ImmutablePair<String, String> stringStringImmutablePair = runOldDockstoreClient(dockstore, commandArray); <END> }</code><technical_language>tests assert output</technical_language>

Target:
public void testListEntriesOld() throws IOException, ApiException { String[] commandArray = new String[] { "--config", TestUtility.getConfigFileLocation(true), "tool", "list" }; ImmutablePair<String, String> stringStringImmutablePair = runOldDockstoreClient(dockstore, commandArray); checkToolList(stringStringImmutablePair.getLeft()); }
Source:
<code>public Mono<HttpResponse> send(HttpRequest request, Context context) { <START> boolean eagerlyReadResponse = context.getData("eagerly-read-response") .map(data -> Boolean.parseBoolean(data.toString())) .orElse(false); <END> return toJdkHttpRequest(request) .flatMap(jdkRequest -> Mono.fromCompletionStage(jdkHttpClient.sendAsync(jdkRequest, ofPublisher())) .flatMap(innerResponse -> { if (eagerlyReadResponse) { int statusCode = innerResponse.statusCode(); HttpHeaders headers = fromJdkHttpHeaders(innerResponse.headers()); return FluxUtil.collectBytesInByteBufferStream(JdkFlowAdapter .flowPublisherToFlux(innerResponse.body()) .flatMapSequential(Flux::fromIterable)) .map(bytes -> new BufferedJdkHttpResponse(request, statusCode, headers, bytes)); } else { return Mono.just(new JdkHttpResponse(request, innerResponse)); } })); }</code><technical_language>This unfortunate perf regression. stored a Boolean in Context</technical_language>

Target:
public Mono<HttpResponse> send(HttpRequest request, Context context) { boolean eagerlyReadResponse = (boolean) context.getData(EAGERLY_READ_RESPONSE_CONTEXT_KEY).orElse(false); return toJdkHttpRequest(request) .flatMap(jdkRequest -> Mono.fromCompletionStage(jdkHttpClient.sendAsync(jdkRequest, ofPublisher())) .flatMap(innerResponse -> { if (eagerlyReadResponse) { int statusCode = innerResponse.statusCode(); HttpHeaders headers = fromJdkHttpHeaders(innerResponse.headers()); return FluxUtil.collectBytesInByteBufferStream(JdkFlowAdapter .flowPublisherToFlux(innerResponse.body()) .flatMapSequential(Flux::fromIterable)) .map(bytes -> new BufferedJdkHttpResponse(request, statusCode, headers, bytes)); } else { return Mono.just(new JdkHttpResponse(request, innerResponse)); } })); }
Source:
<code>public void testInformationSchemaUppercaseName() { assertQuery( <START> "SELECT table_name FROM information_schema.tables WHERE table_catalog = 'LOCAL' AND table_schema = 'TINY' AND table_name = 'ORDERS'", <END> "SELECT '' WHERE false"); }</code><technical_language>do separate queries, for filter</technical_language>

Target:
public void testInformationSchemaUppercaseName() { assertQuery( "SELECT table_name FROM information_schema.tables WHERE table_catalog = 'LOCAL'", "SELECT '' WHERE false"); assertQuery( "SELECT table_name FROM information_schema.tables WHERE table_schema = 'TINY'", "SELECT '' WHERE false"); assertQuery( "SELECT table_name FROM information_schema.tables WHERE table_name = 'ORDERS'", "SELECT '' WHERE false"); }
Source:
<code>public void initVerifier(SessionContext session, PublicKey key) throws Exception { if (!(key instanceof SecurityKeyPublicKey)) { throw new IllegalArgumentException("Only instances of SecurityKeyPublicKey can be used"); } this.publicKey = (SecurityKeyPublicKey) key; <START> this.challengeDigest = MessageDigest.getInstance("SHA-256"); <END> }</code><technical_language>Please SecurityUtils.getMessageDigest</technical_language>

Target:
public void initVerifier(SessionContext session, PublicKey key) throws GeneralSecurityException { if (!(key instanceof SecurityKeyPublicKey)) { throw new IllegalArgumentException("Only instances of SecurityKeyPublicKey can be used"); } this.publicKey = (SecurityKeyPublicKey) key; this.challengeDigest = SecurityUtils.getMessageDigest("SHA-256"); }
Source:
<code>public Flux<ServiceMessage> invokeBidirectional(Publisher<ServiceMessage> publisher) { return Flux.from(publisher) .switchOnFirst( (first, messages) -> { if (first.hasValue()) { return authenticate(first.get()) .flatMapMany( principal -> messages .map(this::toRequest) .transform(request -> invoke(request, principal))) .map(this::toResponse); } else { <START> return messages <END> .map(this::toRequest) .transform(request -> invoke(request, null)) .map(this::toResponse); } }) .onErrorResume(throwable -> Flux.just(errorMapper.toMessage(throwable))); }</code><technical_language>this else block is possible</technical_language>

Target:
public Flux<ServiceMessage> invokeBidirectional(Publisher<ServiceMessage> publisher) { return Flux.from(publisher) .switchOnFirst( (first, messages) -> authenticate(first.get()) .flatMapMany( principal -> messages .map(this::toRequest) .transform(request -> invoke(request, principal)))) .map(this::toResponse) .onErrorResume(throwable -> Flux.just(errorMapper.toMessage(throwable))); }
Source:
<code>private void invokeStartShellDialog( ConsoleProcess.TerminalType terminalType, boolean isModalDialog, int cols, int rows, String terminalHandle, String terminalTitle, int sequence, ServerRequestCallback<ConsoleProcess> requestCallback) { JSONArray params = new JSONArray(); params.set(0, new JSONString(terminalType.toString())); params.set(1, new JSONNumber(cols)); params.set(2, new JSONNumber(rows)); params.set(3, JSONBoolean.getInstance(isModalDialog)); <START> params.set(4, new JSONString(terminalHandle == null ? "" : terminalHandle)); <END> params.set(5, new JSONString(terminalTitle == null ? "" : terminalTitle)); params.set(6, new JSONNumber(sequence)); sendRequest(RPC_SCOPE, START_SHELL_DIALOG, params, new ConsoleProcessCallbackAdapter(requestCallback)); }</code><technical_language>idiom StringUtil.notNull for this</technical_language>

Target:
private void invokeStartShellDialog( ConsoleProcess.TerminalType terminalType, boolean isModalDialog, int cols, int rows, String terminalHandle, String terminalTitle, int sequence, ServerRequestCallback<ConsoleProcess> requestCallback) { JSONArray params = new JSONArray(); params.set(0, new JSONString(terminalType.toString())); params.set(1, new JSONNumber(cols)); params.set(2, new JSONNumber(rows)); params.set(3, JSONBoolean.getInstance(isModalDialog)); params.set(4, new JSONString(StringUtil.notNull(terminalHandle))); params.set(5, new JSONString(StringUtil.notNull(terminalTitle))); params.set(6, new JSONNumber(sequence)); sendRequest(RPC_SCOPE, START_SHELL_DIALOG, params, new ConsoleProcessCallbackAdapter(requestCallback)); }
Source:
<code>protected boolean isInterfaceSupportedForPlugUnPlug(Disk disk) { boolean retVal = true; List<String> diskHotpluggableInterfaces = osRepository.getDiskHotpluggableInterfaces(getVm().getOs(), getVm().getVdsGroupCompatibilityVersion()); if (diskHotpluggableInterfaces == null || diskHotpluggableInterfaces.isEmpty()) { <START> retVal = false; <END> } if (retVal) { Collection<DiskInterface> diskInterfaces = new HashSet<DiskInterface>(); for (String diskHotpluggableInterface : diskHotpluggableInterfaces) { diskInterfaces.add(DiskInterface.valueOf(diskHotpluggableInterface)); } if (!diskInterfaces.contains(disk.getDiskInterface())) { retVal = false; } } if (!retVal) { addCanDoActionMessage(VdcBllMessages.ACTION_TYPE_FAILED_GUEST_OS_VERSION_IS_NOT_SUPPORTED); } return retVal; }</code><technical_language>Please, CollectionUtils.isEmpty() validates nullness emptyness. example in CloudInitHandler</technical_language>

Target:
protected boolean isInterfaceSupportedForPlugUnPlug(Disk disk) { List<String> diskHotpluggableInterfaces = osRepository.getDiskHotpluggableInterfaces(getVm().getOs(), getVm().getVdsGroupCompatibilityVersion()); if (CollectionUtils.isEmpty(diskHotpluggableInterfaces)) { return failCanDoAction(VdcBllMessages.ACTION_TYPE_FAILED_GUEST_OS_VERSION_IS_NOT_SUPPORTED); } Collection<DiskInterface> diskInterfaces = new HashSet<DiskInterface>(); for (String diskHotpluggableInterface : diskHotpluggableInterfaces) { diskInterfaces.add(DiskInterface.valueOf(diskHotpluggableInterface)); } if (!diskInterfaces.contains(disk.getDiskInterface())) { return failCanDoAction(VdcBllMessages.ACTION_TYPE_FAILED_GUEST_OS_VERSION_IS_NOT_SUPPORTED); } return true; }
Source:
<code>public long timestampForDate(String date) { long timeStamp = 0; SimpleDateFormat sdf = new SimpleDateFormat(dateFormat); try { timeStamp = sdf.parse(date).getTime(); if (!timestampHasMilliseconds) { timeStamp = timeStamp / 1000L; } } catch (ParseException e) { <START> e.printStackTrace(); <END> } return timeStamp; }</code><technical_language>Instead of printing a stack trace standard error, throw a SlimFixtureException message date parsed e cause</technical_language>

Target:
public long timestampForDate(String date) { Date parsedDate = parseDate(date); return timestampForDate(parsedDate); }
Source:
<code>protected String getJVMJobTypeParameters() { String args = ""; <START> String typeUserGlobalJVMArgs = getJobProps().getString(HadoopJobUtils.JOBTYPE_GLOBAL_JVM_ARGS, null); <END> if (typeUserGlobalJVMArgs != null) { args += " " + typeUserGlobalJVMArgs; } String typeSysGlobalJVMArgs = getSysProps().getString(HadoopJobUtils.JOBTYPE_GLOBAL_JVM_ARGS, null); if (typeSysGlobalJVMArgs != null) { args += " " + typeSysGlobalJVMArgs; } String typeUserJVMArgs = getJobProps().getString(HadoopJobUtils.JOBTYPE_JVM_ARGS, null); if (typeUserJVMArgs != null) { args += " " + typeUserJVMArgs; } String typeSysJVMArgs = getSysProps().getString(HadoopJobUtils.JOBTYPE_JVM_ARGS, null); if (typeSysJVMArgs != null) { args += " " + typeSysJVMArgs; } return args; }</code><technical_language>jobType instead of type prefix variable names</technical_language>

Target:
protected String getJVMJobTypeParameters() { String args = ""; String jobTypeUserGlobalJVMArgs = getJobProps().getString(HadoopJobUtils.JOBTYPE_GLOBAL_JVM_ARGS, null); if (jobTypeUserGlobalJVMArgs != null) { args += " " + jobTypeUserGlobalJVMArgs; } String jobTypeSysGlobalJVMArgs = getSysProps().getString(HadoopJobUtils.JOBTYPE_GLOBAL_JVM_ARGS, null); if (jobTypeSysGlobalJVMArgs != null) { args += " " + jobTypeSysGlobalJVMArgs; } String jobTypeUserJVMArgs = getJobProps().getString(HadoopJobUtils.JOBTYPE_JVM_ARGS, null); if (jobTypeUserJVMArgs != null) { args += " " + jobTypeUserJVMArgs; } String jobTypeSysJVMArgs = getSysProps().getString(HadoopJobUtils.JOBTYPE_JVM_ARGS, null); if (jobTypeSysJVMArgs != null) { args += " " + jobTypeSysJVMArgs; } return args; }
Source:
<code>private TerminationTreeItemContent createTerminationTreeItemContent( TerminationConfigOption terminationConfigOption, TreeItem treeItem, TerminationConfigModel terminationConfigModel ) { <START> TerminationTreeItemContent terminationTreeItemContent = IOC.getBeanManager().lookupBean( TerminationTreeItemContent.class ).newInstance(); <END> terminationTreeItemContent.setTerminationConfigForm( this ); terminationTreeItemContent.setTerminationConfigOption( terminationConfigOption ); terminationTreeItemContent.setTreeItem( treeItem ); terminationTreeItemContent.setModel( terminationConfigModel ); treeItem.setUserObject( terminationTreeItemContent ); treeItem.setWidget( terminationTreeItemContent.asWidget() ); treeItem.setState( true ); return terminationTreeItemContent; }</code><technical_language>store reference terminationTreeItemContent (all instances create) destroy IOC.getBeanManager().destroy( o ) risk a memory leak.. IIRC @ederign @mbarkley annotation garbage collection of manually instantiated beans easier too.. need ask use</technical_language>

Target:
private TerminationTreeItemContent createTerminationTreeItemContent( TerminationConfigOption terminationConfigOption, TreeItem treeItem, TerminationConfigModel terminationConfigModel ) { TerminationTreeItemContent terminationTreeItemContent = beanManager.lookupBean( TerminationTreeItemContent.class ).newInstance(); terminationTreeItemContent.setTerminationConfigForm( this ); terminationTreeItemContent.setTerminationConfigOption( terminationConfigOption ); terminationTreeItemContent.setTreeItem( treeItem ); terminationTreeItemContent.setModel( terminationConfigModel ); treeItem.setUserObject( terminationTreeItemContent ); treeItem.setWidget( ElementWrapperWidget.getWidget( terminationTreeItemContent.getElement() ) ); treeItem.setState( true ); terminationTreeItemContentList.add( terminationTreeItemContent ); return terminationTreeItemContent; }
Source:
<code>public StatemachineHeader get() { <START> StatemachineHeader source = new StatemachineHeader(); <END> injector.injectMembers(source); GeneratorEntry entry = injector.getInstance(GeneratorEntry.class); if (isEventDriven(entry)) { source.getContentProviders().add(injector.getInstance(EventDrivenStatemachineHeaderFragment.class)); } source.getContentProviders().add(injector.getInstance(StatemachineHeaderContentFragment.class)); return source; }</code><technical_language>injector.getInstance(StatemachineHeader.class) here? if 'new' is binding overriding work</technical_language>

Target:
public StatemachineHeader get() { StatemachineHeader header = new StatemachineHeader(); injector.injectMembers(header); if (isEventDriven()) { header.getContentProviders().add(injector.getInstance(EventDrivenStatemachineHeaderFragment.class)); } header.getContentProviders().add(injector.getInstance(StatemachineHeaderContentFragment.class)); return header; }
Source:
<code>public List<User> getUsers(String name, List<Role> roles, boolean includeRetired, Integer start, Integer length) throws APIException { if (name != null) { name = StringUtils.replace(name,", ", " "); } if (roles == null) { return dao.getUsers(name, new ArrayList<Role>(new HashSet<>()), includeRetired, start, length); <START> } <END> else if(roles.contains(getRole(RoleConstants.AUTHENTICATED))){ return dao.getUsers(name, new ArrayList<>(), includeRetired, start, length); } else{ Set<Role> allRoles = new HashSet<>(); for (Role r : roles) { allRoles.add(r); allRoles.addAll(r.getAllChildRoles()); } return dao.getUsers(name, new ArrayList<>(allRoles), includeRetired, start, length); } }</code><technical_language>@dilekamadushan this block touched</technical_language>

Target:
public List<User> getUsers(String name, List<Role> roles, boolean includeRetired, Integer start, Integer length) throws APIException { if (name != null) { name = StringUtils.replace(name,", ", " "); } if (roles == null) { roles = new ArrayList<>(); } Role authRole = getRole(RoleConstants.AUTHENTICATED); if (roles.contains(authRole)) { return dao.getUsers(name, new ArrayList<>(), includeRetired, start, length); } Set<Role> allRoles = new HashSet<>(); for (Role r : roles) { allRoles.add(r); allRoles.addAll(r.getAllChildRoles()); } return dao.getUsers(name, new ArrayList<>(allRoles), includeRetired, start, length); }
Source:
<code>private void searchTest(String searchFor, int expectedResults, String ... expectedIds) { PoolFilterBuilder filters = new PoolFilterBuilder(); filters.addContainsTextFilter(searchFor); Page<List<Pool>> page = poolCurator.listAvailableEntitlementPools( null, owner, null, null, false, filters, req, false); List<Pool> results = page.getPageData(); assertEquals(expectedResults, results.size()); for (String id : expectedIds) { boolean found = false; for (Pool p : results) { if (p.getId().equals(id)) { found = true; <START> continue; <END> } } assertTrue("Missing expected pool: " + id, found); } }</code><technical_language>able break; match Id. need check rest</technical_language>

Target:
private void searchTest(String searchFor, int expectedResults, String ... expectedIds) { PoolFilterBuilder filters = new PoolFilterBuilder(); filters.addContainsTextFilter(searchFor); Page<List<Pool>> page = poolCurator.listAvailableEntitlementPools( null, owner, null, null, false, filters, req, false); List<Pool> results = page.getPageData(); assertEquals(expectedResults, results.size()); for (String id : expectedIds) { boolean found = false; for (Pool p : results) { if (p.getId().equals(id)) { found = true; break; } } assertTrue("Missing expected pool: " + id, found); } }
Source:
<code>private void performEMIteration() { final ExpectationStep expectationStep = new ExpectationStep(); relearnHiddenStateValues(expectationStep); relearnWeights(expectationStep); relearnMemoryLength(expectationStep); attemptBigChangeInMemoryLength(); relearnAdditionalParameters(expectationStep); pruneUnusedComponents(); relearnConcentration(); <START> } <END></code><technical_language>I some of this output useful---at number of states is nice. set logger level debug if feel is verbose. I outputting number of segments iteration in Segmenters useful</technical_language>

Target:
private void performEMIteration() { final ExpectationStep expectationStep = new ExpectationStep(); relearnHiddenStateValues(expectationStep); relearnWeights(expectationStep); reportStatesAndWeights("After M step"); relearnMemoryLength(expectationStep); attemptBigChangeInMemoryLength(); relearnAdditionalParameters(expectationStep); pruneUnusedComponents(); reportStatesAndWeights("After pruning"); relearnConcentration(); }
Source:
<code><START> public void submitCategory() { <END> waitForElementClickableByElement(saveCategory); saveCategory.click(); waitForElementNotVisibleByElement(addCategoryInput); }</code><technical_language>log</technical_language>

Target:
public void submitCategory() { waitForElementClickableByElement(saveCategory); saveCategory.click(); waitForElementNotVisibleByElement(addCategoryInput); PageObjectLogging.log("submitCategory", "submit category clicked", true); }
Source:
<code>public int read(byte[] b, int off, int len) throws IOException { int cnt = 0; while (0 < len) { final InputStream in = head(); final int n = in.read(b, off, len); if (0 < n) { cnt += n; off += n; len -= n; <START> break; <END> } else if (in == EOF) return 0 < cnt ? cnt : -1; else pop(); } return cnt; }</code><technical_language>simplify this code further. cnt > 0 is if this condition is running drop variable altogether some assumptions, return cnt instead of break, change return cnt 156 return 0, change 152 return -1</technical_language>

Target:
public int read(byte[] b, int off, int len) throws IOException { if (len == 0) return 0; for (;;) { final InputStream in = head(); final int n = in.read(b, off, len); if (0 < n) return n; else if (in == EOF) return -1; else pop(); } }
Source:
<code>public void run() { while (isOpen.get()) { boolean allChunksFillComplete = true; <START> Iterator<PutOperation> iter = putOperations.values().iterator(); <END> while (iter.hasNext()) { PutOperation op = iter.next(); if (!op.fillChunks()) { allChunksFillComplete = false; } } if (allChunksFillComplete) { try { Thread.sleep(sleepTimeWhenIdleMs); } catch (InterruptedException e) { logger.info("Caught interrupted exception while sleeping", e); Thread.currentThread().interrupt(); } } } }</code><technical_language>foreach pattern instead of iterator</technical_language>

Target:
public void run() { try { while (isOpen.get()) { boolean allChunksFilled = true; Iterator<PutOperation> iter = putOperations.iterator(); while (iter.hasNext()) { PutOperation op = iter.next(); if (!op.isChunkFillComplete()) { op.fillChunks(); allChunksFilled = false; } } if (allChunksFilled) { Thread.sleep(sleepTimeWhenIdleMs); } } } catch (Exception e) { logger.error("Aborting, as ChunkFillerThread received an exception: ", e); } finally { isOpen.set(false); } }
Source:
<code>Issue create( @NotNull(message = "issue title is never NULL") String title, @NotNull(message = "issue body is never NULL") String body) throws IOException; @NotNull(message = "iterable is never NULL") Iterable<Issue> iterate(@NotNull(message = "map of params can't be NULL") Map<String, String> params); @NotNull(message = "Iterable of issues is never NULL") Iterable<Issue> search( @NotNull(message = "Sort field can't be NULL") Sort sort, @NotNull(message = "Sort direction can't be NULL") Search.Order direction, @NotNull(message = "Search qualifiers can't be NULL") EnumMap<Qualifier, String> qualifiers) throws IOException; enum Qualifier { MILESTONE("milestone"), STATE("state"), ASSIGNEE("assignee"), CREATOR("creator"), MENTIONED("mentioned"), LABELS("labels"), SINCE("since"); private final transient String qualifier; Qualifier(final String key) { this.qualifier = key; } <START> public String getQualifier() { <END> return this.qualifier; } }</code><technical_language>avoid of getters / setters, rename this method (and field well) [here](<LINK_0></technical_language>

Target:
Issue create( @NotNull(message = "issue title is never NULL") String title, @NotNull(message = "issue body is never NULL") String body) throws IOException; @NotNull(message = "iterable is never NULL") Iterable<Issue> iterate(@NotNull(message = "map of params can't be NULL") Map<String, String> params); @NotNull(message = "Iterable of issues is never NULL") Iterable<Issue> search( @NotNull(message = "Sort field can't be NULL") Sort sort, @NotNull(message = "Sort direction can't be NULL") Search.Order direction, @NotNull(message = "Search qualifiers can't be NULL") EnumMap<Qualifier, String> qualifiers) throws IOException; enum Qualifier implements StringEnum { MILESTONE("milestone"), STATE("state"), ASSIGNEE("assignee"), CREATOR("creator"), MENTIONED("mentioned"), LABELS("labels"), SINCE("since"); private final transient String qualifier; Qualifier(final String key) { this.qualifier = key; } @Override @NotNull(message = "identifier string is never NULL") public String identifier() { return this.qualifier; } }
Source:
<code>public static Collection Collection(Context context, String path, boolean server, boolean log) { assert path.endsWith(".anki2"); Hooks.getInstance(context); SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context.getApplicationContext()); <START> if (prefs.getBoolean("convertFenText", false)) { <END> ChessFilter.enable(); } File dbFile = new File(path); boolean create = !dbFile.exists(); DB db = new DB(path); try { int ver; if (create) { ver = _createDB(db); } else { ver = _upgradeSchema(db); } db.execute("PRAGMA temp_store = memory"); Collection col = new Collection(context, db, path, server, log); if (ver < Consts.SCHEMA_VERSION) { _upgrade(col, ver); } else if (ver > Consts.SCHEMA_VERSION) { throw new RuntimeException("This file requires a newer version of Anki."); } else if (create) { for (int i = StdModels.stdModels.length-1; i>=0; i--) { StdModels.stdModels[i].add(col); } col.save(); } return col; } catch (Exception e) { Timber.e(e, "Error opening collection; closing database"); db.close(); throw e; } }</code><technical_language>mentioned in statistics PR, I feel a static factory static instance state a option</technical_language>

Target:
public static Collection Collection(Context context, String path, boolean server, boolean log) { assert path.endsWith(".anki2"); Hooks.getInstance(context); File dbFile = new File(path); boolean create = !dbFile.exists(); DB db = new DB(path); try { int ver; if (create) { ver = _createDB(db); } else { ver = _upgradeSchema(db); } db.execute("PRAGMA temp_store = memory"); Collection col = new Collection(context, db, path, server, log); if (ver < Consts.SCHEMA_VERSION) { _upgrade(col, ver); } else if (ver > Consts.SCHEMA_VERSION) { throw new RuntimeException("This file requires a newer version of Anki."); } else if (create) { for (int i = StdModels.stdModels.length-1; i>=0; i--) { StdModels.stdModels[i].add(col); } col.save(); } return col; } catch (Exception e) { Timber.e(e, "Error opening collection; closing database"); db.close(); throw e; } }
Source:
<code>public PlanetConfigs(HullConfigManager hullConfigs, GameColors cols, ItemManager itemManager) { allConfigs = new HashMap<>(); easy = new ArrayList<>(); medium = new ArrayList<>(); hard = new ArrayList<>(); Set<ResourceUrn> planetJsonConfigs = Assets.getAssetHelper().list(Json.class, "[a-zA-Z0-9]*:planetsConfig"); for (ResourceUrn planetConfigJson : planetJsonConfigs) { <START> Assets.cacheLists(); <END> Json json = Assets.getJson(planetConfigJson.toString()); JsonValue rootNode = json.getJsonValue(); for (JsonValue node : rootNode) { PlanetConfig planetConfig = PlanetConfig.load(node, hullConfigs, cols, itemManager); allConfigs.put(node.name, planetConfig); if (planetConfig.hardOnly) { hard.add(planetConfig); } else if (planetConfig.easyOnly) { easy.add(planetConfig); } else { medium.add(planetConfig); } } json.dispose(); Assets.uncacheLists(); } }</code><technical_language>Actually, remove this line. Yes, I add this, copied existing source - I looked details, caches textures, queried here</technical_language>

Target:
public PlanetConfigs(HullConfigManager hullConfigs, GameColors cols, ItemManager itemManager) { allConfigs = new HashMap<>(); easy = new ArrayList<>(); medium = new ArrayList<>(); hard = new ArrayList<>(); Set<ResourceUrn> planetJsonConfigs = Assets.getAssetHelper().list(Json.class, "[a-zA-Z0-9]*:planetsConfig"); for (ResourceUrn planetConfigJson : planetJsonConfigs) { String moduleName = planetConfigJson.getModuleName().toString(); Json json = Assets.getJson(planetConfigJson.toString()); JsonValue rootNode = json.getJsonValue(); for (JsonValue node : rootNode) { PlanetConfig planetConfig = PlanetConfig.load(node, hullConfigs, cols, itemManager, moduleName); allConfigs.put(node.name, planetConfig); if (planetConfig.hardOnly) { hard.add(planetConfig); } else if (planetConfig.easyOnly) { easy.add(planetConfig); } else { medium.add(planetConfig); } } json.dispose(); } }
Source:
<code>protected void executeCommand() { VDSStatus statusBeforeUpgrade = getVds().getStatus(); if (statusBeforeUpgrade != VDSStatus.Maintenance) { boolean stopGlusterService = false; <START> if (getVds().getClusterSupportsGlusterService()) { <END> boolean returnValue = resourceManager.runVdsCommand(VDSCommandType.GlusterServersList, new VdsIdVDSCommandParametersBase(getVdsId())).getSucceeded(); if (returnValue) { stopGlusterService = true; } } Future<ActionReturnValue> maintenanceCmd = commandCoordinatorUtil.executeAsyncCommand(ActionType.MaintenanceNumberOfVdss, createMaintenanceParams(stopGlusterService), cloneContext()); ActionReturnValue result; try { result = maintenanceCmd.get(); if (!result.getSucceeded()) { propagateFailure(result); return; } } catch (InterruptedException | ExecutionException e) { log.error("Exception", e); return; } } setSucceeded(true); }</code><technical_language>Do need check? pass stopGlusterServices=true leave logic stop ore MaintenanceVdsCommand/HostUpgradeCallback</technical_language>

Target:
protected void executeCommand() { VDSStatus statusBeforeUpgrade = getVds().getStatus(); if (statusBeforeUpgrade != VDSStatus.Maintenance) { Future<ActionReturnValue> maintenanceCmd = commandCoordinatorUtil.executeAsyncCommand(ActionType.MaintenanceNumberOfVdss, createMaintenanceParams(), cloneContext()); ActionReturnValue result; try { result = maintenanceCmd.get(); if (!result.getSucceeded()) { propagateFailure(result); return; } } catch (InterruptedException | ExecutionException e) { log.error("Exception", e); return; } } setSucceeded(true); }
Source:
<code>public ExtendedFileSystem createCachingFileSystem( Configuration factoryConfig, URI factoryUri, ExtendedFileSystem fileSystem, CacheManager cacheManager, boolean cachingEnabled, CacheType cacheType, boolean validationEnabled) throws IOException { if (!cachingEnabled) { return fileSystem; } checkState(cacheType != null); if (cacheType == ALLUXIO) { ExtendedFileSystem cachingFileSystem = new AlluxioCachingFileSystem(fileSystem, factoryUri); cachingFileSystem.initialize(factoryUri, factoryConfig); return cachingFileSystem; } <START> return new FileMergeCachingFileSystem( <END> factoryUri, factoryConfig, cacheManager, fileSystem, validationEnabled); }</code><technical_language>nit: switch statement? handle cacheType explicitly error-prone adding new cacheType. switch (cacheType) { case ALLUXIO: ... case FILE_MERGE: ... default: throw }</technical_language>

Target:
public ExtendedFileSystem createCachingFileSystem( Configuration factoryConfig, URI factoryUri, ExtendedFileSystem fileSystem, CacheManager cacheManager, boolean cachingEnabled, CacheType cacheType, boolean validationEnabled) throws IOException { if (!cachingEnabled) { return fileSystem; } checkState(cacheType != null); switch (cacheType) { case FILE_MERGE: return new FileMergeCachingFileSystem( factoryUri, factoryConfig, cacheManager, fileSystem, validationEnabled); case ALLUXIO: ExtendedFileSystem cachingFileSystem = new AlluxioCachingFileSystem(fileSystem, factoryUri); cachingFileSystem.initialize(factoryUri, factoryConfig); return cachingFileSystem; default: throw new IllegalArgumentException("Invalid CacheType: " + cacheType.name()); } }
Source:
<code>public int upgradeTablePriorities(TransactionController tc) throws Exception { PartitionAdmin admin = SIDriver.driver().getTableFactory().getAdmin(); ArrayList<String> toUpgrade = new ArrayList<>(); Function<TabInfoImpl, Void> addTabInfo = (TabInfoImpl info ) -> { toUpgrade.add( Long.toString(info.getHeapConglomerate()) ); for( int j = 0; j < info.getNumberOfIndexes(); j++ ) toUpgrade.add( Long.toString(info.getIndexConglomerate(j)) ); return null; }; for (int i = 0; i < coreInfo.length; ++i) { assert coreInfo[i] != null; addTabInfo.apply(coreInfo[i]); } for (int i = 0; i < NUM_NONCORE; ++i) { <START> TabInfoImpl ti = getNonCoreTIByNumber(i+NUM_CORE); <END> faultInTabInfo(ti); addTabInfo.apply(ti); } for( String s : HBaseConfiguration.internalTablesArr) { toUpgrade.add(s); } toUpgrade.add("16"); toUpgrade.add(SIConfigurations.CONGLOMERATE_TABLE_NAME); return admin.upgradeTablePrioritiesFromList(toUpgrade); }</code><technical_language>Nitpick: getNonCoreTI(), invokes faultInTabInfo for you</technical_language>

Target:
public int upgradeTablePriorities(TransactionController tc) throws Exception { PartitionAdmin admin = SIDriver.driver().getTableFactory().getAdmin(); ArrayList<String> toUpgrade = new ArrayList<>(); Function<TabInfoImpl, Void> addTabInfo = (TabInfoImpl info ) -> { toUpgrade.add( Long.toString(info.getHeapConglomerate()) ); for( int j = 0; j < info.getNumberOfIndexes(); j++ ) toUpgrade.add( Long.toString(info.getIndexConglomerate(j)) ); return null; }; for (int i = 0; i < coreInfo.length; ++i) { assert coreInfo[i] != null; addTabInfo.apply(coreInfo[i]); } for (int i = 0; i < NUM_NONCORE; ++i) { addTabInfo.apply( getNonCoreTI(i+NUM_CORE) ); } for( String s : HBaseConfiguration.internalTablesArr) { toUpgrade.add(s); } toUpgrade.add("16"); toUpgrade.add(SIConfigurations.CONGLOMERATE_TABLE_NAME); return admin.upgradeTablePrioritiesFromList(toUpgrade); }
Source:
<code>private void waitForActive() throws DependencyException { ConsumerStatus status = null; int retries = maxDescribeStreamConsumerRetries; while (!ConsumerStatus.ACTIVE.equals(status) && retries > 0) { status = describeStreamConsumer().consumerDescription().consumerStatus(); retries--; try { log.info(String.format("Waiting for StreamConsumer %s to have ACTIVE status...", streamConsumerName)); Thread.sleep(retryBackoffMillis); <START> } catch (InterruptedException ie) { <END> log.debug("Sleep interrupted, will immediately retry fetching StreamConsumer status."); } } if (!ConsumerStatus.ACTIVE.equals(status)) { final String message = String.format( "Status of StreamConsumer %s, was not ACTIVE after all retries. Was instead %s.", streamConsumerName, status); log.error(message); throw new IllegalStateException(message); } }</code><technical_language>This thread continue processing interrupted. A behavior stop current processing move on, this thread is blocked. java try { while(!ConsumerStatus.ACTIVE.equals(status) && retries > 0) { ... } } catch (InterruptedException e) { log.debug("Thread interrupted while fetching StreamConsumer status, moving on."); }</technical_language>

Target:
private void waitForActive() throws DependencyException { ConsumerStatus status = null; int retries = maxDescribeStreamConsumerRetries; try { while (!ConsumerStatus.ACTIVE.equals(status) && retries > 0) { status = describeStreamConsumer().consumerDescription().consumerStatus(); retries--; log.info(String.format("Waiting for StreamConsumer %s to have ACTIVE status...", streamConsumerName)); Thread.sleep(retryBackoffMillis); } } catch (InterruptedException ie) { log.debug("Thread was interrupted while fetching StreamConsumer status, moving on."); } if (!ConsumerStatus.ACTIVE.equals(status)) { final String message = String.format( "Status of StreamConsumer %s, was not ACTIVE after all retries. Was instead %s.", streamConsumerName, status); log.error(message); throw new IllegalStateException(message); } }
Source:
<code>public static void registerTags() { registerTag("name", (attribute, object) -> { return new ElementTag(object.getSpawner().getName()); }); registerTag("cooldown", (attribute, object) -> { return new DurationTag(object.getSpawner().getCooldownSeconds()); }); registerTag("mythic_mobs", (attribute, object) -> { ArrayList<MythicMobsMobTag> list = new ArrayList<>(); <START> for (UUID uuid : object.getSpawner().getAssociatedMobs()){ <END> list.add(MythicMobsMobTag.valueOf(uuid.toString())); } return new ListTag(list); }); registerTag("mob_type", (attribute, object) -> { return new ElementTag(object.getSpawner().getTypeName()); }); registerTag("mobs", (attribute, object) -> { ArrayList<EntityTag> list = new ArrayList<>(); for (UUID uuid : object.getSpawner().getAssociatedMobs()){ list.add(new EntityTag(MythicMobsMobTag.valueOf(uuid.toString()).getEntity())); } return new ListTag(list); }); registerTag("location", (attribute, object) -> { AbstractLocation loc = object.getSpawner().getLocation(); return new LocationTag((World) loc.getWorld(), loc.getX(), loc.getY(), loc.getZ()); }); registerTag("group", (attribute, object) -> { return new ElementTag(object.getSpawner().getGroup()); }); }</code><technical_language>Missing a space {</technical_language>

Target:
public static void registerTags() { registerTag("name", (attribute, object) -> { return new ElementTag(object.getSpawner().getName()); }); registerTag("cooldown", (attribute, object) -> { return new DurationTag(object.getSpawner().getCooldownSeconds()); }); registerTag("mythic_mobs", (attribute, object) -> { ListTag list = new ListTag(); for (UUID uuid : object.getSpawner().getAssociatedMobs()) { list.addObject(MythicMobsMobTag.valueOf(uuid.toString())); } return list; }); registerTag("mob_type", (attribute, object) -> { return new ElementTag(object.getSpawner().getTypeName()); }); registerTag("mobs", (attribute, object) -> { ArrayList<EntityTag> list = new ArrayList<>(); for (UUID uuid : object.getSpawner().getAssociatedMobs()) { list.add(new EntityTag(MythicMobsMobTag.valueOf(uuid.toString()).getEntity())); } return new ListTag(list); }); registerTag("location", (attribute, object) -> { AbstractLocation loc = object.getSpawner().getLocation(); return new LocationTag((World) loc.getWorld(), loc.getX(), loc.getY(), loc.getZ()); }); registerTag("group", (attribute, object) -> { return new ElementTag(object.getSpawner().getGroup()); }); }
Source:
<code>public void adsTrackingRejectedForMoat(String[] instantGlobals, List<String> urlPatterns) { networkTrafficInterceptor.startIntercepting(); TrackingOptInModal modal = new TrackingOptInModal(); modal.rejectOptInModal(driver, POLAND, ADS_HOME_PAGE, instantGlobals); <START> modal.verifyTrackingRequestsNotSend(urlPatterns, networkTrafficInterceptor); <END> }</code><technical_language>release-666 MOAT blocked anymore. check this scenario: if user opts-out MOAT requests sent</technical_language>

Target:
public void adsTrackingRejectedForMoat(String[] instantGlobals, List<String> urlPatterns) { networkTrafficInterceptor.startIntercepting(); TrackingOptInModal modal = new TrackingOptInModal(); modal.rejectOptInModal(driver, POLAND, ADS_HIVI_PAGE, instantGlobals); modal.verifyTrackingRequestsSend(urlPatterns, networkTrafficInterceptor); }