Remove a {@link FlowEdge} from the {@link FlowGraph}. The method uses {@link FlowEdgeFactory}
to construct the edgeId of the {@link FlowEdge} from the config file and uses it to delete the associated
{@link FlowEdge}.
@param change
325093
private void removeFlowEdge(DiffEntry change) {
    if (checkFilePath(change.getOldPath(), EDGE_FILE_DEPTH)) {
      Path edgeFilePath = new Path(this.repositoryDir, change.getOldPath());
      try {
        Config config = getEdgeConfigWithOverrides(ConfigFactory.empty(), edgeFilePath);
        String edgeId = config.getString(FlowGraphConfigurationKeys.FLOW_EDGE_ID_KEY);
        if (!this.flowGraph.deleteFlowEdge(edgeId)) {
          log.warn("Could not remove edge {} from FlowGraph; skipping", edgeId);
        } else {
          log.info("Removed edge {} from FlowGraph", edgeId);
        }
      } catch (Exception e) {
        log.warn("Could not remove edge defined in {} due to exception {}", edgeFilePath, e.getMessage());
      }
    }
  }
420352
public void remove(int from, int to) throws ContradictionException {
		gV.removeArc(from, to, this);
		if (firstPropag) {
			g.removeEdge(from, to);
		}
	}
776013
private IEdge removeEdgeOnVertexDelete(UUID edgeId) throws BitsyException {
        // This is called from remove on adjMap, which means that the edge was added in this Tx
        BitsyEdge edge = changedEdges.remove(edgeId);
        
        // Only an edge that is present in this Tx can be removed by the IEdgeRemover
        assert (edge != null);
        
        return edge;
    }
109989
private void addFlowEdge(DiffEntry change) {
    if (checkFilePath(change.getNewPath(), EDGE_FILE_DEPTH)) {
      Path edgeFilePath = new Path(this.repositoryDir, change.getNewPath());
      try {
        Config edgeConfig = loadEdgeFileWithOverrides(edgeFilePath);
        List<SpecExecutor> specExecutors = getSpecExecutors(edgeConfig);
        Class flowEdgeFactoryClass = Class.forName(ConfigUtils.getString(edgeConfig, FlowGraphConfigurationKeys.FLOW_EDGE_FACTORY_CLASS,
            FlowGraphConfigurationKeys.DEFAULT_FLOW_EDGE_FACTORY_CLASS));
        FlowEdgeFactory flowEdgeFactory = (FlowEdgeFactory) GobblinConstructorUtils.invokeLongestConstructor(flowEdgeFactoryClass, edgeConfig);
        if (flowCatalog.isPresent()) {
          FlowEdge edge = flowEdgeFactory.createFlowEdge(edgeConfig, flowCatalog.get(), specExecutors);
          if (!this.flowGraph.addFlowEdge(edge)) {
            log.warn("Could not add edge {} to FlowGraph; skipping", edge.getId());
          } else {
            log.info("Added edge {} to FlowGraph", edge.getId());
          }
        } else {
          log.warn("Could not add edge defined in {} to FlowGraph as FlowCatalog is absent", change.getNewPath());
        }
      } catch (Exception e) {
        log.warn("Could not add edge defined in {} due to exception {}", change.getNewPath(), e.getMessage());
      }
    }
  }
1327645
public void removeLayer(Layer layer) {
		if (layers.contains(layer)) {
			layers.remove(layer);
			mapInfo.getLayers().remove(layer.getLayerInfo());
			handlerManager.fireEvent(new MapModelChangedEvent(this));
		}
	}
268652
protected void deleteTypeVertex(AtlasVertex instanceVertex, boolean force) throws AtlasBaseException {
        LOG.debug("Deleting {}", string(instanceVertex));
        String typeName = GraphHelper.getTypeName(instanceVertex);


        AtlasType parentType = typeRegistry.getType(typeName);

        if (parentType instanceof AtlasStructType) {
            AtlasStructType structType   = (AtlasStructType) parentType;
            boolean         isEntityType = (parentType instanceof AtlasEntityType);

            for (AtlasStructType.AtlasAttribute attributeInfo : structType.getAllAttributes().values()) {
                LOG.debug("Deleting attribute {} for {}", attributeInfo.getName(), string(instanceVertex));
                boolean isOwned = isEntityType && attributeInfo.isOwnedRef();

                AtlasType attrType = attributeInfo.getAttributeType();

                String edgeLabel = AtlasGraphUtilsV1.getAttributeEdgeLabel(structType, attributeInfo.getName());

                switch (attrType.getTypeCategory()) {
                case OBJECT_ID_TYPE:
                    //If its class attribute, delete the reference
                    deleteEdgeReference(instanceVertex, edgeLabel, attrType.getTypeCategory(), isOwned);
                    break;

                case STRUCT:
                    //If its struct attribute, delete the reference
                    deleteEdgeReference(instanceVertex, edgeLabel, attrType.getTypeCategory(), false);
                    break;

                case ARRAY:
                    //For array attribute, if the element is struct/class, delete all the references
                    AtlasArrayType arrType = (AtlasArrayType) attrType;
                    AtlasType elemType = arrType.getElementType();
                    if (AtlasGraphUtilsV1.isReference(elemType.getTypeCategory())) {
                        Iterator<AtlasEdge> edges = graphHelper.getOutGoingEdgesByLabel(instanceVertex, edgeLabel);
                        if (edges != null) {
                            while (edges.hasNext()) {
                                AtlasEdge edge = edges.next();
                                deleteEdgeReference(edge, elemType.getTypeCategory(), isOwned, false);
                            }
                        }
                    }
                    break;

                case MAP:
                    //For map attribute, if the value type is struct/class, delete all the references
                    AtlasMapType mapType = (AtlasMapType) attrType;
                    AtlasType keyType = mapType.getKeyType();
                    TypeCategory valueTypeCategory = mapType.getValueType().getTypeCategory();
                    String propertyName = AtlasGraphUtilsV1.getQualifiedAttributePropertyKey(structType, attributeInfo.getName());

                    if (AtlasGraphUtilsV1.isReference(valueTypeCategory)) {
                        List<Object> keys = EntityGraphMapper.getArrayElementsProperty(keyType, instanceVertex, propertyName);
                        if (keys != null) {
                            for (Object key : keys) {
                                String mapEdgeLabel = GraphHelper.getQualifiedNameForMapKey(edgeLabel, (String) key);
                                deleteEdgeReference(instanceVertex, mapEdgeLabel, valueTypeCategory, isOwned);
                            }
                        }
                    }
                }
            }
        }

        deleteVertex(instanceVertex, force);
    }
668827
@Override
    public void removeEdge(Edge edge) {
        super.removeEdge(edge);

        // Keep track of removed edges.
        if (removedEdgeList == null) {
            removedEdgeList = new LinkedList<>();
        }
        removedEdgeList.add(edge);
    }
1135818
public static void removeDeepPropertyChangeListener(
        Object object, PropertyChangeListener propertyChangeListener)
    {
        Objects.requireNonNull(object, "The object may not be null");
        Objects.requireNonNull(propertyChangeListener, 
            "The propertyChangeListener may not be null");
        removeRecursive(object, propertyChangeListener);
    }
709048
public void removeSelectionChangedListener(
			ISelectionChangedListener listener)
	{
		if (fOutlineViewer != null)
		{
			fOutlineViewer.removeSelectionChangedListener(listener);
		} else
		{
			fSelectionChangedListeners.remove(listener);
		}
	}
962765
public static void deleteNode(Node n, AbstractCompiler compiler) {
    Node parent = n.getParent();
    NodeUtil.markFunctionsDeleted(n, compiler);
    n.detach();
    compiler.reportChangeToEnclosingScope(parent);
  }
756905
public synchronized boolean removeChangeListener(ChangeListener listener) {
        if (bEnableListener && listener != null) {
            eventSource.removeListener(listener);
            return true;
        }
        return false;
    }
437271
public void removeNode(N node)
    {
        Pair<HashSet<N>, HashSet<N>> p = nodes.remove(node);
        if(p == null)
            return;
        //Outgoing edges we can ignore removint he node drops them. We need to avoid dangling incoming edges to this node we have removed
        HashSet<N> incomingNodes = p.getIncoming();
        for(N incomingNode : incomingNodes)
            nodes.get(incomingNode).getOutgoing().remove(node);
    }
998516
public static final void removeTxn(Xid xid)
    {
        if (tc.isEntryEnabled()) Tr.entry(tc, "removeTxn", xid);

        final ByteArray key = new ByteArray(xid.getGlobalTransactionId());

        final JCATranWrapper wrapper;

        synchronized (txnTable)
        {
            wrapper = txnTable.remove(key);
        }

        if (tc.isEntryEnabled()) Tr.exit(tc, "removeTxn", wrapper);
    }
1160344
public UpdateResponse deleteFlowConfig(FlowId flowId, Properties header, boolean triggerListener) throws FlowConfigLoggedException {

    log.info("[GAAS-REST] Delete called with flowGroup {} flowName {}", flowId.getFlowGroup(), flowId.getFlowName());
    URI flowUri = null;

    try {
      flowUri = FlowUriUtils.createFlowSpecUri(flowId);
      this.flowCatalog.remove(flowUri, header, triggerListener);
      return new UpdateResponse(HttpStatus.S_200_OK);
    } catch (URISyntaxException e) {
      throw new FlowConfigLoggedException(HttpStatus.S_400_BAD_REQUEST, "bad URI " + flowUri, e);
    }
  }
1345916
public void deletePipeline(String pipelineName) {
        DeletePipelineRequest request = new DeletePipelineRequest();
        request.setPipelineName(pipelineName);
        deletePipeline(request);
    }
689795
@Override
  public void removeChange(DiffEntry change) {
    if (checkConfigFilePath(change.getOldPath())) {
      Path configFilePath = new Path(this.repositoryDir, change.getOldPath());
      String flowName = FSSpecStore.getSpecName(configFilePath);
      String flowGroup = FSSpecStore.getSpecGroup(configFilePath);

      // build a dummy config to get the proper URI for delete
      Config dummyConfig = ConfigBuilder.create()
          .addPrimitive(ConfigurationKeys.FLOW_GROUP_KEY, flowGroup)
          .addPrimitive(ConfigurationKeys.FLOW_NAME_KEY, flowName)
          .build();

      FlowSpec spec = FlowSpec.builder()
          .withConfig(dummyConfig)
          .withVersion(SPEC_VERSION)
          .withDescription(SPEC_DESCRIPTION)
          .build();

        this.flowCatalog.remove(spec.getUri());
    }
  }
116921
private void tryRemoveDeadAssignments(NodeTraversal t,
      ControlFlowGraph<Node> cfg,
      Map<String, Var> allVarsInFn) {
    Iterable<DiGraphNode<Node, Branch>> nodes = cfg.getDirectedGraphNodes();

    for (DiGraphNode<Node, Branch> cfgNode : nodes) {
      FlowState<LiveVariableLattice> state =
          cfgNode.getAnnotation();
      Node n = cfgNode.getValue();
      if (n == null) {
        continue;
      }
      switch (n.getToken()) {
        case IF:
        case WHILE:
        case DO:
          tryRemoveAssignment(t, NodeUtil.getConditionExpression(n), state, allVarsInFn);
          continue;
        case FOR:
        case FOR_IN:
        case FOR_OF:
        case FOR_AWAIT_OF:
          if (n.isVanillaFor()) {
            tryRemoveAssignment(t, NodeUtil.getConditionExpression(n), state, allVarsInFn);
          }
          continue;
        case SWITCH:
        case CASE:
        case RETURN:
          if (n.hasChildren()) {
            tryRemoveAssignment(t, n.getFirstChild(), state, allVarsInFn);
          }
          continue;
          // TODO(user): case VAR: Remove var a=1;a=2;.....
        default:
          break;
      }

      tryRemoveAssignment(t, n, state, allVarsInFn);
    }
  }