@SuppressWarnings("unused")
	private boolean fixGateways(Graph<Vertex,Edge> g) {
		int openAND = 0;
		int closeAND = 0;
		boolean result = true;
		for(Vertex v: g.vertexSet()){
			// Count number of gateways first
			if(v.type ==  GraphLoader.ParallelGateway){
				if(g.inDegreeOf(v) > 1) closeAND++;
				if(g.outDegreeOf(v) > 1) openAND++;
			}
		}
		String msg = "";
		if(openAND == closeAND){
			msg = "gateway count matches";
			// Add corresponding gates
			fixCorrespondingGates(g);
		}else{
			msg = "gateway count mismatch";

			if(closeAND < openAND)
				msg += " ; less closing AND gates than opening AND gates";
			else
				msg += " ; more closing AND gates than opening AND gates";
			fixLessCloseGates(g);
		}
		if(__DEBUG && false)	a.e.println("msg:" + msg);	// This is for detailed debugging only
		if(++NumberFixed < MAX_TIMES_TRY_FIX) fixGateways(g);
		return result;
	}