Source:
<code>public BooleanWrapper removeNodeSource(String sourceName, boolean preempt) { NodeSource removedNodeSource; if (deployedNodeSources.containsKey(sourceName)) { removedNodeSource = deployedNodeSources.get(sourceName); caller.checkPermission(removedNodeSource.getAdminPermission(), caller + " is not authorized to remove " + sourceName); logger.info(caller + " requested removal of node source " + sourceName); removeAllNodes(sourceName, preempt); removedNodeSource.shutdown(caller); dbManager.removeNodeSource(sourceName); return new BooleanWrapper(true); } else if (undeployedNodeSources.containsKey(sourceName)) { <START> removedNodeSource = undeployedNodeSources.remove(sourceName); <END> caller.checkPermission(removedNodeSource.getAdminPermission(), caller + " is not authorized to remove " + sourceName); logger.info(caller + " requested removal of undeployed node source " + sourceName); dbManager.removeNodeSource(sourceName); this.monitoring.nodeSourceEvent(new RMNodeSourceEvent(RMEventType.NODESOURCE_REMOVED, caller.getName(), removedNodeSource.getName(), removedNodeSource.getDescription(), removedNodeSource.getAdministrator().getName(), removedNodeSource.getDescriptor() .getStatus() .toString())); return new BooleanWrapper(true); } else { throw new IllegalArgumentException("Unknown node source " + sourceName); } }</code><technical_language>undeployedNodeSources is a variable class. remember add this. access class variables. easier understand in github scope accessing. question: Is undeployedNodeSources.remove(sourceName); exit method (Because throws exception) caller.checkPermission(removedNodeSource.getAdminPermission(), caller + " is authorized remove " + sourceName); I imagine, removedNodeSource = undeployedNodeSources.remove(sourceName); dbManager.removeNodeSource(sourceName); executed none</technical_language>

Target:
public BooleanWrapper removeNodeSource(String sourceName, boolean preempt) { NodeSource nodeSourceToRemove; if (this.deployedNodeSources.containsKey(sourceName)) { nodeSourceToRemove = this.deployedNodeSources.get(sourceName); caller.checkPermission(nodeSourceToRemove.getAdminPermission(), caller + " is not authorized to remove " + sourceName); logger.info(caller + " requested removal of node source " + sourceName); removeAllNodes(sourceName, preempt); nodeSourceToRemove.shutdown(caller); dbManager.removeNodeSource(sourceName); return new BooleanWrapper(true); } else if (this.undeployedNodeSources.containsKey(sourceName)) { nodeSourceToRemove = this.undeployedNodeSources.get(sourceName); caller.checkPermission(nodeSourceToRemove.getAdminPermission(), caller + " is not authorized to remove " + sourceName); logger.info(caller + " requested removal of undeployed node source " + sourceName); this.undeployedNodeSources.remove(sourceName); dbManager.removeNodeSource(sourceName); this.monitoring.nodeSourceEvent(new RMNodeSourceEvent(RMEventType.NODESOURCE_REMOVED, caller.getName(), nodeSourceToRemove.getName(), nodeSourceToRemove.getDescription(), nodeSourceToRemove.getAdministrator().getName(), nodeSourceToRemove.getDescriptor() .getStatus() .toString())); return new BooleanWrapper(true); } else { throw new IllegalArgumentException("Unknown node source " + sourceName); } }