auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>public void propertyChange(PropertyChangeEvent event) { String property = event.getProperty(); if (visible) { switch (property) { case ICVSUIConstants.PREF_CONSOLE_COMMAND_COLOR: <START> { <END> Color newColor = createColor(CVSUIPlugin.getStandardDisplay(), ICVSUIConstants.PREF_CONSOLE_COMMAND_COLOR); commandStream.setColor(newColor); commandColor.dispose(); commandColor = newColor; break; } case ICVSUIConstants.PREF_CONSOLE_MESSAGE_COLOR: { Color newColor = createColor(CVSUIPlugin.getStandardDisplay(), ICVSUIConstants.PREF_CONSOLE_MESSAGE_COLOR); messageStream.setColor(newColor); messageColor.dispose(); messageColor = newColor; break; } case ICVSUIConstants.PREF_CONSOLE_ERROR_COLOR: { Color newColor = createColor(CVSUIPlugin.getStandardDisplay(), ICVSUIConstants.PREF_CONSOLE_ERROR_COLOR); errorStream.setColor(newColor); errorColor.dispose(); errorColor = newColor; break; } case ICVSUIConstants.PREF_CONSOLE_FONT: setFont(((FontRegistry) event.getSource()).get(ICVSUIConstants.PREF_CONSOLE_FONT)); break; default: break; } } switch (property) { case ICVSUIConstants.PREF_CONSOLE_SHOW_ON_MESSAGE: Object value = event.getNewValue(); if (value instanceof String) { showOnMessage = Boolean.valueOf((String) value).booleanValue(); } else { showOnMessage = ((Boolean) value).booleanValue(); } break; case ICVSUIConstants.PREF_CONSOLE_LIMIT_OUTPUT: initLimitOutput(); break; case ICVSUIConstants.PREF_CONSOLE_WRAP: initWrapSetting(); break; default: break; } }</code><technical_language>Diff minimized, I think, if opening brace line case: case ICVSUIConstants.PREF_CONSOLE_COMMAND_COLOR: { ... } case ..</technical_language>

Target:
public void propertyChange(PropertyChangeEvent event) { String property = event.getProperty(); if (visible) { switch (property) { case ICVSUIConstants.PREF_CONSOLE_COMMAND_COLOR: { Color newColor = createColor(CVSUIPlugin.getStandardDisplay(), ICVSUIConstants.PREF_CONSOLE_COMMAND_COLOR); commandStream.setColor(newColor); commandColor.dispose(); commandColor = newColor; return; } case ICVSUIConstants.PREF_CONSOLE_MESSAGE_COLOR: { Color newColor = createColor(CVSUIPlugin.getStandardDisplay(), ICVSUIConstants.PREF_CONSOLE_MESSAGE_COLOR); messageStream.setColor(newColor); messageColor.dispose(); messageColor = newColor; return; } case ICVSUIConstants.PREF_CONSOLE_ERROR_COLOR: { Color newColor = createColor(CVSUIPlugin.getStandardDisplay(), ICVSUIConstants.PREF_CONSOLE_ERROR_COLOR); errorStream.setColor(newColor); errorColor.dispose(); errorColor = newColor; return; } case ICVSUIConstants.PREF_CONSOLE_FONT: setFont(((FontRegistry) event.getSource()).get(ICVSUIConstants.PREF_CONSOLE_FONT)); return; default: break; } } switch (property) { case ICVSUIConstants.PREF_CONSOLE_SHOW_ON_MESSAGE: Object value = event.getNewValue(); if (value instanceof String) { showOnMessage = Boolean.valueOf((String) value).booleanValue(); } else { showOnMessage = ((Boolean) value).booleanValue(); } break; case ICVSUIConstants.PREF_CONSOLE_LIMIT_OUTPUT: initLimitOutput(); break; case ICVSUIConstants.PREF_CONSOLE_WRAP: initWrapSetting(); break; default: break; } }
Source:
<code>void checkSymbol(Symbol symbol) { if (nonStaticReference || methodSymbol.equals(symbol) || symbol.isStatic()) { return; } <START> final Symbol scopeOwner = scopeOwner(symbol); <END> if (isConstructor(symbol)) { checkConstructor(scopeOwner); } else if (scopeOwner != null) { checkNonConstructor(symbol, scopeOwner); } }</code><technical_language>remove final modifier</technical_language>

Target:
void checkSymbol(Symbol symbol) { if (nonStaticReference || methodSymbol.equals(symbol) || symbol.isStatic()) { return; } Symbol scopeOwner = symbol.owner(); if (isConstructor(symbol)) { checkConstructor(scopeOwner); } else if (scopeOwner != null) { checkNonConstructor(scopeOwner); } }
Source:
<code>protected WeldBeanDeploymentArchive processAnnotatedDiscovery(BeanArchiveBuilder builder) { Iterator<String> classIterator = builder.getClassIterator(); while (classIterator.hasNext()) { String className = classIterator.next(); ClassInfo cinfo = cindex.getClassByName(DotName.createSimple(className)); if (cinfo != null) { if (!containsBeanDefiningAnnotation(cinfo, className)) { classIterator.remove(); } } else { Class<?> clazz = Reflections.loadClass(resourceLoader, className); <START> if (!Reflections.hasBeanDefiningAnnotation(clazz, initialBeanDefiningAnnotations)) { <END> classIterator.remove(); } } } return builder.build(); }</code><technical_language>add if (clazz != null) avoid NPE..</technical_language>

Target:
protected WeldBeanDeploymentArchive processAnnotatedDiscovery(BeanArchiveBuilder builder) { Iterator<String> classIterator = builder.getClassIterator(); while (classIterator.hasNext()) { String className = classIterator.next(); ClassInfo cinfo = cindex.getClassByName(DotName.createSimple(className)); if (cinfo != null) { if (!containsBeanDefiningAnnotation(cinfo, className)) { classIterator.remove(); } } else { Class<?> clazz = Reflections.loadClass(resourceLoader, className); if (clazz == null || !Reflections.hasBeanDefiningAnnotation(clazz, initialBeanDefiningAnnotations)) { classIterator.remove(); } } } return builder.build(); }
Source:
<code>public void dispose() { for (StreamInputReader reader : streamInputReaders) { if (reader != null) { reader.dispose(); } <START> } <END> }</code><technical_language>call clear disposing readers</technical_language>

Target:
public void dispose() { for (StreamInputReader reader : streamInputReaders) { if (reader != null) { reader.dispose(); } } streamInputReaders.clear(); }
Source:
<code>public void start(BundleContext context) throws Exception { Dictionary<String, Object> properties = new Hashtable<>(); properties.put(DataSourceFactory.OSGI_JDBC_DRIVER_CLASS, Driver.class.getName()); properties.put(DataSourceFactory.OSGI_JDBC_DRIVER_NAME, "JDBC driver for MariaDB and MySQL"); <START> properties.put(DataSourceFactory.OSGI_JDBC_DRIVER_VERSION, Version.majorVersion + "." + Version.minorVersion); <END> service = context.registerService(DataSourceFactory.class, new MariaDbDataSourceFactory(), properties); }</code><technical_language>Version.version (like '2.4.1-SNAPSHOT', compare '2.4' )</technical_language>

Target:
public void start(BundleContext context) throws Exception { Dictionary<String, Object> properties = new Hashtable<>(); properties.put(DataSourceFactory.OSGI_JDBC_DRIVER_CLASS, Driver.class.getName()); properties.put(DataSourceFactory.OSGI_JDBC_DRIVER_NAME, MariaDbDatabaseMetaData.DRIVER_NAME); properties.put(DataSourceFactory.OSGI_JDBC_DRIVER_VERSION, Version.version); service = context.registerService(DataSourceFactory.class, new MariaDbDataSourceFactory(), properties); }
Source:
<code>public ProgramState checkPreStatement(CheckerContext context, Tree syntaxNode) { if (syntaxNode.is(Tree.Kind.NEW_CLASS)) { NewClassTree newClassTree = (NewClassTree) syntaxNode; if (newClassTree.symbolType().is("java.io.ObjectOutputStream")) { ProgramState programState = context.getState(); FileOutputStreamConstraint constraint = programState.getConstraint(programState.peekValue(), FileOutputStreamConstraint.class); if (constraint == FileOutputStreamConstraint.APPEND) { <START> context.reportIssue(syntaxNode, this, "This file was opened in append mode."); <END> } } } return super.checkPreStatement(context, syntaxNode); }</code><technical_language>convinced message, especially a FileInputStream here, a File. secondaries/flow</technical_language>

Target:
public ProgramState checkPreStatement(CheckerContext context, Tree syntaxNode) { if (syntaxNode.is(Tree.Kind.NEW_CLASS)) { NewClassTree newClassTree = (NewClassTree) syntaxNode; if (newClassTree.symbolType().is("java.io.ObjectOutputStream") && newClassTree.arguments().size() == 1) { ProgramState programState = context.getState(); FileOutputStreamAppendConstraint constraint = programState.getConstraint(programState.peekValue(), FileOutputStreamAppendConstraint.class); if (constraint != null) { context.reportIssue( newClassTree.arguments().get(0), this, "Do not use a FileOutputStream in append mode.", ImmutableSet.of(Flow.of(new JavaFileScannerContext.Location("FileOutputStream created here.", constraint.node)))); } } } return super.checkPreStatement(context, syntaxNode); }
Source:
<code>static <K, V> ViewQueryParameters<K, V> forwardPaginationQueryParameters (ViewQueryParameters<K, V> initialQueryParameters, K startkey, String startkey_docid) { ViewQueryParameters<K, V> pageParameters = new ViewQueryParameters<K, V> (initialQueryParameters); pageParameters.setStartKey(startkey); pageParameters.setStartKeyDocId(startkey_docid); pageParameters.inclusive_end = initialQueryParameters.inclusive_end; pageParameters.descending = initialQueryParameters.descending; if (initialQueryParameters.endkey != null) { pageParameters.setEndKey(initialQueryParameters.endkey); } pageParameters.setEndKeyDocId(initialQueryParameters.endkey_docid); <START> copyNonPagingParameters(initialQueryParameters, pageParameters); <END> return pageParameters; }</code><technical_language>set query parameters initial query parameters object, override page-specific ones? feels a simple mistake for if views gained a parameter unrelated pagination overlook I needed update copy.... method</technical_language>

Target:
static <K, V> ViewQueryParameters<K, V> forwardPaginationQueryParameters (ViewQueryParameters<K, V> initialQueryParameters, K startkey, String startkey_docid) { ViewQueryParameters<K, V> pageParameters = initialQueryParameters.copy(); pageParameters.setStartKey(startkey); pageParameters.setStartKeyDocId(startkey_docid); return pageParameters; }
Source:
<code>public Table getTable(String tableId) { if (tableManager != null) { return tableManager.getTable(tableId); } else { <START> LOG.warn("No table found for Id: {}", tableId); <END> return null; } }</code><technical_language>this condition is "No table manager found"? this log a null check for tableManager.getTable</technical_language>

Target:
public Table getTable(String tableId) { if (tableManager != null) { return tableManager.getTable(tableId); } else { LOG.warn("No table manager found"); return null; } }
Source:
<code>private boolean recordPvenRouteStatusChangeForPaymentWorksIsEnabled() { <START> return (getPaymentWorksBatchUtilityService().retrievePaymentWorksParameterValue(PaymentWorksParameterConstants.PMW_INTEGRATION_IS_ACTIVE_IND).equalsIgnoreCase(KFSConstants.ParameterValues.YES) ? true : false); <END> }</code><technical_language>a boolean result this check, adding a ternary operation of "? true : false" is redundant</technical_language>

Target:
private boolean recordPvenRouteStatusChangeForPaymentWorksIsEnabled() { return (getPaymentWorksBatchUtilityService().retrievePaymentWorksParameterValue(PaymentWorksParameterConstants.PMW_INTEGRATION_IS_ACTIVE_IND).equalsIgnoreCase(KFSConstants.ParameterValues.YES)); }
Source:
<code>public StateStatus getCurrentState() { <START> if (CollectionUtils.isNotEmpty(states)) { <END> for (StateStatus state : states) { if (state.endDate == null) { return state; } } } return null; }</code><technical_language>is more readable return statement</technical_language>

Target:
public StateStatus getCurrentState() { StateStatus result = null; if (CollectionUtils.isNotEmpty(states)) { for (StateStatus state : states) { if (state.endDate == null) { result = state; break; } } } return result; }
Source:
<code>private static DataFormatter createFormatter_CadenceZones_TimePercentages() { final DataFormatter dataFormatter = new DataFormatter( FormatterID.CADENCE_ZONES_TIMES, Messages.Calendar_Profile_Value_CadenceZones_TimePercentages, GraphColorManager.PREF_GRAPH_CADENCE) { @Override String format(final CalendarTourData data, final ValueFormat valueFormat, final boolean isShowValueUnit) { String cadenceZonesPercentages = UI.EMPTY_STRING; <START> final int totalCadenceTime = data.cadenceZone_SlowTime + data.cadenceZone_FastTime; <END> if (totalCadenceTime > 0) { final int cadenceZone_SlowPercentage = Math.round(data.cadenceZone_SlowTime * 100f / totalCadenceTime); final int cadenceZone_FastPercentage = Math.round(data.cadenceZone_FastTime * 100f / totalCadenceTime); cadenceZonesPercentages = cadenceZone_SlowPercentage + " - " + cadenceZone_FastPercentage; } return cadenceZonesPercentages; } @Override public ValueFormat getDefaultFormat() { return ValueFormat.TEXT; } @Override public ValueFormat[] getValueFormats() { return new ValueFormat[] { ValueFormat.TEXT }; } @Override void setValueFormat(final ValueFormat valueFormat) }; dataFormatter.setValueFormat(dataFormatter.getDefaultFormat()); return dataFormatter; }</code><technical_language>This location cadence zone computation <LINK_0></technical_language>

Target:
private static DataFormatter createFormatter_CadenceZones_TimePercentages() { final DataFormatter dataFormatter = new DataFormatter( FormatterID.CADENCE_ZONES_TIMES, Messages.Calendar_Profile_Value_CadenceZones_TimePercentages, GraphColorManager.PREF_GRAPH_CADENCE) { @Override String format(final CalendarTourData data, final ValueFormat valueFormat, final boolean isShowValueUnit) { return TourManager.generateCadenceZones_TimePercentages(data.cadenceZone_SlowTime, data.cadenceZone_FastTime); } @Override public ValueFormat getDefaultFormat() { return ValueFormat.TEXT; } @Override public ValueFormat[] getValueFormats() { return new ValueFormat[] { ValueFormat.TEXT }; } @Override void setValueFormat(final ValueFormat valueFormat) }; dataFormatter.setValueFormat(dataFormatter.getDefaultFormat()); return dataFormatter; }
Source:
<code><START> RuleConfiguredTarget getGeneratingConfiguredTarget(KeyedConfiguredTarget kct) <END> throws InterruptedException { return (RuleConfiguredTarget) ((ConfiguredTargetValue) walkableGraph.getValue( ConfiguredTargetKey.builder() .setLabel( ((OutputFileConfiguredTarget) kct.getConfiguredTarget()) .getGeneratingRule() .getLabel()) .setConfiguration(queryEnvironment.getConfiguration(kct)) .build())) .getConfiguredTarget(); }</code><technical_language>assert this KeyedConfiguredTarget contains OutputFileConfiguredTarget if cast 186</technical_language>

Target:
RuleConfiguredTarget getGeneratingConfiguredTarget(KeyedConfiguredTarget kct) throws InterruptedException { Preconditions.checkArgument(kct.getConfiguredTarget() instanceof OutputFileConfiguredTarget); return (RuleConfiguredTarget) ((ConfiguredTargetValue) walkableGraph.getValue( ConfiguredTargetKey.builder() .setLabel( ((OutputFileConfiguredTarget) kct.getConfiguredTarget()) .getGeneratingRule() .getLabel()) .setConfiguration(queryEnvironment.getConfiguration(kct)) .build())) .getConfiguredTarget(); }
Source:
<code>static void setAttributeValue(AttributeDefinition attribute, ModelNode value) throws IOException { ModelNode expectedValue = null; switch (attribute.getType()) { case LIST: expectedValue = textifyList(value); break; case OBJECT: expectedValue = textifyMap(value); break; default: <START> expectedValue = value; <END> break; } expectedValues.put(attribute, expectedValue); ModelNode op = Operations.createWriteAttributeOperation(ADDRESS, attribute.getName(), value); ModelNode result = modelControllerClient.execute(op); Assert.assertEquals(SUCCESS, result.get(OUTCOME).asString()); }</code><technical_language>I checking RestEasy pulls out of model values. resolved expressions, while full expression. in order compare apples oranges, I need do expectedValue = value.resolve(); This more AttributeDefinition.resolve() stuff earlier, extra stuff. this is test code enough. need do in textifyList/Map() methods</technical_language>

Target:
static void setAttributeValue(AttributeDefinition attribute, ModelNode value) throws IOException { ModelNode expectedValue = null; ModelNode resolvedValue = value.resolve(); switch (attribute.getType()) { case LIST: expectedValue = textifyList(resolvedValue); break; case OBJECT: expectedValue = textifyMap(resolvedValue); break; default: expectedValue = resolvedValue; break; } expectedValues.put(attribute, expectedValue); ModelNode op = Operations.createWriteAttributeOperation(ADDRESS, attribute.getName(), value); ModelNode result = modelControllerClient.execute(op); Assert.assertEquals(SUCCESS, result.get(OUTCOME).asString()); }
Source:
<code>public Result next() { if (query == null) throw new IllegalStateException("_query variable is null"); <START> if (randomAccess) <END> return null; synchronized (getDatabase().getLock()) { try { if (c4enum.next()) { return currentObject(); } else return null; } catch (LiteCoreException e) { Log.w(TAG, "Query enumeration error: %s", e); return null; } } }</code><technical_language>randomAccess is thread safe</technical_language>

Target:
public Result next() { if (query == null) throw new IllegalStateException("_query variable is null"); synchronized (getDatabase().getLock()) { try { if (c4enum.next()) { return currentObject(); } else return null; } catch (LiteCoreException e) { Log.w(TAG, "Query enumeration error: %s", e); return null; } } }
Source:
<code>private boolean looksLikeBinary(Path source) { <START> String nonTextTypes = "class|jar|exe|jpg|jpeg|gif"; <END> return getFileExtension(source).matches(nonTextTypes); }</code><technical_language>add .png also</technical_language>

Target:
private boolean looksLikeBinary(Path source) { String nonTextTypes = "class|jar|exe|jpg|jpeg|gif|png"; return getFileExtension(source).matches(nonTextTypes); }
Source:
<code>public boolean getOnOffState() { JsonElement onOff = attributes.get(ONOFF); if (onOff != null) { <START> return attributes.get(ONOFF).getAsInt() == 1; <END> } else { return false; } }</code><technical_language>reuse local variable onOff instead of twice</technical_language>

Target:
public boolean getOnOffState() { JsonElement onOff = attributes.get(ONOFF); if (onOff != null) { return onOff.getAsInt() == 1; } else { return false; } }
Source:
<code>SignatureKeyPairImpl generateKeyPair(String workspaceId) throws ServerException { final KeyPairGenerator kpg; try { kpg = KeyPairGenerator.getInstance(algorithm); } catch (NoSuchAlgorithmException ex) { throw new ServerException(ex.getMessage(), ex); } kpg.initialize(keySize); final KeyPair pair = kpg.generateKeyPair(); final SignatureKeyPairImpl kp = new SignatureKeyPairImpl(workspaceId, pair.getPublic(), pair.getPrivate()); <START> LOG.info( <END> "Generated signature key pair with ws id and algorithm {}.", kp.getWorkspaceId(), algorithm); return kp; }</code><technical_language>I logged info is re-generated workspace restart</technical_language>

Target:
SignatureKeyPairImpl generateKeyPair(String workspaceId) throws ServerException { final KeyPairGenerator kpg; try { kpg = KeyPairGenerator.getInstance(algorithm); } catch (NoSuchAlgorithmException ex) { throw new ServerException(ex.getMessage(), ex); } kpg.initialize(keySize); final KeyPair pair = kpg.generateKeyPair(); final SignatureKeyPairImpl kp = new SignatureKeyPairImpl(workspaceId, pair.getPublic(), pair.getPrivate()); LOG.debug( "Generated signature key pair with ws id and algorithm {}.", kp.getWorkspaceId(), algorithm); return kp; }
Source:
<code>private void showListOfPackages(final boolean includeDefaultPackage, final Command packagesLoadedCommand) { final Module activeModule = projectContext.getActiveModule().orElse(null); if (activeModule == null) { return; } else { moduleService.call((Set<Package> pkgs) -> { moduleService.call((Package activePackage) -> { <START> final List<Package> sortedPackages = getPackages(includeDefaultPackage, <END> pkgs); if (sortedPackages.isEmpty()) { return; } addPackagesToSelect(sortedPackages, activePackage); if (packagesLoadedCommand != null) { packagesLoadedCommand.execute(); } }).resolveDefaultWorkspacePackage(activeModule); }).resolvePackages(activeModule); } }</code><technical_language>name method sortPackages</technical_language>

Target:
private void showListOfPackages(final boolean includeDefaultPackage, final Command packagesLoadedCommand) { final Module activeModule = projectContext.getActiveModule().orElse(null); if (activeModule == null) { return; } else { moduleService.call((Set<Package> pkgs) -> { moduleService.call((Package activePackage) -> { final List<Package> sortedPackages = getSortedPackages(includeDefaultPackage, pkgs); if (sortedPackages.isEmpty()) { return; } addPackagesToSelect(sortedPackages, activePackage); if (packagesLoadedCommand != null) { packagesLoadedCommand.execute(); } }).resolveDefaultWorkspacePackage(activeModule); }).resolvePackages(activeModule); } }
Source:
<code>public ModelAndView consoleout(@RequestParam("pipelineName") String pipelineName, @RequestParam("pipelineLabel") String counterOrLabel, @RequestParam("stageName") String stageName, @RequestParam("buildName") String buildName, @RequestParam(value = "stageCounter", required = false) String stageCounter, @RequestParam(value = "startLineNumber", required = false) Long start ) throws Exception { start = start == null ? 0L : start; try { JobIdentifier job = restfulService.findJob(pipelineName, counterOrLabel, stageName, stageCounter, buildName); <START> ConsoleConsumer streamer = consoleService.getStreamer(start, job); <END> return new ModelAndView(new ConsoleOutView(streamer)); } catch (Exception e) { return buildNotFound(pipelineName, counterOrLabel, stageName, stageCounter, buildName); } }</code><technical_language>Close this guy out avoid file handle leaks</technical_language>

Target:
public ModelAndView consoleout(@RequestParam("pipelineName") String pipelineName, @RequestParam("pipelineLabel") String counterOrLabel, @RequestParam("stageName") String stageName, @RequestParam("buildName") String buildName, @RequestParam(value = "stageCounter", required = false) String stageCounter, @RequestParam(value = "startLineNumber", required = false) Long start ) throws Exception { start = start == null ? 0L : start; try (ConsoleConsumer streamer = consoleService.getStreamer(start, restfulService.findJob(pipelineName, counterOrLabel, stageName, stageCounter, buildName))) { return new ModelAndView(new ConsoleOutView(streamer)); } catch (Exception e) { return buildNotFound(pipelineName, counterOrLabel, stageName, stageCounter, buildName); } }
Source:
<code>private void updateAllocation() { int totalAllocations = 0; boolean isAllocationExceed; for (Integer allocation : writerList.values()) { totalAllocations += allocation; } if (totalAllocations <= totalMemoryPool) { isAllocationExceed = false; } else { isAllocationExceed = true; } if (!isAllocationExceed) { <START> for (Map.Entry<InternalParquetRecordWriter, Integer> entry : writerList.entrySet()) { <END> entry.getKey().setRowGroupSizeThreshold(entry.getValue()); } } else { double scale = (double) totalMemoryPool / totalAllocations; for (Map.Entry<InternalParquetRecordWriter, Integer> entry : writerList.entrySet()) { int newSize = (int) Math.floor(entry.getValue() * scale); entry.getKey().setRowGroupSizeThreshold(newSize); LOG.debug(String.format("Adjust block size to %,d for writer: %s", newSize, entry.getKey())); } } }</code><technical_language>behavior more clear if scale simply set in if/else above. if totalAllocations <= totalMemoryPool, set scale = 1.0 if/else below</technical_language>

Target:
private void updateAllocation() { long totalAllocations = 0; double scale; for (Long allocation : writerList.values()) { totalAllocations += allocation; } if (totalAllocations <= totalMemoryPool) { scale = 1.0; } else { scale = (double) totalMemoryPool / totalAllocations; } for (Map.Entry<InternalParquetRecordWriter, Long> entry : writerList.entrySet()) { long newSize = (long) Math.floor(entry.getValue() * scale); entry.getKey().setRowGroupSizeThreshold(newSize); LOG.debug(String.format("Adjust block size from %,d to %,d for writer: %s", entry.getValue(), newSize, entry.getKey())); } }
Source:
<code>public void initialize(IPath containerPath, final IJavaProject javaProject) throws CoreException { Central.onWorkspaceInit(new Function<Workspace,Void>() { @Override public Void apply(Workspace a) { try { <START> Central.getInstance().addModelListener(BndContainerInitializer.this); <END> IProject project = javaProject.getProject(); Updater updater = new Updater(project, javaProject); updater.updateClasspathContainer(true); } catch (CoreException e) { logger.logError("Error initializing classpath container", e); } return null; } }); }</code><technical_language>I if this solves problem I raising. Eclipse creates a single instance of BndContainerInitializer. projects. constructor is called model listener is added once. This change calls addModelListener multiple times. method wont add if added, is harmful. However, I cleaner solution is onWorkspaceInit call in constructor add model listener piggy backing initialize call is called times</technical_language>

Target:
public void initialize(IPath containerPath, final IJavaProject javaProject) throws CoreException { Central.onWorkspaceInit(new Function<Workspace,Void>() { @Override public Void apply(Workspace a) { try { IProject project = javaProject.getProject(); Updater updater = new Updater(project, javaProject); updater.updateClasspathContainer(true); } catch (CoreException e) { logger.logError("Error initializing classpath container", e); } return null; } }); }
Source:
<code>public List<TriggerImpl> getTriggers() { <START> return triggers; <END> }</code><technical_language>(return copy)</technical_language>

Target:
public List<Trigger> getTriggers() { return triggers; }
Source:
<code>public ChangeAuditLogger build() { if (addHandlers != null && removeHandlers != null) { List<String> auxList = new ArrayList<String>(); auxList.addAll(addHandlers); auxList.removeAll(removeHandlers); <START> if (auxList.size() < addHandlers.size()) { <END> throw new IllegalArgumentException("handler can not be added and removed at the same time"); } } return new ChangeAuditLogger(this); }</code><technical_language>java Set<String> intersection = new HashSet<String>(addHandlers); intersection.retainAll(removeHandlers); if (!intersection.isEmpty()) { ... }</technical_language>

Target:
public ChangeAuditLogger build() { if (addHandlers != null && removeHandlers != null) { Set<String> intersection = new HashSet<String>(addHandlers); intersection.retainAll(removeHandlers); if (!intersection.isEmpty()) { throw new IllegalArgumentException("handler can not be added and removed at the same time"); } } return new ChangeAuditLogger(this); }
Source:
<code>public void hook(ExtensionHook extensionHook) { super.hook(extensionHook); <START> extensionHook.addApiImplementor(this.api); <END> if (getView() != null) { extensionHook.getHookMenu().addToolsMenuItem(getMenuExample()); extensionHook.getHookMenu().addPopupMenuItem(getPopupMsgMenuExample()); extensionHook.getHookView().addStatusPanel(getStatusPanel()); } }</code><technical_language>minimum ZAP version updated (to 2.6.0) in add-on manifest (ZapAddOn.xml)</technical_language>

Target:
public void hook(ExtensionHook extensionHook) { super.hook(extensionHook); this.api = new SimpleExampleAPI(this); extensionHook.addApiImplementor(this.api); if (getView() != null) { extensionHook.getHookMenu().addToolsMenuItem(getMenuExample()); extensionHook.getHookMenu().addPopupMenuItem(getPopupMsgMenuExample()); extensionHook.getHookView().addStatusPanel(getStatusPanel()); } }
Source:
<code>public void refreshAllUsers() { <START> SyncUsers.sync(DbFacade.getInstance().getDbUserDao().getAll(), "The user was reactivated during periodic sync"); <END> }</code><technical_language>I hope getAll() fetch inactive users, need for action... if not, filter inactive getAll()</technical_language>

Target:
public void refreshAllUsers() { List<DbUser> activeUsers = new ArrayList<>(); for (DbUser dbUser : DbFacade.getInstance().getDbUserDao().getAll()) { if (dbUser.isActive()) { activeUsers.add(dbUser); } } SyncUsers.sync(activeUsers); }
Source:
<code>protected void run() throws Exception { if (tree == null) throw die(CLIText.get().treeIsRequired); <START> ArchiveCommand.registerFormat("tar", new TarFormat()); <END> ArchiveCommand.registerFormat("zip", new ZipFormat()); final ArchiveCommand cmd = new ArchiveCommand(db); try { cmd.setTree(tree) .setFormat(format) .setOutputStream(outs).call(); } catch (GitAPIException e) { throw die(e.getMessage()); } finally { cmd.release(); ArchiveCommand.unregisterFormat("zip"); ArchiveCommand.unregisterFormat("tar"); } }</code><technical_language>Eh, I put in a static block left registered for life of program. memory usage is trivial</technical_language>

Target:
protected void run() throws Exception { if (tree == null) throw die(CLIText.get().treeIsRequired); final ArchiveCommand cmd = new ArchiveCommand(db); try { cmd.setTree(tree) .setFormat(format) .setOutputStream(outs).call(); } catch (GitAPIException e) { throw die(e.getMessage()); } finally { cmd.release(); } }
Source:
<code>public void setup() { <START> buffer = (DiskBuffer) new DiskBuffer(BUFFER_DIR, maxEvents); <END> }</code><technical_language>Is this cast necessary</technical_language>

Target:
public void setup() { buffer = new DiskBuffer(BUFFER_DIR, maxEvents); }
Source:
<code>public String placeLimitOrder(LimitOrder order) throws IOException { CoingiPlaceLimitOrderRequest request = new CoingiPlaceLimitOrderRequest() .setCurrencyPair(CoingiAdapters.adaptCurrency(order.getCurrencyPair())) .setOrderType(order.getType().equals(BID) ? 0 : 1) .setPrice(order.getLimitPrice()) .setVolume(order.getRemainingAmount()); String response; <START> try { <END> response = placeCoingiLimitOrder(request).getResult(); } catch (CoingiException e) { throw CoingiErrorAdapter.adapt(e); } return response; }</code><technical_language>try / catch CoingiException hit applied</technical_language>

Target:
public String placeLimitOrder(LimitOrder order) throws IOException { try { CoingiPlaceLimitOrderRequest request = new CoingiPlaceLimitOrderRequest() .setCurrencyPair(CoingiAdapters.adaptCurrency(order.getCurrencyPair())) .setOrderType(order.getType().equals(BID) ? 0 : 1) .setPrice(order.getLimitPrice()) .setVolume(order.getRemainingAmount()); return placeCoingiLimitOrder(request).getResult(); } catch (CoingiException e) { throw CoingiErrorAdapter.adapt(e); } }
Source:
<code>public void switchToTrash() { int flag = 1; <START> Ode.getInstance().getTopToolbar().updateMoveToTrash(flag); <END> hideChaff(); hideTutorials(); ProjectListBox.getProjectListBox().loadTrashList(); currentView = TRASHCAN; projectToolbar.enableStartButton(); projectToolbar.setProjectTabButtonsVisible(false); projectToolbar.setPublishOrUpdateButtonVisible(false); projectToolbar.setTrashTabButtonsVisible(true); }</code><technical_language>need define a flag is hard coded a value</technical_language>

Target:
public void switchToTrash() { Ode.getInstance().getTopToolbar().updateMoveToTrash("Delete From Trash"); hideChaff(); hideTutorials(); ProjectListBox.getProjectListBox().loadTrashList(); currentView = TRASHCAN; projectToolbar.enableStartButton(); projectToolbar.setProjectTabButtonsVisible(false); projectToolbar.setPublishOrUpdateButtonVisible(false); projectToolbar.setTrashTabButtonsVisible(true); }
Source:
<code>public void setUnmodified() { this.modified = false; if (configCurrent != null) { <START> configCurrent.setUnmodified(); <END> } }</code><technical_language>this needs called for configs</technical_language>

Target:
public void setUnmodified() { this.modified = false; getLogisticRegressionConfiguration().setUnmodified(); getNaiveBayesConfiguration().setUnmodified(); getRandomForestConfiguration().setUnmodified(); getSVMConfiguration().setUnmodified(); }
Source:
<code>public void testAdditiveMergeSolvableConflicts_Branch2OnBranch1(Status status, Repository repository, List<IProject> projects, GitTestSupport support) throws Exception { assertFalse(status.hasUncommittedChanges()); assertEquals(0, status.getConflicting().size()); Comparison comparison = support.compare("branch1", "expected", "model.notation"); Collection<Diff> diffs = Collections2.filter(comparison.getDifferences(), <START> Predicates.not(hasDirectOrIndirectConflict(PSEUDO, ConflictKind.REAL))); <END> assertEquals(2, diffs.size()); for (Diff diff : diffs) { assertEquals(DifferenceKind.MOVE, diff.getKind()); } }</code><technical_language>static import REAL, prefix 'ConflictKind.'</technical_language>

Target:
public void testAdditiveMergeSolvableConflicts_Branch2OnBranch1(Status status, Repository repository, List<IProject> projects, GitTestSupport support) throws Exception { assertFalse(status.hasUncommittedChanges()); assertEquals(0, status.getConflicting().size()); Comparison comparison = support.compare("branch1", "expected", "model.notation"); Collection<Diff> diffs = Collections2.filter(comparison.getDifferences(), Predicates.not(hasDirectOrIndirectConflict(PSEUDO, REAL))); assertEquals(2, diffs.size()); for (Diff diff : diffs) { assertEquals(MOVE, diff.getKind()); } }
Source:
<code>public FragmentProto getProto() { FileFragmentProto.Builder builder = FileFragmentProto.newBuilder(); builder.setId(this.tableName); builder.setStartOffset(this.startOffset); builder.setLength(this.length); builder.setPath(this.uri.toString()); if(diskIds != null) { List<Integer> idList = new ArrayList<>(); for(int eachId: diskIds) { idList.add(eachId); } builder.addAllDiskIds(idList); } if(hosts != null) { List inputList = new ArrayList<>(); inputList.addAll(Arrays.asList(hosts)); <START> builder.addAllHosts(inputList); <END> } FragmentProto.Builder fragmentBuilder = FragmentProto.newBuilder(); fragmentBuilder.setId(this.tableName); fragmentBuilder.setDataFormat(BuiltinStorages.TEXT); fragmentBuilder.setContents(builder.buildPartial().toByteString()); return fragmentBuilder.build(); }</code><technical_language>rewritten Arrays.asList()</technical_language>

Target:
public FragmentProto getProto() { FileFragmentProto.Builder builder = FileFragmentProto.newBuilder(); builder.setId(this.tableName); builder.setStartOffset(this.startOffset); builder.setLength(this.length); builder.setPath(this.uri.toString()); if(diskIds != null) { List<Integer> idList = new ArrayList<>(); for(int eachId: diskIds) { idList.add(eachId); } builder.addAllDiskIds(idList); } if(hosts != null) { builder.addAllHosts(Arrays.asList(hosts)); } FragmentProto.Builder fragmentBuilder = FragmentProto.newBuilder(); fragmentBuilder.setId(this.tableName); fragmentBuilder.setDataFormat(BuiltinStorages.TEXT); fragmentBuilder.setContents(builder.buildPartial().toByteString()); return fragmentBuilder.build(); }
Source:
<code>public void setup(){ mainPage = Transporter.driverMainPage(); lead = JSONMapper.getLead("src\\test\\resources\\CreateLeadBase.json"); <START> leadEditEnum = JSONMapper.getLead("src\\test\\resources\\EditLead.json"); <END> Common.createLead(lead); }</code><technical_language>Please for paths "src/test/..." instead of "src\\test\\....."</technical_language>

Target:
public void setup(){ lead = JSONMapper.getLead("src/test/resources/CreateLeadBase.json"); leadEditEnum = JSONMapper.getLead("src/test/resources/EditLead.json"); Common.createLead(lead); }
Source:
<code>public CustodiSoulcaller(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}{W}"); this.subtype.add(SubType.HUMAN); this.subtype.add(SubType.CLERIC); this.power = new MageInt(1); this.toughness = new MageInt(2); this.addAbility(new MeleeAbility()); <START> this.addAbility(new AttacksTriggeredAbility(new CustodiSoulcallerEffect(), false)); <END> }</code><technical_language>This needs choose target ability triggers, resolves. adjustTargets do this</technical_language>

Target:
public CustodiSoulcaller(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}{W}"); this.subtype.add(SubType.HUMAN); this.subtype.add(SubType.CLERIC); this.power = new MageInt(1); this.toughness = new MageInt(2); this.addAbility(new MeleeAbility()); Ability ability = new AttacksTriggeredAbility(new ReturnFromGraveyardToBattlefieldTargetEffect(), false); ability.addWatcher(new CustodiSoulcallerWatcher()); ability.addTarget(new TargetCardInYourGraveyard(new FilterCreatureCard("creature card with converted mana cost X or less from your graveyard, where X is the number of players you attacked with a creature this combat"))); this.addAbility(ability); }
Source:
<code>private void initNetworkInterfaces() { <START> if (networkInterfacesInited) { <END> return; } AsyncQuery getVmNicsQuery = new AsyncQuery(); getVmNicsQuery.asyncCallback = new INewAsyncCallback() { @Override public void onSuccess(Object model, Object result) { List<VmNetworkInterface> nics = (List<VmNetworkInterface>) result; if (nics != null && nics.size() > 0) { initNetworkInterfaces(networkBehavior, nics); } networkInterfacesInited = true; } }; AsyncDataProvider.getVmNicList(getVmNicsQuery, vm.getId()); }</code><technical_language>Is this variable needed? If initNetworkInterfaces() is supposed happen once, call postDataCenterWithClusterSelectedItemChanged() all, a method called (such constructor another init method)</technical_language>

Target:
private void initNetworkInterfaces() { AsyncQuery getVmNicsQuery = new AsyncQuery(); getVmNicsQuery.asyncCallback = new INewAsyncCallback() { @Override public void onSuccess(Object model, Object result) { initNetworkInterfaces(networkBehavior, (List<VmNetworkInterface>) result); } }; AsyncDataProvider.getVmNicList(getVmNicsQuery, vm.getId()); }
Source:
<code>public static void register() { <START> if (!isRegistered) { <END> instance.registerMBean(); isRegistered = true; } }</code><technical_language>add a synchronized block here. If not, is a chance registered multiple times get InstanceAlreadyExistsException</technical_language>

Target:
public synchronized void register() { if (isRegistered) return; try { ObjectName objectName = new ObjectName(trackerName); MBeanServer mBeanServer = ManagementFactory.getPlatformMBeanServer(); if (!mBeanServer.isRegistered(objectName)) { ManagementFactory.getPlatformMBeanServer().registerMBean(instance, objectName); } isRegistered = true; } catch (Exception exc) { log.error("Unable to register mbean for " + instance.getClass().getSimpleName(), exc); } }
Source:
<code>private void generateTaskList() { taskList.clear(); Map map = Maps.newHashMap(); for (Object object : intermediateList) { if (object instanceof StateChange) { map.put(object.getClass(), object); } else { for (Object o : map.values()) { taskList.add(((StateChange) o).generateTask()); } map.clear(); taskList.add(new NodeTask((Node) object)); } } <START> } <END></code><technical_language>Hmmmm... I wrote this method I merits. HOWEVER. =) 1. node list effectively loops beginning (in next frame), some defaults needed. So, node necessary tasks set values defaults redundant state changes required NodeTask executed. 2. This method is capable of eliminating redundant tasks _between_ NodeTasks. However, intermediate list: - bind fbo "bar" - process node ALPHA - bind fbo "display" - bind fbo "bar" - process node BRAVO - bind fbo "display" - bind fbo "bar" - process node CHARLIE - bind fbo "display" redundant "bind fbo display" state changes correctly handled tasks do tasklist. "bind fbo bar" redundant tasks unnecessarily tasklist. So, I need store StateChanges -not- redundant in another map. iterate state changes -not- redundant _between nodes_, need check if redundant state change of subtype stored in map. If redundant state change get task tasklist replaces state change of subtype in map. If is redundant ignored. if want add cherry top (not strictly necessary I think), a redundant back-to-default state change get tasklist get stored "outer" map. Rather, state change of subtype in outer map, if any, removed. This map smaller. If clear "outer map" is this method implementation yet, while "inner map" is generate state change tasks nodes. call "persistingStateChanges" (outer) "intranodesStateChanges"</technical_language>

Target:
private void generateTaskList() { StateChange stateChange; StateChange persistentStateChange; Map persistentStateChanges = Maps.newHashMap(); Map intranodesStateChanges = Maps.newHashMap(); taskList.clear(); for (Object object : intermediateList) { if (object instanceof StateChange) { intranodesStateChanges.put(object.getClass(), object); } else { for (Object preCastStateChange : intranodesStateChanges.values()) { stateChange = (StateChange) preCastStateChange; persistentStateChange = (StateChange) persistentStateChanges.get(stateChange.getClass()); if (persistentStateChange == null) { if (!stateChange.isTheDefaultInstance()) { taskList.add(stateChange.generateTask()); persistentStateChanges.put(stateChange.getClass(), stateChange); } } else { if (stateChange.isTheDefaultInstance()) { taskList.add(stateChange.generateTask()); persistentStateChanges.remove(stateChange.getClass()); } else if (!stateChange.isEqualTo(persistentStateChange)) { taskList.add(stateChange.generateTask()); persistentStateChanges.put(stateChange.getClass(), stateChange); } } } intranodesStateChanges.clear(); taskList.add(((Node) object).generateTask()); } } }
Source:
<code>protected void reportInternal(Span span) { receivedTagCount.update(span.getAnnotations().size()); Integer maxSpanDelay = dropSpansDelayedMinutes.get(); if (maxSpanDelay != null && span.getStartMillis() + span.getDuration() < Clock.now() - TimeUnit.MINUTES.toMillis(maxSpanDelay)) { this.reject(span, "span is older than acceptable delay of " + maxSpanDelay + " minutes"); return; } validateSpan(span, validationConfig, spanLogsHandler.get()::report); if (span.getAnnotations() != null && AnnotationUtils.getValue(span.getAnnotations(), SPAN_SAMPLING_POLICY_TAG) != null) { <START> this.policySampledSpanCounter.inc(1); <END> } final String strSpan = serializer.apply(span); getTask().add(strSpan); getReceivedCounter().inc(); if (validItemsLogger != null) validItemsLogger.info(strSpan); }</code><technical_language>inc()</technical_language>

Target:
protected void reportInternal(Span span) { receivedTagCount.update(span.getAnnotations().size()); Integer maxSpanDelay = dropSpansDelayedMinutes.get(); if (maxSpanDelay != null && span.getStartMillis() + span.getDuration() < Clock.now() - TimeUnit.MINUTES.toMillis(maxSpanDelay)) { this.reject(span, "span is older than acceptable delay of " + maxSpanDelay + " minutes"); return; } validateSpan(span, validationConfig, spanLogsHandler.get()::report); if (span.getAnnotations() != null && AnnotationUtils.getValue(span.getAnnotations(), SPAN_SAMPLING_POLICY_TAG) != null) { this.policySampledSpanCounter.inc(); } final String strSpan = serializer.apply(span); getTask().add(strSpan); getReceivedCounter().inc(); if (validItemsLogger != null) validItemsLogger.info(strSpan); }
Source:
<code>public void appendColumn( final BaseColumn column ) throws MoveColumnVetoException { final MetaData metaData = new BaseColumnSynchronizer.ColumnMetaDataImpl( column ); for ( int i = 0; i < synchronizers.size(); i++ ) { <START> final Synchronizer synchronizer = synchronizers.get( i ); <END> if ( synchronizer.handlesAppend( metaData ) ) { synchronizer.append( metaData ); break; } } eventBus.fireEvent( new AfterColumnInserted() ); }</code><technical_language>@manstis obscure reason this change? a slower iterator a List</technical_language>

Target:
public void appendColumn( final BaseColumn column ) throws MoveColumnVetoException { final MetaData metaData = new BaseColumnSynchronizer.ColumnMetaDataImpl( column ); for ( Synchronizer synchronizer : synchronizers ) { if ( synchronizer.handlesAppend( metaData ) ) { synchronizer.append( metaData ); break; } } eventBus.fireEvent( new AfterColumnInserted() ); }
Source:
<code>public ColumnResizeHandler(Element headerElement, Column<T, ?> column, HasResizableColumns<T> table) { this.headerElement = headerElement; this.column = column; this.table = table; this.eventHandler = Event.addNativePreviewHandler(this); <START> columnAbsoluteLeft = <END> headerElement.getAbsoluteLeft(); table.onResizeStart(column, headerElement); }</code><technical_language>this.columnAbsoluteLeft for consistency</technical_language>

Target:
public ColumnResizeHandler(Element headerElement, Column<T, ?> column, HasResizableColumns<T> table) { this.headerElement = headerElement; this.column = column; this.table = table; this.eventHandler = Event.addNativePreviewHandler(this); this.columnAbsoluteLeft = headerElement.getAbsoluteLeft(); table.onResizeStart(column, headerElement); }
Source:
<code><START> public PrefetchableOrPredicate(Predicate<ChangeData>... that) { <END> super(that); }</code><technical_language>need public</technical_language>

Target:
PrefetchableOrPredicate(Predicate<ChangeData>... that) { super(that); }
Source:
<code>public static GerritTrigger getTrigger(@Nullable Job project) { if (project == null) { return null; } <START> DescribableList<Trigger<?>, TriggerDescriptor> triggers = <END> new DescribableList<Trigger<?>, TriggerDescriptor>(project); for (Trigger p : triggers) { if (GerritTrigger.class.isInstance(p)) { return GerritTrigger.class.cast(p); } } return null; }</code><technical_language>ParameterizedJobMixing.ParameterizedJob a getTriggers() method</technical_language>

Target:
public static GerritTrigger getTrigger(@Nullable Job project) { if (project == null) { return null; } if (project instanceof ParameterizedJob) { ParameterizedJob parameterizedJob = (ParameterizedJob)project; for (Trigger p : parameterizedJob.getTriggers().values()) { if (GerritTrigger.class.isInstance(p)) { return GerritTrigger.class.cast(p); } } } return null; }
Source:
<code>public void testJsonContents() throws Exception { JsonElement json = HttpValueFunctions.jsonContents().apply(response); assertTrue(json.isJsonObject()); <START> assertEquals(json.getAsJsonObject().entrySet(), ImmutableMap.of("mykey", new JsonPrimitive("myvalue")).entrySet()); <END> }</code><technical_language>Nitpick: promote magic literals fields, construct body field reference them</technical_language>

Target:
public void testJsonContents() throws Exception { JsonElement json = HttpValueFunctions.jsonContents().apply(response); assertTrue(json.isJsonObject()); assertEquals(json.getAsJsonObject().entrySet(), ImmutableMap.of(bodyKey, new JsonPrimitive(bodyVal)).entrySet()); }
Source:
<code>protected void executeVmCommand() { <START> setVmName(getVmStaticDAO().get(getParameters().getVmId()).getName()); <END> VmNic iface = getVmNicDao().get(getParameters().getInterfaceId()); if (iface != null) { new ExternalNetworkManager(iface).deallocateIfExternal(); getMacPoolForVmNic(iface).freeMac(iface.getMacAddress()); interfaceName = iface.getName(); String interType = VmInterfaceType.forValue(iface.getType()).getDescription(); if (interType != null) { addCustomValue("InterfaceType", interType); } } TransactionSupport.executeInNewTransaction(new TransactionMethod<Void>() { @Override public Void runInTransaction() { getVmNicDao().remove(getParameters().getInterfaceId()); getDbFacade().getVmNetworkStatisticsDao().remove(getParameters().getInterfaceId()); getDbFacade().getVmDeviceDao().remove(new VmDeviceId(getParameters().getInterfaceId(), getParameters().getVmId())); setSucceeded(true); return null; } }); }</code><technical_language>a nice change, unrelated this patch in a separate one</technical_language>

Target:
protected void executeVmCommand() { this.setVmName(getVmStaticDAO().get(getParameters().getVmId()).getName()); VmNic iface = getVmNicDao().get(getParameters().getInterfaceId()); if (iface != null) { interfaceName = iface.getName(); String interType = VmInterfaceType.forValue(iface.getType()).getDescription(); if (interType != null) { addCustomValue("InterfaceType", interType); } new ExternalNetworkManager(iface).deallocateIfExternal(); getMacPool().freeMac(iface.getMacAddress()); } TransactionSupport.executeInNewTransaction(new TransactionMethod<Void>() { @Override public Void runInTransaction() { getVmNicDao().remove(getParameters().getInterfaceId()); getDbFacade().getVmNetworkStatisticsDao().remove(getParameters().getInterfaceId()); getDbFacade().getVmDeviceDao().remove(new VmDeviceId(getParameters().getInterfaceId(), getParameters().getVmId())); setSucceeded(true); return null; } }); }