auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public Future<Void> login(final String user, final String password, final PlatformConfiguration securityConfig) { Assert.requireNonNull(securityConfig, "securityConfig"); return (Future<Void>) executor.submit(() -> { loginLogoutLock.lock(); try { if (authorized.get()) { throw new DolphinRuntimeException("Already logged in!"); } final String realmName = securityConfig.getProperty(REALM_PROPERTY_NAME, defaultRealmName); final String appName = securityConfig.getProperty(APPLICATION_PROPERTY_NAME, defaultAppName); try { KeycloakOpenidConnectResult connectResult = receiveTokenByLogin(user, password, realmName, appName); accessToken.set(connectResult.getAccess_token()); authorized.set(true); startTokenRefreshRunner(connectResult, realmName, appName); } catch (IOException | URISyntaxException e) { throw new DolphinRuntimeException("Can not receive security token!", e); } } finally { loginLogoutLock.unlock(); } }); }

Target:
public Future<Void> login(final String user, final String password, final PlatformConfiguration securityConfig) { Assert.requireNonNull(securityConfig, "securityConfig"); return executor.submit(() -> { loginLogoutLock.lock(); try { if (authorized.get()) { throw new DolphinRuntimeException("Already logged in!"); } final String realmName = securityConfig.getProperty(REALM_PROPERTY_NAME, defaultRealmName); final String appName = securityConfig.getProperty(APPLICATION_PROPERTY_NAME, defaultAppName); try { final KeycloakOpenidConnectResult connectResult = receiveTokenByLogin(user, password, realmName, appName); accessToken.set(connectResult.getAccess_token()); authorized.set(true); startTokenRefreshRunner(connectResult, realmName, appName); } catch (final IOException | URISyntaxException e) { throw new DolphinRuntimeException("Can not receive security token!", e); } } finally { loginLogoutLock.unlock(); } }, null); }
Source:
public Viewer findContentViewer(Viewer oldViewer, ICompareInput input, Composite parent) { Viewer contentViewer = super.findContentViewer(oldViewer, input, parent); if (input instanceof FileItemNode && ((FileItemNode) input).getFileItem() != null) { final ReviewCompareAnnotationSupport support = ReviewCompareAnnotationSupport.getAnnotationSupport(contentViewer); IFileItem item = ((FileItemNode) input).getFileItem(); getCompareConfiguration().setLeftLabel(NLS.bind("{0}: {1}", item.getTarget().getRevision(), item.getName())); getCompareConfiguration().setRightLabel(NLS.bind("{0}: {1}", item.getBase().getRevision(), item.getName())); support.setReviewItem(item, behavior); if (input.getLeft() instanceof FileRevisionTypedElement) { getCompareConfiguration().setLeftImage(((FileItemNode) input).getImage()); } else { getCompareConfiguration().setLeftImage(null); } if (input.getRight() instanceof FileRevisionTypedElement) { getCompareConfiguration().setRightImage(((FileItemNode) input).getImage()); } else { getCompareConfiguration().setRightImage(null); } } return contentViewer; }

Target:
public Viewer findContentViewer(Viewer oldViewer, ICompareInput input, Composite parent) { Viewer contentViewer = super.findContentViewer(oldViewer, input, parent); if (input instanceof FileItemNode && ((FileItemNode) input).getFileItem() != null) { final ReviewCompareAnnotationSupport support = ReviewCompareAnnotationSupport.getAnnotationSupport(contentViewer); IFileItem item = ((FileItemNode) input).getFileItem(); support.setReviewItem(item, behavior); getCompareConfiguration().setLabelProvider(input, ((FileItemNode) input).getLabelProvider()); } return contentViewer; }
Source:
public Emitter build() { if (emitterClass == null) { throw new IllegalStateException("No emitter class found or defined"); } try { Constructor<? extends Emitter> c = emitterClass.getDeclaredConstructor(EmitterBuilder.class); return c.newInstance(this); } catch (NoSuchMethodException e) { throw new IllegalStateException("Can’t create emitter", e); } catch (InvocationTargetException e) { throw new IllegalStateException("Can’t create emitter", e); } catch (InstantiationException e) { throw new IllegalStateException("Can’t create emitter", e); } catch (IllegalAccessException e) { throw new IllegalStateException("Can’t create emitter", e); } }

Target:
public Emitter build() { if (emitterClass == null) { throw new IllegalStateException("No emitter class found or defined"); } String err = "Can’t create emitter"; try { Constructor<? extends Emitter> c = emitterClass.getDeclaredConstructor(EmitterBuilder.class); return c.newInstance(this); } catch (NoSuchMethodException e) { throw new IllegalStateException(err, e); } catch (InvocationTargetException e) { throw new IllegalStateException(err, e); } catch (InstantiationException e) { throw new IllegalStateException(err, e); } catch (IllegalAccessException e) { throw new IllegalStateException(err, e); } }
Source:
public String getAlbumTitle(URL url) throws MalformedURLException { String gid = getGID(url); if (this.albumType == ALBUM_TYPE.ALBUM) { try { if (albumDoc == null) { albumDoc = Http.url(url).get(); } Elements elems = null; String title = null; logger.info("Trying to get album title"); elems = albumDoc.select("meta[property=og:title]"); if (elems!=null) { title = elems.attr("content"); logger.debug("Title is " + title); } if (title.contains("Imgur: The most awesome images on the Internet")) { logger.debug("Album is untitled or imgur is returning the default title"); title = ""; logger.debug("Trying to use title tag to get title"); elems = albumDoc.select("title"); if (elems!=null) { if (elems.text().contains("Imgur: The most awesome images on the Internet")) { logger.debug("Was unable to get album title or album was untitled"); } else { title = elems.text(); } } } String albumTitle = "imgur_"; albumTitle += gid; if (title != null) { albumTitle += "_" + title; } return albumTitle; } catch (IOException e) { } } return getHost() + "_" + gid; }

Target:
public String getAlbumTitle(URL url) throws MalformedURLException { String gid = getGID(url); if (this.albumType == ALBUM_TYPE.ALBUM) { try { if (albumDoc == null) { albumDoc = Http.url(url).get(); } Elements elems = null; String title = null; final String defaultTitle = "Imgur: The most awesome images on the Internet"; logger.info("Trying to get album title"); elems = albumDoc.select("meta[property=og:title]"); if (elems != null) { title = elems.attr("content"); logger.debug("Title is " + title); } if (title.contains(defaultTitle)) { logger.debug("Album is untitled or imgur is returning the default title"); title = ""; logger.debug("Trying to use title tag to get title"); elems = albumDoc.select("title"); if (elems != null) { if (elems.text().contains(defaultTitle)) { logger.debug("Was unable to get album title or album was untitled"); } else { title = elems.text(); } } } String albumTitle = "imgur_"; albumTitle += gid; if (title != null) { albumTitle += "_" + title; } return albumTitle; } catch (IOException e) { } } return getHost() + "_" + gid; }
Source:
public static Optional<Sensor> commitOverTasksSensor(final String threadId, final StreamsMetricsImpl streamsMetrics) { if (streamsMetrics.version() == Version.FROM_100_TO_23) { final Sensor commitOverTasksSensor = streamsMetrics.threadLevelSensor(threadId, COMMIT, Sensor.RecordingLevel.DEBUG); final Map<String, String> tagMap = streamsMetrics.taskLevelTagMap(threadId, ROLLUP_VALUE); addAvgAndMaxToSensor( commitOverTasksSensor, TASK_LEVEL_GROUP, tagMap, COMMIT_LATENCY, COMMIT_OVER_TASKS_AVG_LATENCY_DESCRIPTION, COMMIT_OVER_TASKS_MAX_LATENCY_DESCRIPTION ); addInvocationRateAndCountToSensor( commitOverTasksSensor, TASK_LEVEL_GROUP, tagMap, COMMIT, COMMIT_OVER_TASKS_RATE_DESCRIPTION, COMMIT_OVER_TASKS_TOTAL_DESCRIPTION ); return Optional.of(commitOverTasksSensor); } return Optional.empty(); }

Target:
public static Optional<Sensor> commitOverTasksSensor(final String threadId, final StreamsMetricsImpl streamsMetrics) { if (streamsMetrics.version() == Version.FROM_100_TO_24) { final Sensor commitOverTasksSensor = streamsMetrics.threadLevelSensor(threadId, COMMIT, Sensor.RecordingLevel.DEBUG); final Map<String, String> tagMap = streamsMetrics.taskLevelTagMap(threadId, ROLLUP_VALUE); addAvgAndMaxToSensor( commitOverTasksSensor, TASK_LEVEL_GROUP, tagMap, COMMIT_LATENCY, COMMIT_OVER_TASKS_AVG_LATENCY_DESCRIPTION, COMMIT_OVER_TASKS_MAX_LATENCY_DESCRIPTION ); addInvocationRateAndCountToSensor( commitOverTasksSensor, TASK_LEVEL_GROUP, tagMap, COMMIT, COMMIT_OVER_TASKS_RATE_DESCRIPTION, COMMIT_OVER_TASKS_TOTAL_DESCRIPTION ); return Optional.of(commitOverTasksSensor); } return Optional.empty(); }
Source:
public IMap throttleSubmissionMap() { LOGGER.debug("Creating Throttle map in hazelcast"); final HazelcastTicketRegistryProperties hz = casProperties.getTicket().getRegistry().getHazelcast(); final HazelcastConfigurationFactory factory = new HazelcastConfigurationFactory(); final MapConfig ipMapConfig = factory.buildMapConfig(hz, MAP_KEY, 120); hazelcastInstance.getConfig().addMapConfig(ipMapConfig); return hazelcastInstance.getMap(MAP_KEY); }

Target:
public IMap throttleSubmissionMap() { final HazelcastTicketRegistryProperties hz = casProperties.getTicket().getRegistry().getHazelcast(); final int timeout = Integer.parseInt(casProperties.getAuthn().getThrottle().getSchedule().getRepeatInterval()); final HazelcastConfigurationFactory factory = new HazelcastConfigurationFactory(); LOGGER.debug("Creating to record failed logins for throttling with timeout set to [{}]", MAP_KEY, timeout); final MapConfig ipMapConfig = factory.buildMapConfig(hz, MAP_KEY, timeout); hazelcastInstance.getConfig().addMapConfig(ipMapConfig); return hazelcastInstance.getMap(MAP_KEY); }
Source:
private SubPlan analyzeGroupedExecution(Session session, SubPlan subPlan, boolean parentContainsTableFinish) { PlanFragment fragment = subPlan.getFragment(); GroupedExecutionProperties properties = fragment.getRoot().accept(new GroupedExecutionTagger(session, metadata, nodePartitioningManager), null); if (properties.isSubTreeUseful()) { boolean preferDynamic = fragment.getRemoteSourceNodes().stream().allMatch(node -> node.getExchangeType() == REPLICATE) && isDynamicScheduleForGroupedExecution(session); BucketNodeMap bucketNodeMap = nodePartitioningManager.getBucketNodeMap(session, fragment.getPartitioning(), preferDynamic); if (bucketNodeMap.isDynamic()) { boolean recoverable = isRecoverableGroupedExecutionEnabled(session) && parentContainsTableFinish && fragment.getRoot() instanceof TableWriterNode && properties.isPreferRecoverable(); if (recoverable) { fragment = fragment.withRecoverableGroupedExecution(properties.getCapableTableScanNodes()); } else { fragment = fragment.withDynamicLifespanScheduleGroupedExecution(properties.getCapableTableScanNodes()); } } else { fragment = fragment.withFixedLifespanScheduleGroupedExecution(properties.getCapableTableScanNodes()); } } ImmutableList.Builder<SubPlan> result = ImmutableList.builder(); boolean containsTableFinishNode = containsTableFinishNode(fragment); for (SubPlan child : subPlan.getChildren()) { result.add(analyzeGroupedExecution(session, child, containsTableFinishNode)); } return new SubPlan(fragment, result.build()); }

Target:
private SubPlan analyzeGroupedExecution(Session session, SubPlan subPlan, boolean parentContainsTableFinish) { PlanFragment fragment = subPlan.getFragment(); GroupedExecutionProperties properties = fragment.getRoot().accept(new GroupedExecutionTagger(session, metadata, nodePartitioningManager), null); if (properties.isSubTreeUseful()) { boolean preferDynamic = fragment.getRemoteSourceNodes().stream().allMatch(node -> node.getExchangeType() == REPLICATE) && isDynamicScheduleForGroupedExecution(session); BucketNodeMap bucketNodeMap = nodePartitioningManager.getBucketNodeMap(session, fragment.getPartitioning(), preferDynamic); if (bucketNodeMap.isDynamic()) { boolean recoverable = isRecoverableGroupedExecutionEnabled(session) && parentContainsTableFinish && fragment.getRoot() instanceof TableWriterNode && properties.isRecoveryEligible(); if (recoverable) { fragment = fragment.withRecoverableGroupedExecution(properties.getCapableTableScanNodes(), properties.getTotalLifespans()); } else { fragment = fragment.withDynamicLifespanScheduleGroupedExecution(properties.getCapableTableScanNodes(), properties.getTotalLifespans()); } } else { fragment = fragment.withFixedLifespanScheduleGroupedExecution(properties.getCapableTableScanNodes(), properties.getTotalLifespans()); } } ImmutableList.Builder<SubPlan> result = ImmutableList.builder(); boolean containsTableFinishNode = containsTableFinishNode(fragment); for (SubPlan child : subPlan.getChildren()) { result.add(analyzeGroupedExecution(session, child, containsTableFinishNode)); } return new SubPlan(fragment, result.build()); }
Source:
default <T> Flux<SearchHit<T>> find(Query query, Class<T> entityType) { return find(query, entityType, entityType); }

Target:
default <T> Flux<T> find(Query query, Class<T> entityType) { return find(query, entityType, entityType); }
Source:
void fillCosmosDiagnostics(ObjectNode parentNode, StringBuilder stringBuilder) { if (this.feedResponseDiagnostics != null) { if (parentNode != null) { parentNode.put(USER_AGENT_KEY, USER_AGENT); parentNode.putPOJO(COSMOS_DIAGNOSTICS_KEY, feedResponseDiagnostics); } if (stringBuilder != null) { stringBuilder.append(USER_AGENT_KEY +"=").append(USER_AGENT).append(System.lineSeparator()); stringBuilder.append(feedResponseDiagnostics); } } else { if (parentNode != null) { parentNode.putPOJO(COSMOS_DIAGNOSTICS_KEY, clientSideRequestStatistics); } if (stringBuilder != null) { try { stringBuilder.append(OBJECT_MAPPER.writeValueAsString(this.clientSideRequestStatistics)); } catch (JsonProcessingException e) { LOGGER.error("Error while parsing diagnostics " + e); } } } }

Target:
void fillCosmosDiagnostics(ObjectNode parentNode, StringBuilder stringBuilder) { if (this.feedResponseDiagnostics != null) { if (parentNode != null) { parentNode.put(USER_AGENT_KEY, USER_AGENT); parentNode.putPOJO(COSMOS_DIAGNOSTICS_KEY, feedResponseDiagnostics); } if (stringBuilder != null) { stringBuilder.append(USER_AGENT_KEY +"=").append(USER_AGENT).append(System.lineSeparator()); stringBuilder.append(feedResponseDiagnostics); } } else { if (parentNode != null) { parentNode.putPOJO(COSMOS_DIAGNOSTICS_KEY, clientSideRequestStatistics); } if (stringBuilder != null) { try { stringBuilder.append(OBJECT_MAPPER.writeValueAsString(this.clientSideRequestStatistics)); } catch (JsonProcessingException e) { LOGGER.error("Error while parsing diagnostics ", e); } } } }
Source:
public void shouldNotAllowActionParametersDisplayNameLongerThan255Characters() { when(schemaService.retrieveApplications("ConfigOne")).thenReturn(DummyCommcareSchema.getApplicationsForConfigFour()); List<ActionEventRequest> actionEventRequests = formActionBuilder.buildActions(); assertEquals(actionEventRequests.get(0).getActionParameters().first().getDisplayName().length(), 255); }

Target:
public void shouldNotAllowActionParametersDisplayNameLongerThan255Characters() { String displayName = "Super long question label, that is so long, that the registration of the Commcare Task channel fails! (And this is caused by the fact, that the Task module display name column only allows 255 characters, while the label you are reading has got obviously way more than that)"; String shortenedDisplayName = displayName.substring(0, 255); when(schemaService.retrieveApplications("ConfigOne")).thenReturn(DummyCommcareSchema.getApplicationsWithCustomQuestionLabel(displayName)); List<ActionEventRequest> actionEventRequests = formActionBuilder.buildActions(); assertEquals(actionEventRequests.get(0).getActionParameters().first().getDisplayName().length(), 255); assertEquals(actionEventRequests.get(0).getActionParameters().first().getDisplayName(), shortenedDisplayName); }
Source:
public void canFallBackIfExperimentFails() { enableExperiment(); throwOnFirstExperiment(); assertThatThrownBy(experimentSupplier::getAsInt).isEqualTo(RUNTIME_EXCEPTION); assertThat(experimentSupplier.getAsInt()).isEqualTo(FALLBACK_INT); }

Target:
public void canFallBackIfExperimentFails() { enableExperiment(); throwOnExperiment(); assertThatThrownBy(proxyInstance::getAsInt).isEqualTo(RUNTIME_EXCEPTION); assertThat(proxyInstance.getAsInt()).isEqualTo(FALLBACK_RESULT); }
Source:
public void putAll(final Iterable<? extends Map.Entry<? extends K, ? extends V>> entries) { statusTransitioner.checkAvailable(); checkNonNull(entries); Function<Iterable<? extends Map.Entry<? extends K, ? extends V>>, Iterable<? extends Map.Entry<? extends K, ? extends V>>> remappingFunction = memoize(new Function<Iterable<? extends Map.Entry<? extends K, ? extends V>>, Iterable<? extends Map.Entry<? extends K, ? extends V>>>() { @Override public Iterable<? extends Map.Entry<? extends K, ? extends V>> apply(Iterable<? extends Map.Entry<? extends K, ? extends V>> entries) { if (cacheWriter != null) { Set<Map.Entry<? extends K, ? extends V>> toWrite = new HashSet<Map.Entry<? extends K, ? extends V>>(); Set<K> toRemove = new HashSet<K>(); for (Map.Entry<? extends K, ? extends V> entry: entries) { if (entry.getValue() == null) { toRemove.add(entry.getKey()); } else { toWrite.add(entry); } } try { if (!toWrite.isEmpty()) { cacheWriter.writeAll(toWrite); } if (!toRemove.isEmpty()) { cacheWriter.deleteAll(toRemove); } } catch (Exception e) { throw newCacheWriterException(e); } } return entries; } }); KeysIterable keys = new KeysIterable(entries); try { store.bulkCompute(keys, remappingFunction); } catch (CacheAccessException e) { try { remappingFunction.apply(entries); } finally { attemptRecovery(keys, e); } } catch (CacheWriterException e) { attemptRecovery(keys, e); throw e; } }

Target:
public void putAll(final Iterable<? extends Map.Entry<? extends K, ? extends V>> entries) { statusTransitioner.checkAvailable(); checkNonNull(entries); final Map<K, V> entriesToRemap = new HashMap<K, V>(); for (Map.Entry<? extends K, ? extends V> entry: entries) { entriesToRemap.put(entry.getKey(), entry.getValue()); } Function<Iterable<? extends Map.Entry<? extends K, ? extends V>>, Iterable<? extends Map.Entry<? extends K, ? extends V>>> remappingFunction = new Function<Iterable<? extends Map.Entry<? extends K, ? extends V>>, Iterable<? extends Map.Entry<? extends K, ? extends V>>>() { @Override public Iterable<? extends Map.Entry<? extends K, ? extends V>> apply(Iterable<? extends Map.Entry<? extends K, ? extends V>> entries) { for (Map.Entry<? extends K, ? extends V> entry: entries) { entriesToRemap.remove(entry.getKey()); } if (cacheWriter != null) { Set<Map.Entry<? extends K, ? extends V>> toWrite = new HashSet<Map.Entry<? extends K, ? extends V>>(); Set<K> toRemove = new HashSet<K>(); for (Map.Entry<? extends K, ? extends V> entry: entries) { if (entry.getValue() == null) { toRemove.add(entry.getKey()); } else { toWrite.add(entry); } } try { if (!toWrite.isEmpty()) { cacheWriter.writeAll(toWrite); } if (!toRemove.isEmpty()) { cacheWriter.deleteAll(toRemove); } } catch (Exception e) { throw newCacheWriterException(e); } } return entries; } }; KeysIterable keys = new KeysIterable(entries); try { store.bulkCompute(keys, remappingFunction); } catch (CacheAccessException e) { try { if (!entriesToRemap.isEmpty()) { remappingFunction.apply(entriesToRemap.entrySet()); } } finally { removeKeysWithStrategy(keys, e); } } catch (CacheWriterException e) { removeKeysWithStrategy(keys, e); throw e; } }
Source:
private static List<ReportImporter> createLegacyImporters() { List<ReportImporter> importers = new ArrayList<>(); importers.add(new CoverageResultImporter( PhpPlugin.PHPUNIT_COVERAGE_REPORT_PATH_KEY, "unit test coverage", CoreMetrics.LINES_TO_COVER, CoreMetrics.UNCOVERED_LINES, CoverageType.UNIT)); importers.add(new CoverageResultImporter( PhpPlugin.PHPUNIT_IT_COVERAGE_REPORT_PATH_KEY, "integration test coverage", CoreMetrics.LINES_TO_COVER, CoreMetrics.UNCOVERED_LINES, CoverageType.IT)); importers.add(new CoverageResultImporter( PhpPlugin.PHPUNIT_OVERALL_COVERAGE_REPORT_PATH_KEY, "overall coverage", CoreMetrics.LINES_TO_COVER, CoreMetrics.UNCOVERED_LINES, CoverageType.OVERALL)); return importers; }

Target:
private static List<ReportImporter> createLegacyImporters() { List<ReportImporter> importers = new ArrayList<>(); importers.add(new CoverageResultImporter( PhpPlugin.PHPUNIT_COVERAGE_REPORT_PATH_KEY, "unit test coverage", CoreMetrics.LINES_TO_COVER, CoreMetrics.UNCOVERED_LINES, CoverageType.UNIT)); importers.add(new CoverageResultImporter( PhpPlugin.PHPUNIT_IT_COVERAGE_REPORT_PATH_KEY, "integration test coverage", CoreMetrics.IT_LINES_TO_COVER, CoreMetrics.IT_UNCOVERED_LINES, CoverageType.IT)); importers.add(new CoverageResultImporter( PhpPlugin.PHPUNIT_OVERALL_COVERAGE_REPORT_PATH_KEY, "overall coverage", CoreMetrics.OVERALL_LINES_TO_COVER, CoreMetrics.OVERALL_UNCOVERED_LINES, CoverageType.OVERALL)); return importers; }
Source:
public org.hpccsystems.ws.client.gen.wsworkunits.v1_73.ECLException[] getRawExceptions() { if (this.exceptions.size()==0) { return null; } org.hpccsystems.ws.client.gen.wsworkunits.v1_73.ECLException[] raw= new org.hpccsystems.ws.client.gen.wsworkunits.v1_73.ECLException[this.exceptions.size()]; for (int i=0; i < exceptions.size();i++) { raw[i]=exceptions.get(i).getRaw(); } return raw; }

Target:
public org.hpccsystems.ws.client.gen.wsworkunits.v1_73.ECLException[] getRawExceptions() { if (this.exceptions.size()==0) { return null; } org.hpccsystems.ws.client.gen.wsworkunits.v1_73.ECLException[] raw= new org.hpccsystems.ws.client.gen.wsworkunits.v1_73.ECLException[this.exceptions.size()]; for (int i=0; i < exceptions.size();i++) { raw[i]=exceptions.get(i).getRawVersion1_73(); } return raw; }
Source:
private void assignWidget() { if (options.getWidget() != null) { widget = options.getWidget(); } else if (options.getWidgetContentProvider() != null) { if (widget == null) { widget = options.getWidgetContentProvider().getContent($element.get(0)); } } }

Target:
private void assignWidget() { if (options.getWidget() != null) { widget = options.getWidget(); detachWidget(); } else if (options.getWidgetContentProvider() != null) { detachWidget(); widget = options.getWidgetContentProvider().getContent($element.get(0)); } }
Source:
private static Boolean isRooted() { if (android.os.Build.TAGS != null && android.os.Build.TAGS.contains("test-keys")) { return true; } String[] probableRootPaths = { "/data/local/bin/su", "/data/local/su", "/data/local/xbin/su", "/sbin/su", "/su/bin", "/su/bin/su", "/system/app/SuperSU", "/system/app/SuperSU.apk", "/system/app/Superuser", "/system/app/Superuser.apk", "/system/bin/failsafe/su", "/system/bin/su", "/system/sd/xbin/su", "/system/xbin/daemonsu", "/system/xbin/su" }; try { for (String probableRootPath : probableRootPaths) { if (new File(probableRootPath).exists()) { return true; } } } catch (Exception e) { Log.e(TAG, "Exception while attempting to detect whether the device is rooted", e); } return false; }

Target:
private static Boolean isRooted() { if (android.os.Build.TAGS != null && android.os.Build.TAGS.contains("test-keys")) { return true; } String[] probableRootPaths = { "/data/local/bin/su", "/data/local/su", "/data/local/xbin/su", "/sbin/su", "/su/bin", "/su/bin/su", "/system/app/SuperSU", "/system/app/SuperSU.apk", "/system/app/Superuser", "/system/app/Superuser.apk", "/system/bin/failsafe/su", "/system/bin/su", "/system/sd/xbin/su", "/system/xbin/daemonsu", "/system/xbin/su" }; for (String probableRootPath : probableRootPaths) { try { if (new File(probableRootPath).exists()) { return true; } } catch (Exception e) { Log.e(TAG, "Exception while attempting to detect whether the device is rooted", e); } } return false; }
Source:
public boolean imageExistsRemotely(String imageName) { try { final DockerImageURI imageURI = new DockerImageURI(imageName); final String repo = imageURI.getUriWithoutTag(); final List<IDockerImageSearchResult> matchingImages = dockerConnection.searchImages(repo); final Optional<IDockerImageSearchResult> imageMatch = matchingImages.stream() .filter(i -> i.getName().equals(repo)).findAny(); if (imageMatch.isPresent()) { return true; } } catch (DockerException e) { MessageDialog.openError(Display.getDefault().getActiveShell(), "Failed to search Docker Image", e.getMessage()); } return false; }

Target:
public boolean imageExistsRemotely(String imageName) { try { final DockerImageURI imageURI = new DockerImageURI(imageName); final String repo = imageURI.getUriWithoutTag(); final List<String> registryTags = new DockerHubRegistry().getTags(repo); if(registryTags.contains(imageURI.getTag())) { return true; } } catch (OpenShiftException e) { MessageDialog.openError(Display.getDefault().getActiveShell(), "Failed to search Docker Image", e.getMessage()); } return false; }
Source:
public byte[] toByteArray() throws IOException { if (DEBUG) LOG.debug("read all "+ byteCount + " bytes"); if (buf != null) { return buf; } this.buf = new byte[byteCount]; new DataInputStream(in).readFully(buf); return buf; }

Target:
public byte[] toByteArray() throws IOException { if (DEBUG) LOG.debug("read all "+ byteCount + " bytes"); byte[] buf = new byte[byteCount]; new DataInputStream(in).readFully(buf); return buf; }
Source:
protected void executeCommand() { getNetwork().setId(Guid.newGuid()); NetworkUtils.setNetworkVdsmName(getNetwork()); TransactionSupport.executeInNewTransaction(() -> { networkDao.save(getNetwork()); if (getNetwork().isVmNetwork() && getParameters().isVnicProfileRequired()) { vnicProfileDao.save(networkHelper.createVnicProfile(getNetwork())); } networkHelper.addPermissionsOnNetwork(getUserId(), getNetwork().getId()); return null; }); Guid networkId = getNetwork().getId(); List<NetworkCluster> networkAttachments = getParameters().getNetworkClusterList(); boolean clusterAttachmentsSucceeded = true; if (networkAttachments != null) { clusterAttachmentsSucceeded = attachToClusters(networkAttachments).getSucceeded(); } runInternalAction(ActionType.AutodefineExternalNetwork, new IdParameters(networkId)); getReturnValue().setActionReturnValue(clusterAttachmentsSucceeded ? networkId : null); setSucceeded(clusterAttachmentsSucceeded); }

Target:
protected void executeCommand() { getNetwork().setId(Guid.newGuid()); NetworkUtils.setNetworkVdsmName(getNetwork()); TransactionSupport.executeInNewTransaction(() -> { networkDao.save(getNetwork()); if (getNetwork().isVmNetwork() && getParameters().isVnicProfileRequired()) { vnicProfileDao.save(networkHelper.createVnicProfile(getNetwork())); } networkHelper.addPermissionsOnNetwork(getUserId(), getNetwork().getId()); return null; }); List<NetworkCluster> networkAttachments = getParameters().getNetworkClusterList(); boolean clusterAttachmentsSucceeded = true; if (networkAttachments != null) { clusterAttachmentsSucceeded = attachToClusters(networkAttachments).getSucceeded(); } Guid networkId = getNetwork().getId(); if (getNetwork().isVmNetwork() && !getNetwork().isExternal()) { runInternalAction(ActionType.AutodefineExternalNetwork, new IdParameters(networkId)); } getReturnValue().setActionReturnValue(clusterAttachmentsSucceeded ? networkId : null); setSucceeded(clusterAttachmentsSucceeded); }
Source:
public GridCacheContextInfo(GridCacheContext<K, V> cctx, boolean clientCache) { config = new CacheConfiguration(cctx.config()); dynamicDeploymentId = null; groupId = cctx.groupId(); cacheId = cctx.cacheId(); this.clientCache = clientCache; this.cctx = cctx; }

Target:
public GridCacheContextInfo(GridCacheContext<K, V> cctx, boolean clientCache) { config = cctx.config(); dynamicDeploymentId = null; groupId = cctx.groupId(); cacheId = cctx.cacheId(); this.clientCache = clientCache; this.cctx = cctx; }
Source:
public void testDdlWrongColumnName() throws Exception { checkSqlErrorMessage("create index idx1 on test (wrong)", "Column doesn't exist: WRONG"); checkSqlErrorMessage("alter table test drop column wrong", "Failed to parse query. Column \"WRONG\" not found"); checkSqlErrorMessage("create table test(id integer primary key, AgE integer, AGe integer)", "Duplicate column name: AGE"); checkSqlErrorMessage("create table test(\"id\" integer primary key, \"age\" integer, \"age\" integer)", "Duplicate column name: age"); }

Target:
public void testDdlWrongColumnName() throws Exception { checkSqlErrorMessage("create index idx1 on test (wrong)", "Column doesn't exist: WRONG"); checkSqlErrorMessage("alter table test drop column wrong", "Failed to parse query. Column \"WRONG\" not found"); checkSqlErrorMessage("create table test(id integer primary key, AgE integer, AGe integer)", "Duplicate column name: AGE"); checkSqlErrorMessage("create table test(\"id\" integer primary key, \"age\" integer, \"age\" integer)", "Duplicate column name: age"); checkSqlErrorMessage("create table test(id integer primary key, age integer, age varchar)", "Duplicate column name: AGE"); }
Source:
public static RawText load(ObjectLoader ldr, int threshold) throws IOException, BinaryBlobException { long sz = ldr.getSize(); if (sz > threshold) { throw new BinaryBlobException(); } if (sz <= FIRST_FEW_BYTES) { byte[] data = ldr.getCachedBytes(FIRST_FEW_BYTES); if (isBinary(data)) { throw new BinaryBlobException(); } return new RawText(data); } byte[] head = new byte[FIRST_FEW_BYTES]; try (InputStream stream = ldr.openStream()) { int off = 0; int left = head.length; while (left > 0) { int n = stream.read(head, off, left); if (n < 0) { throw new EOFException(); } left -= n; off += n; } if (isBinary(head)) { throw new BinaryBlobException(); } byte data[]; try { data = new byte[(int)sz]; } catch (OutOfMemoryError e) { throw new LargeObjectException.OutOfMemory(e); } System.arraycopy(head, 0, data, 0, head.length); IO.readFully(stream, data, off, (int) (sz-off)); return new RawText(data); } }

Target:
public static RawText load(ObjectLoader ldr, int threshold) throws IOException, BinaryBlobException { long sz = ldr.getSize(); if (sz > threshold) { throw new BinaryBlobException(); } if (sz <= FIRST_FEW_BYTES) { byte[] data = ldr.getCachedBytes(FIRST_FEW_BYTES); if (isBinary(data)) { throw new BinaryBlobException(); } return new RawText(data); } byte[] head = new byte[FIRST_FEW_BYTES]; try (InputStream stream = ldr.openStream()) { int off = 0; int left = head.length; while (left > 0) { int n = stream.read(head, off, left); if (n < 0) { throw new EOFException(); } left -= n; while (n > 0) { if (head[off] == '\0') { throw new BinaryBlobException(); } off++; n--; } } byte data[]; try { data = new byte[(int)sz]; } catch (OutOfMemoryError e) { throw new LargeObjectException.OutOfMemory(e); } System.arraycopy(head, 0, data, 0, head.length); IO.readFully(stream, data, off, (int) (sz-off)); return new RawText(data); } }
Source:
private void postExpandNotify() { notifyTree(SWT.Expand, createEventXY(0, SWT.NONE, 0)); notifyTree(SWT.MouseMove, createMouseEvent(0, SWT.NONE, 0)); notifyTree(SWT.Activate, super.createEvent()); notifyTree(SWT.FocusIn, super.createEvent()); notifyTree(SWT.MouseDown, createMouseEvent(1, SWT.NONE, 1)); notifyTree(SWT.MeasureItem, createEventXY()); notifyTree(SWT.MouseUp, createMouseEvent(1, SWT.BUTTON1, 1)); notifyTree(SWT.MouseExit, createMouseEvent(0, SWT.NONE, 0)); notifyTree(SWT.Deactivate, super.createEvent()); notifyTree(SWT.FocusOut, super.createEvent()); }

Target:
private void postExpandNotify() { notifyTree(SWT.Expand, createEvent()); notifyTree(SWT.MouseUp, createMouseEvent(1, SWT.BUTTON1, 1)); }
Source:
public void onClick(View view) { Toast toast = Toast.makeText(view.getContext(), "bonjour", Toast.LENGTH_SHORT); toast.show(); switch (view.getId()) { case R.id.from: { onAddSenderToContacts(); break; } case R.id.to: case R.id.cc: { expand((TextView)view, ((TextView)view).getEllipsize() != null); layoutChanged(); } } }

Target:
public void onClick(View view) { switch (view.getId()) { case R.id.from: { onAddSenderToContacts(); break; } case R.id.to: case R.id.cc: { expand((TextView)view, ((TextView)view).getEllipsize() != null); layoutChanged(); } } }
Source:
public void testZeroLenghtLSAttributeStorage() throws Exception { RepositoryItemUid uid = getRepositoryItemUidFactory().createUid( repository, "a/b/c.txt" ); File attFile = new File( localStorageDirectory, ".nexus/attributes/" + uid.getPath() ); attFile.getParentFile().mkdirs(); attFile.delete(); new File( localStorageDirectory, ".nexus/trash/.nexus/attributes/" + uid.getPath() ).delete(); attFile.createNewFile(); assertThat( attFile, FileMatchers.sized( 0L ) ); final DefaultLSAttributeStorage lsStorage = new DefaultLSAttributeStorage(); Attributes att = lsStorage.getAttributes( uid ); assertThat( att, nullValue() ); assertThat( attFile, not( FileMatchers.exists() ) ); DefaultStorageFileItem file = new DefaultStorageFileItem( repository, new ResourceStoreRequest( uid.getPath() ), true, true, new StringContentLocator( "CONTENT" ) ); attFile.createNewFile(); long creationTime = new Date().getTime(); assertThat( attFile, FileMatchers.sized( 0L ) ); att = file.getRepositoryItemAttributes(); lsStorage.putAttributes( uid, att ); assertThat( attFile, FileMatchers.exists() ); assertThat( attFile.lastModified(), greaterThan( creationTime ) ); Attributes retAtt = lsStorage.getAttributes( uid ); assertThat( retAtt, notNullValue() ); }

Target:
public void testZeroLenghtLSAttributeStorage() throws Exception { RepositoryItemUid uid = getRepositoryItemUidFactory().createUid( repository, "a/b/c.txt" ); File attFile = new File( localStorageDirectory, ".nexus/attributes/" + uid.getPath() ); attFile.getParentFile().mkdirs(); attFile.delete(); new File( localStorageDirectory, ".nexus/trash/.nexus/attributes/" + uid.getPath() ).delete(); attFile.createNewFile(); assertThat( attFile, FileMatchers.sized( 0L ) ); final DefaultLSAttributeStorage lsStorage = new DefaultLSAttributeStorage(); Attributes att = lsStorage.getAttributes( uid ); assertThat( att, nullValue() ); assertThat( attFile, not( FileMatchers.exists() ) ); DefaultStorageFileItem file = new DefaultStorageFileItem( repository, new ResourceStoreRequest( uid.getPath() ), true, true, new StringContentLocator( "CONTENT" ) ); long creationTime = createFile( attFile ); assertThat( attFile, FileMatchers.sized( 0L ) ); att = file.getRepositoryItemAttributes(); lsStorage.putAttributes( uid, att ); assertThat( attFile, FileMatchers.exists() ); assertThat( attFile.lastModified(), greaterThan( creationTime ) ); Attributes retAtt = lsStorage.getAttributes( uid ); assertThat( retAtt, notNullValue() ); }
Source:
private Map<String, Long>[] createTestMap(int... entryCounts) { Map<String, Long>[] result = new Map[entryCounts.length]; for (int rowNumber = 0; rowNumber < entryCounts.length; rowNumber++) { int entryCount = entryCounts[rowNumber]; HashMap<String, Long> map = new HashMap<>(); for (int entryNumber = 0; entryNumber < entryCount; entryNumber++) { map.put("key" + entryNumber, entryNumber == 5 ? null : rowNumber * 100L + entryNumber); } result[rowNumber] = map; } return result; }

Target:
private Map<String, Long>[] createTestMap(int... entryCounts) { Map<String, Long>[] result = new Map[entryCounts.length]; for (int rowNumber = 0; rowNumber < entryCounts.length; rowNumber++) { int entryCount = entryCounts[rowNumber]; Map<String, Long> map = new HashMap<>(); for (int entryNumber = 0; entryNumber < entryCount; entryNumber++) { map.put("key" + entryNumber, entryNumber == 5 ? null : rowNumber * 100L + entryNumber); } result[rowNumber] = map; } return result; }
Source:
private ConfigurationImpl() { this.validationBootstrapParameters = new ValidationBootstrapParameters(); this.defaultResourceBundleLocator = new PlatformResourceBundleLocator( ResourceBundleMessageInterpolator.USER_VALIDATION_MESSAGES ); this.defaultTraversableResolver = new DefaultTraversableResolver(); this.defaultConstraintValidatorFactory = new ConstraintValidatorFactoryImpl(); this.defaultParameterNameProvider = new DefaultParameterNameProvider(); MessageInterpolator interpolator; try { interpolator = new ResourceBundleMessageInterpolator( defaultResourceBundleLocator ); } catch(ValidationException ve) { if(!log.getMissingELDependenciesException().getMessage().equals(ve.getMessage())) { interpolator = new NonElMessageInterpolator(); } else { throw ve; } } this.defaultMessageInterpolator = interpolator; }

Target:
private ConfigurationImpl() { this.validationBootstrapParameters = new ValidationBootstrapParameters(); this.defaultResourceBundleLocator = new PlatformResourceBundleLocator( ResourceBundleMessageInterpolator.USER_VALIDATION_MESSAGES ); this.defaultTraversableResolver = new DefaultTraversableResolver(); this.defaultConstraintValidatorFactory = new ConstraintValidatorFactoryImpl(); this.defaultParameterNameProvider = new DefaultParameterNameProvider(); this.defaultMessageInterpolator = new ResourceBundleMessageInterpolator( defaultResourceBundleLocator ); }
Source:
private synchronized void runHook(final Repository repo, final List<String> args) { if (repo == null) { log.error("No repo found for hook."); return; } hookQueue.schedule(new Runnable() { @Override public void run() { try { final ProcessBuilder pb = new ProcessBuilder(args); pb.redirectErrorStream(true); pb.directory(repo.getDirectory()); final Map<String, String> env = pb.environment(); env.put("GIT_DIR", repo.getDirectory().getAbsolutePath()); Process ps = pb.start(); ps.getOutputStream().close(); BufferedReader br = new BufferedReader(new InputStreamReader(ps.getInputStream())); try { String line; while ((line = br.readLine()) != null) { log.info("hook output: " + line); } } finally { try { br.close(); } catch (IOException e2) { } ps.waitFor(); } } catch (Throwable e) { log.error("Unexpected error during hook execution", e); } finally { repo.close(); } } }, 1, TimeUnit.SECONDS); }

Target:
private synchronized void runHook(final Repository repo, final List<String> args) { if (repo == null) { log.error("No repo found for hook."); return; } hookQueue.schedule(new Runnable() { @Override public void run() { try { if (new File(args.get(0)).exists()) { final ProcessBuilder pb = new ProcessBuilder(args); pb.redirectErrorStream(true); pb.directory(repo.getDirectory()); final Map<String, String> env = pb.environment(); env.put("GIT_DIR", repo.getDirectory().getAbsolutePath()); Process ps = pb.start(); ps.getOutputStream().close(); BufferedReader br = new BufferedReader(new InputStreamReader(ps.getInputStream())); try { String line; while ((line = br.readLine()) != null) { log.info("hook output: " + line); } } finally { try { br.close(); } catch (IOException e2) { } ps.waitFor(); } } } catch (Throwable e) { log.error("Unexpected error during hook execution", e); } finally { repo.close(); } } }, 0, TimeUnit.SECONDS); }
Source:
public void shareSnippet(CharSequence input, boolean preferUrl) { final PageViewFragmentInternal curPageFragment = activity.getCurPageFragment(); if (curPageFragment == null) { return; } String selectedText = sanitizeText(input.toString()); final int minTextSnippetLength = 2; final PageTitle title = curPageFragment.getTitle(); String snippetText; if (selectedText.length() <= minTextSnippetLength || ShareUtils.isStringEmpty(selectedText)) { snippetText = getFirstParagraphText(curPageFragment).toString(); } else { snippetText = selectedText; } String introText = activity.getString(R.string.snippet_share_intro, title.getDisplayText(), title.getCanonicalUri() + "?wprov=sfia1"); Bitmap resultBitmap = new SnippetImage(activity, curPageFragment.getLeadImageBitmap(), curPageFragment.getLeadImageFocusY(), title.getDisplayText(), curPageFragment.getPage().getPageProperties().isMainPage() ? "" : title.getDescription(), snippetText).createImage(); if (shareDialog != null) { shareDialog.dismiss(); } shareDialog = new PreviewDialog(activity, resultBitmap, title.getDisplayText(), introText, snippetText, preferUrl ? title.getCanonicalUri() : selectedText, funnel); shareDialog.show(); }

Target:
public void shareSnippet(CharSequence input, boolean preferUrl) { final PageViewFragmentInternal curPageFragment = activity.getCurPageFragment(); if (curPageFragment == null) { return; } String selectedText = sanitizeText(input.toString()); final int minTextSnippetLength = 2; final PageTitle title = curPageFragment.getTitle(); String snippetText; if (selectedText.length() < minTextSnippetLength || ShareUtils.isStringEmpty(selectedText)) { snippetText = getFirstParagraphText(curPageFragment).toString(); } else { snippetText = selectedText; } String introText = activity.getString(R.string.snippet_share_intro, title.getDisplayText(), title.getCanonicalUri() + "?wprov=sfia1"); Bitmap resultBitmap = new SnippetImage(activity, curPageFragment.getLeadImageBitmap(), curPageFragment.getLeadImageFocusY(), title.getDisplayText(), curPageFragment.getPage().getPageProperties().isMainPage() ? "" : title.getDescription(), snippetText).createImage(); if (shareDialog != null) { shareDialog.dismiss(); } shareDialog = new PreviewDialog(activity, resultBitmap, title.getDisplayText(), introText, snippetText, preferUrl ? title.getCanonicalUri() : selectedText, funnel); shareDialog.show(); }
Source:
public static void pullArchivedFormsFromFile(String filePath, final FormRecordListActivity activity, final CommCarePlatform platform) { File file = new File(filePath); if (file != null && file.exists()) { LocalFilePullResponseFactory.setRequestPayloads(new File[]{file}); requestForms(activity, platform, "fake-server-that-is-never-used", LocalFilePullResponseFactory.INSTANCE, true); } else { Toast.makeText(activity, "Restore file doesn't exist", Toast.LENGTH_LONG).show(); } }

Target:
public static void pullArchivedFormsFromFile(String filePath, final FormRecordListActivity activity, final CommCarePlatform platform) { if (filePath != null && !filePath.isEmpty()) { File file = new File(filePath); if (file.exists()) { LocalFilePullResponseFactory.setRequestPayloads(new File[]{file}); requestForms(activity, platform, "fake-server-that-is-never-used", LocalFilePullResponseFactory.INSTANCE, true); } else { Toast.makeText(activity, Localization.get("payload.file.not.exist"), Toast.LENGTH_LONG).show(); } } else { Toast.makeText(activity, Localization.get("payload.file.not.set"), Toast.LENGTH_LONG).show(); } }
Source:
private void initViewFields(View root) { mUrl = (EditText) root.findViewById(R.id.loginUrlField); mUsername = (EditText) root.findViewById(R.id.loginUsernameField); mUsername.setText(OpenMRS.getInstance().getUsername()); mPassword = (EditText) root.findViewById(R.id.loginPasswordField); mPassword.setCompoundDrawablesWithIntrinsicBounds(0 , 0,R.drawable.ic_password_hidden , 0); mLoginButton = (Button) root.findViewById(R.id.loginButton); mSpinner = (ProgressBar) root.findViewById(R.id.loginLoading); mLoginFormView = (LinearLayout) root.findViewById(R.id.loginFormView); mLoginSyncButton = ((AppCompatImageView) root.findViewById(R.id.loginSyncButton)); mSyncStateLabel = ((TextView) root.findViewById(R.id.syncLabel)); mDropdownLocation = (Spinner) root.findViewById(R.id.locationSpinner); mForgotPass = (TextView) root.findViewById(R.id.forgotPass); mLocationLoadingProgressBar = (ProgressBar) root.findViewById(R.id.locationLoadingProgressBar); }

Target:
private void initViewFields(View root) { mUrl = (EditText) root.findViewById(R.id.loginUrlField); mUsername = (EditText) root.findViewById(R.id.loginUsernameField); mUsername.setText(OpenMRS.getInstance().getUsername()); mPassword = (EditText) root.findViewById(R.id.loginPasswordField); mShowPassword = (CheckBox) root.findViewById(R.id.checkboxShowPassword); mLoginButton = (Button) root.findViewById(R.id.loginButton); mSpinner = (ProgressBar) root.findViewById(R.id.loginLoading); mLoginFormView = (LinearLayout) root.findViewById(R.id.loginFormView); mLoginSyncButton = ((AppCompatImageView) root.findViewById(R.id.loginSyncButton)); mSyncStateLabel = ((TextView) root.findViewById(R.id.syncLabel)); mDropdownLocation = (Spinner) root.findViewById(R.id.locationSpinner); mForgotPass = (TextView) root.findViewById(R.id.forgotPass); mLocationLoadingProgressBar = (ProgressBar) root.findViewById(R.id.locationLoadingProgressBar); }
Source:
public int onStartCommand(Intent intent, int flags, int startId) { Log.i(TAG, "%% onStartCommand"); if (intent == null) { Log.e(TAG, "%% onStartCommand after having been killed"); } if (intent != null && intent.getAction() != null) { String intentAction = intent.getAction(); if (intentAction.equals(ACTION_IS_FCM)){ setLogLevel(Log.VERBOSE); if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.O) { Notification notification = new Notification.Builder(this).getNotification(); startForeground(1337, notification); } if (!isServiceInitialized) { storageManagerPreferences = new StorageManagerPreferences(this); HashMap<String, Object> parameters = StorageUtils.getParams(storageManagerPreferences); try { initialize(parameters); } catch (RCException e) { RCLogger.e(TAG, e.toString()); } } } else { if (intentAction.equals(ACTION_NOTIFICATION_CALL_DEFAULT) || intentAction.equals(ACTION_NOTIFICATION_CALL_ACCEPT_VIDEO) || intentAction.equals(ACTION_NOTIFICATION_CALL_ACCEPT_AUDIO) || intentAction.equals(ACTION_NOTIFICATION_CALL_DECLINE) || intentAction.equals(ACTION_NOTIFICATION_CALL_DELETE) || intentAction.equals(ACTION_NOTIFICATION_MESSAGE_DEFAULT) || intentAction.equals(ACTION_NOTIFICATION_CALL_DISCONNECT) || intentAction.equals(ACTION_NOTIFICATION_CALL_MUTE_AUDIO)) { onNotificationIntent(intent); } } } return START_NOT_STICKY; }

Target:
public int onStartCommand(Intent intent, int flags, int startId) { Log.i(TAG, "%% onStartCommand"); if (intent == null) { Log.e(TAG, "%% onStartCommand after having been killed"); } if (intent != null && intent.getAction() != null) { String intentAction = intent.getAction(); if (intentAction.equals(ACTION_FCM)){ setLogLevel(Log.VERBOSE); if (!isServiceInitialized) { storageManagerPreferences = new StorageManagerPreferences(this); HashMap<String, Object> parameters = StorageUtils.getParams(storageManagerPreferences); try { initialize(null, parameters, null); } catch (RCException e) { RCLogger.e(TAG, e.toString()); } } } else { if (intentAction.equals(ACTION_NOTIFICATION_CALL_DEFAULT) || intentAction.equals(ACTION_NOTIFICATION_CALL_ACCEPT_VIDEO) || intentAction.equals(ACTION_NOTIFICATION_CALL_ACCEPT_AUDIO) || intentAction.equals(ACTION_NOTIFICATION_CALL_DECLINE) || intentAction.equals(ACTION_NOTIFICATION_CALL_DELETE) || intentAction.equals(ACTION_NOTIFICATION_MESSAGE_DEFAULT) || intentAction.equals(ACTION_NOTIFICATION_CALL_DISCONNECT) || intentAction.equals(ACTION_NOTIFICATION_CALL_MUTE_AUDIO)) { onNotificationIntent(intent); } } } return START_NOT_STICKY; }
Source:
public Pair<String, ServerDiscoverySelector> getDefaultLookup() { final String brokerServiceName = tierConfig.getDefaultBrokerServiceName(); final ServerDiscoverySelector retVal = selectorMap.get(brokerServiceName); return new Pair<>(brokerServiceName, retVal); }

Target:
public Pair<String, ServerDiscoverySelector> getDefaultLookup() { final String brokerServiceName = tierConfig.getDefaultBrokerServiceName(); final ServerDiscoverySelector retVal = selectorMap.get(CuratorServiceUtils.makeCanonicalServiceName(brokerServiceName)); return new Pair<>(brokerServiceName, retVal); }
Source:
default Tuple2<Stream<T>, Stream<T>> splitAtInclusive(Predicate<? super T> predicate) { Tuple2<Stream<T>, Stream<T>> split = splitAt(predicate); if(split._2.isEmpty()) { return split; } else { return Tuple.of(split._1.append(split._2.head()), split._2.tail()); } }

Target:
default Tuple2<Stream<T>, Stream<T>> splitAtInclusive(Predicate<? super T> predicate) { final Tuple2<Stream<T>, Stream<T>> split = splitAt(predicate); if(split._2.isEmpty()) { return split; } else { return Tuple.of(split._1.append(split._2.head()), split._2.tail()); } }