Buggy code:
public class TenantManagerHostObject extends ScriptableObject { private static final Log log = LogFactory . getLog ( TenantManagerHostObject . class ) ; private static final Set < String > EXTENTION_WHITELIST = new HashSet < String > ( Arrays . asList ( new String [ ] { "css" , "jpg" , "png" , "gif" , "svg" , "ttf" , "html" , "js" } ) ) ; public static String getStoreTenantThemesPath ( ) { } @ Override public String getClassName ( ) { } public static Scriptable jsConstructor ( Context cx , Object [ ] args , Function ctorObj , boolean inNewExpr ) throws ScriptException { } private static void handleException ( String msg ) throws APIManagementException { } private static void handleException ( String msg , Throwable t ) throws APIManagementException { } public static boolean jsFunction_addTenantTheme ( Context cx , Scriptable thisObj , Object [ ] args , Function funObj ) throws APIManagementException { } private static void deployTenantTheme ( FileHostObject themeFile , String tenant ) throws APIManagementException { ZipInputStream zis = null ; byte [ ] buffer = new byte [ 1024 ] ; String outputFolder = ( TenantManagerHostObject . getStoreTenantThemesPath ( ) ) + tenant ; InputStream zipInputStream = null ; try { zipInputStream = themeFile . getInputStream ( ) ; } catch ( ScriptException e ) { TenantManagerHostObject . handleException ( "Error<seq2seq4repair_space>occurred<seq2seq4repair_space>while<seq2seq4repair_space>deploying<seq2seq4repair_space>tenant<seq2seq4repair_space>theme<seq2seq4repair_space>file" , e ) ; } try { File folder = new File ( outputFolder ) ; if ( ! ( folder . exists ( ) ) ) { <START_BUG> if ( ! ( folder . mkdir ( ) ) ) { <END_BUG> TenantManagerHostObject . handleException ( "Unable<seq2seq4repair_space>to<seq2seq4repair_space>create<seq2seq4repair_space>tenant<seq2seq4repair_space>theme<seq2seq4repair_space>directory" ) ; } } zis = new ZipInputStream ( zipInputStream ) ; ZipEntry ze = zis . getNextEntry ( ) ; String ext = null ; while ( ze != null ) { String fileName = ze . getName ( ) ; File newFile = new File ( ( ( outputFolder + ( File . separator ) ) + fileName ) ) ; if ( ze . isDirectory ( ) ) { if ( ! ( newFile . exists ( ) ) ) { boolean status = newFile . mkdir ( ) ; if ( status ) { } } } else { ext = FilenameUtils . getExtension ( ze . getName ( ) ) ; if ( TenantManagerHostObject . EXTENTION_WHITELIST . contains ( ext ) ) { new File ( newFile . getParent ( ) ) . mkdirs ( ) ; FileOutputStream fos = new FileOutputStream ( newFile ) ; int len ; while ( ( len = zis . read ( buffer ) ) > 0 ) { fos . write ( buffer , 0 , len ) ; } fos . close ( ) ; } else { TenantManagerHostObject . log . warn ( ( ( ( "Unsupported<seq2seq4repair_space>file<seq2seq4repair_space>is<seq2seq4repair_space>uploaded<seq2seq4repair_space>with<seq2seq4repair_space>tenant<seq2seq4repair_space>theme<seq2seq4repair_space>by<seq2seq4repair_space>" + tenant ) + "<seq2seq4repair_space>:<seq2seq4repair_space>file<seq2seq4repair_space>name<seq2seq4repair_space>:<seq2seq4repair_space>" ) + ( ze . getName ( ) ) ) ) ; } } ze = zis . getNextEntry ( ) ; } zis . closeEntry ( ) ; zis . close ( ) ; } catch ( IOException ex ) { TenantManagerHostObject . handleException ( "Failed<seq2seq4repair_space>to<seq2seq4repair_space>deploy<seq2seq4repair_space>tenant<seq2seq4repair_space>theme" , ex ) ; } finally { IOUtils . closeQuietly ( zis ) ; IOUtils . closeQuietly ( zipInputStream ) ; } } }

Fix:
if ( ! ( folder . mkdirs ( ) ) ) {