private static void loadStubs(NodeList stubs, BlockGenus genus) {
        Pattern attrExtractor = Pattern.compile("\"(.*)\"");
        Matcher nameMatcher;
        Node stub;
        String stubGenus = "";
        for (int m = 0; m < stubs.getLength(); m++) {
            stub = stubs.item(m);
            if (stub.getNodeName().equals("Stub")) {
                if (stub.getAttributes().getLength() > 0) {
                    nameMatcher = attrExtractor.matcher(stub.getAttributes().getNamedItem("stub-genus").toString());
                    if (nameMatcher.find()) {
                        stubGenus = nameMatcher.group(1);
                    }
                    if (stub.hasChildNodes()) {
                        //this stub for this genus deviates from generic stub
                        //generate genus by copying one of generic ones

                        BlockGenus newStubGenus = new BlockGenus(genus.env, stubGenus, stubGenus + genus.genusName);
                        //load unique stub genus properties
                        NodeList stubChildren = stub.getChildNodes();
                        for (int n = 0; n < stubChildren.getLength(); n++) {
                            Node stubChild = stubChildren.item(n);
                            if (stubChild.getNodeName().equals("LangSpecProperties")) {
                                loadLangDefProperties(stubChild.getChildNodes(), newStubGenus);
                            }
                        }
                        genus.env.addBlockGenus(newStubGenus);
                        genus.stubList.add(newStubGenus.genusName);
                    } else {
                        //not a unique stub, add generic stub
                        genus.stubList.add(stubGenus);
                    }
                }
            }
        }
    }