auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public void validateUserGroupProperties() { if (this.sessionStateless) { if (allowedGroupsConfigured()) { LOGGER.warn("Group names are not supported if you set 'sessionSateless' to 'true'."); } } else if (!allowedGroupsConfigured()) { throw new IllegalArgumentException("One of the User Group Properties must be populated. " + "Please populate azure.activedirectory.user-group.allowed-groups"); } if (!DEFAULT_GROUP_RELATIONSHIP.equalsIgnoreCase(groupRelationship) && !"transitive".equalsIgnoreCase(groupRelationship)) { throw new IllegalArgumentException("Configuration 'azure.activedirectory.group-relationship' " + "should be 'direct' or 'transitive'."); } }

Target:
public void validateUserGroupProperties() { if (this.sessionStateless) { if (allowedGroupsConfigured()) { LOGGER.warn("Group names are not supported if you set 'sessionSateless' to 'true'."); } } else if (!allowedGroupsConfigured()) { throw new IllegalArgumentException("One of the User Group Properties must be populated. " + "Please populate azure.activedirectory.user-group.allowed-groups"); } if (!GROUP_RELATIONSHIP_DIRECT.equalsIgnoreCase(userGroup.groupRelationship) && !GROUP_RELATIONSHIP_TRANSITIVE.equalsIgnoreCase(userGroup.groupRelationship)) { throw new IllegalArgumentException("Configuration 'azure.activedirectory.user-group.group-relationship' " + "should be 'direct' or 'transitive'."); } }
Source:
+ public String unknownBeatmap() { + return "Συγνώμη, δεν γνωρίζω αυτό το τραγούδι. Ίσως είναι αρκετά νεο, πολυ δύσκολο, μη εγκεκριμένο ή να μην είναι για το osu standard mode." ; + }

Target:
public String unknownBeatmap() { return "Συγνώμη, δεν γνωρίζω αυτό το τραγούδι. Ίσως είναι αρκετά νεο, πολυ δύσκολο, μη εγκεκριμένο ή να μην είναι για το osu standard mode." ; }
Source:
public void addTab(BasePanel basePanel, boolean raisePanel) { DefaultTaskExecutor.runInJavaFXThread(() -> { Tab newTab = new Tab(basePanel.getTabTitle(), basePanel); tabbedPane.getTabs().add(newTab); newTab.setOnCloseRequest(event -> closeTab((BasePanel) newTab.getContent())); updateAllTabTitles(); if (raisePanel) { tabbedPane.getSelectionModel().select(newTab); } basePanel.getUndoManager().registerListener(new UndoRedoEventManager()); BibDatabaseContext context = basePanel.getBibDatabaseContext(); if (readyForAutosave(context)) { AutosaveManager autosaver = AutosaveManager.start(context); autosaver.registerListener(new AutosaveUIManager(basePanel)); } BackupManager.start(context); trackOpenNewDatabase(basePanel); }); }

Target:
public void addTab(BasePanel basePanel, boolean raisePanel) { DefaultTaskExecutor.runInJavaFXThread(() -> { Tab newTab = new Tab(basePanel.getTabTitle(), basePanel); tabbedPane.getTabs().add(newTab); newTab.setOnCloseRequest(event -> { closeTab((BasePanel) newTab.getContent()); event.consume(); }); updateAllTabTitles(); if (raisePanel) { tabbedPane.getSelectionModel().select(newTab); } basePanel.getUndoManager().registerListener(new UndoRedoEventManager()); BibDatabaseContext context = basePanel.getBibDatabaseContext(); if (readyForAutosave(context)) { AutosaveManager autosaver = AutosaveManager.start(context); autosaver.registerListener(new AutosaveUIManager(basePanel)); } BackupManager.start(context); trackOpenNewDatabase(basePanel); }); }
Source:
public void register(final Class<?> clazz, final Object converter) { otherWord = ""; }

Target:
private void register(final Class<?> clazz, final Object converter) { otherWord = ""; }
Source:
public ParticleEffectBuilder count(int count) throws IllegalArgumentException { if (count < 1) { throw new IllegalArgumentException("Count may not be less than 1."); } else { this.count = count; } return this; }

Target:
public ParticleEffectBuilder count(int count) throws IllegalArgumentException { Preconditions.checkArgument(count > 0); this.count = count; return this; }
Source:
public BaseScreenlet getScreenlet(Context context, AssetEntry assetEntry, HashMap<String, Integer> layouts, boolean autoLoad) { String className = assetEntry.getClassName(); switch (className) { case "com.liferay.document.library.kernel.model.DLFileEntry": BaseFileDisplayScreenlet screenlet = getDLFileEntryScreenlet(context, assetEntry.getMimeType()); if (screenlet != null) { Integer layoutId = layouts.get(screenlet.getClass().getName()); screenlet.setFileEntry((FileEntry) assetEntry); screenlet.setAutoLoad(autoLoad); screenlet.render(layoutId); return screenlet; } case "com.liferay.blogs.kernel.model.BlogsEntry": BlogsEntryDisplayScreenlet blogsScreenlet = new BlogsEntryDisplayScreenlet(context); Integer layoutId = layouts.get(blogsScreenlet.getClass().getName()); blogsScreenlet.setBlogsEntry((BlogsEntry) assetEntry); blogsScreenlet.setAutoLoad(autoLoad); blogsScreenlet.render(layoutId); return blogsScreenlet; default: return null; } }

Target:
public BaseScreenlet getScreenlet(Context context, AssetEntry assetEntry, HashMap<String, Integer> layouts, boolean autoLoad) { String className = assetEntry.getClassName(); switch (className) { case "com.liferay.document.library.kernel.model.DLFileEntry": BaseFileDisplayScreenlet screenlet = getDLFileEntryScreenlet(context, assetEntry.getMimeType()); if (screenlet != null) { Integer layoutId = layouts.get(screenlet.getClass().getName()); screenlet.setFileEntry((FileEntry) assetEntry); screenlet.setAutoLoad(autoLoad); screenlet.render(layoutId); return screenlet; } return null; case "com.liferay.blogs.kernel.model.BlogsEntry": BlogsEntryDisplayScreenlet blogsScreenlet = new BlogsEntryDisplayScreenlet(context); Integer layoutId = layouts.get(blogsScreenlet.getClass().getName()); blogsScreenlet.setBlogsEntry((BlogsEntry) assetEntry); blogsScreenlet.setAutoLoad(autoLoad); blogsScreenlet.render(layoutId); return blogsScreenlet; default: return null; } }
Source:
public Resolution findMethod(Env env, JavaType site, String name, List<JavaType> argTypes) { return findMethod(env, site, site, name, argTypes, ImmutableList.<JavaType>of()); }

Target:
public Resolution findMethod(Env env, JavaType site, String name, List<JavaType> argTypes) { return findMethod(env, site, site, name, argTypes, ImmutableList.<JavaType>of(), false); }
Source:
public void testFollow() { TmfTraceManager traceManager = TmfTraceManager.getInstance(); ITmfTrace ust = traceManager.getActiveTrace(); assertNotNull(ust); ITmfTrace kernelTest = CtfTmfTestTraceUtils.getTrace(CtfTestTrace.CONTEXT_SWITCHES_KERNEL); SWTBotUtils.openTrace(TRACE_PROJECT_NAME, kernelTest.getPath(), TRACETYPE_ID); SWTBotEditor kernelEditor = SWTBotUtils.activateEditor(fBot, kernelTest.getName()); fBot.editorByTitle(kernelTest.getName()); ITmfTrace kernel = traceManager.getActiveTrace(); assertNotNull(kernel); SWTBotTable kernelEventTable = kernelEditor.bot().table(); SWTBotTableItem kernelEvent = kernelEventTable.getTableItem(5); kernelEvent.contextMenu("Follow time updates from other traces").click(); SWTBotUtils.activateEditor(fBot, ust.getName()); TmfSignalManager.dispatchSignal(new TmfWindowRangeUpdatedSignal(this, RANGE, ust)); IWorkbenchPart part = fOriginalViewBot.getViewReference().getPart(false); assertTrue(part instanceof AbstractTimeGraphView); AbstractTimeGraphView abstractTimeGraphView = (AbstractTimeGraphView) part; fBot.waitUntil(new PinAndCloneCondition(abstractTimeGraphView, ust, RANGE)); SWTBotUtils.activateEditor(fBot, kernel.getName()); fBot.waitUntil(new PinAndCloneCondition(abstractTimeGraphView, kernel, RANGE)); kernelTest.dispose(); }

Target:
public void testFollow() { TmfTraceManager traceManager = TmfTraceManager.getInstance(); ITmfTrace ust = traceManager.getActiveTrace(); assertNotNull(ust); ITmfTrace kernelTest = CtfTmfTestTraceUtils.getTrace(CtfTestTrace.CONTEXT_SWITCHES_KERNEL); SWTBotUtils.openTrace(TRACE_PROJECT_NAME, kernelTest.getPath(), TRACETYPE_ID); SWTBotEditor kernelEditor = SWTBotUtils.activateEditor(fBot, kernelTest.getName()); fBot.editorByTitle(kernelTest.getName()); ITmfTrace kernel = traceManager.getActiveTrace(); assertNotNull(kernel); SWTBotTable kernelEventTable = kernelEditor.bot().table(); SWTBotTableItem kernelEvent = kernelEventTable.getTableItem(5); kernelEvent.contextMenu(FOLLOW_TIME_UPDATES_FROM_OTHER_TRACES).click(); SWTBotUtils.activateEditor(fBot, ust.getName()); TmfSignalManager.dispatchSignal(new TmfWindowRangeUpdatedSignal(this, RANGE, ust)); IWorkbenchPart part = fOriginalViewBot.getViewReference().getPart(false); assertTrue(part instanceof AbstractTimeGraphView); AbstractTimeGraphView abstractTimeGraphView = (AbstractTimeGraphView) part; fBot.waitUntil(new PinAndCloneCondition(abstractTimeGraphView, ust, RANGE)); SWTBotUtils.activateEditor(fBot, kernel.getName()); fBot.waitUntil(new PinAndCloneCondition(abstractTimeGraphView, kernel, RANGE)); kernelEvent.contextMenu(FOLLOW_TIME_UPDATES_FROM_OTHER_TRACES).click(); TmfSignalManager.dispatchSignal(new TmfWindowRangeUpdatedSignal(this, ust.getInitialTimeRange(), ust)); fBot.waitUntil(new PinAndCloneCondition(abstractTimeGraphView, kernel, RANGE)); kernelTest.dispose(); }
Source:
public CentralRepoAccount getOrCreateAccount(CentralRepoAccountType crAccountType, String accountUniqueID) throws CentralRepoException { String query = "INSERT INTO accounts (account_type_id, account_unique_identifier) " + "VALUES ( " + crAccountType.getAccountTypeId() + ", '" + accountUniqueID + "' ) ON CONFLICT DO NOTHING"; try (Connection connection = connect(); Statement s = connection.createStatement();) { s.execute(query); return getAccount(crAccountType, accountUniqueID); } catch (SQLException ex) { throw new CentralRepoException("Error adding an account to CR database.", ex); } }

Target:
public CentralRepoAccount getOrCreateAccount(CentralRepoAccountType crAccountType, String accountUniqueID) throws CentralRepoException { CentralRepoAccount account = getAccount(crAccountType, accountUniqueID); if (null == account) { String insertSQL = "INSERT INTO accounts (account_type_id, account_unique_identifier) " + "VALUES (?, ?) " + getConflictClause(); try (Connection connection = connect(); PreparedStatement preparedStatement = connection.prepareStatement(insertSQL);) { preparedStatement.setInt(1, crAccountType.getAccountTypeId()); preparedStatement.setString(2, accountUniqueID); preparedStatement.executeUpdate(); account = getAccount(crAccountType, accountUniqueID); } catch (SQLException ex) { throw new CentralRepoException("Error adding an account to CR database.", ex); } } return account; }
Source:
public String toString() { return String.format("title = [ %s ], author = [ %s ], company = [ %s ]", title.toString(), author.toString(), company.toString()); }

Target:
public String toString() { return String.format("title = [ %s ], author = [ %s ], company = [ %s ]", title, author, company); }
Source:
private void overrideParameters() { if (getParameters().getOperation() == ImageOperation.Copy) { getParameters().setUseCopyCollapse(true); getParameters().setAddImageDomainMapping(false); Guid newId = Guid.newGuid(); Guid newGroupId = Guid.newGuid(); DiskImage image = getImage(); image.setId(newGroupId); image.setImageId(newId); image.setDiskAlias(getDiskAlias()); image.setStorageIds(new ArrayList<Guid>()); image.getStorageIds().add(getParameters().getStorageDomainId()); image.setQuotaId(getParameters().getQuotaId()); image.setDiskProfileId(getParameters().getDiskProfileId()); getParameters().setDestinationImageId(newId); getParameters().setImageGroupID(getParameters().getImageGroupID()); getParameters().setDestImageGroupId(newGroupId); } else { getParameters().setUseCopyCollapse(false); getParameters().setDestinationImageId(getImageId()); getParameters().setImageGroupID(getImageGroupId()); getParameters().setDestImageGroupId(getImageGroupId()); } getParameters().setVolumeFormat(getDiskImage().getVolumeFormat()); getParameters().setVolumeType(getDiskImage().getVolumeType()); getParameters().setCopyVolumeType(CopyVolumeType.SharedVol); getParameters().setParentCommand(getActionType()); getParameters().setParentParameters(getParameters()); getParameters().setDiskProfileId(getImage().getDiskProfileId()); }

Target:
private void overrideParameters() { boolean isTemplate = isTemplate(); if (getParameters().getOperation() == ImageOperation.Copy) { getParameters().setUseCopyCollapse(true); getParameters().setAddImageDomainMapping(true); if (!isTemplate) { getParameters().setAddImageDomainMapping(false); Guid newId = Guid.newGuid(); Guid newGroupId = Guid.newGuid(); DiskImage image = getImage(); image.setId(newGroupId); image.setImageId(newId); image.setDiskAlias(getDiskAlias()); image.setStorageIds(new ArrayList<Guid>()); image.getStorageIds().add(getParameters().getStorageDomainId()); image.setQuotaId(getParameters().getQuotaId()); image.setDiskProfileId(getParameters().getDiskProfileId()); getParameters().setDestinationImageId(newId); getParameters().setImageGroupID(getParameters().getImageGroupID()); getParameters().setDestImageGroupId(newGroupId); } } else { getParameters().setUseCopyCollapse(false); } if (getParameters().getOperation() == ImageOperation.Move || isTemplate) { getParameters().setDestinationImageId(getImageId()); getParameters().setImageGroupID(getImageGroupId()); getParameters().setDestImageGroupId(getImageGroupId()); } getParameters().setVolumeFormat(getDiskImage().getVolumeFormat()); getParameters().setVolumeType(getDiskImage().getVolumeType()); getParameters().setCopyVolumeType(CopyVolumeType.SharedVol); getParameters().setParentCommand(getActionType()); getParameters().setParentParameters(getParameters()); getParameters().setDiskProfileId(getImage().getDiskProfileId()); }
Source:
public GraphTraversal<Vertex, Vertex> findById(UUID timId) { IndexHits<Node> hits = getExactIndex(ID_INDEX).query(TIM_ID, timId.toString()); List<Long> ids = StreamSupport.stream(hits.spliterator(), false).map(h -> h.getId()).collect(toList()); return ids.isEmpty() ? EmptyGraphTraversal.instance() : traversal().V(ids); }

Target:
public Optional<Vertex> findById(UUID timId) { IndexHits<Node> hits = getIdIndex(ID_INDEX).query(TIM_ID, timId.toString()); List<Long> ids = StreamIterator.stream(hits.iterator()).map(h -> h.getId()).collect(toList()); GraphTraversal<Vertex, Vertex> vertexT = traversal().V(ids); return !ids.isEmpty() && vertexT.hasNext() ? Optional.of(vertexT.next()) : Optional.empty(); }
Source:
public Response queryCaseUserTasksByVariables(@Context HttpHeaders headers, String payload, @ApiParam(value = "optional pagination - at which page to start, defaults to 0 (meaning first)", required = false) @QueryParam("page") @DefaultValue("0") Integer page, @ApiParam(value = "optional pagination - size of the result, defaults to 10", required = false) @QueryParam("pageSize") @DefaultValue("10") Integer pageSize) { Header conversationIdHeader = buildConversationIdHeader("", context, headers); Variant v = getVariant(headers); try { String type = getContentType(headers); CaseUserTaskWithVariablesList taskVariableSummaryList = caseManagementRuntimeDataServiceBase.queryUserTasksByVariables(payload, type, new QueryContext((page * pageSize), pageSize)); logger.debug("Returning result of process instance search: {}", taskVariableSummaryList); return createCorrectVariant(taskVariableSummaryList, headers, Response.Status.OK, conversationIdHeader); } catch (Exception e) { logger.error("Unexpected error during processing {}", e.getMessage(), e); return internalServerError(errorMessage(e), v, conversationIdHeader); } }

Target:
public Response queryCaseUserTasksByVariables(@Context HttpHeaders headers, String payload, @ApiParam(value = "optional pagination - at which page to start, defaults to 0 (meaning first)", required = false) @QueryParam("page") @DefaultValue("0") Integer page, @ApiParam(value = "optional pagination - size of the result, defaults to 10", required = false) @QueryParam("pageSize") @DefaultValue("10") Integer pageSize) { Header conversationIdHeader = buildConversationIdHeader("", context, headers); Variant v = getVariant(headers); try { String type = getContentType(headers); CaseUserTaskWithVariablesList taskVariableSummaryList = caseManagementRuntimeDataServiceBase.queryUserTasksByVariables(payload, type, new QueryContext((page * pageSize), pageSize)); logger.debug("Returning result of case instance user task search: {}", taskVariableSummaryList); return createCorrectVariant(taskVariableSummaryList, headers, Response.Status.OK, conversationIdHeader); } catch (Exception e) { logger.error("Unexpected error during processing {}", e.getMessage(), e); return internalServerError(errorMessage(e), v, conversationIdHeader); } }
Source:
protected boolean validateLeaseStorageDomain(Guid leaseStorageDomainId) { StorageDomain domain = storageDomainDao.get(leaseStorageDomainId); StorageDomainValidator validator = new StorageDomainValidator(domain); if (!validate(validator.isDomainExistAndActive())) { return false; } if (!getStoragePoolId().equals(domain.getStoragePoolId())) { return failValidation(EngineMessage.ACTION_TYPE_FAILED_LEASE_STORAGE_IS_NOT_A_PART_OF_POOL); } return true; }

Target:
protected boolean validateLeaseStorageDomain(Guid leaseStorageDomainId) { StorageDomain domain = storageDomainDao.get(leaseStorageDomainId); StorageDomainValidator validator = new StorageDomainValidator(domain); if (!validate(validator.isDomainExistAndActive()) || validate(validator.isDataDomain())) { return false; } if (!getStoragePoolId().equals(domain.getStoragePoolId())) { return failValidation(EngineMessage.ACTION_TYPE_FAILED_LEASE_STORAGE_IS_NOT_A_PART_OF_POOL); } return true; }
Source:
public static boolean isRedirectURIValid(String redirectURI) { if (!redirectURI.startsWith("http")) { return true; } if (redirectURI.startsWith("https") || redirectURI.startsWith("http://localhost")) { return true; } return false; }

Target:
public static boolean isRedirectURIValid(String redirectURI) { if (redirectURI.startsWith("https") || !redirectURI.startsWith("http")) { return true; } return LOCALHOST_PATTERN.matcher(redirectURI).matches(); }
Source:
public static void setup() { for (int i = 0; i < 16; i++) { FloatStatus zero = ControlInterface.mainTuning.getFloat("current-zero", 0.0f); FloatInput current = FloatMixing.createDispatch(Igneous.getPDPChannelCurrent(i), Igneous.globalPeriodic); Cluck.publish("Zero Current (channel " + i + ")", FloatMixing.pumpEvent(current, zero)); Cluck.publish("Current (channel " + i + ")", FloatMixing.subtraction.of(current, (FloatInput) zero)); } }

Target:
public static void setup() { for (int i = 0; i < 16; i++) { FloatStatus zero = ControlInterface.mainTuning.getFloat("current-zero-" + i, 0.0f); FloatInput current = FloatMixing.createDispatch(Igneous.getPDPChannelCurrent(i), Igneous.globalPeriodic); Cluck.publish("Zero Current " + i, FloatMixing.pumpEvent(current, zero)); Cluck.publish("Current " + i, FloatMixing.subtraction.of(current, (FloatInput) zero)); } }
Source:
public String getId() { return "org.eclipse.rse.remotecdt.dsf.debug.RemoteCDSFDebuggerTab"; }

Target:
public String getId() { return "org.eclipse.cdt.docker.launch.debug.RemoteCDSFDebuggerTab"; }
Source:
private void cleanUpWorkspaceResources(final String deploymentName, final String namespace) throws IOException { Deployment deployment = KubernetesResourceUtil.getDeploymentByName(deploymentName, namespace); Service service = KubernetesResourceUtil.getServiceBySelector(OpenShiftConnector.OPENSHIFT_DEPLOYMENT_LABEL, deploymentName, namespace); List<Route> routes = KubernetesResourceUtil.getRoutesByLabel(OpenShiftConnector.OPENSHIFT_DEPLOYMENT_LABEL, deploymentName, namespace); List<ReplicaSet> replicaSets = KubernetesResourceUtil.getReplicaSetByLabel(OpenShiftConnector.OPENSHIFT_DEPLOYMENT_LABEL, deploymentName, namespace); try (OpenShiftClient openShiftClient = new DefaultOpenShiftClient()) { if (replicaSets != null && replicaSets.size() > 0) { LOG.info("Removing OpenShift ReplicaSets for deployment {}", deploymentName); replicaSets.forEach(rs -> openShiftClient.resource(rs).delete()); } if (deployment != null) { LOG.info("Removing OpenShift Deployment {}", deployment.getMetadata().getName()); openShiftClient.resource(deployment).delete(); } if (routes != null) { for (Route route: routes) { LOG.info("Removing OpenShift Route {}", route.getMetadata().getName()); openShiftClient.resource(route).delete(); } } if (service != null) { LOG.info("Removing OpenShift Service {}", service.getMetadata().getName()); openShiftClient.resource(service).delete(); } } }

Target:
private void cleanUpWorkspaceResources(final String deploymentName, final String namespace) throws IOException { Deployment deployment = KubernetesResourceUtil.getDeploymentByName(deploymentName, namespace); Service service = KubernetesResourceUtil.getServiceBySelector(OpenShiftConnector.OPENSHIFT_DEPLOYMENT_LABEL, deploymentName, namespace); List<Route> routes = KubernetesResourceUtil.getRoutesByLabel(OpenShiftConnector.OPENSHIFT_DEPLOYMENT_LABEL, deploymentName, namespace); List<ReplicaSet> replicaSets = KubernetesResourceUtil.getReplicaSetByLabel(OpenShiftConnector.OPENSHIFT_DEPLOYMENT_LABEL, deploymentName, namespace); try (OpenShiftClient openShiftClient = new DefaultOpenShiftClient()) { if (deployment != null) { LOG.info("Removing OpenShift Deployment {}", deployment.getMetadata().getName()); openShiftClient.resource(deployment).delete(); } if (replicaSets != null && replicaSets.size() > 0) { LOG.info("Removing OpenShift ReplicaSets for deployment {}", deploymentName); replicaSets.forEach(rs -> openShiftClient.resource(rs).delete()); } if (routes != null) { for (Route route: routes) { LOG.info("Removing OpenShift Route {}", route.getMetadata().getName()); openShiftClient.resource(route).delete(); } } if (service != null) { LOG.info("Removing OpenShift Service {}", service.getMetadata().getName()); openShiftClient.resource(service).delete(); } } }
Source:
private Indexer indexStream(InputStream stream) { try { Indexer indexer = new Indexer(); indexer.index(stream); return indexer; } catch (IOException e) { throw new IllegalStateException(e); } }

Target:
private Indexer indexStream(InputStream stream) { try { Indexer indexer = new Indexer(); indexer.index(stream); stream.close(); return indexer; } catch (IOException e) { throw new IllegalStateException(e); } }
Source:
public void replaceAll(BiFunction<? super K, ? super V, ? extends V> function) { boolean hasListeners = this.hasListeners; CacheEntryChange<K, V> ref = new CacheEntryChange<>(); for (Iterator<InternalCacheEntry<K, V>> it = dataContainer.iterator(); it.hasNext(); ) { InternalCacheEntry<K, V> ice = it.next(); getDataContainer().compute(ice.getKey(), (k, oldEntry, factory) -> { V oldValue = getValue(oldEntry); if (oldValue != null) { V newValue = function.apply(k, oldValue); Objects.requireNonNull(newValue, NULL_VALUES_NOT_SUPPORTED); if (hasListeners) { cacheNotifier.notifyCacheEntryModified(k, newValue, defaultMetadata, oldValue, oldEntry.getMetadata(), true, ImmutableContext.INSTANCE, null); } ref.set(k, newValue, oldValue, oldEntry.getMetadata()); return factory.update(oldEntry, newValue, defaultMetadata); } else { return null; } }); V newValue = ref.getNewValue(); if (hasListeners) { cacheNotifier.notifyCacheEntryModified(ref.getKey(), newValue, defaultMetadata, ref.getOldValue(), ref.getOldMetadata(), false, ImmutableContext.INSTANCE, null); } } }

Target:
public void replaceAll(BiFunction<? super K, ? super V, ? extends V> function) { boolean hasListeners = this.hasListeners; CacheEntryChange<K, V> ref = new CacheEntryChange<>(); for (Iterator<InternalCacheEntry<K, V>> it = dataContainer.iterator(); it.hasNext(); ) { InternalCacheEntry<K, V> ice = it.next(); getDataContainer().compute(ice.getKey(), (k, oldEntry, factory) -> { V oldValue = getValue(oldEntry); if (oldValue != null) { V newValue = function.apply(k, oldValue); Objects.requireNonNull(newValue, NULL_VALUES_NOT_SUPPORTED); if (hasListeners) { cacheNotifier.notifyCacheEntryModified(k, newValue, defaultMetadata, oldValue, oldEntry.getMetadata(), true, ImmutableContext.INSTANCE, null); } ref.set(k, newValue, oldValue, oldEntry.getMetadata()); return factory.update(oldEntry, newValue, defaultMetadata); } else { return null; } }); if (hasListeners) { cacheNotifier.notifyCacheEntryModified(ref.getKey(), ref.getNewValue(), defaultMetadata, ref.getOldValue(), ref.getOldMetadata(), false, ImmutableContext.INSTANCE, null); } } }
Source:
public void setAllowedQueryParamNames(final Set<String> allowedQueryParamNames) { this.allowedQueryParamNames = allowedQueryParamNames; }

Target:
public HttpLogOptions setAllowedQueryParamNames(final Set<String> allowedQueryParamNames) { this.allowedQueryParamNames = allowedQueryParamNames; return this; }
Source:
public void onFeaturedImageSelected(@NonNull FeaturedImageCard card) { PageTitle imageTitle = new PageTitle(card.filename(), card.site()); GalleryActivity.showGallery(this, card.baseImage(), imageTitle, GalleryFunnel.SOURCE_FEED_FEATURED_IMAGE); }

Target:
public void onFeaturedImageSelected(@NonNull FeaturedImageCard card) { GalleryActivity.showGallery(this, card.baseImage(), card.filename(), card.site(), GalleryFunnel.SOURCE_FEED_FEATURED_IMAGE); }
Source:
public Response getSentLogs(@QueryParam("queryId") final Long queryId, @DefaultValue("-1") @QueryParam("fragmentId") final long fragmentId, @Context final UriInfo uriInfo) throws DbException { if (queryId == null) { throw new WebApplicationException(Response.status(HttpURLConnection.HTTP_BAD_REQUEST).entity("queryId missing") .build()); } return getLogs(queryId, fragmentId, MyriaConstants.LOG_SENT_RELATION, MyriaConstants.LOG_SENT_SCHEMA); }

Target:
public Response getSentLogs(@QueryParam("queryId") final Long queryId, @DefaultValue("-1") @QueryParam("fragmentId") final long fragmentId, @Context final UriInfo uriInfo) throws DbException { if (queryId == null) { throw new MyriaApiException(Status.BAD_REQUEST, "Query ID missing."); } return getLogs(queryId, fragmentId, MyriaConstants.LOG_SENT_RELATION, MyriaConstants.LOG_SENT_SCHEMA); }
Source:
private Registry<ConnectionSocketFactory> createConfiguredRegistry() { if (registry != null) { return registry; } final SSLConnectionSocketFactory sslConnectionSocketFactory; if (configuration.getTlsConfiguration() == null) { if (verifier == null) { sslConnectionSocketFactory = SSLConnectionSocketFactory.getSocketFactory(); } else { sslConnectionSocketFactory = new DropwizardSSLConnectionSocketFactory(new TlsConfiguration(), verifier) .getSocketFactory(); } } else { sslConnectionSocketFactory = new DropwizardSSLConnectionSocketFactory(configuration.getTlsConfiguration(), verifier) .getSocketFactory(); } return RegistryBuilder.<ConnectionSocketFactory>create() .register("http", PlainConnectionSocketFactory.getSocketFactory()) .register("https", sslConnectionSocketFactory) .build(); }

Target:
Registry<ConnectionSocketFactory> createConfiguredRegistry() { if (registry != null) { return registry; } TlsConfiguration tlsConfiguration = configuration.getTlsConfiguration(); if (tlsConfiguration == null && verifier != null) { tlsConfiguration = new TlsConfiguration(); } final SSLConnectionSocketFactory sslConnectionSocketFactory; if (tlsConfiguration == null) { sslConnectionSocketFactory = SSLConnectionSocketFactory.getSocketFactory(); } else { sslConnectionSocketFactory = new DropwizardSSLConnectionSocketFactory(tlsConfiguration, verifier).getSocketFactory(); } return RegistryBuilder.<ConnectionSocketFactory>create() .register("http", PlainConnectionSocketFactory.getSocketFactory()) .register("https", sslConnectionSocketFactory) .build(); }
Source:
public static Credentials freshCredentials(@NonNull Config config) { String randomUdid = UUID.randomUUID().toString(); String testEmail = ResourceUtil.getFormattedString( config.getEndToEndConfig().getEmailTemplate(), "unique_id", randomUdid).toString(); Credentials creds = new Credentials(testEmail, randomUdid); creds.username = testEmail.split("@")[0]; return creds; }

Target:
public static Credentials freshCredentials(@NonNull Config config) { String randomUdid = UUID.randomUUID().toString(); String testEmail = ResourceUtil.getFormattedString( config.getEndToEndConfig().getEmailTemplate(), "unique_id", randomUdid).toString(); return new Credentials(testEmail, randomUdid); }
Source:
getCache(VolumeChooserEnvironment env) { if (choiceCache == null) { String propertyValue = env.getServiceEnv().getConfiguration().getCustom(RECOMPUTE_INTERVAL); long computationCacheDuration = !propertyValue.isBlank() ? Long.parseLong(propertyValue) : defaultComputationCacheDuration; choiceCache = CacheBuilder.newBuilder() .expireAfterWrite(computationCacheDuration, TimeUnit.MILLISECONDS) .build(new CacheLoader<List<String>,WeightedRandomCollection>() { @Override public WeightedRandomCollection load(List<String> key) { return new WeightedRandomCollection(key, env, random); } }); } return choiceCache; }

Target:
getCache(VolumeChooserEnvironment env) { if (choiceCache == null) { String propertyValue = env.getServiceEnv().getConfiguration().getCustom(RECOMPUTE_INTERVAL); long computationCacheDuration = StringUtils.isNotBlank(propertyValue) ? Long.parseLong(propertyValue) : defaultComputationCacheDuration; choiceCache = CacheBuilder.newBuilder() .expireAfterWrite(computationCacheDuration, TimeUnit.MILLISECONDS) .build(new CacheLoader<List<String>,WeightedRandomCollection>() { @Override public WeightedRandomCollection load(List<String> key) { return new WeightedRandomCollection(key, env, random); } }); } return choiceCache; }
Source:
public boolean isPurposeFor(CallbackProperties properties) { NHIN_SERVICE_NAMES serviceName; boolean purposeFor = false; String action = properties.getAction(); try { serviceName = NHIN_SERVICE_NAMES.fromValueString(action); } catch (IllegalArgumentException ex) { LOG.warn("Could not read purpose of / for action: {}", ex.getLocalizedMessage()); LOG.trace("Could not read purpose of / for action: {}", ex.getLocalizedMessage(), ex); return purposeFor; } GATEWAY_API_LEVEL apiLevel = properties.getTargetApiLevel(); String hcid = properties.getTargetHomeCommunityId(); if (hcid.startsWith(NhincConstants.HCID_PREFIX)) { hcid = hcid.replace(NhincConstants.HCID_PREFIX, ""); } if (apiLevel == null && serviceName != null && hcid != null) { NhinEndpointManager nem = getNhinEndpointManager(); apiLevel = nem.getApiVersion(hcid, serviceName); } if (GATEWAY_API_LEVEL.LEVEL_g0 == apiLevel) { PurposeUseProxy purposeUse = getPurposeUseProxyObjectFactory(); purposeFor = purposeUse.isPurposeForUseEnabled(properties); } if (LOG.isDebugEnabled()) { if (serviceName != null){ logPurposeDecision(purposeFor, hcid, serviceName.getUDDIServiceName()); }else{ logPurposeDecision(purposeFor, hcid, null); } } return purposeFor; }

Target:
public boolean isPurposeFor(CallbackProperties properties) { NHIN_SERVICE_NAMES serviceName; boolean purposeFor = false; String action = properties.getAction(); try { serviceName = NHIN_SERVICE_NAMES.fromValueString(action); } catch (IllegalArgumentException ex) { LOG.warn("Could not read purpose of / for action: {}", ex.getLocalizedMessage()); LOG.trace("Could not read purpose of / for action: {}", ex.getLocalizedMessage(), ex); return purposeFor; } GATEWAY_API_LEVEL apiLevel = properties.getTargetApiLevel(); String hcid = properties.getTargetHomeCommunityId(); if (hcid.startsWith(NhincConstants.HCID_PREFIX)) { hcid = hcid.replace(NhincConstants.HCID_PREFIX, ""); } if (apiLevel == null && serviceName != null && hcid != null) { NhinEndpointManager nem = getNhinEndpointManager(); apiLevel = nem.getApiVersion(hcid, serviceName); } if (GATEWAY_API_LEVEL.LEVEL_g0 == apiLevel) { PurposeUseProxy purposeUse = getPurposeUseProxyObjectFactory(); purposeFor = purposeUse.isPurposeForUseEnabled(properties); } if (LOG.isDebugEnabled()) { logPurposeDecision(purposeFor, hcid, serviceName != null ? serviceName.getUDDIServiceName() : null); } return purposeFor; }
Source:
public void createHttpCacheWithProxy() throws IOException { RemoteOptions options = Options.getDefaults(RemoteOptions.class); options.remoteHttpCache = "<LINK_1>"; options.remoteCacheProxy = "unix://some-proxy"; options.diskCache = null; SimpleBlobStore blobStore = SimpleBlobStoreFactory.create(options, null, workingDirectory); assertThat(blobStore).isNotNull(); assertThat(blobStore).isInstanceOf(HttpBlobStore.class); }

Target:
public void createHttpCacheWithProxy() throws IOException { remoteOptions.remoteHttpCache = "<LINK_0>"; remoteOptions.remoteCacheProxy = "unix://some-proxy"; SimpleBlobStore blobStore = SimpleBlobStoreFactory.create(remoteOptions, null, workingDirectory); assertThat(blobStore).isInstanceOf(HttpBlobStore.class); }
Source:
protected List<String> getPlugins() { try { final JsonObject jsonFile = getJsonFile( "plugins/webpack-plugins.json"); if (jsonFile == null) { log().error("Couldn't locate webpack-plugins.json"); return Collections.emptyList(); } final JsonArray plugins = jsonFile.getArray("plugins"); List<String> pluginsToInstall = new ArrayList<>(plugins.length()); for (int i = 0; i < plugins.length(); i++) { pluginsToInstall.add(plugins.getString(i)); } return pluginsToInstall; } catch (IOException ioe) { throw new UncheckedIOException( "Couldn't load webpack-plugins.json file", ioe); } }

Target:
protected List<String> getPlugins() { try { final JsonObject jsonFile = getJsonFile( "plugins/webpack-plugins.json"); if (jsonFile == null) { log().error( "Couldn't locate plugins/webpack-plugins.json, no Webpack plugins for Flow will be installed." + "If webpack build fails validate flow-server jar content."); return Collections.emptyList(); } final JsonArray plugins = jsonFile.getArray("plugins"); List<String> pluginsToInstall = new ArrayList<>(plugins.length()); for (int i = 0; i < plugins.length(); i++) { pluginsToInstall.add(plugins.getString(i)); } return pluginsToInstall; } catch (IOException ioe) { throw new UncheckedIOException( "Couldn't load webpack-plugins.json file", ioe); } }
Source:
public static String serialize(ColumnStatisticMetadata value) { return value.getStatisticType().name() + ":" + value.getColumnName(); }

Target:
static String serialize(ColumnStatisticMetadata value) { return value.getStatisticType().name() + ":" + value.getColumnName(); }
Source:
void clearLegacyEditingSetup() { if (!getControl().isDisposed() && getCellEditors() != null) { int count = doGetColumnCount(); for (int i = 0; i < count || i == 0; i++) { Widget owner = getColumnViewerOwner(i); if (owner != null && !owner.isDisposed()) { ViewerColumn<E,I> column = (ViewerColumn<E,I>) owner .getData(ViewerColumn.COLUMN_VIEWER_KEY); if (column != null) { EditingSupport e = column.getEditingSupport(); if (e != null && e.isLegacySupport()) { column.setEditingSupport(null); } } } } } }

Target:
void clearLegacyEditingSetup() { if (!getControl().isDisposed() && getCellEditors() != null) { int count = doGetColumnCount(); for (int i = 0; i < count || i == 0; i++) { Widget owner = getColumnViewerOwner(i); if (owner != null && !owner.isDisposed()) { @SuppressWarnings("unchecked") ViewerColumn<E,I> column = (ViewerColumn<E,I>) owner .getData(ViewerColumn.COLUMN_VIEWER_KEY); if (column != null) { EditingSupport e = column.getEditingSupport(); if (e != null && e.isLegacySupport()) { column.setEditingSupport(null); } } } } } }
Source:
protected void validateMandatoryFieldsNotSelected(final StringBuilder sb, final List<FieldToContractInputMapping> mappings, final IObservableSet checkedElements) { int numberOfElements = 0; for (final FieldToContractInputMapping mapping : mappings) { if (!checkedElements.contains(mapping) && !mapping.isGenerated() && !mapping.getField().isNullable()) { numberOfElements++; if (mapping.getParent() != null) { sb.append(mapping.getParent().getField().getName()); sb.append("."); } sb.append(mapping.getField().getName()); sb.append(", "); } else { if (checkedElements.contains(mapping) && mapping.isGenerated()) { validateMandatoryFieldsNotSelected(sb, mapping.getChildren(), checkedElements); } } } if (numberOfElements == 1) { sb.replace(sb.lastIndexOf(","), sb.lastIndexOf(",") + 1, ""); } }

Target:
private void validateMandatoryFieldsNotSelected(final StringBuilder sb, final List<FieldToContractInputMapping> mappings, final IObservableSet checkedElements) { for (final FieldToContractInputMapping mapping : mappings) { if (!checkedElements.contains(mapping) && !mapping.isGenerated() && !mapping.getField().isNullable()) { if (mapping.getParent() != null) { sb.append(mapping.getParent().getField().getName()); sb.append("."); } sb.append(mapping.getField().getName()); sb.append(", "); } else { if (checkedElements.contains(mapping) && mapping.isGenerated()) { validateMandatoryFieldsNotSelected(sb, mapping.getChildren(), checkedElements); } } } }
Source:
private long queryStreamTail() { Set<String> streamsToReplicate = logReplicationConfig.getStreamsToReplicate(); long maxTail = Address.NON_ADDRESS; for (String s : streamsToReplicate) { UUID currentUUID = CorfuRuntime.getStreamID(s); Map<UUID, Long> tailMap = corfuRuntime.getAddressSpaceView().getAllTails().getStreamTails(); Long currentTail = tailMap.get(currentUUID); if (currentTail != null) { maxTail = Math.max(maxTail, currentTail); } } return maxTail; }

Target:
private long queryStreamTail() { Set<String> streamsToReplicate = context.getConfig().getStreamsToReplicate(); long maxTail = Address.NON_ADDRESS; Map<UUID, Long> tailMap = corfuRuntime.getAddressSpaceView().getAllTails().getStreamTails(); for (String s : streamsToReplicate) { UUID currentUUID = CorfuRuntime.getStreamID(s); Long currentTail = tailMap.get(currentUUID); if (currentTail != null) { maxTail = Math.max(maxTail, currentTail); } } return maxTail; }
Source:
protected void onRestoreInstanceState(Bundle savedInstanceState) { super.onRestoreInstanceState(savedInstanceState); loginCurrentlyInProgress = savedInstanceState.getBoolean(LOGGING_IN, false); errorMessageShown = savedInstanceState.getBoolean(ERROR_MESSAGE_SHOWN, false); if (loginCurrentlyInProgress){ performLogin(); } if (errorMessageShown){ resultantError = savedInstanceState.getString(RESULTANT_ERROR); handleOtherResults(Objects.requireNonNull(resultantError)); } }

Target:
protected void onRestoreInstanceState(Bundle savedInstanceState) { super.onRestoreInstanceState(savedInstanceState); loginCurrentlyInProgress = savedInstanceState.getBoolean(LOGGING_IN, false); errorMessageShown = savedInstanceState.getBoolean(ERROR_MESSAGE_SHOWN, false); if (loginCurrentlyInProgress) { performLogin(); } if (errorMessageShown) { resultantError = savedInstanceState.getString(RESULTANT_ERROR); handleOtherResults(resultantError); } }
Source:
private void populateRequest(List<Artifact> artifacts, DataRightInput request) { if (request.isEmpty()) { List<Artifact> allArtifacts = new ArrayList<>(); if (recurseChildren || (renderer.getBooleanOption( RECURSE_ON_LOAD) && !renderer.getBooleanOption("Orig Publish As Diff"))) { for (Artifact art : artifacts) { if (!art.artifactIsExcluded(excludeArtifactTypes, art)) { allArtifacts.add(art); } if (!art.isHistorical()) { allArtifacts.addAll(art.getDescendants(excludeArtifactTypes)); } } } else { allArtifacts.addAll(artifacts); } int index = 0; String overrideClassification = (String) renderer.getOption(IRenderer.OVERRIDE_DATA_RIGHTS_OPTION); for (Artifact artifact : allArtifacts) { String classification = null; if (overrideClassification != null && ITemplateRenderer.DataRightsClassification.isValid( overrideClassification)) { classification = overrideClassification; } else { classification = artifact.getSoleAttributeValueAsString(CoreAttributeTypes.DataRightsClassification, ""); } PageOrientation orientation = WordRendererUtil.getPageOrientation(artifact); request.addData(artifact.getGuid(), classification, orientation, index); index++; } } }

Target:
private void populateRequest(List<Artifact> artifacts, DataRightInput request) { if (request.isEmpty()) { List<Artifact> allArtifacts = new ArrayList<>(); if (recurseChildren || (renderer.getBooleanOption( RECURSE_ON_LOAD) && !renderer.getBooleanOption("Orig Publish As Diff"))) { for (Artifact art : artifacts) { if (!art.isOfType(excludeArtifactTypes)) { allArtifacts.add(art); } if (!art.isHistorical()) { allArtifacts.addAll(art.getDescendants(excludeArtifactTypes)); } } } else { allArtifacts.addAll(artifacts); } int index = 0; String overrideClassification = (String) renderer.getOption(IRenderer.OVERRIDE_DATA_RIGHTS_OPTION); for (Artifact artifact : allArtifacts) { String classification = null; if (overrideClassification != null && ITemplateRenderer.DataRightsClassification.isValid( overrideClassification)) { classification = overrideClassification; } else { classification = artifact.getSoleAttributeValueAsString(CoreAttributeTypes.DataRightsClassification, ""); } PageOrientation orientation = WordRendererUtil.getPageOrientation(artifact); request.addData(artifact.getGuid(), classification, orientation, index); index++; } } }
Source:
private LanguageMapping computeInheritedMapping(IProject project, IFile file, ICConfigurationDescription configuration) throws CoreException { LanguageMapping mappings[] = LanguageMappingResolver.computeLanguage(project, file.getProjectRelativePath().toPortableString(), configuration, fContentType.getId(), true); LanguageMapping inheritedMapping = mappings[0]; int index = 1; while (inheritedMapping.inheritedFrom == LanguageMappingResolver.FILE_MAPPING) { inheritedMapping = mappings[index++]; } return inheritedMapping; }

Target:
private LanguageMapping computeInheritedMapping(IProject project, IFile file, ICConfigurationDescription configuration) throws CoreException { LanguageMapping mappings[] = LanguageMappingResolver.computeLanguage(project, file.getProjectRelativePath().toPortableString(), configuration, fContentType.getId(), true); for (int i = 0; i < mappings.length; i++) { if (mappings[i].inheritedFrom != LanguageMappingResolver.FILE_MAPPING) { return mappings[i]; } } return null; }
Source:
protected void closeTab() { String frameId = getContent().getElement().getElementsByTagName( "iframe" ).getItem( 0 ).getAttribute( "id" ); fireCloseTab( frameId ); tabPanel.closeTab( this, true ); }

Target:
protected void closeTab() { if ( getContent().getElement().getElementsByTagName( "iframe" ).getLength() > 0 ) { String frameId = getContent().getElement().getElementsByTagName( "iframe" ).getItem( 0 ).getAttribute( "id" ); fireCloseTab( frameId ); } tabPanel.closeTab( this, true ); }
Source:
Collection<ResourceDMBean> getResourceDMBeansFromComponents() { Collection<ComponentRef<?>> components = basicComponentRegistry.getRegisteredComponents(); Collection<ResourceDMBean> resourceDMBeans = new LinkedHashSet<>(components.size()); for (ComponentRef<?> component : components) { if (!component.isAlias()) { Object instance = component.wired(); if (instance != null) { ResourceDMBean resourceDMBean = getResourceDMBean(instance, component.getName()); if (resourceDMBean != null) { boolean added = resourceDMBeans.add(resourceDMBean); if (!added) { throw new IllegalStateException("Found duplicate: " + resourceDMBean); } } } } } return resourceDMBeans; }

Target:
private Collection<ResourceDMBean> getResourceDMBeansFromComponents() { Collection<ComponentRef<?>> components = basicComponentRegistry.getRegisteredComponents(); Collection<ResourceDMBean> resourceDMBeans = new ArrayList<>(components.size()); for (ComponentRef<?> component : components) { if (!component.isAlias()) { Object instance = component.wired(); if (instance != null) { ResourceDMBean resourceDMBean = getResourceDMBean(instance, component.getName()); if (resourceDMBean != null) { resourceDMBeans.add(resourceDMBean); } } } } return resourceDMBeans; }
Source:
public void forceGroupSynchronization(PerunSession sess, Group group) throws GroupSynchronizationAlreadyRunningException, InternalErrorException { Utils.notNull(group, "group"); if (groupSynchronizerThreads.values().contains(group.getId())) { throw new GroupSynchronizationAlreadyRunningException(group); } else { putGroupToQueueToBeSynchronized(group, true); log.info("Scheduling synchronization for the group by force!", group); } }

Target:
public void forceGroupSynchronization(PerunSession sess, Group group) throws GroupSynchronizationAlreadyRunningException, InternalErrorException { if(poolOfGroupsToBeSynchronized.putJobIfAbsent(group, true)) { log.info("Scheduling synchronization for the group by force!", group); } else { throw new GroupSynchronizationAlreadyRunningException(group); } }
Source:
public List<String> getAsciidoctorOption(String optionKey) { Configuration subConfig = compositeConfiguration.subset(JBakeProperty.ASCIIDOCTOR_OPTION); if (subConfig.containsKey(optionKey)) { return subConfig.getList(String.class, optionKey); } else { logger.warn("Cannot find asciidoctor option '{}.{}'", JBakeProperty.ASCIIDOCTOR_OPTION, optionKey); return new ArrayList<>(); } }

Target:
public List<String> getAsciidoctorOption(String optionKey) { Configuration subConfig = compositeConfiguration.subset(JBakeProperty.ASCIIDOCTOR_OPTION); if (subConfig.containsKey(optionKey)) { return subConfig.getList(String.class, optionKey); } else { logger.warn("Cannot find asciidoctor option '{}.{}'", JBakeProperty.ASCIIDOCTOR_OPTION, optionKey); return Collections.emptyList(); } }
Source:
public static String format(String value, int version) { Media media; int savedVersion; try { media = JSON_OBJECT_MAPPER.readValue(value, Media.class); savedVersion = VERSION_GEOTAGGING; } catch(IOException e) { media = new Media(); media.setFilename(value); savedVersion = VERSION_INITIAL; } if (version == savedVersion) { return value; } if (version == VERSION_GEOTAGGING) { try { return JSON_OBJECT_MAPPER.writeValueAsString(media); } catch(IOException e) { log.warning(e.getMessage()); return ""; } } return media.getFilename(); }

Target:
public static String format(String value, int version) { Media media; int savedVersion; try { media = JSON_OBJECT_MAPPER.readValue(value, Media.class); savedVersion = VERSION_GEOTAGGING; } catch(IOException e) { media = new Media(); media.setFilename(value); savedVersion = VERSION_STRING; } if (version == savedVersion) { return value; } if (version == VERSION_GEOTAGGING) { try { return JSON_OBJECT_MAPPER.writeValueAsString(media); } catch(IOException e) { log.warning(e.getMessage()); return ""; } } return media.getFilename(); }
Source:
public void run() { InitializerWizard wizard = new InitializerWizard(this.editingDomain.getResourceSet(), selection); WizardDialog dialog = new WizardDialog(null, wizard); dialog.create(); if (dialog.open() == Window.OK) this.result = wizard.getCommand(); }

Target:
public void run() { InitializerWizard wizard = new InitializerWizard(this.editingDomain.getResourceSet(), selection); WizardDialog dialog = new WizardDialog(null, wizard); dialog.create(); if (dialog.open() == Window.OK) { this.result = wizard.getCommand(); result.execute(); } }