GEGrammar extends ContextFreeGrammar implements ParameterI { @Override public int hashCode() { if (name != null) { return name.hashCode(); } return 0; } GEGrammar();  GEGrammar(String file);  GEGrammar(StringBuilder bnfGrammar);  GEGrammar(Properties p);  GEGrammar(GEGrammar copy); void setProperties(Properties p); void setProperties(Properties p, boolean reloadFromFile); boolean genotype2Phenotype(); boolean phenotype2Genotype(); void generatePRC(); void clear(); @SuppressWarnings({"UnusedAssignment"}) boolean genotype2Phenotype(boolean b); static GEGrammar getGrammar(final GEGrammar g); int getMaxCurrentTreeDepth(); void setMaxCurrentTreeDepth(int maxCurrentTreeDepth); int getMaxWraps(); void setMaxWraps(int i); void setGenotype(GEChromosome genotype); void setPhenotype(Phenotype phenotype); Phenotype getPhenotype(); GEChromosome getGenotype(); void setPhenotype(Object p); void setGenotype(Object g); int getUsedCodons(); int getUsedWraps(); int getMaxDerivationTreeDepth(); void setMaxDerivationTreeDepth(int maxDerivationTreeDepth); void setDerivationTree(DerivationTree dT); DerivationTree getDerivationTree(); int getMaxChromosomeLengthByDepth(); String getName(); @Override boolean equals(Object obj); @Override int hashCode(); int getDTNodeCount(); void setDerivationTreeType(String derivationTreeType); @Override String getDerivationString();  }
@Test public void testHashCode() { System.out.println("* GEGrammarTest: hashCode"); GEGrammar instance = new GEGrammar(); int expResult = 0; int result = instance.hashCode(); assertEquals(expResult, result); geg.genotype2Phenotype(true); assertEquals(1126371036, geg.hashCode()); }