Buggy code:
public class Clinit extends AbstractMethodDeclaration { public static final char [ ] ConstantPoolName = "<clinit>" . toCharArray ( ) ; private FieldBinding assertionSyntheticFieldBinding = null ; private FieldBinding classLiteralSyntheticField = null ; public Clinit ( ) { } public void analyseCode ( ClassScope classScope , InitializationFlowContext staticInitializerFlowContext , FlowInfo flowInfo ) { } public void generateCode ( ClassScope classScope , ClassFile classFile ) { } private void generateCode ( ClassScope classScope , ClassFile classFile , int clinitOffset ) { ConstantPool constantPool = classFile . constantPool ; int constantPoolOffset = constantPool . currentOffset ; int constantPoolIndex = constantPool . currentIndex ; classFile . generateMethodInfoHeaderForClinit ( ) ; int codeAttributeOffset = classFile . contentsOffset ; classFile . generateCodeAttributeHeader ( ) ; CodeStream codeStream = classFile . codeStream ; this . resolve ( classScope ) ; codeStream . reset ( this , classFile ) ; TypeDeclaration declaringType = classScope . referenceContext ; scope . computeLocalVariablePositions ( 0 , codeStream ) ; MethodScope staticInitializerScope = declaringType . staticInitializerScope ; staticInitializerScope . computeLocalVariablePositions ( 0 , codeStream ) ; if ( ( this . assertionSyntheticFieldBinding ) != null ) { codeStream . generateClassLiteralAccessForType ( classScope . enclosingSourceType ( ) , classLiteralSyntheticField ) ; codeStream . invokeJavaLangClassDesiredAssertionStatus ( ) ; Label falseLabel = new Label ( codeStream ) ; codeStream . ifne ( falseLabel ) ; codeStream . iconst_1 ( ) ; Label jumpLabel = new Label ( codeStream ) ; codeStream . goto_ ( jumpLabel ) ; falseLabel . place ( ) ; codeStream . iconst_0 ( ) ; jumpLabel . place ( ) ; codeStream . putstatic ( this . assertionSyntheticFieldBinding ) ; } if ( ( declaringType . fields ) != null ) { for ( int i = 0 , max = declaringType . fields . length ; i < max ; i ++ ) { FieldDeclaration fieldDecl ; if ( ( fieldDecl = declaringType . fields [ i ] ) . isStatic ( ) ) { fieldDecl . generateCode ( staticInitializerScope , codeStream ) ; } } } if ( ( codeStream . position ) == 0 ) { classFile . contentsOffset = clinitOffset ; ( classFile . methodCount ) -- ; constantPool . resetForClinit ( constantPoolIndex , constantPoolOffset ) ; } else { if ( needFreeReturn ) { int oldPosition = codeStream . position ; codeStream . return_ ( ) ; codeStream . updateLocalVariablesAttribute ( oldPosition ) ; } <START_BUG> codeStream . recordPositionsFrom ( 0 , declaringType ) ; <END_BUG> classFile . completeCodeAttributeForClinit ( codeAttributeOffset ) ; } } public boolean isClinit ( ) { } public boolean isInitializationMethod ( ) { } public boolean isStatic ( ) { } public void parseStatements ( Parser parser , CompilationUnitDeclaration unit ) { } public void resolve ( ClassScope scope ) { } public String toString ( int tab ) { } public void traverse ( IAbstractSyntaxTreeVisitor visitor , ClassScope classScope ) { } public void addSupportForAssertion ( FieldBinding assertionSyntheticFieldBinding ) { } }

Fix:
codeStream . recordPositionsFrom ( 0 , declaringType . sourceStart ) ;