auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
protected void run() throws UnloggedFailure { if (!loader.isRemoteAdminEnabled()) { throw die("remote installation is disabled"); } if (names == null || names.isEmpty()) { loader.rescan(); } else { try { loader.reload(names); } catch (InvalidPluginException e) { throw die(e.getMessage()); } catch (PluginInstallException e) { throw die(e.getMessage()); } } }

Target:
protected void run() throws UnloggedFailure { if (!loader.isRemoteAdminEnabled()) { throw die("remote plugin administration is disabled"); } if (names == null || names.isEmpty()) { loader.rescan(); } else { try { loader.reload(names); } catch (InvalidPluginException e) { throw die(e.getMessage()); } catch (PluginInstallException e) { throw die(e.getMessage()); } } }
Source:
public void complete() { ITmfStateSystemBuilder stateSystem = getStateSystem(true); if(stateSystem == null) { return; } stateSystem.closeHistory(getTrace().getEndTime().toNanos()); }

Target:
public void complete() { ITmfStateSystemBuilder stateSystem = fStateSystem; if (stateSystem == null) { return; } if (!stateSystem.waitUntilBuilt(0)) { stateSystem.closeHistory(getTrace().getEndTime().toNanos()); } }
Source:
private void startJob(ExecutorDriver driver, TaskInfo task, TaskDetails taskDetails) { if (process == null) { driver.sendStatusUpdate(taskStatus(task, TaskState.TASK_ERROR, nullSlaveStatusDetails())); return; } NodeJobTask nodeJob = taskDetails.getNodeJobTask(); AbstractNodeJob job; switch (nodeJob.getJobType()) { case REPAIR: job = new NodeRepairJob(task.getTaskId()); break; case CLEANUP: job = new NodeCleanupJob(task.getTaskId(), executorService); break; default: return; } if (startJob(job)) { driver.sendStatusUpdate(taskStatus(task, TaskState.TASK_RUNNING, nullSlaveStatusDetails())); } else { driver.sendStatusUpdate(taskStatus(task, TaskState.TASK_ERROR, nullSlaveStatusDetails())); } }

Target:
private void startJob(ExecutorDriver driver, TaskInfo task, TaskDetails taskDetails) { if (process == null) { serverProcessNotRunning(driver, task); return; } NodeJobTask nodeJob = taskDetails.getNodeJobTask(); AbstractNodeJob job; switch (nodeJob.getJobType()) { case REPAIR: job = new NodeRepairJob(task.getTaskId()); break; case CLEANUP: job = new NodeCleanupJob(task.getTaskId(), executorService); break; default: return; } TaskStatus taskStatus = startJob(task, job); driver.sendStatusUpdate(taskStatus); }
Source:
public IdentityManager(final Context context, final AWSConfiguration awsConfiguration) { this.appContext = context.getApplicationContext(); this.awsConfiguration = awsConfiguration; this.clientConfiguration = new ClientConfiguration().withUserAgent(awsConfiguration.getUserAgent()); this.credentialsProviderHolder = new AWSCredentialsProviderHolder(); createCredentialsProvider(this.appContext, this.clientConfiguration, awsConfiguration.getUserAgentOverride()); this.awsKeyValueStore = new AWSKeyValueStore(appContext, SHARED_PREF_NAME, isPersistenceEnabled); }

Target:
public IdentityManager(final Context context, final AWSConfiguration awsConfiguration) { this.appContext = context.getApplicationContext(); this.awsConfiguration = awsConfiguration; this.clientConfiguration = new ClientConfiguration() .withUserAgent(awsConfiguration.getUserAgent()) .withUserAgentOverride(awsConfiguration.getUserAgentOverride()); this.credentialsProviderHolder = new AWSCredentialsProviderHolder(); createCredentialsProvider(this.appContext, this.clientConfiguration); this.awsKeyValueStore = new AWSKeyValueStore(appContext, SHARED_PREF_NAME, isPersistenceEnabled); }
Source:
protected boolean responseHeader(HttpExchange exchange, HttpField field) { out: while (true) { ResponseState current = responseState.get(); switch (current) { case BEGIN: case HEADER: { if (updateResponseState(current, ResponseState.TRANSIENT)) break out; break; } default: { return false; } } } HttpResponse response = exchange.getResponse(); ResponseNotifier notifier = getHttpDestination().getResponseNotifier(); boolean process = notifier.notifyHeader(exchange.getConversation().getResponseListeners(), response, field); if (process) { response.header(field); HttpHeader fieldHeader = field.getHeader(); if (fieldHeader != null) { switch (fieldHeader) { case SET_COOKIE: case SET_COOKIE2: { URI uri = exchange.getRequest().getURI(); if (uri != null) storeCookie(uri, field); break; } default: { break; } } } } if (updateResponseState(ResponseState.TRANSIENT, ResponseState.HEADER)) return true; terminateResponse(exchange); return false; }

Target:
protected boolean responseHeader(HttpExchange exchange, HttpField field) { out: while (true) { ResponseState current = responseState.get(); switch (current) { case BEGIN: case HEADER: { if (updateResponseState(current, ResponseState.TRANSIENT)) break out; break; } default: { return false; } } } HttpResponse response = exchange.getResponse(); ResponseNotifier notifier = getHttpDestination().getResponseNotifier(); boolean process = notifier.notifyHeader(exchange.getConversation().getResponseListeners(), response, field); if (process) { response.addHeader(field); HttpHeader fieldHeader = field.getHeader(); if (fieldHeader != null) { switch (fieldHeader) { case SET_COOKIE: case SET_COOKIE2: { URI uri = exchange.getRequest().getURI(); if (uri != null) storeCookie(uri, field); break; } default: { break; } } } } if (updateResponseState(ResponseState.TRANSIENT, ResponseState.HEADER)) return true; terminateResponse(exchange); return false; }
Source:
private void handleApprovalPageIfAny() { waitForPageToLoad(); if (getPageSource().contains(EXPECTED_SNIPPET_LOGIN_REDIRECT)) { ThreadHelper.waitFor(500); waitForPageToLoad(); } boolean isPageRequestingAccessApproval = getPageSource().contains(EXPECTED_SNIPPET_APPROVAL); if (isPageRequestingAccessApproval) { click(By.id("persist_checkbox")); click(By.id("approve_button")); waitForPageToLoad(); } }

Target:
private void handleApprovalPageIfAny() { waitForPageToLoad(); waitForRedirectIfAny(); boolean isPageRequestingAccessApproval = getPageSource().contains(EXPECTED_SNIPPET_APPROVAL); if (isPageRequestingAccessApproval) { click(By.id("persist_checkbox")); click(By.id("approve_button")); waitForPageToLoad(); } }
Source:
public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; FunctionSignature other = (FunctionSignature) obj; return Arrays.equals(argTypes, other.argTypes) && name.equals(other.name); }

Target:
public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (!(obj instanceof FunctionSignature)) return false; FunctionSignature other = (FunctionSignature) obj; return (name == other.name) && Arrays.equals(argTypes, other.argTypes); }
Source:
public void checkClientTrusted(X509Certificate[] x509Certificates, String s) throws CertificateException { try { trustManager.checkClientTrusted(x509Certificates, s); } catch (Exception e) { String name = x509Certificates.length >= 1 ? x509Certificates[0].getSubjectDN().getName() : "NONAME"; LOGGER.error("Client certificate was found to be invalid. Subject: Error: [{}].", name, e.getMessage(), e); throw e; } }

Target:
public void checkClientTrusted(X509Certificate[] x509Certificates, String s) throws CertificateException { try { trustManager.checkClientTrusted(x509Certificates, s); } catch (Exception e) { LOGGER.error("Client certificate was found to be invalid", e); LOGGER.error("Client certificate chain:"); for (int i = 0; i < x509Certificates.length; i++) { X509Certificate x509Certificate = x509Certificates[i]; LOGGER.error("chain[{}]: {}", i, x509Certificate); } X509Certificate[] acceptedIssuers = getAcceptedIssuers(); if (acceptedIssuers == null || acceptedIssuers.length == 0) { LOGGER.error("There are no accepted issuers."); } else { LOGGER.error("The accepted certificates are:"); for (X509Certificate acceptedIssuer : acceptedIssuers) { LOGGER.error("{}", acceptedIssuer.toString()); } } throw e; } }
Source:
public Stream<Stream<WebElement>> getRows() { return rows() .map(el -> el.findElements(By.cssSelector("td")).stream()); }

Target:
public Stream<Stream<WebElement>> getRows() { return rows() .map(row -> row.findElements(cellLocator()).stream()); }
Source:
private static FilterState fromRelationshipDirection( RelationshipDirection direction ) { switch ( direction ) { case OUTGOING: return FilterState.OUTGOING; case INCOMING: return FilterState.INCOMING; case LOOP: return FilterState.LOOP; case ERROR: throw new IllegalArgumentException( "There has been a RelationshipDirection.ERROR" ); default: throw new IllegalStateException( "Still poking my eye, dear checkstyle..." ); } }

Target:
private static FilterState fromRelationshipDirection( RelationshipDirection direction ) { switch ( direction ) { case OUTGOING: return FilterState.OUTGOING; case INCOMING: return FilterState.INCOMING; case LOOP: return FilterState.LOOP; case ERROR: throw new IllegalArgumentException( "There has been a RelationshipDirection.ERROR" ); default: throw new IllegalStateException( format( "Still poking my eye, dear checkstyle... (cannot filter on direction '%s')", direction ) ); } }
Source:
public Response toResponse(JsonMappingException exception) { return Response.status(Response.Status.BAD_REQUEST) .entity(ImmutableMap.of("Error", exception.getMessage())) .build(); }

Target:
public Response toResponse(JsonMappingException exception) { return Response.status(Response.Status.BAD_REQUEST) .entity(ImmutableMap.of( "error", exception.getMessage() == null ? "unknown json mapping exception" : exception.getMessage() )) .build(); }
Source:
public Position withColumn(int column) { return new Position(line, column); }

Target:
public Position withColumn(int column) { return new Position(this.line, column); }
Source:
private ChargeEntity prepareChargeForAuthorisation(String chargeId) { try { ChargeEntity charge = chargeService.lockChargeForProcessing(chargeId, OperationType.AUTHORISATION); getPaymentProviderFor(charge) .generateTransactionId() .ifPresent(charge::setGatewayTransactionId); return charge; } catch (Exception e) { throw e; } }

Target:
private ChargeEntity prepareChargeForAuthorisation(String chargeId) { ChargeEntity charge = chargeService.lockChargeForProcessing(chargeId, OperationType.AUTHORISATION); getPaymentProviderFor(charge) .generateTransactionId() .ifPresent(charge::setGatewayTransactionId); return charge; }
Source:
public static <T> TextElement<T> function(final Function<T, Text> function) { return new TextElement<T>() { @Override public Text create(T value) { return Preconditions.checkNotNull(function.apply(value)); } }; }

Target:
public static <T> TextElement<T> function(final Function<T, Text> function) { return function::apply; }
Source:
public VmReplicateDiskParameters(Guid vdsId, Guid vmId, Guid storagePoolId, Guid srcStorageDomainId, Guid targetStorageDomainId, Guid imageGroupId, Guid imageId, String diskType) { super(vdsId, vmId); this.storagePoolId = storagePoolId; this.srcStorageDomainId = srcStorageDomainId; this.targetStorageDomainId = targetStorageDomainId; this.imageGroupId = imageGroupId; this.imageId = imageId; this.diskType = Optional.ofNullable(diskType); }

Target:
public VmReplicateDiskParameters(Guid vdsId, Guid vmId, Guid storagePoolId, Guid srcStorageDomainId, Guid targetStorageDomainId, Guid imageGroupId, Guid imageId, String diskType) { super(vdsId, vmId); this.storagePoolId = storagePoolId; this.srcStorageDomainId = srcStorageDomainId; this.targetStorageDomainId = targetStorageDomainId; this.imageGroupId = imageGroupId; this.imageId = imageId; }
Source:
private String connectionUrl() { return String.format("jdbc:mysql://localhost/%s?useUnicode=true&characterEncoding=UTF-8", DATABASE_NAME.getOr("activityinfo")); }

Target:
private String connectionUrl() { return DATABASE_URL.getOr("jdbc:mysql://localhost/activityinfo_at?useUnicode=true&characterEncoding=UTF-8"); }
Source:
public List<AttributeStatement> createEvidenceStatements(final List accessConstentValues, final List evidenceInstanceAccessConsentValues, final String namespace) { List<AttributeStatement> statements = new ArrayList<>(); final List<Attribute> attributes = new ArrayList<>(); if (CollectionUtils.isNotEmpty(accessConstentValues)) { attributes.add(createAttribute(null, NhincConstants.ACCESS_CONSENT_ATTR, namespace, accessConstentValues)); } if (CollectionUtils.isNotEmpty(evidenceInstanceAccessConsentValues)) { attributes.add(createAttribute(null, NhincConstants.INST_ACCESS_CONSENT_ATTR, namespace, evidenceInstanceAccessConsentValues)); } if (CollectionUtils.isNotEmpty(attributes)) { statements = createAttributeStatement(attributes); } return statements; }

Target:
public List<AttributeStatement> createEvidenceStatements(final List accessConstentValues, final List evidenceInstanceAccessConsentValues, final String namespace) { List<AttributeStatement> statements = new ArrayList<>(); final List<Attribute> attributes = new ArrayList<>(); if (CollectionUtils.isNotEmpty(accessConstentValues)) { attributes.add(createAttribute(null, SamlConstants.ACCESS_CONSENT_ATTR, namespace, accessConstentValues)); } if (CollectionUtils.isNotEmpty(evidenceInstanceAccessConsentValues)) { attributes.add(createAttribute(null, SamlConstants.INST_ACCESS_CONSENT_ATTR, namespace, evidenceInstanceAccessConsentValues)); } if (CollectionUtils.isNotEmpty(attributes)) { statements = createAttributeStatement(attributes); } return statements; }
Source:
public void testInformationOfMeetingIsDisplayed() { HomeTabletPage home = new HomeTabletPage(); SchedulePage schedule = home .clickScheduleBtn() .clickOverMeetingCreated(subject); String actualOrganizer = schedule.getMeetingOrganizerValue(); String actualSubject = schedule.getMeetingSubjectValue(); String actualAttendee = schedule.getEmailAttendeeLblValue(attendee); String actualBody = schedule.getBodyTxtBoxValue(); Assert.assertEquals(organizer, actualOrganizer); Assert.assertEquals(subject, actualSubject); Assert.assertEquals(attendee, actualAttendee); Assert.assertEquals(body, actualBody); }

Target:
public void testInformationOfMeetingIsDisplayed() { HomeTabletPage homeTabletPage = new HomeTabletPage(); SchedulePage schedulePage = homeTabletPage .clickScheduleBtn() .clickOverMeetingCreated(subject); String actualOrganizer = schedulePage.getMeetingOrganizerValue(); String actualSubject = schedulePage.getMeetingSubjectValue(); String actualAttendee = schedulePage.getEmailAttendeeLblValue(attendee); String actualBody = schedulePage.getBodyTxtBoxValue(); Assert.assertEquals(actualOrganizer, organizer); Assert.assertEquals(actualSubject, subject); Assert.assertEquals(actualAttendee, attendee); Assert.assertEquals(actualBody, body); }
Source:
public void waitTextInHoverPopUpEqualsTo(String expectedText) { try { seleniumWebDriverHelper.waitVisibility(hoverPopup); } catch (TimeoutException ex) { fail("Known issue <LINK_1>", ex); } try { seleniumWebDriverHelper.waitTextEqualsTo(hoverPopup, expectedText); } catch (TimeoutException ex) { fail("Known issue <LINK_0>", ex); } }

Target:
public void waitTextInHoverPopUpEqualsTo(String expectedText) { try { seleniumWebDriverHelper.waitVisibility(hoverPopup); } catch (TimeoutException ex) { fail("Known permanent failure: issue <LINK_1>", ex); } try { seleniumWebDriverHelper.waitTextEqualsTo(hoverPopup, expectedText); } catch (TimeoutException ex) { fail("Known permanent failure: issue <LINK_0>", ex); } }
Source:
private ADBInfo createADB(String host, String port) throws URISyntaxException { HashMap<String,String> env = new HashMap<String,String>(); env.put("DOCKER_HOST","tcp://" + host + ":" + port); env.put("DOCKER_CERT_PATH","/home/rob/Downloads/cdk/github/openshift-vagrant/cdk-v2/.vagrant/machines/cdk/virtualbox/.docker"); env.put("DOCKER_TLS_VERIFY","1"); env.put("DOCKER_MACHINE_NAME","e5d7d0a"); return new ADBInfo(env); }

Target:
private ADBInfo createADB(String host, String port) throws URISyntaxException { HashMap<String,String> env = new HashMap<>(); env.put("DOCKER_HOST","tcp://" + host + ":" + port); env.put("DOCKER_CERT_PATH","/home/rob/Downloads/cdk/github/openshift-vagrant/cdk-v2/.vagrant/machines/cdk/virtualbox/.docker"); env.put("DOCKER_TLS_VERIFY","1"); env.put("DOCKER_MACHINE_NAME","e5d7d0a"); return new ADBInfo(env); }
Source:
public void testSamePublicAndPrivateAddressOnSameNode() { Node node = Node.newDefaultNode("foo1", "host").setNodeGroupPort(9410).setNodePublicHostname("host").setNodePublicPort(9410); new ClusterValidator(newDefaultCluster(new Stripe(node))).validate(); }

Target:
public void testSamePublicAndPrivateAddressOnSameNode() { Node node = Node.newDefaultNode("foo1", "host").setNodePort(9410).setNodePublicHostname("host").setNodePublicPort(9410); new ClusterValidator(newDefaultCluster(new Stripe(node))).validate(); }
Source:
public static byte[] createQRCode(String text) { try { System.out.println("Inside Try createQRCode"); ByteArrayOutputStream baos = new ByteArrayOutputStream(); BitMatrix matrix = drawQRCode(text); MatrixToImageWriter.writeToStream(matrix, "png", baos); return baos.toByteArray(); } catch (WriterException | IOException e) { System.out.println("Inside catch createQRCode"); throw new IllegalStateException(e); } }

Target:
public static byte[] createQRCode(String text) { try { ByteArrayOutputStream baos = new ByteArrayOutputStream(); BitMatrix matrix = drawQRCode(text); MatrixToImageWriter.writeToStream(matrix, "png", baos); return baos.toByteArray(); } catch (WriterException | IOException e) { throw new IllegalStateException(e); } }
Source:
private String getJsonDiskDescription() { Map<String, Object> description = new HashMap<>(); description.put(ImagesHandler.DISK_ALIAS, getParameters().getDiskInfo().getDiskAlias()); description.put(ImagesHandler.DISK_DESCRIPTION, getParameters().getDiskInfo().getDiskDescription()); try { return JsonHelper.mapToJson(description, false); } catch (IOException e) { log.errorFormat("Exception while generating json for disk. ERROR: {0}", e); AuditLogableBase auditLogableBase = new AuditLogableBase(); auditLogableBase.addCustomValue("DataCenterName", getStoragePool().getName()); auditLogableBase.addCustomValue("StorageDomainName", getStorageDomain().getName()); auditLogableBase.addCustomValue("DiskName", getParameters().getDiskInfo().getDiskAlias()); AuditLogDirector.log(auditLogableBase, AuditLogType.UPDATE_DESCRIPTION_FOR_DISK_FAILED); return StringUtils.EMPTY; } }

Target:
private String getJsonDiskDescription() { try { return ImagesHandler.getJsonDiskDescription(getParameters().getDiskInfo().getDiskAlias(), getParameters().getDiskInfo().getDiskDescription()); } catch (IOException e) { log.errorFormat("Exception while generating json for disk. ERROR: {0}", e); AuditLogableBase auditLogableBase = new AuditLogableBase(); auditLogableBase.addCustomValue("DataCenterName", getStoragePool().getName()); auditLogableBase.addCustomValue("StorageDomainName", getStorageDomain().getName()); auditLogableBase.addCustomValue("DiskName", getParameters().getDiskInfo().getDiskAlias()); AuditLogDirector.log(auditLogableBase, AuditLogType.UPDATE_DESCRIPTION_FOR_DISK_FAILED); return StringUtils.EMPTY; } }
Source:
public static AbstractTask getTaskByUrl(String taskUrl) { if (!Strings.isNullOrEmpty(taskUrl)) { Collection<AbstractTask> tasks = TasksUiPlugin.getTaskList().getAllTasks(); List<AbstractTask> sortedTasks = sortTasksByRepositoryUrl(tasks); String oldRepositorUrl = null; AbstractRepositoryConnector connector = null; TaskRepository repository = null; for (AbstractTask task : sortedTasks) { if (taskUrl.equals(task.getUrl())) { return task; } else { String repositoryUrl = task.getRepositoryUrl(); if (!repositoryUrl.equals(oldRepositorUrl)) { connector = TasksUi.getRepositoryManager().getRepositoryConnector(task.getConnectorKind()); repository = getRepository(task); } if (connector != null) { URL url = connector.getBrowseableUrl(repository, task); if (url != null && taskUrl.equals(url.toString())) { return task; } } oldRepositorUrl = repositoryUrl; } } } return null; }

Target:
public static AbstractTask getTaskByUrl(String taskUrl) { if (!Strings.isNullOrEmpty(taskUrl)) { Collection<AbstractTask> tasks = TasksUiPlugin.getTaskList().getAllTasks(); List<AbstractTask> sortedTasks = sortTasksByRepositoryUrl(tasks); AbstractRepositoryConnector connector = null; TaskRepository repository = null; for (AbstractTask task : sortedTasks) { if (taskUrl.equals(task.getUrl())) { return task; } else { String repositoryUrl = task.getRepositoryUrl(); if (repository == null || !repositoryUrl.equals(repository.getUrl())) { connector = TasksUi.getRepositoryManager().getRepositoryConnector(task.getConnectorKind()); repository = getRepository(task); } if (connector != null) { URL url = connector.getBrowseableUrl(repository, task); if (url != null && taskUrl.equals(url.toString())) { return task; } } } } } return null; }
Source:
public CacheSet<CacheEntry<K, V>> cacheEntrySet() { EncoderEntryMapper<K, V, CacheEntry<K, V>> cacheEntryMapper = EncoderEntryMapper.newCacheEntryMapper( keyDataConversion, valueDataConversion, componentRegistry); return new WriteableCacheSetMapper<>(super.cacheEntrySet(), cacheEntryMapper, e -> new CacheEntryWrapper<>(cacheEntryMapper.apply(e), e), this::toCacheEntry, this::keyToStorage); }

Target:
public CacheSet<CacheEntry<K, V>> cacheEntrySet() { EncoderEntryMapper<K, V, CacheEntry<K, V>> cacheEntryMapper = EncoderEntryMapper.newCacheEntryMapper( keyDataConversion, valueDataConversion, entryFactory); return new WriteableCacheSetMapper<>(super.cacheEntrySet(), cacheEntryMapper, e -> new CacheEntryWrapper<>(cacheEntryMapper.apply(e), e), this::toCacheEntry, this::keyToStorage); }
Source:
public void setDisplayMode(int displayMode) { mDisplayMode = displayMode; if ((mCFDataStale && (displayMode == DISP_MODE_CF)) || (mMoreDataStale && (displayMode == DISP_MODE_MORE))){ if (DBG) log("setDisplayMode: performing requested expansion."); if ( PhoneFactory.getDefaultPhone().getPhoneName().equals("CDMA") ) { setAppState(AppState.INPUT_READY); } else { if (Settings.System.getInt(getContentResolver(), Settings.System.AIRPLANE_MODE_ON, 0) <= 0 ) { setAppState(AppState.INITIAL_QUERY); int radioState = mPhone.getServiceState().getState(); if (radioState == ServiceState.STATE_IN_SERVICE) { if (displayMode == DISP_MODE_CF) { queryAllCFOptions(); } else { queryMoreOptions(); } } else if (radioState == ServiceState.STATE_POWER_OFF){ if (DBG) log("onCreate: radio not ready, waiting for signal."); mPhone.registerForServiceStateChanged(mNetworkServiceHandler, EVENT_SERVICE_STATE_CHANGED, null); } else { setAppState(AppState.NETWORK_ERROR, MSG_EXCEPTION); } } else { if (DBG) log("setDisplayMode: radio is off!"); setAppState(AppState.NETWORK_ERROR, MSG_RADIO_OFF); } } } }

Target:
public void setDisplayMode(int displayMode) { mDisplayMode = displayMode; if ((mCFDataStale && (displayMode == DISP_MODE_CF)) || (mMoreDataStale && (displayMode == DISP_MODE_MORE))){ if (DBG) log("setDisplayMode: performing requested expansion."); if ( mPhone.getPhoneName().equals("CDMA") ) { setAppState(AppState.INPUT_READY); } else { if (Settings.System.getInt(getContentResolver(), Settings.System.AIRPLANE_MODE_ON, 0) <= 0 ) { setAppState(AppState.INITIAL_QUERY); int radioState = mPhone.getServiceState().getState(); if (radioState == ServiceState.STATE_IN_SERVICE) { if (displayMode == DISP_MODE_CF) { queryAllCFOptions(); } else { queryMoreOptions(); } } else if (radioState == ServiceState.STATE_POWER_OFF){ if (DBG) log("onCreate: radio not ready, waiting for signal."); mPhone.registerForServiceStateChanged(mNetworkServiceHandler, EVENT_SERVICE_STATE_CHANGED, null); } else { setAppState(AppState.NETWORK_ERROR, MSG_EXCEPTION); } } else { if (DBG) log("setDisplayMode: radio is off!"); setAppState(AppState.NETWORK_ERROR, MSG_RADIO_OFF); } } } }
Source:
public void testCreate() throws StripeException { Map<String, Object> params = new HashMap<String, Object>(); params.put("amount", 100); params.put("currency", "usd"); params.put("source", "src_123"); params.put("description", "creating a topup"); params.put("statement_descriptor", "topup"); Topup topup = Topup.create(params); assertNotNull(topup); verifyRequest( APIResource.RequestMethod.POST, "/v1/topups", params ); }

Target:
public void testCreate() throws StripeException { final Map<String, Object> params = new HashMap<String, Object>(); params.put("amount", 100); params.put("currency", "usd"); params.put("source", "src_123"); params.put("description", "creating a topup"); params.put("statement_descriptor", "topup"); final Topup topup = Topup.create(params); assertNotNull(topup); verifyRequest( APIResource.RequestMethod.POST, "/v1/topups", params ); }
Source:
public void handleChildChange(String parentPath, List<String> currentChildren) throws Exception { boolean allIn = true; if (currentChildren == null) { LOG.info("Got handleChildChange with null currentChildren"); return; } LOG.info("list of children in the barrier = " + parentPath + ":" + Arrays.toString(currentChildren.toArray())); LOG.info("list of children to compare against = " + parentPath + ":" + Arrays.toString(names.toArray())); for (String name : names) { if (!currentChildren.contains(name)) { LOG.info("node " + name + " is still not in the list "); allIn = false; break; } } if (allIn) { LOG.info("ALl nodes reached the barrier"); final String barrierPath = String.format("%s/barrier_%s", barrierPrefix, version); final String barrierDonePath = String.format("%s/barrier_done", barrierPath); LOG.info("Writing BARRIER DONE to " + barrierDonePath); zkUtils.getZkClient().writeData(barrierDonePath, BARRIER_DONE); } }

Target:
public void handleChildChange(String parentPath, List<String> currentChildren) throws Exception { if (currentChildren == null) { LOG.info("Got handleChildChange with null currentChildren"); return; } LOG.info("list of children in the barrier = " + parentPath + ":" + Arrays.toString(currentChildren.toArray())); LOG.info("list of children to compare against = " + parentPath + ":" + Arrays.toString(names.toArray())); if (CollectionUtils.containsAll(names, currentChildren)) { LOG.info("ALl nodes reached the barrier"); final String barrierPath = String.format("%s/barrier_%s", barrierPrefix, version); final String barrierDonePath = String.format("%s/barrier_done", barrierPath); LOG.info("Writing BARRIER DONE to " + barrierDonePath); zkUtils.getZkClient().writeData(barrierDonePath, BARRIER_DONE); } }
Source:
public void customContinuationTokenSnippet() { class ContinuationState<C> { private C lastContinuationToken; private boolean isDone; ContinuationState(C token) { this.lastContinuationToken = token; } void setLastContinuationToken(C token) { this.isDone = token == null ? true : false; this.lastContinuationToken = token; } C getLastContinuationToken() { return this.lastContinuationToken; } boolean isDone() { return this.isDone; } } class FileContinuationToken { public int getNextLinkId() { return 0; } } class File { } class FilePage implements ContinuablePage<FileContinuationToken, File> { @Override public IterableStream<File> getElements() { return null; } @Override public FileContinuationToken getContinuationToken() { return null; } } class FileShareServiceClient { Flux<FilePage> getFilePages(FileContinuationToken token) { return null; } } FileShareServiceClient client = null; Supplier<PageRetriever<FileContinuationToken, FilePage>> pageRetrieverProvider = new Supplier<>() { @Override public PageRetriever<FileContinuationToken, FilePage> get() { return (continuationToken, pageSize) -> client.getFilePages(continuationToken); } }; class FilePagedFlux extends ContinuablePagedFluxCore<FileContinuationToken, File, FilePage> { FilePagedFlux(Supplier<PageRetriever<FileContinuationToken, FilePage>> pageRetrieverProvider) { super(pageRetrieverProvider); } } FilePagedFlux filePagedFlux = new FilePagedFlux(pageRetrieverProvider); END: com.azure.core.util.paging.pagedfluxcore.continuationtoken }

Target:
public void customContinuationTokenSnippet() { class ContinuationState<C> { private C lastContinuationToken; private boolean isDone; ContinuationState(C token) { this.lastContinuationToken = token; } void setLastContinuationToken(C token) { this.isDone = token == null; this.lastContinuationToken = token; } C getLastContinuationToken() { return this.lastContinuationToken; } boolean isDone() { return this.isDone; } } class FileContinuationToken { public int getNextLinkId() { return 0; } } class File { } class FilePage implements ContinuablePage<FileContinuationToken, File> { @Override public IterableStream<File> getElements() { return null; } @Override public FileContinuationToken getContinuationToken() { return null; } } class FileShareServiceClient { Flux<FilePage> getFilePages(FileContinuationToken token) { return null; } } FileShareServiceClient client = null; Supplier<PageRetriever<FileContinuationToken, FilePage>> pageRetrieverProvider = new Supplier<PageRetriever<FileContinuationToken, FilePage>>() { @Override public PageRetriever<FileContinuationToken, FilePage> get() { return (continuationToken, pageSize) -> client.getFilePages(continuationToken); } }; class FilePagedFlux extends ContinuablePagedFluxCore<FileContinuationToken, File, FilePage> { FilePagedFlux(Supplier<PageRetriever<FileContinuationToken, FilePage>> pageRetrieverProvider) { super(pageRetrieverProvider); } } FilePagedFlux filePagedFlux = new FilePagedFlux(pageRetrieverProvider); END: com.azure.core.util.paging.pagedfluxcore.continuationtoken }
Source:
private void interceptOnTouchListener() { this.setOnTouchListener((v, event) -> { boolean isSwipe = false; float deltaX = 0.0f; Log.e("#SwipableCardView#", event.getAction() + ""); switch (event.getAction()) { case MotionEvent.ACTION_DOWN: x1 = event.getX(); break; case MotionEvent.ACTION_UP: v.performClick(); x2 = event.getX(); deltaX = x2 - x1; if (deltaX < 0) { isSwipe = true; } else if (deltaX > 0) { isSwipe = true; } break; } if (isSwipe && (pixelToDp(Math.abs(deltaX)) > MINIMUM_THRESHOLD_FOR_SWIPE)) { return onSwipe(v); } return false; }); }

Target:
private void interceptOnTouchListener() { this.setOnTouchListener((v, event) -> { boolean isSwipe = false; float deltaX = 0.0f; Log.e("#SwipableCardView#", event.getAction() + ""); switch (event.getAction()) { case MotionEvent.ACTION_DOWN: x1 = event.getX(); break; case MotionEvent.ACTION_UP: x2 = event.getX(); deltaX = x2 - x1; if (deltaX < 0) { isSwipe = true; } else if (deltaX > 0) { isSwipe = true; } break; } if (isSwipe && (pixelToDp(Math.abs(deltaX)) > MINIMUM_THRESHOLD_FOR_SWIPE)) { return onSwipe(v); } return false; }); }
Source:
public TmfEventField[] extractItemFields(ITmfEvent event) { if (event instanceof BtfEvent) { BtfEvent btfEvent = (BtfEvent) event; TmfEventField[] fields = new TmfEventField[8]; fields[0] = new TmfEventField(TIMESTAMP_COLUMN, event.getTimestamp(), null); fields[1] = new TmfEventField(SOURCE_COLUMN, event.getSource(), null); final ITmfEventField content = btfEvent.getContent(); List<String> fieldNames = new ArrayList<>(content.getFieldNames()); fields[2] = (TmfEventField) content.getField(fieldNames.get(1)); fields[3] = new TmfEventField(TYPE_COLUMN, btfEvent.getType() .getName(), null); fields[4] = new TmfEventField(TARGET_COLUMN, event.getReference(), null); fields[5] = (TmfEventField) content.getField(fieldNames.get(2)); fields[6] = (TmfEventField) content.getField(fieldNames.get(0)); fields[7] = (TmfEventField) ((fieldNames.size() > 3 && content.getField(fieldNames.get(3)) != null) ? content .getField(fieldNames.get(3)) : NULL_NOTE_FIELD); return fields; } return new TmfEventField[0]; }

Target:
public TmfEventField[] extractItemFields(ITmfEvent event) { if (event instanceof BtfEvent) { BtfEvent btfEvent = (BtfEvent) event; TmfEventField[] fields = new TmfEventField[8]; fields[0] = new TmfEventField(BtfColumnNames.TIMESTAMP.toString(), event.getTimestamp(), null); fields[1] = new TmfEventField(BtfColumnNames.SOURCE.toString(), event.getSource(), null); final ITmfEventField content = btfEvent.getContent(); ITmfEventField notesField = content.getField(BtfColumnNames.NOTES.toString()); fields[2] = (TmfEventField) content.getField(BtfColumnNames.SOURCE_INSTANCE.toString()); fields[3] = new TmfEventField(BtfColumnNames.EVENT_TYPE.toString(), btfEvent.getType().getName(), null); fields[4] = new TmfEventField(BtfColumnNames.TARGET.toString(), event.getReference(), null); fields[5] = (TmfEventField) content.getField(BtfColumnNames.TARGET_INSTANCE.toString()); fields[6] = (TmfEventField) content.getField(BtfColumnNames.EVENT.toString()); fields[7] = (TmfEventField) ((notesField != null) ? notesField : NULL_NOTE_FIELD); return fields; } return new TmfEventField[0]; }
Source:
public void onCatch(Throwable caught) { if (Utils.throwableContainsSpecificType(caught, SSLException.class) && WikipediaApp.getInstance().incSslFailCount() < 2) { WikipediaApp.getInstance().setSslFallback(true); NetworkUtils.toastNetworkFail(); cancel(); return; } throw new RuntimeException(caught); }

Target:
public void onCatch(Throwable caught) { if (Utils.throwableContainsSpecificType(caught, SSLException.class) && WikipediaApp.getInstance().incSslFailCount() < 2) { WikipediaApp.getInstance().setSslFallback(true); if (!isCancelled()) { NetworkUtils.toastNetworkFail(); } cancel(); return; } throw new RuntimeException(caught); }
Source:
public List<PackageRoots[]> isConsistentClassSpace(PackageRoots exportingRoots, ResolverBundle exporter, List<PackageRoots> visited, List<PackageRoots[]> results) { if (roots == null) return results; int size = roots.length; for (int i = 0; i < size; i++) { ResolverExport root = roots[i]; String[] uses = root.getUsesDirective(); if (uses == null) continue; if (visited == null) visited = new ArrayList<>(1); if (visited.contains(this)) return results; visited.add(this); for (String use : uses) { if (use.equals(root.getName()) || !use.equals(exportingRoots.name)) { continue; } PackageRoots thisUsedRoots = getPackageRoots(root.getExporter(), use, null); PackageRoots exportingUsedRoots = getPackageRoots(exporter, use, null); if (thisUsedRoots == exportingRoots) return results; if (thisUsedRoots != nullPackageRoots && exportingUsedRoots != nullPackageRoots) if (!(subSet(thisUsedRoots.roots, exportingUsedRoots.roots) || subSet(exportingUsedRoots.roots, thisUsedRoots.roots))) { if (results == null) results = new ArrayList<>(1); results.add(new PackageRoots[] {this, exportingUsedRoots}); } results = thisUsedRoots.isConsistentClassSpace(exportingRoots, exporter, visited, results); } } return results; }

Target:
public List<PackageRoots[]> isConsistentClassSpace(PackageRoots exportingRoots, ResolverBundle exporter, List<PackageRoots> visited, List<PackageRoots[]> results) { if (roots == null) return results; for (ResolverExport root : roots) { String[] uses = root.getUsesDirective(); if (uses == null) continue; if (visited == null) visited = new ArrayList<>(1); if (visited.contains(this)) return results; visited.add(this); for (String use : uses) { if (use.equals(root.getName()) || !use.equals(exportingRoots.name)) { continue; } PackageRoots thisUsedRoots = getPackageRoots(root.getExporter(), use, null); PackageRoots exportingUsedRoots = getPackageRoots(exporter, use, null); if (thisUsedRoots == exportingRoots) return results; if (thisUsedRoots != nullPackageRoots && exportingUsedRoots != nullPackageRoots) if (!(subSet(thisUsedRoots.roots, exportingUsedRoots.roots) || subSet(exportingUsedRoots.roots, thisUsedRoots.roots))) { if (results == null) results = new ArrayList<>(1); results.add(new PackageRoots[] {this, exportingUsedRoots}); } results = thisUsedRoots.isConsistentClassSpace(exportingRoots, exporter, visited, results); } } return results; }
Source:
public URI resolve() throws Exception { if (value == null) { value = location.accept(new URIVisitor(), environment); } return value; }

Target:
public URI resolve() throws Exception { if (evaluatedURI == null) { evaluatedURI = location.accept(VISITOR, environment); } return evaluatedURI; }
Source:
protected String createPassFile(String value) throws IOException { File temp = File.createTempFile("ovirt", ".tmp"); String fileName = temp.getName(); BufferedWriter out = new BufferedWriter(new FileWriter(temp)); out.write(value); out.close(); return fileName; }

Target:
protected String createPassFile(String value) throws IOException { File temp = File.createTempFile("ovirt", ".tmp"); String filePath = temp.getAbsolutePath(); BufferedWriter out = new BufferedWriter(new FileWriter(temp)); out.write(value); out.close(); if (new File("/usr/bin/chmod").exists()) { Runtime.getRuntime().exec("/usr/bin/chmod " + filePath); } return filePath; }
Source:
public Set<String> getX86IrqVectorsEntry() { return fIpiEntrySet; }

Target:
public Collection<String> getX86IrqVectorsEntry() { return IPI_ENTRY_SET; }
Source:
private void addOtherMasterLogs(Container result) { final Jenkins jenkins = Jenkins.getInstance(); if (jenkins == null) { LOGGER.log(Level.WARNING, "Cannot add master logs to the bundle. Jenkins instance is not ready"); return; } File[] files = jenkins.getRootDir().listFiles(ROTATED_LOGFILE_FILTER); if (files != null) { for (File f : files) { result.add(new FileContent("other-logs/" + f.getName(), f)); } } File logs = new File(jenkins.getRootDir(), "logs"); if (logs.isDirectory()) { files = logs.listFiles(ROTATED_LOGFILE_FILTER); if (files != null) { for (File f : files) { result.add(new FileContent("other-logs/" + f.getName(), f)); } } } File taskLogs = new File(logs, "tasks"); if (taskLogs.exists() && taskLogs.isDirectory()) { files = taskLogs.listFiles(ROTATED_LOGFILE_FILTER); if (files != null) { for (File f : files) { result.add(new FileContent("other-logs/" + f.getName(), f)); } } } }

Target:
private void addOtherMasterLogs(Container result) { final Jenkins jenkins = Jenkins.getInstance(); if (jenkins == null) { LOGGER.log(Level.WARNING, "Cannot add master logs to the bundle. Jenkins instance is not ready"); return; } File[] files = jenkins.getRootDir().listFiles(ROTATED_LOGFILE_FILTER); if (files != null) { for (File f : files) { result.add(new FileContent("other-logs/" + f.getName(), f)); } } File logs = new File(jenkins.getRootDir(), "logs"); files = logs.listFiles(ROTATED_LOGFILE_FILTER); if (files != null) { for (File f : files) { result.add(new FileContent("other-logs/" + f.getName(), f)); } } File taskLogs = new File(logs, "tasks"); files = taskLogs.listFiles(ROTATED_LOGFILE_FILTER); if (files != null) { for (File f : files) { result.add(new FileContent("other-logs/" + f.getName(), f)); } } }
Source:
private void buildAspects() { for( IGrinderEntry recipe : AEAspectRegister.this.GRINDER_RECIPES ) { try { ItemStack recipeOutput = recipe.getOutput(); if( recipeOutput == null || recipeOutput.getItem() == null ) { continue; } if( this.areStacksEqualIgnoreAmount( recipeOutput, this.itemStack ) ) { if( this.isRecipeUsable( recipe ) ) { return; } } } catch( Exception e ) { } } for( InscriberRecipe recipe : Inscribe.RECIPIES ) { try { ItemStack recipeOutput = recipe.output; if( recipeOutput == null || recipeOutput.getItem() == null ) { continue; } if( this.areStacksEqualIgnoreAmount( recipeOutput, this.itemStack ) ) { if( this.isRecipeUsable( recipe ) ) { return; } } } catch( Exception e ) { } } for( IRecipe recipe : AEAspectRegister.this.NORMAL_RECIPES ) { try { ItemStack recipeOutput = recipe.getRecipeOutput(); if( recipeOutput == null || recipeOutput.getItem() == null ) { continue; } if( !this.areStacksEqualIgnoreAmount( recipeOutput, this.itemStack ) ) { continue; } if( this.isRecipeUsable( recipe ) ) { return; } } catch( Exception e ) { } } }

Target:
private void buildAspects() { for( IGrinderEntry recipe : AEAspectRegister.this.GRINDER_RECIPES ) { try { ItemStack recipeOutput = recipe.getOutput(); if( recipeOutput == null || recipeOutput.getItem() == null ) { continue; } if( this.areStacksEqualIgnoreAmount( recipeOutput, this.itemStack ) ) { if( this.isRecipeUsable( recipe ) ) { return; } } } catch( Exception e ) { } } for( InscriberRecipe recipe : Inscribe.RECIPES ) { try { ItemStack recipeOutput = recipe.output; if( recipeOutput == null || recipeOutput.getItem() == null ) { continue; } if( this.areStacksEqualIgnoreAmount( recipeOutput, this.itemStack ) ) { if( this.isRecipeUsable( recipe ) ) { return; } } } catch( Exception e ) { } } for( IRecipe recipe : AEAspectRegister.this.NORMAL_RECIPES ) { try { ItemStack recipeOutput = recipe.getRecipeOutput(); if( recipeOutput == null || recipeOutput.getItem() == null ) { continue; } if( !this.areStacksEqualIgnoreAmount( recipeOutput, this.itemStack ) ) { continue; } if( this.isRecipeUsable( recipe ) ) { return; } } catch( Exception e ) { } } }
Source:
private void initializeFavoriteCheck() { if (ConnectorFactory.getConnector(cache).supportsAddToFavorite(cache, typeSelected)) { if (premFavPoints > 0) { favCheck.setVisibility(View.VISIBLE); favCheck.setText(res.getQuantityString(R.string.fav_points_remaining, premFavPoints, premFavPoints)); } } else { favCheck.setVisibility(View.GONE); } }

Target:
private void initializeFavoriteCheck() { if (ConnectorFactory.getConnector(cache).supportsAddToFavorite(cache, typeSelected)) { if (premFavPoints > 0) { favCheck.setVisibility(View.VISIBLE); favCheck.setText(res.getQuantityString(R.plurals.fav_points_remaining, premFavPoints, premFavPoints)); } } else { favCheck.setVisibility(View.GONE); } }
Source:
public K8SWatchService(K8SFileSystem fs) { this.fs = fs; this.ccf = (CloudClientFactory) fs.provider(); Executors.newSingleThreadExecutor().execute(() -> ccf.executeCloudFunction(this::triageEvents, KubernetesClient.class)); }

Target:
public K8SWatchService(K8SFileSystem fs) { this.fs = fs; this.ccf = (CloudClientFactory) fs.provider(); Executors.newSingleThreadExecutor(new ThreadFactoryBuilder().setNameFormat("k8sfs-cm-watcher-thread-%d").build()).execute(() -> ccf.executeCloudFunction(this::triageEvents, KubernetesClient.class)); }
Source:
private void renderDiffBaseListBox(ChangeInfo info) { JsArray<RevisionInfo> list = info.revisions().values(); RevisionInfo.sortRevisionInfoByNumber(list); int selectedIdx = -1; for (int i = list.length() - 1; i >= 0; i--) { RevisionInfo r = list.get(i); diffBase.addItem( r._number() + ": " + r.name().substring(0, 6), r.name()); if (r.name().equals(revision)) { SelectElement.as(diffBase.getElement()).getOptions() .getItem(diffBase.getItemCount() - 1).setDisabled(true); } if (base != null) { if (base.equals(String.valueOf(r._number()))) { selectedIdx = i; } } } RevisionInfo rev = info.revisions().get(revision); JsArray<CommitInfo> parents = rev.commit().parents(); diffBase.addItem( parents.length() > 1 ? Util.C.autoMerge() : Util.C.baseDiffItem(), ""); diffBase.setSelectedIndex(selectedIdx == -1 ? diffBase.getItemCount() - 1 : selectedIdx - 1); }

Target:
private void renderDiffBaseListBox(ChangeInfo info) { JsArray<RevisionInfo> list = info.revisions().values(); RevisionInfo.sortRevisionInfoByNumber(list); int selectedIdx = list.length(); for (int i = list.length() - 1; i >= 0; i--) { RevisionInfo r = list.get(i); diffBase.addItem( r._number() + ": " + r.name().substring(0, 6), r.name()); if (r.name().equals(revision)) { SelectElement.as(diffBase.getElement()).getOptions() .getItem(diffBase.getItemCount() - 1).setDisabled(true); } if (base != null) { if (base.equals(String.valueOf(r._number()))) { selectedIdx = list.length() - i - 1; } } } RevisionInfo rev = info.revisions().get(revision); JsArray<CommitInfo> parents = rev.commit().parents(); diffBase.addItem( parents.length() > 1 ? Util.C.autoMerge() : Util.C.baseDiffItem(), ""); diffBase.setSelectedIndex(selectedIdx); }
Source:
@Override public void syntaxError(String s, String s1, List<String> list, String s2, Integer integer) { }

Target:
public void syntaxError(String s, String s1, List<String> list, String s2, Integer integer)
Source:
protected void onStop() { super.onStop(); Log.d(TAG, "Player Activity Stopped"); if (null != player) { player.suspend(); } if(TAG.toString().equalsIgnoreCase("class com.ooyala.sample.players.InsertAdPlayerActivity")) { Log.d(PERFORMANCE_MONITOR_TAG, performanceMonitor.buildStatisticsSnapshot().generateReport()); performanceMonitor.destroy(); } }

Target:
protected void onStop() { super.onStop(); Log.d(TAG, "Player Activity Stopped"); if (null != player) { player.suspend(); } if(TAG.equalsIgnoreCase("class com.ooyala.sample.players.InsertAdPlayerActivity")) { Log.d(PERFORMANCE_MONITOR_TAG, performanceMonitor.buildStatisticsSnapshot().generateReport()); performanceMonitor.destroy(); } }
Source:
public void testCompareWithCommit() throws Exception { String compareWithCommitMenuText = util .getPluginLocalizedValue("CompareWithCommitAction.label"); Thread.sleep(5000); String dialogTitle = UIText.CommitSelectionDialog_WindowTitle; SWTBotShell dialog = openCompareWithDialog(compareWithCommitMenuText, dialogTitle); assertEquals(3, dialog.bot().table().rowCount()); dialog.bot().table().select(0); dialog.bot().button(IDialogConstants.OK_LABEL).click(); waitUntilCompareTreeViewShows(); assertEquals(0, bot.viewById(CompareTreeView.ID).bot().tree() .getAllItems().length); dialog = openCompareWithDialog(compareWithCommitMenuText, dialogTitle); dialog.bot().table().select(1); dialog.bot().button(IDialogConstants.OK_LABEL).click(); waitUntilCompareTreeViewTreeHasNodeCount(1); }

Target:
public void testCompareWithCommit() throws Exception { String compareWithCommitMenuText = util .getPluginLocalizedValue("CompareWithCommitAction.label"); String dialogTitle = UIText.CommitSelectionDialog_WindowTitle; SWTBotShell dialog = openCompareWithDialog(compareWithCommitMenuText, dialogTitle); assertEquals(3, dialog.bot().table().rowCount()); dialog.bot().table().select(0); dialog.bot().button(IDialogConstants.OK_LABEL).click(); waitUntilCompareTreeViewShows(); assertEquals(0, bot.viewById(CompareTreeView.ID).bot().tree() .getAllItems().length); dialog = openCompareWithDialog(compareWithCommitMenuText, dialogTitle); dialog.bot().table().select(1); dialog.bot().button(IDialogConstants.OK_LABEL).click(); waitUntilCompareTreeViewTreeHasNodeCount(1); }
Source:
public InventoryArchetype build(String id, String name) { return new CompositeInventoryArchetype(id, name, types, properties, containerProvider); }

Target:
public InventoryArchetype build(String id, String name) { return new CompositeInventoryArchetype(id, name, this.types, this.properties, this.containerProvider); }
Source:
public void resourceChanged(IResourceChangeEvent event) { for (IMarkerDelta delta : event.findMarkerDeltas(IMarker.BOOKMARK, false)) { for (TimeChartDecorationProvider provider : fDecorationProviders.values()) { if (delta.getResource().equals(provider.getBookmarksFile())) { System.out.println(delta.getAttributes()); if (delta.getKind() == IResourceDelta.REMOVED || delta.getMarker().getAttribute(IMarker.LOCATION, -1) != -1 || delta.getMarker().getAttribute(ITmfMarker.MARKER_RANK, (String) null) != null) { provider.refreshBookmarks(); } } } } redecorate(); }

Target:
public void resourceChanged(IResourceChangeEvent event) { for (IMarkerDelta delta : event.findMarkerDeltas(IMarker.BOOKMARK, false)) { for (TimeChartDecorationProvider provider : fDecorationProviders.values()) { if (delta.getResource().equals(provider.getBookmarksFile())) { if (delta.getKind() == IResourceDelta.REMOVED || delta.getMarker().getAttribute(IMarker.LOCATION, -1) != -1 || delta.getMarker().getAttribute(ITmfMarker.MARKER_RANK, (String) null) != null) { provider.refreshBookmarks(); } } } } redecorate(); }