Buggy code:
protected static PrimaryThermoLibrary primaryLibrary ; public static String qmfolder = "QMfiles//" ; protected ThermoGAGroupLibrary thermoLibrary ; public static String qmprogram = "both" ; public static boolean usePolar = false ; public static boolean useCanTherm = true ; public static boolean useHindRot = false ; public static int connectivityCheck = 0 ; public static double R = 1.9872 ; public static double Hartree_to_kcal = 627.5095 ; public static double Na = 6.02214179E23 ; public static double k = 1.3806504E-23 ; public static double h = 6.62606896E-34 ; public static double c = 2.99792458E8 * 100 ; public static double deltaTheta = 5.0 ; private QMTP ( ) { } public ThermoData generateThermoData ( ChemGraph p_chemGraph ) { } public ThermoData generateQMThermoData ( ChemGraph p_chemGraph ) { } protected static QMTP getINSTANCE ( ) { } public void initializePrimaryThermoLibrary ( ) { } public molFile create3Dmolfile ( String name , ChemGraph p_chemGraph ) { } public molFile embed3D ( molFile twoDmolFile , int numConfAttempts ) { } public int createGaussianPM3Input ( String name , String directory , molFile p_molfile , int attemptNumber , String InChIaug , int multiplicity ) { } public int createMM4Input ( String name , String directory , molFile p_molfile , int attemptNumber , String InChIaug , int multiplicity ) { } public double [ ] createMM4RotorInput ( String name , String directory , ChemGraph p_chemgraph , int rotors ) { } public double calculateDihedral ( double [ ] dihedral1 , double [ ] atom1 , double [ ] atom2 , double [ ] dihedral2 ) { } public String getMopacRadicalString ( int multiplicity ) { } public int createMopacPM3Input ( String name , String directory , molFile p_molfile , int attemptNumber , String InChIaug , int multiplicity ) { } public int runGaussian ( String name , String directory , String InChIaug ) { } public int runMM4 ( String name , String directory , String InChIaug ) { } public void runMM4Rotor ( String name , String directory , int rotors ) { } public int runMOPAC ( String name , String directory , String InChIaug ) { } public ThermoData parseGaussianPM3 ( String name , String directory , ChemGraph p_chemGraph ) { } public ThermoData parseMM4 ( String name , String directory , ChemGraph p_chemGraph ) { } public QMData performCanThermCalcs ( String name , String directory , ChemGraph p_chemGraph , double [ ] dihedralMinima , boolean forceRRHO ) { } public ThermoData parseCanThermFile ( String name , String directory , ChemGraph p_chemGraph ) { } public ThermoData parseMopacPM3 ( String name , String directory , ChemGraph p_chemGraph ) { } public ThermoData getPM3MM4ThermoDataUsingCCLib ( String name , String directory , ChemGraph p_chemGraph , String command ) { } public ThermoData calculateThermoFromPM3MM4Calc ( int natoms , ArrayList atomicNumber , ArrayList x_coor , ArrayList y_coor , ArrayList z_coor , double energy , double molmass , ArrayList freqs , double rotCons_1 , double rotCons_2 , double rotCons_3 , int gdStateDegen ) { } public double getSigmaCorr ( String pointGroup ) { } public String determinePointGroupUsingSYMMETRYProgram ( String geom ) { } public double calcVibS ( ArrayList p_freqs , double p_T , double h , double k , double c ) { } public double calcVibCp ( ArrayList p_freqs , double p_T , double h , double k , double c ) { } public double calcVibH ( ArrayList p_freqs , double p_T , double h , double k , double c ) { } public String [ ] getQMFileName ( ChemGraph p_chemGraph ) { } public String getInChIFromModifiedInChI ( String modInChI ) { } public boolean successfulGaussianResultExistsQ ( String name , String directory , String InChIaug ) { } public boolean successfulMopacResultExistsQ ( String name , String directory , String InChIaug ) { } public boolean successfulMM4ResultExistsQ ( String name , String directory , String InChIaug ) { } public boolean connectivityMatchInPM3ResultQ ( String name , String directory , String InChI , String outfileExtension , String babelType ) { String molPath = "" ; try { File runningdir = new File ( directory ) ; String command = null ; String inpPath = ( ( directory + "//" ) + name ) + outfileExtension ; <START_BUG> molPath = ( ( directory + "//" ) + name ) + outfileExtension ; <END_BUG> if ( System . getProperty ( "os.name" ) . toLowerCase ( ) . contains ( "windows" ) ) { command = ( ( ( ( ( "babel<seq2seq4repair_space>-i" + babelType ) + "<seq2seq4repair_space>\"" ) + inpPath ) + "\"<seq2seq4repair_space>-omol<seq2seq4repair_space>\"" ) + molPath ) + "\"" ; } else { command = ( ( ( ( ( "babel<seq2seq4repair_space>-i" + babelType ) + "<seq2seq4repair_space>" ) + inpPath ) + "<seq2seq4repair_space>-omol<seq2seq4repair_space>\"" ) + molPath ) + "\"" ; } Process babelProc = Runtime . getRuntime ( ) . exec ( command , null , runningdir ) ; InputStream is = babelProc . getInputStream ( ) ; InputStreamReader isr = new InputStreamReader ( is ) ; BufferedReader br = new BufferedReader ( isr ) ; String line = null ; while ( ( line = br . readLine ( ) ) != null ) { } int exitValue = babelProc . waitFor ( ) ; babelProc . getErrorStream ( ) . close ( ) ; babelProc . getOutputStream ( ) . close ( ) ; br . close ( ) ; isr . close ( ) ; is . close ( ) ; } catch ( Exception e ) { String err = "Error<seq2seq4repair_space>in<seq2seq4repair_space>running<seq2seq4repair_space>OpenBabel<seq2seq4repair_space>G03//MOO//XYZ<seq2seq4repair_space>to<seq2seq4repair_space>MOL<seq2seq4repair_space>process<seq2seq4repair_space>\n" ; err += e . toString ( ) ; Logger . logStackTrace ( e ) ; System . exit ( 0 ) ; } String [ ] result = Species . runInChIProcess ( new File ( molPath ) , new File ( "InChI//species.txt" ) ) ; String InChI3D = result [ 0 ] ; if ( InChI3D . startsWith ( InChI ) ) { return true ; }

Fix:
molPath = ( ( directory + "//" ) + name ) + ".mol" ;