Buggy code:
public class NSImage extends NSObject { public NSImage ( ) { } public NSImage ( int id ) { } public NSData TIFFRepresentation ( ) { } public NSData TIFFRepresentationUsingCompression ( int comp , float aFloat ) { } public void addRepresentation ( NSImageRep imageRep ) { } public void addRepresentations ( NSArray imageReps ) { } public NSRect alignmentRect ( ) { } public NSColor backgroundColor ( ) { } public NSImageRep bestRepresentationForDevice ( NSDictionary deviceDescription ) { } public boolean cacheDepthMatchesImageDepth ( ) { } public int cacheMode ( ) { } public static boolean canInitWithPasteboard ( NSPasteboard pasteboard ) { } public void cancelIncrementalLoad ( ) { } public void compositeToPoint_fromRect_operation_ ( NSPoint point , NSRect rect , int op ) { } public void compositeToPoint_fromRect_operation_fraction_ ( NSPoint point , NSRect rect , int op , float delta ) { } public void compositeToPoint_operation_ ( NSPoint point , int op ) { } public void compositeToPoint_operation_fraction_ ( NSPoint point , int op , float delta ) { } public id delegate ( ) { } public void dissolveToPoint_fraction_ ( NSPoint point , float aFloat ) { } public void dissolveToPoint_fromRect_fraction_ ( NSPoint point , NSRect rect , float aFloat ) { } public void drawAtPoint ( NSPoint point , NSRect fromRect , int op , float delta ) { } public void drawInRect ( NSRect rect , NSRect fromRect , int op , float delta ) { } public boolean drawRepresentation ( NSImageRep imageRep , NSRect rect ) { } public static NSArray imageFileTypes ( ) { } public static id imageNamed ( NSString name ) { } public static NSArray imagePasteboardTypes ( ) { } public static NSArray imageTypes ( ) { } public static NSArray imageUnfilteredFileTypes ( ) { } public static NSArray imageUnfilteredPasteboardTypes ( ) { } public static NSArray imageUnfilteredTypes ( ) { } public NSImage initByReferencingFile ( NSString fileName ) { } public NSImage initByReferencingURL ( NSURL url ) { } public NSImage initWithContentsOfFile ( NSString fileName ) { } public NSImage initWithContentsOfURL ( NSURL url ) { } public NSImage initWithData ( NSData data ) { } public NSImage initWithIconRef ( int iconRef ) { } public NSImage initWithPasteboard ( NSPasteboard pasteboard ) { } public NSImage initWithSize ( NSSize aSize ) { } public boolean isCachedSeparately ( ) { } public boolean isDataRetained ( ) { } public boolean isFlipped ( ) { } public boolean isTemplate ( ) { } public boolean isValid ( ) { } public void lockFocus ( ) { } public void lockFocusOnRepresentation ( NSImageRep imageRepresentation ) { } public boolean matchesOnMultipleResolution ( ) { } public NSString name ( ) { } public boolean prefersColorMatch ( ) { } public void recache ( ) { } public void removeRepresentation ( NSImageRep imageRep ) { } public NSArray representations ( ) { } public boolean scalesWhenResized ( ) { } public void setAlignmentRect ( NSRect rect ) { } public void setBackgroundColor ( NSColor aColor ) { } public void setCacheDepthMatchesImageDepth ( boolean flag ) { } public void setCacheMode ( int mode ) { } public void setCachedSeparately ( boolean flag ) { } public void setDataRetained ( boolean flag ) { } public void setDelegate ( id anObject ) { } public void setFlipped ( boolean flag ) { } public void setMatchesOnMultipleResolution ( boolean flag ) { } public boolean setName ( NSString string ) { } public void setPrefersColorMatch ( boolean flag ) { } public void setScalesWhenResized ( boolean flag ) { } public void setSize ( NSSize aSize ) { } public void setTemplate ( boolean isTemplate ) { } public void setUsesEPSOnResolutionMismatch ( boolean flag ) { } public NSSize size ( ) { NSSize result = new NSSize ( ) ; <START_BUG> OS . objc_msgSend_struct ( result , this . id , sel_size ) ; <END_BUG> return result ; } public void unlockFocus ( ) { } public boolean usesEPSOnResolutionMismatch ( ) { } }

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