auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public void testNullRecordsMismatchedHeader() throws Exception { final SAMRecordSetBuilder samRecordSetBuilder = getRecordSetBuilder(true, SAMFileHeader.SortOrder.queryname); for (final SAMRecord rec : samRecordSetBuilder.getRecords()) { rec.setHeader(null); } final SAMFileHeader fakeHeader = new SAMFileHeader(); fakeHeader.setSortOrder(SAMFileHeader.SortOrder.queryname); final File bamFile = File.createTempFile("test.", BamFileIoUtils.BAM_FILE_EXTENSION); bamFile.deleteOnExit(); final SAMFileWriter bamWriter = new SAMFileWriterFactory().makeSAMOrBAMWriter(fakeHeader, false, bamFile); for (SAMRecord rec : samRecordSetBuilder.getRecords()) { bamWriter.addAlignment(rec); } bamWriter.close(); final SamReader bamReader = SamReaderFactory.makeDefault().validationStringency(ValidationStringency.SILENT).open(bamFile); final SamReader samReader = samRecordSetBuilder.getSamReader(); samReader.getFileHeader().setSortOrder(bamReader.getFileHeader().getSortOrder()); final CloseableIterator<SAMRecord> it = samReader.iterator(); final CloseableIterator<SAMRecord> bamIt = bamReader.iterator(); while (it.hasNext()) { Assert.assertTrue(bamIt.hasNext()); final SAMRecord samRecord = it.next(); final SAMRecord bamRecord = bamIt.next(); Assert.assertEquals(bamRecord.getReferenceName(), samRecord.getReferenceName()); } Assert.assertFalse(bamIt.hasNext()); CloserUtil.close(samReader); }

Target:
public void testNullRecordsMismatchedHeader() throws Exception { final SAMRecordSetBuilder samRecordSetBuilder = getRecordSetBuilder(true, SAMFileHeader.SortOrder.queryname); for (final SAMRecord rec : samRecordSetBuilder.getRecords()) { rec.setHeader(null); } final SAMFileHeader fakeHeader = new SAMFileHeader(); fakeHeader.setSortOrder(SAMFileHeader.SortOrder.queryname); final File bamFile = File.createTempFile("test.", BamFileIoUtils.BAM_FILE_EXTENSION); bamFile.deleteOnExit(); final SAMFileWriter bamWriter = new SAMFileWriterFactory().makeSAMOrBAMWriter(fakeHeader, false, bamFile); for (SAMRecord rec : samRecordSetBuilder.getRecords()) { bamWriter.addAlignment(rec); } bamWriter.close(); final SamReader bamReader = SamReaderFactory.makeDefault().validationStringency(ValidationStringency.SILENT).open(bamFile); final SamReader samReader = samRecordSetBuilder.getSamReader(); samReader.getFileHeader().setSortOrder(bamReader.getFileHeader().getSortOrder()); final CloseableIterator<SAMRecord> it = samReader.iterator(); final CloseableIterator<SAMRecord> bamIt = bamReader.iterator(); while (it.hasNext()) { Assert.assertTrue(bamIt.hasNext()); final SAMRecord samRecord = it.next(); final SAMRecord bamRecord = bamIt.next(); Assert.assertEquals(bamRecord.getReferenceName(), samRecord.getReferenceName()); Assert.assertEquals(bamRecord.getAlignmentStart(), samRecord.getAlignmentStart()); } Assert.assertFalse(bamIt.hasNext()); CloserUtil.close(samReader); }
Source:
private void initParams(List args) { if (fixedMean) { if (args.size() > 0) { throw new IllegalArgumentException( "MultivarGaussian CPD with fixed mean expects no " + "arguments."); } } else { if (args.size() < 1) { throw new IllegalArgumentException( "MultivarGaussian CPD created without a fixed mean; " + "requires mean as an argument."); } setMean(args.get(0)); if (fixedCovariance) { if (args.size() > 1) { throw new IllegalArgumentException( "MultivarGaussian CPD with fixed covariance matrix " + "expects only one argument."); } } else { if (args.size() == 2) { setCovariance(args.get(1)); } else if (args.size() < 2) { throw new IllegalArgumentException( "MultivarGaussian CPD created without a fixed " + "covariance matrix; requires covariance matrix " + "as argument."); } else { throw new IllegalArgumentException( "MultivarGaussian CPD created without a fixed " + "covariance matrix has more than two arguments " + "provided"); } } } }

Target:
private void initParams(List args) { if (d == 0) { Object ob = args.get(0); int dims = 0; if (ob instanceof MatrixSpec) { dims = ((MatrixLib) ((MatrixSpec) ob).getValueIfNonRandom()).numRows(); } else { dims = ((MatrixLib) ob).numRows(); } setDimension(dims); } int argidx = 0; if (expectMeanAsArg) { if ((argidx + 1) > args.size()) { throw new IllegalArgumentException( "MultivarGaussian CPD created without a fixed mean; requires mean as an argument"); } setMean(args.get(argidx)); argidx++; } if (expectCovarianceAsArg) { if ((argidx + 1) > args.size()) { throw new IllegalArgumentException( "MultivarGaussian CPD created without a fixed covariance matrix; requires covariance matrix as argument."); } setCovariance(args.get(argidx)); argidx++; } if (args.size() > argidx) { throw new IllegalArgumentException( "MultivariateGaussian CPD is provided additional unnecessary random arguments"); } }
Source:
public static DefaultDriverContext defaultDriverContext( Optional<DriverExecutionProfile> profileOption) { final DriverExecutionProfile profile = profileOption.orElse(mock(DriverExecutionProfile.class)); final DriverConfig driverConfig = mock(DriverConfig.class); final DriverConfigLoader configLoader = mock(DriverConfigLoader.class); when(configLoader.getInitialConfig()).thenReturn(driverConfig); when(driverConfig.getDefaultProfile()).thenReturn(profile); final NodeStateListener nodeStateListener = mock(NodeStateListener.class); final SchemaChangeListener schemaChangeListener = mock(SchemaChangeListener.class); final RequestTracker requestTracker = mock(RequestTracker.class); final ClassLoader classLoader = mock(ClassLoader.class); ProgrammaticArguments args = ProgrammaticArguments.builder() .addTypeCodecs(new TypeCodec[0]) .withNodeStateListener(nodeStateListener) .withSchemaChangeListener(schemaChangeListener) .withRequestTracker(requestTracker) .withLocalDatacenters(Maps.newHashMap()) .withNodeFilters(Maps.newHashMap()) .withClassLoader(classLoader) .build(); return new DefaultDriverContext(configLoader, args); }

Target:
public static DefaultDriverContext defaultDriverContext( Optional<DriverExecutionProfile> profileOption) { final DriverExecutionProfile profile = profileOption.orElseGet( () -> { DriverExecutionProfile blankProfile = mock(DriverExecutionProfile.class); when(blankProfile.getString(DefaultDriverOption.PROTOCOL_COMPRESSION, "none")) .thenReturn("none"); return blankProfile; }); final DriverConfig driverConfig = mock(DriverConfig.class); final DriverConfigLoader configLoader = mock(DriverConfigLoader.class); when(configLoader.getInitialConfig()).thenReturn(driverConfig); when(driverConfig.getDefaultProfile()).thenReturn(profile); ProgrammaticArguments args = ProgrammaticArguments.builder() .withNodeStateListener(mock(NodeStateListener.class)) .withSchemaChangeListener(mock(SchemaChangeListener.class)) .withRequestTracker(mock(RequestTracker.class)) .withLocalDatacenters(Maps.newHashMap()) .withNodeFilters(Maps.newHashMap()) .withClassLoader(mock(ClassLoader.class)) .build(); return new DefaultDriverContext(configLoader, args); }
Source:
public void setHttpSampleNumberingMode(int httpSampleNumberingMode) { if (httpSampleNumberingMode == HttpSamplerNumberingMode.PREFIX.getIntValue()) { sNumberingMode = HttpSamplerNumberingMode.PREFIX.getStringMode(); } if (httpSampleNumberingMode == HttpSamplerNumberingMode.SUFFIX.getIntValue()) { sNumberingMode = HttpSamplerNumberingMode.SUFFIX.getStringMode(); } if (httpSampleNumberingMode == HttpSamplerNumberingMode.NO_NUMBER.getIntValue()) { sNumberingMode = HttpSamplerNumberingMode.NO_NUMBER.getStringMode(); } }

Target:
public void setHttpSampleNumberingMode(int httpSampleNumberingMode) { if (httpSampleNumberingMode == HttpSamplerNumberingMode.PREFIX.getIntValue()) { sNumberingMode = HttpSamplerNumberingMode.PREFIX.getStringMode(); JMeterUtils.setProperty("proxy.number.mode", "prefix"); JMeterUtils.setProperty("proxy.number.requests", "true"); } else if (httpSampleNumberingMode == HttpSamplerNumberingMode.SUFFIX.getIntValue()) { sNumberingMode = HttpSamplerNumberingMode.SUFFIX.getStringMode(); JMeterUtils.setProperty("proxy.number.mode", "suffix"); JMeterUtils.setProperty("proxy.number.requests", "true"); } else if (httpSampleNumberingMode == HttpSamplerNumberingMode.NO_NUMBER.getIntValue()) { sNumberingMode = HttpSamplerNumberingMode.NO_NUMBER.getStringMode(); JMeterUtils.setProperty("proxy.number.requests", "false"); } }
Source:
protected void run() throws UnloggedFailure { if (!loader.isRemoteInstallEnabled()) { throw die("remote installation is disabled"); } if (names != null && !names.isEmpty()) { try { loader.enablePlugins(Sets.newHashSet(names)); } catch (PluginInstallException e) { e.printStackTrace(stderr); throw die("plugin failed to enable"); } } }

Target:
protected void run() throws UnloggedFailure { if (!loader.isRemoteInstallEnabled()) { throw die("remote plugin administration is disabled"); } if (names != null && !names.isEmpty()) { try { loader.enablePlugins(Sets.newHashSet(names)); } catch (PluginInstallException e) { e.printStackTrace(stderr); throw die("plugin failed to enable"); } } }
Source:
public BeanMetaData<T> getRootBeanMetaData() { if ( rootBeanClass != null && rootBeanMetaData == null ) { rootBeanMetaData = beanMetaDataManager.getBeanMetaData( rootBeanClass ); } return rootBeanMetaData; }

Target:
public BeanMetaData<T> getRootBeanMetaData() { return rootBeanMetaData; }
Source:
public DirectDebitPaymentLinksBuilder withMandate(URI mandate) { this.mandate = new Link(mandate.toString(), GET);; return this; }

Target:
public DirectDebitPaymentLinksBuilder withMandate(URI mandate) { this.mandate = new Link(mandate.toString(), GET); return this; }
Source:
public String convert(Date source) { DateFormat df = new SimpleDateFormat(dateFormatString); return df.format(source); }

Target:
public String convert(Date source) { return source.toInstant().toString(); }
Source:
public PoolDefinition(long size, MemoryUnit unit, String serverResource) { if (unit == null) { throw new NullPointerException("Unit cannot be null"); } if (serverResource == null) { throw new NullPointerException("Source resource cannot be null"); } if (size <= 0) { throw new IllegalArgumentException("Pool must have a positive size"); } this.size = size; this.unit = unit; this.serverResource = serverResource; }

Target:
public PoolDefinition(long size, MemoryUnit unit, String serverResource) { if (unit == null) { throw new NullPointerException("Unit cannot be null"); } if (size <= 0) { throw new IllegalArgumentException("Pool must have a positive size"); } if (serverResource == null) { throw new NullPointerException("Source resource cannot be null"); } this.size = size; this.unit = unit; this.serverResource = serverResource; }
Source:
public void skipAndMoveCorruptedOrUnreadableFilesWithoutCreatingDir() { final String KEY = "key"; final String VALUE = "value"; try { File.createTempFile("temp", ".obj", objectStoreFolder.getRoot()); File corruptedFolder = openDirectory(workingDirectory.getAbsolutePath() + File.separator + PersistentObjectStorePartition.CORRUPTED_FOLDER); deleteDirectory(corruptedFolder); partition.store(KEY, VALUE); assertEquals(2, objectStoreFolder.getRoot().listFiles().length); assertEquals(1, corruptedFolder.list().length); } catch (Exception e) { fail("Supposed to have skipped corrupted or unreadable files"); } }

Target:
public void skipAndMoveCorruptedOrUnreadableFilesWithoutCreatingDir() throws Exception { final String KEY = "key"; final String VALUE = "value"; File.createTempFile("temp", ".obj", objectStoreFolder.getRoot()); File corruptedFolder = openDirectory(workingDirectory.getAbsolutePath() + File.separator + PersistentObjectStorePartition.CORRUPTED_FOLDER); deleteDirectory(corruptedFolder); partition.store(KEY, VALUE); assertThat(objectStoreFolder.getRoot().listFiles().length, is(2)); assertThat(corruptedFolder.list().length, is(1)); }
Source:
private static void serializeRefIdMap(Gson gson, String recordingPath) { try { JsonWriter writer = new JsonWriter(new FileWriter(recordingPath + REF_ID_MAP)); gson.toJson(EntityRefIdMap.getCurrentMap(), HashMap.class, writer); writer.close(); logger.info("RefIdMap Serialization completed!"); } catch (Exception e) { logger.error(e.getMessage()); } }

Target:
private void serializeRefIdMap(Gson gson, String recordingPath) { try { JsonWriter writer = new JsonWriter(new FileWriter(recordingPath + REF_ID_MAP)); gson.toJson(entityIdMap.getCurrentMap(), HashBiMap.class, writer); writer.close(); logger.info("RefIdMap Serialization completed!"); } catch (Exception e) { logger.error("Error while serializing Entity ID Map:", e); } }
Source:
public ConfigurationEnvironmentStrategy() { conf = new HashMap<>(); Map<String, String> env = System.getenv(); ConfigurationKey[] keys = ConfigurationKey.values(); for (ConfigurationKey key : keys) { String value = env.get(key.name()); if (value == null) { valid = Boolean.FALSE; break; } else { conf.put(key, value); } } }

Target:
public ConfigurationEnvironmentStrategy() { conf = new HashMap<>(); Map<String, String> env = System.getenv(); ConfigurationKey[] keys = ConfigurationKey.values(); for (ConfigurationKey key : keys) { String value = env.get(key.name()); if (value == null) { logger.info("Key not present in the Environment, skip to the next ConfigurationStrategy. \n", key.name()); valid = Boolean.FALSE; break; } else { conf.put(key, value); } } }
Source:
private List<String> findBaselineNodesInfo() { String outStr = testOut.toString(); int i = outStr.indexOf("Baseline nodes:"); assertTrue(i != -1); int j = outStr.indexOf("\n", i) + 1; int beginOfNodeDescription = -1; List<String> nodesInfo = new ArrayList<>(); while ((beginOfNodeDescription = outStr.indexOf("ConsistentId=", j) ) != -1) { j = outStr.indexOf("\n", beginOfNodeDescription); nodesInfo.add(outStr.substring(beginOfNodeDescription, j).trim()); } return nodesInfo; }

Target:
private List<String> findBaselineNodesInfo() { String outStr = testOut.toString(); int i = outStr.indexOf("Baseline nodes:"); assertTrue("Baseline nodes information is not found", i != -1); int j = outStr.indexOf("\n", i) + 1; int beginOfNodeDesc = -1; List<String> nodesInfo = new ArrayList<>(); while ((beginOfNodeDesc = outStr.indexOf("ConsistentId=", j) ) != -1) { j = outStr.indexOf("\n", beginOfNodeDesc); nodesInfo.add(outStr.substring(beginOfNodeDesc, j).trim()); } return nodesInfo; }
Source:
private void loadKiteConf(Services services) throws IOException { String[] paths = conf.getStrings(KITE_CONFIGURATION); if (paths != null && paths.length != 0) { kiteConf = new Configuration(); for(String path : paths) { if (path.startsWith("hdfs")) { Path p = new Path(path); HadoopAccessorService has = services.get(HadoopAccessorService.class); try { FileSystem fs = has.createFileSystem( System.getProperty("user.name"), p.toUri(), has.createJobConf(p.toUri().getAuthority())); if (fs.exists(p)) { FSDataInputStream is = null; try { is = fs.open(p); Configuration partialConf = new XConfiguration(is); kiteConf = merge(kiteConf, partialConf); } finally { if (is != null) { is.close(); } } LOG.info("Loaded Kite Configuration: " + path); } else { LOG.warn("Kite Configuration could not be found at [" + path + "]"); } } catch (HadoopAccessorException hae) { throw new IOException(hae); } } else { File f = new File(path); if (f.exists()) { InputStream is = null; try { is = new FileInputStream(f); Configuration partialConf = new XConfiguration(is); kiteConf = merge(kiteConf, partialConf); } finally { if (is != null) { is.close(); } } LOG.info("Loaded Kite Configuration: " + path); } else { LOG.warn("Kite Configuration could not be found at [" + path + "]"); } } } } else { LOG.info("Kite Configuration not specified"); } }

Target:
private void loadKiteConf(Services services) throws IOException { String[] paths = services.getConf().getStrings(KITE_CONFIGURATION); if (paths != null && paths.length != 0) { kiteConf = new Configuration(false); for(String path : paths) { if (path.startsWith("hdfs")) { Path p = new Path(path); HadoopAccessorService has = services.get(HadoopAccessorService.class); try { FileSystem fs = has.createFileSystem( System.getProperty("user.name"), p.toUri(), has.createJobConf(p.toUri().getAuthority())); if (fs.exists(p)) { FSDataInputStream is = null; try { is = fs.open(p); Configuration partialConf = new XConfiguration(is); kiteConf = merge(kiteConf, partialConf); } finally { if (is != null) { is.close(); } } LOG.info("Loaded Kite Configuration: " + path); } else { LOG.warn("Kite Configuration could not be found at [" + path + "]"); } } catch (HadoopAccessorException hae) { throw new IOException(hae); } } else { File f = new File(path); if (f.exists()) { InputStream is = null; try { is = new FileInputStream(f); Configuration partialConf = new XConfiguration(is); kiteConf = merge(kiteConf, partialConf); } finally { if (is != null) { is.close(); } } LOG.info("Loaded Kite Configuration: " + path); } else { LOG.warn("Kite Configuration could not be found at [" + path + "]"); } } } } else { LOG.info("Kite Configuration not specified"); } }
Source:
public void notifyTxnCommitInterests(long handle) { for (TransactionCommitInterest interest : m_txnCommitInterests) { interest.transactionCommitted(handle); } }

Target:
void notifyTxnCommitInterests(long handle) { for (TransactionCommitInterest txnCommitInterest : m_txnCommitInterests) { txnCommitInterest.transactionCommitted(handle); } }
Source:
public IUser getAddedBy() { if (addedBy != null && addedBy.eIsProxy()) { InternalEObject oldAddedBy = (InternalEObject) addedBy; addedBy = (IUser) eResolveProxy(oldAddedBy); if (addedBy != oldAddedBy) { if (eNotificationRequired()) { eNotify(new ENotificationImpl(this, Notification.RESOLVE, ReviewsPackage.REVIEW_ITEM__ADDED_BY, oldAddedBy, addedBy)); } } } return addedBy; }

Target:
public IUser getAddedBy() { if (addedBy != null && addedBy.eIsProxy()) { InternalEObject oldAddedBy = (InternalEObject) addedBy; addedBy = (IUser) eResolveProxy(oldAddedBy); if (addedBy != oldAddedBy) { if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.RESOLVE, ReviewsPackage.REVIEW_ITEM__ADDED_BY, oldAddedBy, addedBy)); } } return addedBy; }
Source:
public Void presentationHtml(String htmlToShow) { return messageSender.runAndWait(message -> setupWindow.showPresentationStep(message, htmlToShow)); }

Target:
public Void presentationHtml(String htmlToShow) { return messageSender.runAndWait(message -> setupWindow.showHtmlPresentationStep(message, htmlToShow)); }
Source:
private void processTemplate(TestClass tc, OpenShiftAdapter client, CECubeConfiguration configuration) throws DeploymentException { final StringResolver resolver = Strings.createStringResolver(configuration.getProperties()); final Template template = tc.getAnnotation(Template.class); final String templateURL = readTemplateUrl(template, configuration, resolver); try { final int replicas = readReplicas(tc); final Map<String, String> labels = readLabels(template, configuration, resolver); if (labels.isEmpty()) { log.warning(String.format("Empty labels for template: %s, namespace: %s", templateURL, configuration.getNamespace())); } if (executeProcessTemplate(template, configuration)) { List<ParamValue> values = new ArrayList<>(); addParameterValues(values, readParameters(template, configuration, resolver), false); addParameterValues(values, System.getenv(), true); addParameterValues(values, System.getProperties(), true); values.add(new ParamValue("REPLICAS", String.valueOf(replicas))); log.info(String.format("Applying OpenShift template: %s", templateURL)); client.processTemplateAndCreateResources(tc.getName(), templateURL, values); } else { log.info(String.format("Ignoring template [%s] processing ...", templateURL)); } templateDetailsProducer.set(new TemplateDetails() { @Override public int getReplicas() { return replicas; } @Override public Map<String, String> getLabels() { return labels; } }); } catch (Throwable t) { throw new DeploymentException("Cannot deploy template: " + templateURL, t); } }

Target:
private void processTemplate(TestClass tc, OpenShiftAdapter client, CECubeConfiguration configuration) throws DeploymentException { final StringResolver resolver = Strings.createStringResolver(configuration.getProperties()); final Template template = ReflectionUtils.findAnnotation(tc.getJavaClass(), Template.class); final String templateURL = readTemplateUrl(template, configuration, resolver); try { final int replicas = readReplicas(tc); final Map<String, String> labels = readLabels(template, configuration, resolver); if (labels.isEmpty()) { log.warning(String.format("Empty labels for template: %s, namespace: %s", templateURL, configuration.getNamespace())); } if (executeProcessTemplate(template, configuration)) { List<ParamValue> values = new ArrayList<>(); addParameterValues(values, readParameters(template, configuration, resolver), false); addParameterValues(values, System.getenv(), true); addParameterValues(values, System.getProperties(), true); values.add(new ParamValue("REPLICAS", String.valueOf(replicas))); log.info(String.format("Applying OpenShift template: %s", templateURL)); client.processTemplateAndCreateResources(tc.getName(), templateURL, values); } else { log.info(String.format("Ignoring template [%s] processing ...", templateURL)); } templateDetailsProducer.set(new TemplateDetails() { @Override public int getReplicas() { return replicas; } @Override public Map<String, String> getLabels() { return labels; } }); } catch (Throwable t) { throw new DeploymentException("Cannot deploy template: " + templateURL, t); } }
Source:
private EurekaHttpResponse<Applications> getApplicationsInternal(String urlPath, String[] regions) { ClientResponse response = null; String regionsParamValue = null; try { WebResource webResource = jerseyClient.resource(serviceUrl).path(urlPath); if (regions != null && regions.length > 0) { regionsParamValue = StringUtil.join(regions); webResource = webResource.queryParam("regions", regionsParamValue); } Builder requestBuilder = webResource.getRequestBuilder(); addExtraHeaders(requestBuilder); response = requestBuilder.accept(MediaType.APPLICATION_JSON_TYPE).get(ClientResponse.class); Applications applications = null; if (response.getStatus() == Status.OK.getStatusCode() && response.hasEntity()) { applications = response.getEntity(Applications.class); } return anEurekaHttpResponse(response.getStatus(), Applications.class) .headers(headersOf(response)) .entity(applications) .build(); } catch (Exception e) { logger.info("Error invoking Jersey HTTP GET {}/{}?{}; statusCode={}", serviceUrl, urlPath, regionsParamValue == null ? "" : "regions=" + regionsParamValue, response == null ? "N/A" : response.getStatus(), e ); throw e; } finally { if (logger.isDebugEnabled()) { logger.debug("Jersey HTTP GET {}/{}?{}; statusCode={}", serviceUrl, urlPath, regionsParamValue == null ? "" : "regions=" + regionsParamValue, response == null ? "N/A" : response.getStatus() ); } if (response != null) { response.close(); } } }

Target:
private EurekaHttpResponse<Applications> getApplicationsInternal(String urlPath, String[] regions) { ClientResponse response = null; String regionsParamValue = null; try { WebResource webResource = jerseyClient.resource(serviceUrl).path(urlPath); if (regions != null && regions.length > 0) { regionsParamValue = StringUtil.join(regions); webResource = webResource.queryParam("regions", regionsParamValue); } Builder requestBuilder = webResource.getRequestBuilder(); addExtraHeaders(requestBuilder); response = requestBuilder.accept(MediaType.APPLICATION_JSON_TYPE).get(ClientResponse.class); Applications applications = null; if (response.getStatus() == Status.OK.getStatusCode() && response.hasEntity()) { applications = response.getEntity(Applications.class); } return anEurekaHttpResponse(response.getStatus(), Applications.class) .headers(headersOf(response)) .entity(applications) .build(); } finally { if (logger.isDebugEnabled()) { logger.debug("Jersey HTTP GET {}/{}?{}; statusCode={}", serviceUrl, urlPath, regionsParamValue == null ? "" : "regions=" + regionsParamValue, response == null ? "N/A" : response.getStatus() ); } if (response != null) { response.close(); } } }
Source:
public Observable<Object> asRxObservable() { throwExceptionIfRxJavaIsNotAvailable("asRxObservable()"); final Set<String> observesTables = rawQuery.observesTables(); final Set<?> observesTags = rawQuery.observesTags(); final Observable<Object> observable; if (!observesTables.isEmpty() || !observesTags.isEmpty()) { observable = ChangesFilter.applyForTablesAndTags(storIOSQLite.observeChanges(), observesTables, observesTags) .map(MapSomethingToExecuteAsBlocking.newInstance(this)) .startWith(Observable.create(OnSubscribeExecuteAsBlocking.newInstance(this))) .onBackpressureLatest(); } else { observable = Observable.create(OnSubscribeExecuteAsBlocking.newInstance(this)); } return RxJavaUtils.subscribeOn(storIOSQLite, observable); }

Target:
public Observable<Object> asRxObservable() { return RxJavaUtils.createObservable(storIOSQLite, this); }
Source:
public void validate() { if (!containsMacro("oracleServerPort") && oracleServerPort < 0) { throw new IllegalArgumentException("Port cannot be negative"); } if (!EnumUtils.isValidEnum(SeparatorFormat.class, format)) { throw new IllegalArgumentException( String.format("Invalid format '%s'. Must be one of %s", format, EnumSet.allOf(SeparatorFormat.class))); } }

Target:
public void validate() { if (!containsMacro("oracleServerPort") && oracleServerSSHPort < 0) { throw new IllegalArgumentException("Port cannot be negative"); } if (!("password".equalsIgnoreCase(oracleServerSSHAuthMechanism) || "private key".equalsIgnoreCase(oracleServerSSHAuthMechanism))) { throw new IllegalArgumentException( String.format("Invalid authentication mechanism '%s'. Must be one of Private Key or Password", oracleServerSSHAuthMechanism)); } if ("password".equalsIgnoreCase(oracleServerSSHAuthMechanism) && Strings.isNullOrEmpty(oracleServerSSHPassword)) { throw new IllegalArgumentException("Password cannot be empty"); } else if ("private key".equalsIgnoreCase(oracleServerSSHAuthMechanism) && Strings.isNullOrEmpty(oracleServerSSHPrivateKey)) { throw new IllegalArgumentException("Private Key cannot be empty"); } try { SeparatorFormat.valueOf(format.toUpperCase()); } catch (IllegalArgumentException e) { throw new IllegalArgumentException( String.format("Invalid format '%s'. Must be one of %s", format, EnumSet.allOf(SeparatorFormat.class))); } String trimmedQuery = queryToExecute.trim(); if (!trimmedQuery.endsWith(";")) { queryToExecute = trimmedQuery + ';'; } }
Source:
protected List<Object> identifyRemoveGarbage(Object locator, K key) { List<Object> garbage = new ArrayList<>(); garbage.addAll(locatorStore.addUnsafe(key, (SMRRecordLocator) locator)); return garbage; }

Target:
protected List<Object> identifyRemoveGarbage(Object locator, K key) { return new ArrayList<>(locatorStore.addUnsafe(key, (SMRRecordLocator) locator)); }
Source:
public static Frequency ofMonths(int months) { switch (months) { case 1: return P1M; case 2: return P2M; case 3: return P3M; case 4: return P4M; case 6: return P6M; case 12: return P12M; default: if (months > MAX_MONTHS) { throw new IllegalArgumentException("Months must not exceed 12,000"); } return new Frequency(Period.ofMonths(months)); } }

Target:
public static Frequency ofMonths(int months) { switch (months) { case 1: return P1M; case 2: return P2M; case 3: return P3M; case 4: return P4M; case 6: return P6M; case 12: return P12M; default: if (months > MAX_MONTHS) { throw new IllegalArgumentException(maxMonthMsg()); } return new Frequency(Period.ofMonths(months)); } }
Source:
public Term parse(NonTerminal nt, int position) { NonTerminal startNt = new NonTerminal(new NonTerminalId("<start>"), new StateId("<start-entry>"), new State.OrderingInfo(Integer.MIN_VALUE), new StateId("<start-exit>"), new State.OrderingInfo(Integer.MAX_VALUE)); State state = new NonTerminalState(new StateId("<start>"), startNt, new State.OrderingInfo(Integer.MAX_VALUE - 1), nt, true, null); activateNtCall(s.getStateCall(new StateCall.Key(s.getNtCall(new NonTerminalCall.Key(nt, position)), position, state))); while (s.stateReturnWorkLists.top() != null) { StateReturn stateReturn = null; while ((stateReturn = s.stateReturnWorkLists.top().dequeue()) != null) { this.stateReturn(stateReturn); } s.stateReturnWorkLists.pop(); } Ambiguity result = new Ambiguity("K", new ArrayList<Term>()); for(StateReturn stateReturn : s.getNtCall(new NonTerminalCall.Key(nt,0)).exitStateReturns) { if (stateReturn.key.stateEnd == s.input.length()) { for (KList klist : stateReturn.postRuleFunction.applyToNull()) { result.getContents().add(klist); } } } return result; }

Target:
public Term parse(NonTerminal nt, int position) { NonTerminal startNt = new NonTerminal(new NonTerminalId("<start>"), new StateId("<start-entry>"), new State.OrderingInfo(Integer.MIN_VALUE), new StateId("<start-exit>"), new State.OrderingInfo(Integer.MAX_VALUE)); State state = new NonTerminalState(new StateId("<start>"), startNt, new State.OrderingInfo(Integer.MAX_VALUE - 1), nt, true, null); activateNtCall(s.getStateCall(new StateCall.Key(s.getNtCall(new NonTerminalCall.Key(nt, position)), position, state))); while (s.stateReturnWorkLists.top() != null) { StateReturn stateReturn = null; while ((stateReturn = s.stateReturnWorkLists.top().dequeue()) != null) { this.stateReturn(stateReturn); } s.stateReturnWorkLists.pop(); } Ambiguity result = new Ambiguity(KSorts.K, new ArrayList<Term>()); for(StateReturn stateReturn : s.getNtCall(new NonTerminalCall.Key(nt,0)).exitStateReturns) { if (stateReturn.key.stateEnd == s.input.length()) { for (KList klist : stateReturn.postRuleFunction.applyToNull()) { result.getContents().add(klist); } } } return result; }
Source:
synchronized Pattern sourceTopicPattern() { if (topicPattern == null) { final List<String> allSourceTopics = new ArrayList<>(); if (!nodeToSourceTopics.isEmpty()) { for (final List<String> topics : nodeToSourceTopics.values()) { final List<String> filteredTopics = filterAndRemoveGlobalSourceTopics(topics); allSourceTopics.addAll(maybeDecorateInternalSourceTopics(filteredTopics)); } } Collections.sort(allSourceTopics); topicPattern = buildPatternForOffsetResetTopics(allSourceTopics, nodeToSourcePatterns.values()); } return topicPattern; }

Target:
synchronized Pattern sourceTopicPattern() { if (topicPattern == null) { final List<String> allSourceTopics = new ArrayList<>(); if (!nodeToSourceTopics.isEmpty()) { for (final List<String> topics : nodeToSourceTopics.values()) { allSourceTopics.addAll(maybeDecorateInternalSourceTopics(topics)); } allSourceTopics.removeAll(globalTopics); } Collections.sort(allSourceTopics); topicPattern = buildPatternForOffsetResetTopics(allSourceTopics, nodeToSourcePatterns.values()); } return topicPattern; }
Source:
public void sendNext(T element) { if (subscriber.isDefined()) subscriber.get().onNext(element); else env.flop("Cannot sendNext before subscriber subscription"); }

Target:
public void sendNext(T element) { if (subscriber.isCompleted()) { subscriber.value().onNext(element); } else { env.flop("Cannot sendNext before having a Subscriber"); } }
Source:
public AbstractTreeElement getAttribute(String namespace, String name) { return this.getAttribute(null, namespace, name); }

Target:
public TreeElement getAttribute(String namespace, String name) { return this.getAttribute(null, namespace, name); }
Source:
private void selectCreatedDLines(ResourceSetChangeEvent event) { if (EclipseUIUtil.getActiveEditor() == abstractDTableEditor) { final List<DLine> createdDLines = getCreatedDLines(event); if (!createdDLines.isEmpty()) { final Viewer viewer = abstractDTableEditor.getViewer(); if (viewer != null) { Display.getDefault().asyncExec(new Runnable() { @Override public void run() { viewer.setSelection(new StructuredSelection(createdDLines.toArray())); } }); } } } }

Target:
private void selectCreatedDLines(ResourceSetChangeEvent event) { if (EclipseUIUtil.getActiveEditor() == abstractDTableEditor) { final List<DLine> createdDLines = getCreatedDLines(event); if (!createdDLines.isEmpty()) { Viewer viewer = abstractDTableEditor.getViewer(); if (viewer != null) { Display.getDefault().asyncExec(new ChangeViewerSelectionRunnable(viewer, new StructuredSelection(createdDLines.toArray()), true)); } } } }
Source:
protected void doTask() { final Set<Long> recordIDs = options.records.size() > 0 ? options.records : concourse.inventory(); Path path = createFile(); final Iterable<Map<String, Object>> records = (options.criteria != null ? concourse.get(options.criteria).entrySet().stream() .filter(r -> recordIDs.contains(r.getKey())) .map(Map.Entry::getValue) : concourse.describe(recordIDs).entrySet().stream() .map(e -> concourse.get(e.getValue(), e.getKey())) ).collect(Collectors.toList()); try { output(records, Files.newOutputStream(path)); } catch (IOException exception) { throw new RuntimeException( "Failed to create a stream for the file."); } }

Target:
protected void doTask() { final Exporter exporter = new Exporter(concourse, !opts.hidePrimaryKey); String result; if(opts.criteria != null && opts.records.size() > 0) { result = exporter.perform(opts.records, opts.criteria); } else if(opts.criteria != null) { result = exporter.perform(opts.criteria); } else if(opts.records.size() > 0) { result = exporter.perform(opts.records); } else { result = exporter.perform(); } final OutputStream outputStream = getOutputStream(); final PrintStream printStream = new PrintStream(outputStream); printStream.println(result); }
Source:
private void checkParamTagsOrder(final List<JavadocTag> tags, final List<DetailAST> allParams, final List<DetailAST> allTypeParams) { int paramPosition = 0; final int noOfTypeParams = allTypeParams.size(); for (JavadocTag tag : tags) { if (!tag.isParamTag()) { continue; } final String arg1 = tag.getFirstArg(); int actualPosition = indexOfParam(allParams, arg1) + noOfTypeParams; final boolean isTypeParam = CommonUtil.startsWithChar(arg1, '<') && CommonUtil.endsWithChar(arg1, '>'); if (isTypeParam) { actualPosition = indexOfTypeParameter(allTypeParams, arg1.substring(1, arg1.length() - 1)); } if (validateParameterOrder && actualPosition != paramPosition) { log(tag.getLineNo(), tag.getColumnNo(), MSG_INCORRECT_TAG_ORDER, PARAM_TAG, arg1); } paramPosition++; } }

Target:
private void checkParamTagsOrder(final List<JavadocTag> tags, final List<DetailAST> allParams, final List<DetailAST> allTypeParams) { int paramPosition = 0; int actualPosition; final int noOfTypeParams = allTypeParams.size(); for (JavadocTag tag : tags) { if (!tag.isParamTag()) { continue; } final String arg1 = tag.getFirstArg(); if (CommonUtil.startsWithChar(arg1, '<') && CommonUtil.endsWithChar(arg1, '>')) { actualPosition = indexOfTypeParameter(allTypeParams, arg1.substring(1, arg1.length() - 1)); } else { actualPosition = indexOfParam(allParams, arg1) + noOfTypeParams; } if (!allowMissingParamTags && validateParameterOrder && actualPosition != paramPosition) { log(tag.getLineNo(), tag.getColumnNo(), MSG_INCORRECT_TAG_ORDER, PARAM_TAG, arg1); } paramPosition++; } }
Source:
public Application remind(Application application) throws RemindAlreadySentException, ImpatientAboutApplicationForLeaveProcessException { LocalDate remindDate = application.getRemindDate(); if (remindDate == null) { LocalDate minDateForNotification = application.getApplicationDate() .plusDays(MIN_DAYS_LEFT_BEFORE_REMINDING_IS_POSSIBLE); if (minDateForNotification.isAfter(ZonedDateTime.now(UTC).toLocalDate())) { throw new ImpatientAboutApplicationForLeaveProcessException("It's too early to remind the bosses!"); } } if (remindDate != null && remindDate.isEqual(ZonedDateTime.now(UTC).toLocalDate())) { throw new RemindAlreadySentException("Reminding is possible maximum one time per day!"); } mailService.sendRemindBossNotification(application); application.setRemindDate(ZonedDateTime.now(UTC).toLocalDate()); applicationService.save(application); return application; }

Target:
public Application remind(Application application) throws RemindAlreadySentException, ImpatientAboutApplicationForLeaveProcessException { LocalDate remindDate = application.getRemindDate(); if (remindDate == null) { LocalDate minDateForNotification = application.getApplicationDate() .plusDays(MIN_DAYS_LEFT_BEFORE_REMINDING_IS_POSSIBLE); if (minDateForNotification.isAfter(LocalDate.now(UTC))) { throw new ImpatientAboutApplicationForLeaveProcessException("It's too early to remind the bosses!"); } } if (remindDate != null && remindDate.isEqual(LocalDate.now(UTC))) { throw new RemindAlreadySentException("Reminding is possible maximum one time per day!"); } mailService.sendRemindBossNotification(application); application.setRemindDate(LocalDate.now(UTC)); applicationService.save(application); return application; }
Source:
public String getGID(URL url) throws MalformedURLException { Pattern p = Pattern.compile("^https?://myrule34.com/index.php/([a-zA-Z0-9-]*)$"); Matcher m = p.matcher(url.toExternalForm()); if (m.matches()) { return m.group(1); } throw new MalformedURLException("Expected imgur.com URL format: " + "myrule34.com/index.php/albumName - got " + url + " instead"); }

Target:
public String getGID(URL url) throws MalformedURLException { Pattern p = Pattern.compile("^https?://myrule34.com/index.php/([a-zA-Z0-9-]*)$"); Matcher m = p.matcher(url.toExternalForm()); if (m.matches()) { return m.group(1); } throw new MalformedURLException("Expected myrule34.com URL format: " + "myrule34.com/index.php/albumName - got " + url + " instead"); }
Source:
private void applyValues(Address address, List<Object> keys, Response response) { if (response == null) { throw new CacheException("Did not get response from " + address); } else if (!response.isSuccessful()) { throw new CacheException("Response from " + address + " is unsuccessful: " + response); } InternalCacheValue[] values = (InternalCacheValue[]) ((SuccessfulResponse) response).getResponseValue(); if (values == null) { throw new IllegalStateException(); } for (int i = 0; i < keys.size(); ++i) { Object key = keys.get(i); InternalCacheValue icv = values[i]; if (icv == null) { continue; } PutKeyValueCommand put = commandsFactory.buildPutKeyValueCommand(key, icv.getValue(), icv.getMetadata(), STATE_TRANSFER_FLAGS); try { interceptorChain.invoke(icf.createSingleKeyNonTxInvocationContext(), put); } catch (Exception e) { if (!cache.getStatus().allowInvocations()) { log.debugf("Cache %s is shutting down, stopping state transfer", cacheName); break; } else { log.problemApplyingStateForKey(e.getMessage(), key, e); } } } }

Target:
private void applyValues(Address address, List<Object> keys, Response response) { if (response == null) { throw new CacheException("Did not get response from " + address); } else if (!response.isSuccessful()) { throw new CacheException("Response from " + address + " is unsuccessful: " + response); } InternalCacheValue[] values = (InternalCacheValue[]) ((SuccessfulResponse) response).getResponseValue(); if (values == null) { throw new IllegalStateException(); } for (int i = 0; i < keys.size(); ++i) { Object key = keys.get(i); InternalCacheValue icv = values[i]; if (icv == null) { continue; } PutKeyValueCommand put = commandsFactory.buildPutKeyValueCommand(key, icv.getValue(), keyPartitioner.getSegment(key), icv.getMetadata(), STATE_TRANSFER_FLAGS); try { interceptorChain.invoke(icf.createSingleKeyNonTxInvocationContext(), put); } catch (Exception e) { if (!cache.getStatus().allowInvocations()) { log.debugf("Cache %s is shutting down, stopping state transfer", cacheName); break; } else { log.problemApplyingStateForKey(e.getMessage(), key, e); } } } }
Source:
public Object resolveParameter(ParameterContext parameterContext, ExtensionContext extensionContext) { if (parameterContext.getParameter().getType() == SoftAssertions.class) { return getStore(extensionContext).getOrComputeIfAbsent(SoftAssertions.class); } return getStore(extensionContext).getOrComputeIfAbsent(BDDSoftAssertions.class); }

Target:
public Object resolveParameter(ParameterContext parameterContext, ExtensionContext extensionContext) { return getStore(extensionContext).getOrComputeIfAbsent(parameterContext.getParameter().getType()); }
Source:
public void testEquals() throws Exception { assertTrue( new Coordinate(1,"foo", "bar", "baz").equals(new Coordinate(1, "foo", "bar", "baz")) ); }

Target:
public void testEquals() throws Exception { assertEquals( new Coordinate(1,"foo", "bar", "baz"), new Coordinate(1, "foo", "bar", "baz") ); }
Source:
public void updateFromItem(final LocalItem localItem, HistoryRecordManager historyRecordManager, final DateFormat dateFormat) { if (!(localItem instanceof PlaylistRemoteEntity)) return; final PlaylistRemoteEntity item = (PlaylistRemoteEntity) localItem; itemTitleView.setText(item.getName()); itemStreamCountView.setText(String.valueOf(item.getStreamCount())); itemUploaderView.setText(Localization.concatenateStrings(item.getUploader(), NewPipe.getNameOfService(item.getServiceId()))); if (item.getUploader() == null) { itemUploaderView.setText(NewPipe.getNameOfService(item.getServiceId())); } itemBuilder.displayImage(item.getThumbnailUrl(), itemThumbnailView, ImageDisplayConstants.DISPLAY_PLAYLIST_OPTIONS); super.updateFromItem(localItem, historyRecordManager, dateFormat); }

Target:
public void updateFromItem(final LocalItem localItem, HistoryRecordManager historyRecordManager, final DateFormat dateFormat) { if (!(localItem instanceof PlaylistRemoteEntity)) return; final PlaylistRemoteEntity item = (PlaylistRemoteEntity) localItem; itemTitleView.setText(item.getName()); itemStreamCountView.setText(String.valueOf(item.getStreamCount())); if (!TextUtils.isEmpty(item.getUploader())) { itemUploaderView.setText(Localization.concatenateStrings(item.getUploader(), NewPipe.getNameOfService(item.getServiceId()))); } else { itemUploaderView.setText(NewPipe.getNameOfService(item.getServiceId())); } itemBuilder.displayImage(item.getThumbnailUrl(), itemThumbnailView, ImageDisplayConstants.DISPLAY_PLAYLIST_OPTIONS); super.updateFromItem(localItem, historyRecordManager, dateFormat); }
Source:
public void userRefresh() throws URISyntaxException, JSONException { Token t = SyncTestUtils.createTestUser().getSyncUser().getUserToken(); AuthenticateRequest request = AuthenticateRequest.userRefresh(t, new URI("realm://objectserver/" + t.value() + "/default")); JSONObject obj = new JSONObject(request.toJson()); assertTrue(obj.has("path")); assertEquals(t.value(), obj.get("data")); assertEquals("realm", obj.get("provider")); }

Target:
public void userRefresh() throws URISyntaxException, JSONException { Token t = SyncTestUtils.createTestUser().getSyncUser().getUserToken(); AuthenticateRequest request = AuthenticateRequest.userRefresh(t, new URI("realm://objectserver/" + t.identity() + "/default")); JSONObject obj = new JSONObject(request.toJson()); assertTrue(obj.has("path")); assertEquals(t.value(), obj.get("data")); assertEquals("realm", obj.get("provider")); }
Source:
private void initVmTemplate() { OvfHelper ovfHelper = new OvfHelper(); ovfEntityData = getUnregisteredOVFDataDao().getByEntityIdAndStorageDomain(getParameters().getContainerId(), getParameters().getStorageDomainId()); if (ovfEntityData != null) { try { vmTemplateFromConfiguration = ovfHelper.readVmTemplateFromOvf(ovfEntityData.getOvfData()); vmTemplateFromConfiguration.setVdsGroupId(getParameters().getVdsGroupId()); setVmTemplate(vmTemplateFromConfiguration); getParameters().setVmTemplate(vmTemplateFromConfiguration); getParameters().setDestDomainId(ovfEntityData.getStorageDomainId()); getParameters().setSourceDomainId(ovfEntityData.getStorageDomainId()); if (getParameters().getDiskTemplateMap() != null) { ArrayList imageList = new ArrayList<>(getParameters().getDiskTemplateMap().values()); vmTemplateFromConfiguration.setDiskList(imageList); ensureDomainMap(imageList, getParameters().getDestDomainId()); } } catch (OvfReaderException e) { log.error("failed to parse a given ovf configuration: \n{}", ovfEntityData.getOvfData()); log.error("Exception", e); } } setVdsGroupId(getParameters().getVdsGroupId()); setStoragePoolId(getVdsGroup().getStoragePoolId()); }

Target:
private void initVmTemplate() { OvfHelper ovfHelper = new OvfHelper(); ovfEntityData = getUnregisteredOVFDataDao().getByEntityIdAndStorageDomain(getParameters().getContainerId(), getParameters().getStorageDomainId()); if (ovfEntityData != null) { try { vmTemplateFromConfiguration = ovfHelper.readVmTemplateFromOvf(ovfEntityData.getOvfData()); vmTemplateFromConfiguration.setVdsGroupId(getParameters().getVdsGroupId()); setVmTemplate(vmTemplateFromConfiguration); getParameters().setVmTemplate(vmTemplateFromConfiguration); getParameters().setDestDomainId(ovfEntityData.getStorageDomainId()); getParameters().setSourceDomainId(ovfEntityData.getStorageDomainId()); if (getParameters().getDiskTemplateMap() != null) { ArrayList imageList = new ArrayList<>(getParameters().getDiskTemplateMap().values()); vmTemplateFromConfiguration.setDiskList(imageList); ensureDomainMap(imageList, getParameters().getDestDomainId()); } } catch (OvfReaderException e) { log.error("Failed to parse a given ovf configuration:\n{}", ovfEntityData.getOvfData()); log.error("Exception", e); } } setVdsGroupId(getParameters().getVdsGroupId()); setStoragePoolId(getVdsGroup().getStoragePoolId()); }
Source:
private void checkBonusPoolQuantities(Map<String, PoolQuantity> poolQuantities, Map<String, Entitlement> entitlements) { Set<String> excludePoolIds = new HashSet<String>(); Map<String, Entitlement> subEntitlementMap = new HashMap<String, Entitlement>(); for (Entry<String, PoolQuantity> entry : poolQuantities.entrySet()) { Pool pool = entry.getValue().getPool(); subEntitlementMap.put(pool.getSubscriptionId(), entitlements.get(entry.getKey())); excludePoolIds.add(pool.getId()); } List<Pool> overConsumedPools = poolCurator.lookupOversubscribedBySubscriptionIds(subEntitlementMap); List<Pool> derivedPools = new ArrayList<Pool>(); for (Pool pool : overConsumedPools) { if (!excludePoolIds.contains(pool.getId()) && pool.getQuantity() != -1) { derivedPools.add(pool); } } deleteExcessEntitlements(derivedPools); }

Target:
private void checkBonusPoolQuantities(Map<String, PoolQuantity> poolQuantities, Map<String, Entitlement> entitlements) { Set<String> excludePoolIds = new HashSet<String>(); Map<String, Entitlement> subEntitlementMap = new HashMap<String, Entitlement>(); for (Entry<String, PoolQuantity> entry : poolQuantities.entrySet()) { Pool pool = entry.getValue().getPool(); subEntitlementMap.put(pool.getSubscriptionId(), entitlements.get(entry.getKey())); excludePoolIds.add(pool.getId()); } List<Pool> overConsumedPools = poolCurator.lookupOversubscribedBySubscriptionIds(subEntitlementMap); List<Pool> derivedPools = new ArrayList<Pool>(); for (Pool pool : overConsumedPools) { if (pool.getQuantity() != -1 && !excludePoolIds.contains(pool.getId())) { derivedPools.add(pool); } } deleteExcessEntitlements(derivedPools); }