Buggy code:
public class JDTCompilerAdapter extends DefaultCompilerAdapter { private static final char [ ] SEPARATOR_CHARS = new char [ ] { '//' , '\\' } ; private static final char [ ] ADAPTER_PREFIX = "#ADAPTER#" . toCharArray ( ) ; private static final char [ ] ADAPTER_ENCODING = "ENCODING#" . toCharArray ( ) ; private static final char [ ] ADAPTER_ACCESS = "ACCESS#" . toCharArray ( ) ; private static String compilerClass = "org.eclipse.jdt.internal.compiler.batch.Main" ; String logFileName ; Map customDefaultOptions ; private Map fileEncodings = null ; private Map dirEncodings = null ; private List accessRules = null ; public boolean execute ( ) throws BuildException { } protected Commandline setupJavacCommand ( ) throws BuildException { } private String [ ] processCompilerArguments ( Class javacClass ) { } private void checkCompilerArgs ( String [ ] args ) { for ( int i = 0 ; i < ( args . length ) ; i ++ ) { if ( ( args [ i ] . charAt ( 0 ) ) == '@' ) { try { char [ ] content = Util . getFileCharContent ( new File ( args [ i ] . substring ( 1 ) ) , null ) ; int offset = 0 ; int prefixLength = JDTCompilerAdapter . ADAPTER_PREFIX . length ; while ( ( offset = CharOperation . indexOf ( JDTCompilerAdapter . ADAPTER_PREFIX , content , true , offset ) ) > ( - 1 ) ) { int start = offset + prefixLength ; int end = CharOperation . indexOf ( '\n' , content , start ) ; if ( end == ( - 1 ) ) end = content . length ; while ( CharOperation . isWhitespace ( content [ end ] ) ) { end -- ; } if ( CharOperation . equals ( JDTCompilerAdapter . ADAPTER_ENCODING , content , start , ( start + ( JDTCompilerAdapter . ADAPTER_ENCODING . length ) ) ) ) { CharOperation . replace ( content , JDTCompilerAdapter . SEPARATOR_CHARS , File . separatorChar , start , ( end + 1 ) ) ; start += JDTCompilerAdapter . ADAPTER_ENCODING . length ; int encodeStart = CharOperation . lastIndexOf ( '[' , content , start , end ) ; if ( ( start < encodeStart ) && ( encodeStart < end ) ) { boolean isFile = CharOperation . equals ( SuffixConstants . SUFFIX_java , content , ( encodeStart - 5 ) , encodeStart , false ) ; String str = String . valueOf ( content , start , ( encodeStart - start ) ) ; String enc = String . valueOf ( content , encodeStart , ( ( end - encodeStart ) + 1 ) ) ; if ( isFile ) { if ( ( fileEncodings ) == null ) fileEncodings = new HashMap ( ) ; fileEncodings . put ( str , enc ) ; } else { if ( ( dirEncodings ) == null ) dirEncodings = new HashMap ( ) ; dirEncodings . put ( str , enc ) ; } } } else if ( CharOperation . equals ( JDTCompilerAdapter . ADAPTER_ACCESS , content , start , ( start + ( JDTCompilerAdapter . ADAPTER_ACCESS . length ) ) ) ) { start += JDTCompilerAdapter . ADAPTER_ACCESS . length ; int accessStart = CharOperation . indexOf ( '[' , content , start , end ) ; <START_BUG> CharOperation . replace ( content , JDTCompilerAdapter . SEPARATOR_CHARS , File . separatorChar , start , ( accessStart + 1 ) ) ; <END_BUG> if ( ( start < accessStart ) && ( accessStart < end ) ) { String path = String . valueOf ( content , start , ( accessStart - start ) ) ; String access = String . valueOf ( content , accessStart , ( ( end - accessStart ) + 1 ) ) ; if ( ( accessRules ) == null ) accessRules = new ArrayList ( ) ; accessRules . add ( path ) ; accessRules . add ( access ) ; } } offset = end ; } } catch ( IOException e ) { } } } } private void createClasspathArgument ( Commandline cmd , Path classpath ) { } protected void logAndAddFilesToCompile ( Commandline cmd ) { } private void addExtdirs ( Path extDirs , Path classpath ) { } }

Fix:
CharOperation . replace ( content , JDTCompilerAdapter . SEPARATOR_CHARS , File . separatorChar , start , accessStart ) ;