auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
private void handleMultipleConcurrentAgents(VDSStatus lastStatus, VDSReturnValue vdsReturnValue) { final CountDownLatch latch = (getParameters().getAction() == FenceActionType.Stop) ? new CountDownLatch(2) : (getParameters().getAction() == FenceActionType.Start) ? new CountDownLatch(1) : new CountDownLatch(0); if (primaryExecutor.FindVdsToFence()) { ThreadPoolUtil.execute(new Runnable() { @Override public void run() { runThread(latch, primaryReturnValue, primaryExecutor, FenceAgentOrder.Primary, primarySucceeded); } }); ThreadPoolUtil.execute(new Runnable() { @Override public void run() { runThread(latch, secondaryReturnValue, secondaryExecutor, FenceAgentOrder.Secondary, secondarySucceeded); } }); try { latch.await(); } catch (InterruptedException e) { log.error(e); } switch (getParameters().getAction()) { case Start : if (primarySucceeded || secondarySucceeded){ handleSpecificCommandActions(); setFencingSucceeded(true); } else { handleError(lastStatus, primaryReturnValue); handleError(lastStatus, secondaryReturnValue); } break; case Stop: if (primarySucceeded && secondarySucceeded){ handleSpecificCommandActions(); setFencingSucceeded(true); } else { handleError(lastStatus, (!primarySucceeded) ? primaryReturnValue : secondaryReturnValue); } break; default: setFencingSucceeded(true); break; } } }

Target:
private void handleMultipleConcurrentAgents(VDSStatus lastStatus, VDSReturnValue vdsReturnValue) { final CountDownLatch latch = (getParameters().getAction() == FenceActionType.Stop) ? new CountDownLatch(2) : (getParameters().getAction() == FenceActionType.Start) ? new CountDownLatch(1) : new CountDownLatch(0); if (primaryExecutor.FindVdsToFence()) { ThreadPoolUtil.execute(new Runnable() { @Override public void run() { primaryResult = runThread(latch, primaryExecutor, FenceAgentOrder.Primary); } }); ThreadPoolUtil.execute(new Runnable() { @Override public void run() { secondaryResult = runThread(latch, secondaryExecutor, FenceAgentOrder.Secondary); } }); try { latch.await(); } catch (InterruptedException e) { log.error(e); } switch (getParameters().getAction()) { case Start : if (primaryResult.isSucceeded() || secondaryResult.isSucceeded()){ handleSpecificCommandActions(); setFencingSucceeded(true); } else { handleError(lastStatus, primaryResult.getValue()); handleError(lastStatus, secondaryResult.getValue()); } break; case Stop: if (primaryResult.isSucceeded() && secondaryResult.isSucceeded()){ handleSpecificCommandActions(); setFencingSucceeded(true); } else { handleError(lastStatus, (!primaryResult.isSucceeded() ) ? primaryResult.getValue() : secondaryResult.getValue()); } break; default: setFencingSucceeded(true); break; } } }
Source:
public Boolean isFileTypeValid() { return getComponentModel().validFileType; }

Target:
public boolean isFileTypeValid() { return getComponentModel().validFileType; }
Source:
public void registerAdditionalCatalog(Statistic stat) { this.statisticMappings.put(stat.getId(), stat); }

Target:
public void registerAdditionalCatalog(Statistic stat) { checkNotNull(stat, "null statistic"); this.statisticMappings.put(stat.getId().toLowerCase(Locale.ENGLISH), stat); }
Source:
public void setRowGroupSizeThreshold(long rowGroupSizeThreshold) { this.rowGroupSizeThreshold = rowGroupSizeThreshold; }

Target:
void setRowGroupSizeThreshold(long rowGroupSizeThreshold) { this.rowGroupSizeThreshold = rowGroupSizeThreshold; }
Source:
public ServerRespondingWithRetryableException(String msg, Throwable throwable) { super(ADALError.SERVER_RESPONDING_WITH_RETRYABLE_ERROR, msg, throwable); }

Target:
public ServerRespondingWithRetryableException(String msg, Throwable throwable) { super(null, msg, throwable); }
Source:
public InMemoryConnectionStore(final int capacity, final long threshold, final SessionCache sessionCache) { connections = new LeastRecentlyUsedCache<>(capacity, threshold); connections.setEvictingOnReadAccess(false); connections.setUpdatingOnReadAccess(false); connectionsByEstablishedSession = new HashMap<>(); this.sessionCache = sessionCache; if (sessionCache != null) { connections.addEvictionListener(new LeastRecentlyUsedCache.EvictionListener<Connection>() { @Override public void onEviction(Connection staleConnection) { Handshaker handshaker = staleConnection.getOngoingHandshake(); if (handshaker != null) { handshaker.handshakeFailed(new Exception("Connection evicted from store")); } removeFromEstablishedSessions(staleConnection); removeSessionFromCache(staleConnection); } }); if (sessionCache instanceof ClientSessionCache) { ClientSessionCache clientCache = (ClientSessionCache) sessionCache; LOG.debug("resume client sessions {}", clientCache); for (InetSocketAddress peer : clientCache) { SessionTicket ticket = clientCache.getSessionTicket(peer); SessionId id = clientCache.getSessionIdentity(peer); if (ticket != null && id != null) { Connection connection = new Connection(ticket, id); connection.setResumptionRequired(true); connections.put(peer, connection); LOG.debug("resume {}", peer, id); } } } } LOG.info("Created new InMemoryConnectionStore [capacity: {}, connection expiration threshold: {}s]", capacity, threshold); }

Target:
public InMemoryConnectionStore(final int capacity, final long threshold, final SessionCache sessionCache) { connections = new LeastRecentlyUsedCache<>(capacity, threshold); connections.setEvictingOnReadAccess(false); connections.setUpdatingOnReadAccess(false); connectionsByEstablishedSession = new HashMap<>(); this.sessionCache = sessionCache; if (sessionCache != null) { connections.addEvictionListener(new LeastRecentlyUsedCache.EvictionListener<Connection>() { @Override public void onEviction(Connection staleConnection) { removeFromEstablishedSessions(staleConnection); removeSessionFromCache(staleConnection); } }); if (sessionCache instanceof ClientSessionCache) { ClientSessionCache clientCache = (ClientSessionCache) sessionCache; LOG.debug("resume client sessions {}", clientCache); for (InetSocketAddress peer : clientCache) { SessionTicket ticket = clientCache.getSessionTicket(peer); SessionId id = clientCache.getSessionIdentity(peer); if (ticket != null && id != null) { Connection connection = new Connection(ticket, id); connection.setResumptionRequired(true); connections.put(peer, connection); LOG.debug("resume {}", peer, id); } } } } LOG.info("Created new InMemoryConnectionStore [capacity: {}, connection expiration threshold: {}s]", capacity, threshold); }
Source:
public Session<F> getSession() { if (this.activeTemplateCallbacks.get() > 0) { return this.contextSessions.get(); } else { return this.sessionFactory.getSession(); } }

Target:
public Session<F> getSession() { if (this.activeTemplateCallbacks.get() > 0) { Session<F> session = this.contextSessions.get(); if (session != null) { return session; } } return this.sessionFactory.getSession(); }
Source:
public List<String> argumentTypeNames() { if (fArgumentTypeNames != null) { return fArgumentTypeNames; } List<String> argumentTypeSignatures = argumentTypeSignatures(); List<String> result = new ArrayList<>(); for (String string : argumentTypeSignatures) { result.add(TypeImpl.signatureToName(string)); } fArgumentTypeNames = result; return fArgumentTypeNames; }

Target:
public List<String> argumentTypeNames() { if (fArgumentTypeNames != null) { return fArgumentTypeNames; } List<String> result = new ArrayList<>(); for (String signature : argumentTypeSignatures()) { result.add(TypeImpl.signatureToName(signature)); } fArgumentTypeNames = result; return fArgumentTypeNames; }
Source:
private void addRelatedMessageLink(MessageDto message, MessageDto messageResource) { if (message.getRelatedMessageId() != 0) { messageResource.add(getAnonymousMessageLinkBuilder(goalIdMapping.getUserId(), message.getRelatedMessageId()) .withRel("related")); } }

Target:
private void addRelatedMessageLink(MessageDto message, MessageDto messageResource) { message.getRelatedMessageId().ifPresent(rid -> messageResource .add(getAnonymousMessageLinkBuilder(goalIdMapping.getUserId(), rid).withRel("related"))); }
Source:
private void writeVariants(JavaRDD<VariantContext> variants) { final List<VariantContext> collectedVariants = variants.collect(); final List<VariantContext> sortedVariants = collectedVariants.stream().sorted((o1, o2) -> IntervalUtils.compareLocatables(o1, o2, getReferenceSequenceDictionary())).collect(Collectors.toList()); final HaplotypeCallerEngine hcEngine = new HaplotypeCallerEngine(hcArgs, getHeaderForReads(), new ReferenceMultiSourceToReferenceSequenceFileAdaptor(getReference(), getAuthHolder())); try(final VariantContextWriter writer = hcEngine.makeVCFWriter(output, this.getBestAvailableSequenceDictionary())) { hcEngine.writeHeader(writer); sortedVariants.forEach(writer::add); } }

Target:
private void writeVariants(JavaRDD<VariantContext> variants) { final List<VariantContext> collectedVariants = variants.collect(); final SAMSequenceDictionary referenceDictionary = getReferenceSequenceDictionary(); final List<VariantContext> sortedVariants = collectedVariants.stream() .sorted((o1, o2) -> IntervalUtils.compareLocatables(o1, o2, referenceDictionary)) .collect(Collectors.toList()); final HaplotypeCallerEngine hcEngine = new HaplotypeCallerEngine(hcArgs, getHeaderForReads(), new ReferenceMultiSourceAdapter(getReference(), getAuthHolder())); try(final VariantContextWriter writer = hcEngine.makeVCFWriter(output, this.getBestAvailableSequenceDictionary())) { hcEngine.writeHeader(writer, getHeaderForReads().getSequenceDictionary()); sortedVariants.forEach(writer::add); } }
Source:
public void walkSiteMap(AbstractSiteMap sitemap, Consumer<SiteMapURL> action) throws UnknownFormatException, IOException { if (sitemap == null || action == null) { return; } if (sitemap.isIndex()) { final Collection<AbstractSiteMap> links = ((SiteMapIndex) sitemap).getSitemaps(); for (final AbstractSiteMap asm : links) { if (asm == null) { continue; } walkSiteMap(asm.getUrl(), action); } } else { final Collection<SiteMapURL> links = ((SiteMap) sitemap).getSiteMapUrls(); for (final SiteMapURL url : links) { if (url == null) { continue; } action.accept(url); } } }

Target:
public void walkSiteMap(AbstractSiteMap sitemap, Consumer<SiteMapURL> action) throws UnknownFormatException, IOException { if (sitemap == null || action == null) { LOG.debug("Got null sitemap and/or action, stopping traversal"); return; } if (sitemap.isIndex()) { final Collection<AbstractSiteMap> links = ((SiteMapIndex) sitemap).getSitemaps(); for (final AbstractSiteMap asm : links) { if (asm == null) { continue; } walkSiteMap(asm.getUrl(), action); } } else { final Collection<SiteMapURL> links = ((SiteMap) sitemap).getSiteMapUrls(); for (final SiteMapURL url : links) { if (url == null) { continue; } action.accept(url); } } }
Source:
protected void checkRyaInstanceExists(final Map<String, String> taskConfig) throws ConnectException { requireNonNull(taskConfig); final AccumuloRyaSinkConfig config = new AccumuloRyaSinkConfig(taskConfig); final Connector connector; try { final Instance instance = new ZooKeeperInstance(config.getClusterName(), config.getZookeepers()); connector = instance.getConnector(config.getUsername(), new PasswordToken( config.getPassword() )); } catch (AccumuloException | AccumuloSecurityException e) { throw new ConnectException("Could not create a Connector to the configured Accumulo instance.", e); } try { final AccumuloConnectionDetails connectionDetails = new AccumuloConnectionDetails( config.getUsername(), config.getPassword().toCharArray(), config.getClusterName(), config.getZookeepers()); final RyaClient client = AccumuloRyaClientFactory.build(connectionDetails, connector); if(!client.getInstanceExists().exists( config.getRyaInstanceName() )) { throw new ConnectException("The Rya Instance named " + config.getRyaInstanceName() + " has not been installed."); } } catch (final RyaClientException e) { throw new ConnectException("Unable to determine if the Rya Instance named " + config.getRyaInstanceName() + " has been installed.", e); } }

Target:
protected void checkRyaInstanceExists(final Map<String, String> taskConfig) throws ConnectException { requireNonNull(taskConfig); final AccumuloRyaSinkConfig config = new AccumuloRyaSinkConfig(taskConfig); final Connector connector; try { final Instance instance = new ZooKeeperInstance(config.getClusterName(), config.getZookeepers()); connector = instance.getConnector(config.getUsername(), new PasswordToken( config.getPassword() )); } catch (final AccumuloException | AccumuloSecurityException e) { throw new ConnectException("Could not create a Connector to the configured Accumulo instance.", e); } try { final AccumuloConnectionDetails connectionDetails = new AccumuloConnectionDetails( config.getUsername(), config.getPassword().toCharArray(), config.getClusterName(), config.getZookeepers()); final RyaClient client = AccumuloRyaClientFactory.build(connectionDetails, connector); if(!client.getInstanceExists().exists( config.getRyaInstanceName() )) { throw new ConnectException("The Rya Instance named " + LogUtils.clean(config.getRyaInstanceName()) + " has not been installed."); } } catch (final RyaClientException e) { throw new ConnectException("Unable to determine if the Rya Instance named " + LogUtils.clean(config.getRyaInstanceName()) + " has been installed.", e); } }
Source:
private void setUpApplicationFeedback() { Intent intent = Intents.Builder.with(getActivity()).buildFeedbackIntent(); if (intent.resolveActivity(getActivity().getPackageManager()) != null) { startActivity(intent); } else { Toast.makeText(getActivity(), "NO Application Found", Toast.LENGTH_SHORT).show(); } }

Target:
private void setUpApplicationFeedback() { Intent intent = Intents.Builder.with(getActivity()).buildFeedbackIntent(); if (intent.resolveActivity(getActivity().getPackageManager()) != null) { startActivity(intent); } else { Toast.makeText(getActivity(), R.string.application_not_found, Toast.LENGTH_SHORT).show(); } }
Source:
private void checkMethodAccessItem(final List<MethodAccessItem> methodAccessItemList, final List<MethodAccessItemDto> methodAccessItemDtoList) { assertEquals(methodAccessItemList.size(), methodAccessItemDtoList.size()); for (final MethodAccessItemDto methodAccessItemDto : methodAccessItemDtoList) { assertEquals(methodAccessItemDto.getAccessMode(), methodAccessItemDto.getAccessMode()); assertEquals(methodAccessItemDto.getMethodId(), methodAccessItemDto.getMethodId()); } }

Target:
private void checkMethodAccessItem(final List<MethodAccessItem> methodAccessItemList, final List<MethodAccessItemDto> methodAccessItemDtoList) { assertEquals(methodAccessItemList.size(), methodAccessItemDtoList.size()); final Iterator<MethodAccessItem> methodAccessItemIterator = methodAccessItemList.iterator(); final Iterator<MethodAccessItemDto> methodAccessItemDtoIterator = methodAccessItemDtoList.iterator(); while (methodAccessItemIterator.hasNext() && methodAccessItemDtoIterator.hasNext()) { final MethodAccessItem methodAccessItem = methodAccessItemIterator.next(); final MethodAccessItemDto methodAccessItemDto = methodAccessItemDtoIterator.next(); assertEquals(methodAccessItem.getAccessMode().name(), methodAccessItemDto.getAccessMode().name()); assertEquals(methodAccessItem.getMethodId(), methodAccessItemDto.getMethodId()); } }
Source:
public void setStatusAddsTransactionEvent() throws Exception { ChargeTransactionEntity chargeTransactionEntity = new ChargeTransactionEntity(); ChargeStatus expectedStatus = ChargeStatus.CREATED; chargeTransactionEntity.updateStatus(expectedStatus); List<TransactionEventEntity> transactionEvents = chargeTransactionEntity.getTransactionEvents(); assertThat(transactionEvents.size(), is(1)); assertThat(transactionEvents.get(0).getStatus(), is(expectedStatus)); }

Target:
public void setStatusAddsTransactionEvent() throws Exception { ChargeTransactionEntity chargeTransactionEntity = new ChargeTransactionEntity(); ChargeStatus expectedStatus = ChargeStatus.CREATED; assertThat(chargeTransactionEntity.getTransactionEvents().size(), is(0)); chargeTransactionEntity.updateStatus(expectedStatus); List<TransactionEventEntity> transactionEvents = chargeTransactionEntity.getTransactionEvents(); assertThat(transactionEvents.size(), is(1)); assertThat(transactionEvents.get(0).getStatus(), is(expectedStatus)); }
Source:
public static void showDialog(Context context) { AlertDialog.Builder dialog = new AlertDialog.Builder(context); dialog.setTitle(context.getString(R.string.pref_nav_drawer_feed_order_title)); dialog.setNegativeButton(android.R.string.cancel, (d, listener) -> d.dismiss()); int selectedIndexTemp = 0; int selected = UserPreferences.getFeedOrder(); String[] entryValues = context.getResources().getStringArray(R.array.nav_drawer_feed_order_values); for (int i = 0; i < entryValues.length; i++) { if (Integer.parseInt(entryValues[i]) == selected) { selectedIndexTemp = i; } } final int selectedIndex = selectedIndexTemp; String[] items = context.getResources().getStringArray(R.array.nav_drawer_feed_order_options); dialog.setSingleChoiceItems(items, selectedIndex, (d, which) -> { if (selectedIndex != which) { UserPreferences.setFeedOrder(entryValues[which]); EventBus.getDefault().post(new UnreadItemsUpdateEvent()); } d.dismiss(); }); dialog.show(); }

Target:
public static void showDialog(Context context) { AlertDialog.Builder dialog = new AlertDialog.Builder(context); dialog.setTitle(context.getString(R.string.pref_nav_drawer_feed_order_title)); dialog.setNegativeButton(android.R.string.cancel, (d, listener) -> d.dismiss()); int selected = UserPreferences.getFeedOrder(); List<String> entryValues = Arrays.asList(context.getResources().getStringArray(R.array.nav_drawer_feed_order_values)); final int selectedIndex = entryValues.indexOf("" + selected); String[] items = context.getResources().getStringArray(R.array.nav_drawer_feed_order_options); dialog.setSingleChoiceItems(items, selectedIndex, (d, which) -> { if (selectedIndex != which) { UserPreferences.setFeedOrder(entryValues.get(which)); EventBus.getDefault().post(new UnreadItemsUpdateEvent()); } d.dismiss(); }); dialog.show(); }
Source:
private void loadResource(File resource) { if(!resource.canRead()) throw new RuntimeException("Cant open JNI file: "+resource.getAbsolutePath()); try { System.out.println("Going to load " + resource + ". Hit return..."); System.in.read(); } catch (IOException e) { e.printStackTrace(); } System.load(resource.getAbsolutePath()); try { System.out.println("Loaded successfully, hit return..."); System.in.read(); } catch (IOException e) { e.printStackTrace(); } }

Target:
private void loadResource(File resource) { if(!resource.canRead()) throw new RuntimeException("Cant open JNI file: "+resource.getAbsolutePath()); System.load(resource.getAbsolutePath()); }
Source:
public void testConvertRegion() { DigitalOceanProviderMetadata metadata = new DigitalOceanProviderMetadata(); JustProvider locationsSupplier = new JustProvider(metadata.getId(), Suppliers.<URI> ofInstance(URI .create(metadata.getEndpoint())), ImmutableSet.<String> of()); RegionToLocation function = new RegionToLocation(locationsSupplier); Region region = new Region(1, "Region 1", "reg1"); Location expected = new LocationBuilder().id("reg1").description("1/Region 1") .parent(getOnlyElement(locationsSupplier.get())).scope(LocationScope.REGION).build(); assertEquals(function.apply(region), expected); }

Target:
public void testConvertRegion() { DigitalOceanProviderMetadata metadata = new DigitalOceanProviderMetadata(); JustProvider locationsSupplier = new JustProvider(metadata.getId(), Suppliers.<URI> ofInstance(URI .create(metadata.getEndpoint())), ImmutableSet.<String> of()); Region region = new Region(1, "Region 1", "reg1"); Location expected = new LocationBuilder().id("reg1").description("1/Region 1") .parent(getOnlyElement(locationsSupplier.get())).scope(LocationScope.REGION).build(); RegionToLocation function = new RegionToLocation(locationsSupplier); assertEquals(function.apply(region), expected); }
Source:
public void autonomousMain() throws AutonomousModeOverException, InterruptedException { try { if (!Elevator.atTopStatus.get()) { Elevator.setTop.event(); waitUntil(Elevator.atTopStatus); } try { boolean running = Rollers.running.get(); boolean direction = Rollers.direction.get(); boolean closed = Rollers.closed.get(); try { Rollers.direction.set(Rollers.REVERSE); Rollers.running.set(true); Rollers.closed.set(true); waitUntil(crateInPosition); waitForTime(timeout); } finally { Rollers.running.set(running); Rollers.direction.set(direction); Rollers.closed.set(closed); } } finally { Elevator.setBottom.event(); } waitUntil(Elevator.atBottomStatus); waitForTime(1000); } finally { running.set(false); } }

Target:
public void autonomousMain() throws AutonomousModeOverException, InterruptedException { try { if (!Elevator.atTop.get()) { Elevator.setTop.event(); waitUntil(Elevator.atTop); } try { boolean running = Rollers.running.get(); boolean direction = Rollers.direction.get(); boolean closed = Rollers.closed.get(); try { Rollers.direction.set(Rollers.REVERSE); Rollers.running.set(true); Rollers.closed.set(true); waitUntil(crateInPosition); waitForTime(timeout); } finally { Rollers.running.set(running); Rollers.direction.set(direction); Rollers.closed.set(closed); } } finally { Elevator.setBottom.event(); } waitUntil(Elevator.atBottom); waitForTime(1000); } finally { running.set(false); } }
Source:
public void shouldNotFindAbsentConfig() { List<Config> configList = Arrays.asList(new Config("foo", false, null, null, null, null, null, null, null, false, null, false, null)); Configs configs = new Configs(); configs.setConfigList(configList); configs.setDefaultConfig("foo"); configService.updateConfigs(configs); configService.getConfig("bar"); }

Target:
public void shouldNotFindAbsentConfig() { List<Config> configList = Arrays.asList(new Config("foo", false, null, null, null, null, null, null, null, false, null, false, null)); Configs configs = new Configs(configList, "foo"); configService.updateConfigs(configs); configService.getConfig("bar"); }
Source:
public Response authoriseSmartpayNotifications(String notification) { smartpayNotificationService.handleNotificationFor(notification); String response = "[accepted]"; logger.info("Responding to notification from provider={} with 200 {}", "smartpay", response); return Response.ok(response).build(); }

Target:
public Response authoriseSmartpayNotifications(String notification) { smartpayNotificationService.handleNotificationFor(notification); String response = "[accepted]"; logger.info("Responding to notification from provider=smartpay with 200 {}", response); return Response.ok(response).build(); }
Source:
public void executeHousekeepingInDB(final List<Long> jobIdList, final boolean shouldRemoveFromDb) { List<List<Long>> jobIdSubSets = Lists.partition(jobIdList, 1000); for (List<Long> jobIdSubList : jobIdSubSets) { executeReadWriteTransaction(new HousekeepingSessionWork(jobIdSubList, shouldRemoveFromDb)); } }

Target:
public void executeHousekeepingInDB(final List<Long> jobIdList, final boolean shouldRemoveFromDb) { List<List<Long>> jobIdSubSets = Lists.partition(jobIdList, MAX_ITEMS_IN_LIST); for (List<Long> jobIdSubList : jobIdSubSets) { executeReadWriteTransaction(new HousekeepingSessionWork(jobIdSubList, shouldRemoveFromDb)); } }
Source:
static ResultReturner forMethod(Class<?> extensionType, Method method) { Type returnType = GenericTypeReflector.getReturnType(method, extensionType); QualifiedType qualifiedReturnType = QualifiedType.of(returnType, getQualifiers(method)); Class<?> returnClass = getErasedType(returnType); if (Void.TYPE.equals(returnClass)) { return findConsumer(method) .orElseThrow(() -> new IllegalStateException(String.format( "Method %s#%s is annotated as if it should return a value, but the method is void.", method.getDeclaringClass().getName(), method.getName()))); } else if (ResultIterable.class.equals(returnClass)) { return new ResultIterableReturner(qualifiedReturnType); } else if (Stream.class.equals(returnClass)) { return new StreamReturner(qualifiedReturnType); } else if (ResultIterator.class.equals(returnClass)) { return new ResultIteratorReturner(qualifiedReturnType); } else if (Iterator.class.equals(returnClass)) { return new IteratorReturner(qualifiedReturnType); } else if (method.isAnnotationPresent(SingleValue.class)) { return new SingleValueReturner(qualifiedReturnType); } else { return new CollectedResultReturner(qualifiedReturnType); } }

Target:
static ResultReturner forMethod(Class<?> extensionType, Method method) { Type returnType = GenericTypes.resolveType(method.getGenericReturnType(), extensionType); QualifiedType<?> qualifiedReturnType = QualifiedType.of(returnType).withAnnotations(getQualifiers(method)); Class<?> returnClass = getErasedType(returnType); if (Void.TYPE.equals(returnClass)) { return findConsumer(method) .orElseThrow(() -> new IllegalStateException(String.format( "Method %s#%s is annotated as if it should return a value, but the method is void.", method.getDeclaringClass().getName(), method.getName()))); } else if (ResultIterable.class.equals(returnClass)) { return new ResultIterableReturner(qualifiedReturnType); } else if (Stream.class.equals(returnClass)) { return new StreamReturner(qualifiedReturnType); } else if (ResultIterator.class.equals(returnClass)) { return new ResultIteratorReturner(qualifiedReturnType); } else if (Iterator.class.equals(returnClass)) { return new IteratorReturner(qualifiedReturnType); } else if (method.isAnnotationPresent(SingleValue.class)) { return new SingleValueReturner(qualifiedReturnType); } else { return new CollectedResultReturner(qualifiedReturnType); } }
Source:
public static short getCompatibleResponseVersion(short requestVersion) { short responseVersion; switch (requestVersion) { case ReplicaMetadataRequest.Replica_Metadata_Request_Version_V1: responseVersion = REPLICA_METADATA_RESPONSE_VERSION_V_5; break; case ReplicaMetadataRequest.Replica_Metadata_Request_Version_V2: responseVersion = REPLICA_METADATA_RESPONSE_VERSION_V_6; break; default: throw new IllegalArgumentException("Invalid replica metadata response version."); } return responseVersion; }

Target:
public static short getCompatibleResponseVersion(short requestVersion) { switch (requestVersion) { case ReplicaMetadataRequest.Replica_Metadata_Request_Version_V1: return REPLICA_METADATA_RESPONSE_VERSION_V_5; case ReplicaMetadataRequest.Replica_Metadata_Request_Version_V2: return REPLICA_METADATA_RESPONSE_VERSION_V_6; default: throw new IllegalArgumentException("Invalid replica metadata request version: " + requestVersion + " No compatible replica metadata response version found"); } }
Source:
public IStatus runInternal(final IProgressMonitor monitor) { ResourceSet set = new ResourceSetImpl(); try { if (!resource.isLoaded()) return Status.CANCEL_STATUS; final Resource shadowResource = set.createResource(resource.getURI()); cloneResource(monitor, shadowResource); if (monitor.isCanceled()) return Status.CANCEL_STATUS; final List<Issue> issues = Lists.newArrayList(); try { issues.addAll(validator.validate(shadowResource, CheckMode.FAST_ONLY, new CancelIndicator() { public boolean isCanceled() { return monitor.isCanceled(); } })); } catch (Throwable ex) { return Status.CANCEL_STATUS; } validationIssueProcessor.processIssues(issues, monitor); } catch (Exception ex) { ex.printStackTrace(); return new Status(IStatus.ERROR, DiagramActivator.PLUGIN_ID, ex.getMessage()); } return Status.OK_STATUS; }

Target:
protected IStatus runInternal(final IProgressMonitor monitor) { ResourceSet set = new ResourceSetImpl(); try { if (!resource.isLoaded()) return Status.CANCEL_STATUS; final Resource shadowResource = set.createResource(resource.getURI()); cloneResource(monitor, shadowResource); if (monitor.isCanceled()) return Status.CANCEL_STATUS; final List<Issue> issues = Lists.newArrayList(); try { issues.addAll(validator.validate(shadowResource, CheckMode.FAST_ONLY, new CancelIndicator() { public boolean isCanceled() { return monitor.isCanceled(); } })); } catch (Throwable ex) { return Status.CANCEL_STATUS; } validationIssueProcessor.processIssues(issues, monitor); } catch (Exception ex) { ex.printStackTrace(); return new Status(IStatus.ERROR, DiagramActivator.PLUGIN_ID, ex.getMessage()); } return Status.OK_STATUS; }
Source:
private void refreshTestData(int numStudents, int numQuestions) { if (testData.students.size() == 0) { addStudents(numStudents); } else if (testData.students.size() < numStudents) { addStudents(numStudents - testData.students.size()); } else if (testData.students.size() > numStudents) { decreaseNumOfStudents(numStudents); } if (testData.feedbackQuestions.size() == 0) { addQuestions(numQuestions); } else if (testData.feedbackQuestions.size() < numQuestions) { addQuestions(numQuestions - testData.feedbackQuestions.size()); } else if (testData.feedbackQuestions.size() > numQuestions) { decreaseNumOfQuestions(numQuestions); } updateFeedbackResponses(); removeAndRestoreDataBundle(testData); }

Target:
private void refreshTestData(int numStudents, int numQuestions) { if (testData.students.size() == 0) { addStudents(numStudents); } else if (testData.students.size() < numStudents) { addStudents(numStudents - testData.students.size()); } else if (testData.students.size() > numStudents) { decreaseNumOfStudents(numStudents); } if (testData.feedbackQuestions.size() == 0) { addQuestions(numQuestions); } else if (testData.feedbackQuestions.size() < numQuestions) { addQuestions(numQuestions - testData.feedbackQuestions.size()); } else if (testData.feedbackQuestions.size() > numQuestions) { decreaseNumOfQuestions(numQuestions); } updateFeedbackResponses(); }
Source:
public static void cleanUp() throws IOException, OperationException { operations.removeIfExists(SERVER_ADDRESS); operations.removeIfExists(SERVER_TBR_ADDRESS); operations.removeIfExists(MAIL_SESSION_PRE_ADDRESS); operations.removeIfExists(MAIL_SESSION_TBR_ADDRESS); operations.removeIfExists(MAIL_SESSION_ADDRESS); operations.removeIfExists(MAIL_SESSION_INV_ADDRESS); client.close(); }

Target:
public static void cleanUp() throws IOException, OperationException { try { operations.removeIfExists(SERVER_ADDRESS); operations.removeIfExists(SERVER_TBR_ADDRESS); operations.removeIfExists(MAIL_SESSION_PRE_ADDRESS); operations.removeIfExists(MAIL_SESSION_TBR_ADDRESS); operations.removeIfExists(MAIL_SESSION_ADDRESS); operations.removeIfExists(MAIL_SESSION_INV_ADDRESS); } finally { client.close(); } }
Source:
public boolean login() throws LoginException { Callback[] callbacks = configureCallbacks(); try { log.trace("Authenticating user; invoking JAAS login callbacks"); callbackHandler.handle(callbacks); } catch (Exception e) { log.trace("Authentication failed while invoking JAAS login callbacks"); throw new LoginException(e.getMessage()); } String username = ((NameCallback) callbacks[0]).getName(); char[] passwordChars = ((PasswordCallback) callbacks[1]).getPassword(); String password = passwordChars != null ? new String(passwordChars) : null; Properties credentialProperties = credentialPropertiesMap.get(fileName); if (credentialProperties.isEmpty()) { log.trace("Not validating credentials for user '{}' as credential properties file '{}' is empty", username, fileName); authenticated = true; } else if (password != null && password.equals(credentialProperties.get(username))) { log.trace("Credentials provided for user '{}' match those present in the credential properties file '{}'", username, fileName); authenticated = true; } else { log.trace("Credentials provided for user '{}' do not match those present in the credential properties file '{}'", username, fileName); authenticated = false; } return authenticated; }

Target:
public boolean login() throws LoginException { Callback[] callbacks = configureCallbacks(); try { log.trace("Authenticating user; invoking JAAS login callbacks"); callbackHandler.handle(callbacks); } catch (Exception e) { log.warn("Authentication failed while invoking JAAS login callbacks", e); throw new LoginException(e.getMessage()); } String username = ((NameCallback) callbacks[0]).getName(); char[] passwordChars = ((PasswordCallback) callbacks[1]).getPassword(); String password = passwordChars != null ? new String(passwordChars) : null; Properties credentialProperties = credentialPropertiesMap.get(fileName); if (credentialProperties.isEmpty()) { log.trace("Not validating credentials for user '{}' as credential properties file '{}' is empty", username, fileName); authenticated = true; } else if (username == null) { log.trace("No credentials were provided or the provided credentials were malformed"); authenticated = false; } else if (password != null && password.equals(credentialProperties.get(username))) { log.trace("Credentials provided for user '{}' match those present in the credential properties file '{}'", username, fileName); authenticated = true; } else if (!credentialProperties.containsKey(username)) { log.trace("User '{}' is not present in the credential properties file '{}'", username, fileName); authenticated = false; } else { log.trace("Credentials provided for user '{}' do not match those present in the credential properties file '{}'", username, fileName); authenticated = false; } return authenticated; }
Source:
@Override protected synchronized Class<?> loadClass(String name, boolean resolve) throws ClassNotFoundException { if (name.startsWith("org.kohsuke.groovy.sandbox.")) { return this.getClass().getClassLoader().loadClass(name); } else { ClassLoader parentLoader = getParent(); Class<?> c = load(parentClassCache, name, parentLoader, item -> { try { return Optional.of(parentLoader.loadClass(item)); } catch (ClassNotFoundException x) { return Optional.absent(); } }).orNull(); if (c != null) { if (resolve) { super.resolveClass(c); } return c; } else { throw new ClassNotFoundException(name) { @Override public synchronized Throwable fillInStackTrace() { return this; } }; } } }

Target:
@Override protected synchronized Class<?> loadClass(String name, boolean resolve) throws ClassNotFoundException { if (name.startsWith("org.kohsuke.groovy.sandbox.")) { return this.getClass().getClassLoader().loadClass(name); } else { ClassLoader parentLoader = getParent(); Class<?> c = load(parentClassCache, name, parentLoader, () -> { try { return parentLoader.loadClass(name); } catch (ClassNotFoundException x) { return CLASS_NOT_FOUND; } }); if (c != CLASS_NOT_FOUND) { if (resolve) { super.resolveClass(c); } return c; } else { throw new ClassNotFoundException(name) { @Override public synchronized Throwable fillInStackTrace() { return this; } }; } } }
Source:
public Object apply(IncomingMessageEnvelope ime) { Object samzaMsg; if (ime.getMessage() instanceof KV) { samzaMsg = ime.getMessage(); } else { samzaMsg = KV.of(ime.getKey(), ime.getMessage()); } if (samzaMsg == null) { return null; } SamzaSqlRelMsgMetadata metadata = new SamzaSqlRelMsgMetadata(Instant.ofEpochMilli(ime.getEventTime()).toString(), Instant.ofEpochMilli(ime.getArrivalTime()).toString(), null); samzaMsg = MessageAndMetadata.of(samzaMsg, metadata); return samzaMsg; }

Target:
public Object apply(IncomingMessageEnvelope ime) { Assert.notNull(ime, "ime is null"); KV<Object, Object> keyAndMessageKV = KV.of(ime.getKey(), ime.getMessage()); SamzaSqlRelMsgMetadata metadata = new SamzaSqlRelMsgMetadata(Instant.ofEpochMilli(ime.getEventTime()).toString(), Instant.ofEpochMilli(ime.getArrivalTime()).toString(), null); SamzaSqlInputMessage samzaMsg = SamzaSqlInputMessage.of(keyAndMessageKV, metadata); return samzaMsg; }
Source:
public void edit(final VolumeBrickModel object) { bricksTable.asEditor().edit(object.getBricks()); driver.edit(object); addBrickButton.setCommand(object.getAddBrickCommand()); removeBricksButton.setCommand(object.getRemoveBricksCommand()); removeAllBricksButton.setCommand(object.getRemoveAllBricksCommand()); moveBricksUpButton.setCommand(object.getMoveBricksUpCommand()); moveBricksDownButton.setCommand(object.getMoveBricksDownCommand()); GlusterVolumeType volumeType = (GlusterVolumeType) object.getVolumeType().getEntity(); if (volumeType == GlusterVolumeType.DISTRIBUTED_REPLICATE) { infoLabel.setText(constants.distributedReplicateVolumeBrickInfoLabel()); } else if (volumeType == GlusterVolumeType.DISTRIBUTED_STRIPE) { infoLabel.setText(constants.distributedStripeVolumeBrickInfoLabel()); } else { infoLabel.setText(null); } forceWarningLabel.setVisible(false); object.getForce().getEntityChangedEvent().addListener(new IEventListener() { @Override public void eventRaised(Event ev, Object sender, EventArgs args) { forceWarningLabel.setVisible(object.getForce().getEntity()); } }); }

Target:
public void edit(final VolumeBrickModel object) { bricksTable.asEditor().edit(object.getBricks()); driver.edit(object); addBrickButton.setCommand(object.getAddBrickCommand()); removeBricksButton.setCommand(object.getRemoveBricksCommand()); removeAllBricksButton.setCommand(object.getRemoveAllBricksCommand()); moveBricksUpButton.setCommand(object.getMoveBricksUpCommand()); moveBricksDownButton.setCommand(object.getMoveBricksDownCommand()); GlusterVolumeType volumeType = (GlusterVolumeType) object.getVolumeType().getEntity(); if (volumeType == GlusterVolumeType.DISTRIBUTED_REPLICATE) { infoLabel.setText(constants.distributedReplicateVolumeBrickInfoLabel()); } else if (volumeType == GlusterVolumeType.DISTRIBUTED_STRIPE) { infoLabel.setText(constants.distributedStripeVolumeBrickInfoLabel()); } else { infoLabel.setText(null); } forceWarningLabel.setVisible(object.getForce().getEntity()); object.getForce().getEntityChangedEvent().addListener(new IEventListener() { @Override public void eventRaised(Event ev, Object sender, EventArgs args) { forceWarningLabel.setVisible(object.getForce().getEntity()); } }); }
Source:
protected void syncSearch() { if (getEntity() == null) { return; } AsyncQuery asyncQuery = new AsyncQuery(); asyncQuery.setModel(this); asyncQuery.asyncCallback = new INewAsyncCallback() { @Override @SuppressWarnings("unchecked") public void onSuccess(Object model, Object returnValue) { NetworkExternalSubnetListModel.this.setItems((List<ExternalSubnet>) returnValue); } }; AsyncDataProvider.getExternalSubnetsByNetworkId(asyncQuery, getEntity().getId()); }

Target:
protected void syncSearch() { if (getEntity() == null) { return; } super.syncSearch(VdcQueryType.GetExternalSubnetsOnProviderByNetwork, new IdQueryParameters(getEntity().getId())); }
Source:
public void bind(int position) { UploadableFile uploadableFile = uploadableFiles.get(position); Uri uri = uploadableFile.getMediaUri(); background.setImageURI(Uri.fromFile(new File(String.valueOf(uri)))); GradientDrawable drawable = new GradientDrawable(); if (position == callback.getCurrentSelectedFilePosition()) { drawable.setShape(GradientDrawable.RECTANGLE); drawable.setStroke(6, Color.parseColor("#6187A1")); rlContainer.setEnabled(true); rlContainer.setClickable(true); rlContainer.setAlpha(1.0f); rlContainer.setBackground(drawable); if (VERSION.SDK_INT >= VERSION_CODES.LOLLIPOP) { rlContainer.setElevation(10); } } else { rlContainer.setEnabled(false); rlContainer.setClickable(false); rlContainer.setAlpha(0.7f); rlContainer.setBackgroundResource(0); if (VERSION.SDK_INT >= VERSION_CODES.LOLLIPOP) { rlContainer.setElevation(0); } } }

Target:
public void bind(int position) { UploadableFile uploadableFile = uploadableFiles.get(position); Uri uri = uploadableFile.getMediaUri(); background.setImageURI(Uri.fromFile(new File(String.valueOf(uri)))); if (position == callback.getCurrentSelectedFilePosition()) { rlContainer.setEnabled(true); rlContainer.setClickable(true); rlContainer.setAlpha(1.0f); if (VERSION.SDK_INT >= VERSION_CODES.LOLLIPOP) { rlContainer.setElevation(10); } } else { rlContainer.setEnabled(false); rlContainer.setClickable(false); rlContainer.setAlpha(0.5f); if (VERSION.SDK_INT >= VERSION_CODES.LOLLIPOP) { rlContainer.setElevation(0); } } }
Source:
public Response generateInstallation(KeycloakSession session, RealmModel realm, ClientModel client, URI baseUri) { String deploymentName = "WAR MODULE NAME.war"; StringBuilder builder = new StringBuilder(); builder .append("/subsystem=keycloak/secure-deployment=").append(deploymentName).append("/:add( \\\n") .append(" realm=").append(realm.getName()).append(", \\\n") .append(" resource=").append(client.getClientId()).append(", \\\n") .append(" auth-server-url=").append(baseUri).append(", \\\n"); if (client.isBearerOnly()){ builder.append(" bearer-only=true, \\\n"); } else if (client.isPublicClient()) { builder.append(" public-client=true, \\\n"); } if (KeycloakOIDCClientInstallation.showVerifyTokenAudience(client)) { builder.append(" verify-token-audience=true, \\\n"); } if (client.getRoles().size() > 0) { builder.append(" use-resource-role-mappings=true, \\\n"); } builder.append(" ssl-required=").append(realm.getSslRequired().name()).append(")\n\n"); if (KeycloakOIDCClientInstallation.showClientCredentialsAdapterConfig(client)) { Map<String, Object> adapterConfig = KeycloakOIDCClientInstallation.getClientCredentialsAdapterConfig(session, client); for (Map.Entry<String, Object> entry : adapterConfig.entrySet()) { builder.append("/subsystem=keycloak/secure-deployment=").append(deploymentName).append("/") .append("credential=").append(entry.getKey()).append(":add(value=").append(entry.getValue()) .append(")\n"); } } return Response.ok(builder.toString(), MediaType.TEXT_PLAIN_TYPE).build(); }

Target:
public Response generateInstallation(KeycloakSession session, RealmModel realm, ClientModel client, URI baseUri) { String deploymentName = "WAR MODULE NAME.war"; StringBuilder builder = new StringBuilder(); builder .append("/subsystem=keycloak/secure-deployment=").append(quote(deploymentName)).append("/:add( \\\n") .append(" realm=").append(quote(realm.getName())).append(", \\\n") .append(" resource=").append(quote(client.getClientId())).append(", \\\n") .append(" auth-server-url=").append(baseUri).append(", \\\n"); if (client.isBearerOnly()){ builder.append(" bearer-only=true, \\\n"); } else if (client.isPublicClient()) { builder.append(" public-client=true, \\\n"); } if (KeycloakOIDCClientInstallation.showVerifyTokenAudience(client)) { builder.append(" verify-token-audience=true, \\\n"); } if (client.getRoles().size() > 0) { builder.append(" use-resource-role-mappings=true, \\\n"); } builder.append(" ssl-required=").append(realm.getSslRequired().name()).append(")\n\n"); if (KeycloakOIDCClientInstallation.showClientCredentialsAdapterConfig(client)) { Map<String, Object> adapterConfig = KeycloakOIDCClientInstallation.getClientCredentialsAdapterConfig(session, client); for (Map.Entry<String, Object> entry : adapterConfig.entrySet()) { builder.append("/subsystem=keycloak/secure-deployment=").append(quote(deploymentName)).append("/") .append("credential=").append(entry.getKey()).append(":add(value=").append(entry.getValue()) .append(")\n"); } } return Response.ok(builder.toString(), MediaType.TEXT_PLAIN_TYPE).build(); }
Source:
public Aggregation(StreamInput in) throws IOException { functionInfo = new FunctionInfo(in); valueType = DataTypes.fromStream(in); if (in.getVersion().onOrAfter(Version.V_4_1_0)) { filter = Symbols.fromStream(in); } else { filter = Literal.BOOLEAN_TRUE; } inputs = Symbols.listFromStream(in); if (in.getVersion().onOrAfter(Version.V_4_1_0) && in.readBoolean()) { signature = new Signature(in); } else { signature = null; } }

Target:
public Aggregation(StreamInput in) throws IOException { functionInfo = new FunctionInfo(in); valueType = DataTypes.fromStream(in); if (in.getVersion().onOrAfter(Version.V_4_1_0)) { filter = Symbols.fromStream(in); } else { filter = Literal.BOOLEAN_TRUE; } inputs = Symbols.listFromStream(in); if (in.getVersion().onOrAfter(Version.V_4_2_0) && in.readBoolean()) { signature = new Signature(in); } else { signature = null; } }
Source:
public static gov.hhs.fha.nhinc.patientdiscovery.persistence.HibernateUtil getPatientDiscoveryHibernateUtil() { ClassPathXmlApplicationContext context = ClassPathSingleton.CONTEXT; LOG.debug("Memory address getPatientDiscoveryHibernateUtil {}", context.getId()); if (patientDiscoveryHibernateUtil == null) { patientDiscoveryHibernateUtil = context.getBean(NhincConstants.PATIENT_DISCOVERY_HIBERNATE_BEAN, gov.hhs.fha.nhinc.patientdiscovery.persistence.HibernateUtil.class); } return patientDiscoveryHibernateUtil; }

Target:
public static gov.hhs.fha.nhinc.patientdiscovery.persistence.HibernateUtil getPatientDiscoveryHibernateUtil() { ClassPathXmlApplicationContext context = ClassPathSingleton.CONTEXT; if (patientDiscoveryHibernateUtil == null) { patientDiscoveryHibernateUtil = context.getBean(NhincConstants.PATIENT_DISCOVERY_HIBERNATE_BEAN, gov.hhs.fha.nhinc.patientdiscovery.persistence.HibernateUtil.class); } return patientDiscoveryHibernateUtil; }
Source:
public String preparePdfHeader(Study study, Study site, String studySubjectIdentifier) { String siteName = null; String studyName = null; String participantID = studySubjectIdentifier.trim(); MessageFormat pdfHeaderFormat1 = new MessageFormat("{0}: {1} - Participant {2}"); MessageFormat pdfHeaderFormat2 = new MessageFormat("{0} - Participant {2}"); if(study != null) { studyName = study.getName(); } if(site !=null) { siteName = site.getName(); } Object[] headerArgs = {studyName, siteName,participantID}; String pdfHeader; if(siteName !=null) { pdfHeader = pdfHeaderFormat1.format(headerArgs); }else { pdfHeader = pdfHeaderFormat2.format(headerArgs); } return pdfHeader; }

Target:
public String preparePdfHeader(Study study, Study site, String studySubjectIdentifier) { String siteName = null; String studyName = null; String participantID = studySubjectIdentifier.trim(); if(study != null) { studyName = study.getName(); } if(site !=null) { siteName = site.getName(); } Object[] headerArgs = {studyName, siteName,participantID}; String pdfHeader; if(siteName !=null) { pdfHeader = pdfHeaderFormat1.format(headerArgs); }else { pdfHeader = pdfHeaderFormat2.format(headerArgs); } return pdfHeader; }
Source:
public void localSegments(IntSet localSegments) { segments.forEach((int s) -> { if (!localSegments.contains(s)) { if (trace) { log.tracef("Could not process segment %s", s); } segmentsLost.add(s); } }); }

Target:
public void localSegments(IntSet localSegments) { for (PrimitiveIterator.OfInt segmentIterator = segments.iterator(); segmentIterator.hasNext(); ) { int segment = segmentIterator.nextInt(); if (!localSegments.contains(segment)) { if (trace) { log.tracef("Could not process segment %s", segment); } segmentsLost.add(segment); } } }
Source:
public void testFailWithMultipleDisksWhichOneInBackupStorage() { final VM vm = new VM(); command.setVm(vm); when(vmDao.get(command.getParameters().getVmId())).thenReturn(vm); command.setCluster(new Cluster()); Guid storageDomainId1 = initDiskImage(vm); when(storageDomainStaticDao.get(storageDomainId1)).thenReturn(backupStorageDomain(false)); Guid storageDomainId2 = initDiskImage(vm); when(storageDomainStaticDao.get(storageDomainId2)).thenReturn(backupStorageDomain(true)); assertFalse("checkDisksNotInBackupStorage() fails to run because one or more disk is in backup domain", command.checkDisksInBackupStorage()); }

Target:
public void testFailWithMultipleDisksWhichOneInBackupStorage() { final VM vm = new VM(); command.setVm(vm); when(vmDao.get(command.getParameters().getVmId())).thenReturn(vm); command.setCluster(new Cluster()); Guid storageDomainId1 = initDiskImage(vm); when(storageDomainStaticDao.get(storageDomainId1)).thenReturn(backupStorageDomain(false)); Guid storageDomainId2 = initDiskImage(vm); when(storageDomainStaticDao.get(storageDomainId2)).thenReturn(backupStorageDomain(true)); assertTrue("checkDisksNotInBackupStorage() fails to run because one or more disk is in backup domain", command.checkDisksInBackupStorage()); }
Source:
public List<Tree.Kind> nodesToVisit() { return ImmutableList.of(Tree.Kind.CLASS, Tree.Kind.METHOD); }

Target:
public List<Tree.Kind> nodesToVisit() { return ImmutableList.of(Tree.Kind.CLASS); }