Buggy code:
public short characterAtIndex ( int index ) { } public NSString commonPrefixWithString ( NSString aString , int mask ) { } public int compare_ ( NSString string ) { } public int compare_options_ ( NSString string , int mask ) { } public int compare_options_range_ ( NSString string , int mask , NSRange compareRange ) { } public int compare_options_range_locale_ ( NSString string , int mask , NSRange compareRange , id locale ) { } public int completePathIntoString ( int outputName , boolean flag , int outputArray , NSArray filterTypes ) { } public NSArray componentsSeparatedByCharactersInSet ( NSCharacterSet separator ) { } public NSArray componentsSeparatedByString ( NSString separator ) { } public NSData dataUsingEncoding_ ( int encoding ) { } public NSData dataUsingEncoding_allowLossyConversion_ ( int encoding , boolean lossy ) { } public NSString decomposedStringWithCanonicalMapping ( ) { } public NSString decomposedStringWithCompatibilityMapping ( ) { } public static int defaultCStringEncoding ( ) { } public NSString description ( ) { } public double doubleValue ( ) { } public int fastestEncoding ( ) { } public int fileSystemRepresentation ( ) { } public float floatValue ( ) { } public boolean getBytes ( int buffer , int maxBufferCount , int usedBufferCount , int encoding , int options , NSRange range , int leftover ) { } public void getCString_ ( int bytes ) { } public void getCString_maxLength_ ( int bytes , int maxLength ) { } public boolean getCString_maxLength_encoding_ ( int buffer , int maxBufferCount , int encoding ) { } public void getCString_maxLength_range_remainingRange_ ( int bytes , int maxLength , NSRange aRange , int leftoverRange ) { } public void getCharacters_ ( char [ ] buffer ) { } public void getCharacters_range_ ( char [ ] buffer , NSRange aRange ) { } public boolean getFileSystemRepresentation ( int cname , int max ) { } public void getLineStart ( int startPtr , int lineEndPtr , int contentsEndPtr , NSRange range ) { } public void getParagraphStart ( int startPtr , int parEndPtr , int contentsEndPtr , NSRange range ) { } public String getString ( ) { } public boolean hasPrefix ( NSString aString ) { } public boolean hasSuffix ( NSString aString ) { } public int hash ( ) { } public NSString initWithBytes ( int bytes , int len , int encoding ) { } public NSString initWithBytesNoCopy ( int bytes , int len , int encoding , boolean freeBuffer ) { } public NSString initWithCString_ ( int bytes ) { } public NSString initWithCString_encoding_ ( int nullTerminatedCString , int encoding ) { } public NSString initWithCString_length_ ( int bytes , int length ) { } public NSString initWithCStringNoCopy ( int bytes , int length , boolean freeBuffer ) { } public NSString initWithCharacters ( int characters , int length ) { } public NSString initWithCharactersNoCopy ( int characters , int length , boolean freeBuffer ) { } public NSString initWithContentsOfFile_ ( NSString path ) { } public NSString initWithContentsOfFile_encoding_error_ ( NSString path , int enc , int error ) { } public NSString initWithContentsOfFile_usedEncoding_error_ ( NSString path , int enc , int error ) { } public NSString initWithContentsOfURL_ ( NSURL url ) { } public NSString initWithContentsOfURL_encoding_error_ ( NSURL url , int enc , int error ) { } public NSString initWithContentsOfURL_usedEncoding_error_ ( NSURL url , int enc , int error ) { } public NSString initWithData ( NSData data , int encoding ) { } public NSString initWithFormat_ ( NSString initWithFormat ) { } public NSString initWithFormat_arguments_ ( NSString format , int argList ) { } public NSString initWithFormat_locale_ ( NSString format , id locale ) { } public NSString initWithFormat_locale_arguments_ ( NSString format , id locale , int argList ) { } public NSString initWithString ( NSString aString ) { } public NSString initWithUTF8String ( int nullTerminatedCString ) { } public int intValue ( ) { } public int integerValue ( ) { } public boolean isAbsolutePath ( ) { } public boolean isEqualToString ( NSString aString ) { } public NSString lastPathComponent ( ) { } public int length ( ) { } public int lengthOfBytesUsingEncoding ( int enc ) { } public NSRange lineRangeForRange ( NSRange range ) { NSRange result = new NSRange ( ) ; <START_BUG> OS . objc_msgSend_struct ( result , this . id , sel_lineRangeForRange_1 , range ) ; <END_BUG> return result ; } public int localizedCaseInsensitiveCompare ( NSString string ) { } public int localizedCompare ( NSString string ) { } public static NSString localizedNameOfStringEncoding ( int encoding ) { } public static id localizedStringWithFormat ( NSString localizedStringWithFormat ) { } public long longLongValue ( ) { } public int lossyCString ( ) { } public NSString lowercaseString ( ) { } public int maximumLengthOfBytesUsingEncoding ( int enc ) { } public NSRange paragraphRangeForRange ( NSRange range ) { } public NSArray pathComponents ( ) { } public NSString pathExtension ( ) { } public static NSString pathWithComponents ( NSArray components ) { } public NSString precomposedStringWithCanonicalMapping ( ) { } public NSString precomposedStringWithCompatibilityMapping ( ) { } public id propertyList ( ) { } public NSDictionary propertyListFromStringsFileFormat ( ) { } public NSRange rangeOfCharacterFromSet_ ( NSCharacterSet aSet ) { } public NSRange rangeOfCharacterFromSet_options_ ( NSCharacterSet aSet , int mask ) { } public NSRange rangeOfCharacterFromSet_options_range_ ( NSCharacterSet aSet , int mask , NSRange searchRange ) { } public NSRange rangeOfComposedCharacterSequenceAtIndex ( int index ) { } public NSRange rangeOfComposedCharacterSequencesForRange ( NSRange range ) { } public NSRange rangeOfString_ ( NSString aString ) { } public NSRange rangeOfString_options_ ( NSString aString , int mask ) { } public NSRange rangeOfString_options_range_ ( NSString aString , int mask , NSRange searchRange ) { } public NSRange rangeOfString_options_range_locale_ ( NSString aString , int mask , NSRange searchRange , NSLocale locale ) { } public int smallestEncoding ( ) { } public static NSString string ( ) { } public NSString stringByAbbreviatingWithTildeInPath ( ) { } public NSString stringByAddingPercentEscapesUsingEncoding ( int enc ) { }

Fix:
OS . objc_msgSend_stret ( result , this . id , sel_lineRangeForRange_1 , range ) ;