auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { View view = inflater.inflate(R.layout.fragment_about, null); textViewVersion = (TextView) view.findViewById(R.id.about_tv_version); listView = (ListView) view.findViewById(R.id.list); try { versionName = getActivity().getPackageManager().getPackageInfo(getActivity().getPackageName(), 0).versionName; } catch (PackageManager.NameNotFoundException e) { e.printStackTrace(); } textViewVersion.setText(getString(R.string.about_version_title_template, versionName)); menuItems = new String[3]; menuItems[0] = getString(R.string.about_credits); menuItems[1] = getString(R.string.about_about); menuItems[2] = getString(R.string.about_send_feedback); ArrayAdapter<String> adapter = new ArrayAdapter<>(getActivity(), android.R.layout.simple_list_item_1, menuItems); listView.setAdapter(adapter); listView.setOnItemClickListener(this); return view; }

Target:
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { View view = inflater.inflate(R.layout.fragment_about, null); textViewVersion = (TextView) view.findViewById(R.id.about_tv_version); listView = (ListView) view.findViewById(R.id.list); try { versionName = getActivity().getPackageManager().getPackageInfo(getActivity().getPackageName(), 0).versionName; } catch (PackageManager.NameNotFoundException e) { LoggingManager.Timber.d("Get version name error", e); } textViewVersion.setText(getString(R.string.about_version_title_template, versionName)); menuItems = new String[3]; menuItems[0] = getString(R.string.about_credits); menuItems[1] = getString(R.string.about_about); menuItems[2] = getString(R.string.about_send_feedback); ArrayAdapter<String> adapter = new ArrayAdapter<>(getActivity(), android.R.layout.simple_list_item_1, menuItems); listView.setAdapter(adapter); listView.setOnItemClickListener(this); return view; }
Source:
private boolean validate(HasProtectionAccessTokenParams params) { final OxdServerConfiguration configuration = ServerLauncher.getInjector().getInstance(ConfigurationService.class).get(); if (configuration.getProtectCommandsWithAccessToken() != null && !configuration.getProtectCommandsWithAccessToken()) { return false; } final String accessToken = params.getProtectionAccessToken(); if (StringUtils.isBlank(accessToken)) { throw new ErrorResponseException(ErrorResponseCode.BLANK_PROTECTION_ACCESS_TOKEN); } if (params instanceof RegisterSiteParams) { return false; } final RpService rpService = ServerLauncher.getInjector().getInstance(RpService.class); final Rp rp = rpService.getRp(params.getOxdId()); final IntrospectionResponse introspectionResponse = introspect(accessToken, params.getOxdId()); LOG.trace("access_token: " + accessToken + ", introspection: " + introspectionResponse + ", clientId: " + rp.getClientId()); if (StringUtils.isBlank(introspectionResponse.getClientId())) { throw new ErrorResponseException(ErrorResponseCode.NO_CLIENT_ID_IN_INTROSPECTION_RESPONSE); } if (!IntrospectionService.getScopes(introspectionResponse).contains("oxd")) { throw new ErrorResponseException(ErrorResponseCode.PROTECTION_ACCESS_TOKEN_INSUFFICIENT_SCOPE); } if (!introspectionResponse.getClientId().equals(rp.getClientId())) { throw new ErrorResponseException(ErrorResponseCode.INVALID_ID_TOKEN_MISMATCHED_CLIENT_ID); } return true; }

Target:
private boolean validate(HasProtectionAccessTokenParams params) { final OxdServerConfiguration configuration = ServerLauncher.getInjector().getInstance(ConfigurationService.class).get(); if (configuration.getProtectCommandsWithAccessToken() != null && !configuration.getProtectCommandsWithAccessToken()) { return false; } final String accessToken = params.getProtectionAccessToken(); if (StringUtils.isBlank(accessToken)) { throw new ErrorResponseException(ErrorResponseCode.BLANK_PROTECTION_ACCESS_TOKEN); } if (params instanceof RegisterSiteParams) { return false; } final RpService rpService = ServerLauncher.getInjector().getInstance(RpService.class); final Rp rp = rpService.getRp(params.getOxdId()); final IntrospectionResponse introspectionResponse = introspect(accessToken, params.getOxdId()); LOG.trace("access_token: " + accessToken + ", introspection: " + introspectionResponse + ", clientId: " + rp.getClientId()); if (StringUtils.isBlank(introspectionResponse.getClientId())) { throw new ErrorResponseException(ErrorResponseCode.NO_CLIENT_ID_IN_INTROSPECTION_RESPONSE); } if (!IntrospectionService.getScopes(introspectionResponse).contains("oxd")) { throw new ErrorResponseException(ErrorResponseCode.PROTECTION_ACCESS_TOKEN_INSUFFICIENT_SCOPE); } if (!introspectionResponse.getClientId().equals(rp.getClientId())) { throw new ErrorResponseException(ErrorResponseCode.INVALID_ACCESS_TOKEN_MISMATCHED_CLIENT_ID); } return true; }
Source:
public void testStreamingLocal() throws Exception { String[] ARGS = { "--references=" + helper.PLATINUM_GENOMES_BRCA1_REFERENCES, "--variantSetId=" + helper.PLATINUM_GENOMES_DATASET, "--hasNonVariantSegments", "--output=" + outputPrefix, "--useGrpc=true" }; testBase(ARGS); }

Target:
public void testStreamingLocal() throws Exception { String[] ARGS = { "--references=" + helper.PLATINUM_GENOMES_BRCA1_REFERENCES, "--variantSetId=" + helper.PLATINUM_GENOMES_DATASET, "--hasNonVariantSegments", "--output=" + outputPrefix }; testBase(ARGS); }
Source:
public void insertMigratedData(int partitionId, Map<String, Map<Data, MultiMapValue>> map) { for (Map.Entry<String, Map<Data, MultiMapValue>> entry : map.entrySet()) { String name = entry.getKey(); MultiMapContainer container = getOrCreateCollectionContainerWithoutAccess(partitionId, name); Map<Data, MultiMapValue> collections = entry.getValue(); long maxRecordId = -1; for (Map.Entry<Data, MultiMapValue> multiMapValueEntry : collections.entrySet()) { MultiMapValue multiMapValue = multiMapValueEntry.getValue(); MultiMapValue prevValue = container.getMultiMapValues().put(multiMapValueEntry.getKey(), multiMapValue); if (prevValue != null) { container.decrementSize(prevValue.size()); } container.incrementSize(multiMapValue.size()); long recordId = getMaxRecordId(multiMapValue); maxRecordId = max(maxRecordId, recordId); } container.setId(maxRecordId); } }

Target:
public void insertMigratedData(int partitionId, Map<String, Map<Data, MultiMapValue>> map) { for (Map.Entry<String, Map<Data, MultiMapValue>> entry : map.entrySet()) { String name = entry.getKey(); MultiMapContainer container = getOrCreateCollectionContainerWithoutAccess(partitionId, name); Map<Data, MultiMapValue> collections = entry.getValue(); long maxRecordId = -1; for (Map.Entry<Data, MultiMapValue> multiMapValueEntry : collections.entrySet()) { MultiMapValue multiMapValue = multiMapValueEntry.getValue(); container.setValue(multiMapValueEntry.getKey(), multiMapValue); long recordId = getMaxRecordId(multiMapValue); maxRecordId = max(maxRecordId, recordId); } container.setId(maxRecordId); } }
Source:
public Action<?, ?> downscaleClusterProxyRegistrationAction() { return new AbstractDownscaleAction<>(StackEvent.class) { @Override protected void doExecute(FreeIpaDownscaleContext context, StackEvent payload, Map<Object, Object> variables) throws Exception { Stack stack = context.getStack(); stackUpdater.updateStackStatus(stack.getId(), DetailedStackStatus.DOWNSCALE_IN_PROGRESS, "Updating cluster proxy registration."); List<String> instanceIdsToRegister = stack.getNotDeletedInstanceMetaDataList().stream() .map(InstanceMetaData::getInstanceId) .filter(instanceId -> !context.getInstanceIds().contains(instanceId)) .collect(Collectors.toList()); ClusterProxyUpdateRegistrationRequest request = new ClusterProxyUpdateRegistrationRequest(stack.getId(), instanceIdsToRegister); sendEvent(context, request.selector(), request); } }; }

Target:
public Action<?, ?> downscaleClusterProxyRegistrationAction() { return new AbstractDownscaleAction<>(StackEvent.class) { @Override protected void doExecute(StackContext context, StackEvent payload, Map<Object, Object> variables) throws Exception { Stack stack = context.getStack(); stackUpdater.updateStackStatus(stack.getId(), DetailedStackStatus.DOWNSCALE_IN_PROGRESS, "Updating cluster proxy registration."); List<String> instanceIds = getInstanceIds(variables); List<String> instanceIdsToRegister = stack.getNotDeletedInstanceMetaDataList().stream() .map(InstanceMetaData::getInstanceId) .filter(instanceId -> !instanceIds.contains(instanceId)) .collect(Collectors.toList()); ClusterProxyUpdateRegistrationRequest request = new ClusterProxyUpdateRegistrationRequest(stack.getId(), instanceIdsToRegister); sendEvent(context, request.selector(), request); } }; }
Source:
public CborObject toCbor() { Map<String, CborObject> cbor = new TreeMap<>(); cbor.put("count", new CborObject.CborLong(bytesRead)); cbor.put("caps", new CborObject.CborList(retrievedCapabilities)); return CborObject.CborMap.build(cbor); }

Target:
public CborObject toCbor() { Map<String, CborObject> cbor = new TreeMap<>(); cbor.put("bytes", new CborObject.CborLong(bytesRead)); cbor.put("caps", new CborObject.CborList(retrievedCapabilities)); return CborObject.CborMap.build(cbor); }
Source:
public ItemUseHandler getItemHandler() { return e -> { Location currentLoc = e.getPlayer().getLocation(); JsonObject json = createJsonFromLocation(currentLoc); PersistentDataContainer pdc = item.getItemMeta().getPersistentDataContainer(); pdc.set(locationKey, PersistentDataType.STRING, json.toString()); e.getPlayer().sendMessage("Successfully saved current location. You will teleport here when you fall in the void."); }; }

Target:
public ItemUseHandler getItemHandler() { return e -> { Location currentLoc = e.getPlayer().getLocation(); JsonObject json = createJsonFromLocation(currentLoc); ItemStack item = e.getItem(); if (SlimefunPlugin.getProtectionManager().hasPermission(e.getPlayer(), currentLoc, ProtectableAction.PLACE_BLOCK) && item.hasItemMeta()) { ItemMeta itemMeta = item.getItemMeta(); itemMeta.getPersistentDataContainer().set(locationKey, PersistentJsonDataType.JSON_OBJECT, json); item.setItemMeta(itemMeta); SlimefunPlugin.getLocalization().sendMessage(e.getPlayer(), "messages.talisman.resurrected-location", true); } SlimefunPlugin.getLocalization().sendMessage(e.getPlayer(), "messages.talisman.resurrected-location-failed", true); }; }
Source:
public void readSettings() { String inFilePath = ModuleSettings.getConfigSetting(contextName, PROP_LASTINPUT_PATH); if (null != inFilePath) { if (!inFilePath.isEmpty()) { pathTextField.setText(inFilePath); } } }

Target:
void readSettings() { String inFilePath = ModuleSettings.getConfigSetting(contextName, PROP_LASTINPUT_PATH); if (null != inFilePath) { if (!inFilePath.isEmpty()) { pathTextField.setText(inFilePath); } } }
Source:
public void shouldReturnLastFinishedRun() { JobAction jobAction = getJobActionFromNewProjectWithWorkspaceFile(); Run<?, ?> run = jobAction.getLastFinishedRun(); assertThat(run).isNotNull(); }

Target:
public void shouldReturnLastFinishedRun() { FreeStyleProject project = createJobWithWorkspaceFile("eclipse.txt"); enableWarningsWithFilePattern(project); scheduleBuildAndAssertStatus(project, Result.SUCCESS); JobAction firstJobAction = project.getAction(JobAction.class); Run<?, ?> firstRun = firstJobAction.getLastFinishedRun(); assertThat(firstRun.number).isEqualTo(1); scheduleBuildAndAssertStatus(project, Result.SUCCESS); JobAction secondJobAction = project.getAction(JobAction.class); Run<?, ?> secondRun = secondJobAction.getLastFinishedRun(); assertThat(secondRun.number).isEqualTo(2); }
Source:
public static void teardownClusters() throws IOException { terminateCluster(clusterBinding); }

Target:
public static void teardownClusters() throws IOException { terminateCluster(clusterBinding); clusterBinding = null; }
Source:
private Firmware(Builder builder) { this.uid = builder.uid; this.version = builder.uid.getFirmwareVersion(); this.vendor = builder.vendor; this.model = builder.model; this.description = builder.description; this.prerequisiteVersion = builder.prerequisiteVersion; this.changelog = builder.changelog; this.onlineChangelog = builder.onlineChangelog; this.inputStream = builder.inputStream; this.md5Hash = builder.md5Hash; this.properties = Collections .unmodifiableMap(builder.properties != null ? builder.properties : new HashMap<>()); this.internalVersion = new Version(this.version); this.internalPrerequisiteVersion = this.prerequisiteVersion != null ? new Version(this.prerequisiteVersion) : null; }

Target:
private Firmware(Builder builder) { this.uid = builder.uid; this.version = builder.uid.getFirmwareVersion(); this.vendor = builder.vendor; this.model = builder.model; this.description = builder.description; this.prerequisiteVersion = builder.prerequisiteVersion; this.changelog = builder.changelog; this.onlineChangelog = builder.onlineChangelog; this.inputStream = builder.inputStream; this.md5Hash = builder.md5Hash; this.properties = Collections .unmodifiableMap(builder.properties != null ? builder.properties : Collections.emptyMap()); this.internalVersion = new Version(this.version); this.internalPrerequisiteVersion = this.prerequisiteVersion != null ? new Version(this.prerequisiteVersion) : null; }
Source:
void putServiceSpans(Map<String, Set<Pair<String>>> indexToServiceSpans, String index, Span s) { Set<Pair<String>> serviceSpans = indexToServiceSpans.get(index); synchronized(indexToServiceSpansCache) { Set<Pair<String>> serviceSpansCached = indexToServiceSpansCache.get(index); if (serviceSpans == null) indexToServiceSpans.put(index, serviceSpans = new LinkedHashSet<>()); if (serviceSpansCached == null) indexToServiceSpansCache.put(index, serviceSpansCached = Collections.newSetFromMap(new LinkedHashMap<Pair<String>, Boolean>() { @Override protected boolean removeEldestEntry(Map.Entry<Pair<String>, Boolean> eldest) { return size() > MAX_CACHE_ENTRIES; } })); for (String serviceName : s.serviceNames()) { Pair<String> p = Pair.create(serviceName, s.name); if (!serviceSpansCached.contains(p)) { serviceSpans.add(p); serviceSpansCached.add(p); } } } }

Target:
void putServiceSpans(Map<String, Set<Pair<String>>> indexToServiceSpans, String index, Span s) { Set<Pair<String>> serviceSpans = indexToServiceSpans.get(index); if (serviceSpans == null) indexToServiceSpans.put(index, serviceSpans = new LinkedHashSet<>()); for (String serviceName : s.serviceNames()) { serviceSpans.add(Pair.create(serviceName, s.name)); } }
Source:
public boolean handleDown(PointF coordinate) { if (coordinate == null) { return false; } mInitialEventCoordinate = new PointF(coordinate.x, coordinate.y); mPreviousEventCoordinate = new PointF(coordinate.x, coordinate.y); pathToDraw.moveTo(coordinate.x, coordinate.y); movedDistance.set(0, 0); pathInsideBitmap = false; if ((coordinate.x < PaintroidApplication.drawingSurface.getBitmapWidth()) && (coordinate.y < PaintroidApplication.drawingSurface .getBitmapHeight()) && (coordinate.x > 0) && (coordinate.y > 0)) { pathInsideBitmap = true; } return true; }

Target:
public boolean handleDown(PointF coordinate) { if (coordinate == null) { return false; } mInitialEventCoordinate = new PointF(coordinate.x, coordinate.y); mPreviousEventCoordinate = new PointF(coordinate.x, coordinate.y); pathToDraw.moveTo(coordinate.x, coordinate.y); movedDistance.set(0, 0); pathInsideBitmap = false; pathInsideBitmap = checkPathInsideBitmap(coordinate); return true; }
Source:
void methodResolutionByUniqueIdWithParams(LogRecordListener listener) { UniqueIdSelector selector = selectUniqueId( uniqueIdForMethod(HerTestClass.class, "test7(java.lang.String)").toString()); resolver.resolveSelectors(request().selectors(selector).build(), engineDescriptor); assertEquals(2, engineDescriptor.getDescendants().size()); List<UniqueId> uniqueIds = uniqueIds(); assertThat(uniqueIds).contains(uniqueIdForClass(HerTestClass.class)); assertThat(uniqueIds).contains(uniqueIdForMethod(HerTestClass.class, "test7(java.lang.String)")); assertThat(listener.stream() .filter(logRecord -> JavaElementsResolver.class.getName().equals(logRecord.getLoggerName())) ).isEmpty(); }

Target:
void methodResolutionByUniqueIdWithParams(LogRecordListener listener) { UniqueIdSelector selector = selectUniqueId( uniqueIdForMethod(HerTestClass.class, "test7(java.lang.String)").toString()); resolver.resolveSelectors(request().selectors(selector).build(), engineDescriptor); assertEquals(2, engineDescriptor.getDescendants().size()); List<UniqueId> uniqueIds = uniqueIds(); assertThat(uniqueIds).contains(uniqueIdForClass(HerTestClass.class)); assertThat(uniqueIds).contains(uniqueIdForMethod(HerTestClass.class, "test7(java.lang.String)")); assertThat(listener.stream(JavaElementsResolver.class)).isEmpty(); }
Source:
private String buildCanonicalizedHeadersString(Multimap<String, String> canonicalizedHeadersMap) { StringBuilder canonicalizedHeadersBuffer = new StringBuilder(); for (Entry<String, String> header : canonicalizedHeadersMap.entries()) { String key = header.getKey(); canonicalizedHeadersBuffer.append(String.format("%s:%s\n", key.toLowerCase(), header.getValue())); } return canonicalizedHeadersBuffer.toString(); }

Target:
private static String buildCanonicalizedHeadersString(Multimap<String, String> canonicalizedHeadersMap) { StringBuilder canonicalizedHeadersBuffer = new StringBuilder(); for (Entry<String, String> header : canonicalizedHeadersMap.entries()) { String key = header.getKey(); canonicalizedHeadersBuffer.append(key.toLowerCase()).append(':').append(header.getValue()).append('\n'); } return canonicalizedHeadersBuffer.toString(); }
Source:
public void testMove() throws Exception { walker.move(); assertEquals(37.0 , walker.getX(), 0); walker.setFacingRight(false); walker.move(); assertEquals(32.0, walker.getX(), 0); }

Target:
public void testMove() throws Exception { walker.move(); assertEquals(Level.SPRITE_SIZE + Settings.MONSTER_SPEED , walker.getX(), 0); walker.setFacingRight(false); walker.move(); assertEquals(Level.SPRITE_SIZE, walker.getX(), 0); }
Source:
public void testInvalidFilePathProvided() throws Exception { params = new String[1]; params[0] = "/test/a.xm"; new SubmitJobCommand(params).execute(currentContextMock); assertThat(stack.get(0).getMessage(), is("'" + params[0] + "' is not a valid file.")); Mockito.verify(schedulerRestClientMock, times(0)).submitJobArchive(anyString(), anyObject(), anyObject()); throw stack.get(0); }

Target:
public void testInvalidFilePathProvided() throws Exception { params = new String[1]; params[0] = "/file/path/non/valid/a.xm"; new SubmitJobCommand(params).execute(currentContextMock); assertThat(stack.get(0).getMessage(), is("'" + params[0] + "' is not a valid file.")); Mockito.verify(schedulerRestClientMock, times(0)) .submitJobArchive(anyString(), convertObjectToInputStream(anyObject()), anyMap()); throw stack.get(0); }
Source:
private Map<String, String> addBuildArgsFromProperties(Properties properties) { String argPrefix = "docker.buildArg."; Map<String, String> buildArgs = new HashMap<>(); for(Object keyObj : properties.keySet()){ String key = (String)keyObj; if (key.startsWith(argPrefix)){ String argKey = key.replace(argPrefix, ""); buildArgs.put(argKey, properties.getProperty(key)); } } log.debug(String.format("Build args set %s", buildArgs)); return buildArgs; }

Target:
private Map<String, String> addBuildArgsFromProperties(Properties properties) { String argPrefix = "docker.buildArg."; Map<String, String> buildArgs = new HashMap<>(); for(Object keyObj : properties.keySet()){ String key = (String)keyObj; if (key.startsWith(argPrefix)){ String argKey = key.replaceFirst(argPrefix, ""); buildArgs.put(argKey, properties.getProperty(key)); } } log.debug(String.format("Build args set %s", buildArgs)); return buildArgs; }
Source:
protected void turn(float degree) throws AutonomousModeOverException, InterruptedException { DriveCode.rotate.set(degree/degree); waitUntilAtLeast(HeadingSensor.yaw, degree); DriveCode.rotate.set(0.0f); }

Target:
protected void turn(float degree) throws AutonomousModeOverException, InterruptedException { float startingYaw = HeadingSensor.yaw.get(); if (degree > 0) { DriveCode.rotate.set(rotateSpeed.get()); waitUntilAtLeast(HeadingSensor.yaw, startingYaw + degree); } else { DriveCode.rotate.set(-rotateSpeed.get()); waitUntilAtMost(HeadingSensor.yaw, startingYaw + degree); } DriveCode.rotate.set(0.0f); }
Source:
private void downloadFile(String bucketName, String keyName, String filePath, boolean pause, AmazonS3 s3Client) { getOut().println("Downloading to file: " + filePath + (pause ? " (pause)" : "")); File f = new File(filePath); TransferManager xferMgr = TransferManagerBuilder.standard().withS3Client(s3Client).build(); try { Download xfer = xferMgr.download(bucketName, keyName, f); SchedulerExamplesUtils.showTransferProgress(xfer); SchedulerExamplesUtils.waitForCompletion(xfer); } catch (AmazonServiceException e) { getErr().println(e.getMessage()); System.exit(1); } xferMgr.shutdownNow(); }

Target:
private void downloadFile(String bucketName, String keyName, String filePath, boolean pause, AmazonS3 s3Client) { getOut().println("Downloading to file: " + filePath + (pause ? " (pause)" : "")); File f = new File(filePath); TransferManager xferMgr = TransferManagerBuilder.standard().withS3Client(s3Client).build(); try { Download xfer = xferMgr.download(bucketName, keyName, f); SchedulerExamplesUtils.showTransferProgress(xfer); SchedulerExamplesUtils.waitForCompletion(xfer); } catch (AmazonServiceException e) { getErr().println(e.getMessage()); System.exit(1); } finally { xferMgr.shutdownNow(); } }
Source:
public void start(final ServiceProvider<Service> serviceProvider) { try { Properties properties = new Properties(); properties.put("connection.name", "EHCACHE:" + this.entityIdentifier); clusterConnection = ConnectionFactory.connect(clusterUri, properties); } catch (ConnectionException ex) { throw new RuntimeException(ex); } entityFactory = new EhcacheClientEntityFactory(clusterConnection); if (autoCreate) { try { create(); } catch (IllegalStateException ex) { } } connect(); }

Target:
public void start(final ServiceProvider<Service> serviceProvider) { try { Properties properties = new Properties(); properties.put(ConnectionPropertyNames.CONNECTION_NAME, CONNECTION_PREFIX + this.entityIdentifier); clusterConnection = ConnectionFactory.connect(clusterUri, properties); } catch (ConnectionException ex) { throw new RuntimeException(ex); } entityFactory = new EhcacheClientEntityFactory(clusterConnection); if (autoCreate) { try { create(); } catch (IllegalStateException ex) { } } connect(); }
Source:
public static <T> boolean getEnableJoinFilterRewrite(Query<T> query) { return parseBoolean(query, JOIN_FILTER_PUSH_DOWN_KEY, DEFAULT_ENABLE_JOIN_FILTER_REWRITE); }

Target:
public static <T> boolean getEnableJoinFilterRewrite(Query<T> query) { return parseBoolean(query, JOIN_FILTER_REWRITE_KEY, DEFAULT_ENABLE_JOIN_FILTER_REWRITE); }
Source:
protected void before() { cache = cacheFactory.create(); server = new GeodeRedisServer("localhost", 6380, (InternalCache) cache); server.setAllowUnsupportedCommands(true); }

Target:
protected void before() { cache = cacheFactory.create(); server = new GeodeRedisServer("localhost", 0, (InternalCache) cache); server.setAllowUnsupportedCommands(true); }
Source:
public void testAutoCompleteCheckActivationData() { String caseId = caseService.startCase(deploymentUnit.getIdentifier(), STAGE_WITH_ACTIVATION_COND); assertThat(caseId).isNotNull().isEqualTo(FIRST_CASE_ID); assertCaseInstanceActive(caseId); Collection<CaseStageInstance> activeStages = caseRuntimeDataService.getCaseInstanceStages(caseId, true, new QueryContext()); assertThat(activeStages).hasSize(0); caseService.addDataToCaseFile(caseId, "readyToActivate", true); activeStages = caseRuntimeDataService.getCaseInstanceStages(caseId, true, new QueryContext()); assertThat(activeStages).hasSize(1); CaseInstance caseInstance = caseService.getCaseInstance(caseId); Long processInstanceId = ((CaseInstanceImpl)caseInstance).getProcessInstanceId(); Boolean readyVar = processService.execute(deploymentUnit.getIdentifier(), ProcessInstanceIdContext.get(processInstanceId), new ExecutableCommand<Boolean>() { private static final long serialVersionUID = 6953820688229804654L; @Override public Boolean execute(Context context) { KieSession ksession = ((RegistryContext) context).lookup( KieSession.class ); WorkflowProcessInstance pi = (WorkflowProcessInstance) ksession.getProcessInstance(processInstanceId); NodeInstance ni = pi.getNodeInstances().iterator().next(); return (Boolean) ni.getVariable("ready"); } }); assertNotNull("Ready variable should not be null", readyVar); assertTrue("Ready variable should be set to true", readyVar); caseService.addDataToCaseFile(caseId, "readyToComplete", true); assertCaseInstanceNotActive(caseId); }

Target:
public void testAutoCompleteCheckActivationData() { String caseId = caseService.startCase(deploymentUnit.getIdentifier(), STAGE_WITH_ACTIVATION_COND); assertThat(caseId).isNotNull().isEqualTo(FIRST_CASE_ID); assertCaseInstanceActive(caseId); Collection<CaseStageInstance> activeStages = caseRuntimeDataService.getCaseInstanceStages(caseId, true, new QueryContext()); assertThat(activeStages).hasSize(0); caseService.addDataToCaseFile(caseId, "readyToActivate", true); activeStages = caseRuntimeDataService.getCaseInstanceStages(caseId, true, new QueryContext()); assertThat(activeStages).hasSize(1); CaseInstance caseInstance = caseService.getCaseInstance(caseId); Long processInstanceId = ((CaseInstanceImpl)caseInstance).getProcessInstanceId(); Boolean readyVar = processService.execute(deploymentUnit.getIdentifier(), ProcessInstanceIdContext.get(processInstanceId), new ExecutableCommand<Boolean>() { private static final long serialVersionUID = 6953820688229804654L; @Override public Boolean execute(Context context) { KieSession ksession = ((RegistryContext) context).lookup( KieSession.class ); WorkflowProcessInstance pi = (WorkflowProcessInstance) ksession.getProcessInstance(processInstanceId, true); NodeInstance ni = pi.getNodeInstances().iterator().next(); return (Boolean) ni.getVariable("ready"); } }); assertNotNull("Ready variable should not be null", readyVar); assertTrue("Ready variable should be set to true", readyVar); caseService.addDataToCaseFile(caseId, "readyToComplete", true); assertCaseInstanceNotActive(caseId); }
Source:
protected Aged(int age, Date created, String id) { this.age = age; this.created = checkNotNull(created); this.id = checkNotNull(id); }

Target:
protected Aged(int age, Date created, String id) { this.age = age; this.created = checkNotNull(created, "created required"); this.id = checkNotNull(id, "id required"); }
Source:
protected void assertEventsAreTheSame(Set<String> contributionEvents) { assertEquals(events.size(), contributionEvents.size()); events.forEach(event -> { if (!contributionEvents.contains(event)) { fail("The Expected Events are not the same as the ones registered on the Contribution"); } }); }

Target:
protected void assertEventsAreTheSame(Set<String> contributionEvents) { assertEquals(events.size(), contributionEvents.size()); events.forEach(event -> { if (!contributionEvents.contains(event)) { fail(String.format( "The expected event '%s' is not present on the events registered by the contribution: [%s]", event, String.join(",", contributionEvents))); } }); }
Source:
public DropdownActionButton(List<ActionButtonDefinition<T>> actions, List selectedItems) { super(); initDropdownButton(); initWidget(WidgetUiBinder.uiBinder.createAndBindUi(this)); initMenuPopup(actions, selectedItems); addMouseHandlers(); }

Target:
public DropdownActionButton(List<ActionButtonDefinition<T>> actions, List selectedItems) { initDropdownButton(); initWidget(WidgetUiBinder.uiBinder.createAndBindUi(this)); initMenuPopup(actions, selectedItems); addMouseHandlers(); }
Source:
public void initialize() { eventBus.register(this); JavaFxUtil.fixScrollSpeed(scrollPane); initializeDynamicChatPosition(); player = playerService.getCurrentPlayer().get(); initializeUppercaseText(); initializeBindings(); teamMatchmakingService.getParty().getMembers().addListener((Observable o) -> { playerCard.pseudoClassStateChanged(LEADER_PSEUDO_CLASS, (teamMatchmakingService.getParty().getOwner().equals(player) && teamMatchmakingService.getParty().getMembers().size() > 1)); List<PartyMember> members = new ArrayList<>(teamMatchmakingService.getParty().getMembers()); partyMemberPane.getChildren().clear(); members.removeIf(partyMember -> partyMember.getPlayer().equals(player)); for(int i = 0; i < members.size(); i++) { PartyMemberItemController controller = uiService.loadFxml("theme/play/teammatchmaking/matchmaking_member_card.fxml"); controller.setMember(members.get(i)); if (members.size() == 1) { partyMemberPane.add(controller.getRoot(), 0, 0, 2, 1); } else { partyMemberPane.add(controller.getRoot(), i % 2, i / 2); } } }); teamMatchmakingService.getParty().getMembers().addListener((InvalidationListener) c -> { refreshingLabel.setVisible(false); selectFactionsBasedOnParty(); }); JavaFxUtil.addListener(teamMatchmakingService.getParty().ownerProperty(), (observable, oldValue, newValue) -> { if (matchmakingChatController != null) { matchmakingChatController.closeChannel(); } createChannelTab(String.format("#%s'sParty", newValue.getUsername())); }); createChannelTab(String.format("#%s'sParty", teamMatchmakingService.getParty().getOwner().getUsername())); fafService.requestMatchmakerInfo(); }

Target:
public void initialize() { eventBus.register(this); JavaFxUtil.fixScrollSpeed(scrollPane); initializeDynamicChatPosition(); player = playerService.getCurrentPlayer().get(); initializeUppercaseText(); initializeBindings(); teamMatchmakingService.getParty().getMembers().addListener((Observable o) -> renderPartyMembers()); if (teamMatchmakingService.isQueuesReadyForUpdate()) { renderQueues(); } teamMatchmakingService.queuesReadyForUpdateProperty().addListener((observable, oldValue, newValue) -> { if (newValue) { renderQueues(); } }); player.statusProperty().addListener((observable, oldValue, newValue) -> { if (newValue != PlayerStatus.IDLE) { teamMatchmakingService.getPlayersInGame().add(player); } else { teamMatchmakingService.getPlayersInGame().remove(player); } }); teamMatchmakingService.getParty().getMembers().addListener((InvalidationListener) c -> { refreshingLabel.setVisible(false); selectFactionsBasedOnParty(); }); JavaFxUtil.addListener(teamMatchmakingService.getParty().ownerProperty(), (observable, oldValue, newValue) -> { if (matchmakingChatController != null) { matchmakingChatController.closeChannel(); } createChannelTab("#" + newValue.getUsername() + PARTY_CHANNEL_SUFFIX); }); createChannelTab("#" + teamMatchmakingService.getParty().getOwner().getUsername() + PARTY_CHANNEL_SUFFIX); fafService.requestMatchmakerInfo(); }
Source:
public void writeDateTime( long epochSecondUTC, int nano, String zoneId ) throws RuntimeException { writeValue( ZonedDateTime.of( LocalDate.ofEpochDay( epochSecondUTC ), LocalTime.ofNanoOfDay( nano ), ZoneId.of( zoneId ) ) ); }

Target:
public void writeDateTime( long epochSecondUTC, int nano, String zoneId ) throws RuntimeException { writeValue( ZonedDateTime.ofInstant( Instant.ofEpochSecond(epochSecondUTC, nano), ZoneId.of( zoneId ) ) ); }
Source:
public FieldDataFetcher(String fieldName) { assertNotNull(fieldName, "`name` can't be null"); this.fieldName = fieldName; }

Target:
public FieldDataFetcher(String fieldName) { assertNotNull(fieldName, "`fieldName` can't be null"); this.fieldName = fieldName; }
Source:
protected void SyncSearch() { super.SyncSearch(); Frontend.RunQuery(VdcQueryType.GetAllVmsAndVmPools, new VdcQueryParametersBase(), new AsyncQuery(this, new INewAsyncCallback() { @Override public void OnSuccess(Object model, Object returnValue) { UserPortalBasicListModel userPortalBasicListModel = (UserPortalBasicListModel) model; ArrayList<VM> vms = new ArrayList<VM>(); ArrayList<vm_pools> pools = new ArrayList<vm_pools>(); VdcQueryReturnValue retValue = (VdcQueryReturnValue) returnValue; if (retValue != null && retValue.getSucceeded()) { List<Object> list = (ArrayList<Object>) retValue.getReturnValue(); for (Object object : list) { if (object instanceof VM) { vms.add((VM) object); } else if (object instanceof vm_pools) { pools.add((vm_pools) object); } } } userPortalBasicListModel.setvms(vms); userPortalBasicListModel.setpools(pools); userPortalBasicListModel.OnVmAndPoolLoad(); } })); }

Target:
protected void SyncSearch() { super.SyncSearch(); Frontend.RunQuery(VdcQueryType.GetAllVmsAndVmPools, new VdcQueryParametersBase(), new AsyncQuery(this, new INewAsyncCallback() { @Override public void OnSuccess(Object model, Object returnValue) { UserPortalBasicListModel userPortalBasicListModel = (UserPortalBasicListModel) model; ArrayList<VM> vms = new ArrayList<VM>(); ArrayList<vm_pools> pools = new ArrayList<vm_pools>(); VdcQueryReturnValue retValue = (VdcQueryReturnValue) returnValue; if (retValue != null && retValue.getSucceeded()) { List<Object> list = (ArrayList<Object>) retValue.getReturnValue(); if (list != null) { for (Object object : list) { if (object instanceof VM) { vms.add((VM) object); } else if (object instanceof vm_pools) { pools.add((vm_pools) object); } } } } userPortalBasicListModel.setvms(vms); userPortalBasicListModel.setpools(pools); userPortalBasicListModel.OnVmAndPoolLoad(); } })); }
Source:
public void onBindViewHolder(ViewHolder holder, int i) { Item item = getItemInternal(i); final Activity activity = item.getActivity(); holder.url = activity.getUrl(); if (shouldShowGPlusButton()) { holder.plusButton.setVisibility(View.VISIBLE); holder.plusButton.initialize(activity.getUrl(), ACTIVITY_REQUEST_CODE_GPLUS_BUTTON); } else { holder.plusButton.setVisibility(View.GONE); } if (activity.getPublished() != null) { holder.timeStamp.setVisibility(View.VISIBLE); holder.timeStamp.setText( Utils.toHumanTimePeriod( mContext, activity.getPublished(), DateTime.now() ) ); } else { holder.timeStamp.setVisibility(View.GONE); } if (activity.getVerb().equals("share")) { populateShare(activity, holder); } else { holder.shareContainer.setVisibility(View.GONE); populatePost(activity, holder.content); } if (activity.getObject().getAttachments() != null && activity.getObject().getAttachments().size() > 0) { final Attachment attachment = activity.getObject().getAttachments().get(0); switch (getItemViewType(i)) { case VIEWTYPE_ARTICLE: populateArticle(holder, holder.container, attachment); break; case VIEWTYPE_VIDEO: populateVideo(holder, holder.container, attachment); break; case VIEWTYPE_PHOTO: populatePhoto(holder, holder.container, attachment); break; case VIEWTYPE_ALBUM: populateAlbum(holder, holder.container, attachment); break; case VIEWTYPE_EVENT: populateEvent(holder, holder.container, attachment); break; } } }

Target:
public void onBindViewHolder(ViewHolder holder, int i) { Item item = getItemInternal(i); final Activity activity = item.getActivity(); holder.url = activity.getUrl(); updatePlusOne(holder); if (activity.getPublished() != null) { holder.timeStamp.setVisibility(View.VISIBLE); holder.timeStamp.setText( Utils.toHumanTimePeriod( mContext, activity.getPublished(), DateTime.now() ) ); } else { holder.timeStamp.setVisibility(View.GONE); } if (activity.getVerb().equals("share")) { populateShare(activity, holder); } else { holder.shareContainer.setVisibility(View.GONE); populatePost(activity, holder.content); } if (activity.getObject().getAttachments() != null && activity.getObject().getAttachments().size() > 0) { final Attachment attachment = activity.getObject().getAttachments().get(0); switch (getItemViewType(i)) { case VIEWTYPE_ARTICLE: populateArticle(holder, holder.container, attachment); break; case VIEWTYPE_VIDEO: populateVideo(holder, holder.container, attachment); break; case VIEWTYPE_PHOTO: populatePhoto(holder, holder.container, attachment); break; case VIEWTYPE_ALBUM: populateAlbum(holder, holder.container, attachment); break; case VIEWTYPE_EVENT: populateEvent(holder, holder.container, attachment); break; } } }
Source:
public void run() { SHUTDOWN_TASKS.forEach(r -> { try { r.run(); } catch (Throwable e) { LOG.error("exception while shutting down", e); } }); SHUTDOWN_TASKS.clear(); }

Target:
public void run() { SHUTDOWN_TASKS.forEach(r -> { try { r.run(); } catch (RuntimeException e) { LOG.error("exception while shutting down", e); } }); SHUTDOWN_TASKS.clear(); }
Source:
public static void validate(FilterPredicate predicate, MessageType schema) { Preconditions.checkNotNull(predicate, "predicate"); Preconditions.checkNotNull(schema, "schema"); predicate.accept(new SchemaCompatibilityValidator(schema)); }

Target:
public static void validate(FilterPredicate predicate, MessageType schema) { checkNotNull(predicate, "predicate"); checkNotNull(schema, "schema"); predicate.accept(new SchemaCompatibilityValidator(schema)); }
Source:
public static BenchmarkSuite getBenchmarkSuiteObject(String suite, String querySet) { BenchmarkQuery benchmarkQuery1 = new BenchmarkQuery(querySet, "Q1", "SELECT 1", CATALOG, SCHEMA); BenchmarkQuery benchmarkQuery2 = new BenchmarkQuery(querySet, "Q2", "SELECT 2", CATALOG, SCHEMA); BenchmarkQuery benchmarkQuery3 = new BenchmarkQuery(querySet, "Q3", "SELECT 3", CATALOG, SCHEMA); List<String> stream1 = Arrays.asList("Q1", "Q2"); List<String> stream2 = Arrays.asList("Q2", "Q3"); PhaseSpecification phaseSpecification1 = new PhaseSpecification("STREAM", Arrays.asList(stream1, stream2)); PhaseSpecification phaseSpecification2 = new PhaseSpecification("CONCURRENT", Arrays.asList(stream2, stream1)); Map<String, String> sessionProperties = new HashMap(); sessionProperties.put("max", "5"); return new BenchmarkSuite(new BenchmarkSuiteInfo(suite, querySet, Arrays.asList(phaseSpecification1, phaseSpecification2), Optional.of(sessionProperties)), Arrays.asList(benchmarkQuery1, benchmarkQuery2, benchmarkQuery3)); }

Target:
public static BenchmarkSuite getBenchmarkSuiteObject(String suite, String querySet) { BenchmarkQuery benchmarkQuery1 = new BenchmarkQuery(querySet, "Q1", "SELECT 1", CATALOG, SCHEMA); BenchmarkQuery benchmarkQuery2 = new BenchmarkQuery(querySet, "Q2", "SELECT 2", CATALOG, SCHEMA); BenchmarkQuery benchmarkQuery3 = new BenchmarkQuery(querySet, "Q3", "SELECT 3", CATALOG, SCHEMA); return new BenchmarkSuite(new BenchmarkSuiteInfo(suite, querySet, getBenchmarkSuitePhases(), getBenchmarkSuiteSessionProperties()), ImmutableList.of(benchmarkQuery1, benchmarkQuery2, benchmarkQuery3)); }
Source:
protected final int futVars(Propagator prop) { int pid = prop.getId(); int futVars = pid2arity.get(pid); if (futVars == -1) { futVars = 0; for (int i = 0; i < prop.getNbVars(); i++) { if (!prop.getVar(i).isInstantiated()) { if (++futVars > 1) { break; } } } futVars = prop.arity(); pid2arity.put(pid, futVars); } return futVars; }

Target:
protected final int futVars(Propagator prop) { int pid = prop.getId(); int futVars = pid2arity.get(pid); if (futVars == -1) { futVars = 0; for (int i = 0; i < prop.getNbVars(); i++) { if (!prop.getVar(i).isInstantiated()) { if (++futVars > 1) { break; } } } pid2arity.put(pid, futVars); } return futVars; }
Source:
private void showErrorAutoConfiguration() { new AlertDialog.Builder(activity) .setTitle(R.string.error_message) .setMessage(R.string.error_auto_configuration) .setPositiveButton(android.R.string.ok, new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int arg1) { continueWithDemoUser(); } }).create().show(); }

Target:
private void showErrorAutoConfiguration() { new AlertDialog.Builder(activity) .setTitle(R.string.error_message) .setMessage(R.string.error_auto_configuration) .setPositiveButton(android.R.string.ok, new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int arg1) { goNextActivity(); } }).create().show(); }
Source:
private void timeout(final Client client) { LOG.debug("Client timed out", client.getEndpoint()); clientStatusTracker.setClientUnreachable(client.getEndpoint()); }

Target:
private void timeout(final Client client) { if(LOG.isDebugEnabled()) { LOG.debug("Client timed out", client.getEndpoint()); } clientStatusTracker.setClientUnreachable(client.getEndpoint()); }
Source:
public void testDefaults() { assertRecordedDefaults(recordDefaults(CompilerConfig.class) .setInterpreterEnabled(false) .setExpressionCacheEnabled(true)); }

Target:
public void testDefaults() { assertRecordedDefaults(recordDefaults(CompilerConfig.class) .setInterpreterEnabled(false) .setExpressionCacheSize(10_000)); }
Source:
public int nextPartition(String topic, Cluster cluster, int prevPartition) { List<PartitionInfo> partitions = cluster.partitionsForTopic(topic); int numPartitions = partitions.size(); if (numPartitions == 1) { indexCache.put(topic, 0); return 0; } else if (indexCache.get(topic) == null || prevPartition == indexCache.get(topic)) { Integer part = indexCache.get(topic); List<PartitionInfo> availablePartitions = cluster.availablePartitionsForTopic(topic); Integer random = Utils.toPositive(ThreadLocalRandom.current().nextInt()); if (availablePartitions.size() < 1) { part = random % numPartitions; } else if (availablePartitions.size() == 1) { part = availablePartitions.get(0).partition(); } else { while (part == indexCache.get(topic)) { random = Utils.toPositive(ThreadLocalRandom.current().nextInt()); part = availablePartitions.get(random % availablePartitions.size()).partition(); } } indexCache.putIfAbsent(topic, part); indexCache.replace(topic, prevPartition, part); return indexCache.get(topic); } return indexCache.get(topic); }

Target:
public int nextPartition(String topic, Cluster cluster, int prevPartition) { List<PartitionInfo> partitions = cluster.partitionsForTopic(topic); Integer oldPart = indexCache.get(topic); Integer newPart = oldPart; if (oldPart == null || oldPart == prevPartition) { List<PartitionInfo> availablePartitions = cluster.availablePartitionsForTopic(topic); Integer random = Utils.toPositive(ThreadLocalRandom.current().nextInt()); if (availablePartitions.size() < 1) { newPart = random % partitions.size(); } else if (availablePartitions.size() == 1) { newPart = availablePartitions.get(0).partition(); } else { while (newPart == null || newPart.equals(oldPart)) { random = Utils.toPositive(ThreadLocalRandom.current().nextInt()); newPart = availablePartitions.get(random % availablePartitions.size()).partition(); } } if (oldPart == null) { indexCache.putIfAbsent(topic, newPart); } else { indexCache.replace(topic, prevPartition, newPart); } return indexCache.get(topic); } return indexCache.get(topic); }
Source:
private void populate() { choiceBox = new ComboBox<>(repositoryChoices); choiceBox.setPromptText(tr("Please select the repository type you want to add")); choiceBox.setConverter(new StringConverter<RepositoryType>() { @Override public String toString(RepositoryType repositoryType) { return repositoryType.getLabel(); } @Override public RepositoryType fromString(String string) { return Arrays.stream(RepositoryType.values()).filter(type -> type.getLabel().equals(string)).findAny() .orElse(null); } }); choiceBox.setOnAction( event -> onRepositoryTypeSelection.accept(choiceBox.getSelectionModel().getSelectedItem())); Label choiceBoxLabel = new Label(tr("Repository type:")); choiceBoxLabel.setLabelFor(choiceBox); HBox content = new HBox(choiceBoxLabel, choiceBox); content.setAlignment(Pos.CENTER_LEFT); content.setSpacing(10); HBox.setHgrow(choiceBox, Priority.ALWAYS); this.setCenter(content); }

Target:
private void populate() { choiceBox = new ComboBox<>(repositoryChoices); choiceBox.setPromptText(tr("Please select the repository type you want to add")); choiceBox.setConverter(new StringConverter<RepositoryType>() { @Override public String toString(RepositoryType repositoryType) { return repositoryType.getLabel(); } @Override public RepositoryType fromString(String string) { return Arrays.stream(RepositoryType.values()).filter(type -> type.getLabel().equals(string)).findAny() .orElse(null); } }); choiceBox.setOnAction( event -> onRepositoryTypeSelection.accept(choiceBox.getSelectionModel().getSelectedItem())); Label choiceBoxLabel = new Label(tr("Repository type:")); choiceBoxLabel.setLabelFor(choiceBox); HBox content = new HBox(choiceBoxLabel, choiceBox); content.setId("repositoryTypeSelection"); HBox.setHgrow(choiceBox, Priority.ALWAYS); this.setCenter(content); }
Source:
protected boolean verifyResult(Object rawExpression, Object resultRaw) { if (resultRaw != null && !(resultRaw instanceof List) && !(resultRaw instanceof Map)) { throw new IllegalArgumentException("A list was expected"); } if (!(rawExpression instanceof String)) { throw new IllegalArgumentException("Malformed raw data"); } String raw = (String) rawExpression; ObjectMapper objectMapper = new ObjectMapper(); try { JsonNode jsonNode = objectMapper.readTree(raw); if (jsonNode.isArray()) { return verifyList((ArrayNode) jsonNode, (List) resultRaw); } else if (jsonNode.isObject()) { return verifyObject((ObjectNode) jsonNode, resultRaw); } throw new IllegalArgumentException("Malformed raw data"); } catch (IOException e) { throw new IllegalArgumentException("Malformed raw data", e); } }

Target:
protected boolean verifyResult(Object rawExpression, Object resultRaw) { if (resultRaw != null && !(resultRaw instanceof List) && !(resultRaw instanceof Map)) { throw new IllegalArgumentException("A list or map was expected"); } if (!(rawExpression instanceof String)) { throw new IllegalArgumentException("Malformed raw data"); } String raw = (String) rawExpression; ObjectMapper objectMapper = new ObjectMapper(); try { JsonNode jsonNode = objectMapper.readTree(raw); if (jsonNode.isArray()) { return verifyList((ArrayNode) jsonNode, (List) resultRaw); } else if (jsonNode.isObject()) { return verifyObject((ObjectNode) jsonNode, resultRaw); } throw new IllegalArgumentException("Malformed raw data"); } catch (IOException e) { throw new IllegalArgumentException("Malformed raw data", e); } }
Source:
public void onActivityCreated(@Nullable Bundle savedInstanceState) { super.onActivityCreated(savedInstanceState); initHandler(); String email = getArguments().getString(ExtraConstants.EMAIL); ActionCodeSettings actionCodeSettings = getArguments().getParcelable(ExtraConstants .ACTION_CODE_SETTINGS); if (!mEmailSent && (savedInstanceState == null || !savedInstanceState.getBoolean (EMAIL_SENT))) { mEmailLinkSendEmailHandler.sendSignInLinkToEmail(email, actionCodeSettings); } }

Target:
public void onActivityCreated(@Nullable Bundle savedInstanceState) { super.onActivityCreated(savedInstanceState); initHandler(); String email = getArguments().getString(ExtraConstants.EMAIL); ActionCodeSettings actionCodeSettings = getArguments().getParcelable(ExtraConstants .ACTION_CODE_SETTINGS); if (!mEmailSent) { mEmailLinkSendEmailHandler.sendSignInLinkToEmail(email, actionCodeSettings); } }
Source:
public void onAuthenticationChanged(OnAuthenticationChanged event) { if (event.isError()) { AppLog.d(T.MAIN, "GOOGLE SIGNIN: onAuthenticationChanged - error"); AppLog.e(T.API, "LoginGoogleFragment.onAuthenticationChanged: " + event.error.type + " - " + event.error.message); mAnalyticsListener.trackLoginFailed(event.getClass().getSimpleName(), event.error.type.toString(), event.error.message); mAnalyticsListener.trackSocialFailure(event.getClass().getSimpleName(), event.error.type.toString(), event.error.message); showError(getString(R.string.login_error_generic)); } else { AppLog.d(T.MAIN, "GOOGLE SIGNIN: onAuthenticationChanged - success"); AppLog.i(T.NUX, "LoginGoogleFragment.onAuthenticationChanged: " + event.toString()); mGoogleListener.onGoogleLoginFinished(); finishSignUp(); } }

Target:
public void onAuthenticationChanged(OnAuthenticationChanged event) { if (event.isError()) { AppLog.d(T.MAIN, "GOOGLE LOGIN: onAuthenticationChanged - error"); AppLog.e(T.API, "LoginGoogleFragment.onAuthenticationChanged: " + event.error.type + " - " + event.error.message); mAnalyticsListener.trackLoginFailed(event.getClass().getSimpleName(), event.error.type.toString(), event.error.message); mAnalyticsListener.trackSocialFailure(event.getClass().getSimpleName(), event.error.type.toString(), event.error.message); showError(getString(R.string.login_error_generic)); } else { AppLog.d(T.MAIN, "GOOGLE LOGIN: onAuthenticationChanged - success"); AppLog.i(T.NUX, "LoginGoogleFragment.onAuthenticationChanged: " + event.toString()); mGoogleListener.onGoogleLoginFinished(); finishFlow(); } }