nus-yam/ex-repair huggingface dataset:
Buggy code:
public class Snippet232 { public static void main ( String [ ] args ) { final Display display = new Display ( ) ; Shell shell = new Shell ( display ) ; shell . setLayout ( new FillLayout ( ) ) ; shell . setText ( "Show<seq2seq4repair_space>results<seq2seq4repair_space>as<seq2seq4repair_space>a<seq2seq4repair_space>bar<seq2seq4repair_space>chart<seq2seq4repair_space>in<seq2seq4repair_space>Table" ) ; <START_BUG> final Tree tree = new Tree ( shell , ( ( SWT . BORDER ) | ( SWT . FULL_SELECTION ) ) ) ; <END_BUG> tree . setHeaderVisible ( true ) ; tree . setLinesVisible ( true ) ; TreeColumn column1 = new TreeColumn ( tree , SWT . NONE ) ; column1 . setText ( "Bug<seq2seq4repair_space>Status" ) ; column1 . setWidth ( 100 ) ; final TreeColumn column2 = new TreeColumn ( tree , SWT . NONE ) ; column2 . setText ( "Percent" ) ; column2 . setWidth ( 200 ) ; String [ ] states = new String [ ] { "Resolved" , "New" , "Won't<seq2seq4repair_space>Fix" , "Invalid" } ; String [ ] teams = new String [ ] { "UI" , "SWT" , "OSGI" } ; for ( int i = 0 ; i < ( teams . length ) ; i ++ ) { TreeItem item = new TreeItem ( tree , SWT . NONE ) ; item . setText ( teams [ i ] ) ; for ( int j = 0 ; j < ( states . length ) ; j ++ ) { TreeItem subItem = new TreeItem ( item , SWT . NONE ) ; subItem . setText ( states [ j ] ) ; } } tree . addListener ( PaintItem , new Listener ( ) { int [ ] percents = new int [ ] { 50 , 30 , 5 , 15 } ; public void handleEvent ( Event event ) { if ( ( event . index ) == 1 ) { TreeItem item = ( ( TreeItem ) ( event . item ) ) ; TreeItem parent = item . getParentItem ( ) ; if ( parent != null ) { GC gc = event . gc ; int index = parent . indexOf ( item ) ; int percent = percents [ index ] ; Color foreground = gc . getForeground ( ) ; Color background = gc . getBackground ( ) ; gc . setForeground ( display . getSystemColor ( COLOR_RED ) ) ; gc . setBackground ( display . getSystemColor ( COLOR_YELLOW ) ) ; int width = ( ( ( column2 . getWidth ( ) ) - 1 ) * percent ) // 100 ; gc . fillGradientRectangle ( event . x , event . y , width , event . height , true ) ; Rectangle rect2 = new Rectangle ( event . x , event . y , ( width - 1 ) , ( ( event . height ) - 1 ) ) ; gc . drawRectangle ( rect2 ) ; gc . setForeground ( display . getSystemColor ( COLOR_LIST_FOREGROUND ) ) ; String text = percent + "%" ; Point size = event . gc . textExtent ( text ) ; int offset = Math . max ( 0 , ( ( ( event . height ) - ( size . y ) ) // 2 ) ) ; gc . drawText ( text , ( ( event . x ) + 2 ) , ( ( event . y ) + offset ) , true ) ; gc . setForeground ( background ) ; gc . setBackground ( foreground ) ; } } } } ) ; shell . pack ( ) ; shell . open ( ) ; while ( ! ( shell . isDisposed ( ) ) ) { if ( ! ( display . readAndDispatch ( ) ) ) display . sleep ( ) ; } display . dispose ( ) ; } }

Fix:
final Tree tree = new Tree ( shell , SWT . BORDER ) ;
Buggy code:
public final class PagedBytes { private final List < byte [ ] > blocks = new ArrayList < byte [ ] > ( ) ; private final List < Integer > blockEnd = new ArrayList < Integer > ( ) ; private final int blockSize ; private final int blockBits ; private final int blockMask ; private int upto ; private byte [ ] currentBlock ; private static final byte [ ] EMPTY_BYTES = new byte [ 0 ] ; public static final class Reader implements Closeable { private final byte [ ] [ ] blocks ; private final int [ ] blockEnds ; private final int blockBits ; private final int blockMask ; private final int blockSize ; private final CloseableThreadLocal < byte [ ] > threadBuffers = new CloseableThreadLocal < byte [ ] > ( ) ; public Reader ( PagedBytes pagedBytes ) { } public BytesRef fill ( BytesRef b , long start , int length ) { } public BytesRef fillUsingLengthPrefix ( BytesRef b , long start ) { } public int fillUsingLengthPrefix2 ( BytesRef b , long start ) { } public long fillUsingLengthPrefix3 ( BytesRef b , long start ) { } public byte [ ] [ ] getBlocks ( ) { } public int [ ] getBlockEnds ( ) { } public void close ( ) { } } public PagedBytes ( int blockBits ) { } public void copy ( IndexInput in , long byteCount ) throws IOException { } public void copy ( BytesRef bytes ) throws IOException { } public void copy ( BytesRef bytes , BytesRef out ) throws IOException { int left = ( blockSize ) - ( upto ) ; <START_BUG> if ( ( bytes . length ) > left ) { <END_BUG> if ( ( currentBlock ) != null ) { blocks . add ( currentBlock ) ; blockEnd . add ( upto ) ; } currentBlock = new byte [ blockSize ] ; upto = 0 ; left = blockSize ; assert ( bytes . length ) <= ( blockSize ) ; } out . bytes = currentBlock ; out . offset = upto ; out . length = bytes . length ; System . arraycopy ( bytes . bytes , bytes . offset , currentBlock , upto , bytes . length ) ; upto += bytes . length ; } public PagedBytes . Reader freeze ( boolean trim ) { } public long getPointer ( ) { } public long copyUsingLengthPrefix ( BytesRef bytes ) throws IOException { } }

Fix:
if ( ( ( bytes . length ) > left ) || ( ( currentBlock ) == null ) ) {
Buggy code:
public class SelectConstructor { private boolean _extent = false ; public boolean isExtent ( ) { } public Select evaluate ( ExpContext ctx , Select parent , String alias , QueryExpressions exps , QueryExpressionsState state ) { } private Select newSelect ( ExpContext ctx , Select parent , String alias , QueryExpressions exps , QueryExpressionsState state ) { } private void initialize ( Select sel , ExpContext ctx , QueryExpressions exps , QueryExpressionsState state ) { Map contains = null ; if ( ( HasContainsExpressionVisitor . hasContains ( exps . filter ) ) || ( HasContainsExpressionVisitor . hasContains ( exps . having ) ) ) contains = new HashMap ( 7 ) ; Exp filterExp = ( ( Exp ) ( exps . filter ) ) ; state . filter = filterExp . initialize ( sel , ctx , contains ) ; Exp havingExp = ( ( Exp ) ( exps . having ) ) ; if ( havingExp != null ) state . having = havingExp . initialize ( sel , ctx , contains ) ; Joins filterJoins = state . filter . joins ; Joins havingJoins = ( ( state . having ) == null ) ? null : state . having . joins ; Joins joins = sel . and ( filterJoins , havingJoins ) ; if ( ( exps . projections . length ) > 0 ) { state . projections = new ExpState [ exps . projections . length ] ; Val resultVal ; for ( int i = 0 ; i < ( exps . projections . length ) ; i ++ ) { resultVal = ( ( Val ) ( exps . projections [ i ] ) ) ; <START_BUG> state . projections [ i ] = resultVal . initialize ( sel , ctx , JOIN_REL ) ; <END_BUG> joins = sel . and ( joins , state . projections [ i ] . joins ) ; } } if ( ( exps . grouping . length ) > 0 ) { state . grouping = new ExpState [ exps . grouping . length ] ; Val groupVal ; for ( int i = 0 ; i < ( exps . grouping . length ) ; i ++ ) { groupVal = ( ( Val ) ( exps . grouping [ i ] ) ) ; state . grouping [ i ] = groupVal . initialize ( sel , ctx , JOIN_REL ) ; joins = sel . and ( joins , state . grouping [ i ] . joins ) ; } } if ( ( exps . ordering . length ) > 0 ) { state . ordering = new ExpState [ exps . ordering . length ] ; Val orderVal ; for ( int i = 0 ; i < ( exps . ordering . length ) ; i ++ ) { orderVal = ( ( Val ) ( exps . ordering [ i ] ) ) ; state . ordering [ i ] = orderVal . initialize ( sel , ctx , 0 ) ; joins = sel . and ( joins , state . ordering [ i ] . joins ) ; } } sel . where ( joins ) ; } private SQLBuffer buildWhere ( Select sel , ExpContext ctx , ExpState state , Expression filter ) { } public void select ( Select sel , ExpContext ctx , ClassMapping mapping , boolean subclasses , QueryExpressions exps , QueryExpressionsState state , int eager ) { } private static class ProjectionExpressionVisitor extends AbstractExpressionVisitor { private boolean _candidate = false ; private int _level = 0 ; public static boolean hasCandidateProjections ( Value [ ] projs ) { } public void enter ( Value val ) { } public void exit ( Value val ) { } } }

Fix:
state . projections [ i ] = resultVal . initialize ( sel , ctx , ( ( Val . JOIN_REL ) | ( Val . FORCE_OUTER ) ) ) ;
Buggy code:
public class ChatMessageXMLAdapter { Document documentRepresentation ; Element messageRootElement ; Color messageColor ; String encryptedColor ; ChatSession session ; byte [ ] aesEncryptionKey ; int caesarKey ; public ChatMessageXMLAdapter ( ChatSession session ) { } public String chatMessageToXML ( ChatMessage chatMessage ) { } public String rgbToHex ( Color color ) { } public void getDocumentFromXML ( String XML ) { } public String getMessageType ( ) { } public String getMessageSender ( ) { } public String getRequestReply ( ) { } public String getKeyRequestType ( ) { } public String getFileRequestFileName ( ) { <START_BUG> return messageRootElement . getAttribute ( "filename" ) ; <END_BUG> } public String getFileRequestFileSize ( ) { } public int getFileResponsePort ( ) { } public String getMessageContents ( ) { } public String getRequestMessage ( ) { } public String decryptString ( String encryptedString , String encryptionType ) { } public String textScanner ( String textXML ) { } public ChatMessage xmlToChatMessage ( ) { } public ChatMessage xmlToChatMessage ( String XML , ChatConnection parentConnection ) { } }

Fix:
return messageRootElement . getAttribute ( "name" ) ;
Buggy code:
public class ConstantInitializer < T > implements ConcurrentInitializer < T > { private static final String FMT_TO_STRING = "ConstantInitializer@%d<seq2seq4repair_space>[<seq2seq4repair_space>object<seq2seq4repair_space>=<seq2seq4repair_space>%s<seq2seq4repair_space>]" ; private final T object ; public ConstantInitializer ( T obj ) { } public final T getObject ( ) { } public T get ( ) throws ConcurrentException { } @ Override public int hashCode ( ) { } @ Override public boolean equals ( Object obj ) { } @ Override public String toString ( ) { <START_BUG> return String . format ( ConstantInitializer . FMT_TO_STRING , System . identityHashCode ( this ) , String . valueOf ( getObject ( ) ) ) ; <END_BUG> } }

Fix:
return String . format ( ConstantInitializer . FMT_TO_STRING , Integer . valueOf ( System . identityHashCode ( this ) ) , String . valueOf ( getObject ( ) ) ) ;
Buggy code:
public class Target implements TaskContainer { private String name ; private String ifString = "" ; private String unlessString = "" ; private Condition ifCondition ; private Condition unlessCondition ; private List dependencies = null ; private List children = new ArrayList ( ) ; private Location location = Location . UNKNOWN_LOCATION ; private Project project ; private String description = null ; public Target ( ) { } public Target ( Target other ) { } public void setProject ( Project project ) { } public Project getProject ( ) { } public void setLocation ( Location location ) { } public Location getLocation ( ) { } public void setDepends ( String depS ) { } public static List < String > parseDepends ( String depends , String targetName , String attributeName ) { } public void setName ( String name ) { } public String getName ( ) { } public void addTask ( Task task ) { } public void addDataType ( RuntimeConfigurable r ) { } public Task [ ] getTasks ( ) { } public void addDependency ( String dependency ) { } public Enumeration getDependencies ( ) { } public boolean dependsOn ( String other ) { } public void setIf ( String property ) { } public String getIf ( ) { } public void setIf ( Condition condition ) { } public void setUnless ( String property ) { } public String getUnless ( ) { } public void setUnless ( Condition condition ) { } public void setDescription ( String description ) { } public String getDescription ( ) { } public String toString ( ) { } public void execute ( ) throws BuildException { } public final void performTasks ( ) { } void replaceChild ( Task el , RuntimeConfigurable o ) { } void replaceChild ( Task el , Task o ) { } private class IfStringCondition implements Condition { private String condition ; public IfStringCondition ( String condition ) { } public boolean eval ( ) throws BuildException { PropertyHelper propertyHelper = PropertyHelper . getPropertyHelper ( getProject ( ) ) ; Object o = propertyHelper . parseProperties ( condition ) ; return propertyHelper . testIfCondition ( o ) ; } } private class UnlessStringCondition implements Condition { private String condition ; public UnlessStringCondition ( String condition ) { } public boolean eval ( ) throws BuildException { PropertyHelper propertyHelper = PropertyHelper . getPropertyHelper ( getProject ( ) ) ; Object o = propertyHelper . parseProperties ( condition ) ; <START_BUG> return propertyHelper . testUnlessCondition ( o ) ; <END_BUG> } } }

Fix:
return ! ( propertyHelper . testUnlessCondition ( o ) ) ;
Buggy code:
public class SimpleSpleef extends JavaPlugin { public static Logger log = Logger . getLogger ( "Minecraft" ) ; public static Economy economy = null ; private static SimpleSpleef simpleSpleef ; public static SimpleSpleef getPlugin ( ) { } private static GameHandler gameHandler ; public static GameHandler getGameHandler ( ) { } private SimpleSpleefAdmin admin ; private SimpleSpleefCommandExecutor commandExecutor ; private Translator lang ; private SimpleSpleefBlockListener blockListener ; private SimpleSpleefPlayerListener playerListener ; private SimpleSpleefEntityListener entityListener ; public void onEnable ( ) { } public void onDisable ( ) { } protected void configurePlugin ( ) { this . getConfig ( ) . options ( ) . copyDefaults ( true ) ; <START_BUG> ConfigHelper configHelper = new ConfigHelper ( this ) ; <END_BUG> configHelper . updateSampleConfig ( ) ; configHelper . updateLanguageFiles ( ) ; lang = new Translator ( this , this . getConfig ( ) . getString ( "language" , "en" ) ) ; } protected void checkForUpdate ( ) { } protected void registerEvents ( ) { } public SimpleSpleefAdmin getAdminClass ( ) { } public SimpleSpleefCommandExecutor getCommandExecutor ( ) { } public SimpleSpleefBlockListener getBlockListener ( ) { } public SimpleSpleefPlayerListener getPlayerListener ( ) { } public SimpleSpleefEntityListener getEntityListener ( ) { } public String ll ( String key , String ... replacers ) { } public Map < String , String > lls ( String section ) { } private Boolean setupEconomy ( ) { } }

Fix:
ConfigHelper configHelper = new ConfigHelper ( ) ;
Buggy code:
public class BuckPsiUtils { public static boolean hasElementType ( @ NotNull ASTNode node , @ NotNull TokenSet set ) { } public static boolean hasElementType ( @ NotNull ASTNode node , IElementType ... types ) { } public static PsiElement findChildWithType ( @ NotNull PsiElement element , IElementType type ) { } public static PsiElement findAncestorWithType ( @ NotNull PsiElement element , IElementType type ) { PsiElement parent = element . getParent ( ) ; while ( parent != null ) { <START_BUG> if ( ( parent . getNode ( ) . getElementType ( ) ) == type ) { <END_BUG> return parent ; } parent = parent . getParent ( ) ; } return null ; } }

Fix:
if ( ( ( parent . getNode ( ) ) != null ) && ( ( parent . getNode ( ) . getElementType ( ) ) == type ) ) {
Buggy code:
class AccessLogService implements Service < AccessLogService > { protected final InjectedValue < XnioWorker > worker = new InjectedValue ( ) ; private final String pattern ; private final File directory ; private final String filePrefix ; private final String fileSuffix ; private volatile AccessLogReceiver logReceiver ; AccessLogService ( String pattern , File directory , String filePrefix , String fileSuffix ) { } @ Override public void start ( StartContext context ) throws StartException { } @ Override public void stop ( StopContext context ) { } @ Override public AccessLogService getValue ( ) throws IllegalArgumentException , IllegalStateException { } InjectedValue < XnioWorker > getWorker ( ) { } protected AccessLogHandler configureAccessLogHandler ( HttpHandler handler ) { <START_BUG> return new AccessLogHandler ( handler , logReceiver , pattern , AccessLogService . class . getClassLoader ( ) ) ; <END_BUG> } }

Fix:
return new AccessLogHandler ( handler , logReceiver , pattern , AccessLogHandler . class . getClassLoader ( ) ) ;
Buggy code:
public class Slider extends Control { boolean dragging ; int minimum ; int maximum ; int thumb ; int increment = 1 ; int pageIncrement = 10 ; public Slider ( Composite parent , int style ) { } public void addSelectionListener ( SelectionListener listener ) { } static int checkStyle ( int style ) { } public Point computeSize ( int wHint , int hHint , boolean changed ) { } void createHandle ( ) { } void createWidget ( ) { } public int getIncrement ( ) { } public int getMaximum ( ) { } public int getMinimum ( ) { } public int getPageIncrement ( ) { } public int getSelection ( ) { checkWidget ( ) ; NSScroller widget = ( ( NSScroller ) ( view ) ) ; <START_BUG> float value = widget . floatValue ( ) ; <END_BUG> return ( ( int ) ( ( ( ( ( maximum ) - ( thumb ) ) - ( minimum ) ) * value ) + ( minimum ) ) ) ; } public int getThumb ( ) { } public void removeSelectionListener ( SelectionListener listener ) { } void sendSelection ( ) { } public void setIncrement ( int value ) { } public void setMaximum ( int value ) { } public void setMinimum ( int value ) { } public void setPageIncrement ( int value ) { } public void setSelection ( int value ) { } void updateBar ( int selection , int minimum , int maximum , int thumb ) { } public void setThumb ( int value ) { } public void setValues ( int selection , int minimum , int maximum , int thumb , int increment , int pageIncrement ) { } }

Fix:
double value = widget . doubleValue ( ) ;
Buggy code:
public class Scale extends Control { boolean ignoreResize ; static final int TrackBarProc ; static final TCHAR TrackBarClass = new TCHAR ( 0 , OS . TRACKBAR_CLASS , true ) ; public Scale ( Composite parent , int style ) { } public void addSelectionListener ( SelectionListener listener ) { } int callWindowProc ( int hwnd , int msg , int wParam , int lParam ) { } static int checkStyle ( int style ) { } public Point computeSize ( int wHint , int hHint , boolean changed ) { } void createHandle ( ) { } int defaultForeground ( ) { } public int getIncrement ( ) { } public int getMaximum ( ) { } public int getMinimum ( ) { } public int getPageIncrement ( ) { } public int getSelection ( ) { } public void removeSelectionListener ( SelectionListener listener ) { } void setBackgroundImage ( int hImage ) { } void setBackgroundPixel ( int pixel ) { } public void setIncrement ( int increment ) { } public void setMaximum ( int value ) { } public void setMinimum ( int value ) { } public void setPageIncrement ( int pageIncrement ) { } public void setSelection ( int value ) { } int widgetStyle ( ) { } TCHAR windowClass ( ) { } int windowProc ( ) { } LRESULT WM_PAINT ( int wParam , int lParam ) { } LRESULT WM_SIZE ( int wParam , int lParam ) { } LRESULT wmScrollChild ( int wParam , int lParam ) { <START_BUG> int code = wParam & 65535 ; <END_BUG> switch ( code ) { case OS . TB_ENDTRACK : case OS . TB_THUMBPOSITION : return null ; } Event event = new Event ( ) ; sendEvent ( Selection , event ) ; return null ; } }

Fix:
int code = OS . LOWORD ( wParam ) ;
Buggy code:
public class EjbJar extends MatchingTask { private EjbJar . Config config = new EjbJar . Config ( ) ; private String genericJarSuffix = "-generic.jar" ; private ArrayList deploymentTools = new ArrayList ( ) ; private File destDir ; public void setBasejarname ( String inValue ) { } public void setBasenameterminator ( String inValue ) { } public void setClasspath ( Path classpath ) { } public void setDescriptordir ( File inDir ) { } public void setDestdir ( File inDir ) { } public void setFlatdestdir ( boolean inValue ) { } public void setGenericjarsuffix ( String inString ) { } public void setManifest ( File manifest ) { } public void setNaming ( EjbJar . NamingScheme namingScheme ) { } public void setSrcdir ( File inDir ) { } public BorlandDeploymentTool createBorland ( ) { } public Path createClasspath ( ) { if ( ( config . classpath ) == null ) { <START_BUG> config . classpath = new Path ( getProject ( ) ) ; <END_BUG> } return config . classpath . createPath ( ) ; } public EjbJar . DTDLocation createDTD ( ) { } public IPlanetDeploymentTool createIplanet ( ) { } public JbossDeploymentTool createJboss ( ) { } public FileSet createSupport ( ) { } public WeblogicDeploymentTool createWeblogic ( ) { } public WeblogicTOPLinkDeploymentTool createWeblogictoplink ( ) { } public WebsphereDeploymentTool createWebsphere ( ) { } public void execute ( ) throws TaskException { } private void validateConfig ( ) { } public static class DTDLocation { private String publicId = null ; private String location = null ; public void setLocation ( String location ) { } public void setPublicId ( String publicId ) { } public String getLocation ( ) { } public String getPublicId ( ) { } } public static class NamingScheme extends EnumeratedAttribute { public static final String EJB_NAME = "ejb-name" ; public static final String DIRECTORY = "directory" ; public static final String DESCRIPTOR = "descriptor" ; public static final String BASEJARNAME = "basejarname" ; public String [ ] getValues ( ) { } } static class Config { public String baseNameTerminator = "-" ; public boolean flatDestDir = false ; public List supportFileSets = new ArrayList ( ) ; public ArrayList dtdLocations = new ArrayList ( ) ; public String baseJarName ; public Path classpath ; public File descriptorDir ; public File manifest ; public EjbJar . NamingScheme namingScheme ; public File srcDir ; } }

Fix:
config . classpath = new Path ( ) ;
Buggy code:
public abstract class AbstractHttpMessageConverter < T > implements HttpMessageConverter < T > { protected final Log logger = LogFactory . getLog ( getClass ( ) ) ; private List < MediaType > supportedMediaTypes = Collections . emptyList ( ) ; protected AbstractHttpMessageConverter ( ) { } protected AbstractHttpMessageConverter ( MediaType supportedMediaType ) { } protected AbstractHttpMessageConverter ( MediaType ... supportedMediaTypes ) { } public void setSupportedMediaTypes ( List < MediaType > supportedMediaTypes ) { } public List < MediaType > getSupportedMediaTypes ( ) { } public boolean canRead ( Class < ? > clazz , MediaType mediaType ) { } protected boolean canRead ( MediaType mediaType ) { } public boolean canWrite ( Class < ? > clazz , MediaType mediaType ) { } protected boolean canWrite ( MediaType mediaType ) { } public final T read ( Class < ? extends T > clazz , HttpInputMessage inputMessage ) throws IOException { } public final void write ( T t , MediaType contentType , HttpOutputMessage outputMessage ) throws IOException , HttpMessageNotWritableException { HttpHeaders headers = outputMessage . getHeaders ( ) ; if ( ( headers . getContentType ( ) ) == null ) { if ( ( ( contentType == null ) || ( contentType . isWildcardType ( ) ) ) || ( contentType . isWildcardSubtype ( ) ) ) { contentType = getDefaultContentType ( t ) ; } if ( contentType != null ) { headers . setContentType ( contentType ) ; } } if ( ( headers . getContentLength ( ) ) == ( - 1 ) ) { <START_BUG> Long contentLength = getContentLength ( t , contentType ) ; <END_BUG> if ( contentLength != null ) { headers . setContentLength ( contentLength ) ; } } writeInternal ( t , outputMessage ) ; outputMessage . getBody ( ) . flush ( ) ; } protected MediaType getDefaultContentType ( T t ) { } protected Long getContentLength ( T t , MediaType contentType ) { } protected abstract boolean supports ( Class < ? > clazz ) { } protected abstract T readInternal ( Class < ? extends T > clazz , HttpInputMessage inputMessage ) throws IOException , HttpMessageNotReadableException { } protected abstract void writeInternal ( T t , HttpOutputMessage outputMessage ) throws IOException , HttpMessageNotWritableException { } }

Fix:
Long contentLength = getContentLength ( t , headers . getContentType ( ) ) ;
Buggy code:
public class DeclareSoft extends Declare { private TypePattern exception ; private Pointcut pointcut ; public DeclareSoft ( TypePattern exception , Pointcut pointcut ) { } public Object accept ( PatternNodeVisitor visitor , Object data ) { } public String toString ( ) { } public boolean equals ( Object other ) { } public int hashCode ( ) { } public void write ( DataOutputStream s ) throws IOException { } public static Declare read ( VersionedDataInputStream s , ISourceContext context ) throws IOException { } public Pointcut getPointcut ( ) { } public TypePattern getException ( ) { } public void resolve ( IScope scope ) { exception = exception . resolveBindings ( scope , null , false , true ) ; ResolvedType excType = exception . getExactType ( ) . resolve ( scope . getWorld ( ) ) ; if ( excType != ( ResolvedType . MISSING ) ) { if ( ! ( scope . getWorld ( ) . getCoreType ( THROWABLE ) . isAssignableFrom ( excType ) ) ) { scope . getWorld ( ) . showMessage ( ERROR , WeaverMessages . format ( NOT_THROWABLE , excType . getName ( ) ) , exception . getSourceLocation ( ) , null ) ; pointcut = Pointcut . makeMatchesNothing ( RESOLVED ) ; return ; } if ( scope . getWorld ( ) . getCoreType ( RUNTIME_EXCEPTION ) . isAssignableFrom ( excType ) ) { <START_BUG> scope . getWorld ( ) . getLint ( ) . runtimeExceptionNotSoftened . signal ( new String [ ] { exception . toString ( ) } , exception . getSourceLocation ( ) , null ) ; <END_BUG> pointcut = Pointcut . makeMatchesNothing ( RESOLVED ) ; return ; } } pointcut = pointcut . resolve ( scope ) ; } public boolean isAdviceLike ( ) { } public String getNameSuffix ( ) { } }

Fix:
scope . getWorld ( ) . getLint ( ) . runtimeExceptionNotSoftened . signal ( new String [ ] { excType . getName ( ) } , exception . getSourceLocation ( ) , null ) ;
Buggy code:
@ Entity public class User extends Model { @ Id @ GeneratedValue private long id ; @ Required private String username ; @ Required private String email ; @ Required private String password ; private Integer age ; private char gender ; private Location location ; private MessageBox msgBox ; private ArrayList < Interests > interests ; public User ( String username , String email , String password , Integer age , char gender ) { } public String getUsername ( ) { } public String getEmail ( ) { } public String getPassword ( ) { } public Integer getAge ( ) { } public char getGender ( ) { } public Location getLocation ( ) { } public void setEmail ( String email ) { } public void setPassword ( String password ) { } public void setAge ( Integer age ) { } public void setGender ( char gender ) { } public void setLocation ( Location location ) { } private class XlsParser { String seperator ; int start ; File xls ; boolean [ ] readRows ; public XlsParser ( String seperator , int start , String filepath ) { } public ArrayList < Interests > parseInterests ( ) { } private Interests parseInterest ( int r , Sheet sheet ) { String title = sheet . getCell ( 0 , r ) . getContents ( ) ; String arr = sheet . getCell ( 1 , r ) . getContents ( ) ; String [ ] items = arr . split ( seperator ) ; ArrayList < Interests > subs = null ; if ( ( items . length ) > 0 ) { subs = new ArrayList ( ) ; for ( int i = 0 ; i < ( items . length ) ; i ++ ) { try { int subcell = Integer . parseInt ( items [ i ] ) ; <START_BUG> subs . add ( parseInterest ( ( subcell + 1 ) , sheet ) ) ; <END_BUG> } catch ( NumberFormatException nfe ) { } } } readRows [ r ] = true ; return new Interests ( title , subs ) ; } } public void updateInterests ( ) { } private void rUpdateInterests ( ArrayList < Interests > thiss , ArrayList < Interests > that ) { } public void resetInterests ( ) { } public void recieveMsg ( Message msg ) { } public void sendMsg ( String msg , User to ) { } }

Fix:
subs . add ( parseInterest ( ( subcell - 1 ) , sheet ) ) ;
Buggy code:
public class ModClusterDisable implements OperationStepHandler , DescriptionProvider { static final ModClusterDisable INSTANCE = new ModClusterDisable ( ) ; @ Override public ModelNode getModelDescription ( Locale locale ) { } @ Override public void execute ( OperationContext context , ModelNode operation ) throws OperationFailedException { <START_BUG> if ( context . isNormalServer ( ) ) { <END_BUG> context . addStep ( new OperationStepHandler ( ) { @ Override public void execute ( OperationContext context , ModelNode operation ) throws OperationFailedException { ServiceController < ? > controller = context . getServiceRegistry ( false ) . getService ( NAME ) ; ModCluster modcluster = ( ( ModCluster ) ( controller . getValue ( ) ) ) ; modcluster . disable ( ) ; context . completeStep ( ) ; } } , RUNTIME ) ; } context . completeStep ( ) ; } }

Fix:
if ( ( context . isNormalServer ( ) ) && ( ( context . getServiceRegistry ( false ) . getService ( NAME ) ) != null ) ) {
Buggy code:
public class ExternalEditor { private IPath filePath ; private EditorDescriptor descriptor ; public ExternalEditor ( IPath newFilePath , EditorDescriptor editorDescriptor ) { } public void open ( ) throws CoreException { } public void openWithUserDefinedProgram ( ) throws CoreException { String programFileName = null ; IConfigurationElement configurationElement = descriptor . getConfigurationElement ( ) ; if ( configurationElement != null ) { try { <START_BUG> Bundle bundle = Platform . getBundle ( configurationElement . getDeclaringExtension ( ) . getNamespace ( ) ) ; <END_BUG> URL entry = bundle . getEntry ( descriptor . getFileName ( ) ) ; if ( entry != null ) { URL localName = Platform . asLocalURL ( entry ) ; File file = new File ( localName . getFile ( ) ) ; if ( file . exists ( ) ) programFileName = file . getAbsolutePath ( ) ; } } catch ( IOException e ) { } } if ( programFileName == null ) programFileName = descriptor . getFileName ( ) ; if ( ( filePath ) == null ) { throw new CoreException ( new Status ( Status . ERROR , WorkbenchPlugin . PI_WORKBENCH , 0 , NLS . bind ( ExternalEditor_errorMessage , programFileName ) , null ) ) ; } String path = filePath . toOSString ( ) ; try { Runtime . getRuntime ( ) . exec ( new String [ ] { programFileName , path } ) ; } catch ( Exception e ) { throw new CoreException ( new Status ( Status . ERROR , WorkbenchPlugin . PI_WORKBENCH , 0 , NLS . bind ( ExternalEditor_errorMessage , programFileName ) , e ) ) ; } } }

Fix:
Bundle bundle = Platform . getBundle ( configurationElement . getNamespace ( ) ) ;
Buggy code:
public class ChoiceRenderer implements IChoiceRenderer { private static final long serialVersionUID = 1L ; private final String displayExpression ; private final String idExpression ; public ChoiceRenderer ( ) { } public ChoiceRenderer ( String displayExpression ) { } public ChoiceRenderer ( String displayExpression , String idExpression ) { } public Object getDisplayValue ( Object object ) { Object returnValue = object ; if ( ( ( displayExpression ) != null ) && ( object != null ) ) { returnValue = PropertyResolver . getValue ( displayExpression , object ) ; } if ( returnValue == null ) { return "" ; } <START_BUG> return returnValue . toString ( ) ; <END_BUG> } public String getIdValue ( Object object , int index ) { } }

Fix:
return returnValue ;
Buggy code:
public class EditorActivity extends Activity { private static final String LOG_TAG = "EDITOR_ACTIVITY" ; private DanceBotEditorManager mProjectManager ; private HorizontalRecyclerViews mBeatElementViews ; private DanceBotMusicFile mMusicFile ; private DanceBotMediaPlayer mMediaPlayer ; private DanceBotMusicStream mMediaStream ; private SeekBar mSeekBar ; private MediaPlayerListener mMediaPlayerListener ; @ Override protected void onCreate ( Bundle savedInstanceState ) { } @ Override protected void onStart ( ) { } @ Override protected void onResume ( ) { } @ Override protected void onPause ( ) { } @ Override protected void onStop ( ) { } @ Override protected void onDestroy ( ) { } @ Override public void onBackPressed ( ) { } private void askExit ( ) { } @ Override public boolean onCreateOptionsMenu ( Menu menu ) { } @ Override public boolean onOptionsItemSelected ( MenuItem item ) { int id = item . getItemId ( ) ; switch ( id ) { case id . editor_action_save : <START_BUG> SoundManager . startEncoding ( this . getApplicationContext ( ) , mProjectManager . getDanceBotMusicFile ( ) , mProjectManager . getChoreoManager ( ) ) ; <END_BUG> return true ; default : return super . onOptionsItemSelected ( item ) ; } } }

Fix:
SoundManager . startEncoding ( this , mProjectManager . getDanceBotMusicFile ( ) , mProjectManager . getChoreoManager ( ) ) ;
Buggy code:
public class DefaultSearchEngine { public static final int INIT = 0 ; public static final int RANDOM = 1 ; protected static Hashtable filterCache ; private int mode ; protected Folder folder ; private QueryEngine nonDefaultEngine ; public DefaultSearchEngine ( Folder folder ) { } public StatusObservable getObservable ( ) { } protected synchronized AbstractFilter getFilter ( String type ) { if ( ( DefaultSearchEngine . filterCache . containsKey ( type ) ) == true ) { return ( ( AbstractFilter ) ( DefaultSearchEngine . filterCache . get ( type ) ) ) ; } <START_BUG> log . debug ( ( "loading<seq2seq4repair_space>new<seq2seq4repair_space>instance<seq2seq4repair_space>=" + type ) ) ; <END_BUG> AbstractFilter instance = null ; try { AbstractFilterPluginHandler handler = ( ( AbstractFilterPluginHandler ) ( pluginManager . getHandler ( "org.columba.mail.filter" ) ) ) ; instance = ( ( AbstractFilter ) ( handler . getActionPlugin ( type , null ) ) ) ; } catch ( Exception ex ) { JOptionPane . showMessageDialog ( null , ( "Error<seq2seq4repair_space>while<seq2seq4repair_space>trying<seq2seq4repair_space>to<seq2seq4repair_space>load<seq2seq4repair_space>filter<seq2seq4repair_space>plugin<seq2seq4repair_space>=" + type ) ) ; ex . printStackTrace ( ) ; } if ( instance != null ) { DefaultSearchEngine . filterCache . put ( type , instance ) ; } return instance ; } protected boolean processRule ( Object uid , FilterCriteria criteria , String type ) throws Exception { } protected List processCriteria ( FilterRule rule , List uids ) throws Exception { } protected void divideFilterRule ( FilterRule filterRule , FilterRule notDefaultEngine , FilterRule defaultEngine ) { } public Object [ ] searchMessages ( Filter filter , Object [ ] uids ) throws Exception { } public Object [ ] searchMessages ( Filter filter ) throws Exception { } protected List queryEngine ( FilterRule filter , Object [ ] uids ) throws Exception { } protected List queryEngine ( FilterRule filter ) throws Exception { } public QueryEngine getNonDefaultEngine ( ) { } public void setNonDefaultEngine ( QueryEngine engine ) { } public void messageAdded ( ColumbaMessage message ) throws Exception { } public void messageRemoved ( Object uid ) throws Exception { } public void sync ( ) throws Exception { } }

Fix:
log . info ( ( "loading<seq2seq4repair_space>new<seq2seq4repair_space>instance<seq2seq4repair_space>=" + type ) ) ;
Buggy code:
@ Resource @ StampyLibrary ( libraryName = "stampy-client-server" ) public class StampyHandlerHelper { private static final Logger log = LoggerFactory . getLogger ( MethodHandles . lookup ( ) . lookupClass ( ) ) ; private StompMessageParser parser = new StompMessageParser ( ) ; private StampyHeartbeatContainer heartbeatContainer ; private AbstractStampyMessageGateway gateway ; private UnparseableMessageHandler unparseableMessageHandler = new DefaultUnparseableMessageHandler ( ) ; public void handleUnexpectedError ( HostPort hostPort , String msg , StampyMessage < ? > sm , Exception e ) { } public void handleUnparseableMessage ( HostPort hostPort , String msg , UnparseableException e ) { StampyHandlerHelper . log . debug ( "Unparseable<seq2seq4repair_space>message,<seq2seq4repair_space>delegating<seq2seq4repair_space>to<seq2seq4repair_space>unparseable<seq2seq4repair_space>message<seq2seq4repair_space>handler" ) ; try { getUnparseableMessageHandler ( ) . unparseableMessage ( msg , hostPort ) ; } catch ( Exception e1 ) { try { errorHandle ( e1 , hostPort ) ; } catch ( Exception e2 ) { <START_BUG> StampyHandlerHelper . log . error ( "Could<seq2seq4repair_space>not<seq2seq4repair_space>parse<seq2seq4repair_space>message<seq2seq4repair_space>{}<seq2seq4repair_space>for<seq2seq4repair_space>{}" , msg , hostPort , e ) ; <END_BUG> StampyHandlerHelper . log . error ( "Unexpected<seq2seq4repair_space>exception<seq2seq4repair_space>sending<seq2seq4repair_space>error<seq2seq4repair_space>message<seq2seq4repair_space>for<seq2seq4repair_space>{}" , hostPort , e2 ) ; } } } protected void errorHandle ( StampyMessage < ? > message , Exception e , HostPort hostPort ) throws Exception { } protected void errorHandle ( Exception e , HostPort hostPort ) throws Exception { } public boolean isHeartbeat ( byte [ ] msg ) { } public void resetHeartbeat ( HostPort hostPort ) { } public StompMessageParser getParser ( ) { } public void setParser ( StompMessageParser parser ) { } public StampyHeartbeatContainer getHeartbeatContainer ( ) { } public void setHeartbeatContainer ( StampyHeartbeatContainer heartbeatContainer ) { } public AbstractStampyMessageGateway getGateway ( ) { } public void setGateway ( AbstractStampyMessageGateway gateway ) { } public UnparseableMessageHandler getUnparseableMessageHandler ( ) { } public void setUnparseableMessageHandler ( UnparseableMessageHandler unparseableMessageHandler ) { } }

Fix:
StampyHandlerHelper . log . error ( "Could<seq2seq4repair_space>not<seq2seq4repair_space>parse<seq2seq4repair_space>message<seq2seq4repair_space>{}<seq2seq4repair_space>for<seq2seq4repair_space>{}" , msg , hostPort ) ;
Buggy code:
public class ReplaceFunctionsWithStrings extends AbstractTransformer { private static final Logger log = LoggingManager . getLoggerForClass ( ) ; private static final String FUNCTION_REF_PREFIX = "${" ; private static final String FUNCTION_REF_SUFFIX = "}" ; private boolean regexMatch ; public ReplaceFunctionsWithStrings ( CompoundVariable masterFunction , Map < String , String > variables ) { } public ReplaceFunctionsWithStrings ( CompoundVariable masterFunction , Map < String , String > variables , boolean regexMatch ) { } public JMeterProperty transformValue ( JMeterProperty prop ) throws InvalidVariableException { PatternMatcher pm = JMeterUtils . getMatcher ( ) ; Pattern pattern = null ; PatternCompiler compiler = new Perl5Compiler ( ) ; String input = prop . getStringValue ( ) ; for ( Map . Entry < String , String > entry : getVariables ( ) . entrySet ( ) ) { String key = entry . getKey ( ) ; String value = entry . getValue ( ) ; if ( regexMatch ) { try { <START_BUG> pattern = compiler . compile ( value ) ; <END_BUG> input = Util . substitute ( pm , pattern , new StringSubstitution ( ( ( ( ReplaceFunctionsWithStrings . FUNCTION_REF_PREFIX ) + key ) + ( ReplaceFunctionsWithStrings . FUNCTION_REF_SUFFIX ) ) ) , input , SUBSTITUTE_ALL ) ; } catch ( MalformedPatternException e ) { ReplaceFunctionsWithStrings . log . warn ( ( "Malformed<seq2seq4repair_space>pattern<seq2seq4repair_space>" + value ) ) ; } } else { input = StringUtilities . substitute ( input , value , ( ( ( ReplaceFunctionsWithStrings . FUNCTION_REF_PREFIX ) + key ) + ( ReplaceFunctionsWithStrings . FUNCTION_REF_SUFFIX ) ) ) ; } } StringProperty newProp = new StringProperty ( prop . getName ( ) , input ) ; return newProp ; } }

Fix:
pattern = compiler . compile ( ( ( "\\b(" + value ) + ")\\b" ) ) ;
Buggy code:
public class GameEngine { private Physics physics ; private List < GameItem > items ; private ArrayList < GameItem > itemsToRemove ; private ArrayList < GameItem > itemsToAdd ; private MouseInput mouse ; private CommandInput cmdInput ; private Paddle paddle1 ; private Paddle paddle2 ; private Ball mainBall ; private double skipTicks = 1000 // ( TARGET_FRAMERATE ) ; private int fps ; long sleepTime ; private Player player1 ; private Player player2 ; private int gameState = STARTUP_STATE ; private GraphicsEngine ge ; private MenuCube menu ; private boolean resetGame = false ; private boolean ballExplode = false ; public GameEngine ( ) { } public static void main ( String [ ] args ) { } public void initApplication ( ) { } public void runApplication ( ) { } public void initNewGame ( ) { } private void gameTick ( ) { if ( ( resetGame ) == true ) { resetBall ( ) ; } for ( GameItem item : itemsToRemove ) { removeItemFromGame ( item ) ; } itemsToRemove . clear ( ) ; for ( GameItem item : itemsToAdd ) { createObject ( item ) ; } itemsToAdd . clear ( ) ; <START_BUG> paddle1 . moveItem ( mouse . getxPos ( ) , mouse . getyPos ( ) ) ; <END_BUG> paddle1 . adjustYPos ( DEFAULT_DPADDLE_YPOS , true ) ; paddle2 . adjustYPos ( DEFAULT_UPADDLE_YPOS , false ) ; checkBallSpeed ( ) ; physics . update ( ) ; updatePos ( ) ; } public void ballOut ( Player losingPlayer , Ball ball ) { } public void resetBall ( ) { } public void updateScore ( Player winner ) { } private void createObject ( GameItem item ) { } public void addItemToGame ( GameItem item ) { } public void removeItemFromGame ( GameItem item ) { } public void updatePos ( ) { } public void checkBallSpeed ( ) { } private void initCube ( ) { } public void createControlListeners ( GLAutoDrawable glDrawable ) { } public void createCommandListener ( GLAutoDrawable glDrawable ) { } public long getTickCount ( ) { } public void exit ( ) { } public List < GameItem > getGameItems ( ) { } public int getGameState ( ) { } public Player getPlayer1 ( ) { } public Player getPlayer2 ( ) { } public MenuCube getMenu ( ) { } public int getFps ( ) { } public long getSleepTime ( ) { } public void setGameState ( int gameState ) { } public Ball getMainBall ( ) { } public void setMainBall ( Ball mainBall ) { } public boolean isBallExplode ( ) { } public void setBallExplode ( boolean ballExplode ) { } }

Fix:
paddle1 . moveItem ( mouse . getxPos ( ) , mouse . getyPos ( ) , ge . getFrameWidth ( ) , ge . getFrameHeight ( ) ) ;
Buggy code:
public class ActionSetRegistry implements IExtensionChangeHandler { private class ActionSetPartAssociation { public ActionSetPartAssociation ( String partId , String actionSetId ) { } String partId ; String actionSetId ; } private ArrayList children = new ArrayList ( ) ; private Map mapPartToActionSetIds = new HashMap ( ) ; private Map mapPartToActionSets = new HashMap ( ) ; public ActionSetRegistry ( ) { } private IExtensionPoint getActionSetPartAssociationExtensionPoint ( ) { } private IExtensionPoint getActionSetExtensionPoint ( ) { } private void addActionSet ( ActionSetDescriptor desc ) { } private Object addAssociation ( String actionSetId , String partId ) { } public IActionSetDescriptor findActionSet ( String id ) { } public IActionSetDescriptor [ ] getActionSets ( ) { } public IActionSetDescriptor [ ] getActionSetsFor ( String partId ) { } private void readFromRegistry ( ) { } public void addExtension ( IExtensionTracker tracker , IExtension extension ) { } private void addActionSetPartAssociations ( IExtensionTracker tracker , IExtension extension ) { IConfigurationElement [ ] elements = extension . getConfigurationElements ( ) ; for ( int i = 0 ; i < ( elements . length ) ; i ++ ) { IConfigurationElement element = elements [ i ] ; <START_BUG> if ( element . getName ( ) . equals ( TAG_ACTION_SET_ASSOCIATION ) ) { <END_BUG> String actionSetId = element . getAttribute ( ATT_TARGET_ID ) ; IConfigurationElement [ ] children = element . getChildren ( ) ; for ( int j = 0 ; j < ( children . length ) ; j ++ ) { IConfigurationElement child = children [ j ] ; if ( child . getName ( ) . equals ( TAG_PART ) ) { String partId = child . getAttribute ( ATT_ID ) ; if ( partId != null ) { Object trackingObject = addAssociation ( actionSetId , partId ) ; if ( trackingObject != null ) { tracker . registerObject ( extension , trackingObject , IExtensionTracker . REF_STRONG ) ; } } } else { WorkbenchPlugin . log ( ( ( ( "Unable<seq2seq4repair_space>to<seq2seq4repair_space>process<seq2seq4repair_space>element:<seq2seq4repair_space>" + ( child . getName ( ) ) ) + "<seq2seq4repair_space>in<seq2seq4repair_space>action<seq2seq4repair_space>set<seq2seq4repair_space>part<seq2seq4repair_space>associations<seq2seq4repair_space>extension:<seq2seq4repair_space>" ) + ( extension . getUniqueIdentifier ( ) ) ) ) ; } } } } mapPartToActionSets . clear ( ) ; } private void addActionSets ( IExtensionTracker tracker , IExtension extension ) { } public void removeExtension ( IExtension extension , Object [ ] objects ) { } private void removeActionSetPartAssociations ( Object [ ] objects ) { } private void removeActionSets ( Object [ ] objects ) { } }

Fix:
if ( element . getName ( ) . equals ( TAG_ACTION_SET_PART_ASSOCIATION ) ) {
Buggy code:
public abstract class AbstractRandomGenerator implements RandomGenerator { private double cachedNormalDeviate = Double . NaN ; public AbstractRandomGenerator ( ) { } public void clear ( ) { } public void setSeed ( int seed ) { } public void setSeed ( int [ ] seed ) { } public abstract void setSeed ( long seed ) { } public void nextBytes ( byte [ ] bytes ) { int bytesOut = 0 ; while ( bytesOut < ( bytes . length ) ) { int randInt = nextInt ( ) ; for ( int i = 0 ; i < 3 ; i ++ ) { if ( i > 0 ) { <START_BUG> randInt = randInt > > 8 ; <END_BUG> } bytes [ ( bytesOut ++ ) ] = ( ( byte ) ( randInt ) ) ; if ( bytesOut == ( bytes . length ) ) { return ; } } } } public int nextInt ( ) { } public int nextInt ( int n ) { } public long nextLong ( ) { } public boolean nextBoolean ( ) { } public float nextFloat ( ) { } public abstract double nextDouble ( ) { } public double nextGaussian ( ) { } }

Fix:
randInt >>= 8 ;
Buggy code:
public class TableItem extends Item { Table parent ; String [ ] strings ; Image [ ] images ; boolean checked ; boolean grayed ; boolean cached ; Color foreground ; Color background ; Color [ ] cellForeground ; Color [ ] cellBackground ; Font font ; Font [ ] cellFont ; int width = - 1 ; public TableItem ( Table parent , int style ) { } public TableItem ( Table parent , int style , int index ) { } TableItem ( Table parent , int style , int index , boolean create ) { } static Table checkNull ( Table control ) { } int calculateWidth ( int index , GC gc ) { } protected void checkSubclass ( ) { } void clear ( ) { } public Color getBackground ( ) { } public Color getBackground ( int index ) { } public Rectangle getBounds ( int index ) { } public boolean getChecked ( ) { } public Font getFont ( ) { } public Font getFont ( int index ) { } public Color getForeground ( ) { } public Color getForeground ( int index ) { } public boolean getGrayed ( ) { } public Image getImage ( ) { } public Image getImage ( int index ) { } public Rectangle getImageBounds ( int index ) { } public int getImageIndent ( ) { } public Table getParent ( ) { } public String getText ( ) { } public String getText ( int index ) { } void redraw ( int propertyID ) { cached = true ; <START_BUG> if ( parent . ignoreRedraw ) <END_BUG> return ; if ( ( ( parent . drawCount ) != 0 ) && ( propertyID != ( Table . CHECK_COLUMN_ID ) ) ) return ; int itemIndex = parent . indexOf ( this ) ; int [ ] id = new int [ ] { itemIndex + 1 } ; OS . UpdateDataBrowserItems ( parent . handle , kDataBrowserNoItem , id . length , id , kDataBrowserItemNoProperty , propertyID ) ; } void releaseChild ( ) { } void releaseWidget ( ) { } public void setBackground ( Color color ) { } public void setBackground ( int index , Color color ) { } public void setChecked ( boolean checked ) { } public void setFont ( Font font ) { } public void setFont ( int index , Font font ) { } public void setForeground ( Color color ) { } public void setForeground ( int index , Color color ) { } public void setGrayed ( boolean grayed ) { } public void setImage ( Image [ ] images ) { } public void setImage ( int index , Image image ) { } public void setImage ( Image image ) { } public void setImageIndent ( int indent ) { } public void setText ( String [ ] strings ) { } public void setText ( int index , String string ) { } public void setText ( String string ) { } }

Fix:
if ( ( parent . currentItem ) == ( this ) )