auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public void updatePreferenceIntents(PreferenceGroup prefs, final String acccountType, Account account) { final PackageManager pm = mFragment.getActivity().getPackageManager(); for (int i = 0; i < prefs.getPreferenceCount(); ) { Preference pref = prefs.getPreference(i); if (pref instanceof PreferenceGroup) { updatePreferenceIntents((PreferenceGroup) pref, acccountType, account); } Intent intent = pref.getIntent(); if (intent != null) { if (android.provider.Settings.ACTION_LOCATION_SOURCE_SETTINGS.equals( intent.getAction())) { pref.setOnPreferenceClickListener(new FragmentStarter( LocationSettings.class.getName(), R.string.location_settings_title)); } else { ResolveInfo ri = pm.resolveActivityAsUser(intent, PackageManager.MATCH_DEFAULT_ONLY, mUserHandle.getIdentifier()); if (ri == null) { prefs.removePreference(pref); continue; } intent.putExtra(ACCOUNT_KEY, account); intent.setFlags(intent.getFlags() | Intent.FLAG_ACTIVITY_NEW_TASK); pref.setOnPreferenceClickListener(new OnPreferenceClickListener() { @Override public boolean onPreferenceClick(Preference preference) { Intent prefIntent = preference.getIntent(); if (isSafeIntent(pm, prefIntent, acccountType)) { mFragment.getActivity().startActivityAsUser( prefIntent, mUserHandle); } else { Log.e(TAG, "Refusing to launch authenticator intent because" + "it exploits Settings permissions: " + prefIntent); } return true; } }); } } i++; } }

Target:
public void updatePreferenceIntents(PreferenceGroup prefs, final String acccountType, Account account) { final PackageManager pm = mFragment.getActivity().getPackageManager(); for (int i = 0; i < prefs.getPreferenceCount(); ) { Preference pref = prefs.getPreference(i); if (pref instanceof PreferenceGroup) { updatePreferenceIntents((PreferenceGroup) pref, acccountType, account); } Intent intent = pref.getIntent(); if (intent != null) { if (TextUtils.equals(intent.getAction(), android.provider.Settings.ACTION_LOCATION_SOURCE_SETTINGS)) { pref.setOnPreferenceClickListener(new FragmentStarter( LocationSettings.class.getName(), R.string.location_settings_title)); } else { ResolveInfo ri = pm.resolveActivityAsUser(intent, PackageManager.MATCH_DEFAULT_ONLY, mUserHandle.getIdentifier()); if (ri == null) { prefs.removePreference(pref); continue; } intent.putExtra(ACCOUNT_KEY, account); intent.setFlags(intent.getFlags() | Intent.FLAG_ACTIVITY_NEW_TASK); pref.setOnPreferenceClickListener(new OnPreferenceClickListener() { @Override public boolean onPreferenceClick(Preference preference) { Intent prefIntent = preference.getIntent(); if (isSafeIntent(pm, prefIntent, acccountType)) { mFragment.getActivity().startActivityAsUser( prefIntent, mUserHandle); } else { Log.e(TAG, "Refusing to launch authenticator intent because" + "it exploits Settings permissions: " + prefIntent); } return true; } }); } } i++; } }
Source:
public EventHubAsyncProducer createProducer(EventHubProducerOptions options) { Objects.requireNonNull(options); final EventHubProducerOptions clonedOptions = options.clone(); if (clonedOptions.retry() == null) { clonedOptions.retry(connectionOptions.retry()); } final String entityPath; final String linkName; if (ImplUtils.isNullOrEmpty(options.partitionId())) { entityPath = eventHubName; linkName = StringUtil.getRandomString("EC"); } else { entityPath = String.format(Locale.US, SENDER_ENTITY_PATH_FORMAT, eventHubName, options.partitionId()); linkName = StringUtil.getRandomString("PS"); } final Mono<AmqpSendLink> amqpLinkMono = connectionMono .flatMap(connection -> connection.createSession(entityPath)) .flatMap(session -> { logger.verbose("Creating producer for {}", entityPath); final RetryPolicy retryPolicy = RetryUtil.getRetryPolicy(clonedOptions.retry()); return session.createProducer(linkName, entityPath, clonedOptions.retry().tryTimeout(), retryPolicy) .cast(AmqpSendLink.class); }); return new EventHubAsyncProducer(amqpLinkMono, clonedOptions, this.tracerProvider); }

Target:
public EventHubAsyncProducer createProducer(EventHubProducerOptions options) { Objects.requireNonNull(options, "'options' cannot be null."); final EventHubProducerOptions clonedOptions = options.clone(); if (clonedOptions.retry() == null) { clonedOptions.retry(connectionOptions.retry()); } final String entityPath; final String linkName; if (ImplUtils.isNullOrEmpty(options.partitionId())) { entityPath = eventHubName; linkName = StringUtil.getRandomString("EC"); } else { entityPath = String.format(Locale.US, SENDER_ENTITY_PATH_FORMAT, eventHubName, options.partitionId()); linkName = StringUtil.getRandomString("PS"); } final Mono<AmqpSendLink> amqpLinkMono = connectionMono .flatMap(connection -> connection.createSession(entityPath)) .flatMap(session -> { logger.verbose("Creating producer for {}", entityPath); final RetryPolicy retryPolicy = RetryUtil.getRetryPolicy(clonedOptions.retry()); return session.createProducer(linkName, entityPath, clonedOptions.retry().tryTimeout(), retryPolicy) .cast(AmqpSendLink.class); }); return new EventHubAsyncProducer(amqpLinkMono, clonedOptions, tracerProvider); }
Source:
public void testTuples() { Pair<String, Integer> pair = new Pair<>("A", 1); Triplet<String, Integer, Long> triplet = new Triplet<>("B", 2, Long.MAX_VALUE); Quartet<String, Integer, Long, Character> quartet = new Quartet<>("C", 3, Long.MIN_VALUE, 'c'); Quintet<String, Integer, Long, Character, BigInteger> quintet = new Quintet<>("D", 4, Long.valueOf("0"), 'd', BigInteger.ZERO); assertEquals(pair.getA()+" should be A","A", pair.getA()); assertEquals(triplet.getA()+" should be B" ,"B", triplet.getA()); assertEquals(quartet.getA()+" should be C","C", quartet.getA()); assertEquals(quintet.getA()+" should be D","D", quintet.getA()); assertEquals(pair.getB() +" should be 1",1, pair.getB().intValue()); assertEquals(triplet.getB() +" should be 2",2, triplet.getB().intValue()); assertEquals(quartet.getB() +" should be 3",3, quartet.getB().intValue()); assertEquals(quintet.getB() +" should be 4",4, quintet.getB().intValue()); assertEquals(triplet.getC() +" should be Long.MAX_VALUE",Long.MAX_VALUE, triplet.getC().longValue()); assertEquals(quartet.getC() +" should be Long.MIN_VALUE",Long.MIN_VALUE, quartet.getC().longValue()); assertEquals(quintet.getC() +" should be 0L",0L, quintet.getC().longValue()); assertEquals(quartet.getD() +" should be c",'c', quartet.getD().charValue()); assertEquals(quintet.getD() +" should be d",'d', quintet.getD().charValue()); assertEquals(quintet.getE()+" should be "+BigInteger.ZERO,BigInteger.ZERO, quintet.getE()); }

Target:
public void testTuples() { Pair<String, Integer> pair = new Pair<>("A", 1); Triplet<String, Integer, Long> triplet = new Triplet<>("B", 2, Long.MAX_VALUE); Quartet<String, Integer, Long, Character> quartet = new Quartet<>("C", 3, Long.MIN_VALUE, 'c'); Quintet<String, Integer, Long, Character, BigInteger> quintet = new Quintet<>("D", 4, Long.valueOf("0"), 'd', BigInteger.ZERO); assertEquals("pair.getA() should be A", "A", pair.getA()); assertEquals("triplet.getA() should be B", "B", triplet.getA()); assertEquals("quartet.getA() should be C", "C", quartet.getA()); assertEquals("quintet.getA() should be D", "D", quintet.getA()); assertEquals("pair.getB().intValue() should be 1", 1, pair.getB().intValue()); assertEquals("triplet.getB().intValue() should be 2", 2, triplet.getB().intValue()); assertEquals("quartet.getB().intValue() should be 3", 3, quartet.getB().intValue()); assertEquals("quintet.getB().intValue() should be 4", 4, quintet.getB().intValue()); assertEquals("triplet.getC().longValue() should be Long.MAX_VALUE", Long.MAX_VALUE, triplet.getC().longValue()); assertEquals("quartet.getC().longValue() should be Long.MIN_VALUE", Long.MIN_VALUE, quartet.getC().longValue()); assertEquals("quintet.getC().longValue() should be 0L", 0L, quintet.getC().longValue()); assertEquals("quartet.getD().charValue() should be c", 'c', quartet.getD().charValue()); assertEquals("quintet.getD().charValue() should be d", 'd', quintet.getD().charValue()); assertEquals("quintet.getE() should be BigInteger.ZERO", BigInteger.ZERO, quintet.getE()); }
Source:
public boolean process(Exchange exchange, AsyncCallback callback) { ExecutorService executorService = this.executor; if (executorService != null && this.isRunAllowed()) { executorService.execute(() -> this.getAsyncProcessor().process(exchange, doneSync -> { if (exchange.getException() != null) { LOG.warn("Error processing the exchange " + exchange + " from reactive-streams", exchange.getException()); } callback.done(doneSync); })); return false; } else { LOG.warn("Consumer not ready to process exchanges. The exchange will be discarded", exchange); callback.done(true); return true; } }

Target:
public boolean process(Exchange exchange, AsyncCallback callback) { ExecutorService executorService = this.executor; if (executorService != null && this.isRunAllowed()) { executorService.execute(() -> this.getAsyncProcessor().process(exchange, doneSync -> { if (exchange.getException() != null) { getExceptionHandler().handleException("Error processing exchange", exchange, exchange.getException()); } callback.done(doneSync); })); return false; } else { LOG.warn("Consumer not ready to process exchanges. The exchange will be discarded", exchange); callback.done(true); return true; } }
Source:
private synchronized void removeSubscription(String address) throws Exception { String internalAddress = MQTTUtil.convertMQTTAddressFilterToCore(address, session.getWildcardConfiguration()); SimpleString internalQueueName = getQueueNameForTopic(internalAddress); session.getSessionState().removeSubscription(address); Set<Consumer> queueConsumers = session.getServer().queueConsumersQuery(internalQueueName); consumers.remove(address); if (queueConsumers != null) { for (Consumer consumer : queueConsumers) { ((ServerConsumer) consumer).close(false); consumerQoSLevels.remove(((ServerConsumer) consumer).getID()); } } if (session.getServerSession().executeQueueQuery(internalQueueName).isExists()) { session.getServerSession().deleteQueue(internalQueueName); } }

Target:
private void removeSubscription(String address) throws Exception { String internalAddress = MQTTUtil.convertMQTTAddressFilterToCore(address, session.getWildcardConfiguration()); SimpleString internalQueueName = getQueueNameForTopic(internalAddress); session.getSessionState().removeSubscription(address); SimpleString sAddress = SimpleString.toSimpleString(internalAddress); AddressInfo addressInfo = session.getServerSession().getAddress(sAddress); if (addressInfo != null && addressInfo.getRoutingTypes().contains(RoutingType.ANYCAST)) { ServerConsumer consumer = consumers.get(address); consumers.remove(address); if (consumer != null) { consumer.close(false); consumerQoSLevels.remove(consumer.getID()); } } else { consumers.remove(address); Queue queue = session.getServer().locateQueue(internalQueueName); Set<Consumer> queueConsumers; if (queue != null && (queueConsumers = (Set<Consumer>) queue.getConsumers()) != null) { for (Consumer consumer : queueConsumers) { ((ServerConsumer) consumer).close(false); consumerQoSLevels.remove(((ServerConsumer) consumer).getID()); } } } if (session.getServerSession().executeQueueQuery(internalQueueName).isExists()) { session.getServerSession().deleteQueue(internalQueueName); } }
Source:
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { String fileName = request.getParameter("filename"); String contentType = request.getParameter("contenttype"); String content = request.getParameter("content"); response.setContentType(contentType); response.setHeader("Content-Disposition", "attachment; filename=\"" + fileName + "\""); response.setHeader("Cache-Control", "no-cache, must-revalidate"); response.setHeader("Expires", "Sat, 26 Jul 1997 05:00:00 GMT"); response.getWriter().println(content); }

Target:
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { String fileName = request.getParameter("filename"); String contentType = request.getParameter("contenttype"); String content = request.getParameter("content"); Boolean cache = Boolean.parseBoolean(request.getParameter("cache")); response.setContentType(contentType); response.setHeader("Content-Disposition", "attachment; filename=\"" + fileName + "\""); if (!cache) { response.setHeader("Cache-Control", "no-cache, must-revalidate"); response.setHeader("Expires", "Sat, 26 Jul 1997 05:00:00 GMT"); } response.getWriter().println(content); if (response.getWriter().checkError()) { throw new IOException("Error when writing to response stream"); } }
Source:
private boolean isNotNormalizableDateValue(String property, String value) { if (property == null || value == null) { LOGGER.trace("Property or value was null, ignoring normalization", property, value); return true; } Optional<AttributeDescriptor> optional = registry.lookup(property); if (!optional.isPresent()) { LOGGER.trace("No descriptor available for property [{}]", property); return true; } AttributeDescriptor descriptor = optional.get(); if (!AttributeType.AttributeFormat.DATE.equals(descriptor.getType().getAttributeFormat())) { LOGGER.trace( "Descriptor for property and value did not have an AttributeFormat of DATE", property, value); return true; } LOGGER.trace("Found date value for property [{}]", value, property); return false; }

Target:
private boolean isNotNormalizableDateValue(String property, String value) { Optional<AttributeDescriptor> optional = registry.lookup(property); if (!optional.isPresent()) { LOGGER.trace("No descriptor available for property [{}]", property); return true; } AttributeDescriptor descriptor = optional.get(); if (descriptor.getType().getAttributeFormat() != DATE) { LOGGER.trace( "Descriptor for property and value did not have an AttributeFormat of DATE", property, value); return true; } LOGGER.trace("Found date value for property [{}]", value, property); return false; }
Source:
public <T> Optional<T> get(String id, Class<T> clazz, IndexCoordinates index) { GetRequest request = requestFactory.getRequest(id, index); try { GetResponse response = client.get(request, RequestOptions.DEFAULT); return Optional.ofNullable(elasticsearchConverter.mapDocument(DocumentAdapters.from(response), clazz)); } catch (IOException e) { throw new ElasticsearchException("Error while getting for request: " + request.toString(), e); } }

Target:
public <T> T get(String id, Class<T> clazz, IndexCoordinates index) { GetRequest request = requestFactory.getRequest(id, index); try { GetResponse response = client.get(request, RequestOptions.DEFAULT); return elasticsearchConverter.mapDocument(DocumentAdapters.from(response), clazz); } catch (IOException e) { throw new ElasticsearchException("Error while getting for request: " + request.toString(), e); } }
Source:
public Bitmap get() throws IOException { long started = System.nanoTime(); checkNotMain(); if (deferred) { throw new IllegalStateException("Fit cannot be used with get."); } if (!data.hasImage()) { return null; } Request request = createRequest(started); Action action = new GetAction(picasso, request); Result.Bitmap result = BitmapHunter.Companion.forRequest(picasso, picasso.dispatcher, picasso.cache, action).hunt(); if (result == null) { return null; } Bitmap bitmap = result.getBitmap(); if (shouldWriteToMemoryCache(request.memoryPolicy)) { picasso.cache.set(request.key, bitmap); } return bitmap; }

Target:
public Bitmap get() throws IOException { long started = System.nanoTime(); checkNotMain(); if (deferred) { throw new IllegalStateException("Fit cannot be used with get."); } if (!data.hasImage()) { return null; } Request request = createRequest(started); Action action = new GetAction(picasso, request); Result.Bitmap result = forRequest(picasso, picasso.dispatcher, picasso.cache, action).hunt(); if (result == null) { return null; } Bitmap bitmap = result.getBitmap(); if (shouldWriteToMemoryCache(request.memoryPolicy)) { picasso.cache.set(request.key, bitmap); } return bitmap; }
Source:
public void testCoverageTimeSlicingTimeBefore() throws Exception { setupRasterDimension( getLayerId(WATTEMP), ResourceInfo.TIME, DimensionPresentation.LIST, null); final File xml = new File("./src/test/resources/trimming/requestGetCoverageTimeSlicingXML.xml"); String request = FileUtils.readFileToString(xml, "UTF-8"); request = request.replace("${coverageId}", "sf__watertemp"); request = request.replace("${slicePoint}", "2008-10-31T00:00:00.000Z"); checkWaterTempValue(request, 14.89799975766800344); }

Target:
public void testCoverageTimeSlicingTimeBefore() throws Exception { setupRasterDimension( getLayerId(WATTEMP), ResourceInfo.TIME, DimensionPresentation.LIST, null); final File xml = new File("./src/test/resources/trimming/requestGetCoverageTimeSlicingXML.xml"); String request = FileUtils.readFileToString(xml, "UTF-8"); request = request.replace("${coverageId}", "sf__watertemp"); request = request.replace("${slicePoint}", "2000-10-31T00:00:00.000Z"); checkWaterTempValue(request, null); try { setupNearestMatch(WATTEMP, ResourceInfo.TIME, true, "P8Y", true); checkWaterTempValue(request, 14.89799975766800344); } finally { setupNearestMatch(WATTEMP, ResourceInfo.TIME, false); } }
Source:
public boolean removeObserver(Entity entity) { checkChunkLoaded(); chunkObserversDirtyQueueElement.add(); TickStage.checkStage(TickStage.FINALIZE); if (entity instanceof SpoutPlayer && observers.remove((SpoutPlayer) entity)) { observingPlayers.remove((SpoutPlayer) entity); Engine engine = Spout.getEngine(); if (engine.getPlatform() == Platform.CLIENT && ((SpoutClient) engine).getPlayer() == entity) { setIsInViewDistance(false); } } expiredObserversQueue.add((SpoutEntity) entity); if (!isObserved()) { addToRegionUnloadQueue(); } return true; }

Target:
public boolean removeObserver(Entity entity) { if (Spout.getPlatform() != Platform.SERVER) { throw new UnsupportedOperationException("Cannot remove observers when not in server mode!"); } TickStage.checkStage(TickStage.FINALIZE); checkChunkLoaded(); if (observers.remove((SpoutEntity) entity) && (entity instanceof SpoutPlayer)) { observingPlayers.remove((SpoutPlayer) entity); } expiredObserversQueue.add((SpoutEntity) entity); if (!isObserved()) { this.unloadQueueElement.add(); } return true; }
Source:
public void testConvertEmbeddedSubprocessNode_SlaDueDate() { final String SLA_DUE_DATE = "12/25/1983"; SubProcess subProcess = bpmn2.createSubProcess(); subProcess.setId(UUID.randomUUID().toString()); CustomElement.slaDueDate.setValue(subProcess, SLA_DUE_DATE); Result<BpmnNode> result = tested.convertSubProcess(subProcess); BpmnNode node = result.value(); EmbeddedSubprocess embeddedSubProcces = (EmbeddedSubprocess) node.value().getContent().getDefinition(); assertNotNull(embeddedSubProcces); assertNotNull(embeddedSubProcces.getExecutionSet()); EmbeddedSubprocessExecutionSet executionSet = embeddedSubProcces.getExecutionSet(); SLADueDate slaDueDate = executionSet.getSlaDueDate(); assertNotNull(slaDueDate); assertTrue(slaDueDate.getValue().contains(SLA_DUE_DATE)); }

Target:
public void testConvertEmbeddedSubprocessNode_SlaDueDate() { SubProcess subProcess = bpmn2.createSubProcess(); CustomElement.slaDueDate.setValue(subProcess, SLA_DUE_DATE); Result<BpmnNode> result = tested.convertSubProcess(subProcess); BpmnNode node = result.value(); EmbeddedSubprocess embeddedSubprocess = (EmbeddedSubprocess) node.value().getContent().getDefinition(); assertNotNull(embeddedSubprocess); assertBaseSubprocessExecutionSet(embeddedSubprocess.getExecutionSet()); }
Source:
public PooledConnection borrowConnection(ServerLocation server, long acquireTimeout, boolean onlyUseExistingCnx) throws AllConnectionsInUseException, NoAvailableServersException, ServerConnectivityException { PooledConnection connection; logger.trace("Connection borrowConnection single hop connection"); long waitStart = NOT_WAITING; try { long timeout = System.nanoTime() + MILLISECONDS.toNanos(acquireTimeout); while (true) { connection = availableConnectionManager.useFirst((c) -> c.getServer().equals(server)); if (null != connection) { return connection; } if (connectionAccounting.tryCreate()) { try { connection = createPooledConnection(server); if (null != connection) { return connection; } throw new NoAvailableServersException(); } finally { if (connection == null) { connectionAccounting.cancelTryCreate(); if (connectionAccounting.isUnderMinimum()) { startBackgroundPrefill(); } } } } if (checkShutdownInterruptedOrTimeout(timeout)) { break; } if (!onlyUseExistingCnx) { connection = forceCreateConnection(server); if (null != connection) { return connection; } throw new ServerConnectivityException(BORROW_CONN_ERROR_MSG + server); } waitStart = beginConnectionWaitStatIfNotStarted(waitStart); Thread.yield(); } } finally { endConnectionWaitStatIfStarted(waitStart); } cancelCriterion.checkCancelInProgress(null); throw new AllConnectionsInUseException(); }

Target:
public PooledConnection borrowConnection(ServerLocation server, long acquireTimeout, boolean onlyUseExistingCnx) throws AllConnectionsInUseException, NoAvailableServersException, ServerConnectivityException { PooledConnection connection; logger.trace("Connection borrowConnection single hop connection"); long waitStart = NOT_WAITING; try { long timeout = System.nanoTime() + MILLISECONDS.toNanos(acquireTimeout); while (true) { connection = availableConnectionManager.useFirst((c) -> c.getServer().equals(server)); if (null != connection) { return connection; } if (connectionAccounting.tryCreate()) { try { connection = createPooledConnection(server); if (null != connection) { return connection; } throw new NoAvailableServersException(); } finally { if (connection == null) { connectionAccounting.cancelTryCreate(); if (connectionAccounting.isUnderMinimum()) { startBackgroundPrefill(); } } } } if (!onlyUseExistingCnx) { connection = forceCreateConnection(server); if (null != connection) { return connection; } throw new ServerConnectivityException(BORROW_CONN_ERROR_MSG + server); } if (checkShutdownInterruptedOrTimeout(timeout)) { break; } waitStart = beginConnectionWaitStatIfNotStarted(waitStart); Thread.yield(); } } finally { endConnectionWaitStatIfStarted(waitStart); } cancelCriterion.checkCancelInProgress(null); throw new AllConnectionsInUseException(); }
Source:
public Iterable<String> getEdgeIds(Direction direction, String label, Authorizations authorizations) { getFetchHints().validateHasEdgeFetchHints(direction); return getEdgeIdsWithOtherVertexId(null, direction, labelToArrayOrNull(label), authorizations); }

Target:
public Iterable<String> getEdgeIds(Direction direction, String label, Authorizations authorizations) { getFetchHints().validateHasEdgeFetchHints(direction, label); return getEdgeIdsWithOtherVertexId(null, direction, labelToArrayOrNull(label), authorizations); }
Source:
public void stop(BundleContext context) throws Exception { for(IServer liveReloadServer : WSTUtils.findLiveReloadServers()) { WSTUtils.stop(liveReloadServer, 30, TimeUnit.SECONDS); } plugin = null; super.stop(context); }

Target:
public void stop(BundleContext context) throws Exception { for (IServer liveReloadServer : WSTUtils.findLiveReloadServers()) { try { WSTUtils.stop(liveReloadServer, 10, TimeUnit.SECONDS); } catch (TimeoutException e) { Logger.error("Failed to stop '" + liveReloadServer.getName() + "' within expected duration.", e); } catch (RuntimeException e) { Logger.error("Failed to stop '" + liveReloadServer.getName() + "'", e); } } plugin = null; super.stop(context); }
Source:
public DistStageAck executeOnSlave() { if (backupValueGeneratorClass != null) { backupValueGenerator = Utils.instantiateAndInit(slaveState.getClassLoader(), backupValueGeneratorClass, backupValueGeneratorParam); backupCacheValueChecker = new BackupCacheValueChecker(); int numBackups = backupCaches.size(); backupCacheInstances = new BasicOperations.Cache[numBackups]; if (debugable != null) { backupDebugable = new Debugable.Cache[numBackups]; } for (int i = 0; i < backupCaches.size(); i++) { String cacheName = backupCaches.get(i); backupCacheInstances[i] = basicOperations.getCache(cacheName); if (debugable != null) { backupDebugable[i] = debugable.getCache(cacheName); } } backupCacheValueChecker = new BackupCacheValueChecker(); } valueGenerator = getValueGenerator(); if (valueGenerator == null) { throw new IllegalStateException("Value generator has not been specified"); } mainCacheValueChecker = new MainCacheValueChecker(); return super.executeOnSlave(); }

Target:
public DistStageAck executeOnSlave() { if (backupValueGeneratorClass != null) { backupValueGenerator = Utils.instantiateAndInit(slaveState.getClassLoader(), backupValueGeneratorClass, backupValueGeneratorParam); backupCacheValueChecker = new BackupCacheValueChecker(); int numBackups = backupCaches.size(); backupCacheInstances = new BasicOperations.Cache[numBackups]; if (debugable != null) { backupDebugable = new Debugable.Cache[numBackups]; } for (int i = 0; i < backupCaches.size(); i++) { String cacheName = backupCaches.get(i); backupCacheInstances[i] = basicOperations.getCache(cacheName); if (debugable != null) { backupDebugable[i] = debugable.getCache(cacheName); } } } valueGenerator = getValueGenerator(); if (valueGenerator == null) { throw new IllegalStateException("Value generator has not been specified"); } mainCacheValueChecker = new MainCacheValueChecker(); return super.executeOnSlave(); }
Source:
public void testMapInvalidEnumValue() throws SQLException { Handle h = db.openHandle(); h.createStatement("insert into something (id, name) values (1, 'joe')").execute(); try { h.createQuery("select * from something order by id") .mapToBean(SomethingElse.class) .findFirst(); fail("Expected IllegalArgumentException was not thrown"); } catch (IllegalArgumentException e) { assertThat(e).isNotNull(); } }

Target:
public void testMapInvalidEnumValue() throws SQLException { Handle h = db.openHandle(); h.createStatement("insert into something (id, name) values (1, 'joe')").execute(); h.createQuery("select * from something order by id") .mapToBean(SomethingElse.class) .findFirst(); }
Source:
protected void onMethodInvocationFound(MethodInvocationTree subjectMit) { List<MethodInvocationTree> predicates = new ArrayList<>(); Optional<MethodInvocationTree> nextPredicate = MethodTreeUtils.subsequentMethodInvocation(subjectMit, ASSERTION_PREDICATES); while (nextPredicate.isPresent()) { predicates.add(nextPredicate.get()); nextPredicate = MethodTreeUtils.subsequentMethodInvocation(nextPredicate.get(), ASSERTION_PREDICATES); } boolean wasIssueRaised = checkPredicatesForSimplification( predicates, CONTEXT_FREE_SIMPLIFIERS, SimplifierWithoutContext::simplify, (predicate, replacement) -> reportIssue(ExpressionUtils.methodName(predicate), String.format("Use %s instead", replacement))); if (wasIssueRaised || predicates.size() > 1) { return; } checkPredicatesForSimplification( predicates, SIMPLIFIERS_WITH_CONTEXT, (simplifier, predicate) -> simplifier.simplify(subjectMit, predicate), (predicate, replacement) -> reportIssue(ExpressionUtils.methodName(predicate), String.format("Use %s instead", replacement), Collections.singletonList( new JavaFileScannerContext.Location("", subjectMit)), null)); }

Target:
protected void onMethodInvocationFound(MethodInvocationTree subjectMit) { List<MethodInvocationTree> predicates = new ArrayList<>(); Optional<MethodInvocationTree> nextPredicateOpt = MethodTreeUtils.consecutiveMethodInvocation(subjectMit); while (nextPredicateOpt.isPresent()) { MethodInvocationTree nextPredicate = nextPredicateOpt.get(); if (!ASSERTION_MESSAGE_METHODS.matches(nextPredicate)) { predicates.add(nextPredicate); } nextPredicateOpt = MethodTreeUtils.consecutiveMethodInvocation(nextPredicate); } boolean wasIssueRaised = checkPredicatesForSimplification( predicates, CONTEXT_FREE_SIMPLIFIERS, SimplifierWithoutContext::simplify, (predicate, replacement) -> reportIssue(ExpressionUtils.methodName(predicate), String.format(ISSUE_MESSAGE_FORMAT_STRING, replacement))); if (wasIssueRaised || predicates.size() > 1) { return; } checkPredicatesForSimplification( predicates, SIMPLIFIERS_WITH_CONTEXT, (simplifier, predicate) -> simplifier.simplify(subjectMit, predicate), (predicate, replacement) -> reportIssue(ExpressionUtils.methodName(predicate), String.format(ISSUE_MESSAGE_FORMAT_STRING, replacement), Collections.singletonList( new JavaFileScannerContext.Location("This can be simplified", subjectMit.arguments().get(0))), null)); }
Source:
String getLabel() { return "Conflicting"; }

Target:
String getLabel() { return UIText.ConflictingNode_Label; }
Source:
private PersistedCommandContext buildPersistedCommandContext() { PersistedCommandContext persistedCommandContext = new PersistedCommandContext(); persistedCommandContext.setJobId(getExecutionContext() == null || getExecutionContext().getJob() == null ? Guid.Empty : getExecutionContext().getJob().getId()); persistedCommandContext.setStepId(getExecutionContext() == null || getExecutionContext().getStep() == null ? Guid.Empty : getExecutionContext().getStep().getId()); persistedCommandContext.setExecutionMethod(getExecutionContext() == null ? ExecutionContext.ExecutionMethod.AsStep.toString() : getExecutionContext().getExecutionMethod().toString()); if (getExecutionContext() != null) { persistedCommandContext.setCompleted(getExecutionContext().isCompleted()); persistedCommandContext.setJobRequired(getExecutionContext().isJobRequired()); persistedCommandContext.setMonitored(getExecutionContext().isMonitored()); persistedCommandContext.setShouldEndJob(getExecutionContext().shouldEndJob()); persistedCommandContext.setTasksMonitored(getExecutionContext().isTasksMonitored()); } return persistedCommandContext; }

Target:
private PersistedCommandContext buildPersistedCommandContext() { PersistedCommandContext persistedCommandContext = new PersistedCommandContext(); persistedCommandContext.setJobId(getExecutionContext() == null || getExecutionContext().getJob() == null ? null : getExecutionContext().getJob().getId()); persistedCommandContext.setStepId(getExecutionContext() == null || getExecutionContext().getStep() == null ? null : getExecutionContext().getStep().getId()); persistedCommandContext.setExecutionMethod(getExecutionContext() == null ? ExecutionMethod.AsStep : getExecutionContext().getExecutionMethod()); if (getExecutionContext() != null) { persistedCommandContext.setCompleted(getExecutionContext().isCompleted()); persistedCommandContext.setJobRequired(getExecutionContext().isJobRequired()); persistedCommandContext.setMonitored(getExecutionContext().isMonitored()); persistedCommandContext.setShouldEndJob(getExecutionContext().shouldEndJob()); persistedCommandContext.setTasksMonitored(getExecutionContext().isTasksMonitored()); } return persistedCommandContext; }
Source:
protected Object getResult(String executionId) { if (isAsync(executionId)) { AsyncService service = getAsyncService(executionId); if (service != null) { Serializable taskId = getTransientStore().getParameter(executionId, TRANSIENT_STORE_TASK_ID); return service.getResult(taskId); } } Object output; List<Blob> blobs = getTransientStore().getBlobs(executionId); if (CollectionUtils.isNotEmpty(blobs)) { boolean isSingle = (boolean) getTransientStore().getParameter(executionId, TRANSIENT_STORE_OUTPUT_BLOB); output = isSingle ? blobs.get(0) : new BlobList(blobs); } else { output = getTransientStore().getParameter(executionId, TRANSIENT_STORE_OUTPUT); } if (output instanceof DocumentModel) { return attach((DocumentModel) output); } else if (output instanceof DocumentModelList) { return new DocumentModelListImpl( ((DocumentModelList) output).stream().map(this::attach).collect(Collectors.toList())); } return output; }

Target:
protected Object getResult(String executionId) { TransientStore ts = getTransientStore(); if (isAsync(executionId)) { AsyncService service = getAsyncService(executionId); if (service != null) { Serializable taskId = ts.getParameter(executionId, TRANSIENT_STORE_TASK_ID); return service.getResult(taskId); } } Object output; List<Blob> blobs = ts.getBlobs(executionId); if (CollectionUtils.isNotEmpty(blobs)) { boolean isSingle = (boolean) ts.getParameter(executionId, TRANSIENT_STORE_OUTPUT_BLOB); output = isSingle ? blobs.get(0) : new BlobList(blobs); } else { output = ts.getParameter(executionId, TRANSIENT_STORE_OUTPUT); } if (output instanceof DocumentModel) { attach((DocumentModel) output); } else if (output instanceof DocumentModelList) { ((DocumentModelList) output).forEach(this::attach); } return output; }
Source:
public static boolean fitsIntoType(ICPPBasicType target, ICPPBasicType source, IASTNode point) { if (target.getKind() == Kind.eBoolean && source.getKind() != Kind.eBoolean) return false; if (!source.isUnsigned() && target.isUnsigned()) return false; SizeAndAlignment sourceSizeAndAlignment = SizeofCalculator.getSizeAndAlignment(source, point); SizeAndAlignment targetSizeAndAlignment = SizeofCalculator.getSizeAndAlignment(target, point); if (sourceSizeAndAlignment == null || targetSizeAndAlignment == null) return true; long sizeofSource = sourceSizeAndAlignment.size; long sizeofTarget = targetSizeAndAlignment.size; if (sizeofSource == sizeofTarget) return target.isUnsigned() == source.isUnsigned(); else return sizeofSource < sizeofTarget; }

Target:
public static boolean fitsIntoType(ICPPBasicType target, ICPPBasicType source, IASTNode point) { if (target.getKind() == Kind.eBoolean && source.getKind() != Kind.eBoolean) return false; if (!source.isUnsigned() && target.isUnsigned()) return false; SizeAndAlignment sourceSizeAndAlignment = SizeofCalculator.getSizeAndAlignment(source, point); SizeAndAlignment targetSizeAndAlignment = SizeofCalculator.getSizeAndAlignment(target, point); long sizeofSource = sourceSizeAndAlignment == null ? getApproximateSize(source) : sourceSizeAndAlignment.size; long sizeofTarget = targetSizeAndAlignment == null ? getApproximateSize(target) : targetSizeAndAlignment.size; if (sizeofSource == sizeofTarget) return target.isUnsigned() == source.isUnsigned(); else return sizeofSource < sizeofTarget; }
Source:
private static Collection<Profile> loadProfiles(final URI uri) { final Collection<Profile> profiles = new HashSet<>(); final ResourceSet resourceSet = new ResourceSetImpl(); try { final Resource resource = resourceSet.getResource(uri, true); if (resource != null) { if (!resource.getContents().isEmpty()) { final Iterator<EObject> contentIt = resource.getAllContents(); while (contentIt.hasNext()) { final EObject content = contentIt.next(); if (content instanceof Profile) { profiles.add((Profile) content); } } } } } catch (final Exception ex) { Activator.log.error("Cannot load file: " + uri.toString(), ex); } return profiles; }

Target:
private static Collection<Profile> loadProfiles(final URI uri) { final Collection<Profile> profiles = new HashSet<>(); final ResourceSet resourceSet = new ResourceSetImpl(); try { final Resource resource = resourceSet.getResource(uri, true); if (null != resource) { if (!resource.getContents().isEmpty()) { final Iterator<EObject> contentIt = resource.getAllContents(); while (contentIt.hasNext()) { final EObject content = contentIt.next(); if (content instanceof Profile) { profiles.add((Profile) content); } } } } } catch (final Exception ex) { Activator.log.error("Cannot load file: " + uri.toString(), ex); } return profiles; }
Source:
public void testUrlFetch() throws Exception { Path testFilePath = Paths.get(UrlFetchTest.class.getProtectionDomain().getCodeSource().getLocation().getPath() + "/testdata.json"); UrlFetchRealtimeSourceConfig config = new UrlFetchRealtimeSourceConfig( testFilePath.toUri().toString(), 1L ); UrlFetchRealtimeSource source = new UrlFetchRealtimeSource(config); source.initialize(new MockRealtimeContext()); MockEmitter<StructuredRecord> emitter = new MockEmitter<>(); SourceState state = new SourceState(); source.poll(emitter, state); Assert.assertEquals(1, emitter.getEmitted().size()); StructuredRecord urlData = emitter.getEmitted().get(0); Assert.assertNotNull(urlData); Assert.assertNotNull(urlData.get("url")); Assert.assertNotNull(urlData.get("body")); }

Target:
public void testUrlFetch() throws Exception { UrlFetchRealtimeSourceConfig config = new UrlFetchRealtimeSourceConfig( String.format("http://%s:%s/ping", service.getBindAddress().getHostName(), service.getBindAddress().getPort()), 1L); UrlFetchRealtimeSource source = new UrlFetchRealtimeSource(config); source.initialize(new MockRealtimeContext()); MockEmitter<StructuredRecord> emitter = new MockEmitter<>(); SourceState state = new SourceState(); source.poll(emitter, state); Assert.assertEquals(1, emitter.getEmitted().size()); StructuredRecord urlData = emitter.getEmitted().get(0); Assert.assertNotNull(urlData); Assert.assertNotNull(urlData.get("url")); Assert.assertEquals("http://localhost:7777/ping", urlData.get("url")); Assert.assertNotNull(urlData.get("body")); Assert.assertEquals("OK", urlData.get("body")); Assert.assertNotNull(urlData.get("headers")); Assert.assertEquals("2", ((Map) urlData.get("headers")).get("Content-Length")); Assert.assertNotNull(urlData.get("responseCode")); Assert.assertEquals(200, urlData.get("responseCode")); }
Source:
void cancelTask() { LOGGER.log(Level.WARNING, "AddLogicalImageTask cancelled, processing may be incomplete"); cancelled = true; if (addMultipleImageTask != null) { addMultipleImageTask.cancelTask(); } if (!createVHD && !addingInterestingFiles) { deleteDestinationDirectory(); } }

Target:
void cancelTask() { LOGGER.log(Level.WARNING, "AddLogicalImageTask cancelled, processing may be incomplete"); synchronized (addMultipleImagesLock) { cancelled = true; if (addMultipleImagesTask != null) { addMultipleImagesTask.cancelTask(); } } }
Source:
protected Control createContents(Composite parent) { final Composite composite = createComposite(parent); System.out.println(composite.getBackground()); createAutoSaveCheckbox(composite); createAutoSaveGroup(composite); createIntervalPart(); createMessagesPart(); return composite; }

Target:
protected Control createContents(Composite parent) { final Composite composite = createComposite(parent); createAutoSaveCheckbox(composite); createAutoSaveGroup(composite); createIntervalPart(); createMessagesPart(); return composite; }
Source:
private boolean containsComment(GHPullRequest ghPullRequest, String expectedBody) { List<GHIssueComment> prComments = null; try { prComments = ghPullRequest.getComments(); } catch (IOException e) { logger.log(Level.WARNING, "Failed to get comments for PR " + ghPullRequest, e); return false; } for (GHIssueComment comment : prComments) { if (comment.getBody() != null && comment.getBody().contains(expectedBody)) { return true; } } return false; }

Target:
private boolean containsComment(GHPullRequest ghPullRequest, String expectedBody) { List<GHIssueComment> prComments; try { prComments = ghPullRequest.getComments(); } catch (IOException e) { LOGGER.log(Level.WARNING, "Failed to get comments for PR " + ghPullRequest, e); return false; } for (GHIssueComment comment : prComments) { if (comment.getBody() != null && comment.getBody().equals(expectedBody)) { return true; } } return false; }
Source:
public FactoryBuilder injectFormats(Span.Kind kind, Format format1, Format format2) { if (kind == null) throw new NullPointerException("kind == null"); if (format1 == null) throw new NullPointerException("format1 == null"); if (format2 == null) throw new NullPointerException("format2 == null"); kindToInjectFormats.put(kind, new Format[] {format1, format2}); return this; }

Target:
public FactoryBuilder injectFormats(Span.Kind kind, Format format1, Format format2) { if (kind == null) throw new NullPointerException("kind == null"); if (format1 == null) throw new NullPointerException("format1 == null"); if (format2 == null) throw new NullPointerException("format2 == null"); if (format1.equals(format2)) throw new IllegalArgumentException("format1 == format2"); if (!format1.equals(Format.MULTI) && !format2.equals(Format.MULTI)) { throw new IllegalArgumentException("One argument must be Format.MULTI"); } kindToInjectFormats.put(kind, new Format[] {format1, format2}); return this; }
Source:
for (String lib : bootPath) { if (lib.endsWith("rt.jar")) { File f = new File(lib); try { RT_JAR = f.toURI().toURL(); } catch (MalformedURLException e) { throw new RuntimeException("The java.lang classes cannot be loaded", e.getCause()); } } }

Target:
for (String lib : bootPath) { if (lib.endsWith("rt.jar")) { File f = new File(lib); try { foundJar = f.toURI().toURL(); } catch (MalformedURLException e) { throw new RuntimeException("The java.lang classes cannot be loaded", e.getCause()); } } }
Source:
public ConcurrentMap<String, Object> deserializeAttributes(final byte[] data ) { final Kryo kryo = _kryoPool.borrow(); Input in = null; try { in = kryo.getStreamFactory().getInput(data); return kryo.readObject(in, ConcurrentHashMap.class); } catch ( final RuntimeException e ) { throw new TranscoderDeserializationException( e ); } finally { IOUtils.closeQuietly(in); kryo.reset(); _kryoPool.release(kryo); } }

Target:
public ConcurrentMap<String, Object> deserializeAttributes(final byte[] data ) { final Kryo kryo = _kryoPool.borrow(); Input in = null; try { in = kryo.getStreamFactory().getInput(data); return kryo.readObject(in, ConcurrentHashMap.class); } catch ( final RuntimeException e ) { throw new TranscoderDeserializationException( e ); } finally { closeSilently(in); kryo.reset(); _kryoPool.release(kryo); } }
Source:
public void keySmallerThanTotalSize() { try { new ArrayGroupSort(3, 2); fail("should have failed"); } catch (IllegalArgumentException e) { } }

Target:
public void keySmallerThanTotalSize() { new ArrayGroupSort(3, 2); }
Source:
public String toString() { return "Script " + this.name + " from version " + from + " to " + to; }

Target:
public String toString() { return from != null && to != null ? "Script " + this.name + " from version " + from + " to " + to : "Script " + this.name; }
Source:
public void updateCookiesFromResponse(final HttpURLConnection conn) throws URISyntaxException, DolphinRemotingException { LOG.debug("adding cookies from response to cookie store"); Map<String, List<String>> headerFields = conn.getHeaderFields(); List<String> cookiesHeader = headerFields.get(PlatformConstants.SET_COOKIE_HEADER); if (cookiesHeader != null) { LOG.debug("found '{}' header field", PlatformConstants.SET_COOKIE_HEADER); for (String cookie : cookiesHeader) { if (cookie == null || cookie.isEmpty()) { continue; } LOG.debug("**************** will parse '{}' ", cookie); System.out.println("**************** will parse cookie : " + cookie); LOG.debug("will parse '{}' header content '{}'", cookie); List<HttpCookie> cookies = new ArrayList<>(); try { cookies.addAll(HttpCookie.parse(cookie)); } catch (Exception e) { throw new DolphinRemotingException("Can not convert '" + PlatformConstants.SET_COOKIE_HEADER + "' response header field to http cookies. Bad content: " + cookie); } LOG.debug("Found http cookies in header", cookies.size()); for (HttpCookie httpCookie : cookies) { cookieStore.add(conn.getURL().toURI(), httpCookie); } } } }

Target:
public void updateCookiesFromResponse(final HttpURLConnection conn) throws URISyntaxException, DolphinRemotingException { LOG.debug("adding cookies from response to cookie store"); Map<String, List<String>> headerFields = conn.getHeaderFields(); List<String> cookiesHeader = headerFields.get(PlatformConstants.SET_COOKIE_HEADER); if (cookiesHeader != null) { LOG.debug("found '{}' header field", PlatformConstants.SET_COOKIE_HEADER); for (String cookie : cookiesHeader) { if (cookie == null || cookie.isEmpty()) { continue; } LOG.debug("will parse '{}' header content '{}'", cookie); List<HttpCookie> cookies = new ArrayList<>(); try { cookies.addAll(HttpCookie.parse(cookie)); } catch (Exception e) { throw new DolphinRemotingException("Can not convert '" + PlatformConstants.SET_COOKIE_HEADER + "' response header field to http cookies. Bad content: " + cookie); } LOG.debug("Found http cookies in header", cookies.size()); for (HttpCookie httpCookie : cookies) { cookieStore.add(conn.getURL().toURI(), httpCookie); } } } }
Source:
public void init(PE exe) throws IOException { isLE = true; SectionHeader[] sections = exe.getSectionHeaders(); for (int i = 0; i < sections.length; i++) { String name = new String(sections[i].s_name).trim(); if (name.startsWith("/")) { int stringTableOffset = Integer.parseInt(name.substring(1)); name = exe.getStringTableEntry(stringTableOffset); } for (String element : Dwarf.DWARF_SCNNAMES) { if (name.equals(element)) { try { dwarfSections.put(element, sections[i].mapSectionData()); } catch (Exception e) { CCorePlugin.log(e); } } } } printEnabled = true; m_parsed = false; }

Target:
public void init(PE exe) throws IOException { isLE = true; SectionHeader[] sections = exe.getSectionHeaders(); for (int i = 0; i < sections.length; i++) { String name = new String(sections[i].s_name).trim(); if (name.startsWith("/")) { int stringTableOffset = Integer.parseInt(name.substring(1)); name = exe.getStringTableEntry(stringTableOffset); } for (String element : Dwarf.DWARF_SCNNAMES) { if (name.equals(element)) { try { dwarfSections.put(element, sections[i].mapSectionData()); } catch (Exception e) { CCorePlugin.log(e); } } } } printEnabled = false; m_parsed = false; }
Source:
public void creatingTopic_ifSubscribedToBranch_shouldReceiveBranchNotification() throws Exception { Topic topic = new Topic().withBranch(NOTIFICATION_BRANCH); User user = Users.signUpAndSignIn(); Branches.subscribe(topic.getBranch()); Users.signUpAndSignIn(); Topics.createTopic(topic); Users.logout(); Users.signIn(user); unsubscribeIgnoringFail(Branch branch); Notifications.assertBranchNotificationSentTo(topic.getBranch(), user); }

Target:
public void creatingTopic_ifSubscribedToBranch_shouldReceiveBranchNotification() throws Exception { Topic topic = new Topic().withBranch(NOTIFICATION_BRANCH); User user = Users.signUpAndSignIn(); Branches.subscribe(topic.getBranch()); Users.signUpAndSignIn(); Topics.createTopic(topic); Users.signIn(user); unsubscribeIgnoringFail(Branch branch); Notifications.assertNotificationOnTopicNotSentBranchSent(topic, user); }
Source:
public void inputChanged(Viewer viewer, Object oldInput, Object newInput) { this.viewer = (TreeViewer) viewer; this.outlineInfo = (OutlineInfo) newInput; resource = LSPEclipseUtils.findResourceFor(outlineInfo.info.getFileUri().toString()); resource.getWorkspace().addResourceChangeListener(this, IResourceChangeEvent.POST_CHANGE); super.setIsIncrementalReconciler(false); super.setIsAllowedToModifyDocument(false); super.install((ITextViewer) outlineInfo.textEditor.getAdapter(ITextOperationTarget.class)); }

Target:
public void inputChanged(Viewer viewer, Object oldInput, Object newInput) { this.viewer = (TreeViewer) viewer; this.outlineInfo = (OutlineInfo) newInput; resource = LSPEclipseUtils.findResourceFor(outlineInfo.info.getFileUri().toString()); resource.getWorkspace().addResourceChangeListener(this, IResourceChangeEvent.POST_CHANGE); if (outlineStrategyUpdater != null) { outlineStrategyUpdater.uninstall(); } ITextViewer textViewer = outlineInfo.textEditor == null ? null : ((ITextViewer) outlineInfo.textEditor.getAdapter(ITextOperationTarget.class)); outlineStrategyUpdater = textViewer == null ? new DocumentChangedOutlineStrategyUpdater(outlineInfo.info.getDocument()) : new ReconcilerOutlineStrategyUpdater(textViewer); outlineStrategyUpdater.install(); }
Source:
public void loadTrace(ITmfTrace trace) { super.loadTrace(trace); updateContent(); clearContent(); }

Target:
public void loadTrace(ITmfTrace trace) { super.loadTrace(trace); clearContent(); updateContent(); }
Source:
public Iterable<TmfXmlLocation> getLocations() { return new LinkedList<>(); }

Target:
public Iterable<TmfXmlLocation> getLocations() { return Collections.EMPTY_SET; }