Buggy code:
public class SFTPConnector { private static Logger logger = MiscUtils . getLogger ( ) ; private JSch jsch ; private ChannelSftp cmd ; private Session sess ; private java . util . logging . Logger fLogger ; private static final String TEST_DIRECTORY = "Test" ; private static final String OMD_HRM_USER = OscarProperties . getInstance ( ) . getProperty ( "OMD_HRM_USER" ) ; private static final String OMD_HRM_IP = OscarProperties . getInstance ( ) . getProperty ( "OMD_HRM_IP" ) ; private static final int OMD_HRM_PORT = Integer . parseInt ( OscarProperties . getInstance ( ) . getProperty ( "OMD_HRM_PORT" ) ) ; public static String OMD_directory = OscarProperties . getInstance ( ) . getProperty ( "OMD_directory" ) ; private static String OMD_keyLocation = ( SFTPConnector . OMD_directory ) + ( OscarProperties . getInstance ( ) . getProperty ( "OMD_HRM_AUTH_KEY_FILENAME" ) ) ; public static final String XSD_ontariomd = ( SFTPConnector . OMD_directory ) + "ontariomd_cds_dt.xsd" ; public static final String XSD_reportmanager = ( SFTPConnector . OMD_directory ) + "report_manager_cds.xsd" ; public final String logDirectory = OscarProperties . getInstance ( ) . getProperty ( "OMD_log_directory" ) ; public static String downloadsDirectory = OscarProperties . getInstance ( ) . getProperty ( "OMD_downloads" ) ; public final String fileDirectory = OscarProperties . getInstance ( ) . getProperty ( "OMD_stored" ) ; public static String decryptionKey = null ; private static HashSet < String > doNotSentMsgForOuttage = new HashSet < String > ( ) ; public SFTPConnector ( ) throws Exception { } public SFTPConnector ( String remoteDir ) throws Exception { } public SFTPConnector ( String host , int port , String user , String keyLocation ) throws Exception { } public static String getOMD_keyLocation ( ) { } public static void setOMD_keyLocation ( String oMD_keyLocation ) { } public static String getDownloadsDirectory ( ) { String dd = SFTPConnector . downloadsDirectory ; <START_BUG> if ( ( dd . equals ( "" ) ) || ( dd . equals ( null ) ) ) { <END_BUG> dd = "webapps//OscarDocument//hrm//sftp_downloads//" ; return dd ; } else { return SFTPConnector . downloadsDirectory ; } } public static void setDownloadsDirectory ( String downloadsDir ) { } public static String getDecryptionKey ( ) { } public static void setDecryptionKey ( String decryptKey ) { } private static String prepareForDownload ( String folder ) throws Exception { } public void lsP ( String folder ) throws SftpException { } public String [ ] ls ( String folder ) throws SftpException { } public String [ ] ls ( String folder , boolean printInfo ) throws SftpException { } public String [ ] downloadDirectoryContents ( String serverDirectory ) throws Exception { } public void deleteDirectory ( String serverDirectory ) throws SftpException { } public void deleteDirectoryContents ( String serverDirectory , String [ ] filenames ) throws SftpException { } public static String [ ] decryptFiles ( String [ ] fullPaths ) throws Exception { } public static String decryptFile ( String fullPath ) throws Exception { } public void close ( ) { } public static String getDayMonthYearTimestamp ( ) { } private static String checkFolder ( String fullPath ) throws Exception { } public static String ensureFolderExists ( String fullPath ) throws Exception { } public static byte [ ] toHex ( String encoded ) { } private static boolean isAutoFetchRunning = false ; public static boolean isFetchRunning ( ) { } public static boolean doDecrypt ( ) { } public static synchronized void startAutoFetch ( LoggedInInfo loggedInInfo ) { } protected static void notifyHrmError ( LoggedInInfo loggedInInfo , String errorMsg ) { } public static void addMeToDoNotSendList ( LoggedInInfo loggedInInfo ) { } }

Fix:
if ( ( dd == null ) || ( dd . equals ( "" ) ) ) {