auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public void testSync() throws InjectionException, NetworkException, InterruptedException, ExecutionException { final int numWorkers = 3; final List<String> workerIds = prepare(numWorkers); final SynchronizationManager synchronizationManager = driverComponents.getFirst(); final CountDownLatch firstLatch = callGlobalBarriers(workerIds.subList(0, 2)); assertFalse("Cannot enter next state before all workers call global barrier", firstLatch.await(SYNC_WAIT_TIME_MS, TimeUnit.MILLISECONDS)); callGlobalBarrier(workerIds.get(2)); assertTrue("All workers should be released after sync", firstLatch.await(SYNC_WAIT_TIME_MS, TimeUnit.MILLISECONDS)); final CountDownLatch secondLatch = callGlobalBarriers(workerIds.subList(1, 3)); assertFalse("Cannot enter next state before all workers call the global barrier", secondLatch.await(SYNC_WAIT_TIME_MS, TimeUnit.MILLISECONDS)); callGlobalBarrier(workerIds.get(0)); assertFalse("Cannot enter CLEANUP state before being allowed", secondLatch.await(SYNC_WAIT_TIME_MS, TimeUnit.MILLISECONDS)); synchronizationManager.allowWorkersCleanup(); assertTrue("All workers should be released", secondLatch.await(SYNC_WAIT_TIME_MS, TimeUnit.MILLISECONDS)); }

Target:
public void testSync() throws InjectionException, NetworkException, InterruptedException, ExecutionException { final int numWorkers = 3; final List<String> workerIds = prepare(numWorkers); final SynchronizationManager synchronizationManager = driverComponents.getFirst(); final CountDownLatch firstLatch = callGlobalBarriers(workerIds.subList(0, 2)); assertFalse(MSG_SHOULD_WAIT_OTHER_WORKERS, firstLatch.await(SYNC_WAIT_TIME_MS, TimeUnit.MILLISECONDS)); assertEquals(MSG_SHOULD_WAIT_OTHER_WORKERS, 2, firstLatch.getCount()); final CountDownLatch latch2 = callGlobalBarrier(workerIds.get(2)); assertTrue(MSG_SHOULD_RELEASE_WORKERS, latch2.await(SYNC_WAIT_TIME_MS, TimeUnit.MILLISECONDS)); assertTrue(MSG_SHOULD_RELEASE_WORKERS, firstLatch.await(SYNC_WAIT_TIME_MS, TimeUnit.MILLISECONDS)); final CountDownLatch secondLatch = callGlobalBarriers(workerIds.subList(1, 3)); assertFalse(MSG_SHOULD_WAIT_OTHER_WORKERS, secondLatch.await(SYNC_WAIT_TIME_MS, TimeUnit.MILLISECONDS)); assertEquals(MSG_SHOULD_WAIT_OTHER_WORKERS, 2, secondLatch.getCount()); final CountDownLatch latch0 = callGlobalBarrier(workerIds.get(0)); assertFalse(MSG_SHOULD_WAIT_ALLOW_OF_CLEANUP, latch0.await(SYNC_WAIT_TIME_MS, TimeUnit.MILLISECONDS)); assertEquals(MSG_SHOULD_WAIT_ALLOW_OF_CLEANUP, 2, secondLatch.getCount()); synchronizationManager.allowWorkersCleanup(); assertTrue(MSG_SHOULD_RELEASE_WORKERS, latch0.await(SYNC_WAIT_TIME_MS, TimeUnit.MILLISECONDS)); assertTrue(MSG_SHOULD_RELEASE_WORKERS, secondLatch.await(SYNC_WAIT_TIME_MS, TimeUnit.MILLISECONDS)); }
Source:
public Map<String, Map<String, Integer>> dumpHashTableStats() { Map<String, Map<String, Integer>> ret = new HashMap<String, Map<String, Integer>>(); for (LocalFragment t : fragments) { ret.putAll(t.dumpHashTableStats(t.getRootOp())); } return ret; }

Target:
public Map<String, Map<String, Integer>> dumpHashTableStats() { Map<String, Map<String, Integer>> ret = new HashMap<>(); for (LocalFragment t : fragments) { ret.putAll(t.dumpHashTableStats(t.getRootOp())); } return ret; }
Source:
public static Image getImage(IAdaptable adaptable) { if (adaptable != null) { IWorkbenchAdapter o= adaptable.getAdapter(IWorkbenchAdapter.class); ImageDescriptor id= o.getImageDescriptor(adaptable); if (id != null) { Image image= fgImages2.get(id); if (image == null) { image= id.createImage(); try { fgImages2.put(id, image); } catch (NullPointerException ex) { } fgDisposeOnShutdownImages.add(image); } return image; } } return null; }

Target:
public static Image getImage(IAdaptable adaptable) { if (adaptable != null) { IWorkbenchAdapter o= Adapters.adapt(adaptable, IWorkbenchAdapter.class); ImageDescriptor id= o.getImageDescriptor(adaptable); if (id != null) { Image image= fgImages2.get(id); if (image == null) { image= id.createImage(); try { fgImages2.put(id, image); } catch (NullPointerException e) { } fgDisposeOnShutdownImages.add(image); } return image; } } return null; }
Source:
public PlanNode visitJoin(JoinNode node, RewriteContext<Set<DynamicFilter>> context) { JoinNode join = (JoinNode) context.defaultRewrite(node, context.get()); Optional<Expression> filter = join.getFilter(); if (filter.isPresent()) { Expression original = filter.get(); Expression modified = removeDynamicFilters(original, context.get()); if (BooleanLiteral.TRUE_LITERAL.equals(modified)) { filter = Optional.empty(); } else if (!original.equals(modified)) { filter = Optional.of(modified); } } Assignments assignments = join.getDynamicFilterAssignments(); Set<DynamicFilter> removedFilters = context.get(); if (!removedFilters.isEmpty()) { Assignments originalAssignments = join.getDynamicFilterAssignments(); Assignments modifiedAssignments = cleanupAssignments(join.getId(), originalAssignments, removedFilters); if (!originalAssignments.equals(modifiedAssignments)) { assignments = modifiedAssignments; } } if (!filter.equals(join.getFilter()) || !assignments.equals(join.getDynamicFilterAssignments())) { return new JoinNode( join.getId(), join.getType(), join.getLeft(), join.getRight(), join.getCriteria(), join.getOutputSymbols(), filter, join.getLeftHashSymbol(), join.getRightHashSymbol(), join.getDistributionType(), assignments); } else { return join; } }

Target:
public PlanNode visitJoin(JoinNode node, RewriteContext<Set<DynamicFilter>> context) { JoinNode join = (JoinNode) context.defaultRewrite(node, context.get()); Optional<Expression> filterOptional = join.getFilter().map(filter -> { Expression modified = removeDynamicFilters(filter, context.get()); if (TRUE_LITERAL.equals(modified)) { return null; } else if (!filter.equals(modified)) { return modified; } return filter; }); Assignments assignments = join.getDynamicFilterAssignments(); Set<DynamicFilter> removedFilters = context.get(); if (!removedFilters.isEmpty()) { Assignments originalAssignments = join.getDynamicFilterAssignments(); Assignments modifiedAssignments = cleanupAssignments(join.getId(), originalAssignments, removedFilters); if (!originalAssignments.equals(modifiedAssignments)) { assignments = modifiedAssignments; } } if (!filterOptional.equals(join.getFilter()) || !assignments.equals(join.getDynamicFilterAssignments())) { return new JoinNode( join.getId(), join.getType(), join.getLeft(), join.getRight(), join.getCriteria(), join.getOutputSymbols(), filterOptional, join.getLeftHashSymbol(), join.getRightHashSymbol(), join.getDistributionType(), assignments); } return join; }
Source:
private CalibrationMeasures(List<? extends CalibrationMeasure<? extends Trade>> measures) { ImmutableMap.Builder<Class<?>, CalibrationMeasure<? extends Trade>> builder = ImmutableMap.builder(); for (CalibrationMeasure<? extends Trade> measure : measures) { builder.put(measure.getTradeType(), measure); } measuresByTrade = builder.build(); }

Target:
private CalibrationMeasures(List<? extends CalibrationMeasure<? extends Trade>> measures) { measuresByTrade = measures.stream() .collect(toImmutableMap(CalibrationMeasure::getTradeType, m -> m)); }
Source:
protected void executeCommand() { getStoragePool().setstatus(getParameters().getStatus()); setVdsIdRef(getStoragePool().getspm_vds_id()); DbFacade.getInstance().getStoragePoolDAO().updateStatus(getStoragePool().getId(), getStoragePool().getstatus()); if (getParameters().getStatus() == StoragePoolStatus.Problematic || getParameters().getStatus() == StoragePoolStatus.NotOperational) { List<storage_pool_iso_map> storagesStatusInPool = DbFacade.getInstance() .getStoragePoolIsoMapDAO().getAllForStoragePool(getStoragePool().getId()); for (storage_pool_iso_map storageStatusInPool : storagesStatusInPool) { if (storageStatusInPool.getstatus() != null && storageStatusInPool.getstatus() == StorageDomainStatus.Active) { storageStatusInPool.setstatus(StorageDomainStatus.Unknown); DbFacade.getInstance() .getStoragePoolIsoMapDAO() .updateStatus(storageStatusInPool.getId(), storageStatusInPool.getstatus()); final List<Guid> asyncTasks = getDbFacade().getAsyncTaskDAO().getAsyncTaskIdsByEntity(storageStatusInPool.getstorage_id()); for(Guid taskId: asyncTasks) { AuditLogableBase auditLogableBase = new AuditLogableBase(); auditLogableBase.setStorageDomain(getStorageDomain()); auditLogableBase.setJobId(taskId); AuditLogDirector.log(auditLogableBase, AuditLogType.STORAGE_DOMAIN_TASKS_ERROR); } } } } StoragePoolStatusHandler.PoolStatusChanged(getStoragePool().getId(), getStoragePool().getstatus()); setSucceeded(true); }

Target:
protected void executeCommand() { getStoragePool().setstatus(getParameters().getStatus()); setVdsIdRef(getStoragePool().getspm_vds_id()); DbFacade.getInstance().getStoragePoolDAO().updateStatus(getStoragePool().getId(), getStoragePool().getstatus()); if (getParameters().getStatus() == StoragePoolStatus.Problematic || getParameters().getStatus() == StoragePoolStatus.NotOperational) { List<storage_pool_iso_map> storagesStatusInPool = DbFacade.getInstance() .getStoragePoolIsoMapDAO().getAllForStoragePool(getStoragePool().getId()); for (storage_pool_iso_map storageStatusInPool : storagesStatusInPool) { if (storageStatusInPool.getstatus() != null && storageStatusInPool.getstatus() == StorageDomainStatus.Active) { storageStatusInPool.setstatus(StorageDomainStatus.Unknown); DbFacade.getInstance() .getStoragePoolIsoMapDAO() .updateStatus(storageStatusInPool.getId(), storageStatusInPool.getstatus()); final List<Guid> asyncTasks = getDbFacade().getAsyncTaskDAO() .getAsyncTaskIdsByEntity(storageStatusInPool.getstorage_id()); if (!asyncTasks.isEmpty()) { AuditLogableBase auditLogableBase = new AuditLogableBase(); auditLogableBase.setStorageDomain(getDbFacade().getStorageDomainDAO() .get(storageStatusInPool.getstorage_id())); AuditLogDirector.log(auditLogableBase, AuditLogType.STORAGE_DOMAIN_TASKS_ERROR); } } } } StoragePoolStatusHandler.PoolStatusChanged(getStoragePool().getId(), getStoragePool().getstatus()); setSucceeded(true); }
Source:
public BlockLocation[] getFileBlockLocations(final FileStatus fs, final long start, final long len) throws FileNotFoundException, IOException { if (fs.getPath() != InodeTree.SlashPath && this.fsState .getRootFallbackLink() != null) { FileSystem linkedFallbackFs = this.fsState.getRootFallbackLink().getTargetFileSystem(); Path parent = Path.getPathWithoutSchemeAndAuthority( new Path(theInternalDir.fullPath)); String leafChild = (InodeTree.SlashPath.equals(fs.getPath())) ? InodeTree.SlashPath.toString() : fs.getPath().getName(); Path pathToFallbackFs = new Path(parent, leafChild); return linkedFallbackFs .getFileBlockLocations(pathToFallbackFs, start, len); } checkPathIsSlash(fs.getPath()); throw new FileNotFoundException("Path points to dir not a file"); }

Target:
public BlockLocation[] getFileBlockLocations(final FileStatus fs, final long start, final long len) throws FileNotFoundException, IOException { if (!InodeTree.SlashPath.equals(fs.getPath()) && this.fsState .getRootFallbackLink() != null) { FileSystem linkedFallbackFs = this.fsState.getRootFallbackLink().getTargetFileSystem(); Path parent = Path.getPathWithoutSchemeAndAuthority( new Path(theInternalDir.fullPath)); Path pathToFallbackFs = new Path(parent, fs.getPath().getName()); return linkedFallbackFs .getFileBlockLocations(pathToFallbackFs, start, len); } checkPathIsSlash(fs.getPath()); throw new FileNotFoundException("Path points to dir not a file"); }
Source:
private void init() { if (jp == null) { try { jp = objectMapper.getFactory().createParser(future.get()); if (null == jp.getInputSource()) { log.warn("JSON parser has a NULL input source"); } final JsonToken nextToken = jp.nextToken(); if (nextToken == JsonToken.START_OBJECT) { QueryInterruptedException e = jp.getCodec().readValue(jp, QueryInterruptedException.class); throw e; } else if (nextToken != JsonToken.START_ARRAY) { throw new IAE("Next token wasn't a START_ARRAY, was[%s] from url [%s]", jp.getCurrentToken(), url); } else { jp.nextToken(); objectCodec = jp.getCodec(); } } catch (IOException | InterruptedException | ExecutionException e) { throw new RE(e, "Failure getting results from[%s] because of [%s]", url, e.getMessage()); } catch (CancellationException e) { throw new QueryInterruptedException("Query cancelled"); } } }

Target:
private void init() { if (jp == null) { try { jp = objectMapper.getFactory().createParser(future.get()); final JsonToken nextToken = jp.nextToken(); if (nextToken == JsonToken.START_OBJECT) { QueryInterruptedException e = jp.getCodec().readValue(jp, QueryInterruptedException.class); throw e; } else if (nextToken != JsonToken.START_ARRAY) { throw new IAE("Next token wasn't a START_ARRAY, was[%s] from url [%s]", jp.getCurrentToken(), url); } else { jp.nextToken(); objectCodec = jp.getCodec(); } } catch (IOException | InterruptedException | ExecutionException e) { throw new RE(e, "Failure getting results from[%s] because of [%s]", url, e.getMessage()); } catch (CancellationException e) { throw new QueryInterruptedException("Query cancelled"); } } }
Source:
public Optional<InsightCard.Category> generateFutureInsightsByCategory(final Long accountId, final InsightCard.Category category, final DateTime dateVisible) { Optional<InsightCard> insightCardOptional = Optional.absent(); switch (category) { case PARTNER_MOTION: insightCardOptional = PartnerMotionInsight.getInsights(accountId, deviceReadDAO, sleepStatsDAODynamoDB, dateVisible); break; } if (insightCardOptional.isPresent()) { if (marketingInsightPool.contains(category)) { marketingInsightsSeenDAODynamoDB.updateSeenCategories(accountId, category); } LOGGER.info("action=generated_insight_card category={} accountId={} next_action=insert_into_dynamo", insightCardOptional.get(), accountId); this.insightsDAODynamoDB.insertInsight(insightCardOptional.get()); final InsightsLastSeen newInsight = new InsightsLastSeen(accountId, insightCardOptional.get().category, DateTime.now(DateTimeZone.UTC)); this.insightsLastSeenDAO.markLastSeen(newInsight); return Optional.of(category); } return Optional.absent(); }

Target:
public Optional<InsightCard.Category> generateFutureInsightsByCategory(final Long accountId, final InsightCard.Category category, final DateTime dateVisible) { Optional<InsightCard> insightCardOptional = Optional.absent(); switch (category) { case PARTNER_MOTION: insightCardOptional = PartnerMotionInsight.getInsights(accountId, deviceReadDAO, sleepStatsDAODynamoDB, dateVisible); break; } if (insightCardOptional.isPresent()) { if (marketingInsightPool.contains(category)) { marketingInsightsSeenDAODynamoDB.updateSeenCategories(accountId, category); } LOGGER.info("action=generated_insight_card category={} account_id={} next_action=insert_into_dynamo", insightCardOptional.get(), accountId); this.insightsDAODynamoDB.insertInsight(insightCardOptional.get()); final InsightsLastSeen newInsight = new InsightsLastSeen(accountId, insightCardOptional.get().category, DateTime.now(DateTimeZone.UTC)); this.insightsLastSeenDAO.markLastSeen(newInsight); return Optional.of(category); } return Optional.absent(); }
Source:
public void testRebindDoesNotEffectCatalog() { String persistenceDir = newTempPersistenceContainerName(); BrooklynLauncher launcher = newLauncherForTests(persistenceDir); launcher.start(); BrooklynCatalog catalog = launcher.getServerDetails().getManagementContext().getCatalog(); assertCatalogConsistsOfIds(catalog.getCatalogItems(), EXPECTED_DEFAULT_IDS); catalog.deleteCatalogItem("one", TEST_VERSION); catalog.deleteCatalogItem("two", TEST_VERSION); Assert.assertEquals(((Collection) catalog.getCatalogItems()).size(), 0); catalog.addItems(new ResourceUtils(this).getResourceAsString(CATALOG_ADDITIONS)); assertCatalogConsistsOfIds(catalog.getCatalogItems(), EXPECTED_ADDED_IDS); launcher.terminate(); BrooklynLauncher newLauncher = newLauncherForTests(persistenceDir); newLauncher.start(); assertCatalogConsistsOfIds(newLauncher.getServerDetails().getManagementContext().getCatalog().getCatalogItems(), EXPECTED_DEFAULT_IDS); }

Target:
public void testRebindDoesNotEffectCatalog() { String persistenceDir = newTempPersistenceContainerName(); BrooklynLauncher launcher = newLauncherForTests(persistenceDir); launcher.start(); BrooklynCatalog catalog = launcher.getServerDetails().getManagementContext().getCatalog(); assertCatalogConsistsOfIds(catalog.getCatalogItems(), EXPECTED_DEFAULT_IDS); catalog.deleteCatalogItem("one", TEST_VERSION); catalog.deleteCatalogItem("two", TEST_VERSION); Assert.assertEquals(((Collection) catalog.getCatalogItems()).size(), 0); catalog.addItems(new ResourceUtils(this).getResourceAsString(CATALOG_ADDITIONS)); assertCatalogConsistsOfIds(catalog.getCatalogItems(), EXPECTED_ADDED_IDS); launcher.terminate(); BrooklynLauncher newLauncher = newLauncherForTests(persistenceDir); newLauncher.start(); assertCatalogConsistsOfIds(newLauncher.getServerDetails().getManagementContext().getCatalog().getCatalogItems(), EXPECTED_ADDED_IDS); }
Source:
public void onChildAdded(DataSnapshot keySnapshot, String previousChildKey) { super.setOnChangedListener(null); super.onChildAdded(keySnapshot, previousChildKey); super.setOnChangedListener(mListener); mRef.child(keySnapshot.getKey()).addValueEventListener(this); }

Target:
public void onChildAdded(DataSnapshot keySnapshot, String previousChildKey) { super.setOnChangedListener(null); super.onChildAdded(keySnapshot, previousChildKey); super.setOnChangedListener(mListener); Query ref = mQuery.getRef().child(keySnapshot.getKey()); mRefs.put(ref, ref.addValueEventListener(new DataRefListener())); }
Source:
public void doPrefetch(int index, long relativeOffset, long size) throws IOException { BlobReadInfo blobReadInfo = blobReadInfoList.get(index); try { if (!blobReadInfo.isBlobDownloaded()) { blobReadInfo.downloadBlob(blobStore); } ByteBuf byteBuf = blobReadInfoList.get(index).getBlobContent(); byteBuf.readerIndex((int) (relativeOffset)); byteBuf.writerIndex((int) (relativeOffset + size)); } catch (StoreException ex) { throw new IOException("Prefetch of cloud blob " + blobReadInfo.getBlobId().getID() + " failed", ex); } }

Target:
public void doPrefetch(int index, long relativeOffset, long size) throws IOException { BlobReadInfo blobReadInfo = blobReadInfoList.get(index); try { if (!blobReadInfo.isBlobDownloaded()) { blobReadInfo.downloadBlob(blobStore); } ByteBuf byteBuf = blobReadInfoList.get(index).getBlobContent(); byteBuf.setIndex((int) (relativeOffset), (int) (relativeOffset + size)); } catch (StoreException ex) { throw new IOException("Prefetch of cloud blob " + blobReadInfo.getBlobId().getID() + " failed", ex); } }
Source:
public CommonTargetToModelUpdateStrategy(VElement vElement, EStructuralFeature eStructuralFeature, ITargetToModelConverter conversion) { this.vElement = vElement; this.eStructuralFeature = eStructuralFeature; this.conversion = conversion; }

Target:
public CommonTargetToModelUpdateStrategy(VElement vElement, EStructuralFeature eStructuralFeature, ITargetToModelConverter conversion) { super(POLICY_UPDATE); this.vElement = vElement; this.eStructuralFeature = eStructuralFeature; this.conversion = conversion; }
Source:
private void registerUserMessage(final SocketSession conn, final Request req, final LoginInformation login) { try { final DatabaseClient client = (DatabaseClient) super.getDatabaseReader(); client.createUser(login.getUsername(), login.getPassword(), login.getEmail(), login.getIsInstructor()); loginUser(conn, req, login); } catch (GeneralSecurityException | AuthenticationException e) { final Message.ProtoException protoEx = ExceptionUtilities.createProtoException(e); conn.send(ExceptionUtilities.createExceptionRequest(req, protoEx)); LOG.error(LoggingConstants.EXCEPTION_MESSAGE, e); send(conn, createLoginResponse(req, login, false, e.getMessage(), null)); } catch (RegistrationException | DatabaseAccessException e) { final Message.ProtoException protoEx = ExceptionUtilities.createProtoException(e); conn.send(ExceptionUtilities.createExceptionRequest(req, protoEx)); LOG.error(LoggingConstants.EXCEPTION_MESSAGE, e); send(conn, createLoginResponse(req, login, false, e.getMessage(), null)); } }

Target:
private void registerUserMessage(final SocketSession conn, final Request req, final LoginInformation login) { try { final DatabaseClient client = (DatabaseClient) super.getDatabaseReader(); client.createUser(login.getUsername(), login.getPassword(), login.getEmail(), login.getIsInstructor()); loginUser(conn, req, login); } catch (GeneralSecurityException | AuthenticationException | RegistrationException | DatabaseAccessException e) { final Message.ProtoException protoEx = ExceptionUtilities.createProtoException(e); conn.send(ExceptionUtilities.createExceptionRequest(req, protoEx)); LOG.error(LoggingConstants.EXCEPTION_MESSAGE, e); send(conn, createLoginResponse(req, login, false, e.getMessage(), null)); } }
Source:
public GitSubscriberMergeContext(final GitResourceVariantTreeSubscriber subscriber, ISynchronizationScopeManager manager, GitSynchronizeDataSet gsds) { super(subscriber, manager); this.gsds = gsds; repoChangeListener = new RepositoryChangeListener() { public void repositoryChanged(RepositoryMapping which) { handleRepositoryChange(subscriber, which); } }; resourceChangeListener = new IResourceChangeListener() { public void resourceChanged(IResourceChangeEvent event) { IResourceDelta delta = event.getDelta(); IResourceDelta[] children = event.getDelta().getAffectedChildren(); IResource resource = children[0].getResource(); Repository repo = RepositoryMapping.getMapping(resource).getRepository(); GitResourceDeltaVisitor visitor = new GitResourceDeltaVisitor(repo); try { delta.accept(visitor); handleResourceChange(subscriber, repo, visitor.getFileResourcesToUpdate()); } catch (CoreException e) { Activator.logError(e.getMessage(), e); } } }; GitProjectData.addRepositoryChangeListener(repoChangeListener); ResourcesPlugin.getWorkspace().addResourceChangeListener(resourceChangeListener); initialize(); }

Target:
public GitSubscriberMergeContext(final GitResourceVariantTreeSubscriber subscriber, ISynchronizationScopeManager manager, GitSynchronizeDataSet gsds) { super(subscriber, manager); this.gsds = gsds; repoChangeListener = new RepositoryChangeListener() { public void repositoryChanged(RepositoryMapping which) { handleRepositoryChange(subscriber, which); } }; resourceChangeListener = new IResourceChangeListener() { public void resourceChanged(IResourceChangeEvent event) { IResourceDelta delta = event.getDelta(); if (delta == null) return; handleResourceChange(subscriber, delta); } }; GitProjectData.addRepositoryChangeListener(repoChangeListener); ResourcesPlugin.getWorkspace().addResourceChangeListener(resourceChangeListener); initialize(); }
Source:
public void signIn(View view) { FirebaseAuth.getInstance() .signInAnonymously() .addOnCompleteListener(new OnCompleteListener<AuthResult>() { @Override public void onComplete(@NonNull Task<AuthResult> task) { startActivityForResult( AuthUI.getInstance().createSignInIntentBuilder() .setTheme(getSelectedTheme()) .setLogo(getSelectedLogo()) .setAvailableProviders(getSelectedProviders()) .setTosAndPrivacyPolicyUrls(getSelectedTosUrl(), getSelectedPrivacyPolicyUrl()) .setIsSmartLockEnabled(mEnableCredentialSelector.isChecked(), mEnableHintSelector.isChecked()) .setAutoUpgradeAnonymousUsers() .build(), RC_SIGN_IN); } }); }

Target:
public void signIn(View view) { startActivityForResult( AuthUI.getInstance().createSignInIntentBuilder() .setTheme(getSelectedTheme()) .setLogo(getSelectedLogo()) .setAvailableProviders(getSelectedProviders()) .setTosAndPrivacyPolicyUrls(getSelectedTosUrl(), getSelectedPrivacyPolicyUrl()) .setIsSmartLockEnabled(mEnableCredentialSelector.isChecked(), mEnableHintSelector.isChecked()) .build(), RC_SIGN_IN); }
Source:
public OSFileStore[] getFileStores() { List<OSFileStore> fs = new ArrayList<>(); WinDef.DWORD LENGTH = new WinDef.DWORD(255L); char[] volume = new char[LENGTH.intValue()]; WinNT.HANDLE hVol = Kernel32.INSTANCE.FindFirstVolume(volume, LENGTH.intValue()); if (hVol == WinNT.INVALID_HANDLE_VALUE) { return fs.toArray(new OSFileStore[0]); } while (true) { char[] fstype = new char[16]; char[] name = new char[LENGTH.intValue()]; char[] mount = new char[LENGTH.intValue()]; WinNT.LARGE_INTEGER userFreeBytes = new WinNT.LARGE_INTEGER(0L); WinNT.LARGE_INTEGER totalBytes = new WinNT.LARGE_INTEGER(0L); WinNT.LARGE_INTEGER systemFreeBytes = new WinNT.LARGE_INTEGER(0L); Kernel32.INSTANCE.GetVolumeInformation(new String(volume).trim(), name, 255, null, null, null, fstype, 16); Kernel32.INSTANCE.GetVolumePathNamesForVolumeName(new String(volume).trim(), mount, 255, null); Kernel32.INSTANCE.GetDiskFreeSpaceEx(new String(volume).trim(), userFreeBytes, totalBytes, systemFreeBytes); fs.add(new OSFileStore(new String(volume).trim(), new String(mount).trim(), new String(name).trim(), new String(fstype).trim(), systemFreeBytes.getValue(), totalBytes.getValue())); boolean retVal = Kernel32.INSTANCE.FindNextVolume(hVol, volume, 255); if (!retVal) { Kernel32.INSTANCE.FindVolumeClose(hVol); break; } } return fs.toArray(new OSFileStore[fs.size()]); }

Target:
public OSFileStore[] getFileStores() { List<OSFileStore> locals, networks; ArrayList<OSFileStore> result; result = new ArrayList<>(); locals = this.getLocalVolumes(); networks = this.getNetworkVolumes(); result.addAll(locals); result.addAll(networks); return result.toArray(new OSFileStore[result.size()]); }
Source:
public void identifiersToUri() { assertThat(gd.getMetadataService().identifiersToUris(project, asList("attr.person.department")).size(), is(1)); }

Target:
public void identifiersToUri() { final MetadataService metadataService = gd.getMetadataService(); final Map<String, String> idsToUris = metadataService.identifiersToUris(project, asList("attr.person.department")); assertThat(idsToUris.entrySet(), hasSize(1)); final Attribute attribute = metadataService.getObjByUri(idsToUris.get("attr.person.department"), Attribute.class); assertThat(attribute.getIdentifier(), is("attr.person.department")); }
Source:
private WorldSavedData checkLoadOrDefault(World world, Class<? extends WorldSavedData> structureClass, String structureName) { if (world instanceof IMixinWorld) { if (((IMixinWorld) world).getActiveConfig().getConfig().getStructures().structureMap.get(structureName)) { return world.loadItemData(structureClass, structureName); } else { return new MapGenStructureData(structureName); } } else { return world.loadItemData(structureClass, structureName); } }

Target:
private WorldSavedData checkLoadOrDefault(World world, Class<? extends WorldSavedData> structureClass, String structureName) { if (world instanceof IMixinWorldServer) { Boolean saveStructure = SpongeImpl.getGlobalConfig().getConfig().getOptimizations().structureMap.get(structureName); if (saveStructure == null) { SpongeImpl.getGlobalConfig().getConfig().getOptimizations().structureMap.put(structureName, true); saveStructure = true; } if (saveStructure) { return world.loadItemData(structureClass, structureName); } else { return new MapGenStructureData(structureName); } } else { return world.loadItemData(structureClass, structureName); } }
Source:
public List<String> getUris() { final List<String> uris = identifiersAndUris.stream().map(IdentifierAndUri::getUri).collect(Collectors.toList()); return uris; }

Target:
public List<String> getUris() { return identifiersAndUris.stream().map(IdentifierAndUri::getUri).collect(Collectors.toList()); }
Source:
public boolean createStream(StreamSpec streamSpec) { return Optional.ofNullable(inMemorySystemConfig.getSerializedDataSet(streamSpec.getId())) .map(serializedData -> inMemoryManager.initializeStream(streamSpec, serializedData)) .orElse(inMemoryManager.initializeStream(streamSpec)); }

Target:
public boolean createStream(StreamSpec streamSpec) { return inMemoryManager.initializeStream(streamSpec); }
Source:
protected String visitOther(Element element) { Object source = element.getSource(); ElementSource elementSource = null; while (source != null && source instanceof ElementSource) { elementSource = (ElementSource)source; source = elementSource.getOriginalElementSource(); } if (elementSource != null) { return elementSource.getModuleClassNames().toString(); } return null; }

Target:
protected String visitOther(Element element) { Object source = element.getSource(); ElementSource elementSource = null; while (source instanceof ElementSource) { elementSource = (ElementSource)source; source = elementSource.getOriginalElementSource(); } if (elementSource != null) { return elementSource.getModuleClassNames().toString(); } return null; }
Source:
public ArrayList<String> getUsedLunsMessages(List<LUNs> luns) { ArrayList<String> usedLunsMessages = new ArrayList<String>(); UIMessages messages = ConstantsManager.getInstance().getMessages(); for (LUNs lun : luns) { if (lun.getStatus() == LunStatus.Used) { String reason = null; if (lun.getvolume_group_id() != null && !lun.getvolume_group_id().isEmpty()) { reason = messages.lunUsedByVG(lun.getvolume_group_id()); } usedLunsMessages.add(reason == null ? lun.getLUN_id() : lun.getLUN_id() + " (" + reason + ")"); } } return usedLunsMessages; }

Target:
public ArrayList<String> getUsedLunsMessages(List<LUNs> luns) { ArrayList<String> usedLunsMessages = new ArrayList<String>(); UIMessages messages = ConstantsManager.getInstance().getMessages(); for (LUNs lun : luns) { if (lun.getStatus() == LunStatus.Used) { String reason = null; if (lun.getvolume_group_id() != null && !lun.getvolume_group_id().isEmpty()) { reason = messages.lunUsedByVG(lun.getvolume_group_id()); } usedLunsMessages.add(reason == null ? lun.getLUN_id() : messages.usedLunIdReason(lun.getLUN_id(), reason)); } } return usedLunsMessages; }
Source:
public List<String> getTextFont() { String[] fonts; if (!(layout.get("text-font") instanceof JSONObject)) { fonts = parse.array(String.class, layout, "text-font", new String[]{"Open Sans Regular", "Arial Unicode MS Regular"}); return Arrays.asList(fonts); } else { return null; } }

Target:
public List<String> getTextFont() { String[] fonts; if (layout.get("text-font") instanceof JSONObject) { return null; } else { fonts = parse.array(String.class, layout, "text-font", new String[]{"Open Sans Regular", "Arial Unicode MS Regular"}); return Arrays.asList(fonts); } }
Source:
public String viewStudyAjax(@ModelAttribute("createTrialForm") final CreateTrialForm form, final Model model, @PathVariable final int datasetId, @PathVariable final int studyId) { Workbook workbook = null; try { workbook = this.fieldbookMiddlewareService.getCompleteDataset(datasetId); this.fieldbookService.setAllPossibleValuesInWorkbook(workbook); SettingsUtil.resetBreedingMethodValueToId(this.fieldbookMiddlewareService, workbook.getObservations(), false, this.ontologyService, contextUtil.getCurrentProgramUUID()); } catch (final MiddlewareException e) { TrialMeasurementsController.LOG.error(e.getMessage(), e); } this.getUserSelection().setMeasurementRowList(workbook.arrangeMeasurementObservation(workbook.getObservations())); form.setMeasurementRowList(this.getUserSelection().getMeasurementRowList()); form.setMeasurementVariables(workbook.getMeasurementDatasetVariables()); this.changeLocationIdToName(form.getMeasurementRowList(), workbook.getMeasurementDatasetVariablesMap(), studyId); this.paginationListSelection.addReviewDetailsList(String.valueOf(datasetId), form.getMeasurementRowList()); this.paginationListSelection.addReviewVariableList(String.valueOf(datasetId), form.getMeasurementVariables()); form.changePage(1); this.getUserSelection().setCurrentPage(form.getCurrentPage()); return super.showAjaxPage(model, TrialMeasurementsController.OBSERVATIONS_HTML); }

Target:
public String viewStudyAjax(@ModelAttribute("createTrialForm") final CreateTrialForm form, final Model model, @PathVariable final int datasetId, @PathVariable final int studyId) { Workbook workbook = null; try { workbook = this.fieldbookMiddlewareService.getCompleteDataset(datasetId); this.fieldbookService.setAllPossibleValuesInWorkbook(workbook); SettingsUtil.resetBreedingMethodValueToId(this.fieldbookMiddlewareService, workbook.getObservations(), false, this.ontologyService, this.contextUtil.getCurrentProgramUUID()); } catch (final MiddlewareException e) { TrialMeasurementsController.LOG.error(e.getMessage(), e); } this.getUserSelection() .setMeasurementRowList(workbook.arrangeMeasurementObservation(workbook.getObservations())); form.setMeasurementRowList(this.getUserSelection().getMeasurementRowList()); form.setMeasurementVariables(workbook.getMeasurementDatasetVariables()); this.changeLocationIdToName(form.getMeasurementRowList(), workbook.getMeasurementDatasetVariablesMap(), studyId); this.paginationListSelection.addReviewDetailsList(String.valueOf(datasetId), form.getMeasurementRowList()); this.paginationListSelection.addReviewVariableList(String.valueOf(datasetId), form.getMeasurementVariables()); form.changePage(1); this.getUserSelection().setCurrentPage(form.getCurrentPage()); return super.showAjaxPage(model, TrialMeasurementsController.OBSERVATIONS_HTML); }
Source:
private void createProviderIdIfNotExists(UISClient uisClient, String providerId) throws CloudException { try { uisClient.getDataProvider(providerId); LOGGER.info("A provider already existed " + providerId); } catch (Exception e) { DataProviderProperties dataProviderProperties = new DataProviderProperties(); uisClient.createProvider(providerId, dataProviderProperties); LOGGER.info("A new provider is created " + providerId); } }

Target:
private void createProviderIdIfNotExists(UISClient uisClient, String providerId) throws CloudException { try { uisClient.getDataProvider(providerId); } catch (Exception e) { DataProviderProperties dataProviderProperties = new DataProviderProperties(); uisClient.createProvider(providerId, dataProviderProperties); } }
Source:
private List<String> collectSessionInfo(TreeItem aRow, String aName) { if (aName.equals("Session Info")) { return new ArrayList<String>(Arrays.asList(new String[]{aName})); } else { if (aRow.size() == 1) { summaryTableAsList.add(Arrays.asList(new String[]{""})); return fillTestLabels("Test description", aName); } else { List<String> result = new ArrayList<String>(); result.add(aName); for (String sessionName : sessionNames) { result.add(clearHtmlTags(aRow.get(sessionName))); } return result; } } }

Target:
private List<String> collectSessionInfo(TreeItem aRow, String aName) { if (aName.equals(SESSION_INFO)) { summaryTableDto.insertTableName(aName); return new ArrayList<String>(Arrays.asList(new String[]{aName})); } else { if (aRow.size() == 1) { summaryTableDto.insertRow(Arrays.asList(new String[]{""})); return fillTestLabels("Test description", aName); } else { List<String> result = new ArrayList<String>(); result.add(aName); for (String sessionName : sessionNames) { result.add(clearHtmlTags(aRow.get(sessionName))); } return result; } } }
Source:
public final Void execute(final Input values, final ExecutionContext context) throws Exception { final Dimension size = values.map.getMapSize(); final double dpiRatio = values.map.getDpi() / PDF_DPI; final Dimension pixels = new Dimension((int) Math.ceil(size.width * dpiRatio), (int) Math.ceil(size.height * dpiRatio)); if (pixels.height < maxHeight && pixels.width < maxWidth) { return null; } final Dimension tileSize = adaptTileDimensions(pixels, maxWidth, maxHeight); final List<MapLayer> layers = values.map.getLayers(); for (int i = 0; i < layers.size(); i++) { final MapLayer layer = layers.get(i); context.stopIfCanceled(); if (layer instanceof WmsLayer) { final WmsLayer wmsLayer = (WmsLayer) layer; final WmsLayerParam params = wmsLayer.getParams(); if (matchers.matches(new URI(params.baseURL), HttpMethod.GET)) { if (LOGGER.isInfoEnabled()) { LOGGER.info("Converting layer {}[{}] into a tiled WMS layer with tileSize={}x{}", wmsLayer.getParams().baseURL, String.join(", ", wmsLayer.getParams().layers), tileSize.width, tileSize.height); } values.map.replaceLayer(i, new TiledWmsLayer(wmsLayer, tileSize)); } } } return null; }

Target:
public final Void execute(final Input values, final ExecutionContext context) throws Exception { final Dimension size = values.map.getMapSize(); final double dpiRatio = values.map.getDpi() / PDF_DPI; final Dimension pixels = new Dimension((int) Math.ceil(size.width * dpiRatio), (int) Math.ceil(size.height * dpiRatio)); if (pixels.height <= maxHeight && pixels.width <= maxWidth) { return null; } final Dimension tileSize = adaptTileDimensions(pixels, maxWidth, maxHeight); final List<MapLayer> layers = values.map.getLayers(); for (int i = 0; i < layers.size(); i++) { final MapLayer layer = layers.get(i); context.stopIfCanceled(); if (layer instanceof WmsLayer) { final WmsLayer wmsLayer = (WmsLayer) layer; final WmsLayerParam params = wmsLayer.getParams(); if (matchers.matches(new URI(params.baseURL), HttpMethod.GET)) { if (LOGGER.isInfoEnabled()) { LOGGER.info("Converting layer {}[{}] into a tiled WMS layer with tileSize={}x{}", wmsLayer.getParams().baseURL, String.join(", ", wmsLayer.getParams().layers), tileSize.width, tileSize.height); } values.map.replaceLayer(i, new TiledWmsLayer(wmsLayer, tileSize)); } } } return null; }
Source:
public static SharedStorage create(String id, int size, String state, String description, String cloudpanelId, int sizeUsed, String cifsPath, String nfsPath, String name, String creationDate, List<Server> servers) { return new AutoValue_SharedStorage(id, size, state, description, cloudpanelId, sizeUsed, cifsPath, nfsPath, name, creationDate, servers == null ? ImmutableList.<Server>of() : servers); }

Target:
public static SharedStorage create(String id, int size, String state, String description, String cloudpanelId, int sizeUsed, String cifsPath, String nfsPath, String name, String creationDate, List<Server> servers) { return new AutoValue_SharedStorage(id, size, state, description, cloudpanelId, sizeUsed, cifsPath, nfsPath, name, creationDate, servers == null ? ImmutableList.<Server>of() : ImmutableList.copyOf(servers)); }
Source:
@Override public String toString() { return S.toString(ValidateIndexesCheckSizeIssue.class, this) + ", " + t.getClass() + ": " + t.getMessage(); }

Target:
@Override public String toString() { return S.toString(ValidateIndexesCheckSizeIssue.class, this, "err", t); }
Source:
private static <T extends VmBase> void addImportedDisks(T entity, List<VmDevice> vmDeviceToUpdate) { final Guid id = entity.getId(); for (BaseDisk disk : getDisks(entity.getImages())) { Guid deviceId = disk.getId(); VmDevice vmDevice = addManagedDevice(new VmDeviceId(deviceId, id), VmDeviceType.DISK, VmDeviceType.DISK, null, true, false, ""); updateVmDevice(entity, vmDevice, deviceId, vmDeviceToUpdate); } }

Target:
private static <T extends VmBase> void addImportedDisks(T entity, List<VmDevice> vmDeviceToUpdate) { final Guid id = entity.getId(); for (BaseDisk disk : getDisks(entity.getImages())) { Guid deviceId = disk.getId(); VmDevice vmDevice = addManagedDevice(new VmDeviceId(deviceId, id), VmDeviceType.DISK, VmDeviceType.DISK, null, true, false); updateVmDevice(entity, vmDevice, deviceId, vmDeviceToUpdate); } }
Source:
public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException { HttpServletRequest req = (HttpServletRequest) request; if (modeService.isReadOnlyEnabled()) { if (!req.getMethod().equals("GET") && !isWhitelisted(req.getRequestURI())) { HttpServletResponse resp = ((HttpServletResponse) response); resp.sendError(SC_SERVICE_UNAVAILABLE, READ_ONLY_ERROR_MESSAGE); return; } } chain.doFilter(request, response); }

Target:
public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException { if (modeService.isReadOnlyEnabled()) { HttpServletRequest req = (HttpServletRequest) request; if (!req.getMethod().equals("GET") && !isWhitelisted(req.getRequestURI())) { HttpServletResponse resp = ((HttpServletResponse) response); resp.sendError(SC_SERVICE_UNAVAILABLE, READ_ONLY_ERROR_MESSAGE); return; } } chain.doFilter(request, response); }
Source:
protected SocketConfig buildSocketConfig() { return SocketConfig.custom() .setSoTimeout(readTimeout == -1 ? 0 : readTimeout) .build(); }

Target:
protected SocketConfig buildSocketConfig() { if (readTimeout < 1) { return null; } return SocketConfig.custom() .setSoTimeout(readTimeout) .build(); }
Source:
private void joinConflicts(UMLRTDiff change1, UMLRTDiff change2, Comparison comparison) { final Conflict change2Conflict = change2.getConflict(); change1.getConflict().getDifferences().addAll(change2Conflict.getDifferences()); change1.getConflict().getDifferences().removeAll(change1.getRefinedBy()); change1.getConflict().getDifferences().removeAll(change2.getRefinedBy()); comparison.getConflicts().remove(change2Conflict); }

Target:
private void joinConflicts(UMLRTDiff change1, UMLRTDiff change2, Comparison comparison) { final Conflict change2Conflict = change2.getConflict(); change1.getConflict().getDifferences().addAll(change2Conflict.getDifferences()); comparison.getConflicts().remove(change2Conflict); }
Source:
public static final int hashCode(char[] array) { int length = array.length; int hash = length == 0 ? 31 : array[0]; for (int i = length; --i > 0;) hash = (hash * 31) + array[i]; return hash & 0x7FFFFFFF; }

Target:
public static final int hashCode(char[] array) { return Arrays.hashCode(array); }
Source:
public void writeTo(AsyncWritableChannel channel, Callback<Long> callback) throws IOException { prepareBuffer(); channel.write(bufferToSend, callback); }

Target:
public void writeTo(AsyncWritableChannel channel, Callback<Long> callback) { prepareBuffer(); channel.write(bufferToSend, callback); }
Source:
public void registerContext(final VmwareContext context) { assert (context.getPool() == this); assert (context.getPoolKey() != null); synchronized (this) { Queue<VmwareContext> ctxList = _pool.get(context.getPoolKey()); if (ctxList == null) { ctxList = EvictingQueue.create(_maxIdleQueueLength); _pool.put(context.getPoolKey(), ctxList); } if (ctxList.size() > _maxIdleQueueLength) { final VmwareContext oldestContext = ctxList.remove(); if (oldestContext != null) { try { oldestContext.close(); } catch (Throwable t) { s_logger.error("Unexpected exception caught while trying to purge oldest VmwareContext", t); } } } context.clearStockObjects(); ctxList.add(context); if (s_logger.isTraceEnabled()) { s_logger.trace("Recycle VmwareContext into idle pool: " + context.getPoolKey() + ", current idle pool size: " + ctxList.size() + ", outstanding count: " + VmwareContext.getOutstandingContextCount()); } } }

Target:
public void registerContext(final VmwareContext context) { assert (context.getPool() == this); assert (context.getPoolKey() != null); final String poolKey = context.getPoolKey().intern(); synchronized (poolKey) { Queue<VmwareContext> ctxQueue = _pool.get(poolKey); if (ctxQueue == null) { ctxQueue = new ConcurrentLinkedQueue<>(); _pool.put(poolKey, ctxQueue); } if (ctxQueue.size() >= _maxIdleQueueLength) { final VmwareContext oldestContext = ctxQueue.remove(); if (oldestContext != null) { try { oldestContext.close(); } catch (Throwable t) { s_logger.error("Unexpected exception caught while trying to purge oldest VmwareContext", t); } } } context.clearStockObjects(); ctxQueue.add(context); if (s_logger.isTraceEnabled()) { s_logger.trace("Recycle VmwareContext into idle pool: " + context.getPoolKey() + ", current idle pool size: " + ctxQueue.size() + ", outstanding count: " + VmwareContext.getOutstandingContextCount()); } } }
Source:
public Optional<RGBValues> getFillColor() { RGBValues rgbValues = null; if (style instanceof NodeStyle) { rgbValues = new NodeStyleQuery((NodeStyle) style).getBackgroundColor().get(); } else if (style instanceof FlatContainerStyle) { rgbValues = ((FlatContainerStyle) style).getBackgroundColor(); } else if (style instanceof ShapeContainerStyle) { rgbValues = ((FlatContainerStyle) style).getBackgroundColor(); } return Optional.ofNullable(rgbValues); }

Target:
public Optional<RGBValues> getFillColor() { RGBValues rgbValues = null; if (style instanceof NodeStyle) { rgbValues = new NodeStyleQuery((NodeStyle) style).getBackgroundColor().get(); } else if (style instanceof FlatContainerStyle) { rgbValues = ((FlatContainerStyle) style).getBackgroundColor(); } else if (style instanceof ShapeContainerStyle) { rgbValues = ((ShapeContainerStyle) style).getBackgroundColor(); } return Optional.ofNullable(rgbValues); }
Source:
public final synchronized void putValue(@Nullable V value) { V cachedValue = this.value.get(); if (cachedValue == null || !cachedValue.equals(value)) { this.value = new SoftReference<>(value); expiresAt = System.nanoTime() + expiry; } }

Target:
public final synchronized void putValue(@Nullable V value) { this.value = new SoftReference<>(value); expiresAt = calcExpiresAt(); }
Source:
public void reset() { attempt = 0; currentSleepTime = baseRetryTimeoutMillis; }

Target:
public void reset() { attempt = 0; currentBackoffMillis = Math.min(maxBackoffMillis, initialBackoffMillis); }
Source:
public IgniteTestResources(IgniteConfiguration cfg) throws IgniteCheckedException { this.cfg = cfg; log = rootLog.getLogger(getClass()); jmx = prepareMBeanServer(); ctx = new GridTestKernalContext(log, this.cfg); rsrcProc = new GridResourceProcessor(ctx); }

Target:
public IgniteTestResources(IgniteConfiguration cfg) throws IgniteCheckedException { this.cfg = cfg; this.log = rootLog.getLogger(getClass()); this.jmx = prepareMBeanServer(); this.ctx = new GridTestKernalContext(log, this.cfg); this.rsrcProc = new GridResourceProcessor(ctx); }
Source:
void performComplete(BitmapHunter hunter) { if (shouldWriteToMemoryCache(hunter.getData().memoryPolicy)) { Result result = hunter.getResult(); if (result != null) { if (result instanceof Result.Bitmap) { Bitmap bitmap = ((Result.Bitmap) result).getBitmap(); cache.set(hunter.getKey(), bitmap); } } } hunterMap.remove(hunter.getKey()); deliver(hunter); }

Target:
void performComplete(BitmapHunter hunter) { if (shouldWriteToMemoryCache(hunter.data.memoryPolicy)) { Result result = hunter.getResult(); if (result != null) { if (result instanceof Result.Bitmap) { Bitmap bitmap = ((Result.Bitmap) result).getBitmap(); cache.set(hunter.getKey(), bitmap); } } } hunterMap.remove(hunter.getKey()); deliver(hunter); }
Source:
public static void addSortedParams(UriBuilder uriBuilder, DataMap params) { convertRawProjectionFieldsToMaskTree(params); Map<String, String> map = dataMapToQueryParams(params); addSortedParams(uriBuilder, map); }

Target:
public static void addSortedParams(UriBuilder uriBuilder, DataMap params) { Map<String, String> map = dataMapToQueryParams(params); addSortedParams(uriBuilder, map); }