nus-yam/ex-repair huggingface dataset:
Buggy code:
public class StompSubProtocolHandlerTests { private StompSubProtocolHandler protocolHandler ; private TestWebSocketSession session ; private MessageChannel channel ; @ SuppressWarnings ( "rawtypes" ) private ArgumentCaptor < Message > messageCaptor ; @ Before public void setup ( ) { } @ Test public void handleMessageToClientConnected ( ) { } @ Test public void handleMessageToClientConnectedUniqueUserName ( ) { } @ Test public void handleMessageToClientConnectedWithHeartbeats ( ) { } @ Test public void handleMessageToClientConnectAck ( ) { } @ Test public void eventPublication ( ) { } @ Test public void eventPublicationWithExceptions ( ) { } @ Test public void handleMessageToClientUserDestination ( ) { } @ Test public void handleMessageFromClient ( ) { TextMessage textMessage = StompTextMessageBuilder . create ( CONNECT ) . headers ( "login:guest" , "passcode:guest" , "accept-version:1.1,1.0" , "heart-beat:10000,10000" ) . build ( ) ; this . protocolHandler . afterSessionStarted ( this . session , this . channel ) ; this . protocolHandler . handleMessageFromClient ( this . session , textMessage , this . channel ) ; verify ( this . channel ) . send ( this . messageCaptor . capture ( ) ) ; Message < ? > actual = this . messageCaptor . getValue ( ) ; assertNotNull ( actual ) ; StompHeaderAccessor headers = StompHeaderAccessor . wrap ( actual ) ; assertEquals ( CONNECT , headers . getCommand ( ) ) ; assertEquals ( "s1" , headers . getSessionId ( ) ) ; assertNotNull ( headers . getSessionAttributes ( ) ) ; assertEquals ( "joe" , headers . getUser ( ) . getName ( ) ) ; assertEquals ( "guest" , headers . getLogin ( ) ) ; <START_BUG> assertEquals ( "PROTECTED" , headers . getPasscode ( ) ) ; <END_BUG> assertArrayEquals ( new long [ ] { 10000 , 10000 } , headers . getHeartbeat ( ) ) ; assertEquals ( new HashSet ( Arrays . asList ( "1.1" , "1.0" ) ) , headers . getAcceptVersion ( ) ) ; assertEquals ( 0 , this . session . getSentMessages ( ) . size ( ) ) ; } @ Test public void handleMessageFromClientInvalidStompCommand ( ) { } private static class UniqueUser extends TestPrincipal implements DestinationUserNameProvider { private UniqueUser ( String name ) { } @ Override public String getDestinationUserName ( ) { } } private static class TestPublisher implements ApplicationEventPublisher { private final List < ApplicationEvent > events = new ArrayList < ApplicationEvent > ( ) ; @ Override public void publishEvent ( ApplicationEvent event ) { } } }

Fix:
assertEquals ( "guest" , headers . getPasscode ( ) ) ;
Buggy code:
public class MessageDTOTest { public MessageDTOTest ( ) { } @ BeforeClass public static void setUpClass ( ) { } @ AfterClass public static void tearDownClass ( ) { } @ Before public void setUp ( ) { } @ After public void tearDown ( ) { } @ Test public void testRegisterLongtitudeValidator ( ) throws Exception { } @ Test public void testRegisterLatitudeValidator ( ) throws Exception { } @ Test public void testRegisterRoomNameValidator ( ) throws Exception { } @ Test public void testRegisterUserNameValidator ( ) throws Exception { } @ Test public void testRegisterMessageValidator ( ) throws Exception { } @ Test public void testRegisterTTLValidator ( ) throws Exception { } @ Test public void testRegisterWrongValidator ( ) { try { List < String > str = ChatroomCheckInsideDTO . getValidatorList ( USER_NAME ) ; Assert . assertEquals ( "Failure<seq2seq4repair_space>-<seq2seq4repair_space>expected<seq2seq4repair_space>validatorList<seq2seq4repair_space>size<seq2seq4repair_space>to<seq2seq4repair_space>be<seq2seq4repair_space>0" , 0 , str . size ( ) ) ; <START_BUG> ChatroomCheckInsideDTO . registerValidator ( new NoSpacesValidator ( ) , STRING ) ; <END_BUG> } catch ( ValidatorNotListedException ex ) { Assert . assertTrue ( "Exception<seq2seq4repair_space>should<seq2seq4repair_space>be<seq2seq4repair_space>ValidatorNotListedException" , ex . getMessage ( ) . equals ( new ValidatorNotListedException ( ) . getMessage ( ) ) ) ; } catch ( InappropriateValidatorException ex ) { Assert . fail ( "Validator<seq2seq4repair_space>should<seq2seq4repair_space>be<seq2seq4repair_space>appropriate<seq2seq4repair_space>should<seq2seq4repair_space>exist" ) ; } } @ Test public void testRegisterInappropriateValidator ( ) { } @ Test public void testCleanValidator ( ) throws Exception { } @ Test public void testGetValidatorList ( ) throws Exception { } @ Test public void testRemoveLongtitudeValidator ( ) throws Exception { } @ Test public void testRemoveLatitudeValidator ( ) throws Exception { } @ Test public void testRemoveRoomNameValidator ( ) throws Exception { } @ Test public void testRemoveMessageValidator ( ) throws Exception { } @ Test public void testRemoveTTLValidator ( ) throws Exception { } @ Test public void testRemoveValidatorOnZeroSpot ( ) throws Exception { } @ Test public void testRemoveValidatorUsernameNonExist ( ) throws Exception { } @ Test public void testRemoveValidatorRoomnameNonExist ( ) throws Exception { } @ Test public void testRemoveValidatorNotListed ( ) { } @ Test public void testGetValidatorListNotListed ( ) { } @ Test public void testNameGetter ( ) { } @ Test public void testValidateSuccess ( ) throws Exception { } @ Test public void testValidateFailRoomName ( ) throws Exception { } @ Test public void testValidateFailUserName ( ) throws Exception { } @ Test public void testValidateFailLongitude ( ) throws Exception { } @ Test public void testValidateFailLatitude ( ) throws Exception { } @ Test public void testValidateFailMessage ( ) throws Exception { } @ Test public void testValidateFailTTL ( ) throws Exception { } }

Fix:
MessageDTO . registerValidator ( new NoSpacesValidator ( ) , STRING ) ;
Buggy code:
public class Graph extends JPanel { private ArrayList < int [ ] > data = new ArrayList < int [ ] > ( ) ; int xMax = 0 ; int yMax = 0 ; int xMin = 0 ; int yMin = 0 ; int graphWidth ; int graphHeight ; public Graph ( double w , double h ) { } public void paintComponent ( Graphics g ) { g . drawRect ( ( ( graphWidth ) // 2 ) , 0 , 2 , graphHeight ) ; g . drawRect ( 0 , ( ( graphHeight ) // 2 ) , graphWidth , 2 ) ; for ( int i = 0 ; i < ( data . size ( ) ) ; i ++ ) { int [ ] point = data . get ( i ) ; <START_BUG> g . fillOval ( ( ( ( graphWidth ) // 2 ) + ( ( int ) ( ( ( graphWidth ) // 2 ) * ( ( double ) ( ( ( double ) ( point [ 0 ] ) ) // ( ( ( double ) ( xMax ) ) - ( ( double ) ( xMin ) ) ) ) ) ) ) ) , ( ( ( graphHeight ) // 2 ) - ( ( int ) ( ( ( ( double ) ( graphHeight ) ) // 4 ) * ( ( ( double ) ( point [ 1 ] ) ) // ( ( ( double ) ( yMax ) ) - ( ( double ) ( yMin ) ) ) ) ) ) ) , 5 , 5 ) ; <END_BUG> } } public void reGraph ( ) { } public void addPoint ( int [ ] toadd ) { } public void updateSize ( ) { } public void setData ( ArrayList < int [ ] > p ) { } }

Fix:
g . fillOval ( ( ( ( graphWidth ) // 2 ) + ( ( int ) ( ( ( graphWidth ) // 2 ) * ( ( double ) ( ( ( double ) ( point [ 0 ] ) ) // ( ( ( double ) ( xMax ) ) - ( ( double ) ( xMin ) ) ) ) ) ) ) ) , ( ( ( graphHeight ) // 2 ) - ( ( int ) ( ( ( ( double ) ( graphHeight ) ) // 2 ) * ( ( ( double ) ( point [ 1 ] ) ) // ( ( ( double ) ( yMax ) ) - ( ( double ) ( yMin ) ) ) ) ) ) ) , 5 , 5 ) ;
Buggy code:
public class ResourceUtils { public static Resource [ ] selectOutOfDateSources ( ProjectComponent logTo , Resource [ ] source , FileNameMapper mapper , ResourceFactory targets ) { long now = new Date ( ) . getTime ( ) ; if ( Os . isFamily ( "windows" ) ) { now += 2000 ; } Vector vresult = new Vector ( ) ; for ( int counter = 0 ; counter < ( source . length ) ; counter ++ ) { if ( ( source [ counter ] . getLastModified ( ) ) > now ) { logTo . log ( ( ( "Warning:<seq2seq4repair_space>" + ( source [ counter ] . getName ( ) ) ) + "<seq2seq4repair_space>modified<seq2seq4repair_space>in<seq2seq4repair_space>the<seq2seq4repair_space>future." ) , MSG_WARN ) ; } String [ ] targetnames = mapper . mapFileName ( source [ counter ] . getName ( ) . replace ( '//' , File . separatorChar ) ) ; if ( targetnames != null ) { boolean added = false ; StringBuffer targetList = new StringBuffer ( ) ; for ( int ctarget = 0 ; ( ! added ) && ( ctarget < ( targetnames . length ) ) ; ctarget ++ ) { Resource atarget = targets . getResource ( targetnames [ ctarget ] . replace ( File . separatorChar , '//' ) ) ; if ( ! ( atarget . isExists ( ) ) ) { logTo . log ( ( ( ( ( source [ counter ] . getName ( ) ) + "<seq2seq4repair_space>added<seq2seq4repair_space>as<seq2seq4repair_space>" ) + ( atarget . getName ( ) ) ) + "<seq2seq4repair_space>doesn\'t<seq2seq4repair_space>exist." ) , MSG_VERBOSE ) ; vresult . addElement ( source [ counter ] ) ; added = true ; } else <START_BUG> if ( ( atarget . getLastModified ( ) ) < ( source [ counter ] . getLastModified ( ) ) ) { <END_BUG> logTo . log ( ( ( ( ( source [ counter ] . getName ( ) ) + "<seq2seq4repair_space>added<seq2seq4repair_space>as<seq2seq4repair_space>" ) + ( atarget . getName ( ) ) ) + "<seq2seq4repair_space>is<seq2seq4repair_space>outdated." ) , MSG_VERBOSE ) ; vresult . addElement ( source [ counter ] ) ; added = true ; } else { if ( ( targetList . length ( ) ) > 0 ) { targetList . append ( ",<seq2seq4repair_space>" ) ; } targetList . append ( atarget . getName ( ) ) ; } } if ( ! added ) { logTo . log ( ( ( ( ( ( source [ counter ] . getName ( ) ) + "<seq2seq4repair_space>omitted<seq2seq4repair_space>as<seq2seq4repair_space>" ) + ( targetList . toString ( ) ) ) + ( ( targetnames . length ) == 1 ? "<seq2seq4repair_space>is" : "<seq2seq4repair_space>are<seq2seq4repair_space>" ) ) + "<seq2seq4repair_space>up<seq2seq4repair_space>to<seq2seq4repair_space>date." ) , MSG_VERBOSE ) ; } } else { logTo . log ( ( ( source [ counter ] . getName ( ) ) + "<seq2seq4repair_space>skipped<seq2seq4repair_space>-<seq2seq4repair_space>don\'t<seq2seq4repair_space>know<seq2seq4repair_space>how<seq2seq4repair_space>to<seq2seq4repair_space>handle<seq2seq4repair_space>it" ) , MSG_VERBOSE ) ; } } Resource [ ] result = new Resource [ vresult . size ( ) ] ; vresult . copyInto ( result ) ; return result ; } }

Fix:
if ( ( ! ( atarget . isDirectory ( ) ) ) && ( ( atarget . getLastModified ( ) ) < ( source [ counter ] . getLastModified ( ) ) ) ) {
Buggy code:
public class MainActivity extends ActionBarActivity implements NewBowlerDialog . NewBowlerDialogListener { private static final String TAG = "MainActivity" ; private List < Long > mListBowlerIds ; private List < String > mListBowlerNames ; private List < Short > mListBowlerAverages ; private RecyclerView mBowlerRecycler ; private Adapter mBowlerAdapter ; private TextView mBowlerInstructionsTextView ; private long mRecentBowlerId = - 1 ; private long mRecentLeagueId = - 1 ; private byte mRecentNumberOfGames = - 1 ; private long mQuickBowlerId = - 1 ; private long mQuickLeagueId = - 1 ; private byte mQuickNumberOfGames = - 1 ; private String mRecentBowlerName ; private String mRecentLeagueName ; private String mQuickBowlerName ; private String mQuickLeagueName ; public static boolean sQuickSeriesButtonEnabled = false ; @ Override protected void onCreate ( Bundle savedInstanceState ) { super . onCreate ( savedInstanceState ) ; setContentView ( activity_main ) ; getSupportActionBar ( ) . setBackgroundDrawable ( new android . graphics . drawable . ColorDrawable ( getResources ( ) . getColor ( primary_green ) ) ) ; <START_BUG> PreferenceManager . setDefaultValues ( this , preferences , false ) ; <END_BUG> mListBowlerIds = new ArrayList < > ( ) ; mListBowlerNames = new ArrayList < > ( ) ; mListBowlerAverages = new ArrayList < > ( ) ; mBowlerRecycler = ( ( RecyclerView ) ( findViewById ( recyclerView_bowlers ) ) ) ; mBowlerRecycler . setHasFixedSize ( true ) ; mBowlerRecycler . addItemDecoration ( new DividerItemDecoration ( this , DividerItemDecoration . VERTICAL_LIST ) ) ; RecyclerView . LayoutManager bowlerLayoutManager = new LinearLayoutManager ( this ) ; mBowlerRecycler . setLayoutManager ( bowlerLayoutManager ) ; mBowlerAdapter = new BowlerAdapter ( this , mListBowlerIds , mListBowlerNames , mListBowlerAverages ) ; mBowlerRecycler . setAdapter ( mBowlerAdapter ) ; FloatingActionButton floatingActionButton = ( ( FloatingActionButton ) ( findViewById ( fab_new_bowler ) ) ) ; floatingActionButton . setOnClickListener ( new View . OnClickListener ( ) { @ Override public void onClick ( View v ) { showNewBowlerDialog ( ) ; } } ) ; mBowlerInstructionsTextView = ( ( TextView ) ( findViewById ( textView_new_bowler_instructions ) ) ) ; } @ Override protected void onResume ( ) { } @ Override public boolean onCreateOptionsMenu ( Menu menu ) { } @ Override public boolean onOptionsItemSelected ( MenuItem item ) { } private void showSettingsMenu ( ) { } @ Override public void onAddNewBowler ( String bowlerName ) { } private void showNewBowlerDialog ( ) { } private void showQuickSeriesDialog ( ) { } private class NewBowlerTask extends AsyncTask < String , Void , String > { @ Override protected String doInBackground ( String ... bowlerName ) { } @ Override protected void onPostExecute ( String bowlerIdAndName ) { } } private class LoadBowlerAndRecentTask extends AsyncTask < Void , Void , Void > { @ Override protected Void doInBackground ( Void ... parameters ) { } @ Override protected void onPostExecute ( Void param ) { } } }

Fix:
PreferenceManager . setDefaultValues ( this , preferences , true ) ;
Buggy code:
@ RunWith ( Arquillian . class ) @ RunAsClient public class PolicyContextTestCase { private static Logger LOGGER = Logger . getLogger ( PolicyContextTestCase . class ) ; @ Deployment ( name = "ear" ) public static EnterpriseArchive createDeployment ( ) { } @ Test public void testHttpServletRequestFromPolicyContext ( @ ArquillianResource URL webAppURL ) throws Exception { String externalFormURL = webAppURL . toExternalForm ( ) ; <START_BUG> String servletURL = ( ( externalFormURL . substring ( 0 , ( ( externalFormURL . length ( ) ) - 1 ) ) ) + ".war" ) + ( PolicyContextTestServlet . SERVLET_PATH ) ; <END_BUG> PolicyContextTestCase . LOGGER . info ( ( "Testing<seq2seq4repair_space>JACC<seq2seq4repair_space>permissions:<seq2seq4repair_space>" + servletURL ) ) ; String response = HttpRequest . get ( servletURL , 1000 , TimeUnit . SECONDS ) ; assertTrue ( response . contains ( "EJB<seq2seq4repair_space>successfully<seq2seq4repair_space>retrieved<seq2seq4repair_space>HttpServletRequest<seq2seq4repair_space>reference<seq2seq4repair_space>from<seq2seq4repair_space>PolicyContext" ) ) ; } private static JavaArchive createJar ( final String jarName ) { } private static WebArchive createWar ( final String warName ) { } }

Fix:
String servletURL = ( externalFormURL . substring ( 0 , ( ( externalFormURL . length ( ) ) - 1 ) ) ) + ( PolicyContextTestServlet . SERVLET_PATH ) ;
Buggy code:
public abstract class FilteredPreferenceDialog extends PreferenceDialog implements IWorkbenchPreferenceContainer { protected class PreferenceFilteredTree extends FilteredTree { private ViewerFilter viewerFilter ; private String cachedTitle ; PreferenceFilteredTree ( Composite parent , int treeStyle , PatternFilter filter ) { } protected void addFilter ( ViewerFilter filter ) { } protected void updateToolbar ( boolean visible ) { } protected void clearText ( ) { } } protected FilteredPreferenceDialog . PreferenceFilteredTree filteredTree ; private Object pageData ; IWorkingCopyManager workingCopyManager ; private Collection updateJobs = new ArrayList ( ) ; PreferencePageHistory history ; public FilteredPreferenceDialog ( Shell parentShell , PreferenceManager manager ) { } protected IPreferenceNode findNodeMatching ( String nodeId ) { } protected TreeViewer createTreeViewer ( Composite parent ) { <START_BUG> int styleBits = ( SWT . SINGLE ) | ( SWT . H_SCROLL ) ; <END_BUG> filteredTree = new FilteredPreferenceDialog . PreferenceFilteredTree ( parent , styleBits , new PreferencePatternFilter ( ) ) ; GridData gd = new GridData ( SWT . FILL , SWT . FILL , true , true ) ; gd . horizontalIndent = IDialogConstants . HORIZONTAL_MARGIN ; filteredTree . setBackground ( parent . getDisplay ( ) . getSystemColor ( COLOR_LIST_BACKGROUND ) ) ; TreeViewer tree = filteredTree . getViewer ( ) ; setContentAndLabelProviders ( tree ) ; tree . setInput ( getPreferenceManager ( ) ) ; if ( hasAtMostOnePage ( tree ) ) { Text filterText = filteredTree . getFilterControl ( ) ; if ( filterText != null ) { filteredTree . getFilterControl ( ) . setEnabled ( false ) ; } } tree . addFilter ( new CapabilityFilter ( ) ) ; tree . addSelectionChangedListener ( new ISelectionChangedListener ( ) { public void selectionChanged ( SelectionChangedEvent event ) { handleTreeSelectionChanged ( event ) ; } } ) ; super . addListeners ( tree ) ; return tree ; } private boolean hasAtMostOnePage ( TreeViewer tree ) { } protected void setContentAndLabelProviders ( TreeViewer treeViewer ) { } protected String getContributionType ( ) { } protected void handleTreeSelectionChanged ( SelectionChangedEvent event ) { } protected Control createTreeAreaContents ( Composite parent ) { } public void showOnly ( String [ ] filteredIds ) { } public void setPageData ( Object pageData ) { } protected void createPage ( IPreferenceNode node ) { } public IPreferencePage getCurrentPage ( ) { } public boolean openPage ( String pageId , Object data ) { } public final void setCurrentPageId ( final String preferencePageId ) { } public IWorkingCopyManager getWorkingCopyManager ( ) { } protected void okPressed ( ) { } public void registerUpdateJob ( Job job ) { } Control getContainerToolBar ( Composite composite ) { } protected boolean showPage ( IPreferenceNode node ) { } public boolean close ( ) { } protected Composite createTitleArea ( Composite parent ) { } protected void selectSavedItem ( ) { } protected void updateTreeFont ( Font dialogFont ) { } private void applyDialogFont ( Control control , Font dialogFont ) { } }

Fix:
int styleBits = SWT . SINGLE ;
Buggy code:
public abstract class AbstractDataGridView < T > extends DataViewBase < T > { private static final long serialVersionUID = 1L ; private static final String CELL_REPEATER_ID = "cells" ; private static final String CELL_ITEM_ID = "cell" ; private final ICellPopulator < T > [ ] populators ; private transient ArrayIteratorAdapter < ICellPopulator < T > > populatorsIteratorCache ; public AbstractDataGridView ( String id , ICellPopulator < T > [ ] populators , IDataProvider < T > dataProvider ) { } private ArrayIteratorAdapter < ICellPopulator < T > > getPopulatorsIterator ( ) { } protected final ICellPopulator < T > [ ] internalGetPopulators ( ) { } protected Item < ICellPopulator < T > > newCellItem ( final String id , int index , final IModel < ICellPopulator < T > > model ) { } @ Override protected final Item < T > newItem ( String id , int index , IModel < T > model ) { } protected Item < T > newRowItem ( final String id , int index , final IModel < T > model ) { } @ Override protected void onDetach ( ) { } @ Override protected final void populateItem ( Item < T > item ) { <START_BUG> RepeatingView < T > cells = new RepeatingView < T > ( AbstractDataGridView . CELL_REPEATER_ID ) ; <END_BUG> item . add ( cells ) ; ArrayIteratorAdapter < ICellPopulator < T > > populators = getPopulatorsIterator ( ) ; for ( int i = 0 ; populators . hasNext ( ) ; i ++ ) { IModel < ICellPopulator < T > > populatorModel = populators . next ( ) ; Item < ICellPopulator < T > > cellItem = newCellItem ( cells . newChildId ( ) , i , populatorModel ) ; cells . add ( cellItem ) ; ICellPopulator < T > populator = cellItem . getModelObject ( ) ; populator . populateItem ( cellItem , AbstractDataGridView . CELL_ITEM_ID , item . getModel ( ) ) ; if ( ( cellItem . get ( "cell" ) ) == null ) { throw new org . apache . wicket . WicketRuntimeException ( ( ( ( ( populator . getClass ( ) . getName ( ) ) + ".populateItem()<seq2seq4repair_space>failed<seq2seq4repair_space>to<seq2seq4repair_space>add<seq2seq4repair_space>a<seq2seq4repair_space>component<seq2seq4repair_space>with<seq2seq4repair_space>id<seq2seq4repair_space>[" ) + ( AbstractDataGridView . CELL_ITEM_ID ) ) + "]<seq2seq4repair_space>to<seq2seq4repair_space>the<seq2seq4repair_space>provided<seq2seq4repair_space>[cellItem]<seq2seq4repair_space>object.<seq2seq4repair_space>Make<seq2seq4repair_space>sure<seq2seq4repair_space>you<seq2seq4repair_space>call<seq2seq4repair_space>add()<seq2seq4repair_space>on<seq2seq4repair_space>cellItem<seq2seq4repair_space>and<seq2seq4repair_space>make<seq2seq4repair_space>sure<seq2seq4repair_space>you<seq2seq4repair_space>gave<seq2seq4repair_space>the<seq2seq4repair_space>added<seq2seq4repair_space>component<seq2seq4repair_space>passed<seq2seq4repair_space>in<seq2seq4repair_space>'componentId'<seq2seq4repair_space>id.<seq2seq4repair_space>(<seq2seq4repair_space>*cellItem*.add(new<seq2seq4repair_space>MyComponent(*componentId*,<seq2seq4repair_space>rowModel)<seq2seq4repair_space>)" ) ) ; } } } }

Fix:
RepeatingView cells = new RepeatingView ( AbstractDataGridView . CELL_REPEATER_ID ) ;
Buggy code:
public final class StringUtils { private StringUtils ( ) { } private static final Logger LOG = Logger . getLogger ( StringUtils . class ) ; public static String stringList ( List < ? > ids , String separator ) { } public static Map < Selector , Selector > convertJsonToOptions ( TableName tableName , String json ) { } public static Map < String , Object > convertJsonToMap ( String json ) { } private static Selector convertJsonNodeToCrossdataParserType ( TableName tableName , JsonNode jsonNode ) { } private static Object convertJsonNodeToJavaType ( JsonNode jsonNode ) { } public static String getAkkaActorRefUri ( Object object ) { } public static ColumnType convertJavaTypeToXdType ( String javaType ) { } public static Patch objectDiff ( Object oa , Object ob ) { } public static String patchObject ( ArrayList < String > a , Patch diff ) throws PatchFailedException { } public static Object deserializeObjectFromString ( String serializedObject , Class objectsClass ) { } public static String serializeObject2String ( Object obj ) { } public static ColumnType convertXdTypeToColumnType ( String xdType ) { <START_BUG> ColumnType ct = ColumnType . NATIVE ; <END_BUG> String stringType = xdType . replace ( "Tuple" , "" ) . replace ( "[" , "" ) . replace ( "]" , "" ) . trim ( ) ; if ( stringType . equalsIgnoreCase ( "BigInt" ) ) { ct = ColumnType . BIGINT ; } else if ( ( stringType . equalsIgnoreCase ( "Bool" ) ) || ( stringType . equalsIgnoreCase ( "Boolean" ) ) ) { ct = ColumnType . BOOLEAN ; } else if ( stringType . equalsIgnoreCase ( "Double" ) ) { ct = ColumnType . DOUBLE ; } else if ( stringType . equalsIgnoreCase ( "Float" ) ) { ct = ColumnType . FLOAT ; } else if ( ( stringType . equalsIgnoreCase ( "Int" ) ) || ( stringType . equalsIgnoreCase ( "Integer" ) ) ) { ct = ColumnType . INT ; } else if ( stringType . equalsIgnoreCase ( "Text" ) ) { ct = ColumnType . TEXT ; } else if ( stringType . equalsIgnoreCase ( "Varchar" ) ) { ct = ColumnType . VARCHAR ; } else if ( stringType . equalsIgnoreCase ( "Set" ) ) { ct = ColumnType . SET ; } else if ( stringType . equalsIgnoreCase ( "List" ) ) { ct = ColumnType . LIST ; } else if ( stringType . equalsIgnoreCase ( "Map" ) ) { ct = ColumnType . MAP ; } return ct ; } public static String getReturningTypeFromSignature ( String signature ) { } }

Fix:
ColumnType ct = null ;
Buggy code:
public class Optional < T > { private static Optional < Object > absent = new Optional < Object > ( null ) ; private T value ; public static < T > Optional < T > of ( T value ) { } @ SuppressWarnings ( "unchecked" ) public static < T > Optional < T > absent ( ) { } private Optional ( T value ) { } public boolean isPresent ( ) { } public T get ( ) { } public T or ( T replacement ) { } @ MaybeNull public T orNull ( ) { <START_BUG> return null ; <END_BUG> } @ Override public int hashCode ( ) { } @ Override public boolean equals ( Object obj ) { } }

Fix:
return value ;
Buggy code:
public class SettingsActivity extends AppCompatActivity implements SettingsFragment . OnFragmentInteraction { private SettingsFragment fragment ; private User user ; private int userId ; private String firstName ; private String lastName ; private String email ; @ Override protected void onCreate ( Bundle savedInstanceState ) { } private void initFragment ( ) { } protected void onStart ( ) { } @ Override public void onClickBtnChangeUserInfo ( String firstName , String lastName , String email , String oldPassword , String newPassword , String newPasswordCheck ) { user = new User ( firstName , lastName , email , oldPassword , userId , newPassword ) ; if ( ( ! ( newPassword . equals ( "" ) ) ) && ( ! ( newPasswordCheck . equals ( "" ) ) ) ) { <START_BUG> if ( newPassword != newPasswordCheck ) { <END_BUG> CharSequence text = "Password<seq2seq4repair_space>does<seq2seq4repair_space>not<seq2seq4repair_space>match" ; int duration = Toast . LENGTH_SHORT ; Toast toast = Toast . makeText ( this , text , duration ) ; toast . show ( ) ; } } else if ( firstName == null ) { CharSequence text = "Please<seq2seq4repair_space>enter<seq2seq4repair_space>your<seq2seq4repair_space>first<seq2seq4repair_space>name" ; int duration = Toast . LENGTH_SHORT ; Toast toast = Toast . makeText ( this , text , duration ) ; toast . show ( ) ; } else if ( lastName == null ) { CharSequence text = "Please<seq2seq4repair_space>enter<seq2seq4repair_space>your<seq2seq4repair_space>last<seq2seq4repair_space>name" ; int duration = Toast . LENGTH_SHORT ; Toast toast = Toast . makeText ( this , text , duration ) ; toast . show ( ) ; } else if ( email == null ) { CharSequence text = "Please<seq2seq4repair_space>enter<seq2seq4repair_space>your<seq2seq4repair_space>email" ; int duration = Toast . LENGTH_SHORT ; Toast toast = Toast . makeText ( this , text , duration ) ; toast . show ( ) ; } else if ( oldPassword == null ) { CharSequence text = "Please<seq2seq4repair_space>enter<seq2seq4repair_space>your<seq2seq4repair_space>password" ; int duration = Toast . LENGTH_SHORT ; Toast toast = Toast . makeText ( this , text , duration ) ; toast . show ( ) ; } else { new SettingsActivity . ChangeUserInfo ( ) . execute ( user ) ; } } @ Override public void onClickDeleteAccount ( ) { } class DeleteUser extends AsyncTask < User , Void , String > { private ObjectInputStream objectInputStream ; private ObjectOutputStream objectOutputStream ; private ProgressDialog progressDialog ; protected String doInBackground ( User ... params ) { } @ Override protected void onPostExecute ( String s ) { } } class ChangeUserInfo extends AsyncTask < User , Void , String > { private ObjectInputStream objectInputStream ; private ObjectOutputStream objectOutputStream ; private ProgressDialog progressDialog ; protected String doInBackground ( User ... params ) { } @ Override protected void onPostExecute ( String s ) { } } }

Fix:
if ( ! ( newPassword . equals ( newPasswordCheck ) ) ) {
Buggy code:
public class ResidenceManager { protected Map < String , ClaimedResidence > residences ; public ResidenceManager ( ) { } public ClaimedResidence getByLoc ( Location loc ) { } public ClaimedResidence getByName ( String name ) { } public String getNameByLoc ( Location loc ) { } public String getNameByRes ( ClaimedResidence res ) { } public boolean addResidence ( String name , String owner , Location loc1 , Location loc2 ) { } public void addResidence ( Player player , String name , Location loc1 , Location loc2 , boolean resadmin ) { } public void listResidences ( Player player ) { } public void listResidences ( Player player , int page ) { } public void listResidences ( Player player , String targetplayer ) { } public void listResidences ( Player player , String targetplayer , int page ) { } public void listResidences ( Player player , int page , boolean showhidden ) { } public void listResidences ( Player player , String targetplayer , int page , boolean showhidden ) { } public String checkAreaCollision ( CuboidArea newarea , ClaimedResidence parentResidence ) { } public void removeResidence ( String name ) { } public void removeResidence ( Player player , String name , boolean resadmin ) { } public void removeAllByOwner ( String owner ) { } public int getOwnedZoneCount ( String player ) { } public String [ ] getResidenceList ( ) { } public void listAllResidences ( Player player , int page ) { } public void listAllResidences ( Player player , int page , boolean showhidden ) { } public void printAreaInfo ( String areaname , Player player ) { } public void mirrorPerms ( Player reqPlayer , String targetArea , String sourceArea , boolean resadmin ) { ClaimedResidence reciever = this . getByName ( targetArea ) ; ClaimedResidence source = this . getByName ( sourceArea ) ; if ( ( source == null ) || ( reciever == null ) ) { <START_BUG> reqPlayer . sendMessage ( ( "§c" + ( Residence . getLanguage ( ) . getPhrase ( "InvalidArea" ) ) ) ) ; <END_BUG> return ; } if ( ! resadmin ) { if ( ( ! ( reciever . getPermissions ( ) . hasResidencePermission ( reqPlayer , true ) ) ) || ( ! ( source . getPermissions ( ) . hasResidencePermission ( reqPlayer , true ) ) ) ) { reqPlayer . sendMessage ( ( "§c" + ( Residence . getLanguage ( ) . getPhrase ( "NoPermission" ) ) ) ) ; return ; } } reciever . getPermissions ( ) . applyTemplate ( reqPlayer , source . getPermissions ( ) , resadmin ) ; } public Map < String , Object > save ( ) { } public static ResidenceManager load ( Map < String , Object > root ) throws Exception { } public static ResidenceManager loadMap ( Map < String , Object > root , ResidenceManager resm ) throws Exception { } public boolean renameResidence ( String oldName , String newName ) { } public boolean renameResidence ( Player player , String oldName , String newName , boolean resadmin ) { } public void giveResidence ( Player reqPlayer , String targPlayer , String residence , boolean resadmin ) { } public void removeAllFromWorld ( CommandSender sender , String world ) { } public int getResidenceCount ( ) { } }

Fix:
reqPlayer . sendMessage ( ( "§c" + ( Residence . getLanguage ( ) . getPhrase ( "InvalidResidence" ) ) ) ) ;
Buggy code:
public class InferenceContext { private TypeBinding [ ] [ ] [ ] collectedSubstitutes ; MethodBinding genericMethod ; int depth ; int status ; TypeBinding expectedType ; boolean hasExplicitExpectedType ; TypeBinding [ ] substitutes ; static final int FAILED = 1 ; static final int RAW_SUBSTITUTION = 2 ; public InferenceContext ( MethodBinding genericMethod ) { } public boolean checkRawSubstitution ( ) { <START_BUG> if ( ( depth ) > 0 ) <END_BUG> return false ; this . status = InferenceContext . RAW_SUBSTITUTION ; return true ; } public TypeBinding [ ] getSubstitutes ( TypeVariableBinding typeVariable , int constraint ) { } public boolean hasUnresolvedTypeArgument ( ) { } public void recordSubstitute ( TypeVariableBinding typeVariable , TypeBinding actualType , int constraint ) { } public String toString ( ) { } }

Fix:
if ( ( this . depth ) > 0 )
Buggy code:
break ; } else { VY = 6 * ( PPM ) ; } } } } } } if ( ( VX ) < 0 ) { for ( int i = 0 ; i >= ( - 3 ) ; i -- ) { if ( ( ( ( ( int ) ( ( ( X ) // ( PPM ) ) // 64 ) ) + i ) > 0 ) && ( ( ( ( int ) ( ( ( X ) // ( PPM ) ) // 64 ) ) + i ) < ( Col . getWidth ( ) ) ) ) { if ( Col . getCell ( ( ( ( int ) ( ( ( X ) // ( PPM ) ) // 64 ) ) + i ) , ( ( int ) ( ( ( Y ) // ( PPM ) ) // 64 ) ) ) . getTile ( ) . getProperties ( ) . containsKey ( "Hit" ) ) { VX = 0 ; for ( int j = 0 ; j <= 3 ; j ++ ) { if ( Col . getCell ( ( ( int ) ( ( ( X ) // ( PPM ) ) // 64 ) ) , ( ( ( int ) ( ( ( Y ) // ( PPM ) ) // 64 ) ) + j ) ) . getTile ( ) . getProperties ( ) . containsKey ( "Hit" ) ) { VY = ( - 6 ) * ( PPM ) ; break ; } else { VY = 6 * ( PPM ) ; } } } } } } if ( ( VY ) > 0 ) { for ( int i = 0 ; i <= 3 ; i ++ ) { if ( ( ( ( ( int ) ( ( ( Y ) // ( PPM ) ) // 64 ) ) + i ) > 0 ) && ( ( ( ( int ) ( ( ( Y ) // ( PPM ) ) // 64 ) ) + i ) < ( Col . getHeight ( ) ) ) ) { if ( Col . getCell ( ( ( int ) ( ( ( X ) // ( PPM ) ) // 64 ) ) , ( ( ( int ) ( ( ( Y ) // ( PPM ) ) // 64 ) ) + i ) ) . getTile ( ) . getProperties ( ) . containsKey ( "Hit" ) ) { VY = 0 ; for ( int j = 0 ; j <= 3 ; j ++ ) { if ( Col . getCell ( ( ( ( int ) ( ( ( X ) // ( PPM ) ) // 64 ) ) + j ) , ( ( int ) ( ( ( Y ) // ( PPM ) ) // 64 ) ) ) . getTile ( ) . getProperties ( ) . containsKey ( "Hit" ) ) { VX = ( - 9 ) * ( PPM ) ; break ; } else { VX = 9 * ( PPM ) ; } } } } } } if ( ( VY ) < 0 ) { for ( int i = 0 ; i >= ( - 3 ) ; i -- ) { if ( ( ( ( ( int ) ( ( ( Y ) // ( PPM ) ) // 64 ) ) + i ) > 0 ) && ( ( ( ( int ) ( ( ( Y ) // ( PPM ) ) // 64 ) ) + i ) < ( Col . getHeight ( ) ) ) ) { if ( Col . getCell ( ( ( int ) ( ( ( X ) // ( PPM ) ) // 64 ) ) , ( ( ( int ) ( ( ( Y ) // ( PPM ) ) // 64 ) ) + i ) ) . getTile ( ) . getProperties ( ) . containsKey ( "Hit" ) ) { VY = 0 ; for ( int j = 0 ; j <= 3 ; j ++ ) { if ( Col . getCell ( ( ( ( int ) ( ( ( X ) // ( PPM ) ) // 64 ) ) + j ) , ( ( int ) ( ( ( Y ) // ( PPM ) ) // 64 ) ) ) . getTile ( ) . getProperties ( ) . containsKey ( "Hit" ) ) { VX = ( - 9 ) * ( PPM ) ; break ; } else { VX = 9 * ( PPM ) ; } } } } } } X += VX ; Y += VY ; if ( ( CharVec . dst ( X , Y ) ) > 45 ) { if ( ( VX ) > 0 ) { X += 1 ; } if ( ( VX ) < 0 ) { X -= 1 ; } if ( ( VY ) > 0 ) { Y += 1 ; } if ( ( VY ) < 0 ) { Y -= 1 ; } } <START_BUG> if ( ( CharVec . dst ( X , Y ) ) <= 12 ) { <END_BUG> bDead = true ; } } public Sprite getSprite ( float time ) { } public Boolean getDead ( ) { } public float getX ( ) { } public float getY ( ) { } }

Fix:
if ( ( CharVec . dst ( X , Y ) ) <= 13.45 ) {
Buggy code:
public interface UnivariateDifferentiator { <START_BUG> UnivariateDifferential differentiate ( UnivariateFunction function ) ; <END_BUG> }

Fix:
UnivariateDifferentiable differentiate ( UnivariateFunction function ) ;
Buggy code:
public class DesktopLauncher { public static void main ( String [ ] arg ) { LwjglApplicationConfiguration config = new LwjglApplicationConfiguration ( ) ; config . width = 1920 ; config . height = 1080 ; <START_BUG> config . fullscreen = false ; <END_BUG> new com . badlogic . gdx . backends . lwjgl . LwjglApplication ( new KletterHoelle ( ) , config ) ; } }

Fix:
config . fullscreen = true ;
Buggy code:
public class ReefConnectionTestBase { private final boolean autoLogon ; protected final BrokerConnectionFactory factory = new org . totalgrid . reef . broker . qpid . QpidBrokerConnectionFactory ( getConnectionInfo ( ) ) ; protected final ExecutorService exe = Executors . newScheduledThreadPool ( 4 ) ; protected BrokerConnection broker ; protected Connection connection ; protected AllScadaService helpers ; protected ReefConnectionTestBase ( boolean autoLogon ) { } protected ReefConnectionTestBase ( ) { } private QpidBrokerConnectionInfo getConnectionInfo ( ) { Properties props = new Properties ( ) ; try { <START_BUG> FileInputStream fis = new FileInputStream ( "..//org.totalgrid.reef.amqp.cfg" ) ; <END_BUG> props . load ( fis ) ; fis . close ( ) ; } catch ( IOException e ) { throw new RuntimeException ( e ) ; } AMQPConnectionSettingImpl settings = new AMQPConnectionSettingImpl ( props ) ; return settings . asInfo ( ) ; } @ Before public void startBridge ( ) throws InterruptedException , ReefServiceException { } @ After public void stopBridge ( ) throws InterruptedException , ReefServiceException { } }

Fix:
FileInputStream fis = new FileInputStream ( "..//org.totalgrid.reef.test.cfg" ) ;
Buggy code:
public class AnnotationCopier { <START_BUG> public static void copyCompositeAnnotation ( DataStructure targetds , DataStructure sourceds ) { <END_BUG> if ( sourceds . hasPhysicalProperty ( ) ) { targetds . setAssociatePhysicalProperty ( sourceds . getPhysicalProperty ( ) ) ; } if ( sourceds . hasAssociatedPhysicalComponent ( ) ) { targetds . setAssociatedPhysicalModelComponent ( sourceds . getAssociatedPhysicalModelComponent ( ) ) ; } } public static void copyCompositeAnnotation ( SemSimTermLibrary lib , DataStructure targetds , DataStructure sourceds ) { } public static Set < MappableVariable > copyAllAnnotationsToMappedVariables ( MappableVariable ds ) { } public static Set < MappableVariable > getAllMappedVariables ( MappableVariable rootds , MappableVariable ds , Set < MappableVariable > runningset ) { } }

Fix:
public static void copyCompositeAnnotation ( DataStructure sourceds , DataStructure targetds ) {
Buggy code:
public final class SMSResultHandler extends ResultHandler { private static final int [ ] buttons = new int [ ] { string . button_sms , string . button_mms } ; public SMSResultHandler ( Activity activity , ParsedResult result ) { } @ Override public int getButtonCount ( ) { } @ Override public int getButtonText ( int index ) { } @ Override public void handleButtonPress ( int index ) { } @ Override public CharSequence getDisplayContents ( ) { SMSParsedResult smsResult = ( ( SMSParsedResult ) ( getResult ( ) ) ) ; <START_BUG> StringBuffer contents = new StringBuffer ( ) ; <END_BUG> String [ ] rawNumbers = smsResult . getNumbers ( ) ; String [ ] formattedNumbers = new String [ rawNumbers . length ] ; for ( int i = 0 ; i < ( rawNumbers . length ) ; i ++ ) { formattedNumbers [ i ] = PhoneNumberUtils . formatNumber ( rawNumbers [ i ] ) ; } ParsedResult . maybeAppend ( formattedNumbers , contents ) ; ParsedResult . maybeAppend ( smsResult . getSubject ( ) , contents ) ; ParsedResult . maybeAppend ( smsResult . getBody ( ) , contents ) ; return contents . toString ( ) ; } @ Override public int getDisplayTitle ( ) { } }

Fix:
StringBuffer contents = new StringBuffer ( 50 ) ;
Buggy code:
@ RunWith ( Arquillian . class ) @ RunAsClient public class MapBasedInitialContextEjbClientTestCase { private static final String ARCHIVE_NAME = "map-based-client-1" ; @ Deployment public static Archive < ? > getDeployment ( ) { } @ Test public void testScopedEJBClientContexts ( ) throws Exception { <START_BUG> InitialContext ctx = new InitialContext ( getEjbClientProperties ( System . getProperty ( "node0" , "127.0.0.1" ) , 4447 ) ) ; <END_BUG> try { String lookupName = ( ( ( ( "ejb://" + ( MapBasedInitialContextEjbClientTestCase . ARCHIVE_NAME ) ) + "//" ) + ( StatelessBean . class . getSimpleName ( ) ) ) + "!" ) + ( StatelessIface . class . getCanonicalName ( ) ) ; StatelessIface beanStateless = ( ( StatelessIface ) ( ctx . lookup ( lookupName ) ) ) ; Assert . assertEquals ( "Unexpected<seq2seq4repair_space>EJB<seq2seq4repair_space>client<seq2seq4repair_space>context<seq2seq4repair_space>used<seq2seq4repair_space>for<seq2seq4repair_space>invoking<seq2seq4repair_space>stateless<seq2seq4repair_space>bean" , USER_NAME , beanStateless . getCallerPrincipalName ( ) ) ; lookupName = ( ( ( ( ( "ejb://" + ( MapBasedInitialContextEjbClientTestCase . ARCHIVE_NAME ) ) + "//" ) + ( StatefulBean . class . getSimpleName ( ) ) ) + "!" ) + ( StatefulIface . class . getCanonicalName ( ) ) ) + "?stateful" ; StatefulIface beanStateful = ( ( StatefulIface ) ( ctx . lookup ( lookupName ) ) ) ; Assert . assertEquals ( "Unexpected<seq2seq4repair_space>EJB<seq2seq4repair_space>client<seq2seq4repair_space>context<seq2seq4repair_space>used<seq2seq4repair_space>for<seq2seq4repair_space>invoking<seq2seq4repair_space>stateful<seq2seq4repair_space>bean" , USER_NAME , beanStateful . getCallerPrincipalName ( ) ) ; ctx . close ( ) ; } finally { ctx . close ( ) ; } } private Properties getEjbClientProperties ( String node , int port ) { } }

Fix:
InitialContext ctx = new InitialContext ( getEjbClientProperties ( System . getProperty ( "node0" , "127.0.0.1" ) , 8080 ) ) ;
Buggy code:
public class MessageController extends JScrollPane implements HyperlinkListener , CharsetListener , IMessageController { private MailFrameMediator frameController ; private MouseListener listener ; private int active ; private JPanel panel ; private Rfc822MessageViewer messageViewer ; private URLObservable urlObservable ; private ColumbaPopupMenu menu ; private MessageController . URLMouseListener mouseListener ; public MessageController ( MailFrameMediator frameMediator ) { } public void clear ( ) { } public void hyperlinkUpdate ( HyperlinkEvent e ) { } public MailFrameMediator getFrameController ( ) { } public void charsetChanged ( CharsetEvent e ) { } public void showMessage ( IMailbox folder , Object uid ) throws Exception { } public void updateGUI ( ) throws Exception { } public Rfc822MessageViewer getMessageViewer ( ) { } public MailFolderCommandReference getAttachmentSelectionReference ( ) { } public void addURLObserver ( Observer observer ) { } public String getSelectedText ( ) { } protected void processPopup ( MouseEvent ev ) { } protected URL extractURL ( MouseEvent event ) { } private ColumbaURL extractMailToURL ( MouseEvent event ) { } class URLMouseListener implements MouseListener { public void mousePressed ( MouseEvent event ) { } public void mouseReleased ( MouseEvent event ) { } public void mouseEntered ( MouseEvent event ) { } public void mouseExited ( MouseEvent event ) { } public void mouseClicked ( MouseEvent event ) { if ( ! ( SwingUtilities . isLeftMouseButton ( event ) ) ) { return ; } URL url = extractURL ( event ) ; if ( url == null ) { return ; } getUrlObservable ( ) . setUrl ( new ColumbaURL ( url ) ) ; if ( url . getProtocol ( ) . equalsIgnoreCase ( "mailto" ) ) { ComposerController controller = new ComposerController ( ) ; new org . columba . core . gui . frame . DefaultContainer ( controller ) ; ComposerModel model = new ComposerModel ( ) ; model . setTo ( url . getFile ( ) ) ; controller . setComposerModel ( model ) ; controller . updateComponents ( true ) ; } else { try { Desktop . browse ( url ) ; } catch ( DesktopException e ) { <START_BUG> JOptionPane . showMessageDialog ( null , GlobalResourceLoader . getString ( "dialog" , "error" , "no_browser" ) , "Error" , JOptionPane . ERROR_MESSAGE ) ; <END_BUG> } } } } public URLObservable getUrlObservable ( ) { } public JPopupMenu getPopupMenu ( ) { } public void createPopupMenu ( ) { } public void addMouseListener ( JTextPane textPane ) { } }

Fix:
JOptionPane . showMessageDialog ( null , GlobalResourceLoader . getString ( "org.columba.core.i18n.dialog" , "error" , "no_browser" ) , "Error" , JOptionPane . ERROR_MESSAGE ) ;
Buggy code:
public abstract class AbstractContextLoader implements SmartContextLoader { private static final Log logger = LogFactory . getLog ( AbstractContextLoader . class ) ; private static final String [ ] EMPTY_STRING_ARRAY = new String [ ] { } ; private static final String SLASH = "//" ; public boolean generatesDefaults ( ) { } public void processContextConfiguration ( ContextConfigurationAttributes configAttributes ) { } public boolean supports ( MergedContextConfiguration mergedConfig ) { } public final String [ ] processLocations ( Class < ? > clazz , String ... locations ) { } protected String [ ] generateDefaultLocations ( Class < ? > clazz ) { Assert . notNull ( clazz , "Class<seq2seq4repair_space>must<seq2seq4repair_space>not<seq2seq4repair_space>be<seq2seq4repair_space>null" ) ; String suffix = getResourceSuffix ( ) ; Assert . hasText ( suffix , "Resource<seq2seq4repair_space>suffix<seq2seq4repair_space>must<seq2seq4repair_space>not<seq2seq4repair_space>be<seq2seq4repair_space>empty" ) ; String resourcePath = ( ( AbstractContextLoader . SLASH ) + ( ClassUtils . convertClassNameToResourcePath ( clazz . getName ( ) ) ) ) + suffix ; if ( ! ( new ClassPathResource ( resourcePath , clazz ) . exists ( ) ) ) { if ( AbstractContextLoader . logger . isInfoEnabled ( ) ) { <START_BUG> AbstractContextLoader . logger . info ( String . format ( ( "Cannot<seq2seq4repair_space>generate<seq2seq4repair_space>default<seq2seq4repair_space>resource<seq2seq4repair_space>locations<seq2seq4repair_space>for<seq2seq4repair_space>test<seq2seq4repair_space>class<seq2seq4repair_space>[%s]:<seq2seq4repair_space>" + "classpath<seq2seq4repair_space>resource<seq2seq4repair_space>[%s]<seq2seq4repair_space>does<seq2seq4repair_space>not<seq2seq4repair_space>exist." ) , clazz . getName ( ) , resourcePath ) ) ; <END_BUG> } return AbstractContextLoader . EMPTY_STRING_ARRAY ; } return new String [ ] { ( ResourceUtils . CLASSPATH_URL_PREFIX ) + resourcePath } ; } protected String [ ] modifyLocations ( Class < ? > clazz , String ... locations ) { } protected boolean isGenerateDefaultLocations ( ) { } protected abstract String getResourceSuffix ( ) { } }

Fix:
AbstractContextLoader . logger . info ( String . format ( ( "Could<seq2seq4repair_space>not<seq2seq4repair_space>detect<seq2seq4repair_space>default<seq2seq4repair_space>resource<seq2seq4repair_space>locations<seq2seq4repair_space>for<seq2seq4repair_space>test<seq2seq4repair_space>class<seq2seq4repair_space>[%s]:<seq2seq4repair_space>" + "classpath<seq2seq4repair_space>resource<seq2seq4repair_space>[%s]<seq2seq4repair_space>does<seq2seq4repair_space>not<seq2seq4repair_space>exist." ) , clazz . getName ( ) , resourcePath ) ) ;
Buggy code:
public class SearchAdapter extends RecyclerView . Adapter < SearchAdapter . ViewHolder > { private BlsTemplate [ ] mTemplate ; private int [ ] mIndexArr ; private static Context ctx ; public static class ViewHolder extends RecyclerView . ViewHolder implements View . OnClickListener { public TextView mTitleTextView ; public ImageView mIconImageView ; public TextView mShortDescriptionView ; public TextView mStepNumberView ; public CardView mSearchResultItem ; public SearchAdapter . ViewHolder . IMyViewHolderClick mListener ; public int templateIndex = - 1 ; private Context ctx ; public ViewHolder ( CardView v , Context ctx , SearchAdapter . ViewHolder . IMyViewHolderClick listener ) { } @ Override public void onClick ( View v ) { } public static interface IMyViewHolderClick { public void onResultItemClick ( CardView v , int id , Context ctx ) { } } } public SearchAdapter ( BlsTemplate [ ] myTemplate , int [ ] indexArr , Context ctx ) { } @ Override public SearchAdapter . ViewHolder onCreateViewHolder ( final ViewGroup parent , int viewType ) { View v = LayoutInflater . from ( parent . getContext ( ) ) . inflate ( SearchAdapter . ctx . getResources ( ) . getIdentifier ( "layout_search_result_item" , "layout" , SearchAdapter . ctx . getPackageName ( ) ) , parent , false ) ; SearchAdapter . ViewHolder vh = new SearchAdapter . ViewHolder ( ( ( CardView ) ( v ) ) , SearchAdapter . ctx , new SearchAdapter . ViewHolder . IMyViewHolderClick ( ) { @ Override public void onResultItemClick ( CardView v , int index , Context ctx ) { <START_BUG> ( ( MainActivity ) ( ctx ) ) . collapseSearchView ( ) ; <END_BUG> ( ( MainActivity ) ( ctx ) ) . hideKeyBoard ( parent ) ; ( ( MainActivity ) ( ctx ) ) . displayTemplate ( index ) ; } } ) ; return vh ; } @ Override public void onBindViewHolder ( SearchAdapter . ViewHolder holder , int position ) { } @ Override public int getItemCount ( ) { } No newline ; at end ; of file ; }

Fix:
( ( MainActivity ) ( ctx ) ) . onlyCollapse ( ) ;
Buggy code:
public class UnaryComparisonOperatorNode extends UnaryOperatorNode { public ValueNode bindExpression ( FromList fromList , SubqueryList subqueryList , Vector aggregateVector ) throws StandardException { <START_BUG> super . bindExpression ( fromList , subqueryList , aggregateVector ) ; <END_BUG> bindComparisonOperator ( ) ; return this ; } public void bindComparisonOperator ( ) throws StandardException { } ValueNode eliminateNots ( boolean underNotNode ) throws StandardException { } UnaryOperatorNode getNegation ( ValueNode operand ) throws StandardException { } public ColumnReference getColumnOperand ( Optimizable optTable , int columnPosition ) { } public ColumnReference getColumnOperand ( Optimizable optTable ) { } public ValueNode getOperand ( ColumnReference cRef , int refSetSize , boolean otherSide ) { } public boolean selfComparison ( ColumnReference cr ) { } public ValueNode getExpressionOperand ( int tableNumber , int columnNumber , FromTable ft ) { } public void generateExpressionOperand ( Optimizable optTable , int columnPosition , ExpressionClassBuilder acb , MethodBuilder mb ) throws StandardException { } public int getStartOperator ( Optimizable optTable ) { } public int getStopOperator ( Optimizable optTable ) { } public void generateOrderedNulls ( MethodBuilder mb ) { } public void generateQualMethod ( ExpressionClassBuilder acb , MethodBuilder mb , Optimizable optTable ) throws StandardException { } public void generateAbsoluteColumnId ( MethodBuilder mb , Optimizable optTable ) { } public void generateRelativeColumnId ( MethodBuilder mb , Optimizable optTable ) { } private int getAbsoluteColumnPosition ( Optimizable optTable ) { } public boolean orderedNulls ( ) { } public boolean isQualifier ( Optimizable optTable , boolean forPush ) { } public int getOrderableVariantType ( Optimizable optTable ) throws StandardException { } }

Fix:
bindOperand ( fromList , subqueryList , aggregateVector ) ;