auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
private static boolean canMatchPacket(final ITmfEvent event) { ITmfEventField content = event.getContent(); return ((content.getFieldValue(Long.class, TcpEventStrings.SEQ) != null) || (content.getFieldValue(Long.class, TcpEventStrings.ACKSEQ) != null) || (content.getFieldValue(Long.class, TcpEventStrings.FLAGS) != null)); }

Target:
private static boolean canMatchPacket(final ITmfEvent event) { ITmfEventField content = event.getContent(); return ((content.getFieldValue(Long.class, TcpEventStrings.SEQ) == null) || (content.getFieldValue(Long.class, TcpEventStrings.ACKSEQ) == null) || (content.getFieldValue(Long.class, TcpEventStrings.FLAGS) == null)); }
Source:
private IWorkbenchPage getActiveWorkbenchPage() { IWorkbenchPage result = null; IWorkbenchWindow workbenchWindow = PlatformUI.getWorkbench().getActiveWorkbenchWindow(); if (workbenchWindow != null) { result = workbenchWindow.getActivePage(); } if (result != null) { } return result; }

Target:
private IWorkbenchPage getActiveWorkbenchPage() { IWorkbenchPage result = null; IWorkbenchWindow workbenchWindow = PlatformUI.getWorkbench().getActiveWorkbenchWindow(); if (workbenchWindow != null) { result = workbenchWindow.getActivePage(); } return result; }
Source:
public WikiNotificationDisplayer(DocumentReference authorReference, TemplateManager templateManager, ScriptContextManager scriptContextManager, ComponentManager componentManager, BaseObject baseObject) throws NotificationException { this.objectReference = baseObject.getReference(); this.authorReference = authorReference; this.templateManager = templateManager; this.scriptContextManager = scriptContextManager; this.componentManager = componentManager; this.eventType = this.extractProperty(baseObject, WikiNotificationDisplayerDocumentInitializer.EVENT_TYPE); this.supportedEvents = Arrays.asList(this.eventType); try { this.notificationTemplate = templateManager.createStringTemplate( this.extractProperty(baseObject, WikiNotificationDisplayerDocumentInitializer.NOTIFICATION_TEMPLATE), this.getAuthorReference()); } catch (Exception e) { throw new NotificationException( String.format("Unable to render the template provided in the base object [%s]", baseObject), e); } }

Target:
public WikiNotificationDisplayer(DocumentReference authorReference, TemplateManager templateManager, ScriptContextManager scriptContextManager, ComponentManager componentManager, BaseObject baseObject) throws NotificationException { this.objectReference = baseObject.getReference(); this.authorReference = authorReference; this.templateManager = templateManager; this.scriptContextManager = scriptContextManager; this.componentManager = componentManager; this.eventType = this.extractProperty(baseObject, WikiNotificationDisplayerDocumentInitializer.EVENT_TYPE); this.supportedEvents = Arrays.asList(this.eventType); try { String xObjectTemplate = this.extractProperty(baseObject, WikiNotificationDisplayerDocumentInitializer.NOTIFICATION_TEMPLATE); if (!StringUtils.isBlank(xObjectTemplate)) { this.notificationTemplate = templateManager.createStringTemplate( xObjectTemplate, this.getAuthorReference()); } else { this.notificationTemplate = null; } } catch (Exception e) { throw new NotificationException( String.format("Unable to render the template provided in the base object [%s]", baseObject), e); } }
Source:
public void workListStep(StateReturn stateReturn) { if (finishStateReturn(stateReturn)) { State state = stateReturn.key.stateCall.key.state; if (state instanceof ExitState) { for (StateCall stateCall : stateReturn.key.stateCall.key.ntCall.callers) { s.stateReturnWorkList.enqueue( s.getStateReturn( new StateReturn.Key(stateCall, stateReturn.key.stateEnd))); } } else if (state instanceof NextableState) { for (State nextState : ((NextableState) state).next) { activateStateCall(s.getStateCall(new StateCall.Key( stateReturn.key.stateCall.key.ntCall, stateReturn.key.stateEnd, nextState)), stateReturn.function); } } else { unknownStateType(); } } }

Target:
private void workListStep(StateReturn stateReturn) { if (finishStateReturn(stateReturn)) { State state = stateReturn.key.stateCall.key.state; if (state instanceof ExitState) { for (StateCall stateCall : stateReturn.key.stateCall.key.ntCall.callers) { s.stateReturnWorkList.enqueue( s.stateReturns.get( new StateReturn.Key(stateCall, stateReturn.key.stateEnd))); } } else if (state instanceof NextableState) { for (State nextState : ((NextableState) state).next) { activateStateCall(s.stateCalls.get(new StateCall.Key( stateReturn.key.stateCall.key.ntCall, stateReturn.key.stateEnd, nextState)), stateReturn.function); } } else { throw unknownStateType(); } } }
Source:
public void add(long value, double weight) { checkArgument(count > 0, "count must be > 0"); boolean needsCompression = false; if (alpha > 0.0) { long nowInSeconds = TimeUnit.NANOSECONDS.toSeconds(ticker.read()); if (nowInSeconds - landmarkInSeconds >= RESCALE_THRESHOLD_SECONDS) { rescale(nowInSeconds); needsCompression = true; } weight = weight(nowInSeconds) * count; } max = Math.max(max, value); min = Math.min(min, value); double previousCount = weightedCount; insert(longToBits(value), weight); int compressionFactor = calculateCompressionFactor(); if (needsCompression || ((long) previousCount) / compressionFactor != ((long) weightedCount) / compressionFactor) { compress(); } }

Target:
public void add(long value, double weight) { checkArgument(weight > 0, "weight must be > 0"); boolean needsCompression = false; if (alpha > 0.0) { long nowInSeconds = TimeUnit.NANOSECONDS.toSeconds(ticker.read()); if (nowInSeconds - landmarkInSeconds >= RESCALE_THRESHOLD_SECONDS) { rescale(nowInSeconds); needsCompression = true; } weight *= weight(nowInSeconds); } max = Math.max(max, value); min = Math.min(min, value); double previousCount = weightedCount; insert(longToBits(value), weight); int compressionFactor = calculateCompressionFactor(); if (needsCompression || ((long) previousCount) / compressionFactor != ((long) weightedCount) / compressionFactor) { compress(); } }
Source:
public TupleExpressionOrcPredicate(TupleExpression<C> effectivePredicate, Map<C, ColumnReference<C>> columnReferences, boolean orcBloomFiltersEnabled) { this.effectivePredicate = requireNonNull(effectivePredicate, "effectivePredicate is null"); this.columnReferences = columnReferences; this.orcBloomFiltersEnabled = orcBloomFiltersEnabled; }

Target:
public TupleExpressionOrcPredicate(TupleExpression<C> effectivePredicate, Map<C, ColumnReference<C>> columnReferences, boolean orcBloomFiltersEnabled) { this.effectivePredicate = requireNonNull(effectivePredicate, "effectivePredicate is null"); this.columnReferences = requireNonNull(columnReferences, "columnReferences is null"); this.orcBloomFiltersEnabled = requireNonNull(orcBloomFiltersEnabled, "orcBloomFiltersEnabled is null"); }
Source:
public void toFile(File file) throws Exception { PrintWriter out = new PrintWriter(file, "UTF-8"); try { out.write(graph()); } finally { Closeables.close(out, false); } }

Target:
public void toFile(File file) throws Exception { PrintWriter out = new PrintWriter(file, "UTF-8"); try { out.write(graph()); } finally { Closeables.close(out, true); } }
Source:
private boolean isSuspiciousGlobalFunction(FunctionCallTree tree) { ExpressionTree callee = tree.callee(); if (callee.is(Tree.Kind.NAMESPACE_NAME)) { NamespaceNameTree namespaceName = (NamespaceNameTree) callee; QualifiedName qualifiedName = getFullyQualifiedName(namespaceName); return IO_FUNCTIONS.stream().anyMatch(matcher -> matcher.matches(qualifiedName, tree.arguments())); } return false; }

Target:
private boolean isSuspiciousGlobalFunction(FunctionCallTree tree) { ExpressionTree callee = tree.callee(); if (callee.is(Tree.Kind.NAMESPACE_NAME)) { QualifiedName qualifiedName = getFullyQualifiedName((NamespaceNameTree) callee); SeparatedList<ExpressionTree> args = tree.arguments(); return IO_FUNCTIONS.stream().anyMatch(matcher -> matcher.matches(qualifiedName, args)); } return false; }
Source:
protected void logThresholdExceededAlerts(List<GatewaySenderEventImpl> events) { if (getSender().getAlertThreshold() > 0) { Iterator it = events.iterator(); long currentTime = System.currentTimeMillis(); while (it.hasNext()) { try { Object o = it.next(); if (o != null && o instanceof GatewaySenderEventImpl) { GatewaySenderEventImpl ge = (GatewaySenderEventImpl) o; if (ge.getCreationTime() + getSender().getAlertThreshold() < currentTime) { logger.warn( "{} event for region={} key={} value={} was in the queue for milliseconds", new Object[] {ge.getOperation(), ge.getRegionPath(), ge.getKey(), ge.getValueAsString(true), currentTime - ge.getCreationTime()}); getSender().getStatistics().incEventsExceedingAlertThreshold(); } } } catch (Exception e) { logger.warn("Caught the following exception attempting to log threshold exceeded alert:", e); getSender().getStatistics().incEventsExceedingAlertThreshold(); } } } }

Target:
protected void logThresholdExceededAlerts(List<GatewaySenderEventImpl> events) { if (getSender().getAlertThreshold() > 0) { long currentTime = System.currentTimeMillis(); for (GatewaySenderEventImpl event : events) { try { if (event.getCreationTime() + getSender().getAlertThreshold() < currentTime) { logger.warn( "{} event for region={} key={} value={} was in the queue for milliseconds", new Object[] {event.getOperation(), event.getRegionPath(), event.getKey(), event.getValueAsString(true), currentTime - event.getCreationTime()}); getSender().getStatistics().incEventsExceedingAlertThreshold(); } } catch (Exception e) { logger.warn("Caught the following exception attempting to log threshold exceeded alert:", e); getSender().getStatistics().incEventsExceedingAlertThreshold(); } } } }
Source:
Option(String option) { this.option = option; }

Target:
private Option(String option) { this.option = option; }
Source:
EventHubProducer(EventHubAsyncProducer producer, Duration tryTimeout) { this.producer = Objects.requireNonNull(producer, "'producer' cannot be null."); this.tryTimeout = Objects.requireNonNull(tryTimeout, "'getTryTimeout' cannot be null."); }

Target:
EventHubProducer(EventHubAsyncProducer producer, Duration tryTimeout) { this.producer = Objects.requireNonNull(producer, "'producer' cannot be null."); this.tryTimeout = Objects.requireNonNull(tryTimeout, "'tryTimeout' cannot be null."); }
Source:
private void subscribeTopicTagsChanged( @UIEventTopic(UIEvents.ApplicationElement.TOPIC_TAGS) Event event) { Object changedObj = event.getProperty(EventTags.ELEMENT); if (!(changedObj instanceof MToolBar) || !(changedObj instanceof MToolBar)) return; final MUIElement changedElement = (MUIElement) changedObj; if (UIEvents.isADD(event)) { if (UIEvents.contains(event, UIEvents.EventTags.NEW_VALUE, HIDDEN_BY_USER)) { changedElement.setVisible(false); } } else if (UIEvents.isREMOVE(event)) { if (UIEvents.contains(event, UIEvents.EventTags.OLD_VALUE, HIDDEN_BY_USER)) { changedElement.setVisible(true); } } }

Target:
private void subscribeTopicTagsChanged( @UIEventTopic(UIEvents.ApplicationElement.TOPIC_TAGS) Event event) { Object changedObj = event.getProperty(EventTags.ELEMENT); if (!(changedObj instanceof MToolBar)) return; final MUIElement changedElement = (MUIElement) changedObj; if (UIEvents.isADD(event)) { if (UIEvents.contains(event, UIEvents.EventTags.NEW_VALUE, HIDDEN_BY_USER)) { changedElement.setVisible(false); } } else if (UIEvents.isREMOVE(event)) { if (UIEvents.contains(event, UIEvents.EventTags.OLD_VALUE, HIDDEN_BY_USER)) { changedElement.setVisible(true); } } }
Source:
public Set<String> reviewed() throws RestApiException { String request = getRequestPath() + "/files?reviewed"; JsonElement jsonElement = gerritRestClient.getRequest(request); return new HashSet<>(reviewInfoParser.parseFileInfos(jsonElement)); }

Target:
public Set<String> reviewed() throws RestApiException { String request = getRequestPath() + "/files?reviewed"; JsonElement jsonElement = gerritRestClient.getRequest(request); return reviewInfoParser.parseFileInfos(jsonElement); }
Source:
public String getMessage() { final String baseMessage = super.getMessage(); StringBuilder errorInformationMessage = new StringBuilder().append(baseMessage); if (errorInformationList.size() > 0) { for (ErrorInformation errorInformation : errorInformationList) { errorInformationMessage.append(", " + "errorCode" + ": [" + errorInformation.getCode() + "], " + "message" + ": " + errorInformation.getMessage()); } } return errorInformationMessage.toString(); }

Target:
public String getMessage() { return this.errorInformationMessage; }
Source:
public void makeChange(BibDatabaseContext database, NamedCompound undoEdit) { database.getDatabase().insertEntry(mergePanel.getMergeEntry()); undoEdit.addEdit(new UndoableInsertEntry(database.getDatabase(), mergePanel.getMergeEntry())); }

Target:
public void makeChange(BibDatabaseContext database, NamedCompound undoEdit) { database.getDatabase().removeEntry(oldEntry); database.getDatabase().insertEntry(mergePanel.getMergeEntry()); undoEdit.addEdit(new UndoableInsertEntry(database.getDatabase(), oldEntry)); undoEdit.addEdit(new UndoableInsertEntry(database.getDatabase(), mergePanel.getMergeEntry())); }
Source:
private void makePostRequest() { if (!hasTaskLaunched && !inErrorState) { RequestBody requestBody = ModernHttpRequester.getPostBody(params); ModernHttpTask postTask = new ModernHttpTask(this, url.toString(), new HashMap(), requestBody, HTTPMethod.POST, null); postTask.connect((CommCareTaskConnector)this); postTask.executeParallel(); hasTaskLaunched = true; } }

Target:
private void makePostRequest() { try { if (!hasTaskLaunched && !inErrorState) { RequestBody requestBody = ModernHttpRequester.getPostBody(params); ModernHttpTask postTask = new ModernHttpTask(this, url.toString(), new HashMap(), getContentHeadersForXFormPost(requestBody), requestBody, HTTPMethod.POST, null); postTask.connect((CommCareTaskConnector)this); postTask.executeParallel(); hasTaskLaunched = true; } } catch (IOException e) { handleIOException(e); } }
Source:
public void checkNodeJoinWithStaticCacheConfig( boolean client, boolean activateBeforeJoin, boolean newCfg ) throws Exception { if (!newCfg) configureCache = true; startGrid(GRID_0); startGrid(GRID_6); IgniteEx client1 = startClientGrid("client1"); if (newCfg) configureCache = true; if (activateBeforeJoin) grid(GRID_0).cluster().state(ClusterState.ACTIVE); if (client && newCfg) { String msg = "Joining node has encrypted caches which are not presented on the cluster, " + "encrypted caches configured on client node cannot be started when such node joins " + "the cluster, these caches can be started manually (dynamically) after node is joined " + "[caches=" + cacheName() + ']'; GridTestUtils.assertThrowsAnyCause(log, () -> startClientGrid(CLIENT), IgniteSpiException.class, msg); return; } IgniteEx node = client ? startClientGrid(CLIENT) : startGrid(GRID_7); if (!activateBeforeJoin) grid(GRID_0).cluster().state(ClusterState.ACTIVE); awaitPartitionMapExchange(); IgniteCache<Object, Object> cache = node.cache(cacheName()); assertNotNull(cache); for (long i = 0; i < 100; i++) cache.put(i, String.valueOf(i)); checkEncryptedCaches(grid(GRID_0), grid(GRID_6)); checkEncryptedCaches(grid(GRID_0), client1); checkData(client1); if (client) { checkEncryptedCaches(grid(GRID_0), grid(CLIENT)); checkData(grid(CLIENT)); return; } checkEncryptedCaches(grid(GRID_7), grid(GRID_0)); }

Target:
private void checkNodeJoinWithStaticCacheConfig( boolean client, boolean activateBeforeJoin, boolean newCfg ) throws Exception { if (!newCfg) configureCache = true; startGrid(GRID_0); startGrid(GRID_6); IgniteEx client1 = startClientGrid("client1"); if (newCfg) configureCache = true; if (activateBeforeJoin) grid(GRID_0).cluster().state(ClusterState.ACTIVE); if (client && newCfg) { String expErrMsg = "Joining node has encrypted caches which are not presented on the cluster, " + "encrypted caches configured on client node cannot be started when such node joins " + "the cluster, these caches can be started manually (dynamically) after node is joined " + "[caches=" + cacheName() + ']'; GridTestUtils.assertThrowsAnyCause(log, () -> startClientGrid(CLIENT), IgniteSpiException.class, expErrMsg); return; } IgniteEx node = client ? startClientGrid(CLIENT) : startGrid(GRID_7); if (!activateBeforeJoin) grid(GRID_0).cluster().state(ClusterState.ACTIVE); awaitPartitionMapExchange(); IgniteCache<Object, Object> cache = node.cache(cacheName()); assertNotNull(cache); for (long i = 0; i < 100; i++) cache.put(i, String.valueOf(i)); checkEncryptedCaches(grid(GRID_0), grid(GRID_6)); checkEncryptedCaches(grid(GRID_0), client1); checkData(client1); if (client) { checkEncryptedCaches(grid(GRID_0), grid(CLIENT)); checkData(grid(CLIENT)); } else checkEncryptedCaches(grid(GRID_7), grid(GRID_0)); }
Source:
public void configure(BrokerPool pool, Path dataDir, Element config) throws DatabaseConfigurationException { super.configure(pool, dataDir, config); try { checkDatabase(); } catch (ClassNotFoundException | SQLException e) { throw new DatabaseConfigurationException(e.getMessage()); } }

Target:
public void configure(BrokerPool pool, Path dataDir, Element config) throws DatabaseConfigurationException { super.configure(pool, dataDir, config); try { checkDatabase(); } catch (final ClassNotFoundException | SQLException e) { throw new DatabaseConfigurationException(e.getMessage()); } }
Source:
public synchronized void startup() { if (sessionTracker == null) { createSessionTracker(); } startSessionTracker(); setupRequestProcessors(); startRequestThrottler(); registerJMX(); startJvmPauseMonitor(); registerMetrics(); setState(State.RUNNING); requestPathMetricsCollector.start(); localSessionEnabled = sessionTracker instanceof UpgradeableSessionTracker && ((UpgradeableSessionTracker) sessionTracker).isLocalSessionsEnabled(); notifyAll(); }

Target:
public synchronized void startup() { if (sessionTracker == null) { createSessionTracker(); } startSessionTracker(); setupRequestProcessors(); startRequestThrottler(); registerJMX(); startJvmPauseMonitor(); registerMetrics(); setState(State.RUNNING); requestPathMetricsCollector.start(); localSessionEnabled = sessionTracker.isLocalSessionsEnabled(); notifyAll(); }
Source:
private Map<String, String> findConfiguredMetaTags(final Map<String, String> properties) { Map<String, String> filteredMap = new HashMap<>(); properties .entrySet() .stream() .filter(e -> e.getKey().startsWith(MetaTagConfiguration.CONFIG_PREFIX_FOR_TAGS)) .forEach((entry) -> filteredMap.put(entry.getKey().substring(MetaTagConfiguration.CONFIG_PREFIX_FOR_TAGS.length()), entry.getValue())); return filteredMap; }

Target:
private Map<String, String> findConfiguredMetaTags(final Map<String, String> properties) { Map<String, String> filteredMap = new HashMap<>(); return properties .entrySet() .stream() .filter(e -> e.getKey().startsWith(MetaTagConfiguration.CONFIG_PREFIX_FOR_TAGS)) .collect(Collectors.toMap((entry) -> entry.getKey().substring(MetaTagConfiguration.CONFIG_PREFIX_FOR_TAGS.length()), Map.Entry::getValue)); }
Source:
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { View view; view = inflater.inflate(R.layout.fragment_course_dashboard, container, false); courseTextName = (TextView) view.findViewById(R.id.course_detail_name); courseTextDetails = (TextView) view.findViewById(R.id.course_detail_extras); headerImageView = (ImageView) view.findViewById(R.id.header_image_view); headerPlayIcon = (ImageView) view.findViewById(R.id.header_play_icon); courseDetailLayout = (LinearLayout) view.findViewById(R.id.dashboard_detail); headerPlayIcon.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { String url = environment.getConfig().getApiHostURL() + courseDetail.media.course_video.uri; Uri uri = Uri.parse(url); Intent intent = new Intent(Intent.ACTION_VIEW, uri); startActivity(intent); } }); return view; }

Target:
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { View view; view = inflater.inflate(R.layout.fragment_course_dashboard, container, false); courseTextName = (TextView) view.findViewById(R.id.course_detail_name); courseTextDetails = (TextView) view.findViewById(R.id.course_detail_extras); headerImageView = (ImageView) view.findViewById(R.id.header_image_view); headerPlayIcon = (ImageView) view.findViewById(R.id.header_play_icon); courseDetailLayout = (LinearLayout) view.findViewById(R.id.dashboard_detail); headerPlayIcon.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { Uri uri = Uri.parse(courseDetail.media.course_video.uri); Intent intent = new Intent(Intent.ACTION_VIEW, uri); startActivity(intent); } }); return view; }
Source:
public String getDockerHost() { if (isUnixSocketUri(dockerDaemonUri)) { return "localhost"; } else { return getDockerHostIp(); } }

Target:
public String getDockerHost() { return isUnixSocketUri(dockerDaemonUri) ? "localhost" : dockerDaemonUri.getHost(); }
Source:
public void setMsqMaxSelectableChoices(int qnNumber, int value) { assertTrue(isMsqMaxSelectableChoicesEnabled(qnNumber)); WebElement inputBox = getMsqMaxSelectableChoicesBox(qnNumber); JavascriptExecutor exec = (JavascriptExecutor) browser.driver; String id = inputBox.getAttribute("id"); exec.executeScript(String.format("$('#%s').val(%d);$('#%s').change();", id, value, id)); }

Target:
public void setMsqMaxSelectableChoices(int qnNumber, int value) { assertTrue(isMsqMaxSelectableChoicesEnabled(qnNumber)); WebElement inputBox = getMsqMaxSelectableChoicesBox(qnNumber); String id = inputBox.getAttribute("id"); executeScript(String.format("$('#%s').val(%d);$('#%s').change();", id, value, id)); }
Source:
public void testMetricReporterSetupViaSPI() { Set<Class<? extends MetricReporterFactory>> loadedFactories = StreamSupport .stream(ServiceLoader.load(MetricReporterFactory.class).spliterator(), false) .map(MetricReporterFactory::getClass) .collect(Collectors.toSet()); assertThat(loadedFactories , hasItem(DatadogHttpReporterFactory.class)); }

Target:
public void testMetricReporterSetupViaSPI() { MetricReporterTestUtils.testMetricReporterSetupViaSPI(DatadogHttpReporterFactory.class); }
Source:
private void delete() { if (mMessage != null) { mFragmentListener.disableDeleteAction(); LocalMessage messageToDelete = mMessage; mFragmentListener.showNextMessageOrReturn(); mController.deleteMessages(Collections.singletonList(messageToDelete.makeMessageReference()), null); } }

Target:
private void delete() { if (mMessage != null) { mFragmentListener.disableDeleteAction(); LocalMessage messageToDelete = mMessage; mFragmentListener.showNextMessageOrReturn(); mController.deleteMessage(mMessageReference, null); } }
Source:
protected void setSchema(final String schema) throws DatabaseEngineException { final String findSchemaQuery = "SELECT count(*) FROM syscat.schemata WHERE SCHEMANAME = '" + schema + "'"; final boolean schemaExists; try (final Statement stmt = conn.createStatement(); final ResultSet resultSet = stmt.executeQuery(findSchemaQuery)) { schemaExists = resultSet.next() && resultSet.getInt(1) == 1; stmt.execute("SET CURRENT SCHEMA " + quotize(schema)); } catch (Exception e) { throw new DatabaseEngineException(String.format("Could not set current schema to '%s'", schema), e); } if (!schemaExists) { throw new DatabaseEngineException(String.format("Schema '%s' doesn't exist", schema)); } }

Target:
protected void setSchema(final String schema) throws DatabaseEngineException { final boolean schemaExists; try (final PreparedStatement ps = conn.prepareStatement("SELECT count(*) FROM syscat.schemata WHERE SCHEMANAME = ?")) { ps.setString(1, schema); try (final ResultSet resultSet = ps.executeQuery()) { schemaExists = resultSet.next() && resultSet.getInt(1) == 1; } } catch (final Exception e) { throw new DatabaseEngineException(String.format("Could not set current schema to '%s'", schema), e); } if (!schemaExists) { throw new DatabaseEngineException(String.format("Could not set current schema to non existing '%s'", schema)); } try (final PreparedStatement ps = conn.prepareStatement("SET CURRENT SCHEMA ?")) { ps.setString(1, schema); ps.execute(); } catch (final Exception e) { throw new DatabaseEngineException(String.format("Could not set current schema to '%s'", schema), e); } }
Source:
private List<VM> getVmsDiskPluggedTo() { if (vmsDiskPluggedTo == null) { vmsDiskPluggedTo = getVmDAO().getForDisk(getImage().getId()).get(Boolean.TRUE); if (vmsDiskPluggedTo == null) { vmsDiskPluggedTo = new ArrayList<VM>(); } } return vmsDiskPluggedTo; }

Target:
private List<VM> getVmsDiskPluggedTo() { if (vmsDiskPluggedTo == null) { vmsDiskPluggedTo = getVmDAO().getForDisk(getImage().getId()).get(Boolean.TRUE); if (vmsDiskPluggedTo == null) { vmsDiskPluggedTo = Collections.emptyList(); } } return vmsDiskPluggedTo; }
Source:
public MacrosInput macros() { MacrosInput macros = emptyMacrosInput(); macros.put("NAME", this.getOpiTitle()); macros.put("P", Instrument.getInstance().currentInstrument().pvPrefix()); return macros; }

Target:
public MacrosInput macros() { MacrosInput macros = emptyMacrosInput(); macros.put("NAME", getOpiTitle()); macros.put("P", Instrument.getInstance().currentInstrument().pvPrefix()); return macros; }
Source:
public void registerMetric(String name, IMetric metric, int timeBucketSizeInSecs) { _registeredMetrics.add(new MetricHolder(name, metric, timeBucketSizeInSecs)); }

Target:
public IMetric registerMetric(String name, IMetric metric, int timeBucketSizeInSecs) { if((Boolean)_openOrPrepareWasCalled.deref() == true) { throw new RuntimeException("TopologyContext.registerMetric can only be called from within overridden " + "IBolt::prepare() or ISpout::open() method."); } Map m1 = _registeredMetrics; if(!m1.containsKey(timeBucketSizeInSecs)) { m1.put(timeBucketSizeInSecs, new HashMap()); } Map m2 = (Map)m1.get(timeBucketSizeInSecs); if(!m2.containsKey(_taskId)) { m2.put(_taskId, new HashMap()); } Map m3 = (Map)m2.get(_taskId); if(m3.containsKey(name)) { throw new RuntimeException("The same metric name `" + name + "` was registered twice." ); } else { m3.put(name, metric); } return metric; }
Source:
public void testSystemTableDoesNotSplit() throws Exception { HBaseTestingUtility testUtil = getUtility(); for (int i=0; i<10; i++) { createTable("schema"+i+".table_"+i); } TableName systemCatalog = TableName.valueOf("SYSTEM.CATALOG"); RegionLocator rl = testUtil.getConnection().getRegionLocator(systemCatalog); assertEquals(rl.getAllRegionLocations().size(), 1); try { testUtil.getHBaseAdmin().split(systemCatalog); testUtil.getHBaseAdmin().disableTable(systemCatalog); testUtil.getHBaseAdmin().enableTable(systemCatalog); } catch (DoNotRetryIOException e) { assert (e.getMessage().contains("NOT splittable")); } rl = testUtil.getConnection().getRegionLocator(systemCatalog); assertEquals(1, rl.getAllRegionLocations().size()); }

Target:
public void testSystemTableDoesNotSplit() throws Exception { HBaseTestingUtility testUtil = getUtility(); for (int i=0; i<10; i++) { createTableAndTenantViews("schema"+i+".table_"+i); } TableName systemCatalog = TableName.valueOf( PhoenixDatabaseMetaData.SYSTEM_CATALOG_NAME); RegionLocator rl = testUtil.getConnection() .getRegionLocator(systemCatalog); assertEquals(1, rl.getAllRegionLocations().size()); try { testUtil.getHBaseAdmin().split(systemCatalog); testUtil.getHBaseAdmin().disableTable(systemCatalog); testUtil.getHBaseAdmin().enableTable(systemCatalog); } catch (DoNotRetryIOException e) { assertTrue(e.getMessage().contains("NOT splittable")); } rl = testUtil.getConnection().getRegionLocator(systemCatalog); assertEquals(1, rl.getAllRegionLocations().size()); }
Source:
protected void updateOvfForTemplatesOfStoragePool(Guid poolId) { List<Guid> templateIdsForUpdate = getVmAndTemplatesGenerationsDao(). getVmTemplatesIdsForOvfUpdate(poolId); int i = 0; while (i < templateIdsForUpdate.size()) { int size = Math.min(templateIdsForUpdate.size() - i, ITEMS_COUNT_PER_UPDATE); List<Guid> idsToProcess = templateIdsForUpdate.subList(i, i + size); i += size; Map<Guid, KeyValuePairCompat<String, List<Guid>>> vmsAndTemplateMetadata = populateTemplatesMetadataForOvfUpdate(idsToProcess); if (!vmsAndTemplateMetadata.isEmpty()) { performOvfUpdate(poolId, vmsAndTemplateMetadata); } } }

Target:
protected void updateOvfForTemplatesOfStoragePool(Guid poolId) { List<Guid> templateIdsForUpdate = getVmAndTemplatesGenerationsDao().getVmTemplatesIdsForOvfUpdate(poolId); int i = 0; while (i < templateIdsForUpdate.size()) { int size = Math.min(templateIdsForUpdate.size() - i, itemsCountPerUpdate); List<Guid> idsToProcess = templateIdsForUpdate.subList(i, i + size); i += size; Map<Guid, KeyValuePairCompat<String, List<Guid>>> vmsAndTemplateMetadata = populateTemplatesMetadataForOvfUpdate(idsToProcess); if (!vmsAndTemplateMetadata.isEmpty()) { performOvfUpdate(poolId, vmsAndTemplateMetadata); } } }
Source:
public Boolean visitLiteral(LiteralTree reference, Tree tree) { Optional<LiteralTree> other = checkTypeAndCast(reference, tree); return other.isPresent() && (reference.getValue() == null ? other.get().getValue() == null : reference.getValue().equals(other.get().getValue())); }

Target:
public Boolean visitLiteral(LiteralTree reference, Tree tree) { Optional<LiteralTree> other = checkTypeAndCast(reference, tree); return other.isPresent() && Objects.equal(reference.getValue(), other.get().getValue()); }
Source:
ConfiguredRolesAllowedPastLoginFilter(String[] rolesAllowed) { this.denyAll = false; this.rolesAllowed = (rolesAllowed != null) ? rolesAllowed : new String[] {}; }

Target:
ConfiguredRolesAllowedPastLoginFilter(String[] rolesAllowed) { this.rolesAllowed = (rolesAllowed != null) ? rolesAllowed : null; }
Source:
public void testCrossCacheTransactionInAnotherThreadContinued() throws Exception { withAllIsolationsAndConcurrencies(new IgniteClosure<Object, Void>() { @Override public Void apply(Object o) { try { crossCacheTransactionInAnotherThreadContinued(); } catch (Exception ignore) { } return null; } }); }

Target:
public void testCrossCacheTransactionInAnotherThreadContinued() throws Exception { runWithAllIsolations(new IgniteCallable<Void>() { @Override public Void call() throws Exception { crossCacheTransactionInAnotherThreadContinued(); return null; } }); }
Source:
public void testFindTaskWithIncompatibleTypeFilter() throws Exception { assertClientException( () -> searchServicesClient.findHumanTasksWithFilters(createQueryFilterEqualsTo(TaskField.NAME, 1), 0, 100), 500, "Can't lookup on specified data set: getTasksWithFilters"); }

Target:
public void testFindTaskWithIncompatibleTypeFilter() throws Exception { assertClientException( () -> searchServicesClient.findHumanTasksWithFilters(createQueryFilterEqualsTo(TaskField.NAME, 1), 0, 100), 400, "Bad request"); }
Source:
public void sendAndReceive() { this.input.send(new GenericMessage<String>("foo")); Message<?> message = this.output.receive(100); assertNotNull(message); assertEquals("foo: 1", message.getPayload()); assertEquals(1, count); assertTrue(this.applicationContext.containsBean("annotatedEndpoint.process.serviceActivator")); assertTrue(this.applicationContext.containsBean("annotatedEndpoint2.process.serviceActivator")); assertTrue(this.applicationContext.containsBean("annotatedEndpoint3.process.serviceActivator")); }

Target:
public void sendAndReceive() { this.input.send(new GenericMessage<String>("foo")); Message<?> message = this.output.receive(100); assertNotNull(message); assertEquals("foo: 1", message.getPayload()); assertEquals(1, count); assertTrue(this.applicationContext.containsBean("annotatedEndpoint.process.serviceActivator")); assertTrue(this.applicationContext.containsBean("annotatedEndpoint2.process.serviceActivator")); }
Source:
public Builder(Title title) { this.title = title.title.orElse(null); this.subtitle = title.subtitle.orElse(null); this.fadeIn = title.fadeIn.orElse(null); this.stay = title.stay.orElse(null); this.fadeOut = title.fadeOut.orElse(null); this.clear = title.clear; this.reset = title.reset; }

Target:
private Builder(Title title) { this.title = title.title.orElse(null); this.subtitle = title.subtitle.orElse(null); this.fadeIn = title.fadeIn.orElse(null); this.stay = title.stay.orElse(null); this.fadeOut = title.fadeOut.orElse(null); this.clear = title.clear; this.reset = title.reset; }
Source:
protected void startNodeImplWithRetries(final InetAddress host, final int nbNodes, int retries) throws RMException { final List<String> depNodeURLs = new ArrayList<>(nbNodes); try { startNodeImpl(host, nbNodes, depNodeURLs); } catch (Exception e) { logger.warn("Failed nodes deployment in host : " + host + ", retries left : " + retries); if (isInfiniteRetries(retries) || retries > 1) { removeNodes(depNodeURLs); waitPeriodBeforeRetry(); startNodeImplWithRetries(host, nbNodes, getRetriesLeft(retries)); } else { logger.error("Tries threshold reached for host " + host + ". This host is not part of the deployment process anymore."); throw e; } } }

Target:
protected void startNodeImplWithRetries(final InetAddress host, final int nbNodes, int retries) throws RMException { while (true) { final List<String> depNodeURLs = new ArrayList<>(nbNodes); try { startNodeImpl(host, nbNodes, depNodeURLs); return; } catch (Exception e) { logger.warn("Failed nodes deployment in host : " + host + ", retries left : " + retries); if (isInfiniteRetries(retries) || retries > 0) { removeNodes(depNodeURLs); waitPeriodBeforeRetry(); retries = getRetriesLeft(retries); } else { logger.error("Tries threshold reached for host " + host + ". This host is not part of the deployment process anymore."); throw e; } } } }
Source:
public void test() throws IOException { JsonObject properties = super.generateConfigProperties(); properties.addProperty(DISCUSSIONS_ENABLED, isDiscussionsEnabled); config = new org.edx.mobile.util.Config(properties); FragmentManager fragmentManager = Mockito.mock(FragmentManager.class); EnrolledCoursesResponse courseData = Mockito.mock(EnrolledCoursesResponse.class); CourseUnitFragment.HasComponent hasComponent = Mockito.mock(CourseUnitFragment.HasComponent.class); CourseUnitPagerAdapter adapter = new CourseUnitPagerAdapter(fragmentManager, config, Collections.singletonList(input), courseData, hasComponent); assertThat(adapter.getItem(0)).isInstanceOf(expected); }

Target:
public void test() throws IOException { config = new org.edx.mobile.util.Config(generateConfigProperties()); FragmentManager fragmentManager = Mockito.mock(FragmentManager.class); EnrolledCoursesResponse courseData = Mockito.mock(EnrolledCoursesResponse.class); CourseUnitFragment.HasComponent hasComponent = Mockito.mock(CourseUnitFragment.HasComponent.class); CourseUnitPagerAdapter adapter = new CourseUnitPagerAdapter(fragmentManager, config, Collections.singletonList(paramCourseComponent), courseData, hasComponent); assertThat(adapter.getItem(0)).isInstanceOf(expectedFragmentClass); }
Source:
public <B> PriorityQueue<K, B> map(F<A, B> f) { return priorityQueue(equal, ftree.map(p2 -> p2.map2(a -> f.f(a)), FingerTree.measured(ftree.measured().monoid(), (P2<K, B> p2) -> p2._1())) ); }

Target:
public <B> PriorityQueue<K, B> map(F<A, B> f) { return priorityQueue(equal, ftree.map(P2.map2_(f), FingerTree.measured(ftree.measured().monoid(), P2.__1()) ) ); }
Source:
synchronized public void close() { if (socket != null) { try { socket.close(); } catch (IOException e) { log.warn("Error while closing tcp stream", e); } } }

Target:
synchronized public void close() { closeWriter(); closeSocket(); }
Source:
public int hashCode() { if (hashCode == Utils.NO_HASHCODE) { int accum = 1; accum = accum * Utils.HASH_PRIME + data.hashCode(); hashCode = accum == 0 ? 1 : accum; } return hashCode; }

Target:
public int hashCode() { int h = hashCode; if (h == Utils.NO_HASHCODE) { h = 1; h = h * Utils.HASH_PRIME + data.hashCode(); hashCode = h == 0 ? 1 : h; } return h; }
Source:
private void existsEntity() { TableServiceAsyncClient tableServiceAsyncClient = new TableServiceClientBuilder() .connectionString("connectionString") .buildAsyncClient(); TableAsyncClient tableAsyncClient = tableServiceAsyncClient.getTableAsyncClient("OfficeSupplies"); tableAsyncClient.queryEntitiesWithPartitionAndRowKey("crayolaMarkers", "markers") .subscribe(tableEntity -> { logger.info("Table Entity exists: " + tableEntity); }, error -> { logger.error("There was an error querying the table. Error: " + error); }); }

Target:
private void existsEntity() { TableServiceAsyncClient tableServiceAsyncClient = new TableServiceClientBuilder() .connectionString("connectionString") .buildAsyncClient(); TableAsyncClient tableAsyncClient = tableServiceAsyncClient.getTableAsyncClient("OfficeSupplies"); tableAsyncClient.get("crayolaMarkers", "markers") .subscribe(tableEntity -> { System.out.println("Table Entity exists: " + tableEntity); }, error -> { System.err.println("There was an error getting the entity. Error: " + error); }); }
Source:
private static void encodeV2(HAProxyMessage msg, ByteBuf out) { out.writeBytes(BINARY_PREFIX); out.writeByte(V2_VERSION_BITMASK | msg.command().byteValue()); out.writeByte(msg.proxiedProtocol().byteValue()); if (msg.proxiedProtocol().addressFamily() == AddressFamily.AF_IPv4 || msg.proxiedProtocol().addressFamily() == AddressFamily.AF_IPv6) { byte[] sourceAddress = NetUtil.createByteArrayFromIpAddressString(msg.sourceAddress()); byte[] destinationAddress = NetUtil.createByteArrayFromIpAddressString(msg.destinationAddress()); out.writeShort(sourceAddress.length + destinationAddress.length + 4 + msg.tlvNumBytes()); out.writeBytes(sourceAddress); out.writeBytes(destinationAddress); out.writeShort(msg.sourcePort()); out.writeShort(msg.destinationPort()); encodeTlvs(msg.tlvs(), out); } else if (msg.proxiedProtocol().addressFamily() == AddressFamily.AF_UNIX) { out.writeShort(216 + msg.tlvNumBytes()); byte[] srcAddressBytes = msg.sourceAddress().getBytes(CharsetUtil.US_ASCII); out.writeBytes(srcAddressBytes); out.writeBytes(new byte[108 - srcAddressBytes.length]); byte[] dstAddressBytes = msg.destinationAddress().getBytes(CharsetUtil.US_ASCII); out.writeBytes(dstAddressBytes); out.writeBytes(new byte[108 - dstAddressBytes.length]); encodeTlvs(msg.tlvs(), out); } else if (msg.proxiedProtocol().addressFamily() == AddressFamily.AF_UNSPEC) { out.writeShort(0); } }

Target:
private static void encodeV2(HAProxyMessage msg, ByteBuf out) { out.writeBytes(BINARY_PREFIX); out.writeByte(V2_VERSION_BITMASK | msg.command().byteValue()); out.writeByte(msg.proxiedProtocol().byteValue()); switch (msg.proxiedProtocol().addressFamily()) { case AF_IPv4: case AF_IPv6: byte[] srcAddrBytes = NetUtil.createByteArrayFromIpAddressString(msg.sourceAddress()); byte[] dstAddrBytes = NetUtil.createByteArrayFromIpAddressString(msg.destinationAddress()); out.writeShort(srcAddrBytes.length + dstAddrBytes.length + 4 + msg.tlvNumBytes()); out.writeBytes(srcAddrBytes); out.writeBytes(dstAddrBytes); out.writeShort(msg.sourcePort()); out.writeShort(msg.destinationPort()); encodeTlvs(msg.tlvs(), out); break; case AF_UNIX: out.writeShort(TOTAL_UNIX_ADDRESS_BYTES_LENGTH + msg.tlvNumBytes()); int srcAddrBytesWritten = out.writeCharSequence(msg.sourceAddress(), CharsetUtil.US_ASCII); out.writeZero(UNIX_ADDRESS_BYTES_LENGTH - srcAddrBytesWritten); int dstAddrBytesWritten = out.writeCharSequence(msg.destinationAddress(), CharsetUtil.US_ASCII); out.writeZero(UNIX_ADDRESS_BYTES_LENGTH - dstAddrBytesWritten); encodeTlvs(msg.tlvs(), out); break; case AF_UNSPEC: out.writeShort(0); break; default: throw new HAProxyProtocolException("unexpected addrFamily"); } }
Source:
default String getPlatformName() { Object platformName = ofNullable(getSessionDetail("platformName")) .orElseGet(() -> getSessionDetail("platform")); return ofNullable(platformName).map(Object::toString).orElse(null); }

Target:
default @Nullable String getPlatformName() { Object platformName = ofNullable(getSessionDetail("platformName")) .orElseGet(() -> getSessionDetail("platform")); return ofNullable(platformName).map(String::valueOf).orElse(null); }
Source:
public void onPostMessage(@NonNull WebView view, @NonNull InvocationHandler message, @NonNull Uri sourceOrigin, boolean isMainFrame, @NonNull InvocationHandler replyProxy) { mWebMessageListener.onPostMessage(view, WebMessageAdapter.webMessageCompatFromBoundaryInterface( BoundaryInterfaceReflectionUtil.castToSuppLibClass( WebMessageBoundaryInterface.class, message)), sourceOrigin, isMainFrame, JsReplyProxyImpl.forInvocationHandler(replyProxy)); }

Target:
public void onPostMessage(@NonNull WebView view, @NonNull InvocationHandler message, @NonNull Uri sourceOrigin, boolean isMainFrame, @NonNull InvocationHandler replyProxy) { WebMessageCompat webMessage = WebMessageAdapter.webMessageCompatFromBoundaryInterface( BoundaryInterfaceReflectionUtil.castToSuppLibClass( WebMessageBoundaryInterface.class, message)); JsReplyProxy jsReplyProxy = JsReplyProxyImpl.forInvocationHandler(replyProxy); mWebMessageListener.onPostMessage( view, webMessage, sourceOrigin, isMainFrame, jsReplyProxy); }
Source:
private void sendErrorEmailForGenericException( Exception genericException, String incomingFileName, PaymentFileLoad paymentFile) { PaymentFileLoad paymentFileForEmail; try { paymentFileForEmail = getCustomerProfileFromUnparsableFile(incomingFileName, paymentFile); } catch (RuntimeException e) { paymentFileForEmail = paymentFile; } MessageMap errorMap = new MessageMap(); errorMap.putError(KFSConstants.GLOBAL_ERRORS, KFSKeyConstants.ERROR_BATCH_UPLOAD_PARSING, "Error reading XML file: " + genericException.getMessage()); paymentFileEmailService.sendErrorEmail(paymentFileForEmail, errorMap); }

Target:
private void sendErrorEmailForGenericException( Exception genericException, String incomingFileName, PaymentFileLoad paymentFile) { PaymentFileLoad paymentFileForEmail; try { paymentFileForEmail = getCustomerProfileFromUnparsableFile(incomingFileName, paymentFile); } catch (RuntimeException e) { LOG.error("sendErrorEmailForGenericException: Could not read file contents as plain text", e); paymentFileForEmail = paymentFile; } MessageMap errorMap = new MessageMap(); errorMap.putError(KFSConstants.GLOBAL_ERRORS, KFSKeyConstants.ERROR_BATCH_UPLOAD_PARSING, "Error reading XML file: " + genericException.getMessage()); paymentFileEmailService.sendErrorEmail(paymentFileForEmail, errorMap); }
Source:
public void selectingARating_ShouldChangeRelevanceOfRelatedField() throws Exception { jumpToGroupWithText("Rating"); onView(withText(startsWith("Source13"))).perform(click()); for (int i = 1; i <= 10; i++) { onView(withText("Target13")).check(doesNotExist()); if (i < 9) { onView(allOf(withId(R.id.rating_bar1), isDisplayed())).perform(setRating((float) i)); } else { onView(allOf(withId(R.id.rating_bar2), isDisplayed())).perform(setRating((float) (i - 8))); } onView(withText("Target13")).check(matches(isDisplayed())); onView(withText("Source13")).perform(longClick()); onView(withText(R.string.clear_answer)).perform(click()); onView(withText(R.string.discard_answer)).perform(click()); } }

Target:
public void selectingARating_ShouldChangeRelevanceOfRelatedField() throws Exception { jumpToGroupWithText("Rating"); onView(withText(startsWith("Source13"))).perform(click()); onView(withText("Target13")).check(doesNotExist()); onView(allOf(withId(R.id.rating_bar1), isDisplayed())).perform(setRating(3.0f)); onView(withText("Target13")).check(matches(isDisplayed())); onView(withText("Source13")).perform(longClick()); onView(withText(R.string.clear_answer)).perform(click()); onView(withText(R.string.discard_answer)).perform(click()); onView(withText("Target13")).check(doesNotExist()); }
Source:
private void trackLiftedVariantContig(Map<String, Long> map, String contig) { Long val = map.get(contig); if (val == null){ val = 0L; } val++; map.put(contig, val); }

Target:
private void trackLiftedVariantContig(Map<String, Long> map, String contig) { Long val = map.get(contig); if (val == null) { val = 0L; } map.put(contig, ++val); }
Source:
protected void verifyFindsCar(Cache cache, int expectedCount, String carMake) { QueryParser queryParser = createQueryParser("make"); try { Query luceneQuery = queryParser.parse(carMake); CacheQuery cacheQuery = Search.getSearchManager(cache).getClusteredQuery(luceneQuery, Car.class); Assert.assertEquals(expectedCount, cacheQuery.getResultSize()); } catch (ParseException ex) { ex.printStackTrace(); Assert.fail("Failed due to: " + ex.getMessage()); } }

Target:
protected void verifyFindsCar(Cache cache, int expectedCount, String carMake) { CacheQuery cacheQuery = Search.getSearchManager(cache) .getClusteredQuery(new TermQuery(new Term("make", carMake))); assertEquals(expectedCount, cacheQuery.getResultSize()); }
Source:
private boolean validateExternalVnicProfileMapping() { drMappingHelper.mapVnicProfiles(vmTemplateFromConfiguration.getInterfaces(), getParameters().getExternalVnicProfileMappings()); final ValidationResult validationResult = externalVnicProfileMappingValidator.validateExternalVnicProfileMapping( getParameters().getExternalVnicProfileMappings(), getParameters().getClusterId()); return validate(validationResult); }

Target:
private boolean validateExternalVnicProfileMapping() { final ValidationResult validationResult = externalVnicProfileMappingValidator.validateExternalVnicProfileMapping( getParameters().getExternalVnicProfileMappings(), getParameters().getClusterId()); return validate(validationResult); }
Source:
public ExampleScript[] examples() throws ConfigCompileException { return new ExampleScript[]{ new ExampleScript("Getting values", "store_value('x.top.a',true)\nstore_value('x.top.b',false)\nget_values('x')"), }; }

Target:
public ExampleScript[] examples() throws ConfigCompileException { return new ExampleScript[]{ new ExampleScript("Getting values", "store_value('x.top.a',true)\nstore_value('x.top.b',false)\nmsg(get_values('x'))"), }; }
Source:
public void testVisibilityForAdminInOtherDomainInPublisher() throws APIManagerIntegrationTestException, ApiException { APIListDTO getAllApisResponse = restAPIPublisherOtherDomainAdmin.getAllAPIs("carbon.super"); assertFalse(APIMTestCaseUtils.isAPIAvailable(apiIdentifier, getAllApisResponse), "API is visible to admin in other domain in API Publisher. When Visibility is private. " + getAPIIdentifierString(apiIdentifier)); }

Target:
public void testVisibilityForAdminInOtherDomainInPublisher() throws APIManagerIntegrationTestException, ApiException { APIListDTO getAllApisResponse = restAPIPublisherOtherDomainAdmin .getAllAPIs(MultitenantConstants.SUPER_TENANT_DOMAIN_NAME); assertFalse(APIMTestCaseUtils.isAPIAvailable(apiIdentifier, getAllApisResponse), "API is visible to admin in other domain in API Publisher. When Visibility is private. " + getAPIIdentifierString(apiIdentifier)); }