nus-yam/ex-repair huggingface dataset:
Buggy code:
public class GoModelToBaseElements implements TreeModelPrereqs { public String toString ( ) { <START_BUG> return Localizer . localize ( "Tree" , "Package->Base<seq2seq4repair_space>Class" ) ; <END_BUG> } public Object getRoot ( ) { } public void setRoot ( Object r ) { } public Object getChild ( Object parent , int index ) { } public int getChildCount ( Object parent ) { } public int getIndexOfChild ( Object parent , Object child ) { } public boolean isLeaf ( Object node ) { } public void valueForPathChanged ( TreePath path , Object newValue ) { } public void addTreeModelListener ( TreeModelListener l ) { } public void removeTreeModelListener ( TreeModelListener l ) { } public Vector getPrereqs ( ) { } public Vector getProvidedTypes ( ) { } }

Fix:
return Localizer . localize ( "Tree" , "misc.package.base-class" ) ;
Buggy code:
public class Robot extends MapCellObject implements Comparable < Robot > { private List < ModelButton > myManagerButtons ; private boolean enabled ; private int oilEfficiency ; private int oreEfficiency ; private int gemEfficiency ; private int diversity ; private int distance ; private int luck ; private int power ; private int durability ; private int magic ; private Ore myOre ; private int mySize ; private String myName ; private Random myRandom ; public Robot ( int oreType , int size , ModelMap m ) { } public void step ( ) { if ( ( enabled ) && ( ( ( Game . ticks ) % ( Model . TICK_SCALAR ) ) == 0 ) ) { <START_BUG> myResources . setOil ( ( ( myResources . getOil ( ) ) + ( ( ( ( myLocation . getOil ( ) ) + ( myRandom . nextInt ( 9 ) ) ) - 4 ) * ( oilEfficiency ) ) ) ) ; <END_BUG> myLocation . incrementOre ( myResources , oreEfficiency ) ; } } public Ore getOre ( ) { } public int processStat ( int base , int size ) { } public void enabled ( ) { } public void disabled ( ) { } public boolean move ( int x , int y ) { } public void addButton ( ModelButton b ) { } public List < ModelButton > getButtons ( ) { } @ Override public void respond ( ) { } @ Override public int compareTo ( Robot r ) { } public int getOreEfficiency ( ) { } public String getName ( ) { } public int getSize ( ) { } }

Fix:
myResources . setOil ( ( ( myResources . getOil ( ) ) + ( ( ( ( myLocation . getOil ( ) ) + ( myRandom . nextInt ( 15 ) ) ) - 7 ) * ( oilEfficiency ) ) ) ) ;
Buggy code:
@ WebServlet ( "//lightstate" ) public class LightState extends HttpServlet { private static final long serialVersionUID = 1L ; public LightState ( ) { } protected void doGet ( HttpServletRequest request , HttpServletResponse response ) throws IOException , ServletException { String light = request . getParameter ( "light" ) ; boolean state = false ; if ( light != null ) { try { int pinNo = Integer . parseInt ( light ) ; state = GPIOHelper . getPinState ( pinNo ) ; } catch ( InterruptedException e ) { e . printStackTrace ( ) ; } } response . setContentType ( "text//plain" ) ; <START_BUG> response . getWriter ( ) . write ( ( state ? "1" : "0" ) ) ; <END_BUG> } protected void doPost ( HttpServletRequest request , HttpServletResponse response ) throws IOException , ServletException { } }

Fix:
response . getWriter ( ) . write ( ( ( light + "," ) + ( state ? "1" : "0" ) ) ) ;
Buggy code:
public class Distributions { private Distributions ( ) { } protected static < K > Set < K > getSetOfAllKeys ( Distribution < K > d1 , Distribution < K > d2 ) { } public static < K > double overlap ( Distribution < K > d1 , Distribution < K > d2 ) { } public static < K > Distribution < K > weightedAverage ( Distribution < K > d1 , double w1 , Distribution < K > d2 ) { } public static < K > Distribution < K > average ( Distribution < K > d1 , Distribution < K > d2 ) { } public static < K > double klDivergence ( Distribution < K > from , Distribution < K > to ) { Set < K > allKeys = Distributions . getSetOfAllKeys ( from , to ) ; int numKeysRemaining = from . getNumberOfKeys ( ) ; double result = 0.0 ; double assignedMass1 = 0.0 ; double assignedMass2 = 0.0 ; double log2 = Math . log ( 2.0 ) ; double p1 ; double p2 ; double epsilon = 1.0E-10 ; for ( K key : allKeys ) { p1 = from . probabilityOf ( key ) ; p2 = to . probabilityOf ( key ) ; numKeysRemaining -- ; assignedMass1 += p1 ; assignedMass2 += p2 ; if ( p1 < epsilon ) { continue ; } double logFract = Math . log ( ( p1 // p2 ) ) ; if ( logFract == ( Double . POSITIVE_INFINITY ) ) { System . out . println ( ( ( ( "Didtributions.kldivergence<seq2seq4repair_space>returning<seq2seq4repair_space>+inf:<seq2seq4repair_space>p1=" + p1 ) + ",<seq2seq4repair_space>p2=" ) + p2 ) ) ; System . out . flush ( ) ; return Double . POSITIVE_INFINITY ; } result += p1 * ( logFract // log2 ) ; } if ( numKeysRemaining != 0 ) { p1 = ( 1.0 - assignedMass1 ) // numKeysRemaining ; if ( p1 > epsilon ) { p2 = ( 1.0 - assignedMass2 ) // numKeysRemaining ; double logFract = Math . log ( ( p1 // p2 ) ) ; if ( logFract == ( Double . POSITIVE_INFINITY ) ) { <START_BUG> System . out . println ( ( ( ( "Didtributions.kldivergence<seq2seq4repair_space>(remaining<seq2seq4repair_space>mass)<seq2seq4repair_space>returning<seq2seq4repair_space>+inf:<seq2seq4repair_space>p1=" + p1 ) + ",<seq2seq4repair_space>p2=" ) + p2 ) ) ; <END_BUG> System . out . flush ( ) ; return Double . POSITIVE_INFINITY ; } result += ( numKeysRemaining * p1 ) * ( logFract // log2 ) ; } } return result ; } public static < K > double jensenShannonDivergence ( Distribution < K > d1 , Distribution < K > d2 ) { } public static < K > double skewDivergence ( Distribution < K > d1 , Distribution < K > d2 , double skew ) { } public static < K > double informationRadius ( Distribution < K > d1 , Distribution < K > d2 ) { } }

Fix:
System . out . println ( ( ( ( "Distributions.klDivergence<seq2seq4repair_space>(remaining<seq2seq4repair_space>mass)<seq2seq4repair_space>returning<seq2seq4repair_space>+inf:<seq2seq4repair_space>p1=" + p1 ) + ",<seq2seq4repair_space>p2=" ) + p2 ) ) ;
Buggy code:
public class LoggerAdd extends AbstractLoggerAdd { private static final long serialVersionUID = 4230922005791983261L ; private final String name ; private boolean useParentHandlers = true ; public LoggerAdd ( final String name , final boolean useParentHandlers ) { } public LoggerAdd ( final String name ) { } protected AbstractLoggerElement < ? > addNewElement ( final LoggingSubsystemElement element ) throws UpdateFailedException { } protected < P > void applyUpdate ( UpdateContext updateContext , UpdateResultHandler < ? super Void , P > resultHandler , P param ) { try { final String loggerName = getLoggerName ( ) ; final LoggerService service = new LoggerService ( loggerName ) ; service . setLevel ( Level . parse ( getLevelName ( ) ) ) ; <START_BUG> final BatchBuilder batchBuilder = updateContext . getBatchBuilder ( ) ; <END_BUG> batchBuilder . addService ( LogServices . loggerName ( loggerName ) , service ) . addListener ( new UpdateResultHandler . ServiceStartListener < P > ( resultHandler , param ) ) . setInitialMode ( ACTIVE ) . install ( ) ; } catch ( Throwable t ) { resultHandler . handleFailure ( t , param ) ; return ; } } public boolean isUseParentHandlers ( ) { } public void setUseParentHandlers ( final boolean useParentHandlers ) { } public String getLoggerName ( ) { } }

Fix:
final BatchBuilder batchBuilder = updateContext . getServiceTarget ( ) ;
Buggy code:
public class DistributableSessionManagerTestCase { private final String deploymentName = "mydeployment.war" ; private final SessionManager < LocalSessionContext > manager = mock ( SessionManager . class ) ; private final SessionListener listener = mock ( SessionListener . class ) ; private DistributableSessionManager adapter = new DistributableSessionManager ( this . deploymentName , this . manager ) ; @ Before public void init ( ) { } @ Test public void getDeploymentName ( ) { } @ Test public void start ( ) { } @ Test public void stop ( ) { } @ Test public void setDefaultSessionTimeout ( ) { } @ Test public void createSessionNoSessionId ( ) { HttpServerExchange exchange = new HttpServerExchange ( null ) ; Batcher batcher = mock ( Batcher . class ) ; Batch batch = mock ( Batch . class ) ; SessionConfig config = mock ( SessionConfig . class ) ; Session < LocalSessionContext > session = mock ( Session . class ) ; String sessionId = "session" ; <START_BUG> when ( this . manager . createIdentifier ( ) ) . thenReturn ( sessionId ) ; <END_BUG> when ( this . manager . containsSession ( sessionId ) ) . thenReturn ( false ) ; when ( this . manager . createSession ( sessionId ) ) . thenReturn ( session ) ; when ( this . manager . getBatcher ( ) ) . thenReturn ( batcher ) ; when ( batcher . startBatch ( ) ) . thenReturn ( batch ) ; when ( session . getId ( ) ) . thenReturn ( sessionId ) ; io . undertow . server . session . Session sessionAdapter = this . adapter . createSession ( exchange , config ) ; assertNotNull ( sessionAdapter ) ; verify ( this . listener ) . sessionCreated ( sessionAdapter , exchange ) ; verify ( config ) . setSessionId ( exchange , sessionId ) ; verifyZeroInteractions ( batch ) ; String expected = "expected" ; when ( session . getId ( ) ) . thenReturn ( expected ) ; String result = sessionAdapter . getId ( ) ; assertSame ( expected , result ) ; } @ Test public void createSessionSpecifiedSessionId ( ) { } @ Test public void createSessionAlreadyExists ( ) { } @ Test public void getSession ( ) { } @ Test public void getSessionNoSessionId ( ) { } @ Test public void getSessionNotExists ( ) { } @ Test public void activeSessions ( ) { } @ Test public void getTransientSessions ( ) { } @ Test public void getActiveSessions ( ) { } @ Test public void getAllSessions ( ) { } @ Test public void getSessionByIdentifier ( ) { } @ Test public void getSessionByIdentifierNotExists ( ) { } }

Fix:
when ( this . manager . createSessionId ( ) ) . thenReturn ( sessionId ) ;
Buggy code:
public class ByteSet { private static final int WORDS = 4 ; private static final int WORD_BITSIZE = 6 ; private static final int WORD_MASK = ( 1 << ( ByteSet . WORD_BITSIZE ) ) - 1 ; private int size ; private long [ ] bits = new long [ 4 ] ; public int size ( ) { } public boolean isEmpty ( ) { } public boolean contains ( byte v ) { } public boolean add ( byte v ) { } public boolean remove ( byte v ) { } public boolean addAll ( byte ... values ) { } public boolean removeAll ( byte ... values ) { boolean result = false ; for ( byte v : values ) <START_BUG> result |= add ( v ) ; <END_BUG> return result ; } public void clear ( ) { } public byte [ ] toArray ( ) { } }

Fix:
result |= remove ( v ) ;
Buggy code:
public class MockWebApplicationTest extends TestCase { private MockWebApplication application ; public MockWebApplicationTest ( String name ) { } protected void setUp ( ) throws Exception { } public void testRenderHomePage ( ) throws Exception { } public void testClickLink ( ) throws Exception { } private boolean validateDocument ( String document , int expectedLinkClickCount ) { HtmlDocumentValidator validator = new HtmlDocumentValidator ( ) ; Tag html = new Tag ( "html" ) ; Tag head = new Tag ( "head" ) ; html . addExpectedChild ( head ) ; Tag title = new Tag ( "title" ) ; head . addExpectedChild ( title ) ; title . addExpectedChild ( new TextContent ( "Mock<seq2seq4repair_space>Page" ) ) ; Tag body = new Tag ( "body" ) ; html . addExpectedChild ( body ) ; Tag a = new Tag ( "a" ) ; <START_BUG> a . addExpectedAttribute ( "href" , "//MockWebApplication//MockWebApplication\\?component=[0-9]*.actionLink&amp;revision=\\-?[0-9]*&amp;interface=ILinkListener" ) ; <END_BUG> a . addExpectedAttribute ( "id" , "wicket-actionLink" ) ; body . addExpectedChild ( a ) ; a . addExpectedChild ( new TextContent ( "Action<seq2seq4repair_space>link<seq2seq4repair_space>clicked<seq2seq4repair_space>" ) ) ; Tag span = new Tag ( "span" ) ; span . addExpectedChild ( new TextContent ( ( "" + expectedLinkClickCount ) ) ) ; a . addExpectedChild ( span ) ; a . addExpectedChild ( new TextContent ( "<seq2seq4repair_space>times" ) ) ; validator . addRootElement ( html ) ; return validator . isDocumentValid ( document ) ; } }

Fix:
a . addExpectedAttribute ( "href" , "//MockWebApplication//MockWebApplication\\?component=[0-9]+.actionLink&amp;version=[0-9]+&amp;interface=ILinkListener" ) ;
Buggy code:
public class RecentFilesMenu extends EnhancedMenu { public RecentFilesMenu ( ) { } public void setPopupMenuVisible ( boolean b ) { if ( b ) { final View view = EditAction . getView ( this ) ; if ( ( getMenuComponentCount ( ) ) != 0 ) removeAll ( ) ; ActionListener actionListener = new ActionListener ( ) { public void actionPerformed ( ActionEvent evt ) { jEdit . openFile ( view , evt . getActionCommand ( ) ) ; view . getStatus ( ) . setMessage ( null ) ; } } ; MouseListener mouseListener = new MouseAdapter ( ) { public void mouseEntered ( MouseEvent evt ) { view . getStatus ( ) . setMessage ( ( ( JMenuItem ) ( evt . getSource ( ) ) ) . getActionCommand ( ) ) ; } public void mouseExited ( MouseEvent evt ) { view . getStatus ( ) . setMessage ( null ) ; } } ; Vector recentVector = BufferHistory . getBufferHistory ( ) ; if ( ( recentVector . size ( ) ) == 0 ) { add ( GUIUtilities . loadMenuItem ( "no-recent" ) ) ; <START_BUG> super . setMenuPopupVisible ( b ) ; <END_BUG> return ; } int recentFileCount = Math . min ( recentVector . size ( ) , jEdit . getIntegerProperty ( "history" , 25 ) ) ; for ( int i = ( recentVector . size ( ) ) - 1 ; i >= ( ( recentVector . size ( ) ) - recentFileCount ) ; i -- ) { String path = ( ( BufferHistory . Entry ) ( recentVector . elementAt ( i ) ) ) . path ; VFS vfs = VFSManager . getVFSForPath ( path ) ; JMenuItem menuItem = new JMenuItem ( vfs . getFileName ( path ) ) ; menuItem . setActionCommand ( path ) ; menuItem . addActionListener ( actionListener ) ; menuItem . addMouseListener ( mouseListener ) ; add ( menuItem ) ; } } super . setPopupMenuVisible ( b ) ; } }

Fix:
super . setPopupMenuVisible ( b ) ;
Buggy code:
public class CloseShieldOutputStreamTest extends TestCase { private ByteArrayOutputStream original ; private OutputStream shielded ; private boolean closed ; @ Override protected void setUp ( ) { } public void testClose ( ) throws IOException { shielded . close ( ) ; assertFalse ( "closed" , closed ) ; try { shielded . write ( 'x' ) ; fail ( "write(b)" ) ; <START_BUG> } catch ( IOException e ) { <END_BUG> } original . write ( 'y' ) ; assertEquals ( 1 , original . size ( ) ) ; assertEquals ( 'y' , original . toByteArray ( ) [ 0 ] ) ; } }

Fix:
} catch ( final IOException e ) {
Buggy code:
public class HTTPSampleResult extends SampleResult { private static final long serialVersionUID = 240L ; private String cookies = "" ; private String method ; private String redirectLocation ; private String queryString = "" ; private static final String HTTP_NO_CONTENT_CODE = Integer . toString ( HttpURLConnection . HTTP_NO_CONTENT ) ; private static final String HTTP_NO_CONTENT_MSG = "No<seq2seq4repair_space>Content" ; public HTTPSampleResult ( ) { } public HTTPSampleResult ( long elapsed ) { } public HTTPSampleResult ( HTTPSampleResult res ) { } public void setHTTPMethod ( String method ) { } public String getHTTPMethod ( ) { } public void setRedirectLocation ( String redirectLocation ) { } public String getRedirectLocation ( ) { } public boolean isRedirect ( ) { } @ Override public String getSamplerData ( ) { } public String getCookies ( ) { } public void setCookies ( String string ) { } public String getQueryString ( ) { } public void setQueryString ( String string ) { } @ Override public String getDataEncodingWithDefault ( ) { if ( ( ( getDataEncodingNoDefault ( ) ) == null ) && ( getContentType ( ) . startsWith ( "text//html" ) ) ) { byte [ ] bytes = getResponseData ( ) ; <START_BUG> String prefix = new String ( bytes , 0 , Math . min ( bytes . length , 1000 ) ) . toLowerCase ( Locale . ENGLISH ) ; <END_BUG> final String METATAG = "<meta<seq2seq4repair_space>http-equiv=\"content-type\"<seq2seq4repair_space>content=\"" ; int tagstart = prefix . indexOf ( METATAG ) ; if ( tagstart != ( - 1 ) ) { tagstart += METATAG . length ( ) ; int tagend = prefix . indexOf ( "\"" , tagstart ) ; if ( tagend != ( - 1 ) ) { final String ct = new String ( bytes , tagstart , ( tagend - tagstart ) ) ; setEncodingAndType ( ct ) ; } } } return super . getDataEncodingWithDefault ( DEFAULT_HTTP_ENCODING ) ; } public void setResponseNoContent ( ) { } }

Fix:
String prefix = new String ( bytes , 0 , Math . min ( bytes . length , 2000 ) ) . toLowerCase ( Locale . ENGLISH ) ;
Buggy code:
public class ForbesSyncAdapter extends AbstractThreadedSyncAdapter { public static final int SYNC_INTERVAL = ( 2 * 60 ) * 60 ; public static final int SYNC_FLEXTIME = ( ForbesSyncAdapter . SYNC_INTERVAL ) // 4 ; private final String LOG_TAG = ForbesSyncAdapter . class . getSimpleName ( ) ; private static final int FETCH_COUNT = 10 ; final String BASE_URL = ( "http:////ajax.googleapis.com//ajax//services//feed//load?v=1.0&num=" + ( ForbesSyncAdapter . FETCH_COUNT ) ) + "&q=" ; final String HEADLINES_URL = "http:////www.forbes.com//real-time//feed2//" ; final int MAX_ROWS = 100 ; final int NOTIFICATION_COUNT_LIMIT = 5 ; final String FORBES_DEFAULT_IMAGE_NAME = "forbes_200x200.jpg" ; final String CACHE_FOLDER_NAME = "//bezyapps_forbes//" ; private int New_Stories_Count ; private final int HEADLINES_NOTIFICATION_ID = 40050 ; public ForbesSyncAdapter ( Context context , boolean autoInitialize ) { } private void notifyNewHeadlines ( ) { } private void putNewsInDB ( String newsJsonString ) throws JSONException { } @ Override public void onPerformSync ( Account account , Bundle extras , String authority , ContentProviderClient provider , SyncResult syncResult ) { } private static void configurePeriodicSync ( Context context , int syncInterval , int flexTime ) { Account account = ForbesSyncAdapter . getSyncAccount ( context ) ; String authority = context . getString ( content_authority ) ; if ( ( VERSION . SDK_INT ) >= ( VERSION_CODES . KITKAT ) ) { <START_BUG> SyncRequest request = new SyncRequest . Builder ( ) . syncPeriodic ( syncInterval , flexTime ) . setSyncAdapter ( account , authority ) . build ( ) ; <END_BUG> ContentResolver . requestSync ( request ) ; } else { ContentResolver . addPeriodicSync ( account , authority , new Bundle ( ) , syncInterval ) ; } } public static void syncImmediately ( Context context ) { } private static void onAccountCreated ( Account account , Context context ) { } public static Account getSyncAccount ( Context context ) { } public static void initializeSyncAdapter ( Context context ) { } }

Fix:
SyncRequest request = new SyncRequest . Builder ( ) . syncPeriodic ( syncInterval , flexTime ) . setSyncAdapter ( account , authority ) . setExtras ( new Bundle ( ) ) . build ( ) ;
Buggy code:
public class ServerBootstrap implements IBootstrap { private Agent agent ; private ISharedObjectConfig config ; public void setAgent ( Agent agent ) { } public void init ( ISharedObjectConfig config ) throws SharedObjectInitException { } public void handleEvent ( Event event ) { } private void handleJoined ( ID containerID ) { <START_BUG> if ( config . getContext ( ) . isGroupServer ( ) ) <END_BUG> agent . doBootstrap ( containerID ) ; } public void dispose ( ID containerID ) { } public SharedObjectDescription createDescription ( ) { } }

Fix:
if ( config . getContext ( ) . isGroupManager ( ) )
Buggy code:
public class Ausprobieren { public static void main ( String [ ] args ) throws IOException , ParserConfigurationException , SAXException { Retrieval jRetrieval = new Retrieval ( ) ; <START_BUG> String scenarioXML = jRetrieval . getHTMLwithAuth ( "http:////localhost:1205//" , "http:////localhost:1205//models//668857574.pm" ) ; <END_BUG> InputSource is = new InputSource ( ) ; is . setCharacterStream ( new StringReader ( scenarioXML ) ) ; DocumentBuilder db = DocumentBuilderFactory . newInstance ( ) . newDocumentBuilder ( ) ; Document doc = db . parse ( is ) ; Scenario scen = new Scenario ( "http:////localhost:1205//" ) ; scen . initializeInstanceFromXML ( doc . getDocumentElement ( ) ) ; scen . save ( ) ; } }

Fix:
String scenarioXML = jRetrieval . getHTMLwithAuth ( "http:////localhost:1205//" , "http:////localhost:1205//models//1047638939.pm" ) ;
Buggy code:
public class AdaptiveLogisticRegressionTest { @ Test public void testTrain ( ) { } private TrainingExample getExample ( int i , MersenneTwister gen , Vector beta ) { } @ Test public void copyLearnsAsExpected ( ) { RandomUtils . useTestSeed ( ) ; final MersenneTwister gen = new MersenneTwister ( 1 ) ; final Exponential exp = new Exponential ( 0.5 , gen ) ; Vector beta = new DenseVector ( 200 ) ; for ( Vector . Element element : beta ) { int sign = 1 ; if ( ( gen . nextDouble ( ) ) < 0.5 ) { sign = - 1 ; } element . set ( ( sign * ( exp . nextDouble ( ) ) ) ) ; } AdaptiveLogisticRegression . Wrapper w = new AdaptiveLogisticRegression . Wrapper ( 2 , 200 , new L1 ( ) ) ; for ( int i = 0 ; i < 3000 ; i ++ ) { AdaptiveLogisticRegression . TrainingExample r = getExample ( i , gen , beta ) ; w . train ( r ) ; if ( ( i % 1000 ) == 0 ) { System . out . printf ( "%10d<seq2seq4repair_space>%.3f\n" , i , w . getLearner ( ) . auc ( ) ) ; } } System . out . printf ( "%10d<seq2seq4repair_space>%.3f\n" , 3000 , w . getLearner ( ) . auc ( ) ) ; double auc1 = w . getLearner ( ) . auc ( ) ; AdaptiveLogisticRegression . Wrapper w2 = w . copy ( ) ; double auc2 ; for ( int i = 0 ; i < 5000 ; i ++ ) { if ( ( i % 1000 ) == 0 ) { if ( i == 0 ) { Assert . assertEquals ( "Should<seq2seq4repair_space>have<seq2seq4repair_space>started<seq2seq4repair_space>with<seq2seq4repair_space>no<seq2seq4repair_space>data" , 0.5 , w2 . getLearner ( ) . auc ( ) , 1.0E-4 ) ; } if ( i == 1000 ) { auc2 = w2 . getLearner ( ) . auc ( ) ; Assert . assertTrue ( "Should<seq2seq4repair_space>have<seq2seq4repair_space>had<seq2seq4repair_space>head-start" , ( ( Math . abs ( ( auc2 - 0.5 ) ) ) > 0.1 ) ) ; Assert . assertTrue ( "AUC<seq2seq4repair_space>should<seq2seq4repair_space>improve<seq2seq4repair_space>quickly<seq2seq4repair_space>on<seq2seq4repair_space>copy" , ( auc1 < auc2 ) ) ; } System . out . printf ( "%10d<seq2seq4repair_space>%.3f\n" , i , w2 . getLearner ( ) . auc ( ) ) ; } AdaptiveLogisticRegression . TrainingExample r = getExample ( i , gen , beta ) ; w2 . train ( r ) ; } Assert . assertEquals ( "Original<seq2seq4repair_space>should<seq2seq4repair_space>not<seq2seq4repair_space>change<seq2seq4repair_space>after<seq2seq4repair_space>copy<seq2seq4repair_space>is<seq2seq4repair_space>updated" , auc1 , w . getLearner ( ) . auc ( ) , 1.0E-5 ) ; <START_BUG> Assert . assertTrue ( "AUC<seq2seq4repair_space>should<seq2seq4repair_space>improve<seq2seq4repair_space>substantially<seq2seq4repair_space>on<seq2seq4repair_space>copy" , ( auc1 < ( ( w2 . getLearner ( ) . auc ( ) ) - 0.1 ) ) ) ; <END_BUG> Assert . assertEquals ( auc1 , w . getLearner ( ) . auc ( ) , 0 ) ; } }

Fix:
Assert . assertTrue ( "AUC<seq2seq4repair_space>should<seq2seq4repair_space>improve<seq2seq4repair_space>significantly<seq2seq4repair_space>on<seq2seq4repair_space>copy" , ( auc1 < ( ( w2 . getLearner ( ) . auc ( ) ) - 0.05 ) ) ) ;
Buggy code:
public class PhysicsActions { public static class accelerationFrame implements Runnable { @ Override public void run ( ) { } } public static class runningFrame implements Runnable { @ Override public void run ( ) { } } public static class decelerationFrame implements Runnable { @ Override public void run ( ) { } } private static void loadNextFrame ( ) { } private static void moveBus ( ) { } private static void accelerateBus ( ) { } private static void decelerateBus ( ) { } private static void accelerateObject ( ) { } public static void updateObjectPosition ( ) { PhysicsObject object = ObjectManager . getInstance ( ) . getObject ( "object" ) ; BusObject bus = ( ( BusObject ) ( ObjectManager . getInstance ( ) . getObject ( "bus" ) ) ) ; RelationshipTypes relationship = RelationshipManager . getInstance ( ) . getRelationship ( "object" , "bus" ) ; double upperXBound = 0 ; double lowerXBound = 0 ; switch ( relationship ) { case INSIDE_UNRESTRAINED : <START_BUG> upperXBound = 50 ; <END_BUG> lowerXBound = - 100 ; break ; case INSIDE_RESTRAINED : upperXBound = object . getXCoord ( ) ; lowerXBound = object . getXCoord ( ) ; break ; case ABOVE_UNRESTRAINED : upperXBound = 735 ; lowerXBound = - 120 ; break ; case BEHIND_ATTACHED : upperXBound = - 130 ; lowerXBound = - 150 ; break ; case FRONT : upperXBound = 735 ; lowerXBound = 140 ; break ; } double newObjectLocation = ( ( object . getXCoord ( ) ) + ( object . getSpeed ( ) ) ) - ( bus . getSpeed ( ) ) ; System . out . println ( newObjectLocation ) ; if ( newObjectLocation <= lowerXBound ) { if ( ( object . getXCoord ( ) ) <= ( - 185 ) ) { newObjectLocation = - 185 ; } if ( relationship == ( RelationshipTypes . ABOVE_UNRESTRAINED ) ) { object . setYCoord ( ( ( object . getYCoord ( ) ) - 2 ) ) ; object . setXCoord ( newObjectLocation ) ; } else { object . setXCoord ( lowerXBound ) ; object . setAcceleration ( bus . getAcceleration ( ) ) ; object . setSpeed ( bus . getSpeed ( ) ) ; } } else if ( newObjectLocation >= upperXBound ) { object . setXCoord ( upperXBound ) ; object . setAcceleration ( ( - ( bus . getDeceleration ( ) ) ) ) ; object . setSpeed ( bus . getSpeed ( ) ) ; } else { object . setXCoord ( newObjectLocation ) ; } object . commit ( ) ; } }

Fix:
upperXBound = 37 ;
Buggy code:
public class BridgeRemove extends AbstractRemoveStepHandler implements DescriptionProvider { public static final BridgeRemove INSTANCE = new BridgeRemove ( ) ; private BridgeRemove ( ) { } @ Override protected void performRemove ( OperationContext context , ModelNode operation , ModelNode model ) throws OperationFailedException { } @ Override protected void recoverServices ( OperationContext context , ModelNode operation , ModelNode model ) throws OperationFailedException { final ServiceRegistry registry = context . getServiceRegistry ( true ) ; final ServiceName hqServiceName = MessagingServices . getHornetQServiceName ( PathAddress . pathAddress ( operation . get ( OP_ADDR ) ) ) ; final ServiceController < ? > hqService = registry . getService ( hqServiceName ) ; if ( ( hqService != null ) && ( ( hqService . getState ( ) ) == ( State . UP ) ) ) { final String name = PathAddress . pathAddress ( operation . require ( OP_ADDR ) ) . getLastElement ( ) . getValue ( ) ; <START_BUG> final BridgeConfiguration bridgeConfiguration = BridgeAdd . createBridgeConfiguration ( name , model ) ; <END_BUG> HornetQServer server = HornetQServer . class . cast ( hqService . getValue ( ) ) ; BridgeAdd . createBridge ( name , bridgeConfiguration , server . getHornetQServerControl ( ) ) ; } } @ Override public ModelNode getModelDescription ( Locale locale ) { } }

Fix:
final BridgeConfiguration bridgeConfiguration = BridgeAdd . createBridgeConfiguration ( context , name , model ) ;
Buggy code:
public class Button extends Control { String text = "" ; Image image ; Image image2 ; Image disabledImage ; ImageList imageList ; boolean ignoreMouse ; static final int MARGIN = 4 ; static final int CHECK_WIDTH ; static final int CHECK_HEIGHT ; static final int ICON_WIDTH = 128 ; static final int ICON_HEIGHT = 128 ; static final int ButtonProc ; static final TCHAR ButtonClass = new TCHAR ( 0 , "BUTTON" , true ) ; public Button ( Composite parent , int style ) { } void _setImage ( Image image ) { } void _setText ( String text ) { } public void addSelectionListener ( SelectionListener listener ) { } int callWindowProc ( int hwnd , int msg , int wParam , int lParam ) { } static int checkStyle ( int style ) { } void click ( ) { } int computeLeftMargin ( ) { } public Point computeSize ( int wHint , int hHint , boolean changed ) { } void createHandle ( ) { super . createHandle ( ) ; if ( ( ( style ) & ( SWT . PUSH ) ) == 0 ) state |= THEME_BACKGROUND ; <START_BUG> if ( ( OS . COMCTL32_MAJOR ) >= 6 ) { <END_BUG> if ( ( ( style ) & ( SWT . RADIO ) ) != 0 ) state |= DRAW_BACKGROUND ; } } int defaultBackground ( ) { } int defaultForeground ( ) { } void enableWidget ( boolean enabled ) { } public int getAlignment ( ) { } boolean getDefault ( ) { } public Image getImage ( ) { } String getNameText ( ) { } public boolean getSelection ( ) { } public String getText ( ) { } boolean isTabItem ( ) { } boolean mnemonicHit ( char ch ) { } boolean mnemonicMatch ( char key ) { } void releaseWidget ( ) { } public void removeSelectionListener ( SelectionListener listener ) { } void selectRadio ( ) { } public void setAlignment ( int alignment ) { } void setDefault ( boolean value ) { } boolean setFixedFocus ( ) { } public void setImage ( Image image ) { } boolean setRadioFocus ( ) { } boolean setRadioSelection ( boolean value ) { } boolean setSavedFocus ( ) { } public void setSelection ( boolean selected ) { } public void setText ( String string ) { } int widgetStyle ( ) { } TCHAR windowClass ( ) { } int windowProc ( ) { } LRESULT WM_ERASEBKGND ( int wParam , int lParam ) { } LRESULT WM_GETDLGCODE ( int wParam , int lParam ) { } LRESULT WM_KILLFOCUS ( int wParam , int lParam ) { } LRESULT WM_LBUTTONDOWN ( int wParam , int lParam ) { } LRESULT WM_LBUTTONUP ( int wParam , int lParam ) { } LRESULT WM_SETFOCUS ( int wParam , int lParam ) { } LRESULT WM_SIZE ( int wParam , int lParam ) { } LRESULT WM_SYSCOLORCHANGE ( int wParam , int lParam ) { } LRESULT wmCommandChild ( int wParam , int lParam ) { } LRESULT wmColorChild ( int wParam , int lParam ) { } LRESULT wmDrawChild ( int wParam , int lParam ) { } }

Fix:
if ( ( ( OS . COMCTL32_MAJOR ) >= 6 ) && ( OS . IsAppThemed ( ) ) ) {
Buggy code:
public abstract class StringResourceLoaderTestBase extends TestCase { protected IStringResourceLoader loader ; protected Application application ; protected Component component ; protected StringResourceLoaderTestBase ( String message ) { } protected abstract IStringResourceLoader createLoader ( ) { } @ Override protected void setUp ( ) throws Exception { super . setUp ( ) ; <START_BUG> this . application = new WicketTester ( ) . getApplication ( ) ; <END_BUG> Page page = new MockPageWithOneComponent ( ) ; this . component = new DummyComponent ( page , "component" , this . application ) ; this . loader = createLoader ( ) ; } public void testLoaderValidKeyNoStyleDefaultLocale ( ) { } public void testLoaderInvalidKeyNoStyleDefaultLocale ( ) { } public void testLoaderValidKeyNoStyleAlternativeLocale ( ) { } public void testLoaderInvalidKeyNoStyleAlternativeLocale ( ) { } public void testLoaderValidKeyStyleNoLocale ( ) { } public abstract void testLoaderUnknownResources ( ) { } }

Fix:
this . application = new wicket . util . tester . WicketTester ( new DummyApplication ( ) ) . getApplication ( ) ;
Buggy code:
public class CaseStatement extends Statement { public Expression constantExpression ; public CaseLabel targetLabel ; public boolean isEnumConstant ; public CaseStatement ( Expression constantExpression , int sourceEnd , int sourceStart ) { } public FlowInfo analyseCode ( BlockScope currentScope , FlowContext flowContext , FlowInfo flowInfo ) { } public StringBuffer printStatement ( int tab , StringBuffer output ) { } public void generateCode ( BlockScope currentScope , CodeStream codeStream ) { <START_BUG> if ( ( ( bits ) & ( IsReachableMASK ) ) == 0 ) { <END_BUG> return ; } int pc = codeStream . position ; targetLabel . place ( ) ; codeStream . recordPositionsFrom ( pc , this . sourceStart ) ; } public void resolve ( BlockScope scope ) { } public Constant resolveCase ( BlockScope scope , TypeBinding switchExpressionType , SwitchStatement switchStatement ) { } public void traverse ( ASTVisitor visitor , BlockScope blockScope ) { } }

Fix:
if ( ( ( bits ) & ( ASTNode . IsReachable ) ) == 0 ) {
Buggy code:
public class ListAdapter extends CursorAdapter { public ListAdapter ( Context context , Cursor c ) { } @ Override public View newView ( Context context , Cursor cursor , ViewGroup parent ) { <START_BUG> return LayoutInflater . from ( context ) . inflate ( fragment_list_item , parent ) ; <END_BUG> } @ Override public void bindView ( View view , Context context , Cursor cursor ) { } }

Fix:
return LayoutInflater . from ( context ) . inflate ( fragment_list_item , parent , false ) ;
Buggy code:
public class FilterForm extends Form { private static final long serialVersionUID = 1L ; private final HiddenField hidden ; private final IFilterStateLocator locator ; public FilterForm ( String id , IFilterStateLocator locator ) { } public final String getFocusTrackerFieldCssId ( ) { } public final IFilterStateLocator getStateLocator ( ) { } public final void enableFocusTracking ( FormComponent fc ) { fc . add ( new AbstractBehavior ( ) { private static final long serialVersionUID = 1L ; public void onComponentTag ( Component component , ComponentTag tag ) { <START_BUG> tag . put ( "id" , component . getPageRelativePath ( ) ) ; <END_BUG> tag . put ( "onfocus" , getFocusTrackingHandler ( component ) ) ; super . onComponentTag ( component , tag ) ; } } ) ; } public final String getFocusTrackingHandler ( Component component ) { } private static class FilterStateModel extends Model { private static final long serialVersionUID = 1L ; private IFilterStateLocator locator ; public FilterStateModel ( IFilterStateLocator locator ) { } public Object getObject ( ) { } public void setObject ( Object object ) { } } }

Fix:
tag . put ( "id" , component . getMarkupId ( ) ) ;
Buggy code:
public abstract class Container extends Component { private static final Log log = LogFactory . getLog ( Container . class ) ; private static final Map markupCache = new HashMap ( ) ; private static final int MINIMAP_MAX_ENTRIES = 8 ; private static final boolean optimizeChildMapsForSpace = false ; private Map childForName ; private transient MarkupStream markupStream ; public Container ( final String name ) { } public Container ( String name , IModel model ) { } public Container ( String name , IModel model , String expression ) { } public Container ( String name , Serializable object ) { } public Container ( String name , Serializable object , String expression ) { } public Container add ( final Component child ) { } public final Component get ( final String path ) { } public final Iterator iterator ( ) { } public void removeAll ( ) { } public Container replace ( final Component child ) { } public final int size ( ) { } public String toString ( ) { } public final Object visitChildren ( final Class c , final IVisitor visitor ) { } public final Object visitChildren ( final IVisitor visitor ) { } protected final MarkupStream findMarkupStream ( ) { } protected final MarkupStream getMarkupStream ( ) { } protected String getMarkupType ( ) { } protected void handleBody ( final MarkupStream markupStream , final ComponentTag openTag ) { } protected void handleRender ( ) { } protected final void renderAssociatedMarkup ( final String openTagName , final String exceptionMessage ) { } protected final void renderBody ( final MarkupStream markupStream , final ComponentTag openTag ) { } protected boolean resolveComponent ( final MarkupStream markupStream , final ComponentTag tag ) { } protected final void setMarkupStream ( final MarkupStream markupStream ) { } final MarkupStream getAssociatedMarkupStream ( ) { } final void renderAll ( final MarkupStream markupStream ) { } private Markup loadMarkup ( final Application application , final String key , final Resource markupResource ) throws IOException , ParseException , ResourceNotFoundException { <START_BUG> final Markup markup = application . getMarkupParser ( ) . read ( markupResource ) ; <END_BUG> Container . markupCache . put ( key , markup ) ; return markup ; } private Markup loadMarkupAndWatchForChanges ( final String key , final Resource markupResource ) { } private void optimize ( ) { } private void renderNext ( final MarkupStream markupStream ) { } }

Fix:
final Markup markup = application . getMarkupParser ( getPage ( ) ) . read ( markupResource ) ;
Buggy code:
public final class Job extends AbstractJob { private static final Logger log = LoggerFactory . getLogger ( Job . class ) ; private static final String DIRECTORY_CONTAINING_CONVERTED_INPUT = "data" ; private Job ( ) { } public static void main ( String [ ] args ) throws Exception { } @ Override public int run ( String [ ] args ) throws Exception { } public static void run ( Configuration conf , Path input , Path output , DistanceMeasure measure , IKernelProfile kernelProfile , double t1 , double t2 , double convergenceDelta , int maxIterations ) throws Exception { Path directoryContainingConvertedInput = new Path ( output , Job . DIRECTORY_CONTAINING_CONVERTED_INPUT ) ; InputDriver . runJob ( input , directoryContainingConvertedInput ) ; MeanShiftCanopyDriver . run ( conf , directoryContainingConvertedInput , output , measure , kernelProfile , t1 , t2 , convergenceDelta , maxIterations , true , true , false ) ; <START_BUG> ClusterDumper clusterDumper = new ClusterDumper ( new Path ( output , ( "clusters-" + maxIterations ) ) , new Path ( output , "clusteredPoints" ) ) ; <END_BUG> clusterDumper . printClusters ( null ) ; } }

Fix:
ClusterDumper clusterDumper = new ClusterDumper ( new Path ( output , "clusters-*-final" ) , new Path ( output , "clusteredPoints" ) ) ;
Buggy code:
public class RequestorWrapper implements IRequestor { ICodeSnippetRequestor requestor ; public RequestorWrapper ( ICodeSnippetRequestor requestor ) { } public boolean acceptClassFiles ( ClassFile [ ] classFiles , char [ ] codeSnippetClassName ) { } public void acceptProblem ( CategorizedProblem problem , char [ ] fragmentSource , int fragmentKind ) { try { IMarker marker = ResourcesPlugin . getWorkspace ( ) . getRoot ( ) . createMarker ( IJavaModelMarker . TRANSIENT_PROBLEM ) ; marker . setAttribute ( IJavaModelMarker . ID , problem . getID ( ) ) ; marker . setAttribute ( IMarker . CHAR_START , problem . getSourceStart ( ) ) ; marker . setAttribute ( IMarker . CHAR_END , ( ( problem . getSourceEnd ( ) ) + 1 ) ) ; marker . setAttribute ( IMarker . LINE_NUMBER , problem . getSourceLineNumber ( ) ) ; marker . setAttribute ( IMarker . MESSAGE , problem . getMessage ( ) ) ; marker . setAttribute ( IMarker . SEVERITY , ( problem . isWarning ( ) ? IMarker . SEVERITY_WARNING : IMarker . SEVERITY_ERROR ) ) ; <START_BUG> marker . setAttribute ( GENERATED_BY , GENERATED_BY ) ; <END_BUG> this . requestor . acceptProblem ( marker , new String ( fragmentSource ) , fragmentKind ) ; } catch ( CoreException e ) { e . printStackTrace ( ) ; } } }

Fix:
marker . setAttribute ( GENERATED_BY , JavaBuilder . SOURCE_ID ) ;
Buggy code:
public class RemoveFolderAction extends AbstractColumbaAction implements SelectionListener { public RemoveFolderAction ( FrameMediator frameMediator ) { } public void actionPerformed ( ActionEvent evt ) { } public void selectionChanged ( SelectionChangedEvent e ) { if ( ( ( ( org . columba . mail . gui . tree . selection . TreeSelectionChangedEvent ) ( e ) ) . getSelected ( ) . length ) > 0 ) { AbstractFolder folder = ( ( org . columba . mail . gui . tree . selection . TreeSelectionChangedEvent ) ( e ) ) . getSelected ( ) [ 0 ] ; if ( ( folder != null ) && ( folder instanceof MessageFolder ) ) { <START_BUG> FolderItem item = folder . getFolderItem ( ) ; <END_BUG> if ( item . get ( "property" , "accessrights" ) . equals ( "user" ) ) { setEnabled ( true ) ; } else { setEnabled ( false ) ; } } } else { setEnabled ( false ) ; } } }

Fix:
FolderItem item = folder . getConfiguration ( ) ;
Buggy code:
public class LocalOutboundConnectionService extends AbstractOutboundConnectionService < LocalOutboundConnectionService > { public static final ServiceName LOCAL_OUTBOUND_CONNECTION_BASE_SERVICE_NAME = SUBSYSTEM_ENDPOINT . append ( "local-outbound-connection" ) ; private static final String LOCAL_URI_SCHEME = "local:////" ; private final InjectedValue < OutboundSocketBinding > destinationOutboundSocketBindingInjectedValue = new InjectedValue < OutboundSocketBinding > ( ) ; private URI connectionURI ; public LocalOutboundConnectionService ( final String connectionName , final OptionMap connectionCreationOptions ) { } @ Override public IoFuture < Connection > connect ( ) throws IOException { final URI uri ; try { uri = this . getConnectionURI ( ) ; } catch ( URISyntaxException e ) { throw new RuntimeException ( e ) ; } final Endpoint endpoint = this . endpointInjectedValue . getValue ( ) ; <START_BUG> return endpoint . connect ( uri , this . connectionCreationOptions ) ; <END_BUG> } Injector < OutboundSocketBinding > getDestinationOutboundSocketBindingInjector ( ) { } private synchronized URI getConnectionURI ( ) throws IOException , URISyntaxException { } @ Override public LocalOutboundConnectionService getValue ( ) throws IllegalArgumentException , IllegalStateException { } }

Fix:
return endpoint . connect ( uri , this . connectionCreationOptions , getCallbackHandler ( ) ) ;
Buggy code:
class StringChange extends Change { private final BibtexString string ; private final String mem ; private final String disk ; private final String label ; private final InfoPane tp = new InfoPane ( ) ; private final JScrollPane sp = new JScrollPane ( tp ) ; private final BibtexString tmpString ; private static final Log LOGGER = LogFactory . getLog ( StringChange . class ) ; public StringChange ( BibtexString string , BibtexString tmpString , String label , String mem , String disk ) { } @ Override public boolean makeChange ( BasePanel panel , BibtexDatabase secondary , NamedCompound undoEdit ) { if ( ( string ) != null ) { string . setContent ( disk ) ; undoEdit . addEdit ( new net . sf . jabref . gui . undo . UndoableStringChange ( panel , string , false , mem , disk ) ) ; } else { String newId = IdGenerator . next ( ) ; BibtexString bs = new BibtexString ( newId , label , disk ) ; try { panel . database ( ) . addString ( bs ) ; undoEdit . addEdit ( new net . sf . jabref . gui . undo . UndoableInsertString ( panel , panel . database ( ) , bs ) ) ; } catch ( KeyCollisionException ex ) { <START_BUG> StringChange . LOGGER . info ( ( ( ( "Error:<seq2seq4repair_space>could<seq2seq4repair_space>not<seq2seq4repair_space>add<seq2seq4repair_space>string<seq2seq4repair_space>'" + ( string . getName ( ) ) ) + "':<seq2seq4repair_space>" ) + ( ex . getMessage ( ) ) ) , ex ) ; <END_BUG> } } if ( ( tmpString ) != null ) { tmpString . setContent ( disk ) ; } else { BibtexString bs = new BibtexString ( IdGenerator . next ( ) , label , disk ) ; secondary . addString ( bs ) ; } return true ; } @ Override JComponent description ( ) { } }

Fix:
StringChange . LOGGER . info ( ( ( ( "Error:<seq2seq4repair_space>could<seq2seq4repair_space>not<seq2seq4repair_space>add<seq2seq4repair_space>string<seq2seq4repair_space>'" + ( bs . getName ( ) ) ) + "':<seq2seq4repair_space>" ) + ( ex . getMessage ( ) ) ) , ex ) ;
Buggy code:
public class ReducerValueUpdater implements ValueUpdater < Object > { List < TridentTuple > tuples ; ReducerAggregator agg ; public ReducerValueUpdater ( ReducerAggregator agg , List < TridentTuple > tuples ) { } @ Override public Object update ( Object stored ) { <START_BUG> Object ret = stored ; <END_BUG> for ( TridentTuple t : tuples ) { ret = this . agg . reduce ( ret , t ) ; } return ret ; } }

Fix:
Object ret = ( stored == null ) ? this . agg . init ( ) : stored ;
Buggy code:
public class SolutionRepositoryVfsFileObjectTest { @ Test public void initFileTest ( ) throws Exception { String fileRef = "//etc//mondrian//SteelWheels//schema.xml" ; SolutionRepositoryVfsFileObject fileObject = new SolutionRepositoryVfsFileObject ( fileRef ) ; SolutionRepositoryVfsFileObject fileObjectSpy = spy ( fileObject ) ; IAclNodeHelper aclNodeHelper = mock ( IAclNodeHelper . class ) ; doReturn ( aclNodeHelper ) . when ( fileObjectSpy ) . getAclHelper ( ) ; RepositoryFile file = mock ( RepositoryFile . class ) ; doReturn ( true ) . when ( aclNodeHelper ) . canAccess ( file , EnumSet . of ( READ ) ) ; IUnifiedRepository repository = mock ( IUnifiedRepository . class ) ; doReturn ( file ) . when ( repository ) . getFile ( fileRef ) ; doReturn ( repository ) . when ( fileObjectSpy ) . getRepository ( ) ; fileObjectSpy . getName ( ) ; verify ( repository , times ( 1 ) ) . getFile ( anyString ( ) ) ; fileRef = "//etca//mondriana//SteelWheels//schema.xml" ; fileObject = new SolutionRepositoryVfsFileObject ( fileRef ) ; fileObjectSpy = spy ( fileObject ) ; doReturn ( aclNodeHelper ) . when ( fileObjectSpy ) . getAclHelper ( ) ; doReturn ( false ) . when ( aclNodeHelper ) . canAccess ( file , EnumSet . of ( READ ) ) ; doReturn ( repository ) . when ( fileObjectSpy ) . getRepository ( ) ; fileObjectSpy . getName ( ) ; <START_BUG> verify ( repository , times ( 1 ) ) . getFile ( anyString ( ) ) ; <END_BUG> } }

Fix:
verify ( repository , times ( 2 ) ) . getFile ( anyString ( ) ) ;
Buggy code:
public class Assert { protected Assert ( ) { } public static void assertTrue ( String message , boolean condition ) { } public static void assertTrue ( boolean condition ) { } public static void assertFalse ( String message , boolean condition ) { } public static void assertFalse ( boolean condition ) { } public static void fail ( String message ) { <START_BUG> throw new AssertionError ( message ) ; <END_BUG> } public static void fail ( ) { } public static void assertEquals ( String message , Object expected , Object actual ) { } public static void assertEquals ( Object expected , Object actual ) { } public static void assertEquals ( String message , Object [ ] expecteds , Object [ ] actuals ) { } public static void assertEquals ( Object [ ] expecteds , Object [ ] actuals ) { } public static void assertEquals ( String message , double expected , double actual , double delta ) { } public static void assertEquals ( double expected , double actual , double delta ) { } public static void assertEquals ( String message , float expected , float actual , float delta ) { } public static void assertEquals ( float expected , float actual , float delta ) { } public static void assertNotNull ( String message , Object object ) { } public static void assertNotNull ( Object object ) { } public static void assertNull ( String message , Object object ) { } public static void assertNull ( Object object ) { } public static void assertSame ( String message , Object expected , Object actual ) { } public static void assertSame ( Object expected , Object actual ) { } public static void assertNotSame ( String message , Object unexpected , Object actual ) { } public static void assertNotSame ( Object unexpected , Object actual ) { } private static void failSame ( String message ) { } private static void failNotSame ( String message , Object expected , Object actual ) { } private static void failNotEquals ( String message , Object expected , Object actual ) { } static String format ( String message , Object expected , Object actual ) { } }

Fix:
throw new AssertionError ( ( message == null ? "" : message ) ) ;
Buggy code:
public class PagedTableNavigatorWithLabelProviderTest extends TestCase { public PagedTableNavigatorWithLabelProviderTest ( ) { } public PagedTableNavigatorWithLabelProviderTest ( String name ) { } public void testPagedTable ( ) throws Exception { } private boolean validatePage ( final String document , final String file ) throws IOException { <START_BUG> return DiffUtil . validatePage ( document , this . getClass ( ) , file ) ; <END_BUG> } }

Fix:
return DiffUtil . validatePage ( document , this . getClass ( ) , file , true ) ;