auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>protected Composite createAdditionalControls(Composite parent) { Composite container = new Composite(parent, SWT.NULL); GridLayoutFactory.swtDefaults().applyTo(container); <START> Button showUILegend = new Button(filterComposite, SWT.PUSH); <END> showUILegend.setImage(CommonImages.QUESTION.createImage()); showUILegend.setToolTipText(Messages.TaskListFilteredTree_Show_Tasks_UI_Legend); showUILegend.addSelectionListener(new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent e) { UiLegendDialog uiLegendDialog = new UiLegendDialog(WorkbenchUtil.getShell()); uiLegendDialog.open(); } }); return container; }</code><technical_language>this created container</technical_language>

Target:
protected Composite createAdditionalControls(Composite parent) { Composite container = new Composite(parent, SWT.NULL); GridLayoutFactory.swtDefaults().applyTo(container); Button showUILegend = new Button(container, SWT.PUSH); showUILegend.setImage(CommonImages.QUESTION.createImage()); showUILegend.setToolTipText(Messages.TaskListFilteredTree_Show_Tasks_UI_Legend); showUILegend.addSelectionListener(new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent e) { UiLegendDialog uiLegendDialog = new UiLegendDialog(WorkbenchUtil.getShell()); uiLegendDialog.open(); } }); return container; }
Source:
<code>static byte[] concatByteArrays(byte[]... arrays) { int totalLength = 0; for (byte[] array : arrays) { totalLength += array.length; } byte[] output = new byte[totalLength]; int offset = 0; for (byte[] array : arrays) { <START> int arrayLength = array.length; <END> System.arraycopy(array, 0, output, offset, arrayLength); offset += arrayLength; } return output; }</code><technical_language>This local variable unnecessary</technical_language>

Target:
static byte[] concatByteArrays(byte[]... arrays) { int totalLength = 0; for (byte[] array : arrays) { totalLength += array.length; } byte[] output = new byte[totalLength]; int offset = 0; for (byte[] array : arrays) { System.arraycopy(array, 0, output, offset, array.length); offset += array.length; } return output; }
Source:
<code>private SimpleJdbcCallOperations obtainSimpleJdbcCall(String storedProcedureName) { if (guavaPresent) { return this.jdbcCallOperationsCache.getUnchecked(storedProcedureName); } else { SimpleJdbcCallOperations operations = this.jdbcCallOperationsMap.get(storedProcedureName); if (operations == null) { operations = createSimpleJdbcCall(storedProcedureName); <START> this.jdbcCallOperationsMap.putIfAbsent(storedProcedureName, operations); <END> } return operations; } }</code><technical_language>need a mechanism limit cache size. #jdbcCallOperationsCacheSize. Consider a (synchronized) LinkedHashMap (ctor takes accessOrder boolean). LHM.removeEldestEntry() - map care of limiting size</technical_language>

Target:
private SimpleJdbcCallOperations obtainSimpleJdbcCall(String storedProcedureName) { if (guavaPresent) { return this.guavaCacheWrapper.jdbcCallOperationsCache.getUnchecked(storedProcedureName); } else { SimpleJdbcCallOperations operations = this.jdbcCallOperationsMap.get(storedProcedureName); if (operations == null) { synchronized (this.jdbcCallOperationsMapMonitor) { operations = this.jdbcCallOperationsMap.get(storedProcedureName); if (operations == null) { operations = createSimpleJdbcCall(storedProcedureName); this.jdbcCallOperationsMap.put(storedProcedureName, operations); } } } return operations; } }
Source:
<code>public void testSuccessfulReadAhead() throws Exception { AbfsClient client = getMockAbfsClient(); AbfsRestOperation op = getMockRestOp(); doReturn(op) .doReturn(op) .doReturn(op) .doThrow(new TimeoutException("Internal Server error for RAH-X")) .doThrow(new TimeoutException("Internal Server error for RAH-Y")) .doThrow(new TimeoutException("Internal Server error for RAH-Z")) .when(client) .read(any(String.class), any(Long.class), any(byte[].class), any(Integer.class), any(Integer.class), any(String.class)); AbfsInputStream inputStream = getAbfsInputStream(client, "testSuccessfulReadAhead.txt"); inputStream.read(new byte[1 * KILOBYTE]); verifyReadCallCount(client, 3); <START> inputStream.read(1 * KILOBYTE, new byte[1 * KILOBYTE], 0, 1 * KILOBYTE); <END> verifyReadCallCount(client, 3); checkEvictedStatus(inputStream, 0, true); }</code><technical_language>for replacing 1 * KILOBYTE KILOBYTE, constants _1KB, _2KB etc, is done</technical_language>

Target:
public void testSuccessfulReadAhead() throws Exception { AbfsClient client = getMockAbfsClient(); AbfsRestOperation op = getMockRestOp(); doReturn(op) .doReturn(op) .doReturn(op) .doThrow(new TimeoutException("Internal Server error for RAH-X")) .doThrow(new TimeoutException("Internal Server error for RAH-Y")) .doThrow(new TimeoutException("Internal Server error for RAH-Z")) .when(client) .read(any(String.class), any(Long.class), any(byte[].class), any(Integer.class), any(Integer.class), any(String.class), any(String.class)); AbfsInputStream inputStream = getAbfsInputStream(client, "testSuccessfulReadAhead.txt"); inputStream.read(new byte[ONE_KB]); verifyReadCallCount(client, 3); inputStream.read(ONE_KB, new byte[ONE_KB], 0, ONE_KB); verifyReadCallCount(client, 3); checkEvictedStatus(inputStream, 0, true); }
Source:
<code>public void init(SortedKeyValueIterator<Key,Value> source, Map<String,String> options, IteratorEnvironment env) throws IOException { super.init(source, options, env); combineAllColumns = false; if (options.containsKey(ALL_OPTION)) { combineAllColumns = Boolean.parseBoolean(options.get(ALL_OPTION)); if (combineAllColumns) return; } if (!options.containsKey(COLUMNS_OPTION)) throw new IllegalArgumentException("Must specify " + COLUMNS_OPTION + " option"); String encodedColumns = options.get(COLUMNS_OPTION); if (encodedColumns.length() == 0) throw new IllegalArgumentException("The " + COLUMNS_OPTION + " must not be empty"); combiners = new ColumnSet(Lists.newArrayList(Splitter.on(",").split(encodedColumns))); isPartialCompaction = ((env.getIteratorScope() == IteratorScope.majc) && !env.isFullMajorCompaction()); if (options.containsKey(DELETE_HANDLING_ACTION_OPTION)) { <START> deleteHandlingAction = DeleteHandlingAction.valueOf(options.get(DELETE_HANDLING_ACTION_OPTION)); <END> } else { deleteHandlingAction = DeleteHandlingAction.LOG_ERROR; } if (deleteHandlingAction == DeleteHandlingAction.REDUCE_ON_FULL_COMPACTION_ONLY && isPartialCompaction) { combineAllColumns = false; combiners = new ColumnSet(); } }</code><technical_language>A warning message actual property checked (DELETE_HANDLING_ACTION_OPTION) enum-value for useful</technical_language>

Target:
public void init(SortedKeyValueIterator<Key,Value> source, Map<String,String> options, IteratorEnvironment env) throws IOException { super.init(source, options, env); combineAllColumns = false; if (options.containsKey(ALL_OPTION)) { combineAllColumns = Boolean.parseBoolean(options.get(ALL_OPTION)); if (combineAllColumns) return; } if (!options.containsKey(COLUMNS_OPTION)) throw new IllegalArgumentException("Must specify " + COLUMNS_OPTION + " option"); String encodedColumns = options.get(COLUMNS_OPTION); if (encodedColumns.length() == 0) throw new IllegalArgumentException("The " + COLUMNS_OPTION + " must not be empty"); combiners = new ColumnSet(Lists.newArrayList(Splitter.on(",").split(encodedColumns))); isMajorCompaction = env.getIteratorScope() == IteratorScope.majc; String rofco = options.get(REDUCE_ON_FULL_COMPACTION_ONLY_OPTION); if (rofco != null) { reduceOnFullCompactionOnly = Boolean.parseBoolean(rofco); } else { reduceOnFullCompactionOnly = false; } if (reduceOnFullCompactionOnly && isMajorCompaction && !env.isFullMajorCompaction()) { combineAllColumns = false; combiners = new ColumnSet(); } }
Source:
<code>public void testStatefulTimeout0() throws Exception { Annotated0TimeoutBean timeout0 = lookup(Annotated0TimeoutBean.class); timeout0.doStuff(); <START> Thread.sleep(2000); <END> try { timeout0.doStuff(); throw new RuntimeException("Expecting NoSuchEJBException"); } catch (NoSuchEJBException expected) { } Assert.assertTrue(Annotated0TimeoutBean.preDestroy); }</code><technical_language>This sleep necessary</technical_language>

Target:
public void testStatefulTimeout0() throws Exception { Annotated0TimeoutBean timeout0 = lookup(Annotated0TimeoutBean.class); timeout0.doStuff(); try { timeout0.doStuff(); throw new RuntimeException("Expecting NoSuchEJBException"); } catch (NoSuchEJBException expected) { } Assert.assertTrue(Annotated0TimeoutBean.preDestroy); }
Source:
<code><START> private String getFingerprint(String hostName) { <END> wrapper = getVdsInstallerSSHInstance(); String fingerPrint = ""; try { fingerPrint = wrapper.getServerKeyFingerprint(hostName); } catch (Throwable e) { log.errorFormat("Could not fetch fingerprint of server {0} with message: {1}", hostName, ExceptionUtils.getMessage(e)); } finally { wrapper.shutdown(); } return fingerPrint; }</code><technical_language>Oh... VdsInstaller for finger print, SSHClient, connects..</technical_language>

Target:
private String getFingerprint(String hostName) { connect(hostName); String fingerprint = "Unknown"; try { PublicKey serverKey = this.client.getServerKey(); if (serverKey == null) { log.error("Unable to get host key"); } else { String tmpFingerprint = OpenSSHUtils.getKeyFingerprintString(serverKey); if (tmpFingerprint == null) { log.error("Unable to get host fingerprint"); } else { fingerprint = tmpFingerprint; } } } catch (Throwable e) { log.errorFormat("Could not fetch fingerprint of server {0} with message: {1}", hostName, ExceptionUtils.getMessage(e)); } return fingerprint; }
Source:
<code>public String rewriteName(String original) { if (original == null ) return original; <START> return original.toUpperCase(Locale.ROOT); <END> }</code><technical_language>suggestion return (original == null) ? null : original.toUpperCase(Locale.ROOT);</technical_language>

Target:
public String rewriteName(String original) { return (original == null) ? null : original.toUpperCase(Locale.ROOT); }
Source:
<code>public InstructorFeedbackResultsFilterPanel getFilterPanel() { return new InstructorFeedbackResultsFilterPanel( isStatsShown(), bundle.feedbackSession, isAllSectionsSelected(), selectedSection, isGroupedByTeam(), sortType, getInstructorFeedbackSessionResultsLink(), <START> getSections(), getMissingResponsesShown()); <END> }</code><technical_language>class a need wrap getter</technical_language>

Target:
public InstructorFeedbackResultsFilterPanel getFilterPanel() { return new InstructorFeedbackResultsFilterPanel( isStatsShown(), bundle.feedbackSession, isAllSectionsSelected(), selectedSection, isGroupedByTeam(), sortType, getInstructorFeedbackSessionResultsLink(), getSections(), isMissingResponsesShown); }
Source:
<code>private Bundle prepareBundleToAccessLoginActivity( AccountAuthenticatorResponse accountAuthenticatorResponse, Account account, String authTokenType, Bundle options ) { final Intent intent = new Intent(mContext, LoginActivity.class); <START> intent.putExtra(AccountManager.KEY_ACCOUNT_AUTHENTICATOR_RESPONSE, accountAuthenticatorResponse); intent.putExtra(KEY_AUTH_TOKEN_TYPE, authTokenType); intent.putExtra(KEY_LOGIN_OPTIONS, options); <END> intent.putExtra(AuthenticatorConstants.EXTRA_ACCOUNT, account); intent.putExtra( AuthenticatorConstants.EXTRA_ACTION, AuthenticatorConstants.ACTION_UPDATE_EXPIRED_TOKEN ); final Bundle bundle = new Bundle(); bundle.putParcelable(AccountManager.KEY_INTENT, intent); return bundle; }</code><technical_language>KEY_ACCOUNT_AUTHENTICATOR_RESPONSE KEY_LOGIN_OPTIONS</technical_language>

Target:
private Bundle prepareBundleToAccessLoginActivity( AccountAuthenticatorResponse accountAuthenticatorResponse, Account account, String authTokenType, Bundle options ) { final Intent intent = new Intent(mContext, LoginActivity.class); intent.putExtra(AccountManager.KEY_ACCOUNT_AUTHENTICATOR_RESPONSE, accountAuthenticatorResponse); intent.putExtra(KEY_AUTH_TOKEN_TYPE, authTokenType); intent.putExtra(AuthenticatorConstants.EXTRA_ACCOUNT, account); intent.putExtra( AuthenticatorConstants.EXTRA_ACTION, AuthenticatorConstants.ACTION_UPDATE_EXPIRED_TOKEN ); final Bundle bundle = new Bundle(); bundle.putParcelable(AccountManager.KEY_INTENT, intent); return bundle; }
Source:
<code>public Set<Class<?>> getProviderClasses() { if (providerClasses == null && parent != null) return parent.getProviderClasses(); <START> return providerClasses; <END> }</code><technical_language>a bit concerned this change in behaviour. cases here: 1. parent is null; I agree in this case avoid copying Set, still, copy preventing illegal changes collection invoker. returning UnmodifiableSet instance? 2. parent is null: this is in case ResteasyProviderFactoryImpl is created explicit parent local = false. safe side, I merging collections. Alternatively, need investigate exclude scenario a more complex optimization. WDYT</technical_language>

Target:
public Set<Class<?>> getProviderClasses() { if(initialized) { return providerClasses; } Set<Class<?>> set = new HashSet<Class<?>>(); if (parent != null) set.addAll(parent.getProviderClasses()); set.addAll(providerClasses); return set; }
Source:
<code>public void onPageFinished(WebView view, String url) { Timber.d("onPageFinished triggered"); drawFlag(); drawMark(); view.loadUrl("javascript:onPageFinished();"); <START> view.loadUrl("javascript:ankiGetCardCount(" + newCount.toString() + "," + lrnCount.toString() + "," + revCount.toString() + ")" ); <END> view.loadUrl("javascript:ankiGetDeckName('" + title + "')"); view.loadUrl("javascript:ankiGetETA(" + eta +")"); view.loadUrl("javascript:ankiGetCardMark(" + isCardMarked +")"); view.loadUrl("javascript:ankiGetCardFlag(" + currentCardFlagStatus +")"); }</code><technical_language>changed JavascriptInterface methods: <LINK_0> currently open accidental XSS break cards JS</technical_language>

Target:
public void onPageFinished(WebView view, String url) { Timber.d("onPageFinished triggered"); drawFlag(); drawMark(); view.loadUrl("javascript:onPageFinished();"); }
Source:
<code>protected void markAlignmentEnd() { <START> if (startOfAlignmentTimestamp > 0) { <END> markAlignmentEnd(System.nanoTime() - startOfAlignmentTimestamp); } else { markAlignmentEnd(0); } }</code><technical_language>negative</technical_language>

Target:
protected void markAlignmentEnd() { markAlignmentEnd(System.nanoTime() - startOfAlignmentTimestamp); }
Source:
<code>protected void doInitialise() throws InitialisationException { if (!initialised) { initRetryPolicyResolver(); try { transactionConfig = buildTransactionConfig(); } catch (MuleException e) { throw new InitialisationException(createStaticMessage("Could not resolve transactional configuration"), e, this); } returnDelegate = createReturnDelegate(); valueReturnDelegate = getValueReturnDelegate(); <START> targetValueCompiledExpression = expressionManager.compile(targetValue, getTargetBindingContext(Message.of(""))); <END> initialiseIfNeeded(resolverSet, muleContext); componentExecutor = createComponentExecutor(); executionMediator = createExecutionMediator(); initialiseIfNeeded(componentExecutor, true, muleContext); resolvedProcessorRepresentation = getRepresentation(); initProcessingStrategy(); initialised = true; } }</code><technical_language>no. This is a concern for return delegate. do this</technical_language>

Target:
protected void doInitialise() throws InitialisationException { if (!initialised) { initRetryPolicyResolver(); try { transactionConfig = buildTransactionConfig(); } catch (MuleException e) { throw new InitialisationException(createStaticMessage("Could not resolve transactional configuration"), e, this); } returnDelegate = createReturnDelegate(); valueReturnDelegate = getValueReturnDelegate(); initialiseIfNeeded(resolverSet, muleContext); componentExecutor = createComponentExecutor(); executionMediator = createExecutionMediator(); initialiseIfNeeded(componentExecutor, true, muleContext); resolvedProcessorRepresentation = getRepresentation(); initProcessingStrategy(); initialised = true; } }
Source:
<code>public NewCommentsConsumer(JiraEndpoint endpoint, Processor processor) { super(endpoint, processor); <START> LOG.info("JIRA NewCommentsConsumer: Indexing current issue comments."); <END> getComments(); }</code><technical_language>move tasks doStart in constructors</technical_language>

Target:
public NewCommentsConsumer(JiraEndpoint endpoint, Processor processor) { super(endpoint, processor); }
Source:
<code>private void updateLunsInDb(List<LUNs> lunsToUpdateInDb) { TransactionSupport.executeInNewTransaction(() -> { <START> lunsToUpdateInDb.stream().forEach(lun -> getLunDao().update(lun)); <END> return null; }); log.debug("LUNs with IDs: [" + lunsToUpdateInDb.stream().map(LUNs::getLUNId).collect(Collectors.joining(", ")) + "] were updated in the DB."); }</code><technical_language>getLuNDao().updateAllInBatch(lunsToUpdateInDb) - this done in compensation context storage domain update</technical_language>

Target:
private void updateLunsInDb(List<LUNs> lunsToUpdateInDb) { TransactionSupport.executeInNewTransaction(() -> { CompensationContext context = getCompensationContext(); context.snapshotEntities(getParameters().getLunsList()); getLunDao().updateAllInBatch(lunsToUpdateInDb); context.stateChanged(); return null; }); log.debug("LUNs with IDs: [" + lunsToUpdateInDb.stream().map(LUNs::getLUNId).collect(Collectors.joining(", ")) + "] were updated in the DB."); }
Source:
<code>public Status process() throws EventDeliveryException { Status status = Status.READY; Channel channel = getChannel(); Transaction transaction = channel.getTransaction(); try { tryReopenClientConnection(); transaction.begin(); Event event = channel.take(); if (event != null) { ListenableFuture future = writer.write(ByteBuffer.wrap(event.getBody()), event.getHeaders()); Futures.addCallback(future, new FutureCallback<Void>() { @Override public void onSuccess(Void result) { writeStatus = EventWriteStatusCode.OK; LOG.info("Success write to stream {}", streamName); } @Override public void onFailure(Throwable t) { writeStatus = EventWriteStatusCode.FAIL; LOG.error("Error during writing event to stream {}", streamName, t); } }); <START> <END> if (writeStatus == EventWriteStatusCode.FAIL) { throw new EventDeliveryException("Failed to send events to stream: " + streamName); } } transaction.commit(); } catch (Throwable t) { transaction.rollback(); if (t instanceof Error) { throw (Error) t; } else if (t instanceof ChannelException) { LOG.error("Stream Sink {}: Unable to get event from channel ", getName(), channel.getName()); status = Status.BACKOFF; } else { LOG.debug("Closing writer due to stream error ", t); closeClientQuietly(); closeWriterQuietly(); throw new EventDeliveryException("Sink event sending error", t); } } finally { transaction.close(); } return status; }</code><technical_language>wait for future complete, execution in this thread move on. check for FAIL future is executing, writeStatus (left previous invocation of process()?). is OK commit transaction return, future is completed. is wrong</technical_language>

Target:
public Status process() throws EventDeliveryException { Status status = Status.READY; Channel channel = getChannel(); Transaction transaction = channel.getTransaction(); try { tryReopenClientConnection(); transaction.begin(); Event event = channel.take(); if (event != null) { try { writer.write(ByteBuffer.wrap(event.getBody()), event.getHeaders()).get(); LOG.trace("Success write to stream: ", streamName); } catch (Throwable t) { if (t instanceof ExecutionException) { t = t.getCause(); } LOG.error("Error during writing event to stream {}", streamName, t); throw new EventDeliveryException("Failed to send events to stream: " + streamName, t); } } transaction.commit(); } catch (Throwable t) { transaction.rollback(); if (t instanceof Error) { throw (Error) t; } else if (t instanceof ChannelException) { LOG.error("Stream Sink {}: Unable to get event from channel ", getName(), channel.getName()); status = Status.BACKOFF; } else { LOG.debug("Closing writer due to stream error ", t); closeClientQuietly(); closeWriterQuietly(); throw new EventDeliveryException("Sink event sending error", t); } } finally { transaction.close(); } return status; }
Source:
<code>private Map<Guid, SubchainInfo> getDomainsToSnapshotsMap(List<SubchainInfo> snapshots) { Map<Guid, SubchainInfo> domainsToPairMap = new <START> HashMap<>(); for (SubchainInfo subchain: snapshots) { Guid storageId = subchain.getStorageDomainId(); domainsToPairMap.put(storageId, subchain); } return domainsToPairMap; <END> }</code><technical_language>this done a stream call</technical_language>

Target:
private Map<Guid, SubchainInfo> getDomainsToSnapshotsMap(List<SubchainInfo> snapshots) { return snapshots .stream() .collect(Collectors.toMap(SubchainInfo::getStorageDomainId, Function.identity())); }
Source:
<code>public void deleteAccount(AccountId accountId) { HibernateAccount hibernateAccount = getHibernateAccount(accountId); if (hibernateAccount != null) { hibernateHelper.deleteById(HibernateAccount.class, hibernateAccount.getId()); <START> } <END> }</code><technical_language>This is functionally identical, in new code, in string ID case, query DB for account, string ID (which have). Is worth adding a hasId() AccountId optimizing case need string ID</technical_language>

Target:
public void deleteAccount(AccountId accountId) { String userId = accountId.getUnguardedAccountId().getId(); if (userId == null) { HibernateAccount hibernateAccount = getHibernateAccount(accountId); userId = hibernateAccount.getId(); } hibernateHelper.deleteById(HibernateAccount.class, userId); }
Source:
<code>public DTreeUserInteraction expand(IProgressMonitor monitor) { try { <START> monitor.beginTask("Tree item expandion", tree.getOwnedTreeItems().size()); <END> for (DTreeItem child : tree.getOwnedTreeItems()) { if (!child.isExpanded()) { new DTreeItemUserInteraction(child, ctx).expand(new SubProgressMonitor(monitor, 1)); } } } finally { monitor.done(); } return this; }</code><technical_language>Typo : expandion -> expansion</technical_language>

Target:
public DTreeUserInteraction expand(IProgressMonitor monitor) { try { monitor.beginTask("Tree item expanding", tree.getOwnedTreeItems().size()); for (DTreeItem child : tree.getOwnedTreeItems()) { if (!child.isExpanded()) { new DTreeItemUserInteraction(child, ctx).expand(new SubProgressMonitor(monitor, 1)); } else { monitor.worked(1); } } } finally { monitor.done(); } return this; }
Source:
<code>public Multimap<Integer, Integer> getBinderMap() { if (isBinder()) { return productionAttributes.getAttr(Attribute.Key.get( <START> new TypeToken<Multimap<Integer, Integer>>() { <END> }, Names.named("binder"))); } else { return null; } }</code><technical_language>Multimap please</technical_language>

Target:
public Multimap<Integer, Integer> getBinderMap() { if (isBinder()) { Multimap<Integer, Integer> binder = productionAttributes.getAttr(Attribute.Key.get( new TypeToken<Multimap<Integer, Integer>>() {}, Names.named("binder"))); return binder == null ? ImmutableMultimap.of(0, 1) : binder; } else { return null; } }
Source:
<code>public MainDesktop() throws URISyntaxException, InterruptedException { this.injector = Guice.createInjector(this); Client client = new Client("localhost", this.configureRendererProtocol()); RenderController cntrl = this.injector.getInstance(RenderController.class); cntrl.setClient(client); client.setController(cntrl); this.eventDispatcher = this.injector.getInstance(EventDispatcher.class); this.setupGraphics(); <START> Thread.sleep(500); <END> eventDispatcher.dispatch(new GameWaitingEvent()); Thread.sleep(1000); AnimalAddedEvent event = new AnimalAddedEvent(); event.setTeam(0); event.setVariation(0); event.setAnimal(0); event.setSector(Sector.BACK); eventDispatcher.dispatch(event); Thread.sleep(500); event = new AnimalAddedEvent(); event.setTeam(1); event.setVariation(0); event.setAnimal(1); event.setSector(Sector.FRONT_MIDDLE); eventDispatcher.dispatch(event); Thread.sleep(500); eventDispatcher.dispatch(new GameAboutToStartEvent()); Thread.sleep(500); eventDispatcher.dispatch(new GameStartedEvent()); }</code><technical_language>This</technical_language>

Target:
public MainDesktop() throws URISyntaxException, InterruptedException { this.injector = Guice.createInjector(this); Client client = new Client("localhost", this.configureRendererProtocol()); RenderController cntrl = this.injector.getInstance(RenderController.class); cntrl.setClient(client); client.setController(cntrl); this.eventDispatcher = this.injector.getInstance(EventDispatcher.class); this.setupGraphics(); client.connect(); }
Source:
<code>public String noLastSongInfo() { <START> return "No recuerdo que me hayas dado informaci�n sobre una canci�n..."; <END> }</code><technical_language>"song info" is term I for line consists of song name, pp, other meta information. user receives song info in response !r, /np, !with, !acc, etc... song info is saved in case modified !with !acc something. this is poorly worded in english version</technical_language>

Target:
public String noLastSongInfo() { return "No recuerdo haberte dado informaci�n sobre alguna canci�n..."; }
Source:
<code>private void checkElementAndSubtree(Object element) { <START> Object e = element; <END> checkElement(e); for (Object child : fContentProvider.getChildren(e)) { checkElementAndSubtree(child); } }</code><technical_language>I "cast" parameter in this case do assign it</technical_language>

Target:
private void checkElementAndSubtree(Object element) { checkElement(element); for (Object child : fContentProvider.getChildren(element)) { checkElementAndSubtree(child); } }
Source:
<code>private String getVersion(String nodeExecutable) { StringBuilder output = new StringBuilder(); NodeCommand nodeCommand = new NodeCommand(processWrapper, nodeExecutable, singletonList("-v"), scriptFilename, emptyList(), output::append, LOG::error); nodeCommand.start(); int exitValue = nodeCommand.waitFor(); if (exitValue != 0) { <START> throw new IllegalStateException("Failed to determine Node.js version"); <END> } return output.toString(); }</code><technical_language>a friendly here, I prefer throw NodeCommandException, easier catch</technical_language>

Target:
private String getVersion(String nodeExecutable) { StringBuilder output = new StringBuilder(); NodeCommand nodeCommand = new NodeCommand(processWrapper, nodeExecutable, singletonList("-v"), null, emptyList(), output::append, LOG::error); nodeCommand.start(); int exitValue = nodeCommand.waitFor(); if (exitValue != 0) { throw new NodeCommandException("Failed to run Node.js with -v to determine the version"); } return output.toString(); }
Source:
<code><START> protected boolean createGeoRepSession(Guid upServerId, <END> String masterVolumeName, String remoteHost, String remoteVolumeName, String userName, Boolean force, Boolean handleError) { GlusterVolumeGeoRepSessionVDSParameters params = new GlusterVolumeGeoRepSessionVDSParameters(upServer.getId(), getGlusterVolumeName(), slaveHost.getHostName(), getParameters().getSlaveVolumeName(), getParameters().getUserName(), getParameters().isForce()); VDSReturnValue createSessionReturnValue = runVdsCommand(VDSCommandType.CreateGlusterVolumeGeoRepSession, params); if (createSessionReturnValue.getSucceeded()) { setSucceeded(true); return true; } else { setSucceeded(false); if (handleError) { handleVdsError(AuditLogType.GLUSTER_GEOREP_SESSION_CREATE_FAILED, createSessionReturnValue.getVdsError().getMessage()); } return false; } }</code><technical_language>pass arguments if do them</technical_language>

Target:
protected boolean createGeoRepSession(Guid upServerId, String masterVolumeName, String remoteHost, String remoteVolumeName, String userName, Boolean force, Boolean handleError) { GlusterVolumeGeoRepSessionVDSParameters params = new GlusterVolumeGeoRepSessionVDSParameters(upServerId, masterVolumeName, remoteHost, remoteVolumeName, userName, force); VDSReturnValue createSessionReturnValue = runVdsCommand(VDSCommandType.CreateGlusterVolumeGeoRepSession, params); if (createSessionReturnValue.getSucceeded()) { setSucceeded(true); return true; } else { setSucceeded(false); if (handleError) { handleVdsError(AuditLogType.GLUSTER_GEOREP_SESSION_CREATE_FAILED, createSessionReturnValue.getVdsError().getMessage()); } return false; } }
Source:
<code>public void handle(final ArtifactEvent event) { final Repository repository = getRepository(event); if (!Maven2LayoutProvider.ALIAS.equals(repository.getLayout())) { return; } if (event.getType() != ArtifactEventTypeEnum.EVENT_ARTIFACT_PATH_DELETED.getType()) { return; } try { mavenMetadataGroupRepositoryComponent.cleanupGroupsContaining(event.getStorageId(), event.getRepositoryId(), event.getPath()); <START> if (maybeMavenIndexGroupRepositoryComponent.isPresent()) <END> { maybeMavenIndexGroupRepositoryComponent.get().cleanupGroupsContaining(event.getStorageId(), event.getRepositoryId(), event.getPath()); } } catch (IOException e) { throw Throwables.propagate(e); } }</code><technical_language>@fuss86 for disturbing, this is "tight coupling" check this optional time</technical_language>

Target:
public void handle(final ArtifactEvent event) { final Repository repository = getRepository(event); if (!Maven2LayoutProvider.ALIAS.equals(repository.getLayout())) { return; } if (event.getType() != ArtifactEventTypeEnum.EVENT_ARTIFACT_PATH_DELETED.getType()) { return; } try { mavenMetadataGroupRepositoryComponent.cleanupGroupsContaining(event.getStorageId(), event.getRepositoryId(), event.getPath()); } catch (IOException e) { throw Throwables.propagate(e); } }
Source:
<code>private void importDatabase() { AlertDialog.Builder builder = new AlertDialog.Builder(getActivity()); builder.setTitle(R.string.database_import_label); builder.setMessage(R.string.database_import_warning); <START> builder.setNegativeButton("NO", null); <END> builder.setPositiveButton("Replace", (dialog, which) -> { if (Build.VERSION.SDK_INT >= 19) { Intent intent = new Intent(Intent.ACTION_OPEN_DOCUMENT); intent.setType("* *"); startActivityForResult(Intent.createChooser(intent, getString(R.string.import_select_file)), REQUEST_CODE_RESTORE_DATABASE); } } ); AlertDialog dialog = builder.create(); dialog.show(); }</code><technical_language>Please a R.string resource, text translated</technical_language>

Target:
private void importDatabase() { AlertDialog.Builder builder = new AlertDialog.Builder(getActivity()); builder.setTitle(R.string.database_import_label); builder.setMessage(R.string.database_import_warning); builder.setNegativeButton(R.string.no, null); builder.setPositiveButton(R.string.confirm_label, (dialog, which) -> { if (Build.VERSION.SDK_INT >= 19) { Intent intent = new Intent(Intent.ACTION_OPEN_DOCUMENT); intent.setType("* *"); startActivityForResult(Intent.createChooser(intent, getString(R.string.import_select_file)), REQUEST_CODE_RESTORE_DATABASE); } } ); builder.show(); }
Source:
<code>public void setScrollView(@Nullable ObservableWebView webView) { <START> webview = <END> webView; if (webview != null) { webview.addOnScrollChangeListener(this); webview.addOnDownMotionEventListener(this); webview.addOnUpOrCancelMotionEventListener(this); webview.addOnClickListener(this); } }</code><technical_language>clear previously set listeners</technical_language>

Target:
public void setScrollView(@Nullable ObservableWebView webView) { this.webView = webView; if (webView != null) { webView.addOnScrollChangeListener(this); webView.addOnDownMotionEventListener(this); webView.addOnUpOrCancelMotionEventListener(this); webView.addOnClickListener(this); } }
Source:
<code><START> public VoiceInterpreterParams(Configuration configuration, DaoManager storage, ActorRef callManager, ActorRef conferences, ActorRef bridgeManager, ActorRef smsService, Sid account, Sid phone, String version, URI url, String method, URI fallbackUrl, String fallbackMethod, URI statusCallback, String statusCallbackMethod, String referTarget, String emailAddress, ActorRef monitoring, String rcml, boolean asImsUa, String imsUaLogin, String imsUaPassword, String transferor, String transferee) { <END> this.configuration = configuration; this.storage = storage; this.callManager = callManager; this.conferenceCenter = conferences; this.bridgeManager = bridgeManager; this.smsService = smsService; this.account = account; this.phone = phone; this.version = version; this.url = url; this.method = method; this.fallbackUrl = fallbackUrl; this.fallbackMethod = fallbackMethod; this.statusCallback = statusCallback; this.statusCallbackMethod = statusCallbackMethod; this.referTarget = referTarget; this.emailAddress = emailAddress; this.monitoring = monitoring; this.rcml = rcml; this.asImsUa = asImsUa; this.imsUaLogin = imsUaLogin; this.imsUaPassword = imsUaPassword; this.transferor = transferor; this.transferee = transferee; }</code><technical_language>change constructor modifier? i is a builder for that,right</technical_language>

Target:
private VoiceInterpreterParams(Configuration configuration, DaoManager storage, ActorRef callManager, ActorRef conferences, ActorRef bridgeManager, ActorRef smsService, Sid account, Sid phone, String version, URI url, String method, URI fallbackUrl, String fallbackMethod, URI statusCallback, String statusCallbackMethod, String referTarget, String emailAddress, ActorRef monitoring, String rcml, boolean asImsUa, String imsUaLogin, String imsUaPassword, String transferor, String transferee) { this.configuration = configuration; this.storage = storage; this.callManager = callManager; this.conferenceCenter = conferences; this.bridgeManager = bridgeManager; this.smsService = smsService; this.account = account; this.phone = phone; this.version = version; this.url = url; this.method = method; this.fallbackUrl = fallbackUrl; this.fallbackMethod = fallbackMethod; this.statusCallback = statusCallback; this.statusCallbackMethod = statusCallbackMethod; this.referTarget = referTarget; this.emailAddress = emailAddress; this.monitoring = monitoring; this.rcml = rcml; this.asImsUa = asImsUa; this.imsUaLogin = imsUaLogin; this.imsUaPassword = imsUaPassword; this.transferor = transferor; this.transferee = transferee; }
Source:
<code>protected BaseLoginInteractor createInteractor(String actionName) { if (authenticationType.equals(AuthenticationType.COOKIE)) { return new LoginCookieInteractor(); } <START> else if (BASIC_AUTH.equals(actionName)) { <END> return new LoginBasicInteractor(); } else { LoginOAuthInteractor oauthInteractor = new LoginOAuthInteractor(); OAuthConfig config = new OAuthConfig(LiferayServerContext.getServer(), oauthConsumerKey, oauthConsumerSecret); oauthInteractor.setOAuthConfig(config); return oauthInteractor; } }</code><technical_language>@victorg1991 action name same, rely "authenticationType" decide interactor created. Check iOS</technical_language>

Target:
protected BaseLoginInteractor createInteractor(String actionName) { if (authenticationType.equals(AuthenticationType.COOKIE)) { return new LoginCookieInteractor(); } else if (authenticationType.equals(AuthenticationType.OAUTH)) { LoginOAuthInteractor oauthInteractor = new LoginOAuthInteractor(); OAuthConfig config = new OAuthConfig(LiferayServerContext.getServer(), oauthConsumerKey, oauthConsumerSecret); oauthInteractor.setOAuthConfig(config); return oauthInteractor; } else { return new LoginBasicInteractor(); } }
Source:
<code>public void signOut() throws Exception { HibernateAccount hibernateAccount = makeValidHibernateAccount(false, true); hibernateAccount.setReauthTokenAlgorithm(PasswordAlgorithm.DEFAULT_PASSWORD_ALGORITHM); hibernateAccount.setReauthTokenHash("AAA"); <START> hibernateAccount.setReauthTokenModifiedOn(DateTime.now().getMillis()); <END> when(mockHibernateHelper.queryGet(any(), any(), any(), any())).thenReturn(ImmutableList.of( hibernateAccount)); ArgumentCaptor<HibernateAccount> accountCaptor = ArgumentCaptor.forClass(HibernateAccount.class); dao.signOut(STUDY, EMAIL); verify(mockHibernateHelper).update(accountCaptor.capture()); HibernateAccount captured = accountCaptor.getValue(); assertNull(captured.getReauthTokenAlgorithm()); assertNull(captured.getReauthTokenHash()); assertNull(captured.getReauthTokenModifiedOn()); }</code><technical_language>create a reauth token in makeValidHibernateAccount() immediately throw away. This unnecessary of CPU cycles, especially hashing passwords is CPU intensive</technical_language>

Target:
public void signOut() throws Exception { HibernateAccount hibernateAccount = makeValidHibernateAccount(false, false); hibernateAccount.setReauthTokenAlgorithm(PasswordAlgorithm.DEFAULT_PASSWORD_ALGORITHM); hibernateAccount.setReauthTokenHash("AAA"); hibernateAccount.setReauthTokenModifiedOn(DateTime.now().getMillis()); when(mockHibernateHelper.queryGet(any(), any(), any(), any())).thenReturn(ImmutableList.of( hibernateAccount)); ArgumentCaptor<HibernateAccount> accountCaptor = ArgumentCaptor.forClass(HibernateAccount.class); dao.signOut(STUDY, EMAIL); verify(mockHibernateHelper).update(accountCaptor.capture()); HibernateAccount captured = accountCaptor.getValue(); assertNull(captured.getReauthTokenAlgorithm()); assertNull(captured.getReauthTokenHash()); assertNull(captured.getReauthTokenModifiedOn()); }
Source:
<code><START> public Route getRoute( <END> final Territory start, final Territory end, final Predicate<Territory> cond) { checkNotNull(start); checkNotNull(end); return new RouteFinder(this, Matches.territoryIs(end).or(cond)) .findRoute(start, end) .orElse(null); }</code><technical_language>getRouteForUnits belong GameMap, a feature envy code smell. I see, is happening is calling RouteFinder passing a GameMap reference. caller this code, is invoking this method GameMap, reference. sense put this method in RouteFinder? a bit indirect as-is pass a 'this' reference. Example, suggesting callers API like: new RouteFinder(data.getMap()) .findByCost(start, end, units, player, Matches.territoryIs(end).or(cond));</technical_language>

Target:
public Route getRoute( final Territory start, final Territory end, final Predicate<Territory> cond) { checkNotNull(start); checkNotNull(end); return new RouteFinder(this, Matches.territoryIs(end).or(cond)) .findRouteByDistance(start, end) .orElse(null); }
Source:
<code>protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); mMapView = findViewById(R.id.mapView); List<String> subDomains = Arrays.asList("a", "b", "c", "d"); mWebTiledLayer = new WebTiledLayer(getString(R.string.template_uri_stamen), subDomains); mWebTiledLayer.loadAsync(); mWebTiledLayer.addDoneLoadingListener(() -> { if (mWebTiledLayer.getLoadStatus() == LoadStatus.LOADED) { <START> ArcGISMap map = new ArcGISMap(new Basemap(mWebTiledLayer)); <END> mMapView.setMap(map); mWebTiledLayer.setAttribution(getString(R.string.stamen_attribution)); } }); }</code><technical_language>Move this of done loading listener in scope instead of global</technical_language>

Target:
protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); mMapView = findViewById(R.id.mapView); List<String> subDomains = Arrays.asList("a", "b", "c", "d"); WebTiledLayer webTiledLayer = new WebTiledLayer(getString(R.string.template_uri_stamen), subDomains); ArcGISMap map = new ArcGISMap(new Basemap(webTiledLayer)); mMapView.setMap(map); webTiledLayer.setAttribution(getString(R.string.stamen_attribution)); }
Source:
<code>public void killContainer(String container, int signal) throws IOException { final List<Pair<String, ?>> headers = new ArrayList<>(2); <START> headers.add(Pair.of("Content-Type", "text/plain")); <END> headers.add(Pair.of("Content-Length", 0)); try (DockerConnection connection = openConnection(dockerDaemonUri).method("POST") .path("/containers/" + container + "/kill") .query("signal", signal) .headers(headers)) { final DockerResponse response = connection.request(); final int status = response.getStatus(); if (204 != status) { throw new DockerException(getDockerExceptionMessage(response), status); } } }</code><technical_language>constant</technical_language>

Target:
public void killContainer(String container, int signal) throws IOException { final List<Pair<String, ?>> headers = new ArrayList<>(2); headers.add(Pair.of("Content-Type", MediaType.TEXT_PLAIN)); headers.add(Pair.of("Content-Length", 0)); try (DockerConnection connection = openConnection(dockerDaemonUri).method("POST") .path("/containers/" + container + "/kill") .query("signal", signal) .headers(headers)) { final DockerResponse response = connection.request(); final int status = response.getStatus(); if (NO_CONTENT.getStatusCode() != status) { throw new DockerException(getDockerExceptionMessage(response), status); } } }
Source:
<code>public static void main(String[] args) { Options options = handleOptions(Options.class, args); WikibaseRepository wikibaseRepository; <START> if (options.entityNamespaces() == null) { <END> wikibaseRepository = new WikibaseRepository(options.wikibaseScheme(), options.wikibaseHost()); } else { String[] strEntityNamespaces = options.entityNamespaces().split(","); long[] longEntityNamespaces = new long[strEntityNamespaces.length]; try { for (int i = 0; i < strEntityNamespaces.length; i++) { longEntityNamespaces[i] = Long.parseLong(strEntityNamespaces[i]); } } catch (NumberFormatException e) { log.error("Invalid value for --entityNamespaces. Namespace index should be an integer.", e); return; } wikibaseRepository = new WikibaseRepository(options.wikibaseScheme(), options.wikibaseHost(), 0, longEntityNamespaces); } URI sparqlUri; try { sparqlUri = new URI(options.sparqlUrl()); } catch (URISyntaxException e) { log.error("Invalid url: " + options.sparqlUrl() + " caused by " + e.getMessage()); return; } WikibaseUris uris = new WikibaseUris(options.wikibaseHost()); RdfRepository rdfRepository = new RdfRepository(sparqlUri, uris); Change.Source<? extends Change.Batch> changeSource = buildChangeSource(options, rdfRepository, wikibaseRepository); if (changeSource == null) { return; } int threads = options.threadCount(); ThreadFactoryBuilder threadFactory = new ThreadFactoryBuilder().setDaemon(true).setNameFormat("update %s"); ExecutorService executor = new ThreadPoolExecutor(threads, threads, 0, TimeUnit.SECONDS, new LinkedBlockingQueue<Runnable>(), threadFactory.build()); Munger munger = mungerFromOptions(options); new Update<>(changeSource, wikibaseRepository, rdfRepository, munger, executor, options.pollDelay(), uris, options.verify()).run(); }</code><technical_language>I suggest split this chunk of code a separate method for readability, main function is pretty big</technical_language>

Target:
public static void main(String[] args) { Options options = handleOptions(Options.class, args); WikibaseRepository wikibaseRepository = buildWikibaseRepository(options); if (wikibaseRepository == null) { return; } URI sparqlUri; try { sparqlUri = new URI(options.sparqlUrl()); } catch (URISyntaxException e) { log.error("Invalid url: " + options.sparqlUrl() + " caused by " + e.getMessage()); return; } WikibaseUris uris = new WikibaseUris(options.wikibaseHost()); RdfRepository rdfRepository = new RdfRepository(sparqlUri, uris); Change.Source<? extends Change.Batch> changeSource = buildChangeSource(options, rdfRepository, wikibaseRepository); if (changeSource == null) { return; } int threads = options.threadCount(); ThreadFactoryBuilder threadFactory = new ThreadFactoryBuilder().setDaemon(true).setNameFormat("update %s"); ExecutorService executor = new ThreadPoolExecutor(threads, threads, 0, TimeUnit.SECONDS, new LinkedBlockingQueue<Runnable>(), threadFactory.build()); Munger munger = mungerFromOptions(options); new Update<>(changeSource, wikibaseRepository, rdfRepository, munger, executor, options.pollDelay(), uris, options.verify()).run(); }
Source:
<code>public FEELFnResult<BigDecimal> invoke(@ParameterName( "number" ) BigDecimal number) { if ( number == null ) { return FEELFnResult.ofError( new InvalidParametersEvent( FEELEvent.Severity.ERROR, "number", "cannot be null" ) ); } <START> return FEELFnResult.ofResult( new BigDecimal( Math.log( number.doubleValue() ) ) ); <END> }</code><technical_language>convert double value, reason</technical_language>

Target:
public FEELFnResult<BigDecimal> invoke(@ParameterName( "number" ) BigDecimal number) { if ( number == null ) { return FEELFnResult.ofError( new InvalidParametersEvent( FEELEvent.Severity.ERROR, "number", "cannot be null" ) ); } return FEELFnResult.ofResult( new BigDecimal( Math.log( number.doubleValue() ), MathContext.DECIMAL128 ) ); }
Source:
<code>public byte[] getCacheKey() { <START> return new CacheKeyBuilder(PostAggregatorIds.THETA_SKETCH_CONSTANT).appendInt(hashCode()).build(); <END> }</code><technical_language>hashCode() a good cache key here, collide easily, collisions bad in cache keys wires get crossed. include a sha1sum of entire base64-formatted sketch constant. odds of collision in case vanishingly small</technical_language>

Target:
public byte[] getCacheKey() { return new CacheKeyBuilder(PostAggregatorIds.THETA_SKETCH_CONSTANT) .appendString(DigestUtils.sha1Hex(value)).build(); }
Source:
<code>private void completeNetworkAttachmentsByLabels() { for (NicLabel nicLabel : params.getLabels()) { List<Network> labelNetworks = labelToNetworks.get(nicLabel.getLabel()); if (labelNetworks == null) { continue; } for (Network network : labelNetworks) { NetworkAttachment newOrModifiedNetworkAttachment = attachmentsByNetworkId.get(network.getId()); NetworkAttachment existingNetworkAttachment = existingNetworkAttachmentsByNetworkId.get(network.getId()); boolean existingAttachmentRemoved = existingNetworkAttachment == null ? false : params.getRemovedNetworkAttachments() .contains(existingNetworkAttachment.getId()); NetworkAttachment attachmentToConfigure = newOrModifiedNetworkAttachment == null && !existingAttachmentRemoved ? existingNetworkAttachment : newOrModifiedNetworkAttachment; if (attachmentToConfigure == null) { params.getNetworkAttachments().add(createNetworkAttachment(nicLabel.getNicId(), nicLabel.getNicName(), network.getId(), network.getName())); } else if (!Objects.equals(attachmentToConfigure.getNicName(), nicLabel.getNicName())) { if <START> (newOrModifiedNetworkAttachment <END> == null) { NetworkAttachment updatedNetworkAttachment = new NetworkAttachment(existingNetworkAttachment); updatedNetworkAttachment.setNicId(nicLabel.getNicId()); updatedNetworkAttachment.setNicName(nicLabel.getNicName()); params.getNetworkAttachments().add(updatedNetworkAttachment); } } } } }</code><technical_language>please merge condition</technical_language>

Target:
private void completeNetworkAttachmentsByLabels() { for (NicLabel nicLabel : params.getLabels()) { List<Network> labelNetworks = labelToNetworks.get(nicLabel.getLabel()); if (labelNetworks == null) { continue; } for (Network network : labelNetworks) { NetworkAttachment newOrModifiedNetworkAttachment = attachmentsByNetworkId.get(network.getId()); NetworkAttachment existingNetworkAttachment = existingNetworkAttachmentsByNetworkId.get(network.getId()); boolean existingAttachmentRemoved = existingNetworkAttachment == null ? false : params.getRemovedNetworkAttachments() .contains(existingNetworkAttachment.getId()); boolean noNewOrModifiedNetworkAttachment = newOrModifiedNetworkAttachment == null; NetworkAttachment attachmentToConfigure = noNewOrModifiedNetworkAttachment && !existingAttachmentRemoved ? existingNetworkAttachment : newOrModifiedNetworkAttachment; if (attachmentToConfigure == null) { params.getNetworkAttachments().add(createNetworkAttachment(nicLabel.getNicId(), nicLabel.getNicName(), network.getId(), network.getName())); } else if (!Objects.equals(attachmentToConfigure.getNicName(), nicLabel.getNicName()) && noNewOrModifiedNetworkAttachment) { NetworkAttachment updatedNetworkAttachment = new NetworkAttachment(existingNetworkAttachment); updatedNetworkAttachment.setNicId(nicLabel.getNicId()); updatedNetworkAttachment.setNicName(nicLabel.getNicName()); params.getNetworkAttachments().add(updatedNetworkAttachment); } } } }