Buggy code:
public class CodegenUtil { private CodegenUtil ( ) { } static boolean isErasedAttribute ( String name ) { } public static boolean isHashAttribute ( Declaration model ) { } static boolean isUnBoxed ( Term node ) { } static boolean isUnBoxed ( TypedDeclaration decl ) { } static void markUnBoxed ( Term node ) { } static BoxingStrategy getBoxingStrategy ( Term node ) { } static BoxingStrategy getBoxingStrategy ( TypedDeclaration decl ) { } static boolean isRaw ( TypedDeclaration decl ) { } static boolean isRaw ( Term node ) { } static void markRaw ( Term node ) { } static boolean hasTypeErased ( Term node ) { } static boolean hasTypeErased ( TypedDeclaration decl ) { } static void markTypeErased ( Term node ) { } static void markTypeErased ( Term node , boolean erased ) { } static void markUntrustedType ( Term node ) { } static boolean hasUntrustedType ( Term node ) { } static boolean hasUntrustedType ( TypedDeclaration decl ) { } static boolean hasCompilerAnnotation ( Tree . StatementOrArgument decl , String name ) { } static boolean hasCompilerAnnotationNoArgument ( Tree . StatementOrArgument decl , String name ) { } static boolean hasCompilerAnnotationWithArgument ( Tree . StatementOrArgument decl , String name , String argument ) { } private static String getCompilerAnnotationArgument ( Iterable < Tree . CompilerAnnotation > compilerAnnotations , String name ) { } static String getCompilerAnnotationArgument ( Tree . StatementOrArgument def , String name ) { } static String getCompilerAnnotationArgument ( Tree . CompilationUnit def , String name ) { } static boolean isDirectAccessVariable ( Term term ) { } static Declaration getTopmostRefinedDeclaration ( Declaration decl ) { } static Declaration getTopmostRefinedDeclaration ( Declaration decl , Map < Method , Method > methodOverrides ) { } static Parameter findParamForDecl ( Tree . TypedDeclaration decl ) { } static Parameter findParamForDecl ( TypedDeclaration decl ) { } static Parameter findParamForDecl ( String attrName , TypedDeclaration decl ) { } static MethodOrValue findMethodOrValueForParam ( Parameter param ) { } static boolean isVoid ( ProducedType type ) { } public static boolean canOptimiseMethodSpecifier ( Term expression , Method m ) { } public static Declaration getParameterized ( Parameter parameter ) { } public static Declaration getParameterized ( MethodOrValue methodOrValue ) { } public static boolean isContainerFunctionalParameter ( Declaration declaration ) { } public static boolean isMemberReferenceInvocation ( Tree . InvocationExpression expr ) { } public static boolean containsTypeParameter ( ProducedType type ) { } public static boolean isCompanionClassNeeded ( TypeDeclaration decl ) { } public static String getJavaNameOfDeclaration ( Declaration decl ) { } public static String getJavaBeanName ( String name ) { } public static String getReverseJavaBeanName ( String name ) { <START_BUG> for ( int i = 0 ; i < ( name . length ( ) ) ; i ++ ) { <END_BUG> if ( Character . isUpperCase ( name . codePointAt ( i ) ) ) { return ( name . substring ( 0 , i ) . toUpperCase ( ) ) + ( name . substring ( i ) ) ; } } return name . toUpperCase ( ) ; } }

Fix:
for ( int i = 0 ; i < ( name . length ( ) ) ; i += ( Character . isSurrogate ( name . charAt ( i ) ) ) ? 2 : 1 ) {