Buggy code:
public class DocViewer { private static final Log LOGGER = LogFactory . getLog ( DocViewer . class ) ; private static int workerId = 0 ; private static final String CONFIG_FILE = ( "conf" + ( File . separator ) ) + "docviewer.properties" ; private static String OUTPUT_PATH = "" ; private static boolean SPLIT_PAGE = true ; private static int PDF_POOL_MAX_THREAD = 5 ; private static int OFFICE_POOL_MAX_THREAD = 5 ; private static boolean ENCRYPTION = true ; private static boolean DYNAMIC_KEY = false ; private static String SECRET_KEY = "" ; private static int KEY_LENGTH = 40 ; private static String ATTACHMENT_SERVICE ; private static IAttachmentService attachmentService = null ; public static void setPDFPoolMaxThread ( int count ) throws Exception { } public static void setOfficePoolMaxThread ( int count ) throws Exception { } public static void setOutputPath ( String path ) throws Exception { } public static void setDynamicKey ( boolean dynamicKey ) throws Exception { } public static void setSecretKey ( String secretKey ) throws Exception { } public static void setEncryption ( boolean encryption ) throws Exception { } public static void setKeyLength ( int length ) throws Exception { } public static void setSplitPage ( boolean split ) throws Exception { } public static int getPDFPoolMaxThread ( ) { } public static int getOfficePoolMaxThread ( ) { } public static String getOutputPath ( ) { } public static boolean isDynamicKey ( ) { } public static String getSecretKey ( ) { } public static boolean isEncryption ( ) { } public static int getKeyLength ( ) { } public static boolean isSplitPage ( ) { } public static String getCurrentSecretKey ( ) { } public static IAttachmentService getAttachmentService ( ) throws ClassNotFoundException , IllegalAccessException , InstantiationException { } public static void setAttachmentService ( String service ) { } public static boolean isSupport ( String fileExtends ) { } DocViewer ( ) { } public static void initialize ( ) throws Exception { } public static void destroy ( ) throws Exception { } private static synchronized void checkWorker ( ConvertWorker worker ) throws Exception { } public static synchronized void addConvertWorker ( PDFConvertWorker worker ) throws Exception { } public static synchronized void addConvertWorker ( OfficeConvertWorker worker ) throws Exception { } public static synchronized void addConvertWorker ( int id ) throws Exception { } public static synchronized int getNextId ( ) { } private static final ConvertQueue officeQueue = new ConvertQueue ( DocViewer . OFFICE_POOL_MAX_THREAD , "office_queue" ) ; private static final ConvertQueue pdfQueue = new ConvertQueue ( DocViewer . PDF_POOL_MAX_THREAD , "pdf_queue" ) ; public static File getDoc ( int id ) throws Exception { } public static synchronized boolean isConverting ( int id ) { } public static File getPDFDoc ( int id ) throws Exception { } public static int getDocPageCount ( int id ) throws Exception { } public static int getDocPageCount ( int id , boolean isCreate ) throws Exception { } public static File getDocFileFromSource ( int id ) throws Exception { } public static boolean hasDocDir ( int id ) { } public static boolean hasPDF ( int id ) { } public static boolean hasDoc ( int id ) throws Exception { if ( DocViewer . hasPDF ( id ) ) { File dir = new File ( ( ( ( DocViewer . OUTPUT_PATH ) + id ) + ( File . separator ) ) ) ; if ( DocViewer . isSplitPage ( ) ) { if ( dir . exists ( ) ) { if ( ( dir . listFiles ( new SplitSwfFileFilter ( ) ) . length ) == ( DocViewer . getDocPageCount ( id , false ) ) ) { return true ; } } } else { <START_BUG> File swf = new File ( ( ( dir . getPath ( ) ) + "page.swf" ) ) ; <END_BUG> if ( ( ( swf . exists ( ) ) && ( swf . isFile ( ) ) ) && ( ( swf . length ( ) ) > 0 ) ) { return true ; } } } return false ; } public static byte [ ] encryptToBytes ( int id , Integer page , String key ) throws Exception { } public static File encryptToFile ( int id , Integer page , String key ) throws Exception { } public static File getDocFile ( int id ) { } public static File getDocFile ( int id , int page ) { } public static byte [ ] encryptToBytes ( int id , String key ) throws Exception { } public static File encryptToFile ( int id , String key ) throws Exception { } public static String getRandomKey ( int length ) { } public static void main ( String [ ] args ) throws Exception { } }

Fix:
File swf = new File ( ( ( ( dir . getPath ( ) ) + ( File . separator ) ) + "page.swf" ) ) ;