auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public void send(final KafkaRecord record) { if (kafkaProducer.isPresent()) { try { final Future<RecordMetadata> future = kafkaProducer.get().send( new ProducerRecord<String, byte[]>(record.getKafkaTopic(), record.getKafkaData())); final RecordMetadata metadata = future.get(5, TimeUnit.SECONDS); log.debug("Sent an event to Kafka, meta: {}", metadata); } catch (ExecutionException | InterruptedException | TimeoutException e) { log.error("Unable to send an event to Kafka", e); } } else { log.debug("KafkaProducer isn't set. Not sending anything."); } }

Target:
public void send(final KafkaRecord record) { if (kafkaProducer.isPresent()) { try { final Future<RecordMetadata> future = kafkaProducer.get().send( new ProducerRecord<String, byte[]>(record.getKafkaTopic(), record.getKafkaData())); final RecordMetadata metadata = future.get(KAFKA_SEND_TIMEOUT, TimeUnit.SECONDS); log.debug("Sent an event to Kafka, meta: {}", metadata); } catch (ExecutionException | InterruptedException | TimeoutException e) { log.error("Unable to send an event to Kafka", e); } } else { log.debug("KafkaProducer isn't set. Not sending anything."); } }
Source:
private List<Artifact> parseArtifacts(String messagePayload, String messageId){ List<Artifact> artifacts = messageArtifactTranslator.parseArtifacts(messagePayload); if (artifacts == null) { log.debug("No artifacts were found for subscription: and messageId: {}", subscription.getName(), messageId); } else { artifacts.forEach( a -> a.setArtifactAccount(subscription.getAccountName())); log.debug( "Artifacts found for subscription: {}: {}", subscription.getName(), String.join(", ", artifacts.stream().map(Artifact::toString).collect(Collectors.toList())) ); } return artifacts; }

Target:
private List<Artifact> parseArtifacts(String messagePayload, String messageId){ List<Artifact> artifacts = messageArtifactTranslator.parseArtifacts(messagePayload); if (artifacts == null || artifacts.size() == 0) { log.debug("No artifacts were found for subscription: and messageId: {}", subscription.getName(), messageId); } else { log.debug( "Artifacts found for subscription: {}: {}", subscription.getName(), String.join(", ", artifacts.stream().map(Artifact::toString).collect(Collectors.toList())) ); } return artifacts; }
Source:
private ArrayList<String> getAllHarFiles(String harDirPath) { ArrayList<String> fileNamesList = new ArrayList<String>(); String fileName; File Folder = new File(harDirPath); File[] listOfFiles = Folder.listFiles(); for (int i = 0; i < listOfFiles.length; i++) { if (listOfFiles[i].isFile()) { fileName = listOfFiles[i].getName(); fileNamesList.add(fileName); } } return fileNamesList; }

Target:
private ArrayList<String> getAllHarFiles(String harDirPath) { ArrayList<String> fileNamesList = new ArrayList<String>(); File Folder = new File(harDirPath); File[] listOfFiles = Folder.listFiles(); for (File file : listOfFiles) { if (file.isFile()) { fileNamesList.add(file.getName()); } } return fileNamesList; }
Source:
public ModuleDeploymentProperties propertiesForDescriptor(ModuleDescriptor descriptor, Container container) { List<ModuleDescriptor> streamModules = stream.getDescriptorsAsList(); ModuleDeploymentProperties properties = propertiesForDescriptor(descriptor); int moduleIndex = descriptor.getIndex(); if (moduleIndex > 0) { ModuleDescriptor previous = streamModules.get(moduleIndex - 1); ModuleDeploymentProperties previousProperties = propertiesForDescriptor(previous); if (previousProperties.containsKey("producer.partitionKeyExpression")) { ModuleDescriptor.Key moduleKey = descriptor.createKey(); Integer index = mapModuleCount.get(moduleKey); if (index == null) { index = 0; } properties.put("consumer.partitionIndex", String.valueOf(index++)); mapModuleCount.put(moduleKey, index); } } if (properties.containsKey("producer.partitionKeyExpression")) { try { ModuleDeploymentProperties nextProperties = propertiesForDescriptor(streamModules.get(moduleIndex + 1)); String count = nextProperties.get("count"); Assert.hasText(count, String.format("'count' property is required " + "in properties for module '%s' in order to support partitioning", descriptor)); properties.put("producer.partitionCount", count); } catch (IndexOutOfBoundsException e) { logger.warn("Module '{}' is a sink module which contains a property " + "of '{}' used for data partitioning; this feature is only " + "supported for modules that produce data", descriptor, "producer.partitionKeyExpression"); } } mapDeploymentProperties.put(descriptor.createKey(), properties); return properties; }

Target:
public ModuleDeploymentProperties propertiesForDescriptor(ModuleDescriptor descriptor, Container container) { List<ModuleDescriptor> streamModules = stream.getDescriptorsAsList(); ModuleDeploymentProperties properties = propertiesForDescriptor(descriptor); int moduleIndex = descriptor.getIndex(); if (moduleIndex > 0) { ModuleDescriptor previous = streamModules.get(moduleIndex - 1); ModuleDeploymentProperties previousProperties = propertiesForDescriptor(previous); if (hasPartitionKeyProperty(previousProperties)) { ModuleDescriptor.Key moduleKey = descriptor.createKey(); Integer index = mapModuleCount.get(moduleKey); if (index == null) { index = 0; } properties.put("consumer.partitionIndex", String.valueOf(index++)); mapModuleCount.put(moduleKey, index); } } if (hasPartitionKeyProperty(properties)) { try { ModuleDeploymentProperties nextProperties = propertiesForDescriptor(streamModules.get(moduleIndex + 1)); String count = nextProperties.get("count"); validateCountProperty(count, descriptor); properties.put("producer.partitionCount", count); } catch (IndexOutOfBoundsException e) { logger.warn("Module '{}' is a sink module which contains a property " + "of '{}' used for data partitioning; this feature is only " + "supported for modules that produce data", descriptor, "producer.partitionKeyExpression"); } } mapDeploymentProperties.put(descriptor.createKey(), properties); return properties; }
Source:
public RecommendationList getRecommendations(String postUuid) throws ForumServiceException{ if(StringUtil.isNotEmpty(this.endpoint.getApiVersion())){ double apiVersion = Double.parseDouble(this.endpoint.getApiVersion()); if(APIVERSION > apiVersion ){ throw new UnsupportedOperationException("This API is only supported on connections 4.5 or above"); } } String recommendationsUrl = resolveUrl(ForumType.RECOMMENDATIONS, FilterType.ENTRIES); RecommendationList recommendations; Map<String, String> parameters = new HashMap<String, String>(); parameters.put(POST_UNIQUE_IDENTIFIER, postUuid); try { recommendations = (RecommendationList) getEntities(recommendationsUrl, parameters, new RecommendationsFeedHandler(this)); } catch (Exception e) { throw new ForumServiceException(e); } return recommendations; }

Target:
public RecommendationList getRecommendations(String postUuid) throws ForumServiceException{ if(StringUtil.isNotEmpty(this.endpoint.getApiVersion())){ double apiVersion = Double.parseDouble(this.endpoint.getApiVersion()); if(APIVERSION > apiVersion ){ UnsupportedOperationException ex = new UnsupportedOperationException("This API is only supported on connections 4.5 or above"); throw new ForumServiceException(ex); } } String recommendationsUrl = resolveUrl(ForumType.RECOMMENDATIONS, FilterType.ENTRIES); RecommendationList recommendations; Map<String, String> parameters = new HashMap<String, String>(); parameters.put(POST_UNIQUE_IDENTIFIER, postUuid); try { recommendations = (RecommendationList) getEntities(recommendationsUrl, parameters, new RecommendationsFeedHandler(this)); } catch (Exception e) { throw new ForumServiceException(e); } return recommendations; }
Source:
public TreeMap<String, String> getDefaultEnvVars() { TreeMap<String,String> envs = new TreeMap<>(); envs.put("MESOS_QUORUM", "1"); envs.put("MESOS_ZK", getFormattedZKAddress()); envs.put("MESOS_LOGGING_LEVEL", config.getLoggingLevel()); return envs; }

Target:
public TreeMap<String, String> getDefaultEnvVars() { TreeMap<String, String> envs = new TreeMap<>(); envs.put("MESOS_QUORUM", "1"); envs.put("MESOS_ZK", getFormattedZKAddress()); envs.put("MESOS_LOGGING_LEVEL", getLoggingLevel()); if (getCluster() != null) { envs.put("MESOS_CLUSTER", getCluster().getClusterName()); } return envs; }
Source:
private void getUnExternalizedStrings(IProject project, IProgressMonitor monitor) { PDEModelUtility.modifyModel(new ModelModification(project) { @Override protected void modifyModel(IBaseModel model, IProgressMonitor monitor) throws CoreException { if (model instanceof IBundlePluginModelBase) inspectManifest((IBundlePluginModelBase) model, monitor); if (monitor.isCanceled()) { fCanceled = true; return; } if (model instanceof IPluginModelBase) inspectXML((IPluginModelBase) model, monitor); if (monitor.isCanceled()) { fCanceled = true; return; } } }, monitor); monitor.done(); }

Target:
private void getUnExternalizedStrings(IProject project, IProgressMonitor monitor) { PDEModelUtility.modifyModel(new ModelModification(project) { @Override protected void modifyModel(IBaseModel model, IProgressMonitor monitor) throws CoreException { if (model instanceof IBundlePluginModelBase) inspectManifest((IBundlePluginModelBase) model, monitor); if (monitor.isCanceled()) { fCanceled = true; return; } if (model instanceof IPluginModelBase) inspectXML((IPluginModelBase) model, monitor); if (monitor.isCanceled()) { fCanceled = true; return; } } }, monitor); }
Source:
public void close() { synchronized (files) { if (closed) { return; } closed = true; for (File file : ImmutableSet.copyOf(files)) { delete(file); } if (files.size() > 0 && storageDirectory.exists() && !storageDirectory.delete()) { log.warn("Cannot delete storageDirectory: %s", storageDirectory); } files.clear(); } }

Target:
public void close() { synchronized (files) { if (closed) { return; } closed = true; for (File file : ImmutableSet.copyOf(files)) { delete(file); } files.clear(); if (createdStorageDirectory && storageDirectory.exists() && !storageDirectory.delete()) { log.warn("Cannot delete storageDirectory: %s", storageDirectory); } } }
Source:
private String getSearchImageUrl(final PostImage postImage) { return postImage.extension.matches("^webm$") ? postImage.thumbnailUrl : postImage.imageUrl; }

Target:
private String getSearchImageUrl(final PostImage postImage) { return postImage.type == PostImage.Type.MOVIE ? postImage.thumbnailUrl : postImage.imageUrl; }
Source:
protected List<Mutation> convert(String key, long seq, String value) { Mutation m = new Mutation(key); m.put("cf", "cq", seq, value); return Arrays.asList(m); }

Target:
protected List<Mutation> convert(String key, long seq, String value) { Mutation m = new Mutation(key); m.put("cf", "cq", seq, value); return Collections.singletonList(m); }
Source:
public void testDigits() { testingClient.server("passwordPolicy").run(session -> { RealmModel realmModel = session.getContext().getRealm(); PasswordPolicyManagerProvider policyManager = session.getProvider(PasswordPolicyManagerProvider.class); realmModel.setPasswordPolicy(PasswordPolicy.parse(session, DigitsPasswordPolicyProviderFactory.ID)); Assert.assertEquals("invalidPasswordMinDigitsMessage", policyManager.validate("jdoe", "abcd").getMessage()); Assert.assertArrayEquals(new Object[]{1}, policyManager.validate("jdoe", "abcd").getParameters()); assertNull(policyManager.validate("jdoe", "abcd1")); realmModel.setPasswordPolicy(PasswordPolicy.parse(session, "digits(2)")); Assert.assertEquals("invalidPasswordMinDigitsMessage", policyManager.validate("jdoe", "abcd1").getMessage()); Assert.assertArrayEquals(new Object[]{2}, policyManager.validate("jdoe", "abcd1").getParameters()); assertNull(policyManager.validate("jdoe", "abcd12")); }); }

Target:
public void testDigits() { testingClient.server("passwordPolicy").run(session -> { RealmModel realmModel = session.getContext().getRealm(); PasswordPolicyManagerProvider policyManager = session.getProvider(PasswordPolicyManagerProvider.class); realmModel.setPasswordPolicy(PasswordPolicy.parse(session, "digits")); Assert.assertEquals("invalidPasswordMinDigitsMessage", policyManager.validate("jdoe", "abcd").getMessage()); Assert.assertArrayEquals(new Object[]{1}, policyManager.validate("jdoe", "abcd").getParameters()); assertNull(policyManager.validate("jdoe", "abcd1")); realmModel.setPasswordPolicy(PasswordPolicy.parse(session, "digits(2)")); Assert.assertEquals("invalidPasswordMinDigitsMessage", policyManager.validate("jdoe", "abcd1").getMessage()); Assert.assertArrayEquals(new Object[]{2}, policyManager.validate("jdoe", "abcd1").getParameters()); assertNull(policyManager.validate("jdoe", "abcd12")); }); }
Source:
public boolean apply(Game game, Ability source) { for (UUID playerId : game.getOpponents(source.getControllerId())) { Player opponent = game.getPlayer(playerId); if (opponent == null) { continue; } opponent.damage(2, source.getSourceId(), game); opponent.discard(2, true, source, game); } return true; }

Target:
public boolean apply(Game game, Ability source) { List<Player> opponents = game .getOpponents(source.getControllerId()) .stream().map(game::getPlayer) .filter(Objects::nonNull) .collect(Collectors.toList()); for (Player opponent : opponents) { opponent.damage(2, source.getSourceId(), game); } for (Player opponent : opponents) { opponent.discard(2, true, source, game); } return true; }
Source:
protected Optional<? extends D> getDispatcher(C messageClass) { Set<D> dispatchers = getDispatchers(messageClass); if (dispatchers.isEmpty()) { return Optional.empty(); } int size = dispatchers.size(); checkState(size == 1, "More than one (%s) dispatchers found for the message class `%s`.", size, messageClass); D result = dispatchers.stream() .findFirst() .get(); return Optional.of(result); }

Target:
protected Optional<? extends D> getDispatcher(C messageClass) { Set<D> dispatchers = getDispatchers(messageClass); if (dispatchers.isEmpty()) { return Optional.empty(); } int size = dispatchers.size(); checkState(size == 1, "More than one (%s) dispatchers found for the message class `%s`.", size, messageClass); Optional<? extends D> result = dispatchers.stream() .findFirst(); return result; }
Source:
public void serializationRoundTripTest() throws Exception { final Event event = Event.create("create", "foo", "nginx", Event.Type.CONTAINER, "create", Event.Actor.create("bar", ImmutableMap.of("image", "nginx", "name", "docker-nginx")), new Date(1487356000), 100L); final ObjectMapperProvider omp = new ObjectMapperProvider(); final ObjectMapper mapper = omp.getContext(Event.class); final String json = mapper.writerWithView(Event.class).writeValueAsString(event); final Event event2 = mapper.getFactory().createParser(json).readValueAs(Event.class); assertThat(event, equalTo(event2)); }

Target:
public void serializationRoundTripTest() throws Exception { final Event event = Event.create("create", "foo", "nginx", Event.Type.CONTAINER, "create", Event.Actor.create("bar", ImmutableMap.of("image", "nginx", "name", "docker-nginx")), new Date(1487356000), 100L); final ObjectMapper mapper = ObjectMapperProvider.objectMapper(); final String json = mapper.writeValueAsString(event); final Event event2 = mapper.readValue(json, Event.class); assertThat(event, equalTo(event2)); }
Source:
@Test public void legacy() throws Exception { assumeFalse("Symlinks don't work well on Windows", Functions.isWindows()); write("2014-01-02_03-04-05/build.xml", "<?xml version='1.1' encoding='UTF-8'?>\n<run>\n <stuff>ok</stuff>\n <number>99</number>\n <otherstuff>ok</otherstuff>\n</run>"); link("99", "2014-01-02_03-04-05"); link("lastFailedBuild", "-1"); link("lastSuccessfulBuild", "99"); assertEquals("{2014-01-02_03-04-05={build.xml='<?xml version='1.1' encoding='UTF-8'?>\n<run>\n <stuff>ok</stuff>\n <number>99</number>\n <otherstuff>ok</otherstuff>\n</run>'}, 99=→2014-01-02_03-04-05, lastFailedBuild=→-1, lastSuccessfulBuild=→99}", summarize()); assertTrue(migrator.migrate(dir, null)); assertEquals("{99={build.xml='<?xml version='1.1' encoding='UTF-8'?>\n<run>\n <stuff>ok</stuff>\n <id>2014-01-02_03-04-05</id>\n <timestamp>1388649845000</timestamp>\n <otherstuff>ok</otherstuff>\n</run>'}, lastFailedBuild=→-1, lastSuccessfulBuild=→99, legacyIds='2014-01-02_03-04-05 99\n'}", summarize()); assertEquals(99, migrator.findNumber("2014-01-02_03-04-05")); migrator = new RunIdMigrator(); assertFalse(migrator.migrate(dir, null)); assertEquals(99, migrator.findNumber("2014-01-02_03-04-05")); migrator.delete(dir, "2014-01-02_03-04-05"); FileUtils.deleteDirectory(new File(dir, "99")); new File(dir, "lastSuccessfulBuild").delete(); assertEquals("{lastFailedBuild=→-1, legacyIds=''}", summarize()); }

Target:
@Test public void legacy() throws Exception { assumeFalse("Symlinks don't work well on Windows", Functions.isWindows()); write("2014-01-02_03-04-05/build.xml", "<?xml version='1.0' encoding='UTF-8'?>\n<run>\n <stuff>ok</stuff>\n <number>99</number>\n <otherstuff>ok</otherstuff>\n</run>"); link("99", "2014-01-02_03-04-05"); link("lastFailedBuild", "-1"); link("lastSuccessfulBuild", "99"); assertEquals("{2014-01-02_03-04-05={build.xml='<?xml version='1.0' encoding='UTF-8'?>\n<run>\n <stuff>ok</stuff>\n <number>99</number>\n <otherstuff>ok</otherstuff>\n</run>'}, 99=→2014-01-02_03-04-05, lastFailedBuild=→-1, lastSuccessfulBuild=→99}", summarize()); assertTrue(migrator.migrate(dir, null)); assertEquals("{99={build.xml='<?xml version='1.0' encoding='UTF-8'?>\n<run>\n <stuff>ok</stuff>\n <id>2014-01-02_03-04-05</id>\n <timestamp>1388649845000</timestamp>\n <otherstuff>ok</otherstuff>\n</run>'}, lastFailedBuild=→-1, lastSuccessfulBuild=→99, legacyIds='2014-01-02_03-04-05 99\n'}", summarize()); assertEquals(99, migrator.findNumber("2014-01-02_03-04-05")); migrator = new RunIdMigrator(); assertFalse(migrator.migrate(dir, null)); assertEquals(99, migrator.findNumber("2014-01-02_03-04-05")); migrator.delete(dir, "2014-01-02_03-04-05"); FileUtils.deleteDirectory(new File(dir, "99")); new File(dir, "lastSuccessfulBuild").delete(); assertEquals("{lastFailedBuild=→-1, legacyIds=''}", summarize()); }
Source:
void submitSavingsAccount() { SavingsPayload savingsPayload = new SavingsPayload(); savingsPayload.setExternalId(et_client_external_id.getEditableText().toString()); savingsPayload.setLocale("en"); savingsPayload.setSubmittedOnDate(submission_date); savingsPayload.setDateFormat("dd MMMM yyyy"); if (clientId != 0) { savingsPayload.setClientId(clientId); } if (groupId != 0) { savingsPayload.setGroupId(groupId); } savingsPayload.setProductId(productId); savingsPayload.setNominalAnnualInterestRate(et_nominal_annual.getEditableText() .toString()); savingsPayload.setInterestCompoundingPeriodType(interestCompoundingPeriodTypeId); savingsPayload.setInterestPostingPeriodType(interestPostingPeriodTypeId); savingsPayload.setInterestCalculationType(interestCalculationTypeAdapterId); savingsPayload.getInterestCalculationDaysInYearType(); mSavingsAccountPresenter.createSavingsAccount(savingsPayload); }

Target:
void submitSavingsAccount() { SavingsPayload savingsPayload = new SavingsPayload(); savingsPayload.setExternalId(et_client_external_id.getEditableText().toString()); savingsPayload.setLocale("en"); savingsPayload.setSubmittedOnDate(submission_date); savingsPayload.setDateFormat("dd MMMM yyyy"); if (isGroupAccount) { savingsPayload.setGroupId(groupId); } else { savingsPayload.setClientId(clientId); } savingsPayload.setProductId(productId); savingsPayload.setNominalAnnualInterestRate(et_nominal_annual.getEditableText() .toString()); savingsPayload.setInterestCompoundingPeriodType(interestCompoundingPeriodTypeId); savingsPayload.setInterestPostingPeriodType(interestPostingPeriodTypeId); savingsPayload.setInterestCalculationType(interestCalculationTypeAdapterId); savingsPayload.getInterestCalculationDaysInYearType(); mSavingsAccountPresenter.createSavingsAccount(savingsPayload); }
Source:
public void testIsNullOrBlankEmpty() throws IllegalArgumentException, IllegalAccessException, InvocationTargetException, ClassNotFoundException, NoSuchMethodException, InstantiationException { assertTrue("empty", StringExtensions.isNullOrBlank("")); assertTrue("empty", StringExtensions.isNullOrBlank(" ")); assertTrue("empty", StringExtensions.isNullOrBlank(" ")); }

Target:
public void testIsNullOrBlankEmpty() throws IllegalArgumentException, IllegalAccessException, InvocationTargetException, ClassNotFoundException, NoSuchMethodException, InstantiationException { assertTrue("empty", StringExtensions.isNullOrBlank("")); assertTrue("empty", StringExtensions.isNullOrBlank(" ")); }
Source:
public void refresh() { boolean releaseLock = true; if (lockManager.acquireLock(monitoringLock).getFirst()) { try { setIsSetNonOperationalExecuted(false); synchronized (this) { refreshCachedVds(); if (cachedVds == null) { log.error("VdsManager::refreshVdsRunTimeInfo - onTimer is NULL for '{}'", getVdsId()); return; } try { updateIteration(); if (isMonitoringNeeded()) { setStartTime(); releaseLock = false; hostMonitoring = new HostMonitoring(this, cachedVds, monitoringStrategy, resourceManager, dbFacade, auditLogDirector); hostMonitoring.refresh(); unrespondedAttempts.set(0); setLastUpdate(); afterRefreshTreatment(); } } catch (VDSNetworkException e) { logNetworkException(e); } catch (VDSRecoveringException ex) { handleVdsRecoveringException(ex); } catch (RuntimeException ex) { logFailureMessage(ex); } } } catch (Throwable e) { releaseLock = true; log.error("Timer update runtime info failed. Exception:", ExceptionUtils.getRootCauseMessage(e)); log.debug("Exception:", e); } finally { if (releaseLock) { lockManager.releaseLock(monitoringLock); } } } }

Target:
public void refresh() { boolean releaseLock = true; if (lockManager.acquireLock(monitoringLock).getFirst()) { try { setIsSetNonOperationalExecuted(false); synchronized (this) { refreshCachedVds(); if (cachedVds == null) { log.error("VdsManager::refreshVdsRunTimeInfo - onTimer is NULL for '{}'", getVdsId()); return; } try { updateIteration(); if (isMonitoringNeeded()) { setStartTime(); releaseLock = false; hostMonitoring = new HostMonitoring(this, cachedVds, monitoringStrategy, resourceManager, dbFacade, auditLogDirector); hostMonitoring.refresh(); } } catch (VDSNetworkException e) { logNetworkException(e); releaseLock = true; } catch (VDSRecoveringException ex) { handleVdsRecoveringException(ex); releaseLock = true; } catch (RuntimeException ex) { logFailureMessage(ex); releaseLock = true; } } } catch (Throwable e) { releaseLock = true; log.error("Timer update runtime info failed. Exception:", ExceptionUtils.getRootCauseMessage(e)); log.debug("Exception:", e); } finally { if (releaseLock) { lockManager.releaseLock(monitoringLock); } } } }
Source:
public synchronized void onPackageAdded(String packageName) { final PackageInfo app; try { app = mPackageManager.getPackageInfo(packageName, GET_PERMISSIONS); } catch (NameNotFoundException e) { Slog.wtf(TAG, "NameNotFoundException " + packageName); return; } int uid = app.applicationInfo != null ? app.applicationInfo.uid : INVALID_UID; if (uid == INVALID_UID) { return; } processPackagePermissions(uid, Arrays.asList(app.requestedPermissions)); mPackageNameUidMap.put(packageName, uid); }

Target:
public void onPackageAdded(String packageName) { final PackageInfo app; try { app = mPackageManager.getPackageInfo(packageName, GET_PERMISSIONS); } catch (NameNotFoundException e) { Slog.wtf(TAG, "NameNotFoundException " + packageName); return; } int uid = app.applicationInfo != null ? app.applicationInfo.uid : INVALID_UID; if (uid == INVALID_UID) { return; } processPackagePermissions(uid, Arrays.asList(app.requestedPermissions)); synchronized (mPackageNameUidMap) { mPackageNameUidMap.put(packageName, uid); } }
Source:
public static TLSSocketChannel create( ByteChannel channel, Logger logger, SSLEngine sslEngine ) throws IOException { TLSSocketChannel tlsChannel = new TLSSocketChannel( channel, logger, sslEngine ); try { tlsChannel.runHandshake(); } catch ( SSLHandshakeException e ) { throw new ClientException( "Failed to establish secured connection with the server: " + e.getMessage(), e.getCause() ); } return tlsChannel; }

Target:
public static TLSSocketChannel create( ByteChannel channel, Logger logger, SSLEngine sslEngine ) throws IOException { TLSSocketChannel tlsChannel = new TLSSocketChannel( channel, logger, sslEngine ); try { tlsChannel.runHandshake(); } catch ( SSLHandshakeException e ) { throw new ClientException( "Failed to establish secured connection with the server: " + e.getMessage(), e ); } return tlsChannel; }
Source:
public HaplotypeProbabilities deepCopy() { return new HaplotypeProbabilitiesFromContaminatorSequence(this); }

Target:
public HaplotypeProbabilitiesFromContaminatorSequence deepCopy() { return new HaplotypeProbabilitiesFromContaminatorSequence(this); }
Source:
protected RestRequest convertRequest() throws Exception { HttpServletRequest req = getRequest(); log.warning(req.getPathInfo()); RestRequest restRequest = new WebFormRequest(); restRequest.populateFromHttpRequest(req); return restRequest; }

Target:
protected RestRequest convertRequest() throws Exception { HttpServletRequest req = getRequest(); RestRequest restRequest = new WebFormRequest(); restRequest.populateFromHttpRequest(req); return restRequest; }
Source:
public int compareValueTo( ZonedDateTimeSchemaKey other ) { int compare = Long.compare( epochSecondUTC, other.epochSecondUTC ); if ( compare == 0 ) { compare = Integer.compare( nanoOfSecond, other.nanoOfSecond ); if ( compare == 0 && TimeZones.validZoneOffset( zoneOffsetMinutes * 60 ) && TimeZones.validZoneOffset( other.zoneOffsetMinutes * 60 ) ) { compare = Values.COMPARATOR.compare( asValue(), other.asValue() ); } } return compare; }

Target:
public int compareValueTo( ZonedDateTimeSchemaKey other ) { int compare = Long.compare( epochSecondUTC, other.epochSecondUTC ); if ( compare == 0 ) { compare = Integer.compare( nanoOfSecond, other.nanoOfSecond ); if ( compare == 0 && TimeZones.validZoneOffset( zoneOffsetSeconds ) && TimeZones.validZoneOffset( other.zoneOffsetSeconds ) ) { compare = Values.COMPARATOR.compare( asValue(), other.asValue() ); } } return compare; }
Source:
private static void addVariableAttributesHeaders(ValueTable table, Collection<String> headers) { for(Variable variable : table.getVariables()) { for(Attribute attribute : variable.getAttributes()) { String header = attribute.getName(); if (attribute.hasNamespace()) { header = attribute.getNamespace() + "::" + header; } if(attribute.isLocalised()) { header += ":" + attribute.getLocale(); } if(!headers.contains(header)) { headers.add(header); } } } }

Target:
private static void addVariableAttributesHeaders(ValueTable table, Collection<String> headers) { for(Variable variable : table.getVariables()) { for(Attribute attribute : variable.getAttributes()) { String header = (attribute.hasNamespace() ? attribute.getNamespace() + "::" : "") + attribute.getName(); if(attribute.isLocalised()) { header += ":" + attribute.getLocale(); } if(!headers.contains(header)) { headers.add(header); } } } }
Source:
public PremisEventObject createPremisEvent(PID eventPid, Model model) throws FedoraException { try (FcrepoResponse response = getClient().put(eventPid.getRepositoryUri()) .body(RDFModelUtil.streamModel(model), "text/turtle") .perform()) { return new PremisEventObject(PIDs.get(response.getLocation()), this, repositoryObjectDataLoader); } catch (IOException e) { throw new FedoraException("Unable to create premis event for " + eventPid, e); } catch (FcrepoOperationFailedException e) { throw ClientFaultResolver.resolve(e); } }

Target:
public PremisEventObject createPremisEvent(PID eventPid, Model model) throws FedoraException { try (FcrepoResponse response = getClient().put(eventPid.getRepositoryUri()) .body(RDFModelUtil.streamModel(model), TURTLE_MIMETYPE) .perform()) { return new PremisEventObject(PIDs.get(response.getLocation()), this, repositoryObjectDataLoader); } catch (IOException e) { throw new FedoraException("Unable to create premis event for " + eventPid, e); } catch (FcrepoOperationFailedException e) { throw ClientFaultResolver.resolve(e); } }
Source:
public void addResults(QueryStatusInfo statusInfo, QueryData data) { if (types.get() == null && statusInfo.getColumns() != null) { types.set(getTypes(statusInfo.getColumns())); } if (data.getData() != null) { checkState(types.get() != null, "Data without types received!"); List<Column> columns = statusInfo.getColumns(); for (List<Object> fields : data.getData()) { try { XContentBuilder dataBuilder = jsonBuilder().startObject(); for (int i = 0; i < fields.size(); i++) { Type type = types.get().get(i); Object value = convertValue(fields.get(i), type); dataBuilder.field(columns.get(i).getName(), value); } dataBuilder.endObject(); client.prepareIndex(tableName, "doc").setSource(dataBuilder.string(), JSON).get(); } catch (IOException e) { throw new RuntimeException("Failure loading data into Elasticsearch index: " + tableName, e); } } } }

Target:
public void addResults(QueryStatusInfo statusInfo, QueryData data) { if (types.get() == null && statusInfo.getColumns() != null) { types.set(getTypes(statusInfo.getColumns())); } if (data.getData() != null) { checkState(types.get() != null, "Type information is missing"); List<Column> columns = statusInfo.getColumns(); for (List<Object> fields : data.getData()) { try { XContentBuilder dataBuilder = jsonBuilder().startObject(); for (int i = 0; i < fields.size(); i++) { Type type = types.get().get(i); Object value = convertValue(fields.get(i), type); dataBuilder.field(columns.get(i).getName(), value); } dataBuilder.endObject(); client.prepareIndex(tableName, "doc").setSource(dataBuilder.string(), JSON).get(); } catch (IOException e) { throw new UncheckedIOException("Failure loading data into Elasticsearch index: " + tableName, e); } } } }
Source:
public void serverShutDown() throws Exception { CarbonCommandToolsUtil.serverShutdown(1,context); }

Target:
public void serverShutDown() throws CarbonToolsIntegrationTestException { CarbonCommandToolsUtil.serverShutdown(portOffset, automationContext); }
Source:
public void setup() { view.init(this); if (userCanCreateProjects()) { addProjectButtonPresenter.addOtherActions(this.translationService.getTranslation("TrySamples"), () -> trySamples()); addProjectButtonPresenter.addOtherActions(this.translationService.getTranslation("ImportProject"), () -> importProject()); view.addAction(addProjectButtonPresenter.getView().getElement()); } libraryService.call((RemoteCallback<LibraryInfo>) this::setupLibrary) .getLibraryInfo(getOrganizationalUnit()); }

Target:
public void setup() { view.init(this); if (userCanCreateProjects()) { addProjectButtonPresenter.enableTrySamples(); addProjectButtonPresenter.enableImportProject(); view.addAction(addProjectButtonPresenter.getView().getElement()); } libraryService.call((RemoteCallback<LibraryInfo>) this::setupLibrary) .getLibraryInfo(getOrganizationalUnit()); }
Source:
private void reportToServerIfNeeded(String tokenString){ if (isReporting){ return; } boolean needToResport = false; long currentTime = new Date().getTime(); if (recorderTempFile.exists()){ needToResport = true; } else if ((recorderFile.length() > config.uploadThreshold) && (lastReportTime == 0 || (currentTime - lastReportTime) > config.interval * 60)){ boolean isSuccess = recorderFile.renameTo(recorderTempFile); if (isSuccess) { needToResport = true; } } if (needToResport && !this.isReporting){ reportToServer(tokenString); } }

Target:
private void reportToServerIfNeeded(String tokenString){ if (isReporting){ return; } boolean needToReport = false; long currentTime = new Date().getTime(); if (recorderTempFile.exists()){ needToReport = true; } else if ((recorderFile.length() > config.uploadThreshold) && (lastReportTime == 0 || (currentTime - lastReportTime) > config.interval * 60)){ boolean isSuccess = recorderFile.renameTo(recorderTempFile); if (isSuccess) { needToReport = true; } } if (needToReport && !this.isReporting){ reportToServer(tokenString); } }
Source:
public void shouldRemoveNonExistingElements() { assertThat(this.<Integer> empty().reject(i -> i == 0)).isSameAs(empty()); assertThat(of(1, 2, 3).reject(i -> i != 0)).isSameAs(empty()); }

Target:
public void shouldRemoveNonExistingElements() { assertThat(this.<Integer> empty().removeAll(i -> i == 0)).isSameAs(empty()); assertThat(of(1, 2, 3).removeAll(i -> i != 0)).isSameAs(empty()); }
Source:
private void writeTable(AutoConfiguration autoConfigurationClasses) throws IOException { this.outputDir.mkdirs(); try (PrintWriter writer = new PrintWriter( new FileWriter(new File(this.outputDir, autoConfigurationClasses.module + ".adoc")))) { writer.println("[cols=\"4,1\"]"); writer.println("|==="); writer.println("| Configuration Class | Links"); for (AutoConfigurationClass autoConfigurationClass : autoConfigurationClasses.classes) { writer.println(); writer.printf("| {spring-boot-code}/spring-boot-project/%s/src/main/java/%s.java[`%s`]%n", autoConfigurationClasses.module, autoConfigurationClass.path, autoConfigurationClass.name); writer.printf("| {spring-boot-api}%s.html[javadoc]%n", autoConfigurationClass.path); } writer.println("|==="); } }

Target:
private void writeTable(AutoConfiguration autoConfigurationClasses) throws IOException { this.outputDir.mkdirs(); try (PrintWriter writer = new PrintWriter( new FileWriter(new File(this.outputDir, autoConfigurationClasses.module + ".adoc")))) { writer.println("[cols=\"4,1\"]"); writer.println("|==="); writer.println("| Configuration Class | Links"); for (AutoConfigurationClass autoConfigurationClass : autoConfigurationClasses.classes) { writer.println(); writer.printf("| {spring-boot-code}/spring-boot-project/%s/src/main/java/%s.java[`%s`]%n", autoConfigurationClasses.module, autoConfigurationClass.path, autoConfigurationClass.name); writer.printf("| {spring-boot-api}/%s.html[javadoc]%n", autoConfigurationClass.path); } writer.println("|==="); } }
Source:
private boolean isDeleteAllowedByTool() { final EObject semanticContainer = ((DSemanticDecorator) diagramElement).getTarget(); final EObject viewContainer = diagramElement.eContainer(); boolean delete = true; if (tool.getPrecondition() != null && !StringUtil.isEmpty(tool.getPrecondition().trim())) { delete = false; final IInterpreter interpreter = InterpreterUtil.getInterpreter(diagramElement); interpreter.setVariable(IInterpreterSiriusVariables.CONTAINER_VIEW, viewContainer); interpreter.setVariable(IInterpreterSiriusVariables.VIEW, diagramElement); interpreter.setVariable(IInterpreterSiriusVariables.ELEMENT, semanticContainer); try { delete = false; delete = interpreter.evaluateBoolean(semanticContainer, tool.getPrecondition()); } catch (final EvaluationException e) { RuntimeLoggerManager.INSTANCE.error(tool, ToolPackage.eINSTANCE.getAbstractToolDescription_Precondition(), e); } interpreter.unSetVariable(IInterpreterSiriusVariables.CONTAINER_VIEW); interpreter.unSetVariable(IInterpreterSiriusVariables.VIEW); interpreter.unSetVariable(IInterpreterSiriusVariables.ELEMENT); } return delete; }

Target:
private boolean isDeleteAllowedByTool() { final EObject semanticContainer = ((DSemanticDecorator) diagramElement).getTarget(); final EObject viewContainer = diagramElement.eContainer(); boolean delete = true; if (tool.getPrecondition() != null && !StringUtil.isEmpty(tool.getPrecondition().trim())) { delete = false; final IInterpreter interpreter = InterpreterUtil.getInterpreter(diagramElement); interpreter.setVariable(IInterpreterSiriusVariables.CONTAINER_VIEW, viewContainer); interpreter.setVariable(IInterpreterSiriusVariables.VIEW, diagramElement); interpreter.setVariable(IInterpreterSiriusVariables.ELEMENT, semanticContainer); try { delete = interpreter.evaluateBoolean(semanticContainer, tool.getPrecondition()); } catch (final EvaluationException e) { RuntimeLoggerManager.INSTANCE.error(tool, ToolPackage.eINSTANCE.getAbstractToolDescription_Precondition(), e); } interpreter.unSetVariable(IInterpreterSiriusVariables.CONTAINER_VIEW); interpreter.unSetVariable(IInterpreterSiriusVariables.VIEW); interpreter.unSetVariable(IInterpreterSiriusVariables.ELEMENT); } return delete; }
Source:
public static Method[] excludingMain(Class<?> clazz) { Method[] declaredMethods = clazz.getDeclaredMethods(); List<Method> pruned = new LinkedList<>(); for (Method declaredMethod :declaredMethods) { if ("main".equals(declaredMethod.getName()) && isStaticVoid(declaredMethod) && acceptsStringArray(declaredMethod)) { continue; } pruned.add(declaredMethod); } return pruned.toArray(new Method[0]); }

Target:
public static Method[] excludingMain(Class<?> clazz) { Method[] declaredMethods = clazz.getDeclaredMethods(); List<Method> pruned = new LinkedList<>(); for (Method declaredMethod :declaredMethods) { if ("main".equals(declaredMethod.getName()) && isStaticVoid(declaredMethod) && acceptsStringArray(declaredMethod)) { continue; } pruned.add(declaredMethod); } return pruned.toArray(new Method[pruned.size()]); }
Source:
private void exportDevResElements(String elementType) { NodeList l1 = docel.getElementsByTagName(elementType); for (int i = 0; i < l1.getLength(); i++) { org.w3c.dom.Node node = l1.item(i); if (node instanceof Element) { Element el = (Element) node; pwCPP.println(" m_roObjectHandler.addFB(CTypeLib::createFB(g_nStringId" + el.getAttribute("Name") + ", g_nStringId" + el.getAttribute("Type") + ", this));"); NodeList childs = el.getChildNodes(); for (int j = 0; j < childs.getLength(); j++) { org.w3c.dom.Node childnode = childs.item(j); if (childnode instanceof Element) { Element childel = (Element) childnode; pwCPP.println(MessageFormat.format( " m_roObjectHandler.getFB(g_nStringId{0})->getDataInput(g_nStringId{1})->fromString(\"{2}\");", el.getAttribute("Name"), childel.getAttribute("Name"), childel.getAttribute("Value"))); } } } } }

Target:
private void exportDevResElements(String elementType) { NodeList l1 = docel.getElementsByTagName(elementType); for (int i = 0; i < l1.getLength(); i++) { org.w3c.dom.Node node = l1.item(i); if (node instanceof Element) { Element el = (Element) node; pwCPP.println(" m_roObjectHandler.addFB(CTypeLib::createFB(g_nStringId" + el.getAttribute("Name") + ", g_nStringId" + el.getAttribute("Type") + ", this));"); NodeList childs = el.getChildNodes(); for (int j = 0; j < childs.getLength(); j++) { org.w3c.dom.Node childnode = childs.item(j); if (childnode instanceof Element) { Element childElem = (Element) childnode; pwCPP.println(MessageFormat.format( " m_roObjectHandler.getFB(g_nStringId{0})->getDataInput(g_nStringId{1})->fromString(\"{2}\");", el.getAttribute("Name"), childElem.getAttribute("Name"), childElem.getAttribute("Value"))); } } } } }
Source:
public void getAttribute_shouldReturnNullIfAttributeNameIsVoided() throws Exception { Person person = personHelper(true, 1, 2, 3, "name1", "name2", "name3", "value1", "value2", "value3"); Assert.assertEquals(null, person.getAttribute("name3")); }

Target:
public void getAttribute_shouldReturnNullIfAttributeNameIsVoided() throws Exception { Person person = personHelper(true, 1, 2, 3, "name1", "name2", "name3", "value1", "value2", "value3"); Assert.assertNull(person.getAttribute("name3")); }
Source:
public DocumentModel run(DocumentModel input) { input.addFacet(facet); session.saveDocument(input); return input; }

Target:
public DocumentModel run(DocumentModel input) { input.addFacet(facet); input = session.saveDocument(input); return input; }
Source:
public Set<String> getIgnoredFields() { Set<String> ignoredFields = new HashSet<>(); if (excludedFields.isEmpty() && !includedFields.isEmpty()) { for (String name: actualFields) { if (!includedFields.contains(name)) { ignoredFields.add(name); } } return Collections.unmodifiableSet(ignoredFields); } return Collections.unmodifiableSet(excludedFields); }

Target:
public Set<String> getIgnoredFields() { return Collections.unmodifiableSet(includedFields.isEmpty() ? excludedFields : invertIncludedFields()); }
Source:
public <T> ServiceBuilder<T> register(ServiceBuilder<T> builder) { if (this.transactionDependency != null) { this.transactionDependency.register(builder); } if (this.tsrServiceName != null) { this.tsrSupplier = builder.requires(this.tsrServiceName); } return super.register(builder); }

Target:
public <T> ServiceBuilder<T> register(ServiceBuilder<T> builder) { new CompositeDependency(this.transactionDependency, this.tsrDependency).register(builder); return super.register(builder); }
Source:
protected void createFullHistory(String id, ITmfStateProvider provider, File htFile) throws TmfTraceException { if (htFile.exists()) { final int version = provider.getVersion(); try { IStateHistoryBackend backend = StateHistoryBackendFactory.createHistoryTreeBackendExistingFile( id, htFile, version); fHtBackend = backend; fStateSystem = StateSystemFactory.newStateSystem(backend, false); fInitialized.countDown(); return; } catch (IOException e) { } } final int QUEUE_SIZE = 10000; try { IStateHistoryBackend backend = StateHistoryBackendFactory.createHistoryTreeBackendNewFile( id, htFile, provider.getVersion(), provider.getStartTime(), QUEUE_SIZE); fHtBackend = backend; fStateSystem = StateSystemFactory.newStateSystem(backend); provider.assignTargetStateSystem(fStateSystem); build(provider); } catch (IOException e) { throw new TmfTraceException(e.toString(), e); } }

Target:
private void createFullHistory(String id, ITmfStateProvider provider, File htFile) throws TmfTraceException { if (htFile.exists()) { final int version = provider.getVersion(); try { IStateHistoryBackend backend = StateHistoryBackendFactory.createHistoryTreeBackendExistingFile( id, htFile, version); fHtBackend = backend; fStateSystem = StateSystemFactory.newStateSystem(backend, false); fInitialized.countDown(); return; } catch (IOException e) { } } final int QUEUE_SIZE = 10000; try { IStateHistoryBackend backend = StateHistoryBackendFactory.createHistoryTreeBackendNewFile( id, htFile, provider.getVersion(), provider.getStartTime(), QUEUE_SIZE); fHtBackend = backend; fStateSystem = StateSystemFactory.newStateSystem(backend); provider.assignTargetStateSystem(fStateSystem); build(provider); } catch (IOException e) { throw new TmfTraceException(e.toString(), e); } }
Source:
public void forward_fromSetParameters_withoutBeforeEnterObserver() { ForwardSetParameterView.clear(); setNavigationTargets(ForwardSetParameterView.class, ForwardSetParameterBackView.class); navigate("forward/setParameter/test"); Assert.assertEquals( "afterNavigation must not be invoked after forwardTo in setParameter", false, ForwardSetParameterView.afterNavigationInvocked); Assert.assertEquals("forwardTo ForwardSetParameterBackView failed", true, ForwardSetParameterView.backBeforeEnterInvoked); }

Target:
public void forward_fromSetParameters_withoutBeforeEnterObserver() { ForwardSetParameterView.clear(); setNavigationTargets(ForwardSetParameterView.class, ForwardSetParameterBackView.class); navigate("forward/setParameter/test"); Assert.assertFalse( "afterNavigation must not be invoked after forwardTo in setParameter", ForwardSetParameterView.afterNavigationInvoked); Assert.assertTrue("forwardTo ForwardSetParameterBackView failed", ForwardSetParameterView.backBeforeEnterInvoked); }
Source:
public boolean parseUpdates() { synchronized (m_updates) { if (m_updates.booleanValue()) { m_updates = false; return true; } } return false; }

Target:
public boolean parseUpdates() { if (m_updates.get()) { m_updates.set(false); return true; } return false; }
Source:
private boolean isSniEnabled() { return sniDomains.keySet().size() > 0; }

Target:
private boolean isSniEnabled() { return !sniDomains.isEmpty(); }
Source:
public void enableSSL() throws Exception { if (m_sslPropsFile == null) { m_sslContext = null; return; } File configFile = new File(m_sslPropsFile); InputStreamReader configIsr; try { FileInputStream configFis = new FileInputStream(configFile); configIsr = new InputStreamReader(configFis); } catch (FileNotFoundException e) { throw new IllegalArgumentException("Can't read ssl config file " + m_sslPropsFile); } String keyStorePath = null; String keyStorePassword = null; String trustStorePath = null; String trustStorePassword = null; try (BufferedReader br = new BufferedReader(configIsr)) { String configLine; while ((configLine = br.readLine()) != null) { configLine.trim(); if (configLine.startsWith(SSLConfiguration.KEYSTORE_PASSWORD_CONFIG_PROP)) { keyStorePassword = SSLConfiguration.parseValue(configLine, SSLConfiguration.KEYSTORE_PASSWORD_CONFIG_PROP); } else if (configLine.startsWith(SSLConfiguration.KEYSTORE_CONFIG_PROP)) { keyStorePath = SSLConfiguration.parseValue(configLine, SSLConfiguration.KEYSTORE_CONFIG_PROP); } else if (configLine.startsWith(SSLConfiguration.TRUSTSTORE_PASSWORD_CONFIG_PROP)) { trustStorePassword = SSLConfiguration.parseValue(configLine, SSLConfiguration.TRUSTSTORE_PASSWORD_CONFIG_PROP); } else if (configLine.startsWith(SSLConfiguration.TRUSTSTORE_CONFIG_PROP)) { trustStorePath = SSLConfiguration.parseValue(configLine, SSLConfiguration.TRUSTSTORE_CONFIG_PROP); } else { throw new IllegalArgumentException("Unexpected entry in ssl config file " + configLine); } } } SSLConfiguration.SslConfig sslConfig = new SSLConfiguration.SslConfig(keyStorePath, keyStorePassword, trustStorePath, trustStorePassword); SSLConfiguration.applySystemProperties(sslConfig); if (!sslConfig.isValid()) { throw new IllegalArgumentException("Some ssl configuration is missing. keyStore, keyStorePassword, " + "trustStore and trustStorePassword need to be specified"); } if (sslConfig.isConfigured()) { m_sslContext = SSLConfiguration.initializeSslContext(sslConfig); } else { m_sslContext = null; } }

Target:
public void enableSSL() { if (!m_enableSSL || m_sslContextRef.get() != null) return; synchronized (m_sslContextRef) { try { m_sslContextRef.set(SSLConfiguration.initializeSslContext(m_sslConfig)); } catch (IOException | NoSuchAlgorithmException | KeyStoreException | CertificateException | UnrecoverableKeyException | KeyManagementException ex) { throw new IllegalArgumentException("Failed to initialize SSL from config file: " + m_sslPropsFile, ex); } } }
Source:
public void logout( final AsyncCallback<Void> responder ) { synchronized( currentUserLock ) { Invoker.invokeAsync( USER_MANAGER_SERVER_ALIAS, "logout", new Object[] { Backendless.getApplicationId(), Backendless.getVersion() }, new AsyncCallback<Void>() { @Override public void handleResponse( Void response ) { try { handleLogout(); } catch( Throwable e ) { if( responder != null ) responder.handleFault( new BackendlessFault( e ) ); } if( responder != null ) responder.handleResponse( response ); } @Override public void handleFault( BackendlessFault fault ) { if( fault.getCode().equals( "3064" ) || fault.getCode().equals( "3091" ) || fault.getCode().equals( "3090" ) || fault.getCode().equals( "3023" ) ) { handleResponse( null ); return; } if( responder != null ) responder.handleFault( fault ); } } ); } }

Target:
public void logout( final AsyncCallback<Void> responder ) { synchronized( currentUserLock ) { Invoker.invokeAsync( USER_MANAGER_SERVER_ALIAS, "logout", new Object[] { Backendless.getApplicationId(), Backendless.getVersion() }, new AsyncCallback<Void>() { @Override public void handleResponse( Void response ) { try { handleLogout(); } catch( Throwable e ) { if( responder != null ) responder.handleFault( new BackendlessFault( e ) ); } if( responder != null ) responder.handleResponse( response ); } @Override public void handleFault( BackendlessFault fault ) { if( !isLogoutFaultAllowed( fault.getCode() ) ) { handleResponse( null ); return; } if( responder != null ) responder.handleFault( fault ); } } ); } }
Source:
public void queueDelete(Location l, boolean destroy) { new Throwable().printStackTrace(); queueLock.readLock().lock(); try { deletionQueue.put(l, destroy); } finally { queueLock.readLock().unlock(); } }

Target:
public void queueDelete(Location l, boolean destroy) { queueLock.readLock().lock(); try { deletionQueue.put(l, destroy); } finally { queueLock.readLock().unlock(); } }