nus-yam/ex-repair huggingface dataset:
Buggy code:
public class EJB3RemoteServiceAdd extends AbstractBoottimeAddStepHandler { static final EJB3RemoteServiceAdd INSTANCE = new EJB3RemoteServiceAdd ( ) ; private EJB3RemoteServiceAdd ( ) { } static ModelNode create ( final String connectorName , final String threadPoolName ) { } @ Override protected void performBoottime ( OperationContext context , ModelNode operation , ModelNode model , ServiceVerificationHandler verificationHandler , List < ServiceController < ? > > newControllers ) throws OperationFailedException { } ServiceController < EJBRemoteConnectorService > installRuntimeService ( final OperationContext context , final ModelNode model , final ServiceVerificationHandler verificationHandler ) { final String connectorName = model . require ( EJB3SubsystemModel . CONNECTOR_REF ) . asString ( ) ; final String threadPoolName = model . require ( EJB3SubsystemModel . THREAD_POOL_NAME ) . asString ( ) ; final ServiceTarget serviceTarget = context . getServiceTarget ( ) ; <START_BUG> final EJBRemoteConnectorService service = new EJBRemoteConnectorService ( ( ( byte ) ( 1 ) ) , new String [ ] { "river" , "java-serial" } ) ; <END_BUG> final ServiceBuilder < EJBRemoteConnectorService > ejbRemoteConnectorServiceBuilder = serviceTarget . addService ( SERVICE_NAME , service ) ; ejbRemoteConnectorServiceBuilder . addDependency ( SUBSYSTEM_ENDPOINT , Endpoint . class , service . getEndpointInjector ( ) ) ; ejbRemoteConnectorServiceBuilder . addDependency ( BASE_SERVICE_NAME . append ( threadPoolName ) , ExecutorService . class , service . getExecutorService ( ) ) . addDependency ( DeploymentRepository . SERVICE_NAME , DeploymentRepository . class , service . getDeploymentRepositoryInjector ( ) ) . addDependency ( EJBRemoteTransactionsRepository . SERVICE_NAME , EJBRemoteTransactionsRepository . class , service . getEJBRemoteTransactionsRepositoryInjector ( ) ) . setInitialMode ( ACTIVE ) ; if ( verificationHandler != null ) { ejbRemoteConnectorServiceBuilder . addListener ( verificationHandler ) ; } return ejbRemoteConnectorServiceBuilder . install ( ) ; } @ Override protected void populateModel ( ModelNode operation , ModelNode model ) throws OperationFailedException { } }

Fix:
final EJBRemoteConnectorService service = new EJBRemoteConnectorService ( ( ( byte ) ( 1 ) ) , new String [ ] { "river" } ) ;
Buggy code:
public abstract class P4HandlerAdapter implements P4Handler { String p4input = "" ; InputStream es ; InputStream is ; OutputStream os ; public void setOutput ( String p4Input ) { } public void setProcessErrorStream ( InputStream is ) throws IOException { } public void setProcessInputStream ( OutputStream os ) throws IOException { } public void setProcessOutputStream ( InputStream is ) throws IOException { } public abstract void process ( String line ) { } public void start ( ) throws BuildException { try { if ( ( ( ( p4input ) != null ) && ( ( p4input . length ( ) ) > 0 ) ) && ( ( os ) != null ) ) { os . write ( p4input . getBytes ( ) ) ; os . flush ( ) ; os . close ( ) ; } BufferedReader input = new BufferedReader ( new InputStreamReader ( new SequenceInputStream ( is , es ) ) ) ; String line ; while ( ( line = input . readLine ( ) ) != null ) { process ( line ) ; } input . close ( ) ; } catch ( Exception e ) { <START_BUG> throw new BuildException ( e ) ; <END_BUG> } } public void stop ( ) { } }

Fix:
throw new BuildException ( "Error" , e ) ;
Buggy code:
public class ServerInModuleStartupTestCase { @ Test public void testServerStartupAndShutDown ( ) throws Exception { System . out . println ( Main . class . getClassLoader ( ) ) ; ServerEnvironment serverEnvironment = Main . determineEnvironment ( new String [ 0 ] , new Properties ( System . getProperties ( ) ) , System . getenv ( ) ) ; Assert . assertNotNull ( serverEnvironment ) ; final Bootstrap bootstrap = Factory . newInstance ( ) ; final Bootstrap . Configuration configuration = new Bootstrap . Configuration ( ) ; configuration . setServerEnvironment ( serverEnvironment ) ; configuration . setModuleLoader ( Module . getSystemModuleLoader ( ) ) ; configuration . setPortOffset ( 0 ) ; <START_BUG> final ServiceContainer container = bootstrap . start ( configuration , Collections . < ServiceActivator > emptyList ( ) ) . get ( ) ; <END_BUG> Assert . assertNotNull ( container ) ; container . shutdown ( ) ; container . awaitTermination ( ) ; Assert . assertTrue ( container . isShutdownComplete ( ) ) ; } }

Fix:
final ServiceContainer container = bootstrap . bootstrap ( configuration , Collections . < ServiceActivator > emptyList ( ) ) . get ( ) ;
Buggy code:
@ Entity @ Access ( AccessType . PROPERTY ) public class Book extends Item implements Serializable { private StringProperty author = new SimpleStringProperty ( ) ; private StringProperty publisher = new SimpleStringProperty ( ) ; public Book ( ) { } public Book ( String theme , String ageCategory , String title , String description , String author , String publisher ) { } <START_BUG> @ Display ( name = "Autheur" ) <END_BUG> public StringProperty authorProperty ( ) { return author ; } @ Display ( name = "Uitgeverij" ) public StringProperty publisherProperty ( ) { } public String getAuthor ( ) { } public void setAuthor ( String author ) { } public String getPublisher ( ) { } public void setPublisher ( String publisher ) { } @ Override public String toString ( ) { } }

Fix:
@ Display ( name = "Auteur" )
Buggy code:
public class InterleavedSubsystemTestCase { private ServiceContainer container ; @ Before public void setupController ( ) throws InterruptedException { } @ After public void shutdownServiceContainer ( ) { } @ Test public void testInterleavedOps ( ) throws Exception { } public static class InterleavedSubsystemModelControllerService extends TestModelControllerService { InterleavedSubsystemModelControllerService ( ) { } @ Override <START_BUG> protected void initModel ( Resource rootResource , ManagementResourceRegistration rootRegistration , Resource modelControllerResource ) { <END_BUG> GlobalOperationHandlers . registerGlobalOperations ( rootRegistration , processType ) ; SimpleResourceDefinition subsystemResource = new SimpleResourceDefinition ( PathElement . pathElement ( EXTENSION ) , new NonResolvingResourceDescriptionResolver ( ) , new InterleavedSubsystemTestCase . FakeExtensionAddHandler ( rootRegistration ) , ReloadRequiredRemoveStepHandler . INSTANCE ) ; rootRegistration . registerSubModel ( subsystemResource ) ; } } private static class FakeExtensionAddHandler extends ExtensionAddHandler { private final ManagementResourceRegistration rootRegistration ; private FakeExtensionAddHandler ( ManagementResourceRegistration rootRegistration ) { } @ Override public void execute ( OperationContext context , ModelNode operation ) throws OperationFailedException { } } private static class FakeSubsystemAddHandler extends AbstractAddStepHandler { @ Override protected void populateModel ( ModelNode operation , ModelNode model ) throws OperationFailedException { } } private static class InterleavedConfigurationPersister extends AbstractConfigurationPersister { private static final InterleavedSubsystemTestCase . InterleavedConfigurationPersister INSTANCE = new InterleavedSubsystemTestCase . InterleavedConfigurationPersister ( ) ; private InterleavedConfigurationPersister ( ) { } @ Override public PersistenceResource store ( final ModelNode model , Set < PathAddress > affectedAddresses ) { } @ Override public List < ModelNode > load ( ) { } private static class NullPersistenceResource implements ConfigurationPersister . PersistenceResource { private static final InterleavedSubsystemTestCase . InterleavedConfigurationPersister . NullPersistenceResource INSTANCE = new InterleavedSubsystemTestCase . InterleavedConfigurationPersister . NullPersistenceResource ( ) ; @ Override public void commit ( ) { } @ Override public void rollback ( ) { } } } }

Fix:
protected void initModel ( Resource rootResource , ManagementResourceRegistration rootRegistration ) {
Buggy code:
public class QueryResultCacheImpl implements QueryResultCache { private final DelegatingQueryCache _cache ; public QueryResultCacheImpl ( QueryCache cache ) { } public QueryCache getDelegate ( ) { } public void pin ( Query q ) { } public void unpin ( Query q ) { } public void evict ( Query q ) { } public void evictAll ( ) { } public void evictAll ( Class cls ) { } private QueryKey toQueryKey ( Query q ) { QueryImpl impl = ( ( QueryImpl ) ( q ) ) ; if ( impl . hasPositionalParameters ( ) ) <START_BUG> return QueryKey . newInstance ( impl . getDelegate ( ) , impl . getPositionalParameters ( ) ) ; <END_BUG> return QueryKey . newInstance ( impl . getDelegate ( ) , impl . getNamedParameters ( ) ) ; } public int hashCode ( ) { } public boolean equals ( Object other ) { } }

Fix:
return QueryKey . newInstance ( impl . getDelegate ( ) , impl . getPositionalParameters ( ) . toArray ( ) ) ;
Buggy code:
public class FirstStartStep1Fragment extends Fragment { private static String LOG_TAG = "GDG-FirstStartStep1Fragment" ; private ApiRequest mFetchChaptersTask ; private ChapterAdapter mSpinnerAdapter ; private Chapter mSelectedChapter ; @ InjectView ( id . chapter_spinner ) Spinner mChapterSpinner ; @ InjectView ( id . confirm ) Button mConfirm ; @ InjectView ( id . viewSwitcher ) ViewSwitcher mLoadSwitcher ; private ChapterComparator mLocationComparator ; @ Override public void onSaveInstanceState ( Bundle outState ) { } @ Override public void onActivityCreated ( Bundle savedInstanceState ) { } @ Override public void onStart ( ) { } private void addChapters ( List < Chapter > chapterList ) { } @ Override public View onCreateView ( LayoutInflater inflater , ViewGroup container , Bundle savedInstanceState ) { <START_BUG> View v = inflater . inflate ( fragment_welcome_step1 , null ) ; <END_BUG> ButterKnife . inject ( this , v ) ; return v ; } @ Override public void onViewCreated ( View view , Bundle savedInstanceState ) { } public interface Step1Listener { void onConfirmedChapter ( Chapter chapter ) { } } }

Fix:
View v = inflater . inflate ( fragment_welcome_step1 , container , false ) ;
Buggy code:
public class ContactManagerImpl implements ContactManager { private final File CONTACTS_FILE ; Comparator < Meeting > chronological = ( m1 , m2 ) -> m1 . getDate ( ) . compareTo ( m2 . getDate ( ) ) ; int countContact = 1 ; int countMeeting = 1 ; Clock clock = new Clock ( ) ; List < Contact > contacts = new ArrayList < Contact > ( ) ; List < Meeting > meetings = new ArrayList < Meeting > ( ) ; public ContactManagerImpl ( ) { } public ContactManagerImpl ( String fileLocation ) { } @ Override public int addFutureMeeting ( Set < Contact > contacts , Calendar date ) { } @ Override public PastMeeting getPastMeeting ( int id ) { } @ Override public FutureMeeting getFutureMeeting ( int id ) { } @ Override public Meeting getMeeting ( int id ) { } @ Override public List < Meeting > getFutureMeetingList ( Contact contact ) { } @ Override public List < Meeting > getFutureMeetingList ( Calendar date ) { } @ Override public List < PastMeeting > getPastMeetingList ( Contact contact ) { } @ Override public void addNewPastMeeting ( Set < Contact > contacts , Calendar date , String text ) { } @ Override public void addMeetingNotes ( int id , String text ) { } @ Override public void addNewContact ( String name , String notes ) { } @ Override public Set < Contact > getContacts ( int ... ids ) { } @ Override public Set < Contact > getContacts ( String name ) { } @ Override public void flush ( ) { } public String createFile ( ) { } private String contactToFileString ( Contact c ) { } private String meetingToFileString ( Meeting m ) { } private void launch ( ) { } private void readFile ( ) { } public boolean readLine ( String line ) { if ( getTagWithinArrows ( line , 0 ) . equals ( "Contact" ) ) { String nameTag = getStringByTag ( line , "NameTag" ) ; String notesTag = getStringByTag ( line , "NotesTag" ) ; contacts . add ( new ContactImpl ( getIntsByTag ( line , "ID" ) [ 0 ] , getStringByTag ( line , nameTag ) , getStringByTag ( line , notesTag ) ) ) ; ( countContact ) ++ ; } else if ( ( getTagWithinArrows ( line , 0 ) . equals ( "FutureMeeting" ) ) || ( getTagWithinArrows ( line , 0 ) . equals ( "PastMeeting" ) ) ) { int id = getIntsByTag ( line , "ID" ) [ 0 ] ; Set < Contact > cts = new HashSet < Contact > ( ) ; int [ ] ctIds = getIntsByTag ( line , "Contacts" ) ; <START_BUG> for ( int i = 1 ; i < ( ctIds . length ) ; i ++ ) <END_BUG> cts . add ( contacts . get ( ( ( ctIds [ i ] ) - 1 ) ) ) ; int [ ] dArr = getIntsByTag ( line , "Date" ) ; Calendar date = new GregorianCalendar ( dArr [ 0 ] , dArr [ 1 ] , dArr [ 2 ] , dArr [ 3 ] , dArr [ 4 ] , dArr [ 5 ] ) ; if ( getTagWithinArrows ( line , 0 ) . equals ( "PastMeeting" ) ) { String notes = getStringByTag ( line , getStringByTag ( line , "NoteTag" ) ) ; meetings . add ( new PastMeetingImpl ( id , date , cts , notes ) ) ; } else { meetings . add ( new FutureMeetingImpl ( id , date , cts ) ) ; } ( countMeeting ) ++ ; } return false ; } public String getStringByTag ( String line , String tag ) { } public int [ ] getIntsByTag ( String line , String tag ) { } private String getTagWithinArrows ( String line , int startLocation ) { } }

Fix:
for ( int i = 0 ; i < ( ctIds . length ) ; i ++ )
Buggy code:
public class DateEncrypter { private Integer firstDate = null ; private Integer numEncrypted = 0 ; private byte [ ] buffer1 = new byte [ 9 ] ; private Integer currentDate = null ; private DecompressStream inputStreamDecode = null ; private int len ; private CompressStream outputStreamEncode = null ; public DateEncrypter ( DecompressStream inputStreamDecode ) { } public Integer getFirstDate ( ) { } public int getNumEncrypted ( ) { } public Integer getNextDate ( ) { <START_BUG> len = inputStreamDecode . readRecord ( buffer1 , ( ( numEncrypted ) * 98 ) , 9 ) ; <END_BUG> if ( ( len ) != 9 ) { throw new IllegalArgumentException ( "Error:<seq2seq4repair_space>Input<seq2seq4repair_space>DecompressStream<seq2seq4repair_space>must<seq2seq4repair_space>be<seq2seq4repair_space>pointing<seq2seq4repair_space>to<seq2seq4repair_space>file<seq2seq4repair_space>of<seq2seq4repair_space>at<seq2seq4repair_space>least<seq2seq4repair_space>9<seq2seq4repair_space>bytes" ) ; } else { currentDate = ( ByteBuffer . wrap ( buffer1 ) . getInt ( ) ) - ( firstDate ) ; numEncrypted += 1 ; return currentDate ; } } }

Fix:
len = inputStreamDecode . readRecord ( buffer1 , 0 , 9 ) ;
Buggy code:
public class NormalizationH3 extends Normalization { private final float mu ; public NormalizationH3 ( ) { } public NormalizationH3 ( float mu ) { } @ Override public float tfn ( BasicStats stats , float tf , float len ) { <START_BUG> return ( ( tf + ( ( mu ) * ( ( stats . getTotalTermFreq ( ) ) // ( ( float ) ( stats . getNumberOfFieldTokens ( ) ) ) ) ) ) // ( len + ( mu ) ) ) * ( mu ) ; <END_BUG> } @ Override public String toString ( ) { } }

Fix:
return ( ( tf + ( ( mu ) * ( ( ( stats . getTotalTermFreq ( ) ) + 1.0F ) // ( ( stats . getNumberOfFieldTokens ( ) ) + 1.0F ) ) ) ) // ( len + ( mu ) ) ) * ( mu ) ;
Buggy code:
public class BootstrapTest { private void testAntiCompaction ( String columnFamilyName , int insertsPerTable ) throws IOException , InterruptedException , ExecutionException { Table table = Table . open ( "Keyspace1" ) ; ColumnFamilyStore store = table . getColumnFamilyStore ( columnFamilyName ) ; for ( int j = 0 ; j < insertsPerTable ; j ++ ) { String key = String . valueOf ( j ) ; RowMutation rm = new RowMutation ( "Keyspace1" , key ) ; rm . add ( new QueryPath ( columnFamilyName , null , "0" . getBytes ( ) ) , new byte [ 0 ] , j ) ; rm . apply ( ) ; } store . forceBlockingFlush ( ) ; List < String > fileList = new ArrayList < String > ( ) ; List < Range > ranges = new ArrayList < Range > ( ) ; IPartitioner partitioner = new CollatingOrderPreservingPartitioner ( ) ; Range r = new Range ( partitioner . getToken ( "0" ) , partitioner . getToken ( "zzzzzzz" ) ) ; ranges . add ( r ) ; <START_BUG> boolean result = store . doAntiCompaction ( ranges , new EndPoint ( "127.0.0.1" , 9150 ) , fileList ) ; <END_BUG> Assert . assertEquals ( true , result ) ; Assert . assertEquals ( true , ( ( fileList . size ( ) ) >= 3 ) ) ; } @ Test public void testAntiCompaction1 ( ) throws IOException , InterruptedException , ExecutionException { } @ Test public void testGetNewNames ( ) throws IOException { } }

Fix:
boolean result = store . forceCompaction ( ranges , new EndPoint ( "127.0.0.1" , 9150 ) , 0 , fileList ) ;
Buggy code:
public class MainTest extends TestCase { public void test_full ( ) throws Exception { } public void test_noConfigurationFile ( ) throws Exception { try { Main . main ( new String [ ] { "bad//path//sample.pont" } ) ; fail ( ) ; } catch ( IllegalArgumentException ex ) { <START_BUG> assertEquals ( "Fichier<seq2seq4repair_space>de<seq2seq4repair_space>configuration<seq2seq4repair_space>introuvable<seq2seq4repair_space>:<seq2seq4repair_space>bad//path//sample.pont" , ex . getLocalizedMessage ( ) ) ; <END_BUG> } } public void test_loadArguments ( ) throws Exception { } public void test_loadArguments_relationShip ( ) throws Exception { } }

Fix:
assertEquals ( "Fichier<seq2seq4repair_space>de<seq2seq4repair_space>configuration<seq2seq4repair_space>introuvable<seq2seq4repair_space>:<seq2seq4repair_space>bad//path//sample.pont" , ex . getLocalizedMessage ( ) . replaceAll ( "\\\\" , "//" ) ) ;
Buggy code:
public class SessionBeanMergingProcessor extends AbstractMergingProcessor < SessionBeanComponentDescription > { public SessionBeanMergingProcessor ( ) { } @ Override protected void handleAnnotations ( final DeploymentUnit deploymentUnit , final EEApplicationClasses applicationClasses , final DeploymentReflectionIndex deploymentReflectionIndex , final Class < ? > componentClass , final SessionBeanComponentDescription description ) throws DeploymentUnitProcessingException { } @ Override protected void handleDeploymentDescriptor ( final DeploymentUnit deploymentUnit , final DeploymentReflectionIndex deploymentReflectionIndex , final Class < ? > componentClass , final SessionBeanComponentDescription description ) throws DeploymentUnitProcessingException { if ( SessionBean . class . isAssignableFrom ( componentClass ) ) { description . getConfigurators ( ) . add ( new ComponentConfigurator ( ) { @ Override public void configure ( DeploymentPhaseContext context , ComponentDescription description , ComponentConfiguration configuration ) throws DeploymentUnitProcessingException { if ( SessionBean . class . isAssignableFrom ( configuration . getComponentClass ( ) ) ) { <START_BUG> configuration . addPostConstructInterceptor ( FACTORY , EJB_SET_SESSION_CONTEXT_METHOD_INVOCATION_INTERCEPTOR ) ; <END_BUG> } } } ) ; final InterceptorClassDescription . Builder builder = InterceptorClassDescription . builder ( ) ; builder . setPreDestroy ( MethodIdentifier . getIdentifier ( void . class , "ejbRemove" ) ) ; description . addInterceptorMethodOverride ( componentClass . getName ( ) , builder . build ( ) ) ; } } }

Fix:
configuration . addPostConstructInterceptor ( FACTORY , EJB_SET_CONTEXT_METHOD_INVOCATION_INTERCEPTOR ) ;
Buggy code:
public class MyComponent extends WebMarkupContainer { private static final long serialVersionUID = 1L ; private int intParam ; private Integer integerParam ; private long long1Param ; private Long long2Param ; private float float1Param ; private Float float2Param ; private double double1Param ; private Double double2Param ; private String hexParam ; private String dateParam ; public MyComponent ( final String id ) { } public void setIntParam ( final int intParam ) { } public void setIntegerParam ( final Integer integerParam ) { } public void setLong1Param ( final long long1Param ) { } public void setLong2Param ( final Long long2Param ) { } public void setFloat1Param ( final float float1Param ) { } public void setFloat2Param ( final Float float2Param ) { } public void setDouble1Param ( final double double1Param ) { } public void setDouble2Param ( final Double double2Param ) { } public void setDateParam ( final String dateParam ) { } public void setHexParam ( final String hexParam ) { } @ Override protected void onComponentTagBody ( MarkupStream markupStream , ComponentTag openTag ) { <START_BUG> StringBuffer str = new StringBuffer ( ) ; <END_BUG> str . append ( "intParam:<seq2seq4repair_space>" ) . append ( intParam ) . append ( "<br//>" ) ; str . append ( "integerParam:<seq2seq4repair_space>" ) . append ( integerParam . toString ( ) ) . append ( "<br//>" ) ; str . append ( "long1Param:<seq2seq4repair_space>" ) . append ( long1Param ) . append ( "<br//>" ) ; str . append ( "long2Param:<seq2seq4repair_space>" ) . append ( long2Param . toString ( ) ) . append ( "<br//>" ) ; str . append ( "float1Param:<seq2seq4repair_space>" ) . append ( float1Param ) . append ( "<br//>" ) ; str . append ( "float2Param:<seq2seq4repair_space>" ) . append ( float2Param . toString ( ) ) . append ( "<br//>" ) ; str . append ( "double1Param:<seq2seq4repair_space>" ) . append ( double1Param ) . append ( "<br//>" ) ; str . append ( "double2Param:<seq2seq4repair_space>" ) . append ( double2Param . toString ( ) ) . append ( "<br//>" ) ; str . append ( "dateParam:<seq2seq4repair_space>" ) . append ( dateParam ) . append ( "<br//>" ) ; str . append ( "hexParam:<seq2seq4repair_space>" ) . append ( hexParam ) . append ( "<br//>" ) ; getResponse ( ) . write ( str ) ; super . onComponentTagBody ( markupStream , openTag ) ; } }

Fix:
StringBuilder str = new StringBuilder ( ) ;
Buggy code:
final class BcelField extends ResolvedMemberImpl { private static int AccSynthetic = 4096 ; private Field field ; private boolean isAjSynthetic ; private boolean isSynthetic = false ; private AnnotationX [ ] annotations ; private World world ; private BcelObjectType bcelObjectType ; private UnresolvedType genericFieldType = null ; private boolean unpackedGenericSignature = false ; BcelField ( BcelObjectType declaringType , Field field ) { } private void unpackAttributes ( World world ) { Attribute [ ] attrs = field . getAttributes ( ) ; List as = BcelAttributes . readAjAttributes ( getDeclaringType ( ) . getClassName ( ) , attrs , getSourceContext ( world ) , world . getMessageHandler ( ) , bcelObjectType . getWeaverVersionAttribute ( ) ) ; <START_BUG> as . addAll ( AtAjAttributes . readAj5FieldAttributes ( field , world . resolve ( getDeclaringType ( ) ) , getSourceContext ( world ) , world . getMessageHandler ( ) ) ) ; <END_BUG> for ( Iterator iter = as . iterator ( ) ; iter . hasNext ( ) ; ) { AjAttribute a = ( ( AjAttribute ) ( iter . next ( ) ) ) ; if ( a instanceof AjAttribute . AjSynthetic ) { isAjSynthetic = true ; } else { throw new org . aspectj . weaver . BCException ( ( "weird<seq2seq4repair_space>field<seq2seq4repair_space>attribute<seq2seq4repair_space>" + a ) ) ; } } isAjSynthetic = false ; for ( int i = ( attrs . length ) - 1 ; i >= 0 ; i -- ) { if ( ( attrs [ i ] ) instanceof Synthetic ) isSynthetic = true ; } if ( ( ( field . getModifiers ( ) ) & ( BcelField . AccSynthetic ) ) != 0 ) { isSynthetic = true ; } } public boolean isAjSynthetic ( ) { } public boolean isSynthetic ( ) { } public boolean hasAnnotation ( UnresolvedType ofType ) { } public ResolvedType [ ] getAnnotationTypes ( ) { } private void ensureAnnotationTypesRetrieved ( ) { } public void addAnnotation ( AnnotationX annotation ) { } public UnresolvedType getGenericReturnType ( ) { } private void unpackGenericSignature ( ) { } }

Fix:
as . addAll ( AtAjAttributes . readAj5FieldAttributes ( field , this , world . resolve ( getDeclaringType ( ) ) , getSourceContext ( world ) , world . getMessageHandler ( ) ) ) ;
Buggy code:
public class ScreenBuilder extends ViewComponent { private ScreenData myData ; public ScreenBuilder ( ScreenData data , BufferedImage b ) { } public void buildStart ( ) { } public void buildEnd ( ) { } public void buildMap ( ) { try { myComponents . add ( new Background ( 0 , 0 , ImageIO . read ( ScreenBuilder . class . getResource ( "//mapbackground.png" ) ) ) ) ; myComponents . add ( new ViewComponents . AlloyBorderedButton ( myData . getComponents ( ) . get ( 0 ) , 698 , 425 , "END<seq2seq4repair_space>GAME" , 1 ) ) ; myComponents . add ( new ViewComponents . ViewMap ( myData . getComponents ( ) . get ( 1 ) , 146 , 0 ) ) ; myComponents . add ( new ViewComponents . TileInfoScreen ( myData . getComponents ( ) . get ( 1 ) , 660 , 0 ) ) ; myComponents . add ( new ResourcesInfoScreen ( ( ( ResourceManager ) ( myData . getComponents ( ) . get ( 2 ) ) ) , 0 , 0 ) ) ; RobotActionScreen r = new RobotActionScreen ( null , 0 , 300 ) ; <START_BUG> r . addComponent ( new ViewComponents . AlloyBorderedButton ( myData . getComponents ( ) . get ( 0 ) , 0 , 0 , "END<seq2seq4repair_space>GAME" , 1 ) ) ; <END_BUG> myComponents . add ( r ) ; } catch ( IOException e ) { e . printStackTrace ( ) ; } } @ Override public BufferedImage loadImage ( ) { } @ Override public BufferedImage loadHover ( ) { } }

Fix:
r . addComponent ( new ViewComponents . AlloyBorderedButton ( myData . getComponents ( ) . get ( 0 ) , 10 , 10 , "END<seq2seq4repair_space>GAME" , 1 ) ) ;
Buggy code:
public class URLTransfer extends ByteArrayTransfer { static URLTransfer _instance = new URLTransfer ( ) ; static final String CFSTR_INETURL = "UniformResourceLocator" ; static final int CFSTR_INETURLID = registerType ( URLTransfer . CFSTR_INETURL ) ; private URLTransfer ( ) { } public static URLTransfer getInstance ( ) { } public void javaToNative ( Object object , TransferData transferData ) { } public Object nativeToJava ( TransferData transferData ) { if ( ( ! ( isSupportedType ( transferData ) ) ) || ( ( transferData . pIDataObject ) == 0 ) ) return null ; IDataObject data = new IDataObject ( transferData . pIDataObject ) ; data . AddRef ( ) ; STGMEDIUM stgmedium = new STGMEDIUM ( ) ; FORMATETC formatetc = transferData . formatetc ; stgmedium . tymed = COM . TYMED_HGLOBAL ; <START_BUG> transferData . result = data . GetData ( formatetc , stgmedium ) ; <END_BUG> data . Release ( ) ; if ( ( transferData . result ) != ( COM . S_OK ) ) return null ; int hMem = stgmedium . unionField ; try { int lpMultiByteStr = OS . GlobalLock ( hMem ) ; if ( lpMultiByteStr == 0 ) return null ; try { int codePage = OS . GetACP ( ) ; int cchWideChar = OS . MultiByteToWideChar ( codePage , MB_PRECOMPOSED , lpMultiByteStr , ( - 1 ) , null , 0 ) ; if ( cchWideChar == 0 ) return null ; char [ ] lpWideCharStr = new char [ cchWideChar - 1 ] ; OS . MultiByteToWideChar ( codePage , MB_PRECOMPOSED , lpMultiByteStr , ( - 1 ) , lpWideCharStr , lpWideCharStr . length ) ; return new String ( lpWideCharStr ) ; } finally { OS . GlobalUnlock ( hMem ) ; } } finally { OS . GlobalFree ( hMem ) ; } } protected int [ ] getTypeIds ( ) { } protected String [ ] getTypeNames ( ) { } boolean checkURL ( Object object ) { } protected boolean validate ( Object object ) { } }

Fix:
transferData . result = getData ( data , formatetc , stgmedium ) ;
Buggy code:
public class MainScreen extends JFrame { static JFrame mainScreen ; private Account account ; DefaultTableModel dataModel ; @ SuppressWarnings ( "empty-statement" ) public MainScreen ( Account a ) { } @ SuppressWarnings ( "unchecked" ) private void initComponents ( ) { } private void newButtonActionPerformed ( ActionEvent evt ) { } private void viewButtonActionPerformed ( ActionEvent evt ) { } private void newBackButtonActionPerformed ( ActionEvent evt ) { ( ( CardLayout ) ( mainPanel . getLayout ( ) ) ) . show ( mainPanel , "startPanel" ) ; <START_BUG> hourSelector . setValue ( 0 ) ; <END_BUG> currentDate . setSelected ( false ) ; manualDateEntry . setText ( "" ) ; manualDateEntry . setEditable ( true ) ; } private void tableBackButtonActionPerformed ( ActionEvent evt ) { } private void currentDateActionPerformed ( ActionEvent evt ) { } private void submitButtonActionPerformed ( ActionEvent evt ) { } private void deleteButtonActionPerformed ( ActionEvent evt ) { } private JRadioButton currentDate ; private JLabel dateLabel ; private JButton deleteButton ; private JTable entryTable ; private JScrollPane entryTableHeader ; private JLabel greetingLabel ; private JLabel hourLabel ; private JSpinner hourSelector ; private JPanel mainPanel ; private JTextField manualDateEntry ; private JLabel nameLabel ; private JButton newBackButton ; private JButton newButton ; private JPanel newEntryPanel ; private JPanel startPanel ; private JButton submitButton ; private JButton tableBackButton ; private JLabel userName ; private JButton viewButton ; private JPanel viewEditPanel ; }

Fix:
hourSelector . setValue ( 1 ) ;
Buggy code:
public class Test extends TestCase { public void testRedirect ( ) { final WicketTester tester = new WicketTester ( ) ; final IAuthorizationStrategy authorizationStrategy = new SimplePageAuthorizationStrategy ( RedirectPage . class , LoginPage . class ) { protected boolean isAuthorized ( ) { return false ; } } ; <START_BUG> tester . getSecuritySettings ( ) . setAuthorizationStrategy ( authorizationStrategy ) ; <END_BUG> tester . startPage ( RedirectPage . class ) ; tester . assertRenderedPage ( LoginPage . class ) ; } }

Fix:
tester . getApplication ( ) . getSecuritySettings ( ) . setAuthorizationStrategy ( authorizationStrategy ) ;
Buggy code:
public class DomainLifecycleUtil { private static final ThreadFactory threadFactory = new DomainLifecycleUtil . AsyncThreadFactory ( ) ; private final Logger log = Logger . getLogger ( DomainLifecycleUtil . class . getName ( ) ) ; private Process process ; private Thread shutdownThread ; private final JBossAsManagedConfiguration configuration ; private DomainClient domainClient ; private Map < ServerIdentity , ServerStatus > serverStatuses = new HashMap < ServerIdentity , ServerStatus > ( ) ; private Map < ServerIdentity , DomainLifecycleUtil . MBeanServerConnectionProvider > jmxConnectionProviders = new HashMap < ServerIdentity , DomainLifecycleUtil . MBeanServerConnectionProvider > ( ) ; private Map < ServerIdentity , MBeanServerConnection > jmxConnections = new HashMap < ServerIdentity , MBeanServerConnection > ( ) ; private DomainLifecycleUtil . MBeanServerConnectionProvider [ ] providers ; private ExecutorService executor ; public DomainLifecycleUtil ( final JBossAsManagedConfiguration configuration ) { } public void start ( ) { } public Future < Void > startAsync ( ) { } public void stop ( ) { } public Future < Void > stopAsync ( ) { } public synchronized DomainClient getDomainClient ( ) { } private synchronized ExecutorService getExecutorService ( ) { } private boolean areServersStarted ( ) { } private synchronized void safeCloseDomainClient ( ) { } private Map < ServerIdentity , ServerStatus > getServerStatuses ( ) { } private ModelNode readAttribute ( String name , ModelNode address ) { } private ModelNode executeForResult ( ModelNode op ) { } private ModelNode executeForResult ( NewOperation op ) { } private DomainLifecycleUtil . MBeanServerConnectionProvider getMBeanServerConnectionProvider ( ServerIdentity server ) throws IOException { } public static void main ( String [ ] args ) throws Exception { } private class ConsoleConsumer implements Runnable { @ Override public void run ( ) { final InputStream stream = process . getInputStream ( ) ; final BufferedReader reader = new BufferedReader ( new InputStreamReader ( stream ) ) ; final boolean writeOutput = AccessController . doPrivileged ( new PrivilegedAction < Boolean > ( ) { @ Override public Boolean run ( ) { String val = System . getProperty ( "org.jboss.as.writeconsole" ) ; <START_BUG> return ( val != null ) && ( "true" . equals ( val ) ) ; <END_BUG> } } ) ; String line = null ; try { while ( ( line = reader . readLine ( ) ) != null ) { if ( writeOutput ) { System . out . println ( line ) ; } } } catch ( IOException e ) { } } } public final class MBeanServerConnectionProvider { private final InetAddress hostAddr ; private final int port ; private JMXConnector jmxConnector ; public MBeanServerConnectionProvider ( InetAddress hostAddr , int port ) { } public MBeanServerConnection getConnection ( ) { } } private static final class AsyncThreadFactory implements ThreadFactory { private int threadCount ; @ Override public Thread newThread ( Runnable r ) { } } }

Fix:
return ( val == null ) || ( ! ( "false" . equals ( val ) ) ) ;
Buggy code:
public class BooleanQuery extends Query { private static int maxClauseCount = 1024 ; public static class TooManyClauses extends RuntimeException { } public static int getMaxClauseCount ( ) { } public static void setMaxClauseCount ( int maxClauseCount ) { } private Vector clauses = new Vector ( ) ; public BooleanQuery ( ) { } public void add ( Query query , boolean required , boolean prohibited ) { } public void add ( BooleanClause clause ) { } public BooleanClause [ ] getClauses ( ) { } private class BooleanWeight implements Weight { private Searcher searcher ; private float norm ; private Vector weights = new Vector ( ) ; public BooleanWeight ( Searcher searcher ) { } public Query getQuery ( ) { } public float getValue ( ) { } public float sumOfSquaredWeights ( ) throws IOException { } public void normalize ( float norm ) { } public Scorer scorer ( IndexReader reader ) throws IOException { } public Explanation explain ( IndexReader reader , int doc ) throws IOException { } } protected Weight createWeight ( Searcher searcher ) { } public Query rewrite ( IndexReader reader ) throws IOException { if ( ( clauses . size ( ) ) == 1 ) { BooleanClause c = ( ( BooleanClause ) ( clauses . elementAt ( 0 ) ) ) ; if ( ! ( c . prohibited ) ) { <START_BUG> Query query = c . query ; <END_BUG> if ( ( getBoost ( ) ) != 1.0F ) { query = ( ( Query ) ( query . clone ( ) ) ) ; query . setBoost ( ( ( getBoost ( ) ) * ( query . getBoost ( ) ) ) ) ; } return query ; } } BooleanQuery clone = null ; for ( int i = 0 ; i < ( clauses . size ( ) ) ; i ++ ) { BooleanClause c = ( ( BooleanClause ) ( clauses . elementAt ( i ) ) ) ; Query query = c . query . rewrite ( reader ) ; if ( query != ( c . query ) ) { if ( clone == null ) clone = ( ( BooleanQuery ) ( this . clone ( ) ) ) ; clone . clauses . setElementAt ( new BooleanClause ( query , c . required , c . prohibited ) , i ) ; } } if ( clone != null ) { return clone ; } else return this ; } public Object clone ( ) { } public String toString ( String field ) { } public boolean equals ( Object o ) { } public int hashCode ( ) { } }

Fix:
Query query = c . query . rewrite ( reader ) ;
Buggy code:
public class MappingJackson2HttpMessageConverter extends AbstractHttpMessageConverter < Object > { public static final Charset DEFAULT_CHARSET = Charset . forName ( "UTF-8" ) ; private ObjectMapper objectMapper = new ObjectMapper ( ) ; private boolean prefixJson = false ; private Boolean prettyPrint ; public MappingJackson2HttpMessageConverter ( ) { } public void setObjectMapper ( ObjectMapper objectMapper ) { } private void configurePrettyPrint ( ) { } public ObjectMapper getObjectMapper ( ) { } public void setPrefixJson ( boolean prefixJson ) { } public void setPrettyPrint ( boolean prettyPrint ) { } @ Override public boolean canRead ( Class < ? > clazz , MediaType mediaType ) { } @ Override public boolean canWrite ( Class < ? > clazz , MediaType mediaType ) { } @ Override protected boolean supports ( Class < ? > clazz ) { } @ Override protected Object readInternal ( Class < ? > clazz , HttpInputMessage inputMessage ) throws IOException , HttpMessageNotReadableException { JavaType javaType = getJavaType ( clazz ) ; try { return this . objectMapper . readValue ( inputMessage . getBody ( ) , javaType ) ; <START_BUG> } catch ( JsonProcessingException ex ) { <END_BUG> throw new HttpMessageNotReadableException ( ( "Could<seq2seq4repair_space>not<seq2seq4repair_space>read<seq2seq4repair_space>JSON:<seq2seq4repair_space>" + ( ex . getMessage ( ) ) ) , ex ) ; } } @ Override protected void writeInternal ( Object object , HttpOutputMessage outputMessage ) throws IOException , HttpMessageNotWritableException { } protected JavaType getJavaType ( Class < ? > clazz ) { } protected JsonEncoding getJsonEncoding ( MediaType contentType ) { } }

Fix:
} catch ( IOException ex ) {
Buggy code:
public class Gff3FeatureTest { @ Test public void testAttributes ( ) throws Exception { <START_BUG> Gff3Feature feature = new Gff3Feature . Builder ( "chr1" , "ttt" , 0 , 5 ) . putAttributes ( "x" , Arrays . asList ( "a" , "b" , "c" ) ) . putAttributes ( "y" , Collections . emptyList ( ) ) . build ( ) ; <END_BUG> assertEquals ( Arrays . asList ( "a" , "b" , "c" ) , feature . getAttributes ( "x" ) ) ; assertEquals ( Collections . emptyList ( ) , feature . getAttributes ( "z" ) ) ; assertEquals ( Collections . emptyList ( ) , feature . getAttributes ( "notinthemap" ) ) ; } No newline ; at end ; of file ; }

Fix:
Gff3Feature feature = new Gff3Feature . Builder ( "chr1" , "ttt" , 0 , 5 ) . setSource ( "source" ) . putAttributes ( "x" , Arrays . asList ( "a" , "b" , "c" ) ) . putAttributes ( "y" , Collections . emptyList ( ) ) . build ( ) ;
Buggy code:
class PackageDeclaration extends SourceRefElement implements IPackageDeclaration { protected PackageDeclaration ( CompilationUnit parent , String name ) { } public boolean equals ( Object o ) { } protected boolean equalsDOMNode ( IDOMNode node ) { } public int getElementType ( ) { } protected char getHandleMementoDelimiter ( ) { } public IJavaElement getPrimaryElement ( boolean checkOwner ) { CompilationUnit cu = ( ( CompilationUnit ) ( getAncestor ( IJavaElement . COMPILATION_UNIT ) ) ) ; <START_BUG> if ( checkOwner && ( ( cu . owner ) == ( DefaultWorkingCopyOwner . PRIMARY ) ) ) <END_BUG> return this ; return cu . getPackageDeclaration ( fName ) ; } protected void toStringInfo ( int tab , StringBuffer buffer , Object info ) { } }

Fix:
if ( checkOwner && ( cu . isPrimary ( ) ) )
Buggy code:
public class ScrollBar extends Widget { Scrollable parent ; ScrollBar ( Scrollable parent , int style ) { } public void addSelectionListener ( SelectionListener listener ) { } static int checkStyle ( int style ) { } void createHandle ( ) { } void deregister ( ) { } void destroyWidget ( ) { } public boolean getEnabled ( ) { } public int getIncrement ( ) { } public int getMaximum ( ) { } public int getMinimum ( ) { } public int getPageIncrement ( ) { } public Scrollable getParent ( ) { } public int getSelection ( ) { } public Point getSize ( ) { } public int getThumb ( ) { } public boolean getVisible ( ) { } void HandleScroll ( int sender , int e ) { } void hookEvents ( ) { } public boolean isEnabled ( ) { } public boolean isVisible ( ) { } void register ( ) { } void releaseHandle ( ) { } void releaseParent ( ) { } public void removeSelectionListener ( SelectionListener listener ) { } public void setEnabled ( boolean enabled ) { } public void setIncrement ( int value ) { } public void setMaximum ( int value ) { } public void setMinimum ( int value ) { } public void setPageIncrement ( int value ) { } public void setSelection ( int selection ) { } public void setThumb ( int value ) { } public void setValues ( int selection , int minimum , int maximum , int thumb , int increment , int pageIncrement ) { } public void setVisible ( boolean visible ) { checkWidget ( ) ; int topHandle = topHandle ( ) ; if ( ( ( OS . UIElement_Visibility ( topHandle ) ) == ( OS . Visibility_Visible ) ) == visible ) return ; if ( visible ) { sendEvent ( Show ) ; if ( isDisposed ( ) ) return ; } <START_BUG> OS . UIElement_Visibility ( topHandle , ( visible ? OS . Visibility_Visible : OS . Visibility_Hidden ) ) ; <END_BUG> if ( isDisposed ( ) ) return ; if ( ! visible ) { sendEvent ( Hide ) ; if ( isDisposed ( ) ) return ; } } int topHandle ( ) { } }

Fix:
OS . UIElement_Visibility ( topHandle , ( visible ? OS . Visibility_Visible : OS . Visibility_Collapsed ) ) ;
Buggy code:
public class LoginActivity extends Activity { @ Override protected void onCreate ( Bundle savedInstanceState ) { super . onCreate ( savedInstanceState ) ; setContentView ( activity_login ) ; final EditText tvUser = ( ( EditText ) ( findViewById ( username ) ) ) ; final EditText tvPass = ( ( EditText ) ( findViewById ( password ) ) ) ; Button b = ( ( Button ) ( findViewById ( login_button ) ) ) ; b . setOnClickListener ( new View . OnClickListener ( ) { @ Override public void onClick ( View view ) { String filename = "session" ; String myusername = tvUser . getText ( ) . toString ( ) ; String mypassword = tvPass . getText ( ) . toString ( ) ; FileOutputStream outputStream ; if ( ( myusername . matches ( "admin" ) ) && ( mypassword . matches ( "gravelord" ) ) ) { String mylogin = ( myusername + ";" ) + mypassword ; try { outputStream = openFileOutput ( filename , MODE_PRIVATE ) ; outputStream . write ( mylogin . getBytes ( ) ) ; outputStream . close ( ) ; } catch ( Exception e ) { e . printStackTrace ( ) ; } Intent leggo = new Intent ( LoginActivity . this , MainActivity . class ) ; startActivity ( leggo ) ; } else { tvUser . setText ( "" ) ; tvPass . setText ( "" ) ; <START_BUG> Toast . makeText ( getApplicationContext ( ) , ( ( "x" + mypassword ) + "x" ) , LENGTH_LONG ) . show ( ) ; <END_BUG> } } } ) ; } @ Override public boolean onCreateOptionsMenu ( Menu menu ) { } @ Override public boolean onOptionsItemSelected ( MenuItem item ) { } }

Fix:
Toast . makeText ( getApplicationContext ( ) , "Invalid<seq2seq4repair_space>Username<seq2seq4repair_space>or<seq2seq4repair_space>Password" , LENGTH_LONG ) . show ( ) ;
Buggy code:
@ Aspect public class DexBackedDexFileAj { public static void verifyMagicAndByteOrder ( @ Nonnull byte [ ] buf , int offset ) { } private static final byte [ ] MAGIC = new byte [ ] { 100 , 101 , 120 , 10 , 48 , 51 } ; @ Around ( "execution(org.jf.dexlib2.dexbacked.DexBackedDexFile<seq2seq4repair_space>org.jf.dexlib2.dexbacked.DexBackedDexFile.fromInputStream(..))" + "&&<seq2seq4repair_space>args(opcodes,<seq2seq4repair_space>is)" ) public DexBackedDexFile fromInputStream ( Opcodes opcodes , InputStream is ) throws IOException { if ( ! ( is . markSupported ( ) ) ) { throw new IllegalArgumentException ( "InputStream<seq2seq4repair_space>must<seq2seq4repair_space>support<seq2seq4repair_space>mark" ) ; } byte [ ] flag = new byte [ DexBackedDexFileAj . MAGIC . length ] ; int skip = 0 ; int len = ( is . available ( ) ) - 44 ; for ( int i = 0 ; i < len ; i ++ ) { is . mark ( len ) ; is . skip ( i ) ; is . read ( flag ) ; if ( Arrays . equals ( flag , DexBackedDexFileAj . MAGIC ) ) { int ver = is . read ( ) ; int non = is . read ( ) ; if ( ( ( non == 0 ) && ( ver >= 53 ) ) && ( ver <= 54 ) ) { skip = i ; if ( skip != 0 ) { LogHelper . info ( ( "Search<seq2seq4repair_space>Dex<seq2seq4repair_space>Offset<seq2seq4repair_space>:<seq2seq4repair_space>" + skip ) ) ; } is . reset ( ) ; break ; } } is . reset ( ) ; } is . mark ( ( 44 + skip ) ) ; is . skip ( skip ) ; byte [ ] partialHeader = new byte [ 44 ] ; try { ByteStreams . readFully ( is , partialHeader ) ; } catch ( EOFException ex ) { throw new DexBackedDexFile . NotADexFile ( "File<seq2seq4repair_space>is<seq2seq4repair_space>too<seq2seq4repair_space>short" ) ; } finally { is . reset ( ) ; } DexBackedDexFileAj . verifyMagicAndByteOrder ( partialHeader , 0 ) ; byte [ ] buf = ByteStreams . toByteArray ( is ) ; <START_BUG> return new DexBackedDexFile ( opcodes , buf , 0 , false , null ) ; <END_BUG> } }

Fix:
return new DexBackedDexFile ( opcodes , buf , skip , false , null ) ;
Buggy code:
public class FilterPreferencesAction extends AbstractColumbaAction implements SelectionListener { public FilterPreferencesAction ( FrameMediator frameMediator ) { } public void actionPerformed ( ActionEvent evt ) { FolderCommandReference [ ] r = ( ( FolderCommandReference [ ] ) ( frameMediator . getSelectionManager ( ) . getSelection ( "mail.tree" ) ) ) ; MessageFolder folder = ( ( MessageFolder ) ( r [ 0 ] . getFolder ( ) ) ) ; if ( folder == null ) { return ; } FolderItem item = folder . getConfiguration ( ) ; if ( item == null ) { return ; } if ( folder instanceof VirtualFolder ) { new SearchFrame ( ( ( AbstractMailFrameController ) ( frameMediator ) ) , ( ( VirtualFolder ) ( folder ) ) ) ; } else { <START_BUG> new org . columba . mail . gui . config . filter . ConfigFrame ( folder ) ; <END_BUG> } } public void selectionChanged ( SelectionChangedEvent e ) { } }

Fix:
new org . columba . mail . gui . config . filter . ConfigFrame ( frameMediator . getView ( ) . getFrame ( ) , folder ) ;
Buggy code:
public class ExtensionsFileFilter extends FileFilter { private String mDescription = "" ; private ArrayList acceptableExtensions = new ArrayList ( 3 ) ; public ExtensionsFileFilter ( ) { } public void addExtension ( String pExtension ) { } public void removeExtension ( String pExtension ) { } public void setDescription ( String pDescription ) { } public String getDescription ( ) { } public boolean accept ( File pFile ) { if ( pFile . isDirectory ( ) ) { return true ; } <START_BUG> if ( ( acceptableExtensions . contains ( getExtension ( pFile ) ) ) == true ) { <END_BUG> return true ; } return false ; } private String getExtension ( File pFile ) { } }

Fix:
if ( acceptableExtensions . contains ( getExtension ( pFile ) ) ) {
Buggy code:
public class PageVersioningTest { WicketTester wicketTester ; @ Before public void setup ( ) { } @ Test public void versionPage ( ) { } private void checkPageVersionsAreStored ( Page versioningPage ) { <START_BUG> IPageManager pageManager = wicketTester . getApplication ( ) . getPageManager ( ) ; <END_BUG> int lastPageId = versioningPage . getPageId ( ) ; while ( lastPageId >= 0 ) { assertNotNull ( pageManager . getPage ( lastPageId ) ) ; lastPageId -- ; } } private static final class PageVersioningApplication extends WebApplication { @ Override public Class < ? extends Page > getHomePage ( ) { } @ Override public IPageManagerContext getPageManagerContext ( ) { } } }

Fix:
IPageManager pageManager = wicketTester . getSession ( ) . getPageManager ( ) ;
Buggy code:
public final class IntrospectionUtils { public static void execute ( Object proxy , String method ) throws Exception { } public static void setAttribute ( Object proxy , String n , Object v ) throws Exception { } public static ClassLoader getURLClassLoader ( URL [ ] urls , ClassLoader parent ) { } public static String guessInstall ( String installSysProp , String homeSysProp , String jarName ) { } public static String guessInstall ( String installSysProp , String homeSysProp , String jarName , String classFile ) { String install = null ; String home = null ; if ( installSysProp != null ) install = System . getProperty ( installSysProp ) ; if ( homeSysProp != null ) home = System . getProperty ( homeSysProp ) ; if ( install != null ) { if ( home == null ) System . getProperties ( ) . put ( homeSysProp , install ) ; return install ; } if ( home != null ) { <START_BUG> System . setProperty ( installSysProp , home ) ; <END_BUG> return home ; } String cpath = System . getProperty ( "java.class.path" ) ; String pathSep = System . getProperty ( "path.separator" ) ; StringTokenizer st = new StringTokenizer ( cpath , pathSep ) ; while ( st . hasMoreTokens ( ) ) { String path = st . nextToken ( ) ; if ( path . endsWith ( jarName ) ) { home = path . substring ( 0 , ( ( path . length ( ) ) - ( jarName . length ( ) ) ) ) ; try { File f = new File ( home ) ; File f1 = new File ( f , ".." ) ; install = f1 . getCanonicalPath ( ) ; if ( installSysProp != null ) System . getProperties ( ) . put ( installSysProp , install ) ; if ( homeSysProp != null ) System . getProperties ( ) . put ( homeSysProp , install ) ; return install ; } catch ( Exception ex ) { ex . printStackTrace ( ) ; } } else { String fname = ( path + ( path . endsWith ( "//" ) ? "" : "//" ) ) + classFile ; if ( new File ( fname ) . exists ( ) ) { try { File f = new File ( path ) ; File f1 = new File ( f , ".." ) ; install = f1 . getCanonicalPath ( ) ; if ( installSysProp != null ) System . getProperties ( ) . put ( installSysProp , install ) ; if ( homeSysProp != null ) System . getProperties ( ) . put ( homeSysProp , install ) ; return install ; } catch ( Exception ex ) { ex . printStackTrace ( ) ; } } } } return null ; } public static void setProperty ( Object o , String name , String value ) { } public static String replaceProperties ( String value , Object getter ) { } public static String capitalize ( String name ) { } public static interface PropertySource { public String getProperty ( String key ) { } } static final int dbg = 0 ; static void d ( String s ) { } }

Fix:
System . getProperties ( ) . put ( installSysProp , home ) ;