auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public void checkAttributeValue(PerunSessionImpl sess, User user, Attribute attribute) throws InternalErrorException, WrongAttributeValueException, WrongAttributeAssignmentException, WrongReferenceAttributeValueException { Attribute userCertDNs; try { userCertDNs = sess.getPerunBl().getAttributesManagerBl().getAttribute(sess, user, AttributesManager.NS_USER_ATTR_DEF + ":userCertDNs"); } catch (AttributeNotExistsException ex) { throw new ConsistencyErrorException(ex); } Map<String, String> certDNsValue; if(userCertDNs.getValue() != null) { certDNsValue = (Map<String, String>) userCertDNs.getValue(); } else { if(attribute.getValue() != null) throw new WrongReferenceAttributeValueException(attribute, userCertDNs, "There is no certificates for this user so preferred certificate can't be choose."); else return; } if(attribute.getValue() == null) { if(certDNsValue != null) throw new WrongAttributeValueException(attribute, user, "This attribute value can't be null because of notNull attribute userCertDNs"); } else { String preferredCertDNValue = (String) attribute.getValue(); if(!certDNsValue.containsKey(preferredCertDNValue)) throw new WrongAttributeValueException(attribute, "This attribute value must be one of exsiting keys in userCertDNs."); } }

Target:
public void checkAttributeValue(PerunSessionImpl sess, User user, Attribute attribute) throws InternalErrorException, WrongAttributeValueException, WrongAttributeAssignmentException, WrongReferenceAttributeValueException { Attribute userCertDNs; try { userCertDNs = sess.getPerunBl().getAttributesManagerBl().getAttribute(sess, user, AttributesManager.NS_USER_ATTR_DEF + ":userCertDNs"); } catch (AttributeNotExistsException ex) { throw new ConsistencyErrorException(ex); } Map<String, String> certDNsValue; if(userCertDNs.getValue() != null) { certDNsValue = (Map<String, String>) userCertDNs.getValue(); } else { if(attribute.getValue() != null) throw new WrongReferenceAttributeValueException(attribute, userCertDNs, "There is no certificates for this user so preferred certificate can't be choose."); else return; } if(attribute.getValue() == null) { if(certDNsValue != null && !certDNsValue.isEmpty()) throw new WrongAttributeValueException(attribute, user, "This attribute value can't be null because of notNull attribute userCertDNs"); } else { String preferredCertDNValue = (String) attribute.getValue(); if(!certDNsValue.containsKey(preferredCertDNValue)) throw new WrongAttributeValueException(attribute, "This attribute value must be one of exsiting keys in userCertDNs."); } }
Source:
private void monitorThreadPoolExecutor(ExecutorService executor, String name, String... tags) { String className = executor.getClass().getName(); if (executor instanceof ThreadPoolExecutor) { CountedThreadFactory.monitorThreads( meterRegistry, (ThreadPoolExecutor) executor, name, Tags.of(tags)); CountedRejectedExecutionHandler.monitorRejections( meterRegistry, (ThreadPoolExecutor) executor, name, Tags.of(tags)); } else if (className.equals( "java.util.concurrent.Executors$DelegatedScheduledExecutorService")) { ThreadPoolExecutor unwrappedExecutor = unwrapThreadPoolExecutor(executor, executor.getClass()); CountedThreadFactory.monitorThreads(meterRegistry, unwrappedExecutor, name, Tags.of(tags)); CountedRejectedExecutionHandler.monitorRejections( meterRegistry, unwrappedExecutor, name, Tags.of(tags)); } else if (className.equals( "java.util.concurrent.Executors$FinalizableDelegatedExecutorService")) { ThreadPoolExecutor unwrappedExecutor = unwrapThreadPoolExecutor(executor, executor.getClass().getSuperclass()); CountedThreadFactory.monitorThreads(meterRegistry, unwrappedExecutor, name, Tags.of(tags)); CountedRejectedExecutionHandler.monitorRejections( meterRegistry, unwrappedExecutor, name, Tags.of(tags)); } }

Target:
private void monitorThreadPoolExecutor(ExecutorService executor, String name, String... tags) { String className = executor.getClass().getName(); ThreadPoolExecutor unwrappedThreadPoolExecutor = null; if (executor instanceof ThreadPoolExecutor) { unwrappedThreadPoolExecutor = (ThreadPoolExecutor) executor; } else if (className.equals( "java.util.concurrent.Executors$DelegatedScheduledExecutorService")) { unwrappedThreadPoolExecutor = unwrapThreadPoolExecutor(executor, executor.getClass()); } else if (className.equals( "java.util.concurrent.Executors$FinalizableDelegatedExecutorService")) { unwrappedThreadPoolExecutor = unwrapThreadPoolExecutor(executor, executor.getClass().getSuperclass()); } if (unwrappedThreadPoolExecutor != null) { CountedThreadFactory.monitorThreads( meterRegistry, unwrappedThreadPoolExecutor, name, Tags.of(tags)); CountedRejectedExecutionHandler.monitorRejections( meterRegistry, unwrappedThreadPoolExecutor, name, Tags.of(tags)); } }
Source:
public void publish(String topic, String message) { if (senderChannel == null) { return; } try { senderChannel.publish(topic, message.getBytes()); } catch (Exception e) { logger.error("Error publishing message"); } }

Target:
public void publish(String topic, String message) { if (senderChannel == null) { return; } try { senderChannel.publish(topic, message.getBytes()); } catch (Exception e) { logger.error("Error publishing message: {}", e.getMessage()); } }
Source:
boolean areAllContainersRunning(Pod pod) { PodStatus podStatus = pod.getStatus(); if (podStatus == null) { return false; } List<ContainerStatus> containerStatuses = pod.getStatus().getContainerStatuses(); if (containerStatuses.isEmpty()) { return false; } for (ContainerStatus containerStatus : containerStatuses) { if (containerStatus != null) { ContainerStateWaiting waitingState = containerStatus.getState().getWaiting(); if (waitingState != null) { String waitingStateMsg = waitingState.getMessage(); if (waitingStateMsg != null && waitingStateMsg.contains("Back-off pulling image")) { LOGGER.log(Level.INFO, "Unable to pull Docker image"); Jenkins jenkins = Jenkins.getInstanceOrNull(); if (jenkins != null) { Queue q = jenkins.getQueue(); for (Queue.Item item : q.getItems()) { Label itemLabel = item.getAssignedLabel(); if (itemLabel != null && isCorrespondingLabels(itemLabel.getDisplayName(), pod.getMetadata().getName(), LOGGER)) { String itemTaskName = item.task.getFullDisplayName(); String jobName = getJobName(itemTaskName); if (jobName.equals("")) { LOGGER.log(Level.WARNING, "Unknown / Invalid job format name"); break; } Run run = getCorrespondingJobBuild(jenkins.allItems(Job.class).iterator(), jobName, getBuildNumber(itemTaskName)); if (run != null) { try { writeStream(run, "ERROR: Unable to pull Docker image. Check if image name is spelled correctly"); } catch (IOException e) { LOGGER.log(Level.WARNING, "ERROR: Unable to print bad Docker image error message to build console"); } } q.cancel(item); break; } } } } return false; } if (containerStatus.getState().getTerminated() != null) { return false; } if (!containerStatus.getReady()) { return false; } } } return true; }

Target:
boolean areAllContainersRunning(Pod pod) { PodStatus podStatus = pod.getStatus(); if (podStatus == null) { return false; } List<ContainerStatus> containerStatuses = pod.getStatus().getContainerStatuses(); if (containerStatuses.isEmpty()) { return false; } for (ContainerStatus containerStatus : containerStatuses) { if (containerStatus != null) { ContainerStateWaiting waitingState = containerStatus.getState().getWaiting(); if (waitingState != null) { String waitingStateMsg = waitingState.getMessage(); if (waitingStateMsg != null && waitingStateMsg.contains("Back-off pulling image")) { runListener.error("Unable to pull Docker image \""+containerStatus.getImage()+"\". Check if image name is spelled correctly"); Jenkins jenkins = Jenkins.getInstanceOrNull(); if (jenkins != null) { Queue q = jenkins.getQueue(); for (Queue.Item item : q.getItems()) { Label itemLabel = item.getAssignedLabel(); if (itemLabel != null && isCorrespondingLabels(itemLabel.getDisplayName(), pod.getMetadata().getName())) { String itemTaskName = item.task.getFullDisplayName(); String jobName = getJobName(itemTaskName); if (jobName.equals("")) { LOGGER.log(Level.WARNING, "Unknown / Invalid job format name"); break; } q.cancel(item); break; } } } } return false; } if (containerStatus.getState().getTerminated() != null) { return false; } if (!containerStatus.getReady()) { return false; } } } return true; }
Source:
protected void executeCommand() { List<VmNumaNode> vmNumaNodes = getParameters().getVmNumaNodeList(); Guid vdsId = getVm().getDedicatedVmForVds(); List<VdsNumaNode> vdsNumaNodes = new ArrayList<>(); if (vdsId != null) { vdsNumaNodes = getVdsNumaNodeDao().getAllVdsNumaNodeByVdsId(vdsId); } List<VdsNumaNode> nodes = new ArrayList<>(); for (VmNumaNode vmNumaNode : vmNumaNodes) { for (Pair<Guid, Pair<Boolean, Integer>> pair : vmNumaNode.getVdsNumaNodeList()) { if (pair.getSecond().getFirst()) { int index = pair.getSecond().getSecond(); for (VdsNumaNode vdsNumaNode : vdsNumaNodes) { if (vdsNumaNode.getIndex() == index) { pair.setFirst(vdsNumaNode.getId()); break; } } } } nodes.add(vmNumaNode); } getVmNumaNodeDao().massUpdateNumaNode(nodes); setSucceeded(true); }

Target:
protected void executeCommand() { List<VmNumaNode> vmNumaNodes = getParameters().getVmNumaNodeList(); Guid vdsId = getVm().getDedicatedVmForVds(); List<VdsNumaNode> vdsNumaNodes = new ArrayList<>(); if (vdsId != null) { vdsNumaNodes = getVdsNumaNodeDao().getAllVdsNumaNodeByVdsId(vdsId); } List<VdsNumaNode> nodes = new ArrayList<>(); for (VmNumaNode vmNumaNode : vmNumaNodes) { for (Pair<Guid, Pair<Boolean, Integer>> pair : vmNumaNode.getVdsNumaNodeList()) { if (pair.getSecond() != null && pair.getSecond().getFirst()) { int index = pair.getSecond().getSecond(); for (VdsNumaNode vdsNumaNode : vdsNumaNodes) { if (vdsNumaNode.getIndex() == index) { pair.setFirst(vdsNumaNode.getId()); break; } } } } nodes.add(vmNumaNode); } getVmNumaNodeDao().massUpdateNumaNode(nodes); setSucceeded(true); }
Source:
public Mono<HttpResponse> process(HttpPipelineCallContext context, HttpPipelineNextPolicy next) { final UrlBuilder urlBuilder = UrlBuilder.parse(context.getHttpRequest().getUrl()); if (overwrite || urlBuilder.getPort() == null) { logger.info("Changing port to {}", port); try { context.getHttpRequest().setUrl(urlBuilder.setPort(port).toURL()); } catch (MalformedURLException e) { return Mono.error(new RuntimeException( String.format("Failed to set port %d to http request.", port), e)); } } return next.process(); }

Target:
public Mono<HttpResponse> process(HttpPipelineCallContext context, HttpPipelineNextPolicy next) { final UrlBuilder urlBuilder = UrlBuilder.parse(context.getHttpRequest().getUrl()); if (overwrite || urlBuilder.getPort() == null) { logger.info("Changing port to {}", port); try { context.getHttpRequest().setUrl(urlBuilder.setPort(port).toURL()); } catch (MalformedURLException e) { return Mono.error(new RuntimeException( String.format("Failed to set the HTTP request port to %d.", port), e)); } } return next.process(); }
Source:
public void testCrud() { Instant inserted = mockClock.instant(); CharacterDao dao = dbRule.getJdbi().onDemand(CharacterDao.class); dao.insert(new Character(1, "Moiraine Sedai")); assertThat(dao.findById(1)).contains(new Character(1, "Moiraine Sedai", inserted, inserted)); mockClock.advance(10, SECONDS); Instant modified = mockClock.instant(); assertThat(inserted).isBefore(modified); dao.update(new Character(1, "Mistress Alys")); assertThat(dao.findById(1)).contains(new Character(1, "Mistress Alys", inserted, modified)); dao.delete(1); assertThat(dao.findById(1)).isEmpty(); }

Target:
public void testCrud() { Instant inserted = mockClock.instant(); CharacterDao dao = dbRule.getJdbi().onDemand(CharacterDao.class); dao.insert(new Character(1, "Moiraine Sedai")); assertThat(dao.findById(1)).contains(new Character(1, "Moiraine Sedai", inserted, inserted)); Instant modified = mockClock.advance(10, SECONDS); assertThat(inserted).isBefore(modified); dao.update(new Character(1, "Mistress Alys")); assertThat(dao.findById(1)).contains(new Character(1, "Mistress Alys", inserted, modified)); dao.delete(1); assertThat(dao.findById(1)).isEmpty(); }
Source:
private void clearIfNeeded(Address lockHolder) { if(!rpcManager.getMembers().contains(lockHolder)) { final Directory directory = getDirectoryProvider().getDirectory(); log.warn("Forcing clear of index lock"); ((DirectoryExtensions) directory).forceUnlock(IndexWriter.WRITE_LOCK_NAME); } }

Target:
private void clearIfNeeded(Address lockHolder) { if (!rpcManager.getMembers().contains(lockHolder)) { final Directory directory = getDirectoryProvider().getDirectory(); log.debug("Forcing clear of index lock"); ((DirectoryExtensions) directory).forceUnlock(IndexWriter.WRITE_LOCK_NAME); } }
Source:
public void contributeToPopupMenu(final IMenuManager menu, final IWorkbenchPart part) { if (part instanceof SiriusDiagramEditor) { final SiriusDiagramEditor diagrampart = (SiriusDiagramEditor) part; final EditPart editpart = diagrampart.getDiagramGraphicalViewer().getFocusEditPart(); if (editpart instanceof IGraphicalEditPart && !(editpart instanceof NoteEditPart)) { final IGraphicalEditPart curPart = (IGraphicalEditPart) editpart; final EObject eObj = curPart.resolveSemanticElement(); if (eObj instanceof DRepresentationElement) { EObject target = ((DRepresentationElement) eObj).getTarget(); if (target == null || target.eResource() == null) { return; } } if (editpart instanceof ISiriusEditPart) { final MenuManager newMenuManager = new MenuManager("New", SubDiagramMenu.MENU_NEW_REPRESENTATION_ID); if (menu.getItems() != null) { menu.insertBefore(menu.getItems()[FIRST_ITEM_INDEX].getId(), newMenuManager); } else { menu.add(newMenuManager); } final Separator createGroup = new Separator(CREATE_REPRESENTATION_GROUP_SEPARATOR); newMenuManager.add(createGroup); if (eObj instanceof DDiagramElement) { createDetailsActions((DDiagramElement) eObj, newMenuManager, diagrampart.getEditingDomain(), curPart); } } else { } } } }

Target:
public void contributeToPopupMenu(final IMenuManager menu, final IWorkbenchPart part) { if (part instanceof SiriusDiagramEditor) { final SiriusDiagramEditor diagrampart = (SiriusDiagramEditor) part; final EditPart editpart = diagrampart.getDiagramGraphicalViewer().getFocusEditPart(); if (editpart instanceof IGraphicalEditPart && !(editpart instanceof NoteEditPart)) { final IGraphicalEditPart curPart = (IGraphicalEditPart) editpart; final EObject eObj = curPart.resolveSemanticElement(); if (eObj instanceof DRepresentationElement) { EObject target = ((DRepresentationElement) eObj).getTarget(); if (target == null || target.eResource() == null) { return; } } if (editpart instanceof ISiriusEditPart) { final MenuManager newMenuManager = new MenuManager("New", SubDiagramMenu.MENU_NEW_REPRESENTATION_ID); if (!menu.isEmpty()) { menu.insertBefore(menu.getItems()[0].getId(), newMenuManager); } else { menu.add(newMenuManager); } final Separator createGroup = new Separator(CREATE_REPRESENTATION_GROUP_SEPARATOR); newMenuManager.add(createGroup); if (eObj instanceof DDiagramElement) { createDetailsActions((DDiagramElement) eObj, newMenuManager, diagrampart.getEditingDomain(), curPart); } } else { } } } }
Source:
public static DoublesSketch deserialize(final Object serializedSketch) { if (serializedSketch instanceof String) { return deserializeFromBase64EncodedString((String) serializedSketch); } else if (serializedSketch instanceof byte[]) { return deserializeFromByteArray((byte[]) serializedSketch); } else if (serializedSketch instanceof DoublesSketch) { return (DoublesSketch) serializedSketch; } throw new IllegalStateException( "Object is not of a type that can be deserialized to a quantiles DoublsSketch: " + serializedSketch.getClass()); }

Target:
public static DoublesSketch deserialize(final Object serializedSketch) { if (serializedSketch instanceof String) { return deserializeFromBase64EncodedString((String) serializedSketch); } else if (serializedSketch instanceof byte[]) { return deserializeFromByteArray((byte[]) serializedSketch); } else if (serializedSketch instanceof DoublesSketch) { return (DoublesSketch) serializedSketch; } throw new ISE( "Object is not of a type that can be deserialized to a quantiles DoublsSketch: " + serializedSketch.getClass()); }
Source:
public void testCommandWithDomainArguments() { final ContainerSpec containerSpec = new ContainerSpec(); containerSpec.setId("templateId"); containerSpec.setContainerName("containerId"); KieServerControllerDescriptorCommand command = new KieServerControllerDescriptorCommand(SpecManagementService.class.getName(), "saveContainerSpec", null, null, "templateId", containerSpec); final String content = WebSocketUtils.marshal(marshallingFormat.getType(), command); LOGGER.info("{} content\n{}", marshallingFormat.getType(), content); KieServerControllerServiceResponse response = service.executeCommand(WebSocketUtils.unmarshal(content, marshallingFormat.getType(), KieServerControllerDescriptorCommand.class)); assertNotNull(response); assertEquals(response.getMsg(), SUCCESS, response.getType()); assertNull(response.getResult()); }

Target:
public void testCommandWithDomainArguments() { final ContainerSpec containerSpec = new ContainerSpec(); containerSpec.setId(CONTAINER_SPEC_ID); containerSpec.setContainerName(CONTAINER_SPEC_NAME); KieServerControllerDescriptorCommand command = new KieServerControllerDescriptorCommand(SpecManagementService.class.getName(), "saveContainerSpec", null, null, "templateId", containerSpec); final String content = WebSocketUtils.marshal(marshallingFormat.getType(), command); LOGGER.info("{} content\n{}", marshallingFormat.getType(), content); KieServerControllerServiceResponse response = service.executeCommand(WebSocketUtils.unmarshal(content, marshallingFormat.getType(), KieServerControllerDescriptorCommand.class)); assertNotNull(response); assertEquals(response.getMsg(), SUCCESS, response.getType()); assertNull(response.getResult()); }
Source:
void doClose() { if (asyncTaskExecutor.hasPendingTransactions() || !handlerController.asyncTransactionCallbacks.isEmpty()) { String canonicalPath = getPath(); RealmLog.w("Realm " + canonicalPath + " will be closed with pending async transactions or callbacks."); } if (sharedGroupManager != null) { sharedGroupManager.close(); sharedGroupManager = null; } if (handler != null) { removeHandler(); } }

Target:
void doClose() { if (sharedGroupManager != null) { sharedGroupManager.close(); sharedGroupManager = null; } if (handler != null) { removeHandler(); } }
Source:
public void lineGetBackground(LineBackgroundEvent event) { Color lineBackgroundColor = new Color(Display.getCurrent(), 225, 225, 225); currentDocumentUri = LSPEclipseUtils.toUri(LSPEclipseUtils.getFile(currentDocument)); inactiveRegions = fileInactiveRegionsMap.get(currentDocumentUri); try { if (this.inactiveRegions == null) { return; } for (Range eachInactiveRange : this.inactiveRegions) { int regionStartLine = eachInactiveRange.getStart().getLine(); int regionEndLine = eachInactiveRange.getEnd().getLine(); if (event.lineOffset >= currentDocument.getLineOffset(regionStartLine) && event.lineOffset <= currentDocument.getLineOffset(regionEndLine)) { event.lineBackground = lineBackgroundColor; break; } } } catch (BadLocationException e) { Activator.log(e); } }

Target:
public void lineGetBackground(LineBackgroundEvent event) { lineBackgroundColor = new Color(Display.getCurrent(), PreferenceConverter.getColor(CUIPlugin.getDefault().getPreferenceStore(), CEditor.INACTIVE_CODE_COLOR)); if(currentDocument == null) { return; } currentDocumentUri = LSPEclipseUtils.toUri(LSPEclipseUtils.getFile(currentDocument)); inactiveRegions = fileInactiveRegionsMap.get(currentDocumentUri); if (this.inactiveRegions == null) { return; } try { for (Range eachInactiveRange : this.inactiveRegions) { int regionStartLine = eachInactiveRange.getStart().getLine(); int regionEndLine = eachInactiveRange.getEnd().getLine(); if (event.lineOffset >= currentDocument.getLineOffset(regionStartLine) && event.lineOffset <= currentDocument.getLineOffset(regionEndLine)) { event.lineBackground = lineBackgroundColor; break; } } } catch (BadLocationException e) { Activator.log(e); } }
Source:
public ScenarioForceTemplate(int forceAlignment, int generationMethod, double forceMultiplier, List<Integer> deploymentZones, int destinationZone, int retreatThreshold, int allowedUnitType) { this.forceAlignment = forceAlignment; this.generationMethod = generationMethod; this.forceMultiplier = forceMultiplier; this.deploymentZones = deploymentZones == null ? new ArrayList<>() : deploymentZones; this.destinationZone = destinationZone; this.retreatThreshold = retreatThreshold; this.allowedUnitType = allowedUnitType; }

Target:
public ScenarioForceTemplate(int forceAlignment, int generationMethod, double forceMultiplier, List<Integer> deploymentZones, int destinationZone, int retreatThreshold, int allowedUnitType) { this.forceAlignment = forceAlignment; this.generationMethod = generationMethod; this.forceMultiplier = forceMultiplier; this.deploymentZones = new ArrayList<>(); this.destinationZone = destinationZone; this.retreatThreshold = retreatThreshold; this.allowedUnitType = allowedUnitType; Collections.copy(this.deploymentZones, deploymentZones); }
Source:
private boolean shouldFlushLogQueue(boolean endOfBatch) { return immediateFlush || endOfBatch || logQueue.size() >= queueCapacity; }

Target:
private boolean shouldFlushLogQueue(boolean endOfBatch) { return immediateFlush || endOfBatch; }
Source:
private int fullTableScan(TableReference tableRef, KeyValueService kvs, int numCellsExpected, boolean thorough) { CandidateCellForSweepingRequest request = ImmutableCandidateCellForSweepingRequest.builder() .startRowInclusive(PtBytes.EMPTY_BYTE_ARRAY) .batchSizeHint(1000) .maxTimestampExclusive(Long.MAX_VALUE) .shouldCheckIfLatestValueIsEmpty(thorough) .ignoreGarbageCollectionSentinels(!thorough) .build(); try (ClosableIterator<List<CandidateCellForSweeping>> iter = kvs.getCandidateCellsForSweeping( tableRef, request)) { int numCandidates = Iterators.size(Iterators.concat(Iterators.transform(iter, List::iterator))); Preconditions.checkState(numCandidates == numCellsExpected, "Number of candidates %s != %s", numCandidates, numCellsExpected); return numCandidates; } }

Target:
private int fullTableScan(TableReference tableRef, KeyValueService kvs, int numCellsExpected, boolean thorough) { CandidateCellForSweepingRequest request = ImmutableCandidateCellForSweepingRequest.builder() .startRowInclusive(PtBytes.EMPTY_BYTE_ARRAY) .batchSizeHint(1000) .maxTimestampExclusive(Long.MAX_VALUE) .shouldCheckIfLatestValueIsEmpty(thorough) .shouldDeleteGarbageCollectionSentinels(thorough) .build(); try (ClosableIterator<List<CandidateCellForSweeping>> iter = kvs.getCandidateCellsForSweeping( tableRef, request)) { int numCandidates = Iterators.size(Iterators.concat(Iterators.transform(iter, List::iterator))); Preconditions.checkState(numCandidates == numCellsExpected, "Number of candidates %s != %s", numCandidates, numCellsExpected); return numCandidates; } }
Source:
public void onCorrectAdminPassword(AdminPasswordDialog.Action action) { switch (action) { case ADMIN_SETTINGS: startActivity(new Intent(this, AdminPreferencesActivity.class)); break; case STORAGE_MIGRATION: StorageMigrationDialog storageMigrationDialog = (StorageMigrationDialog) DialogUtils.getDialogFragment(StorageMigrationDialog.class, getSupportFragmentManager()); if (storageMigrationDialog != null) { storageMigrationDialog.startStorageMigration(); } break; } }

Target:
public void onCorrectAdminPassword(AdminPasswordDialog.Action action) { switch (action) { case ADMIN_SETTINGS: startActivity(new Intent(this, AdminPreferencesActivity.class)); break; case STORAGE_MIGRATION: DialogUtils .showIfNotShowing(StorageMigrationDialog.create(savedCount), getSupportFragmentManager()) .startStorageMigration(); break; } }
Source:
public int hashCode() { return Objects.hashCode(locale, review); }

Target:
public int hashCode() { return Objects.hash(locale, review); }
Source:
private void remove() { if (getWindow() != null) { return; } RemoveStorageModel model = new RemoveStorageModel(); setWindow(model); model.setTitle(ConstantsManager.getInstance().getConstants().removeStoragesTitle()); model.setHelpTag(HelpTag.remove_storage); model.setHashName("remove_storage"); StorageDomain storage = (StorageDomain) getSelectedItem(); boolean localFsOnly = storage.getStorageType() == StorageType.LOCALFS; AsyncDataProvider.getInstance().getHostsForStorageOperation(new AsyncQuery(new Object[]{this, model}, new INewAsyncCallback() { @Override public void onSuccess(Object target, Object returnValue) { Object[] array = (Object[]) target; StorageListModel storageListModel = (StorageListModel) array[0]; RemoveStorageModel removeStorageModel = (RemoveStorageModel) array[1]; StorageDomain storage = (StorageDomain) storageListModel.getSelectedItem(); ArrayList<VDS> hosts = (ArrayList<VDS>) returnValue; removeStorageModel.getHostList().setItems(hosts); removeStorageModel.getHostList().setSelectedItem(Linq.firstOrDefault(hosts)); removeStorageModel.getFormat().setEntity(!storage.getStorageDomainType().isIsoOrImportExportDomain()); if (hosts.isEmpty()) { UICommand tempVar = createCancelCommand("Cancel"); tempVar.setIsDefault(true); removeStorageModel.getCommands().add(tempVar); } else { UICommand command; command = createOKCommand("OnRemove"); removeStorageModel.getCommands().add(command); command = createCancelCommand("Cancel"); removeStorageModel.getCommands().add(command); } } }), null, localFsOnly); }

Target:
private void remove() { if (getWindow() != null) { return; } RemoveStorageModel model = new RemoveStorageModel(); setWindow(model); model.setTitle(ConstantsManager.getInstance().getConstants().removeStoragesTitle()); model.setHelpTag(HelpTag.remove_storage); model.setHashName("remove_storage"); StorageDomain storage = (StorageDomain) getSelectedItem(); boolean localFsOnly = storage.getStorageType() == StorageType.LOCALFS; AsyncDataProvider.getInstance().getHostsForStorageOperation(new AsyncQuery(new Object[]{this, model}, new INewAsyncCallback() { @Override public void onSuccess(Object target, Object returnValue) { Object[] array = (Object[]) target; StorageListModel storageListModel = (StorageListModel) array[0]; RemoveStorageModel removeStorageModel = (RemoveStorageModel) array[1]; StorageDomain storage = (StorageDomain) storageListModel.getSelectedItem(); ArrayList<VDS> hosts = (ArrayList<VDS>) returnValue; removeStorageModel.getHostList().setItems(hosts); removeStorageModel.getHostList().setSelectedItem(Linq.firstOrDefault(hosts)); removeStorageModel.getFormat().setEntity(storage.getStorageDomainType().isDataDomain()); if (hosts.isEmpty()) { UICommand tempVar = createCancelCommand("Cancel"); tempVar.setIsDefault(true); removeStorageModel.getCommands().add(tempVar); } else { UICommand command; command = createOKCommand("OnRemove"); removeStorageModel.getCommands().add(command); command = createCancelCommand("Cancel"); removeStorageModel.getCommands().add(command); } } }), null, localFsOnly); }
Source:
public void testCreateFixedInstanceServer() { fixedInstanceServer = serverApi().createFixedInstanceServer(Server.CreateFixedInstanceServer.create( "java test fixed instance 2", "testing with jclouds", FixedInstanceHardware.create(currentFlavour.id()), "7C5FA1D21B98DE39D7516333AAB7DA54", null, "Test123!", null, Boolean.TRUE, null, null, null, null)); assertNotNull(fixedInstanceServer); assertNotNull(fixedInstanceServer.id()); assertEquals(currentFlavour.hardware().vcore(), fixedInstanceServer.hardware().vcore()); assertEquals(currentFlavour.hardware().coresPerProcessor(), fixedInstanceServer.hardware().coresPerProcessor()); assertEquals(currentFlavour.hardware().ram(), fixedInstanceServer.hardware().ram()); }

Target:
public void testCreateFixedInstanceServer() { Server.CreateFixedInstanceServer request = Server.CreateFixedInstanceServer.builder() .name("java test fixed instance") .description("testing with jclouds") .hardware(FixedInstanceHardware.create(currentFlavour.id())) .applianceId("7C5FA1D21B98DE39D7516333AAB7DA54") .password("Test123!") .powerOn(Boolean.TRUE).build(); fixedInstanceServer = serverApi().createFixedInstanceServer(request); assertNotNull(fixedInstanceServer); assertNotNull(fixedInstanceServer.id()); assertEquals(currentFlavour.hardware().vcore(), fixedInstanceServer.hardware().vcore()); assertEquals(currentFlavour.hardware().coresPerProcessor(), fixedInstanceServer.hardware().coresPerProcessor()); assertEquals(currentFlavour.hardware().ram(), fixedInstanceServer.hardware().ram()); }
Source:
public void onRequestPermissionsResult(int requestCode, @NonNull String permissions[], @NonNull int[] grantResults) { if (requestCode == REQUEST_CODE) { if (grantResults.length > 0 && grantResults[0] == PackageManager.PERMISSION_GRANTED) { permissionGranted = true; showFileChooser(); } else { finish(); } } }

Target:
public void onRequestPermissionsResult(int requestCode, @NonNull String permissions[], @NonNull int[] grantResults) { if (requestCode == REQUEST_CODE) { if (grantResults.length > 0 && grantResults[0] == PackageManager.PERMISSION_GRANTED) { permissionGranted = true; Toast.makeText(getApplicationContext(), "Permission to Access External Storage Granted !", Toast.LENGTH_SHORT).show(); showFileChooser(); } else { Toast.makeText(getApplicationContext(), "Permission to Access External Storage Denied :(", Toast.LENGTH_SHORT).show(); finish(); } } }
Source:
public void noAutoBuild() throws Exception { final String projectName = "ValidationErrors"; final IProgressMonitor monitor = new NullProgressMonitor(); final IProject project = createAndPopulateProject(projectName, monitor); IMarker[] markers = findMarkersOnResource(project); Assert.assertArrayEquals(Collections.<IMarker> emptyList().toArray(), markers); setAutoBuild(false); ProjectNature.toggleNature(project, ValidationNature.NATURE_ID); Job.getJobManager().join(ResourcesPlugin.FAMILY_AUTO_BUILD, monitor); markers = findMarkersOnResource(project); Assert.assertArrayEquals(Collections.<IMarker> emptyList().toArray(), markers); }

Target:
public void noAutoBuild() throws CoreException, IOException { final String projectName = "ValidationErrors"; final IProgressMonitor monitor = new NullProgressMonitor(); final IProject project = createAndPopulateProject(projectName, monitor); IMarker[] markers = findMarkersOnResource(project); Assert.assertArrayEquals(Collections.<IMarker> emptyList().toArray(), markers); setAutoBuild(false); ProjectNature.toggleNature(project, ValidationNature.NATURE_ID); waitForAuroBuild(); markers = findMarkersOnResource(project); Assert.assertArrayEquals(Collections.<IMarker> emptyList().toArray(), markers); }
Source:
public Expression generateIL(GenContext ctx) { CallableExprGenerator cegExpr = value.getCallableExpr(ctx); Expression exprToAssign = cegExpr.genExpr(); ValueType exprType = exprToAssign.getExprType(); CallableExprGenerator cegReceiver = target.getCallableExpr(ctx); Expression exprFieldGet = cegReceiver.genExpr(); if (!(exprFieldGet instanceof FieldGet)) throw new RuntimeException("Should be assigning to object"); FieldGet fieldGet = (FieldGet) exprFieldGet; String fieldName = fieldGet.getName(); Expression objExpr = fieldGet.getObjectExpr(); return new wyvern.target.corewyvernIL.expression.FieldSet(exprType, objExpr, fieldName, exprToAssign); }

Target:
public Expression generateIL(GenContext ctx) { CallableExprGenerator cegExpr = value.getCallableExpr(ctx); Expression exprToAssign = cegExpr.genExpr(); ValueType exprType = exprToAssign.getExprType(); CallableExprGenerator cegReceiver = target.getCallableExpr(ctx); Expression exprFieldGet = cegReceiver.genExpr(); if (!(exprFieldGet instanceof FieldGet)) ToolError.reportError(ErrorMessage.EXPECTED_RECORD_TYPE, HasLocation.UNKNOWN); FieldGet fieldGet = (FieldGet) exprFieldGet; String fieldName = fieldGet.getName(); Expression objExpr = fieldGet.getObjectExpr(); return new wyvern.target.corewyvernIL.expression.FieldSet(exprType, objExpr, fieldName, exprToAssign); }
Source:
public TimeLockServices createTimeLockServices( String client, Supplier<ManagedTimestampService> rawTimestampServiceSupplier, Supplier<LockService> rawLockServiceSupplier) { log.info("Creating async timelock services for client {}", SafeArg.of("client", client)); AsyncOrLegacyTimelockService asyncOrLegacyTimelockService; LockService lockService = instrumentInLeadershipProxy( LockService.class, asyncLockConfiguration.disableLegacySafetyChecksWarningPotentialDataCorruption() ? rawLockServiceSupplier : JavaSuppliers.compose(NonTransactionalLockService::new, rawLockServiceSupplier), client); if (runtime.get().clientTokens().containsKey(client)) { SecureTimelockService secureTimelockService = instrumentInLeadershipProxy( SecureTimelockService.class, () -> AsyncTimeLockServicesCreator.createRawSecureTimelockService(client, rawTimestampServiceSupplier), client); asyncOrLegacyTimelockService = AsyncOrLegacyTimelockService.createFromSecureTimelock( new SecureTimelockResource(secureTimelockService)); return TimeLockServices.create( secureTimelockService, lockService, asyncOrLegacyTimelockService, secureTimelockService); } AsyncTimelockService asyncTimelockService = instrumentInLeadershipProxy( AsyncTimelockService.class, () -> AsyncTimeLockServicesCreator.createRawAsyncTimelockService(client, rawTimestampServiceSupplier), client); asyncOrLegacyTimelockService = AsyncOrLegacyTimelockService.createFromAsyncTimelock( new AsyncTimelockResource(asyncTimelockService)); return TimeLockServices.create( asyncTimelockService, lockService, asyncOrLegacyTimelockService, asyncTimelockService); }

Target:
public TimeLockServices createTimeLockServices( String client, Supplier<ManagedTimestampService> rawTimestampServiceSupplier, Supplier<LockService> rawLockServiceSupplier) { log.info("Creating async timelock services for client {}", SafeArg.of("client", client)); AsyncOrLegacyTimelockService asyncOrLegacyTimelockService; AsyncTimelockService asyncTimelockService = instrumentInLeadershipProxy( metricsManager.getTaggedRegistry(), AsyncTimelockService.class, () -> createRawAsyncTimelockService(client, rawTimestampServiceSupplier), client); asyncOrLegacyTimelockService = AsyncOrLegacyTimelockService.createFromAsyncTimelock( new AsyncTimelockResource(lockLog, asyncTimelockService)); LockService lockService = instrumentInLeadershipProxy( metricsManager.getTaggedRegistry(), LockService.class, asyncLockConfiguration.disableLegacySafetyChecksWarningPotentialDataCorruption() ? rawLockServiceSupplier : JavaSuppliers.compose(NonTransactionalLockService::new, rawLockServiceSupplier), client); return TimeLockServices.create( asyncTimelockService, lockService, asyncOrLegacyTimelockService, asyncTimelockService); }
Source:
public static List<Program> preparePrograms() { List<Program> programs = new ArrayList<>(); List<Stage> stages = new ArrayList<>(); List<TrackedEntityAttribute> attributes = new ArrayList<>(); TrackedEntityAttribute attribute1 = new TrackedEntityAttribute("attribute1", "uuid"); TrackedEntityAttribute attribute2 = new TrackedEntityAttribute("attribute2", "uuid"); attributes.add(attribute1); attributes.add(attribute2); TrackedEntity trackedEntity = new TrackedEntity("trackedEntityName","trackedEntityID"); Program program1 = new Program(); program1.setName("Program1"); program1.setUuid("program1UUID"); program1.setRegistration(true); program1.setSingleEvent(false); program1.setTrackedEntity(trackedEntity); program1.setStages(stages); program1.setAttributes(attributes); Program program2 = new Program(); program2.setName("Program2"); program2.setUuid("program2UUID"); program2.setRegistration(true); program2.setSingleEvent(false); program2.setTrackedEntity(trackedEntity); program2.setStages(stages); program2.setAttributes(attributes); programs.add(program1); programs.add(program2); return programs; }

Target:
public static List<Program> preparePrograms() { List<Program> programs = new ArrayList<>(); List<Stage> stages = new ArrayList<>(); List<TrackedEntityAttribute> attributes = new ArrayList<>(); attributes.add(new TrackedEntityAttribute("attribute1", "uuid")); attributes.add(new TrackedEntityAttribute("attribute2", "uuid")); TrackedEntity trackedEntity = new TrackedEntity("trackedEntityName","trackedEntityID"); programs.add(new Program("program1UUID", "Program1", trackedEntity, stages, attributes, false, true, null)); programs.add(new Program("program2UUID", "Program2", trackedEntity, stages, attributes, false, true, null)); return programs; }
Source:
public void inspectRuntimeShape(RuntimeShapeInspector inspector) { inspector.visit("delegate", delegate); }

Target:
public void inspectRuntimeShape(RuntimeShapeInspector inspector) { inspector.visit("cachedValues", cachedValues != null); inspector.visit("delegate", delegate); }
Source:
public static File getProjectExamplesFile(URL url, String prefix, String suffix, IProgressMonitor monitor) { File offline = OfflineUtil.getOfflineFile(url); File file = null; if (PROTOCOL_FILE.equals(url.getProtocol()) || PROTOCOL_PLATFORM.equalsIgnoreCase(url.getProtocol())) { try { file = new File(new URI(url.toExternalForm())); } catch (Exception e) { file = new File(url.getFile()); } if (!file.exists()) return null; } else { if (OfflineUtil.isOfflineEnabled()) { return OfflineUtil.getOfflineFile(url); } if (monitor.isCanceled()) { return null; } file = getCacheFile(url); long urlModified = getRemoteTimestamp(url); if( canReuseCache(file, url, urlModified)) { return file; } file.getParentFile().mkdirs(); if (monitor.isCanceled()) { return null; } file = downloadExamplesFile(file, prefix, url, urlModified, monitor); } return file; }

Target:
public static File getProjectExamplesFile(URL url, String prefix, String suffix, IProgressMonitor monitor) { File file = null; if (PROTOCOL_FILE.equals(url.getProtocol()) || PROTOCOL_PLATFORM.equalsIgnoreCase(url.getProtocol())) { try { file = new File(new URI(url.toExternalForm())); } catch (Exception e) { file = new File(url.getFile()); } if (!file.exists()) return null; } else { if (OfflineUtil.isOfflineEnabled()) { return OfflineUtil.getOfflineFile(url); } if (monitor.isCanceled()) { return null; } file = getCacheFile(url); long urlModified = getRemoteTimestamp(url); if( canReuseCache(file, url, urlModified)) { return file; } file.getParentFile().mkdirs(); if (monitor.isCanceled()) { return null; } file = downloadExamplesFile(file, prefix, url, urlModified, monitor); } return file; }
Source:
private IMethod[] toArray(List<IMethod> methods) { return methods.toArray(new IMethod[methods.size()]); }

Target:
private static IMethod[] toArray(List<IMethod> methods) { return methods.toArray(new IMethod[methods.size()]); }
Source:
public void update() { synchronized (mutex) { seedTracker.refreshSeeds(); Optional<Entity> upNode = Iterables.tryFind(getMembers(), EntityPredicates.attributeEqualTo(SERVICE_UP, Boolean.TRUE)); setAttribute(SERVICE_UP, upNode.isPresent()); if (upNode.isPresent()) { setAttribute(HOSTNAME, upNode.get().getAttribute(HOSTNAME)); setAttribute(THRIFT_PORT, upNode.get().getAttribute(THRIFT_PORT)); List<String> currentNodes = getAttribute(CASSANDRA_CLUSTER_NODES); Set<String> oldNodes = (currentNodes != null) ? ImmutableSet.copyOf(currentNodes) : ImmutableSet.<String>of(); Set<String> newNodes = MutableSet.<String>of(); for (Entity member : getMembers()) { if (member instanceof CassandraNode && member.getAttribute(SERVICE_UP) == Boolean.TRUE) { HostAndPort address = HostAndPort.fromParts(member.getAttribute(HOSTNAME), member.getAttribute(THRIFT_PORT)); newNodes.add(address.toString()); } } if (Sets.difference(oldNodes, newNodes).size() > 0) { setAttribute(CASSANDRA_CLUSTER_NODES, MutableList.copyOf(newNodes)); } } else { setAttribute(HOSTNAME, null); setAttribute(THRIFT_PORT, null); setAttribute(CASSANDRA_CLUSTER_NODES, Collections.<String>emptyList()); } } }

Target:
public void update() { synchronized (mutex) { seedTracker.refreshSeeds(); Optional<Entity> upNode = Iterables.tryFind(getMembers(), EntityPredicates.attributeEqualTo(SERVICE_UP, Boolean.TRUE)); setAttribute(SERVICE_UP, upNode.isPresent()); if (upNode.isPresent()) { setAttribute(HOSTNAME, upNode.get().getAttribute(Attributes.HOSTNAME)); setAttribute(THRIFT_PORT, upNode.get().getAttribute(CassandraNode.THRIFT_PORT)); List<String> currentNodes = getAttribute(CASSANDRA_CLUSTER_NODES); Set<String> oldNodes = (currentNodes != null) ? ImmutableSet.copyOf(currentNodes) : ImmutableSet.<String>of(); Set<String> newNodes = MutableSet.<String>of(); for (Entity member : getMembers()) { if (member instanceof CassandraNode && member.getAttribute(SERVICE_UP) == Boolean.TRUE) { HostAndPort address = HostAndPort.fromParts(member.getAttribute(HOSTNAME), member.getAttribute(THRIFT_PORT)); newNodes.add(address.toString()); } } if (Sets.symmetricDifference(oldNodes, newNodes).size() > 0) { setAttribute(CASSANDRA_CLUSTER_NODES, MutableList.copyOf(newNodes)); } } else { setAttribute(HOSTNAME, null); setAttribute(THRIFT_PORT, null); setAttribute(CASSANDRA_CLUSTER_NODES, Collections.<String>emptyList()); } } }
Source:
private void doClear() { if (true || formRenderer.isValid()) { formRenderer.synchronize(); } formRenderer.unBind(); }

Target:
private void doClear() { if (formRenderer.isValid()) { formRenderer.forceModelSynchronization(); } formRenderer.unBind(); }
Source:
public UserDTO addUser(UserDTO user) { validateUserFields(user); user.getPrivateData().getVpnProfile().setVpnPassword(generatePassword()); User userEntity = user.createUserEntity(); userEntity.setConfirmationCode(CryptoUtil.getRandomDigits(5)); userEntity = User.getRepository().save(userEntity); ldapUserService.createVPNAccount(userEntity.getVPNLoginID().toString(), userEntity.getVPNPassword()); UserDTO userDTO = UserDTO.createInstanceWithPrivateData(userEntity); if (properties.getIsRunningInTestMode()) { userDTO.setConfirmationCode(userEntity.getConfirmationCode()); } else { sendMobileNumberConfirmationMessage(userEntity); } return userDTO; }

Target:
public UserDTO addUser(UserDTO user) { validateUserFields(user); user.getPrivateData().getVpnProfile().setVpnPassword(generatePassword()); User userEntity = user.createUserEntity(); userEntity.setConfirmationCode(CryptoUtil.getRandomDigits(mobileNumberConfirmationCodeDigits)); userEntity = User.getRepository().save(userEntity); ldapUserService.createVPNAccount(userEntity.getVPNLoginID().toString(), userEntity.getVPNPassword()); UserDTO userDTO = UserDTO.createInstanceWithPrivateData(userEntity); if (properties.getIsRunningInTestMode()) { userDTO.setConfirmationCode(userEntity.getConfirmationCode()); } else { sendMobileNumberConfirmationMessage(userEntity); } return userDTO; }
Source:
public void channelRead0(ChannelHandlerContext ctx, HttpObject obj) throws RestServiceException { logger.trace("Reading on channel " + ctx.channel() + " from " + ctx.channel().remoteAddress()); if (obj != null) { if (vetRequest(obj)) { RestObject convertedObj = convertObjToGeneric(obj); handleMessage(convertedObj); } else { logger.error("Malformed request received - " + obj); nettyMetrics.malformedRequestErrorCount.inc(); throw new RestServiceException("Malformed request received - " + obj, RestServiceErrorCode.BadRequest); } } }

Target:
public void channelRead0(ChannelHandlerContext ctx, HttpObject obj) throws RestServiceException { logger.trace("Reading on channel " + ctx.channel() + " from " + ctx.channel().remoteAddress()); if (obj != null && obj instanceof HttpRequest) { if (obj.getDecoderResult().isSuccess()) { handleRequest((HttpRequest) obj); } else { logger.error("Malformed request received - " + obj); nettyMetrics.malformedRequestErrorCount.inc(); throw new RestServiceException("Malformed request received - " + obj, RestServiceErrorCode.MalformedRequest); } } else if (obj != null && obj instanceof HttpContent) { handleContent((HttpContent) obj); } else { nettyMetrics.unknownHttpObjectErrorCount.inc(); throw new RestServiceException("Content received is null or not of a known type", RestServiceErrorCode.UnknownHttpObject); } }
Source:
public RetryingPrestoThriftServiceProvider( ConnectedThriftServiceProvider original, @ForRetryDriver ListeningScheduledExecutorService retryExecutor, ThriftConnectorConfig config) { this.original = requireNonNull(original, "original is null"); retry = RetryDriver.retry(requireNonNull(retryExecutor, "retryExecutor is null")) .maxAttempts(config.getMaxRetryAttempts()) .stopRetryingWhen(e -> e instanceof PrestoThriftServiceException && !((PrestoThriftServiceException) e).isRetryable()) .withClassifier(RetryingPrestoThriftServiceProvider::classifyException) .exponentialBackoff( config.getMinRetrySleepTime(), config.getMaxRetrySleepTime(), config.getMaxRetryDuration(), config.getRetryScaleFactor()); }

Target:
public RetryingPrestoThriftServiceProvider( ConnectedThriftServiceProvider original, @ForRetryDriver ListeningScheduledExecutorService retryExecutor, ThriftConnectorConfig config) { this.original = requireNonNull(original, "original is null"); requireNonNull(retryExecutor, "retryExecutor is null"); requireNonNull(config, "config is null"); retry = RetryDriver.retry(retryExecutor) .maxAttempts(config.getMaxRetryAttempts()) .stopRetryingWhen(e -> e instanceof PrestoThriftServiceException && !((PrestoThriftServiceException) e).isRetryable()) .withClassifier(RetryingPrestoThriftServiceProvider::classifyException) .exponentialBackoff( config.getMinRetrySleepTime(), config.getMaxRetrySleepTime(), config.getMaxRetryDuration(), config.getRetryScaleFactor()); }
Source:
public ListenableFuture<PlayerResult> movePlaylistItem( @IntRange(from = 0) int fromIndex, @IntRange(from = 0) int toIndex) { ResolvableFuture<PlayerResult> future = ResolvableFuture.<PlayerResult>create(); future.set(new PlayerResult(RESULT_ERROR_UNKNOWN, getCurrentMediaItem())); return future; }

Target:
public ListenableFuture<PlayerResult> movePlaylistItem( @IntRange(from = 0) int fromIndex, @IntRange(from = 0) int toIndex) { ResolvableFuture<PlayerResult> future = ResolvableFuture.<PlayerResult>create(); future.set(new PlayerResult(RESULT_ERROR_NOT_SUPPORTED, getCurrentMediaItem())); return future; }
Source:
public void startUp() { metricsProcessor.startAsync(); logTailer.startAsync(); sink.startAsync(); }

Target:
public void startUp() { serviceManager.startAsync().awaitHealthy(); }
Source:
public void addData(String guid, String classification, PageOrientation orientation) { DataRightEntry toAdd = new DataRightEntry(); toAdd.setClassification(classification); toAdd.setGuid(guid); toAdd.setOrientation(orientation); if (data == null) { data = new ArrayList<DataRightEntry>(); } data.add(toAdd); }

Target:
public void addData(String guid, String classification, PageOrientation orientation) { DataRightEntry toAdd = new DataRightEntry(); toAdd.setClassification(classification); toAdd.setGuid(guid); toAdd.setOrientation(orientation); getData(); data.add(toAdd); }