auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public Collection<ConfigStatusMessage> getConfigStatus() { logger.debug("IP configuration check started."); ConfigStatusInfo configStatus = new ConfigStatusInfo(); ConfigStatusMessage.Builder errBuilder = ConfigStatusMessage.Builder.error(HOST); final String bridgeIpAddress = (String) getThing().getConfiguration().get(HOST); if (bridgeIpAddress == null) { logger.error("No IP address has been provided."); configStatus.add(errBuilder.withMessageKey(HueConfigStatusMessage.CONFIG_STATUS_ERROR_PREFIX + HueConfigStatusMessage.IP_ADDRESS_MISSING.getCode()).build()); return configStatus.getConfigStatusMessages(); } if (!isReachable()) { logger.error("The bridge is not responding and is not reachable on {}.", bridgeIpAddress); configStatus.add(errBuilder.withMessageKey(HueConfigStatusMessage.CONFIG_STATUS_ERROR_PREFIX + HueConfigStatusMessage.BRIDGE_NOT_RESPONDING.getCode()).build()); return configStatus.getConfigStatusMessages(); } return configStatus.getConfigStatusMessages(); }

Target:
public Collection<ConfigStatusMessage> getConfigStatus() { final String bridgeIpAddress = (String) getThing().getConfiguration().get(HOST); Collection<ConfigStatusMessage> configStatusMessages; if (bridgeIpAddress == null || bridgeIpAddress.isEmpty()) { configStatusMessages = Collections.singletonList(ConfigStatusMessage.Builder.error(HOST) .withMessageKeySuffix(HueConfigStatusMessage.IP_ADDRESS_MISSING.getMessageKey()).withArguments(HOST) .build()); } else { configStatusMessages = Collections.emptyList(); } return configStatusMessages; }
Source:
private static void readSliceBlocks(final int major, final Slice slice, final InputStream inputStream) throws IOException { slice.external = new HashMap<>(); for (int i = 0; i < slice.nofBlocks; i++) { final Block block = Block.read(major, inputStream); switch (block.getContentType()) { case CORE: slice.coreBlock = block; break; case EXTERNAL: final ExternalDataBlock extBlock = (ExternalDataBlock) block; if (slice.embeddedRefBlockContentID == extBlock.getContentId()) { slice.embeddedRefBlock = extBlock; } slice.external.put(extBlock.getContentId(), extBlock); break; default: throw new RuntimeException("Not a slice block, content type id " + block.getContentType().name()); } } }

Target:
private static void readSliceBlocks(final int major, final Slice slice, final InputStream inputStream) throws IOException { slice.external = new HashMap<>(); for (int i = 0; i < slice.nofBlocks; i++) { final Block block = Block.read(major, inputStream); switch (block.getContentType()) { case CORE: slice.coreBlock = block; break; case EXTERNAL: if (slice.embeddedRefBlockContentID == block.getContentId()) { slice.embeddedRefBlock = block; } slice.external.put(block.getContentId(), block); break; default: throw new RuntimeException("Not a slice block, content type id " + block.getContentType().name()); } } }
Source:
private void writeSRC(GridCoverage2D gc, final String name, Object dest) throws FileNotFoundException, IOException { ImageOutputStream out = null; RenderedImage image = gc.getRenderedImage(); if (dest instanceof File) { final File file = new File((File) dest, new StringBuffer(name).append(".SRC").toString()); out = ImageIOExt.createImageOutputStream(image, file); } else { Utilities.isZipSlipVulnerable(gc.getName().toString()); final ZipOutputStream outZ = (ZipOutputStream) dest; final ZipEntry e = new ZipEntry(gc.getName().toString() + ".SRC"); outZ.putNextEntry(e); out = ImageIOExt.createImageOutputStream(image, outZ); } out.setByteOrder(java.nio.ByteOrder.BIG_ENDIAN); image = untileImage(image); final ParameterBlockJAI pbj = new ParameterBlockJAI("imagewrite"); pbj.addSource(image); pbj.setParameter("Format", "raw"); pbj.setParameter("Output", out); JAI.create("ImageWrite", pbj); out.flush(); out.close(); if (dest instanceof ZipOutputStream) { ((ZipOutputStream) dest).closeEntry(); } }

Target:
private void writeSRC(GridCoverage2D gc, final String name, Object dest) throws FileNotFoundException, IOException { ImageOutputStream out = null; RenderedImage image = gc.getRenderedImage(); if (dest instanceof File) { final File file = new File((File) dest, new StringBuffer(name).append(".SRC").toString()); out = ImageIOExt.createImageOutputStream(image, file); } else { Utilities.assertNotZipSlipVulnerable(gc.getName().toString()); final ZipOutputStream outZ = (ZipOutputStream) dest; final ZipEntry e = new ZipEntry(gc.getName().toString() + ".SRC"); outZ.putNextEntry(e); out = ImageIOExt.createImageOutputStream(image, outZ); } out.setByteOrder(java.nio.ByteOrder.BIG_ENDIAN); image = untileImage(image); final ParameterBlockJAI pbj = new ParameterBlockJAI("imagewrite"); pbj.addSource(image); pbj.setParameter("Format", "raw"); pbj.setParameter("Output", out); JAI.create("ImageWrite", pbj); out.flush(); out.close(); if (dest instanceof ZipOutputStream) { ((ZipOutputStream) dest).closeEntry(); } }
Source:
public void theSetAdministrativeStatusRequestIsReceived(final Map<String, String> requestData) throws Throwable { final Map<String, String> settings = new HashMap<>(); settings.put(PlatformSmartmeteringKeys.KEY_DEVICE_IDENTIFICATION, requestData.get(PlatformSmartmeteringKeys.KEY_DEVICE_IDENTIFICATION)); settings.put(PlatformSmartmeteringKeys.ADMINISTRATIVE_STATUS_TYPE, requestData.get(PlatformSmartmeteringKeys.ADMINISTRATIVE_STATUS_TYPE)); final SetAdministrativeStatusRequest setAdministrativeStatusRequest = SetAdministrativeStatusRequestFactory .fromParameterMap(settings); final SetAdministrativeStatusAsyncResponse setAdministrativeStatusAsyncResponse = this.smartMeteringConfigurationClient .setAdministrativeStatus(setAdministrativeStatusRequest); LOGGER.info("Set administrative status response is received {}", setAdministrativeStatusAsyncResponse); assertNotNull("Set administrative status response should not be null", setAdministrativeStatusAsyncResponse); ScenarioContext.current().put(PlatformSmartmeteringKeys.KEY_CORRELATION_UID, setAdministrativeStatusAsyncResponse.getCorrelationUid()); }

Target:
public void theSetAdministrativeStatusRequestIsReceived(final Map<String, String> requestData) throws Throwable { final SetAdministrativeStatusRequest setAdministrativeStatusRequest = SetAdministrativeStatusRequestFactory .fromParameterMap(requestData); final SetAdministrativeStatusAsyncResponse setAdministrativeStatusAsyncResponse = this.smartMeteringConfigurationClient .setAdministrativeStatus(setAdministrativeStatusRequest); LOGGER.info("Set administrative status response is received {}", setAdministrativeStatusAsyncResponse); assertNotNull("Set administrative status response should not be null", setAdministrativeStatusAsyncResponse); ScenarioContext.current().put(PlatformSmartmeteringKeys.KEY_CORRELATION_UID, setAdministrativeStatusAsyncResponse.getCorrelationUid()); }
Source:
public Filter(String name, Map<String, String> parameters) { this.name = name; this.parameters = parameters; }

Target:
public Filter(String name, Map<String, String> parameters) { this.name = name; ImmutableMap.Builder builder = new ImmutableMap.Builder<String, String>(); builder.putAll(parameters); this.parameters = builder.build(); }
Source:
public String getText() { CharSequence[] typeNames = new String[getTypeList().size()]; for (int i = 0; i < getTypeList().size(); i++) { typeNames[i] = getTypeList().get(i).getText(); } return String.join(", ", typeNames); }

Target:
public String getText() { return StringUtil.join(getTypeList(), GoPsiImplUtil.GET_TEXT_FUNCTION, ", "); }
Source:
TransformerFactory secure_processing_true() { TransformerFactory factory = TransformerFactory.newInstance(); factory.setFeature(XMLConstants.ACCESS_EXTERNAL_DTD, true); return factory; }

Target:
TransformerFactory secure_processing_true() { TransformerFactory factory = TransformerFactory.newInstance(); factory.setFeature(XMLConstants.FEATURE_SECURE_PROCESSING, true); return factory; }
Source:
public boolean repositoryAccessable(URL url) { if (url.toString().contains("svn.jboss.org")) { Utils.logWarnMessage(LOG, "svn repository : " + url + " is not supported."); return false; } RepositoryId id = RepositoryId.createFromUrl(url); RepositoryService rs = new RepositoryService(gitHubClient); try { rs.getBranches(id); } catch (IOException e) { Utils.logWarnMessage(LOG, "repository : " + url + " is not accessable, check repository link and your account permission."); return false; } return true; }

Target:
public boolean repositoryAccessable(URL url) { if (url.toString().contains("svn.jboss.org")) { Utils.logWarnMessage(LOG, "svn repository : " + url + " is not supported."); return false; } RepositoryId id = RepositoryId.createFromUrl(url); RepositoryService rs = new RepositoryService(gitHubClient); try { rs.getBranches(id); } catch (IOException e) { Utils.logWarnMessage(LOG, "repository : " + url + " is not accessable due to " + e.getMessage() + ". Check repository link and your account permission."); return false; } return true; }
Source:
public Payload getPayload() { return new SelfDescribingJson(TrackerConstants.APPLICATION_ERROR_SCHEMA, getData()); }

Target:
public Payload getPayload() { return new SelfDescribingJson(TrackerConstants.SCHEMA_DIAGNOSTIC_ERROR, getData()); }
Source:
public Set<String> getContentTypes() { return new TreeSet<String>(contentTypeToTemplateEngineMap.keySet()); }

Target:
public Set<String> getContentTypes() { return ImmutableSet.copyOf(contentTypeToTemplateEngineMap.keySet()); }
Source:
private void handleEndActionJobAndStep() { if (!hasTaskHandlers() || getExecutionIndex() == getTaskHandlers().size() - 1) { if (!parentHasCallback() || getExecutionContext().getExecutionMethod() == ExecutionMethod.AsStep) { startFinalizingStep(); } } }

Target:
private void handleEndActionJobAndStep() { if ((!hasTaskHandlers() || getExecutionIndex() == getTaskHandlers().size() - 1) && (!parentHasCallback() || getExecutionContext().getExecutionMethod() == ExecutionMethod.AsStep)) { startFinalizingStep(); } }
Source:
public void stopWorkspace(String workspaceId, Map<String, String> options) throws ServerException, NotFoundException, ConflictException { requireNonNull(workspaceId, "Required non-null workspace id"); final WorkspaceImpl workspace = normalizeState(workspaceDao.get(workspaceId), true); checkWorkspaceIsRunningOrStarting(workspace); if (!workspace.isTemporary()) { workspace.getAttributes().put(STOPPED_ATTRIBUTE_NAME, Long.toString(currentTimeMillis())); workspace.getAttributes().put(STOPPED_ABNORMALLY_ATTRIBUTE_NAME, Boolean.toString(false)); workspaceDao.update(workspace); } String namespace = workspace.getAttributes().get(WORKSPACE_INFRASTRUCTURE_NAMESPACE_ATTRIBUTE); final String owner = workspace.getRuntime().getOwner(); runtimes .stopAsync(workspace, options) .whenComplete( (aVoid, throwable) -> { if (workspace.isTemporary()) { removeWorkspaceQuietly(workspace.getId()); } if (!runtimes.isAnyActive()) { recordLastWorkspaceStoppedTime(namespace, workspace.getId(), owner); } }); }

Target:
public void stopWorkspace(String workspaceId, Map<String, String> options) throws ServerException, NotFoundException, ConflictException { requireNonNull(workspaceId, "Required non-null workspace id"); final WorkspaceImpl workspace = normalizeState(workspaceDao.get(workspaceId), true); checkWorkspaceIsRunningOrStarting(workspace); if (!workspace.isTemporary()) { workspace.getAttributes().put(STOPPED_ATTRIBUTE_NAME, Long.toString(currentTimeMillis())); workspace.getAttributes().put(STOPPED_ABNORMALLY_ATTRIBUTE_NAME, Boolean.toString(false)); workspaceDao.update(workspace); } String namespace = workspace.getAttributes().get(WORKSPACE_INFRASTRUCTURE_NAMESPACE_ATTRIBUTE); final String owner = workspace.getRuntime().getOwner(); runtimes .stopAsync(workspace, options) .whenComplete( (aVoid, throwable) -> { if (workspace.isTemporary()) { removeWorkspaceQuietly(workspace.getId()); } try { if (runtimes.getActive(owner).isEmpty()) { recordLastWorkspaceStoppedTime(namespace, owner); } } catch (ServerException | InfrastructureException e) { LOG.error(e.getMessage(), e); } }); }
Source:
private void parseAuthority(boolean forceServer) throws URISyntaxException { if (authority == null) { return; } String tempUserInfo = null; String temp = authority; int index = temp.indexOf('@'); int hostIndex = 0; if (index != -1) { tempUserInfo = temp.substring(0, index); validateUserInfo(authority, tempUserInfo, 0); temp = temp.substring(index + 1); hostIndex = index + 1; } index = temp.lastIndexOf(':'); int endIndex = temp.indexOf(']'); String tempHost; int tempPort = -1; if (index != -1 && endIndex < index) { tempHost = temp.substring(0, index); if (index < (temp.length() - 1)) { try { char firstPortChar = temp.charAt(index + 1); if ('0' <= firstPortChar && firstPortChar <= '9') { tempPort = Integer.parseInt(temp.substring(index + 1)); } else { if (forceServer) { throw new URISyntaxException(authority, "Invalid port number", hostIndex + index + 1); } return; } } catch (NumberFormatException e) { if (forceServer) { throw new URISyntaxException(authority, "Invalid port number", hostIndex + index + 1); } return; } } } else { tempHost = temp; } if (tempHost.isEmpty()) { if (forceServer) { throw new URISyntaxException(authority, "Expected host", hostIndex); } return; } if (!isValidHost(forceServer, tempHost)) { return; } userInfo = tempUserInfo; host = tempHost; port = tempPort; serverAuthority = true; }

Target:
private void parseAuthority(boolean forceServer) throws URISyntaxException { if (authority == null) { return; } String tempUserInfo = null; String temp = authority; int index = temp.indexOf('@'); int hostIndex = 0; if (index != -1) { tempUserInfo = temp.substring(0, index); validateUserInfo(authority, tempUserInfo, 0); temp = temp.substring(index + 1); hostIndex = index + 1; } index = temp.lastIndexOf(':'); int endIndex = temp.indexOf(']'); String tempHost; int tempPort = -1; if (index != -1 && endIndex < index) { tempHost = temp.substring(0, index); if (index < (temp.length() - 1)) { try { char firstPortChar = temp.charAt(index + 1); if (firstPortChar >= '0' && firstPortChar <= '9') { tempPort = Integer.parseInt(temp.substring(index + 1)); } else { if (forceServer) { throw new URISyntaxException(authority, "Invalid port number", hostIndex + index + 1); } return; } } catch (NumberFormatException e) { if (forceServer) { throw new URISyntaxException(authority, "Invalid port number", hostIndex + index + 1); } return; } } } else { tempHost = temp; } if (tempHost.isEmpty()) { if (forceServer) { throw new URISyntaxException(authority, "Expected host", hostIndex); } return; } if (!isValidHost(forceServer, tempHost)) { return; } userInfo = tempUserInfo; host = tempHost; port = tempPort; serverAuthority = true; }
Source:
public <V> Map<K, V> getNextTrainingData() { final List<K> nextTrainingDataKeyList; synchronized (this) { if (trainingDataKeys.isEmpty()) { LOG.log(Level.INFO, "no more training data for current epoch"); return Collections.emptyMap(); } nextTrainingDataKeyList = new ArrayList<>( trainingDataKeys.subList(0, Math.min(miniBatchSize, trainingDataKeys.size()))); trainingDataKeys.removeAll(nextTrainingDataKeyList); } final Map<K, V> nextTrainingData = new HashMap<>(); for (final K key : nextTrainingDataKeyList) { final Pair<K, V> keyValuePair = memoryStore.get(key); if (keyValuePair == null) { continue; } nextTrainingData.put(keyValuePair.getFirst(), keyValuePair.getSecond()); } LOG.log(Level.INFO, "Size of training data for next mini-batch: {0}", nextTrainingData.size()); if (nextTrainingDataKeyList.size() != nextTrainingData.size()) { LOG.log(Level.INFO, "The number of assigned data keys for next mini-batch is {0}," + " but ths size of actually prepared training data is {1}", new Object[]{nextTrainingDataKeyList.size(), nextTrainingData.size()}); } return nextTrainingData; }

Target:
public Map<K, V> getNextTrainingData() { final List<K> nextTrainingDataKeyList; synchronized (this) { if (trainingDataKeys.isEmpty()) { LOG.log(Level.INFO, "no more training data for current epoch"); return Collections.emptyMap(); } nextTrainingDataKeyList = new ArrayList<>( trainingDataKeys.subList(0, Math.min(miniBatchSize, trainingDataKeys.size()))); trainingDataKeys.removeAll(nextTrainingDataKeyList); } final Map<K, V> nextTrainingData = new HashMap<>(); for (final K key : nextTrainingDataKeyList) { final Pair<K, V> keyValuePair = memoryStore.get(key); if (keyValuePair == null) { continue; } nextTrainingData.put(keyValuePair.getFirst(), keyValuePair.getSecond()); } LOG.log(Level.INFO, "Size of training data for next mini-batch: {0}", nextTrainingData.size()); if (nextTrainingDataKeyList.size() != nextTrainingData.size()) { LOG.log(Level.INFO, "The number of assigned data keys for next mini-batch is {0}," + " but ths size of actually prepared training data is {1}", new Object[]{nextTrainingDataKeyList.size(), nextTrainingData.size()}); } return nextTrainingData; }
Source:
public void shutdown() { this.containerModel.getTasks().forEach((taskName, taskModel) -> getNonSideInputStores(taskName).forEach((storeName, store) -> store.stop()) ); if (sideInputsPresent()) { this.shouldShutdown = true; sideInputsReadExecutor.shutdown(); this.sideInputSystemConsumers.stop(); sideInputsFlushFuture.cancel(false); sideInputsFlushExecutor.shutdown(); try { sideInputsFlushExecutor.awaitTermination(SIDE_INPUT_FLUSH_TIMEOUT.toMillis(), TimeUnit.MILLISECONDS); } catch (InterruptedException e) { throw new SamzaException("Exception while shutting down side inputs", e); } this.getSideInputStorageManagers().forEach(sideInputStorageManager -> sideInputStorageManager.stop()); } LOG.info("Shutdown complete"); }

Target:
public void shutdown() { this.containerModel.getTasks().forEach((taskName, taskModel) -> getNonSideInputStores(taskName).forEach((storeName, store) -> store.stop()) ); this.shouldShutdown = true; if (sideInputsPresent()) { sideInputsReadExecutor.shutdownNow(); this.sideInputSystemConsumers.stop(); sideInputsFlushFuture.cancel(false); sideInputsFlushExecutor.shutdown(); try { sideInputsFlushExecutor.awaitTermination(SIDE_INPUT_FLUSH_TIMEOUT.toMillis(), TimeUnit.MILLISECONDS); } catch (InterruptedException e) { throw new SamzaException("Exception while shutting down sideInputs", e); } this.getSideInputStorageManagers().forEach(sideInputStorageManager -> sideInputStorageManager.stop()); } LOG.info("Shutdown complete"); }
Source:
public synchronized void setCrlByUrlEnabled(boolean crlByUrlEnabled) { if (this.crlByUrlEnabled && !crlByUrlEnabled) { scheduler.schedule( this::removeCrlFileLocationInPropertiesFile, INITIAL_DELAY, TimeUnit.MINUTES); } this.crlByUrlEnabled = crlByUrlEnabled; }

Target:
public synchronized void setCrlByUrlEnabled(boolean crlByUrlEnabled) { if (this.crlByUrlEnabled && !crlByUrlEnabled) { if (removalHandle != null) { removalHandle.cancel(false); } removalHandle = scheduler.submit(this::removeCrlFileLocationInPropertiesFile); } this.crlByUrlEnabled = crlByUrlEnabled; }
Source:
static boolean cookieDomainMatches(String cookieDomain, String host) { cookieDomain = cookieDomain.toLowerCase(); host = host.toLowerCase(); if (host.equals(cookieDomain)) { return true; } else { if (!host.endsWith(cookieDomain)) { return false; } String prefix = host.substring(0, host.length() - cookieDomain.length()); return prefix.endsWith("."); } }

Target:
static boolean cookieDomainMatches(String cookieDomain, String host) { cookieDomain = cookieDomain.toLowerCase(Locale.ROOT); host = host.toLowerCase(Locale.ROOT); if (host.equals(cookieDomain)) { return true; } else { if (!host.endsWith(cookieDomain)) { return false; } return host .charAt(host.length() - cookieDomain.length() - 1) == '.'; } }
Source:
public void restore(RestoreInput in) throws RestApiException { try { restore.get().apply(change, in); } catch (OrmException e) { throw new RestApiException("Cannot restore review", e); } catch (IOException e) { throw new RestApiException("Cannot restore review", e); } }

Target:
public void restore(RestoreInput in) throws RestApiException { try { restore.get().apply(change, in); } catch (OrmException e) { throw new RestApiException("Cannot restore change", e); } catch (IOException e) { throw new RestApiException("Cannot restore change", e); } }
Source:
public Object execute(final ExecutionEvent event) { final IWorkbenchPart activePart = HandlerUtil.getActivePart(event); final List<DockerContainerPortMapping> portMappings = getSelectedPortMappings( activePart); if (portMappings == null || portMappings.isEmpty()) { return null; } final IDockerConnection currentConnection = getCurrentConnection( activePart); final Job job = new Job( CommandMessages.getString("command.showIn.webBrowser")) { @Override protected IStatus run(final IProgressMonitor monitor) { try { final DockerContainerPortMapping selectedPort = portMappings .get(0); final URI connectionURI = new URI( currentConnection.getUri()); if ("tcp".equalsIgnoreCase(connectionURI.getScheme()) || "http" .equalsIgnoreCase(connectionURI.getScheme()) || "https".equalsIgnoreCase( connectionURI.getScheme())) { final String host = connectionURI.getHost(); final URL location = new URL("http", host, selectedPort.getHostPort(), "/"); openLocationInWebBrowser(location); } } catch (URISyntaxException | MalformedURLException e) { Activator.logErrorMessage( CommandMessages.getString( "command.showIn.webBrowser.failure"), e); } monitor.done(); return Status.OK_STATUS; } }; job.setUser(true); job.schedule(); return null; }

Target:
public Object execute(final ExecutionEvent event) { final IWorkbenchPart activePart = HandlerUtil.getActivePart(event); final List<IDockerPortMapping> portMappings = getSelectedPortMappings( activePart); if (portMappings == null || portMappings.isEmpty()) { return null; } final Job job = new Job( CommandMessages.getString("command.showIn.webBrowser")) { @Override protected IStatus run(final IProgressMonitor monitor) { try { final IDockerConnection currentConnection = getCurrentConnection( activePart); final IDockerPortMapping selectedPort = portMappings .get(0); final URI connectionURI = new URI( currentConnection.getUri()); if ("tcp".equalsIgnoreCase(connectionURI.getScheme()) || "unix" .equalsIgnoreCase(connectionURI.getScheme()) || "http" .equalsIgnoreCase(connectionURI.getScheme()) || "https".equalsIgnoreCase( connectionURI.getScheme())) { final String host = connectionURI.getHost(); final URL location = new URL("http", host, selectedPort.getPublicPort(), "/"); openLocationInWebBrowser(location); } } catch (URISyntaxException | MalformedURLException e) { Activator.logErrorMessage( CommandMessages.getString( "command.showIn.webBrowser.failure"), e); } monitor.done(); return Status.OK_STATUS; } }; job.setUser(true); job.schedule(); return null; }
Source:
private Brand extractBrand(Element element, String id) { String uri = getShowUri(id); Maybe<Identified> maybeBrand = contentResolver.findByCanonicalUris( ImmutableSet.of(uri) ) .getFirstValue(); Brand brand = createBrand(element, id); if (maybeBrand.hasValue()) { return mergeBrand((Brand) maybeBrand.requireValue(), brand); } else { return brand; } }

Target:
private Brand extractBrand(Element element, String id) { String uri = getShowUri(id); Optional<Identified> optionalBrand = contentResolver.findByCanonicalUris( ImmutableSet.of(uri) ) .getFirstValue().toOptional(); Brand brand = createBrand(element, id); return optionalBrand.map(identified -> mergeBrand((Brand) identified, brand)).orElse(brand); }
Source:
public void RequestTranslation(final String languageToTranslateTo, final String textToTranslate) { if ((userYandexKey.equals("") || userYandexKey.equals("DEFAULT")) && yandexKey.equals("")){ form.dispatchErrorOccurredEvent(YandexTranslate.this, "RequestTranslation", ErrorMessages.ERROR_TRANSLATE_NO_KEY_FOUND); return; } AsynchUtil.runAsynchronously(new Runnable() { @Override public void run() { try { performRequest(languageToTranslateTo, textToTranslate); } catch (IOException e) { form.dispatchErrorOccurredEvent(YandexTranslate.this, "RequestTranslation", ErrorMessages.ERROR_TRANSLATE_SERVICE_NOT_AVAILABLE); } catch (JSONException je) { form.dispatchErrorOccurredEvent(YandexTranslate.this, "RequestTranslation", ErrorMessages.ERROR_TRANSLATE_JSON_RESPONSE); } } }); }

Target:
public void RequestTranslation(final String languageToTranslateTo, final String textToTranslate) { if (TextUtils.isEmpty(yandexKey) && (TextUtils.isEmpty(userYandexKey) || TextUtils.equals(userYandexKey, "DEFAULT"))) { form.dispatchErrorOccurredEvent(YandexTranslate.this, "RequestTranslation", ErrorMessages.ERROR_TRANSLATE_NO_KEY_FOUND); return; } AsynchUtil.runAsynchronously(new Runnable() { @Override public void run() { try { performRequest(languageToTranslateTo, textToTranslate); } catch (IOException e) { form.dispatchErrorOccurredEvent(YandexTranslate.this, "RequestTranslation", ErrorMessages.ERROR_TRANSLATE_SERVICE_NOT_AVAILABLE); } catch (JSONException je) { form.dispatchErrorOccurredEvent(YandexTranslate.this, "RequestTranslation", ErrorMessages.ERROR_TRANSLATE_JSON_RESPONSE); } } }); }
Source:
public static boolean isTarFile(String fileName) { if (fileName.length() == 0) { return false; } TarFile tarFile = null; try { tarFile = new TarFile(fileName); } catch (TarException | IOException tarException) { return false; } finally { if (tarFile != null) { try { tarFile.close(); } catch (IOException e) { } } } return true; }

Target:
public static boolean isTarFile(String fileName) { if (fileName.length() == 0) { return false; } TarFile tarFile = null; try { tarFile = new TarFile(fileName); } catch (TarException | IOException exception) { return false; } finally { if (tarFile != null) { try { tarFile.close(); } catch (IOException e) { } } } return true; }
Source:
public String getUrlFromExternalLinkaAfterPageIsLoaded() { wait.forElementPresent(By.cssSelector("body")); return driver.getCurrentUrl(); }

Target:
public String getUrlFromExternalLinkaAfterPageIsLoaded() { wait.forElementVisible(bodyElement); return driver.getCurrentUrl(); }
Source:
public ClusterDataToSamConverter withMolecularIndexTag(final String molecularIndexTag) { this.molecularIndexTag = molecularIndexTag; return this; }

Target:
public ClusterDataToSamConverter withMolecularIndexTag(final String molecularIndexTag) { if (molecularIndexTag == null) throw new IllegalArgumentException("Molecular index tag was null"); this.molecularIndexTag = molecularIndexTag; return this; }
Source:
protected void testExecute() throws Exception { ______TS("Not enough parameters"); verifyHttpParameterFailure(); ______TS("Typical case"); CourseAttributes course = typicalBundle.courses.get("typicalCourse1"); FeedbackSessionAttributes session = typicalBundle.feedbackSessions.get("session1InCourse1"); String[] params = { Const.ParamsNames.COURSE_ID, course.getId(), Const.ParamsNames.FEEDBACK_SESSION_NAME, session.getFeedbackSessionName(), }; DeleteFeedbackSessionAction deleteFeedbackSessionAction = getAction(params); assertEquals(session.getFeedbackSessionName(), logic.getFeedbackSessionDetails(session.getFeedbackSessionName(), course.getId()).feedbackSession.getFeedbackSessionName()); logic.moveFeedbackSessionToRecycleBin(session.getFeedbackSessionName(), course.getId()); JsonResult result = getJsonResult(deleteFeedbackSessionAction); MessageOutput messageOutput = (MessageOutput) result.getOutput(); assertEquals(messageOutput.getMessage(), "The feedback session is deleted."); assertThrows(EntityDoesNotExistException.class, () -> { logic.getFeedbackSessionDetails(session.getFeedbackSessionName(), course.getId()); }); }

Target:
protected void testExecute() throws Exception { }
Source:
private void initControlsFromConfig() { try { editableConfig.load(); tv.setInput(editableConfig); if (editableConfig instanceof FileBasedConfig) { FileBasedConfig fileConfig = (FileBasedConfig) editableConfig; File configFile = fileConfig.getFile(); if (configFile != null) if (isWriteable(configFile)) location.setText(configFile.getPath()); else location.setText(NLS.bind(UIText.ConfigurationEditorComponent_ReadOnlyLocationFormat, configFile.getPath())); else location.setText(UIText.ConfigurationEditorComponent_NoConfigLocationKnown); newValue.setEnabled(configFile != null); } } catch (IOException e) { Activator.handleError(e.getMessage(), e, true); } catch (ConfigInvalidException e) { Activator.handleError(e.getMessage(), e, true); } tv.expandAll(); updateEnablement(); }

Target:
private void initControlsFromConfig() { try { editableConfig.load(); tv.setInput(editableConfig); editable = true; if (editableConfig instanceof FileBasedConfig) { FileBasedConfig fileConfig = (FileBasedConfig) editableConfig; File configFile = fileConfig.getFile(); if (configFile != null) if (isWriteable(configFile)) location.setText(configFile.getPath()); else { location.setText(NLS.bind(UIText.ConfigurationEditorComponent_ReadOnlyLocationFormat, configFile.getPath())); editable=false; } else { location.setText(UIText.ConfigurationEditorComponent_NoConfigLocationKnown); editable = false; } } } catch (IOException e) { Activator.handleError(e.getMessage(), e, true); } catch (ConfigInvalidException e) { Activator.handleError(e.getMessage(), e, true); } tv.expandAll(); updateEnablement(); }
Source:
public Matrix mul(final Matrix matrix) { if (matrix.isDense()) { return new DenseMatrix((breeze.linalg.DenseMatrix<Double>) breezeMatrix.$colon$times(((DenseMatrix) matrix).breezeMatrix, MatrixOps.EMUL_DD)); } else { throw new UnsupportedOperationException(); } }

Target:
public Matrix mul(final Matrix matrix) { if (matrix.isDense()) { return new DenseMatrix((breeze.linalg.DenseMatrix<Double>) breezeMatrix.$colon$times(((DenseMatrix) matrix).breezeMatrix, MatrixOps.EMUL_DD)); } else { return new DenseMatrix((breeze.linalg.DenseMatrix<Double>) breezeMatrix.$colon$times(((CSCMatrix) matrix).getBreezeMatrix(), MatrixOps.EMUL_MM)); } }
Source:
private void writeAffinityGroups() { List<AffinityGroup> affinityGroups = fullEntityOvfData.getAffinityGroups(); if (affinityGroups == null || affinityGroups.isEmpty()) { return; } _writer.writeStartElement("Section"); _writer.writeAttributeString(XSI_URI, "type", "ovf:AffinityGroupsSection_Type"); affinityGroups.forEach(affinityGroup -> { _writer.writeStartElement(OvfProperties.AFFINITY_GROUP); _writer.writeAttributeString(OVF_URI, "name", affinityGroup.getName()); _writer.writeEndElement(); }); _writer.writeEndElement(); }

Target:
private void writeAffinityGroups() { List<AffinityGroup> affinityGroups = fullEntityOvfData.getAffinityGroups(); if (CollectionUtils.isEmpty(affinityGroups)) { return; } _writer.writeStartElement("Section"); _writer.writeAttributeString(XSI_URI, "type", "ovf:AffinityGroupsSection_Type"); affinityGroups.forEach(affinityGroup -> { _writer.writeStartElement(OvfProperties.AFFINITY_GROUP); _writer.writeAttributeString(OVF_URI, "name", affinityGroup.getName()); _writer.writeEndElement(); }); _writer.writeEndElement(); }
Source:
public Boolean getisValueTypeCorrect() { if (this.xmpNode.getChildren().size() != 5) { return Boolean.FALSE; } VeraPDFXMPNode description = null; VeraPDFXMPNode field = null; VeraPDFXMPNode namespaceURI = null; VeraPDFXMPNode prefix = null; VeraPDFXMPNode type = null; for (VeraPDFXMPNode child : this.xmpNode.getChildren()) { if (XMPSchemaRegistryImpl.NS_PDFA_TYPE.equals(child.getNamespaceURI())) { switch (child.getName()) { case "namespaceURI": namespaceURI = child; break; case "prefix": prefix = child; break; case "field": field = child; break; case "description": description = child; break; case "type": type = child; break; } } } return Boolean.valueOf(description != null && prefix != null && field != null && namespaceURI != null && type != null); }

Target:
public Boolean getisValueTypeCorrect() { boolean isValid = true; boolean isDescriptionPresent = false; boolean isFieldPresent = false; boolean isNamespaceURIPresent = false; boolean isPrefixPresent = false; boolean isTypePresent = false; for (VeraPDFXMPNode child : this.xmpNode.getChildren()) { if (XMPSchemaRegistryImpl.NS_PDFA_TYPE.equals(child.getNamespaceURI())) { switch (child.getName()) { case "namespaceURI": if (isNamespaceURIPresent) { isValid = false; } else { isNamespaceURIPresent = true; } break; case "prefix": if (isPrefixPresent) { isValid = false; } else { isPrefixPresent = true; } break; case "field": if (isFieldPresent) { isValid = false; } else { isFieldPresent = true; } break; case "description": if (isDescriptionPresent) { isValid = false; } else { isDescriptionPresent = true; } break; case "type": if (isTypePresent) { isValid = false; } else { isTypePresent = true; } break; default: isValid = false; } } else { isValid = false; } } return Boolean.valueOf(isValid); }
Source:
public void validate() throws Exception { if (getText() == null) { throw new Exception("The message must contain a text."); } List<String> allowed = Arrays.asList(new String[]{"get", "reload", "clean"}); if (!allowed.contains(getText())) { throw new Exception( String.format("The message text must be one of [%s] - '%s' given", allowed.stream().collect(Collectors.joining(",")), getText())); } super.validate(); }

Target:
public void validate() throws Exception { if (getText() == null) { throw new Exception("The message must contain a text."); } if (!ALLOWED_OPTIONS.contains(getText())) { throw new Exception( String.format("The message text must be one of [%s] - '%s' given", ALLOWED_OPTIONS.stream().collect(Collectors.joining(",")), getText())); } super.validate(); }
Source:
public static LwM2mJsonObject fromJsonLwM2m(String jsonString) throws LwM2mJsonException { try { LwM2mJsonObject element = gson.fromJson(jsonString, LwM2mJsonObject.class); return element; } catch (Exception e) { LOG.error(" Unable to deserialize JSON String to LwM2mJsonElement object: " +e.getMessage()); throw new LwM2mJsonException( " Unable to deserialize JSON String to LwM2mJsonElement object ", e); } }

Target:
public static LwM2mJsonObject fromJsonLwM2m(String jsonString) throws LwM2mJsonException { try { LwM2mJsonObject element = gson.fromJson(jsonString, LwM2mJsonObject.class); return element; } catch (Exception e) { throw new LwM2mJsonException( "Unable to deserialize JSON String to LwM2mJsonObject ", e); } }
Source:
public static byte[] byteBufferToArray(ByteBuffer buf) { byte[] arr = new byte[buf.remaining()]; int prevPosition = buf.position(); buf.get(arr); buf.position(prevPosition); return arr; }

Target:
public static byte[] byteBufferToArray(ByteBuffer buf) { byte[] arr = new byte[buf.remaining()]; int prevPosition = buf.position(); try { buf.get(arr); } finally { buf.position(prevPosition); } return arr; }
Source:
public void testGetDutyCycleValueSuccess() throws Exception { ATCommandResponse mockedResponse = Mockito.mock(ATCommandResponse.class); Mockito.when(mockedResponse.getResponseStatus()).thenReturn(ATCommandStatus.OK); Mockito.when(mockedResponse.getResponse()).thenReturn(new byte[]{0x03, 0x52}); Mockito.doReturn(mockedResponse).when(xbeeDevice).sendATCommand((ATCommand)Mockito.any()); double dutyCycle = -1; try { dutyCycle = xbeeDevice.getPWMDutyCycle(IOLine.DIO10_PWM0); } catch (InvalidOperatingModeException e) { fail("This exception shouldn't be thrown now."); } catch (XBeeException e) { fail("This exception shouldn't be thrown now."); } assertEquals(83.1, dutyCycle, 0.1); }

Target:
public void testGetDutyCycleValueSuccess() throws InvalidOperatingModeException, XBeeException { ATCommandResponse mockedResponse = Mockito.mock(ATCommandResponse.class); Mockito.when(mockedResponse.getResponseStatus()).thenReturn(ATCommandStatus.OK); Mockito.when(mockedResponse.getResponse()).thenReturn(new byte[]{0x03, 0x52}); Mockito.doReturn(mockedResponse).when(xbeeDevice).sendATCommand((ATCommand)Mockito.any()); double dutyCycle = xbeeDevice.getPWMDutyCycle(IOLine.DIO10_PWM0); assertEquals(83.1, dutyCycle, 0.1); }
Source:
protected OpenShiftResourceHandle createResourceFromStream(InputStream stream) throws IOException { try { StringBuilder textBuilder = new StringBuilder(); try (Reader reader = new BufferedReader(new InputStreamReader (stream, Charset.forName(StandardCharsets.UTF_8.name())))) { int c = 0; while ((c = reader.read()) != -1) { textBuilder.append((char) c); } } String content = textBuilder.toString(); char nonwhitespace; int index=0; do { nonwhitespace=content.charAt(index++); } while (index < content.length() && Character.isWhitespace(nonwhitespace)); if ( nonwhitespace == '{' ) { ModelNode json; json = ModelNode.fromJSONString(content); String kind = json.get("kind").asString(); return createResourceFromJson(kind, json); } else { StringTokenizer tokenizer = new StringTokenizer(content.trim(),":\n"); tokenizer.nextToken(); String kind = tokenizer.nextToken().trim(); return createResourceFromYaml(kind, content); } } finally { stream.close(); } }

Target:
protected OpenShiftResourceHandle createResourceFromStream(InputStream stream) throws IOException { try { String content = IOUtils.toString(stream, StandardCharsets.UTF_8); try { ModelNode json; json = ModelNode.fromJSONString(content); String kind = json.get("kind").asString(); content = json.toJSONString(true); return createResourceFromString(kind, content); } catch (IllegalArgumentException e) { StringTokenizer tokenizer = new StringTokenizer(content.trim(),":\n"); tokenizer.nextToken(); String kind = tokenizer.nextToken().trim(); return createResourceFromString(kind, content); } } finally { stream.close(); } }
Source:
private static void runDashboardServer(final int port) throws IOException { LOG.log(Level.INFO, "Now launch dashboard server"); final Path tmpPath = Paths.get(System.getProperty("java.io.tmpdir") + "/dashboard"); try { final FileSystem fileSystem = FileSystems.newFileSystem( AsyncDolphinLauncher.class.getResource("").toURI(), Collections.<String, String>emptyMap() ); final Path jarPath = fileSystem.getPath("/dashboard"); Files.walkFileTree(jarPath, new SimpleFileVisitor<Path>() { @Override public FileVisitResult preVisitDirectory(final Path dir, final BasicFileAttributes attrs) throws IOException { Files.createDirectories(tmpPath.resolve(jarPath.relativize(dir).toString())); return FileVisitResult.CONTINUE; } @Override public FileVisitResult visitFile(final Path file, final BasicFileAttributes attrs) throws IOException { Files.copy(file, tmpPath.resolve(jarPath.relativize(file).toString()), REPLACE_EXISTING); return FileVisitResult.CONTINUE; } }); } catch (Exception e) { LOG.log(Level.WARNING, "Copy failure: " + e); throw new IOException(); } try { final String tmpScript = tmpPath.toString() + "/dashboard.py"; final ProcessBuilder pb = new ProcessBuilder("python", tmpScript, String.valueOf(port)).inheritIO(); final Process p = pb.start(); Runtime.getRuntime().addShutdownHook(new Thread() { @Override public void run() { p.destroy(); } }); } catch (Exception e) { LOG.log(Level.WARNING, "Launch failure: " + e); throw new IOException(); } }

Target:
private static void runDashboardServer(final int port) throws IOException { LOG.log(Level.INFO, "Now launch dashboard server"); final Path tmpPath = Paths.get(System.getProperty("java.io.tmpdir"), DASHBOARD_DIR); try { final FileSystem fileSystem = FileSystems.newFileSystem( AsyncDolphinLauncher.class.getResource("").toURI(), Collections.<String, String>emptyMap() ); final Path jarPath = fileSystem.getPath(DASHBOARD_DIR); Files.walkFileTree(jarPath, new SimpleFileVisitor<Path>() { @Override public FileVisitResult preVisitDirectory(final Path dir, final BasicFileAttributes attrs) throws IOException { Files.createDirectories(tmpPath.resolve(jarPath.relativize(dir).toString())); return FileVisitResult.CONTINUE; } @Override public FileVisitResult visitFile(final Path file, final BasicFileAttributes attrs) throws IOException { Files.copy(file, tmpPath.resolve(jarPath.relativize(file).toString()), REPLACE_EXISTING); return FileVisitResult.CONTINUE; } }); final String tmpScript = Paths.get(tmpPath.toString(), DASHBOARD_SCRIPT).toString(); final ProcessBuilder pb = new ProcessBuilder("python", tmpScript, String.valueOf(port)).inheritIO(); final Process p = pb.start(); Runtime.getRuntime().addShutdownHook(new Thread() { @Override public void run() { p.destroy(); } }); } catch (URISyntaxException e) { LOG.log(Level.WARNING, "Failed to access current jar file.", e); } }
Source:
private static boolean _isAlive(VirtualChannel channel, int pid, Launcher launcher) throws IOException, InterruptedException { if (launcher instanceof Launcher.LocalLauncher || launcher instanceof Launcher.RemoteLauncher) { try { return channel.call(new Liveness(pid)); } catch (IllegalStateException x) { LOGGER.log(Level.WARNING, "cannot determine liveness of " + pid, x); } catch (PosixException x) { LOGGER.log(Level.WARNING, "cannot determine liveness of " + pid, x); } return true; } else { return launcher.launch().cmds("ps", "-o", "pid=", Integer.toString(pid)).quiet(true).join() == 0; } }

Target:
private static boolean _isAlive(VirtualChannel channel, int pid, Launcher launcher) throws IOException, InterruptedException { if (launcher instanceof Launcher.LocalLauncher || launcher instanceof Launcher.RemoteLauncher) { try { return channel.call(new Liveness(pid)); } catch (IllegalStateException x) { LOGGER.log(Level.WARNING, "cannot determine liveness of " + pid, x); } catch (PosixException x) { LOGGER.log(Level.WARNING, "cannot determine liveness of " + pid, x); } return true; } else { return launcher.launch().cmds("ps", "-o", "pid=", Integer.toString(pid)).quiet(true).start().joinWithTimeout(1, TimeUnit.MINUTES, launcher.getListener())== 0; } }
Source:
private void updateTableStat(OverridableConf queryContext, PartitionedTableScanNode scanNode) throws TajoException { if (scanNode.getInputPaths().length > 0) { try { FileSystem fs = scanNode.getInputPaths()[0].getFileSystem(queryContext.getConf()); long totalVolume = 0; for (Path input : scanNode.getInputPaths()) { ContentSummary summary = fs.getContentSummary(input); totalVolume += summary.getLength(); totalVolume += summary.getFileCount(); } scanNode.getTableDesc().getStats().setNumBytes(totalVolume); } catch (Throwable e) { throw new TajoInternalError(e); } } }

Target:
private void updateTableStat(OverridableConf queryContext, PartitionedTableScanNode scanNode) throws TajoException { if (scanNode.getInputPaths().length > 0) { try { FileSystem fs = scanNode.getInputPaths()[0].getFileSystem(queryContext.getConf()); long totalVolume = 0; for (Path input : scanNode.getInputPaths()) { ContentSummary summary = fs.getContentSummary(input); totalVolume += summary.getLength(); } scanNode.getTableDesc().getStats().setNumBytes(totalVolume); } catch (Throwable e) { throw new TajoInternalError(e); } } }
Source:
private Optional<String> findIndexFileObjectId(final ObjectNode entities) { for (JsonNode entity : entities.withArray("content")) { String fileName = entity.get("fileName").textValue(); if (fileName.endsWith(".bai")) { return Optional.of(entity.get("id").textValue()); } } return Optional.empty(); }

Target:
private Optional<String> findIndexFileObjectId(final ObjectNode entities) { for (val entity : entities.withArray("content")) { val fileName = entity.get("fileName").textValue(); if (fileName.endsWith(".bai")) { return Optional.of(entity.get("id").textValue()); } } return Optional.empty(); }
Source:
public ApplyNode( @JsonProperty("id") PlanNodeId id, @JsonProperty("input") PlanNode input, @JsonProperty("subquery") PlanNode subquery, @JsonProperty("subqueryAssignments") Assignments subqueryAssignments, @JsonProperty("correlation") List<VariableReferenceExpression> correlation, @JsonProperty("originSubqueryError") String originSubqueryError) { super(id); checkArgument(input.getOutputVariables().containsAll(correlation), "Input does not contain symbols from correlation"); ApplyNodeUtil.verifySubquerySupported(subqueryAssignments); this.input = requireNonNull(input, "input is null"); this.subquery = requireNonNull(subquery, "right is null"); this.subqueryAssignments = requireNonNull(subqueryAssignments, "assignments is null"); this.correlation = ImmutableList.copyOf(requireNonNull(correlation, "correlation is null")); this.originSubqueryError = requireNonNull(originSubqueryError, "originSubqueryError is null"); }

Target:
public ApplyNode( @JsonProperty("id") PlanNodeId id, @JsonProperty("input") PlanNode input, @JsonProperty("subquery") PlanNode subquery, @JsonProperty("subqueryAssignments") Assignments subqueryAssignments, @JsonProperty("correlation") List<VariableReferenceExpression> correlation, @JsonProperty("originSubqueryError") String originSubqueryError) { super(id); checkArgument(input.getOutputVariables().containsAll(correlation), "Input does not contain symbols from correlation"); verifySubquerySupported(subqueryAssignments); this.input = requireNonNull(input, "input is null"); this.subquery = requireNonNull(subquery, "subquery is null"); this.subqueryAssignments = requireNonNull(subqueryAssignments, "assignments is null"); this.correlation = ImmutableList.copyOf(requireNonNull(correlation, "correlation is null")); this.originSubqueryError = requireNonNull(originSubqueryError, "originSubqueryError is null"); }
Source:
private void sendPollInfoToPositionTracker(Consumer<?, ?> consumer, ConsumerRecords<?, ?> records) { _kafkaPositionTracker.ifPresent(tracker -> { for (final TopicPartition topicPartition : tracker.getPartitionsNeedingInit()) { try { tracker.initializePartition(topicPartition, consumer.position(topicPartition)); } catch (IllegalStateException e) { _logger.trace("Got IllegalStateException when processing partition {}", topicPartition, e); } catch (InvalidOffsetException e) { _logger.trace("Got InvalidOffsetException when processing partition {}", topicPartition, e); } } tracker.onRecordsReceived(records, consumer.metrics()); }); }

Target:
private void sendPollInfoToPositionTracker(Consumer<?, ?> consumer, ConsumerRecords<?, ?> records) { try { _kafkaPositionTracker.ifPresent(tracker -> { for (final TopicPartition topicPartition : tracker.getUninitializedPartitions()) { try { tracker.initializePartition(topicPartition, consumer.position(topicPartition)); } catch (IllegalStateException e) { _logger.trace("Got IllegalStateException when processing partition {}", topicPartition, e); } catch (InvalidOffsetException e) { _logger.trace("Got InvalidOffsetException when processing partition {}", topicPartition, e); } } tracker.onRecordsReceived(records, consumer.metrics()); }); } catch (WakeupException | InterruptException e) { throw e; } catch (Exception e) { _logger.warn("Got uncaught exception while processing position tracker code (swallowing and continuing)", e); } }
Source:
public int hashCode() { return Objects.hash(getDataLinks(), getChargeId(), getAmount(), getState(), getCardBrand(), getGatewayTransactionId(), getReturnUrl(), getEmail(), getDescription(), getReference(), getProviderName(), createdDate, getRefundSummary(), getSettlementSummary(), getAuth3dsData(), getCardDetails(), getLanguage(), getDelayedCapture(), getCorporateCardSurcharge(), getTotalAmount(), getWalletType()); }

Target:
public int hashCode() { return Objects.hash(dataLinks, chargeId, amount, state, cardBrand, gatewayTransactionId, returnUrl, email, description, reference, providerName, createdDate, refundSummary, settlementSummary, auth3dsData, cardDetails, language, delayedCapture, corporateCardSurcharge, totalAmount, walletType); }
Source:
protected void executeCommand() { StoragePoolParametersBase parameters = new StoragePoolParametersBase(getStoragePoolId()); ActionReturnValue actionReturnValue = runInternalAction(ActionType.ProcessOvfUpdateForStoragePool, parameters, getContext()); HashSet<Guid> proccessedDomains = actionReturnValue.getActionReturnValue(); if (!proccessedDomains.isEmpty()) { runInternalActionWithTasksContext(ActionType.ProcessOvfUpdateForStorageDomain, createProcessOvfUpdateForDomainParams()); } setSucceeded(true); }

Target:
protected void executeCommand() { StoragePoolParametersBase parameters = new StoragePoolParametersBase(getStoragePoolId()); ActionReturnValue actionReturnValue = runInternalAction(ActionType.ProcessOvfUpdateForStoragePool, parameters, getContext()); Set<Guid> proccessedDomains = actionReturnValue.getActionReturnValue(); if (!proccessedDomains.isEmpty()) { runInternalActionWithTasksContext(ActionType.ProcessOvfUpdateForStorageDomain, createProcessOvfUpdateForDomainParams()); } setSucceeded(true); }