auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>private static String maxPlausibleSuffix(String suffix, int initialSuffixLength, int localMinStemLength) { int skipOver = 0; <START> int maxSuffix = initialSuffixLength - maxSuffixLength; <END> int lastDash = suffix.lastIndexOf('-'); if (lastDash != -1 && lastDash > maxSuffix) { skipOver = lastDash; } else { skipOver = Math.max(maxSuffix, localMinStemLength); } if (initialSuffixLength >= skipOver) { suffix = suffix.substring(skipOver); } return suffix; }</code><technical_language>add assert initialSuffixLength < maxSuffixLength; this line obvious for reader happen</technical_language>

Target:
private static String maxPlausibleSuffix(String suffix, int initialSuffixLength, int localMinStemLength) { int skipOver = 0; int maxSuffixStart = initialSuffixLength - MAX_SUFFIX_LENGTH; int lastDash = suffix.lastIndexOf('-'); if (lastDash != -1 && lastDash > maxSuffixStart) { skipOver = lastDash; } else { skipOver = Math.max(maxSuffixStart, localMinStemLength); } if (initialSuffixLength >= skipOver) { suffix = suffix.substring(skipOver); } return suffix; }
Source:
<code>private CostBenefitInfo getBestCandidateToCompact(NavigableMap<String, Long> validDataPerLogSegments, long segmentCapacity, long segmentHeaderSize, long maxBlobSize) { Map.Entry<String, Long> firstEntry = validDataPerLogSegments.firstEntry(); Map.Entry<String, Long> lastEntry = validDataPerLogSegments.lastEntry(); CostBenefitInfo bestCandidateToCompact = null; <START> while (firstEntry != null && firstEntry.getKey().compareTo(lastEntry.getKey()) <= 0) { <END> Map.Entry<String, Long> endEntry = lastEntry; while (endEntry != null && firstEntry.getKey().compareTo(endEntry.getKey()) <= 0) { CostBenefitInfo costBenefitInfo = getCostBenefitInfo(firstEntry.getKey(), endEntry.getKey(), validDataPerLogSegments, segmentCapacity, segmentHeaderSize, maxBlobSize); if (costBenefitInfo.getBenefit() > 0 && (bestCandidateToCompact == null || costBenefitInfo.getCostBenefitRatio().compareTo(bestCandidateToCompact.getCostBenefitRatio()) < 0)) { bestCandidateToCompact = costBenefitInfo; logger.trace("Updating best candidate to compact to ", bestCandidateToCompact); } endEntry = validDataPerLogSegments.lowerEntry(endEntry.getKey()); } firstEntry = validDataPerLogSegments.higherEntry(firstEntry.getKey()); } return bestCandidateToCompact; }</code><technical_language>condition is required - lastEntry changes right</technical_language>

Target:
private CostBenefitInfo getBestCandidateToCompact(NavigableMap<String, Long> validDataPerLogSegments, long segmentCapacity, long segmentHeaderSize, long maxBlobSize) { Map.Entry<String, Long> firstEntry = validDataPerLogSegments.firstEntry(); Map.Entry<String, Long> lastEntry = validDataPerLogSegments.lastEntry(); CostBenefitInfo bestCandidateToCompact = null; while (firstEntry != null) { Map.Entry<String, Long> endEntry = lastEntry; while (endEntry != null && firstEntry.getKey().compareTo(endEntry.getKey()) <= 0) { CostBenefitInfo costBenefitInfo = getCostBenefitInfo(firstEntry.getKey(), endEntry.getKey(), validDataPerLogSegments, segmentCapacity, segmentHeaderSize, maxBlobSize); if (costBenefitInfo.getBenefit() >= storeConfig.storeMinLogSegmentCountToReclaimToTriggerCompaction && ( bestCandidateToCompact == null || costBenefitInfo.getCostBenefitRatio().compareTo(bestCandidateToCompact.getCostBenefitRatio()) < 0)) { bestCandidateToCompact = costBenefitInfo; logger.trace("Updating best candidate to compact to ", bestCandidateToCompact); } endEntry = validDataPerLogSegments.lowerEntry(endEntry.getKey()); } firstEntry = validDataPerLogSegments.higherEntry(firstEntry.getKey()); } return bestCandidateToCompact; }
Source:
<code>public ValidationTaskResult validateImpl(Map<String, String> optionMap) throws InterruptedException { String hadoopVersion; try { hadoopVersion = getHadoopVersion(); } catch (IOException e) { return new ValidationTaskResult(ValidationUtils.State.FAILED, getName(), String.format("Failed to get hadoop version:%n%s.", ValidationUtils.getErrorInfo(e)), "Please check if hadoop is on your PATH."); } String version = mConf.get(PropertyKey.UNDERFS_VERSION); for (String prefix : new String[] {CDH_PREFIX, HADOOP_PREFIX}) { if (version.startsWith(prefix)) { <START> version = version.substring(prefix.length()); <END> } } if (hadoopVersion.contains(version)) { return new ValidationTaskResult(ValidationUtils.State.OK, getName(), String.format("Hadoop version %s contains UFS version defined in alluxio %s=%s.", hadoopVersion, PropertyKey.UNDERFS_VERSION.toString(), version), ""); } return new ValidationTaskResult(ValidationUtils.State.FAILED, getName(), String.format("Hadoop version %s does not match %s=%s.", hadoopVersion, PropertyKey.UNDERFS_VERSION.toString(), version), String.format("Please configure %s to match the HDFS version.", PropertyKey.UNDERFS_VERSION.toString())); }</code><technical_language>nit: break if find a match</technical_language>

Target:
public ValidationTaskResult validateImpl(Map<String, String> optionMap) throws InterruptedException { String hadoopVersion; try { hadoopVersion = getHadoopVersion(); } catch (IOException e) { return new ValidationTaskResult(ValidationUtils.State.FAILED, getName(), String.format("Failed to get hadoop version:%n%s.", ValidationUtils.getErrorInfo(e)), "Please check if hadoop is on your PATH."); } String version = mConf.get(PropertyKey.UNDERFS_VERSION); for (String prefix : new String[] {CDH_PREFIX, HADOOP_PREFIX}) { if (version.startsWith(prefix)) { version = version.substring(prefix.length()); break; } } if (hadoopVersion.contains(version)) { return new ValidationTaskResult(ValidationUtils.State.OK, getName(), String.format("Hadoop version %s contains UFS version defined in alluxio %s=%s.", hadoopVersion, PropertyKey.UNDERFS_VERSION.toString(), version), ""); } return new ValidationTaskResult(ValidationUtils.State.FAILED, getName(), String.format("Hadoop version %s does not match %s=%s.", hadoopVersion, PropertyKey.UNDERFS_VERSION.toString(), version), String.format("Please configure %s to match the HDFS version.", PropertyKey.UNDERFS_VERSION.toString())); }
Source:
<code>public static void main(String[] args) { TextAnalyticsClient client = new TextAnalyticsClientBuilder() .subscriptionKey(Configuration.getGlobalConfiguration().get("AZURE_TEXT_ANALYTICS_SUBSCRIPTION_KEY")) .endpoint(Configuration.getGlobalConfiguration().get("AZURE_TEXT_ANALYTICS_ENDPOINT")) .buildClient(); String text = "hello world"; final DetectLanguageResult detectLanguageResult = client.detectLanguage(text, "US"); final DetectedLanguage detectedDocumentLanguage = detectLanguageResult.getPrimaryLanguage(); System.out.printf("Detected Primary Language: %s, ISO 6391 Name: %s, Score: %s%n", detectedDocumentLanguage.getName(), detectedDocumentLanguage.getIso6391Name(), detectedDocumentLanguage.getScore()); <START> final List<DetectedLanguage> detectedLanguages = detectLanguageResult.getDetectedLanguages(); <END> detectedLanguages.forEach(detectedLanguage -> System.out.printf("Other detected languages: %s, ISO 6391 Name: %s, Score: %s%n", detectedLanguage.getName(), detectedLanguage.getIso6391Name(), detectedLanguage.getScore())); }</code><technical_language>I need a local variable declaration for this. for (DetectedLanguage language : detectLanguageResult.getDetectedLanguages()) { ... detectLanguageResult.getDetectedLanguages().foreach(language -> { });</technical_language>

Target:
public static void main(String[] args) { TextAnalyticsClient client = new TextAnalyticsClientBuilder() .subscriptionKey("subscription-key") .endpoint("<LINK_0>") .buildClient(); String text = "hello world"; final DetectLanguageResult detectLanguageResult = client.detectLanguage(text, "US"); final DetectedLanguage detectedDocumentLanguage = detectLanguageResult.getPrimaryLanguage(); System.out.printf("Detected Primary Language: %s, ISO 6391 Name: %s, Score: %s.%n", detectedDocumentLanguage.getName(), detectedDocumentLanguage.getIso6391Name(), detectedDocumentLanguage.getScore()); final List<DetectedLanguage> detectedLanguages = detectLanguageResult.getDetectedLanguages(); for (DetectedLanguage detectedLanguage : detectedLanguages) { System.out.printf("Other detected languages: %s, ISO 6391 Name: %s, Score: %s.%n", detectedLanguage.getName(), detectedLanguage.getIso6391Name(), detectedLanguage.getScore()); } }
Source:
<code>private void pumpFileContent(File file, PrintStream out) throws IOException { BufferedReader bufferedReader = null; try { bufferedReader = new BufferedReader(new FileReader(file)); String line = PROLOG_PATTERN.matcher(bufferedReader.readLine()).replaceFirst(""); <START> if (!line.isEmpty()) { END> out.println(line); } while ((line = bufferedReader.readLine()) != null) { out.println(line); } } finally { IOUtils.closeQuietly(bufferedReader); } }</code><technical_language>I change good! nitpick, discomfort knowing if Regex implementation in java greedy in nature. what'd happen if prolog string happened a CDATA section (remember CDATA do escaping) instead change this (may compile, a general idea) - java // string begins prolog, ignoring whitespace if (line.matches(/^\s*<\?xml\b/)){ int prologStartIndex = line.indexOf("<?xml "); int prologEndIndex = line.indexOf("?>"); // if need handle a -1 return for of above? if (endIndex > prologStartIndex) { prologString = line.substring(prologStartIndex, prologEndIndex); line = line.replace(prologString, ""); } } WDYT</technical_language>

Target:
private void pumpFileContent(File file, PrintStream out) throws IOException { BufferedReader bufferedReader = null; try { bufferedReader = new BufferedReader(new FileReader(file)); String line = XmlUtils.stripProlog(bufferedReader.readLine()); if (!line.isEmpty()) { out.println(line); } while ((line = bufferedReader.readLine()) != null) { out.println(line); } } finally { IOUtils.closeQuietly(bufferedReader); } }
Source:
<code>final void cleanLocks() throws RepositoryException { lockManager.cleanLocks(session); for (String token : new ArrayList<String>(lockTokens.keySet())) { removeLockToken(token); <START> } <END> }</code><technical_language>This good. @hchiorean, do this is lockManager.cleanLocks(session) call, is do other cleanup? IMO, place</technical_language>

Target:
final void cleanLocks() throws RepositoryException { lockManager.cleanLocks(session); for (String token : lockTokens.keySet()) { removeLockToken(token); } }
Source:
<code>JobPlan findMatchingJob(AgentInstance agent) { List<JobPlan> filteredJobPlans = environmentConfigService.filterJobsByAgent(jobPlans, agent.getUuid()); JobPlan match = null; if (!agent.isElastic()) { match = agent.firstMatching(filteredJobPlans); } else { for (JobPlan jobPlan : filteredJobPlans) { try { if (jobPlan.requiresElasticAgent() && elasticAgentPluginService.shouldAssignWork(agent.elasticAgentMetadata(), environmentConfigService.envForPipeline(jobPlan.getPipelineName()), jobPlan.getElasticProfile(), jobPlan.getClusterProfile(), jobPlan.getIdentifier())) { match = jobPlan; break; } } catch (RulesViolationException | SecretResolutionFailureException e) { JobInstance instance = jobInstanceService.buildById(jobPlan.getJobId()); JobIdentifier jobIdentifier = jobPlan.getIdentifier(); <START> String failureMessage = format("\nThis job was failed by GoCD. This job is configured to run on an elastic agent, but the associated elastic configurations failed for secrets resolution: %s", e.getMessage()); <END> logToJobConsole(jobIdentifier, failureMessage); scheduleService.failJob(instance); jobStatusTopic.post(new JobStatusMessage(jobIdentifier, instance.getState(), agent.getUuid())); } } } if (match != null) { jobPlans.remove(match); } return match; }</code><technical_language>This job failed GoCD. This job is configured run elastic agent, errors while resolving secrets for elastic configurations. Reasons: blah blah blah</technical_language>

Target:
JobPlan findMatchingJob(AgentInstance agent) { List<JobPlan> filteredJobPlans = environmentConfigService.filterJobsByAgent(jobPlans, agent.getUuid()); JobPlan match = null; if (!agent.isElastic()) { match = agent.firstMatching(filteredJobPlans); } else { for (JobPlan jobPlan : filteredJobPlans) { try { if (jobPlan.requiresElasticAgent() && elasticAgentPluginService.shouldAssignWork(agent.elasticAgentMetadata(), environmentConfigService.envForPipeline(jobPlan.getPipelineName()), jobPlan.getElasticProfile(), jobPlan.getClusterProfile(), jobPlan.getIdentifier())) { match = jobPlan; break; } } catch (RulesViolationException | SecretResolutionFailureException e) { JobInstance instance = jobInstanceService.buildById(jobPlan.getJobId()); JobIdentifier jobIdentifier = jobPlan.getIdentifier(); String failureMessage = format("\nThis job was failed by GoCD. This job is configured to run on an elastic agent, there were errors while resolving secrets for the the associated elastic configurations.\nReasons: %s", e.getMessage()); logToJobConsole(jobIdentifier, failureMessage); scheduleService.failJob(instance); jobStatusTopic.post(new JobStatusMessage(jobIdentifier, instance.getState(), agent.getUuid())); } } } if (match != null) { jobPlans.remove(match); } return match; }
Source:
<code>public DerbyConnector(Supplier<MetadataStorageConnectorConfig> config, Supplier<MetadataStorageTablesConfig> dbTables) { super(config, dbTables); final BasicDataSource datasource = getDatasource(); datasource.setDriverClassLoader(getClass().getClassLoader()); datasource.setDriverClassName("org.apache.derby.jdbc.ClientDriver"); this.dbi = new DBI(datasource); <START> log.info("Configured Derby as the metadata storage"); <END> }</code><technical_language>minor nitpick, remove "the" consistent deep storage log messages</technical_language>

Target:
public DerbyConnector(Supplier<MetadataStorageConnectorConfig> config, Supplier<MetadataStorageTablesConfig> dbTables) { super(config, dbTables); final BasicDataSource datasource = getDatasource(); datasource.setDriverClassLoader(getClass().getClassLoader()); datasource.setDriverClassName("org.apache.derby.jdbc.ClientDriver"); this.dbi = new DBI(datasource); log.info("Configured Derby as metadata storage"); }
Source:
<code>protected static String formatNumber(long value, int base) { <START> String s = ""; END> switch (base) { case 2: s = "0b" + Long.toBinaryString(value); break; case 8: s= "0" + Long.toOctalString(value); break; case 10: s = Long.toString(value); break; case 16: s = "0x" + Long.toHexString(value); break; default: s = Long.toString(value); break; } return s; }</code><technical_language>do initialize here? If handled in case below, start null, avoid instantiating empty string</technical_language>

Target:
protected final static String formatNumber(long value, int base) { String s; switch (base) { case 2: s = "0b" + Long.toBinaryString(value); break; case 8: s = "0" + Long.toOctalString(value); break; case 10: s = Long.toString(value); break; case 16: s = "0x" + Long.toHexString(value); break; default: s = Long.toString(value); break; } return s; }
Source:
<code>public void configure(final MapperFactory mapperFactory) { mapperFactory.getConverterFactory().registerConverter(new ActualMeterReadsConverter()); mapperFactory.getConverterFactory().registerConverter(new ActualMeterReadsGasConverter()); mapperFactory.getConverterFactory().registerConverter(new AlarmRegisterConverter()); <START> mapperFactory.getConverterFactory().registerConverter(new PeriodicMeterReadsRequestConverter()); <END> mapperFactory.getConverterFactory().registerConverter(new PeriodicMeterReadsResponseConverter()); mapperFactory.getConverterFactory().registerConverter(new PeriodicMeterReadsResponseGasConverter()); mapperFactory.getConverterFactory().registerConverter(new AmrProfileStatusCodeConverter()); mapperFactory.getConverterFactory().registerConverter(new PushNotificationsAlarmConverter()); }</code><technical_language>I expect a MeterValueConverter converting domain core MeterValue objects WS smart metering MeterValue objects. domain meter reads doubles a single unit for reads appears work, I this is more incidentally expect this a general rule for design of handling values. ConfigurableMapper is a type Orika mapping configuration is expected put in, actual conversion. I unconvinced static conversion method is suitable place in this class</technical_language>

Target:
public void configure(final MapperFactory mapperFactory) { mapperFactory.getConverterFactory().registerConverter(new ActualMeterReadsConverter()); mapperFactory.getConverterFactory().registerConverter(new ActualMeterReadsGasConverter()); mapperFactory.getConverterFactory().registerConverter(new AlarmRegisterConverter()); mapperFactory.getConverterFactory().registerConverter(new PeriodicMeterReadsRequestConverter()); mapperFactory.getConverterFactory().registerConverter(new PeriodicMeterReadsResponseConverter()); mapperFactory.getConverterFactory().registerConverter(new PeriodicMeterReadsResponseGasConverter()); mapperFactory.getConverterFactory().registerConverter(new AmrProfileStatusCodeConverter()); mapperFactory.getConverterFactory().registerConverter(new PushNotificationsAlarmConverter()); mapperFactory.getConverterFactory().registerConverter(new MeterValueConverter()); }
Source:
<code>public int hashCode() { int result = _domainUuid != null ? _domainUuid.hashCode() : 0; result = 31 * result + (_vpcUuid != null ? _vpcUuid.hashCode() : 0); result = 31 * result + (_domainTemplateName != null ? _domainTemplateName.hashCode() : 0); return result; <START> } <END></code><technical_language>Please implement toString() provide debugging state information for debugging purposes</technical_language>

Target:
public int hashCode() { int result = super.hashCode(); result = 31 * result + (_domainUuid != null ? _domainUuid.hashCode() : 0); result = 31 * result + (_vpcUuid != null ? _vpcUuid.hashCode() : 0); result = 31 * result + (_domainTemplateName != null ? _domainTemplateName.hashCode() : 0); return result; }
Source:
<code>public JobsRecords retrieveJobInfo(JobsSearchSettings jobsSearchSettings) throws SchedulerException, SQLException { <START> int defaultRowsNumber = 10; <END> int defaultPage = 1; List<JobBasicInfo> jobs = motechSchedulerDatabaseService.getScheduledJobsBasicInfo(jobsSearchSettings); int rowCount = jobs.size() == 0 ? 0 : motechSchedulerDatabaseService.countJobs(jobsSearchSettings); if (jobsSearchSettings.getRows() == null) { jobsSearchSettings.setRows(defaultRowsNumber); } if (jobsSearchSettings.getPage() == null) { jobsSearchSettings.setPage(defaultPage); } previousJobsRecords = new JobsRecords( jobsSearchSettings.getPage(), jobsSearchSettings.getRows(), rowCount, jobs ); return previousJobsRecords; }</code><technical_language>define this variables in if conditions - 63 66 lines</technical_language>

Target:
public JobsRecords retrieveJobInfo(JobsSearchSettings jobsSearchSettings) throws SchedulerException, SQLException { List<JobBasicInfo> jobs = motechSchedulerDatabaseService.getScheduledJobsBasicInfo(jobsSearchSettings); int rowCount = jobs.size() == 0 ? 0 : motechSchedulerDatabaseService.countJobs(jobsSearchSettings); if (jobsSearchSettings.getRows() == null) { int defaultRowsNumber = 10; jobsSearchSettings.setRows(defaultRowsNumber); } if (jobsSearchSettings.getPage() == null) { int defaultPage = 1; jobsSearchSettings.setPage(defaultPage); } previousJobsRecords = new JobsRecords( jobsSearchSettings.getPage(), jobsSearchSettings.getRows(), rowCount, jobs ); return previousJobsRecords; }
Source:
<code><START> public static void showMessage(Activity activity, int resId) { <END> showMessage(findBestView(activity), activity.getString(resId), Snackbar.LENGTH_LONG); }</code><technical_language>Sorry, feedback for this function. leverage showMessage(Activity, int, int) instead of repeating findBestView() getString() here</technical_language>

Target:
public static void showMessage(Activity activity, int resId) { showMessage(activity, activity.getString(resId), Snackbar.LENGTH_LONG); }
Source:
<code>public void shouldDebugWebPhpScriptFromNonDefaultPortAndNotFromFirstLine() throws IOException { menu.runCommand( TestMenuCommandsConstants.Run.RUN_MENU, TestMenuCommandsConstants.Run.EDIT_DEBUG_CONFIGURATION); debugConfig.createConfig(PROJECT, false, NON_DEFAULT_DEBUG_PORT); menu.runCommandByXpath( TestMenuCommandsConstants.Run.RUN_MENU, TestMenuCommandsConstants.Run.DEBUG, getXpathForDebugConfigurationMenuItem()); notificationPopup.waitExpectedMessageOnProgressPanelAndClosed( String.format( "Remote debugger connected\nConnected to: Zend Debugger, port: %s.", NON_DEFAULT_DEBUG_PORT)); projectExplorer.openItemByPath(PATH_TO_LIB_PHP); <START> editor.setBreakpoint(14); <END> editor.closeAllTabs(); projectExplorer.openItemByPath(PATH_TO_INDEX_PHP); projectExplorer.invokeCommandWithContextMenu( ProjectExplorer.CommandsGoal.COMMON, PROJECT, START_APACHE_COMMAND_NAME); startWebPhpScriptInDebugMode(); debugPanel.openDebugPanel(); editor.waitTabFileWithSavedStatus("lib.php"); debugPanel.waitDebugHighlightedText("return \"Hello, $name\""); debugPanel.waitTextInVariablesPanel("$name=\"man\""); debugPanel.clickOnButton(DebugPanel.DebuggerButtonsPanel.STEP_OUT); editor.waitTabFileWithSavedStatus("index.php"); debugPanel.waitDebugHighlightedText("echo sayHello(\"man\");"); debugPanel.waitTextInVariablesPanel("$_GET=array [3]"); }</code><technical_language>important part of test ensure breakpoint active in some time</technical_language>

Target:
public void shouldDebugWebPhpScriptFromNonDefaultPortAndNotFromFirstLine() throws IOException { menu.runCommand( TestMenuCommandsConstants.Run.RUN_MENU, TestMenuCommandsConstants.Run.EDIT_DEBUG_CONFIGURATION); debugConfig.createConfig(PROJECT, false, NON_DEFAULT_DEBUG_PORT); menu.runCommandByXpath( TestMenuCommandsConstants.Run.RUN_MENU, TestMenuCommandsConstants.Run.DEBUG, getXpathForDebugConfigurationMenuItem()); notificationPopup.waitExpectedMessageOnProgressPanelAndClosed( String.format( "Remote debugger connected\nConnected to: Zend Debugger, port: %s.", NON_DEFAULT_DEBUG_PORT)); projectExplorer.openItemByPath(PATH_TO_LIB_PHP); editor.setBreakpoint(14); editor.closeAllTabs(); projectExplorer.openItemByPath(PATH_TO_INDEX_PHP); projectExplorer.invokeCommandWithContextMenu( ProjectExplorer.CommandsGoal.COMMON, PROJECT, START_APACHE_COMMAND_NAME); startWebPhpScriptInDebugMode(); debugPanel.openDebugPanel(); editor.waitTabFileWithSavedStatus("lib.php"); editor.waitAcitveBreakpoint(14); debugPanel.waitDebugHighlightedText("return \"Hello, $name\""); debugPanel.waitTextInVariablesPanel("$name=\"man\""); debugPanel.clickOnButton(DebugPanel.DebuggerButtonsPanel.STEP_OUT); editor.waitTabFileWithSavedStatus("index.php"); debugPanel.waitDebugHighlightedText("echo sayHello(\"man\");"); debugPanel.waitTextInVariablesPanel("$_GET=array [3]"); }
Source:
<code>public void init() { <START> LOGGER.info("IPF Module started - Java compiled."); <END> }</code><technical_language>this class groovy class for demonstration purposes</technical_language>

Target:
public String init() { LOGGER.info("IPF Module started - Java compiled."); return ipfGroovyInitializer.init(); }
Source:
<code>private ContextGeneralPanel getContextGeneralPanel(Context context) { for (AbstractParamPanel panel : contextPanels) { if (panel instanceof ContextGeneralPanel) { <START> ContextGeneralPanel contextGeneralPanel = (ContextGeneralPanel) panel; <END> if (contextGeneralPanel.getContextIndex() == context.getId()) { return contextGeneralPanel; } } } return null; }</code><technical_language>method AbstractContextPropertiesPanel.getContextIndex() changed too</technical_language>

Target:
private ContextGeneralPanel getContextGeneralPanel(Context context) { for (AbstractParamPanel panel : contextPanels) { if (panel instanceof ContextGeneralPanel) { ContextGeneralPanel contextGeneralPanel = (ContextGeneralPanel) panel; if (contextGeneralPanel.getContextId() == context.getId()) { return contextGeneralPanel; } } } return null; }
Source:
<code>static Module module() { return new CacheModule() { @Override protected void configure() { final String cacheName = CACHE_NAME; final TypeLiteral<Cache<ActiveSession.Key, ActiveSession>> type = new TypeLiteral<Cache<ActiveSession.Key, ActiveSession>>() {}; core(type, cacheName) .memoryLimit(1024) <START> .maxAge(12, HOURS) END> .evictionPolicy(EvictionPolicy.LRU) ; bind(WebSession.class).in(RequestScoped.class); } }; }</code><technical_language>This work anymore. need implement behavior in database code</technical_language>

Target:
static Module module() { return new CacheModule() { @Override protected void configure() { final TypeLiteral<Cache<ActiveSession.Key, ActiveSession>> type = new TypeLiteral<Cache<ActiveSession.Key, ActiveSession>>() {}; core(type, CACHE_NAME) .memoryLimit(1024) .maxAge(12, HOURS) .evictionPolicy(EvictionPolicy.LRU) ; bind(WebSession.class).in(RequestScoped.class); } }; }
Source:
<code>public void flattenToBuffer(ByteBuffer buf) { assert(m_exception == null || m_status != SUCCESS); buf.put(VoltDbMessageFactory.FRAGMENT_RESPONSE_ID); buf.putLong(m_executorHSId); buf.putLong(m_destinationHSId); buf.putLong(m_txnId); buf.putLong(m_spHandle); buf.put(m_status); buf.put((byte) (m_dirty ? 1 : 0)); buf.put((byte) (m_recovering ? 1 : 0)); <START> buf.put((byte) (m_respBufferable ? 1 : 0)); <END> buf.putShort(m_dependencyCount); for (int i = 0; i < m_dependencyCount; i++) buf.putInt(m_dependencyIds.get(i)); for (int i = 0; i < m_dependencyCount; i++) { VoltTable dep = m_dependencies.get(i); if (dep == null) { buf.put((byte) 0); } else { buf.put((byte) 1); dep.flattenToBuffer(buf); } } if (m_exception != null) { m_exception.serializeToBuffer(buf); } else { buf.putInt(0); } assert(buf.capacity() == buf.position()); buf.limit(buf.position()); }</code><technical_language>I mentioned in original commit, this flag need network</technical_language>

Target:
public void flattenToBuffer(ByteBuffer buf) { assert(m_exception == null || m_status != SUCCESS); buf.put(VoltDbMessageFactory.FRAGMENT_RESPONSE_ID); buf.putLong(m_executorHSId); buf.putLong(m_destinationHSId); buf.putLong(m_txnId); buf.putLong(m_spHandle); buf.put(m_status); buf.put((byte) (m_dirty ? 1 : 0)); buf.put((byte) (m_recovering ? 1 : 0)); buf.putShort(m_dependencyCount); for (int i = 0; i < m_dependencyCount; i++) buf.putInt(m_dependencyIds.get(i)); for (int i = 0; i < m_dependencyCount; i++) { VoltTable dep = m_dependencies.get(i); if (dep == null) { buf.put((byte) 0); } else { buf.put((byte) 1); dep.flattenToBuffer(buf); } } if (m_exception != null) { m_exception.serializeToBuffer(buf); } else { buf.putInt(0); } assert(buf.capacity() == buf.position()); buf.limit(buf.position()); }
Source:
<code>public static Message parse(byte[] array) { <START> String[] message = new String(array, UTF8).split("\n"); <END> Message result = new Message(); Command parsedCommand = Command.valueOf(message[0]); result.setCommand(parsedCommand.toString()); Map<String, String> headers = new HashMap<>(); int i = 1; String currentLine = message[i]; while (currentLine.length() > 0) { int ind = currentLine.indexOf(':'); String key = currentLine.substring(0, ind); String value = currentLine.substring(ind + 1, currentLine.length()); headers.put(key.trim(), value.trim()); currentLine = message[++i]; } result.withHeaders(headers); i++; StringBuilder content = new StringBuilder(); for (int j = i; j < message.length; j++) { content.append(message[j]); } result.withContent(content.toString()); return result; }</code><technical_language>convert UTF8 this point stream a complete UTF8 string (missing parts of a multibyte character). need treat a binary buffer convert complete parts. this already. convert UTF8 time convert</technical_language>

Target:
public static Message parse(byte[] array) { String[] message = new String(array, UTF8).split("\n"); Message result = new Message(); Command parsedCommand = Command.valueOf(message[0]); result.setCommand(parsedCommand.toString()); Map<String, String> headers = new HashMap<>(); int i = 1; String currentLine = message[i]; while (currentLine.length() > 0) { int ind = currentLine.indexOf(':'); String key = currentLine.substring(0, ind); String value = currentLine.substring(ind + 1, currentLine.length()); headers.put(key, value); currentLine = message[++i]; } result.withHeaders(headers); result.withContent(getContent(array, message, ++i)); return result; }
Source:
<code>public static Map<String, Object> JSONValueToHashMap(final String json) { LinkedHashMap<String, Object> keyValueMap = new LinkedHashMap<String, Object>(); if (UtilMethods.isSet(json)) { if (json.equals(ContentletCache.CACHED_METADATA)) { Logger.error(KeyValueFieldUtil.class, "Trying to parse JSON content for cached Metadata, it is required first to search the data into the cache."); return keyValueMap; } <START> String json2; <END> if (json.contains("\\")) { json2 = UtilMethods.replace(json, "\\", "&#92;"); } else { json2 = json; } Gson gson = new Gson(); return gson.fromJson(json2, new TypeToken<LinkedHashMap<String, String>>() { }.getType()); } return keyValueMap; }</code><technical_language>I encapsulate this cleaning logic in a util so, MarshalUtil is encapsulation of gson</technical_language>

Target:
public static Map<String, Object> JSONValueToHashMap(final String json) { LinkedHashMap<String, Object> keyValueMap = new LinkedHashMap<String, Object>(); if (UtilMethods.isSet(json)) { if (json.equals(ContentletCache.CACHED_METADATA)) { Logger.error(KeyValueFieldUtil.class, "Trying to parse JSON content for cached Metadata, it is required first to search the data into the cache."); return keyValueMap; } String replacedJSJson; if (json.contains("\\")) { replacedJSJson = UtilMethods.replace(json, "\\", "&#92;"); } else { replacedJSJson = json; } return MarshalFactory.getInstance().getMarshalUtils().unmarshal(replacedJSJson, Map.class); } return keyValueMap; }
Source:
<code>public static Path sanitizeStoragePath(String storagePath) { File storageDirectory = new File(storagePath, MAGIC_SUFFIX); <START> Preconditions.checkArgument( <END> storageDirectory.getParentFile().isDirectory(), "Storage path has to point to a directory", SafeArg.of("storageDirectory", storageDirectory.getParentFile().getAbsolutePath())); if (!storageDirectory.exists()) { Preconditions.checkState( storageDirectory.mkdir(), "Not able to create a storage directory", SafeArg.of("storageDirectory", storageDirectory.getAbsolutePath())); return storageDirectory.toPath().toAbsolutePath(); } Preconditions.checkState( storageDirectory.isDirectory(), "Persistent storage path magic atlas subfolder path points to a directory", SafeArg.of("storageDirectory", storageDirectory.getAbsolutePath())); try { deletePath(storageDirectory.toPath().toAbsolutePath()); } catch (IOException e) { throw new RuntimeException(e); } return storageDirectory.toPath().toAbsolutePath(); }</code><technical_language>if storagePath exist, this catch it</technical_language>

Target:
public static Path sanitizeStoragePath(String storagePath) { File storageDirectory = new File(storagePath, MAGIC_SUFFIX); Preconditions.checkArgument( storageDirectory.getParentFile().isDirectory(), "Storage path has to point to a directory", SafeArg.of("storageDirectory", storageDirectory.getParentFile().getAbsolutePath())); if (!storageDirectory.exists()) { Preconditions.checkState( storageDirectory.mkdir(), "Not able to create a storage directory", SafeArg.of("storageDirectory", storageDirectory.getAbsolutePath())); return storageDirectory.toPath().toAbsolutePath(); } Preconditions.checkState( storageDirectory.isDirectory(), "Dedicated persistent storage path does not point to a directory. " + "Note this is not the same as the provided storage path as we create a special subfolder.", SafeArg.of("storageDirectory", storageDirectory.getAbsolutePath())); try { deletePath(storageDirectory.toPath().toAbsolutePath()); } catch (IOException e) { throw new RuntimeException(e); } return storageDirectory.toPath().toAbsolutePath(); }
Source:
<code>public void update() { super.update(); if (this.world.isRemote) { return; } if (isSunOut()) { this.powerToAdd = this.generationRateD; this.addEnergy(this.powerToAdd); } else if(this.world.canBlockSeeSky(this.pos.up())) { this.powerToAdd = this.generationRateN; <START> this.addEnergy(this.powerToAdd); <END> } }</code><technical_language>addEnergy if block</technical_language>

Target:
public void update() { super.update(); if (this.world.isRemote) { return; } if (world.getTotalWorldTime() % 20 == 0) { canSeeSky = this.world.canBlockSeeSky(this.pos.up()); } if (isSunOut()) { this.powerToAdd = panel.generationRateD; } else if (canSeeSky) { this.powerToAdd = panel.generationRateN; } else { this.powerToAdd = 0; } this.addEnergy(this.powerToAdd); }
Source:
<code>public TrackedEventMessage<?> nextAvailable() { try { hasNextAvailable(Integer.MAX_VALUE, TimeUnit.MILLISECONDS); TrackedEventMessage<?> next = peekEvent == null ? eventStream.next() : peekEvent; <START> logger.trace("Polling next available event in an Event Buffer {}. Tracking Token {}.", <END> next.getIdentifier(), this, next.trackingToken()); return next; } catch (InterruptedException e) { logger.warn("Consumer thread was interrupted. Returning thread to event processor.", e); Thread.currentThread().interrupt(); return null; } finally { peekEvent = null; } }</code><technical_language>"Polled" (or "Consumed") instead of "Polling"? log entry is written, entry is buffer</technical_language>

Target:
public TrackedEventMessage<?> nextAvailable() { try { hasNextAvailable(Integer.MAX_VALUE, TimeUnit.MILLISECONDS); TrackedEventMessage<?> next = peekEvent == null ? eventStream.next() : peekEvent; if (logger.isTraceEnabled()) { logger.trace("Polled next available event in an Event Buffer {}. Tracking Token {}.", next.getIdentifier(), this, next.trackingToken()); } return next; } catch (InterruptedException e) { logger.warn("Consumer thread was interrupted. Returning thread to event processor.", e); Thread.currentThread().interrupt(); return null; } finally { peekEvent = null; } }
Source:
<code>private int getHeight() { if (connection == null) { return 40; } <START> if (connection instanceof TerminalConnection) { <END> return ((TerminalConnection) connection).getTerminal().getSize().getHeight(); } return connection.size().getHeight(); }</code><technical_language>a separate checkf for TerminalConnection? call connection.size()</technical_language>

Target:
private int getHeight() { if (connection == null) { return 40; } return connection.size().getHeight(); }
Source:
<code>private static boolean startWithInsertion(final Cigar cigar) { for(final CigarElement element: cigar.getCigarElements()) { switch(element.getOperator()) { case I: return true; <START> case S: continue; <END> default: break; } } return false; }</code><technical_language>this operator consume refbases (except "I"). I implement this if statement. like: <SNIP> if( element.getOperator()==CigarOperator.I ) return true; if ( ! element.getOperator().consumesReferenceBases() ) continue; break; </SNIP></technical_language>

Target:
private static boolean startWithInsertion(final Cigar cigar) { for (final CigarElement element : cigar.getCigarElements()) { if (element.getOperator()==CigarOperator.I) return true; if (!element.getOperator().consumesReferenceBases()) continue; break; } return false; }
Source:
<code>protected AnchorListItem getBulkRequeue(final ExtendedPagedTable<RequestSummary> extendedPagedTable) { final AnchorListItem bulkAbortNavLink = GWT.create(AnchorListItem.class); bulkAbortNavLink.setText(constants.Bulk_Requeue_jobs()); <START> bulkAbortNavLink.setIcon(IconType.BAN); <END> bulkAbortNavLink.setIconFixedWidth(true); bulkAbortNavLink.addClickHandler(event -> confirmPopup.show(constants.Requeue_Jobs_Confirmation(), constants.Requeue_Jobs(), constants.Requeue_Jobs_Sure(), getRequeueCommand(extendedPagedTable)) ); return bulkAbortNavLink; }</code><technical_language>_pficon-restart_</technical_language>

Target:
protected AnchorListItem getBulkRequeue(final ExtendedPagedTable<RequestSummary> extendedPagedTable) { final AnchorListItem bulkAbortNavLink = GWT.create(AnchorListItem.class); bulkAbortNavLink.setText(constants.Bulk_Requeue_jobs()); bulkAbortNavLink.setIcon(IconType.HISTORY); bulkAbortNavLink.setIconFixedWidth(true); bulkAbortNavLink.addClickHandler(event -> confirmPopup.show(constants.Requeue_Jobs_Confirmation(), constants.Requeue_Jobs(), constants.Requeue_Jobs_Sure(), getRequeueCommand(extendedPagedTable)) ); return bulkAbortNavLink; }
Source:
<code>private void startInstance(Object obj) throws Exception { log.debug("Starting %s", obj.getClass().getName()); LifeCycleMethods methods = methodsMap.get(obj.getClass()); for (Method postConstruct : methods.methodsFor(PostConstruct.class)) { log.debug("\t%s()", postConstruct.getName()); try { postConstruct.invoke(obj); } catch (Exception e) { Exception cause = unwrapInvocationTargetException(e); <START> log.debug(cause, "Exception in PostConstruct method %s::%s()", obj.getClass().getName(), postConstruct.getName()); <END> stopInstance(obj, (Class<?> klass, Method method, Exception exception) -> { log.debug(exception, "Exception in PreDestroy method %1$s::%2$s() after PostConstruct failure in %1$s::%3$s()", klass.getName(), method.getName(), postConstruct.getName()); cause.addSuppressed(exception); }); throw cause; } } }</code><technical_language>logging suffering log-and-throw, if enhance thrown exception: java LifecycleStartException failure = new LifecycleStartException( format("Exception in PostConstruct method %s::%s()", obj.getClass().getName(), postConstruct.getName()), unwrapInvocationTargetException(e)); stopInstance(obj, (klass, method, exception) -> { String message = format("Exception in PreDestroy method %1$s::%2$s() PostConstruct failure in %1$s::%3$s()", klass.getName(), method.getName(), postConstruct.getName()); failure.addSuppressed(new RuntimeException(message, exception)); }); throw failure; this change, introduce a new unchecked LifecycleStartException change start() method throw for failures. This aligns stop() for reasons -- callers reasonable handle underlying exception</technical_language>

Target:
private void startInstance(Object obj) throws LifeCycleStartException { log.debug("Starting %s", obj.getClass().getName()); LifeCycleMethods methods = methodsMap.get(obj.getClass()); for (Method postConstruct : methods.methodsFor(PostConstruct.class)) { log.debug("\t%s()", postConstruct.getName()); try { postConstruct.invoke(obj); } catch (Exception e) { LifeCycleStartException failure = new LifeCycleStartException( format("Exception in PostConstruct method %s::%s()", obj.getClass().getName(), postConstruct.getName()), unwrapInvocationTargetException(e)); stopInstance(obj, (Class<?> klass, Method method, Exception exception) -> { String message = format("Exception in PreDestroy method %1$s::%2$s() after PostConstruct failure in %1$s::%3$s()", klass.getName(), method.getName(), postConstruct.getName()); failure.addSuppressed(new RuntimeException(message, exception)); }); throw failure; } } }
Source:
<code>public PartitionResponse(Errors error, long baseOffset, long logAppendTime, long logStartOffset) { <START> this(error, baseOffset, logAppendTime, logStartOffset, new HashMap<>(), ""); <END> }</code><technical_language>nit: Collections.emptyMap()</technical_language>

Target:
public PartitionResponse(Errors error, long baseOffset, long logAppendTime, long logStartOffset) { this(error, baseOffset, logAppendTime, logStartOffset, Collections.emptyMap(), null); }
Source:
<code>public void draw(Batch batch, float parentAlpha) { ArrayList<PointF> stitchPoints = EmbroideryManager.getStitchPoints(); if (stitchPoints.size() >= 2) { batch.end(); ShapeRenderer renderer = StageActivity.stageListener.shapeRenderer; renderer.setColor(Color.BLACK); renderer.begin(ShapeRenderer.ShapeType.Filled); <START> for (int index = 0; index < EmbroideryManager.getLastIndex(); index++) { <END> PointF point = stitchPoints.get(index); PointF nextPoint = stitchPoints.get(index + 1); renderer.circle(point.x, point.y, EmbroideryManager.getStitchSize()); renderer.rectLine(point.x, point.y, nextPoint.x, nextPoint.y, EmbroideryManager.getStitchSize()); } PointF lastPoint = stitchPoints.get(EmbroideryManager.getLastIndex()); renderer.circle(lastPoint.x, lastPoint.y, EmbroideryManager.getStitchSize()); renderer.end(); batch.begin(); } }</code><technical_language>please iterator get rid of lastIndex</technical_language>

Target:
public void draw(Batch batch, float parentAlpha) { StageActivity.stageListener.getEmbroideryManager().lockStitchpoints(); ArrayList<PointF> stitchPoints = StageActivity.stageListener.getEmbroideryManager().getStitchPoints(); ListIterator<PointF> iterator = stitchPoints.listIterator(); if (stitchPoints.size() >= 2) { batch.end(); ShapeRenderer renderer = StageActivity.stageListener.shapeRenderer; renderer.setColor(Color.BLACK); renderer.begin(ShapeRenderer.ShapeType.Filled); PointF previousPoint = iterator.next(); while (iterator.hasNext()) { PointF point = iterator.next(); renderer.circle(previousPoint.x, previousPoint.y, stitchSize); renderer.rectLine(previousPoint.x, previousPoint.y, point.x, point.y, stitchSize); previousPoint = point; } renderer.circle(previousPoint.x, previousPoint.y, stitchSize); renderer.end(); batch.begin(); } StageActivity.stageListener.getEmbroideryManager().unlockStitchpoints(); }
Source:
<code>public int getMaxMaxMemorySize(Integer osId, Version compatVersion) { <START> String usedVersion = (compatVersion != null) ? compatVersion.getValue() : Version.getLast().getValue(); <END> if (osId == null) { return getMaxMaxMemoryForAllOss(usedVersion); } final ConfigValues maxMaxMemoryConfigValue = getMaxMaxMemoryConfigValue(osId); return (Integer) getConfigValuePreConverted(maxMaxMemoryConfigValue, usedVersion); }</code><technical_language>Please remove unnecessary brackets: String usedVersion = (compatVersion != null) ? compatVersion.getValue() : Version.getLast().getValue();</technical_language>

Target:
public int getMaxMaxMemorySize(Integer osId, Version compatVersion) { String usedVersion = compatVersion != null ? compatVersion.getValue() : Version.getLast().getValue(); if (osId == null) { return getMaxMaxMemoryForAllOss(usedVersion); } final ConfigValues maxMaxMemoryConfigValue = getMaxMaxMemoryConfigValue(osId); return (Integer) getConfigValuePreConverted(maxMaxMemoryConfigValue, usedVersion); }
Source:
<code><START> public static DecimalEncodedValue create() { <END> return new FactorizedDecimalEncodedValue(KEY, 5, 5, true); }</code><technical_language>sense a common interface for profiles</technical_language>

Target:
public static DecimalEncodedValue create() { return new FactorizedDecimalEncodedValue(KEY, 5, 5, UNSET_SPEED, true); }
Source:
<code>public Response toResponse(ResourceNotFoundException exception) { <START> return Response.status(Response.Status.NOT_FOUND).build(); <END> }</code><technical_language>this detected findbugs</technical_language>

Target:
public Response toResponse(ResourceNotFoundException exception) { return Response.status(HttpResponseCodes.SC_NOT_FOUND).build(); }
Source:
<code>public static void fillImagesMapBasedOnTemplate(VmTemplate template, List<StorageDomain> domains, Map<Guid, DiskImage> diskInfoDestinationMap, Map<Guid, StorageDomain> destStorages) { Map<Guid, StorageDomain> storageDomainsMap = new HashMap<>(); for (StorageDomain storageDomain : domains) { StorageDomainValidator validator = new StorageDomainValidator(storageDomain); if (validator.isDomainExistAndActive().isValid() && validator.domainIsValidDestination().isValid()) { storageDomainsMap.put(storageDomain.getId(), storageDomain); } } <START> for (DiskImage image : template.getDiskTemplateMap().values()) { for (Guid storageId : image.getStorageIds()) { if (storageDomainsMap.containsKey(storageId)) { ArrayList<Guid> storageIds = new ArrayList<>(); storageIds.add(storageId); image.setStorageIds(storageIds); diskInfoDestinationMap.put(image.getId(), image); break; } } } <END> if (destStorages != null) { destStorages.putAll(diskInfoDestinationMap.values().stream() .collect(Collectors.toMap(d -> d.getStorageIds().get(0), d -> storageDomainsMap.get(d.getStorageIds().get(0))))); } }</code><technical_language>skip fixing this block? out of place in new code</technical_language>

Target:
public static void fillImagesMapBasedOnTemplate(VmTemplate template, List<StorageDomain> domains, Map<Guid, DiskImage> diskInfoDestinationMap, Map<Guid, StorageDomain> destStorages) { Map<Guid, StorageDomain> storageDomainsMap = domains.stream().filter(ImagesHandler::isDomainValidDestination) .collect(Collectors.toMap(d -> d.getId(), Function.identity())); for (DiskImage image : template.getDiskTemplateMap().values()) { for (Guid storageId : image.getStorageIds()) { if (storageDomainsMap.containsKey(storageId)) { ArrayList<Guid> storageIds = new ArrayList<>(); storageIds.add(storageId); image.setStorageIds(storageIds); diskInfoDestinationMap.put(image.getId(), image); break; } } } if (destStorages != null) { destStorages.putAll(diskInfoDestinationMap.values().stream() .collect(Collectors.toMap(d -> d.getStorageIds().get(0), d -> storageDomainsMap.get(d.getStorageIds().get(0))))); } }
Source:
<code>public void visitDistanceBufferType(VisitableElement<List<Object>> visitable) { traceName(visitable); List<Object> values = visitable.getValue(); <START> if (values == null || values.isEmpty()) { <END> LOGGER.debug("No values found on distance buffer type"); return; } builder.beginBinarySpatialType("DWITHIN"); visitable .getValue() .stream() .map(VisitableElement.class::cast) .forEachOrdered(v -> v.accept(this)); builder.endTerminalType(); }</code><technical_language>replace CollectionUtils.isEmpty(values)</technical_language>

Target:
public void visitDistanceBufferType(VisitableElement<List<Object>> visitable) { traceName(visitable); List<Object> values = visitable.getValue(); if (CollectionUtils.isEmpty(values)) { LOGGER.debug("No values found on distance buffer type"); return; } builder.beginBinarySpatialType("DWITHIN"); visitable .getValue() .stream() .map(VisitableElement.class::cast) .forEachOrdered(v -> v.accept(this)); builder.endTerminalType(); }
Source:
<code>private Object getTableUpdaterLock(String offlineTableName) { <START> return _tableUpdaterLocks[offlineTableName.hashCode() % _tableUpdaterLocks.length]; <END> }</code><technical_language>hash code negative. & INTEGER_MAX get a positive. I fell trap in realtime part :-)</technical_language>

Target:
private Object getTableUpdaterLock(String offlineTableName) { return _tableUpdaterLocks[(offlineTableName.hashCode() & Integer.MAX_VALUE) % _tableUpdaterLocks.length]; }
Source:
<code>protected void addVmNumaNodes() { <START> List<VdsNumaNode> numaNodes = new ArrayList<VdsNumaNode>(); <END> for (VmNumaNode vnode : getParameters().getVmStaticData().getvNumaNodeList()) { numaNodes.add(vnode); } DbFacade.getInstance().getVmNumaNodeDAO().massSaveNumaNode(numaNodes, null, getVmId()); }</code><technical_language>java 7 diamond style generics nice</technical_language>

Target:
protected void addVmNumaNodes() { List<VmNumaNode> numaNodes = getParameters().getVmStaticData().getvNumaNodeList(); VmNumaNodeOperationParameters params = new VmNumaNodeOperationParameters(getVmId(), numaNodes); getBackend().runInternalAction(VdcActionType.AddVmNumaNodes, params); }