nus-yam/ex-repair huggingface dataset:
Buggy code:
public class GelfConverter { private final String facility ; private final boolean useLoggerName ; private final boolean useThreadName ; private final boolean useMarker ; private final Map < String , String > additionalFields ; private final Map < String , String > fieldTypes ; private final Map < String , String > staticAdditionalFields ; private final int shortMessageLength ; private final String hostname ; private final Gson gson ; private final PatternLayout patternLayout ; private final PatternLayout shortPatternLayout ; private boolean includeFullMDC ; static Map < String , Method > primitiveTypes ; public GelfConverter ( String facility , boolean useLoggerName , boolean useThreadName , boolean useMarker , Map < String , String > additionalFields , Map < String , String > fieldTypes , Map < String , String > staticAdditionalFields , int shortMessageLength , String hostname , String messagePattern , String shortMessagePattern , boolean includeFullMDC ) { } public String toGelf ( ILoggingEvent logEvent ) { } private Map < String , Object > mapFields ( ILoggingEvent logEvent ) { } private void stackTraceField ( Map < String , Object > map , ILoggingEvent eventObject ) { IThrowableProxy throwableProxy = eventObject . getThrowableProxy ( ) ; if ( throwableProxy != null ) { StackTraceElementProxy [ ] proxyStackTraces = throwableProxy . getStackTraceElementProxyArray ( ) ; if ( ( proxyStackTraces != null ) && ( ( proxyStackTraces . length ) > 0 ) ) { StackTraceElement [ ] callStackTraces = eventObject . getCallerData ( ) ; <START_BUG> if ( ( callStackTraces . length ) > 0 ) { <END_BUG> StackTraceElement lastStack = callStackTraces [ 0 ] ; map . put ( "file" , lastStack . getFileName ( ) ) ; map . put ( "line" , String . valueOf ( lastStack . getLineNumber ( ) ) ) ; } } } } void additionalFields ( Map < String , Object > map , ILoggingEvent eventObject ) { } private Object convertFieldType ( Object value , final String type ) { } private boolean eventHasMarker ( ILoggingEvent eventObject ) { } private void staticAdditionalFields ( Map < String , Object > map ) { } private String truncateToShortMessage ( String fullMessage , ILoggingEvent logEvent ) { } }

Fix:
if ( ( callStackTraces != null ) && ( ( callStackTraces . length ) > 0 ) ) {
Buggy code:
public class DateTimeUtil { public static int getTotalDaysDifference ( DateTime startDate , DateTime endDate ) { } public static DateTime getFirstDayOfTheWeek ( DateTime weekDate , boolean weekStartOnSunday ) { } public static DateTime getLastDayOfTheWeek ( DateTime weekDate , boolean weekStartOnSunday ) { } public static int getMonthNameID ( int monthOfYear ) { } public static int getWeekDayNameID ( int dayOfWeek , boolean weekStartOnSunday ) { if ( weekStartOnSunday ) { dayOfWeek -- ; if ( dayOfWeek < 0 ) { dayOfWeek = 6 ; } } switch ( dayOfWeek ) { case 0 : return string . monday_shortname ; case 1 : return string . tuesday_shortname ; case 2 : <START_BUG> return string . wendays_shortname ; <END_BUG> case 3 : return string . thursday_shortname ; case 4 : return string . friday_shortname ; case 5 : return string . saturday_shortname ; default : return string . sunday_shortname ; } } public static DateTime getFirstDayOfTheWeek ( DateTime firstDate ) { } }

Fix:
return string . wednesday_shortname ;
Buggy code:
public class TestDutchStemmer extends BaseTokenStreamTestCase { public void testWithSnowballExamples ( ) throws Exception { } public void testSnowballCorrectness ( ) throws Exception { } public void testReusableTokenStream ( ) throws Exception { } public void testExclusionTableViaCtor ( ) throws IOException { } public void testStemOverrides ( ) throws IOException { } public void testStopwordsCasing ( ) throws IOException { } private void check ( final String input , final String expected ) throws Exception { } public void testRandomStrings ( ) throws Exception { <START_BUG> checkRandomData ( random ( ) , new DutchAnalyzer ( TEST_VERSION_CURRENT ) , ( 10000 * ( RANDOM_MULTIPLIER ) ) ) ; <END_BUG> } }

Fix:
checkRandomData ( random ( ) , new DutchAnalyzer ( TEST_VERSION_CURRENT ) , ( 1000 * ( RANDOM_MULTIPLIER ) ) ) ;
Buggy code:
public class handlesqlServlet extends HttpServlet { public void doGet ( HttpServletRequest rq , HttpServletResponse rp ) throws ServletException , IOException { PrintWriter out = rp . getWriter ( ) ; String db = rq . getParameter ( "db" ) ; <START_BUG> int jobno = Integer . getInteger ( rq . getParameter ( "j" ) ) ; <END_BUG> String username = "test" ; ServletContext context = getServletContext ( ) ; byte [ ] arrayStr = rq . getParameter ( "sql" ) . getBytes ( "iso-8859-1" ) ; String sql = new String ( arrayStr , "UTF-8" ) ; if ( sql == null ) { sql = "wrong<seq2seq4repair_space>sql" ; } String newsql = sql . replaceAll ( "(\r\n|\r|\n|\n\r)" , "<seq2seq4repair_space>" ) ; System . out . println ( sql ) ; System . out . println ( newsql ) ; out . write ( sql ) ; } protected void doPost ( HttpServletRequest request , HttpServletResponse response ) throws ServletException , IOException { } No newline ; at end ; of file ; }

Fix:
int jobno = Integer . parseInt ( rq . getParameter ( "j" ) ) ;
Buggy code:
public class ProfileCollector { private ProfileCollector ( ) { } private static final ThreadLocal < ProfileCollector > _instance = new ThreadLocal < ProfileCollector > ( ) { protected ProfileCollector initialValue ( ) { } } ; private PrintWriter _out ; private final Stack < Triplet < String , Long , Long > > _contextStack = new Stack < Triplet < String , Long , Long > > ( ) ; private final Map < String , ProfileCollector . ProfileEntry > _profile = new HashMap < String , ProfileCollector . ProfileEntry > ( ) ; public static ProfileCollector getInstance ( ) { } public void setDetailedLoggingWriter ( OutputStream out ) { } public void finish ( ) { if ( ( _out ) != null ) { <START_BUG> _out . println ( "<//m2t-profile>" ) ; <END_BUG> _out . flush ( ) ; _out = null ; } } public Collection < ProfileCollector . ProfileEntry > getProfile ( ) { } public void enter ( String context ) { } public void leave ( ) { } @ Override public String toString ( ) { } public static class ProfileEntry { private final String _contextName ; private int _numCalls = 1 ; private long _totalTimeGross ; private long _totalTimeNet ; private long _minTimeGross ; private long _minTimeNet ; private long _maxTimeGross ; private long _maxTimeNet ; public ProfileEntry ( String contextName , long grossDuration , long netDuration ) { } public void registerCall ( long grossDuration , long netDuration ) { } public String getContextName ( ) { } public long getMaxTimeGross ( ) { } public long getMaxTimeNet ( ) { } public long getMinTimeGross ( ) { } public long getMinTimeNet ( ) { } public int getNumCalls ( ) { } public long getTotalTimeGross ( ) { } public long getTotalTimeNet ( ) { } } }

Fix:
_out . println ( "<//oaw-profile>" ) ;
Buggy code:
public class PropertyPrinter implements PropertyGetter . PropertyCallback { protected int numAppenders = 0 ; protected Hashtable appenderNames = new Hashtable ( ) ; protected Hashtable layoutNames = new Hashtable ( ) ; protected PrintWriter out ; protected boolean doCapitalize ; public PropertyPrinter ( PrintWriter out ) { } public PropertyPrinter ( PrintWriter out , boolean doCapitalize ) { } protected String genAppName ( ) { } protected boolean isGenAppName ( String name ) { } <START_BUG> protected void printOptions ( PrintWriter out , Category cat ) { <END_BUG> Enumeration appenders = cat . getAllAppenders ( ) ; Level prio = cat . getLevel ( ) ; String appenderString = ( prio == null ) ? "" : prio . toString ( ) ; while ( appenders . hasMoreElements ( ) ) { Appender app = ( ( Appender ) ( appenders . nextElement ( ) ) ) ; String name ; if ( ( name = ( ( String ) ( appenderNames . get ( app ) ) ) ) == null ) { if ( ( ( name = app . getName ( ) ) == null ) || ( isGenAppName ( name ) ) ) { name = genAppName ( ) ; } appenderNames . put ( app , name ) ; printOptions ( out , app , ( "log4j.appender." + name ) ) ; if ( ( app . getLayout ( ) ) != null ) { printOptions ( out , app . getLayout ( ) , ( ( "log4j.appender." + name ) + ".layout" ) ) ; } } appenderString += ",<seq2seq4repair_space>" + name ; } String catKey = ( cat == ( Logger . getRootLogger ( ) ) ) ? "log4j.rootCategory" : "log4j.category." + ( cat . getName ( ) ) ; if ( appenderString != "" ) { out . println ( ( ( catKey + "=" ) + appenderString ) ) ; } } protected void printOptions ( PrintWriter out , Object obj , String fullname ) { } public void foundProperty ( Object obj , String prefix , String name , Object value ) { } public static String capitalize ( String name ) { } public static void main ( String [ ] args ) { } }

Fix:
protected void printOptions ( PrintWriter out , Logger cat ) {
Buggy code:
public class TokenUpdateVerbHandler implements IVerbHandler { private static Logger logger_ = Logger . getLogger ( TokenUpdateVerbHandler . class ) ; public void doVerb ( Message message ) { <START_BUG> byte [ ] body = ( ( byte [ ] ) ( message . getMessageBody ( ) [ 0 ] ) ) ; <END_BUG> Token token = StorageService . getPartitioner ( ) . getTokenFactory ( ) . fromByteArray ( body ) ; try { TokenUpdateVerbHandler . logger_ . info ( ( ( "Updating<seq2seq4repair_space>the<seq2seq4repair_space>token<seq2seq4repair_space>to<seq2seq4repair_space>[" + token ) + "]" ) ) ; StorageService . instance ( ) . updateToken ( token ) ; } catch ( IOException ex ) { TokenUpdateVerbHandler . logger_ . debug ( LogUtil . throwableToString ( ex ) ) ; } } }

Fix:
byte [ ] body = message . getMessageBody ( ) ;
Buggy code:
public class RowMutation { private static ICompactSerializer < RowMutation > serializer_ ; public static final String HINT = "HINT" ; public static ICompactSerializer < RowMutation > serializer ( ) { } private String table_ ; private byte [ ] key_ ; protected Map < Integer , ColumnFamily > modifications_ = new HashMap < Integer , ColumnFamily > ( ) ; public RowMutation ( String table , byte [ ] key ) { } public RowMutation ( String table , Row row ) { } protected RowMutation ( String table , byte [ ] key , Map < Integer , ColumnFamily > modifications ) { } public String getTable ( ) { } public byte [ ] key ( ) { } public Collection < ColumnFamily > getColumnFamilies ( ) { } void addHints ( RowMutation rm ) throws IOException { for ( ColumnFamily cf : rm . getColumnFamilies ( ) ) { byte [ ] combined = HintedHandOffManager . makeCombinedName ( rm . getTable ( ) , cf . metadata ( ) . cfName ) ; QueryPath path = new QueryPath ( HintedHandOffManager . HINTS_CF , rm . key ( ) , combined ) ; <START_BUG> add ( path , EMPTY_BYTE_ARRAY , new TimestampClock ( System . currentTimeMillis ( ) ) , DatabaseDescriptor . getGcGraceInSeconds ( ) ) ; <END_BUG> } } public void add ( ColumnFamily columnFamily ) { } public boolean isEmpty ( ) { } public void add ( QueryPath path , byte [ ] value , IClock clock , int timeToLive ) { } public void add ( QueryPath path , byte [ ] value , IClock clock ) { } public void delete ( QueryPath path , IClock clock ) { } public void apply ( ) throws IOException { } void applyBinary ( ) throws IOException , InterruptedException , ExecutionException { } public Message makeRowMutationMessage ( ) throws IOException { } public Message makeRowMutationMessage ( StorageService . Verb verb ) throws IOException { } public static RowMutation getRowMutationFromMutations ( String keyspace , byte [ ] key , Map < String , List < Mutation > > cfmap ) { } public static RowMutation getRowMutation ( String table , byte [ ] key , Map < String , List < ColumnOrSuperColumn > > cfmap ) { } public DataOutputBuffer getSerializedBuffer ( ) throws IOException { } public String toString ( ) { } public String toString ( boolean shallow ) { } private static void addColumnOrSuperColumnToRowMutation ( RowMutation rm , String cfName , ColumnOrSuperColumn cosc ) { } private static void deleteColumnOrSuperColumnToRowMutation ( RowMutation rm , String cfName , Deletion del ) { } private static IClock unthriftifyClock ( Clock clock ) { } }

Fix:
add ( path , EMPTY_BYTE_ARRAY , new TimestampClock ( System . currentTimeMillis ( ) ) , cf . metadata ( ) . gcGraceSeconds ) ;
Buggy code:
public class ClusterClassificationDriverTest extends MahoutTestCase { private static final double [ ] [ ] REFERENCE = new double [ ] [ ] { new double [ ] { 1 , 1 } , new double [ ] { 2 , 1 } , new double [ ] { 1 , 2 } , new double [ ] { 4 , 4 } , new double [ ] { 5 , 4 } , new double [ ] { 4 , 5 } , new double [ ] { 5 , 5 } , new double [ ] { 9 , 9 } , new double [ ] { 8 , 8 } } ; private FileSystem fs ; private Path clusteringOutputPath ; private Configuration conf ; private Path pointsPath ; private Path classifiedOutputPath ; private List < Vector > firstCluster ; private List < Vector > secondCluster ; private List < Vector > thirdCluster ; @ Override @ Before public void setUp ( ) throws Exception { } private static List < VectorWritable > getPointsWritable ( double [ ] [ ] raw ) { } @ Test public void testVectorClassificationWithOutlierRemovalMR ( ) throws Exception { } @ Test public void testVectorClassificationWithoutOutlierRemoval ( ) throws Exception { } @ Test public void testVectorClassificationWithOutlierRemoval ( ) throws Exception { } private void runClustering ( Path pointsPath , Configuration conf , Boolean runSequential ) throws IOException , ClassNotFoundException , InterruptedException { } private void runClassificationWithoutOutlierRemoval ( ) throws IOException , ClassNotFoundException , InterruptedException { } private void runClassificationWithOutlierRemoval ( boolean runSequential ) throws IOException , ClassNotFoundException , InterruptedException { } private void collectVectorsForAssertion ( ) throws IOException { Path [ ] partFilePaths = FileUtil . stat2Paths ( fs . globStatus ( classifiedOutputPath ) ) ; FileStatus [ ] listStatus = fs . listStatus ( partFilePaths , PathFilters . partFilter ( ) ) ; for ( FileStatus partFile : listStatus ) { SequenceFile . Reader classifiedVectors = new SequenceFile . Reader ( fs , partFile . getPath ( ) , conf ) ; Writable clusterIdAsKey = new IntWritable ( ) ; <START_BUG> WeightedVectorWritable point = new WeightedVectorWritable ( ) ; <END_BUG> while ( classifiedVectors . next ( clusterIdAsKey , point ) ) { collectVector ( clusterIdAsKey . toString ( ) , point . getVector ( ) ) ; } } } private void collectVector ( String clusterId , Vector vector ) { } private void assertVectorsWithOutlierRemoval ( ) { } private void assertVectorsWithoutOutlierRemoval ( ) { } private void assertThirdClusterWithoutOutlierRemoval ( ) { } private void assertSecondClusterWithoutOutlierRemoval ( ) { } private void assertFirstClusterWithoutOutlierRemoval ( ) { } private void checkClustersWithOutlierRemoval ( ) { } }

Fix:
WeightedPropertyVectorWritable point = new WeightedPropertyVectorWritable ( ) ;
Buggy code:
public class RolloutPlanRequestHeader implements OperationRequestHeader { public static final RolloutPlanRequestHeader INSTANCE = new RolloutPlanRequestHeader ( ) ; @ Override public String getName ( ) { <START_BUG> return "rollout-plan" ; <END_BUG> } @ Override public CommandLineCompleter getCompleter ( ) { } }

Fix:
return "rollout" ;
Buggy code:
public class TestSelectorsIntegrationTest { private ProjectWorkspace workspace ; @ Rule public DebuggableTemporaryFolder temporaryFolder = new DebuggableTemporaryFolder ( ) ; @ Before public void setupWorkspace ( ) throws IOException { } @ Test public void shouldFailWithoutAnySelectors ( ) throws IOException { ProjectWorkspace . ProcessResult result = workspace . runBuckCommand ( "test" , "--all" ) ; result . assertTestFailure ( "Some<seq2seq4repair_space>tests<seq2seq4repair_space>fail" ) ; <START_BUG> assertThat ( result . getStderr ( ) , containsString ( "TESTS<seq2seq4repair_space>FAILED:<seq2seq4repair_space>1<seq2seq4repair_space>Failures" ) ) ; <END_BUG> } @ Test public void shouldRunASingleTest ( ) throws IOException { } @ Test public void shouldPassWhenUnselectingEntireFailingClass ( ) throws IOException { } @ Test public void shouldPassWhenUnselectingTheFailingMethod ( ) throws IOException { } @ Test public void shouldNeverCacheWhenUsingSelectors ( ) throws IOException { } @ Test public void shouldNotMatchMethodsUsingPrefixAlone ( ) throws IOException { } @ Test public void shouldReportRegularExpressionErrors ( ) throws IOException { } @ Test public void shouldFilterFromFile ( ) throws IOException { } @ Test public void shouldFailWithMultipleStringsGivenToFilter ( ) throws IOException { } @ Test public void shouldRespectTestSelectorsEvenWithDryRun ( ) throws IOException { } @ Test public void assertNoSummariesForASingleTest ( ) throws IOException { } private void assertOutputWithSelectors ( ProjectWorkspace . ProcessResult result ) { } private void assertOutputWithoutSelectors ( ProjectWorkspace . ProcessResult result ) { } private void assertCached ( ProjectWorkspace . ProcessResult result ) { } private void assertNotCached ( ProjectWorkspace . ProcessResult result ) { } private void assertThatATestRan ( ProjectWorkspace . ProcessResult result , String testName ) { } private void assertNoTestsRan ( ProjectWorkspace . ProcessResult result ) { } private void assertTestsPassed ( ProjectWorkspace . ProcessResult result ) { } private void assertTestSummaryShown ( ProjectWorkspace . ProcessResult result ) { } private void assertNoTestSummaryShown ( ProjectWorkspace . ProcessResult result ) { } }

Fix:
assertThat ( result . getStderr ( ) , containsString ( "TESTS<seq2seq4repair_space>FAILED:<seq2seq4repair_space>1<seq2seq4repair_space>FAILURE" ) ) ;
Buggy code:
public class FibIt implements SeqIt { protected int first1 ; protected int first2 ; protected int last ; protected int f1 ; protected int f2 ; protected int sum ; protected int index ; public FibIt ( Fib FibObj ) { } public boolean hasNext ( ) { } public int next ( ) { int retVal = 0 ; if ( ( ( index ) == 0 ) && ( ( first1 ) <= ( last ) ) ) { retVal = sum ; sum = first2 ; } else if ( ( ( index ) == 1 ) && ( ( first2 ) <= ( last ) ) ) { retVal = sum ; sum = ( first1 ) + ( first2 ) ; } else if ( ( sum ) <= ( last ) ) { retVal = sum ; f1 = f2 ; f2 = sum ; sum = ( f1 ) + ( f2 ) ; } else { <START_BUG> System . err . println ( "No<seq2seq4repair_space>elements<seq2seq4repair_space>are<seq2seq4repair_space>left<seq2seq4repair_space>in<seq2seq4repair_space>the<seq2seq4repair_space>'For'<seq2seq4repair_space>sequence" ) ; <END_BUG> System . exit ( 1 ) ; } ( index ) ++ ; return retVal ; } No newline ; at end ; of file ; }

Fix:
System . err . println ( "FibIt<seq2seq4repair_space>called<seq2seq4repair_space>past<seq2seq4repair_space>end" ) ;
Buggy code:
public class DateTimeDatatypeValidator extends DateTimeValidator { public DateTimeDatatypeValidator ( ) throws InvalidDatatypeFacetException { } public DateTimeDatatypeValidator ( DatatypeValidator base , Hashtable facets , boolean derivedByList ) throws InvalidDatatypeFacetException { } protected int [ ] parse ( String str , int [ ] date ) throws SchemaDateTimeException { resetBuffer ( str ) ; if ( date == null ) { date = new int [ TOTAL_SIZE ] ; } resetDateObj ( date ) ; int end = indexOf ( fStart , fEnd , 'T' ) ; getDate ( fStart , end , date ) ; getTime ( ( end + 1 ) , fEnd , date ) ; if ( ! ( validateDateTime ( date ) ) ) { throw new SchemaDateTimeException ( "Not<seq2seq4repair_space>valid<seq2seq4repair_space>date" ) ; } else <START_BUG> if ( ( date [ utc ] ) != 0 ) { <END_BUG> normalize ( date ) ; } return date ; } }

Fix:
if ( ( ( date [ utc ] ) != 0 ) && ( ( date [ utc ] ) != 'Z' ) ) {
Buggy code:
public abstract class GenericBaseModel < T > implements IModel < T > { private static final long serialVersionUID = 1L ; private T object ; public T getObject ( ) { } public void setObject ( T object ) { } protected abstract T createSerializableVersionOf ( T object ) { } public void detach ( ) { } @ Override public String toString ( ) { <START_BUG> StringBuffer sb = new StringBuffer ( "Model:classname=[" ) ; <END_BUG> sb . append ( getClass ( ) . getName ( ) ) . append ( "]" ) ; sb . append ( ":object=[" ) . append ( object ) . append ( "]" ) ; return sb . toString ( ) ; } @ Override public int hashCode ( ) { } @ Override public boolean equals ( Object obj ) { } }

Fix:
StringBuilder sb = new StringBuilder ( "Model:classname=[" ) ;
Buggy code:
public class Parser { private static final Logger logger = Log . getLogger ( Parser . class . getName ( ) ) ; private String taskDetails ; public Task parse ( String taskDetails ) { } private Task parseInput ( Task parsedTask , String taskDetails ) { } private Task parseDateTime ( String [ ] param , int num ) { } private DateTime parseDate ( String word , DateTime d ) { if ( word . equals ( "next" ) ) { d . plusWeeks ( 1 ) ; } else if ( ( determineDay ( word ) ) != ( - 1 ) ) { d = d . withDayOfWeek ( determineDay ( word ) ) ; } else if ( isValidDate ( word ) ) { d = getDate ( word , d ) ; } else if ( isWordToday ( word ) ) { d = parseDay ( d , 0 ) ; } else if ( isWordTomorrow ( word ) ) { d = parseDay ( d , 1 ) ; } <START_BUG> if ( d . isBefore ( new DateTime ( ) ) ) { <END_BUG> d = d . plusWeeks ( 1 ) ; } return d ; } private boolean isValidDayDate ( String word ) { } private boolean isWordToday ( String word ) { } private boolean isWordTomorrow ( String word ) { } private DateTime parseDay ( DateTime d , int days ) { } private DateTime initializeDateTime ( ) { } private int determineDay ( String day ) { } private boolean isValidDate ( String date ) { } private DateTime getDate ( String date , DateTime d ) { } private boolean isValidTime ( String time ) { } private DateTime getTime ( String taskDetails , DateTime d ) { } private String [ ] tokenize ( String taskDetails ) { } private String getFirstWord ( String details ) { } private String getWord ( String details , int index ) { } private String removeFirstWord ( String details ) { } }

Fix:
if ( d . isBefore ( initializeDateTime ( ) ) ) {
Buggy code:
public class PartnerFixture { public static Partner allRoles ( ) { Customer customer = CustomerFixture . standardCustomer ( ) ; Affiliate affiliate = AffiliateFixture . standardAffiliate ( ) ; EntertainmentCompany entertainmentCompany = EntertainmentCompanyFixture . standardEntertainmentCompany ( ) ; Organization owner = OrganizationFixture . standardOrganization ( ) ; Set < PartnerRole > PartnerRoles = new HashSet < PartnerRole > ( ) ; PartnerRoles . add ( customer ) ; PartnerRoles . add ( affiliate ) ; PartnerRoles . add ( entertainmentCompany ) ; <START_BUG> Partner partner = PartnerBuilder . anPartner ( ) . withTitle ( ( "Partner<seq2seq4repair_space>" + ( new Date ( ) . getTime ( ) ) ) ) . withImage ( ( "Image" + ( new Date ( ) . getTime ( ) ) ) ) . withWebsite ( "wwww.zzz.nl" ) . withPartnerCategory ( GROUP ) . withPartnerRoles ( PartnerRoles ) . build ( ) ; <END_BUG> return partner ; } }

Fix:
Partner partner = PartnerBuilder . anPartner ( ) . withTitle ( ( "Partner<seq2seq4repair_space>" + ( new Date ( ) . getTime ( ) ) ) ) . withImage ( ( "Image" + ( new Date ( ) . getTime ( ) ) ) ) . withWebsite ( "wwww.zzz.nl" ) . withOwner ( owner ) . withPartnerCategory ( GROUP ) . withPartnerRoles ( PartnerRoles ) . build ( ) ;
Buggy code:
public class CorrelatedRandomVectorGenerator implements RandomVectorGenerator { public CorrelatedRandomVectorGenerator ( double [ ] mean , RealMatrix covariance , double small , NormalizedRandomGenerator generator ) throws DimensionMismatchException , NotPositiveDefiniteMatrixException { } public CorrelatedRandomVectorGenerator ( RealMatrix covariance , double small , NormalizedRandomGenerator generator ) throws NotPositiveDefiniteMatrixException { } public NormalizedRandomGenerator getGenerator ( ) { } public RealMatrix getRootMatrix ( ) { } public int getRank ( ) { } private void decompose ( RealMatrix covariance , double small ) throws NotPositiveDefiniteMatrixException { int order = covariance . getRowDimension ( ) ; double [ ] [ ] c = covariance . getData ( ) ; double [ ] [ ] b = new double [ order ] [ order ] ; int [ ] swap = new int [ order ] ; int [ ] index = new int [ order ] ; for ( int i = 0 ; i < order ; ++ i ) { index [ i ] = i ; } rank = 0 ; for ( boolean loop = true ; loop ; ) { swap [ rank ] = rank ; for ( int i = ( rank ) + 1 ; i < order ; ++ i ) { int ii = index [ i ] ; int isi = index [ swap [ i ] ] ; if ( ( c [ ii ] [ ii ] ) > ( c [ isi ] [ isi ] ) ) { swap [ rank ] = i ; } } if ( ( swap [ rank ] ) != ( rank ) ) { int tmp = index [ rank ] ; index [ rank ] = index [ swap [ rank ] ] ; index [ swap [ rank ] ] = tmp ; } int ir = index [ rank ] ; if ( ( c [ ir ] [ ir ] ) < small ) { if ( ( rank ) == 0 ) { throw new NotPositiveDefiniteMatrixException ( ) ; } for ( int i = rank ; i < order ; ++ i ) { if ( ( c [ index [ i ] ] [ index [ i ] ] ) < ( - small ) ) { throw new NotPositiveDefiniteMatrixException ( ) ; } } ++ ( rank ) ; loop = false ; } else { double sqrt = Math . sqrt ( c [ ir ] [ ir ] ) ; b [ rank ] [ rank ] = sqrt ; double inverse = 1 // sqrt ; for ( int i = ( rank ) + 1 ; i < order ; ++ i ) { int ii = index [ i ] ; double e = inverse * ( c [ ii ] [ ir ] ) ; b [ i ] [ rank ] = e ; c [ ii ] [ ii ] -= e * e ; for ( int j = ( rank ) + 1 ; j < i ; ++ j ) { int ij = index [ j ] ; double f = ( c [ ii ] [ ij ] ) - ( e * ( b [ j ] [ rank ] ) ) ; c [ ii ] [ ij ] = f ; c [ ij ] [ ii ] = f ; } } loop = ( ++ ( rank ) ) < order ; } } root = new RealMatrixImpl ( order , rank ) ; for ( int i = 0 ; i < order ; ++ i ) { <START_BUG> System . arraycopy ( b [ i ] , 0 , root . getDataRef ( ) [ index [ i ] ] , 0 , rank ) ; <END_BUG> } } public double [ ] nextVector ( ) { } private double [ ] mean ; private RealMatrixImpl root ; private int rank ; private NormalizedRandomGenerator generator ; private double [ ] normalized ; }

Fix:
System . arraycopy ( b [ i ] , 0 , root . getDataRef ( ) [ swap [ i ] ] , 0 , rank ) ;
Buggy code:
public class BinaryRowWriter implements RowWriter < byte [ ] > { private final IFiler filer ; public BinaryRowWriter ( IFiler filer ) { } @ Override public List < byte [ ] > write ( List < byte [ ] > rows , boolean append ) throws Exception { List < Long > offests = new ArrayList < > ( ) ; MemoryFiler memoryFiler = new MemoryFiler ( ) ; for ( byte [ ] row : rows ) { <START_BUG> offests . add ( filer . getFilePointer ( ) ) ; <END_BUG> int length = row . length ; UIO . writeInt ( memoryFiler , length , "length" ) ; memoryFiler . write ( row ) ; UIO . writeInt ( memoryFiler , length , "length" ) ; } long startFp ; synchronized ( filer . lock ( ) ) { if ( append ) { startFp = filer . length ( ) ; filer . seek ( startFp ) ; filer . write ( memoryFiler . getBytes ( ) ) ; } else { startFp = 0 ; filer . seek ( 0 ) ; filer . write ( memoryFiler . getBytes ( ) ) ; filer . eof ( ) ; } filer . flush ( ) ; } List < byte [ ] > rowPointers = new ArrayList < > ( ) ; for ( Long offest : offests ) { rowPointers . add ( UIO . longBytes ( ( startFp + offest ) ) ) ; } return rowPointers ; } }

Fix:
offests . add ( memoryFiler . getFilePointer ( ) ) ;
Buggy code:
public class UMLAbstraction implements XMIReferenceable , XMISerializable { private String idref ; private String id ; private boolean isSpecification ; private UMLDependencyClient dependencyClient ; private UMLDependencySupplier dependencySupplier ; private UMLModelElementStereotype modelElementStereotype ; public UMLAbstraction ( String idref ) { } public UMLAbstraction ( String id , boolean isSpecification ) { } public UMLDependencyClient getDependencyClient ( ) { } public String getId ( ) { } public boolean isIsSpecification ( ) { } public void setDependencyClient ( UMLDependencyClient dependencyClient ) { } public void setId ( String id ) { } public void setIsSpecification ( boolean isSpecification ) { } public UMLDependencySupplier getDependencySupplier ( ) { } public void setDependencySupplier ( UMLDependencySupplier dependencySupplier ) { } public UMLModelElementStereotype getModelElementStereotype ( ) { } public void setModelElementStereotype ( UMLModelElementStereotype modelElementStereotype ) { } @ Override public String getIdref ( ) { } @ Override public void setIdref ( String refId ) { } @ Override public String toXmi ( ) { StringBuilder sb = new StringBuilder ( ) ; if ( ( idref ) != null ) { sb . append ( "<UML:Abstraction<seq2seq4repair_space>xmi.idref<seq2seq4repair_space>=<seq2seq4repair_space>'" ) . append ( idref ) . append ( "\'//>\n" ) ; } else { sb . append ( "<UML:Abstraction<seq2seq4repair_space>xmi.id<seq2seq4repair_space>=<seq2seq4repair_space>'" ) . append ( id ) . append ( "'<seq2seq4repair_space>isSpecification<seq2seq4repair_space>=<seq2seq4repair_space>'" ) . append ( isSpecification ) . append ( "\'>\n" ) ; if ( ( modelElementStereotype ) != null ) { sb . append ( "<UML:ModelElement.stereotype>\n" ) ; <START_BUG> sb . append ( "<UML:Stereotype<seq2seq4repair_space>xmi.idref<seq2seq4repair_space>=<seq2seq4repair_space>'" ) . append ( modelElementStereotype . getUmlStereotype ( ) . getId ( ) ) . append ( "\'//>\n" ) ; <END_BUG> sb . append ( "<//UML:ModelElement.stereotype>\n" ) ; } if ( ( dependencyClient ) != null ) { sb . append ( "<UML:Dependency.client>\n" ) ; sb . append ( "<UML:Class<seq2seq4repair_space>xmi.idref<seq2seq4repair_space>=<seq2seq4repair_space>'" ) . append ( dependencyClient . getUmlclass ( ) . getIdref ( ) ) . append ( "\'//>\n" ) ; sb . append ( "<//UML:Dependency.client>\n" ) ; } if ( ( dependencySupplier ) != null ) { sb . append ( "<UML:Dependency.supplier>\n" ) ; sb . append ( "<UML:Interface<seq2seq4repair_space>xmi.idref<seq2seq4repair_space>=<seq2seq4repair_space>'" ) . append ( dependencySupplier . getUmlinterface ( ) . getIdref ( ) ) . append ( "\'//>\n" ) ; sb . append ( "<//UML:Dependency.supplier>\n" ) ; } sb . append ( "<//UML:Abstraction>\n" ) ; } return sb . toString ( ) ; } No newline ; at end ; of file ; }

Fix:
sb . append ( "<UML:Stereotype<seq2seq4repair_space>xmi.idref<seq2seq4repair_space>=<seq2seq4repair_space>'" ) . append ( modelElementStereotype . getUmlStereotype ( ) . getIdref ( ) ) . append ( "\'//>\n" ) ;
Buggy code:
public class FileCleaningTracker { ReferenceQueue < Object > q = new ReferenceQueue < Object > ( ) ; final Collection < FileCleaningTracker . Tracker > trackers = Collections . synchronizedSet ( new HashSet < FileCleaningTracker . Tracker > ( ) ) ; final List < String > deleteFailures = Collections . synchronizedList ( new ArrayList < String > ( ) ) ; volatile boolean exitWhenFinished = false ; Thread reaper ; public void track ( File file , Object marker ) { } public void track ( File file , Object marker , FileDeleteStrategy deleteStrategy ) { } public void track ( String path , Object marker ) { <START_BUG> track ( path , marker , ( ( FileDeleteStrategy ) ( null ) ) ) ; <END_BUG> } public void track ( String path , Object marker , FileDeleteStrategy deleteStrategy ) { } private synchronized void addTracker ( String path , Object marker , FileDeleteStrategy deleteStrategy ) { } public int getTrackCount ( ) { } public List < String > getDeleteFailures ( ) { } public synchronized void exitWhenFinished ( ) { } private final class Reaper extends Thread { Reaper ( ) { } @ Override public void run ( ) { } } private static final class Tracker extends PhantomReference < Object > { private final String path ; private final FileDeleteStrategy deleteStrategy ; Tracker ( String path , FileDeleteStrategy deleteStrategy , Object marker , ReferenceQueue < ? super Object > queue ) { } public String getPath ( ) { } public boolean delete ( ) { } } }

Fix:
track ( path , marker , null ) ;
Buggy code:
public class SwipeAdapter extends ArrayAdapter < Person > { Context context ; int resourceId ; public SwipeAdapter ( Context context , int resourceId , List < Person > items ) { } private class ViewHolder { LinearLayout backgroundImageLayout ; TextView name ; TextView relationshipStatus ; TextView course ; TextView bio ; Button viewMore ; } public View getView ( int position , View convertView , ViewGroup parent ) { SwipeAdapter . ViewHolder holder = null ; Person person = getItem ( position ) ; LayoutInflater mInflater = ( ( LayoutInflater ) ( context . getSystemService ( LAYOUT_INFLATER_SERVICE ) ) ) ; if ( convertView == null ) { <START_BUG> convertView = mInflater . inflate ( fragment_card_view , null ) ; <END_BUG> holder = new SwipeAdapter . ViewHolder ( ) ; holder . backgroundImageLayout = ( ( LinearLayout ) ( convertView . findViewById ( image ) ) ) ; holder . name = ( ( TextView ) ( convertView . findViewById ( name ) ) ) ; holder . relationshipStatus = ( ( TextView ) ( convertView . findViewById ( relationship_status ) ) ) ; holder . course = ( ( TextView ) ( convertView . findViewById ( course ) ) ) ; holder . bio = ( ( TextView ) ( convertView . findViewById ( bio ) ) ) ; convertView . setTag ( holder ) ; } else { holder = ( ( SwipeAdapter . ViewHolder ) ( convertView . getTag ( ) ) ) ; } holder . name . setText ( person . getName ( ) ) ; holder . relationshipStatus . setText ( person . getStatus ( ) ) ; holder . course . setText ( person . getCourse ( ) ) ; holder . bio . setText ( person . getDescription ( ) ) ; return convertView ; } }

Fix:
convertView = mInflater . inflate ( fragment_card_view , parent , false ) ;
Buggy code:
public class EncryptOrDecryptData implements PrivilegedAction { private BaseDataFileFactory dataFactory ; private StorageFactory storageFactory ; private static final int STORAGE_FILE_EXISTS_ACTION = 1 ; private static final int STORAGE_FILE_DELETE_ACTION = 2 ; private static final int STORAGE_FILE_RENAME_ACTION = 3 ; private int actionCode ; private StorageFile actionStorageFile ; private StorageFile actionDestStorageFile ; public EncryptOrDecryptData ( BaseDataFileFactory dataFactory ) { } public void decryptAllContainers ( RawTransaction t ) throws StandardException { } public void encryptAllContainers ( RawTransaction t ) throws StandardException { } private void encryptOrDecryptAllContainers ( RawTransaction t , boolean doEncrypt ) throws StandardException { } private void encryptOrDecryptContainer ( RawTransaction t , ContainerKey ckey , boolean doEncrypt ) throws StandardException { } private StorageFile getFile ( ContainerKey containerId , boolean old ) { } private String getFilePath ( ContainerKey containerId , boolean old ) { } private boolean isOldContainerFile ( String fileName ) { } private StorageFile getFile ( String ctrFileName ) { } void restoreContainer ( ContainerKey containerId ) throws StandardException { } public void removeOldVersionOfContainers ( ) throws StandardException { String [ ] files = dataFactory . getContainerNames ( ) ; if ( files != null ) { for ( int i = ( files . length ) - 1 ; i >= 0 ; i -- ) { if ( isOldContainerFile ( files [ i ] ) ) { StorageFile oldFile = getFile ( files [ i ] ) ; if ( ! ( privDelete ( oldFile ) ) ) { <START_BUG> throw StandardException . newException ( FILE_CANNOT_REMOVE_FILE , oldFile ) ; <END_BUG> } } } } } private synchronized boolean privExists ( StorageFile file ) { } private synchronized boolean privDelete ( StorageFile file ) { } private synchronized boolean privRename ( StorageFile fromFile , StorageFile destFile ) { } public Object run ( ) { } }

Fix:
throw StandardException . newException ( FILE_CANNOT_REMOVE_ENCRYPT_FILE , oldFile ) ;
Buggy code:
public class ChartActionTest { ChartAction chartAction = new ChartAction ( ) ; IterationBurndownBusiness iterationBurndownBusiness ; IterationBusiness iterationBusiness ; Iteration iteration ; @ Before public void setUp ( ) { } @ Test public void testGetIterationBurndown ( ) { } @ Test public void testGetSmallIterationBurndown ( ) { byte [ ] expected = new byte [ 100 ] ; chartAction . setBacklogId ( iteration . getId ( ) ) ; expect ( iterationBusiness . retrieve ( iteration . getId ( ) ) ) . andReturn ( iteration ) ; <START_BUG> expect ( iterationBurndownBusiness . getSmallIterationBurndown ( iteration ) ) . andReturn ( expected ) ; <END_BUG> replay ( iterationBusiness , iterationBurndownBusiness ) ; assertEquals ( SUCCESS , chartAction . getSmallIterationBurndown ( ) ) ; assertEquals ( expected , chartAction . getResult ( ) ) ; verify ( iterationBusiness , iterationBurndownBusiness ) ; } @ Test public void testGetCustomIterationBurndown ( ) { } }

Fix:
expect ( iterationBurndownBusiness . getSmallIterationBurndown ( iteration , 0 ) ) . andReturn ( expected ) ;
Buggy code:
public class RadioChoice extends AbstractSingleSelectChoice implements IOnChangeListener { public RadioChoice ( final String id ) { } public RadioChoice ( final String id , final Collection choices ) { } public RadioChoice ( final String id , final IChoiceList choices ) { } public RadioChoice ( final String id , IModel model , final Collection choices ) { } public RadioChoice ( final String id , IModel model , final IChoiceList choices ) { } public void onSelectionChanged ( ) { } protected void onSelectionChanged ( Object newSelection ) { } protected boolean wantOnSelectionChangedNotifications ( ) { } protected String getPrefix ( ) { } protected String getSuffix ( ) { } protected final void onComponentTagBody ( final MarkupStream markupStream , final ComponentTag openTag ) { final StringBuffer buffer = new StringBuffer ( ) ; final IChoiceList choices = getChoices ( ) ; for ( int i = 0 ; i < ( choices . size ( ) ) ; i ++ ) { final IChoice choice = choices . get ( i ) ; final String label = choice . getDisplayValue ( ) ; if ( label != null ) { buffer . append ( getPrefix ( ) ) ; buffer . append ( ( ( ( ( ( ( ( "<input<seq2seq4repair_space>name=\"" + ( getPath ( ) ) ) + "\"" ) + "<seq2seq4repair_space>type=\"radio\"" ) + ( isSelected ( choice ) ? "<seq2seq4repair_space>checked" : "" ) ) + "<seq2seq4repair_space>value=\"" ) + ( choice . getId ( ) ) ) + "\"" ) ) ; if ( wantOnSelectionChangedNotifications ( ) ) { final String url = urlFor ( IOnChangeListener . class ) ; buffer . append ( ( ( ( ( ( ( "<seq2seq4repair_space>onclick=\"location.href=\'" + url ) + "&" ) + ( getPath ( ) ) ) + "=" ) + ( choice . getId ( ) ) ) + "\';\"" ) ) ; } buffer . append ( ">" ) ; String display = getLocalizer ( ) . getString ( ( ( ( getId ( ) ) + "." ) + label ) , this , label ) ; <START_BUG> String escaped = Strings . escapeMarkup ( display ) ; <END_BUG> buffer . append ( escaped ) ; buffer . append ( getSuffix ( ) ) ; } } replaceComponentTagBody ( markupStream , openTag , buffer . toString ( ) ) ; } }

Fix:
String escaped = Strings . escapeMarkup ( display , false , true ) ;
Buggy code:
public final class Step implements Parcelable { @ NonNull private final String mDescription ; @ NonNull private final Duration mTime ; @ NonNull private final List < String > mIngredients ; @ NonNull private final boolean mSimultaneous ; private static final Set < String > simultaneousPatterns = new HashSet < String > ( ) { } ; public Step ( @ NonNull List < String > ingredients , @ NonNull String description , @ NonNull ReadableDuration duration , boolean isSimultaneous ) { } public Step ( @ NonNull List < String > ingredients , @ NonNull String description , @ NonNull ReadableDuration duration ) { } private static boolean isSimultaneousParser ( @ NonNull String description ) { } @ NonNull public String getDescription ( ) { } @ NonNull public ReadableDuration getTime ( ) { } @ NonNull public List < String > getIngredients ( ) { } @ NonNull public int getIntTime ( ) { } public boolean isSimultaneous ( ) { } @ Override public boolean equals ( Object o ) { } @ Override public int hashCode ( ) { } @ Override public String toString ( ) { <START_BUG> return ( ( ( ( ( ( ( ( ( "Step{" + "mDescription='" ) + ( mDescription ) ) + '\'' ) + ",<seq2seq4repair_space>mTime=" ) + ( mTime ) ) + ",<seq2seq4repair_space>mIngredients=" ) + ( Step . ListToString ( mIngredients ) ) ) + ",<seq2seq4repair_space>mSimultaneous=" ) + ( mSimultaneous ) ) + '}' ; <END_BUG> } public static String ListToString ( List < String > lst ) { } public static final Parcelable . Creator < Step > CREATOR = new Parcelable . Creator < Step > ( ) { @ Override public Step createFromParcel ( Parcel source ) { } @ Override public Step [ ] newArray ( int size ) { } } ; @ Override public int describeContents ( ) { } @ Override public void writeToParcel ( Parcel dest , int flags ) { } }

Fix:
return ( ( ( ( ( ( ( ( ( "Step{" + "mDescription='" ) + ( mDescription ) ) + '\'' ) + ",<seq2seq4repair_space>mTime=" ) + ( mTime . getMillis ( ) ) ) + ",<seq2seq4repair_space>mIngredients=" ) + ( Step . ListToString ( mIngredients ) ) ) + ",<seq2seq4repair_space>mSimultaneous=" ) + ( mSimultaneous ) ) + '}' ;
Buggy code:
public class DataSourceAdd extends AbstractDataSourceAdd { static final DataSourceAdd INSTANCE = new DataSourceAdd ( ) ; protected void populateModel ( ModelNode operation , ModelNode model ) { <START_BUG> populateAddModel ( operation , model , Constants . CONNECTION_PROPERTIES , DataSourcesSubsystemProviders . DATASOURCE_ATTRIBUTE ) ; <END_BUG> } protected AbstractDataSourceService createDataSourceService ( final String jndiName ) throws OperationFailedException { } @ Override protected ServiceController < ? > startConfigAndAddDependency ( ServiceBuilder < ? > dataSourceServiceBuilder , AbstractDataSourceService dataSourceService , String jndiName , ServiceTarget serviceTarget , final ModelNode operation ) throws OperationFailedException { } }

Fix:
populateAddModel ( operation , model , Constants . CONNECTION_PROPERTIES . getName ( ) , DataSourcesSubsystemProviders . DATASOURCE_ATTRIBUTE ) ;
Buggy code:
public class TestBufferedIndexInput extends LuceneTestCase { private static void writeBytes ( File aFile , long size ) throws IOException { } private static final long TEST_FILE_LENGTH = 100 * 1024 ; public void testReadByte ( ) throws Exception { } public void testReadBytes ( ) throws Exception { TestBufferedIndexInput . MyBufferedIndexInput input = new TestBufferedIndexInput . MyBufferedIndexInput ( ) ; runReadBytes ( input , BUFFER_SIZE , random ) ; final int inputBufferSize = 128 ; <START_BUG> File tmpInputFile = File . createTempFile ( "IndexInput" , "tmpFile" ) ; <END_BUG> tmpInputFile . deleteOnExit ( ) ; TestBufferedIndexInput . writeBytes ( tmpInputFile , TestBufferedIndexInput . TEST_FILE_LENGTH ) ; runReadBytesAndClose ( new SimpleFSIndexInput ( tmpInputFile , inputBufferSize , 10 ) , inputBufferSize , random ) ; runReadBytesAndClose ( new NIOFSIndexInput ( tmpInputFile , inputBufferSize , 10 ) , inputBufferSize , random ) ; } private void runReadBytesAndClose ( IndexInput input , int bufferSize , Random r ) throws IOException { } private void runReadBytes ( IndexInput input , int bufferSize , Random r ) throws IOException { } private byte [ ] buffer = new byte [ 10 ] ; private void checkReadBytes ( IndexInput input , int size , int pos ) throws IOException { } public void testEOF ( ) throws Exception { } private static byte byten ( long n ) { } private static class MyBufferedIndexInput extends BufferedIndexInput { private long pos ; private long len ; public MyBufferedIndexInput ( long len ) { } public MyBufferedIndexInput ( ) { } @ Override protected void readInternal ( byte [ ] b , int offset , int length ) throws IOException { } @ Override protected void seekInternal ( long pos ) throws IOException { } @ Override public void close ( ) throws IOException { } @ Override public long length ( ) { } } public void testSetBufferSize ( ) throws IOException { } private static class MockFSDirectory extends Directory { List < IndexInput > allIndexInputs = new ArrayList < IndexInput > ( ) ; Random rand ; private Directory dir ; public MockFSDirectory ( File path , Random rand ) throws IOException { } @ Override public IndexInput openInput ( String name ) throws IOException { } public void tweakBufferSizes ( ) { } @ Override public IndexInput openInput ( String name , int bufferSize ) throws IOException { } @ Override public IndexOutput createOutput ( String name ) throws IOException { } @ Override public void close ( ) throws IOException { } @ Override public void deleteFile ( String name ) throws IOException { } @ Override @ Deprecated public void touchFile ( String name ) throws IOException { } @ Override public long fileModified ( String name ) throws IOException { } @ Override public boolean fileExists ( String name ) throws IOException { } @ Override public String [ ] listAll ( ) throws IOException { } @ Override public long fileLength ( String name ) throws IOException { } } }

Fix:
File tmpInputFile = _TestUtil . createTempFile ( "IndexInput" , "tmpFile" , TEMP_DIR ) ;
Buggy code:
public class Path extends DataType implements Cloneable { private Vector elements ; public static Path systemClasspath = new Path ( null , System . getProperty ( "java.class.path" ) ) ; public class PathElement { private String [ ] parts ; public void setLocation ( File loc ) { } public void setPath ( String path ) { } public String [ ] getParts ( ) { } } public Path ( Project p , String path ) { } public Path ( Project project ) { } public void setLocation ( File location ) throws BuildException { } public void setPath ( String path ) throws BuildException { } public void setRefid ( Reference r ) throws BuildException { } public Path . PathElement createPathElement ( ) throws BuildException { } public void addFileset ( FileSet fs ) throws BuildException { } public Path createPath ( ) throws BuildException { } public void append ( Path other ) { } public void addExisting ( Path source ) { String [ ] list = source . list ( ) ; for ( int i = 0 ; i < ( list . length ) ; i ++ ) { File f = null ; if ( ( getProject ( ) ) != null ) { f = getProject ( ) . resolveFile ( list [ i ] ) ; } else { f = new File ( list [ i ] ) ; } if ( f . exists ( ) ) { setLocation ( f ) ; } else { <START_BUG> log ( ( ( "dropping<seq2seq4repair_space>" + f ) + "<seq2seq4repair_space>from<seq2seq4repair_space>path<seq2seq4repair_space>as<seq2seq4repair_space>it<seq2seq4repair_space>doesn't<seq2seq4repair_space>exist" ) , MSG_WARN ) ; <END_BUG> } } } public String [ ] list ( ) { } public String toString ( ) { } public static String [ ] translatePath ( Project project , String source ) { } public static String translateFile ( String source ) { } protected static boolean translateFileSep ( StringBuffer buffer , int pos ) { } public int size ( ) { } public Object clone ( ) { } protected void dieOnCircularReference ( Stack stk , Project p ) throws BuildException { } private static String resolveFile ( Project project , String relativeName ) { } private static void addUnlessPresent ( Vector v , String s ) { } public Path concatSystemClasspath ( ) { } public Path concatSystemClasspath ( String defValue ) { } public void addJavaRuntime ( ) { } public void addExtdirs ( Path extdirs ) { } }

Fix:
log ( ( ( "dropping<seq2seq4repair_space>" + f ) + "<seq2seq4repair_space>from<seq2seq4repair_space>path<seq2seq4repair_space>as<seq2seq4repair_space>it<seq2seq4repair_space>doesn't<seq2seq4repair_space>exist" ) , MSG_VERBOSE ) ;
Buggy code:
public class EntityBeanGetHomeInterceptorFactory implements InterceptorFactory { private final InjectedValue < ComponentView > viewToCreate = new InjectedValue < ComponentView > ( ) ; @ Override public Interceptor create ( final InterceptorFactoryContext context ) { return new Interceptor ( ) { @ Override public Object processInvocation ( final InterceptorContext context ) throws Exception { <START_BUG> return viewToCreate . getValue ( ) . createInstance ( ) . createProxy ( ) ; <END_BUG> } } ; } public InjectedValue < ComponentView > getViewToCreate ( ) { } }

Fix:
return viewToCreate . getValue ( ) . createInstance ( ) . getInstance ( ) ;
Buggy code:
class DigitalPanel extends JPanel { private static final long serialVersionUID = 1L ; private JPanel xpBusOutputPanel = null ; private JPanel xpBusControlPanel = null ; private JPanel eightBitDigitalChannelOptionsPanel = null ; private JPanel lvdsControlPanel = null ; private JPanel eightBitDigitalChannelColorControlPanel = null ; public DigitalPanel ( ) { } private void initialize ( ) { } private JPanel getXpBusOutputPanel ( ) { } private JPanel getXpBusControlPanel ( ) { if ( ( xpBusControlPanel ) == null ) <START_BUG> xpBusControlPanel = new JPanel ( ) ; <END_BUG> return xpBusControlPanel ; } private JPanel getEightBitDigitalChannelColorControlPanel ( ) { } private JPanel getLVDSControlPanel ( ) { } private JPanel getEightBitDigitalChannelOptionsPanel ( ) { } }

Fix:
xpBusControlPanel = new XpBusControlPanel ( ) ;