Buggy code:
public class CSharp extends MatchingTask { private static final String EXE_NAME = "csc" ; private static final String FILE_EXT = "cs" ; private static final String FILE_PATTERN = "**//*." + ( CSharp . FILE_EXT ) ; private static final String DEFAULT_REFERENCE_LIST = "Accessibility.dll;" + ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( "cscompmgd.dll;" + "CustomMarshalers.dll;" ) + "IEExecRemote.dll;" ) + "IEHost.dll;" ) + "IIEHost.dll;" ) + "ISymWrapper.dll;" ) + "Microsoft.JScript.dll;" ) + "Microsoft.VisualBasic.dll;" ) + "Microsoft.VisualC.dll;" ) + "Microsoft.Vsa.dll;" ) + "Mscorcfg.dll;" ) + "RegCode.dll;" ) + "System.Configuration.Install.dll;" ) + "System.Data.dll;" ) + "System.Design.dll;" ) + "System.DirectoryServices.dll;" ) + "System.EnterpriseServices.dll;" ) + "System.dll;" ) + "System.Drawing.Design.dll;" ) + "System.Drawing.dll;" ) + "System.Management.dll;" ) + "System.Messaging.dll;" ) + "System.Runtime.Remoting.dll;" ) + "System.Runtime.Serialization.Formatters.Soap.dll;" ) + "System.Security.dll;" ) + "System.ServiceProcess.dll;" ) + "System.Web.dll;" ) + "System.Web.RegularExpressions.dll;" ) + "System.Web.Services.dll;" ) + "System.Windows.Forms.dll;" ) + "System.XML.dll;" ) ; private boolean m_utf8output ; private boolean m_fullpaths = true ; private boolean m_debug = true ; private File m_docFile ; private String m_extraOptions ; private boolean m_includeDefaultReferences = true ; private boolean m_incremental ; private String m_mainClass ; private boolean m_optimize ; private File m_outputFile ; private Path m_referenceFiles ; private String m_references ; private String m_targetType ; private boolean m_unsafe ; private File m_win32icon ; private File m_win32res ; private String m_additionalModules ; private String m_definitions ; private File m_destDir ; private File m_srcDir ; private int m_warnLevel = 3 ; public CSharp ( ) throws TaskException { } public void setAdditionalModules ( final String additionalModules ) { } public void setDebug ( final boolean debug ) { } public void setDefinitions ( final String definitions ) { } public void setDestDir ( final File destDir ) { } public void setDocFile ( final File docFile ) { } public void setExtraOptions ( final String extraOptions ) { } public void setFullPaths ( final boolean fullpaths ) { } public void setIncludeDefaultReferences ( final boolean includeDefaultReferences ) { } public void setIncremental ( final boolean incremental ) { } public void setMainClass ( final String mainClass ) { } public void setOptimize ( final boolean optimize ) { } public void setOutputFile ( final File outputFile ) { } public void setReferenceFiles ( final Path path ) throws TaskException { if ( null == ( m_referenceFiles ) ) { m_referenceFiles = new Path ( ) ; } <START_BUG> m_referenceFiles . addPath ( path ) ; <END_BUG> } public void setReferences ( final String references ) { } public void setSrcDir ( final File srcDir ) { } public void setTargetType ( final String targetType ) throws TaskException { } public void setUnsafe ( final boolean unsafe ) { } public void setUtf8Output ( final boolean enabled ) { } public void setWarnLevel ( final int warnLevel ) { } public void setWin32Icon ( final File fileName ) { } public void setWin32Res ( final File win32res ) { } public void execute ( ) throws TaskException { } private void addArgument ( final Commandline cmd , final String argument ) { } private String getAdditionalModulesParameter ( ) { } private String getDebugParameter ( ) { } private String getDefaultReferenceParameter ( ) { } private String getDefinitionsParameter ( ) { } private String getDocFileParameter ( ) { } private String getExtraOptionsParameter ( ) { } private String getFullPathsParameter ( ) { } private String getIncludeDefaultReferencesParameter ( ) { } private String getIncrementalParameter ( ) { } private String getMainClassParameter ( ) { } private String getOptimizeParameter ( ) { } private String getOutputFileParameter ( ) { } private String getReferencesParameter ( ) { } private String getTargetTypeParameter ( ) { } private String getUnsafeParameter ( ) { } private String getUtf8OutpuParameter ( ) { } private String getWarnLevelParameter ( ) { } private String getWin32IconParameter ( ) { } private String getWin32ResParameter ( ) { } private boolean notEmpty ( final String string ) { } }

Fix:
m_referenceFiles . add ( path ) ;