nus-yam/ex-repair huggingface dataset:
Buggy code:
public class BasicTableModelFilter extends TreeTableModelDecorator { protected boolean newFlag = false ; protected boolean answeredFlag = false ; protected boolean flaggedFlag = false ; protected boolean expungedFlag = false ; protected boolean attachmentFlag = false ; protected String patternString = new String ( ) ; protected boolean dataFiltering = false ; public BasicTableModelFilter ( TreeTableModelInterface tableModel ) { } public void setDataFiltering ( boolean b ) throws Exception { } public boolean isEnabled ( ) { } public void setNewFlag ( boolean b ) throws Exception { } public boolean getNewFlag ( ) { } public void setAnsweredFlag ( boolean b ) throws Exception { } public boolean getAnsweredFlag ( ) { } public void setFlaggedFlag ( boolean b ) throws Exception { } public boolean getFlaggedFlag ( ) { } public void setExpungedFlag ( boolean b ) throws Exception { } public boolean getExpungedFlag ( ) { } public void setAttachmentFlag ( boolean b ) throws Exception { } public boolean getAttachmentFlag ( ) { } public void setPatternString ( String s ) throws Exception { } public String getPatternString ( ) { } protected boolean testString ( HeaderInterface header ) { } public boolean addItem ( HeaderInterface header ) { boolean result = true ; boolean result2 = false ; boolean flags1 = false ; boolean flags2 = false ; Flags flags = ( ( org . columba . mail . message . ColumbaHeader ) ( header ) ) . getFlags ( ) ; if ( flags == null ) { System . out . println ( "flags<seq2seq4repair_space>is<seq2seq4repair_space>null" ) ; return false ; } if ( getNewFlag ( ) ) { if ( flags . getSeen ( ) ) result = false ; } if ( getAnsweredFlag ( ) ) { if ( ! ( flags . getAnswered ( ) ) ) result = false ; } if ( getFlaggedFlag ( ) ) { if ( ! ( flags . getFlagged ( ) ) ) result = false ; } if ( getExpungedFlag ( ) ) { <START_BUG> if ( ! ( flags . getDeleted ( ) ) ) <END_BUG> result = false ; } if ( getAttachmentFlag ( ) ) { Boolean attach = ( ( Boolean ) ( header . get ( "columba.attachment" ) ) ) ; boolean attachment = attach . booleanValue ( ) ; if ( ! attachment ) result = false ; } if ( ! ( getPatternString ( ) . equals ( "" ) ) ) { flags2 = true ; result2 = testString ( header ) ; } else result2 = true ; if ( result2 ) { if ( result ) { return true ; } } return false ; } }

Fix:
if ( ! ( flags . getExpunged ( ) ) )
Buggy code:
@ Named @ RequestScoped public class RegisterBean { private static final Logger LOGGER = Logger . getLogger ( RegisterBean . class . getName ( ) ) ; @ Inject private UserManagerLocal userManager ; @ Inject private SessionBean sessionBean ; private String firstName ; private String name ; private String userName ; private String mail ; private String password ; private String passwordWdhl ; public RegisterBean ( ) { } public String register ( ) { try { AbdUser user = userManager . register ( firstName , name , userName , mail , password , passwordWdhl ) ; sessionBean . setAktUser ( user ) ; } catch ( IncompleteUserRegisterException ex ) { RegisterBean . LOGGER . log ( Level . SEVERE , null , ex ) ; FacesContext . getCurrentInstance ( ) . addMessage ( null , new FacesMessage ( FacesMessage . SEVERITY_ERROR , ex . getMessage ( ) , "" ) ) ; return "register" ; } catch ( NoValidUserNameException ex ) { RegisterBean . LOGGER . log ( Level . SEVERE , null , ex ) ; FacesContext . getCurrentInstance ( ) . addMessage ( null , new FacesMessage ( FacesMessage . SEVERITY_ERROR , ex . getMessage ( ) , "" ) ) ; return "register" ; } catch ( HashFailException ex ) { RegisterBean . LOGGER . log ( Level . SEVERE , null , ex ) ; FacesContext . getCurrentInstance ( ) . addMessage ( null , new FacesMessage ( FacesMessage . SEVERITY_ERROR , ex . getMessage ( ) , "" ) ) ; return "register" ; } <START_BUG> FacesContext . getCurrentInstance ( ) . addMessage ( null , new FacesMessage ( FacesMessage . SEVERITY_INFO , "Congratulations!<seq2seq4repair_space>You<seq2seq4repair_space>are<seq2seq4repair_space>registered<seq2seq4repair_space>for<seq2seq4repair_space>Auto-B-Day.<seq2seq4repair_space>Please<seq2seq4repair_space>check<seq2seq4repair_space>your<seq2seq4repair_space>mails!" , "" ) ) ; <END_BUG> return "index" ; } public String getMail ( ) { } public void setMail ( String mail ) { } public String getPasswordWdhl ( ) { } public void setPasswordWdhl ( String passwordWdhl ) { } public String getPassword ( ) { } public void setPassword ( String password ) { } public String getFirstName ( ) { } public void setFirstName ( String firstName ) { } public String getName ( ) { } public void setName ( String name ) { } public String getUserName ( ) { } public void setUserName ( String userName ) { } }

Fix:
FacesContext . getCurrentInstance ( ) . addMessage ( null , new FacesMessage ( FacesMessage . SEVERITY_INFO , "Congratulations!<seq2seq4repair_space>You<seq2seq4repair_space>are<seq2seq4repair_space>registered<seq2seq4repair_space>for<seq2seq4repair_space>Auto-B-Day!" , "" ) ) ;
Buggy code:
public class TableTest extends CleanupHelper { private static final String KEY2 = "key2" ; private static final String TEST_KEY = "key1" ; public interface Runner { public void run ( ) throws Exception { } } public static void reTest ( ColumnFamilyStore cfs , TableTest . Runner verify ) throws Exception { } @ Test public void testGetRowNoColumns ( ) throws Throwable { } @ Test public void testGetRowSingleColumn ( ) throws Throwable { } @ Test public void testGetRowSliceByRange ( ) throws Throwable { } @ Test public void testGetSliceNoMatch ( ) throws Throwable { } @ Test public void testGetSliceWithCutoff ( ) throws Throwable { } private void validateGetSliceNoMatch ( Table table ) throws IOException { } @ Test public void testGetSliceFromBasic ( ) throws Throwable { } @ Test public void testGetSliceFromAdvanced ( ) throws Throwable { } @ Test public void testGetSliceFromLarge ( ) throws Throwable { Table table = Table . open ( "Keyspace1" ) ; ColumnFamilyStore cfStore = table . getColumnFamilyStore ( "Standard1" ) ; String key = "row3" ; RowMutation rm = new RowMutation ( "Keyspace1" , key ) ; ColumnFamily cf = ColumnFamily . create ( "Keyspace1" , "Standard1" ) ; for ( int i = 1000 ; i < 2000 ; i ++ ) cf . addColumn ( Util . column ( ( "col" + i ) , ( "v" + i ) , 1L ) ) ; rm . add ( cf ) ; rm . apply ( ) ; cfStore . forceBlockingFlush ( ) ; validateSliceLarge ( cfStore ) ; if ( ( cfStore . getSSTables ( ) . size ( ) ) > 1 ) { <START_BUG> cfStore . doCompaction ( 2 , cfStore . getSSTables ( ) . size ( ) ) ; <END_BUG> } SSTableReader sstable = cfStore . getSSTables ( ) . iterator ( ) . next ( ) ; DecoratedKey decKey = sstable . getPartitioner ( ) . decorateKey ( key ) ; long position = sstable . getPosition ( decKey ) ; BufferedRandomAccessFile file = new BufferedRandomAccessFile ( sstable . getFilename ( ) , "r" ) ; file . seek ( position ) ; assert file . readUTF ( ) . equals ( key ) ; file . readInt ( ) ; IndexHelper . skipBloomFilter ( file ) ; ArrayList < IndexHelper . IndexInfo > indexes = IndexHelper . deserializeIndex ( file ) ; assert ( indexes . size ( ) ) > 2 ; validateSliceLarge ( cfStore ) ; } private void validateSliceLarge ( ColumnFamilyStore cfStore ) throws IOException { } @ Test public void testGetSliceFromSuperBasic ( ) throws Throwable { } public static void assertColumns ( ColumnFamily cf , String ... columnNames ) { } }

Fix:
instance . submitMajor ( cfStore ) . get ( ) ;
Buggy code:
@ ServerEndpoint ( value = "//websocket_sample" , decoders = { PingDecoder . class , MessageDecoder . class , FileAttrDecoder . class , TextDataDecoder . class } , encoders = { MessageEncoder . class , FileAttrEncorder . class } ) @ Dependent public class WebSocketSampleEndPoint { private static final Set < Session > sessions = Collections . newSetFromMap ( new ConcurrentHashMap < Session , Boolean > ( ) ) ; private FileAttr uploadFile ; @ OnOpen public void onOpen ( Session session ) { } @ OnClose public void onClose ( Session session ) { } @ OnMessage public void onMessage ( TextBase obj , Session client ) throws IOException , EncodeException { } public void onPingMessage ( Ping ping , Session client ) throws IOException , EncodeException { } public void onMessageToBroadCast ( Message message , Session client ) throws IOException , EncodeException { } public void onUploadFile ( FileAttr file ) throws IOException , EncodeException { } public void onInvalidMessage ( TextData text , Session client ) throws IOException , EncodeException { } @ OnMessage public void onBinaryFile ( ByteBuffer buf , Session client ) throws IOException , EncodeException { <START_BUG> if ( ( uploadFile ) != null ) { <END_BUG> return ; } for ( Session other : client . getOpenSessions ( ) ) { RemoteEndpoint . Async ep = other . getAsyncRemote ( ) ; ep . sendObject ( uploadFile ) ; ep . sendBinary ( buf ) ; } uploadFile = null ; } public void broadCast ( @ Observes Message message ) { } }

Fix:
if ( ( uploadFile ) == null ) {
Buggy code:
public class ConnectionFactory implements TestListener { private static TopicConnectionFactory factory = null ; private static QueueConnectionFactory qfactory = null ; static Logger log = LoggingManager . getLoggerForClass ( ) ; protected ConnectionFactory ( ) { } public void testStarted ( String test ) { } public void testEnded ( String test ) { } public void testEnded ( ) { } public void testStarted ( ) { } public void testIterationStart ( LoopIterationEvent event ) { } public static synchronized TopicConnectionFactory getTopicConnectionFactory ( Context ctx , String fac ) { while ( ( ConnectionFactory . factory ) == null ) { try { Object objfac = ctx . lookup ( fac ) ; if ( objfac instanceof TopicConnectionFactory ) { ConnectionFactory . factory = ( ( TopicConnectionFactory ) ( objfac ) ) ; } } catch ( NamingException e ) { <START_BUG> ConnectionFactory . log . error ( e . getCause ( ) . toString ( ) ) ; <END_BUG> } } return ConnectionFactory . factory ; } public static synchronized QueueConnectionFactory getQueueConnectionFactory ( Context ctx , String fac ) { } public static synchronized TopicConnection getTopicConnection ( ) { } public static QueueConnection getQueueConnection ( Context ctx , String queueConn ) { } }

Fix:
ConnectionFactory . log . error ( e . getRootCause ( ) . toString ( ) ) ;
Buggy code:
public class CityZenCommand { public static void delegate ( CommandSender sender , String [ ] args ) { } private static void save ( CommandSender sender ) { } private static void reload ( CommandSender sender ) { } private static void info ( CommandSender sender ) { Plugin plugin = CityZen . getPlugin ( ) ; StringBuilder message = new StringBuilder ( ( ( ( ( ChatColor . GOLD ) + "" ) + ( ChatColor . BOLD ) ) + "===<seq2seq4repair_space>CityZen:<seq2seq4repair_space>The<seq2seq4repair_space>Premier<seq2seq4repair_space>City<seq2seq4repair_space>Management<seq2seq4repair_space>Plugin<seq2seq4repair_space>===\n" ) ) ; message . append ( ( ( ( ( ( ( ( ( ( ( ( ( ChatColor . RESET ) + "" ) + ( ChatColor . BLUE ) ) + "|<seq2seq4repair_space>Version:<seq2seq4repair_space>" ) + ( ChatColor . WHITE ) ) + ( plugin . getDescription ( ) . getVersion ( ) ) ) + ( ChatColor . BLUE ) ) + "<seq2seq4repair_space>Author:<seq2seq4repair_space>" ) + ( ChatColor . WHITE ) ) + "iamvishnu" ) + ( ChatColor . GRAY ) ) + "<seq2seq4repair_space>(<seq2seq4repair_space>iamvishnu.tumblr.com<seq2seq4repair_space>)\n" ) ) ; <START_BUG> message . append ( ( ( ( ( ChatColor . BLUE ) + "|<seq2seq4repair_space>Download,<seq2seq4repair_space>get<seq2seq4repair_space>help,<seq2seq4repair_space>and<seq2seq4repair_space>learn<seq2seq4repair_space>about<seq2seq4repair_space>the<seq2seq4repair_space>plugin<seq2seq4repair_space>on<seq2seq4repair_space>GitHub:\n" ) + ( ChatColor . GRAY ) ) + "https:////github.com//griffenx//CityZen//wiki\n" ) ) ; <END_BUG> message . append ( ( ( ( ( ( ( ChatColor . BLUE ) + "|<seq2seq4repair_space>For<seq2seq4repair_space>a<seq2seq4repair_space>list<seq2seq4repair_space>of<seq2seq4repair_space>commands,<seq2seq4repair_space>try<seq2seq4repair_space>\"" ) + ( ChatColor . WHITE ) ) + "//cityzen<seq2seq4repair_space>help" ) + ( ChatColor . BLUE ) ) + "\"" ) ) ; sender . sendMessage ( message . toString ( ) ) ; } private static void help ( CommandSender sender , String [ ] args ) { } }

Fix:
message . append ( ( ( ( ( ChatColor . BLUE ) + "|<seq2seq4repair_space>Download,<seq2seq4repair_space>get<seq2seq4repair_space>help,<seq2seq4repair_space>and<seq2seq4repair_space>learn<seq2seq4repair_space>about<seq2seq4repair_space>the<seq2seq4repair_space>plugin<seq2seq4repair_space>on<seq2seq4repair_space>GitHub:\n|" ) + ( ChatColor . GRAY ) ) + "<seq2seq4repair_space>https:////github.com//griffenx//CityZen//wiki\n" ) ) ;
Buggy code:
public class EditorRegistryReader extends RegistryReader { public static final String TAG_EDITOR = "editor" ; public static final String P_TRUE = "true" ; private EditorRegistry editorRegistry ; protected void addEditors ( EditorRegistry registry ) { } protected boolean readElement ( IConfigurationElement element ) { if ( ! ( element . getName ( ) . equals ( EditorRegistryReader . TAG_EDITOR ) ) ) return false ; String id = element . getAttribute ( ATT_ID ) ; if ( ( element . getAttribute ( ATT_ID ) ) == null ) { logMissingAttribute ( element , ATT_ID ) ; return true ; } EditorDescriptor editor = new EditorDescriptor ( id , element ) ; List extensionsVector = new ArrayList ( ) ; List filenamesVector = new ArrayList ( ) ; boolean defaultEditor = false ; if ( ( element . getAttribute ( ATT_NAME ) ) == null ) { logMissingAttribute ( element , ATT_NAME ) ; return true ; } if ( ( element . getAttribute ( ATT_ICON ) ) == null ) { <START_BUG> if ( ( element . getAttribute ( ATT_CLASS ) ) != null ) { <END_BUG> logMissingAttribute ( element , ATT_ICON ) ; return true ; } } String extensionsString = element . getAttribute ( ATT_EXTENSIONS ) ; if ( extensionsString != null ) { StringTokenizer tokenizer = new StringTokenizer ( extensionsString , "," ) ; while ( tokenizer . hasMoreTokens ( ) ) { extensionsVector . add ( tokenizer . nextToken ( ) . trim ( ) ) ; } } String filenamesString = element . getAttribute ( ATT_FILENAMES ) ; if ( filenamesString != null ) { StringTokenizer tokenizer = new StringTokenizer ( filenamesString , "," ) ; while ( tokenizer . hasMoreTokens ( ) ) { filenamesVector . add ( tokenizer . nextToken ( ) . trim ( ) ) ; } } String def = element . getAttribute ( ATT_DEFAULT ) ; if ( def != null ) defaultEditor = Boolean . valueOf ( def ) . booleanValue ( ) ; editorRegistry . addEditorFromPlugin ( editor , extensionsVector , filenamesVector , defaultEditor ) ; return true ; } public void readElement ( EditorRegistry editorRegistry , IConfigurationElement element ) { } }

Fix:
if ( ( getClassValue ( element , ATT_CLASS ) ) != null ) {
Buggy code:
@ Service @ Transactional public class UserActivityService { DateFormat dateFormat = new SimpleDateFormat ( "MM//dd//yyyy<seq2seq4repair_space>HH:mm:ss" ) ; @ Autowired private UserActivityRepository userActivityRepository ; @ Autowired private BookStatusesService bookStatusesService ; @ Autowired private BookStatusesRepository bookStatusesRepository ; @ Autowired private UserService userService ; @ Autowired private UserRepository userRepository ; public UserActivity findOne ( int userActivityId ) { } private Date checkedOutDate ( ) { } private Date dueDate ( ) { } public UserActivity updateUserActivity ( Book book ) { } public UserActivity renewBook ( int userActivityId ) { UserActivity userActivity = userActivityRepository . findOne ( userActivityId ) ; userActivity . setDueDate ( dueDate ( ) ) ; userActivity . setBookStatuses ( bookStatusesService . findOne ( 2 ) ) ; Short count = userActivity . getRenewalCount ( ) ; <START_BUG> userActivity . setRenewalCount ( ( count ++ ) ) ; <END_BUG> return userActivityRepository . saveAndFlush ( userActivity ) ; } }

Fix:
userActivity . setRenewalCount ( ( ++ count ) ) ;
Buggy code:
public class Pow extends BinaryOp { public Pow ( Expr base , Expr exponent ) { } public static Expr simplifiedIns ( Expr base , Expr exponent ) { } @ Override public Expr subs ( Expr from , Expr to ) { } @ Override public Expr diff ( Expr expr ) { if ( ( arg2 ) instanceof SymReal < ? > ) { SymReal < ? > realExp = ( ( SymReal < ? > ) ( arg2 ) ) ; <START_BUG> return realExp . multiply ( Pow . simplifiedIns ( arg1 , ( ( arg2 ) - 1 ) ) ) . multiply ( arg1 . diff ( expr ) ) ; <END_BUG> } else { Expr x = expr ; Expr b = arg1 ; Expr e = arg2 ; Expr y = this ; Expr log_b = Log . simplifiedIns ( b ) ; Expr term1 = e . diff ( x ) . multiply ( log_b ) ; Expr term2 = e . multiply ( b . diff ( x ) ) . divide ( b ) ; return y . multiply ( term1 . add ( term2 ) ) ; } } @ Override public Expr simplify ( ) { } @ Override public boolean symEquals ( Expr other ) { } @ Override public void flattenAdd ( List < Expr > outList ) { } @ Override public void flattenMultiply ( List < Expr > outList ) { } }

Fix:
return realExp . multiply ( Pow . simplifiedIns ( arg1 , arg2 . subtract ( 1 ) ) ) . multiply ( arg1 . diff ( expr ) ) ;
Buggy code:
public class StringListValue extends Value { public static final String [ ] EMPTY = new String [ 0 ] ; private static final Localizer s_loc = Localizer . forPackage ( StringListValue . class ) ; private String [ ] _values = StringListValue . EMPTY ; public StringListValue ( String prop ) { } public void set ( String [ ] values ) { } public String [ ] get ( ) { } public Class < String [ ] > getValueType ( ) { } public String unalias ( String str ) { String [ ] aliases = getAliases ( ) ; if ( ( ( aliases . length ) <= 0 ) || ( str == null ) ) return super . unalias ( str ) ; str = str . trim ( ) ; if ( ( str . length ( ) ) <= 0 ) return super . unalias ( str ) ; if ( str . equals ( "," ) ) throw new org . apache . openjpa . lib . util . ParseException ( StringListValue . s_loc . get ( "invalid-list-config" , getProperty ( ) , str , getAliasList ( ) ) ) ; boolean found ; String iString ; <START_BUG> StringBuffer retv = new StringBuffer ( ) ; <END_BUG> String [ ] vals = str . split ( "," , 0 ) ; for ( int i = 0 ; i < ( vals . length ) ; i ++ ) { iString = vals [ i ] = vals [ i ] . trim ( ) ; found = false ; if ( i > 0 ) retv . append ( ',' ) ; for ( int x = 0 ; x < ( aliases . length ) ; x += 2 ) if ( ( StringUtils . equals ( iString , aliases [ x ] ) ) || ( StringUtils . equals ( iString , aliases [ ( x + 1 ) ] ) ) ) { retv . append ( aliases [ ( x + 1 ) ] ) ; found = true ; break ; } if ( ! found ) { if ( isAliasListComprehensive ( ) ) throw new org . apache . openjpa . lib . util . ParseException ( StringListValue . s_loc . get ( "invalid-list-config" , getProperty ( ) , str , getAliasList ( ) ) ) ; else retv . append ( iString ) ; } } return retv . toString ( ) ; } protected String getInternalString ( ) { } protected void setInternalString ( String val ) { } protected void setInternalObject ( Object obj ) { } protected List < String > getAliasList ( ) { } }

Fix:
StringBuilder retv = new StringBuilder ( ) ;
Buggy code:
public class Http10Interceptor extends PoolTcpConnector implements TcpConnectionHandler { public Http10Interceptor ( ) { } protected void localInit ( ) throws Exception { } public void setServer ( Object o ) { } public Object [ ] init ( ) { } public void processConnection ( TcpConnection connection , Object [ ] thData ) { Socket socket = null ; HttpRequest reqA = null ; HttpResponse resA = null ; try { reqA = ( ( HttpRequest ) ( thData [ 0 ] ) ) ; resA = ( ( HttpResponse ) ( thData [ 1 ] ) ) ; socket = connection . getSocket ( ) ; reqA . setSocket ( socket ) ; resA . setSocket ( socket ) ; reqA . readNextRequest ( resA ) ; if ( secure ) { <START_BUG> reqA . setScheme ( "https" ) ; <END_BUG> } cm . service ( reqA , resA ) ; TcpConnection . shutdownInput ( socket ) ; } catch ( SocketException e ) { log ( "SocketException<seq2seq4repair_space>reading<seq2seq4repair_space>request,<seq2seq4repair_space>ignored" , null , INFORMATION ) ; log ( "SocketException<seq2seq4repair_space>reading<seq2seq4repair_space>request:" , e , DEBUG ) ; } catch ( IOException e ) { log ( "IOException<seq2seq4repair_space>reading<seq2seq4repair_space>request,<seq2seq4repair_space>ignored" , null , INFORMATION ) ; log ( "IOException<seq2seq4repair_space>reading<seq2seq4repair_space>request:" , e , DEBUG ) ; } catch ( Throwable e ) { log ( "Error<seq2seq4repair_space>reading<seq2seq4repair_space>request,<seq2seq4repair_space>ignored" , e , ERROR ) ; } finally { try { if ( socket != null ) socket . close ( ) ; } catch ( IOException e ) { } } } }

Fix:
reqA . scheme ( ) . setString ( "https" ) ;
Buggy code:
public class OrderPreservingPartitioner implements IPartitioner { static final Collator collator = Collator . getInstance ( new Locale ( "en" , "US" ) ) ; private static final Comparator < String > comparator = new Comparator < String > ( ) { public int compare ( String o1 , String o2 ) { } } ; private static final Comparator < String > reverseComparator = new Comparator < String > ( ) { public int compare ( String o1 , String o2 ) { } } ; public String decorateKey ( String key ) { } public String undecorateKey ( String decoratedKey ) { } public Comparator < String > getDecoratedKeyComparator ( ) { } public Comparator < String > getReverseDecoratedKeyComparator ( ) { } public StringToken getDefaultToken ( ) { String initialToken = DatabaseDescriptor . getInitialToken ( ) ; if ( initialToken != null ) return new StringToken ( initialToken ) ; String chars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789" ; Random r = new Random ( ) ; <START_BUG> StringBuffer buffer = new StringBuffer ( ) ; <END_BUG> for ( int j = 0 ; j < 16 ; j ++ ) { buffer . append ( chars . charAt ( r . nextInt ( chars . length ( ) ) ) ) ; } return new StringToken ( buffer . toString ( ) ) ; } private final Token . TokenFactory < String > tokenFactory = new Token . TokenFactory < String > ( ) { public byte [ ] toByteArray ( Token < String > stringToken ) { } public Token < String > fromByteArray ( byte [ ] bytes ) { } public String toString ( Token < String > stringToken ) { } public Token < String > fromString ( String string ) { } } ; public Token . TokenFactory < String > getTokenFactory ( ) { } public Token getInitialToken ( String key ) { } }

Fix:
StringBuilder buffer = new StringBuilder ( ) ;
Buggy code:
public class Maze { public static final int N = 1 ; public static final int S = 2 ; public static final int E = 4 ; public static final int W = 8 ; public static final int DEFAULT_WIDTH = 10 ; public static final int DEFAULT_HEIGHT = 10 ; protected Random _random = null ; protected Long _seed = null ; protected int _w = 0 ; protected int _h = 0 ; protected int [ ] [ ] _grid = null ; public static int DX ( int direction ) { } public static int DY ( int direction ) { } public static int OPPOSITE ( int direction ) { } public Maze ( ) { } public Maze ( int w , int h ) { } public Maze ( int w , int h , long seed ) { } private void initialize ( int w , int h ) { } public void draw ( ) { System . out . print ( "<seq2seq4repair_space>" ) ; for ( int i = 0 ; i < ( ( ( _w ) * 2 ) - 1 ) ; ++ i ) { System . out . print ( "_" ) ; } System . out . println ( "" ) ; for ( int j = 0 ; j < ( _h ) ; ++ j ) { System . out . print ( "|" ) ; for ( int i = 0 ; i < ( _w ) ; ++ i ) { System . out . print ( ( ( ( _grid [ j ] [ i ] ) & ( Maze . S ) ) != 0 ? "<seq2seq4repair_space>" : "_" ) ) ; if ( ( ( _grid [ j ] [ i ] ) & ( Maze . E ) ) != 0 ) { <START_BUG> System . out . print ( ( ( ( _grid [ j ] [ i ] ) & ( Maze . S ) ) != 0 ? "<seq2seq4repair_space>" : "_" ) ) ; <END_BUG> } else { System . out . print ( "|" ) ; } } System . out . println ( "" ) ; } System . out . println ( metadata ( ) ) ; } protected String metadata ( ) { } No newline ; at end ; of file ; }

Fix:
System . out . print ( ( ( ( ( _grid [ j ] [ i ] ) | ( _grid [ j ] [ ( i + 1 ) ] ) ) & ( Maze . S ) ) != 0 ? "<seq2seq4repair_space>" : "_" ) ) ;
Buggy code:
public class ZooKeeperStreamRepository implements InitializingBean , StreamRepository { private static final Logger logger = LoggerFactory . getLogger ( ZooKeeperStreamRepository . class ) ; private final ZooKeeperConnection zkConnection ; private final PagingUtility < Stream > pagingUtility = new PagingUtility < Stream > ( ) ; private final RepositoryConnectionListener connectionListener = new RepositoryConnectionListener ( ) ; @ Autowired public ZooKeeperStreamRepository ( ZooKeeperConnection zkConnection ) { } @ Override public void afterPropertiesSet ( ) throws Exception { } @ Override public Iterable < Stream > findAll ( Sort sort ) { } @ Override public Page < Stream > findAll ( Pageable pageable ) { } @ Override public < S extends Stream > S save ( S entity ) { } @ Override public < S extends Stream > Iterable < S > save ( Iterable < S > entities ) { } @ Override public Stream findOne ( String id ) { } @ Override public boolean exists ( String id ) { } @ Override public List < Stream > findAll ( ) { } @ Override public List < Stream > findAll ( Iterable < String > ids ) { } @ Override public long count ( ) { } @ Override public void delete ( String id ) { } @ Override public void delete ( Stream entity ) { } @ Override public void delete ( Iterable < ? extends Stream > entities ) { } @ Override public void deleteAll ( ) { } @ Override public Iterable < Stream > findAllInRange ( String from , boolean fromInclusive , String to , boolean toInclusive ) { List < Stream > all = findAll ( ) ; if ( CollectionUtils . isEmpty ( all ) ) { return Collections . emptyList ( ) ; } Collections . sort ( all ) ; List < Stream > results = new ArrayList < Stream > ( ) ; for ( Stream stream : all ) { <START_BUG> if ( ( stream . getDefinition ( ) . getName ( ) . compareTo ( to ) ) > 1 ) { <END_BUG> break ; } if ( ( stream . getDefinition ( ) . getName ( ) . compareTo ( from ) ) < 0 ) { continue ; } results . add ( stream ) ; } return results ; } @ Override public DeploymentUnitStatus getDeploymentStatus ( String id ) { } }

Fix:
if ( ( stream . getDefinition ( ) . getName ( ) . compareTo ( to ) ) > 0 ) {
Buggy code:
public class ThumbnailDownloader < Token > extends HandlerThread { private static final String TAG = "ThumbnailDownloader" ; private static final int MESSAGE_DOWNLOAD = 0 ; private Handler mHandler ; private Map < Token , String > requestMap = Collections . synchronizedMap ( new HashMap < Token , String > ( ) ) ; private Handler mResponseHandler ; private ThumbnailDownloader . Listener < Token > mListener ; public interface Listener < Token > { public void onThumbnailDownloaded ( Token token , Bitmap thumbnail ) { } } public void setListener ( ThumbnailDownloader . Listener < Token > listener ) { } public ThumbnailDownloader ( Handler responseHandler ) { } @ Override protected void onLooperPrepared ( ) { } public void queueThumbnail ( Token token , String url ) { } private void handleRequest ( final Token token ) { try { final String url = requestMap . get ( token ) ; if ( url != null ) { byte [ ] bitmapBytes = new FlickrFetchr ( ) . getUrlBytes ( url ) ; final Bitmap bitmap = BitmapFactory . decodeByteArray ( bitmapBytes , 0 , bitmapBytes . length ) ; Log . i ( ThumbnailDownloader . TAG , "Bitmap<seq2seq4repair_space>created" ) ; mResponseHandler . post ( new Runnable ( ) { @ Override public void run ( ) { <START_BUG> if ( requestMap . get ( token ) . equals ( url ) ) { <END_BUG> requestMap . remove ( token ) ; mListener . onThumbnailDownloaded ( token , bitmap ) ; } } } ) ; } } catch ( IOException e ) { Log . e ( ThumbnailDownloader . TAG , "Error<seq2seq4repair_space>downloading<seq2seq4repair_space>image" , e ) ; e . printStackTrace ( ) ; } } public void clearQueue ( ) { } }

Fix:
if ( url . equals ( requestMap . get ( token ) ) ) {
Buggy code:
@ SelfDiagnosisRuleDefinition ( category = "base" , name = "CheckHadoopRuntimeVersionRule" , priority = 0 ) @ SelfDiagnosisRuleVisibility . Public public class CheckHadoopRuntimeVersionRule implements SelfDiagnosisRule { private Log LOG = LogFactory . getLog ( getClass ( ) ) ; private final Properties versionInfo ; public CheckHadoopRuntimeVersionRule ( ) { } private int [ ] getVersion ( ) { int [ ] version = new int [ 0 ] ; <START_BUG> String versionString = versionInfo . getProperty ( "version" ) ; <END_BUG> if ( ( versionString != null ) && ( ! ( versionString . isEmpty ( ) ) ) ) { Validators . patternMatch ( "\\d+\\.\\d+\\.\\d+" ) . validate ( versionString , true ) ; String [ ] versionArray = versionString . split ( "\\." ) ; version = new int [ versionArray . length ] ; for ( int idx = 0 ; idx < ( versionArray . length ) ; idx ++ ) { version [ idx ] = Integer . parseInt ( versionArray [ idx ] ) ; } } return version ; } private int compareVersion ( int [ ] left , int [ ] right ) { } @ Override public EvaluationResult evaluate ( EvaluationContext context ) { } }

Fix:
String versionString = versionInfo . getProperty ( "version" ) . split ( "-" ) [ 0 ] ;
Buggy code:
public class GillIntegratorTest extends TestCase { public GillIntegratorTest ( String name ) { } public void testDimensionCheck ( ) { } public void testDecreasingSteps ( ) throws DerivativeException , IntegratorException { TestProblemAbstract [ ] problems = TestProblemFactory . getProblems ( ) ; for ( int k = 0 ; k < ( problems . length ) ; ++ k ) { double previousError = Double . NaN ; for ( int i = 5 ; i < 10 ; ++ i ) { <START_BUG> TestProblemAbstract pb = ( ( TestProblemAbstract ) ( problems [ k ] . clone ( ) ) ) ; <END_BUG> double step = ( ( pb . getFinalTime ( ) ) - ( pb . getInitialTime ( ) ) ) * ( Math . pow ( 2.0 , ( - i ) ) ) ; FirstOrderIntegrator integ = new GillIntegrator ( step ) ; TestProblemHandler handler = new TestProblemHandler ( pb , integ ) ; integ . addStepHandler ( handler ) ; EventHandler [ ] functions = pb . getEventsHandlers ( ) ; for ( int l = 0 ; l < ( functions . length ) ; ++ l ) { integ . addEventHandler ( functions [ l ] , Double . POSITIVE_INFINITY , ( 1.0E-6 * step ) , 1000 ) ; } double stopTime = integ . integrate ( pb , pb . getInitialTime ( ) , pb . getInitialState ( ) , pb . getFinalTime ( ) , new double [ pb . getDimension ( ) ] ) ; if ( ( functions . length ) == 0 ) { assertEquals ( pb . getFinalTime ( ) , stopTime , 1.0E-10 ) ; } double error = handler . getMaximalValueError ( ) ; if ( i > 5 ) { assertTrue ( ( error < ( Math . abs ( previousError ) ) ) ) ; } previousError = error ; assertEquals ( 0 , handler . getMaximalTimeError ( ) , 1.0E-12 ) ; } } } public void testSmallStep ( ) throws DerivativeException , IntegratorException { } public void testBigStep ( ) throws DerivativeException , IntegratorException { } public void testBackward ( ) throws DerivativeException , IntegratorException { } public void testKepler ( ) throws DerivativeException , IntegratorException { } public void testUnstableDerivative ( ) throws DerivativeException , IntegratorException { } private static class KeplerStepHandler implements StepHandler { public KeplerStepHandler ( TestProblem3 pb ) { } public boolean requiresDenseOutput ( ) { } public void reset ( ) { } public void handleStep ( StepInterpolator interpolator , boolean isLast ) throws DerivativeException { } private double maxError ; private TestProblem3 pb ; } public void testStepSize ( ) throws DerivativeException , IntegratorException { } public static Test suite ( ) { } }

Fix:
TestProblemAbstract pb = problems [ k ] . copy ( ) ;
Buggy code:
@ RunWith ( Arquillian . class ) @ RunAsClient public class ModelControllerMBeanTestCase { private static final String RESOLVED_DOMAIN = "jboss.as" ; static final ObjectName RESOLVED_MODEL_FILTER = ModelControllerMBeanTestCase . createObjectName ( ( ( ModelControllerMBeanTestCase . RESOLVED_DOMAIN ) + ":*" ) ) ; static final ObjectName RESOLVED_ROOT_MODEL_NAME = ModelControllerMBeanHelper . createRootObjectName ( ModelControllerMBeanTestCase . RESOLVED_DOMAIN ) ; static JMXConnector connector ; static MBeanServerConnection connection ; @ ContainerResource private ManagementClient managementClient ; @ Before public void initialize ( ) throws Exception { } @ After public void closeConnection ( ) throws Exception { } @ Test public void testAllMBeanInfos ( ) throws Exception { } @ Test public void testSystemProperties ( ) throws Exception { } @ Test public void testDeploymentViaJmx ( ) throws Exception { } private void assertNoMBean ( ObjectName name ) throws Exception { } private String [ ] getSystemPropertyNames ( ) throws Exception { } private static ObjectName createObjectName ( String name ) { } private MBeanServerConnection setupAndGetConnection ( ) throws Exception { <START_BUG> String urlString = System . getProperty ( "jmx.service.url" , ( ( ( "service:jmx:remoting-jmx:////" + ( managementClient . getMgmtAddress ( ) ) ) + ":" ) + ( managementClient . getMgmtPort ( ) ) ) ) ; <END_BUG> JMXServiceURL serviceURL = new JMXServiceURL ( urlString ) ; ModelControllerMBeanTestCase . connector = JMXConnectorFactory . connect ( serviceURL , null ) ; return ModelControllerMBeanTestCase . connector . getMBeanServerConnection ( ) ; } }

Fix:
String urlString = System . getProperty ( "jmx.service.url" , ( ( ( "service:jmx:http-remoting-jmx:////" + ( managementClient . getMgmtAddress ( ) ) ) + ":" ) + ( managementClient . getMgmtPort ( ) ) ) ) ;
Buggy code:
public class WorkingSetLabelProvider extends LabelProvider { private Map icons ; public WorkingSetLabelProvider ( ) { } public void dispose ( ) { } public Image getImage ( Object object ) { Assert . isTrue ( ( object instanceof IWorkingSet ) ) ; IWorkingSet workingSet = ( ( IWorkingSet ) ( object ) ) ; <START_BUG> ImageDescriptor imageDescriptor = workingSet . getImage ( ) ; <END_BUG> if ( imageDescriptor == null ) { return null ; } Image icon = ( ( Image ) ( icons . get ( imageDescriptor ) ) ) ; if ( icon == null ) { icon = imageDescriptor . createImage ( ) ; icons . put ( imageDescriptor , icon ) ; } return icon ; } public String getText ( Object object ) { } }

Fix:
ImageDescriptor imageDescriptor = workingSet . getImageDescriptor ( ) ;
Buggy code:
public class JSONImportTest { @ Before public void setUp ( ) throws Exception { } @ Test public void testCreateJSONObject ( ) { JSONImport json = new JSONImport ( "TestBoard.txt" ) ; RiskBoard board = new RiskBoard ( ) ; <START_BUG> board . setup ( "TestBoard.txt" ) ; <END_BUG> assertEquals ( board , json . getBoard ( ) ) ; } }

Fix:
BoardUtils . setup ( board , "TestBoard.txt" ) ;
Buggy code:
public final class CommandLineRunner { private CommandLineRunner ( ) { } public static void main ( String [ ] args ) throws Exception { } private static Hashtable < DecodeHintType , Object > buildHints ( boolean tryHarder , boolean pureBarcode , boolean productsOnly ) { Hashtable < DecodeHintType , Object > hints = new Hashtable < DecodeHintType , Object > ( 3 ) ; Vector < BarcodeFormat > vector = new Vector < BarcodeFormat > ( 8 ) ; vector . addElement ( UPC_A ) ; vector . addElement ( UPC_E ) ; vector . addElement ( EAN_13 ) ; vector . addElement ( EAN_8 ) ; vector . addElement ( RSS14 ) ; if ( ! productsOnly ) { vector . addElement ( CODE_39 ) ; vector . addElement ( CODE_93 ) ; vector . addElement ( CODE_128 ) ; vector . addElement ( ITF ) ; vector . addElement ( QR_CODE ) ; <START_BUG> vector . addElement ( DATAMATRIX ) ; <END_BUG> vector . addElement ( PDF417 ) ; } hints . put ( POSSIBLE_FORMATS , vector ) ; if ( tryHarder ) { hints . put ( TRY_HARDER , Boolean . TRUE ) ; } if ( pureBarcode ) { hints . put ( PURE_BARCODE , Boolean . TRUE ) ; } return hints ; } private static void printUsage ( ) { } private static void decodeOneArgument ( String argument , Hashtable < DecodeHintType , Object > hints , boolean dumpResults , boolean dumpBlackPoint , int [ ] crop ) throws IOException , URISyntaxException { } private static void dumpResult ( File input , Result result ) throws IOException { } private static void writeStringToFile ( String value , File file ) throws IOException { } private static Result decode ( URI uri , Hashtable < DecodeHintType , Object > hints , boolean dumpBlackPoint , int [ ] crop ) throws IOException { } private static void dumpBlackPoint ( URI uri , BufferedImage image , BinaryBitmap bitmap ) { } }

Fix:
vector . addElement ( DATA_MATRIX ) ;
Buggy code:
public class ModClusterAddCustomMetric implements OperationStepHandler , DescriptionProvider { static final ModClusterAddCustomMetric INSTANCE = new ModClusterAddCustomMetric ( ) ; @ Override public ModelNode getModelDescription ( Locale locale ) { } @ Override public void execute ( OperationContext context , ModelNode operation ) throws OperationFailedException { <START_BUG> if ( ( context . getType ( ) ) == ( Type . SERVER ) ) { <END_BUG> context . addStep ( new OperationStepHandler ( ) { @ Override public void execute ( OperationContext context , ModelNode operation ) throws OperationFailedException { final ModelNode dynamicLoadProvider = context . readResourceForUpdate ( EMPTY_ADDRESS ) . getModel ( ) . get ( DYNAMIC_LOAD_PROVIDER ) ; final ModelNode metric = new ModelNode ( ) ; List < Property > list = operation . asPropertyList ( ) ; Iterator < Property > it = list . iterator ( ) ; while ( it . hasNext ( ) ) { Property prop = it . next ( ) ; if ( prop . getName ( ) . equals ( "property" ) ) { String properties = prop . getValue ( ) . asString ( ) ; ModelNode props = ModelNode . fromString ( properties ) ; metric . get ( "property" ) . set ( props ) ; } else { metric . get ( prop . getName ( ) ) . set ( prop . getValue ( ) . asString ( ) ) ; } } if ( ! ( metric . get ( "class" ) . isDefined ( ) ) ) { throw new OperationFailedException ( new ModelNode ( ) . set ( ModClusterMessages . MESSAGES . classAttributeRequired ( "add-custom-metric" ) ) ) ; } if ( ! ( dynamicLoadProvider . isDefined ( ) ) ) { dynamicLoadProvider . get ( HISTORY ) . set ( 9 ) ; dynamicLoadProvider . get ( DECAY ) . set ( 2 ) ; } replaceMetric ( dynamicLoadProvider , metric ) ; context . completeStep ( ) ; } private void replaceMetric ( ModelNode dynamicLoadProvider , ModelNode metric ) { List < ModelNode > newlist = Collections . < ModelNode > emptyList ( ) ; if ( dynamicLoadProvider . get ( CUSTOM_LOAD_METRIC ) . isDefined ( ) ) { String classname = metric . get ( "class" ) . asString ( ) ; List < ModelNode > list = dynamicLoadProvider . get ( CUSTOM_LOAD_METRIC ) . asList ( ) ; Iterator < ModelNode > it = list . iterator ( ) ; dynamicLoadProvider . get ( CUSTOM_LOAD_METRIC ) . set ( newlist ) ; while ( it . hasNext ( ) ) { ModelNode node = it . next ( ) ; if ( ! ( node . get ( "class" ) . asString ( ) . equals ( classname ) ) ) { dynamicLoadProvider . get ( CUSTOM_LOAD_METRIC ) . add ( node ) ; } } } else { dynamicLoadProvider . get ( CUSTOM_LOAD_METRIC ) . set ( newlist ) ; } dynamicLoadProvider . get ( CUSTOM_LOAD_METRIC ) . add ( metric ) ; } } , MODEL ) ; } context . completeStep ( ) ; } }

Fix:
if ( context . getProcessType ( ) . isServer ( ) ) {
Buggy code:
public class MelodroneView extends View implements OnTouchListener { Melodrone mMelo ; Paint paint = new Paint ( ) ; int mWidth ; int mHeight ; boolean paused = false ; boolean lightingUp = true ; public MelodroneView ( Context context ) { } private void setup ( Context context ) { Display dsp = ( ( android . view . WindowManager ) ( context . getSystemService ( Context . WINDOW_SERVICE ) ) ) . getDefaultDisplay ( ) ; mWidth = dsp . getWidth ( ) ; mHeight = dsp . getHeight ( ) ; if ( ( mMelo ) == null ) { <START_BUG> Toast . makeText ( context , initial_toast , 5 ) . show ( ) ; <END_BUG> createNewMelodrone ( context ) ; } } private void createNewMelodrone ( Context context ) { } private void startUpdatingThread ( ) { } @ Override public boolean onTouch ( View v , MotionEvent event ) { } @ Override public void onDraw ( Canvas canvas ) { } public void pause ( ) { } public void resume ( ) { } public void reset ( ) { } public void serialize ( ) { } public void deserialize ( ) { } }

Fix:
Toast . makeText ( context , initial_toast , 10 ) . show ( ) ;
Buggy code:
public class Chmod extends ExecuteOn { private FileSet defaultSet = new FileSet ( ) ; private boolean defaultSetDefined = false ; private boolean havePerm = false ; public Chmod ( ) throws TaskException { } public void setDefaultexcludes ( boolean useDefaultExcludes ) throws TaskException { } public void setDir ( File src ) throws TaskException { } public void setExcludes ( String excludes ) throws TaskException { } public void setExecutable ( String e ) throws TaskException { } public void setFile ( File src ) throws TaskException { } public void setIncludes ( String includes ) throws TaskException { } public void setPerm ( String perm ) { } public void setSkipEmptyFilesets ( boolean skip ) throws TaskException { } public NameEntry createExclude ( ) throws TaskException { } public NameEntry createInclude ( ) throws TaskException { } public PatternSet createPatternSet ( ) throws TaskException { } public void execute ( ) throws TaskException { if ( ( defaultSetDefined ) || ( ( defaultSet . getDir ( getProject ( ) ) ) == null ) ) { super . execute ( ) ; } else if ( isValidOs ( ) ) { createArg ( ) . setValue ( defaultSet . getDir ( getProject ( ) ) . getPath ( ) ) ; Execute execute = prepareExec ( ) ; try { <START_BUG> execute . setCommandline ( cmdl . getCommandline ( ) ) ; <END_BUG> runExecute ( execute ) ; } catch ( IOException e ) { throw new TaskException ( ( "Execute<seq2seq4repair_space>failed:<seq2seq4repair_space>" + e ) , e ) ; } finally { logFlush ( ) ; } } } protected boolean isValidOs ( ) { } protected void checkConfiguration ( ) throws TaskException { } }

Fix:
execute . setCommandline ( getCommand ( ) . getCommandline ( ) ) ;
Buggy code:
public class InheritedMarkupMarkupLoader implements IMarkupLoader { public InheritedMarkupMarkupLoader ( ) { } public final Markup loadMarkup ( final MarkupContainer container , final MarkupResourceStream markupResourceStream , final IMarkupLoader baseLoader , final boolean enforceReload ) throws IOException , ResourceStreamNotFoundException { Markup markup = baseLoader . loadMarkup ( container , markupResourceStream , null , enforceReload ) ; int extendIndex = requiresBaseMarkup ( markup ) ; if ( extendIndex == ( - 1 ) ) { return markup ; } final Markup baseMarkup = getBaseMarkup ( container , markup , enforceReload ) ; if ( ( baseMarkup == null ) || ( baseMarkup == ( Markup . NO_MARKUP ) ) ) { <START_BUG> throw new org . apache . wicket . markup . MarkupNotFoundException ( ( ( "Base<seq2seq4repair_space>markup<seq2seq4repair_space>of<seq2seq4repair_space>inherited<seq2seq4repair_space>markup<seq2seq4repair_space>not<seq2seq4repair_space>found.<seq2seq4repair_space>Component<seq2seq4repair_space>class:<seq2seq4repair_space>" + ( markup . getMarkupResourceStream ( ) . getContainerInfo ( ) . getContainerClass ( ) . getName ( ) ) ) + "<seq2seq4repair_space>Enable<seq2seq4repair_space>debug<seq2seq4repair_space>messages<seq2seq4repair_space>for<seq2seq4repair_space>org.apache.wicket.util.resource.Resource<seq2seq4repair_space>to<seq2seq4repair_space>get<seq2seq4repair_space>a<seq2seq4repair_space>list<seq2seq4repair_space>of<seq2seq4repair_space>all<seq2seq4repair_space>filenames<seq2seq4repair_space>tried." ) ) ; <END_BUG> } return new org . apache . wicket . markup . MergedMarkup ( markup , baseMarkup , extendIndex ) ; } private Markup getBaseMarkup ( final MarkupContainer container , final Markup markup , final boolean enforceReload ) { } private int requiresBaseMarkup ( final IMarkupFragment markup ) { } }

Fix:
throw new org . apache . wicket . markup . MarkupNotFoundException ( ( ( "Base<seq2seq4repair_space>markup<seq2seq4repair_space>of<seq2seq4repair_space>inherited<seq2seq4repair_space>markup<seq2seq4repair_space>not<seq2seq4repair_space>found.<seq2seq4repair_space>Component<seq2seq4repair_space>class:<seq2seq4repair_space>" + ( markup . getMarkupResourceStream ( ) . getContainerInfo ( ) . getContainerClass ( ) . getName ( ) ) ) + ".<seq2seq4repair_space>Enable<seq2seq4repair_space>debug<seq2seq4repair_space>messages<seq2seq4repair_space>for<seq2seq4repair_space>org.apache.wicket.util.resource.locator.ResourceStreamLocator<seq2seq4repair_space>to<seq2seq4repair_space>get<seq2seq4repair_space>a<seq2seq4repair_space>list<seq2seq4repair_space>of<seq2seq4repair_space>all<seq2seq4repair_space>filenames<seq2seq4repair_space>tried." ) ) ;
Buggy code:
@ Branch ( branch = "jaci.openrio.module.routines.addon.ToastDroidHandler" , dependency = "ToastDroid" , method = "toast_droid" ) public class Routines extends ToastStateModule { static Routines instance ; static File home ; @ Override public String getModuleName ( ) { } @ Override public String getModuleVersion ( ) { <START_BUG> return "0.2.0" ; <END_BUG> } @ Override public void prestart ( ) { } public static SpeedController [ ] getAllControllers ( ) { } @ Override public void start ( ) { } static LinkedList < RoutineContext > contexts = new LinkedList < > ( ) ; public static Routines getInstance ( ) { } public static RoutineContext getRoutine ( String name ) { } public static void setDefault ( String routine ) throws IOException { } public static String getDefault ( ) throws IOException { } public static void stopAll ( ) { } public static String [ ] getAvailableRoutines ( ) { } @ Override public void tickState ( RobotState state ) { } @ Override public void transitionState ( RobotState state , RobotState oldState ) { } }

Fix:
return "0.3.0" ;
Buggy code:
@ Entity public class Fish extends Model { @ Id private long id ; private String commonName ; private String genus ; private String species ; private String scientific ; private String family ; @ ManyToMany ( mappedBy = "fishes" ) private List < Location > locations ; private String image ; private long numAdded = 0 ; public Fish ( ) { } public Fish ( String commonName , String genus , String species , String family , Location location , String image ) { } public long getId ( ) { } public String getCommonName ( ) { } public String getGenus ( ) { } public String getSpecies ( ) { } public String getScientific ( ) { } public String getFamily ( ) { } public List < Location > getLocations ( ) { } public String getImage ( ) { } public void addNum ( ) { } public long getNumAdded ( ) { } public void setCommonName ( String commonName ) { } public void setGenus ( String genus ) { } public void setSpecies ( String species ) { } public void setScientific ( String scientific ) { } public void setFamily ( String family ) { } public void setLocations ( List < Location > locations ) { } public void setImage ( String image ) { } public void setNumAdded ( long numAdded ) { } public void setId ( long id ) { } public void addLocation ( Location location ) { } public static Finder < Long , Fish > find ( ) { } public static List < Fish > searchFish ( String common , String family , String genus , String species ) { <START_BUG> return Fish . find ( ) . where ( ) . ilike ( "commonName" , ( ( "%" + common ) + "%" ) ) . ilike ( "family" , ( ( "%" + family ) + "%" ) ) . ilike ( "genus" , ( ( "%" + genus ) + "%" ) ) . findList ( ) ; <END_BUG> } }

Fix:
return Fish . find ( ) . where ( ) . ilike ( "commonName" , ( ( "%" + common ) + "%" ) ) . ilike ( "family" , ( ( "%" + family ) + "%" ) ) . ilike ( "genus" , ( ( "%" + genus ) + "%" ) ) . ilike ( "species" , ( ( "%" + species ) + "%" ) ) . findList ( ) ;