nus-yam/ex-repair huggingface dataset:
Buggy code:
public class IjkFullVideoActivity extends Activity { private IjkVideoView videoview ; private MediaController mediaController ; private ProgressBar progressBar ; private String path ; private String vid ; @ Override public void onCreate ( Bundle arg0 ) { super . onCreate ( arg0 ) ; setContentView ( video_full2 ) ; Bundle e = getIntent ( ) . getExtras ( ) ; if ( e != null ) { path = e . getString ( "path" ) ; vid = e . getString ( "vid" ) ; } progressBar = ( ( ProgressBar ) ( findViewById ( loadingprogress ) ) ) ; <START_BUG> videoview = ( ( IjkVideoView ) ( findViewById ( R . id . videoview ) ) ) ; <END_BUG> mediaController = new MediaController ( this , false ) ; videoview . setMediaController ( mediaController ) ; videoview . setMediaBufferingIndicator ( progressBar ) ; if ( ( ( path ) != null ) && ( ( path . length ( ) ) > 0 ) ) { progressBar . setVisibility ( GONE ) ; videoview . setVideoURI ( Uri . parse ( path ) ) ; } else { videoview . setVid ( vid , 1 ) ; } videoview . setOnPreparedListener ( new OnPreparedListener ( ) { @ Override public void onPrepared ( IMediaPlayer mp ) { } } ) ; mediaController . setOnVideoChangeListener ( new MediaController . OnVideoChangeListener ( ) { @ Override public void onVideoChange ( int layout ) { videoview . setVideoLayout ( layout ) ; switch ( layout ) { case IjkVideoView . VIDEO_LAYOUT_ORIGIN : Toast . makeText ( IjkFullVideoActivity . this , "VIDEO_LAYOUT_ORIGIN" , 1 ) . show ( ) ; break ; case IjkVideoView . VIDEO_LAYOUT_SCALE : Toast . makeText ( IjkFullVideoActivity . this , "VIDEO_LAYOUT_SCALE" , 1 ) . show ( ) ; break ; case IjkVideoView . VIDEO_LAYOUT_STRETCH : Toast . makeText ( IjkFullVideoActivity . this , "VIDEO_LAYOUT_STRETCH" , 1 ) . show ( ) ; break ; case IjkVideoView . VIDEO_LAYOUT_ZOOM : Toast . makeText ( IjkFullVideoActivity . this , "VIDEO_LAYOUT_ZOOM" , 1 ) . show ( ) ; break ; } } } ) ; } }

Fix:
videoview = ( ( IjkVideoView ) ( findViewById ( full_videoview ) ) ) ;
Buggy code:
public class BlueprintDeploymentListener implements ArtifactUrlTransformer { private final Logger logger = LoggerFactory . getLogger ( BlueprintDeploymentListener . class ) ; private DocumentBuilderFactory dbf ; public boolean canHandle ( File artifact ) { try { if ( ( artifact . isFile ( ) ) && ( artifact . getName ( ) . endsWith ( ".xml" ) ) ) { Document doc = parse ( artifact ) ; String name = doc . getDocumentElement ( ) . getLocalName ( ) ; String uri = doc . getDocumentElement ( ) . getNamespaceURI ( ) ; <START_BUG> if ( ( "blueprint" . equals ( name ) ) && ( "http:////www.bundles.org//xmlns//blueprint//v1.0.0" . equals ( uri ) ) ) { <END_BUG> return true ; } } } catch ( Exception e ) { logger . error ( ( "Unable<seq2seq4repair_space>to<seq2seq4repair_space>parse<seq2seq4repair_space>deployed<seq2seq4repair_space>file<seq2seq4repair_space>" + ( artifact . getAbsolutePath ( ) ) ) , e ) ; } return false ; } public URL transform ( URL artifact ) { } protected Document parse ( File artifact ) throws Exception { } }

Fix:
if ( ( "blueprint" . equals ( name ) ) && ( "http:////www.osgi.org//xmlns//blueprint//v1.0.0" . equals ( uri ) ) ) {
Buggy code:
@ SuppressWarnings ( "serial" ) public class MatchAlwaysTransactionAttributeSource implements Serializable , TransactionAttributeSource { private TransactionAttribute transactionAttribute = new DefaultTransactionAttribute ( ) ; public void setTransactionAttribute ( TransactionAttribute transactionAttribute ) { } @ Override public TransactionAttribute getTransactionAttribute ( Method method , Class < ? > targetClass ) { <START_BUG> return ClassUtils . isUserLevelMethod ( method ) ? this . transactionAttribute : null ; <END_BUG> } @ Override public boolean equals ( Object other ) { } @ Override public int hashCode ( ) { } @ Override public String toString ( ) { } }

Fix:
return ( method == null ) || ( ClassUtils . isUserLevelMethod ( method ) ) ? this . transactionAttribute : null ;
Buggy code:
public class UpdateUtil { private static final String URL = "http:////api.spiget.org//v1//resources//" ; private static final int PLUGIN = 19254 ; public static final String PREFIX = ( ( ( ( ChatColor . GREEN ) + "" ) + ( ChatColor . BOLD ) ) + "[ViaVersion]<seq2seq4repair_space>" ) + ( ChatColor . GREEN ) ; public static void sendUpdateMessage ( final UUID uuid , final Plugin plugin ) { } public static void sendUpdateMessage ( final Plugin plugin ) { } private static String getUpdateMessage ( boolean console ) { if ( ViaVersion . getInstance ( ) . getVersion ( ) . equals ( "${project.version}" ) ) { return "You<seq2seq4repair_space>are<seq2seq4repair_space>using<seq2seq4repair_space>a<seq2seq4repair_space>debug//custom<seq2seq4repair_space>version,<seq2seq4repair_space>consider<seq2seq4repair_space>updating." ; } String newestString = UpdateUtil . getNewestVersion ( ) ; if ( newestString == null ) { if ( console ) { return "Could<seq2seq4repair_space>not<seq2seq4repair_space>check<seq2seq4repair_space>for<seq2seq4repair_space>updates,<seq2seq4repair_space>check<seq2seq4repair_space>your<seq2seq4repair_space>connection." ; } else { return null ; } } Version current ; try { current = new Version ( ViaVersion . getInstance ( ) . getVersion ( ) ) ; } catch ( IllegalArgumentException e ) { return "You<seq2seq4repair_space>are<seq2seq4repair_space>using<seq2seq4repair_space>a<seq2seq4repair_space>debug//custom<seq2seq4repair_space>version,<seq2seq4repair_space>consider<seq2seq4repair_space>updating." ; } Version newest = new Version ( newestString ) ; if ( ( current . compareTo ( newest ) ) < 0 ) return "There<seq2seq4repair_space>is<seq2seq4repair_space>a<seq2seq4repair_space>newer<seq2seq4repair_space>version<seq2seq4repair_space>available:<seq2seq4repair_space>" + ( newest . toString ( ) ) ; else <START_BUG> if ( console ) { <END_BUG> return "You<seq2seq4repair_space>are<seq2seq4repair_space>running<seq2seq4repair_space>a<seq2seq4repair_space>newer<seq2seq4repair_space>version<seq2seq4repair_space>than<seq2seq4repair_space>is<seq2seq4repair_space>released!" ; } return null ; } private static String getNewestVersion ( ) { } }

Fix:
if ( console && ( ( current . compareTo ( newest ) ) != 0 ) ) {
Buggy code:
public class Op extends StandardStaticNamespace { public Op ( ) { } public static boolean isList ( Object x ) { } public static Iterable < Object > asList ( Object x ) { if ( x instanceof Iterable ) { return ( ( Iterable < Object > ) ( x ) ) ; } else { List < Object > list = new ArrayList < Object > ( 1 ) ; <START_BUG> list . add ( 1 ) ; <END_BUG> return list ; } } public static boolean asBool ( Object x ) { } public static Object list ( Object x ) { } public static Object add ( Object x , Object y ) { } public static Object subtract ( Object x , Object y ) { } public static Object multiply ( Object x , Object y ) { } public static Object div ( Object x , Object y ) { } public static Object negative ( Object x ) { } public static Object mod ( Object x , Object y ) { } public static Object eq ( Object x , Object y ) { } public static Object ne ( Object x , Object y ) { } public static Object and ( Object x , Object y ) { } public static Object or ( Object x , Object y ) { } public static Object to ( Object x , Object y ) { } public static Object at ( Object x , Object i ) { } public static Object xpath ( Object x , Object y ) { } }

Fix:
list . add ( x ) ;
Buggy code:
public class LocatorMapFragment extends DroneMap { private final GraphicLocator graphicLocator = new GraphicLocator ( ) ; @ Override protected boolean isMissionDraggable ( ) { } @ Override public boolean setAutoPanMode ( AutoPanMode target ) { } public void updateLastPosition ( LatLong lastPosition ) { } public void zoomToFit ( ) { final LatLong lastPosition = graphicLocator . getPosition ( ) ; if ( ( ( lastPosition != null ) && ( ( lastPosition . getLongitude ( ) ) != 0 ) ) && ( ( lastPosition . getLatitude ( ) ) != 0 ) ) { <START_BUG> mMapFragment . zoomToFitMyLocation ( Collections . singletonList ( lastPosition ) ) ; <END_BUG> } else { mMapFragment . goToMyLocation ( ) ; } } public void setLocationReceiver ( LocationListener receiver ) { } No newline ; at end ; of file ; }

Fix:
mMapFragment . zoomToFit ( Collections . singletonList ( lastPosition ) ) ;
Buggy code:
abstract class Lexer { private static final char DISABLED = '￾' ; private final char delimiter ; private final char escape ; private final char quoteChar ; private final char commmentStart ; final boolean ignoreSurroundingSpaces ; final boolean ignoreEmptyLines ; final CSVFormat format ; final ExtendedBufferedReader in ; Lexer ( final CSVFormat format , final ExtendedBufferedReader in ) { } <START_BUG> private final char mapNullToDisabled ( Character c ) { <END_BUG> return c == null ? Lexer . DISABLED : c . charValue ( ) ; } long getLineNumber ( ) { } int readEscape ( ) throws IOException { } void trimTrailingSpaces ( final StringBuilder buffer ) { } boolean isWhitespace ( final int c ) { } boolean readEndOfLine ( int c ) throws IOException { } boolean isStartOfLine ( final int c ) { } boolean isEndOfFile ( final int c ) { } abstract Token nextToken ( Token reusableToken ) throws IOException { } boolean isDelimiter ( final int c ) { } boolean isEscape ( final int c ) { } boolean isQuoteChar ( final int c ) { } boolean isCommentStart ( final int c ) { } }

Fix:
private final char mapNullToDisabled ( final Character c ) {
Buggy code:
@ Plugin ( id = PomData . ARTIFACT_ID , name = PomData . NAME , version = PomData . VERSION ) public class BLWarps { private BLWarpsConfiguration config ; private Util util = new Util ( this ) ; private Map < Class < ? extends WarpBase > , WarpBaseManager < ? extends WarpBase > > warpBaseManagers = new HashMap < Class < ? extends WarpBase > , WarpBaseManager < ? extends WarpBase > > ( ) ; @ Inject private Game game ; @ Inject private Logger logger ; @ Inject @ DefaultConfig ( sharedRoot = false ) private File configFile ; @ Inject @ DefaultConfig ( sharedRoot = false ) private ConfigurationLoader < CommentedConfigurationNode > configLoader ; @ Listener public void preInit ( GamePreInitializationEvent event ) { } private void registerCommands ( ) { } private void setupConfig ( ) { } private void loadConfig ( ) { ConfigurationNode rawConfig = null ; try { rawConfig = this . configLoader . load ( ) ; this . config = MAPPER . bindToNew ( ) . populate ( rawConfig ) ; } catch ( IOException e ) { this . logger . warn ( "The<seq2seq4repair_space>configuration<seq2seq4repair_space>could<seq2seq4repair_space>not<seq2seq4repair_space>be<seq2seq4repair_space>loaded!<seq2seq4repair_space>Using<seq2seq4repair_space>the<seq2seq4repair_space>default<seq2seq4repair_space>configuration" ) ; } catch ( IllegalArgumentException e ) { StringBuilder sb = new StringBuilder ( ) ; StorageType [ ] storageTypes = StorageType . values ( ) ; for ( int i = 0 ; i < ( storageTypes . length ) ; i ++ ) { sb . append ( storageTypes [ i ] . toString ( ) ) ; if ( ( i + 1 ) != ( storageTypes . length ) ) { sb . append ( ",<seq2seq4repair_space>" ) ; } } this . logger . warn ( ( "The<seq2seq4repair_space>specified<seq2seq4repair_space>storage<seq2seq4repair_space>type<seq2seq4repair_space>could<seq2seq4repair_space>not<seq2seq4repair_space>be<seq2seq4repair_space>found.<seq2seq4repair_space>Reverting<seq2seq4repair_space>to<seq2seq4repair_space>flatfile<seq2seq4repair_space>storage.<seq2seq4repair_space>Try:<seq2seq4repair_space>" + ( sb . toString ( ) ) ) ) ; } catch ( ObjectMappingException e ) { <START_BUG> this . logger . warn ( ( "There<seq2seq4repair_space>was<seq2seq4repair_space>an<seq2seq4repair_space>loading<seq2seq4repair_space>the<seq2seq4repair_space>configuration." + ( e . getStackTrace ( ) ) ) ) ; <END_BUG> } } private void saveDefaultConfig ( ) { } private void setupManagers ( ) { } private void registerEventHandlers ( ) { } public Logger getLogger ( ) { } public WarpManager getWarpManager ( ) { } public WarpRegionManager getWarpRegionManager ( ) { } public BLWarpsConfiguration getConfig ( ) { } public Game getGame ( ) { } public Util getUtil ( ) { } }

Fix:
this . logger . warn ( ( "There<seq2seq4repair_space>was<seq2seq4repair_space>an<seq2seq4repair_space>error<seq2seq4repair_space>loading<seq2seq4repair_space>the<seq2seq4repair_space>configuration." + ( e . getStackTrace ( ) ) ) ) ;
Buggy code:
@ Slf4j public class RepositoryManager { public static void cloneOrCheckout ( Path targetDirectory , String repositoryUrl , String branch , String localDirectory ) { } public static Git cloneOrCheckout ( Path targetDirectory , String repositoryUrl , String username , String password , String branch , String localDirectory ) { } private static void checkoutRepository ( Git repository , String branch , String username , String password ) { try { CheckoutCommand checkoutCommand = repository . checkout ( ) ; checkoutCommand . setName ( branch ) ; Ref ref = checkoutCommand . call ( ) ; <START_BUG> if ( branch . equals ( ref . getName ( ) ) ) { <END_BUG> FetchCommand fetchCommand = repository . fetch ( ) ; RepositoryManager . setCredentials ( fetchCommand , username , password ) ; fetchCommand . call ( ) ; checkoutCommand = repository . checkout ( ) ; checkoutCommand . setName ( branch ) ; checkoutCommand . call ( ) ; } } catch ( GitAPIException e ) { log . error ( "Failed<seq2seq4repair_space>to<seq2seq4repair_space>pull<seq2seq4repair_space>git<seq2seq4repair_space>repository<seq2seq4repair_space>" , e ) ; throw new GitException ( "Failed<seq2seq4repair_space>to<seq2seq4repair_space>pull<seq2seq4repair_space>git<seq2seq4repair_space>repository" , e ) ; } } private static Git cloneRepository ( String url , String username , String password , String branch , Path targetPath ) throws IOException { } public static boolean pull ( Git repository , String username , String password ) { } public static String getLastHash ( Git git ) { } private static void setCredentials ( TransportCommand < ? , ? > command , String username , String password ) { } No newline ; at end ; of file ; }

Fix:
if ( ( ref == null ) || ( branch . equals ( ref . getName ( ) ) ) ) {
Buggy code:
public class ExampleRunner { public static void main ( String [ ] args ) throws Exception { final ModelControllerClient client = Factory . create ( "localhost" , 9999 ) ; try { final ModelNode domainOp = new ModelNode ( ) ; domainOp . get ( OP ) . set ( READ_RESOURCE_OPERATION ) ; domainOp . get ( OP_ADDR ) . setEmptyList ( ) ; domainOp . get ( RECURSIVE ) . set ( true ) ; domainOp . get ( "proxies" ) . set ( false ) ; ModelNode result = client . execute ( domainOp ) ; if ( ! ( SUCCESS . equals ( result . get ( OUTCOME ) . asString ( ) ) ) ) { throw new org . jboss . as . controller . OperationFailedException ( result . get ( FAILURE_DESCRIPTION ) ) ; } System . out . println ( "--<seq2seq4repair_space>domain<seq2seq4repair_space>configuration" ) ; final ModelNode domainResult = result . get ( RESULT ) . clone ( ) ; System . out . println ( domainResult ) ; System . out . println ( "--" ) ; final ModelNode hostOp = new ModelNode ( ) ; hostOp . get ( OP ) . set ( READ_RESOURCE_OPERATION ) ; <START_BUG> hostOp . get ( OP_ADDR ) . setEmptyList ( ) . add ( HOST , "local" ) ; <END_BUG> hostOp . get ( RECURSIVE ) . set ( true ) ; hostOp . get ( "proxies" ) . set ( false ) ; result = client . execute ( hostOp ) ; if ( ! ( SUCCESS . equals ( result . get ( OUTCOME ) . asString ( ) ) ) ) { throw new org . jboss . as . controller . OperationFailedException ( result . get ( FAILURE_DESCRIPTION ) ) ; } System . out . println ( "--<seq2seq4repair_space>host<seq2seq4repair_space>configuration" ) ; final ModelNode hostResult = result . get ( RESULT ) . clone ( ) ; System . out . println ( hostResult ) ; System . out . println ( "--" ) ; } finally { StreamUtils . safeClose ( client ) ; } } }

Fix:
hostOp . get ( OP_ADDR ) . setEmptyList ( ) . add ( HOST , "master" ) ;
Buggy code:
public class ReadResponseResolver implements IResponseResolver < Row > { private static Logger logger_ = Logger . getLogger ( ReadResponseResolver . class ) ; private final String table ; private final int responseCount ; public ReadResponseResolver ( String table , int responseCount ) { } public Row resolve ( List < Message > responses ) throws IOException , DigestMismatchException { } public static void maybeScheduleRepairs ( ColumnFamily resolved , String table , String key , List < ColumnFamily > versions , List < InetAddress > endPoints ) { for ( int i = 0 ; i < ( versions . size ( ) ) ; i ++ ) { ColumnFamily diffCf = ColumnFamily . diff ( versions . get ( i ) , resolved ) ; if ( diffCf == null ) continue ; RowMutation rowMutation = new RowMutation ( table , key ) ; rowMutation . add ( diffCf ) ; RowMutationMessage rowMutationMessage = new RowMutationMessage ( rowMutation ) ; <START_BUG> ReadRepairManager . instance ( ) . schedule ( endPoints . get ( i ) , rowMutationMessage ) ; <END_BUG> } } static ColumnFamily resolveSuperset ( List < ColumnFamily > versions ) { } public boolean isDataPresent ( List < Message > responses ) { } }

Fix:
instance . schedule ( endPoints . get ( i ) , rowMutationMessage ) ;
Buggy code:
public class AssertTest extends TestCase { public void testFail ( ) { } public void testAssertEquals ( ) { } public void testAssertEqualsNull ( ) { <START_BUG> assertEquals ( null , null ) ; <END_BUG> } public void testAssertStringEquals ( ) { } public void testAssertNullNotEqualsString ( ) { } public void testAssertStringNotEqualsNull ( ) { } public void testAssertNullNotEqualsNull ( ) { } public void testAssertNull ( ) { } public void testAssertNotNull ( ) { } public void testAssertTrue ( ) { } public void testAssertFalse ( ) { } public void testAssertSame ( ) { } public void testAssertNotSame ( ) { } public void testAssertNotSameFailsNull ( ) { } }

Fix:
assertEquals ( ( ( Object ) ( null ) ) , ( ( Object ) ( null ) ) ) ;
Buggy code:
public class LetterBag extends GameObject { private static final String alphabet = "ABCDEFGHIJKLMNOPQRSTUVWXYZ" ; private static final String NORM_TEX_PATH = "//misc//scrabbleBag" + ( STD_TEX_EXT ) ; private static final String SEL_TEX_PATH = "//misc//scrabbleBagSel" + ( STD_TEX_EXT ) ; private static final int NORMAL_TEX = 0 ; private static final int SEL_TEX = 1 ; private static final float X_OFFSET = 604 ; private static final float Y_OFFSET = 500 ; public static final float LETTER_X_OFFSET = ( LetterBag . X_OFFSET ) + 40 ; public static final float LETTER_Y_OFFSET = 592 ; public static final float MAX_X_SPEED = - 5.0F ; public static final float X_SPEED_INCS = 0.8F ; public static final float JUMP_START = - 5.0F ; public static final float GRAVITY = 0.203F ; private static final float CONSTANT_INDEX_MODIFIER = 0.8F ; private static final float INCREMENTAL_INDEX_MODIFIER = 0.02F ; private ArrayList < Character > letters ; private boolean highlighted ; public static final float getAppropriateXSpeed ( int tileRackIndex ) { } public LetterBag ( GameStateManager gsm ) { } public void update ( ) { } @ Override public void render ( ) { } public LetterTile drawLetter ( Player playerRef , int index ) { int randIndex = new Random ( ) . nextInt ( letters . size ( ) ) ; char chosenLetter = letters . get ( randIndex ) ; letters . remove ( randIndex ) ; int letterPoints = ScrabbleUtils . getValueOf ( chosenLetter ) ; <START_BUG> return new LetterTile ( gsm , playerRef , chosenLetter , letterPoints , TileRack . getTilePos ( index ) , true , index ) ; <END_BUG> } private void fillBag ( ) { } private void shuffleBag ( ) { } private void loadTextures ( ) { } public void highlight ( boolean highlighted ) { } public boolean getHighlighted ( ) { } public Rectangle getRect ( ) { } }

Fix:
return new LetterTile ( gsm , playerRef , chosenLetter , letterPoints , true , index ) ;
Buggy code:
public class RoundRectangleFigure extends AttributeFigure { private Rectangle fDisplayBox ; private int fArcWidth ; private int fArcHeight ; private static final int DEFAULT_ARC = 8 ; private static final long serialVersionUID = 7907900248924036885L ; private int roundRectangleSerializedDataVersion = 1 ; public RoundRectangleFigure ( ) { } public RoundRectangleFigure ( Point origin , Point corner ) { } public void basicDisplayBox ( Point origin , Point corner ) { } public void setArc ( int width , int height ) { } public Point getArc ( ) { } public HandleEnumeration handles ( ) { } public Rectangle displayBox ( ) { } protected void basicMoveBy ( int x , int y ) { } public void drawBackground ( Graphics g ) { Rectangle r = displayBox ( ) ; <START_BUG> g . fillRoundRect ( r . x , r . y , r . width , r . height , fArcWidth , fArcHeight ) ; <END_BUG> } public void drawFrame ( Graphics g ) { } public Insets connectionInsets ( ) { } public Connector connectorAt ( int x , int y ) { } public void write ( StorableOutput dw ) { } public void read ( StorableInput dr ) throws IOException { } }

Fix:
g . fillRoundRect ( r . x , r . y , ( ( r . width ) - 1 ) , ( ( r . height ) - 1 ) , fArcWidth , fArcHeight ) ;
Buggy code:
public abstract class Form extends WebMarkupContainer implements IFeedbackBoundary , IFormSubmitListener { private static Log log = LogFactory . getLog ( Form . class ) ; IFormValidator validator = IFormValidator . NULL ; private IFormValidationStrategy formValidationStrategy ; private static final class ValidatorList implements IFormValidator { private final IFormValidator left ; private IFormValidator right ; ValidatorList ( final IFormValidator left , final IFormValidator right ) { } public String toString ( ) { } public void validate ( final Form form ) { } void add ( final IFormValidator validator ) { } List asList ( ) { } } public Form ( final String id ) { } public Form ( final String id , final IFeedback feedback ) { } public Form ( final String id , IModel model , final IFeedback feedback ) { } public final Form add ( final IFormValidator validator ) { } public IFormValidationStrategy getValidationStrategy ( ) { } public final void loadPersistentFormComponentValues ( ) { } public void onFormSubmitted ( ) { } public void removePersistentFormComponentValues ( final boolean disablePersistence ) { } public void setVersioned ( final boolean isVersioned ) { } protected IValuePersister getValuePersister ( ) { } protected void onComponentTag ( final ComponentTag tag ) { checkComponentTag ( tag , "form" ) ; super . onComponentTag ( tag ) ; <START_BUG> tag . put ( "method" , "POST" ) ; <END_BUG> tag . put ( "action" , Strings . replaceAll ( urlFor ( IFormSubmitListener . class ) , "&" , "&amp;" ) ) ; } protected void onError ( ) { } protected void internalOnModelChanged ( ) { } protected void onSubmit ( ) { } protected void onValidate ( ) { } protected final boolean validate ( ) { } public final void visitFormComponents ( final FormComponent . IVisitor visitor ) { } private int countButtons ( ) { } private Button findSubmittingButton ( ) { } public final boolean isValidated ( ) { } boolean hasError ( ) { } private boolean anyFormComponentError ( ) { } private void invalid ( ) { } private void persistFormComponentData ( ) { } void updateFormComponentModels ( ) { } }

Fix:
tag . put ( "method" , "post" ) ;
Buggy code:
public class WorldRenderer { static final float FRUSTUM_WIDTH = 10 ; static final float FRUSTUM_HEIGHT = 15 ; World world ; OrthographicCamera camera ; SpriteBatch batch ; List < Tree > remainingTrees ; public WorldRenderer ( SpriteBatch batch , World world ) { } public void render ( ) { } private void renderBackground ( ) { } private void renderObjects ( ) { } private void renderSpot ( ) { } private void renderObstacles ( ) { } private void renderGarbages ( ) { } private void renderSpecialItems ( ) { for ( SpecialItem specialItem : world . specialItems ) { if ( specialItem instanceof CookieBox ) { batch . draw ( specialItemCookieBox , specialItem . position . x , specialItem . position . y , COOKIE_BOX_WIDTH , COOKIE_BOX_HEIGHT ) ; } if ( specialItem instanceof CarBattery ) { batch . draw ( specialItemCarBattery , specialItem . position . x , specialItem . position . y , CAR_BATTERY_WIDTH , CAR_BATTERY_HEIGHT ) ; } } for ( SpecialItem specialItem : world . specialItems ) { <START_BUG> if ( specialItem instanceof Tornado ) { <END_BUG> TextureRegion keyFrame = specialItemTornado . getKeyFrame ( world . spot . tornado . stateTime , true ) ; batch . draw ( keyFrame , specialItem . position . x , specialItem . position . y , TORNADO_WIDTH , TORNADO_HEIGHT ) ; } } } private void renderRemainingTrees ( ) { } }

Fix:
if ( ( specialItem instanceof Tornado ) && ( world . spot . visible ) ) {
Buggy code:
public class JavaEnvUtils { private static final boolean isDos = Os . isFamily ( "dos" ) ; private static final boolean isNetware = Os . isName ( "netware" ) ; private static final boolean isAix = Os . isName ( "aix" ) ; private static final String javaHome = System . getProperty ( "java.home" ) ; private static final FileUtils fileUtils = FileUtils . newFileUtils ( ) ; private static String javaVersion ; private static int javaVersionNumber ; public static final String JAVA_1_0 = "1.0" ; public static final String JAVA_1_1 = "1.1" ; public static final String JAVA_1_2 = "1.2" ; public static final String JAVA_1_3 = "1.3" ; public static final String JAVA_1_4 = "1.4" ; private static Vector jrePackages ; public static String getJavaVersion ( ) { } public static boolean isJavaVersion ( String version ) { } public static String getJreExecutable ( String command ) { } public static String getJdkExecutable ( String command ) { } private static String addExtension ( String command ) { } private static File findInDir ( String dirName , String commandName ) { } private static void buildJrePackages ( ) { JavaEnvUtils . jrePackages = new Vector ( ) ; switch ( JavaEnvUtils . javaVersionNumber ) { case 14 : JavaEnvUtils . jrePackages . addElement ( "org.apache.crimson" ) ; JavaEnvUtils . jrePackages . addElement ( "org.apache.xalan" ) ; JavaEnvUtils . jrePackages . addElement ( "org.apache.xml" ) ; JavaEnvUtils . jrePackages . addElement ( "org.apache.xpath" ) ; JavaEnvUtils . jrePackages . addElement ( "org.ietf.jgss" ) ; JavaEnvUtils . jrePackages . addElement ( "org.w3c.dom" ) ; JavaEnvUtils . jrePackages . addElement ( "org.xml.sax" ) ; case 13 : JavaEnvUtils . jrePackages . addElement ( "org.omg" ) ; JavaEnvUtils . jrePackages . addElement ( "com.sun.corba" ) ; JavaEnvUtils . jrePackages . addElement ( "com.sun.jndi" ) ; JavaEnvUtils . jrePackages . addElement ( "com.sun.media" ) ; JavaEnvUtils . jrePackages . addElement ( "com.sun.naming" ) ; JavaEnvUtils . jrePackages . addElement ( "com.sun.org.omg" ) ; JavaEnvUtils . jrePackages . addElement ( "com.sun.rmi" ) ; JavaEnvUtils . jrePackages . addElement ( "sunw.io" ) ; JavaEnvUtils . jrePackages . addElement ( "sunw.util" ) ; case 12 : JavaEnvUtils . jrePackages . addElement ( "com.sun.java" ) ; JavaEnvUtils . jrePackages . addElement ( "com.sun.image" ) ; case 11 : default : <START_BUG> JavaEnvUtils . jrePackages . addElement ( "sun." ) ; <END_BUG> JavaEnvUtils . jrePackages . addElement ( "java" ) ; JavaEnvUtils . jrePackages . addElement ( "javax" ) ; break ; } } public static Vector getJrePackageTestCases ( ) { } public static Vector getJrePackages ( ) { } }

Fix:
JavaEnvUtils . jrePackages . addElement ( "sun" ) ;
Buggy code:
public class SplashScreen extends Canvas { public SplashScreen ( ) { } public void dispose ( ) { } public synchronized void advance ( ) { } public void update ( Graphics g ) { } public synchronized void paint ( Graphics g ) { Dimension size = getSize ( ) ; if ( ( offscreenImg ) == null ) { offscreenImg = createImage ( size . width , size . height ) ; offscreenGfx = offscreenImg . getGraphics ( ) ; } offscreenGfx . setColor ( Color . black ) ; offscreenGfx . drawRect ( 0 , 0 , ( ( size . width ) - 1 ) , ( ( size . height ) - 1 ) ) ; offscreenGfx . drawImage ( image , 1 , 1 , this ) ; <START_BUG> offscreenGfx . setColor ( new Color ( 87 , 87 , 114 ) ) ; <END_BUG> offscreenGfx . fillRect ( 8 , 198 , ( ( 436 * ( progress ) ) // 7 ) , 16 ) ; g . drawImage ( offscreenImg , 0 , 0 , this ) ; notify ( ) ; } private Window win ; private Image image ; private Image offscreenImg ; private Graphics offscreenGfx ; private int progress ; }

Fix:
offscreenGfx . setColor ( new Color ( 225 , 225 , 239 ) ) ;
Buggy code:
public class ShopAppsFragment extends Fragment { private static final int MENU_ITEM_SEARCH_ID = 0 ; private ShopAppsFragment . OnFragmentInteractionListener mListener ; public static ShopAppsFragment newInstance ( ) { } public ShopAppsFragment ( ) { } @ Override public void onResume ( ) { } @ Override public View onCreateView ( LayoutInflater inflater , ViewGroup container , Bundle savedInstanceState ) { View view = inflater . inflate ( fragment_shop_apps , container , false ) ; Toolbar appBar = ( ( Toolbar ) ( view . findViewById ( appBar ) ) ) ; ( ( AppCompatActivity ) ( getActivity ( ) ) ) . setSupportActionBar ( appBar ) ; appBar . setNavigationIcon ( ic_menu_white ) ; appBar . setNavigationOnClickListener ( new View . OnClickListener ( ) { @ Override public void onClick ( View v ) { mListener . openDrawer ( ) ; } } ) ; getActivity ( ) . setTitle ( shopApps ) ; appBar . setTitleTextColor ( getResources ( ) . getColor ( appBarTitleTextColor ) ) ; List < Category > categoryList = DataUtils . getShopAppsData ( getActivity ( ) ) ; Category [ ] categoryArray = new Category [ categoryList . size ( ) ] ; categoryList . toArray ( categoryArray ) ; List < AppCategory > appCategoryList = DataUtils . getShopAppsCategories ( getActivity ( ) ) ; AppCategory [ ] appCategoryArray = new AppCategory [ appCategoryList . size ( ) ] ; appCategoryList . toArray ( appCategoryArray ) ; <START_BUG> ShopAppsListViewPagerAdapter adapter = new ShopAppsListViewPagerAdapter ( getActivity ( ) . getSupportFragmentManager ( ) , categoryArray , appCategoryArray ) ; <END_BUG> ViewPager viewPager = ( ( ViewPager ) ( view . findViewById ( shopAppsListViewPager ) ) ) ; viewPager . setAdapter ( adapter ) ; viewPager . setCurrentItem ( 1 ) ; TabLayout tabLayout = ( ( TabLayout ) ( view . findViewById ( shopAppsListTabLayout ) ) ) ; tabLayout . setupWithViewPager ( viewPager ) ; return view ; } @ Override public void onAttach ( Context activity ) { } @ Override public void onDetach ( ) { } @ Override public void onCreateOptionsMenu ( Menu menu , MenuInflater inflater ) { } @ Override public boolean onOptionsItemSelected ( MenuItem item ) { } public interface OnFragmentInteractionListener { void openDrawer ( ) { } void setDrawerItemChecked ( final int itemId ) { } } }

Fix:
ShopAppsListViewPagerAdapter adapter = new ShopAppsListViewPagerAdapter ( getChildFragmentManager ( ) , categoryArray , appCategoryArray ) ;
Buggy code:
public class EventTableGateway { private static final String TABLE_NAME = "event" ; private static final String COLUMN_EVENTID = "EventID" ; private static final String COLUMN_TITLE = "Title" ; private static final String COLUMN_DESCRIPTION = "Description" ; private static final String COLUMN_STARTDATE = "StartDate" ; private static final String COLUMN_TIME = "Time" ; private static final String COLUMN_ENDDATE = "EndDate" ; private static final String COLUMN_MAXCAPACITY = "MaxCapacity" ; private static final String COLUMN_PRICE = "Price" ; private Connection mConnection ; public EventTableGateway ( Connection connection ) { } public int insertEvent ( String t , String d , Date sd , Time tm , Date ed , int mc , double p ) throws SQLException { } public List < Event > getEvents ( ) throws SQLException { } boolean updateEvent ( Event e ) throws SQLException { } public boolean deleteEvent ( int eventID ) throws SQLException { String query ; PreparedStatement stmt ; int numRowsAffected ; <START_BUG> query = ( ( "DELETE<seq2seq4repair_space>FROM<seq2seq4repair_space>" + ( EventTableGateway . TABLE_NAME ) ) + "<seq2seq4repair_space>WHERE<seq2seq4repair_space>" ) + "<seq2seq4repair_space>=<seq2seq4repair_space>?<seq2seq4repair_space>" ; <END_BUG> stmt = mConnection . prepareStatement ( query ) ; stmt . setInt ( 1 , eventID ) ; numRowsAffected = stmt . executeUpdate ( ) ; return numRowsAffected == 1 ; } }

Fix:
query = ( ( ( "DELETE<seq2seq4repair_space>FROM<seq2seq4repair_space>" + ( EventTableGateway . TABLE_NAME ) ) + "<seq2seq4repair_space>WHERE<seq2seq4repair_space>" ) + ( EventTableGateway . COLUMN_EVENTID ) ) + "<seq2seq4repair_space>=<seq2seq4repair_space>?<seq2seq4repair_space>" ;
Buggy code:
public class GameView extends SurfaceView implements SurfaceHolder . Callback { private String LOG_TAG = GameView . class . getSimpleName ( ) ; private static final int MAP_HEIGHT_ZOOM_UP_RATE = 5 ; private static final int MAP_WEIGHT_ZOOM_UP_RATE = 5 ; private final CircleManager mCircleManager ; private final GameLogic mGameLogic ; private final Thread mGameThread ; private final SurfaceHolder mSurfaceHolder ; private final PlayerCircle mPlayerCircle ; private List < StaticCircle > mStaticCircles ; private List < MovableCircle > mMovableCircles ; private int mMapWidth ; private int mMapHeight ; private int mScreenWidth ; private int mScreenHeight ; private PointF mScreenCenter ; private String mGameDifficulty ; public GameView ( Context context , String gameDifficulty ) { } public PlayerCircle getmPlayerCircle ( ) { } public CircleManager getmCircleManager ( ) { } public float getScore ( ) { } public void pauseGame ( ) { } public void resumeGame ( ) { } @ Override protected void onDraw ( Canvas canvas ) { } private void drawText ( Canvas canvas ) { } private void drawCoordinateGrids ( Canvas canvas ) { } private void drawBorder ( Canvas canvas ) { } private void drawPlayerCircle ( Canvas canvas , Paint circlePaint ) { circlePaint . setColor ( BLACK ) ; <START_BUG> canvas . drawCircle ( mScreenCenter . x , mScreenCenter . y , mPlayerCircle . getmRadius ( ) , circlePaint ) ; <END_BUG> } private void drawStaticCircles ( Canvas canvas , Paint circlePaint ) { } private void drawAiCircles ( Canvas canvas , Paint circlePaint ) { } private void drawGameOverScene ( Canvas canvas ) { } @ Override public void surfaceCreated ( SurfaceHolder surfaceHolder ) { } @ Override public void surfaceChanged ( SurfaceHolder surfaceHolder , int i , int i2 , int i3 ) { } @ Override public void surfaceDestroyed ( SurfaceHolder surfaceHolder ) { } private float relativeScreenSize ( AbstractCircle circle ) { } private PointF relativePointDistance ( PointF point ) { } @ Override public boolean onTouchEvent ( MotionEvent event ) { } }

Fix:
canvas . drawCircle ( mScreenCenter . x , mScreenCenter . y , mPlayerCircle . getmPlayerOnScreenRadius ( ) , circlePaint ) ;
Buggy code:
public class PropPanelFeature extends PropPanelModelElement { protected UMLFeatureOwnerScopeCheckBox ownerScopeCheckbox ; protected UMLComboBox2 ownerComboBox ; private static UMLFeatureOwnerComboBoxModel featureOwnerComboBoxModel = new UMLFeatureOwnerComboBoxModel ( ) ; public PropPanelFeature ( String name , int columns ) { } public PropPanelFeature ( String name , ImageIcon icon , Orientation orientation ) { } public PropPanelFeature ( String name , ImageIcon icon , int columns ) { } private void initialize ( ) { <START_BUG> ownerScopeCheckbox = new UMLFeatureOwnerScopeCheckBox ( this ) ; <END_BUG> ownerComboBox = new UMLComboBox2 ( PropPanelFeature . featureOwnerComboBoxModel , ActionSetFeatureOwner . SINGLETON ) ; } }

Fix:
ownerScopeCheckbox = new UMLFeatureOwnerScopeCheckBox ( ) ;
Buggy code:
public class PhysiCloudClient { private Thread worker ; private volatile boolean stopRequested ; private Socket pcClient ; private ObjectOutputStream out ; private ObjectInputStream in ; private ConcurrentHashMap < String , Object > currentData ; public PhysiCloudClient ( ) { } public void kill ( ) { } @ SuppressWarnings ( "unchecked" ) private void getPCData ( ) { } private void connectToPhysiCloud ( ) { } @ Deprecated public Double [ ] pullData ( ) { } @ Deprecated public void cmd ( Object cmd ) { } @ SuppressWarnings ( "unchecked" ) public double [ ] getData ( String id ) { double [ ] data = new double [ 3 ] ; if ( ( currentData ) != null ) { if ( currentData . containsKey ( id ) ) { <START_BUG> Vector < Long > robotState = ( ( Vector < Long > ) ( currentData . get ( id ) ) ) ; <END_BUG> data [ 0 ] = ( ( double ) ( robotState . get ( 0 ) . doubleValue ( ) ) ) ; data [ 1 ] = ( ( double ) ( robotState . get ( 1 ) . doubleValue ( ) ) ) ; data [ 2 ] = ( ( double ) ( robotState . get ( 2 ) . doubleValue ( ) ) ) ; } else { System . out . println ( "Error:<seq2seq4repair_space>Robot<seq2seq4repair_space>with<seq2seq4repair_space>that<seq2seq4repair_space>ID<seq2seq4repair_space>does<seq2seq4repair_space>not<seq2seq4repair_space>exist" ) ; } } return data ; } public void goTo ( String [ ] robotIds , Double [ ] xVals , Double [ ] yVals ) { } public void stop ( ) { } public void stop ( String [ ] robotIds ) { } No newline ; at end ; of file ; }

Fix:
Vector < Double > robotState = ( ( Vector < Double > ) ( currentData . get ( id ) ) ) ;
Buggy code:
public class SimpleJettyServer extends AbstractHandler { public void handle ( String target , Request baseRequest , HttpServletRequest request , HttpServletResponse response ) throws IOException , ServletException { } public static void main ( String [ ] args ) throws Exception { <START_BUG> Server server = new Server ( 8080 ) ; <END_BUG> server . setHandler ( new SimpleJettyServer ( ) ) ; server . start ( ) ; server . join ( ) ; } No newline ; at end ; of file ; }

Fix:
Server server = new Server ( 6660 ) ;
Buggy code:
public class AnnotationMethodDeclaration extends MethodDeclaration { public Expression defaultValue ; public int extendedDimensions ; public AnnotationMethodDeclaration ( CompilationResult compilationResult ) { } public void parseStatements ( Parser parser , CompilationUnitDeclaration unit ) { } public void resolveStatements ( ) { super . resolveStatements ( ) ; TypeBinding returnTypeBinding = this . binding . returnType ; if ( returnTypeBinding != null ) { checkAnnotationMethodType : { TypeBinding leafReturnType = returnTypeBinding . leafComponentType ( ) ; switch ( leafReturnType . erasure ( ) . id ) { case TypeIds . T_byte : case TypeIds . T_short : case TypeIds . T_char : case TypeIds . T_int : case TypeIds . T_long : case TypeIds . T_float : case TypeIds . T_double : case TypeIds . T_boolean : case TypeIds . T_JavaLangString : case TypeIds . T_JavaLangClass : break checkAnnotationMethodType ; } if ( leafReturnType . isEnum ( ) ) break checkAnnotationMethodType ; if ( leafReturnType . isAnnotationType ( ) ) { scope . classScope ( ) . detectAnnotationCycle ( scope . enclosingSourceType ( ) , leafReturnType , this . returnType ) ; break checkAnnotationMethodType ; } <START_BUG> scope . problemReporter ( ) . invalidAnnotationMethodType ( this ) ; <END_BUG> } } if ( ( this . extendedDimensions ) != 0 ) { scope . problemReporter ( ) . illegalExtendedDimensions ( this ) ; } } public void traverse ( ASTVisitor visitor , ClassScope classScope ) { } }

Fix:
scope . problemReporter ( ) . invalidAnnotationMemberType ( this ) ;
Buggy code:
public class TownPresenter extends Presenter implements TurnEndListener { @ Inject DefaultTurnService turnService ; @ Override public void initialize ( ) { } public void handleMuleClick ( ActionEvent event ) { } public void handleMapClick ( ActionEvent event ) { } public void handleStoreClick ( ActionEvent event ) { } private MapPresenter returnToMapUninitialized ( ) { } public void handlePubClick ( ActionEvent event ) { } @ Override public void onTurnEnd ( Player player ) { <START_BUG> Platform . runLater ( ( ) -> returnToMapUninitialized ( ) . initialize ( ) ) ; <END_BUG> } }

Fix:
Platform . runLater ( ( ) -> context . showScreen ( "map_grid.fxml" ) ) ;
Buggy code:
public class BinaryMemtable { private static Logger logger_ = Logger . getLogger ( Memtable . class ) ; private int threshold_ = ( ( DatabaseDescriptor . getBMTThreshold ( ) ) * 1024 ) * 1024 ; private AtomicInteger currentSize_ = new AtomicInteger ( 0 ) ; private String table_ ; private String cfName_ ; private boolean isFrozen_ = false ; private Map < String , byte [ ] > columnFamilies_ = new org . cliffc . high_scale_lib . NonBlockingHashMap < String , byte [ ] > ( ) ; Lock lock_ = new ReentrantLock ( ) ; Condition condition_ ; BinaryMemtable ( String table , String cfName ) throws IOException { } public int getMemtableThreshold ( ) { } void resolveSize ( int oldSize , int newSize ) { } boolean isThresholdViolated ( ) { } String getColumnFamily ( ) { } void put ( String key , byte [ ] buffer ) throws IOException { } private void resolve ( String key , byte [ ] buffer ) { } void flush ( ) throws IOException { if ( ( columnFamilies_ . size ( ) ) == 0 ) return ; String path ; SSTableWriter writer ; ColumnFamilyStore cfStore = Table . open ( table_ ) . getColumnFamilyStore ( cfName_ ) ; List < String > keys = new ArrayList < String > ( columnFamilies_ . keySet ( ) ) ; lock_ . lock ( ) ; try { path = cfStore . getTempSSTablePath ( ) ; writer = new SSTableWriter ( path , keys . size ( ) , StorageService . getPartitioner ( ) ) ; } finally { lock_ . unlock ( ) ; } final IPartitioner partitioner = StorageService . getPartitioner ( ) ; final Comparator < String > dc = partitioner . getDecoratedKeyComparator ( ) ; Collections . sort ( keys , dc ) ; for ( String key : keys ) { byte [ ] bytes = columnFamilies_ . get ( key ) ; if ( ( bytes . length ) > 0 ) { writer . append ( key , bytes ) ; } } <START_BUG> cfStore . storeLocation ( writer . closeAndOpenReader ( ) ) ; <END_BUG> columnFamilies_ . clear ( ) ; } }

Fix:
cfStore . addSSTable ( writer . closeAndOpenReader ( ) ) ;
Buggy code:
public class UploadApplication extends WicketExampleApplication { public UploadApplication ( ) { } protected void init ( ) { <START_BUG> getExceptionSettings ( ) . setThrowExceptionOnMissingResource ( false ) ; <END_BUG> } public Class getHomePage ( ) { } protected WebRequest newWebRequest ( HttpServletRequest servletRequest ) { } }

Fix:
getResourceSettings ( ) . setThrowExceptionOnMissingResource ( false ) ;
Buggy code:
public class LocationPacket { private static final Logger logger = Logger . getLogger ( MySQLConnection . class . getName ( ) ) ; private int playerId ; private int matchId ; private Date date ; private double latitude ; private double longitude ; public LocationPacket ( int playerId , int matchId , Date date , double latitude , double longitude ) { } public String toString ( ) { } public static LocationPacket parsePacket ( String packet ) { <START_BUG> String [ ] lines = packet . split ( "<seq2seq4repair_space>" ) ; <END_BUG> try { int playerId = Integer . parseInt ( lines [ 0 ] ) ; int matchId = Integer . parseInt ( lines [ 1 ] ) ; int timestamp = Integer . parseInt ( lines [ 2 ] ) ; double latitude = Double . parseDouble ( lines [ 3 ] ) ; double longitude = Double . parseDouble ( lines [ 4 ] ) ; Date date = new Date ( ) ; date . setTime ( timestamp ) ; return new LocationPacket ( playerId , matchId , date , latitude , longitude ) ; } catch ( Exception ex ) { LocationPacket . logger . log ( Level . WARNING , ( "Could<seq2seq4repair_space>not<seq2seq4repair_space>parse<seq2seq4repair_space>input<seq2seq4repair_space>packet:\n" + packet ) , ex ) ; return null ; } } public double getLatitude ( ) { } private void setLatitude ( double latitude ) { } public double getLongitude ( ) { } public void setLongitude ( double longitude ) { } public int getMatchId ( ) { } public void setMatchId ( int matchId ) { } public int getPlayerId ( ) { } public void setPlayerId ( int playerId ) { } public Date getDate ( ) { } public void setDate ( Date date ) { } }

Fix:
String [ ] lines = packet . split ( "\n" ) ;
Buggy code:
public class VersionedExtension1 extends VersionedExtensionCommon { private static final PathElement ORIGINAL = PathElement . pathElement ( "element" , "renamed" ) ; private static final SubsystemInitialization TEST_SUBSYSTEM = new SubsystemInitialization ( SUBSYSTEM_NAME , false ) ; @ Override public void initialize ( final ExtensionContext context ) { final SubsystemInitialization . RegistrationResult result = VersionedExtension1 . TEST_SUBSYSTEM . initializeSubsystem ( context , ModelVersion . create ( 1 , 0 , 0 ) ) ; final ManagementResourceRegistration registration = result . getResourceRegistration ( ) ; registration . registerSubModel ( createResourceDefinition ( VersionedExtension1 . ORIGINAL ) ) ; registration . registerOperationHandler ( "test" , new OperationStepHandler ( ) { @ Override public void execute ( OperationContext context , ModelNode operation ) throws OperationFailedException { context . getResult ( ) . set ( true ) ; <START_BUG> context . completeStep ( ) ; <END_BUG> } } , DESCRIPTION_PROVIDER , false , PUBLIC , EnumSet . of ( READ_ONLY ) ) ; } @ Override public void initializeParsers ( ExtensionParsingContext context ) { } }

Fix:
context . stepCompleted ( ) ;
Buggy code:
public class ShellExec { private String cluster_shell ; private String original_shell ; private ArrayList < String > paras ; public ShellExec ( ) { } public Boolean setParas ( ArrayList < String > p ) { } public Boolean execCluster ( ) { } public Boolean execOriginal ( ) { } private Boolean execCommand ( String shell ) { try { String args = "" ; for ( String str : paras ) { <START_BUG> args += "<seq2seq4repair_space>" + str ; <END_BUG> } System . out . println ( ( ( "sh<seq2seq4repair_space>" + shell ) + args ) ) ; Process p = Runtime . getRuntime ( ) . exec ( ( ( "sh<seq2seq4repair_space>" + shell ) + args ) ) ; } catch ( IOException e ) { e . printStackTrace ( ) ; return false ; } return true ; } }

Fix:
args += "<seq2seq4repair_space>" + ( str . replace ( "<seq2seq4repair_space>" , "\"<seq2seq4repair_space>\"" ) ) ;
Buggy code:
public class Tile { public static final float WIDTH = 1 ; public static final float HEIGHT = 1 ; private TileType type ; private Vector2 position ; private boolean hasBuilding ( ) { } private Building building ; public Tile ( Vector2 position , TileType type , Scene scene ) { } public void build ( Building b ) { } public void removeBuilding ( ) { } public TileType getType ( ) { } public boolean isWalkable ( ) { <START_BUG> return ( type . isWalkable ( ) ) && ( ! ( hasBuilding ) ) ; <END_BUG> } public void draw ( SpriteBatch batch ) { } public Building getBuilding ( ) { } }

Fix:
return ( type . isWalkable ( ) ) && ( ! ( hasBuilding ( ) ) ) ;