nus-yam/ex-repair huggingface dataset:
Buggy code:
public class Property extends Task { String name ; String value ; File file ; String resource ; boolean userProperty = false ; public void setName ( String name ) { } public String getName ( ) { } public void setValue ( String value ) { } public String getValue ( ) { } public void setFile ( File file ) { } public File getFile ( ) { } public void setResource ( String resource ) { } public String getResource ( ) { } public void execute ( ) throws BuildException { } private void loadFile ( File file ) throws BuildException { Properties props = new Properties ( ) ; <START_BUG> log ( ( "Loading<seq2seq4repair_space>" + ( name ) ) , MSG_VERBOSE ) ; <END_BUG> try { if ( file . exists ( ) ) { props . load ( new FileInputStream ( file ) ) ; addProperties ( props ) ; } else { log ( ( "Unable<seq2seq4repair_space>to<seq2seq4repair_space>find<seq2seq4repair_space>" + ( file . getAbsolutePath ( ) ) ) , MSG_VERBOSE ) ; } } catch ( Exception ex ) { throw new BuildException ( ex . getMessage ( ) , ex , location ) ; } } private void loadResource ( String name ) { } private void addProperties ( Properties props ) { } public void setUserProperty ( boolean userP ) { } private void addProperty ( String n , String v ) { } private void resolveAllProperties ( Hashtable props ) { } private boolean extractProperties ( String source , Vector properties ) { } }

Fix:
log ( ( "Loading<seq2seq4repair_space>" + ( file . getAbsolutePath ( ) ) ) , MSG_VERBOSE ) ;
Buggy code:
public class ThreadMXBeanReadResourceHandler implements OperationStepHandler { public static final ThreadMXBeanReadResourceHandler INSTANCE = new ThreadMXBeanReadResourceHandler ( ) ; private ThreadMXBeanReadResourceHandler ( ) { } @ Override public void execute ( OperationContext context , ModelNode operation ) throws OperationFailedException { final ModelNode result = context . getResult ( ) ; for ( String attribute : PlatformMBeanConstants . THREADING_READ_ATTRIBUTES ) { final ModelNode store = result . get ( attribute ) ; try { ThreadMXBeanAttributeHandler . storeResult ( attribute , store ) ; } catch ( SecurityException ignored ) { } catch ( UnsupportedOperationException ignored ) { } } for ( String attribute : PlatformMBeanConstants . THREADING_READ_WRITE_ATTRIBUTES ) { final ModelNode store = result . get ( attribute ) ; try { ThreadMXBeanAttributeHandler . storeResult ( attribute , store ) ; } catch ( SecurityException ignored ) { } catch ( UnsupportedOperationException ignored ) { } } for ( String attribute : PlatformMBeanConstants . THREADING_METRICS ) { final ModelNode store = result . get ( attribute ) ; try { ThreadMXBeanAttributeHandler . storeResult ( attribute , store ) ; } catch ( SecurityException ignored ) { } catch ( UnsupportedOperationException ignored ) { } } if ( ( PlatformMBeanUtil . JVM_MAJOR_VERSION ) > 6 ) { final ModelNode store = result . get ( OBJECT_NAME ) ; ThreadMXBeanAttributeHandler . storeResult ( OBJECT_NAME , store ) ; } <START_BUG> context . completeStep ( NOOP_ROLLBACK_HANDLER ) ; <END_BUG> } }

Fix:
context . stepCompleted ( ) ;
Buggy code:
public class Foodtype { private String name ; private List < Material > food ; private int maxeateninrow ; public Foodtype ( String _name , int _maxeateninrow ) { } private void setname ( String _name ) { } public String getname ( ) { } public void setmaxeateninrow ( int _maxeateninrow ) { } public int getmaxeateninrow ( ) { } public void addfood ( Material _material ) { } public boolean isfoodfound ( Material _material ) { } public String getFoodList ( ) { } public void removefood ( Material _material ) { <START_BUG> if ( ! ( this . isfoodfound ( _material ) ) ) { <END_BUG> this . food . remove ( _material ) ; } } }

Fix:
if ( this . isfoodfound ( _material ) ) {
Buggy code:
public class JSONQuery { public static class InvalidJSONQuery extends Exception { public InvalidJSONQuery ( ) { } public InvalidJSONQuery ( String msg ) { } private static final long serialVersionUID = 1L ; } public static ThreadedQuery makeQuery ( String json ) throws JSONQuery . InvalidJSONQuery { } public static JSONObject encodeResult ( Hashtable < String , Term > bindings ) { } static Term makeCompoundTerm ( JSONArray val ) throws JSONQuery . InvalidJSONQuery { } public static Term [ ] decodeJSONArray ( JSONArray val ) throws JSONQuery . InvalidJSONQuery { } private static Term [ ] decodeJSONArray ( JSONArray val , int startIndex ) throws JSONQuery . InvalidJSONQuery { } static Term decodeJSONValue ( String val ) { } static Term decodeJSONValue ( boolean val ) { } static Term decodeJSONValue ( double val ) { } static Term decodeJSONValue ( int val ) { } public static Term decodeJSONValue ( JSONObject val ) throws JSONQuery . InvalidJSONQuery { } private static JSONObject encodeCompoundTerm ( Term term ) { } private static JSONArray encodeList ( Term term ) throws JPLException { } private static JSONArray encodeList ( Term [ ] term_list ) throws JPLException { JSONArray result = new JSONArray ( ) ; for ( int i = 0 ; i < ( term_list . length ) ; i ++ ) { if ( term_list [ i ] . isFloat ( ) ) <START_BUG> result . element ( term_list [ i ] . floatValue ( ) ) ; <END_BUG> else if ( term_list [ i ] . isInteger ( ) ) result . element ( term_list [ i ] . intValue ( ) ) ; else if ( term_list [ i ] . isAtom ( ) ) result . element ( term_list [ i ] . name ( ) ) ; else if ( term_list [ i ] . isCompound ( ) ) { if ( JSONQuery . isList ( term_list [ i ] ) ) result . element ( JSONQuery . encodeList ( term_list [ i ] ) ) ; else result . element ( JSONQuery . encodeCompoundTerm ( term_list [ i ] ) ) ; } else result . element ( term_list [ i ] . name ( ) ) ; } return result ; } private static boolean isList ( Term term ) { } }

Fix:
result . element ( term_list [ i ] . doubleValue ( ) ) ;
Buggy code:
public class ProcessStateAttributeHandler implements OperationStepHandler { private final ControlledProcessState processState ; public ProcessStateAttributeHandler ( final ControlledProcessState processState ) { } @ Override public void execute ( OperationContext context , ModelNode operation ) throws OperationFailedException { context . getResult ( ) . set ( processState . getState ( ) . toString ( ) ) ; <START_BUG> context . completeStep ( ) ; <END_BUG> } }

Fix:
context . stepCompleted ( ) ;
Buggy code:
public class RosterUtil { public static final Map < Position . Position , Integer > POSITIONS_AND_COUNTS = ImmutableMap . < Position . Position , Integer > builder ( ) . put ( C , 1 ) . put ( FB , 1 ) . put ( SB , 1 ) . put ( TB , 1 ) . put ( SS , 1 ) . put ( OF , 3 ) . put ( DH , 1 ) . put ( P , 7 ) . put ( RS , 6 ) . build ( ) ; private static final List < Position . Position > POSITIONS = Lists . newArrayList ( C , FB , SB , TB , SS , OF , OF , OF , DH , P , P , P , P , P , P , P ) ; public static List < String > splitEligibilities ( String eligibility ) { } public Multimap < Position . Position , DraftPick > constructRoster ( List < DraftPick > picks ) { } private static Multimap < Position . Position , DraftPick > doConstructRoster ( List < DraftPick > picks , List < Position . Position > positions , Multimap < Position . Position , DraftPick > roster ) { } public EnumSet < Position . Position > getOpenPositions ( List < DraftPick > picks ) { } private static void doGetOpenPositions ( List < DraftPick > picks , List < Position . Position > positions , Set < Position . Position > openPositions , Multimap < Position . Position , DraftPick > roster , boolean allowDH , int reservesAllowed ) { } public Map < Position . Position , Integer [ ] > getNumFilled ( List < DraftPick > picks , int pickNum ) { Map < Position . Position , Integer [ ] > numFilled = new HashMap < > ( ) ; <START_BUG> for ( int i = 0 ; i < 10 ; i ++ ) { <END_BUG> final int team = i ; Multimap < Position . Position , DraftPick > roster = constructRoster ( Lists . newArrayList ( Iterables . filter ( picks . subList ( 0 , pickNum ) , new Predicate < DraftPick > ( ) { @ Override public boolean apply ( DraftPick pick ) { return ( pick . getTeam ( ) ) == team ; } } ) ) ) ; for ( Position . Position position : values ( ) ) { if ( ( position == ( DH ) ) || ( position == ( RS ) ) ) { continue ; } Integer [ ] numFilledForPosition = numFilled . get ( position ) ; if ( numFilledForPosition == null ) { numFilledForPosition = new Integer [ position == ( P ) ? 6 : position == ( OF ) ? 3 : 1 ] ; Arrays . fill ( numFilledForPosition , 0 ) ; numFilled . put ( position , numFilledForPosition ) ; } for ( int j = 0 ; j < ( numFilledForPosition . length ) ; j ++ ) { if ( ( roster . get ( position ) . size ( ) ) >= ( j + 1 ) ) { numFilledForPosition [ j ] = ( numFilledForPosition [ j ] ) + 1 ; } } } } return numFilled ; } No newline ; at end ; of file ; }

Fix:
for ( int i = 1 ; i <= 10 ; i ++ ) {
Buggy code:
@ SuppressWarnings ( "serial" ) public class AsyncAnnotationAdvisor extends AbstractPointcutAdvisor implements BeanFactoryAware { private Advice advice ; private Pointcut pointcut ; public AsyncAnnotationAdvisor ( ) { } @ SuppressWarnings ( "unchecked" ) public AsyncAnnotationAdvisor ( Executor executor ) { } public void setTaskExecutor ( Executor executor ) { } public void setAsyncAnnotationType ( Class < ? extends Annotation > asyncAnnotationType ) { } @ Override public void setBeanFactory ( BeanFactory beanFactory ) { } @ Override public Advice getAdvice ( ) { } @ Override public Pointcut getPointcut ( ) { } protected Advice buildAdvice ( Executor executor ) { } protected Pointcut buildPointcut ( Set < Class < ? extends Annotation > > asyncAnnotationTypes ) { ComposablePointcut result = null ; for ( Class < ? extends Annotation > asyncAnnotationType : asyncAnnotationTypes ) { Pointcut cpc = new AnnotationMatchingPointcut ( asyncAnnotationType , true ) ; <START_BUG> Pointcut mpc = new AnnotationMatchingPointcut ( null , asyncAnnotationType ) ; <END_BUG> if ( result == null ) { result = new ComposablePointcut ( cpc ) . union ( mpc ) ; } else { result . union ( cpc ) . union ( mpc ) ; } } return result ; } }

Fix:
Pointcut mpc = AnnotationMatchingPointcut . forMethodAnnotation ( asyncAnnotationType ) ;
Buggy code:
public abstract class FileWatchdog extends Thread { public static final long DEFAULT_DELAY = 60000 ; protected String filename ; protected long delay = FileWatchdog . DEFAULT_DELAY ; File file ; long lastModif = 0 ; boolean warnedAlready = false ; boolean interrupted = false ; protected FileWatchdog ( String filename ) { } public void setDelay ( long delay ) { } protected abstract void doOnChange ( ) { } protected void checkAndConfigure ( ) { } public void run ( ) { while ( ! ( interrupted ) ) { try { <START_BUG> Thread . currentThread ( ) . sleep ( delay ) ; <END_BUG> } catch ( InterruptedException e ) { } checkAndConfigure ( ) ; } } }

Fix:
Thread . sleep ( delay ) ;
Buggy code:
public class autoLoanCalculator extends ActionBarActivity { EditText paymentText ; EditText totalCostText ; @ Override protected void onCreate ( Bundle savedInstanceState ) { } public void CalculatePayment ( View view ) { EditText carPriceText = ( ( EditText ) ( findViewById ( carPrice ) ) ) ; EditText interestText = ( ( EditText ) ( findViewById ( interest ) ) ) ; EditText termText = ( ( EditText ) ( findViewById ( term ) ) ) ; if ( ( ( ! ( carPriceText . getText ( ) . toString ( ) . matches ( "" ) ) ) && ( ! ( interestText . getText ( ) . toString ( ) . matches ( "" ) ) ) ) && ( ! ( termText . getText ( ) . toString ( ) . matches ( "" ) ) ) ) { double carPrice = Double . parseDouble ( carPriceText . getText ( ) . toString ( ) ) ; double interest = Double . parseDouble ( interestText . getText ( ) . toString ( ) ) ; double term = Double . parseDouble ( termText . getText ( ) . toString ( ) ) ; Loan loan = new Loan ( carPrice , interest , term ) ; double monthlyPayment = loan . monthlyPayment ( ) ; paymentText . setText ( ( "$" + ( String . valueOf ( monthlyPayment ) ) ) ) ; totalCostText . setText ( String . valueOf ( ( term * monthlyPayment ) ) ) ; } else { AlertDialog . Builder dlgAlert = new AlertDialog . Builder ( this ) ; <START_BUG> dlgAlert . setMessage ( "Insert<seq2seq4repair_space>required<seq2seq4repair_space>information<seq2seq4repair_space>you<seq2seq4repair_space>lazy<seq2seq4repair_space>fuck" ) ; <END_BUG> dlgAlert . setTitle ( "Auto<seq2seq4repair_space>Loan<seq2seq4repair_space>Calculator" ) ; dlgAlert . setPositiveButton ( "Ok" , new DialogInterface . OnClickListener ( ) { public void onClick ( DialogInterface dialog , int which ) { } } ) ; dlgAlert . setCancelable ( true ) ; dlgAlert . create ( ) . show ( ) ; } } @ Override public boolean onCreateOptionsMenu ( Menu menu ) { } @ Override public boolean onOptionsItemSelected ( MenuItem item ) { } }

Fix:
dlgAlert . setMessage ( "Insert<seq2seq4repair_space>required<seq2seq4repair_space>information" ) ;
Buggy code:
public class Calculator { public static Map < Date , WeatherData > series ; public static double calculateLAI ( Date dday , double STeveValue , double LMax , double A , double Ti , double B ) { } public static double calculateLAI ( Date dday , double STeveValue , CultureData culture ) { } public static double calculateBiomass ( double eveValue , Date dday , double eB , double eImax , double K , double LAI ) { } public static double calculateBiomass ( double eveValue , Date dday , CultureData culture ) { } public static double calculateTr ( double A , double B , double Ti ) { } public static double calculateTr ( CultureData culture ) { } public static double calculateSt ( double eveValue , Date dday ) { } public static Map < Date , WeatherData > CSVParser ( String fileToParse ) { BufferedReader fileReader = null ; final String DELIMITER = ";" ; Map < Date , WeatherData > m = new HashMap < Date , WeatherData > ( ) ; try { String line = "" ; fileReader = new BufferedReader ( new FileReader ( fileToParse ) ) ; LinkedList < String > detect = new LinkedList < String > ( ) ; detect . add ( "0" ) ; detect . add ( "1" ) ; detect . add ( "2" ) ; detect . add ( "3" ) ; detect . add ( "4" ) ; detect . add ( "5" ) ; detect . add ( "6" ) ; detect . add ( "7" ) ; detect . add ( "8" ) ; detect . add ( "9" ) ; while ( ( line = fileReader . readLine ( ) ) != null ) { String [ ] tokens = line . split ( DELIMITER ) ; for ( int t = 0 ; t < ( tokens . length ) ; t ++ ) { if ( tokens [ t ] . isEmpty ( ) ) tokens [ t ] = "0.00" ; } if ( ( ( tokens . length ) > 0 ) && ( detect . contains ( Character . toString ( tokens [ 0 ] . charAt ( 0 ) ) ) ) ) { Calendar calendar = Calendar . getInstance ( ) ; calendar . clear ( ) ; calendar . set ( Calendar . DAY_OF_MONTH , Integer . parseInt ( tokens [ 3 ] ) ) ; <START_BUG> calendar . set ( Calendar . MONTH , Integer . parseInt ( tokens [ 2 ] ) ) ; <END_BUG> calendar . set ( Calendar . YEAR , Integer . parseInt ( tokens [ 1 ] ) ) ; Date date = calendar . getTime ( ) ; WeatherData wd = new WeatherData ( Float . parseFloat ( tokens [ 4 ] ) , Float . parseFloat ( tokens [ 5 ] ) , Float . parseFloat ( tokens [ 6 ] ) , Float . parseFloat ( tokens [ 7 ] ) ) ; m . put ( date , wd ) ; } } } catch ( Exception e ) { e . printStackTrace ( ) ; } finally { try { fileReader . close ( ) ; } catch ( IOException e ) { e . printStackTrace ( ) ; } } return m ; } }

Fix:
calendar . set ( Calendar . MONTH , ( ( Integer . parseInt ( tokens [ 2 ] ) ) - 1 ) ) ;
Buggy code:
public class QueueFactory { public static final JsonCodec < Event > EVENT_CODEC = jsonCodec ( Event . class ) ; private final BatchProcessorConfig config ; private final ReportExporter reportExporter ; private final Map < String , Queue < Event > > map ; private final Object lock = new Object ( ) ; @ Inject public QueueFactory ( BatchProcessorConfig config , ReportExporter reportExporter ) { } public Queue < Event > create ( String name ) throws IOException { } private void setupQueueMetric ( String flowId , Queue < Event > queue ) { <START_BUG> String metricName = new ObjectNameBuilder ( "com.proofpoint.event.colllector" ) . withProperty ( "type" , "EventCollector" ) . withProperty ( "name" , "Queue" ) . withProperty ( "flowId" , flowId ) . build ( ) ; <END_BUG> reportExporter . export ( metricName , queue ) ; } }

Fix:
String metricName = new ObjectNameBuilder ( "com.proofpoint.event.collector" ) . withProperty ( "type" , "EventCollector" ) . withProperty ( "name" , "Queue" ) . withProperty ( "flowId" , flowId ) . build ( ) ;
Buggy code:
public class WebSubsystemAdd extends AbstractSubsystemAdd < WebSubsystemElement > { private static final long serialVersionUID = 1079329665126341623L ; private static final String TEMP_DIR = "jboss.server.temp.dir" ; private String defaultHost ; private WebContainerConfigElement config ; public WebSubsystemAdd ( ) { } protected < P > void applyUpdate ( UpdateContext context , UpdateResultHandler < ? super Void , P > resultHandler , P param ) { final WebServerService service = new WebServerService ( defaultHost ) ; <START_BUG> context . getBatchBuilder ( ) . addService ( JBOSS_WEB , service ) . addDependency ( AbstractPathService . pathNameOf ( WebSubsystemAdd . TEMP_DIR ) , String . class , service . getPathInjector ( ) ) . addDependency ( OPTIONAL , JBOSS . append ( "mbean" , "server" ) , MBeanServer . class , service . getMbeanServer ( ) ) . addListener ( new UpdateResultHandler . ServiceStartListener < P > ( resultHandler , param ) ) . setInitialMode ( ON_DEMAND ) . install ( ) ; <END_BUG> } protected void applyUpdateBootAction ( BootUpdateContext updateContext ) { } protected WebSubsystemElement createSubsystemElement ( ) { } public String getDefaultHost ( ) { } public void setDefaultHost ( String defaultHost ) { } public WebContainerConfigElement getConfig ( ) { } public void setConfig ( WebContainerConfigElement config ) { } }

Fix:
context . getServiceTarget ( ) . addService ( JBOSS_WEB , service ) . addDependency ( AbstractPathService . pathNameOf ( WebSubsystemAdd . TEMP_DIR ) , String . class , service . getPathInjector ( ) ) . addDependency ( OPTIONAL , JBOSS . append ( "mbean" , "server" ) , MBeanServer . class , service . getMbeanServer ( ) ) . addListener ( new UpdateResultHandler . ServiceStartListener < P > ( resultHandler , param ) ) . setInitialMode ( ON_DEMAND ) . install ( ) ;
Buggy code:
@ Entity public class Player extends BaseModel < Player > implements Comparable < Player > { public static Player guest = new Player ( 0L , "guest" ) ; public static Finder < Long , Player > finder = new Model . Finder ( Long . class , Player . class ) ; public String name ; public Long shmupUserId ; @ OneToMany ( mappedBy = "player" ) @ Where ( clause = "rank<seq2seq4repair_space>><seq2seq4repair_space>0" ) public List < Score > scores = new ArrayList < Score > ( ) ; @ OneToMany ( mappedBy = "player" ) public List < Score > allScores = new ArrayList < Score > ( ) ; public String twitter ; private boolean vip ; private Counts counts ; public Player ( Long id , String name ) { } public Player ( String name ) { } public static Player findOrCreatePlayer ( String name ) { } public static Player findByShmupUserId ( Long shmupUserId ) { } @ Override public String toString ( ) { } public List < Score > bestScores ( ) { } public boolean isAuthenticated ( ) { } public Collection < Score > bestReplayableScores ( ) { } public boolean hasReplays ( ) { } public boolean isVip ( ) { } public boolean canImportScores ( ) { } public boolean isAdministrator ( ) { } public Score getLastScore ( ) { List < Score > scores = new ArrayList < Score > ( this . scores ) ; Collections . sort ( scores , new Comparator < Score > ( ) { @ Override public int compare ( Score o1 , Score o2 ) { <START_BUG> return o2 . getUpdatedAt ( ) . compareTo ( o1 . getUpdatedAt ( ) ) ; <END_BUG> } } ) ; return scores . get ( 0 ) ; } public int computeOneCredit ( ) { } public Counts getCounts ( ) { } public void setCounts ( PlayersController . Counts counts ) { } @ Override public int compareTo ( Player p ) { } }

Fix:
return o2 . getCreatedAt ( ) . compareTo ( o1 . getCreatedAt ( ) ) ;
Buggy code:
public class Spinner extends Composite { static final int INNER_BORDER = 2 ; static final int MIN_ARROW_WIDTH = 6 ; int lastEventTime = 0 ; public Spinner ( Composite parent , int style ) { } public void addModifyListener ( ModifyListener listener ) { } public void addSelectionListener ( SelectionListener listener ) { } void addVerifyListener ( VerifyListener listener ) { } static int checkStyle ( int style ) { } protected void checkSubclass ( ) { } public Point computeSize ( int wHint , int hHint , boolean changed ) { } public Rectangle computeTrim ( int x , int y , int width , int height ) { } public void copy ( ) { } void createHandle ( int index ) { state |= ( HANDLE ) | ( MENU ) ; fixedHandle = OS . g_object_new ( display . gtk_fixed_get_type ( ) , 0 ) ; if ( ( fixedHandle ) == 0 ) error ( ERROR_NO_HANDLES ) ; OS . gtk_fixed_set_has_window ( fixedHandle , true ) ; int adjustment = OS . gtk_adjustment_new ( 0 , 0 , 100 , 1 , 10 , 0 ) ; if ( adjustment == 0 ) error ( ERROR_NO_HANDLES ) ; handle = OS . gtk_spin_button_new ( adjustment , 1 , 0 ) ; if ( ( handle ) == 0 ) error ( ERROR_NO_HANDLES ) ; OS . gtk_container_add ( fixedHandle , handle ) ; OS . gtk_editable_set_editable ( handle , ( ( ( style ) & ( SWT . READ_ONLY ) ) == 0 ) ) ; OS . gtk_entry_set_has_frame ( handle , ( ( ( style ) & ( SWT . BORDER ) ) != 0 ) ) ; <START_BUG> OS . gtk_spin_button_set_wrap ( handle , true ) ; <END_BUG> } public void cut ( ) { } void deregister ( ) { } boolean filterKey ( int keyval , int event ) { } GdkColor getBackgroundColor ( ) { } public int getBorderWidth ( ) { } GdkColor getForegroundColor ( ) { } public int getIncrement ( ) { } public int getMaximum ( ) { } public int getMinimum ( ) { } public int getPageIncrement ( ) { } public int getSelection ( ) { } int gtk_activate ( int widget ) { } int gtk_changed ( int widget ) { } int gtk_commit ( int imContext , int text ) { } int gtk_delete_text ( int widget , int start_pos , int end_pos ) { } int gtk_event_after ( int widget , int gdkEvent ) { } int gtk_insert_text ( int widget , int new_text , int new_text_length , int position ) { } int gtk_popup_menu ( int widget ) { } int gtk_value_changed ( int widget ) { } void hookEvents ( ) { } int imContext ( ) { } int paintWindow ( ) { } public void paste ( ) { } void register ( ) { } public void removeModifyListener ( ModifyListener listener ) { } public void removeSelectionListener ( SelectionListener listener ) { } void removeVerifyListener ( VerifyListener listener ) { } void setBackgroundColor ( GdkColor color ) { } void setCursor ( int cursor ) { } void setFontDescription ( int font ) { } void setForegroundColor ( GdkColor color ) { } public void setIncrement ( int value ) { } public void setMaximum ( int value ) { } public void setMinimum ( int value ) { } public void setPageIncrement ( int value ) { } public void setSelection ( int value ) { } boolean translateTraversal ( GdkEventKey keyEvent ) { } String verifyText ( String string , int start , int end ) { } }

Fix:
OS . gtk_spin_button_set_wrap ( handle , ( ( ( style ) & ( SWT . WRAP ) ) != 0 ) ) ;
Buggy code:
public class WorldProviderPluto extends WorldProviderSpace implements IGalacticraftWorldProvider { @ Override public Vector3 getFogColor ( ) { } @ Override public Vector3 getSkyColor ( ) { } @ Override public boolean canRainOrSnow ( ) { } @ Override public float calculateCelestialAngle ( long par1 , float par3 ) { } public float calculateDeimosAngle ( long par1 , float par3 ) { } public float calculatePhobosAngle ( long par1 , float par3 ) { } @ Override public boolean hasSunset ( ) { } @ Override public long getDayLength ( ) { } @ Override public boolean shouldForceRespawn ( ) { } @ Override public Class < ? extends IChunkProvider > getChunkProviderClass ( ) { } @ Override public Class < ? extends WorldChunkManager > getWorldChunkManagerClass ( ) { } @ Override public void setDimension ( int var1 ) { } @ Override protected void generateLightBrightnessTable ( ) { } @ Override public float [ ] calcSunriseSunsetColors ( float var1 , float var2 ) { } @ Override public void registerWorldChunkManager ( ) { } @ Override @ SideOnly ( Side . CLIENT ) public float getStarBrightness ( float par1 ) { } @ Override public IChunkProvider createChunkGenerator ( ) { } @ Override public boolean isSkyColored ( ) { } @ Override public double getHorizon ( ) { } @ Override public int getAverageGroundLevel ( ) { } @ Override public boolean isSurfaceWorld ( ) { } @ Override public boolean canCoordinateBeSpawn ( int var1 , int var2 ) { } @ Override public boolean canRespawnHere ( ) { } @ Override public String getSaveFolder ( ) { } @ Override public String getWelcomeMessage ( ) { } @ Override public String getDepartMessage ( ) { } @ Override public String getDimensionName ( ) { } @ Override public boolean canBlockFreeze ( int x , int y , int z , boolean byWater ) { } @ Override public boolean canDoLightning ( Chunk chunk ) { } @ Override public boolean canDoRainSnowIce ( Chunk chunk ) { } @ Override public float getGravity ( ) { } @ Override public int getHeight ( ) { } @ Override public double getMeteorFrequency ( ) { } @ Override public double getFuelUsageMultiplier ( ) { } @ Override public boolean canSpaceshipTierPass ( int tier ) { <START_BUG> return tier >= 5 ; <END_BUG> } @ Override public float getFallDamageModifier ( ) { } @ Override public float getSoundVolReductionAmount ( ) { } @ Override public CelestialBody getCelestialBody ( ) { } @ Override public boolean hasBreathableAtmosphere ( ) { } @ Override public float getThermalLevelModifier ( ) { } @ Override public float getWindLevel ( ) { } }

Fix:
return tier >= 3 ;
Buggy code:
public class TSCompletionItem implements CompletionProposal { private int anchor ; private String name ; private ElementKind kind ; private String prefix ; private static final Logger logger = Logger . getLogger ( TSCodeCompletion . class . getName ( ) ) ; public TSCompletionItem ( int anchor , String name , ElementKind kind , String prefix ) { } @ Override public int getAnchorOffset ( ) { } @ Override public ElementHandle getElement ( ) { } @ Override public String getName ( ) { } @ Override public String getInsertPrefix ( ) { String prefix ; final String insertPrefix = getName ( ) ; int indexOf = ( ( ( this . prefix ) != null ) && ( insertPrefix != null ) ) ? insertPrefix . toLowerCase ( ) . indexOf ( this . prefix . toLowerCase ( ) ) : - 1 ; prefix = ( indexOf > 0 ) ? insertPrefix . substring ( indexOf ) : insertPrefix ; <START_BUG> TSCompletionItem . logger . log ( Level . INFO , "insert<seq2seq4repair_space>Prefix<seq2seq4repair_space>for<seq2seq4repair_space>item<seq2seq4repair_space>{0}<seq2seq4repair_space>with<seq2seq4repair_space>completion<seq2seq4repair_space>prefix<seq2seq4repair_space>\"{1}\"<seq2seq4repair_space>:{2}" , new Object [ ] { insertPrefix , this . prefix , prefix } ) ; <END_BUG> return prefix ; } @ Override public String getSortText ( ) { } @ Override public String getLhsHtml ( HtmlFormatter hf ) { } @ Override public String getRhsHtml ( HtmlFormatter hf ) { } @ Override public ElementKind getKind ( ) { } @ Override public ImageIcon getIcon ( ) { } @ Override public Set < Modifier > getModifiers ( ) { } @ Override public boolean isSmart ( ) { } @ Override public int getSortPrioOverride ( ) { } @ Override public String getCustomInsertTemplate ( ) { } }

Fix:
TSCompletionItem . logger . log ( Level . FINEST , "insert<seq2seq4repair_space>Prefix<seq2seq4repair_space>for<seq2seq4repair_space>item<seq2seq4repair_space>{0}<seq2seq4repair_space>with<seq2seq4repair_space>completion<seq2seq4repair_space>prefix<seq2seq4repair_space>\"{1}\"<seq2seq4repair_space>:{2}" , new Object [ ] { insertPrefix , this . prefix , prefix } ) ;
Buggy code:
public class EJReportBlockDataSource implements Serializable , JRDataSource , JRRewindableDataSource , EJReportActionContext , EJReportBlockItemVAContext { private final EJReportBlock block ; private Map < String , Object > fieldCache = new HashMap < String , Object > ( ) ; private Map < String , Object > sitemCache = new HashMap < String , Object > ( ) ; private Map < String , Boolean > vCache = new HashMap < String , Boolean > ( ) ; private Map < String , Boolean > svCache = new HashMap < String , Boolean > ( ) ; private EJReportRecord focusedRecord ; private Locale defaultLocale ; public static final Object EMPTY = new Object ( ) ; public EJReportBlockDataSource ( EJReportBlock block ) { } @ Override public Object getFieldValue ( JRField field ) throws JRException { } private Object getValue ( JRField field ) { } @ Override public boolean next ( ) throws JRException { fieldCache . clear ( ) ; sitemCache . clear ( ) ; vCache . clear ( ) ; svCache . clear ( ) ; focusedRecord = null ; boolean navigateToNextRecord = block . navigateToNextRecord ( ) ; if ( navigateToNextRecord ) { focusedRecord = block . getCurrentRecord ( ) ; } <START_BUG> if ( block . isControlBlock ( ) ) { <END_BUG> block . reset ( ) ; } return navigateToNextRecord ; } @ Override public boolean isActive ( String item , String section , String vaName ) { } public boolean isActive ( String item , String section ) { } @ Override public boolean isVisible ( String item , String section ) { } @ Override public Object getVABaseValue ( Object value , String item , String section , String defaultPattren ) { } private Object toNumber ( Object value ) { } String toStyleText ( String text , EJReportVisualAttributeProperties va ) { } public static String toHex ( int r , int g , int b ) { } public String escape ( String str ) { } private static String toBrowserHexValue ( int number ) { } private EJReportDataScreenItem getReportScreenItem ( String item , EJReportScreenSection section ) { } @ Override public boolean canShowBlock ( String blockName ) { } @ Override public boolean canShowScreenItem ( String blockName , String screenItem , String section ) { } @ Override public void moveFirst ( ) throws JRException { } }

Fix:
if ( ( ! navigateToNextRecord ) && ( block . isControlBlock ( ) ) ) {
Buggy code:
public final class AutoComponentResolver implements IComponentResolver { private static final long serialVersionUID = 1L ; private final Map < Component , MarkupContainer > nestedComponents = new HashMap < Component , MarkupContainer > ( ) ; public final boolean resolve ( final MarkupContainer container , final MarkupStream markupStream , final ComponentTag tag ) { if ( tag instanceof WicketTag ) { final WicketTag wicketTag = ( ( WicketTag ) ( tag ) ) ; if ( wicketTag . isComponentTag ( ) ) { final Component component = createComponent ( container , wicketTag ) ; if ( component != null ) { if ( component instanceof Border ) { nestedComponents . put ( ( ( Border ) ( component ) ) . getBodyContainer ( ) , container ) ; } else { nestedComponents . put ( component , container ) ; } try { container . autoAdd ( component , markupStream ) ; } finally { nestedComponents . remove ( component ) ; } return true ; } } } if ( ( ( tag . getId ( ) ) != null ) && ( nestedComponents . containsKey ( container ) ) ) { MarkupContainer parent = nestedComponents . get ( container ) ; while ( parent != null ) { Component component = parent . get ( tag . getId ( ) ) ; if ( component != null ) { <START_BUG> component . render ( markupStream ) ; <END_BUG> return true ; } parent = parent . getParent ( ) ; if ( nestedComponents . containsKey ( parent ) ) { parent = nestedComponents . get ( parent ) ; } } } return false ; } private final Component createComponent ( final MarkupContainer container , final WicketTag tag ) { } private final void invokeSetter ( final Object object , final String name , final String value , final Locale locale ) { } }

Fix:
component . render ( ) ;
Buggy code:
public class Slider extends Control { public Slider ( Composite parent , int style ) { } public void addSelectionListener ( SelectionListener listener ) { } static int checkStyle ( int style ) { } public Point computeSize ( int wHint , int hHint , boolean changed ) { } void createHandle ( int index ) { } public int getIncrement ( ) { } public int getMaximum ( ) { } public int getMinimum ( ) { } public int getPageIncrement ( ) { } public int getSelection ( ) { } public int getThumb ( ) { } void hookEvents ( ) { } void overrideTranslations ( ) { } public void removeSelectionListener ( SelectionListener listener ) { } void sendScrollEvent ( int detail ) { Event event = new Event ( ) ; event . detail = detail ; <START_BUG> sendEvent ( Selection , event ) ; <END_BUG> } public void setIncrement ( int value ) { } public void setMaximum ( int value ) { } public void setMinimum ( int value ) { } public void setPageIncrement ( int value ) { } public void setSelection ( int value ) { } public void setThumb ( int value ) { } public void setValues ( int selection , int minimum , int maximum , int thumb , int increment , int pageIncrement ) { } int XmNdecrementCallback ( int w , int client_data , int call_data ) { } int XmNdragCallback ( int w , int client_data , int call_data ) { } int XmNincrementCallback ( int w , int client_data , int call_data ) { } int XmNpageDecrementCallback ( int w , int client_data , int call_data ) { } int XmNpageIncrementCallback ( int w , int client_data , int call_data ) { } int XmNtoBottomCallback ( int w , int client_data , int call_data ) { } int XmNtoTopCallback ( int w , int client_data , int call_data ) { } int XmNvalueChangedCallback ( int w , int client_data , int call_data ) { } }

Fix:
postEvent ( Selection , event ) ;
Buggy code:
@ UsingDataSet ( "download.json" ) @ RunWith ( Arquillian . class ) public class RestAPITest { @ Deployment ( testable = false ) public static Archive < ? > createDeployment ( ) { } @ EJB private ICATClientBean icatClientService ; @ ArquillianResource protected URL appUrl ; private static Properties prop ; private String restAPIUrl ; private static String icatUrl ; @ BeforeClass public static void setup ( ) throws MalformedURLException { } @ Before public void prepareRestAPITest ( ) throws Exception { } @ Test public void ping ( ) { } @ Test public void return404 ( ) { } @ Test public void getEmptyCart ( ) { } @ Test public void getUserDownloadWithNoSessionIdOrIcatUrl ( ) { } @ Test public void getUserDownloadWithInvalidSessionId ( ) { } @ Test public void getUserDownloadWithInvalidSessionIdAndIcatUrl ( ) throws UnsupportedEncodingException { <START_BUG> get ( ( ( ( restAPIUrl ) + "//downloads//facility//sig//user//vcf21513?sessionId=123456&icatUrl=" ) + ( RestAPITest . icatUrl ) ) ) . then ( ) . statusCode ( 401 ) . body ( "message" , equalTo ( "sessionId<seq2seq4repair_space>not<seq2seq4repair_space>valid" ) ) ; <END_BUG> } @ Test public void getUserDownloadWithValidSessionIdAndIcatUrlWithoutData ( ) throws UnsupportedEncodingException , MalformedURLException { } public void getUserDownloadWithValidSessionIdAndIcatUrlWithData ( ) throws IOException { } public void loadSingleCart ( ) throws IOException { } private String getIcatSession ( ) throws MalformedURLException { } }

Fix:
get ( ( ( ( restAPIUrl ) + "//downloads//facility//sig//user//vcf21513?sessionId=123456&icatUrl=" ) + ( RestAPITest . icatUrl ) ) ) . then ( ) . statusCode ( 403 ) . body ( "message" , equalTo ( "sessionId<seq2seq4repair_space>not<seq2seq4repair_space>valid" ) ) ;
Buggy code:
public class AIMaster extends AIListener { public enum mode { chase_ball , got_ball , defend_goal , sit , defend_penalties , attack_penalties ; } public enum AIMode { visual_servoing , neural_network ; } public static final int DIST_TO_BALL = 10 ; private AI ai ; private AIMaster . mode state = AIMaster . mode . sit ; private Communicator mComm ; public AIMaster ( Communicator comm , WorldStateProvider obs , AIMaster . AIMode ai_mode ) { } protected synchronized void worldChanged ( ) { AI . Command command ; checkState ( ) ; ai . update ( ai_world_state ) ; try { command = getCommand ( ) ; if ( command == null ) command = new Command ( 0 , 0 , false ) ; if ( command . isDefaultAcc ( ) ) mComm . sendMessage ( operate , command . getByteSpeed ( ) , command . getByteTurnSpeed ( ) ) ; else mComm . sendMessage ( operate , command . getByteSpeed ( ) , command . getByteTurnSpeed ( ) ) ; <START_BUG> if ( ( ( command . getByteSpeed ( ) ) != 0 ) && ( ( command . getByteTurnSpeed ( ) ) != 0 ) ) <END_BUG> System . out . println ( command ) ; if ( command . kick ) mComm . sendMessage ( kick ) ; } catch ( IOException e ) { e . printStackTrace ( ) ; } } private Command getCommand ( ) throws IOException { } private void checkState ( ) { } public void setState ( AIMaster . mode new_state ) { } public AIMaster . mode getState ( ) { } }

Fix:
if ( ( ( command . getByteSpeed ( ) ) != 0 ) || ( ( command . getByteTurnSpeed ( ) ) != 0 ) )
Buggy code:
public class ChartUtils { public static final List < String > ESLIM_702 = Arrays . asList ( "ESLIM_009_001_003" , "ESLIM_010_001_003" , "ESLIM_011_001_011" , "ESLIM_012_001_005" , "ESLIM_013_001_018" , "ESLIM_022_001_001" ) ; public static final List < String > ESLIM_701 = Arrays . asList ( "ESLIM_001_001_001" , "ESLIM_002_001_001" , "ESLIM_003_001_001" , "ESLIM_004_001_001" , "ESLIM_005_001_001" , "ESLIM_020_001_001" , "ESLIM_022_001_001" ) ; public static final List < String > IMPC_BWT = Arrays . asList ( "IMPC_GRS_003_001" , "IMPC_CAL_001_001" , "IMPC_DXA_001_001" , "IMPC_HWT_007_001" , "IMPC_PAT_049_001" , "IMPC_BWT_001_001" , "IMPC_ABR_001_001" , "IMPC_CHL_001_001" , "TCP_CHL_001_001" , "HMGU_ROT_004_001" ) ; private static final Logger logger = Logger . getLogger ( ChartUtils . class ) ; public static List < ChartData > alterMinAndMaxYAxisOfCharts ( List < ChartData > chartsAndTablesForParameter , Float min , Float max ) { } public static int getDecimalPlaces ( ExperimentDTO experiment ) { } public static Float getDecimalAdjustedFloat ( Float number , int numberOfDecimals ) { } public static String getChartPageUrlPostQc ( String baseUrl , String geneAcc , String alleleAcc , ZygosityType zygosity , String parameterStableId , String pipelineStableId , String phenotypingCenter ) { String url = baseUrl ; url += "//charts?accession=" + geneAcc ; <START_BUG> url += "&allele_accession=" + alleleAcc ; <END_BUG> if ( zygosity != null ) { url += "&zygosity=" + ( zygosity . name ( ) ) ; } if ( parameterStableId != null ) { url += "&parameter_stable_id=" + parameterStableId ; } if ( pipelineStableId != null ) { url += "&pipeline_stable_id=" + pipelineStableId ; } if ( phenotypingCenter != null ) { url += "&phenotyping_center=" + phenotypingCenter ; } return url ; } public static Map < String , Float > getMinMaxXAxis ( List < ChartsSeriesElement > chartsSeriesElementsList , ExperimentDTO experiment ) { } public static String getLabel ( ZygosityType zyg , SexType sex ) { } public static String getPlotParameter ( String parameter ) { } public static ChartType getPlotType ( String parameter ) { } }

Fix:
url += "&allele_accession_id=" + alleleAcc ;
Buggy code:
public class FileController { public enum OutputType { XML , XML_SCHEMA , JSON ; } private TableData tblData = null ; private CSVHandler csvHandler ; private boolean logErrors = true ; public FileController ( ) { } public FileController ( boolean logErrors ) { } public void readFile ( String fileName ) throws IOException { } public void readFile ( String directory , String fileName ) throws IOException { } public void readFile ( File csvFile ) throws IOException { } public void outputData ( String fileName , FileController . OutputType outputType ) throws IOException { } public void outputData ( String directory , String fileName , FileController . OutputType outputType ) throws IOException { } public void outputData ( File file , FileController . OutputType outputType ) throws IOException { } public void outputToSQLFile ( File file , String databaseName , SQLType sqlType ) throws IOException { } public void outputToDatabase ( String host , String port , String databaseName , SQLType sqlType , String userName , String password ) { } public void csvToXML ( File csvFile , File outputFile ) throws IOException { } public void csvToXMLSCHEMA ( File csvFile , File outputFile ) throws IOException { } public void csvToJSON ( File csvFile , File outputFile ) throws IOException { readFile ( csvFile ) ; <START_BUG> outputData ( outputFile , FileController . OutputType . XML ) ; <END_BUG> } public void csvToSQLFile ( File csvFile , File outputFile , String databaseName , SQLType sqlType ) throws IOException { } public boolean isLogErrors ( ) { } public void setLogErrors ( boolean logErrors ) { } public Object [ ] [ ] getTableData ( ) { } public void setTableData ( Object [ ] [ ] tableData ) { } public String [ ] getColumnHeader ( ) { } public String getColumnHeader ( int pos ) { } public void setColumnHeader ( String [ ] columnHeader ) { } public Class < ? > [ ] getColumnClasses ( ) { } public Class < ? > getColumnClasses ( int pos ) { } public void setColumnClasses ( Class < ? > [ ] columnClasses ) { } public int getLines ( ) { } public void setLines ( int lines ) { } public int getFields ( ) { } public void setFields ( int fields ) { } public int [ ] getFieldLength ( ) { } public int getFieldLength ( int pos ) { } public void setFieldLength ( int [ ] fieldLength ) { } public int [ ] getFieldPrecision ( ) { } public int getFieldPrecision ( int pos ) { } public void setFieldPrecision ( int [ ] fieldPrecision ) { } public String getTableName ( ) { } public void setTableName ( String tableName ) { } public boolean isFirstLineUsedAsColumnHeader ( ) { } public void setFirstLineUsedAsColumnHeader ( boolean firstLineUsedAsColumnHeader ) { } public String getDateFormat ( ) { } public void setDateFormat ( String dateFormat ) { } public String getColumnDelimiter ( ) { } public void setColumnDelimiter ( String columnDelimiter ) { } }

Fix:
outputData ( outputFile , FileController . OutputType . JSON ) ;
Buggy code:
public class WarStructureDeploymentProcessor implements DeploymentUnitProcessor { public static final String WEB_INF_LIB = "WEB-INF//lib" ; public static final String WEB_INF_CLASSES = "WEB-INF//classes" ; public static final VirtualFileFilter DEFAULT_WEB_INF_LIB_FILTER = new org . jboss . vfs . util . SuffixMatchFilter ( ".jar" , VisitorAttributes . DEFAULT ) ; private final WebMetaData sharedWebMetaData ; private final List < TldMetaData > sharedTldsMetaData ; public WarStructureDeploymentProcessor ( final WebMetaData sharedWebMetaData , final List < TldMetaData > sharedTldsMetaData ) { } public void deploy ( DeploymentPhaseContext phaseContext ) throws DeploymentUnitProcessingException { final DeploymentUnit deploymentUnit = phaseContext . getDeploymentUnit ( ) ; if ( ! ( WarDeploymentMarker . isWarDeployment ( deploymentUnit ) ) ) { return ; } final VirtualFile deploymentRoot = phaseContext . getDeploymentUnit ( ) . getAttachment ( DEPLOYMENT_ROOT ) . getRoot ( ) ; if ( deploymentRoot == null ) { return ; } <START_BUG> final MountHandle mountHandle = phaseContext . getDeploymentUnit ( ) . getAttachment ( DEPLOYMENT_ROOT_MOUNT_HANDLE ) ; <END_BUG> try { final ClassPathEntry [ ] entries = createResourceRoots ( deploymentRoot , mountHandle ) ; final DeploymentStructure structure = new DeploymentStructure ( entries ) ; deploymentUnit . putAttachment ( ATTACHMENT_KEY , structure ) ; final ServiceTarget target = phaseContext . getServiceTarget ( ) ; final ServiceName sName = phaseContext . getPhaseServiceName ( ) . append ( "war" , "structure" ) ; target . addService ( sName , new WarStructureDeploymentProcessor . DeploymentStructureService ( structure ) ) . addDependency ( phaseContext . getPhaseServiceName ( ) ) . install ( ) ; target . addDependency ( sName ) ; } catch ( Exception e ) { throw new DeploymentUnitProcessingException ( e ) ; } final WarMetaData warMetaData = new WarMetaData ( ) ; warMetaData . setSharedWebMetaData ( sharedWebMetaData ) ; deploymentUnit . putAttachment ( WarMetaData . ATTACHMENT_KEY , warMetaData ) ; final TldsMetaData tldsMetaData = new TldsMetaData ( ) ; tldsMetaData . setSharedTlds ( sharedTldsMetaData ) ; deploymentUnit . putAttachment ( TldsMetaData . ATTACHMENT_KEY , tldsMetaData ) ; } public void undeploy ( final DeploymentUnit context ) { } ClassPathEntry [ ] createResourceRoots ( final VirtualFile deploymentRoot , MountHandle mountHandle ) throws IOException , DeploymentUnitProcessingException { } void createWebInfLibResources ( final VirtualFile deploymentRoot , List < ClassPathEntry > entries ) throws IOException , DeploymentUnitProcessingException { } static class DeploymentStructureService implements Service < Void > { final DeploymentStructure structure ; public DeploymentStructureService ( DeploymentStructure structure ) { } public Void getValue ( ) throws IllegalStateException { } public void start ( StartContext context ) throws StartException { } public void stop ( StopContext context ) { } } }

Fix:
final MountHandle mountHandle = phaseContext . getDeploymentUnit ( ) . getAttachment ( DEPLOYMENT_ROOT ) . getMountHandle ( ) ;
Buggy code:
@ Transactional public class AssessmentDelegateImpl implements AssessmentDelegate { private static final Logger logger = LoggerFactory . getLogger ( AssessmentDelegate . class ) ; @ Autowired private AssessmentContext assessmentContext ; @ Autowired private VeteranAssessmentService veteranAssessmentService ; @ Autowired private VeteranAssessmentSurveyService veteranAssessmentSurveyService ; @ Autowired private VeteranService veteranService ; @ Autowired private AssessmentEngineService assessmentEngineService ; @ Autowired private VeteranAssessmentAuditLogRepository veteranAssessmentAuditLogRepository ; @ Autowired private VeteranAssessmentRepository veteranAssessmentRepository ; @ Autowired private AssessmentStatusRepository assessmentStatusRepository ; @ Autowired private SurveyRepository surveyRepository ; @ Autowired private SurveySectionRepository surveySectionRepository ; @ Autowired private BatteryRepository batteryRepo ; @ Resource ( type = TemplateProcessorService . class ) private TemplateProcessorService templateProcessorService ; @ Override public List < VeteranDto > findVeterans ( VeteranDto veteran ) { } @ Override public VeteranAssessment getAvailableVeteranAssessment ( Integer veteranId , Integer programId ) { List < VeteranAssessment > veteranAssessments = veteranAssessmentService . getAvailableAssessmentsForVeteran ( veteranId ) ; if ( ( veteranAssessments == null ) || ( veteranAssessments . isEmpty ( ) ) ) { return null ; } else { for ( VeteranAssessment assessment : veteranAssessments ) { <START_BUG> if ( ( programId != null ) || ( assessment . getProgram ( ) . getProgramId ( ) . equals ( programId ) ) ) { <END_BUG> if ( ( surveyRepository . findForVeteranAssessmentId ( assessment . getVeteranAssessmentId ( ) ) . size ( ) ) > 0 ) return assessment ; } } return null ; } } @ Override public void setUpAssessmentContext ( VeteranDto veteran , VeteranAssessment veteranAssessment ) { } @ Override public void ensureValidAssessmentContext ( ) throws InvalidAssessmentContextException { } @ Override public List < SurveySection > getAssessmentSections ( ) { } @ Override public AssessmentResponse processPage ( AssessmentRequest assessmentRequest ) { } @ Override public Integer getVeteranAssessmentId ( ) { } private void prepopulateResponseAnswers ( AssessmentResponse response ) { } @ Override public String getVeteranFullName ( ) { } @ Override public String getCompletionMessage ( ) throws IllegalSystemStateException { } @ Override public String getWelcomeMessage ( ) throws IllegalSystemStateException { } private String getBatteryTempalte ( TemplateType type ) throws EntityNotFoundException , IllegalSystemStateException , InvalidAssessmentContextException { } @ Override public void markAssessmentAsComplete ( ) { } }

Fix:
if ( ( programId == null ) || ( assessment . getProgram ( ) . getProgramId ( ) . equals ( programId ) ) ) {
Buggy code:
public abstract class GUIButton extends DisplayElement { public final String CMD ; public GUIButton ( int x , int y , int w , int h , String cmd , GraphicImage bi ) { } public boolean testClick ( int x , int y ) { } public boolean click ( int x , int y ) { } public void clickEvent ( ) { for ( String name : UnitSelection . getSelectedUnits ( ) ) <START_BUG> GUI . getGUI ( ) . parseUserInput ( ( ( name + "<seq2seq4repair_space>" ) + ( CMD ) ) , "0" ) ; <END_BUG> } }

Fix:
GUI . getGUI ( ) . parseUserInput ( ( ( name + "<seq2seq4repair_space>" ) + ( CMD ) ) , "Player" ) ;