nus-yam/ex-repair huggingface dataset:
Buggy code:
public class ExceptionHandlingFlowContext extends FlowContext { public ReferenceBinding [ ] handledExceptions ; public static final int BitCacheSize = 32 ; int [ ] isReached ; int [ ] isNeeded ; UnconditionalFlowInfo [ ] initsOnExceptions ; ObjectCache indexes = new ObjectCache ( ) ; boolean isMethodContext ; public UnconditionalFlowInfo initsOnReturn ; public ArrayList extendedExceptions ; public ExceptionHandlingFlowContext ( FlowContext parent , AstNode associatedNode , ReferenceBinding [ ] handledExceptions , BlockScope scope , UnconditionalFlowInfo flowInfo ) { } public void complainIfUnusedExceptionHandlers ( AstNode [ ] exceptionHandlers , BlockScope scope , TryStatement tryStatement ) { } public String individualToString ( ) { } public UnconditionalFlowInfo initsOnException ( ReferenceBinding exceptionType ) { } public UnconditionalFlowInfo initsOnReturn ( ) { } public void recordHandlingException ( ReferenceBinding exceptionType , UnconditionalFlowInfo flowInfo , TypeBinding raisedException , AstNode invocationSite , boolean wasAlreadyDefinitelyCaught ) { } public void recordReturnFrom ( FlowInfo flowInfo ) { if ( ! ( flowInfo . isReachable ( ) ) ) return ; if ( ( initsOnReturn ) == ( FlowInfo . DEAD_END ) ) { initsOnReturn = flowInfo . copy ( ) . unconditionalInits ( ) ; } else { <START_BUG> initsOnReturn . mergedWith ( flowInfo . unconditionalInits ( ) ) ; <END_BUG> } } public void mergeUnhandledException ( TypeBinding newException ) { } }

Fix:
initsOnReturn = initsOnReturn . mergedWith ( flowInfo . unconditionalInits ( ) ) ;
Buggy code:
public class OpenBitSet implements Serializable , Cloneable { protected long [ ] bits ; protected int wlen ; public OpenBitSet ( long numBits ) { } public OpenBitSet ( ) { } public OpenBitSet ( long [ ] bits , int numWords ) { } public long capacity ( ) { } public long size ( ) { } public boolean isEmpty ( ) { } public long [ ] getBits ( ) { } public void setBits ( long [ ] bits ) { } public int getNumWords ( ) { } public void setNumWords ( int nWords ) { } public boolean get ( int index ) { } public boolean fastGet ( int index ) { } public boolean get ( long index ) { } public boolean fastGet ( long index ) { } public int getBit ( int index ) { } public void set ( long index ) { } public void fastSet ( int index ) { } public void fastSet ( long index ) { } protected int expandingWordNum ( long index ) { } public void fastClear ( int index ) { } public void fastClear ( long index ) { } public void clear ( long index ) { } public boolean getAndSet ( int index ) { } public boolean getAndSet ( long index ) { } public void fastFlip ( int index ) { } public void fastFlip ( long index ) { } public void flip ( long index ) { } public boolean flipAndGet ( int index ) { } public boolean flipAndGet ( long index ) { } public void flip ( long startIndex , long endIndex ) { } public long cardinality ( ) { } public static long intersectionCount ( OpenBitSet a , OpenBitSet b ) { } public static long unionCount ( OpenBitSet a , OpenBitSet b ) { } public static long andNotCount ( OpenBitSet a , OpenBitSet b ) { } public static long xorCount ( OpenBitSet a , OpenBitSet b ) { } public int nextSetBit ( int index ) { } public long nextSetBit ( long index ) { } public Object clone ( ) { } public void intersect ( OpenBitSet other ) { } public void union ( OpenBitSet other ) { } public void remove ( OpenBitSet other ) { } public void xor ( OpenBitSet other ) { } public void and ( OpenBitSet other ) { } public void or ( OpenBitSet other ) { } public void andNot ( OpenBitSet other ) { } public boolean intersects ( OpenBitSet other ) { } public void ensureCapacityWords ( int numWords ) { } public void ensureCapacity ( long numBits ) { } public void trimTrailingZeros ( ) { } public static int bits2words ( long numBits ) { } public boolean equals ( Object o ) { if ( ( this ) == o ) return true ; <START_BUG> if ( ! ( ( this ) instanceof OpenBitSet ) ) <END_BUG> return false ; OpenBitSet a ; OpenBitSet b = ( ( OpenBitSet ) ( o ) ) ; if ( ( b . wlen ) > ( this . wlen ) ) { a = b ; b = this ; } else { a = this ; } for ( int i = ( a . wlen ) - 1 ; i >= ( b . wlen ) ; i -- ) { if ( ( a . bits [ i ] ) != 0 ) return false ; } for ( int i = ( b . wlen ) - 1 ; i >= 0 ; i -- ) { if ( ( a . bits [ i ] ) != ( b . bits [ i ] ) ) return false ; } return true ; } public int hashCode ( ) { } }

Fix:
if ( ! ( o instanceof OpenBitSet ) )
Buggy code:
public class Snippet161 { public static void main ( String [ ] args ) { final String html = "<html><title>Snippet<//title><body><p<seq2seq4repair_space>id='myid'>Best<seq2seq4repair_space>Friends<//p><p<seq2seq4repair_space>id='myid2'>Cat<seq2seq4repair_space>and<seq2seq4repair_space>Dog<//p><//body><//html>" ; Display display = new Display ( ) ; final Shell shell = new Shell ( display ) ; shell . setLayout ( new FillLayout ( ) ) ; final Browser browser = new Browser ( shell , SWT . BORDER ) ; Composite comp = new Composite ( shell , SWT . NONE ) ; comp . setLayout ( new FillLayout ( SWT . VERTICAL ) ) ; final Text text = new Text ( comp , SWT . MULTI ) ; <START_BUG> text . setText ( ( "var<seq2seq4repair_space>newNode<seq2seq4repair_space>=<seq2seq4repair_space>document.createElement(\'P\');<seq2seq4repair_space>\r\n" + ( ( ( ( "var<seq2seq4repair_space>text<seq2seq4repair_space>=<seq2seq4repair_space>document.createTextNode(\'At<seq2seq4repair_space>least<seq2seq4repair_space>when<seq2seq4repair_space>I<seq2seq4repair_space>am<seq2seq4repair_space>around\');\r\n" + "newNode.appendChild(text);\r\n" ) + "document.getElementById(\'myid\').appendChild(newNode);\r\n" ) + "\r\n" ) + "document.bgColor=Math.round(Math.random()*0xffffff);" ) ) ) ; <END_BUG> final Button button = new Button ( comp , SWT . PUSH ) ; button . setText ( "Execute<seq2seq4repair_space>Script" ) ; button . addListener ( Selection , new Listener ( ) { public void handleEvent ( Event event ) { boolean result = browser . execute ( text . getText ( ) ) ; if ( ! result ) { System . out . println ( "Script<seq2seq4repair_space>was<seq2seq4repair_space>not<seq2seq4repair_space>executed." ) ; } } } ) ; browser . setText ( html ) ; shell . open ( ) ; while ( ! ( shell . isDisposed ( ) ) ) { if ( ! ( display . readAndDispatch ( ) ) ) display . sleep ( ) ; } display . dispose ( ) ; } }

Fix:
text . setText ( ( "var<seq2seq4repair_space>newNode<seq2seq4repair_space>=<seq2seq4repair_space>document.createElement(\'P\');<seq2seq4repair_space>\r\n" + ( ( ( ( "var<seq2seq4repair_space>text<seq2seq4repair_space>=<seq2seq4repair_space>document.createTextNode(\'At<seq2seq4repair_space>least<seq2seq4repair_space>when<seq2seq4repair_space>I<seq2seq4repair_space>am<seq2seq4repair_space>around\');\r\n" + "newNode.appendChild(text);\r\n" ) + "document.getElementById(\'myid\').appendChild(newNode);\r\n" ) + "\r\n" ) + "document.bgColor='yellow';" ) ) ) ;
Buggy code:
public abstract class AbstractTestComparator < T > extends AbstractTestObject { public AbstractTestComparator ( String testName ) { } public abstract List < T > getComparableObjectsOrdered ( ) { } @ Override public abstract Comparator < T > makeObject ( ) { } @ Override public boolean supportsEmptyCollections ( ) { } @ Override public boolean supportsFullCollections ( ) { } @ Override public String getCompatibilityVersion ( ) { } protected void reverseObjects ( List < ? > list ) { } protected void randomizeObjects ( List < ? > list ) { } protected void sortObjects ( List < T > list , Comparator < ? super T > comparator ) { } public void testEmptyListSort ( ) { } public void testReverseListSort ( ) { } public void testRandomListSort ( ) { } public void testComparatorIsSerializable ( ) { } public String getCanonicalComparatorName ( Object object ) { StringBuilder retval = new StringBuilder ( ) ; <START_BUG> retval . append ( "data//test//" ) ; <END_BUG> String colName = object . getClass ( ) . getName ( ) ; colName = colName . substring ( ( ( colName . lastIndexOf ( "." ) ) + 1 ) , colName . length ( ) ) ; retval . append ( colName ) ; retval . append ( ".version" ) ; retval . append ( getCompatibilityVersion ( ) ) ; retval . append ( ".obj" ) ; return retval . toString ( ) ; } @ SuppressWarnings ( "unchecked" ) public void testComparatorCompatibility ( ) throws IOException , ClassNotFoundException { } }

Fix:
retval . append ( TEST_DATA_PATH ) ;
Buggy code:
public class PageExpiredErrorPage extends WebPage { private static final long serialVersionUID = 1L ; public PageExpiredErrorPage ( ) { } @ Override protected void configureResponse ( ) { super . configureResponse ( ) ; <START_BUG> getWebRequestCycle ( ) . getWebResponse ( ) . getHttpServletResponse ( ) . setStatus ( SC_NOT_FOUND ) ; <END_BUG> } @ Override public boolean isVersioned ( ) { } @ Override public boolean isErrorPage ( ) { } }

Fix:
getRequestCycle ( ) . getWebResponse ( ) . getHttpServletResponse ( ) . setStatus ( SC_NOT_FOUND ) ;
Buggy code:
public class SessionView extends Activity { private String LOG_TAG = "SessionView<seq2seq4repair_space>Activity" ; private Session session ; @ Override public void onCreate ( Bundle savedInstanceState ) { super . onCreate ( savedInstanceState ) ; Bundle b = this . getIntent ( ) . getExtras ( ) ; if ( b != null ) { this . session = ( ( Session ) ( b . getSerializable ( Constants . SESSIONTYPE ) ) ) ; Log . d ( LOG_TAG , "Got<seq2seq4repair_space>guide<seq2seq4repair_space>through<seq2seq4repair_space>intent<seq2seq4repair_space>Serializable" ) ; } else { Log . e ( LOG_TAG , "Unable<seq2seq4repair_space>to<seq2seq4repair_space>get<seq2seq4repair_space>guide<seq2seq4repair_space>through<seq2seq4repair_space>Intent" ) ; } <START_BUG> setContentView ( sessions ) ; <END_BUG> } }

Fix:
setContentView ( session_view ) ;
Buggy code:
@ Service ( "tmdbScanner" ) public class TheMovieDbScanner implements IFilmographyScanner , IMovieScanner { public static final String SCANNER_ID = "tmdb" ; private static final Logger LOG = LoggerFactory . getLogger ( TheMovieDbScanner . class ) ; private static final String FROM_WIKIPEDIA = "From<seq2seq4repair_space>Wikipedia,<seq2seq4repair_space>the<seq2seq4repair_space>free<seq2seq4repair_space>encyclopedia" ; private static final String WIKIPEDIA_DESCRIPTION_ABOVE = "Description<seq2seq4repair_space>above<seq2seq4repair_space>from<seq2seq4repair_space>the<seq2seq4repair_space>Wikipedia" ; @ Autowired private OnlineScannerService onlineScannerService ; @ Autowired private ConfigServiceWrapper configServiceWrapper ; @ Autowired private TheMovieDbApiWrapper tmdbApiWrapper ; @ Override public String getScannerName ( ) { } @ PostConstruct public void init ( ) { } @ Override public String getMovieId ( VideoData videoData ) { } private String getMovieId ( VideoData videoData , boolean throwTempError ) { } @ Override public ScanResult scan ( VideoData videoData ) { } @ Override public String getPersonId ( Person person ) { } private String getPersonId ( Person person , boolean throwTempError ) { } @ Override public ScanResult scan ( Person person ) { } private static String cleanBiography ( final String bio ) { } @ Override public boolean isFilmographyScanEnabled ( ) { } @ Override public ScanResult scanFilmography ( Person person ) { } private FilmParticipation convertMovieCreditToFilm ( CreditMovieBasic credit , Person person , JobType jobType ) { } private static JobType retrieveJobType ( String department ) { <START_BUG> switch ( department ) { <END_BUG> case "writing" : return JobType . WRITER ; case "directing" : return JobType . DIRECTOR ; case "production" : return JobType . PRODUCER ; case "sound" : return JobType . SOUND ; case "camera" : return JobType . CAMERA ; case "art" : return JobType . ART ; case "editing" : return JobType . EDITING ; case "costume<seq2seq4repair_space>&<seq2seq4repair_space>make-up" : return JobType . COSTUME_MAKEUP ; case "crew" : return JobType . CREW ; case "visual<seq2seq4repair_space>effects" : return JobType . EFFECTS ; case "lighting" : return JobType . LIGHTING ; default : TheMovieDbScanner . LOG . debug ( "Unknown<seq2seq4repair_space>department<seq2seq4repair_space>'{}'" , department ) ; return JobType . UNKNOWN ; } } @ Override public boolean scanNFO ( String nfoContent , InfoDTO dto , boolean ignorePresentId ) { } }

Fix:
switch ( department . toLowerCase ( ) ) {
Buggy code:
public class CSVPrinter { private final Appendable out ; private final CSVFormat format ; private boolean newLine = true ; public CSVPrinter ( Appendable out , CSVFormat format ) { } public void println ( ) throws IOException { } public void flush ( ) throws IOException { } public void println ( String ... values ) throws IOException { } public void printComment ( String comment ) throws IOException { <START_BUG> if ( format . isCommentingDisabled ( ) ) { <END_BUG> return ; } if ( ! ( newLine ) ) { println ( ) ; } out . append ( format . getCommentStart ( ) ) ; out . append ( '<seq2seq4repair_space>' ) ; for ( int i = 0 ; i < ( comment . length ( ) ) ; i ++ ) { char c = comment . charAt ( i ) ; switch ( c ) { case '\r' : if ( ( ( i + 1 ) < ( comment . length ( ) ) ) && ( ( comment . charAt ( ( i + 1 ) ) ) == '\n' ) ) { i ++ ; } case '\n' : println ( ) ; out . append ( format . getCommentStart ( ) ) ; out . append ( '<seq2seq4repair_space>' ) ; break ; default : out . append ( c ) ; break ; } } println ( ) ; } private void print ( CharSequence value , int offset , int len ) throws IOException { } void printSep ( ) throws IOException { } void printAndEscape ( CharSequence value , int offset , int len ) throws IOException { } void printAndEncapsulate ( CharSequence value , int offset , int len ) throws IOException { } public void print ( String value , boolean checkForEscape ) throws IOException { } public void print ( String value ) throws IOException { } }

Fix:
if ( ! ( format . isCommentingEnabled ( ) ) ) {
Buggy code:
public class CoolBar extends Composite { CoolItem [ ] items ; CoolItem [ ] originalItems ; boolean locked ; boolean ignoreResize ; static final int ReBarProc ; static final TCHAR ReBarClass = new TCHAR ( 0 , OS . REBARCLASSNAME , true ) ; static final int SEPARATOR_WIDTH = 2 ; static final int MAX_WIDTH = 32767 ; public CoolBar ( Composite parent , int style ) { } int callWindowProc ( int hwnd , int msg , int wParam , int lParam ) { } static int checkStyle ( int style ) { } protected void checkSubclass ( ) { } public Point computeSize ( int wHint , int hHint , boolean changed ) { } void createHandle ( ) { } void createItem ( CoolItem item , int index ) { } void createWidget ( ) { } void destroyItem ( CoolItem item ) { } void drawThemeBackground ( int hDC , int hwnd , RECT rect ) { } int getMargin ( int index ) { } Control findThemeControl ( ) { } public CoolItem getItem ( int index ) { } public int getItemCount ( ) { } public int [ ] getItemOrder ( ) { } public CoolItem [ ] getItems ( ) { } public Point [ ] getItemSizes ( ) { } int getLastIndexOfRow ( int index ) { } boolean isLastItemOfRow ( int index ) { } public boolean getLocked ( ) { } public int [ ] getWrapIndices ( ) { } public int indexOf ( CoolItem item ) { } void resizeToPreferredWidth ( int index ) { } void resizeToMaximumWidth ( int index ) { } void releaseChildren ( boolean destroy ) { if ( ( items ) != null ) { for ( int i = 0 ; i < ( items . length ) ; i ++ ) { CoolItem item = items [ i ] ; if ( ( item != null ) && ( ! ( item . isDisposed ( ) ) ) ) { <START_BUG> item . releaseChildren ( false ) ; <END_BUG> } } items = null ; } super . releaseChildren ( destroy ) ; } void removeControl ( Control control ) { } void setBackgroundPixel ( int pixel ) { } void setForegroundPixel ( int pixel ) { } void setItemColors ( int foreColor , int backColor ) { } public void setItemLayout ( int [ ] itemOrder , int [ ] wrapIndices , Point [ ] sizes ) { } void setItemOrder ( int [ ] itemOrder ) { } void setItemSizes ( Point [ ] sizes ) { } public void setLocked ( boolean locked ) { } public void setWrapIndices ( int [ ] indices ) { } int widgetStyle ( ) { } TCHAR windowClass ( ) { } int windowProc ( ) { } LRESULT WM_COMMAND ( int wParam , int lParam ) { } LRESULT WM_ERASEBKGND ( int wParam , int lParam ) { } LRESULT WM_NOTIFY ( int wParam , int lParam ) { } LRESULT WM_SETREDRAW ( int wParam , int lParam ) { } LRESULT WM_SIZE ( int wParam , int lParam ) { } LRESULT wmNotifyChild ( int wParam , int lParam ) { } }

Fix:
item . release ( false ) ;
Buggy code:
public class ProcessTypeHandler implements OperationStepHandler { public static final ProcessTypeHandler MASTER = new ProcessTypeHandler ( true ) ; public static final ProcessTypeHandler SLAVE = new ProcessTypeHandler ( false ) ; public static final String DOMAIN_CONTROLLER_TYPE = "Domain<seq2seq4repair_space>Controller" ; public static final String HOST_CONTROLLER_TYPE = "Host<seq2seq4repair_space>Controller" ; private final boolean master ; private ProcessTypeHandler ( final boolean master ) { } @ Override public void execute ( OperationContext context , ModelNode operation ) throws OperationFailedException { context . getResult ( ) . set ( ( master ? ProcessTypeHandler . DOMAIN_CONTROLLER_TYPE : ProcessTypeHandler . HOST_CONTROLLER_TYPE ) ) ; <START_BUG> context . completeStep ( ) ; <END_BUG> } }

Fix:
context . stepCompleted ( ) ;
Buggy code:
public class QualifiedSuperReference extends QualifiedThisReference { public QualifiedSuperReference ( TypeReference name , int pos , int sourceEnd ) { } public boolean isSuper ( ) { } public boolean isThis ( ) { } public StringBuffer printExpression ( int indent , StringBuffer output ) { } public TypeBinding resolveType ( BlockScope scope ) { if ( ( ( this . bits ) & ( ASTNode . ParenthesizedMASK ) ) != 0 ) { scope . problemReporter ( ) . invalidParenthesizedExpression ( this ) ; return null ; } super . resolveType ( scope ) ; if ( ( currentCompatibleType ) == null ) return null ; <START_BUG> if ( scope . isJavaLangObject ( currentCompatibleType ) ) { <END_BUG> scope . problemReporter ( ) . cannotUseSuperInJavaLangObject ( this ) ; return null ; } return this . resolvedType = currentCompatibleType . superclass ( ) ; } public void traverse ( ASTVisitor visitor , BlockScope blockScope ) { } }

Fix:
if ( ( currentCompatibleType . id ) == ( T_Object ) ) {
Buggy code:
public class Node { private static Logger LOGGER = LoggerFactory . getLogger ( Node . class ) ; private final String name ; private Distribution distribution ; private NodeLinkType linkType = NodeLinkType . NONE ; private List < String > levels ; private String evidence ; private BayesNet network ; private List < Link > inLinks ; private List < Link > outLinks ; public Node ( String name ) { } public Node ( String name , String [ ] levels ) { } public Node ( String name , String [ ] levels , Integer [ ] distribution ) { } public Node ( String name , String [ ] levels , NodeLinkType linkType ) { } public Node ( String name , String [ ] levels , Double [ ] distribution ) { } public String getName ( ) { } public Distribution getDistribution ( ) { } public String getEvidence ( ) { } public void setEvidence ( String level ) { Ensure . NotNull ( level , "evidence" ) ; if ( level . equals ( getEvidence ( ) ) ) { return ; } <START_BUG> Node . LOGGER . trace ( "Evidence<seq2seq4repair_space>%s<seq2seq4repair_space>is<seq2seq4repair_space>set<seq2seq4repair_space>to<seq2seq4repair_space>Node<seq2seq4repair_space>%s" , level , this . getName ( ) ) ; <END_BUG> int index = getLevelIndex ( level ) ; this . evidence = level ; List < Double > inference = new ArrayList < > ( ) ; for ( int i = 0 ; i < ( getLevels ( ) . size ( ) ) ; i ++ ) { inference . add ( ( i == index ? 1.0 : 0.0 ) ) ; } setInference ( inference ) ; } public void clearEvidence ( ) { } public void setDistribution ( Distribution distribution ) { } public final void setDistribution ( Double ... args ) { } public final void setDistribution ( Integer ... args ) { } public NodeLinkType getLinkType ( ) { } public void setLinkType ( NodeLinkType linkType ) { } public List < String > getLevels ( ) { } public void setLevels ( List < String > levels ) { } public final void setLevels ( String ... levels ) { } public BayesNet getNetwork ( ) { } void setNetwork ( BayesNet network ) { } public List < Link > getInLinks ( ) { } public List < Link > getOutLinks ( ) { } public List < Double > getInference ( ) { } public void setInference ( List < Double > inference ) { } public Double getInference ( String level ) { } public String getMostProbableLevel ( ) { } private int getLevelIndex ( String level ) throws IllegalArgumentException { } private Distribution generateAverageDistributionFromLevels ( ) { } @ Override public int hashCode ( ) { } @ Override public boolean equals ( Object obj ) { } @ Override public String toString ( ) { } }

Fix:
Node . LOGGER . trace ( "Evidence<seq2seq4repair_space>{}<seq2seq4repair_space>is<seq2seq4repair_space>set<seq2seq4repair_space>to<seq2seq4repair_space>Node<seq2seq4repair_space>{}" , level , this . getName ( ) ) ;
Buggy code:
public class MidiToProjectConverter { private static final MusicalInstrument DEFAULT_INSTRUMENT = MusicalInstrument . ACOUSTIC_GRAND_PIANO ; private int beatsPerMinute ; public MidiToProjectConverter ( ) { } public Project convertMidiFileToProject ( File file ) throws IOException , MidiException { } private void validateMidiFile ( MidiFile midiFile ) throws MidiException { } private Project convertMidi ( MidiFile midi ) { } private Track createTrack ( MidiTrack midiTrack ) { MusicalInstrument instrument = getInstrumentFromMidiTrack ( midiTrack ) ; <START_BUG> Track track = new Track ( MusicalKey . VIOLIN , instrument , Project . DEFAULT_BEATS_PER_MINUTE ) ; <END_BUG> Iterator < MidiEvent > it = midiTrack . getEvents ( ) . iterator ( ) ; while ( it . hasNext ( ) ) { MidiEvent midiEvent = it . next ( ) ; if ( midiEvent instanceof NoteOn ) { NoteOn noteOn = ( ( NoteOn ) ( midiEvent ) ) ; long tick = noteOn . getTick ( ) ; NoteName noteName = NoteName . getNoteNameFromMidiValue ( noteOn . getNoteValue ( ) ) ; NoteEvent noteEvent = new NoteEvent ( noteName , true ) ; track . addNoteEvent ( tick , noteEvent ) ; } else if ( midiEvent instanceof NoteOff ) { NoteOff noteOff = ( ( NoteOff ) ( midiEvent ) ) ; long tick = noteOff . getTick ( ) ; NoteName noteName = NoteName . getNoteNameFromMidiValue ( noteOff . getNoteValue ( ) ) ; NoteEvent noteEvent = new NoteEvent ( noteName , false ) ; track . addNoteEvent ( tick , noteEvent ) ; } else if ( midiEvent instanceof Tempo ) { Tempo tempo = ( ( Tempo ) ( midiEvent ) ) ; beatsPerMinute = ( ( int ) ( tempo . getBpm ( ) ) ) ; } } return track ; } private MusicalInstrument getInstrumentFromMidiTrack ( MidiTrack midiTrack ) { } }

Fix:
Track track = new Track ( MusicalKey . VIOLIN , instrument , beatsPerMinute ) ;
Buggy code:
class PatchingHistoryDirArtifact extends AbstractArtifact < PatchingArtifacts . PatchID , PatchingFileArtifact . DirectoryArtifactState > implements PatchingFileArtifact < PatchingArtifacts . PatchID , PatchingFileArtifact . DirectoryArtifactState > { PatchingHistoryDirArtifact ( ) { } @ Override public boolean process ( PatchingArtifacts . PatchID parent , PatchingArtifactProcessor processor ) { <START_BUG> final InstalledIdentity identity = processor . getValidationContext ( ) . getOriginalIdentity ( ) ; <END_BUG> final File history = identity . getInstalledImage ( ) . getPatchHistoryDir ( parent . getPatchID ( ) ) ; final PatchingFileArtifact . DirectoryArtifactState state = new PatchingFileArtifact . DirectoryArtifactState ( history , this ) ; return processor . process ( this , state ) ; } }

Fix:
final InstalledIdentity identity = processor . getValidationContext ( ) . getInstalledIdentity ( ) ;
Buggy code:
public class OStorageRemoteAsynchEventListener implements ORemoteServerEventListener { private OStorageRemote storage ; public OStorageRemoteAsynchEventListener ( final OStorageRemote storage ) { } public void onRequest ( final byte iRequestCode , final Object obj ) { if ( iRequestCode == ( OChannelBinaryProtocol . REQUEST_PUSH_DISTRIB_CONFIG ) ) { <START_BUG> storage . updateClusterConfiguration ( ( ( byte [ ] ) ( obj ) ) ) ; <END_BUG> if ( OLogManager . instance ( ) . isDebugEnabled ( ) ) { synchronized ( storage . getClusterConfiguration ( ) ) { OLogManager . instance ( ) . debug ( this , "Received<seq2seq4repair_space>new<seq2seq4repair_space>cluster<seq2seq4repair_space>configuration:<seq2seq4repair_space>%s" , storage . getClusterConfiguration ( ) . toJSON ( "prettyPrint" ) ) ; } } } } public OStorageRemote getStorage ( ) { } }

Fix:
storage . updateClusterConfiguration ( storage . getCurrentServerURL ( ) , ( ( byte [ ] ) ( obj ) ) ) ;
Buggy code:
public class TestSpansAdvanced2 extends TestSpansAdvanced { IndexSearcher searcher2 ; IndexReader reader2 ; @ Override public void setUp ( ) throws Exception { super . setUp ( ) ; final RandomIndexWriter writer = new RandomIndexWriter ( random ( ) , mDirectory , newIndexWriterConfig ( TEST_VERSION_CURRENT , new org . apache . lucene . analysis . MockAnalyzer ( random ( ) , MockTokenizer . SIMPLE , true , MockTokenFilter . ENGLISH_STOPSET ) ) . setOpenMode ( APPEND ) . setMergePolicy ( newLogMergePolicy ( ) ) . setSimilarity ( new DefaultSimilarity ( ) ) ) ; addDocument ( writer , "A" , "Should<seq2seq4repair_space>we,<seq2seq4repair_space>could<seq2seq4repair_space>we,<seq2seq4repair_space>would<seq2seq4repair_space>we?" ) ; addDocument ( writer , "B" , "It<seq2seq4repair_space>should.<seq2seq4repair_space>Should<seq2seq4repair_space>it?" ) ; addDocument ( writer , "C" , "It<seq2seq4repair_space>shouldn't." ) ; addDocument ( writer , "D" , "Should<seq2seq4repair_space>we,<seq2seq4repair_space>should<seq2seq4repair_space>we,<seq2seq4repair_space>should<seq2seq4repair_space>we." ) ; reader2 = writer . getReader ( ) ; <START_BUG> writer . close ( ) ; <END_BUG> searcher2 = newSearcher ( reader2 ) ; searcher2 . setSimilarity ( new DefaultSimilarity ( ) ) ; } @ Override public void tearDown ( ) throws Exception { } public void testVerifyIndex ( ) throws Exception { } public void testSingleSpanQuery ( ) throws IOException { } public void testMultipleDifferentSpanQueries ( ) throws IOException { } @ Override public void testBooleanQueryWithSpanQueries ( ) throws IOException { } }

Fix:
writer . shutdown ( ) ;
Buggy code:
public class ProductReader { private static final String [ ] FILE_HEADER_MAPPING = new String [ ] { "sku" , "name" , "sdate" } ; public static List < Product > ReadProducts ( String filename , Map < String , Integer > rankMap ) { FileReader fileReader = null ; CSVParser csvFileParser = null ; CSVFormat csvFileFormat = DEFAULT . withHeader ( ProductReader . FILE_HEADER_MAPPING ) ; List products = new ArrayList < Product > ( ) ; try { fileReader = new FileReader ( filename ) ; csvFileParser = new CSVParser ( fileReader , csvFileFormat ) ; List csvRecords = csvFileParser . getRecords ( ) ; <START_BUG> for ( int i = 1 ; i < ( csvRecords . size ( ) ) ; i ++ ) { <END_BUG> CSVRecord record = ( ( CSVRecord ) ( csvRecords . get ( i ) ) ) ; int rank = Product . NO_RANK ; if ( rankMap . containsKey ( record . get ( "sku" ) ) ) { rank = rankMap . get ( record . get ( "sku" ) ) ; } long sdate = new SimpleDateFormat ( "yyyy-MM-dd" ) . parse ( record . get ( "sdate" ) ) . getTime ( ) ; products . add ( new Product ( record . get ( "name" ) , record . get ( "sku" ) , sdate , rank ) ) ; } } catch ( Exception e ) { e . printStackTrace ( ) ; } finally { try { fileReader . close ( ) ; csvFileParser . close ( ) ; } catch ( IOException e ) { System . out . println ( "Error<seq2seq4repair_space>while<seq2seq4repair_space>closing<seq2seq4repair_space>fileReader//csvFileParser<seq2seq4repair_space>!!!" ) ; e . printStackTrace ( ) ; } } return products ; } public static void main ( String [ ] argv ) { } }

Fix:
for ( int i = 0 ; i < ( csvRecords . size ( ) ) ; i ++ ) {
Buggy code:
public interface BundleConverter { <START_BUG> public InputStream convert ( IDirectory parentEba , IFile fileInEba ) throws ConversionException ; <END_BUG> }

Fix:
public BundleConversion convert ( IDirectory parentEba , IFile fileInEba ) throws ConversionException ;
Buggy code:
@ InjectName @ IocBean @ At ( "//do" ) public class LoginModule { @ Inject ( "refer:conf" ) private ZTaskConfig conf ; @ Inject ( "refer:serviceFactory" ) private ZTaskFactory factory ; @ At ( "//login" ) <START_BUG> @ Ok ( ">>://page//message" ) <END_BUG> public void doLogin ( @ Param ( "nm" ) String name , @ Param ( "pwd" ) String password , HttpSession sess ) { User u = factory . users ( ) . verify ( name , password ) ; if ( null == u ) throw U . INVALID_LOGIN ( ) ; sess . setAttribute ( ME , u ) ; sess . setAttribute ( "msg_inter" , ( ( conf . getInt ( "sys-msg-update-interval" , 200 ) ) * 1000 ) ) ; sess . setAttribute ( "rs" , conf . get ( "app-rs" , "" ) ) ; } @ At ( "//logout" ) @ Ok ( ">>://page//login" ) public void doLogout ( HttpSession sess ) { } }

Fix:
@ Ok ( ">>://page//stack" )
Buggy code:
public class KeyBindingService implements IKeyBindingService { private HashMap defIdToAction = new HashMap ( ) ; private String [ ] scopeIds = new String [ ] { IWorkbenchConstants . DEFAULT_ACCELERATOR_SCOPE_ID } ; private WWinKeyBindingService parent ; public KeyBindingService ( WWinKeyBindingService service , PartSite site ) { } public void registerExtendedActions ( ActionDescriptor [ ] actionDescriptors ) { } public String [ ] getScopeIds ( ) { } public void setScopeIds ( String [ ] scopeIds ) throws IllegalArgumentException { } public void registerAction ( IAction action ) { } public void unregisterAction ( IAction action ) { } public IAction getAction ( String definitionId ) { } public String getActiveAcceleratorConfigurationId ( ) { <START_BUG> return Manager . getInstance ( ) . getKeyMachine ( ) . getKeyConfiguration ( ) ; <END_BUG> } public String getActiveAcceleratorScopeId ( ) { } public void setActiveAcceleratorScopeId ( String scopeId ) throws IllegalArgumentException { } public boolean processKey ( KeyEvent event ) { } public void enable ( boolean enable ) { } }

Fix:
return Manager . getInstance ( ) . getKeyMachine ( ) . getConfiguration ( ) ;
Buggy code:
public class NamingExtension implements Extension { public static final String SUBSYSTEM_NAME = "naming" ; public static final String NAMESPACE_1_0 = "urn:jboss:domain:naming:1.0" ; public static final String NAMESPACE_1_1 = "urn:jboss:domain:naming:1.1" ; public static final String NAMESPACE_1_2 = "urn:jboss:domain:naming:1.2" ; public static final String NAMESPACE_1_3 = "urn:jboss:domain:naming:1.3" ; private static final int MANAGEMENT_API_MAJOR_VERSION = 1 ; private static final int MANAGEMENT_API_MINOR_VERSION = 2 ; private static final int MANAGEMENT_API_MICRO_VERSION = 0 ; public static final String RESOURCE_NAME = ( NamingExtension . class . getPackage ( ) . getName ( ) ) + ".LocalDescriptions" ; public static ResourceDescriptionResolver getResourceDescriptionResolver ( final String keyPrefix ) { } @ Override public void initialize ( ExtensionContext context ) { final SubsystemRegistration subsystem = context . registerSubsystem ( NamingExtension . SUBSYSTEM_NAME , NamingExtension . MANAGEMENT_API_MAJOR_VERSION , NamingExtension . MANAGEMENT_API_MINOR_VERSION , NamingExtension . MANAGEMENT_API_MICRO_VERSION ) ; final ManagementResourceRegistration registration = subsystem . registerSubsystemModel ( INSTANCE ) ; <START_BUG> registration . registerOperationHandler ( DESCRIBE , GenericSubsystemDescribeHandler . INSTANCE , GenericSubsystemDescribeHandler . INSTANCE , false , PRIVATE ) ; <END_BUG> registration . registerSubModel ( NamingBindingResourceDefinition . INSTANCE ) ; registration . registerSubModel ( RemoteNamingResourceDefinition . INSTANCE ) ; if ( context . isRuntimeOnlyRegistrationValid ( ) ) { registration . registerOperationHandler ( JNDI_VIEW , JndiViewOperation . INSTANCE , false ) ; } subsystem . registerXMLElementWriter ( NamingSubsystem13Parser . INSTANCE ) ; final TransformersSubRegistration transformersSubRegistration110 = subsystem . registerModelTransformers ( ModelVersion . create ( 1 , 1 , 0 ) , new Naming110SubsystemTransformer ( ) ) ; transformersSubRegistration110 . registerSubResource ( BINDING_PATH , new NameBindingAdd110OperationTransformer ( ) ) ; } @ Override public void initializeParsers ( ExtensionParsingContext context ) { } static ModelNode createAddOperation ( ) { } }

Fix:
registration . registerOperationHandler ( DEFINITION , GenericSubsystemDescribeHandler . INSTANCE ) ;
Buggy code:
public class TypedSet < E > implements Set < E > { final Set < ? > wrappedSet ; final Class < E > elementType ; TypedSet ( Set < ? > wrappedSet , Class < E > elementType ) { } public boolean add ( Object o ) { } public boolean addAll ( Collection < ? extends E > c ) { } public void clear ( ) { } public boolean contains ( Object o ) { } public boolean containsAll ( Collection < ? > c ) { } public boolean isEmpty ( ) { } public Iterator < E > iterator ( ) { } public boolean remove ( Object o ) { } public boolean removeAll ( Collection < ? > c ) { } public boolean retainAll ( Collection < ? > c ) { } public int size ( ) { } public Object [ ] toArray ( ) { } public < E2 > E2 [ ] toArray ( E2 [ ] a ) { int size = wrappedSet . size ( ) ; Class < E2 > componentType = Util . getComponentType ( a ) ; E2 [ ] result = a ; if ( ( a . length ) < size ) { result = Util . createArrayInstance ( componentType , size ) ; } int i = 0 ; for ( Object element : wrappedSet ) { <START_BUG> result [ i ] = componentType . cast ( element ) ; <END_BUG> } return result ; } public boolean equals ( Object obj ) { } public int hashCode ( ) { } }

Fix:
result [ ( i ++ ) ] = componentType . cast ( element ) ;
Buggy code:
@ SuppressWarnings ( "all" ) public class User implements Entity { private String id ; private String name ; private String imageFile ; private double valorationAverage ; private Integer valorationNumber ; private Map < String , Object > myMenus ; private Map < String , Object > participatedMenus ; private Map < String , Object > myChats ; public User ( ) { } public User ( String name , String email , String imageFile ) { } @ Override public String getId ( ) { } public void setId ( String id ) { } public String getName ( ) { } public void setName ( String name ) { } public String getImageFile ( ) { } public void setImageFile ( String imageFile ) { } public Map < String , Object > getMyChats ( ) { } public void setMyChats ( Map < String , Object > myChats ) { } public Map < String , Object > getMyMenus ( ) { } public void setMyMenus ( List < String > myMenus ) { } public Map < String , Object > getParticipatedMenus ( ) { } public void setParticipatedMenus ( List < String > participatedMenus ) { } public double getValorationAverage ( ) { } public void setValorationAverage ( Double valorationAverage ) { } public int getValorationNumber ( ) { } public void setValorationNumber ( int valorationNumber ) { } public void addNewMyMenu ( Menu menu ) { } public void addNewParticipatedMenu ( Menu menu ) { } public void addNewParticipatedMenuById ( String id ) { } public RoundedBitmapDrawable getImageRounded ( Resources res ) throws Exception { } public boolean imGuest ( String idMenu ) { } public boolean imHost ( String idMenu ) { } public void resetMessageCount ( String key ) { } public void increaseMessageCount ( String key ) { <START_BUG> Integer actualCount = ( ( Integer ) ( this . myChats . get ( key ) ) ) ; <END_BUG> ++ actualCount ; this . myChats . put ( key , actualCount ) ; } public Menu getMyMenu ( String idMenu ) { } }

Fix:
long actualCount = ( ( long ) ( this . myChats . get ( key ) ) ) ;
Buggy code:
abstract class AbstractPatchTestBuilder < T > extends ModificationBuilderTarget < T > { protected abstract String getPatchId ( ) { } protected abstract File getPatchDir ( ) { } protected abstract T returnThis ( ) { } public T addFile ( byte [ ] resultingHash , final String content , String ... path ) throws IOException { } public T addFileWithRandomContent ( byte [ ] resultingHash , String ... path ) throws IOException { } public T updateFileWithRandomContent ( byte [ ] existingHash , byte [ ] resultingHash , String ... path ) throws IOException { <START_BUG> final ContentModification modification = ContentModificationUtils . modifyMisc ( getPatchDir ( ) , getPatchId ( ) , AbstractPatchTestBuilder . randomString ( ) , existingHash , path ) ; <END_BUG> return addContentModification ( modification , resultingHash ) ; } public T removeFile ( byte [ ] existingHash , String ... path ) { } public T addModuleWithContent ( final String moduleName , byte [ ] resultingHash , final String ... resourceContents ) throws IOException { } public T addModuleWithRandomContent ( final String moduleName , byte [ ] resultingHash ) throws IOException { } public T updateModuleWithRandomContent ( final String moduleName , byte [ ] existingHash , byte [ ] resultingHash ) throws IOException { } protected T addContentModification ( final ContentModification modification , byte [ ] resultingHash ) { } static void contentHash ( final ContentModification modification , byte [ ] resultingHash ) { } }

Fix:
final ContentModification modification = ContentModificationUtils . modifyMisc ( getPatchDir ( ) , getPatchId ( ) , AbstractPatchTestBuilder . randomString ( ) , Arrays . copyOf ( existingHash , existingHash . length ) , path ) ;
Buggy code:
public class BehaviorSubjectTest { private final Throwable testException = new Throwable ( ) ; @ Test public void testThatObserverReceivesDefaultValueAndSubsequentEvents ( ) { } @ Test public void testThatObserverReceivesLatestAndThenSubsequentEvents ( ) { } @ Test public void testSubscribeThenOnComplete ( ) { } @ Test public void testSubscribeToCompletedOnlyEmitsOnComplete ( ) { } @ Test public void testSubscribeToErrorOnlyEmitsOnError ( ) { } @ Test public void testCompletedStopsEmittingData ( ) { } @ Test public void testCompletedAfterErrorIsNotSent ( ) { } @ Test public void testCompletedAfterErrorIsNotSent2 ( ) { } @ Test public void testCompletedAfterErrorIsNotSent3 ( ) { BehaviorSubject < String > subject = BehaviorSubject . create ( "default" ) ; @ SuppressWarnings ( "unchecked" ) Observer < String > observer = mock ( Observer . class ) ; subject . subscribe ( observer ) ; subject . onNext ( "one" ) ; subject . onCompleted ( ) ; subject . onNext ( "two" ) ; subject . onCompleted ( ) ; verify ( observer , times ( 1 ) ) . onNext ( "default" ) ; verify ( observer , times ( 1 ) ) . onNext ( "one" ) ; verify ( observer , times ( 1 ) ) . onCompleted ( ) ; verify ( observer , never ( ) ) . onError ( any ( Throwable . class ) ) ; verify ( observer , never ( ) ) . onNext ( "two" ) ; @ SuppressWarnings ( "unchecked" ) Observer < Object > o2 = mock ( Observer . class ) ; subject . subscribe ( o2 ) ; verify ( o2 , times ( 1 ) ) . onCompleted ( ) ; verify ( o2 , never ( ) ) . onNext ( any ( ) ) ; <START_BUG> verify ( observer , never ( ) ) . onError ( any ( Throwable . class ) ) ; <END_BUG> } @ Test ( timeout = 1000 ) public void testUnsubscriptionCase ( ) { } @ Test public void testStartEmpty ( ) { } @ Test public void testStartEmptyThenAddOne ( ) { } @ Test public void testStartEmptyCompleteWithOne ( ) { } @ Test public void testTakeOneSubscriber ( ) { } @ Test public void testOnErrorThrowsDoesntPreventDelivery ( ) { } @ Test public void testOnErrorThrowsDoesntPreventDelivery2 ( ) { } @ Test public void testEmissionSubscriptionRace ( ) throws Exception { } @ Test public void testCurrentStateMethodsNormalEmptyStart ( ) { } @ Test public void testCurrentStateMethodsNormalSomeStart ( ) { } @ Test public void testCurrentStateMethodsEmpty ( ) { } @ Test public void testCurrentStateMethodsError ( ) { } }

Fix:
verify ( o2 , never ( ) ) . onError ( any ( Throwable . class ) ) ;
Buggy code:
public class WicketTesterHelper { public static class ComponentData implements IClusterable { private static final long serialVersionUID = 1L ; public String path ; public String type ; public String value ; } public static List < WicketTesterHelper . ComponentData > getComponentData ( final Page page ) { final List data = new ArrayList ( ) ; if ( page != null ) { page . visitChildren ( new IVisitor ( ) { public Object component ( final Component component ) { final WicketTesterHelper . ComponentData object = new WicketTesterHelper . ComponentData ( ) ; String name = component . getClass ( ) . getName ( ) ; if ( ( name . indexOf ( "$" ) ) > 0 ) { name = component . getClass ( ) . getSuperclass ( ) . getName ( ) ; } name = Strings . lastPathComponent ( name , PATH_SEPARATOR ) ; object . path = component . getPageRelativePath ( ) ; object . type = name ; try { <START_BUG> object . value = component . getModelObjectAsString ( ) ; <END_BUG> } catch ( Exception e ) { object . value = e . getMessage ( ) ; } data . add ( object ) ; return IVisitor . CONTINUE_TRAVERSAL ; } } ) ; } return data ; } public static void assertEquals ( final Collection expects , final Collection actuals ) { } public static void failWithVerboseMessage ( final Collection expects , final Collection actuals ) { } public static String asLined ( final Collection objects ) { } }

Fix:
object . value = component . getDefaultModelObjectAsString ( ) ;
Buggy code:
public final class CachingList < Item > implements List < Item > { private final List < Item > delegate ; private int lastLookedUpItemIndex ; @ Nullable private Object lastLookedUpItem ; public CachingList ( final List < Item > delegate ) { } @ Override public boolean contains ( @ Nullable final Object item ) { } @ Override @ NonNull public Iterator < Item > iterator ( ) { } @ Override @ NonNull public Object [ ] toArray ( ) { } @ Override @ NonNull @ SuppressWarnings ( "SuspiciousToArrayCall" ) public < T > T [ ] toArray ( @ NonNull final T [ ] array ) { } @ Override public boolean add ( final Item item ) { } @ Override public boolean remove ( final Object item ) { } @ Override public boolean containsAll ( @ NonNull final Collection < ? > items ) { } @ Override public boolean addAll ( @ NonNull final Collection < ? extends Item > items ) { } @ Override public boolean addAll ( final int index , @ NonNull final Collection < ? extends Item > items ) { } @ Override public boolean removeAll ( @ NonNull final Collection < ? > items ) { } @ Override public boolean retainAll ( @ NonNull final Collection < ? > items ) { } @ Override public void replaceAll ( final UnaryOperator < Item > operator ) { } @ Override public void sort ( final Comparator < ? super Item > items ) { } @ Override public int indexOf ( @ Nullable final Object item ) { } @ Override public int lastIndexOf ( final Object o ) { } @ Override @ NonNull public ListIterator < Item > listIterator ( ) { } @ Override @ NonNull public ListIterator < Item > listIterator ( final int index ) { } @ Override @ NonNull public List < Item > subList ( final int fromIndex , final int toIndex ) { } @ Override public Spliterator < Item > spliterator ( ) { } @ Override public Item remove ( final int index ) { } @ Override public void clear ( ) { } @ Override <START_BUG> @ SuppressWarnings ( "EqualsWhichDoesntCheckParameterClass" ) <END_BUG> public boolean equals ( final Object object ) { return delegate . equals ( object ) ; } @ Override public int hashCode ( ) { } @ Override public Item get ( final int index ) { } @ Override public Item set ( final int index , final Item element ) { } @ Override public void add ( final int index , final Item element ) { } @ SuppressWarnings ( "AssignmentToNull" ) private void clearLastLookedUpIndex ( ) { } @ Override public int size ( ) { } @ Override public boolean isEmpty ( ) { } }

Fix:
@ SuppressWarnings ( { "EqualsWhichDoesntCheckParameterClass" , "EqualsBetweenInconvertibleTypes" } )
Buggy code:
public class PhotoServices { private static final Map < String , PhotoService > photoServices = new HashMap < String , PhotoService > ( ) ; @ Deprecated public static PhotoServices . PhotoResource [ ] extractPhotoResource ( String tweet ) { } public static PhotoServices . PhotoResource [ ] filterToPhotoResources ( String [ ] urls ) { for ( PhotoService service : PhotoServices . photoServices . values ( ) ) { if ( Logger . isDebugEnabled ( ) ) { Logger . debug ( "Using<seq2seq4repair_space>service<seq2seq4repair_space>%1s<seq2seq4repair_space>to<seq2seq4repair_space>check<seq2seq4repair_space>url:<seq2seq4repair_space>%2s" , service . getClass ( ) . getName ( ) , Arrays . toString ( urls ) ) ; } String [ ] filteredUrls = service . filter ( urls ) ; Logger . debug ( "Found<seq2seq4repair_space>%1s" , Arrays . toString ( urls ) ) ; if ( filteredUrls != null ) { PhotoServices . PhotoResource [ ] tweetPhotos = new PhotoServices . PhotoResource [ filteredUrls . length ] ; <START_BUG> for ( int i = 0 ; i < ( urls . length ) ; i ++ ) { <END_BUG> tweetPhotos [ i ] = new PhotoServices . PhotoResource ( filteredUrls [ i ] , service ) ; } return tweetPhotos ; } } return null ; } public static String [ ] getSearchKeys ( ) { } public static class PhotoResource { public final String url ; private PhotoService photoService ; public PhotoResource ( String url , PhotoService photoService ) { } public ImageAndThumbnailUrlHolder grab ( ) { } } }

Fix:
for ( int i = 0 ; i < ( filteredUrls . length ) ; i ++ ) {
Buggy code:
public abstract class AbstractMetamataTask extends Task { protected Path classPath = null ; protected Path sourcePath = null ; protected File metamataHome = null ; protected CommandlineJava cmdl = new CommandlineJava ( ) ; protected ArrayList fileSets = new ArrayList ( ) ; protected File optionsFile = null ; protected Hashtable includedFiles = null ; public AbstractMetamataTask ( ) { } protected AbstractMetamataTask ( String className ) { } protected static final void addAllArrayList ( ArrayList dest , Iterator files ) { } protected static final File createTmpFile ( ) { } public void setMaxmemory ( String max ) { } public void setMetamatahome ( final File metamataHome ) { } public void addFileSet ( FileSet fs ) { } public Path createClasspath ( ) { } public Argument createJvmarg ( ) { } public Path createSourcepath ( ) { } public void execute ( ) throws TaskException { } protected void setUp ( ) throws TaskException { } protected final File getMetamataJar ( File home ) { } protected Hashtable getFileMapping ( ) { } protected abstract ArrayList getOptions ( ) { } protected void checkOptions ( ) throws TaskException { } protected void cleanUp ( ) { } protected abstract void setupStreamHandler ( Execute exe ) { } protected void execute0 ( ) throws TaskException { } protected void generateOptionsFile ( File tofile , ArrayList options ) throws TaskException { } protected Hashtable scanFileSets ( ) { Hashtable files = new Hashtable ( ) ; for ( int i = 0 ; i < ( fileSets . size ( ) ) ; i ++ ) { FileSet fs = ( ( FileSet ) ( fileSets . get ( i ) ) ) ; <START_BUG> DirectoryScanner ds = fs . getDirectoryScanner ( getProject ( ) ) ; <END_BUG> ds . scan ( ) ; String [ ] f = ds . getIncludedFiles ( ) ; getLogger ( ) . debug ( ( ( ( ( i + ")<seq2seq4repair_space>Adding<seq2seq4repair_space>" ) + ( f . length ) ) + "<seq2seq4repair_space>files<seq2seq4repair_space>from<seq2seq4repair_space>directory<seq2seq4repair_space>" ) + ( ds . getBasedir ( ) ) ) ) ; for ( int j = 0 ; j < ( f . length ) ; j ++ ) { String pathname = f [ j ] ; if ( pathname . endsWith ( ".java" ) ) { File file = new File ( ds . getBasedir ( ) , pathname ) ; String classname = pathname . substring ( 0 , ( ( pathname . length ( ) ) - ( ".java" . length ( ) ) ) ) ; classname = classname . replace ( File . separatorChar , '.' ) ; files . put ( file . getAbsolutePath ( ) , classname ) ; } } } return files ; } }

Fix:
DirectoryScanner ds = fs . getDirectoryScanner ( ) ;