Buggy code:
public class MyDouble extends ValidExpression implements NumberValue , Comparable < Object > { private double val ; private boolean isAngle = false ; protected Kernel kernel ; public static double LARGEST_INTEGER = 9.007199254740992E15 ; public MyDouble ( Kernel kernel ) { } public MyDouble ( Kernel kernel , double x ) { } public MyDouble ( MyDouble d ) { } public MyDouble ( Kernel kernel , String power ) { } public ExpressionValue deepCopy ( Kernel kernel ) { } public final void set ( double x ) { } public void resolveVariables ( ) { } @ Override public String toString ( ) { } public final String toValueString ( ) { } public final String toLaTeXString ( boolean symbolic ) { } public void setAngle ( ) { } public boolean isAngle ( ) { } public final MyDouble random ( ) { } public static final void add ( MyDouble a , MyDouble b , MyDouble c ) { } public static final void sub ( MyDouble a , MyDouble b , MyDouble c ) { } public static final void mult ( MyDouble a , MyDouble b , MyDouble c ) { } public static final void mult ( MyDouble a , double b , MyDouble c ) { } public static final void div ( MyDouble a , MyDouble b , MyDouble c ) { } public static final void pow ( MyDouble a , MyDouble b , MyDouble c ) { } public final MyDouble cos ( ) { } public final MyDouble sin ( ) { } private void checkZero ( ) { } public final MyDouble tan ( ) { } public final MyDouble acos ( ) { } public final MyDouble asin ( ) { } public final MyDouble atan ( ) { } public final MyDouble atan2 ( NumberValue y ) { } public final MyDouble log ( ) { } public final MyDouble log ( NumberValue base ) { } public final MyDouble erf ( ) { } public final MyDouble polygamma ( NumberValue order ) { } public final MyDouble psi ( ) { } public final MyDouble log10 ( ) { } public final MyDouble log2 ( ) { } public final MyDouble exp ( ) { } public final MyDouble sqrt ( ) { } public final MyDouble cbrt ( ) { } public final MyDouble abs ( ) { } public final MyDouble floor ( ) { } public final MyDouble ceil ( ) { } public final MyDouble round ( ) { } public static final double round ( double x ) { } public final MyDouble sgn ( ) { } public final MyDouble cosh ( ) { } public final MyDouble sinh ( ) { } public final MyDouble tanh ( ) { } public final MyDouble acosh ( ) { } public final MyDouble asinh ( ) { } public final MyDouble csc ( ) { } public final MyDouble sec ( ) { } public final MyDouble cot ( ) { } public final MyDouble csch ( ) { } public final MyDouble sech ( ) { } public final MyDouble coth ( ) { } public final MyDouble atanh ( ) { } public final MyDouble factorial ( ) { } public final MyDouble gamma ( ) { } public final MyDouble apply ( Evaluatable lt ) { } public final MyDouble getNumber ( ) { } public boolean isConstant ( ) { } public final HashSet < GeoElement > getVariables ( ) { } public final boolean isLeaf ( ) { } public final ExpressionValue evaluate ( ) { } public final double getDouble ( ) { } public final GeoElement toGeoElement ( ) { <START_BUG> GeoNumeric num = new GeoNumeric ( kernel . getConstruction ( ) ) ; <END_BUG> return num ; } public boolean isNumberValue ( ) { } public boolean isVectorValue ( ) { } public boolean isBooleanValue ( ) { } public boolean isPolynomialInstance ( ) { } public boolean isTextValue ( ) { } public final boolean isExpressionNode ( ) { } public boolean isListValue ( ) { } public final boolean contains ( ExpressionValue ev ) { } public boolean isVector3DValue ( ) { } public static double parsePercentage ( String str ) { } private static StringBuilder sb = new StringBuilder ( ) ; public static double parseDouble ( String str ) { } public ExpressionValue gammaIncompleteRegularized ( NumberValue lt ) { } public ExpressionValue gammaIncomplete ( NumberValue lt ) { } public ExpressionValue beta ( NumberValue lt ) { } public ExpressionValue betaIncomplete ( VectorValue lt ) { } public ExpressionValue betaIncompleteRegularized ( VectorValue lt ) { } public String toOutputValueString ( ) { } public Kernel getKernel ( ) { } public int compareTo ( Object arg0 ) { } @ Override public boolean equals ( Object d ) { } @ Override public int hashCode ( ) { } public ArrayList < GeoNumeric > getSpreadsheetTraceList ( ) { } public ArrayList < String > getColumnHeadings ( ) { } }

Fix:
GeoNumeric num = new GeoNumeric ( kernel . getConstruction ( ) , val ) ;