nus-yam/ex-repair huggingface dataset:
Buggy code:
public class FlagsFilterTest extends AbstractFilterTestCase { public FlagsFilterTest ( MailboxTstFactory factory , String arg0 ) { } public void testIsSeen ( ) throws Exception { } public void testIsNotSeen ( ) throws Exception { } public void testIsExpunged ( ) throws Exception { Object uid = addMessage ( ) ; Flags flags = getSourceFolder ( ) . getFlags ( uid ) ; <START_BUG> flags . setExpunged ( true ) ; <END_BUG> FilterCriteria criteria = new FilterCriteria ( new XmlElement ( "criteria" ) ) ; criteria . setType ( "Flags" ) ; criteria . setCriteria ( "is" ) ; criteria . setPattern ( "Deleted" ) ; FlagsFilter filter = new FlagsFilter ( ) ; filter . setUp ( criteria ) ; boolean result = filter . process ( getSourceFolder ( ) , uid ) ; assertEquals ( "filter<seq2seq4repair_space>result" , true , result ) ; } public void testIsFlagged ( ) throws Exception { } public void testIsRecent ( ) throws Exception { } public void testIsSpam ( ) throws Exception { } }

Fix:
flags . setDeleted ( true ) ;
Buggy code:
public abstract class AbstractBrokerMessageHandler implements ApplicationEventPublisherAware , SmartLifecycle , MessageHandler { protected final Log logger = LogFactory . getLog ( getClass ( ) ) ; private Collection < String > destinationPrefixes ; private ApplicationEventPublisher eventPublisher ; private AtomicBoolean brokerAvailable = new AtomicBoolean ( false ) ; private boolean autoStartup = true ; private Object lifecycleMonitor = new Object ( ) ; private volatile boolean running = false ; public AbstractBrokerMessageHandler ( Collection < String > destinationPrefixes ) { } public Collection < String > getDestinationPrefixes ( ) { } @ Override public void setApplicationEventPublisher ( ApplicationEventPublisher publisher ) { } public ApplicationEventPublisher getApplicationEventPublisher ( ) { } public void setAutoStartup ( boolean autoStartup ) { } @ Override public boolean isAutoStartup ( ) { } @ Override public int getPhase ( ) { } @ Override public final boolean isRunning ( ) { } @ Override public final void start ( ) { } protected void startInternal ( ) { } @ Override public final void stop ( ) { } protected void stopInternal ( ) { } @ Override public final void stop ( Runnable callback ) { } @ Override public final void handleMessage ( Message < ? > message ) { if ( ! ( this . running ) ) { if ( logger . isTraceEnabled ( ) ) { logger . trace ( ( "STOMP<seq2seq4repair_space>broker<seq2seq4repair_space>relay<seq2seq4repair_space>not<seq2seq4repair_space>running.<seq2seq4repair_space>Ignoring<seq2seq4repair_space>message<seq2seq4repair_space>id=" + ( message . getHeaders ( ) . getId ( ) ) ) ) ; } return ; } if ( logger . isTraceEnabled ( ) ) { <START_BUG> logger . trace ( ( "Processing<seq2seq4repair_space>message:<seq2seq4repair_space>" + message ) ) ; <END_BUG> } handleMessageInternal ( message ) ; } protected abstract void handleMessageInternal ( Message < ? > message ) { } protected boolean checkDestinationPrefix ( String destination ) { } protected void publishBrokerAvailableEvent ( ) { } protected void publishBrokerUnavailableEvent ( ) { } }

Fix:
logger . trace ( ( "Message<seq2seq4repair_space>" + message ) ) ;
Buggy code:
public class CampModeNotification { public static final int NOTIFICATION_ID = 2 ; public static void showNotification ( Context context ) { NotificationManager mNotificationManager = ( ( NotificationManager ) ( context . getSystemService ( NOTIFICATION_SERVICE ) ) ) ; Notification . Builder mBuilder = new Notification . Builder ( context ) . setSmallIcon ( ic_fan ) . setContentTitle ( "Camp<seq2seq4repair_space>mode<seq2seq4repair_space>on" ) ; PendingIntent contentIntent = PendingIntent . getActivity ( context , 0 , new Intent ( context , MyActivity . class ) , 0 ) ; <START_BUG> Intent acIntent = new Intent ( context , StartAC . class ) ; <END_BUG> PendingIntent pendingIntentAC = PendingIntent . getBroadcast ( context , 0 , acIntent , FLAG_UPDATE_CURRENT ) ; mBuilder . addAction ( ic_fan , "Stop<seq2seq4repair_space>camp<seq2seq4repair_space>mode" , pendingIntentAC ) ; mBuilder . setContentIntent ( contentIntent ) ; mBuilder . setOngoing ( true ) ; mNotificationManager . notify ( CampModeNotification . NOTIFICATION_ID , mBuilder . build ( ) ) ; } public static void hideNotification ( Context context ) { } }

Fix:
Intent acIntent = new Intent ( context , StopCampMode . class ) ;
Buggy code:
public class RtpChannelTransformEngine extends TransformEngineChain { private static final byte RED_PAYLOAD_TYPE = 116 ; private static final String DISABLE_NACK_TERMINATION_PNAME = "org.jitsi.videobridge.DISABLE_NACK_TERMINATION" ; private static final Logger logger = Logger . getLogger ( RtpChannelTransformEngine . class ) ; private final RtpChannel channel ; private REDFilterTransformEngine redFilter ; private CachingTransformer cache ; private RTCPTransformEngine rtcpTransformEngine ; private NACKNotifier nackNotifier ; private AbsSendTimeEngine absSendTime ; public RtpChannelTransformEngine ( RtpChannel channel ) { } private TransformEngine [ ] createChain ( ) { List < TransformEngine > transformerList = new LinkedList < TransformEngine > ( ) ; redFilter = new REDFilterTransformEngine ( RtpChannelTransformEngine . RED_PAYLOAD_TYPE ) ; transformerList . add ( redFilter ) ; absSendTime = new AbsSendTimeEngine ( ) ; transformerList . add ( absSendTime ) ; boolean enableNackTermination = true ; Conference conference = channel . getContent ( ) . getConference ( ) ; if ( conference != null ) { ConfigurationService cfg = conference . getVideobridge ( ) . getConfigurationService ( ) ; if ( cfg != null ) <START_BUG> enableNackTermination = cfg . getBoolean ( RtpChannelTransformEngine . DISABLE_NACK_TERMINATION_PNAME , false ) ; <END_BUG> } if ( enableNackTermination && ( ( channel ) instanceof NACKHandler ) ) { cache = new CachingTransformer ( ) ; transformerList . add ( cache ) ; nackNotifier = new NACKNotifier ( ( ( NACKHandler ) ( channel ) ) ) ; rtcpTransformEngine = new RTCPTransformEngine ( new Transformer [ ] { nackNotifier } ) ; transformerList . add ( rtcpTransformEngine ) ; } return transformerList . toArray ( new TransformEngine [ transformerList . size ( ) ] ) ; } public void enableAbsSendTime ( int extensionID ) { } public void enableREDFilter ( boolean enabled ) { } public RawPacketCache getCache ( ) { } }

Fix:
enableNackTermination = ! ( cfg . getBoolean ( RtpChannelTransformEngine . DISABLE_NACK_TERMINATION_PNAME , false ) ) ;
Buggy code:
public class SessionManagerAdapterFactory implements SessionManagerFactory { private final org . wildfly . clustering . web . session . SessionManagerFactory factory ; public SessionManagerAdapterFactory ( org . wildfly . clustering . web . session . SessionManagerFactory factory ) { } @ Override public SessionManager createSessionManager ( Deployment deployment ) { SessionContext context = new SessionContextAdapter ( deployment ) ; SessionIdentifierFactory factory = new SessionIdentifierFactoryAdapter ( new SecureRandomSessionIdGenerator ( ) ) ; <START_BUG> SessionManager < Void > manager = this . factory . createSessionManager ( context , factory , null ) ; <END_BUG> return new SessionManagerAdapter ( manager ) ; } }

Fix:
SessionManager < LocalSessionContext > manager = this . factory . createSessionManager ( context , factory , new LocalSessionContextFactory ( ) ) ;
Buggy code:
public class Properties implements Initializable { private static final Logger logger = LoggerFactory . getLogger ( Properties . class ) ; @ FXML private ListView < Label > sharedListView ; @ FXML private Button okButton ; private PathItem item ; public Properties ( PathItem item ) { } @ Override public void initialize ( URL arg0 , ResourceBundle arg1 ) { Properties . logger . debug ( "Initialize<seq2seq4repair_space>Properties!" ) ; if ( ( ( item ) != null ) && ( ( item . getUserPermissions ( ) ) != null ) ) { for ( UserPermission perm : item . getUserPermissions ( ) ) { StringBuilder sb = new StringBuilder ( ) ; sb . append ( perm . getUserId ( ) ) ; PermissionType type = perm . getPermission ( ) ; if ( type == ( PermissionType . READ ) ) { sb . append ( "<seq2seq4repair_space>(Read)" ) ; } else { sb . append ( "<seq2seq4repair_space>(Read<seq2seq4repair_space>+<seq2seq4repair_space>Write)" ) ; } <START_BUG> ImageView icon = SynchronizationUtils . getFileInProgressIcon ( ) ; <END_BUG> Label label = new Label ( sb . toString ( ) ) ; label . setGraphic ( icon ) ; sharedListView . getItems ( ) . add ( label ) ; } } } @ FXML public void okAction ( ActionEvent event ) { } }

Fix:
ImageView icon = SynchronizationUtils . getSharedFolderIcon ( ) ;
Buggy code:
@ SuppressWarnings ( "serial" ) public abstract class AbstractMethodArgumentResolutionException extends MessagingException { private final MethodParameter parameter ; protected AbstractMethodArgumentResolutionException ( Message < ? > message , MethodParameter parameter ) { } protected AbstractMethodArgumentResolutionException ( Message < ? > message , MethodParameter parameter , String description ) { } public MethodParameter getMethodParameter ( ) { } protected static String getMethodParamMessage ( MethodParameter param ) { <START_BUG> return new StringBuilder ( "Could<seq2seq4repair_space>not<seq2seq4repair_space>resolve<seq2seq4repair_space>method<seq2seq4repair_space>parameter<seq2seq4repair_space>at<seq2seq4repair_space>index<seq2seq4repair_space>" ) . append ( param . getParameterIndex ( ) ) . append ( "<seq2seq4repair_space>in<seq2seq4repair_space>method:<seq2seq4repair_space>" ) . append ( param . getMethod ( ) . toGenericString ( ) ) . toString ( ) ; <END_BUG> } }

Fix:
return new StringBuilder ( "Could<seq2seq4repair_space>not<seq2seq4repair_space>resolve<seq2seq4repair_space>method<seq2seq4repair_space>parameter<seq2seq4repair_space>at<seq2seq4repair_space>index<seq2seq4repair_space>" ) . append ( param . getParameterIndex ( ) ) . append ( "<seq2seq4repair_space>in<seq2seq4repair_space>method:<seq2seq4repair_space>" ) . append ( param . getMethod ( ) . toGenericString ( ) ) . append ( "<seq2seq4repair_space>" ) . toString ( ) ;
Buggy code:
public class MyWidgetUpdateService extends IntentService { private static final String SERVICE_NAME = MyWidgetUpdateService . class . getSimpleName ( ) ; public MyWidgetUpdateService ( ) { } public MyWidgetUpdateService ( String name ) { } @ Override protected void onHandleIntent ( Intent intent ) { String [ ] mySelectionArguments = new String [ 1 ] ; Date now = new Date ( System . currentTimeMillis ( ) ) ; SimpleDateFormat mySimpleDateFormat = new SimpleDateFormat ( "yyyy-MM-dd" , Locale . US ) ; mySelectionArguments [ 0 ] = mySimpleDateFormat . format ( now ) ; Cursor myDataCursor = getContentResolver ( ) . query ( scores_table . buildScoreWithDate ( ) , null , ( ( scores_table . MATCH_DAY ) + "=<seq2seq4repair_space>?" ) , mySelectionArguments , ( ( scores_table . MATCH_ID ) + "<seq2seq4repair_space>DESC" ) ) ; <START_BUG> if ( ( myDataCursor != null ) && ( ( myDataCursor . getCount ( ) ) > 0 ) ) { <END_BUG> Log . i ( MyWidgetUpdateService . SERVICE_NAME , "Data<seq2seq4repair_space>retrieved." ) ; ScoresEntry myDbEntry = new ScoresEntry ( ) ; myDbEntry . setId ( myDataCursor . getInt ( myDataCursor . getColumnIndex ( MATCH_ID ) ) ) ; myDbEntry . setHomeGoals ( myDataCursor . getInt ( myDataCursor . getColumnIndex ( HOME_GOALS_COL ) ) ) ; myDbEntry . setAwayGoals ( myDataCursor . getInt ( myDataCursor . getColumnIndex ( AWAY_GOALS_COL ) ) ) ; myDbEntry . setMatchDay ( myDataCursor . getInt ( myDataCursor . getColumnIndex ( MATCH_DAY ) ) ) ; myDbEntry . setLeague ( myDataCursor . getString ( myDataCursor . getColumnIndex ( LEAGUE_COL ) ) ) ; myDbEntry . setDate ( myDataCursor . getString ( myDataCursor . getColumnIndex ( DATE_COL ) ) ) ; myDbEntry . setTime ( myDataCursor . getString ( myDataCursor . getColumnIndex ( TIME_COL ) ) ) ; myDbEntry . setHomeTeam ( myDataCursor . getString ( myDataCursor . getColumnIndex ( HOME_COL ) ) ) ; myDbEntry . setAwayTeam ( myDataCursor . getString ( myDataCursor . getColumnIndex ( AWAY_COL ) ) ) ; Intent myWidgetDataIntent = new Intent ( MainActivity . ACTION_DATA_UPDATED ) ; myWidgetDataIntent . putExtra ( EXTRA_DBDATA , myDbEntry ) ; sendBroadcast ( myWidgetDataIntent ) ; } else { Log . w ( MyWidgetUpdateService . SERVICE_NAME , "There<seq2seq4repair_space>are<seq2seq4repair_space>not<seq2seq4repair_space>results<seq2seq4repair_space>in<seq2seq4repair_space>the<seq2seq4repair_space>cursor." ) ; } } }

Fix:
if ( ( ( myDataCursor != null ) && ( ( myDataCursor . getCount ( ) ) > 0 ) ) && ( myDataCursor . moveToFirst ( ) ) ) {
Buggy code:
public class Preferences extends PreferenceActivity { private static Context c ; @ SuppressLint ( "NewApi" ) @ SuppressWarnings ( "deprecation" ) @ Override protected void onCreate ( Bundle savedInstanceState ) { super . onCreate ( savedInstanceState ) ; addPreferencesFromResource ( preferences ) ; Preferences . c = this ; setBuildInfo ( ) ; setLanguage ( ) ; checkPreferences ( ) ; <START_BUG> Utils . setupActionBar ( this ) ; <END_BUG> } @ Override public boolean onOptionsItemSelected ( MenuItem item ) { } @ SuppressWarnings ( "deprecation" ) private void setBuildInfo ( ) { } @ SuppressWarnings ( "deprecation" ) private void setLanguage ( ) { } @ SuppressWarnings ( "deprecation" ) private void checkPreferences ( ) { } }

Fix:
Utils . setupActionBarPrefs ( this ) ;
Buggy code:
public abstract class WeaponList { public static HashMap < String , Weapon > list = new HashMap < String , Weapon > ( ) ; public static void add ( String name , Weapon w ) { } public static Weapon get ( String name ) { <START_BUG> return WeaponList . list . get ( name ) ; <END_BUG> } No newline ; at end ; of file ; }

Fix:
return WeaponList . list . get ( name ) . getCopy ( ) ;
Buggy code:
public class GameController { public static final int WALL_LAYER = 5 ; private final RetroMachines game ; private GameScreen gameScreen ; private RetroMan retroMan ; private TiledMap map ; private EvaluationController evaControl ; private Date levelBegin ; private float tempStepCounter ; public GameController ( RetroMachines game ) { } public void startLevel ( int levelId ) { } public void abortLevel ( ) { } public void levelFinished ( ) { } private void dispose ( ) { } private void saveProgress ( ) { } public void jumpRetroMan ( ) { } public void interactRetroMan ( ) { } public void goLeftRetroMan ( ) { } public void goRightRetroMan ( ) { } public RetroMan getRetroMan ( ) { } public GameElement getGameElement ( Vector2 posObj ) { } public LinkedList < GameElement > checkDepotPositions ( ) { } public boolean setGameElement ( Vector2 posObj , GameElement element ) { } private GameElement standsBesideGameElement ( ) { } public void update ( float deltaTime ) { retroMan . getVelocity ( ) . add ( 0 , WORLD_GRAVITY ) ; if ( ( Math . abs ( retroMan . getVelocity ( ) . y ) ) > ( RetroMan . MAX_VELOCITY_Y ) ) { retroMan . getVelocity ( ) . y = ( Math . signum ( retroMan . getVelocity ( ) . y ) ) * ( RetroMan . MAX_VELOCITY_Y ) ; } <START_BUG> if ( ( Math . abs ( retroMan . getVelocity ( ) . x ) ) < ( RetroMan . MIN_VELOCITY_X ) ) { <END_BUG> retroMan . getVelocity ( ) . x = 0 ; retroMan . standing ( ) ; } float previousPosition = retroMan . getPos ( ) . x ; retroMan . getVelocity ( ) . scl ( deltaTime ) ; collisionDetection ( ) ; retroMan . getPos ( ) . add ( retroMan . getVelocity ( ) ) ; retroMan . getVelocity ( ) . scl ( ( 1 // deltaTime ) ) ; tempStepCounter += ( retroMan . getPos ( ) . x ) - previousPosition ; retroMan . getVelocity ( ) . x *= Constants . DAMPING ; } private void collisionDetection ( ) { } private Array < Rectangle > getTiles ( int startX , int startY , int endX , int endY , int layerId ) { } public void evaluationClicked ( ) { } private boolean checkPlacementofElements ( ) { } private LambdaUtil createLambdaUtil ( ) { } private void checkEvaluationResult ( ) { } public void doorTestMethod ( ) { } }

Fix:
if ( ( ( Math . abs ( retroMan . getVelocity ( ) . x ) ) < ( RetroMan . MIN_VELOCITY_X ) ) && ( retroMan . canJump ( ) ) ) {
Buggy code:
public class WebResponseWithCryptedUrl extends WebResponse { private static Log log = LogFactory . getLog ( WebResponseWithCryptedUrl . class ) ; public WebResponseWithCryptedUrl ( final HttpServletResponse httpServletResponse ) { } public CharSequence encodeURL ( CharSequence url ) { ICrypt urlCrypt = Application . get ( ) . getSecuritySettings ( ) . getCryptFactory ( ) . newCrypt ( ) ; if ( urlCrypt != null ) { final int pos = url . toString ( ) . indexOf ( '?' ) ; if ( pos > 0 ) { CharSequence urlPrefix = url . subSequence ( 0 , pos ) ; String queryString = url . subSequence ( ( pos + 1 ) , url . length ( ) ) . toString ( ) ; if ( ! ( queryString . startsWith ( "x=" ) ) ) { queryString = shortenUrl ( queryString ) . toString ( ) ; <START_BUG> final String encryptedQueryString = urlCrypt . encrypt ( queryString ) ; <END_BUG> return new AppendingStringBuffer ( urlPrefix ) . append ( "?x=" ) . append ( escapeUrl ( encryptedQueryString ) ) ; } } } return url ; } private CharSequence escapeUrl ( String queryString ) { } private CharSequence shortenUrl ( CharSequence queryString ) { } }

Fix:
final String encryptedQueryString = urlCrypt . encryptUrlSafe ( queryString ) ;
Buggy code:
public class Day { static final int numberOfSlots = 28 ; Calendar calendar ; int dayNumber ; ArrayList < HomeWorkSession > sessions ; Assignment assignment ; public Day ( int dayNumber , Calendar calendar ) { } public void setScheduledTime ( int startPosition , int endPosition ) { } public int getNumberOfSlots ( ) { } public String addSessionAtTime ( int position , HomeWorkSession session ) { <START_BUG> if ( ( this . getDayNumber ( ) ) > ( session . getAssignment ( ) . getDeadlineDayNumber ( ) ) ) { <END_BUG> return "(FIX<seq2seq4repair_space>THIS)<seq2seq4repair_space>Schemalägg<seq2seq4repair_space>inte<seq2seq4repair_space>efter<seq2seq4repair_space>deadline." ; } else if ( ( sessions . get ( position ) . getAssignment ( ) ) != null ) { return "(FIX<seq2seq4repair_space>THIS)<seq2seq4repair_space>Du<seq2seq4repair_space>går<seq2seq4repair_space>i<seq2seq4repair_space>skolan<seq2seq4repair_space>denna<seq2seq4repair_space>tid." ; } else if ( position == 0 ) { return "(FIX<seq2seq4repair_space>THIS)<seq2seq4repair_space>Du<seq2seq4repair_space>måste<seq2seq4repair_space>hinna<seq2seq4repair_space>äta<seq2seq4repair_space>frukost<seq2seq4repair_space>denna<seq2seq4repair_space>tid." ; } else if ( position == ( ( Day . numberOfSlots ) - 1 ) ) { return "(FIX<seq2seq4repair_space>THIS)<seq2seq4repair_space>Du<seq2seq4repair_space>borde<seq2seq4repair_space>gå<seq2seq4repair_space>och<seq2seq4repair_space>lägga<seq2seq4repair_space>dig<seq2seq4repair_space>vid<seq2seq4repair_space>denna<seq2seq4repair_space>tid..." ; } else { sessions . set ( position , session ) ; return "Schemalagt!" ; } } public void removeSessionAtTime ( int position ) { } public void setAssignment ( Assignment assignment ) { } public Assignment getAssignment ( ) { } public int getDayNumber ( ) { } public int getDay ( ) { } public String getDayText ( ) { } public int getMonth ( ) { } public String getMonthText ( ) { } public ArrayList < HomeWorkSession > getSessions ( ) { } }

Fix:
if ( ( this . getDayNumber ( ) ) >= ( session . getAssignment ( ) . getDeadlineDayNumber ( ) ) ) {
Buggy code:
public class SpamControl extends ListenerAdapter { private ArrayList < String > bannablePhrases = new ArrayList < > ( ) ; private HashMap < String , Date > permittedUsers = new HashMap < > ( ) ; public SpamControl ( ) { } @ Override public void onMessage ( MessageEvent message ) { String currentMessage = message . getMessage ( ) ; String [ ] messageArray = message . getMessage ( ) . split ( "<seq2seq4repair_space>" ) ; if ( messageArray [ 0 ] . equals ( "!permit" ) ) { if ( ( messageArray . length ) == 2 ) { if ( message . getChannel ( ) . getOps ( ) . contains ( message . getUser ( ) ) ) { <START_BUG> message . respond ( permitUser ( messageArray [ 1 ] ) . toLowerCase ( ) ) ; <END_BUG> } } } if ( ! ( message . getChannel ( ) . getOps ( ) . contains ( message . getUser ( ) ) ) ) { for ( String test : bannablePhrases ) { if ( currentMessage . contains ( test ) ) { System . out . println ( message . getUser ( ) . getNick ( ) ) ; if ( ( ! ( permittedUsers . containsKey ( message . getUser ( ) . getNick ( ) ) ) ) || ( permittedUsers . get ( message . getUser ( ) . getNick ( ) ) . before ( new Date ( System . currentTimeMillis ( ) ) ) ) ) { purge ( message ) ; break ; } } } } } private void purge ( MessageEvent spamMessage ) { } private ArrayList < String > populatePhrases ( ) { } private String permitUser ( String user ) { } No newline ; at end ; of file ; }

Fix:
message . respond ( permitUser ( messageArray [ 1 ] . toLowerCase ( ) ) ) ;
Buggy code:
public class RawTypeBinding extends ParameterizedTypeBinding { public RawTypeBinding ( ReferenceBinding type , ReferenceBinding enclosingType , LookupEnvironment environment ) { } public char [ ] computeUniqueKey ( boolean isLeaf ) { } public ParameterizedMethodBinding createParameterizedMethod ( MethodBinding originalMethod ) { } public int kind ( ) { } public String debugName ( ) { } public char [ ] genericTypeSignature ( ) { } public boolean isEquivalentTo ( TypeBinding otherType ) { } public boolean isProvablyDistinct ( TypeBinding otherType ) { } public boolean isParameterizedType ( ) { } public boolean isRawType ( ) { } protected void initializeArguments ( ) { TypeVariableBinding [ ] typeVariables = genericType ( ) . typeVariables ( ) ; int length = typeVariables . length ; TypeBinding [ ] typeArguments = new TypeBinding [ length ] ; for ( int i = 0 ; i < length ; i ++ ) { <START_BUG> typeArguments [ i ] = this . environment . convertToRawType ( typeVariables [ i ] . erasure ( ) ) ; <END_BUG> } this . arguments = typeArguments ; } public char [ ] readableName ( ) { } public char [ ] shortReadableName ( ) { } }

Fix:
typeArguments [ i ] = this . environment . convertToRawType ( typeVariables [ i ] . erasure ( ) , false ) ;
Buggy code:
public class NavigationActivity extends Activity implements NavigationDrawerFragment . NavigationDrawerCallbacks { private static final String TAG = NavigationActivity . class . getSimpleName ( ) ; private NavigationDrawerFragment mNavigationDrawerFragment ; @ Override protected void onCreate ( Bundle savedInstanceState ) { } @ Override public void onNavigationDrawerItemSelected ( int position ) { Fragment objFragment = null ; String title = null ; switch ( position ) { case 0 : objFragment = new NowFragment ( ) ; title = getString ( title_now_section ) ; break ; case 1 : objFragment = new DayFragment ( ) ; title = getString ( title_day_section ) ; break ; <START_BUG> case 3 : <END_BUG> objFragment = new NowFragment ( ) ; title = getString ( title_website_section ) ; break ; default : Log . e ( NavigationActivity . TAG , "Invalid<seq2seq4repair_space>navigation<seq2seq4repair_space>drawer<seq2seq4repair_space>item<seq2seq4repair_space>selected" ) ; break ; } FragmentManager fragmentManager = getFragmentManager ( ) ; fragmentManager . beginTransaction ( ) . replace ( container , objFragment ) . commit ( ) ; getActionBar ( ) . setTitle ( title ) ; } }

Fix:
case 2 :
Buggy code:
public class MockWebApplication extends WebApplication { private static final long serialVersionUID = 8409647488957949834L ; private final MockServletContext context ; private Page lastRenderedPage ; private final MockHttpServletRequest servletRequest ; private final MockHttpServletResponse servletResponse ; private final MockHttpSession servletSession ; private final ApplicationSettings settings ; private WebRequest wicketRequest ; private WebResponse wicketResponse ; private WebSession wicketSession ; public MockWebApplication ( final String path ) { } public Page getLastRenderedPage ( ) { } public ServletContext getServletContext ( ) { } public MockHttpServletRequest getServletRequest ( ) { } public MockHttpServletResponse getServletResponse ( ) { } public MockHttpSession getServletSession ( ) { } public ApplicationSettings getSettings ( ) { } public WebRequest getWicketRequest ( ) { } public WebResponse getWicketResponse ( ) { } public WebSession getWicketSession ( ) { } public void processRequestCycle ( ) throws ServletException { WebRequestCycle cycle = new WebRequestCycle ( this , wicketSession , wicketRequest , wicketResponse ) ; cycle . request ( ) ; <START_BUG> lastRenderedPage = cycle . getPage ( ) ; <END_BUG> } public WebRequestCycle createRequestCycle ( ) { } public void setupRequestAndResponse ( ) throws IOException { } }

Fix:
lastRenderedPage = cycle . getResponsePage ( ) ;
Buggy code:
public class TextBuddy { private static final String MESSAGE_WELCOME = "\nWelcome<seq2seq4repair_space>to<seq2seq4repair_space>TextBuddy.<seq2seq4repair_space>%1$s<seq2seq4repair_space>is<seq2seq4repair_space>ready<seq2seq4repair_space>for<seq2seq4repair_space>use\n" ; private static final String MESSAGE_ADDED = "\nadded<seq2seq4repair_space>to<seq2seq4repair_space>%1$s<seq2seq4repair_space>:<seq2seq4repair_space>\"%2$s\"\n" ; private static final String MESSAGE_DELETED = "\ndeleted<seq2seq4repair_space>from<seq2seq4repair_space>%1$s<seq2seq4repair_space>:<seq2seq4repair_space>\"%2$s\"\n" ; private static final String MESSAGE_CLEARED = "\nall<seq2seq4repair_space>content<seq2seq4repair_space>deleted<seq2seq4repair_space>from<seq2seq4repair_space>%1s\n" ; private static final String MESSAGE_SORTED = "\n%1$s<seq2seq4repair_space>is<seq2seq4repair_space>sorted\n" ; private static String fileName = "mytextfile.txt" ; enum COMMAND_TYPE { ADD_TEXT , DELETE_TEXT , DISPLAY_TEXT , CLEAR_TEXT , SORT_TEXT , SEARCH_TEXT , INVALID , EXIT ; } private static Scanner scanner = new Scanner ( System . in ) ; private static boolean fileStatus = false ; public static void main ( String [ ] args ) { } private static void showToUser ( String text ) { } public static String checkFileExist ( ) { } public static String executeCommand ( String userCommand ) { } private static TextBuddy . COMMAND_TYPE determineCommandType ( String commandTypeString ) { } private static String clearFile ( boolean fileStatus ) { } private static void displayFile ( ) { } private static String deleteText ( String userText ) { } private static String addText ( String userText ) { } private static String sortFile ( ) { } private static void searchFile ( String userText ) { Scanner sc = null ; TextBuddy . showToUser ( ( ( "Search<seq2seq4repair_space>results<seq2seq4repair_space>for<seq2seq4repair_space>'" + userText ) + "'<seq2seq4repair_space>:" ) ) ; String content = null ; String trimmedContent = null ; int line = 0 ; boolean empty = true ; boolean isFound = false ; try { sc = new Scanner ( new FileReader ( TextBuddy . fileName ) ) ; while ( sc . hasNextLine ( ) ) { empty = false ; content = sc . nextLine ( ) ; trimmedContent = content . substring ( ( ( content . indexOf ( '<seq2seq4repair_space>' ) ) + 1 ) ) ; <START_BUG> if ( trimmedContent . matches ( userText ) ) { <END_BUG> TextBuddy . showToUser ( "" ) ; TextBuddy . showToUser ( ( ( ( line + 1 ) + ":<seq2seq4repair_space>" ) + trimmedContent ) ) ; line ++ ; isFound = true ; } } if ( empty ) { TextBuddy . showToUser ( "" ) ; TextBuddy . showToUser ( ( ( TextBuddy . fileName ) + "<seq2seq4repair_space>is<seq2seq4repair_space>empty" ) ) ; } if ( ! isFound ) { TextBuddy . showToUser ( "" ) ; TextBuddy . showToUser ( "No<seq2seq4repair_space>results<seq2seq4repair_space>found." ) ; } } catch ( IOException e ) { e . printStackTrace ( ) ; } finally { if ( sc != null ) { sc . close ( ) ; } } } }

Fix:
if ( trimmedContent . contains ( userText ) ) {
Buggy code:
public class ZCompressorInputStream extends LZWInputStream { private static final int MAGIC_1 = 31 ; private static final int MAGIC_2 = 157 ; private static final int BLOCK_MODE_MASK = 128 ; private static final int MAX_CODE_SIZE_MASK = 31 ; private final boolean blockMode ; private final int maxCodeSize ; private long totalCodesRead = 0 ; public ZCompressorInputStream ( InputStream inputStream ) throws IOException { } private void clearEntries ( ) { } @ Override protected int readNextCode ( ) throws IOException { } private void reAlignReading ( ) throws IOException { } @ Override protected int addEntry ( int previousCode , byte character ) throws IOException { } @ Override protected int decompressNextSymbol ( ) throws IOException { final int code = readNextCode ( ) ; if ( code < 0 ) { return - 1 ; } else if ( ( blockMode ) && ( code == ( clearCode ) ) ) { clearEntries ( ) ; reAlignReading ( ) ; codeSize = 9 ; previousCode = - 1 ; return 0 ; } else { boolean addedUnfinishedEntry = false ; if ( code == ( tableSize ) ) { addRepeatOfPreviousCode ( ) ; addedUnfinishedEntry = true ; } else if ( code > ( tableSize ) ) { <START_BUG> throw new IOException ( String . format ( "Invalid<seq2seq4repair_space>%d<seq2seq4repair_space>bit<seq2seq4repair_space>code<seq2seq4repair_space>0x%x" , Integer . valueOf ( codeSize ) , Integer . valueOf ( code ) ) ) ; <END_BUG> } return expandCodeToOutputStack ( code , addedUnfinishedEntry ) ; } } public static boolean matches ( byte [ ] signature , int length ) { } }

Fix:
throw new IOException ( String . format ( "Invalid<seq2seq4repair_space>%d<seq2seq4repair_space>bit<seq2seq4repair_space>code<seq2seq4repair_space>0x%x" , codeSize , code ) ) ;
Buggy code:
public class LocalizedFormatsTest { @ Test public void testMessageNumber ( ) { <START_BUG> Assert . assertEquals ( 311 , LocalizedFormats . values ( ) . length ) ; <END_BUG> } @ Test public void testAllKeysPresentInPropertiesFiles ( ) { } @ Test public void testAllPropertiesCorrespondToKeys ( ) { } @ Test public void testNoMissingFrenchTranslation ( ) { } @ Test public void testNoOpEnglishTranslation ( ) { } @ Test public void testVariablePartsConsistency ( ) { } }

Fix:
Assert . assertEquals ( 312 , LocalizedFormats . values ( ) . length ) ;
Buggy code:
public class TeacherDetailFragment extends LoadingFragment implements LoaderManager . LoaderCallbacks < TeacherDetailFragment . LoaderResultHolder > { private static final int LOADER_TEACHER = 1 ; private static final int LOADER_BITMAP = 16 ; public static final String ARGUMENT_TEACHER_ID = "pt.isel.cc.thoth.ui.TeacherDetailFragment.ID" ; public static final String ARGUMENT_TEACHER_BITMAP_URL = "pt.isel.cc.thoth.ui.TeacherDetailFragment.BITMAP_URL" ; private Teacher teacher ; private ImageView avatar ; private TextView teacherName ; private TextView teacherEmail ; public static TeacherDetailFragment newInstance ( Long teacherId ) { } @ Override public void onCreate ( Bundle savedInstanceState ) { } @ Override public View onCreateContentView ( LayoutInflater inflater , @ Nullable ViewGroup container , @ Nullable Bundle savedInstanceState ) { } @ Override public void onActivityCreated ( @ Nullable Bundle savedInstanceState ) { super . onActivityCreated ( savedInstanceState ) ; avatar = ( ( ImageView ) ( getContentContainer ( ) . findViewById ( teacher_avatar ) ) ) ; teacherName = ( ( TextView ) ( getContentContainer ( ) . findViewById ( teacher_name ) ) ) ; teacherEmail = ( ( TextView ) ( getContentContainer ( ) . findViewById ( teacher_email ) ) ) ; <START_BUG> getLoaderManager ( ) . initLoader ( TeacherDetailFragment . LOADER_TEACHER , getArguments ( ) , this ) ; <END_BUG> } @ Override public void onCreateOptionsMenu ( Menu menu , MenuInflater inflater ) { } @ Override public boolean onOptionsItemSelected ( MenuItem item ) { } @ Override public Loader < TeacherDetailFragment . LoaderResultHolder > onCreateLoader ( int i , Bundle bundle ) { } @ Override public void onLoadFinished ( Loader < TeacherDetailFragment . LoaderResultHolder > teacherLoader , TeacherDetailFragment . LoaderResultHolder resultHolder ) { } @ Override public void onLoaderReset ( Loader < TeacherDetailFragment . LoaderResultHolder > loaderResultHolderLoader ) { } public static class LoaderResultHolder { public Teacher teacher ; public Bitmap bitmap ; } }

Fix:
getLoaderManager ( ) . restartLoader ( TeacherDetailFragment . LOADER_TEACHER , getArguments ( ) , this ) ;
Buggy code:
public class StandaloneServer extends AbstractServer { private static final String STANDALONE_XML = "standalone.xml" ; private final StandardElementReaderRegistrar extensionRegistrar ; protected StandaloneServer ( ServerEnvironment environment ) { } public void start ( ) throws ServerStartException { } Callback createListenerCallback ( ) { return new ServerStartupListener . Callback ( ) { public void run ( Map < ServiceName , StartException > serviceFailures , long elapsedTime , int totalServices , int onDemandServices , int startedServices ) { if ( serviceFailures . isEmpty ( ) ) { <START_BUG> log . infof ( "JBoss<seq2seq4repair_space>AS<seq2seq4repair_space>started<seq2seq4repair_space>-<seq2seq4repair_space>Installed<seq2seq4repair_space>%d<seq2seq4repair_space>and<seq2seq4repair_space>started<seq2seq4repair_space>%d<seq2seq4repair_space>services<seq2seq4repair_space>in<seq2seq4repair_space>%dms." , totalServices , startedServices , elapsedTime ) ; <END_BUG> } else { final StringBuilder buff = new StringBuilder ( String . format ( "JBoss<seq2seq4repair_space>AS<seq2seq4repair_space>server<seq2seq4repair_space>start<seq2seq4repair_space>failed.<seq2seq4repair_space>Attempted<seq2seq4repair_space>to<seq2seq4repair_space>start<seq2seq4repair_space>%d<seq2seq4repair_space>services<seq2seq4repair_space>in<seq2seq4repair_space>%dms" , totalServices , elapsedTime ) ) ; buff . append ( "\nThe<seq2seq4repair_space>following<seq2seq4repair_space>services<seq2seq4repair_space>failed<seq2seq4repair_space>to<seq2seq4repair_space>start:\n" ) ; for ( Map . Entry < ServiceName , StartException > entry : serviceFailures . entrySet ( ) ) { buff . append ( String . format ( "\t%s<seq2seq4repair_space>=><seq2seq4repair_space>%s\n" , entry . getKey ( ) , entry . getValue ( ) . getMessage ( ) ) ) ; } log . error ( buff . toString ( ) ) ; } } } ; } }

Fix:
log . infof ( "JBoss<seq2seq4repair_space>AS<seq2seq4repair_space>started<seq2seq4repair_space>in<seq2seq4repair_space>%dms.<seq2seq4repair_space>-<seq2seq4repair_space>Services<seq2seq4repair_space>[Total:<seq2seq4repair_space>%d,<seq2seq4repair_space>On-demand:<seq2seq4repair_space>%d.<seq2seq4repair_space>Started:<seq2seq4repair_space>%d]" , elapsedTime , totalServices , onDemandServices , startedServices ) ;
Buggy code:
class ComboTab extends Tab { Combo combo1 ; Group comboGroup ; Button dropDownButton ; Button readOnlyButton ; Button simpleButton ; static String [ ] ListData = new String [ ] { ControlExample . getResourceString ( "ListData0_0" ) , ControlExample . getResourceString ( "ListData0_1" ) , ControlExample . getResourceString ( "ListData0_2" ) , ControlExample . getResourceString ( "ListData0_3" ) , ControlExample . getResourceString ( "ListData0_4" ) , ControlExample . getResourceString ( "ListData0_5" ) , ControlExample . getResourceString ( "ListData0_6" ) , ControlExample . getResourceString ( "ListData0_7" ) , ControlExample . getResourceString ( "ListData0_8" ) } ; ComboTab ( ControlExample instance ) { } void createExampleGroup ( ) { } void createExampleWidgets ( ) { } Composite createTabFolderPage ( TabFolder tabFolder ) { } void createStyleGroup ( ) { } Control [ ] getExampleWidgets ( ) { } String [ ] getMethodNames ( ) { <START_BUG> return new String [ ] { "Items" , "Orientation" , "Selection" , "Text" , "TextLimit" , "VisibleItemCount" } ; <END_BUG> } String getTabText ( ) { } void setExampleWidgetState ( ) { } }

Fix:
return new String [ ] { "Items" , "Orientation" , "Selection" , "Text" , "TextLimit" , "ToolTipText" , "VisibleItemCount" } ;
Buggy code:
public class ECFSSLSocketFactory extends SSLSocketFactory { private SSLContext sslContext = null ; private SSLSocketFactory getSSLSocketFactory ( ) throws IOException { } public Socket createSocket ( Socket socket , String host , int port , boolean autoClose ) throws IOException { <START_BUG> return new ECFSSLSocket ( getSSLSocketFactory ( ) . createSocket ( socket , host , port , autoClose ) ) ; <END_BUG> } public String [ ] getDefaultCipherSuites ( ) { } public String [ ] getSupportedCipherSuites ( ) { } public Socket createSocket ( String host , int port ) throws IOException , UnknownHostException { } public Socket createSocket ( InetAddress address , int port ) throws IOException { } public Socket createSocket ( InetAddress address , int port , InetAddress arg2 , int arg3 ) throws IOException { } public Socket createSocket ( String host , int port , InetAddress address , int localPort ) throws IOException , UnknownHostException { } }

Fix:
return getSSLSocketFactory ( ) . createSocket ( socket , host , port , autoClose ) ;
Buggy code:
public class TextFieldProcessing { private Widget field ; private TextFieldProcessing . State state = TextFieldProcessing . State . empty ; private enum State { empty , autoCompleteTextField , radioButtonTreeItem , other ; } public void setField ( Widget field ) { } public void setFocus ( boolean focus ) { switch ( state ) { case autoCompleteTextField : ( ( geogebra . html5 . gui . inputfield . AutoCompleteTextFieldW ) ( field ) ) . setFocus ( focus ) ; break ; case radioButtonTreeItem : <START_BUG> ( ( geogebra . web . gui . view . algebra . NewRadioButtonTreeItem ) ( field ) ) . setFocus ( focus ) ; <END_BUG> break ; } } public void setKeyBoardUsed ( boolean used ) { } public void setKeyBoardModeText ( boolean b ) { } public void onEnter ( ) { } public void onBackSpace ( ) { } public void insertString ( String text ) { } }

Fix:
( ( geogebra . web . gui . view . algebra . NewRadioButtonTreeItem ) ( field ) ) . setFocus ( true ) ;
Buggy code:
public class CalendarEvent implements Parcelable , Comparable < CalendarEvent > { public static final Creator CREATOR ; private String title ; private Calendar startTime ; private Calendar endTime ; private String icon ; public int describeContents ( ) { } public void writeToParcel ( Parcel out , int ignored ) { } public CalendarEvent ( ) { } public CalendarEvent ( String eventTitle , Calendar start , Calendar end , String pic ) { } public CalendarEvent ( Parcel in ) { } public String getTitle ( ) { } public Calendar getStartTime ( ) { } public Calendar getEndTime ( ) { } public String getIcon ( ) { } public void setTitle ( String newTitle ) { } public void setStartTime ( Calendar startCal ) { } public void setEndTime ( Calendar endCal ) { } public void setIcon ( String newSound ) { } public boolean validEvent ( ) throws BeforeTodayException , EmptyEventTitleException , EndBeforeStartException { if ( title . isEmpty ( ) ) throw new EmptyEventTitleException ( "Can't<seq2seq4repair_space>have<seq2seq4repair_space>an<seq2seq4repair_space>empty<seq2seq4repair_space>event<seq2seq4repair_space>title" ) ; if ( endTime . before ( startTime ) ) throw new EndBeforeStartException ( "End<seq2seq4repair_space>date<seq2seq4repair_space>must<seq2seq4repair_space>be<seq2seq4repair_space>after<seq2seq4repair_space>start<seq2seq4repair_space>date" ) ; Calendar current = Calendar . getInstance ( ) ; if ( ( startTime . before ( current ) ) || ( endTime . before ( current ) ) ) <START_BUG> throw new BeforeTodayException ( "Event<seq2seq4repair_space>must<seq2seq4repair_space>start<seq2seq4repair_space>after<seq2seq4repair_space>current<seq2seq4repair_space>date" ) ; <END_BUG> return true ; } @ Override public int compareTo ( CalendarEvent ce ) { } public void printEventInfo ( ) { } No newline ; at end ; of file ; }

Fix:
throw new BeforeTodayException ( "Event<seq2seq4repair_space>must<seq2seq4repair_space>start<seq2seq4repair_space>after<seq2seq4repair_space>current<seq2seq4repair_space>date<seq2seq4repair_space>and<seq2seq4repair_space>time" ) ;
Buggy code:
public class XmlView extends BaseExportView { public XmlView ( final List tableModel , final boolean exportFullList , final boolean includeHeader , final boolean decorateValues ) { } @ Override protected String getRowStart ( ) { } @ Override protected String getRowEnd ( ) { } @ Override protected String getCellStart ( ) { } @ Override protected String getCellEnd ( ) { } @ Override protected String getDocumentStart ( ) { } @ Override protected String getDocumentEnd ( ) { } @ Override protected boolean getAlwaysAppendCellEnd ( ) { } @ Override protected boolean getAlwaysAppendRowEnd ( ) { } @ Override public String getMimeType ( ) { } @ Override <START_BUG> protected Object escapeColumnValue ( Object value ) { <END_BUG> if ( value != null ) { return StringEscapeUtils . escapeXml ( value . toString ( ) ) ; } return null ; } }

Fix:
protected Object escapeColumnValue ( final Object value ) {
Buggy code:
public class DependencyParentRule extends BaseRule { public DependencyParentRule ( Digester digester , String state ) { } public void body ( String text ) throws Exception { <START_BUG> log ( ) . debug ( ( ( ( "(" + ( getState ( ) ) ) + ")<seq2seq4repair_space>dependancy<seq2seq4repair_space>parent<seq2seq4repair_space>body:<seq2seq4repair_space>" ) + text ) ) ; <END_BUG> digester . push ( text ) ; digester . push ( NODE_TYPE_PARENT ) ; } }

Fix:
log ( ) . debug ( ( ( ( "(" + ( getState ( ) ) ) + ")<seq2seq4repair_space>dependency<seq2seq4repair_space>parent<seq2seq4repair_space>body:<seq2seq4repair_space>" ) + text ) ) ;
Buggy code:
public class APIFrame { public static final byte StartDelimiter = 126 ; private static final int EXPANDSIZE = 100 ; private int position = 0 ; private byte [ ] FrameData ; private int CheckSum ; private boolean isVerify = false ; public APIFrame ( APIFrame frame ) { } public APIFrame ( int payloadLength ) { } public int GetFrameType ( ) { <START_BUG> return FrameData [ 0 ] ; <END_BUG> } public void SetFrameType ( int identifier ) { } public int GetPosition ( ) { } public void SetPosition ( int position ) { } public void Allocate ( int length ) { } public void Rewind ( ) { } public void SetContent ( byte value ) { } public void SetContent ( int index , byte value ) { } public void SetContent ( byte [ ] value ) { } public void SetContent ( int index , byte [ ] value ) { } public void SetContent ( byte [ ] value , int offset , int length ) { } public void SetContent ( int index , byte [ ] value , int offset , int length ) { } public byte [ ] GetFrameData ( ) { } public int GetCheckSum ( ) { } public void SetCheckSum ( int value ) { } public boolean VerifyChecksum ( ) { } public void CalculateChecksum ( ) { } private void ExpandSpace ( int length ) { } No newline ; at end ; of file ; }

Fix:
return ( FrameData [ 0 ] ) & 255 ;
Buggy code:
public class ChannelFactory implements ISharedObjectInstantiator { public static final String CHANNEL_FACTORY_NAME = "ecf.provider.datashare.channelimpl" ; public ISharedObject createInstance ( SharedObjectTypeDescription typeDescription , Class [ ] argTypes , Object [ ] args ) throws SharedObjectInstantiationException { if ( ( args != null ) && ( ( args . length ) == 3 ) ) { <START_BUG> return new ChannelImpl ( ( ( ISharedObjectTransactionConfig ) ( args [ 0 ] ) ) , ( ( IChannelListener ) ( args [ 2 ] ) ) ) ; <END_BUG> } else throw new SharedObjectInstantiationException ( "args<seq2seq4repair_space>provided<seq2seq4repair_space>to<seq2seq4repair_space>ChannelFactory<seq2seq4repair_space>are<seq2seq4repair_space>not<seq2seq4repair_space>valid" ) ; } }

Fix:
return new BaseChannel ( ( ( ISharedObjectTransactionConfig ) ( args [ 0 ] ) ) , ( ( IChannelListener ) ( args [ 2 ] ) ) ) ;
Buggy code:
public class RecipeFragment extends Fragment { public static final String TAG = "RecipeFragment" ; private int page ; private ArrayList < Recipe > recipeList ; private Settings settings ; private Recipe recipe ; public static RecipeFragment newInstance ( final int page , final ArrayList < Recipe > recipeList , final Settings settings ) { } @ SuppressWarnings ( "unchecked" ) @ Override public void onCreate ( Bundle savedInstanceState ) { } @ Override public View onCreateView ( LayoutInflater inflater , ViewGroup parent , Bundle savedInstanceState ) { LinearLayout view = ( ( LinearLayout ) ( inflater . inflate ( fragment_recipe , parent , false ) ) ) ; LayoutParams layoutParams = new LayoutParams ( LayoutParams . WRAP_CONTENT , LayoutParams . WRAP_CONTENT ) ; layoutParams . setMargins ( 0 , 10 , 5 , 0 ) ; LayoutParams layoutParamsLabel = new LayoutParams ( LayoutParams . WRAP_CONTENT , LayoutParams . WRAP_CONTENT ) ; layoutParamsLabel . setMargins ( 0 , 30 , 0 , 5 ) ; view . addView ( createTextView ( ( "Title:<seq2seq4repair_space>" + ( this . recipe . getTitle ( ) ) ) ) , layoutParams ) ; view . addView ( createTextView ( ( "Category:<seq2seq4repair_space>" + ( this . recipe . getCategory ( ) ) ) ) , layoutParams ) ; <START_BUG> view . addView ( createTextView ( ( "Preparation<seq2seq4repair_space>Time:<seq2seq4repair_space>" + ( this . recipe . getPreparationTime ( ) ) ) ) , layoutParams ) ; <END_BUG> view . addView ( createTextView ( ( "Servings:<seq2seq4repair_space>" + ( this . recipe . getServings ( ) ) ) ) , layoutParams ) ; view . addView ( createTextView ( ( "Description:<seq2seq4repair_space>" + ( this . recipe . getDescription ( ) ) ) ) , layoutParams ) ; view . addView ( createTextView ( "Ingredients:" ) , layoutParamsLabel ) ; for ( Ingredient ingredient : this . recipe . getIngredients ( ) . getIngredientsList ( ) ) { view . addView ( createTextView ( ingredient . toString ( ) ) , layoutParams ) ; } view . addView ( createTextView ( "Instructions:" ) , layoutParamsLabel ) ; int count = 1 ; for ( String instruction : this . recipe . getInstructions ( ) . getInstructionsList ( ) ) { view . addView ( createTextView ( ( ( count + ".<seq2seq4repair_space>" ) + instruction ) ) , layoutParams ) ; count ++ ; } view . addView ( createTextView ( "" ) , layoutParams ) ; ScrollView scroll = new ScrollView ( getActivity ( ) ) ; scroll . addView ( view ) ; Log . d ( LogsManager . TAG , "RecipeFragment:<seq2seq4repair_space>onCreateView." ) ; return scroll ; } private TextView createTextView ( final String text ) { } }

Fix:
view . addView ( createTextView ( ( "Preparation<seq2seq4repair_space>Time:<seq2seq4repair_space>" + ( this . recipe . getPreparationTimeString ( ) ) ) ) , layoutParams ) ;
Buggy code:
public class MainActivity extends Activity { @ Inject Foo fooObject ; @ Override protected void onCreate ( Bundle savedInstanceState ) { super . onCreate ( savedInstanceState ) ; ( ( MainApplication ) ( getApplication ( ) ) ) . inject ( this ) ; <START_BUG> setContentView ( main ) ; <END_BUG> TextView t = new TextView ( this ) ; t = ( ( TextView ) ( findViewById ( text ) ) ) ; String injectedText = fooObject . provideText ( ) ; t . setText ( injectedText ) ; } }

Fix:
setContentView ( activity_main ) ;