Buggy code:
public , char [ ] returnType ) { } public static String createMethodSignature ( String [ ] parameterTypes , String returnType ) { } public static char [ ] createTypeParameterSignature ( char [ ] typeParameterName , char [ ] [ ] boundSignatures ) { } public static String createTypeParameterSignature ( String typeParameterName , String [ ] boundSignatures ) { } public static String createTypeSignature ( char [ ] typeName , boolean isResolved ) { } public static char [ ] createCharArrayTypeSignature ( char [ ] typeName , boolean isResolved ) { } private static int consumeWhitespace ( char [ ] typeName , int pos , int length ) { } private static int encodeQualifiedName ( char [ ] typeName , int pos , int length , StringBuffer buffer ) { } private static int encodeArrayDimension ( char [ ] typeName , int pos , int length , StringBuffer buffer ) { } private static int checkArrayDimension ( char [ ] typeName , int pos , int length ) { } private static int checkNextChar ( char [ ] typeName , char expectedChar , int pos , int length , boolean isOptional ) { } private static int encodeTypeSignature ( char [ ] typeName , int start , boolean isResolved , int length , StringBuffer buffer ) { } public static String createTypeSignature ( String typeName , boolean isResolved ) { } public static int getArrayCount ( char [ ] typeSignature ) throws IllegalArgumentException { } public static int getArrayCount ( String typeSignature ) throws IllegalArgumentException { } public static char [ ] getElementType ( char [ ] typeSignature ) throws IllegalArgumentException { } public static String getElementType ( String typeSignature ) throws IllegalArgumentException { } public static int getParameterCount ( char [ ] methodSignature ) throws IllegalArgumentException { } public static int getTypeSignatureKind ( char [ ] typeSignature ) { } public static int getTypeSignatureKind ( String typeSignature ) { } public static int getParameterCount ( String methodSignature ) throws IllegalArgumentException { } public static char [ ] [ ] getParameterTypes ( char [ ] methodSignature ) throws IllegalArgumentException { } public static String [ ] getParameterTypes ( String methodSignature ) throws IllegalArgumentException { } public static String [ ] getThrownExceptionTypes ( String methodSignature ) throws IllegalArgumentException { } public static char [ ] [ ] getThrownExceptionTypes ( char [ ] methodSignature ) throws IllegalArgumentException { } public static char [ ] [ ] getTypeArguments ( char [ ] parameterizedTypeSignature ) throws IllegalArgumentException { } public static String [ ] getTypeArguments ( String parameterizedTypeSignature ) throws IllegalArgumentException { } public static char [ ] getTypeErasure ( char [ ] parameterizedTypeSignature ) throws IllegalArgumentException { } public static String getTypeErasure ( String parameterizedTypeSignature ) throws IllegalArgumentException { } public static char [ ] [ ] getTypeParameters ( char [ ] methodOrTypeSignature ) throws IllegalArgumentException { } public static String [ ] getTypeParameters ( String methodOrTypeSignature ) throws IllegalArgumentException { } public static String getTypeVariable ( String formalTypeParameterSignature ) throws IllegalArgumentException { } public static char [ ] getTypeVariable ( char [ ] formalTypeParameterSignature ) throws IllegalArgumentException { } public static char [ ] [ ] getTypeParameterBounds ( char [ ] formalTypeParameterSignature ) throws IllegalArgumentException { } public static String [ ] getTypeParameterBounds ( String formalTypeParameterSignature ) throws IllegalArgumentException { } public static char [ ] getQualifier ( char [ ] name ) { } public static String getQualifier ( String name ) { } public static char [ ] getReturnType ( char [ ] methodSignature ) throws IllegalArgumentException { } public static String getReturnType ( String methodSignature ) throws IllegalArgumentException { } public static char [ ] getSignatureQualifier ( char [ ] typeSignature ) { } public static String getSignatureQualifier ( String typeSignature ) { } public static char [ ] getSignatureSimpleName ( char [ ] typeSignature ) { } public static String getSignatureSimpleName ( String typeSignature ) { } public static char [ ] getSimpleName ( char [ ] name ) { } public static String getSimpleName ( String name ) { } private static void appendSimpleName ( char [ ] name , int start , int end , StringBuffer buffer ) { } private static void appendArgumentSimpleNames ( char [ ] name , int start , int end , StringBuffer buffer ) { } public static char [ ] [ ] getSimpleNames ( char [ ] name ) { } public static String [ ] getSimpleNames ( String name ) { } public static char [ ] toCharArray ( char [ ] methodSignature , char [ ] methodName , char [ ] [ ] parameterNames , boolean fullyQualifyTypeNames , boolean includeReturnType ) { } public static char [ ] toCharArray ( char [ ] methodSignature , char [ ] methodName , char [ ] [ ] parameterNames , boolean fullyQualifyTypeNames , boolean includeReturnType , boolean isVargArgs ) { } public static char [ ] toCharArray ( char [ ] signature ) throws IllegalArgumentException { } private static int appendTypeSignature ( char [ ] string , int start , boolean fullyQualifyTypeNames , StringBuffer buffer ) { } private static int appendTypeSignature ( char [ ] string , int start , boolean fullyQualifyTypeNames , StringBuffer buffer , boolean isVarArgs ) { if ( start >= ( string . length ) ) { throw new IllegalArgumentException ( ) ; } char c = string [ start ] ; if ( isVarArgs ) { switch ( c ) { case Signature . C_ARRAY : return Signature . appendArrayTypeSignature ( string , start , fullyQualifyTypeNames , buffer , true ) ; case Signature . C_RESOLVED : case Signature . C_UNRESOLVED : case Signature . C_TYPE_VARIABLE : case Signature . C_BOOLEAN : case Signature . C_BYTE : case Signature . C_CHAR : case Signature . C_DOUBLE : case Signature . C_FLOAT : case Signature . C_INT : case Signature . C_LONG : case Signature . C_SHORT : case Signature . C_VOID : case Signature . C_STAR : case Signature . C_EXTENDS : case Signature . C_SUPER : default : throw new IllegalArgumentException ( ) ; } } else { switch ( c ) { case Signature . C_ARRAY : return Signature . appendArrayTypeSignature ( string , start , fullyQualifyTypeNames , buffer ) ; case Signature . C_RESOLVED : case Signature . C_UNRESOLVED : return Signature . appendClassTypeSignature ( string , start , fullyQualifyTypeNames , buffer ) ; case Signature . C_TYPE_VARIABLE : int e = org . eclipse . jdt . internal . core . util . Util . scanTypeVariableSignature ( string , start ) ; <START_BUG> buffer . append ( CharOperation . subarray ( string , ( start + 1 ) , e ) ) ; <END_BUG>

Fix:
buffer . append ( string , ( start + 1 ) , ( ( e - start ) - 1 ) ) ;