nus-yam/ex-repair huggingface dataset:
Buggy code:
public class Time implements Cloneable , Comparable < Time > { public static final int MILLISECONDS_IN_SECOND = 1000 ; public static final int SECONDS_IN_MINUTE = 60 ; public static final int MINUTES_IN_HOUR = 60 ; public static final int HOURS_IN_DAY = 24 ; private int seconds ; private int minutes ; private int hours ; private static String timeUnitToString ( int value ) { } public static Time parse ( String str ) throws ParseException { } public static Time interval ( Time begin , Time end ) { } public Time ( ) { } public Time ( int hours , int minutes , int seconds ) { } public int getSeconds ( ) { } public void setSeconds ( int seconds ) { } public int getMinutes ( ) { } public void setMinutes ( int minutes ) { } public int getHours ( ) { } public void setHours ( int hours ) { } public void addHours ( int hours ) { } public void addMinutes ( int minutes ) { } public void addSeconds ( int seconds ) { } public int convertToSeconds ( ) { } public void converFromSeconds ( int seconds ) { } public String toString ( ) { } public Date toDate ( ) { } public void fromDate ( Date time ) { } @ Override public boolean equals ( Object obj ) { } @ Override public Object clone ( ) { } public int compareTo ( Time time ) { if ( equals ( time ) ) { return 0 ; } <START_BUG> if ( ( ( ( this . hours ) < ( time . hours ) ) || ( ( this . minutes ) < ( time . minutes ) ) ) || ( ( this . seconds ) < ( this . seconds ) ) ) { <END_BUG> return - 1 ; } return 1 ; } }

Fix:
if ( ( ( ( this . hours ) < ( time . hours ) ) || ( ( this . minutes ) < ( time . minutes ) ) ) || ( ( this . seconds ) < ( time . seconds ) ) ) {
Buggy code:
public class RoundRobin extends StubLB { private ClusterStubData csd ; private int len ; private StubData [ ] sd ; private double [ ] load ; private double minLoad ; public RoundRobin ( ClusterStubData csd , Collection c ) { } private synchronized void ensureCapacity ( int minCapacity ) { } synchronized void add ( StubData sd ) { } synchronized void remove ( StubData s ) { } private static StubLBFilter emptyFilter = new StubLBFilter ( ) ; public synchronized Remote get ( ) throws NoMoreStubException { <START_BUG> return get ( null ) ; <END_BUG> } public synchronized Remote get ( StubLBFilter f ) throws NoMoreStubException { } public void remove ( Remote stub ) { } }

Fix:
return get ( RoundRobin . emptyFilter ) ;
Buggy code:
public class Search extends Controller { public static Result search ( ) { } public static Result showAll ( ) { } public static Result doSearch ( ) { } public static Result getbooks ( ) { Http . Session session = Util . getCurrentSession ( ) ; DynamicForm requestData = Form . form ( ) . bindFromRequest ( ) ; String id ; String c ; UserOperations uo = new UserOperations ( ) ; id = requestData . get ( "id" ) ; if ( id == null ) { id = "" ; } c = requestData . get ( "category" ) ; if ( c == null ) { c = "" ; } if ( ( id . length ( ) ) > 0 ) { BookOperations bo = new BookOperations ( ) ; Books book = bo . getone ( id ) ; <START_BUG> book . seller = uo . getuserbyid ( book . seller ) . uname ; <END_BUG> System . out . println ( book . title ) ; if ( ( book . title . length ( ) ) > 0 ) { return ok ( product . render ( "Here<seq2seq4repair_space>are<seq2seq4repair_space>the<seq2seq4repair_space>books<seq2seq4repair_space>matching<seq2seq4repair_space>your<seq2seq4repair_space>search" , book , session ) ) ; } else { return ok ( product . render ( "No<seq2seq4repair_space>book<seq2seq4repair_space>found!" , book , session ) ) ; } } else if ( ( c . length ( ) ) > 0 ) { System . out . println ( ( "requested<seq2seq4repair_space>book's<seq2seq4repair_space>category<seq2seq4repair_space>is:<seq2seq4repair_space>" + c ) ) ; BookOperations bo = new BookOperations ( ) ; ArrayList < Books > list = bo . getcategory ( c ) ; if ( ( list . size ( ) ) > 0 ) { return ok ( categories . render ( "Books<seq2seq4repair_space>in<seq2seq4repair_space>this<seq2seq4repair_space>category" , list , session ) ) ; } else { return ok ( categories . render ( "No<seq2seq4repair_space>book<seq2seq4repair_space>found<seq2seq4repair_space>in<seq2seq4repair_space>this<seq2seq4repair_space>category!" , list , session ) ) ; } } else { ArrayList < Books > list = null ; return ok ( categories . render ( "No<seq2seq4repair_space>book<seq2seq4repair_space>found" , list , session ) ) ; } } }

Fix:
book . seller = uo . getuname ( book . seller ) ;
Buggy code:
public class EditorsPreferencePage extends PreferencePage implements IWorkbenchPreferencePage { private IWorkbench workbench ; private String defaultEnc ; private Button defaultEncodingButton ; private Button otherEncodingButton ; private Combo encodingCombo ; private Combo accelConfigCombo ; private Button reuseEditors ; private IntegerFieldEditor reuseEditorsThreshold ; private Composite editorReuseGroup ; private IntegerFieldEditor recentFilesEditor ; private Hashtable namesToConfiguration ; private String activeAcceleratorConfigurationName ; protected Control createContents ( Composite parent ) { } public void init ( IWorkbench aWorkbench ) { } protected void performDefaults ( ) { } public boolean performOk ( ) { } protected IPreferenceStore doGetPreferenceStore ( ) { } private void createEncodingGroup ( Composite parent ) { } private void validCheck ( ) { } private boolean isEncodingValid ( ) { } private boolean isValidEncoding ( String enc ) { } private void updateEncodingState ( boolean useDefault ) { } protected void createAcceleratorConfigurationGroup ( Composite composite , String label ) { Font font = composite . getFont ( ) ; Composite groupComposite = new Composite ( composite , SWT . LEFT ) ; GridLayout layout = new GridLayout ( ) ; layout . numColumns = 2 ; layout . marginWidth = 0 ; layout . marginHeight = 0 ; groupComposite . setLayout ( layout ) ; GridData gd = new GridData ( ) ; gd . horizontalAlignment = gd . FILL ; gd . grabExcessHorizontalSpace = true ; groupComposite . setLayoutData ( gd ) ; groupComposite . setFont ( font ) ; <START_BUG> Label configLabel = WorkbenchPreferencePage . createLabel ( groupComposite , label ) ; <END_BUG> accelConfigCombo = WorkbenchPreferencePage . createCombo ( groupComposite ) ; if ( ( namesToConfiguration . size ( ) ) > 0 ) { String [ ] comboItems = new String [ namesToConfiguration . size ( ) ] ; namesToConfiguration . keySet ( ) . toArray ( comboItems ) ; Arrays . sort ( comboItems , Collator . getInstance ( ) ) ; accelConfigCombo . setItems ( comboItems ) ; if ( ( activeAcceleratorConfigurationName ) != null ) accelConfigCombo . select ( accelConfigCombo . indexOf ( activeAcceleratorConfigurationName ) ) ; } else { accelConfigCombo . setEnabled ( false ) ; } } protected void acceleratorInit ( IWorkbench aWorkbench ) { } protected void acceleratorPerformDefaults ( IPreferenceStore store ) { } protected void acceleratorPerformOk ( IPreferenceStore store ) { } private void createEditorReuseGroup ( Composite composite ) { } private void createEditorHistoryGroup ( Composite composite ) { } }

Fix:
WorkbenchPreferencePage . createLabel ( groupComposite , label ) ;
Buggy code:
public class DBReceiver extends Receiver implements Pauseable { static int DEFAULT_REFRESH_MILLIS = 1000 ; ConnectionSource connectionSource ; int refreshMillis = DBReceiver . DEFAULT_REFRESH_MILLIS ; DBReceiver . DBReceiverJob receiverJob ; boolean paused = false ; public void activateOptions ( ) { } public void setRefreshMillis ( int refreshMillis ) { } public int getRefreshMillis ( ) { } public ConnectionSource getConnectionSource ( ) { } public void setConnectionSource ( ConnectionSource connectionSource ) { } public void shutdown ( ) { } public void setPaused ( boolean paused ) { } public boolean isPaused ( ) { } class DBReceiverJob implements Job { long lastId = 1 ; public void execute ( ) { } } void getProperties ( Connection connection , long id , LoggingEvent event ) throws SQLException { String sql = ( "SELECT<seq2seq4repair_space>mapped_key,<seq2seq4repair_space>mapped_value<seq2seq4repair_space>FROM<seq2seq4repair_space>logging_event_property<seq2seq4repair_space>WHERE<seq2seq4repair_space>event_id='" + id ) + "'" ; Statement statement = connection . createStatement ( ) ; ResultSet rs = statement . executeQuery ( sql ) ; <START_BUG> rs . first ( ) ; <END_BUG> while ( rs . next ( ) ) { String key = rs . getString ( 1 ) ; String value = rs . getString ( 2 ) ; event . setProperty ( key , value ) ; } } void getException ( Connection connection , long id , LoggingEvent event ) throws SQLException { } }

Fix:
rs . beforeFirst ( ) ;
Buggy code:
public class LoginIntentService extends IntentService { @ Override public void onCreate ( ) { super . onCreate ( ) ; String userName = SharePreferencesUtils . getString ( USERNAME , "" ) ; String password = SharePreferencesUtils . getString ( PASSWORD , "" ) ; if ( ( ! ( "" . equals ( userName ) ) ) && ( ! ( "" . equals ( password ) ) ) ) { String result = null ; HttpURLConnection conn = ConnectionManagerInstance . getInstance ( ) . connectionServer ( LOGINURL , "POST" ) ; if ( conn != null ) { <START_BUG> result = SmthUtils . getStringForHttp ( conn , false , null ) ; <END_BUG> } if ( ( result != null ) && ( ( result . length ( ) ) > 0 ) ) { ISmthLog . d ( TAG , "登录成功。" ) ; } else { ISmthLog . d ( TAG , "登录失败。" ) ; } } } public LoginIntentService ( ) { } @ Override protected void onHandleIntent ( Intent arg0 ) { } }

Fix:
result = SmthUtils . getStringForHttp ( conn , true , "gb2312" ) ;
Buggy code:
@ SideOnly ( Side . CLIENT ) public class PhysicalTraitsPlayerDataClient extends PhysicalTraitsPlayerData { private static final Map < UUID , PhysicalTraitsPlayerDataClient > playersStoredData = new HashMap < UUID , PhysicalTraitsPlayerDataClient > ( ) ; private UUID tracking ; private float weight ; private float energy ; private boolean weightJustChanged ; private float fatigue ; private float strength ; private int ticksUntilFatigueRegen ; private PhysicalTraitsPlayerDataClient ( UUID playerID ) { } public static PhysicalTraitsPlayerDataClient getPlayerDataNoCreate ( UUID playerID ) { } public static PhysicalTraitsPlayerDataClient getPlayerData ( UUID playerID ) { } public static PhysicalTraitsPlayerDataClient createPlayerData ( UUID playerID ) { } public static void removePlayerData ( UUID playerID ) { } public static void requestInformation ( UUID playerFor ) { } @ Override protected void readPlayerDataFromNBT ( NBTTagCompound nbt ) { } @ Override protected void writePlayerDataToNBT ( NBTTagCompound nbt ) { } @ Override protected boolean disableDefaultBehaviour ( ) { } @ Override public float getWeight ( ) { } @ Override public void setWeight ( float weight ) { } @ Override public void gainWeight ( float weight ) { } @ Override public float getRenderWidth ( ) { } @ Override public boolean weightRecentlyChanged ( ) { } @ Override public void noteWeightChanged ( ) { <START_BUG> weightJustChanged = true ; <END_BUG> } @ Override public float getEnergy ( ) { } @ Override public void setEnergy ( float energy ) { } @ Override public void addEnergy ( float energy ) { } @ Override public int getRenderWeight ( ) { } @ Override public float getFatigue ( ) { } @ Override public void setFatigue ( float fatigue ) { } @ Override public void fatigue ( float fatigue ) { } @ Override public int getTicksUntilFatigueRegen ( ) { } @ Override public void lowerFatigueRegen ( ) { } @ Override public void resetFatigueRegen ( ) { } @ Override public float getStrength ( ) { } @ Override public void setStrength ( float strength ) { } @ Override public void addStrength ( float strength ) { } }

Fix:
weightJustChanged = false ;
Buggy code:
class Sqrt extends UnaryMathVal { public Sqrt ( Val val ) { } protected Class getType ( Class c ) { } protected Object operate ( Object o , Class c ) { <START_BUG> return new Double ( Math . sqrt ( ( ( Number ) ( o ) ) . doubleValue ( ) ) ) ; <END_BUG> } }

Fix:
return Double . valueOf ( Math . sqrt ( ( ( Number ) ( o ) ) . doubleValue ( ) ) ) ;
Buggy code:
public class DnsSdNamespace extends Namespace { private static final long serialVersionUID = 7902507535188221743L ; public static final String SCHEME = "dnssd" ; public static final String NAME = "ecf.namespace.dnssd" ; public ID createInstance ( Object [ ] parameters ) throws IDCreateException { if ( ( ( parameters != null ) && ( ( parameters . length ) == 1 ) ) && ( ( parameters [ 0 ] ) instanceof String ) ) { String str = ( ( String ) ( parameters [ 0 ] ) ) ; return new DnsSdServiceTypeID ( this , str ) ; } else if ( ( ( parameters != null ) && ( ( parameters . length ) == 1 ) ) && ( ( parameters [ 0 ] ) instanceof IServiceTypeID ) ) { IServiceTypeID serviceTypeID = ( ( IServiceTypeID ) ( parameters [ 0 ] ) ) ; return new DnsSdServiceTypeID ( this , serviceTypeID ) ; } else if ( ( ( ( parameters != null ) && ( ( parameters . length ) == 2 ) ) && ( ( parameters [ 0 ] ) instanceof IServiceTypeID ) ) && ( ( parameters [ 1 ] ) instanceof URI ) ) { IServiceTypeID serviceTypeID = ( ( IServiceTypeID ) ( parameters [ 0 ] ) ) ; URI uri = ( ( URI ) ( parameters [ 1 ] ) ) ; return new DnsSdServiceID ( this , new DnsSdServiceTypeID ( this , serviceTypeID ) , uri ) ; } else { <START_BUG> throw new IDCreateException ( "Wrong<seq2seq4repair_space>parameters" ) ; <END_BUG> } } public String getScheme ( ) { } public Class [ ] [ ] getSupportedParameterTypes ( ) { } }

Fix:
throw new IDCreateException ( Messages . DnsSdNamespace_Wrong_Parameters ) ;
Buggy code:
public class TableView extends TreeTable { protected HeaderTableModel headerTableModel ; private int selectedRow = 0 ; private int update = 0 ; private String column ; private List tableModelPlugins ; protected HeaderList headerList ; public TableView ( HeaderTableModel headerTableModel ) { } public void enableThreadedView ( boolean b ) { if ( b ) { TableColumn tc = null ; try { tc = getColumn ( "Subject" ) ; tc . setCellRenderer ( null ) ; } catch ( Exception ex ) { System . out . println ( ( "headerTable->registerRenderer:<seq2seq4repair_space>" + ( ex . getMessage ( ) ) ) ) ; } ( ( HeaderTableModel ) ( getModel ( ) ) ) . enableThreadedView ( true ) ; } else { ( ( HeaderTableModel ) ( getModel ( ) ) ) . enableThreadedView ( false ) ; TableColumn tc = null ; try { tc = getColumn ( "Subject" ) ; <START_BUG> tc . setCellRenderer ( new BasicRenderer ( "Subject" ) ) ; <END_BUG> } catch ( Exception ex ) { System . out . println ( ( "headerTable->registerRenderer:<seq2seq4repair_space>" + ( ex . getMessage ( ) ) ) ) ; } } } protected void adjustColumn ( ) { } protected void initRenderer ( ) throws Exception { } public void registerRenderer ( String name , DefaultLabelRenderer cell , TableCellRenderer header , int size , boolean lockSize , int position ) { } public MessageNode getSelectedNode ( ) { } public MessageNode [ ] getSelectedNodes ( ) { } public MessageNode getMessagNode ( Object uid ) { } protected MouseInputListener createMouseInputListener ( ) { } }

Fix:
tc . setCellRenderer ( new BasicRenderer ( "columba.subject" ) ) ;
Buggy code:
class PromptService { XPCOMObject supports ; XPCOMObject promptService ; int refCount = 0 ; public PromptService ( ) { } int AddRef ( ) { } void createCOMInterfaces ( ) { } void disposeCOMInterfaces ( ) { } int getAddress ( ) { } int queryInterface ( int riid , int ppvObject ) { } int Release ( ) { } Browser getBrowser ( int aDOMWindow ) { } String getLabel ( int buttonFlag , int index , int buttonTitle ) { } public int Alert ( int parent , int dialogTitle , int text ) { } public int AlertCheck ( int parent , int dialogTitle , int text , int checkMsg , int checkValue ) { } public int Confirm ( int parent , int dialogTitle , int text , int _retval ) { Browser browser = getBrowser ( parent ) ; int length = XPCOM . strlen_PRUnichar ( dialogTitle ) ; char [ ] dest = new char [ length ] ; XPCOM . memmove ( dest , dialogTitle , ( length * 2 ) ) ; String titleLabel = new String ( dest ) ; length = XPCOM . strlen_PRUnichar ( text ) ; dest = new char [ length ] ; XPCOM . memmove ( dest , text , ( length * 2 ) ) ; String textLabel = new String ( dest ) ; <START_BUG> MessageBox messageBox = new MessageBox ( browser . getShell ( ) , ( ( SWT . OK ) | ( SWT . CANCEL ) ) ) ; <END_BUG> messageBox . setText ( titleLabel ) ; messageBox . setMessage ( textLabel ) ; int id = messageBox . open ( ) ; int [ ] result = new int [ ] { id == ( SWT . OK ) ? 1 : 0 } ; XPCOM . memmove ( _retval , result , 4 ) ; return XPCOM . NS_OK ; } public int ConfirmCheck ( int parent , int dialogTitle , int text , int checkMsg , int checkValue , int _retval ) { } public int ConfirmEx ( int parent , int dialogTitle , int text , int buttonFlags , int button0Title , int button1Title , int button2Title , int checkMsg , int checkValue , int _retval ) { } public int Prompt ( int parent , int dialogTitle , int text , int value , int checkMsg , int checkValue , int _retval ) { } public int PromptUsernameAndPassword ( int parent , int dialogTitle , int text , int username , int password , int checkMsg , int checkValue , int _retval ) { } public int PromptPassword ( int parent , int dialogTitle , int text , int password , int checkMsg , int checkValue , int _retval ) { } public int Select ( int parent , int dialogTitle , int text , int count , int selectList , int outSelection , int _retval ) { } }

Fix:
MessageBox messageBox = new MessageBox ( browser . getShell ( ) , ( ( ( SWT . OK ) | ( SWT . CANCEL ) ) | ( SWT . ICON_QUESTION ) ) ) ;
Buggy code:
public class Common { public static final ResponseCodeHandler MOVED_PERMANENTLY = new ResponseCodeHandler ( 301 ) ; public static final ResponseCodeHandler TEMPORARY_REDIRECT = new ResponseCodeHandler ( 307 ) ; public static final ResponseCodeHandler UNAUTHORIZED = new ResponseCodeHandler ( 403 ) ; public static final ResponseCodeHandler NOT_FOUND = ResponseCodeHandler . HANDLE_404 ; public static final ResponseCodeHandler METHOD_NOT_ALLOWED_HANDLER = new ResponseCodeHandler ( 405 ) ; public static final ResponseCodeHandler UNSUPPORTED_MEDIA_TYPE = new ResponseCodeHandler ( 415 ) ; public static final ResponseCodeHandler INTERNAL_SERVER_ERROR = new ResponseCodeHandler ( 500 ) ; public static final ResponseCodeHandler SERVICE_UNAVAIABLE = new ResponseCodeHandler ( 503 ) ; static final String APPLICATION_DMR_ENCODED = "application//dmr-encoded" ; static final String APPLICATION_JSON = "application//json" ; static final String TEXT_PLAIN = "text//plain" ; static final String TEXT_HTML = "text//html" ; static final int ONE_WEEK = ( ( 7 * 24 ) * 60 ) * 60 ; static String UTF_8 = "utf-8" ; static void sendError ( HttpServerExchange exchange , boolean encode , String msg ) { } static void sendError ( HttpServerExchange exchange , boolean encode , ModelNode msg ) { } private static void sendError ( HttpServerExchange exchange , boolean encode , ModelNode msg , int errorCode ) { if ( encode ) { try { ModelNode response = new ModelNode ( ) ; response . set ( msg ) ; ByteArrayOutputStream bout = new ByteArrayOutputStream ( ) ; response . writeBase64 ( bout ) ; byte [ ] bytes = bout . toByteArray ( ) ; exchange . getResponseHeaders ( ) . put ( CONTENT_TYPE , ( ( ( Common . APPLICATION_DMR_ENCODED ) + ";<seq2seq4repair_space>charset=" ) + ( Common . UTF_8 ) ) ) ; exchange . getResponseHeaders ( ) . put ( CONTENT_LENGTH , String . valueOf ( bytes . length ) ) ; exchange . setResponseCode ( errorCode ) ; exchange . getResponseSender ( ) . send ( new String ( bytes ) , END_EXCHANGE ) ; } catch ( IOException e ) { Common . sendError ( exchange , false , msg ) ; } } else { StringWriter stringWriter = new StringWriter ( ) ; final PrintWriter print = new PrintWriter ( stringWriter ) ; try { msg . writeJSONString ( print , false ) ; } finally { print . flush ( ) ; stringWriter . flush ( ) ; print . close ( ) ; } String msgString = stringWriter . toString ( ) ; byte [ ] bytes = msgString . getBytes ( ) ; <START_BUG> exchange . getResponseHeaders ( ) . put ( CONTENT_TYPE , ( ( ( Common . TEXT_PLAIN ) + ";<seq2seq4repair_space>charset=" ) + ( Common . UTF_8 ) ) ) ; <END_BUG> exchange . getResponseHeaders ( ) . put ( CONTENT_LENGTH , String . valueOf ( bytes . length ) ) ; exchange . setResponseCode ( errorCode ) ; exchange . getResponseSender ( ) . send ( msgString , END_EXCHANGE ) ; } } private static int getErrorResponseCode ( String failureMsg ) { } }

Fix:
exchange . getResponseHeaders ( ) . put ( CONTENT_TYPE , ( ( ( Common . APPLICATION_JSON ) + ";<seq2seq4repair_space>charset=" ) + ( Common . UTF_8 ) ) ) ;
Buggy code:
public class VariableDeclarationFragment extends VariableDeclaration { public static final ChildPropertyDescriptor NAME_PROPERTY = new ChildPropertyDescriptor ( VariableDeclarationFragment . class , "name" , SimpleName . class , ASTNode . MANDATORY , ASTNode . NO_CYCLE_RISK ) ; public static final SimplePropertyDescriptor EXTRA_DIMENSIONS_PROPERTY = new SimplePropertyDescriptor ( VariableDeclarationFragment . class , "extraDimensions" , int . class , ASTNode . MANDATORY ) ; public static final ChildPropertyDescriptor INITIALIZER_PROPERTY = new ChildPropertyDescriptor ( VariableDeclarationFragment . class , "initializer" , Expression . class , ASTNode . OPTIONAL , ASTNode . CYCLE_RISK ) ; private static final List PROPERTY_DESCRIPTORS ; public static List propertyDescriptors ( int apiLevel ) { } private SimpleName variableName = null ; private int extraArrayDimensions = 0 ; private Expression optionalInitializer = null ; VariableDeclarationFragment ( AST ast ) { } final SimplePropertyDescriptor internalExtraDimensionsProperty ( ) { } final ChildPropertyDescriptor internalInitializerProperty ( ) { } final ChildPropertyDescriptor internalNameProperty ( ) { } final List internalStructuralPropertiesForType ( int apiLevel ) { } final int internalGetSetIntProperty ( SimplePropertyDescriptor property , boolean get , int value ) { } final ASTNode internalGetSetChildProperty ( ChildPropertyDescriptor property , boolean get , ASTNode child ) { } final int getNodeType0 ( ) { } ASTNode clone0 ( AST target ) { VariableDeclarationFragment result = new VariableDeclarationFragment ( target ) ; <START_BUG> result . setSourceRange ( this . getStartPosition ( ) , this . getLength ( ) ) ; <END_BUG> result . setName ( ( ( SimpleName ) ( getName ( ) . clone ( target ) ) ) ) ; result . setExtraDimensions ( getExtraDimensions ( ) ) ; result . setInitializer ( ( ( Expression ) ( ASTNode . copySubtree ( target , getInitializer ( ) ) ) ) ) ; return result ; } final boolean subtreeMatch0 ( ASTMatcher matcher , Object other ) { } void accept0 ( ASTVisitor visitor ) { } public SimpleName getName ( ) { } public void setName ( SimpleName variableName ) { } public int getExtraDimensions ( ) { } public void setExtraDimensions ( int dimensions ) { } public Expression getInitializer ( ) { } public void setInitializer ( Expression initializer ) { } int memSize ( ) { } int treeSize ( ) { } }

Fix:
result . setSourceRange ( getStartPosition ( ) , getLength ( ) ) ;
Buggy code:
@ SuppressWarnings ( { "serial" , "serial" } ) public class AddressbookTreeCellRenderer extends DefaultTreeCellRenderer { Border unselectedBorder = null ; Border selectedBorder = null ; boolean isBordered = true ; boolean bool ; public AddressbookTreeCellRenderer ( boolean bool ) { } public Component getTreeCellRendererComponent ( JTree tree , Object value , boolean isSelected , boolean expanded , boolean leaf , int row , boolean hasFocus ) { super . getTreeCellRendererComponent ( tree , value , isSelected , expanded , leaf , row , hasFocus ) ; AddressbookTreeNode folder = ( ( AddressbookTreeNode ) ( value ) ) ; if ( folder == null ) { return this ; } setText ( folder . getName ( ) ) ; <START_BUG> setIcon ( folder . getCollapsedIcon ( ) ) ; <END_BUG> return this ; } }

Fix:
setIcon ( folder . getIcon ( ) ) ;
Buggy code:
public class VendedorService { private VendedorDao dao ; public VendedorService ( ) { } public static boolean isValidEmailAddress ( String email ) { } public Vendedor selecionarPorCnpj ( String cnpj ) { } public List < Vendedor > selecionarTodos ( ) { } public boolean inserir ( Vendedor vend ) { String cnpj = vend . getCnpj ( ) ; String nomeFantasia = vend . getNomeFantasia ( ) ; String descricao = vend . getDescricao ( ) ; String telefone = vend . getTelefone ( ) ; String endereco = vend . getEndereco ( ) ; String email = vend . getEmail ( ) ; String login = vend . getLogin ( ) ; String senha = vend . getSenha ( ) ; dao = new VendedorDao ( ) ; Vendedor vendedor = new Vendedor ( ) ; <START_BUG> if ( ( cnpj . equals ( "" ) ) || ( ( cnpj . length ( ) ) != 14 ) ) { <END_BUG> return false ; } else { vendedor . setCnpj ( cnpj ) ; } if ( nomeFantasia . equals ( "" ) ) { return false ; } else { vendedor . setNomeFantasia ( nomeFantasia ) ; } if ( descricao . equals ( "" ) ) { return false ; } else { vendedor . setDescricao ( descricao ) ; } if ( telefone . equals ( "" ) ) { return false ; } else { vendedor . setTelefone ( telefone ) ; } if ( endereco . equals ( "" ) ) { return false ; } else { vendedor . setEndereco ( endereco ) ; } if ( VendedorService . isValidEmailAddress ( email ) ) { vendedor . setEmail ( email ) ; } else { return false ; } if ( login . equals ( "" ) ) { return false ; } else { vendedor . setLogin ( login ) ; } if ( senha . equals ( "" ) ) { return false ; } else { vendedor . setSenha ( senha ) ; } dao . inserir ( vendedor ) ; return true ; } public boolean alterar ( Vendedor vend ) { } public void apagar ( Vendedor vendedor ) { } }

Fix:
if ( cnpj . equals ( "" ) ) {
Buggy code:
public class GenreDAO extends AbstractDAO implements ResultSetExtractor < List < Genre > > { @ Autowired JdbcTemplate template ; public void create ( Genre a ) throws SQLException { } public void update ( Genre a ) throws SQLException { <START_BUG> template . update ( "update<seq2seq4repair_space>tbl_genre<seq2seq4repair_space>set<seq2seq4repair_space>genre_name<seq2seq4repair_space>=<seq2seq4repair_space>?<seq2seq4repair_space>where<seq2seq4repair_space>genre_id<seq2seq4repair_space>=<seq2seq4repair_space>?" , new Object [ ] { a . getGenreId ( ) } ) ; <END_BUG> } public void delete ( Genre a ) throws SQLException { } public List < Genre > readAll ( ) throws SQLException { } public Genre readOne ( int genreId ) throws SQLException { } @ Override public List < Genre > extractData ( ResultSet rs ) throws SQLException , DataAccessException { } }

Fix:
template . update ( "update<seq2seq4repair_space>tbl_genre<seq2seq4repair_space>set<seq2seq4repair_space>genre_name<seq2seq4repair_space>=<seq2seq4repair_space>?<seq2seq4repair_space>where<seq2seq4repair_space>genre_id<seq2seq4repair_space>=<seq2seq4repair_space>?" , new Object [ ] { a . getGenreName ( ) , a . getGenreId ( ) } ) ;
Buggy code:
public class MenuItem extends Item { int accelerator ; Menu parent ; Menu menu ; public MenuItem ( Menu parent , int style ) { } public MenuItem ( Menu parent , int style , int index ) { } void addAccelerator ( ) { } void addAccelerators ( ) { } public void addArmListener ( ArmListener listener ) { } public void addHelpListener ( HelpListener listener ) { } public void addSelectionListener ( SelectionListener listener ) { } static int checkStyle ( int style ) { } protected void checkSubclass ( ) { } void createHandle ( int index ) { } void destroyWidget ( ) { } public int getAccelerator ( ) { } Rectangle getBounds ( ) { } public boolean getEnabled ( ) { } public Menu getMenu ( ) { } String getNameText ( ) { } public Menu getParent ( ) { } public boolean getSelection ( ) { } void hookEvents ( ) { } boolean isAccelActive ( ) { } public boolean isEnabled ( ) { } String keysymName ( int keysym ) { } void manageChildren ( ) { } void releaseChildren ( boolean destroy ) { if ( ( menu ) != null ) { <START_BUG> menu . releaseChildren ( false ) ; <END_BUG> menu = null ; } super . releaseChildren ( destroy ) ; } void releaseParent ( ) { } void releaseWidget ( ) { } void removeAccelerator ( ) { } void removeAccelerators ( ) { } public void removeArmListener ( ArmListener listener ) { } public void removeHelpListener ( HelpListener listener ) { } public void removeSelectionListener ( SelectionListener listener ) { } void selectRadio ( ) { } public void setAccelerator ( int accelerator ) { } public void setEnabled ( boolean enabled ) { } public void setMenu ( Menu menu ) { } boolean setRadioSelection ( boolean value ) { } public void setSelection ( boolean selected ) { } public void setText ( String string ) { } boolean translateAccelerator ( int accel , boolean doit ) { } int XmNactivateCallback ( int w , int client_data , int call_data ) { } int XmNarmCallback ( int w , int client_data , int call_data ) { } int XmNcascadingCallback ( int w , int client_data , int call_data ) { } int XmNhelpCallback ( int w , int client_data , int call_data ) { } int XmNvalueChangedCallback ( int w , int client_data , int call_data ) { } }

Fix:
menu . release ( false ) ;
Buggy code:
public abstract class OperatorExpression extends Expression implements OperatorIds { public static int [ ] [ ] OperatorSignatures = new int [ OperatorIds . NumberOfTables ] [ ] ; public OperatorExpression ( ) { } public static final void classInitialize ( ) { } public static final String generateTableTestCase ( ) { } public static final int [ ] get_AND ( ) { } public static final int [ ] get_AND_AND ( ) { } public static final int [ ] get_DIVIDE ( ) { } public static final int [ ] get_EQUAL_EQUAL ( ) { } public static final int [ ] get_GREATER ( ) { } public static final int [ ] get_GREATER_EQUAL ( ) { } public static final int [ ] get_LEFT_SHIFT ( ) { } public static final int [ ] get_LESS ( ) { } public static final int [ ] get_LESS_EQUAL ( ) { } public static final int [ ] get_MINUS ( ) { } public static final int [ ] get_MULTIPLY ( ) { } public static final int [ ] get_OR ( ) { } public static final int [ ] get_OR_OR ( ) { } public static final int [ ] get_PLUS ( ) { } public static final int [ ] get_REMAINDER ( ) { } public static final int [ ] get_RIGHT_SHIFT ( ) { } public static final int [ ] get_UNSIGNED_RIGHT_SHIFT ( ) { } public static final int [ ] get_XOR ( ) { } public String operatorToString ( ) { <START_BUG> switch ( ( ( bits ) & ( ASTNode . OperatorMASK ) ) > > ( ASTNode . OperatorSHIFT ) ) { <END_BUG> case OperatorIds . EQUAL_EQUAL : return "==" ; case OperatorIds . LESS_EQUAL : return "<=" ; case OperatorIds . GREATER_EQUAL : return ">=" ; case OperatorIds . NOT_EQUAL : return "!=" ; case OperatorIds . LEFT_SHIFT : return "<<" ; case OperatorIds . RIGHT_SHIFT : return ">>" ; case OperatorIds . UNSIGNED_RIGHT_SHIFT : return ">>>" ; case OperatorIds . OR_OR : return "||" ; case OperatorIds . AND_AND : return "&&" ; case OperatorIds . PLUS : return "+" ; case OperatorIds . MINUS : return "-" ; case OperatorIds . NOT : return "!" ; case OperatorIds . REMAINDER : return "%" ; case OperatorIds . XOR : return "^" ; case OperatorIds . AND : return "&" ; case OperatorIds . MULTIPLY : return "*" ; case OperatorIds . OR : return "|" ; case OperatorIds . TWIDDLE : return "~" ; case OperatorIds . DIVIDE : return "//" ; case OperatorIds . GREATER : return ">" ; case OperatorIds . LESS : return "<" ; case OperatorIds . QUESTIONCOLON : return "?:" ; case OperatorIds . EQUAL : return "=" ; } return "unknown<seq2seq4repair_space>operator" ; } public int nullStatus ( FlowInfo flowInfo ) { } public StringBuffer printExpression ( int indent , StringBuffer output ) { } public abstract StringBuffer printExpressionNoParenthesis ( int indent , StringBuffer output ) { } }

Fix:
switch ( ( ( this . bits ) & ( ASTNode . OperatorMASK ) ) > > ( ASTNode . OperatorSHIFT ) ) {
Buggy code:
public class HelpHandler extends CommandHandlerWithHelp { private final ArgumentWithoutValue commands = new ArgumentWithoutValue ( this , "--commands" ) ; public HelpHandler ( ) { } public HelpHandler ( String command ) { } @ Override public void handle ( CommandContext ctx ) { boolean printCommands ; try { <START_BUG> printCommands = commands . isPresent ( ctx . getParsedArguments ( ) ) ; <END_BUG> } catch ( CommandFormatException e ) { ctx . printLine ( e . getLocalizedMessage ( ) ) ; return ; } if ( printCommands ) { final List < String > commands = new ArrayList < String > ( ) ; ctx . getDefaultCommandCompleter ( ) . complete ( ctx , "" , 0 , commands ) ; ctx . printLine ( "Commands<seq2seq4repair_space>available<seq2seq4repair_space>in<seq2seq4repair_space>the<seq2seq4repair_space>current<seq2seq4repair_space>context:" ) ; ctx . printColumns ( commands ) ; ctx . printLine ( "To<seq2seq4repair_space>read<seq2seq4repair_space>a<seq2seq4repair_space>description<seq2seq4repair_space>of<seq2seq4repair_space>a<seq2seq4repair_space>specific<seq2seq4repair_space>command<seq2seq4repair_space>execute<seq2seq4repair_space>'command_name<seq2seq4repair_space>--help'." ) ; } else { printHelp ( ctx ) ; } } @ Override protected void doHandle ( CommandContext ctx ) { } }

Fix:
printCommands = commands . isPresent ( ctx . getParsedCommandLine ( ) ) ;
Buggy code:
@ Service @ Transactional public class UserService { private final Logger log = LoggerFactory . getLogger ( UserService . class ) ; @ Inject private PasswordEncoder passwordEncoder ; @ Inject private UserRepository userRepository ; @ Inject private PersistentTokenRepository persistentTokenRepository ; @ Inject private AuthorityRepository authorityRepository ; public User activateRegistration ( String key ) { log . debug ( "Activating<seq2seq4repair_space>user<seq2seq4repair_space>for<seq2seq4repair_space>activation<seq2seq4repair_space>key<seq2seq4repair_space>{}" , key ) ; if ( ( javaVersion ) == '8' ) { return userRepository . findOneByActivationKey ( key ) . map ( ( user ) -> { user . setActivated ( true ) ; user . setActivationKey ( null ) ; userRepository . save ( user ) ; log . debug ( "Activated<seq2seq4repair_space>user:<seq2seq4repair_space>{}" , user ) ; return user ; } ) . orElse ( null ) ; } else { <START_BUG> User user = userRepository . getUserByActivationKey ( key ) ; <END_BUG> if ( user != null ) { user . setActivated ( true ) ; user . setActivationKey ( null ) ; userRepository . save ( user ) ; log . debug ( "Activated<seq2seq4repair_space>user:<seq2seq4repair_space>{}" , user ) ; } return user ; } } public User createUserInformation ( String login , String password , String firstName , String lastName , String email , String langKey ) { } public void updateUserInformation ( String firstName , String lastName , String email ) { } public void changePassword ( String password ) { } public User getUserWithAuthorities ( ) { } @ Scheduled ( cron = "0<seq2seq4repair_space>0<seq2seq4repair_space>0<seq2seq4repair_space>*<seq2seq4repair_space>*<seq2seq4repair_space>?" ) public void removeOldPersistentTokens ( ) { } @ Scheduled ( cron = "0<seq2seq4repair_space>0<seq2seq4repair_space>1<seq2seq4repair_space>*<seq2seq4repair_space>*<seq2seq4repair_space>?" ) public void removeNotActivatedUsers ( ) { } }

Fix:
User user = userRepository . findOneByActivationKey ( key ) ;
Buggy code:
public class RemoteProxyControllerProtocolTestCase { RemoteChannelPairSetup channels ; @ Before public void start ( ) throws Exception { } @ After public void stop ( ) throws Exception { } @ Test public void testOperationMessageHandler ( ) throws Exception { } @ Test public void testOperationControlFailed ( ) throws Exception { } @ Test public void testOperationControlExceptionInController ( ) throws Exception { } @ Test public void testTransactionCommit ( ) throws Exception { } @ Test public void testTransactionRollback ( ) throws Exception { } @ Test public void testAttachmentInputStreams ( ) throws Exception { } private void assertArrays ( byte [ ] expected , byte [ ] actual ) { } private NewRemoteProxyController setupProxyHandlers ( RemoteProxyControllerProtocolTestCase . MockModelController controller ) { ManagementChannel serverChannel = channels . getServerChannel ( ) ; ManagementChannel clientChannel = channels . getClientChannel ( ) ; clientChannel . startReceiving ( ) ; NewTransactionalModelControllerOperationHandler operationHandler = new NewTransactionalModelControllerOperationHandler ( channels . getExecutorService ( ) , controller ) ; serverChannel . setOperationHandler ( operationHandler ) ; <START_BUG> NewRemoteProxyController proxyController = NewRemoteProxyController . create ( channels . getExecutorService ( ) , PathAddress . pathAddress ( ) , channels . getClientChannel ( ) ) ; <END_BUG> clientChannel . setOperationHandler ( proxyController ) ; return proxyController ; } private abstract static class MockModelController implements NewModelController { protected volatile ModelNode operation ; ModelNode getOperation ( ) { } @ Override public NewModelControllerClient createClient ( Executor executor ) { } } private static class CommitProxyOperationControl implements ProxyOperationControl { OperationTransaction tx ; @ Override public void operationPrepared ( OperationTransaction transaction , ModelNode result ) { } @ Override public void operationFailed ( ModelNode response ) { } @ Override public void operationCompleted ( ModelNode response ) { } } private static class TestFuture < T > extends AsyncFutureTask < T > { protected TestFuture ( ) { } void done ( T result ) { } } }

Fix:
NewRemoteProxyController proxyController = NewRemoteProxyController . create ( channels . getExecutorService ( ) , PathAddress . pathAddress ( ) , HOST , channels . getClientChannel ( ) ) ;
Buggy code:
public class AppClientMain { @ EJB private static AppClientSingletonRemote appClientSingletonRemote ; public static void main ( final String [ ] params ) { <START_BUG> AppClientMain . appClientSingletonRemote . makeAppClientCall ( ) ; <END_BUG> } }

Fix:
AppClientMain . appClientSingletonRemote . makeAppClientCall ( params [ 0 ] ) ;
Buggy code:
public class ListAdapter extends RecyclerView . Adapter < ListViewHolder > { private ArrayList < ListItemTable > mAllListItemTableList = null ; private ArrayList < ListItemTable > mDisplayingItemTableList = null ; private AdapterCallback mAdapterCallback ; private boolean isFiltered = false ; public ListAdapter ( Fragment fragment , ArrayList < ListItemTable > listItemTables ) { } public void addNewListItem ( ListItemTable listItemTable ) { } private void notifyAdapterSizeChange ( ) { } public void removeItem ( ListItemTable itemTable ) { } public void removeAllItems ( ) { } public void changeItem ( ListItemTable itemTable ) { } public void markAllAsRead ( ) { } @ Override public ListViewHolder onCreateViewHolder ( ViewGroup viewGroup , int i ) { } @ Override public void onBindViewHolder ( ListViewHolder listViewHolder , final int position ) { } @ Override public long getItemId ( int position ) { } @ Override public int getItemCount ( ) { } public void filterComplete ( ) { if ( ! ( isFiltered ) ) { mDisplayingItemTableList = new ArrayList ( ) ; for ( ListItemTable itemTable : mAllListItemTableList ) { <START_BUG> if ( itemTable . isComplete ( ) ) { <END_BUG> mDisplayingItemTableList . add ( itemTable ) ; } } } else { mDisplayingItemTableList = new ArrayList ( ) ; mDisplayingItemTableList . addAll ( mAllListItemTableList ) ; } isFiltered = ! ( isFiltered ) ; notifyDataSetChanged ( ) ; } }

Fix:
if ( ! ( itemTable . isComplete ( ) ) ) {
Buggy code:
public class ActivationAttributeHandler implements OperationStepHandler { static final ActivationAttributeHandler INSTANCE = new ActivationAttributeHandler ( ) ; private ActivationAttributeHandler ( ) { } @ Override public void execute ( OperationContext context , ModelNode operation ) throws OperationFailedException { Activation val = Activation . valueOf ( operation . require ( VALUE ) . asString ( ) . toUpperCase ( Locale . ENGLISH ) ) ; ModelNode node = context . readResourceForUpdate ( EMPTY_ADDRESS ) . getModel ( ) ; <START_BUG> node . get ( ACTIVATION ) . set ( val . toString ( ) . toLowerCase ( ) ) ; <END_BUG> context . completeStep ( ) ; } }

Fix:
node . get ( ACTIVATION ) . set ( val . toString ( ) . toLowerCase ( Locale . ENGLISH ) ) ;
Buggy code:
public class Template extends SyntaxElement implements XpandResource { private ImportDeclaration [ ] imports ; private Definition [ ] definitions ; private String fullyQualifiedName ; private ImportDeclaration [ ] extensions ; private Advice [ ] advices ; public ImportDeclaration [ ] getExtensions ( ) { } public List < String > getImportedExtensionsAsList ( ) { } public String getFullyQualifiedName ( ) { } public void setFullyQualifiedName ( final String fullyQualifiedName ) { } public Template ( final ImportDeclaration [ ] imports , final ImportDeclaration [ ] extensions , final Definition [ ] definitions , final Advice [ ] advices ) { } public XpandDefinition [ ] getDefinitions ( ) { } public List < XpandDefinition > getDefinitionsAsList ( ) { } public AbstractDefinition [ ] getAllDefinitions ( ) { } public ImportDeclaration [ ] getImports ( ) { } public List < ImportDeclaration > getImportsAsList ( ) { } private String [ ] commonPrefixes = null ; public void analyze ( XpandExecutionContext ctx , final Set < AnalysationIssue > issues ) { } public XpandDefinition [ ] getDefinitionsByName ( final String aName ) { } public String [ ] getImportedNamespaces ( ) { } public List < String > getImportedNamespacesAsList ( ) { } String [ ] importedExtensions = null ; public String [ ] getImportedExtensions ( ) { } public XpandAdvice [ ] getAdvices ( ) { } private void checkDuplicateDefinitions ( Set < AnalysationIssue > issues ) { Set < Definition > definitionSet = new HashSet < Definition > ( ) ; for ( Definition def : definitions ) { if ( ! ( definitionSet . contains ( def ) ) ) { definitionSet . add ( def ) ; } else { Definition origDef = null ; for ( Iterator < Definition > it = definitionSet . iterator ( ) ; it . hasNext ( ) ; ) { Definition d = it . next ( ) ; if ( d . equals ( def ) ) { origDef = d ; break ; } } issues . add ( new AnalysationIssue ( AnalysationIssue . INTERNAL_ERROR , ( ( "Duplicate<seq2seq4repair_space>definition<seq2seq4repair_space>'" + ( def . getName ( ) ) ) + "'" ) , def ) ) ; <START_BUG> issues . add ( new AnalysationIssue ( AnalysationIssue . INTERNAL_ERROR , ( ( "Duplicate<seq2seq4repair_space>definition<seq2seq4repair_space>'" + ( origDef . getName ( ) ) ) + "'" ) , origDef ) ) ; <END_BUG> } } } }

Fix:
issues . add ( new AnalysationIssue ( AnalysationIssue . INTERNAL_ERROR , ( ( "Duplicate<seq2seq4repair_space>definition<seq2seq4repair_space>'" + ( origDef != null ? origDef . getName ( ) : "" ) ) + "'" ) , origDef ) ) ;
Buggy code:
public class ActionLayout extends UMLAction { protected String _tabName ; public ActionLayout ( String tabName ) { } public boolean shouldBeEnabled ( ) { <START_BUG> return ( ( super . shouldBeEnabled ( ) ) && ( ( TheInstance . getActiveDiagram ( ) ) instanceof UMLClassDiagram ) ) && ( "Automatic" . equals ( _tabName ) ) ; <END_BUG> } public void actionPerformed ( ActionEvent ae ) { } }

Fix:
return ( ( super . shouldBeEnabled ( ) ) && ( ( TheInstance . getActiveDiagram ( ) ) instanceof UMLClassDiagram ) ) && ( "action.layout-automatic" . equals ( _tabName ) ) ;
Buggy code:
public class DeclarationOfReferencedTypesPattern extends TypeReferencePattern { HashSet knownTypes ; IJavaElement enclosingElement ; public DeclarationOfReferencedTypesPattern ( IJavaElement enclosingElement ) { } protected void matchReportReference ( AstNode reference , IJavaElement element , int accuracy , MatchLocator locator ) throws CoreException { } private void reportDeclaration ( TypeBinding typeBinding , int maxType , MatchLocator locator ) throws CoreException { IType type = locator . lookupType ( typeBinding ) ; if ( type == null ) return ; IResource resource = type . getUnderlyingResource ( ) ; boolean isBinary = type . isBinary ( ) ; IBinaryType info = null ; if ( isBinary ) { if ( resource == null ) { resource = type . getJavaProject ( ) . getProject ( ) ; } info = locator . getBinaryInfo ( ( ( ClassFile ) ( type . getClassFile ( ) ) ) , resource ) ; } while ( ( maxType > 0 ) && ( type != null ) ) { if ( ! ( this . knownTypes . contains ( type ) ) ) { if ( isBinary ) { locator . reportBinaryMatch ( resource , type , info , IJavaSearchResultCollector . EXACT_MATCH ) ; } else { TypeDeclaration typeDecl = ( ( SourceTypeBinding ) ( typeBinding ) ) . scope . referenceContext ; locator . report ( resource , typeDecl . sourceStart , typeDecl . sourceEnd , type , IJavaSearchResultCollector . EXACT_MATCH ) ; } this . knownTypes . add ( type ) ; } <START_BUG> if ( isBinary ) { <END_BUG> typeBinding = ( ( BinaryTypeBinding ) ( typeBinding ) ) . enclosingType ( ) ; } else { typeBinding = ( ( SourceTypeBinding ) ( typeBinding ) ) . enclosingType ( ) ; } IJavaElement parent = type . getParent ( ) ; if ( parent instanceof IType ) { type = ( ( IType ) ( parent ) ) ; } else { type = null ; } maxType -- ; } } }

Fix:
if ( typeBinding instanceof BinaryTypeBinding ) {
Buggy code:
public class ComponentRequestTarget implements IComponentRequestTarget { private final Component component ; public ComponentRequestTarget ( final Component component ) { } public void respond ( final RequestCycle requestCycle ) { } public final Component getComponent ( ) { } public void cleanUp ( final RequestCycle requestCycle ) { } public Object getLock ( final RequestCycle requestCycle ) { } public boolean equals ( final Object obj ) { } public int hashCode ( ) { } public String toString ( ) { <START_BUG> return ( ( ( "ComponentRequestTarget@" + ( hashCode ( ) ) ) + "{" ) + ( component ) ) + "}" ; <END_BUG> } }

Fix:
return ( ( ( "[ComponentRequestTarget@" + ( hashCode ( ) ) ) + "<seq2seq4repair_space>" ) + ( component ) ) + "]" ;
Buggy code:
@ Log @ Interceptor public class LogInterceptor implements Serializable { private static final Logger LOGGER = Logger . getLogger ( "se.kth" ) ; private static final Level LEVEL = Level . SEVERE ; @ AroundInvoke public Object logInvocation ( InvocationContext ctx ) throws Exception { } private Method logEntry ( InvocationContext ctx ) { } private void logException ( Method targetMethod , Exception e ) throws Exception { } private void logExit ( Method targetMethod , Object returnValue ) { Object [ ] args = new Object [ ] { targetMethod . getDeclaringClass ( ) . getCanonicalName ( ) , targetMethod . getName ( ) } ; LogInterceptor . LOGGER . log ( LogInterceptor . LEVEL , "Call<seq2seq4repair_space>to<seq2seq4repair_space>{0}.{1}<seq2seq4repair_space>completed" , args ) ; if ( ! ( isVoid ( targetMethod ) ) ) { <START_BUG> LogInterceptor . LOGGER . log ( LogInterceptor . LEVEL , "<seq2seq4repair_space>Return<seq2seq4repair_space>value:<seq2seq4repair_space>{0}" , returnValue ) ; <END_BUG> } } private boolean isVoid ( Method targetMethod ) { } }

Fix:
LogInterceptor . LOGGER . log ( LogInterceptor . LEVEL , "<seq2seq4repair_space>Return<seq2seq4repair_space>value:<seq2seq4repair_space>{0}" , returnValue . toString ( ) ) ;