Buggy code:
public class Configuration { public static final double EVALUE_LIMIT = 0.0024 ; private File proteinDatabase ; private File inputDir ; private File resultDir ; private File xmlDir ; private File xmlPrsmDir ; private File xmlProteinsDir ; private File datasetDir ; private File inputData ; private File xmlScansDir ; private String mod = null ; public Configuration ( String [ ] arg1 , String ... arg2 ) { } public Configuration ( String ... args ) { } private void init ( String [ ] args ) { } public File getInputDir ( ) { } public File getXmlPrsmDir ( ) { } private Map < Integer , Integer > spectrums = new HashMap < Integer , Integer > ( ) ; private double ppmCoef = 5.0 // 1000000.0 ; public double getPpmCoef ( ) { } public double [ ] getEdgeLimits ( Peak peak , Peak next ) { } private File createDir ( String name ) { } private File createDir ( File parent , String name ) { } public File getSpectrumsFile ( ) { } public File getProteinDatabaseFile ( ) { } public List < Protein > getProteins ( ) throws Exception { } public Map < Integer , Integer > getMSAlignResults ( ) throws IOException { } public Map < Integer , Integer > getBadMSAlignResults ( ) throws IOException { } private Map < Integer , Integer > badMSAlignResults = new HashMap < Integer , Integer > ( ) ; private Map < Integer , Double > evalues = new HashMap < Integer , Double > ( ) ; public Map < Integer , Double > getEvalues ( ) { } public Map < Integer , List < Peak > > getMSAlignPeaks ( Map < Integer , Scan > scans ) throws IOException { } public Map < Integer , double [ ] > getAnnotatedSpectrums ( ) throws IOException { BufferedReader input = ReaderUtil . createInputReader ( new File ( inputDir , "result_table.txt" ) ) ; Map < Integer , double [ ] > ans = new HashMap < Integer , double [ ] > ( ) ; String s ; while ( ( s = input . readLine ( ) ) != null ) { String [ ] data = s . split ( "[\t]" ) ; int scanId = Integer . parseInt ( data [ 5 ] ) ; spectrums . put ( Integer . parseInt ( data [ 2 ] ) , scanId ) ; String match = data [ ( ( data . length ) - 8 ) ] ; List < Double > values = new ArrayList < Double > ( ) ; int brackets = 0 ; match = match . substring ( ( ( match . indexOf ( "." ) ) + 1 ) , match . lastIndexOf ( "." ) ) ; match = match . replaceAll ( "L" , "I" ) ; double mass = 0 ; int cur = 0 ; boolean isWall = false ; while ( cur < ( match . length ( ) ) ) { if ( brackets == 0 ) { values . add ( ( isWall ? Integer . MIN_VALUE : mass ) ) ; } char ch = match . charAt ( cur ) ; switch ( ch ) { case '[' : int nextCur = match . indexOf ( ']' , cur ) ; <START_BUG> mass += Double . parseDouble ( match . substring ( ( cur + 1 ) , nextCur ) ) ; <END_BUG> cur = nextCur ; isWall = false ; break ; case '(' : brackets ++ ; isWall = true ; break ; case ')' : brackets -- ; break ; default : mass += Acid . getAcid ( ch ) . getMass ( ) ; } cur ++ ; } values . add ( mass ) ; double [ ] spectrum = new double [ values . size ( ) ] ; for ( int i = 0 ; i < ( spectrum . length ) ; i ++ ) { spectrum [ i ] = values . get ( i ) ; } ans . put ( scanId , spectrum ) ; } return ans ; } public Map < Integer , Map < Double , String > > getMSAlignData ( ) throws IOException { } public File getScanXmlFile ( Scan scan ) { } public File getModifiedScansDir ( ) { } public Map < Integer , Scan > getScans ( ) throws IOException { } }

Fix:
mass += Double . parseDouble ( match . substring ( ( cur + 1 ) , nextCur ) . replaceAll ( "," , "." ) ) ;