nus-yam/ex-repair huggingface dataset:
Buggy code:
public final class Utility { private AbstractReasonerComponent reasoner ; ClassHierarchy sh ; private boolean instanceBasedDisjoints = true ; private Map < OWLClassExpression , Map < OWLClassExpression , Boolean > > cachedDisjoints = new TreeMap < OWLClassExpression , Map < OWLClassExpression , Boolean > > ( ) ; private Map < OWLClassExpression , SortedSet < OWLObjectProperty > > appOPCache = new TreeMap < OWLClassExpression , SortedSet < OWLObjectProperty > > ( ) ; private Map < OWLClassExpression , SortedSet < OWLDataProperty > > appDPCache = new TreeMap < OWLClassExpression , SortedSet < OWLDataProperty > > ( ) ; private Map < OWLObjectProperty , OWLClassExpression > opDomains ; private Map < OWLDataProperty , OWLClassExpression > dpDomains ; private OWLDataFactory df = new OWLDataFactoryImpl ( ) ; public Utility ( AbstractReasonerComponent rs ) { } public Utility ( AbstractReasonerComponent rs , Map < OWLObjectProperty , OWLClassExpression > opDomains , boolean instanceBasedDisjoints ) { } public Utility ( AbstractReasonerComponent rs , Map < OWLObjectProperty , OWLClassExpression > opDomains , Map < OWLDataProperty , OWLClassExpression > dpDomains , boolean instanceBasedDisjoints ) { } public SortedSet < OWLObjectProperty > computeApplicableObjectProperties ( OWLClassExpression index ) { } public SortedSet < OWLDataProperty > computeApplicableDatatypeProperties ( OWLClassExpression index ) { } public Set < OWLObjectProperty > computeMgr ( Set < OWLObjectProperty > applicableObjectProperties ) { } public Set < OWLDataProperty > computeMgrDP ( Set < OWLDataProperty > applicableDatatypeProperties ) { } public Set < OWLClass > getClassCandidates ( OWLClassExpression index , Set < OWLClass > existingClasses ) { } private Set < OWLClass > getClassCandidatesRecursive ( OWLClassExpression index , Set < OWLClass > existingClasses , OWLClassExpression upperClass ) { Set < OWLClass > candidates = new TreeSet < OWLClass > ( ) ; <START_BUG> for ( OWLClassExpression d : sh . getSubClasses ( upperClass ) ) { <END_BUG> if ( ! ( d . isOWLNothing ( ) ) ) { OWLClass candidate = d . asOWLClass ( ) ; if ( ( ( ! ( isDisjoint ( candidate , index ) ) ) && ( checkSubClasses ( existingClasses , candidate ) ) ) && ( checkDisjoints ( existingClasses , candidate ) ) ) { if ( ( ! ( isDisjoint ( df . getOWLObjectComplementOf ( candidate ) , index ) ) ) && ( checkSuperClasses ( existingClasses , candidate ) ) ) { candidates . add ( candidate ) ; } else { candidates . addAll ( getClassCandidatesRecursive ( index , existingClasses , candidate ) ) ; } } } } return candidates ; } private boolean checkSubClasses ( Set < OWLClass > existingClasses , OWLClass candidate ) { } private boolean checkSuperClasses ( Set < OWLClass > existingClasses , OWLClass candidate ) { } private boolean checkDisjoints ( Set < OWLClass > existingClasses , OWLClass candidate ) { } public boolean isDisjoint ( OWLClassExpression d1 , OWLClassExpression d2 ) { } private boolean isDisjointInstanceBased ( OWLClassExpression d1 , OWLClassExpression d2 ) { } No newline ; at end ; of file ; }

Fix:
for ( OWLClassExpression d : sh . getSubClasses ( upperClass , true ) ) {
Buggy code:
public class VersionInfo { private static Package myPackage ; private static VersionAnnotation version ; static Package getPackage ( ) { } public static String getVersion ( ) { } public static String getRevision ( ) { } public static String getBranch ( ) { } public static String getDate ( ) { } public static String getUser ( ) { } public static String getUrl ( ) { } public static String getSrcChecksum ( ) { } public static String getBuildVersion ( ) { } public static void main ( String [ ] args ) { System . out . println ( ( "Storm<seq2seq4repair_space>" + ( VersionInfo . getVersion ( ) ) ) ) ; <START_BUG> System . out . println ( ( ( ( "Subversion<seq2seq4repair_space>" + ( VersionInfo . getUrl ( ) ) ) + "<seq2seq4repair_space>-r<seq2seq4repair_space>" ) + ( VersionInfo . getRevision ( ) ) ) ) ; <END_BUG> System . out . println ( ( "Branch<seq2seq4repair_space>" + ( VersionInfo . getBranch ( ) ) ) ) ; System . out . println ( ( ( ( "Compiled<seq2seq4repair_space>by<seq2seq4repair_space>" + ( VersionInfo . getUser ( ) ) ) + "<seq2seq4repair_space>on<seq2seq4repair_space>" ) + ( VersionInfo . getDate ( ) ) ) ) ; System . out . println ( ( "From<seq2seq4repair_space>source<seq2seq4repair_space>with<seq2seq4repair_space>checksum<seq2seq4repair_space>" + ( VersionInfo . getSrcChecksum ( ) ) ) ) ; } }

Fix:
System . out . println ( ( ( ( "URL<seq2seq4repair_space>" + ( VersionInfo . getUrl ( ) ) ) + "<seq2seq4repair_space>-r<seq2seq4repair_space>" ) + ( VersionInfo . getRevision ( ) ) ) ) ;
Buggy code:
public class PingRequestHandlerTest extends SolrTestCaseJ4 { private final String fileName = ( this . getClass ( ) . getName ( ) ) + ".server-enabled" ; private File healthcheckFile = null ; private PingRequestHandler handler = null ; @ BeforeClass public static void beforeClass ( ) throws Exception { } @ Before public void before ( ) throws IOException { } public void testPingWithNoHealthCheck ( ) throws Exception { } public void testEnablingServer ( ) throws Exception { assertTrue ( ( ! ( healthcheckFile . exists ( ) ) ) ) ; SolrQueryResponse sqr = makeRequest ( handler , req ( ) ) ; SolrException se = ( ( SolrException ) ( sqr . getException ( ) ) ) ; assertEquals ( "Response<seq2seq4repair_space>should<seq2seq4repair_space>have<seq2seq4repair_space>been<seq2seq4repair_space>replaced<seq2seq4repair_space>with<seq2seq4repair_space>a<seq2seq4repair_space>503<seq2seq4repair_space>SolrException." , se . code ( ) , code ) ; makeRequest ( handler , req ( "action" , "enable" ) ) ; assertTrue ( healthcheckFile . exists ( ) ) ; <START_BUG> assertNotNull ( FileUtils . readFileToString ( healthcheckFile ) , "UTF-8" ) ; <END_BUG> SolrQueryResponse rsp = makeRequest ( handler , req ( ) ) ; assertEquals ( "OK" , rsp . getValues ( ) . get ( "status" ) ) ; makeRequest ( handler , req ( "action" , "enable" ) ) ; assertTrue ( healthcheckFile . exists ( ) ) ; } public void testDisablingServer ( ) throws Exception { } public void testGettingStatus ( ) throws Exception { } public void testBadActionRaisesException ( ) throws Exception { } private SolrQueryResponse makeRequest ( PingRequestHandler handler , SolrQueryRequest req ) throws Exception { } }

Fix:
assertNotNull ( FileUtils . readFileToString ( healthcheckFile , "UTF-8" ) ) ;
Buggy code:
public class MemberDetailFragment extends ListFragment { private static final String TAG = MemberDetailFragment . class . getSimpleName ( ) ; private static final int IMAGE_MAX_SIZE = 10 ; private Showcase mShowcase ; private List < String > mImageUrls = new ArrayList < String > ( ) ; private MemberDetailActivity mActivity ; private Entry mEntry ; private MemberFeedListAdapter mMemberFeedListAdapter ; private String mFeedUrl ; @ Override public void onCreate ( Bundle savedInstanceState ) { } @ Override public void onAttach ( Activity activity ) { } @ Override public void onViewCreated ( View view , Bundle savedInstanceState ) { } private void setupMemberFeedList ( String feedUrl ) { } @ Override public void onActivityCreated ( Bundle savedInstanceState ) { } private void setupAdapter ( Entries entries ) { } private void setupShowcase ( Entries entries ) { for ( int i = 0 ; i < ( entries . size ( ) ) ; i ++ ) { Entry e = entries . get ( i ) ; List < String > images = JsoupUtils . getThumbnailImageUrls ( e . content , ( ( MemberDetailFragment . IMAGE_MAX_SIZE ) - ( mImageUrls . size ( ) ) ) ) ; ArrayUtils . concatenation ( images , mImageUrls ) ; if ( ( mImageUrls . size ( ) ) >= ( MemberDetailFragment . IMAGE_MAX_SIZE ) ) { break ; } } Logger . v ( MemberDetailFragment . TAG , ( ( "setupShowcase<seq2seq4repair_space>:<seq2seq4repair_space>url(" + ( mImageUrls . toString ( ) ) ) + ")" ) ) ; <START_BUG> int height = ( ( int ) ( 300 * ( getResources ( ) . getDisplayMetrics ( ) . density ) ) ) ; <END_BUG> mShowcase = new Showcase ( getActivity ( ) , mImageUrls , new Showcase . FavoriteChangeListener ( ) { @ Override public void onCheckdChanged ( CompoundButton compoundButton , boolean isChecked ) { DataStoreUtils . favorite ( getActivity ( ) , mFeedUrl , isChecked ) ; } } ) ; mShowcase . setLayoutParams ( new android . widget . AbsListView . LayoutParams ( LayoutParams . MATCH_PARENT , height ) ) ; mShowcase . setFavorite ( DataStoreUtils . alreadyExist ( getActivity ( ) , mFeedUrl ) ) ; ListView listView = getListView ( ) ; listView . addHeaderView ( mShowcase , null , false ) ; } }

Fix:
int height = ( ( int ) ( 300 * ( mActivity . getResources ( ) . getDisplayMetrics ( ) . density ) ) ) ;
Buggy code:
public class Move extends Copy { public Move ( ) { } protected void validateAttributes ( ) throws BuildException { } protected void doFileOperations ( ) { } private void moveFile ( File fromFile , File toFile , boolean filtering , boolean overwrite ) { } private void copyFile ( File fromFile , File toFile , boolean filtering , boolean overwrite ) { } protected boolean okToDelete ( File d ) { } protected void deleteDir ( File d ) { } protected void deleteDir ( File d , boolean deleteFiles ) { } protected boolean renameFile ( File sourceFile , File destFile , boolean filtering , boolean overwrite ) throws IOException , BuildException { if ( ( ( ( destFile . isDirectory ( ) ) || filtering ) || ( ( getFilterSets ( ) . size ( ) ) > 0 ) ) || ( ( getFilterChains ( ) . size ( ) ) > 0 ) ) { return false ; } if ( ( destFile . isFile ( ) ) && ( ! ( destFile . canWrite ( ) ) ) ) { if ( ! ( getForce ( ) ) ) { throw new IOException ( ( ( "can't<seq2seq4repair_space>replace<seq2seq4repair_space>read-only<seq2seq4repair_space>destination<seq2seq4repair_space>" + "file<seq2seq4repair_space>" ) + destFile ) ) ; } else if ( ! ( getFileUtils ( ) . tryHardToDelete ( destFile ) ) ) { throw new IOException ( ( ( "failed<seq2seq4repair_space>to<seq2seq4repair_space>delete<seq2seq4repair_space>read-only<seq2seq4repair_space>" + "destination<seq2seq4repair_space>file<seq2seq4repair_space>" ) + destFile ) ) ; } } File parent = destFile . getParentFile ( ) ; if ( ( parent != null ) && ( ! ( parent . exists ( ) ) ) ) { parent . mkdirs ( ) ; } else if ( destFile . isFile ( ) ) { sourceFile = getFileUtils ( ) . normalize ( sourceFile . getAbsolutePath ( ) ) . getCanonicalFile ( ) ; destFile = getFileUtils ( ) . normalize ( destFile . getAbsolutePath ( ) ) ; if ( destFile . getAbsolutePath ( ) . equals ( sourceFile . getAbsolutePath ( ) ) ) { log ( ( ( ( ( "Rename<seq2seq4repair_space>of<seq2seq4repair_space>" + sourceFile ) + "<seq2seq4repair_space>to<seq2seq4repair_space>" ) + destFile ) + "<seq2seq4repair_space>is<seq2seq4repair_space>a<seq2seq4repair_space>no-op." ) , MSG_VERBOSE ) ; return true ; } <START_BUG> if ( ! ( ( sourceFile . equals ( destFile . getCanonicalFile ( ) ) ) || ( destFile . delete ( ) ) ) ) { <END_BUG> throw new BuildException ( ( "Unable<seq2seq4repair_space>to<seq2seq4repair_space>remove<seq2seq4repair_space>existing<seq2seq4repair_space>file<seq2seq4repair_space>" + destFile ) ) ; } } return sourceFile . renameTo ( destFile ) ; } }

Fix:
if ( ! ( ( getFileUtils ( ) . areSame ( sourceFile , destFile ) ) || ( destFile . delete ( ) ) ) ) {
Buggy code:
public class TestExceedMaxTermLength extends LuceneTestCase { private static final int minTestTermLength = ( IndexWriter . MAX_TERM_LENGTH ) + 1 ; private static final int maxTestTermLegnth = ( IndexWriter . MAX_TERM_LENGTH ) * 2 ; Directory dir = null ; @ Before public void createDir ( ) { } @ After public void destroyDir ( ) throws IOException { } public void test ( ) throws Exception { IndexWriter w = new IndexWriter ( dir , newIndexWriterConfig ( random ( ) , TEST_VERSION_CURRENT , new org . apache . lucene . analysis . MockAnalyzer ( random ( ) ) ) ) ; try { final FieldType ft = new FieldType ( ) ; ft . setIndexed ( true ) ; ft . setStored ( random ( ) . nextBoolean ( ) ) ; ft . freeze ( ) ; final Document doc = new Document ( ) ; if ( random ( ) . nextBoolean ( ) ) { doc . add ( new Field ( TestUtil . randomSimpleString ( random ( ) , 1 , 10 ) , TestUtil . randomSimpleString ( random ( ) , 1 , 10 ) , ft ) ) ; } final String name = TestUtil . randomSimpleString ( random ( ) , 1 , 50 ) ; final String value = TestUtil . randomSimpleString ( random ( ) , TestExceedMaxTermLength . minTestTermLength , TestExceedMaxTermLength . maxTestTermLegnth ) ; final Field f = new Field ( name , value , ft ) ; if ( random ( ) . nextBoolean ( ) ) { doc . add ( new Field ( TestUtil . randomSimpleString ( random ( ) , 1 , 10 ) , TestUtil . randomSimpleString ( random ( ) , 1 , 10 ) , ft ) ) ; } doc . add ( f ) ; try { w . addDocument ( doc ) ; fail ( "Did<seq2seq4repair_space>not<seq2seq4repair_space>get<seq2seq4repair_space>an<seq2seq4repair_space>exception<seq2seq4repair_space>from<seq2seq4repair_space>adding<seq2seq4repair_space>a<seq2seq4repair_space>monster<seq2seq4repair_space>term" ) ; } catch ( IllegalArgumentException e ) { final String maxLengthMsg = String . valueOf ( MAX_TERM_LENGTH ) ; final String msg = e . getMessage ( ) ; assertTrue ( ( "IllegalArgumentException<seq2seq4repair_space>didn't<seq2seq4repair_space>mention<seq2seq4repair_space>'immense<seq2seq4repair_space>term':<seq2seq4repair_space>" + msg ) , msg . contains ( "immense<seq2seq4repair_space>term" ) ) ; assertTrue ( ( ( ( "IllegalArgumentException<seq2seq4repair_space>didn't<seq2seq4repair_space>mention<seq2seq4repair_space>max<seq2seq4repair_space>length<seq2seq4repair_space>(" + maxLengthMsg ) + "):<seq2seq4repair_space>" ) + msg ) , msg . contains ( maxLengthMsg ) ) ; assertTrue ( ( ( ( "IllegalArgumentException<seq2seq4repair_space>didn't<seq2seq4repair_space>mention<seq2seq4repair_space>field<seq2seq4repair_space>name<seq2seq4repair_space>(" + name ) + "):<seq2seq4repair_space>" ) + msg ) , msg . contains ( name ) ) ; } } finally { <START_BUG> w . close ( ) ; <END_BUG> } } }

Fix:
w . shutdown ( ) ;
Buggy code:
public class Board { private Image board ; private int x ; private int y ; private int player ; private BoardModel boardModel ; private GameOfThronesModel gameModel ; private ImageSelector images ; private Map < String , int [ ] > territoryCoord ; public Board ( GameOfThronesModel model ) { } public void afficher ( Graphics g ) { } public void down ( ) { } public void up ( ) { } public void setPlayer ( int player ) { } public Territory getTeritory ( int xMouse , int yMouse ) { } private void showTroops ( Territory territory , Graphics g ) { } public void showOrders ( Graphics g ) { for ( Territory territory : boardModel . board . values ( ) ) { <START_BUG> if ( ( territory . getOrder ( ) ) != null ) { <END_BUG> if ( ( ( ( ( ( ( territory . getFamily ( ) . getPlayer ( ) ) == ( player ) ) || ( ( gameModel . getPhase ( ) ) == ( ModelState . PHASE_EXECUTION ) ) ) || ( ( gameModel . getPhase ( ) ) == ( ModelState . USE_INF_TOKEN ) ) ) || ( ( gameModel . getPhase ( ) ) == ( ModelState . CROW_CHOICE ) ) ) || ( ( gameModel . getPhase ( ) ) == ( ModelState . RAVEN_SEE_WILDINGS ) ) ) || ( ( gameModel . getPhase ( ) ) == ( ModelState . BATTLE ) ) ) { Image orderImage = images . getSmallOrderImage ( territory . getOrder ( ) ) ; int [ ] coordinate = territoryCoord . get ( territory . getName ( ) ) ; g . drawImage ( orderImage , ( ( ( coordinate [ 0 ] ) + ( x ) ) - 30 ) , ( ( coordinate [ 1 ] ) + ( y ) ) , null ) ; } } } } private void displayNeutralForce ( Territory territory , Graphics g ) { } private void displayGarrison ( Territory territory , Graphics g ) { } private void showInflenceToken ( Territory territory , Graphics g ) { } private void coordinate ( ) { } }

Fix:
if ( ( ( territory . getOrder ( ) ) != null ) && ( ( territory . getFamily ( ) ) != null ) ) {
Buggy code:
public class TextHelper { public static String twitterWorkarounds ( String input ) { if ( ( input . length ( ) ) > 140 ) { input = input . replaceAll ( ",<seq2seq4repair_space>dig<seq2seq4repair_space>dis:" , ":" ) ; } if ( ( input . length ( ) ) > 140 ) { input = input . replaceAll ( "damn<seq2seq4repair_space>" , "" ) ; } if ( ( input . length ( ) ) > 140 ) { input = input . replaceAll ( "What<seq2seq4repair_space>it<seq2seq4repair_space>is,<seq2seq4repair_space>Mama!<seq2seq4repair_space>" , "" ) ; } if ( ( input . length ( ) ) > 140 ) { input = input . replaceAll ( "baaaad" , "bad" ) ; } if ( ( input . length ( ) ) > 140 ) { input = input . replaceAll ( "sheeit" , "shit" ) ; } if ( ( input . length ( ) ) > 140 ) { input = input . replaceAll ( "kindun<seq2seq4repair_space>didate" , "candidate" ) ; } if ( ( input . length ( ) ) > 140 ) { input = input . replaceAll ( "s<seq2seq4repair_space>snatch" , "stake" ) ; } if ( ( input . length ( ) ) > 140 ) { input = input . replaceAll ( "<seq2seq4repair_space>Slap<seq2seq4repair_space>mah<seq2seq4repair_space>fro!" , "" ) ; } if ( ( input . length ( ) ) > 140 ) { input = input . replaceAll ( "some" , "per" ) ; } if ( ( input . length ( ) ) > 140 ) { input = input . replaceAll ( "down" , "up" ) ; } if ( ( input . length ( ) ) > 140 ) { input = input . replaceAll ( "<seq2seq4repair_space>'S<seq2seq4repair_space>coo',<seq2seq4repair_space>bro." , "" ) ; } if ( ( input . length ( ) ) > 140 ) { input = input . replaceAll ( "boogy" , "danz" ) ; } if ( ( input . length ( ) ) > 140 ) { input = input . replaceAll ( "\\bper\\b" , "a" ) ; } if ( ( input . length ( ) ) > 140 ) { input = input . replaceAll ( "\"" , "" ) ; } if ( ( input . length ( ) ) > 140 ) { input = input . replaceAll ( "powerful" , "hench" ) ; } if ( ( input . length ( ) ) > 140 ) { input = input . replaceAll ( "we're" , "we" ) ; } if ( ( input . length ( ) ) > 140 ) { input = input . replaceAll ( "isn't" , "ain't" ) ; } if ( ( input . length ( ) ) > 140 ) { input = input . replaceAll ( "finances" , "monies" ) ; } if ( ( input . length ( ) ) > 140 ) { input = input . replaceAll ( "\\?" , "" ) ; } if ( ( input . length ( ) ) > 140 ) { input = input . replaceAll ( "children" , "kidz" ) ; } if ( ( input . length ( ) ) > 140 ) { input = input . replaceAll ( "child" , "kid" ) ; } if ( ( input . length ( ) ) > 140 ) { input = input . replaceAll ( "^RT" , "" ) ; } if ( ( input . length ( ) ) > 140 ) { <START_BUG> input = input . replaceAll ( ".<seq2seq4repair_space>@" , ".@" ) ; <END_BUG> } return input . trim ( ) ; } No newline ; at end ; of file ; }

Fix:
input = input . replaceAll ( "\\.<seq2seq4repair_space>@" , ".@" ) ;
Buggy code:
public final class TestUtils { private TestUtils ( ) { } public static < T > T serializeAndDeserialize ( T object ) throws IOException , ClassNotFoundException { } public static synchronized void setupSwingResources ( ) { try { TestUtils . setupResourcesManager ( ) ; <START_BUG> SwingResourceLoader . setupGraphicsAndSounResources ( TestUtils . getDefaultConfigFile ( ) ) ; <END_BUG> } catch ( IOException e ) { throw new RuntimeException ( "Config<seq2seq4repair_space>file<seq2seq4repair_space>not<seq2seq4repair_space>found!" , e ) ; } } public static synchronized void setupResourcesManager ( ) { } private static ConfigurationPropertiesFile getDefaultConfigFile ( ) throws IOException { } public static MapInterfaceConnector openTestWindow ( final IGraphicsGrid map ) { } public static MapInterfaceConnector openTestWindow ( IStartedGame game ) { } }

Fix:
SwingResourceLoader . setupGraphicsAndSoundResources ( TestUtils . getDefaultConfigFile ( ) ) ;
Buggy code:
public class IRCService extends Service { private PircBotX irc ; private Settings settings ; private Server server ; private Notification notif ; private final int NOTIF_ID = 1 ; private boolean foreground = false ; public void onCreate ( ) { } public int onStartCommand ( Intent intent , int flags , int startId ) { } public void setIsForeground ( boolean fg ) { } public boolean isForeground ( ) { } public PircBotX getConnection ( ) { } public void connect ( ) { } public Server getServer ( ) { } public void onNewMessage ( String conversation ) { } public void updateNotification ( ) { } public void onConnect ( ) { getServer ( ) . setStatus ( STATUS_CONNECTED ) ; setIsForeground ( true ) ; updateNotification ( ) ; if ( ( ! ( settings . getString ( "nickserv_user" , "" ) . equals ( "" ) ) ) && ( ! ( settings . getString ( "nickserv_password" , "" ) . equals ( "" ) ) ) ) { <START_BUG> irc . send ( ) . notice ( "NickServ" , ( ( ( "LOGIN<seq2seq4repair_space>" + ( settings . getString ( "nickserv_user" , "" ) ) ) + "<seq2seq4repair_space>" ) + ( settings . getString ( "nickserv_password" , "" ) ) ) ) ; <END_BUG> } String [ ] commands = settings . getStringArray ( "command_on_connect" ) ; if ( ( ( commands . length ) > 1 ) || ( ! ( commands [ 0 ] . equals ( "" ) ) ) ) { for ( String command : commands ) { if ( command . startsWith ( "//" ) ) { command = command . substring ( 1 , command . length ( ) ) ; } getConnection ( ) . sendRaw ( ) . rawLineNow ( command ) ; } } } public void onNickAlreadyInUse ( ) { } @ Override public Binder onBind ( Intent intent ) { } }

Fix:
irc . send ( ) . message ( "NickServ" , ( ( ( "LOGIN<seq2seq4repair_space>" + ( settings . getString ( "nickserv_user" , "" ) ) ) + "<seq2seq4repair_space>" ) + ( settings . getString ( "nickserv_password" , "" ) ) ) ) ;
Buggy code:
public class Loop { static int runLength ; static final Logger logger = Logger . getLogger ( Loop . class ) ; public static void main ( String [ ] args ) throws Exception { Logger j = Logger . getLogger ( "org.apache.log4j.joran" ) ; j . setAdditivity ( false ) ; j . setLevel ( Level . WARN ) ; ConsoleAppender a = new ConsoleAppender ( ) ; a . setLayout ( new PatternLayout ( "%d<seq2seq4repair_space>%level<seq2seq4repair_space>%c<seq2seq4repair_space>-<seq2seq4repair_space>%m%n" ) ) ; a . setName ( "console" ) ; <START_BUG> a . activate ( ) ; <END_BUG> j . addAppender ( a ) ; if ( ( args . length ) == 2 ) { Loop . init ( args [ 0 ] , args [ 1 ] ) ; } else { Loop . usage ( "Wrong<seq2seq4repair_space>number<seq2seq4repair_space>of<seq2seq4repair_space>arguments." ) ; } Loop . loop ( 1000 , Loop . logger , "Some<seq2seq4repair_space>fix<seq2seq4repair_space>message<seq2seq4repair_space>of<seq2seq4repair_space>medium<seq2seq4repair_space>length." ) ; long res = Loop . loop ( Loop . runLength , Loop . logger , "Some<seq2seq4repair_space>fix<seq2seq4repair_space>message<seq2seq4repair_space>of<seq2seq4repair_space>medium<seq2seq4repair_space>length." ) ; double average = ( res * 1000.0 ) // ( Loop . runLength ) ; System . out . println ( ( ( ( ( "Loop<seq2seq4repair_space>completed<seq2seq4repair_space>in<seq2seq4repair_space>[" + res ) + "]<seq2seq4repair_space>milliseconds,<seq2seq4repair_space>or<seq2seq4repair_space>[" ) + average ) + "]<seq2seq4repair_space>microseconds<seq2seq4repair_space>per<seq2seq4repair_space>log." ) ) ; } static void usage ( String msg ) { } static void memPrint ( ) { } static void init ( String runLengthStr , String configFile ) throws Exception { } static long loop ( long len , Logger logger , String msg ) { } }

Fix:
a . activateOptions ( ) ;
Buggy code:
public final class LuceneIterableTest extends MahoutTestCase { private static final String [ ] DOCS = new String [ ] { "The<seq2seq4repair_space>quick<seq2seq4repair_space>red<seq2seq4repair_space>fox<seq2seq4repair_space>jumped<seq2seq4repair_space>over<seq2seq4repair_space>the<seq2seq4repair_space>lazy<seq2seq4repair_space>brown<seq2seq4repair_space>dogs." , "Mary<seq2seq4repair_space>had<seq2seq4repair_space>a<seq2seq4repair_space>little<seq2seq4repair_space>lamb<seq2seq4repair_space>whose<seq2seq4repair_space>fleece<seq2seq4repair_space>was<seq2seq4repair_space>white<seq2seq4repair_space>as<seq2seq4repair_space>snow." , "Moby<seq2seq4repair_space>Dick<seq2seq4repair_space>is<seq2seq4repair_space>a<seq2seq4repair_space>story<seq2seq4repair_space>of<seq2seq4repair_space>a<seq2seq4repair_space>whale<seq2seq4repair_space>and<seq2seq4repair_space>a<seq2seq4repair_space>man<seq2seq4repair_space>obsessed." , "The<seq2seq4repair_space>robber<seq2seq4repair_space>wore<seq2seq4repair_space>a<seq2seq4repair_space>black<seq2seq4repair_space>fleece<seq2seq4repair_space>jacket<seq2seq4repair_space>and<seq2seq4repair_space>a<seq2seq4repair_space>baseball<seq2seq4repair_space>cap." , "The<seq2seq4repair_space>English<seq2seq4repair_space>Springer<seq2seq4repair_space>Spaniel<seq2seq4repair_space>is<seq2seq4repair_space>the<seq2seq4repair_space>best<seq2seq4repair_space>of<seq2seq4repair_space>all<seq2seq4repair_space>dogs." } ; private RAMDirectory directory ; @ Override public void setUp ( ) throws Exception { } @ Test public void testIterable ( ) throws Exception { } @ Test ( expected = IllegalStateException . class ) public void testIterableNoTermVectors ( ) throws IOException { } @ Test public void testIterableSomeNoiseTermVectors ( ) throws IOException { } static RAMDirectory createTestIndex ( Field . TermVector termVector ) throws IOException { } static RAMDirectory createTestIndex ( Field . TermVector termVector , RAMDirectory directory , boolean createNew , int startingId ) throws IOException { <START_BUG> IndexWriter writer = new IndexWriter ( directory , new org . apache . lucene . index . IndexWriterConfig ( Version . LUCENE_41 , new org . apache . lucene . analysis . standard . StandardAnalyzer ( Version . LUCENE_41 ) ) ) ; <END_BUG> try { for ( int i = 0 ; i < ( LuceneIterableTest . DOCS . length ) ; i ++ ) { Document doc = new Document ( ) ; Field id = new org . apache . lucene . document . StringField ( "id" , ( "doc_" + ( i + startingId ) ) , Store . YES ) ; doc . add ( id ) ; Field text = new Field ( "content" , LuceneIterableTest . DOCS [ i ] , Store . NO , Index . ANALYZED , termVector ) ; doc . add ( text ) ; Field text2 = new Field ( "content2" , LuceneIterableTest . DOCS [ i ] , Store . NO , Index . ANALYZED , termVector ) ; doc . add ( text2 ) ; writer . addDocument ( doc ) ; } } finally { Closeables . closeQuietly ( writer ) ; } return directory ; } }

Fix:
IndexWriter writer = new IndexWriter ( directory , new org . apache . lucene . index . IndexWriterConfig ( Version . LUCENE_42 , new org . apache . lucene . analysis . standard . StandardAnalyzer ( Version . LUCENE_42 ) ) ) ;
Buggy code:
public class UrlResourceStream extends AbstractResourceStream { private static final long serialVersionUID = 1L ; private static final Log log = LogFactory . getLog ( UrlResourceStream . class ) ; private transient InputStream inputStream ; private URL url ; private File file ; private int contentLength ; private String contentType ; private long lastModified ; public UrlResourceStream ( final URL url ) { } public void close ( ) throws IOException { } public String getContentType ( ) { } private void testContentType ( ) { if ( ( ( contentType ) == null ) || ( ( contentType . indexOf ( "unknown" ) ) != ( - 1 ) ) ) { Application application = Application . get ( ) ; if ( application instanceof WebApplication ) { <START_BUG> contentType = ( ( WebApplication ) ( application ) ) . getWicketServlet ( ) . getServletContext ( ) . getMimeType ( url . getFile ( ) ) ; <END_BUG> if ( ( contentType ) == null ) { contentType = URLConnection . getFileNameMap ( ) . getContentTypeFor ( url . getFile ( ) ) ; } } else { contentType = URLConnection . getFileNameMap ( ) . getContentTypeFor ( url . getFile ( ) ) ; } } } public InputStream getInputStream ( ) throws ResourceStreamNotFoundException { } public URL getURL ( ) { } public Time lastModifiedTime ( ) { } public String toString ( ) { } public long length ( ) { } }

Fix:
contentType = ( ( WebApplication ) ( application ) ) . getServletContext ( ) . getMimeType ( url . getFile ( ) ) ;
Buggy code:
public final class ObjectData implements Cloneable { private Object _oid ; private Object [ ] _data ; private Long _version ; private ClassMetaData _meta ; public ObjectData ( Object oid , ClassMetaData meta ) { } public Object getId ( ) { } public Object getField ( int num ) { } public void setField ( int num , Object val ) { } public void setVersion ( Long version ) { } public Long getVersion ( ) { } public ClassMetaData getMetaData ( ) { } public void load ( OpenJPAStateManager sm , FetchConfiguration fetch ) { } public void load ( OpenJPAStateManager sm , BitSet fields , FetchConfiguration fetch ) { } private static Object toLoadable ( OpenJPAStateManager sm , FieldMetaData fmd , Object val , FetchConfiguration fetch ) { } private static Object toNestedLoadable ( OpenJPAStateManager sm , ValueMetaData vmd , Object val , FetchConfiguration fetch ) { } public void store ( OpenJPAStateManager sm ) { } private static Object toStorable ( FieldMetaData fmd , Object val , StoreContext ctx ) { } private static Object toNestedStorable ( ValueMetaData vmd , Object val , StoreContext ctx ) { } public Object clone ( ) { } public String toString ( ) { <START_BUG> StringBuffer buf = new StringBuffer ( ) ; <END_BUG> buf . append ( ( ( "Class:<seq2seq4repair_space>(" + ( _meta . getDescribedType ( ) . getName ( ) ) ) + ")\n" ) ) ; buf . append ( ( ( "Object<seq2seq4repair_space>Id:<seq2seq4repair_space>(" + ( _oid ) ) + ")\n" ) ) ; buf . append ( ( ( "Version:<seq2seq4repair_space>(" + ( _version ) ) + ")\n" ) ) ; FieldMetaData [ ] fmds = _meta . getFields ( ) ; for ( int i = 0 ; i < ( fmds . length ) ; i ++ ) { buf . append ( ( ( "<seq2seq4repair_space>Field:<seq2seq4repair_space>(" + i ) + ")\n" ) ) ; buf . append ( ( ( "<seq2seq4repair_space>Name:<seq2seq4repair_space>(" + ( fmds [ i ] . getName ( ) ) ) + ")\n" ) ) ; buf . append ( ( ( "<seq2seq4repair_space>Value:<seq2seq4repair_space>(" + ( _data [ i ] ) ) + ")\n" ) ) ; } return buf . toString ( ) ; } }

Fix:
StringBuilder buf = new StringBuilder ( ) ;
Buggy code:
public class ScarabLocalizationTool extends LocalizationTool { private static final String DEFAULT_SCOPE = "default" ; private static final String TITLE_PROP = "title" ; private RunData data ; private Configuration properties ; private String bundlePrefix ; private String oldBundlePrefix ; public ScarabLocalizationTool ( ) { } public String get ( String key ) { String value = null ; try { <START_BUG> super . get ( key ) ; <END_BUG> if ( value == null ) { value = super . get ( ( ( ScarabLocalizationTool . DEFAULT_SCOPE ) + '.' ) , key ) ; } if ( value == null ) { value = ( "ERROR!<seq2seq4repair_space>Missing<seq2seq4repair_space>resource<seq2seq4repair_space>(" + key ) + ")" ; Log . get ( ) . error ( ( "ScarabLocalizationTool:<seq2seq4repair_space>ERROR!<seq2seq4repair_space>Missing<seq2seq4repair_space>resource:<seq2seq4repair_space>" + key ) ) ; } } catch ( Exception e ) { value = ( "ERROR!<seq2seq4repair_space>Bad<seq2seq4repair_space>resource<seq2seq4repair_space>(" + key ) + ")" ; Log . get ( ) . error ( ( ( "ScarabLocalizationTool:<seq2seq4repair_space>ERROR!<seq2seq4repair_space>Bad<seq2seq4repair_space>resource:<seq2seq4repair_space>" + key ) + ".<seq2seq4repair_space>See<seq2seq4repair_space>log<seq2seq4repair_space>for<seq2seq4repair_space>details." ) , e ) ; } return value ; } public String format ( String key , Object arg1 ) { } public String format ( String key , Object arg1 , Object arg2 ) { } public String format ( String key , Object arg1 , Object arg2 , Object arg3 ) { } public String format ( String key , List args ) { } public String format ( String key , Object [ ] args ) { } public String getTitle ( ) { } protected String findProperty ( String property , boolean useDefaultScope ) { } public void setBundlePrefix ( String prefix ) { } public void restoreBundlePrefix ( ) { } protected String getBundleName ( ) { } public void init ( Object runData ) { } public void refresh ( ) { } }

Fix:
value = super . get ( key ) ;
Buggy code:
public class SpinnerItemsRecyclerViewAdapter extends RecyclerView . Adapter < SpinnerItemsRecyclerViewAdapter . ItemViewHolder > { private DialogFragmentSpinnerItems parentFragment ; private ArrayList < String > items ; private int pressedPosition = - 1 ; public SpinnerItemsRecyclerViewAdapter ( DialogFragmentSpinnerItems parentFragment , ArrayList < String > items ) { } @ Override public SpinnerItemsRecyclerViewAdapter . ItemViewHolder onCreateViewHolder ( ViewGroup parent , int viewType ) { } @ Override public void onBindViewHolder ( final SpinnerItemsRecyclerViewAdapter . ItemViewHolder holder , int position ) { final String item = items . get ( position ) ; holder . title . setText ( item ) ; holder . title . setTypeface ( FontManager . getFont ( TW_CENT_MT_REGULAR , parentFragment . getActivity ( ) . getApplicationContext ( ) ) ) ; <START_BUG> if ( ( ( ( pressedPosition ) != ( - 1 ) ) && ( ( pressedPosition ) != position ) ) && ( ( holder . title . getCurrentTextColor ( ) ) == ( ContextCompat . getColor ( parentFragment . getActivity ( ) . getApplicationContext ( ) , white ) ) ) ) { <END_BUG> holder . titleContainer . setBackgroundColor ( ContextCompat . getColor ( parentFragment . getActivity ( ) . getApplicationContext ( ) , white ) ) ; holder . title . setTextColor ( ContextCompat . getColor ( parentFragment . getActivity ( ) . getApplicationContext ( ) , darkgrey ) ) ; } else if ( ( pressedPosition ) == position ) { holder . titleContainer . setBackgroundColor ( ContextCompat . getColor ( parentFragment . getActivity ( ) . getApplicationContext ( ) , colorPrimaryLight ) ) ; holder . title . setTextColor ( ContextCompat . getColor ( parentFragment . getActivity ( ) . getApplicationContext ( ) , white ) ) ; } holder . titleContainer . setOnClickListener ( new View . OnClickListener ( ) { @ Override public void onClick ( View v ) { pressedPosition = holder . getAdapterPosition ( ) ; notifyDataSetChanged ( ) ; SpinnerItemsRecyclerViewAdapter . SpinnerItemsRecyclerViewResponder responder = ( ( SpinnerItemsRecyclerViewAdapter . SpinnerItemsRecyclerViewResponder ) ( parentFragment ) ) ; responder . onItemSelected ( item ) ; } } ) ; } @ Override public int getItemCount ( ) { } public void deselectAll ( ) { } public interface SpinnerItemsRecyclerViewResponder { void onItemSelected ( String title ) { } } public static class ItemViewHolder extends RecyclerView . ViewHolder { private LinearLayout titleContainer ; private TextView title ; public ItemViewHolder ( View itemView ) { } } }

Fix:
if ( ( ( pressedPosition ) != position ) && ( ( holder . title . getCurrentTextColor ( ) ) == ( ContextCompat . getColor ( parentFragment . getActivity ( ) . getApplicationContext ( ) , white ) ) ) ) {
Buggy code:
public class ReadVerbHandler implements IVerbHandler { protected static class ReadContext { protected ByteArrayInputStream bufIn_ ; protected DataOutputBuffer bufOut_ = new DataOutputBuffer ( ) ; } private static Logger logger_ = LoggerFactory . getLogger ( ReadVerbHandler . class ) ; private static ThreadLocal < ReadVerbHandler . ReadContext > tls_ = new InheritableThreadLocal < ReadVerbHandler . ReadContext > ( ) ; public void doVerb ( Message message ) { byte [ ] body = message . getMessageBody ( ) ; ReadVerbHandler . ReadContext readCtx = ReadVerbHandler . tls_ . get ( ) ; if ( readCtx == null ) { readCtx = new ReadVerbHandler . ReadContext ( ) ; ReadVerbHandler . tls_ . set ( readCtx ) ; } readCtx . bufIn_ = new ByteArrayInputStream ( body ) ; try { if ( instance . isBootstrapMode ( ) ) { throw new RuntimeException ( "Cannot<seq2seq4repair_space>service<seq2seq4repair_space>reads<seq2seq4repair_space>while<seq2seq4repair_space>bootstrapping!" ) ; } ReadCommand command = ReadCommand . serializer ( ) . deserialize ( new DataInputStream ( readCtx . bufIn_ ) ) ; Table table = Table . open ( command . table ) ; Row row = command . getRow ( table ) ; ReadResponse readResponse = ReadVerbHandler . getResponse ( command , row ) ; readCtx . bufOut_ . reset ( ) ; ReadResponse . serializer ( ) . serialize ( readResponse , readCtx . bufOut_ ) ; byte [ ] bytes = new byte [ readCtx . bufOut_ . getLength ( ) ] ; System . arraycopy ( readCtx . bufOut_ . getData ( ) , 0 , bytes , 0 , bytes . length ) ; <START_BUG> Message response = message . getReply ( FBUtilities . getLocalAddress ( ) , bytes ) ; <END_BUG> if ( ReadVerbHandler . logger_ . isDebugEnabled ( ) ) ReadVerbHandler . logger_ . debug ( String . format ( "Read<seq2seq4repair_space>key<seq2seq4repair_space>%s;<seq2seq4repair_space>sending<seq2seq4repair_space>response<seq2seq4repair_space>to<seq2seq4repair_space>%s@%s" , ByteBufferUtil . bytesToHex ( command . key ) , message . getMessageId ( ) , message . getFrom ( ) ) ) ; MessagingService . instance ( ) . sendOneWay ( response , message . getFrom ( ) ) ; } catch ( IOException ex ) { throw new RuntimeException ( ex ) ; } } public static ReadResponse getResponse ( ReadCommand command , Row row ) { } }

Fix:
Message response = message . getReply ( FBUtilities . getLocalAddress ( ) , bytes , message . getVersion ( ) ) ;
Buggy code:
public class PsfFileBrowserActivity extends Activity implements ServiceConnection , SharedPreferences . OnSharedPreferenceChangeListener { private static final String LOGTAG = "PsfFileBrowserActivity" ; private static final int ID_EXIT = 1 ; private static final int ID_PLAY_ALL = 2 ; private static final int ID_SHUFFLE_ALL = 3 ; private static final int ID_SETTINGS = 4 ; private static final int ID_ABOUT = 5 ; private Context c ; private ListView MusicListView ; private PsfListAdapter MusicListAdapter ; private ServiceToken mToken ; private ArrayList < String > playList ; private TextView CurDirView ; private int focusListPosition = - 1 ; private int mStepsBack ; @ Override public void onCreate ( Bundle savedInstanceState ) { } @ Override public void onPause ( ) { } @ Override public void onStop ( ) { } @ Override public void onDestroy ( ) { } @ Override public boolean onCreateOptionsMenu ( Menu menu ) { } @ Override public boolean onOptionsItemSelected ( MenuItem item ) { } @ Override protected Dialog onCreateDialog ( int id ) { } @ Override public boolean onKeyDown ( int keyCode , KeyEvent event ) { } private void ExitApp ( ) { } private void showSettings ( ) { } private void showListEmptyError ( ) { } @ Override public void onServiceConnected ( ComponentName name , IBinder service ) { Log . d ( PsfFileBrowserActivity . LOGTAG , "onServiceConnected" ) ; PsfUtils . updateNowPlaying ( this ) ; IntentFilter f = new IntentFilter ( ) ; f . addAction ( META_CHANGED ) ; registerReceiver ( mTrackListener , new IntentFilter ( f ) ) ; if ( ( focusListPosition ) != ( - 1 ) ) { PsfPlaybackService psfService = ( ( PsfPlaybackService . ServiceBinder ) ( service ) ) . getService ( ) ; String [ ] playList = psfService . getPlaylist ( ) ; <START_BUG> if ( ( ( focusListPosition ) >= 0 ) && ( ( focusListPosition ) < ( playList . length ) ) ) { <END_BUG> String mediaPath = playList [ focusListPosition ] ; File mediaFile = new File ( mediaPath ) ; mediaPath = mediaFile . getParent ( ) ; if ( mediaPath != null ) { browseToDir ( mediaPath , focusListPosition ) ; } else { Log . e ( PsfFileBrowserActivity . LOGTAG , ( "Media<seq2seq4repair_space>path<seq2seq4repair_space>incorrect:<seq2seq4repair_space>" + mediaFile ) ) ; } } else { Log . e ( PsfFileBrowserActivity . LOGTAG , "To<seq2seq4repair_space>focused<seq2seq4repair_space>item<seq2seq4repair_space>incorrect!" ) ; } focusListPosition = - 1 ; } } @ Override public void onServiceDisconnected ( ComponentName name ) { } private BroadcastReceiver mTrackListener = new BroadcastReceiver ( ) { @ Override public void onReceive ( Context context , Intent intent ) { } } ; private void unregisterReceiverSafe ( BroadcastReceiver receiver ) { } @ Override public void onSharedPreferenceChanged ( SharedPreferences sharedPreferences , String key ) { } private void browseToDir ( String dir ) { } private void browseToDir ( String dir , int focusPosition ) { } private void upOneLevel ( ) { } private void handleFirstTimeRun ( ) { } }

Fix:
if ( ( ( playList != null ) && ( ( focusListPosition ) >= 0 ) ) && ( ( focusListPosition ) < ( playList . length ) ) ) {
Buggy code:
public class Block extends Statement { private ASTNode . NodeList statements = new ASTNode . NodeList ( true , Statement . class ) ; Block ( AST ast ) { } public int getNodeType ( ) { } ASTNode clone ( AST target ) { Block result = new Block ( target ) ; result . setSourceRange ( this . getStartPosition ( ) , this . getLength ( ) ) ; <START_BUG> result . setLeadingComment ( getLeadingComment ( ) ) ; <END_BUG> result . statements ( ) . addAll ( ASTNode . copySubtrees ( target , statements ( ) ) ) ; return result ; } public boolean subtreeMatch ( ASTMatcher matcher , Object other ) { } void accept0 ( ASTVisitor visitor ) { } public List statements ( ) { } int memSize ( ) { } int treeSize ( ) { } }

Fix:
result . copyLeadingComment ( this ) ;
Buggy code:
public abstract class BreadCrumbPanel < T > extends Panel < T > implements IBreadCrumbParticipant { private static final long serialVersionUID = 1L ; private IBreadCrumbModel breadCrumbModel ; public BreadCrumbPanel ( MarkupContainer parent , final String id , IBreadCrumbModel breadCrumbModel ) { } public BreadCrumbPanel ( MarkupContainer parent , final String id , IBreadCrumbModel breadCrumbModel , IModel < T > model ) { } public void activate ( IBreadCrumbPanelFactory breadCrumbPanelFactory ) { } public void activate ( IBreadCrumbParticipant participant ) { } public final IBreadCrumbModel getBreadCrumbModel ( ) { } public Component getComponent ( ) { } public void onActivate ( IBreadCrumbParticipant previous ) { <START_BUG> this . reattach ( ) ; <END_BUG> } public final void setBreadCrumbModel ( IBreadCrumbModel breadCrumbModel ) { } }

Fix:
this . reAttach ( ) ;
Buggy code:
public class FridgeFragment extends ListFragment { FoodItemAdapter mAdapter ; @ Override public void onActivityResult ( int requestCode , int resultCode , Intent data ) { } @ Override public View onCreateView ( LayoutInflater inflater , ViewGroup container , Bundle savedInstanceState ) { View fridgeView = inflater . inflate ( fragment_layout , container , false ) ; super . onCreate ( savedInstanceState ) ; <START_BUG> mAdapter = new FoodItemAdapter ( getActivity ( ) , fridgeView ) ; <END_BUG> this . setListAdapter ( mAdapter ) ; Button addButton = ( ( Button ) ( fridgeView . findViewById ( add_button ) ) ) ; addButton . setOnClickListener ( new View . OnClickListener ( ) { @ Override public void onClick ( View v ) { Intent addIntent = new Intent ( getActivity ( ) , AddItemActivity . class ) ; startActivityForResult ( addIntent , 1 ) ; } } ) ; Button deleteButton = ( ( Button ) ( fridgeView . findViewById ( delete_button ) ) ) ; deleteButton . setOnClickListener ( new View . OnClickListener ( ) { @ Override public void onClick ( View v ) { if ( ( mAdapter . getCheckedItemList ( ) . size ( ) ) == 0 ) { Toast . makeText ( getActivity ( ) , "No<seq2seq4repair_space>items<seq2seq4repair_space>selected" , LENGTH_SHORT ) . show ( ) ; } else { new android . support . v7 . app . AlertDialog . Builder ( getActivity ( ) ) . setTitle ( "Delete<seq2seq4repair_space>items" ) . setMessage ( ( ( "Delete<seq2seq4repair_space>" + ( mAdapter . getCheckedItemList ( ) . size ( ) ) ) + "<seq2seq4repair_space>items?" ) ) . setPositiveButton ( yes , new DialogInterface . OnClickListener ( ) { public void onClick ( DialogInterface dialog , int which ) { for ( FoodItem foodItem : mAdapter . getCheckedItemList ( ) ) { mAdapter . getItemList ( ) . remove ( foodItem ) ; mAdapter . notifyDataSetChanged ( ) ; } mAdapter . setCheckedBoxes ( ( ( mAdapter . getCheckedBoxes ( ) ) - ( mAdapter . getCheckedItemList ( ) . size ( ) ) ) ) ; TextView mTextView = ( ( TextView ) ( mAdapter . getView ( ) . findViewById ( items_selected ) ) ) ; mTextView . setText ( ( ( mAdapter . getCheckedBoxes ( ) ) + "<seq2seq4repair_space>items<seq2seq4repair_space>selected" ) ) ; mAdapter . getCheckedItemList ( ) . clear ( ) ; } } ) . setNegativeButton ( no , new DialogInterface . OnClickListener ( ) { public void onClick ( DialogInterface dialog , int which ) { } } ) . setIcon ( ic_dialog_alert ) . show ( ) ; } } } ) ; return fridgeView ; } public FoodItemAdapter getFoodItemAdapter ( ) { } }

Fix:
mAdapter = new FoodItemAdapter ( getActivity ( ) , fridgeView , "Fridge" ) ;
Buggy code:
public class ExplicitConstructorCall extends Statement implements InvocationSite { public Expression [ ] arguments ; public Expression qualification ; public MethodBinding binding ; public int accessMode ; public static final int ImplicitSuper = 1 ; public static final int Super = 2 ; public static final int This = 3 ; public VariableBinding [ ] [ ] implicitArguments ; boolean discardEnclosingInstance ; MethodBinding syntheticAccessor ; public ExplicitConstructorCall ( int accessMode ) { } public FlowInfo analyseCode ( BlockScope currentScope , FlowContext flowContext , FlowInfo flowInfo ) { } public void generateCode ( BlockScope currentScope , CodeStream codeStream ) { } public boolean isImplicitSuper ( ) { } public boolean isSuperAccess ( ) { } public boolean isTypeAccess ( ) { } void manageEnclosingInstanceAccessIfNecessary ( BlockScope currentScope ) { } public void manageSyntheticAccessIfNecessary ( BlockScope currentScope ) { if ( binding . alwaysNeedsAccessMethod ( ) ) { <START_BUG> syntheticAccessor = binding . getAccessMethod ( ) ; <END_BUG> return ; } if ( ( binding . isPrivate ( ) ) && ( ( accessMode ) != ( ExplicitConstructorCall . This ) ) ) { if ( currentScope . environment ( ) . options . isPrivateConstructorAccessChangingVisibility ) { binding . tagForClearingPrivateModifier ( ) ; } else { syntheticAccessor = ( ( SourceTypeBinding ) ( binding . declaringClass ) ) . addSyntheticMethod ( binding ) ; currentScope . problemReporter ( ) . needToEmulateMethodAccess ( binding , this ) ; } } } public void resolve ( BlockScope scope ) { } public void setActualReceiverType ( ReferenceBinding receiverType ) { } public void setDepth ( int depth ) { } public void setFieldIndex ( int depth ) { } public String toString ( int tab ) { } public void traverse ( IAbstractSyntaxTreeVisitor visitor , BlockScope scope ) { } }

Fix:
syntheticAccessor = binding . getAccessMethod ( true ) ;
Buggy code:
public class TestEventService extends ReefConnectionTestBase { private final String entityForEvents = "StaticSubstation.Line02.Current" ; @ Test public void validateLongEventConfigStrings ( ) throws ReefServiceException { } @ Test public void prepareEvents ( ) throws ReefServiceException { } @ Test public void getRecentEvents ( ) throws ReefServiceException { } @ Test public void subscribeEvents ( ) throws InterruptedException , ReefServiceException { } private ReefUUID getUUID ( String name ) throws ReefServiceException { } @ Test public void prepareAlarms ( ) throws ReefServiceException { } @ Test public void subscribeAlarms ( ) throws InterruptedException , ReefServiceException { } @ Test public void subscriptionCreationCallback ( ) throws InterruptedException , ReefServiceException { final BlockingQueue < SubscriptionBinding > callback = new BlockingQueue < SubscriptionBinding > ( ) ; EventService es = helpers ; es . addSubscriptionCreationListener ( new SubscriptionCreationListener ( ) { @ Override public void onSubscriptionCreated ( SubscriptionBinding sub ) { callback . push ( sub ) ; } } ) ; SubscriptionResult < List < Events . Event > , Events . Event > result = es . subscribeToRecentEvents ( 1 ) ; List < Events . Event > events = result . getResult ( ) ; assertEquals ( events . size ( ) , 1 ) ; <START_BUG> assertEquals ( callback . pop ( 1000 ) , result . getSubscription ( ) ) ; <END_BUG> } @ Test public void cleanupEventConfigs ( ) throws ReefServiceException { } No newline ; at end ; of file ; }

Fix:
assertEquals ( callback . pop ( 1000 ) . getId ( ) , result . getSubscription ( ) . getId ( ) ) ;