Buggy code:
public class GTFSuploader { private static Connection dbConnection ; private static String startDate ; private static String endDate ; public static final String COMMA_DELIM_DBL_QUOTE_PATTERN = ",(?=([^\"]*\"[^\"]*\")*(?![^\"]*\"))" ; public static void main ( String [ ] args ) { } private static void openDatabaseConnection ( ) throws SQLException { } private static void closeDatabaseConnection ( ) throws SQLException { } private static void openFeedInfo ( ) throws IOException { } private static void readStops ( ) throws IOException , SQLException { } private static void createStopsTable ( ) throws SQLException { } private static void readStopTimes ( ) throws IOException , SQLException { } private static void createStopsTimesTable ( ) throws SQLException { } private static void readFrequencies ( ) throws IOException , SQLException { } private static void createFrequenciesTable ( ) throws SQLException { } private static void readCalendar ( ) throws IOException , SQLException { if ( GTFSuploader . dbConnection . isClosed ( ) ) { GTFSuploader . openDatabaseConnection ( ) ; } try { GTFSuploader . createCalendarTable ( ) ; } catch ( PSQLException e ) { System . out . println ( e ) ; } BufferedReader reader = new BufferedReader ( new InputStreamReader ( new FileInputStream ( "calendar.txt" ) ) ) ; PrintStream textOut = new PrintStream ( new BufferedOutputStream ( new FileOutputStream ( "calendar_prepared.csv" , false ) ) ) ; textOut . println ( reader . readLine ( ) ) ; String line ; for ( ; ( line = reader . readLine ( ) ) != null ; ) { String [ ] row = line . split ( GTFSuploader . COMMA_DELIM_DBL_QUOTE_PATTERN , ( - 1 ) ) ; String output = "" ; for ( int i = 0 ; i < ( ( row . length ) - 1 ) ; i ++ ) { if ( ( i >= 1 ) && ( i <= 7 ) ) { <START_BUG> row [ i ] = ( row [ i ] . equals ( 1 ) ) ? "TRUE" : "FALSE" ; <END_BUG> } output += ( row [ i ] ) + "," ; } output += row [ ( ( row . length ) - 1 ) ] ; textOut . println ( output ) ; } textOut . close ( ) ; textOut . flush ( ) ; reader . close ( ) ; CopyManager manager = new CopyManager ( ( ( BaseConnection ) ( GTFSuploader . dbConnection ) ) ) ; try { manager . copyIn ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( "COPY<seq2seq4repair_space>gtfs.calendar_" + ( GTFSuploader . startDate ) ) + "_" ) + ( GTFSuploader . endDate ) ) + "(\n" ) + "\"service_id\",\n" ) + "\"monday\",\n" ) + "\"tuesday\",\n" ) + "\"wednesday\",\n" ) + "\"thursday\",\n" ) + "\"friday\",\n" ) + "\"saturday\",\n" ) + "\"sunday\",\n" ) + "\"start_date\",\n" ) + "\"end_date\")<seq2seq4repair_space>FROM<seq2seq4repair_space>STDIN<seq2seq4repair_space>WITH<seq2seq4repair_space>(FORMAT<seq2seq4repair_space>\'csv\',<seq2seq4repair_space>HEADER<seq2seq4repair_space>true)" ) , new FileReader ( "calendar_prepared.csv" ) ) ; } catch ( PSQLException ex ) { System . out . println ( ex ) ; System . out . println ( ex . getServerErrorMessage ( ) . getMessage ( ) ) ; } } private static void createCalendarTable ( ) throws SQLException { } private static void readCalendar_dates ( ) throws IOException , SQLException { } private static void createCalendar_datesTable ( ) throws SQLException { } private static void readTrips ( ) throws IOException , SQLException { } private static void createTripsTable ( ) throws SQLException { } private static void readTransfers ( ) throws IOException , SQLException { } private static void createTransfersTable ( ) throws SQLException { } private static void readRoutes ( ) throws IOException , SQLException { } private static void createRoutesTable ( ) throws SQLException { } private static void insertStopGeometry ( ) throws SQLException { } private static void createStopGeometryTable ( ) throws SQLException { } private static void insertNearestStopStopMatrix ( ) throws SQLException { } private static void createNearestStopStopMatrixTable ( ) throws SQLException { } private static void insertBusPatterns ( ) throws SQLException { } private static void createBus_patterns_Table ( ) throws SQLException { } private static void basicKeys ( ) throws SQLException { } private static void advancedKeys ( ) throws SQLException { } }

Fix:
row [ i ] = ( row [ i ] . equals ( "1" ) ) ? "TRUE" : "FALSE" ;