Buggy code:
public class TypeDeclaration extends AbstractTypeDeclaration { public static final ChildPropertyDescriptor JAVADOC_PROPERTY = BodyDeclaration . internalJavadocPropertyFactory ( TypeDeclaration . class ) ; public static final SimplePropertyDescriptor MODIFIERS_PROPERTY = BodyDeclaration . internalModifiersPropertyFactory ( TypeDeclaration . class ) ; public static final ChildListPropertyDescriptor MODIFIERS2_PROPERTY = BodyDeclaration . internalModifiers2PropertyFactory ( TypeDeclaration . class ) ; public static final SimplePropertyDescriptor INTERFACE_PROPERTY = new SimplePropertyDescriptor ( TypeDeclaration . class , "interface" , boolean . class , ASTNode . MANDATORY ) ; public static final ChildPropertyDescriptor NAME_PROPERTY = AbstractTypeDeclaration . internalNamePropertyFactory ( TypeDeclaration . class ) ; public static final ChildPropertyDescriptor SUPERCLASS_PROPERTY = new ChildPropertyDescriptor ( TypeDeclaration . class , "superclass" , Name . class , ASTNode . OPTIONAL , ASTNode . NO_CYCLE_RISK ) ; public static final ChildListPropertyDescriptor SUPER_INTERFACES_PROPERTY = new ChildListPropertyDescriptor ( TypeDeclaration . class , "superInterfaces" , Name . class , ASTNode . NO_CYCLE_RISK ) ; public static final ChildPropertyDescriptor SUPERCLASS_TYPE_PROPERTY = new ChildPropertyDescriptor ( TypeDeclaration . class , "superclassType" , Type . class , ASTNode . OPTIONAL , ASTNode . NO_CYCLE_RISK ) ; public static final ChildListPropertyDescriptor SUPER_INTERFACE_TYPES_PROPERTY = new ChildListPropertyDescriptor ( TypeDeclaration . class , "superInterfaceTypes" , Type . class , ASTNode . NO_CYCLE_RISK ) ; public static final ChildListPropertyDescriptor TYPE_PARAMETERS_PROPERTY = new ChildListPropertyDescriptor ( TypeDeclaration . class , "typeParameters" , TypeParameter . class , ASTNode . NO_CYCLE_RISK ) ; public static final ChildListPropertyDescriptor BODY_DECLARATIONS_PROPERTY = AbstractTypeDeclaration . internalBodyDeclarationPropertyFactory ( TypeDeclaration . class ) ; private static final List PROPERTY_DESCRIPTORS_2_0 ; private static final List PROPERTY_DESCRIPTORS_3_0 ; public static List propertyDescriptors ( int apiLevel ) { } private boolean isInterface = false ; private ASTNode . NodeList typeParameters = null ; private Name optionalSuperclassName = null ; private ASTNode . NodeList superInterfaceNames = null ; private Type optionalSuperclassType = null ; private ASTNode . NodeList superInterfaceTypes = null ; TypeDeclaration ( AST ast ) { } final List internalStructuralPropertiesForType ( int apiLevel ) { } final int internalGetSetIntProperty ( SimplePropertyDescriptor property , boolean get , int value ) { } final boolean internalGetSetBooleanProperty ( SimplePropertyDescriptor property , boolean get , boolean value ) { } final ASTNode internalGetSetChildProperty ( ChildPropertyDescriptor property , boolean get , ASTNode child ) { } final List internalGetChildListProperty ( ChildListPropertyDescriptor property ) { } final ChildPropertyDescriptor internalJavadocProperty ( ) { } final ChildListPropertyDescriptor internalModifiers2Property ( ) { } final SimplePropertyDescriptor internalModifiersProperty ( ) { } final ChildPropertyDescriptor internalNameProperty ( ) { } final ChildListPropertyDescriptor internalBodyDeclarationsProperty ( ) { } final int getNodeType0 ( ) { } ASTNode clone0 ( AST target ) { TypeDeclaration result = new TypeDeclaration ( target ) ; <START_BUG> result . setSourceRange ( this . getStartPosition ( ) , this . getLength ( ) ) ; <END_BUG> result . setJavadoc ( ( ( Javadoc ) ( ASTNode . copySubtree ( target , getJavadoc ( ) ) ) ) ) ; if ( ( this . ast . apiLevel ) == ( AST . JLS2_INTERNAL ) ) { result . internalSetModifiers ( getModifiers ( ) ) ; result . setSuperclass ( ( ( Name ) ( ASTNode . copySubtree ( target , getSuperclass ( ) ) ) ) ) ; result . superInterfaces ( ) . addAll ( ASTNode . copySubtrees ( target , superInterfaces ( ) ) ) ; } result . setInterface ( isInterface ( ) ) ; result . setName ( ( ( SimpleName ) ( getName ( ) . clone ( target ) ) ) ) ; if ( ( this . ast . apiLevel ) >= ( AST . JLS3 ) ) { result . modifiers ( ) . addAll ( ASTNode . copySubtrees ( target , modifiers ( ) ) ) ; result . typeParameters ( ) . addAll ( ASTNode . copySubtrees ( target , typeParameters ( ) ) ) ; result . setSuperclassType ( ( ( Type ) ( ASTNode . copySubtree ( target , getSuperclassType ( ) ) ) ) ) ; result . superInterfaceTypes ( ) . addAll ( ASTNode . copySubtrees ( target , superInterfaceTypes ( ) ) ) ; } result . bodyDeclarations ( ) . addAll ( ASTNode . copySubtrees ( target , bodyDeclarations ( ) ) ) ; return result ; } final boolean subtreeMatch0 ( ASTMatcher matcher , Object other ) { } void accept0 ( ASTVisitor visitor ) { } public boolean isInterface ( ) { } public void setInterface ( boolean isInterface ) { } public List typeParameters ( ) { } public Name getSuperclass ( ) { } final Name internalGetSuperclass ( ) { } public Type getSuperclassType ( ) { } public void setSuperclass ( Name superclassName ) { } final void internalSetSuperclass ( Name superclassName ) { } public void setSuperclassType ( Type superclassType ) { } public List superInterfaces ( ) { } final List internalSuperInterfaces ( ) { } public List superInterfaceTypes ( ) { } public FieldDeclaration [ ] getFields ( ) { } public MethodDeclaration [ ] getMethods ( ) { } public TypeDeclaration [ ] getTypes ( ) { } ITypeBinding internalResolveBinding ( ) { } int memSize ( ) { } int treeSize ( ) { } }

Fix:
result . setSourceRange ( getStartPosition ( ) , getLength ( ) ) ;