Buggy code:
public class StrandsProcessor implements IEContentProcessor , IMarcRecordProcessor , ISupplementalProcessor { private Logger logger ; private BufferedWriter writer ; private String vufindUrl ; private String bookcoverUrl ; private Connection econtentConn ; private PreparedStatement getFormatsForRecord = null ; private File tempFile ; private String strandsCatalogFile ; private HashMap < String , String > formatMap ; private HashMap < String , String > formatCategoryMap ; private HashMap < String , String > targetAudienceMap ; public boolean init ( Ini configIni , Logger logger ) { this . logger = logger ; logger . info ( "Creating<seq2seq4repair_space>Catalog<seq2seq4repair_space>File<seq2seq4repair_space>for<seq2seq4repair_space>Strands" ) ; vufindUrl = configIni . get ( "Site" , "url" ) ; if ( ( ( vufindUrl ) == null ) || ( ( vufindUrl . length ( ) ) == 0 ) ) { logger . error ( "VuFind<seq2seq4repair_space>URL<seq2seq4repair_space>not<seq2seq4repair_space>found<seq2seq4repair_space>in<seq2seq4repair_space>General<seq2seq4repair_space>Settings.<seq2seq4repair_space>Please<seq2seq4repair_space>specify<seq2seq4repair_space>the<seq2seq4repair_space>url<seq2seq4repair_space>to<seq2seq4repair_space>vufind<seq2seq4repair_space>as<seq2seq4repair_space>the<seq2seq4repair_space>vufindUrl<seq2seq4repair_space>key" ) ; return false ; } bookcoverUrl = configIni . get ( "Site" , "coverUrl" ) ; if ( ( ( bookcoverUrl ) == null ) || ( ( bookcoverUrl . length ( ) ) == 0 ) ) { logger . error ( "Bookcover<seq2seq4repair_space>URL<seq2seq4repair_space>not<seq2seq4repair_space>found<seq2seq4repair_space>in<seq2seq4repair_space>General<seq2seq4repair_space>Settings.<seq2seq4repair_space>Please<seq2seq4repair_space>specify<seq2seq4repair_space>the<seq2seq4repair_space>url<seq2seq4repair_space>to<seq2seq4repair_space>the<seq2seq4repair_space>bookcover<seq2seq4repair_space>server<seq2seq4repair_space>as<seq2seq4repair_space>the<seq2seq4repair_space>bookcoverUrl<seq2seq4repair_space>key" ) ; return false ; } strandsCatalogFile = configIni . get ( "Reindex" , "strandsCatalogFile" ) ; if ( ( ( strandsCatalogFile ) == null ) || ( ( strandsCatalogFile . length ( ) ) == 0 ) ) { logger . error ( "Output<seq2seq4repair_space>File<seq2seq4repair_space>not<seq2seq4repair_space>found<seq2seq4repair_space>in<seq2seq4repair_space>GenerateCatalog<seq2seq4repair_space>Settings.<seq2seq4repair_space>Please<seq2seq4repair_space>specify<seq2seq4repair_space>the<seq2seq4repair_space>path<seq2seq4repair_space>as<seq2seq4repair_space>the<seq2seq4repair_space>outputFile<seq2seq4repair_space>key." ) ; return false ; } String econtentDBConnectionInfo = Util . cleanIniValue ( configIni . get ( "Database" , "database_econtent_jdbc" ) ) ; if ( ( econtentDBConnectionInfo == null ) || ( ( econtentDBConnectionInfo . length ( ) ) == 0 ) ) { logger . error ( "Database<seq2seq4repair_space>connection<seq2seq4repair_space>information<seq2seq4repair_space>for<seq2seq4repair_space>eContent<seq2seq4repair_space>database<seq2seq4repair_space>not<seq2seq4repair_space>found<seq2seq4repair_space>in<seq2seq4repair_space>General<seq2seq4repair_space>Settings.<seq2seq4repair_space>Please<seq2seq4repair_space>specify<seq2seq4repair_space>connection<seq2seq4repair_space>information<seq2seq4repair_space>in<seq2seq4repair_space>a<seq2seq4repair_space>econtentDatabase<seq2seq4repair_space>key." ) ; return false ; } <START_BUG> String translationMapPath = configIni . get ( "Import" , "translationMapPath" ) ; <END_BUG> String formatMapFileString = translationMapPath + "//format_map.properties" ; File formatMapFile = null ; if ( ( formatMapFileString == null ) || ( ( formatMapFileString . length ( ) ) == 0 ) ) { logger . error ( "Format<seq2seq4repair_space>Map<seq2seq4repair_space>File<seq2seq4repair_space>not<seq2seq4repair_space>found<seq2seq4repair_space>in<seq2seq4repair_space>GenerateCatalog<seq2seq4repair_space>Settings.<seq2seq4repair_space>Please<seq2seq4repair_space>specify<seq2seq4repair_space>the<seq2seq4repair_space>path<seq2seq4repair_space>as<seq2seq4repair_space>the<seq2seq4repair_space>formatMapFile<seq2seq4repair_space>key." ) ; return false ; } else { formatMapFile = new File ( formatMapFileString ) ; if ( ! ( formatMapFile . exists ( ) ) ) { logger . error ( "Format<seq2seq4repair_space>Map<seq2seq4repair_space>File<seq2seq4repair_space>does<seq2seq4repair_space>not<seq2seq4repair_space>exist.<seq2seq4repair_space>Please<seq2seq4repair_space>check<seq2seq4repair_space>the<seq2seq4repair_space>formatMapFile<seq2seq4repair_space>key." ) ; return false ; } } try { formatMap = Util . readPropertiesFile ( formatMapFile ) ; } catch ( IOException e ) { logger . error ( "Unable<seq2seq4repair_space>to<seq2seq4repair_space>load<seq2seq4repair_space>map<seq2seq4repair_space>from<seq2seq4repair_space>properties<seq2seq4repair_space>file" ) ; return false ; } String formatCategoryMapFileString = translationMapPath + "//format_category_map.properties" ; File formatCategoryMapFile = null ; if ( ( formatCategoryMapFileString == null ) || ( ( formatCategoryMapFileString . length ( ) ) == 0 ) ) { logger . error ( "Format<seq2seq4repair_space>Category<seq2seq4repair_space>Map<seq2seq4repair_space>File<seq2seq4repair_space>not<seq2seq4repair_space>found<seq2seq4repair_space>in<seq2seq4repair_space>GenerateCatalog<seq2seq4repair_space>Settings.<seq2seq4repair_space>Please<seq2seq4repair_space>specify<seq2seq4repair_space>the<seq2seq4repair_space>path<seq2seq4repair_space>as<seq2seq4repair_space>the<seq2seq4repair_space>formatCategoryMapFile<seq2seq4repair_space>key." ) ; return false ; } else { formatCategoryMapFile = new File ( formatCategoryMapFileString ) ; if ( ! ( formatCategoryMapFile . exists ( ) ) ) { logger . error ( ( ( "Format<seq2seq4repair_space>Category<seq2seq4repair_space>Map<seq2seq4repair_space>File<seq2seq4repair_space>" + formatCategoryMapFileString ) + "<seq2seq4repair_space>does<seq2seq4repair_space>not<seq2seq4repair_space>exist.<seq2seq4repair_space>Please<seq2seq4repair_space>check<seq2seq4repair_space>the<seq2seq4repair_space>formatCategoryMapFile<seq2seq4repair_space>key." ) ) ; return false ; } } try { formatCategoryMap = Util . readPropertiesFile ( formatCategoryMapFile ) ; } catch ( IOException e ) { logger . error ( "Unable<seq2seq4repair_space>to<seq2seq4repair_space>load<seq2seq4repair_space>formatCategory<seq2seq4repair_space>map<seq2seq4repair_space>from<seq2seq4repair_space>properties<seq2seq4repair_space>file" ) ; return false ; } String targetAudienceFileString = translationMapPath + "//target_audience_full_map.properties" ; File targetAudienceMapFile = null ; if ( ( targetAudienceFileString == null ) || ( ( targetAudienceFileString . length ( ) ) == 0 ) ) { logger . error ( "Target<seq2seq4repair_space>Audience<seq2seq4repair_space>Map<seq2seq4repair_space>File<seq2seq4repair_space>not<seq2seq4repair_space>found<seq2seq4repair_space>in<seq2seq4repair_space>GenerateCatalog<seq2seq4repair_space>Settings.<seq2seq4repair_space>Please<seq2seq4repair_space>specify<seq2seq4repair_space>the<seq2seq4repair_space>path<seq2seq4repair_space>as<seq2seq4repair_space>the<seq2seq4repair_space>targetAudienceMapFile<seq2seq4repair_space>key." ) ; return false ; } else { targetAudienceMapFile = new File ( targetAudienceFileString ) ; if ( ! ( targetAudienceMapFile . exists ( ) ) ) { logger . error ( "Target<seq2seq4repair_space>Audience<seq2seq4repair_space>File<seq2seq4repair_space>does<seq2seq4repair_space>not<seq2seq4repair_space>exist.<seq2seq4repair_space>Please<seq2seq4repair_space>check<seq2seq4repair_space>the<seq2seq4repair_space>targetAudienceFile<seq2seq4repair_space>key." ) ; return false ; } } try { targetAudienceMap = Util . readPropertiesFile ( targetAudienceMapFile ) ; } catch ( IOException e ) { logger . error ( "Unable<seq2seq4repair_space>to<seq2seq4repair_space>load<seq2seq4repair_space>targetAudience<seq2seq4repair_space>map<seq2seq4repair_space>from<seq2seq4repair_space>properties<seq2seq4repair_space>file" ) ; return false ; } try { econtentConn = DriverManager . getConnection ( econtentDBConnectionInfo ) ; getFormatsForRecord = econtentConn . prepareStatement ( "SELECT<seq2seq4repair_space>distinct<seq2seq4repair_space>item_type<seq2seq4repair_space>from<seq2seq4repair_space>econtent_item<seq2seq4repair_space>where<seq2seq4repair_space>recordId<seq2seq4repair_space>=<seq2seq4repair_space>?" ) ; } catch ( Exception ex ) { logger . error ( "Error<seq2seq4repair_space>processing<seq2seq4repair_space>eContent<seq2seq4repair_space>" , ex ) ; return false ; } try { tempFile = File . createTempFile ( "strands" , "csv" ) ; CharsetEncoder utf8Encoder = Charset . forName ( "UTF8" ) . newEncoder ( ) ; utf8Encoder . onMalformedInput ( CodingErrorAction . IGNORE ) ; utf8Encoder . onUnmappableCharacter ( CodingErrorAction . IGNORE ) ; writer = new BufferedWriter ( new OutputStreamWriter ( new FileOutputStream ( tempFile ) , utf8Encoder ) ) ; writer . write ( "id|link|title|author|image_link|publisher|description|genre|format|subject|audience|collection\r\n" ) ; } catch ( Exception e ) { logger . error ( ( "Error<seq2seq4repair_space>generating<seq2seq4repair_space>Strands<seq2seq4repair_space>catalog<seq2seq4repair_space>" + ( e . toString ( ) ) ) ) ; e . printStackTrace ( ) ; return false ; } return true ; } static final Pattern utf8Regex = Pattern . compile ( "([\\x00-\\x7F]|[\\xC0-\\xDF][\\x80-\\xBF]|[\\xE0-\\xEF][\\x80-\\xBF]{2}|[\\xF0-\\xF7][\\x80-\\xBF]{3})" , Pattern . CANON_EQ ) ; private String prepForCsv ( String input , boolean trimTrailingPunctuation , boolean crSeparatedFields ) { } private String trimTrailingPunctuation ( String format ) { } @ Override public boolean processEContentRecord ( ResultSet eContentRecord ) { } @ Override public boolean processMarcRecord ( MarcProcessor processor , BasicMarcInfo recordInfo , Logger logger ) { } @ Override public void finish ( ) { } }

Fix:
String translationMapPath = configIni . get ( "Reindex" , "translationMapPath" ) ;