nus-yam/ex-repair huggingface dataset:
Buggy code:
public class VersionTest extends TestCase { private static final String ME = "org.aspectj.bridge.VersionTest" ; public static void main ( String [ ] args ) { } public VersionTest ( String name ) { } public void testVersion ( ) { if ( time_text . equals ( "" ) ) return ; <START_BUG> Date date = new Date ( Version . time ) ; <END_BUG> SimpleDateFormat format = new SimpleDateFormat ( Version . SIMPLE_DATE_FORMAT , Locale . getDefault ( ) ) ; format . setTimeZone ( TimeZone . getTimeZone ( "GMT" ) ) ; String timeString = format . format ( date ) ; assertEquals ( time_text , timeString ) ; } }

Fix:
Date date = new Date ( Version . getTime ( ) ) ;
Buggy code:
public class JsonPersistence < T , M > implements ResourceTreePersistence < T , M > { private final Gson gson = new Gson ( ) ; private final File jsonFile ; private final ResourceTree < T , M > resourceTree ; private final ResourceTreeModeler < T , M > resourceTreeModeler ; private final Type type ; public JsonPersistence ( File jsonFile , ResourceTree < T , M > resourceTree , ResourceTreeModeler < T , M > resourceTreeModeler , Type type ) { } @ Override public void move ( T node , T parent ) { } @ Override public void add ( T node ) { } @ Override public void add ( T node , T parent ) { } @ Override public void remove ( T node ) { } @ Override public void update ( T node ) { } @ Override public void load ( ) { if ( ! ( jsonFile . exists ( ) ) ) { return ; } try ( Reader reader = new FileReader ( jsonFile ) ) { resourceTree . setTreePersistence ( new NullPersistence ( ) ) ; List < TreeModel < M > > rootModels = gson . fromJson ( reader , type ) ; reader . close ( ) ; Map < T , List < TreeModel < M > > > parentMap = new HashMap < > ( ) ; Map < T , List < TreeModel < M > > > nextParentMap = new HashMap < > ( ) ; for ( TreeModel < M > treeModel : rootModels ) { T parent = resourceTreeModeler . toResource ( treeModel . getNode ( ) ) ; resourceTree . add ( parent ) ; parentMap . put ( parent , treeModel . getChildren ( ) ) ; } while ( ( listOfListSize ( parentMap . values ( ) ) ) > 0 ) { nextParentMap . clear ( ) ; for ( T parent : parentMap . keySet ( ) ) { for ( TreeModel < M > treeModel : parentMap . get ( parent ) ) { T newParent = resourceTreeModeler . toResource ( treeModel . getNode ( ) ) ; <START_BUG> nextParentMap . put ( parent , treeModel . getChildren ( ) ) ; <END_BUG> resourceTree . add ( newParent , parent ) ; } } parentMap . clear ( ) ; parentMap . putAll ( nextParentMap ) ; } } catch ( Exception ex ) { throw new RuntimeException ( ex ) ; } finally { resourceTree . setTreePersistence ( this ) ; } } @ Override public void clear ( ) { } private void writeJsonFile ( ) { } private < L > int listOfListSize ( Collection < List < L > > lists ) { } }

Fix:
nextParentMap . put ( newParent , treeModel . getChildren ( ) ) ;
Buggy code:
public class PageAlgorithms extends WizardPage implements Listener { public static final String PAGE_NAME = "SignPageAlgorithms" ; private Combo cMDA = null ; private Combo cSign = null ; private Combo cCanon = null ; private Combo cTransform = null ; private Text tId = null ; private Button bEncWiz = null ; private IFile file ; private String [ ] ids ; private Table properties = null ; private TableViewer tableViewer = null ; private static final String ID_PROPERTY = "id" ; private static final String TARGET_PROPERTY = "target" ; private static final String CONTENT_PROPERTY = "content" ; private Button bAddProperty = null ; private Button bRemoveProperty = null ; private static final String SETTING_CALL_ENCRYPTION_WIZARD = "sign_enc" ; private Signature signature = null ; public PageAlgorithms ( final Signature signature , final IFile file ) { } public void createControl ( final Composite parent ) { } private void createPageContent ( final Composite parent ) { } private void addProperties ( ) { } private void attachLabelProvider ( final TableViewer viewer ) { } private void attachCellEditors ( final TableViewer viewer , final Composite parent ) { } private void addListeners ( ) { } private void determineIds ( ) { try { <START_BUG> ids = Utils . getAllIds ( file ) ; <END_BUG> } catch ( Exception ex ) { ids = new String [ ] { } ; } } private void dialogChanged ( ) { } private void updateStatus ( final String message , final int status ) { } public boolean performFinish ( ) { } public void handleEvent ( final Event e ) { } public boolean isPageComplete ( ) { } private boolean saveDataToModel ( ) { } public void onEnterPage ( ) { } private void loadSettings ( ) { } protected void storeSettings ( ) { } private class NewRowAction extends Action { public NewRowAction ( ) { } public void run ( ) { } } private class RemoveRowAction extends Action { public RemoveRowAction ( ) { } public void run ( ) { } } }

Fix:
ids = Utils . getAllIds ( file . getContents ( ) ) ;
Buggy code:
public abstract class ThreadPoolMetricsHandler extends AbstractRuntimeOnlyHandler { private final List < AttributeDefinition > metrics ; private final ServiceName serviceNameBase ; protected ThreadPoolMetricsHandler ( List < AttributeDefinition > metrics , ServiceName serviceNameBase ) { } public void registerAttributes ( final ManagementResourceRegistration registration ) { } @ Override protected void executeRuntimeStep ( OperationContext context , ModelNode operation ) throws OperationFailedException { } protected abstract void setResult ( OperationContext context , String attributeName , Service < ? > service ) throws OperationFailedException { } protected ServiceController < ? > getService ( final OperationContext context , final ModelNode operation ) throws OperationFailedException { final String name = Util . getNameFromAddress ( operation . require ( OP_ADDR ) ) ; ServiceController < ? > controller = context . getServiceRegistry ( false ) . getService ( serviceNameBase . append ( name ) ) ; if ( controller == null ) { <START_BUG> throw MESSAGES . threadPoolServiceNotFoundForMetrics ( serviceNameBase . append ( name ) ) ; <END_BUG> } return controller ; } }

Fix:
throw ROOT_LOGGER . threadPoolServiceNotFoundForMetrics ( serviceNameBase . append ( name ) ) ;
Buggy code:
public class Execute { private String [ ] m_command ; private Properties m_environment = new Properties ( ) ; private File m_workingDirectory = new File ( "." ) ; private boolean m_newEnvironment ; private OutputStream m_output ; private OutputStream m_error ; private long m_timeout ; private boolean m_useVMLauncher = true ; private static File getAntHomeDirectory ( ) { <START_BUG> final String antHome = System . getProperty ( "ant.home" ) ; <END_BUG> if ( null == antHome ) { final String message = "Cannot<seq2seq4repair_space>locate<seq2seq4repair_space>antRun<seq2seq4repair_space>script:<seq2seq4repair_space>Property<seq2seq4repair_space>'ant.home'<seq2seq4repair_space>not<seq2seq4repair_space>specified" ; throw new IllegalStateException ( message ) ; } return new File ( antHome ) ; } public static void runCommand ( final Task task , final String [ ] cmdline ) throws TaskException { } public Execute ( final ExecuteStreamHandler streamHandler ) { } public Execute ( ) { } public void setTimeout ( final long timeout ) { } public void setOutput ( final OutputStream output ) { } public void setError ( final OutputStream error ) { } public void setCommandline ( String [ ] commandline ) { } public void setEnvironment ( final Properties environment ) { } public void setNewenvironment ( boolean newEnvironment ) { } public void setVMLauncher ( boolean useVMLauncher ) { } public void setWorkingDirectory ( final File workingDirectory ) { } public int execute ( ) throws IOException , TaskException { } }

Fix:
final String antHome = System . getProperty ( "myrmidon.home" ) ;
Buggy code:
public abstract class BaseTestCase extends TestCase { private BaseTestCase ( ) { } public BaseTestCase ( String name ) { } public void runBare ( ) throws Throwable { } public final TestConfiguration getTestConfiguration ( ) { } public final File getFailureFolder ( ) { } public static void alarm ( final String text ) { } public static void println ( final String text ) { } public static void printStackTrace ( Throwable t ) { } private static final PrintStream out = System . out ; protected static void setSystemProperty ( final String name , final String value ) { } protected static void removeSystemProperty ( final String name ) { } protected static String getSystemProperty ( final String name ) { } protected static URL getTestResource ( final String name ) { } protected static InputStream openTestResource ( final URL url ) throws PrivilegedActionException { } public static void assertSecurityManager ( ) { } public static void assertEquals ( InputStream is1 , InputStream is2 ) throws IOException { } public static void assertEquals ( Reader r1 , Reader r2 ) throws IOException { } public static void assertThrowableEquals ( Throwable t1 , Throwable t2 ) { } public static void assertEquals ( final File file1 , final File file2 ) { } public void assertExecJavaCmdAsExpected ( String [ ] expectedString , String [ ] cmd , int expectedExitValue ) throws IOException , InterruptedException { } public Process execJavaCmd ( String [ ] cmd ) throws IOException { int totalSize = 3 + ( cmd . length ) ; String [ ] tcmd = new String [ totalSize ] ; <START_BUG> tcmd [ 0 ] = "java" ; <END_BUG> tcmd [ 1 ] = "-classpath" ; tcmd [ 2 ] = BaseTestCase . getSystemProperty ( "java.class.path" ) ; System . arraycopy ( cmd , 0 , tcmd , 3 , cmd . length ) ; final String [ ] command = tcmd ; Process pr = null ; try { pr = ( ( Process ) ( AccessController . doPrivileged ( new PrivilegedExceptionAction ( ) { public Object run ( ) throws IOException { Process result = null ; result = Runtime . getRuntime ( ) . exec ( command ) ; return result ; } } ) ) ) ; } catch ( PrivilegedActionException pe ) { Exception e = pe . getException ( ) ; if ( e instanceof IOException ) throw ( ( IOException ) ( e ) ) ; else throw ( ( SecurityException ) ( e ) ) ; } return pr ; } public static final String getJavaExecutableName ( ) { } public String readProcessOutput ( Process pr ) throws InterruptedException { } public static void removeDirectory ( String path ) { } public static void removeDirectory ( File dir ) { } public static void fail ( String msg , Exception e ) throws AssertionFailedError { } }

Fix:
tcmd [ 0 ] = BaseTestCase . getJavaExecutableName ( ) ;
Buggy code:
public class XMLResultAggregator extends Task implements XMLConstants { protected Vector filesets = new Vector ( ) ; protected String toFile ; protected File toDir ; protected Vector transformers = new Vector ( ) ; public static final String DEFAULT_DIR = "." ; public static final String DEFAULT_FILENAME = "TESTS-TestSuites.xml" ; public AggregateTransformer createReport ( ) { AggregateTransformer transformer = new AggregateTransformer ( this ) ; <START_BUG> transformers . add ( transformer ) ; <END_BUG> return transformer ; } public void setTofile ( String value ) { } public void setTodir ( File value ) { } public void addFileSet ( FileSet fs ) { } public void execute ( ) throws BuildException { } protected File getDestinationFile ( ) { } protected File [ ] getFiles ( ) { } protected void writeDOMTree ( Document doc , File file ) throws IOException { } protected Element createDocument ( ) { } protected void addTestSuite ( Element root , Element testsuite ) { } private static DocumentBuilder getDocumentBuilder ( ) { } }

Fix:
transformers . addElement ( transformer ) ;
Buggy code:
public class Quantifier { private String label ; private String sign ; private int time = - 1 ; private int min = - 1 ; private int max = - 1 ; public Quantifier ( ParsingObject po ) { } public Quantifier ( String s ) { } public String getLabel ( ) { } public int getTime ( ) { } private void setTime ( int time ) { } public int getMin ( ) { } private void setMin ( int min ) { } public int getMax ( ) { } private void setMax ( int max ) { } private String getSign ( ) { } public boolean hasRepeat ( ) { } public String repeatRule ( String rule ) { } @ Override public String toString ( ) { String s = getSign ( ) ; if ( s != null ) { <START_BUG> if ( s . endsWith ( "?" ) ) <END_BUG> return s . substring ( 0 , ( ( s . length ( ) ) - 1 ) ) ; else return s ; } else { return "" ; } } }

Fix:
if ( ( ( s . length ( ) ) == 2 ) && ( s . endsWith ( "?" ) ) )
Buggy code:
@ RunWith ( Arquillian . class ) public class MessagingTestCase { private static final String QUEUE_EXAMPLE_QUEUE = "queue.exampleQueue" ; static final Logger log = Logger . getLogger ( MessagingTestCase . class ) ; private static final String BODY = "msg.body" ; private ClientSessionFactory sf ; private ClientSession session ; private ClientConsumer consumer ; private final AtomicBoolean shutdown = new AtomicBoolean ( ) ; private final CountDownLatch latch = new CountDownLatch ( 1 ) ; private volatile String receivedMessage ; @ Deployment public static JavaArchive createDeployment ( ) throws Exception { } @ Before public void start ( ) throws Exception { System . out . println ( ( "CLASSLOADER<seq2seq4repair_space>" + ( this . getClass ( ) . getClassLoader ( ) ) ) ) ; if ( ! ( isInContainer ( ) ) ) { return ; } sf = HornetQClient . createServerLocatorWithoutHA ( new TransportConfiguration ( InVMConnectorFactory . class . getName ( ) ) ) . createSessionFactory ( ) ; ClientSession coreSession = sf . createSession ( false , true , true ) ; <START_BUG> coreSession . createQueue ( MessagingTestCase . QUEUE_EXAMPLE_QUEUE , MessagingTestCase . QUEUE_EXAMPLE_QUEUE , true ) ; <END_BUG> coreSession . close ( ) ; session = sf . createSession ( ) ; consumer = session . createConsumer ( MessagingTestCase . QUEUE_EXAMPLE_QUEUE ) ; session . start ( ) ; new Thread ( new Runnable ( ) { @ Override public void run ( ) { while ( ! ( shutdown . get ( ) ) ) { try { ClientMessage message = consumer . receive ( 500 ) ; if ( message == null ) { continue ; } String s = message . getStringProperty ( MessagingTestCase . BODY ) ; MessagingTestCase . log . info ( ( "-----><seq2seq4repair_space>Received:<seq2seq4repair_space>" + s ) ) ; receivedMessage = s ; latch . countDown ( ) ; } catch ( HornetQException e ) { MessagingTestCase . log . error ( "Exception,<seq2seq4repair_space>closing<seq2seq4repair_space>receiver" , e ) ; } } } } ) . start ( ) ; MessagingTestCase . log . info ( "-----><seq2seq4repair_space>Started<seq2seq4repair_space>queue<seq2seq4repair_space>and<seq2seq4repair_space>session" ) ; } @ After public void stop ( ) throws Exception { } @ Test public void testMessaging ( ) throws Exception { } private void sendMessage ( String txt ) throws Exception { } private boolean isInContainer ( ) { } }

Fix:
coreSession . createQueue ( MessagingTestCase . QUEUE_EXAMPLE_QUEUE , MessagingTestCase . QUEUE_EXAMPLE_QUEUE , false ) ;
Buggy code:
public class KRule extends KASTNode { private boolean isLoop = false ; private ArrayList < KCondition > preConds = new ArrayList < > ( ) ; private ArrayList < KCondition > postConds = new ArrayList < > ( ) ; private String retVal ; private Type retType ; private ArrayList < Cell > cells = new ArrayList < > ( ) ; private HashMap < SimpleName , Integer > env = new HashMap < > ( ) ; private HashMap < Integer , KRewriteObj > store = null ; private List < String > objStore = new ArrayList < > ( ) ; public KRule ( MethodInfo methodInfo , HashMap < Integer , KRewriteObj > store0 ) { } public KRule ( MethodInfo methodInfo , LoopInfo loopInfo , HashMap < Integer , KRewriteObj > store0 ) { } private void rewriteLI ( LoopInfo loopInfo ) { } private ArrayList < Cell > constructCells ( MethodInfo methodInfo , LoopInfo loopInfo ) { } private Collection < KCondition > extractAllPostCond ( ArrayList < String > postCondList , ArrayList < SingleVariableDeclaration > formalParams ) { } private Collection < KCondition > extractAllPreCond ( ArrayList < Expression > preCondList , ArrayList < SingleVariableDeclaration > formalParams ) { Collection < KCondition > allPreCond = new ArrayList < > ( ) ; formalParams . stream ( ) . filter ( ( varDecl ) -> varDecl . getType ( ) . isPrimitiveType ( ) ) . forEach ( ( primVar ) -> allPreCond . add ( KCondition . genKConditionFromConstraintString ( ConstraintGen . genRangeConstraint4Type ( primVar . getType ( ) . toString ( ) , TypeMapping . convert2KVar ( primVar . getName ( ) . toString ( ) , true ) ) ) ) ) ; preCondList . forEach ( ( preCondExpr ) -> allPreCond . add ( KCondition . genKConditionFromJavaExpr ( preCondExpr , formalParams ) ) ) ; this . store . keySet ( ) . stream ( ) . filter ( ( loc ) -> this . env . values ( ) . contains ( loc ) ) . forEach ( ( loc ) -> { KRewriteObj kObj = this . store . get ( loc ) ; if ( kObj . isPrimitiveDataType ( ) ) allPreCond . add ( kObj . genConstraint ( ) ) ; } ) ; <START_BUG> if ( ( ( ( this . retType ) != null ) && ( this . retType . isPrimitiveType ( ) ) ) && ( ! ( this . isLoop ) ) ) { <END_BUG> Expression retExpr = ExpressionParser . parseExprStr ( this . retVal ) ; String retKVal = CellContentGenerator . fromJExpr2KExprString ( retExpr , formalParams ) . trim ( ) ; allPreCond . add ( KCondition . genKConditionFromConstraintString ( ConstraintGen . genRangeConstraint4Type ( this . retType . toString ( ) , retKVal ) ) ) ; } return allPreCond ; } @ Override public String toString ( ) { } }

Fix:
if ( ( ( ( ( this . retType ) != null ) && ( this . retType . isPrimitiveType ( ) ) ) && ( ! ( this . isLoop ) ) ) && ( ! ( this . retType . toString ( ) . equals ( "boolean" ) ) ) ) {
Buggy code:
public class JHVEventContainer { private static JHVEventContainer singletonInstance ; private final JHVEventCache eventCache ; private final JHVEventHandlerCache eventHandlerCache ; private JHVEventContainerRequestHandler incomingRequestManager ; private static final double factor = 0.2 ; private static JHVRelatedEvents lastHighlighted = null ; private JHVEventContainer ( ) { } public static JHVEventContainer getSingletonInstance ( ) { } public void requestForInterval ( final Date startDate , final Date endDate , final JHVEventHandler handler ) { if ( ( startDate != null ) && ( endDate != null ) ) { long deltaT = Math . max ( ( ( long ) ( ( ( endDate . getTime ( ) ) - ( startDate . getTime ( ) ) ) * ( JHVEventContainer . factor ) ) ) , ( ( ( ( 1000 * 60 ) * 60 ) * 24 ) * 5 ) ) ; Date newStartDate = new Date ( ( ( startDate . getTime ( ) ) - deltaT ) ) ; <START_BUG> Date newEndDate = new Date ( Math . max ( ( ( endDate . getTime ( ) ) + deltaT ) , System . currentTimeMillis ( ) ) ) ; <END_BUG> eventHandlerCache . add ( handler ) ; JHVEventCacheResult result = eventCache . get ( startDate , endDate , newStartDate , newEndDate ) ; Map < JHVEventType , SortedMap < SortedDateInterval , JHVRelatedEvents > > events = result . getAvailableEvents ( ) ; handler . newEventsReceived ( events ) ; for ( JHVEventType eventType : result . getMissingIntervals ( ) . keySet ( ) ) { List < Interval < Date > > missingList = result . getMissingIntervals ( ) . get ( eventType ) ; for ( Interval < Date > missing : missingList ) { requestEvents ( eventType , missing . getStart ( ) , missing . getEnd ( ) ) ; } } } } public void finishedDownload ( boolean partially ) { } public void removeEvents ( final JHVEventType eventType , boolean keepActive ) { } private void requestEvents ( JHVEventType eventType , Date startDate , Date endDate ) { } private void fireEventCacheChanged ( ) { } public Collection < Interval < Date > > getAllRequestIntervals ( JHVEventType eventType ) { } public void intervalsNotDownloaded ( JHVEventType eventType , Interval < Date > interval ) { } public void eventTypeActivated ( JHVEventType eventType ) { } public static void highlight ( JHVRelatedEvents event ) { } public void registerHandler ( JHVEventContainerRequestHandler incomingRequestManager ) { } public void reset ( SWEKEventType eventType ) { } }

Fix:
Date newEndDate = new Date ( ( ( endDate . getTime ( ) ) + deltaT ) ) ;
Buggy code:
public class LayTheDrawAlgo extends MarketAlgo implements IMarketAlgo { public static final String DRAW = "DRAW" ; private static final String ALGO_TYPE = "LTD" ; private Logger logger = LoggerFactory . getLogger ( LayTheDrawAlgo . class ) ; @ Override protected void classifyMarket ( Event event ) throws Exception { } @ Override public void process ( Event event ) throws Exception { } protected Bet getCashOutBetForMarket ( MarketCatalogue marketCatalogue , Double exposure ) throws Exception { } private double calcBackRunnerCashOutBetSize ( MatchOddsMarket mom , Double netExposure ) throws Exception { } private double calcLayHomeRunnerCashOutBetSize ( MatchOddsMarket mom , Double netExposure ) throws Exception { } private double calcLayAwayRunnerCashOutBetSize ( MatchOddsMarket mom , Double netExposure ) throws Exception { } @ Override protected String getAlgoType ( ) { } private boolean isCandidateLayMarket ( Event event , MarketCatalogue marketCatalogue ) throws Exception { } private boolean isCandidateCoverMarket ( Event event , MarketCatalogue marketCatalogue ) throws Exception { if ( marketCatalogue == null ) { return false ; } MatchOddsMarket mom = new MatchOddsMarket ( marketCatalogue ) ; Runner runner = mom . getDrawRunner ( ) ; <START_BUG> if ( isBasicCoverCandidate ( event , marketCatalogue ) ) { <END_BUG> return false ; } if ( ! ( isBetAlreadyOpen ( marketCatalogue , event ) ) ) { return false ; } try { if ( ! ( isBestCoveringLayPriceWithinBounds ( event , marketCatalogue , mom ) ) ) { return false ; } } catch ( RuntimeException ex ) { logger . info ( ex . toString ( ) ) ; return false ; } try { if ( ! ( isBackLaySpreadWithinBounds ( event , mom , runner ) ) ) { return false ; } } catch ( RuntimeException ex ) { logger . info ( ex . toString ( ) ) ; return false ; } return true ; } private boolean isCandidateLosingCoverMarket ( Event event , MarketCatalogue marketCatalogue ) throws Exception { } private boolean isBasicCoverCandidate ( Event event , MarketCatalogue marketCatalogue ) throws Exception { } private boolean isBestOpeningLayPriceWithinBounds ( Event event , MatchOddsMarket mom , Runner runner ) { } private boolean isCoveringLossWithinBounds ( Event event , MarketCatalogue marketCatalogue , MatchOddsMarket mom ) throws Exception { } private boolean isBestCoveringLayPriceWithinBounds ( Event event , MarketCatalogue marketCatalogue , MatchOddsMarket mom ) throws Exception { } private Double calcPercentageProfitStake ( Event event , MarketCatalogue marketCatalogue , MatchOddsMarket mom ) throws Exception { } private Double calcPercentageProfitExposure ( Event event , MarketCatalogue marketCatalogue , MatchOddsMarket mom ) throws Exception { } private boolean isBetAlreadyOpen ( MarketCatalogue marketCatalogue , Event event ) throws Exception { } private Double getLayTheDrawLayLimit ( MarketTemp marketTemp , MarketType marketType ) { } private Double getLayTheDrawLossLimit ( MarketTemp marketTemp , MarketType marketType ) { } private Double getCashOutProfitPercentage ( ) { } No newline ; at end ; of file ; }

Fix:
if ( ! ( isBasicCoverCandidate ( event , marketCatalogue ) ) ) {
Buggy code:
public class GameState { private static GameState instance = null ; private int NUM_OF_PLAYERS ; private int NUM_GOOD_PLAYERS ; private int NUM_BAD_PLAYERS ; private int REJECTED_ROUNDS ; private int ROUND ; private int GOOD_SCORE ; private int BAD_SCORE ; private int NEXT_PLAYER ; private Player [ ] players ; private int [ ] [ ] PLAYERS_PER_ROUND ; private Player [ ] TEAM_THIS_ROUND ; protected GameState ( ) { } public static GameState getInstance ( ) { } public void resetGame ( ) { } public int getNumPlayers ( ) { } public int getNumGoodPlayers ( ) { } public int getNumBadPlayers ( ) { } public Player [ ] getPlayers ( ) { } public int getRejectedRounds ( ) { } public int getRound ( ) { } public int getBadScore ( ) { } public int getGoodScore ( ) { } public int getNumPlayersThisRound ( ) { <START_BUG> return PLAYERS_PER_ROUND [ NUM_OF_PLAYERS ] [ ROUND ] ; <END_BUG> } public void setNumPlayers ( int num ) { } private void setGoodBad ( int num ) { } public void newRejectedRound ( ) { } public void resetRejectedRounds ( ) { } public void newRound ( ) { } public void roundWin ( String team ) { } public void createPlayers ( String [ ] names ) { } private int randInt ( int min , int max ) { } public String getTeamCaptain ( ) { } public void setTeamThisRound ( Player [ ] selected ) { } public Player [ ] getTeamThisRound ( ) { } No newline ; at end ; of file ; }

Fix:
return PLAYERS_PER_ROUND [ ( ( NUM_OF_PLAYERS ) - 5 ) ] [ ROUND ] ;
Buggy code:
public abstract class AbstractRuntimeOnlyHandler implements OperationStepHandler { public void waitFor ( ServiceController < ? > controller ) throws OperationFailedException { } @ Override public void execute ( OperationContext context , ModelNode operation ) throws OperationFailedException { context . addStep ( new OperationStepHandler ( ) { @ Override public void execute ( OperationContext context , ModelNode operation ) throws OperationFailedException { executeRuntimeStep ( context , operation ) ; } } , RUNTIME ) ; <START_BUG> context . completeStep ( NOOP_ROLLBACK_HANDLER ) ; <END_BUG> } protected abstract void executeRuntimeStep ( OperationContext context , ModelNode operation ) throws OperationFailedException { } private static class ServiceWaitListener < T > implements ServiceListener < T > { @ Override public void listenerAdded ( ServiceController < ? extends T > serviceController ) { } @ Override public void transition ( ServiceController < ? extends T > serviceController , ServiceController . Transition transition ) { } @ Override public void serviceRemoveRequested ( ServiceController < ? extends T > serviceController ) { } @ Override public void serviceRemoveRequestCleared ( ServiceController < ? extends T > serviceController ) { } @ Override public void dependencyFailed ( ServiceController < ? extends T > serviceController ) { } @ Override public void dependencyFailureCleared ( ServiceController < ? extends T > serviceController ) { } @ Override public void immediateDependencyUnavailable ( ServiceController < ? extends T > serviceController ) { } @ Override public void immediateDependencyAvailable ( ServiceController < ? extends T > serviceController ) { } @ Override public void transitiveDependencyUnavailable ( ServiceController < ? extends T > serviceController ) { } @ Override public void transitiveDependencyAvailable ( ServiceController < ? extends T > serviceController ) { } } }

Fix:
context . stepCompleted ( ) ;
Buggy code:
public class HeaderManager extends ConfigTestElement implements Serializable { public static final String HEADERS = "HeaderManager.headers" ; private static final int columnCount = 2 ; private static final String [ ] columnNames = new String [ ] { JMeterUtils . getResString ( "name" ) , JMeterUtils . getResString ( "value" ) } ; private static List addableList = new LinkedList ( ) ; public HeaderManager ( ) { } public CollectionProperty getHeaders ( ) { } public int getColumnCount ( ) { } public String getColumnName ( int column ) { } public Class getColumnClass ( int column ) { } public Header getHeader ( int row ) { } public void save ( String headFile ) throws IOException { } public void addFile ( String headerFile ) throws IOException { } public void add ( Header h ) { } public void add ( ) { } public void remove ( int index ) { } public int size ( ) { } public Header get ( int i ) { } public void removeHeaderNamed ( String name ) { Vector removeIndices = new Vector ( ) ; for ( int i = ( getHeaders ( ) . size ( ) ) - 1 ; i > 0 ; i -- ) { <START_BUG> Header header = ( ( Header ) ( getHeaders ( ) . get ( i ) ) ) ; <END_BUG> if ( header == null ) { continue ; } if ( header . getName ( ) . equalsIgnoreCase ( name ) ) { removeIndices . addElement ( new Integer ( i ) ) ; } } for ( Enumeration e = removeIndices . elements ( ) ; e . hasMoreElements ( ) ; ) { getHeaders ( ) . remove ( ( ( Integer ) ( e . nextElement ( ) ) ) . intValue ( ) ) ; } } public String [ ] split ( String splittee , String splitChar , String def ) { } public String getClassLabel ( ) { } }

Fix:
Header header = ( ( Header ) ( getHeaders ( ) . get ( i ) . getObjectValue ( ) ) ) ;
Buggy code:
@ Repository public class VideoRepository extends AbstractRepository < Video > { public VideoRepository ( ) { } @ Override protected RowMapper < Video > getRowMapper ( ) { <START_BUG> return new GenericRowMapper ( Video . class ) ; <END_BUG> } public List < Video > dateGroup ( ) { } public List < Video > find ( Date startTime , Date endTime ) { } public List < Video > findChatroomVideos ( int index , int size ) { } public Video find ( String file ) { } public List < Video > findRecommend ( ) { } public List < Video > findByColumn ( final String column ) { } private final class VideoRowMapper implements RowMapper < Video > { @ Override public Video mapRow ( ResultSet resultSet , int i ) throws SQLException { } } }

Fix:
return new VideoRepository . VideoRowMapper ( ) ;
Buggy code:
class TestSuiteService extends BaseService { public TestSuiteService ( XmlRpcClient xmlRpcClient , String devKey ) { } @ SuppressWarnings ( "unchecked" ) protected TestSuite createTestSuite ( Integer testProjectId , String name , String details , Integer parentId , Integer order , Boolean checkDuplicatedName , String actionOnDuplicatedName ) throws TestLinkAPIException { } @ SuppressWarnings ( "unchecked" ) protected TestSuite [ ] getTestSuiteByID ( List < Integer > testSuiteIds ) throws TestLinkAPIException { } @ SuppressWarnings ( "unchecked" ) protected Attachment uploadTestSuiteAttachment ( Integer testSuiteId , String title , String description , String fileName , String fileType , String content ) throws TestLinkAPIException { } @ SuppressWarnings ( "unchecked" ) protected TestSuite [ ] getTestSuitesForTestPlan ( Integer testPlanId ) throws TestLinkAPIException { } @ SuppressWarnings ( "unchecked" ) protected TestSuite [ ] getTestSuitesForTestSuite ( Integer testSuiteId ) throws TestLinkAPIException { TestSuite [ ] testSuites = null ; try { Map < String , Object > executionData = new HashMap < String , Object > ( ) ; executionData . put ( testSuiteId . toString ( ) , testSuiteId ) ; Object response = this . executeXmlRpcCall ( getTestSuitesForTestSuite . toString ( ) , executionData ) ; <START_BUG> Map < String , Object > responseMap = ( ( Map < String , Object > ) ( response ) ) ; <END_BUG> Set < Map . Entry < String , Object > > entrySet = responseMap . entrySet ( ) ; testSuites = new TestSuite [ entrySet . size ( ) ] ; boolean singleElement = false ; int index = 0 ; for ( Map . Entry < String , Object > entry : entrySet ) { String key = entry . getKey ( ) ; Object o = entry . getValue ( ) ; if ( o instanceof String ) { singleElement = true ; break ; } Map < String , Object > testSuiteMap = ( ( Map < String , Object > ) ( entry . getValue ( ) ) ) ; testSuiteMap . put ( id . toString ( ) , key ) ; testSuites [ index ] = Util . getTestSuite ( testSuiteMap ) ; index += 1 ; } if ( singleElement ) { testSuites = new TestSuite [ 1 ] ; testSuites [ 0 ] = Util . getTestSuite ( responseMap ) ; } } catch ( XmlRpcException xmlrpcex ) { throw new TestLinkAPIException ( ( "Error<seq2seq4repair_space>retrieving<seq2seq4repair_space>test<seq2seq4repair_space>suites<seq2seq4repair_space>which<seq2seq4repair_space>are<seq2seq4repair_space>DIRECT<seq2seq4repair_space>children<seq2seq4repair_space>of<seq2seq4repair_space>a<seq2seq4repair_space>given<seq2seq4repair_space>TestSuite:<seq2seq4repair_space>" + ( xmlrpcex . getMessage ( ) ) ) , xmlrpcex ) ; } return testSuites ; } @ SuppressWarnings ( "unchecked" ) protected TestSuite [ ] getFirstLevelTestSuitesForTestProject ( Integer testProjectId ) throws TestLinkAPIException { } }

Fix:
Map < String , Object > responseMap = Util . castToMap ( response ) ;
Buggy code:
public class Vector { double [ ] v = new double [ 4 ] ; public static final Vector LEFT = new Vector ( ( - 1 ) , 0 , 0 , 1 ) ; public static final Vector UP = new Vector ( 0 , 0 , 1 , 1 ) ; public static final Vector NORMAL = new Vector ( 0 , 1 , 0 , 1 ) ; public static final Vector U1 = new Vector ( 1 , 0 , 0 , 1 ) ; public static final Vector U2 = new Vector ( 0 , 1 , 0 , 1 ) ; public static final Vector U3 = new Vector ( 0 , 0 , 1 , 1 ) ; public static final Vector M1 = new Vector ( ( - 1 ) , 0 , 0 , 1 ) ; public static final Vector M2 = new Vector ( 0 , ( - 1 ) , 0 , 1 ) ; public static final Vector M3 = new Vector ( 0 , 0 , ( - 1 ) , 1 ) ; public static final Vector Z = new Vector ( 0 , 0 , 0 , 1 ) ; public static final Vector ONES = new Vector ( 1 , 1 , 1 , 1 ) ; public Vector ( double x1 , double x2 , double x3 , double x4 ) { } public Vector ( float x1 , float x2 , float x3 ) { } public Vector ( ) { } public Vector ( Vector o ) { } public Vector ( double [ ] v ) { } public Vector times ( double s ) { } public Vector project ( ) { } public Vector normalize ( ) { } public double unscaledLength ( ) { } public double unscaledLengthSquared ( ) { } public double length ( ) { } public Vector cross ( Vector o ) { } public String toString ( ) { } public boolean withinDelta ( Vector o , double delta ) { } public Vector minus ( ) { } public void glTranslate ( ) { } public void glRotate ( double theta ) { } public Vector times ( Matrix m ) { } public Vector scaleTo ( double s ) { } public Vector plus ( Vector o ) { } public double x ( ) { } public double y ( ) { } public double z ( ) { } public double w ( ) { } public Vector minus ( Vector o ) { } public double lengthSquared ( ) { } public double get ( int i ) { } public void set ( int i , double value ) { } @ Override public int hashCode ( ) { } @ Override public boolean equals ( Object obj ) { } public double dot ( Vector o ) { } public double theta ( Vector u1 , Vector u2 ) { } public double [ ] toDoubleArray ( ) { } public Vector elementTimes ( Vector o ) { } public Vector divide ( Vector o ) { } public Vector floor ( ) { } public Vector modulo ( double grain ) { } public boolean leq ( Vector other ) { <START_BUG> return ( ( ( x ( ) ) < ( other . x ( ) ) ) && ( ( y ( ) ) < ( other . y ( ) ) ) ) && ( ( z ( ) ) < ( other . z ( ) ) ) ; <END_BUG> } }

Fix:
return ( ( ( x ( ) ) <= ( other . x ( ) ) ) && ( ( y ( ) ) <= ( other . y ( ) ) ) ) && ( ( z ( ) ) <= ( other . z ( ) ) ) ;
Buggy code:
public class Assignment extends Expression { public Expression lhs ; public Expression expression ; public Assignment ( Expression lhs , Expression expression , int sourceEnd ) { } public FlowInfo analyseCode ( BlockScope currentScope , FlowContext flowContext , FlowInfo flowInfo ) { } void checkAssignmentEffect ( BlockScope scope ) { } void checkAssignment ( BlockScope scope , TypeBinding lhsType , TypeBinding rhsType ) { FieldBinding leftField = getLastField ( this . lhs ) ; if ( ( ( ( leftField != null ) && ( rhsType != ( NullBinding ) ) ) && ( lhsType . isWildcard ( ) ) ) && ( ( ( ( WildcardBinding ) ( lhsType ) ) . kind ) != ( Wildcard . SUPER ) ) ) { scope . problemReporter ( ) . wildcardAssignment ( lhsType , rhsType , this . expression ) ; } else if ( ( ( leftField != null ) && ( leftField . declaringClass . isRawType ( ) ) ) && ( ( rhsType . isParameterizedType ( ) ) || ( rhsType . isGenericType ( ) ) ) ) { scope . problemReporter ( ) . unsafeRawFieldAssignment ( leftField , rhsType , this . lhs ) ; } else <START_BUG> if ( ( rhsType . isRawType ( ) ) && ( ( lhsType . isParameterizedType ( ) ) || ( lhsType . isGenericType ( ) ) ) ) { <END_BUG> scope . problemReporter ( ) . unsafeRawConversion ( this . expression , rhsType , lhsType ) ; } } public void generateCode ( BlockScope currentScope , CodeStream codeStream , boolean valueRequired ) { } Binding getDirectBinding ( Expression someExpression ) { } FieldBinding getLastField ( Expression someExpression ) { } public StringBuffer print ( int indent , StringBuffer output ) { } public StringBuffer printExpression ( int indent , StringBuffer output ) { } public StringBuffer printExpressionNoParenthesis ( int indent , StringBuffer output ) { } public StringBuffer printStatement ( int indent , StringBuffer output ) { } public TypeBinding resolveType ( BlockScope scope ) { } public TypeBinding resolveTypeExpecting ( BlockScope scope , TypeBinding expectedType ) { } public void traverse ( ASTVisitor visitor , BlockScope scope ) { } }

Fix:
if ( ( rhsType . isRawType ( ) ) && ( ( lhsType . isBoundParameterizedType ( ) ) || ( lhsType . isGenericType ( ) ) ) ) {
Buggy code:
public class CCCheckin extends ClearCase { public static final String FLAG_COMMENT = "-c" ; public static final String FLAG_COMMENTFILE = "-cfile" ; public static final String FLAG_NOCOMMENT = "-nc" ; public static final String FLAG_NOWARN = "-nwarn" ; public static final String FLAG_PRESERVETIME = "-ptime" ; public static final String FLAG_KEEPCOPY = "-keep" ; public static final String FLAG_IDENTICAL = "-identical" ; private String m_Comment = null ; private String m_Cfile = null ; private boolean m_Nwarn = false ; private boolean m_Ptime = false ; private boolean m_Keep = false ; private boolean m_Identical = true ; public void setComment ( String comment ) { } public void setCommentFile ( String cfile ) { } public void setIdentical ( boolean identical ) { } public void setKeepCopy ( boolean keep ) { } public void setNoWarn ( boolean nwarn ) { } public void setPreserveTime ( boolean ptime ) { } public String getComment ( ) { } public String getCommentFile ( ) { } public boolean getIdentical ( ) { } public boolean getKeepCopy ( ) { } public boolean getNoWarn ( ) { } public boolean getPreserveTime ( ) { } public void execute ( ) throws BuildException { Commandline commandLine = new Commandline ( ) ; Project aProj = getProject ( ) ; int result = 0 ; if ( ( getViewPath ( ) ) == null ) { setViewPath ( aProj . getBaseDir ( ) . getPath ( ) ) ; } commandLine . setExecutable ( getClearToolCommand ( ) ) ; commandLine . createArgument ( ) . setValue ( COMMAND_CHECKIN ) ; checkOptions ( commandLine ) ; result = run ( commandLine ) ; if ( result != 0 ) { String msg = "Failed<seq2seq4repair_space>executing:<seq2seq4repair_space>" + ( commandLine . toString ( ) ) ; <START_BUG> throw new BuildException ( msg , location ) ; <END_BUG> } } private void getCommentCommand ( Commandline cmd ) { } private void getCommentFileCommand ( Commandline cmd ) { } private void checkOptions ( Commandline cmd ) { } }

Fix:
throw new BuildException ( msg ) ;
Buggy code:
public class CommitLogSegment { private static final Logger logger = LoggerFactory . getLogger ( CommitLogSegment . class ) ; private static Pattern COMMIT_LOG_FILE_PATTERN = Pattern . compile ( "CommitLog-(\\d+).log" ) ; public final long id ; private final BufferedRandomAccessFile logWriter ; private Map < Integer , Integer > cfLastWrite = new HashMap < Integer , Integer > ( ) ; public CommitLogSegment ( ) { } public static long idFromFilename ( String filename ) { } public static boolean possibleCommitLogFile ( String filename ) { } private static BufferedRandomAccessFile createWriter ( String file ) throws IOException { } public ReplayPosition write ( RowMutation rowMutation ) throws IOException { } public void sync ( ) throws IOException { } public ReplayPosition getContext ( ) { } public String getPath ( ) { } public String getName ( ) { } public long length ( ) { } public void close ( ) { } void turnOn ( Integer cfId , Integer position ) { } void turnOffIfNotWritten ( Integer cfId , Integer flushPosition ) { } void turnOff ( Integer cfId ) { } String dirtyString ( ) { StringBuilder sb = new StringBuilder ( ) ; for ( Integer cfId : cfLastWrite . keySet ( ) ) { CFMetaData m = DatabaseDescriptor . getCFMetaData ( cfId ) ; <START_BUG> sb . append ( ( m == null ? m . cfName : "<deleted>" ) ) . append ( "<seq2seq4repair_space>(" ) . append ( cfId ) . append ( "),<seq2seq4repair_space>" ) ; <END_BUG> } return sb . toString ( ) ; } boolean isSafeToDelete ( ) { } @ Override public String toString ( ) { } }

Fix:
sb . append ( ( m == null ? "<deleted>" : m . cfName ) ) . append ( "<seq2seq4repair_space>(" ) . append ( cfId ) . append ( "),<seq2seq4repair_space>" ) ;
Buggy code:
public class BehandlungR extends SimProcess { private Process myModel ; public BehandlungR ( Model owner , String name , boolean showInTrace ) { } public void lifeCycle ( ) { while ( true ) { <START_BUG> if ( ( myModel . mittagspauseQueueR . contains ( this ) ) && ( ( myModel . presentTime ( ) . getTimeAsDouble ( ) ) > 270.0 ) ) { <END_BUG> BehandlungR mittagspauseR = this ; if ( ( myModel . presentTime ( ) . getTimeAsDouble ( ) ) < 270.0 ) { sendTraceNote ( "Puffer<seq2seq4repair_space>vor<seq2seq4repair_space>Mittagspause" ) ; hold ( new TimeSpan ( ( 270.0 - ( myModel . presentTime ( ) . getTimeAsDouble ( ) ) ) , TimeUnit . MINUTES ) ) ; } sendTraceNote ( "Mittagspause" ) ; hold ( new TimeSpan ( 60.0 ) ) ; myModel . mittagspauseQueueR . remove ( mittagspauseR ) ; myModel . untaetigeBehandlungRQueue . insert ( this ) ; mittagspauseR . passivate ( ) ; } if ( ( myModel . behandlungRQueue . isEmpty ( ) ) && ( myModel . prioBehandlungRQueue . isEmpty ( ) ) ) { myModel . untaetigeBehandlungRQueue . insert ( this ) ; passivate ( ) ; } else { if ( ! ( myModel . prioBehandlungRQueue . isEmpty ( ) ) ) { Patient naechsterPatientBehR = myModel . prioBehandlungRQueue . first ( ) ; myModel . prioBehandlungRQueue . remove ( naechsterPatientBehR ) ; hold ( new TimeSpan ( myModel . getBehandlungszeitR ( ) , TimeUnit . MINUTES ) ) ; naechsterPatientBehR . activate ( new TimeSpan ( 0.0 ) ) ; } else { Patient naechsterPatientBehR = myModel . behandlungRQueue . first ( ) ; myModel . behandlungRQueue . remove ( naechsterPatientBehR ) ; hold ( new TimeSpan ( myModel . getBehandlungszeitR ( ) , TimeUnit . MINUTES ) ) ; naechsterPatientBehR . activate ( new TimeSpan ( 0.0 ) ) ; } } } } }

Fix:
if ( ( myModel . mittagspauseQueueR . contains ( this ) ) && ( ( myModel . presentTime ( ) . getTimeAsDouble ( ) ) >= 265.0 ) ) {
Buggy code:
public class FastDatePrinterTest { private static final String YYYY_MM_DD = "yyyy//MM//dd" ; private static final TimeZone NEW_YORK = TimeZone . getTimeZone ( "America//New_York" ) ; private static final Locale SWEDEN = new Locale ( "sv" , "SE" ) ; DatePrinter getInstance ( String format ) { } private DatePrinter getDateInstance ( int dateStyle , Locale locale ) { <START_BUG> return getInstance ( FormatCache . getPatternForStyle ( dateStyle , null , locale ) , TimeZone . getDefault ( ) , Locale . getDefault ( ) ) ; <END_BUG> } private DatePrinter getInstance ( String format , Locale locale ) { } private DatePrinter getInstance ( String format , TimeZone timeZone ) { } protected DatePrinter getInstance ( String format , TimeZone timeZone , Locale locale ) { } @ Test public void testFormat ( ) { } @ Test public void testShortDateStyleWithLocales ( ) { } @ Test public void testLowYearPadding ( ) { } @ Test public void testMilleniumBug ( ) { } @ Test public void testSimpleDate ( ) { } @ Test public void testLang303 ( ) { } @ Test public void testLang538 ( ) { } @ Test public void testLang645 ( ) { } @ Test public void testEquals ( ) { } @ Test public void testToStringContainsName ( ) { } @ Test public void testPatternMatches ( ) { } @ Test public void testLocaleMatches ( ) { } @ Test public void testTimeZoneMatches ( ) { } @ Test public void testCalendarTimezoneRespected ( ) { } }

Fix:
return getInstance ( FormatCache . getPatternForStyle ( Integer . valueOf ( dateStyle ) , null , locale ) , TimeZone . getDefault ( ) , Locale . getDefault ( ) ) ;
Buggy code:
public class Stats { public static void dumpStats ( boolean enableCallGraphConstruction , File outputFile ) throws IOException { } private static void dumpStats ( CGAnalysis cga , FileWriter fw ) throws IOException { double time = cga . run ( ) ; <START_BUG> Q cg = cga . getCallGraph ( ) ; <END_BUG> Graph cgGraph = cg . eval ( ) ; AtlasSet < GraphElement > callsites = Common . universe ( ) . nodesTaggedWithAny ( CallSite ) . eval ( ) . nodes ( ) ; DecimalFormat decimalFormat = new DecimalFormat ( "#.##" ) ; fw . write ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( cga . getClass ( ) . getSimpleName ( ) ) + "," ) + ( decimalFormat . format ( time ) ) ) + "," ) + ( cgGraph . nodes ( ) . size ( ) ) ) + "," ) + ( cgGraph . edges ( ) . size ( ) ) ) + "," ) + ( callsites . size ( ) ) ) + "," ) + ( Stats . getStaticDispatches ( callsites ) . size ( ) ) ) + "," ) + ( Stats . getDynamicDispatches ( callsites ) . size ( ) ) ) + "," ) + ( Stats . getMaxDynamicDispatchesPerCallsite ( callsites , cga ) ) ) + "," ) + ( Stats . getMinDynamicDispatchesPerCallsite ( callsites , cga ) ) ) + "," ) + ( Stats . getAverageDynamicDispatchesPerCallsite ( callsites , cga ) ) ) + "\n" ) ) ; fw . flush ( ) ; } private static AtlasSet < GraphElement > getStaticDispatches ( AtlasSet < GraphElement > callsites ) { } private static AtlasSet < GraphElement > getDynamicDispatches ( AtlasSet < GraphElement > callsites ) { } private static Long getMaxDynamicDispatchesPerCallsite ( AtlasSet < GraphElement > callsites , CGAnalysis cga ) { } private static Long getMinDynamicDispatchesPerCallsite ( AtlasSet < GraphElement > callsites , CGAnalysis cga ) { } private static Double getAverageDynamicDispatchesPerCallsite ( AtlasSet < GraphElement > callsites , CGAnalysis cga ) { } }

Fix:
Q cg = cga . getCallGraph ( ) . retainEdges ( ) ;
Buggy code:
public class RejectedReservations extends ActionBarActivity { @ Override protected void onCreate ( Bundle savedInstanceState ) { super . onCreate ( savedInstanceState ) ; <START_BUG> AdminReservationAdapter adapter = new AdminReservationAdapter ( this , getSupportFragmentManager ( ) , 2 ) ; <END_BUG> if ( ( adapter . getCount ( ) ) == 0 ) { setContentView ( empty_list_view ) ; TextView emptyListText = ( ( TextView ) ( findViewById ( emptyListText ) ) ) ; emptyListText . setText ( "This<seq2seq4repair_space>list<seq2seq4repair_space>is<seq2seq4repair_space>still<seq2seq4repair_space>empty" ) ; } else { setContentView ( activity_accepted_reservations ) ; ListView reservationsList = ( ( ListView ) ( findViewById ( listViewAccepted ) ) ) ; reservationsList . setAdapter ( adapter ) ; } } @ Override public boolean onCreateOptionsMenu ( Menu menu ) { } @ Override public boolean onOptionsItemSelected ( MenuItem item ) { } }

Fix:
AdminReservationAdapter adapter = new AdminReservationAdapter ( this , getSupportFragmentManager ( ) , ( - 1 ) ) ;
Buggy code:
public class CookieTest extends TestCase { private MockWebApplication application ; private SignInPanel panel ; private Form form ; private Cookie cookieUsername ; private Cookie cookiePassword ; private Cookie [ ] cookies ; private WebPage page ; private WebRequestCycle cycle ; public CookieTest ( String name ) { } protected void setUp ( ) throws Exception { } public void testSetCookieOnForm ( ) throws IOException , ServletException { <START_BUG> this . form . setFormComponentValuesFromPersister ( ) ; <END_BUG> FormComponent username = ( ( FormComponent ) ( panel . get ( "signInForm.username" ) ) ) ; FormComponent password = ( ( FormComponent ) ( panel . get ( "signInForm.password" ) ) ) ; Assert . assertEquals ( cookieUsername . getValue ( ) , username . getModelObjectAsString ( ) ) ; Assert . assertEquals ( "test" , password . getModelObjectAsString ( ) ) ; } public void testSetCookieOnPage ( ) throws IOException , ServletException { } public void testPersistCookieWithPersistenceDisabled ( ) throws IOException , ServletException { } public void testPersistCookie ( ) throws IOException , ServletException { } public void testRemoveFromPage ( ) throws IOException , ServletException { } }

Fix:
this . form . loadPersistentFormComponentValues ( ) ;
Buggy code:
public class UNKRecord extends Record { private static UNKRecord member = new UNKRecord ( ) ; private byte [ ] data ; private UNKRecord ( ) { } private UNKRecord ( Name name , short type , short dclass , int ttl ) { } static UNKRecord getMember ( ) { } Record rrFromWire ( Name name , short type , short dclass , int ttl , int length , DataByteInputStream in ) throws IOException { } Record rdataFromString ( Name name , short dclass , int ttl , Tokenizer st , Name origin ) throws IOException { <START_BUG> throw new TextParseException ( "Invalid<seq2seq4repair_space>unknown<seq2seq4repair_space>RR<seq2seq4repair_space>encoding" ) ; <END_BUG> } public String rdataToString ( ) { } void rrToWire ( DataByteOutputStream out , Compression c , boolean canonical ) { } }

Fix:
throw st . exception ( "invalid<seq2seq4repair_space>unknown<seq2seq4repair_space>RR<seq2seq4repair_space>encoding" ) ;