nus-yam/ex-repair huggingface dataset:
Buggy code:
public interface JsonDB { <START_BUG> public boolean saveOrUpdate ( Object object , Class _class ) ; <END_BUG> public < T > T findBy ( String key , String value , Class < T > _class ) { } public < T > T get ( int id , Class < T > _class ) { } public < T > List < T > list ( String key , String value , Class < T > _class ) { } }

Fix:
public int saveOrUpdate ( Object object , Class _class ) ;
Buggy code:
public class BiopaxConverter { private static final Logger log = LoggerFactory . getLogger ( BiopaxConverter . class ) ; private final Blacklist blacklist ; public BiopaxConverter ( Blacklist blacklist ) { } public void convert ( Model m , OutputFormat format , OutputStream os , Object ... args ) throws IOException { } public ServiceResponse convert ( Model m , OutputFormat format , Object ... args ) { } public void convertToSBGN ( Model m , OutputStream stream , Blacklist blackList , boolean doLayout ) throws IOException { } public void convertToGSEA ( Model m , OutputStream stream , String outputIdType , boolean skipOutsidePathways ) throws IOException { } public void convertToBinarySIF ( Model m , OutputStream out , boolean extended , String db ) throws IOException { ConfigurableIDFetcher idFetcher = new ConfigurableIDFetcher ( ) ; idFetcher . chemDbStartsWithOrEquals ( "chebi" ) ; if ( ( ( db == null ) || ( db . isEmpty ( ) ) ) || ( db . toLowerCase ( ) . startsWith ( "hgnc" ) ) ) { idFetcher . seqDbStartsWithOrEquals ( "hgnc" ) ; } else if ( db . toLowerCase ( ) . startsWith ( "uniprot" ) ) { idFetcher . seqDbStartsWithOrEquals ( "uniprot" ) ; } else { idFetcher . seqDbStartsWithOrEquals ( db ) ; } SIFSearcher searcher = new SIFSearcher ( idFetcher , SIFEnum . values ( ) ) ; searcher . setBlacklist ( blacklist ) ; if ( extended ) { Set < SIFInteraction > binaryInts = searcher . searchSIF ( m ) ; <START_BUG> OldFormatWriter . write ( binaryInts , out ) ; <END_BUG> } else { searcher . searchSIF ( m , out ) ; } } @ SuppressWarnings ( "unchecked" ) private Set < String > providers ( Model m ) { } }

Fix:
ExtendedSIFWriter . write ( binaryInts , out ) ;
Buggy code:
public class UnitTestDRFA extends TestCase { public UnitTestDRFA ( String name ) { } public void testComputeCheckPeriod ( ) { DailyRollingFileAppender drfa = new DailyRollingFileAppender ( ) ; drfa . setName ( "testComputeCheckPeriod" ) ; drfa . setOption ( DATE_PATTERN_OPTION , "yyyy-MM-dd.'log'" ) ; assertEquals ( drfa . computeCheckPeriod ( ) , DailyRollingFileAppender . TOP_OF_DAY ) ; drfa . setOption ( DATE_PATTERN_OPTION , "yyyy-MM-dd<seq2seq4repair_space>mm.'log'" ) ; assertEquals ( drfa . computeCheckPeriod ( ) , DailyRollingFileAppender . TOP_OF_MINUTE ) ; drfa . setOption ( DATE_PATTERN_OPTION , "yyyy-MM-dd<seq2seq4repair_space>a.'log'" ) ; assertEquals ( drfa . computeCheckPeriod ( ) , DailyRollingFileAppender . HALF_DAY ) ; drfa . setOption ( DATE_PATTERN_OPTION , "yyyy-MM-dd<seq2seq4repair_space>HH.'log'" ) ; assertEquals ( drfa . computeCheckPeriod ( ) , DailyRollingFileAppender . TOP_OF_HOUR ) ; drfa . setOption ( DATE_PATTERN_OPTION , "yyyy-MM.'log'" ) ; assertEquals ( drfa . computeCheckPeriod ( ) , DailyRollingFileAppender . TOP_OF_MONTH ) ; <START_BUG> drfa . setOption ( DATE_PATTERN_OPTION , "HH'log'" ) ; <END_BUG> assertEquals ( drfa . computeCheckPeriod ( ) , DailyRollingFileAppender . TOP_OF_HOUR ) ; } public void testRC1 ( ) { } public void testRC2 ( ) { } public static Test suite ( ) { } }

Fix:
drfa . setOption ( DATE_PATTERN_OPTION , "'log'HH'log'" ) ;
Buggy code:
public class Simulator { private CarQueue entranceCarQueue ; private CarQueue paymentCarQueue ; private CarQueue exitCarQueue ; private SimulatorView simulatorView ; private int day = 0 ; private int hour = 0 ; private int minute = 0 ; private int tickPause = 100 ; int weekDayArrivals = 50 ; int weekendArrivals = 90 ; int enterSpeed = 3 ; int paymentSpeed = 10 ; int exitSpeed = 9 ; int parkPassChance = 1 ; public Simulator ( ) { } public void run ( int steps ) { } private void tick ( ) { ( minute ) ++ ; while ( ( minute ) > 59 ) { minute -= 60 ; ( hour ) ++ ; } while ( ( hour ) > 23 ) { hour -= 24 ; ( day ) ++ ; } while ( ( day ) > 6 ) { day -= 7 ; } Random random = new Random ( ) ; int averageNumberOfCarsPerHour = ( ( day ) < 5 ) ? weekDayArrivals : weekendArrivals ; double standardDeviation = averageNumberOfCarsPerHour * 0.1 ; double numberOfCarsPerHour = averageNumberOfCarsPerHour + ( ( random . nextGaussian ( ) ) * standardDeviation ) ; int numberOfCarsPerMinute = ( ( int ) ( Math . round ( ( numberOfCarsPerHour // 60 ) ) ) ) ; for ( int i = 0 ; i < numberOfCarsPerMinute ; i ++ ) { if ( ( random . nextInt ( 10 ) ) < ( parkPassChance ) ) { Car car = new ParkPassCar ( ) ; entranceCarQueue . addCar ( car ) ; } else { Car car = new AdHocCar ( ) ; entranceCarQueue . addCar ( car ) ; } } for ( int i = 0 ; i < ( enterSpeed ) ; i ++ ) { Car car = entranceCarQueue . removeCar ( ) ; if ( car == null ) { break ; } Location freeLocation = simulatorView . getFirstFreeLocation ( ) ; if ( freeLocation != null ) { simulatorView . setCarAt ( freeLocation , car ) ; int stayMinutes = ( ( int ) ( 15 + ( ( ( random . nextFloat ( ) ) * 10 ) * 60 ) ) ) ; car . setMinutesLeft ( stayMinutes ) ; } } simulatorView . tick ( ) ; while ( true ) { Car car = simulatorView . getFirstLeavingCar ( ) ; if ( car == null ) { break ; } if ( car instanceof AdHocCar ) { car . setIsPaying ( true ) ; paymentCarQueue . addCar ( car ) ; } else if ( car instanceof ParkPassCar ) { <START_BUG> car . setIsPaying ( true ) ; <END_BUG> exitCarQueue . addCar ( car ) ; } } for ( int i = 0 ; i < ( paymentSpeed ) ; i ++ ) { Car car = paymentCarQueue . removeCar ( ) ; if ( car == null ) { break ; } simulatorView . removeCarAt ( car . getLocation ( ) ) ; exitCarQueue . addCar ( car ) ; } for ( int i = 0 ; i < ( exitSpeed ) ; i ++ ) { Car car = exitCarQueue . removeCar ( ) ; if ( car == null ) { break ; } } simulatorView . updateView ( ) ; try { Thread . sleep ( tickPause ) ; } catch ( InterruptedException e ) { e . printStackTrace ( ) ; } } }

Fix:
simulatorView . removeCarAt ( car . getLocation ( ) ) ;
Buggy code:
@ OnApplicationStart public class Bootstrap extends Job { public void doJob ( ) { } private void createAaronCalendars ( UserManager um , final CalendarManager cm ) { } private void createJudithCalendars ( UserManager um , final CalendarManager cm ) { User judith = um . createUser ( "judith" , "ese" ) ; EseCalendar judithcal ; try { judithcal = cm . createCalendar ( judith , "Judiths<seq2seq4repair_space>Kalender" ) ; } catch ( CalendarAlreadyExistsException e ) { judithcal = cm . getCalendar ( "Judiths<seq2seq4repair_space>Kalender" ) ; } Calendar juc = Calendar . getInstance ( ) ; juc . set ( 2011 , 11 , 23 , 22 , 15 ) ; Date start = juc . getTime ( ) ; juc . set ( 2011 , 11 , 23 , 23 , 0 ) ; Date end = juc . getTime ( ) ; <START_BUG> judithcal . addEvent ( ADMIN , new CalendarEvent ( start , end , "Super<seq2seq4repair_space>Tolle<seq2seq4repair_space>Party" , true ) ) ; <END_BUG> } private void createErwannCalendars ( UserManager um , final CalendarManager cm ) { } No newline ; at end ; of file ; }

Fix:
judithcal . addEvent ( ADMIN , new CalendarEvent ( start , end , "Tolle<seq2seq4repair_space>party" , true ) ) ;
Buggy code:
public class FilterForm < T > extends Form < T > { private static final long serialVersionUID = 1L ; private final IFilterStateLocator < T > locator ; public FilterForm ( final String id , final IFilterStateLocator < T > locator ) { } @ Override public void renderHead ( final IHeaderResponse response ) { } @ Override public void onComponentTagBody ( final MarkupStream markupStream , final ComponentTag openTag ) { } public final String getFocusTrackerFieldCssId ( ) { } public final IFilterStateLocator < T > getStateLocator ( ) { } public final void enableFocusTracking ( final FormComponent < ? > fc ) { fc . add ( new Behavior ( ) { private static final long serialVersionUID = 1L ; @ Override public void onComponentTag ( final Component component , final ComponentTag tag ) { <START_BUG> tag . put ( "id" , component . getMarkupId ( ) ) ; <END_BUG> tag . put ( "onfocus" , getFocusTrackingHandler ( component ) ) ; super . onComponentTag ( component , tag ) ; } } ) ; } public final String getFocusTrackingHandler ( final Component component ) { } private static class FilterStateModel < T > implements IModel < T > { private static final long serialVersionUID = 1L ; private final IFilterStateLocator < T > locator ; public FilterStateModel ( final IFilterStateLocator < T > locator ) { } public T getObject ( ) { } public void setObject ( final T object ) { } public void detach ( ) { } } }

Fix:
component . setOutputMarkupId ( true ) ;
Buggy code:
public class HomePage extends Activity { Button button ; public static boolean parseIsInitialized = false ; boolean isRegistered ; @ Override protected void onCreate ( Bundle savedInstanceState ) { super . onCreate ( savedInstanceState ) ; setContentView ( activity_homepage ) ; if ( ! ( HomePage . parseIsInitialized ) ) { Parse . enableLocalDatastore ( this ) ; Parse . initialize ( this , "2DRZJCltwfbJKH7cAcbkVNU2i2UFGq2uuDEIaxIK" , "CEzdLzmlsCUSOhIM5r5spTz7ZTRjbVScAqS0dzU2" ) ; HomePage . parseIsInitialized = true ; ParseUser . enableRevocableSessionInBackground ( ) ; } button = ( ( Button ) ( findViewById ( R . id . button ) ) ) ; button . setOnClickListener ( new View . OnClickListener ( ) { public void onClick ( View v ) { SharedPreferences prefs = getSharedPreferences ( "myPrefsKey" , MODE_PRIVATE ) ; SharedPreferences . Editor editor = prefs . edit ( ) ; String dateOfLastQuizTaken = prefs . getString ( "dateKey" , "0" ) ; Calendar c = Calendar . getInstance ( ) ; SimpleDateFormat sdf = new SimpleDateFormat ( "d//M//yy" ) ; String todaysDate = sdf . format ( c . getTime ( ) ) ; editor . putString ( "dateKey" , todaysDate ) ; editor . commit ( ) ; <START_BUG> if ( false ) { <END_BUG> button . setText ( "You've<seq2seq4repair_space>already<seq2seq4repair_space>taken<seq2seq4repair_space>the<seq2seq4repair_space>quiz<seq2seq4repair_space>today.<seq2seq4repair_space>Come<seq2seq4repair_space>back<seq2seq4repair_space>tommorow!" ) ; button . setTextSize ( 20 ) ; } else { Intent intent = new Intent ( HomePage . this , CountDownPage . class ) ; startActivity ( intent ) ; } } } ) ; Button button1 = ( ( Button ) ( findViewById ( button8 ) ) ) ; button1 . setOnClickListener ( new View . OnClickListener ( ) { public void onClick ( View v ) { Intent myIntent = new Intent ( HomePage . this , SubmitPage . class ) ; startActivity ( myIntent ) ; } } ) ; Button button2 = ( ( Button ) ( findViewById ( button7 ) ) ) ; button2 . setOnClickListener ( new View . OnClickListener ( ) { public void onClick ( View v ) { Intent myIntent = new Intent ( HomePage . this , AboutPage . class ) ; startActivity ( myIntent ) ; } } ) ; Button button3 = ( ( Button ) ( findViewById ( buttonLeader ) ) ) ; button3 . setOnClickListener ( new View . OnClickListener ( ) { public void onClick ( View v ) { Intent myIntent = new Intent ( HomePage . this , LeaderPage . class ) ; startActivity ( myIntent ) ; } } ) ; ParseUser currentUser = ParseUser . getCurrentUser ( ) ; if ( currentUser != null ) { isRegistered = true ; } else { isRegistered = false ; } View b = findViewById ( registerButton ) ; if ( isRegistered ) { b . setVisibility ( GONE ) ; } Button registerButton = ( ( Button ) ( findViewById ( registerButton ) ) ) ; registerButton . setOnClickListener ( new View . OnClickListener ( ) { public void onClick ( View v ) { Intent myIntent = new Intent ( HomePage . this , Register . class ) ; startActivity ( myIntent ) ; } } ) ; } @ Override public boolean onCreateOptionsMenu ( Menu menu ) { } }

Fix:
if ( dateOfLastQuizTaken . equals ( todaysDate ) ) {
Buggy code:
public class MetricActionScheduleComparator implements Comparator < MetricAction > { public int compare ( MetricAction e1 , MetricAction e2 ) { try { if ( ( e1 . getNextScheduleTime ( ) ) < ( e2 . getNextScheduleTime ( ) ) ) return - 1 ; else if ( ( e1 . getNextScheduleTime ( ) ) > ( e2 . getNextScheduleTime ( ) ) ) return 1 ; } catch ( Exception e ) { } <START_BUG> return 0 ; <END_BUG> } }

Fix:
return ( e1 . hashCode ( ) ) < ( e2 . hashCode ( ) ) ? - 1 : 1 ;
Buggy code:
public class OSGiDeploymentActivator { public void activate ( final BootUpdateContext updateContext ) { <START_BUG> updateContext . addDeploymentProcessor ( PARSE , PARSE_OSGI_MANIFEST , new OSGiManifestParseProcessor ( ) ) ; <END_BUG> updateContext . addDeploymentProcessor ( PARSE , PARSE_OSGI_BUNDLE_INFO , new OSGiBundleInfoParseProcessor ( ) ) ; updateContext . addDeploymentProcessor ( PARSE , PARSE_OSGI_PROPERTIES , new OSGiXServiceParseProcessor ( ) ) ; updateContext . addDeploymentProcessor ( INSTALL , INSTALL_OSGI_DEPLOYMENT , new OSGiDeploymentInstallProcessor ( ) ) ; } }

Fix:
updateContext . addDeploymentProcessor ( STRUCTURE , STRUCTURE_OSGI_MANIFEST , new OSGiManifestStructureProcessor ( ) ) ;
Buggy code:
class AnimationManager { private static final String RUNNING_ICON = "running.gif" ; private static final String BACKGROUND_ICON = "back.gif" ; private static final String ERROR_ICON = "error.gif" ; private static AnimationManager singleton ; private ImageData [ ] animatedData ; private ImageData [ ] disabledData ; private ImageData [ ] errorData ; private static String DISABLED_IMAGE_NAME = "ANIMATION_DISABLED_IMAGE" ; private static String ANIMATED_IMAGE_NAME = "ANIMATION_ANIMATED_IMAGE" ; private static String ERROR_IMAGE_NAME = "ANIMATION_ERROR_IMAGE" ; Color background ; private ImageLoader runLoader = new ImageLoader ( ) ; private ImageLoader errorLoader = new ImageLoader ( ) ; boolean animated = false ; Job animateJob ; Job clearJob ; boolean showingError = false ; private IJobProgressManagerListener listener ; List items = Collections . synchronizedList ( new ArrayList ( ) ) ; static AnimationManager getInstance ( ) { } AnimationManager ( ) { } void addItem ( final AnimationItem item ) { } ImageData [ ] getImageData ( ) { } Image getImage ( ) { } boolean isAnimated ( ) { } void setAnimated ( final boolean bool ) { } void dispose ( ) { } void animateLoop ( IProgressMonitor monitor ) { } AnimationItem [ ] getAnimationItems ( ) { } int visibleDelay ( int ms ) { } public Rectangle getImageBounds ( ) { } private IJobProgressManagerListener getProgressListener ( ) { return new IJobProgressManagerListener ( ) { HashSet jobs = new HashSet ( ) ; public void add ( JobInfo info ) { incrementJobCount ( info ) ; } public void refresh ( JobInfo info ) { if ( ( info . getErrorStatus ( ) ) != null ) showingError = true ; else { int state = info . getJob ( ) . getState ( ) ; if ( state == ( Job . RUNNING ) ) add ( info ) ; else remove ( info ) ; } } public void refreshAll ( ) { ProgressManager manager = ProgressManager . getInstance ( ) ; showingError = manager . hasErrorsDisplayed ( ) ; jobs . clear ( ) ; setAnimated ( false ) ; <START_BUG> JobInfo [ ] currentInfos = manager . getJobInfos ( ) ; <END_BUG> for ( int i = 0 ; i < ( currentInfos . length ) ; i ++ ) { JobInfo info = currentInfos [ i ] ; if ( manager . isNonDisplayableJob ( info . getJob ( ) , showsDebug ( ) ) ) continue ; add ( currentInfos [ i ] ) ; } } public void remove ( JobInfo info ) { if ( jobs . contains ( info . getJob ( ) ) ) { decrementJobCount ( info . getJob ( ) ) ; } } public boolean showsDebug ( ) { return false ; } private void incrementJobCount ( JobInfo info ) { if ( isNotTracked ( info ) ) return ; if ( jobs . isEmpty ( ) ) setAnimated ( true ) ; jobs . add ( info . getJob ( ) ) ; } private void decrementJobCount ( Job job ) { jobs . remove ( job ) ; if ( jobs . isEmpty ( ) ) setAnimated ( false ) ; } private boolean isNotTracked ( JobInfo info ) { if ( ( info . getErrorStatus ( ) ) == null ) { Job job = info . getJob ( ) ; return ( ( ( job . getState ( ) ) != ( Job . RUNNING ) ) || ( job == ( clearJob ) ) ) || ( job == ( animateJob ) ) ; } else return false ; } } ; } private Job getAnimateJob ( ) { } void createClearJob ( ) { } ImageLoader getLoader ( ) { } }

Fix:
JobInfo [ ] currentInfos = manager . getJobInfos ( showsDebug ( ) ) ;
Buggy code:
final class JVMOptionRemoveHandler implements OperationStepHandler , DescriptionProvider { static final String OPERATION_NAME = "remove-jvm-option" ; static final JVMOptionRemoveHandler INSTANCE = new JVMOptionRemoveHandler ( ) ; private final ParameterValidator validator = new StringLengthValidator ( 1 ) ; @ Override public void execute ( OperationContext context , ModelNode operation ) throws OperationFailedException { validator . validateParameter ( JVM_OPTION , operation . get ( JVM_OPTION ) ) ; final Resource resource = context . readResourceForUpdate ( EMPTY_ADDRESS ) ; final ModelNode model = resource . getModel ( ) ; final ModelNode option = operation . require ( JVM_OPTION ) ; if ( model . hasDefined ( JVM_OPTIONS ) ) { final ModelNode values = model . get ( JVM_OPTIONS ) . clone ( ) ; model . get ( JVM_OPTIONS ) . setEmptyList ( ) ; for ( ModelNode value : values . asList ( ) ) { if ( ! ( value . equals ( option ) ) ) { model . get ( JVM_OPTIONS ) . add ( value ) ; } } } <START_BUG> context . completeStep ( ) ; <END_BUG> } @ Override public ModelNode getModelDescription ( Locale locale ) { } }

Fix:
context . completeStep ( NOOP_ROLLBACK_HANDLER ) ;
Buggy code:
public class LongLiteral extends NumberLiteral { long value ; static final Constant FORMAT_ERROR = new DoubleConstant ( ( 1.0 // 0.0 ) ) ; public LongLiteral ( char [ ] token , int s , int e ) { } public LongLiteral ( char [ ] token , int s , int e , long value ) { } public void computeConstant ( ) { } public void generateCode ( BlockScope currentScope , CodeStream codeStream , boolean valueRequired ) { int pc = codeStream . position ; if ( valueRequired ) if ( ( ( implicitConversion ) > > 4 ) == ( TypeIds . T_long ) ) codeStream . generateInlinedValue ( value ) ; else codeStream . generateConstant ( constant , implicitConversion ) ; <START_BUG> codeStream . recordPositionsFrom ( pc , this ) ; <END_BUG> } public TypeBinding literalType ( BlockScope scope ) { } public final boolean mayRepresentMIN_VALUE ( ) { } public TypeBinding resolveType ( BlockScope scope ) { } public void traverse ( IAbstractSyntaxTreeVisitor visitor , BlockScope scope ) { } }

Fix:
codeStream . recordPositionsFrom ( pc , this . sourceStart ) ;
Buggy code:
public class SassLibraryTest { private Path workingDirectory ; private Path simpleScssPath ; @ Before public void init ( ) throws Exception { } @ After public void shutdown ( ) throws Exception { } @ Test public void testVersion ( ) { } @ Test public void testSimpleScssFile ( ) { <START_BUG> final Sass_File_Context fileContext = INSTANCE . sass_make_file_context ( this . simpleScssPath . toAbsolutePath ( ) . toUri ( ) . getPath ( ) ) ; <END_BUG> final Sass_Context context = INSTANCE . sass_file_context_get_context ( fileContext ) ; final Sass_Options contextOptions = INSTANCE . sass_context_get_options ( context ) ; INSTANCE . sass_option_set_precision ( contextOptions , 10 ) ; final int compilerStatus = INSTANCE . sass_compile_file_context ( fileContext ) ; final String outputString ; try { if ( compilerStatus != 0 ) { outputString = null ; final String errorMessage = INSTANCE . sass_context_get_error_message ( context ) ; fail ( errorMessage ) ; } else { outputString = INSTANCE . sass_context_get_output_string ( context ) ; } } finally { INSTANCE . sass_delete_file_context ( fileContext ) ; } final CascadingStyleSheet styleSheet = CSSReader . readFromString ( outputString , LATEST ) ; assertNotNull ( styleSheet ) ; } @ Ignore ( "The<seq2seq4repair_space>Sass<seq2seq4repair_space>data<seq2seq4repair_space>context<seq2seq4repair_space>seems<seq2seq4repair_space>to<seq2seq4repair_space>be<seq2seq4repair_space>defunct<seq2seq4repair_space>right<seq2seq4repair_space>now.<seq2seq4repair_space>:-(" ) @ Test public void testSimpleScssData ( ) { } }

Fix:
final Sass_File_Context fileContext = INSTANCE . sass_make_file_context ( this . simpleScssPath . toFile ( ) . getAbsolutePath ( ) ) ;
Buggy code:
public class MainState extends GameState { private MainState ms ; private OrthographicCamera cam ; private OrthographicCamera hudCam ; private Player player ; private ArrayList < TiledMap > level ; private GameStateManager gsm ; private SpriteBatch sb ; private SpriteBatch hud ; private BitmapFont hudFont ; private TiledMap map ; private OrthogonalTiledMapRenderer mapRenderer ; private Music carnivalMusic ; private ArrayList < Entity > critters ; public MainState ( GameStateManager inputGSM ) { } public void update ( ) { } public void worldUpdate ( ) { } public void startMusic ( ) { } public void stopMusic ( ) { } public void cameraHandler ( ) { } public void draw ( ) { mapRenderer . setView ( cam ) ; mapRenderer . render ( ) ; sb . setProjectionMatrix ( cam . combined ) ; sb . begin ( ) ; <START_BUG> sb . draw ( player . getFrame ( ) , player . getX ( ) , player . getY ( ) ) ; <END_BUG> Texture t ; sb . draw ( ( t = new Texture ( "badlogic.jpg" ) ) , player . getInteraction ( ) . x , player . getInteraction ( ) . y , player . getInteraction ( ) . area ( ) , player . getInteraction ( ) . area ( ) ) ; sb . end ( ) ; hud . setProjectionMatrix ( hudCam . combined ) ; hud . begin ( ) ; hudFont . draw ( hud , ( "PlayerX:" + ( player . getX ( ) ) ) , 60 , 20 ) ; hudFont . draw ( hud , ( "Rectangle<seq2seq4repair_space>X:" + ( player . getCollision ( ) . x ) ) , 60 , 10 ) ; hud . end ( ) ; } public void addEntity ( Entity e ) { } public void dispose ( ) { } public MapProperties getCurrentMapProperties ( ) { } public GameStateManager getGSM ( ) { } }

Fix:
sb . draw ( player . getFrame ( ) , ( ( player . getX ( ) ) - ( ( player . getFrame ( ) . getRegionWidth ( ) ) // 2 ) ) , player . getY ( ) ) ;
Buggy code:
public final class ThreadFactoryPriorityUpdate extends AbstractThreadsSubsystemUpdate < Void > { private static final long serialVersionUID = 4253625376544201028L ; private final String name ; private final Integer newPriority ; public ThreadFactoryPriorityUpdate ( final String name , final Integer newPriority ) { } public ThreadFactoryPriorityUpdate getCompensatingUpdate ( final ThreadsSubsystemElement original ) { } protected < P > void applyUpdate ( final UpdateContext updateContext , final UpdateResultHandler < ? super Void , P > handler , final P param ) { <START_BUG> final ServiceController < ? > service = updateContext . getServiceContainer ( ) . getService ( ThreadsServices . threadFactoryName ( name ) ) ; <END_BUG> if ( service == null ) { handler . handleFailure ( notConfigured ( ) , param ) ; } else { try { final ThreadFactoryService threadFactoryService = ( ( ThreadFactoryService ) ( service . getValue ( ) ) ) ; threadFactoryService . setPriority ( newPriority ) ; handler . handleSuccess ( null , param ) ; } catch ( Throwable t ) { handler . handleFailure ( t , param ) ; } } } protected void applyUpdate ( final ThreadsSubsystemElement element ) throws UpdateFailedException { } public Integer getNewPriority ( ) { } public String getName ( ) { } private UpdateFailedException notConfigured ( ) { } }

Fix:
final ServiceController < ? > service = updateContext . getServiceRegistry ( ) . getService ( ThreadsServices . threadFactoryName ( name ) ) ;
Buggy code:
public class MySQLSqlStatementBuilder extends SqlStatementBuilder { private static final String DELIMITER_KEYWORD = "DELIMITER" ; private final String [ ] charSets = new String [ ] { "ARMSCII8" , "ASCII" , "BIG5" , "BINARY" , "CP1250" , "CP1251" , "CP1256" , "CP1257" , "CP850" , "CP852" , "CP866" , "CP932" , "DEC8" , "EUCJPMS" , "EUCKR" , "GB2312" , "GBK" , "GEOSTD8" , "GREEK" , "HEBREW" , "HP8" , "KEYBCS2" , "KOI8R" , "KOI8U" , "LATIN1" , "LATIN2" , "LATIN5" , "LATIN7" , "MACCE" , "MACROMAN" , "SJIS" , "SWE7" , "TIS620" , "UCS2" , "UJIS" , "UTF8" } ; boolean isInMultiLineCommentDirective = false ; @ Override public Delimiter extractNewDelimiterFromLine ( String line ) { } @ Override protected Delimiter changeDelimiterIfNecessary ( String line , Delimiter delimiter ) { } @ Override public boolean isCommentDirective ( String line ) { } @ Override protected boolean isSingleLineComment ( String line ) { } @ Override protected String removeEscapedQuotes ( String token ) { String noEscapedBackslashes = StringUtils . replaceAll ( token , "\\\\" , "" ) ; String noBackslashEscapes = StringUtils . replaceAll ( StringUtils . replaceAll ( noEscapedBackslashes , "\\\'" , "" ) , "\\\"" , "" ) ; <START_BUG> return StringUtils . replaceAll ( noBackslashEscapes , "''" , "" ) ; <END_BUG> } @ Override protected String cleanToken ( String token ) { } @ Override protected String extractAlternateOpenQuote ( String token ) { } @ Override protected String computeAlternateCloseQuote ( String openQuote ) { } }

Fix:
return StringUtils . replaceAll ( noBackslashEscapes , "''" , "" ) . replace ( "'" , "<seq2seq4repair_space>'<seq2seq4repair_space>" ) ;
Buggy code:
public final class CLDialog { private CLDialog ( ) { } public static String getInput ( String msg ) { } public static String getInput ( String message , Object [ ] validAnswers ) { } public static String getInput ( String message , Stream < ? > validAnswers ) { ImmutableList < String > validInputs = validAnswers . map ( ( a ) -> a . toString ( ) ) . collect ( Gullectors . toImmutableList ( ) ) ; String validConcats = validInputs . stream ( ) . collect ( Collectors . joining ( "<seq2seq4repair_space>|<seq2seq4repair_space>" ) ) ; validInputs = validInputs . stream ( ) . map ( ( s ) -> s . toUpperCase ( ) . trim ( ) ) . collect ( Gullectors . toImmutableList ( ) ) ; String input = CLDialog . getInput ( message . concat ( System . getProperty ( "line.separator" ) ) . concat ( validConcats ) ) ; while ( ! ( validInputs . contains ( input . trim ( ) . toUpperCase ( ) ) ) ) { input = CLDialog . getInput ( ( ( ( "Invalid<seq2seq4repair_space>input!<seq2seq4repair_space>Please<seq2seq4repair_space>try<seq2seq4repair_space>again.<seq2seq4repair_space>Options<seq2seq4repair_space>are<seq2seq4repair_space>" + ( System . getProperty ( "line.separator" ) ) ) + "<seq2seq4repair_space>" ) + validConcats ) ) ; } <START_BUG> return input ; <END_BUG> } }

Fix:
return input . toUpperCase ( ) . trim ( ) ;
Buggy code:
public interface JDBCStore { public StoreContext getContext ( ) { } public JDBCConfiguration getConfiguration ( ) { } public DBDictionary getDBDictionary ( ) { } public SQLFactory getSQLFactory ( ) { } public JDBCLockManager getLockManager ( ) { } public Connection getConnection ( ) { } public JDBCFetchConfiguration getFetchConfiguration ( ) { } public Id newDataStoreId ( long id , ClassMapping mapping , boolean subs ) { } <START_BUG> public Object find ( Object oid , ValueMapping vm , JDBCFetchState fetchState ) ; <END_BUG> public void loadSubclasses ( ClassMapping mapping ) { } public boolean addClassConditions ( Select sel , ClassMapping mapping , boolean subs , Joins joins ) { } }

Fix:
public Object find ( Object oid , ValueMapping vm , JDBCFetchConfiguration fetch ) ;
Buggy code:
public class GenericRow implements Row { private final GenericSheet sheet ; private final List < Cell > cells = new ArrayList < > ( ) ; private final int rowNumber ; public GenericRow ( GenericSheet sheet , int rowNumber ) { } @ Override public GenericSheet getSheet ( ) { } @ Override public Cell getCell ( int col ) { } private void reserve ( int col ) { if ( col >= ( cells . size ( ) ) ) { GenericCellStyle cellStyle = getSheet ( ) . getWorkbook ( ) . getDefaultCellStyle ( ) ; for ( int colNum = cells . size ( ) ; colNum <= col ; colNum ++ ) { <START_BUG> cells . add ( new GenericCell ( this , cellStyle ) ) ; <END_BUG> } sheet . reserveColumn ( col ) ; } } @ Override public Iterator < Cell > iterator ( ) { } @ Override public int getRowNumber ( ) { } @ Override public int getFirstCellNum ( ) { } @ Override public int getLastCellNum ( ) { } }

Fix:
cells . add ( new GenericCell ( this , colNum , cellStyle ) ) ;
Buggy code:
public class MainHeatmap extends AppCompatActivity implements LocationListener { private GoogleMap mMap ; private static final long MIN_TIME = 0 ; private static final float MIN_DISTANCE = 0 ; private AccidentCollection ac ; private LocationManager lm ; private TripCollection tc ; private boolean track = true ; private ListView mLearnerMenu ; private ArrayAdapter < String > mAdapter ; private ActionBarDrawerToggle mDrawerToggle ; private DrawerLayout mDrawerLayout ; private String mActivityTitle ; @ Override protected void onCreate ( Bundle savedInstanceState ) { Filters . prepare ( ) ; super . onCreate ( savedInstanceState ) ; setContentView ( activity_main_heatmap ) ; setUpMapIfNeeded ( ) ; Drawer result = new DrawerBuilder ( ) . withActivity ( this ) . addDrawerItems ( new PrimaryDrawerItem ( ) . withName ( "Start//Stop" ) , new PrimaryDrawerItem ( ) . withName ( "View<seq2seq4repair_space>Logs" ) , new PrimaryDrawerItem ( ) . withName ( "Track//UnTrack" ) ) . withOnDrawerItemClickListener ( new Drawer . OnDrawerItemClickListener ( ) { @ Override public boolean onItemClick ( AdapterView < ? > parent , View view , int position , long id , IDrawerItem drawerItem ) { if ( position == 0 ) { mMap . clear ( ) ; <START_BUG> ac . setupData ( MainHeatmap . this ) ; <END_BUG> MainHeatmap . this . tc . startOrEndTrip ( ) ; } else if ( position == 1 ) { } else if ( position == 2 ) { track = ! ( track ) ; } return false ; } } ) . build ( ) ; } @ Override public boolean onCreateOptionsMenu ( Menu menu ) { } @ Override public boolean onOptionsItemSelected ( MenuItem item ) { } public void doSettings ( ) { } public void checkSettings ( ) { } @ Override protected void onResume ( ) { } @ Override protected void onPause ( ) { } private void setUpMapIfNeeded ( ) { } private void setUpMap ( ) { } @ Override public void onLocationChanged ( Location location ) { } @ Override public void onStatusChanged ( String provider , int status , Bundle extras ) { } @ Override public void onProviderEnabled ( String provider ) { } @ Override public void onProviderDisabled ( String provider ) { } }

Fix:
ac . updateOverlay ( ) ;
Buggy code:
public class WicketSessionFilter implements Filter { private static final Logger logger = LoggerFactory . getLogger ( WicketSessionFilter . class ) ; private String filterName ; private String sessionKey ; public WicketSessionFilter ( ) { } public void init ( FilterConfig filterConfig ) throws ServletException { } public void doFilter ( ServletRequest request , ServletResponse response , FilterChain chain ) throws IOException , ServletException { } private void cleanupBoundApplicationAndSession ( ) { } private void bindSession ( ServletRequest request , WebApplication application ) { HttpSession httpSession = ( ( HttpServletRequest ) ( request ) ) . getSession ( false ) ; Session session = getSession ( httpSession , application ) ; if ( session == null ) { if ( WicketSessionFilter . logger . isDebugEnabled ( ) ) { WicketSessionFilter . logger . debug ( ( ( ( ( ( ( "could<seq2seq4repair_space>not<seq2seq4repair_space>set<seq2seq4repair_space>Wicket<seq2seq4repair_space>session:<seq2seq4repair_space>key<seq2seq4repair_space>" + ( sessionKey ) ) + "<seq2seq4repair_space>not<seq2seq4repair_space>found<seq2seq4repair_space>in<seq2seq4repair_space>http<seq2seq4repair_space>session<seq2seq4repair_space>for<seq2seq4repair_space>" ) + ( ( ( HttpServletRequest ) ( request ) ) . getContextPath ( ) ) ) + "," ) + ( request . getServerName ( ) ) ) + ",<seq2seq4repair_space>or<seq2seq4repair_space>http<seq2seq4repair_space>session<seq2seq4repair_space>does<seq2seq4repair_space>not<seq2seq4repair_space>exist" ) ) ; } } else { <START_BUG> session . bind ( ) ; <END_BUG> } } private WebApplication bindApplication ( ) { } private Session getSession ( HttpSession session , WebApplication application ) { } public void destroy ( ) { } }

Fix:
ThreadContext . setSession ( session ) ;
Buggy code:
public final class PageMap implements Serializable { public static final String defaultName = "main" ; private String interceptContinuationURL ; private final String name ; private int pageId = 0 ; private transient MostRecentlyUsedMap pages ; private transient Session session ; public PageMap ( final String name , final Session session ) { } public final Page add ( final Page page ) { } public final boolean continueToOriginalDestination ( ) { } public final Page get ( final String id ) { } public final String getName ( ) { } public final boolean isDefault ( ) { } public final Page put ( final Page page ) { } public final void redirectToInterceptPage ( final Page page ) { interceptContinuationURL = page . getResponse ( ) . encodeURL ( page . getRequest ( ) . getURL ( ) ) ; <START_BUG> page . getRequestCycle ( ) . redirectToPage ( page ) ; <END_BUG> session . dirty ( ) ; } public final void remove ( final Page page ) { } public final void removeAll ( ) { } final void setSession ( final Session session ) { } private MostRecentlyUsedMap getPages ( ) { } }

Fix:
page . redirectTo ( page ) ;
Buggy code:
public class SolandraDispatchFilter extends SolrDispatchFilter { private static final String schemaPrefix = "//schema" ; @ Override public void doFilter ( ServletRequest request , ServletResponse response , FilterChain chain ) throws IOException , ServletException { HttpServletRequest req = ( ( HttpServletRequest ) ( request ) ) ; HttpServletResponse resp = ( ( HttpServletResponse ) ( response ) ) ; String indexName = "" ; String resourceName = "" ; String path = req . getServletPath ( ) ; if ( ( req . getPathInfo ( ) ) != null ) { path += req . getPathInfo ( ) ; } if ( path . startsWith ( SolandraDispatchFilter . schemaPrefix ) ) { path = path . substring ( SolandraDispatchFilter . schemaPrefix . length ( ) ) ; int idx = path . indexOf ( "//" , 1 ) ; <START_BUG> if ( idx > 1 ) { <END_BUG> indexName = path . substring ( 1 , idx ) ; resourceName = path . substring ( ( idx + 1 ) ) ; } else { indexName = path . substring ( 1 ) ; } String method = req . getMethod ( ) . toUpperCase ( ) ; if ( method . equals ( "GET" ) ) { try { String resource = "" ; if ( ( resourceName . isEmpty ( ) ) || ( resourceName . equalsIgnoreCase ( "schema.xml" ) ) ) { resource = SolandraCoreContainer . getCoreMetaInfo ( indexName ) ; response . setContentType ( "text//xml" ) ; } else { resource = ByteBufferUtil . string ( SolandraCoreContainer . readCoreResource ( indexName , resourceName ) ) ; } PrintWriter out = resp . getWriter ( ) ; out . print ( resource ) ; } catch ( IOException e ) { resp . sendError ( 404 , e . toString ( ) ) ; } return ; } if ( ( method . equals ( "POST" ) ) || ( method . equals ( "PUT" ) ) ) { try { BufferedReader rd = new BufferedReader ( new InputStreamReader ( req . getInputStream ( ) ) ) ; String line ; String resource = "" ; while ( ( line = rd . readLine ( ) ) != null ) { resource += line + "\n" ; } if ( ( resourceName . isEmpty ( ) ) || ( resourceName . equalsIgnoreCase ( "schema.xml" ) ) ) { SolandraCoreContainer . writeSchema ( indexName , resource ) ; } else { SolandraCoreContainer . writeCoreResource ( indexName , resourceName , resource ) ; } } catch ( IOException e ) { resp . sendError ( 500 ) ; } return ; } } activeRequest . set ( req ) ; super . doFilter ( request , response , chain ) ; } @ Override protected Initializer createInitializer ( ) { } @ Override protected void execute ( HttpServletRequest req , SolrRequestHandler handler , SolrQueryRequest sreq , SolrQueryResponse rsp ) { } private void writeResponse ( SolrQueryResponse solrRsp , ServletResponse response , QueryResponseWriter responseWriter , SolrQueryRequest solrReq , Method reqMethod ) throws IOException { } }

Fix:
if ( idx == ( SolandraDispatchFilter . schemaPrefix . length ) ) {
Buggy code:
public class Request extends Message { private final Code code ; private boolean multicast ; private Response response ; private String scheme ; private Object lock ; public Request ( Code code ) { } public Request ( Code code , Type type ) { } public Code getCode ( ) { } public String getScheme ( ) { } public void setScheme ( String scheme ) { } public boolean isMulticast ( ) { } public void setMulticast ( boolean multicast ) { } public Request setPayload ( String payload ) { } public Request setPayload ( byte [ ] payload ) { } public Request setURI ( String uri ) { } public Request setURI ( URI uri ) { } public String getURI ( ) { } public Request send ( ) { } public Request send ( Endpoint endpoint ) { } private void validateBeforeSending ( ) { } public Request setObserve ( ) { } public Request setObserveCancel ( ) { } public Response getResponse ( ) { } public void setResponse ( Response response ) { } public Response waitForResponse ( ) throws InterruptedException { } public Response waitForResponse ( long timeout ) throws InterruptedException { } @ Override public void setTimedOut ( boolean timedOut ) { } @ Override public void setCanceled ( boolean canceled ) { } @ Override public void setRejected ( boolean rejected ) { } @ Override public String toString ( ) { String payload = getPayloadString ( ) ; if ( payload == null ) { payload = "no<seq2seq4repair_space>payload" ; } else { int len = payload . length ( ) ; if ( ( payload . indexOf ( "\n" ) ) != ( - 1 ) ) payload = payload . substring ( 0 , payload . indexOf ( "\n" ) ) ; if ( ( payload . length ( ) ) > 24 ) payload = payload . substring ( 0 , 20 ) ; payload = ( "\"" + payload ) + "\"" ; if ( ( payload . length ( ) ) != ( len + 2 ) ) <START_BUG> payload += ( "..<seq2seq4repair_space>" + ( payload . length ( ) ) ) + "<seq2seq4repair_space>bytes" ; <END_BUG> } return String . format ( "%s-%-6s<seq2seq4repair_space>MID=%5d,<seq2seq4repair_space>Token=[%s],<seq2seq4repair_space>%s,<seq2seq4repair_space>%s" , getType ( ) , getCode ( ) , getMID ( ) , getTokenString ( ) , getOptions ( ) , payload ) ; } public static Request newGet ( ) { } public static Request newPost ( ) { } public static Request newPut ( ) { } public static Request newDelete ( ) { } }

Fix:
payload += ( "..<seq2seq4repair_space>" + len ) + "<seq2seq4repair_space>bytes" ;
Buggy code:
public final class SignInApplication extends WicketExampleApplication { public SignInApplication ( ) { } public Class getHomePage ( ) { } public Session newSession ( Request request , Response response ) { <START_BUG> return new SignInSession ( this , request , response ) ; <END_BUG> } protected void init ( ) { } }

Fix:
return new SignInSession ( this , request ) ;
Buggy code:
public class Stock extends SQLObject { private StringProperty name ; private IntegerProperty value ; private IntegerProperty quantity ; public Stock ( String name , int value , int quantity ) { } public Stock ( ) { } public static ObservableList < Stock > findAll ( ) throws SQLException { } public static ObservableList < Stock > findByName ( String name ) throws SQLException { } public static ObservableList < Stock > findByValue ( int from , int to ) throws SQLException { } public static ObservableList < Stock > findByNameAndValue ( String name , int from , int to ) throws SQLException { } public static ObservableList < Stock > findByAccount ( int accountNumber ) throws SQLException { ObservableList < Stock > stocks = FXCollections . observableArrayList ( ) ; <START_BUG> String selectQuery = "SELECT<seq2seq4repair_space>name,<seq2seq4repair_space>value,<seq2seq4repair_space>quantity<seq2seq4repair_space>FROM<seq2seq4repair_space>has_stock,<seq2seq4repair_space>stock,<seq2seq4repair_space>account<seq2seq4repair_space>WHERE<seq2seq4repair_space>has_stock.stockName<seq2seq4repair_space>=<seq2seq4repair_space>stock.name<seq2seq4repair_space>AND<seq2seq4repair_space>account.accountNumber<seq2seq4repair_space>=<seq2seq4repair_space>?" ; <END_BUG> try { Connection connection = DriverManager . getConnection ( ( ( ( ( ( "jdbc:mysql:////" + ( serverName ) ) + ":" ) + ( portNumber ) ) + "//" ) + ( dbName ) ) , userName , password ) ; PreparedStatement pStatement = connection . prepareStatement ( selectQuery ) ; pStatement . setInt ( 1 , accountNumber ) ; ResultSet resultSet = pStatement . executeQuery ( ) ; while ( resultSet . next ( ) ) { stocks . add ( Stock . createStockWithQuantity ( resultSet ) ) ; } } catch ( SQLException sqlex ) { throw sqlex ; } return stocks ; } private static Stock createStock ( ResultSet resultSet ) throws SQLException { } private static Stock createStockWithQuantity ( ResultSet resultSet ) throws SQLException { } public final StringProperty nameProperty ( ) { } public final String getName ( ) { } public final void setName ( final String name ) { } public final IntegerProperty valueProperty ( ) { } public final int getValue ( ) { } public final void setValue ( final int value ) { } public final IntegerProperty quantityProperty ( ) { } public final int getQuantity ( ) { } public final void setQuantity ( final int quantity ) { } }

Fix:
String selectQuery = "SELECT<seq2seq4repair_space>name,<seq2seq4repair_space>value,<seq2seq4repair_space>quantity<seq2seq4repair_space>FROM<seq2seq4repair_space>has_stock,<seq2seq4repair_space>stock<seq2seq4repair_space>WHERE<seq2seq4repair_space>has_stock.stockName<seq2seq4repair_space>=<seq2seq4repair_space>stock.name<seq2seq4repair_space>AND<seq2seq4repair_space>accountNumber<seq2seq4repair_space>=<seq2seq4repair_space>?" ;
Buggy code:
public class IndexBasedHierarchyBuilder extends HierarchyBuilder { protected Map cuToHandle ; protected IJavaSearchScope scope ; protected Map binariesFromIndexMatches ; private static class Queue { public char [ ] [ ] names = new char [ 10 ] [ ] ; public int start = 0 ; public int end = - 1 ; public void add ( char [ ] name ) { } public char [ ] retrieve ( ) { } public String toString ( ) { } } public IndexBasedHierarchyBuilder ( TypeHierarchy hierarchy , IJavaSearchScope scope ) throws JavaModelException { } private void addInfoFromBinaryIndexMatch ( Openable handle , HierarchyBinaryType binaryType , ArrayList infos ) throws JavaModelException { } private void addInfoFromOpenClassFile ( ClassFile classFile , ArrayList infos ) throws JavaModelException { } private void addInfoFromOpenCU ( CompilationUnit cu , ArrayList infos ) throws JavaModelException { } private void addInfoFromOpenSourceType ( SourceType type , ArrayList infos ) throws JavaModelException { } public void build ( boolean computeSubtypes ) throws CoreException , JavaModelException { } private void buildForProject ( JavaProject project , ArrayList infos , ArrayList units ) throws JavaModelException { } private void buildFromPotentialSubtypes ( String [ ] allPotentialSubTypes ) { } private void createCompilationUnitFromPath ( Openable handle , String osPath , ArrayList units ) throws JavaModelException { } private void createInfoFromClassFile ( Openable handle , String osPath , ArrayList infos ) throws JavaModelException { } private void createInfoFromClassFileInJar ( Openable classFile , ArrayList infos ) throws JavaModelException { } private String [ ] determinePossibleSubTypes ( ) throws CoreException , JavaModelException { class PathCollector implements IPathRequestor { HashSet paths = new HashSet ( 10 ) ; public void acceptPath ( String path ) { paths . add ( path ) ; } } PathCollector collector = new PathCollector ( ) ; IProject project = this . hierarchy . javaProject ( ) . getProject ( ) ; <START_BUG> IndexBasedHierarchyBuilder . searchAllPossibleSubTypes ( project . getWorkspace ( ) , this . getType ( ) , this . scope , this . binariesFromIndexMatches , collector , IJavaSearchConstants . WAIT_UNTIL_READY_TO_SEARCH , this . hierarchy . fProgressMonitor ) ; <END_BUG> HashSet paths = collector . paths ; int length = paths . size ( ) ; String [ ] result = new String [ length ] ; int count = 0 ; for ( Iterator iter = paths . iterator ( ) ; iter . hasNext ( ) ; ) { result [ ( count ++ ) ] = ( ( String ) ( iter . next ( ) ) ) ; } return result ; } protected IType getHandle ( IGenericType genericType ) { } public static void searchAllPossibleSubTypes ( IWorkspace workbench , IType type , IJavaSearchScope scope , final Map binariesFromIndexMatches , final IPathRequestor pathRequestor , int waitingPolicy , IProgressMonitor progressMonitor ) throws CoreException , JavaModelException { } }

Fix:
IndexBasedHierarchyBuilder . searchAllPossibleSubTypes ( project . getWorkspace ( ) , this . getType ( ) , this . scope , this . binariesFromIndexMatches , collector , IJavaSearchConstants . WAIT_UNTIL_READY_TO_SEARCH , this . hierarchy . progressMonitor ) ;
Buggy code:
public class MapGenDeeperRavine extends MapGenBase { private float [ ] field_75046_d = new float [ 1024 ] ; private static final String __OBFID = "CL_00000390" ; protected void func_151540_a ( long p_151540_1_ , int p_151540_3_ , int p_151540_4_ , Block [ ] p_151540_5_ , double p_151540_6_ , double p_151540_8_ , double p_151540_10_ , float p_151540_12_ , float p_151540_13_ , float p_151540_14_ , int p_151540_15_ , int p_151540_16_ , double p_151540_17_ , int minHeight ) { } protected void func_151538_a ( World p_151538_1_ , int p_151538_2_ , int p_151538_3_ , int p_151538_4_ , int p_151538_5_ , Block [ ] p_151538_6_ ) { if ( ( this . rand . nextInt ( 13 ) ) == 0 ) { double d0 = ( ( double ) ( ( p_151538_2_ * 16 ) + ( this . rand . nextInt ( 16 ) ) ) ) ; <START_BUG> double d1 = ( ( double ) ( ( this . rand . nextInt ( ( ( this . rand . nextInt ( 228 ) ) + 8 ) ) ) + 20 ) ) ; <END_BUG> double d2 = ( ( double ) ( ( p_151538_3_ * 16 ) + ( this . rand . nextInt ( 16 ) ) ) ) ; byte b0 = 1 ; for ( int i1 = 0 ; i1 < b0 ; ++ i1 ) { float f = ( ( this . rand . nextFloat ( ) ) * ( ( float ) ( Math . PI ) ) ) * 2.0F ; float f1 = ( ( ( this . rand . nextFloat ( ) ) - 0.5F ) * 2.0F ) // 8.0F ; float f2 = ( ( ( this . rand . nextFloat ( ) ) * 2.0F ) + ( this . rand . nextFloat ( ) ) ) * 2.0F ; this . func_151540_a ( this . rand . nextLong ( ) , p_151538_4_ , p_151538_5_ , p_151538_6_ , d0 , d1 , d2 , f2 , f , f1 , 0 , 0 , 3.0 , ( ( this . rand . nextInt ( 11 ) ) + 5 ) ) ; } } } protected boolean isOceanBlock ( Block [ ] data , int index , int x , int y , int z , int chunkX , int chunkZ ) { } private boolean isExceptionBiome ( BiomeGenBase biome ) { } private boolean isTopBlock ( Block [ ] data , int index , int x , int y , int z , int chunkX , int chunkZ ) { } protected void digBlock ( Block [ ] data , int index , int x , int y , int z , int chunkX , int chunkZ , boolean foundTop , int minHeight ) { } No newline ; at end ; of file ; }

Fix:
double d1 = ( ( double ) ( ( this . rand . nextInt ( 234 ) ) + 20 ) ) ;
Buggy code:
public class SIGRecord extends Record { private static SIGRecord member = new SIGRecord ( ) ; private short covered ; private byte alg ; private byte labels ; private int origttl ; private Date expire ; private Date timeSigned ; private short footprint ; private Name signer ; private byte [ ] signature ; private SIGRecord ( ) { } private SIGRecord ( Name name , short dclass , int ttl ) { } static SIGRecord getMember ( ) { } public SIGRecord ( Name name , short dclass , int ttl , int covered , int alg , int origttl , Date expire , Date timeSigned , int footprint , Name signer , byte [ ] signature ) { } Record rrFromWire ( Name name , short type , short dclass , int ttl , int length , DataByteInputStream in ) throws IOException { } Record rdataFromString ( Name name , short dclass , int ttl , MyStringTokenizer st , Name origin ) throws TextParseException { SIGRecord rec = new SIGRecord ( name , dclass , ttl ) ; rec . covered = Type . value ( nextString ( st ) ) ; rec . alg = Byte . parseByte ( nextString ( st ) ) ; rec . labels = Byte . parseByte ( nextString ( st ) ) ; rec . origttl = TTL . parseTTL ( nextString ( st ) ) ; rec . expire = SIGRecord . parseDate ( nextString ( st ) ) ; rec . timeSigned = SIGRecord . parseDate ( nextString ( st ) ) ; rec . footprint = ( ( short ) ( Integer . parseInt ( nextString ( st ) ) ) ) ; rec . signer = Name . fromString ( nextString ( st ) , origin ) ; rec . signer . checkAbsolute ( "read<seq2seq4repair_space>an<seq2seq4repair_space>SIG<seq2seq4repair_space>record" ) ; if ( st . hasMoreTokens ( ) ) <START_BUG> rec . signature = base64 . fromString ( st . remainingTokens ( ) ) ; <END_BUG> return rec ; } public String rdataToString ( ) { } public short getTypeCovered ( ) { } public byte getAlgorithm ( ) { } public byte getLabels ( ) { } public int getOrigTTL ( ) { } public Date getExpire ( ) { } public Date getTimeSigned ( ) { } public short getFootprint ( ) { } public Name getSigner ( ) { } public byte [ ] getSignature ( ) { } void rrToWire ( DataByteOutputStream out , Compression c , boolean canonical ) { } static String formatDate ( Date d ) { } static Date parseDate ( String s ) { } }

Fix:
rec . signature = base64 . fromString ( remainingStrings ( st ) ) ;