auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>public void testNodeDiscoveryRest() { ElasticsearchSchedulerContainer scheduler = getScheduler(); TasksResponse tasksResponse = new TasksResponse(scheduler.getIpAddress(), NODE_COUNT); List<JSONObject> tasks = tasksResponse.getTasks(); ElasticsearchNodesResponse nodesResponse = new ElasticsearchNodesResponse(tasks, NODE_COUNT); assertTrue("Elasticsearch nodes did not discover each other within 5 minutes", nodesResponse.isDiscoverySuccessful()); <START> <END> try (InputStream inputstream = CONFIG.dockerClient.copyFileFromContainerCmd(CLUSTER.getMesosContainer().getContainerId(), "/var/lib/elasticsearch/mesos-elasticsearch").withHostPath("/tmp").exec()) { String contents = IOUtils.toString(inputstream); inputstream.close(); assertTrue(contents.contains("mesos-elasticsearch/nodes")); assertTrue(contents.contains("mesos-elasticsearch/nodes/0")); assertTrue(contents.contains("mesos-elasticsearch/nodes/0/_state")); assertTrue(contents.contains("mesos-elasticsearch/nodes/0/node.lock")); assertTrue(contents.contains("mesos-elasticsearch/nodes/1")); assertTrue(contents.contains("mesos-elasticsearch/nodes/1/_state")); assertTrue(contents.contains("mesos-elasticsearch/nodes/1/node.lock")); assertTrue(contents.contains("mesos-elasticsearch/nodes/2")); assertTrue(contents.contains("mesos-elasticsearch/nodes/2/_state")); assertTrue(contents.contains("mesos-elasticsearch/nodes/2/node.lock")); } catch (IOException e) { LOGGER.error("Could not copy /var/lib/elasticsearch/mesos-elasticsearch from Mesos-Local container"); } }</code><technical_language>1) Is this testing data created _inside_ container? If so, this a seperate test, appropriately named. good plonk discovery test</technical_language>

Target:
public void testNodeDiscoveryRest() { ElasticsearchSchedulerContainer scheduler = getScheduler(); TasksResponse tasksResponse = new TasksResponse(scheduler.getIpAddress(), NODE_COUNT); List<JSONObject> tasks = tasksResponse.getTasks(); ElasticsearchNodesResponse nodesResponse = new ElasticsearchNodesResponse(tasks, NODE_COUNT); assertTrue("Elasticsearch nodes did not discover each other within 5 minutes", nodesResponse.isDiscoverySuccessful()); }
Source:
<code><START> public void setIgnoreErrors(final boolean ignoreErrors) { <END> this.ignoreErrors = ignoreErrors; }</code><technical_language>This package private. So, remove public modifier</technical_language>

Target:
void setIgnoreErrors(final boolean ignoreErrors) { this.ignoreErrors = ignoreErrors; }
Source:
<code><START> public Eh107CacheManager getCacheManager(ConfigSupplier configSupplier, Properties properties) { <END> Eh107CacheManager cacheManager; ConcurrentMap<URI, Eh107CacheManager> byURI; final ClassLoader classLoader = configSupplier.getClassLoader(); final URI uri = configSupplier.getUri(); synchronized (cacheManagers) { byURI = cacheManagers.get(classLoader); if (byURI == null) { byURI = new ConcurrentHashMap<URI, Eh107CacheManager>(); cacheManagers.put(classLoader, byURI); } cacheManager = byURI.get(uri); if (cacheManager == null || cacheManager.isClosed()) { if(cacheManager != null) { byURI.remove(uri, cacheManager); } cacheManager = createCacheManager(uri, configSupplier.getConfiguration(), properties); byURI.put(uri, cacheManager); } } return cacheManager; }</code><technical_language>This public</technical_language>

Target:
Eh107CacheManager getCacheManager(ConfigSupplier configSupplier, Properties properties) { Eh107CacheManager cacheManager; ConcurrentMap<URI, Eh107CacheManager> byURI; final ClassLoader classLoader = configSupplier.getClassLoader(); final URI uri = configSupplier.getUri(); synchronized (cacheManagers) { byURI = cacheManagers.get(classLoader); if (byURI == null) { byURI = new ConcurrentHashMap<URI, Eh107CacheManager>(); cacheManagers.put(classLoader, byURI); } cacheManager = byURI.get(uri); if (cacheManager == null || cacheManager.isClosed()) { if(cacheManager != null) { byURI.remove(uri, cacheManager); } cacheManager = createCacheManager(uri, configSupplier.getConfiguration(), properties); byURI.put(uri, cacheManager); } } return cacheManager; }
Source:
<code>private String getDatabaseTypeWithVersion(String databaseType) { try { if (databaseType != null && databaseType.equals("mysql")) { if (conn != null && (!conn.isClosed())) { DatabaseMetaData metaData = conn.getMetaData(); String databaseProductVersion = metaData.getDatabaseProductVersion(); double versionWithMinorNumber = Double.parseDouble(databaseProductVersion.substring(0, 3)); if (versionWithMinorNumber >= 5.7) { databaseType = databaseType + "-5.7+"; } } } } catch (SQLException | NumberFormatException e) { <START> log.warn("Unable to retrieve version of the database."); <END> } return databaseType; }</code><technical_language>I a good idea swallow SQLException. If throw print entire error trace for some reason, get error message 'e' append warn log</technical_language>

Target:
private String getDatabaseTypeWithVersion(String databaseType) throws SQLException { if (databaseType != null && databaseType.equals("mysql")) { if (conn != null && (!conn.isClosed())) { DatabaseMetaData metaData = conn.getMetaData(); int databaseMajorVersion = metaData.getDatabaseMajorVersion(); int databaseMinorVersion = metaData.getDatabaseMinorVersion(); if (databaseMajorVersion == 5 && databaseMinorVersion >= 7) { databaseType = databaseType + "-5.7+"; } } } return databaseType; }
Source:
<code>public void mercury_recentWikiActivity_anonNavigateToRWAfromMenu() { <START> new MainPage().open(); <END> new TopBar(driver).openNavigation().openRecentWikiActivity(); }</code><technical_language>please restore it, <LINK_0></technical_language>

Target:
public void mercury_recentWikiActivity_anonNavigateToRWAfromMenu() { new MainPage() .open() .getTopBar() .openNavigation() .openRecentWikiActivity(); }
Source:
<code>private void addRecordsToTasks(final ConsumerRecords<byte[], byte[]> records) { for (final TopicPartition partition : records.partitions()) { final StreamTask task = taskManager.activeTask(partition); if (task == null) { if (!isRunning()) { ENDING_SHUTDOWN and don't find the task it implies that it was a newly assigned <START> continue; <END> } log.error( "Unable to locate active task for received-record partition {}. Current tasks: {}", partition, taskManager.toString(">") ); throw new NullPointerException("Task was unexpectedly missing for partition " + partition); } else if (task.isClosed()) { log.info("Stream task is already closed, probably because it got unexpectedly migrated to another thread already. " + "Notifying the thread to trigger a new rebalance immediately.", task.id()); throw new TaskMigratedException(task); } task.addRecords(partition, records.records(partition)); } }</code><technical_language>log this INFO for debugging purposes</technical_language>

Target:
private void addRecordsToTasks(final ConsumerRecords<byte[], byte[]> records) { for (final TopicPartition partition : records.partitions()) { final StreamTask task = taskManager.activeTask(partition); if (task == null) { if (!isRunning()) { ENDING_SHUTDOWN and don't find the task it implies that it was a newly assigned log.info("State already transits to {}, skipping the add records to non-existing task for partition {}", state, partition); continue; } log.error( "Unable to locate active task for received-record partition {}. Current tasks: {}", partition, taskManager.toString(">") ); throw new NullPointerException("Task was unexpectedly missing for partition " + partition); } else if (task.isClosed()) { log.info("Stream task is already closed, probably because it got unexpectedly migrated to another thread already. " + "Notifying the thread to trigger a new rebalance immediately.", task.id()); throw new TaskMigratedException(task); } task.addRecords(partition, records.records(partition)); } }
Source:
<code>private void checkFilesAccessibility(File bundledPlugins, File externalPlugins) { try { if (!bundledPlugins.canRead() || !externalPlugins.canRead()) { LOG.error("Could not read plugins." + <START> "Please check access rights on files in external and bundled folder."); <END> throw new FileAccessRightsCheckException("Could not read plugins. " + "Please check access rights in external and bundled plugin folder."); } } catch (SecurityException se) { throw new RuntimeException(String.format("SecurityException occurred" + " while checking file access rights.", se.getStackTrace())); } }</code><technical_language>is ok for lines longer have. Feel free declare this string a single line - LOG.error("Could read plugins. Please check access rights files in external bundled folder."); A nice improvement print locations of folders :)</technical_language>

Target:
private void checkFilesAccessibility(File bundledPlugins, File externalPlugins) { boolean bundled = bundledPlugins.canRead(); boolean external = externalPlugins.canRead(); if (!bundled || !external) { String folder = bundled ? externalPlugins.getAbsolutePath() : bundledPlugins.getAbsolutePath(); LOG.error(String.format("Could not read plugins." + "Please check access rights on files in folder: %s.", folder)); throw new FileAccessRightsCheckException(String.format("Could not read plugins. Please check access rights in folder: %s", folder)); } }
Source:
<code>public static List<TieredBlock> getConsumableInArrearTieredBlocks(final Usage usage, final String unitType) { Preconditions.checkArgument(usage.getBillingMode() == BillingMode.IN_ARREAR && usage.getUsageType() == UsageType.CONSUMABLE); Preconditions.checkArgument(usage.getTiers().length > 0); final List<TieredBlock> result = Lists.newLinkedList(); for (Tier tier : usage.getTiers()) { boolean found = false; for (TieredBlock tierBlock : tier.getTieredBlocks()) { if (tierBlock.getUnit().getName().equals(unitType)) { result.add(tierBlock); found = true; break; } } <START> Preconditions.checkState(found, String.format("Catalog issue in usage section '%s': Missing tierBlock definition for unit '%s'", usage.getName(), unitType)); <END> } return result; }</code><technical_language>Nit: need String.format, signature: /** * Ensures truth of expression involving state of calling instance, * involving parameters calling method. * * @param expression a boolean expression * @param errorMessageTemplate a template for exception message check fail. * message is formed replacing {@code %s} placeholder in template * argument. matched position - {@code %s} {@code * errorMessageArgs[0]}, etc. Unmatched arguments appended formatted message in * square braces. Unmatched placeholders left as-is. * @param errorMessageArgs arguments substituted message template. Arguments * converted strings {@link String#valueOf(Object)}. * @throws IllegalStateException if {@code expression} is false * @throws NullPointerException if check fails {@code errorMessageTemplate} * {@code errorMessageArgs} is null (don't this happen) */ public static void checkState( boolean expression, @Nullable String errorMessageTemplate, @Nullable Object... errorMessageArgs) { if (!expression) { throw new IllegalStateException(format(errorMessageTemplate, errorMessageArgs)); } }</technical_language>

Target:
public static List<TieredBlock> getConsumableInArrearTieredBlocks(final Usage usage, final String unitType) { Preconditions.checkArgument(usage.getBillingMode() == BillingMode.IN_ARREAR && usage.getUsageType() == UsageType.CONSUMABLE); Preconditions.checkArgument(usage.getTiers().length > 0); final List<TieredBlock> result = Lists.newLinkedList(); for (Tier tier : usage.getTiers()) { boolean found = false; for (TieredBlock tierBlock : tier.getTieredBlocks()) { if (tierBlock.getUnit().getName().equals(unitType)) { result.add(tierBlock); found = true; break; } } Preconditions.checkState(found, "Catalog issue in usage section '%s': Missing tierBlock definition for unit '%s'", usage.getName(), unitType); } return result; }
Source:
<code>public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; ParameterSummary<?> that = (ParameterSummary<?>) o; if (description != null ? !description.equals(that.description) : that.description != null) return false; if (name != null ? !name.equals(that.name) : that.name != null) return false; if (type != null ? !type.equals(that.type) : that.type != null) return false; if (defaultValue != null ? !type.equals(that.defaultValue) : that.defaultValue != null) <START> return false; <END> return true; }</code><technical_language>Objects.equal(Object, Object)</technical_language>

Target:
public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; ParameterSummary<?> that = (ParameterSummary<?>) o; return Objects.equal(this.name, that.name) && Objects.equal(this.type, that.type) && Objects.equal(this.description, that.description) && Objects.equal(this.defaultValue, that.defaultValue); }
Source:
<code>public SqlNode validate(SqlNode sqlNode) throws ValidationException { ensure(State.STATE_3_PARSED); final SqlConformance conformance = conformance(); final CalciteCatalogReader catalogReader = createCatalogReader(); <START> final SqlOperatorTable opTab = <END> ChainedSqlOperatorTable.of(operatorTable, catalogReader); this.validator = new CalciteSqlValidator(opTab, catalogReader, typeFactory, conformance); this.validator.setIdentifierExpansion(true); try { validatedSqlNode = validator.validate(sqlNode); } catch (RuntimeException e) { throw new ValidationException(e); } state = State.STATE_4_VALIDATED; return validatedSqlNode; }</code><technical_language>update code in PlannerImpl#expandView</technical_language>

Target:
public SqlNode validate(SqlNode sqlNode) throws ValidationException { ensure(State.STATE_3_PARSED); this.validator = createSqlValidator(createCatalogReader()); try { validatedSqlNode = validator.validate(sqlNode); } catch (RuntimeException e) { throw new ValidationException(e); } state = State.STATE_4_VALIDATED; return validatedSqlNode; }
Source:
<code>private void createFileIfNecessary() throws IOException { this.file = FileUtils.toFile( url ); if ( file == null ) { this.file = File.createTempFile( "classPathResourceAsFile", getOriginalExtension(), parentDirectory ); this.fileIsTemporary = true; <START> try ( InputStream input = url.openStream() ; OutputStream output = new FileOutputStream( file ) ) { <END> IOUtils.copy( input, output ); } } }</code><technical_language>space ;</technical_language>

Target:
private void createFileIfNecessary() throws IOException { this.file = FileUtils.toFile( url ); if ( file == null ) { this.file = File.createTempFile( "classPathResourceAsFile", getOriginalExtension(), parentDirectory ); this.hasCreatedTempFile = true; try ( InputStream input = url.openStream(); OutputStream output = new FileOutputStream( file ) ) { IOUtils.copy( input, output ); } } }
Source:
<code>private Container createGuestAgentContainerPanel(VmNetworkInterface networkInterface, List<VmGuestAgentInterface> allGuestAgentData) { Row content = new Row(); Column column = new Column(ColumnSize.MD_12); content.add(column); for (VmGuestAgentInterface guestAgentInterface: allGuestAgentData) { if (guestAgentInterface.getMacAddress() != null && guestAgentInterface.getMacAddress().equals(networkInterface.getMacAddress())) { DListElement dl = Document.get().createDLElement(); dl.addClassName(DL_HORIZONTAL); addDetailItem(SafeHtmlUtils.fromSafeConstant(constants.nameVmGuestAgent()), guestAgentInterface.getInterfaceName(), dl); addDetailItem(SafeHtmlUtils.fromSafeConstant(constants.ipv4VmGuestAgent()), guestAgentInterface.getIpv4Addresses() != null ? <START> String.join(COMMA_DELIMITOR, guestAgentInterface.getIpv4Addresses()) <END> : constants.notAvailableLabel(), dl); addDetailItem(SafeHtmlUtils.fromSafeConstant(constants.ipv6VmGuestAgent()), guestAgentInterface.getIpv6Addresses() != null ? String.join(COMMA_DELIMITOR, guestAgentInterface.getIpv6Addresses()) : constants.notAvailableLabel(), dl); addDetailItem(SafeHtmlUtils.fromSafeConstant(constants.macVmGuestAgent()), guestAgentInterface.getMacAddress(), dl); column.getElement().appendChild(dl); } } if (allGuestAgentData.isEmpty()) { Span noDataSpan = new Span(); noDataSpan.setText(constants.notAvailableLabel()); column.add(noDataSpan); } return createItemContainerPanel(content); }</code><technical_language>I a typo :-) COMMA_DELIMITER</technical_language>

Target:
private Container createGuestAgentContainerPanel(VmNetworkInterface networkInterface, List<VmGuestAgentInterface> allGuestAgentData) { Row content = new Row(); Column column = new Column(ColumnSize.MD_12); content.add(column); for (VmGuestAgentInterface guestAgentInterface: allGuestAgentData) { if (guestAgentInterface.getMacAddress() != null && guestAgentInterface.getMacAddress().equals(networkInterface.getMacAddress())) { DListElement dl = Document.get().createDLElement(); dl.addClassName(DL_HORIZONTAL); addDetailItem(SafeHtmlUtils.fromSafeConstant(constants.nameVmGuestAgent()), guestAgentInterface.getInterfaceName(), dl); addDetailItem(SafeHtmlUtils.fromSafeConstant(constants.ipv4VmGuestAgent()), guestAgentInterface.getIpv4Addresses() != null ? String.join(COMMA_DELIMITER, guestAgentInterface.getIpv4Addresses()) : constants.notAvailableLabel(), dl); addDetailItem(SafeHtmlUtils.fromSafeConstant(constants.ipv6VmGuestAgent()), guestAgentInterface.getIpv6Addresses() != null ? String.join(COMMA_DELIMITER, guestAgentInterface.getIpv6Addresses()) : constants.notAvailableLabel(), dl); addDetailItem(SafeHtmlUtils.fromSafeConstant(constants.macVmGuestAgent()), guestAgentInterface.getMacAddress(), dl); column.getElement().appendChild(dl); } } if (allGuestAgentData.isEmpty()) { Span noDataSpan = new Span(); noDataSpan.setText(constants.notAvailableLabel()); column.add(noDataSpan); } return createItemContainerPanel(content); }
Source:
<code>public void shouldUpdateStateOrProvinceForChargeWhenCountryIsUs() { ChargeEntity chargeSpy = spy(ChargeEntityFixture.aValidChargeEntity().build()); ChargeEventEntity chargeEvent = mock(ChargeEventEntity.class); AuthCardDetails authCardDetails = new AuthCardDetails(); <START> Address address = new Address(); <END> address.setCountry("US"); address.setPostcode("20500"); authCardDetails.setAddress(address); authCardDetails.setCardNo("1234567890"); when(chargeEvent.getStatus()).thenReturn(ENTERING_CARD_DETAILS); when(chargeEvent.getUpdated()).thenReturn(now()); when(mockedChargeEventDao.persistChargeEventOf(chargeSpy, null)).thenReturn(chargeEvent); when(mockedChargeDao.findByExternalId(chargeSpy.getExternalId())).thenReturn(Optional.of(chargeSpy)); when(mockNorthAmericanRegionMapper.getNorthAmericanRegionForCountry(any(AddressEntity.class))).thenReturn(Optional.of(UsState.WASHINGTON_DC)); when(chargeSpy.getEvents()).thenReturn(List.of(chargeEvent)); service.updateChargeAndEmitEventPostAuthorisation(chargeSpy.getExternalId(), ENTERING_CARD_DETAILS, authCardDetails, null, null, null, null, null); assertThat(chargeSpy.getCardDetails().getBillingAddress().get().getStateOrProvince(), is("DC")); }</code><technical_language>this test differ significantly previous one</technical_language>

Target:
public void shouldUpdateStateOrProvinceForChargeWhenCountryIsUs() { ChargeEntity chargeSpy = spy(ChargeEntityFixture.aValidChargeEntity().build()); ChargeEventEntity chargeEvent = mock(ChargeEventEntity.class); AuthCardDetails authCardDetails = new AuthCardDetails(); Address address = new Address(); address.setCountry("US"); address.setPostcode("20500"); authCardDetails.setAddress(address); authCardDetails.setCardNo("1234567890"); when(chargeEvent.getStatus()).thenReturn(ENTERING_CARD_DETAILS); when(chargeEvent.getUpdated()).thenReturn(now()); when(mockedChargeEventDao.persistChargeEventOf(chargeSpy, null)).thenReturn(chargeEvent); when(mockedChargeDao.findByExternalId(chargeSpy.getExternalId())).thenReturn(Optional.of(chargeSpy)); when(mockNorthAmericanRegionMapper.getNorthAmericanRegionForCountry(any(Address.class))).thenAnswer((Answer<Optional<? extends NorthAmericaRegion>>) invocationOnMock -> Optional.of(UsState.WASHINGTON_DC)); when(chargeSpy.getEvents()).thenReturn(List.of(chargeEvent)); service.updateChargeAndEmitEventPostAuthorisation(chargeSpy.getExternalId(), ENTERING_CARD_DETAILS, authCardDetails, null, null, null, null, null); assertThat(chargeSpy.getCardDetails().getBillingAddress().get().getStateOrProvince(), is("DC")); }
Source:
<code>public void testDefaultProvisioningConfiguration() throws Exception { final String iface = "test_wlan0"; final IpManager ipm = new IpManager(mContext, iface, mCb, mNMService); ProvisioningConfiguration config = new ProvisioningConfiguration.Builder() .withoutIPv4() .withoutIpReachabilityMonitor() .build(); ipm.startProvisioning(config); verify(mCb, times(1)).setNeighborDiscoveryOffload(true); verify(mNMService, timeout(100).times(1)).disableIpv6(iface); verify(mNMService, <START> timeout(100).times(1)).clearInterfaceAddresses(iface); <END> verify(mCb, timeout(100).times(1)).setFallbackMulticastFilter(false); verify(mCb, never()).onProvisioningFailure(any()); ipm.stop(); verify(mNMService, timeout(100).times(1)).disableIpv6(iface); verify(mNMService, timeout(100).times(1)).clearInterfaceAddresses(iface); }</code><technical_language>move this "new IpManager', clear calls happen IpManager setup, a consequence of calling startProvisioning()</technical_language>

Target:
public void testDefaultProvisioningConfiguration() throws Exception { final String iface = "test_wlan0"; final IpManager ipm = makeIpManager(iface); ProvisioningConfiguration config = new ProvisioningConfiguration.Builder() .withoutIPv4() .withoutIpReachabilityMonitor() .build(); ipm.startProvisioning(config); verify(mCb, times(1)).setNeighborDiscoveryOffload(true); verify(mCb, timeout(100).times(1)).setFallbackMulticastFilter(false); verify(mCb, never()).onProvisioningFailure(any()); ipm.stop(); verify(mNMService, timeout(100).times(1)).disableIpv6(iface); verify(mNMService, timeout(100).times(1)).clearInterfaceAddresses(iface); }
Source:
<code>public void dispose() { if (getTarget() != null) { getTarget().removeResourceSetListener(this); <START> } <END> }</code><technical_language>diagramEditor = null; --> avoid potential memory leak</technical_language>

Target:
public void dispose() { if (getTarget() != null) { getTarget().removeResourceSetListener(this); } diagramEditor = null; }
Source:
<code>public void addToOrderBook(Order order) throws StockMarketExpection { if(order instanceof BuyOrder) { ArrayList<Order> temp = buyOrders.get(order.getStockSymbol()); <START> if(temp != <END> null) { temp.add(order); } else { temp = new ArrayList<Order>(); temp.add(order); } buyOrders.put(order.getStockSymbol(), temp); } else if(order instanceof SellOrder) { ArrayList<Order> temp = sellOrders.get(order.getStockSymbol()); if(temp != null) { temp.add(order); } else { temp = new ArrayList<Order>(); temp.add(order); } sellOrders.put(order.getStockSymbol(), temp); } else { throw new StockMarketExpection("In OrderBook, addToOrderBook: Parameter is not an Order"); } }</code><technical_language>Consider rename this variable</technical_language>

Target:
public void addToOrderBook(Order order) throws StockMarketExpection { if(order instanceof BuyOrder) { ArrayList<Order> buyOrdersCopy = buyOrders.get(order.getStockSymbol()); if(buyOrdersCopy != null) { buyOrdersCopy.add(order); } else { buyOrdersCopy = new ArrayList<Order>(); buyOrdersCopy.add(order); } buyOrders.put(order.getStockSymbol(), buyOrdersCopy); } else if(order instanceof SellOrder) { ArrayList<Order> temp = sellOrders.get(order.getStockSymbol()); if(temp != null) { temp.add(order); } else { temp = new ArrayList<Order>(); temp.add(order); } sellOrders.put(order.getStockSymbol(), temp); } else { throw new StockMarketExpection("In OrderBook, addToOrderBook: Parameter is not an Order"); } }
Source:
<code>public void overrideComputationScheduler() { try { RxJavaHooks.setOnComputationScheduler(replaceWithImmediate); Assert.assertSame(Schedulers.immediate(), Schedulers.computation()); } finally { RxJavaHooks.reset(); } <START> Assert.assertNotSame(Schedulers.immediate(), Schedulers.computation()); <END> }</code><technical_language>nit: static import for assertNotSame</technical_language>

Target:
public void overrideComputationScheduler() { try { RxJavaHooks.setOnComputationScheduler(replaceWithImmediate); assertSame(Schedulers.immediate(), Schedulers.computation()); } finally { RxJavaHooks.reset(); } assertNotSame(Schedulers.immediate(), Schedulers.computation()); }
Source:
<code>public void testToCalendarWithDateAndTimeZoneNull() { try { <START> DateUtils.toCalendar(null, null); <END> fail("Expected NullPointerException to be thrown when both Date and TimeZone are null"); } catch(final NullPointerException npe) { } }</code><technical_language>tabs please</technical_language>

Target:
public void testToCalendarWithDateAndTimeZoneNull() { DateUtils.toCalendar(null, null); }
Source:
<code>public void LengthBatchWindowTest2() throws InterruptedException { log.info("Testing length batch window with no of events greater than window size"); final int length = 4; SiddhiManager siddhiManager = new SiddhiManager(); String cseEventStream = "define stream cseEventStream (symbol string, price float, volume int);"; String query = "" + "@info(name = 'query1') " + "from cseEventStream#window.lengthBatch(" + length + ") " + "select symbol,price,volume " + "insert expired events into outputStream ;"; <START> <END> ExecutionPlanRuntime executionPlanRuntime = siddhiManager.createExecutionPlanRuntime(cseEventStream + query); executionPlanRuntime.addCallback("outputStream", new StreamCallback() { @Override public void receive(Event[] events) { EventPrinter.print(events); for (Event event : events) { count++; Assert.assertEquals("In event order", count, event.getData(2)); } eventArrived = true; } }); InputHandler inputHandler = executionPlanRuntime.getInputHandler("cseEventStream"); executionPlanRuntime.start(); inputHandler.send(new Object[]{"IBM", 700f, 1}); inputHandler.send(new Object[]{"WSO2", 60.5f, 2}); inputHandler.send(new Object[]{"IBM", 700f, 3}); inputHandler.send(new Object[]{"WSO2", 60.5f, 4}); inputHandler.send(new Object[]{"IBM", 700f, 5}); inputHandler.send(new Object[]{"WSO2", 60.5f, 6}); Thread.sleep(500); Assert.assertEquals("Total event count", 4, count); Assert.assertTrue(eventArrived); executionPlanRuntime.shutdown(); }</code><technical_language>reason for changing Siddhi core test case</technical_language>

Target:
public void LengthBatchWindowTest2() throws InterruptedException { log.info("Testing length batch window with no of events greater than window size"); final int length = 4; SiddhiManager siddhiManager = new SiddhiManager(); String cseEventStream = "define stream cseEventStream (symbol string, price float, volume int);"; String query = "" + "@info(name = 'query1') " + "from cseEventStream#window.lengthBatch(" + length + ") " + "select symbol,price,volume " + "insert into outputStream ;"; ExecutionPlanRuntime executionPlanRuntime = siddhiManager.createExecutionPlanRuntime(cseEventStream + query); executionPlanRuntime.addCallback("outputStream", new StreamCallback() { @Override public void receive(Event[] events) { EventPrinter.print(events); for (Event event : events) { count++; Assert.assertEquals("In event order", count, event.getData(2)); } eventArrived = true; } }); InputHandler inputHandler = executionPlanRuntime.getInputHandler("cseEventStream"); executionPlanRuntime.start(); inputHandler.send(new Object[]{"IBM", 700f, 1}); inputHandler.send(new Object[]{"WSO2", 60.5f, 2}); inputHandler.send(new Object[]{"IBM", 700f, 3}); inputHandler.send(new Object[]{"WSO2", 60.5f, 4}); inputHandler.send(new Object[]{"IBM", 700f, 5}); inputHandler.send(new Object[]{"WSO2", 60.5f, 6}); Thread.sleep(500); Assert.assertEquals("Total event count", 4, count); Assert.assertTrue(eventArrived); executionPlanRuntime.shutdown(); }
Source:
<code>private ArtifactoryXrayResponse parseXrayScanResponse(HttpResponse response) throws IOException { if (response.getStatusLine().getStatusCode() != HttpStatus.SC_OK) { throw new IOException("Artifactory response: " + response.getStatusLine().getReasonPhrase()); } ObjectMapper mapper = new ObjectMapper(); String content = IOUtils.toString(response.getEntity().getContent(), "UTF-8"); JsonNode result; try { result = mapper.readTree(content); if (result == null) { <START> throw new NullArgumentException("received empty content from Artifactory"); <END> } } catch (Exception ex) { throw new XrayErrorException(String.format("Failed processing scan response: %s\n%s", ex.toString(), content)); } if (result.get("errors") != null) { String resultStr = result.get("errors").toString(); for (JsonNode error : result.get("errors")) { if (error.get("status").toString().equals(XRAY_FATAL_FAIL_STATUS)) { throw new RuntimeException("Artifactory response: " + resultStr); } } throw new XrayErrorException("Artifactory response: " + resultStr); } mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false); return mapper.treeToValue(result, ArtifactoryXrayResponse.class); }</code><technical_language>received --> Received</technical_language>

Target:
private ArtifactoryXrayResponse parseXrayScanResponse(HttpResponse response) throws IOException { if (response.getStatusLine().getStatusCode() != HttpStatus.SC_OK) { throw new IOException("Artifactory response: " + response.getStatusLine().getReasonPhrase()); } ObjectMapper mapper = new ObjectMapper(); String content = IOUtils.toString(response.getEntity().getContent(), "UTF-8"); JsonNode result; try { result = mapper.readTree(content); if (result == null) { throw new NullArgumentException("Received empty content from Artifactory"); } } catch (Exception ex) { throw new XrayErrorException(String.format("Failed processing scan response: %s\n%s", ex.toString(), content)); } if (result.get("errors") != null) { String resultStr = result.get("errors").toString(); for (JsonNode error : result.get("errors")) { if (error.get("status").toString().equals(XRAY_FATAL_FAIL_STATUS)) { throw new RuntimeException("Artifactory response: " + resultStr); } } throw new XrayErrorException("Artifactory response: " + resultStr); } mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false); return mapper.treeToValue(result, ArtifactoryXrayResponse.class); }
Source:
<code>public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException { HttpServletRequest req = (HttpServletRequest) request; HttpServletResponse resp = (HttpServletResponse) response; String encoding = Optional.fromNullable(request.getCharacterEncoding()).or(defaultEncoding); <START> String serviceRequestId = UUID.randomUUID().toString(); <END> MDC.put(HEADER_SERVICE_REQUEST, serviceRequestId); resp.addHeader(HEADER_SERVICE_REQUEST, URLEncoder.encode(serviceRequestId, encoding)); String clientRequestId = req.getHeader(HEADER_CLIENT_REQUEST); if (clientRequestId != null && clientIdPattern.matcher(clientRequestId).matches()) { MDC.put(HEADER_CLIENT_REQUEST, clientRequestId); resp.addHeader(HEADER_CLIENT_REQUEST, URLEncoder.encode(clientRequestId, encoding)); } try { chain.doFilter(request, response); } finally { MDC.remove(HEADER_SERVICE_REQUEST); MDC.remove(HEADER_CLIENT_REQUEST); } }</code><technical_language>This is contend for a global lock a static SecureRandom instance, necessary. get this (especially need a _UUID_ need a unique ID) new UUID(ThreadLocalRandom.nextLong(), ThreadLocalRandom.nextLong())</technical_language>

Target:
public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException { HttpServletRequest req = (HttpServletRequest) request; HttpServletResponse resp = (HttpServletResponse) response; String encoding = Optional.fromNullable(request.getCharacterEncoding()).or(defaultEncoding); String serviceRequestId = String.valueOf(ThreadLocalRandom.current().nextLong()); MDC.put(RequestId.SERVICE_REQUEST_ID, serviceRequestId); resp.addHeader(HEADER_SERVICE_REQUEST, URLEncoder.encode(serviceRequestId, encoding)); String clientRequestId = req.getHeader(HEADER_CLIENT_REQUEST); if (clientRequestId != null && clientIdPattern.matcher(clientRequestId).matches()) { MDC.put(RequestId.CLIENT_REQUEST_ID, clientRequestId); resp.addHeader(HEADER_CLIENT_REQUEST, URLEncoder.encode(clientRequestId, encoding)); } try { chain.doFilter(request, response); } finally { MDC.remove(RequestId.SERVICE_REQUEST_ID); MDC.remove(RequestId.CLIENT_REQUEST_ID); } }
Source:
<code>public static <T extends Activity> ActivityController<T> of(T activity, Intent intent) { <START> if (intent != null) { <END> Parcel obtain = Parcel.obtain(); obtain.writeParcelable(intent, 0); obtain.setDataPosition(0); intent = obtain.readParcelable(Intent.class.getClassLoader()); obtain.recycle(); } return new ActivityController<>(activity, intent) .attach( null); }</code><technical_language>move this a private method in base class (ComponentController)? e.g. call validateIntent parcelAndUnparcelIntent. called in ComponentController.of ActivityController.onNewIntent</technical_language>

Target:
public static <T extends Activity> ActivityController<T> of(T activity, Intent intent) { return new ActivityController<>(activity, intent) .attach( null); }
Source:
<code>private boolean repositoryAlreadyExistsForUrl(File repositoryPath, URIish gitUrl) { if (repositoryPath.exists()) { try { FileRepository existingRepository = new FileRepository( repositoryPath); String remoteUrl = existingRepository.getConfig().getString( ConfigConstants.CONFIG_REMOTE_SECTION, <START> Constants.DEFAULT_REMOTE_NAME, <END> ConfigConstants.CONFIG_KEY_URL); existingRepository.close(); URIish existingUrl = new URIish(remoteUrl); if (existingUrl.equals(gitUrl)) { return true; } } catch (IOException e) { return false; } catch (URISyntaxException e) { return false; } } return false; }</code><technical_language>I check configured remotes default one</technical_language>

Target:
private static boolean repositoryAlreadyExistsForUrl(File repositoryPath, URIish gitUrl) { if (repositoryPath.exists()) { try { FileRepository existingRepository = new FileRepository( repositoryPath); boolean exists = containsRemoteForUrl( existingRepository.getConfig(), gitUrl); existingRepository.close(); return exists; } catch (IOException e) { return false; } catch (URISyntaxException e) { return false; } } return false; }
Source:
<code>public StatusPrinter(StatementClient client, PrintStream out) { this.client = client; this.out = out; this.console = new ConsolePrinter(out); this.debug = client.isDebug(); <START> this.mappingPreviousStageStatuses = new HashMap<>(); <END> }</code><technical_language>inline declaration</technical_language>

Target:
public StatusPrinter(StatementClient client, PrintStream out) { this.client = client; this.out = out; this.console = new ConsolePrinter(out); this.debug = client.isDebug(); }
Source:
<code>@Override public void close() { EndpointGroup endpointGroup = EndpointGroupRegistry.get("elasticsearch"); if (endpointGroup != null) { endpointGroup.close(); EndpointGroupRegistry.unregister("elasticsearch"); } <START> factory.close(); <END> }</code><technical_language>put this in a finally local try-with-resources in case endpointGroup.close() throws for some reason, extremely careful</technical_language>

Target:
@Override public void close() { EndpointGroup endpointGroup = EndpointGroupRegistry.get("elasticsearch"); if (endpointGroup != null) { endpointGroup.close(); EndpointGroupRegistry.unregister("elasticsearch"); } }
Source:
<code>private static void readBlocks(NBTTagCompound nbt, ICubicWorldServer world, Cube cube) { boolean isEmpty = !nbt.hasKey("Blocks"); <START> if (!isEmpty) { <END> ExtendedBlockStorage ebs = new ExtendedBlockStorage(Coords.cubeToMinBlock(cube.getY()), !cube.getCubicWorld().getProvider().getHasNoSky()); byte[] abyte = nbt.getByteArray("Blocks"); NibbleArray data = new NibbleArray(nbt.getByteArray("Data")); NibbleArray add = nbt.hasKey("Add", 7) ? new NibbleArray(nbt.getByteArray("Add")) : null; ebs.getData().setDataFromNBT(abyte, data, add); ebs.setBlocklightArray(new NibbleArray(nbt.getByteArray("BlockLight"))); if (!world.getProvider().getHasNoSky()) { ebs.setSkylightArray(new NibbleArray(nbt.getByteArray("SkyLight"))); } ebs.removeInvalidBlocks(); cube.setStorage(ebs); } }</code><technical_language>In block, tabs replaced spaces</technical_language>

Target:
private static void readBlocks(NBTTagCompound nbt, ICubicWorldServer world, Cube cube) { boolean isEmpty = !nbt.hasKey("Blocks"); if (!isEmpty) { ExtendedBlockStorage ebs = new ExtendedBlockStorage(Coords.cubeToMinBlock(cube.getY()), !cube.getWorld().getProvider().getHasNoSky()); byte[] abyte = nbt.getByteArray("Blocks"); NibbleArray data = new NibbleArray(nbt.getByteArray("Data")); NibbleArray add = nbt.hasKey("Add", 7) ? new NibbleArray(nbt.getByteArray("Add")) : null; ebs.getData().setDataFromNBT(abyte, data, add); ebs.setBlocklightArray(new NibbleArray(nbt.getByteArray("BlockLight"))); if (!world.getProvider().getHasNoSky()) { ebs.setSkylightArray(new NibbleArray(nbt.getByteArray("SkyLight"))); } ebs.removeInvalidBlocks(); cube.setStorage(ebs); } }
Source:
<code>public void should_call_single_listener_on_verify() throws NoSuchMethodException { RememberingListener listener = new RememberingListener(); MockitoFramework mockitoFramework = Mockito.framework(); mockitoFramework.addListener(listener); <START> Method invocationWanted = Foo.class.getDeclaredMethod("doSomething", String.class); <END> Foo foo = mock(Foo.class); VerificationMode never = never(); verify(foo, never).doSomething(""); assertThat(listener).is(notifiedFor(foo, never, invocationWanted)); }</code><technical_language>I setUp. is cleaner more DRY</technical_language>

Target:
public void should_call_single_listener_on_verify() { Foo foo = mock(Foo.class); VerificationMode never = never(); verify(foo, never).doSomething(""); assertThat(listener).is(notifiedFor(foo, never, invocationWanted)); }
Source:
<code>private boolean isHostHealthy(CassandraClientPoolingContainer container) { try { container.runWithPooledResource(CassandraUtils.getDescribeRing(config)); container.runWithPooledResource(CassandraUtils.getValidatePartitioner(config)); return true; } catch (Exception e) { <START> log.warn("We tried to blacklist back into the pool, but got an exception" <END> + " that caused us to distrust this host further. Exception message was: : {}", SafeArg.of("host", CassandraLogHelper.host(container.getHost())), SafeArg.of("exceptionClass", e.getClass().getCanonicalName()), UnsafeArg.of("exceptionMessage", e.getMessage())); return false; } }</code><technical_language>add blacklisted host {}</technical_language>

Target:
private boolean isHostHealthy(CassandraClientPoolingContainer container) { try { container.runWithPooledResource(CassandraUtils.getDescribeRing(config)); container.runWithPooledResource(CassandraUtils.getValidatePartitioner(config)); return true; } catch (Exception e) { log.warn("We tried to add blacklisted host '{}' back into the pool, but got an exception" + " that caused us to distrust this host further. Exception message was: : {}", SafeArg.of("host", CassandraLogHelper.host(container.getHost())), SafeArg.of("exceptionClass", e.getClass().getCanonicalName()), UnsafeArg.of("exceptionMessage", e.getMessage())); return false; } }
Source:
<code>private void throwUnknownLanguageVersionException(String minOrMax, String unknownVersion) { throw new IllegalArgumentException("Unknown " + minOrMax + " Language Version '" + unknownVersion + "' for Language '" + language.getTerseName() + "' for Rule " + name + "; supported Language Versions are: " <START> + language.getVersions().stream().map(LanguageVersion::getTerseName).collect(Collectors.joining(", "))); <END> }</code><technical_language>Lol! I realized this message incorrect. If a user's rule is configured as: xml <rule name="MyRule" language="java" minimumLanguageVersion="8"> <!-- Java 8 rule! --> printing as: > Unknown minimum Language Version 8 for Language 'java' for Rule MyRule; supported Language Versions are: java 1.3, java 1.4, java 1.5, java 1.6, java 1.7, java 1.8, java 9, So, a user understand, instead of 8, write java 1.8 as: xml <rule name="MyRule" language="java" minimumLanguageVersion="java 1.8"> valid. do: java language.getVersions().stream().map(LanguageVersion::getVersion).collect(Collectors.joining(", "))); produce: > Unknown minimum Language Version 8 for Language 'java' for Rule MyRule; supported Language Versions are: 1.3, 1.4, 1.5, 1.6, 1.7, 1.8, 9,</technical_language>

Target:
private void throwUnknownLanguageVersionException(String minOrMax, String unknownVersion) { throw new IllegalArgumentException("Unknown " + minOrMax + " language version '" + unknownVersion + "' for language '" + language.getTerseName() + "' for rule " + name + "; supported language versions are: " + language.getVersions().stream().map(LanguageVersion::getVersion).collect(Collectors.joining(", "))); }
Source:
<code>private Object readResolve() throws IOException { if (this.agentUser == null && this.slavesUser != null) { this.agentUser = this.slavesUser; } else if (this.agentUser == null) { this.agentUser = "nobody"; } if (this.frameworkId == null) { this.frameworkId = UUID.randomUUID().toString(); } if (this.mesosAgentSpecTemplates == null && this.slaveInfos != null) { this.mesosAgentSpecTemplates = this.slaveInfos; } else if (this.mesosAgentSpecTemplates == null) { this.mesosAgentSpecTemplates = new ArrayList<>(); } if (selfIsMesosTask()) { String mesosSandbox = System.getenv("MESOS_SANDBOX"); this.sslCert = Optional.ofNullable(loadDcosCert(mesosSandbox)); this.dcosAuthorization = Optional.ofNullable(loadDcosAuthorization()); } else { this.sslCert = Optional.empty(); this.dcosAuthorization = Optional.empty(); } try { <START> MesosApi.getInstance(this); <END> logger.info( "Initialized Mesos API object for framework after deserialization.", this.frameworkId); } catch (InterruptedException | ExecutionException e) { logger.error("Failed initialize Mesos API object for framework {}", this.frameworkId, e); throw new RuntimeException("Failed to initialize Mesos API object after deserialization.", e); } return this; }</code><technical_language>This ill adviced, reason ill adviced do this in constructor</technical_language>

Target:
private Object readResolve() throws IOException { if (this.agentUser == null && this.slavesUser != null) { this.agentUser = this.slavesUser; } else if (this.agentUser == null) { this.agentUser = "nobody"; } if (this.frameworkId == null) { this.frameworkId = UUID.randomUUID().toString(); } if (this.mesosAgentSpecTemplates == null && this.slaveInfos != null) { this.mesosAgentSpecTemplates = this.slaveInfos; } else if (this.mesosAgentSpecTemplates == null) { this.mesosAgentSpecTemplates = new ArrayList<>(); } if (selfIsMesosTask()) { String mesosSandbox = System.getenv("MESOS_SANDBOX"); this.sslCert = Optional.ofNullable(loadDcosCert(mesosSandbox)); this.dcosAuthorization = Optional.ofNullable(loadDcosAuthorization()); } else { this.sslCert = Optional.empty(); this.dcosAuthorization = Optional.empty(); } return this; }
Source:
<code>public void setUp(){ Dataset ds = new Dataset(); String f = Dataset.ACETYLATION; File localFile = getLocalFileName(f); try { if (!localFile.exists()) { ds.downloadFile(new URL(f), localFile); } } catch (IOException e) { <START> e.printStackTrace(); <END> } }</code><technical_language>throw exception here. If a problem download, a stack trace printed junit it. failure file is found. exception thrown, junit report a lot clearer a naive user this test understand wrong</technical_language>

Target:
public void setUp() throws IOException{ Dataset ds = new Dataset(); String f = Dataset.ACETYLATION; File localFile = getLocalFileName(f); if (!localFile.exists()) { ds.downloadFile(new URL(f), localFile); } }
Source:
<code>protected BeanMapper(Class<T> type, PojoProperties<T> properties, String prefix) { this.type = type; this.beanInfo = properties; <START> this.prefix = prefix.toLowerCase(); <END> }</code><technical_language>Exposing PojoProperties (an internal class) API</technical_language>

Target:
private BeanMapper(Class<T> type, PojoProperties<T> properties, String prefix) { super(type, properties, prefix); strictColumnTypeMapping = false; }
Source:
<code>public void highlightIssue(LiveIssue issue) { RangeMarker issueRange = issue.getRange(); if (issueRange == null) { return; } <START> List<HighlightInfo> highlights = issue.flows().stream().findFirst() <END> .map(f -> f.locations().stream() .filter(Objects::nonNull) .map(l -> createHighlight(l.location(), l.message())) .collect(Collectors.toList()) ).orElse(new ArrayList<>()); highlights.add(createHighlight(issueRange, issue.getMessage())); updateHighlights(highlights, issueRange.getDocument()); }</code><technical_language>Remember special case of issues flows a single location (like cognitive complexity). (single) locations of flows highlighted</technical_language>

Target:
public void highlightIssue(LiveIssue issue) { List<HighlightInfo> highlights = issue.context() .map(context -> createHighlights(context.hasFlows() ? context.flows().get(0).locations() : context.secondaryLocations())) .orElse(new ArrayList<>()); RangeMarker issueRange = issue.getRange(); if (issueRange != null) { highlights.add(createHighlight(issueRange, issue.getMessage())); } updateHighlights(highlights, FileDocumentManager.getInstance().getDocument(issue.psiFile().getVirtualFile())); }
Source:
<code>public static ForceAlignment getForceAlignment(int ordinal) { <START> for (ForceAlignment he : values()) { <END> if (he.ordinal() == ordinal) { return he; } } return null; }</code><technical_language>he</technical_language>

Target:
public static ForceAlignment getForceAlignment(int ordinal) { for (ForceAlignment fe : values()) { if (fe.ordinal() == ordinal) { return fe; } } return null; }
Source:
<code>private void addCertificate(){ fileChooser.setAcceptAllFileFilterUsed(false); fileChooser.addChoosableFileFilter(certFilter); fileChooser.setFileFilter(certFilter); int retVal = fileChooser.showOpenDialog(this); if (retVal == JFileChooser.APPROVE_OPTION) { File file = fileChooser.getSelectedFile(); try { fileField.setText(file.getAbsolutePath()); String certAlias = (String) JOptionPane.showInputDialog(null, Res.getString("dialog.provide.alias")); if (certAlias == null) { throw new IllegalArgumentException(); } certControll.addCertificateToKeystore(file, certAlias); } catch (KeyStoreException | CertificateException | NoSuchAlgorithmException | IOException ex) { Log.error("Cannot upload certificate file", ex); } catch (IllegalArgumentException ex) { <START> Log.warning("Certificate alias cannot be null"); <END> } } }</code><technical_language>Please, log exception if one. Instead of Log.warning("blah") do Log.warning("blah",ex)</technical_language>

Target:
private void addCertificate() { fileChooser.setAcceptAllFileFilterUsed(false); fileChooser.addChoosableFileFilter(certFilter); fileChooser.setFileFilter(certFilter); int retVal = fileChooser.showOpenDialog(this); if (retVal == JFileChooser.APPROVE_OPTION) { File file = fileChooser.getSelectedFile(); try { certControll.addCertificateToKeystore(file); } catch (KeyStoreException | CertificateException | NoSuchAlgorithmException | IOException ex) { Log.error("Cannot upload certificate file", ex); } catch (IllegalArgumentException ex) { Log.warning("Certificate or it's alias cannot be null", ex); } catch (HeadlessException | InvalidNameException ex) { Log.error("Error at setting certificate alias", ex); } } }
Source:
<code>public ExtractionType getExtractionType() { <START> return ExtractionType.MANY_TO_ONE; <END> }</code><technical_language>this configurable</technical_language>

Target:
public ExtractionType getExtractionType() { return injective ? ExtractionType.ONE_TO_ONE : ExtractionType.MANY_TO_ONE; }
Source:
<code>protected boolean hasMoreItems() { return currentNextPage != null && ((currentNextPage.getUrl() != null && !currentNextPage.getUrl().isEmpty()) <START> || (currentNextPage.getIds() != null && !currentNextPage.getIds().isEmpty())); <END> }</code><technical_language>Utils.isNullOrEmpty() NewPipe Extractor merged. TextUtils.isEmpty() in NewPipe code, a method android.text package, I name null check</technical_language>

Target:
protected boolean hasMoreItems() { return Page.isValid(currentNextPage); }