nus-yam/ex-repair huggingface dataset:
Buggy code:
public class StorageModuleTabletItem extends Item implements IEnergyContainerItem { private int capacity ; private int maxReceive ; private int maxExtract ; private IIcon iconFull ; private IIcon iconEmpty ; public static final int DAMAGE_EMPTY = 0 ; public static final int DAMAGE_FULL = 1 ; public StorageModuleTabletItem ( ) { } @ Override public int getMaxItemUseDuration ( ItemStack stack ) { } @ Override public void registerIcons ( IIconRegister iconRegister ) { } @ Override @ SideOnly ( Side . CLIENT ) public IIcon getIconFromDamage ( int damage ) { } @ Override public ItemStack onItemRightClick ( ItemStack stack , World world , EntityPlayer player ) { } @ Override public boolean hasContainerItem ( ItemStack stack ) { } @ Override public Item getContainerItem ( ) { } @ Override public ItemStack getContainerItem ( ItemStack stack ) { <START_BUG> if ( hasContainerItem ( stack ) ) { <END_BUG> NBTTagCompound tagCompound = new NBTTagCompound ( ) ; tagCompound . setInteger ( "Energy" , stack . getTagCompound ( ) . getInteger ( "Energy" ) ) ; ItemStack container = new ItemStack ( getContainerItem ( ) ) ; container . setTagCompound ( tagCompound ) ; return container ; } return null ; } @ Override public void addInformation ( ItemStack itemStack , EntityPlayer player , List list , boolean whatIsThis ) { } @ Override public int receiveEnergy ( ItemStack container , int maxReceive , boolean simulate ) { } @ Override public int extractEnergy ( ItemStack container , int maxExtract , boolean simulate ) { } @ Override public int getEnergyStored ( ItemStack container ) { } @ Override public int getMaxEnergyStored ( ItemStack container ) { } }

Fix:
if ( ( hasContainerItem ( stack ) ) && ( stack . hasTagCompound ( ) ) ) {
Buggy code:
public class ExtensibleApply implements ContextCurriedFunction < VarArgFunction < Object , Object > > { @ Override public VarArgFunction < Object , Object > apply ( @ Nonnull final Context context ) { return new VarArgFunction < Object , Object > ( ) { @ Override public Object apply ( @ Nonnull List < Object > args ) { Preconditions . checkArgument ( ( ( args . size ( ) ) >= 1 ) , "Apply<seq2seq4repair_space>takes<seq2seq4repair_space>one<seq2seq4repair_space>or<seq2seq4repair_space>more<seq2seq4repair_space>arguments" ) ; Function < List < Object > , ? > function = convertToFunction ( args . get ( 0 ) ) ; return function . apply ( args . subList ( 1 , args . size ( ) ) ) ; } private Function < List < Object > , ? > convertToFunction ( Object f ) { final ToFunction toFunction = context . getServices ( ) . getInstance ( ToFunction . class ) ; if ( ! ( toFunction . isDefinedAt ( f ) ) ) { <START_BUG> throw new IllegalArgumentException ( "Input<seq2seq4repair_space>is<seq2seq4repair_space>not<seq2seq4repair_space>convertible<seq2seq4repair_space>to<seq2seq4repair_space>function" ) ; <END_BUG> } return toFunction . apply ( f ) ; } @ Override public String toString ( ) { return "applyExt" ; } } ; } @ Override public String toString ( ) { } }

Fix:
throw new IllegalArgumentException ( ( "Cannot<seq2seq4repair_space>convert<seq2seq4repair_space>to<seq2seq4repair_space>function<seq2seq4repair_space>" + f ) ) ;
Buggy code:
public class BootStrapper { private static final Logger logger = LoggerFactory . getLogger ( BootStrapper . class ) ; protected final InetAddress address ; protected final Token token ; protected final TokenMetadata tokenMetadata ; public BootStrapper ( InetAddress address , Token token , TokenMetadata tmd ) { } public void startBootstrap ( ) throws IOException { } public static Token getBootstrapToken ( final TokenMetadata metadata , final Map < InetAddress , Double > load ) throws IOException { } public static Token getBalancedToken ( TokenMetadata metadata , Map < InetAddress , Double > load ) { } static InetAddress getBootstrapSource ( final TokenMetadata metadata , final Map < InetAddress , Double > load ) { } Multimap < Range , InetAddress > getRangesWithSources ( String table ) { assert ( tokenMetadata . sortedTokens ( ) . size ( ) ) > 0 ; final AbstractReplicationStrategy strat = instance . getReplicationStrategy ( table ) ; Collection < Range > myRanges = strat . getPendingAddressRanges ( tokenMetadata , token , address , table ) ; Multimap < Range , InetAddress > myRangeAddresses = ArrayListMultimap . create ( ) ; Multimap < Range , InetAddress > rangeAddresses = strat . getRangeAddresses ( tokenMetadata , table ) ; for ( Range myRange : myRanges ) { for ( Range range : rangeAddresses . keySet ( ) ) { if ( range . contains ( myRange ) ) { <START_BUG> List < InetAddress > preferred = DatabaseDescriptor . getEndPointSnitch ( ) . getSortedListByProximity ( address , rangeAddresses . get ( range ) ) ; <END_BUG> myRangeAddresses . putAll ( myRange , preferred ) ; break ; } } assert myRangeAddresses . keySet ( ) . contains ( myRange ) ; } return myRangeAddresses ; } private static Token < ? > getBootstrapTokenFrom ( InetAddress maxEndpoint ) { } static Multimap < InetAddress , Range > getWorkMap ( Multimap < Range , InetAddress > rangesWithSourceTarget ) { } static Multimap < InetAddress , Range > getWorkMap ( Multimap < Range , InetAddress > rangesWithSourceTarget , IFailureDetector failureDetector ) { } public static class BootstrapTokenVerbHandler implements IVerbHandler { public void doVerb ( Message message ) { } } private static class BootstrapTokenCallback implements IAsyncCallback { private volatile Token < ? > token ; private final Condition condition = new SimpleCondition ( ) ; public Token < ? > getToken ( ) { } public void response ( Message msg ) { } } }

Fix:
List < InetAddress > preferred = DatabaseDescriptor . getEndpointSnitch ( ) . getSortedListByProximity ( address , rangeAddresses . get ( range ) ) ;
Buggy code:
public class CacheFactoryRemove extends AbstractRemoveStepHandler { private final CacheFactoryAdd addHandler ; CacheFactoryRemove ( CacheFactoryAdd addHandler ) { } @ Override protected void performRuntime ( OperationContext context , ModelNode operation , ModelNode model ) throws OperationFailedException { } @ Override protected void recoverServices ( OperationContext context , ModelNode operation , ModelNode model ) throws OperationFailedException { if ( context . isResourceServiceRestartAllowed ( ) ) { <START_BUG> this . addHandler . installRuntimeServices ( context , model , null ) ; <END_BUG> } else { context . revertReloadRequired ( ) ; } } void removeRuntimeService ( OperationContext context , ModelNode operation ) { } }

Fix:
this . addHandler . installRuntimeServices ( context , operation , model , null ) ;
Buggy code:
public class LoopingAlphabetStream extends InputStream { private static final int MAX_BUF_SIZE = 32 * 1024 ; private static final byte SPACE = ( ( byte ) ( '<seq2seq4repair_space>' ) ) ; private final long length ; private final int trailingBlanks ; private long remainingBlanks ; private long remainingNonBlanks ; private byte [ ] buffer = new byte [ 0 ] ; private final ByteAlphabet alphabet ; public LoopingAlphabetStream ( long length ) { } public LoopingAlphabetStream ( long length , int trailingBlanks ) { } public LoopingAlphabetStream ( long length , ByteAlphabet alphabet ) { } public LoopingAlphabetStream ( long length , ByteAlphabet alphabet , int trailingBlanks ) { } public int read ( ) { } public int read ( byte [ ] buf , int off , int length ) { if ( ( ( remainingBlanks ) <= 0 ) && ( ( remainingNonBlanks ) <= 0 ) ) { return - 1 ; } <START_BUG> int nonBlankLength = Math . min ( ( ( int ) ( remainingNonBlanks ) ) , length ) ; <END_BUG> fillBuffer ( nonBlankLength ) ; int read = 0 ; int bOff = alphabet . nextByteToRead ( 0 ) ; if ( nonBlankLength <= ( ( buffer . length ) - bOff ) ) { System . arraycopy ( buffer , bOff , buf , off , nonBlankLength ) ; remainingNonBlanks -= nonBlankLength ; read = nonBlankLength ; alphabet . nextByteToRead ( nonBlankLength ) ; } else { int toRead = 0 ; while ( ( ( remainingNonBlanks ) > 0 ) && ( read < nonBlankLength ) ) { bOff = alphabet . nextByteToRead ( toRead ) ; toRead = Math . min ( ( ( buffer . length ) - bOff ) , ( nonBlankLength - read ) ) ; System . arraycopy ( buffer , bOff , buf , ( off + read ) , toRead ) ; remainingNonBlanks -= toRead ; read += toRead ; } bOff = alphabet . nextByteToRead ( toRead ) ; } if ( ( read < length ) && ( ( remainingBlanks ) > 0 ) ) { read += fillBlanks ( buf , ( off + read ) , ( length - read ) ) ; } return read ; } public void reset ( ) { } public int available ( ) { } private void fillBuffer ( int bufSize ) { } private int fillBlanks ( byte [ ] buf , int off , int length ) { } }

Fix:
int nonBlankLength = ( ( int ) ( Math . min ( remainingNonBlanks , ( ( long ) ( length ) ) ) ) ) ;
Buggy code:
public class MarkCommand extends TaskRestorableCommand { public MarkCommand ( TasmaUserInterface userInterface , TaskCollection collection , List < Task > state , int index ) { } @ Override public void execute ( ) throws Exception { task . setDone ( true ) ; collection . update ( task ) ; <START_BUG> userInterface . displayMessage ( String . format ( COMMAND_MARK_SUCCESS ) ) ; <END_BUG> ListCommand listCommand = new ListCommand ( userInterface , collection , state ) ; listCommand . execute ( ) ; } }

Fix:
userInterface . displayMessage ( String . format ( COMMAND_MARK_SUCCESS , task . getDetails ( ) ) ) ;
Buggy code:
public class OpOr extends LogicalOp { public OpOr ( XQueryContext context ) { } public Sequence eval ( Sequence contextSequence , Item contextItem ) throws XPathException { if ( context . getProfiler ( ) . isEnabled ( ) ) { context . getProfiler ( ) . start ( this ) ; context . getProfiler ( ) . message ( this , DEPENDENCIES , "DEPENDENCIES" , Dependency . getDependenciesName ( this . getDependencies ( ) ) ) ; if ( contextSequence != null ) { context . getProfiler ( ) . message ( this , START_SEQUENCES , "CONTEXT<seq2seq4repair_space>SEQUENCE" , contextSequence ) ; } if ( contextItem != null ) { context . getProfiler ( ) . message ( this , START_SEQUENCES , "CONTEXT<seq2seq4repair_space>ITEM" , contextItem . toSequence ( ) ) ; } } if ( ( getLength ( ) ) == 0 ) { return Sequence . EMPTY_SEQUENCE ; } if ( contextItem != null ) { contextSequence = contextItem . toSequence ( ) ; } boolean doOptimize = optimize ; if ( ( contextSequence != null ) && ( ! ( contextSequence . isPersistentSet ( ) ) ) ) { doOptimize = false ; } Sequence result ; final Expression left = getLeft ( ) ; final Expression right = getRight ( ) ; final Sequence ls = left . eval ( contextSequence , null ) ; doOptimize = doOptimize && ( ( ls . isPersistentSet ( ) ) || ( ls . isEmpty ( ) ) ) ; if ( doOptimize ) { final Sequence rs = right . eval ( contextSequence , null ) ; <START_BUG> if ( rs . isPersistentSet ( ) ) { <END_BUG> NodeSet rl = ls . toNodeSet ( ) ; rl = rl . getContextNodes ( contextId ) ; NodeSet rr = rs . toNodeSet ( ) ; rr = rr . getContextNodes ( contextId ) ; result = rl . union ( rr ) ; if ( ( ( getParent ( ) ) instanceof EnclosedExpr ) || ( ( ( getParent ( ) ) != null ) && ( ( getParent ( ) . getParent ( ) ) == null ) ) ) { result = ( result . isEmpty ( ) ) ? BooleanValue . FALSE : BooleanValue . TRUE ; } } else { final boolean rl = ls . effectiveBooleanValue ( ) ; if ( rl ) { result = BooleanValue . TRUE ; } else { final boolean rr = rs . effectiveBooleanValue ( ) ; result = ( rl || rr ) ? BooleanValue . TRUE : BooleanValue . FALSE ; } } } else { final boolean rl = ls . effectiveBooleanValue ( ) ; if ( rl ) { result = BooleanValue . TRUE ; } else { final Sequence rs = right . eval ( contextSequence , null ) ; final boolean rr = rs . effectiveBooleanValue ( ) ; result = ( rl || rr ) ? BooleanValue . TRUE : BooleanValue . FALSE ; } } if ( context . getProfiler ( ) . isEnabled ( ) ) { context . getProfiler ( ) . end ( this , "" , result ) ; } return result ; } public void accept ( ExpressionVisitor visitor ) { } public void dump ( ExpressionDumper dumper ) { } public String toString ( ) { } }

Fix:
if ( ( rs . isPersistentSet ( ) ) || ( rs . isEmpty ( ) ) ) {
Buggy code:
public class DailyRollingFileAppender extends FileAppender { static final TimeZone GMT_TIMEZONE = TimeZone . getTimeZone ( "GMT" ) ; private String datePattern = ".yyyy-MM-dd" ; private String scheduledFilename ; private long nextCheck = ( System . currentTimeMillis ( ) ) - 1 ; Date now = new Date ( ) ; SimpleDateFormat sdf ; RollingCalendar rc = new RollingCalendar ( ) ; public DailyRollingFileAppender ( ) { } public DailyRollingFileAppender ( Layout layout , String filename , String datePattern ) throws IOException { } public void setDatePattern ( String pattern ) { } public String getDatePattern ( ) { } public void activateOptions ( ) { } public void rollOver ( ) throws IOException { if ( ( datePattern ) == null ) { errorHandler . error ( "Missing<seq2seq4repair_space>DatePattern<seq2seq4repair_space>option<seq2seq4repair_space>in<seq2seq4repair_space>rollOver()." ) ; return ; } String datedFilename = ( fileName ) + ( sdf . format ( now ) ) ; if ( scheduledFilename . equals ( datedFilename ) ) { return ; } <START_BUG> this . closeFile ( ) ; <END_BUG> File target = new File ( scheduledFilename ) ; if ( target . exists ( ) ) { target . delete ( ) ; } File file = new File ( fileName ) ; boolean result = file . renameTo ( target ) ; if ( result ) { LogLog . debug ( ( ( ( fileName ) + "<seq2seq4repair_space>-><seq2seq4repair_space>" ) + ( scheduledFilename ) ) ) ; } else { LogLog . error ( ( ( ( ( "Failed<seq2seq4repair_space>to<seq2seq4repair_space>rename<seq2seq4repair_space>[" + ( fileName ) ) + "]<seq2seq4repair_space>to<seq2seq4repair_space>[" ) + ( scheduledFilename ) ) + "]." ) ) ; } try { this . setFile ( fileName , false , this . bufferedIO , this . bufferSize ) ; } catch ( IOException e ) { errorHandler . error ( ( ( "setFile(" + ( fileName ) ) + ",<seq2seq4repair_space>false)<seq2seq4repair_space>call<seq2seq4repair_space>failed." ) ) ; } scheduledFilename = datedFilename ; } protected void subAppend ( LoggingEvent event ) { } }

Fix:
this . closeWriter ( ) ;
Buggy code:
@ Component public class MySqlDao { static final String JDBC_DRIVER = "com.mysql.jdbc.Driver" ; static final String DB_URL = "jdbc:mysql:////localhost//dhtmonitor" ; static final String USER = "root" ; static final String PASS = "Jazz4Bass!" ; private Statement stmt = null ; private Connection getConnection ( ) { } public boolean saveDht ( Dht dht ) { } public ArrayList < Dht > getLastByCount ( int count ) { ArrayList < Dht > d = new ArrayList < > ( ) ; Connection conn = getConnection ( ) ; try { Statement stmt = conn . createStatement ( ) ; <START_BUG> ResultSet rs = stmt . executeQuery ( "SELECT<seq2seq4repair_space>temperature,<seq2seq4repair_space>humidity,<seq2seq4repair_space>serverts<seq2seq4repair_space>from<seq2seq4repair_space>dhtmonitor.dht<seq2seq4repair_space>order<seq2seq4repair_space>by<seq2seq4repair_space>id;" ) ; <END_BUG> int i = 0 ; while ( ( rs . next ( ) ) && ( i < count ) ) { Dht dht = new Dht ( rs . getFloat ( 1 ) , rs . getFloat ( 2 ) , rs . getLong ( 3 ) ) ; d . add ( dht ) ; i ++ ; } } catch ( Exception exp ) { System . out . println ( ( ( ( "Error<seq2seq4repair_space>getting<seq2seq4repair_space>data." + ( exp . toString ( ) ) ) + ":<seq2seq4repair_space>" ) + ( exp . getMessage ( ) ) ) ) ; } finally { try { conn . close ( ) ; } catch ( Exception exp ) { System . out . println ( "Error<seq2seq4repair_space>closing<seq2seq4repair_space>database<seq2seq4repair_space>connection." ) ; } } return d ; } public ArrayList < Dht > getLastBySeconds ( int seconds ) { } }

Fix:
ResultSet rs = stmt . executeQuery ( "SELECT<seq2seq4repair_space>temperature,<seq2seq4repair_space>humidity,<seq2seq4repair_space>serverts<seq2seq4repair_space>from<seq2seq4repair_space>dhtmonitor.dht<seq2seq4repair_space>order<seq2seq4repair_space>by<seq2seq4repair_space>id<seq2seq4repair_space>desc;" ) ;
Buggy code:
public class StandardWebSocketSessionAdapter extends AbstractWebSocketSesssionAdapter < Session > { private Session session ; private URI uri ; private String remoteHostName ; private String remoteAddress ; @ Override public void initSession ( Session session ) { <START_BUG> Assert . notNull ( session , "session<seq2seq4repair_space>must<seq2seq4repair_space>not<seq2seq4repair_space>be<seq2seq4repair_space>null" ) ; <END_BUG> this . session = session ; } @ Override public String getId ( ) { } @ Override public URI getUri ( ) { } @ Override public void setUri ( URI uri ) { } @ Override public boolean isSecure ( ) { } @ Override public Principal getPrincipal ( ) { } @ Override public void setPrincipal ( Principal principal ) { } @ Override public String getRemoteHostName ( ) { } @ Override public void setRemoteHostName ( String name ) { } @ Override public String getRemoteAddress ( ) { } @ Override public void setRemoteAddress ( String address ) { } @ Override public boolean isOpen ( ) { } @ Override protected void sendTextMessage ( TextMessage message ) throws IOException { } @ Override protected void sendBinaryMessage ( BinaryMessage message ) throws IOException { } @ Override protected void closeInternal ( CloseStatus status ) throws IOException { } }

Fix:
Assert . notNull ( session , "session<seq2seq4repair_space>is<seq2seq4repair_space>required" ) ;
Buggy code:
public class SaveMessageCommand extends FolderCommand { protected Folder folder ; protected HeaderInterface [ ] headerList = new HeaderInterface [ 1 ] ; public SaveMessageCommand ( DefaultCommandReference [ ] references ) { } public void updateGUI ( ) throws Exception { } public void execute ( Worker worker ) throws Exception { ComposerCommandReference [ ] r = ( ( ComposerCommandReference [ ] ) ( getReferences ( ) ) ) ; ComposerController composerController = r [ 0 ] . getComposerController ( ) ; AccountItem item = ( ( ComposerModel ) ( composerController . getModel ( ) ) ) . getAccountItem ( ) ; SendableMessage message = ( ( SendableMessage ) ( r [ 0 ] . getMessage ( ) ) ) ; if ( message == null ) { message = new MessageComposer ( ( ( ComposerModel ) ( composerController . getModel ( ) ) ) ) . compose ( worker ) ; } folder = ( ( Folder ) ( r [ 0 ] . getFolder ( ) ) ) ; if ( ( folder . getUid ( ) ) == 103 ) { Object uid = folder . addMessage ( message ) ; } else { <START_BUG> Object uid = folder . addMessage ( message . getStringSource ( ) ) ; <END_BUG> } } }

Fix:
Object uid = folder . addMessage ( message . getSourceStream ( ) ) ;
Buggy code:
public class AnyURIDV extends TypeValidator { private static URI BASE_URI = null ; public short getAllowedFacets ( ) { } public Object getActualValue ( String content , ValidationContext context ) throws InvalidDatatypeValueException { try { if ( ( content . length ( ) ) != 0 ) { new URI ( AnyURIDV . BASE_URI , content ) ; } } catch ( URI ex ) { <START_BUG> throw new InvalidDatatypeValueException ( ( ( "Value<seq2seq4repair_space>'" + content ) + "'<seq2seq4repair_space>is<seq2seq4repair_space>a<seq2seq4repair_space>Malformed<seq2seq4repair_space>URI" ) ) ; <END_BUG> } return content ; } }

Fix:
throw new InvalidDatatypeValueException ( "cvc-datatype-valid.1.2.1" , new Object [ ] { content , "anyURI" } ) ;
Buggy code:
public class LoginActivity extends BaseActivity { private static final String TAG = "LoginActivity" ; public static final int REQUEST_CODE_SETNICK = 1 ; private EditText usernameEditText ; private EditText passwordEditText ; private boolean progressShow ; private boolean autoLogin = false ; private String currentUsername ; private String currentPassword ; @ Override protected void onCreate ( Bundle savedInstanceState ) { super . onCreate ( savedInstanceState ) ; if ( ( DemoHXSDKHelper . getInstance ( ) . isLogined ( ) ) && ( SkyUserManager . getInstances ( ) . isAllowHxAutoLogin ( ) ) ) { autoLogin = true ; startActivity ( new Intent ( this , MainActivity . class ) ) ; return ; } setContentView ( activity_login ) ; usernameEditText = ( ( EditText ) ( findViewById ( username ) ) ) ; passwordEditText = ( ( EditText ) ( findViewById ( password ) ) ) ; usernameEditText . addTextChangedListener ( new TextWatcher ( ) { @ Override public void onTextChanged ( CharSequence s , int start , int before , int count ) { } @ Override public void beforeTextChanged ( CharSequence s , int start , int count , int after ) { } @ Override public void afterTextChanged ( Editable s ) { } } ) ; if ( ( DemoApplication . getInstance ( ) . getUserName ( ) ) != null ) { usernameEditText . setText ( DemoApplication . getInstance ( ) . getUserName ( ) ) ; } usernameEditText . setText ( SkyUserManager . getInstances ( ) . getUserName ( ) ) ; passwordEditText . setText ( SkyUserManager . getInstances ( ) . getPassword ( ) ) ; if ( ( getIntent ( ) . getStringExtra ( IntentKey ) ) != null ) { currentUsername = usernameEditText . getText ( ) . toString ( ) . trim ( ) ; currentPassword = passwordEditText . getText ( ) . toString ( ) . trim ( ) ; if ( ( ! ( TextUtils . isEmpty ( currentUsername ) ) ) && ( ! ( TextUtils . isEmpty ( currentPassword ) ) ) ) { login ( null ) ; } else { <START_BUG> if ( BuildConfig . DEBUG ) { <END_BUG> usernameEditText . setText ( "zhongqi.chen" ) ; passwordEditText . setText ( "Pass1234" ) ; } } } } public void login ( View view ) { } private String hxUserName ; private String hxPassword ; protected void hxLogin ( final ProgressDialog pd ) { } private void initializeContacts ( ) { } public void register ( View view ) { } @ Override protected void onResume ( ) { } }

Fix:
if ( ( AndroidUtil . isTestService ( this ) ) || ( BuildConfig . DEBUG ) ) {
Buggy code:
pw . println ( "library<seq2seq4repair_space>IEEE;" ) ; pw . println ( "use<seq2seq4repair_space>IEEE.STD_LOGIC_1164.ALL;" ) ; pw . println ( "use<seq2seq4repair_space>IEEE.STD_LOGIC_ARITH.ALL;" ) ; pw . println ( "use<seq2seq4repair_space>IEEE.STD_LOGIC_UNSIGNED.ALL;" ) ; pw . println ( ) ; pw . println ( ( ( "entity<seq2seq4repair_space>" + modName ) + "_comm<seq2seq4repair_space>is" ) ) ; pw . println ( "<seq2seq4repair_space>port<seq2seq4repair_space>(" ) ; pw . println ( "<seq2seq4repair_space>mclk<seq2seq4repair_space>:<seq2seq4repair_space>in<seq2seq4repair_space>std_logic<seq2seq4repair_space>;" ) ; pw . println ( "<seq2seq4repair_space>pdb<seq2seq4repair_space>:<seq2seq4repair_space>inout<seq2seq4repair_space>std_logic_vector<seq2seq4repair_space>(7<seq2seq4repair_space>downto<seq2seq4repair_space>0)<seq2seq4repair_space>;" ) ; pw . println ( "<seq2seq4repair_space>astb<seq2seq4repair_space>:<seq2seq4repair_space>in<seq2seq4repair_space>std_logic<seq2seq4repair_space>;" ) ; pw . println ( "<seq2seq4repair_space>dstb<seq2seq4repair_space>:<seq2seq4repair_space>in<seq2seq4repair_space>std_logic<seq2seq4repair_space>;" ) ; pw . println ( "<seq2seq4repair_space>pwr<seq2seq4repair_space>:<seq2seq4repair_space>in<seq2seq4repair_space>std_logic<seq2seq4repair_space>;" ) ; pw . print ( "<seq2seq4repair_space>pwait<seq2seq4repair_space>:<seq2seq4repair_space>out<seq2seq4repair_space>std_logic" ) ; ArrayList others = new ArrayList ( ) ; for ( int j = 0 ; j < ( module . getInterfaceSignals ( ) . size ( ) ) ; j ++ ) { SHDLSignal signal = ( ( SHDLSignal ) ( module . getInterfaceSignals ( ) . get ( j ) ) ) ; String prefix = signal . getPrefix ( ) ; <START_BUG> if ( ( ( ( ( ( prefix . equals ( "mclk" ) ) || ( prefix . equals ( "pdb" ) ) ) || ( prefix . equals ( "astb" ) ) ) || ( prefix . equals ( "dstb" ) ) ) || ( prefix . equals ( "pwr" ) ) ) || ( prefix . equals ( "pwr" ) ) ) <END_BUG>

Fix:
if ( ( ( ( ( ( prefix . equals ( "mclk" ) ) || ( prefix . equals ( "pdb" ) ) ) || ( prefix . equals ( "astb" ) ) ) || ( prefix . equals ( "dstb" ) ) ) || ( prefix . equals ( "pwr" ) ) ) || ( prefix . equals ( "pwait" ) ) )
Buggy code:
public class IncrementalStateManager { public static boolean recordIncrementalStates = false ; public static boolean debugIncrementalStates = false ; private static Hashtable incrementalStates = new Hashtable ( ) ; public static void recordSuccessfulBuild ( String buildConfig , AjState state ) { } public static boolean removeIncrementalStateInformationFor ( String buildConfig ) { } public static void clearIncrementalStates ( ) { for ( Iterator iter = IncrementalStateManager . incrementalStates . values ( ) . iterator ( ) ; iter . hasNext ( ) ; ) { AjState element = ( ( AjState ) ( iter . next ( ) ) ) ; element . wipeAllKnowledge ( ) ; } IncrementalStateManager . incrementalStates . clear ( ) ; <START_BUG> AsmManager . getDefault ( ) . createNewASM ( ) ; <END_BUG> } public static Set getConfigFilesKnown ( ) { } public static AjState retrieveStateFor ( String configFile ) { } public static AjState findStateManagingOutputLocation ( File location ) { } }

Fix:
AsmManager . getDefault ( ) . createNewASM ( null ) ;
Buggy code:
public class SMTPMin { static Category cat = Category . getInstance ( SMTPMin . class ) ; public static void main ( String [ ] argv ) { } static void usage ( String msg ) { } static void init ( String configFile ) { } static void test ( ) { int i = 0 ; SMTPMin . cat . debug ( ( "Message<seq2seq4repair_space>" + ( i ++ ) ) ) ; SMTPMin . cat . debug ( ( "Message<seq2seq4repair_space>" + ( i ++ ) ) , new Exception ( "Just<seq2seq4repair_space>testing." ) ) ; SMTPMin . cat . info ( ( "Message<seq2seq4repair_space>" + ( i ++ ) ) ) ; SMTPMin . cat . warn ( ( "Message<seq2seq4repair_space>" + ( i ++ ) ) ) ; SMTPMin . cat . error ( ( "Message<seq2seq4repair_space>" + ( i ++ ) ) ) ; <START_BUG> SMTPMin . cat . log ( Priority . FATAL , ( "Message<seq2seq4repair_space>" + ( i ++ ) ) ) ; <END_BUG> LogManager . shutdown ( ) ; Thread . currentThread ( ) . getThreadGroup ( ) . list ( ) ; } }

Fix:
SMTPMin . cat . log ( Level . FATAL , ( "Message<seq2seq4repair_space>" + ( i ++ ) ) ) ;
Buggy code:
public class TabFolder extends Composite { TabItem [ ] items ; int lastSelected = - 1 ; public TabFolder ( Composite parent , int style ) { } public void addSelectionListener ( SelectionListener 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 ) { } void createHandle ( ) { } void createItem ( TabItem item , int index ) { } void createWidget ( ) { } void destroyItem ( TabItem item ) { } public Rectangle getClientArea ( ) { } public TabItem getItem ( int index ) { } public int getItemCount ( ) { } public TabItem [ ] getItems ( ) { } public TabItem [ ] getSelection ( ) { } public int getSelectionIndex ( ) { } public int indexOf ( TabItem item ) { } Point minimumSize ( int wHint , int hHint , boolean flushCache ) { } Rect getInset ( ) { } int kEventControlApplyBackground ( int nextHandler , int theEvent , int userData ) { } int kEventControlHit ( int nextHandler , int theEvent , int userData ) { } int kEventControlSetFocusPart ( int nextHandler , int theEvent , int userData ) { } void releaseChildren ( boolean destroy ) { if ( ( items ) != null ) { for ( int i = 0 ; i < ( items . length ) ; i ++ ) { TabItem item = items [ i ] ; if ( ( item != null ) && ( ! ( item . isDisposed ( ) ) ) ) { <START_BUG> item . releaseChildren ( false ) ; <END_BUG> } } items = null ; } super . releaseChildren ( destroy ) ; } void removeControl ( Control control ) { } public void removeSelectionListener ( SelectionListener listener ) { } int setBounds ( int x , int y , int width , int height , boolean move , boolean resize , boolean events ) { } public void setSelection ( TabItem [ ] items ) { } public void setSelection ( int index ) { } void setSelection ( int index , boolean notify ) { } boolean traversePage ( boolean next ) { } }

Fix:
item . release ( false ) ;
Buggy code:
public class HelperTests extends ExpressionTestCase { @ Test public void testFormatHelperForClassName ( ) { } @ Test public void testFormatHelperForMethod ( ) { } @ Test public void testUtilities ( ) throws ParseException { SpelExpression expr = ( ( SpelExpression ) ( parser . parseExpression ( "3+4+5+6+7-2" ) ) ) ; ByteArrayOutputStream baos = new ByteArrayOutputStream ( ) ; PrintStream ps = new PrintStream ( baos ) ; SpelUtilities . printAbstractSyntaxTree ( ps , expr ) ; ps . flush ( ) ; String s = baos . toString ( ) ; Assert . assertTrue ( ( ( s . indexOf ( "===><seq2seq4repair_space>Expression<seq2seq4repair_space>'3+4+5+6+7-2'<seq2seq4repair_space>-<seq2seq4repair_space>AST<seq2seq4repair_space>start" ) ) != ( - 1 ) ) ) ; <START_BUG> Assert . assertTrue ( ( ( s . indexOf ( "<seq2seq4repair_space>OperatorPlus<seq2seq4repair_space>value:((((3<seq2seq4repair_space>+<seq2seq4repair_space>4)<seq2seq4repair_space>+<seq2seq4repair_space>5)<seq2seq4repair_space>+<seq2seq4repair_space>6)<seq2seq4repair_space>+<seq2seq4repair_space>7)<seq2seq4repair_space>#children:2" ) ) != ( - 1 ) ) ) ; <END_BUG> } @ Test public void testTypedValue ( ) { } @ Test public void testReflectionHelperCompareArguments_ExactMatching ( ) { } @ Test public void testReflectionHelperCompareArguments_CloseMatching ( ) { } @ Test public void testReflectionHelperCompareArguments_RequiresConversionMatching ( ) { } @ Test public void testReflectionHelperCompareArguments_NotAMatch ( ) { } @ Test public void testReflectionHelperCompareArguments_Varargs_ExactMatching ( ) { } @ Test public void testConvertArguments ( ) throws Exception { } @ Test public void testConvertArguments2 ( ) throws EvaluationException { } @ Test public void testSetupArguments ( ) { } @ Test public void testReflectivePropertyResolver ( ) throws Exception { } static class Tester { String property ; public int field = 3 ; public int field2 ; public int field3 = 0 ; String property2 ; String property3 = "doodoo" ; boolean property4 = false ; public String getProperty ( ) { } public void setProperty ( String value ) { } public void setProperty2 ( String value ) { } public String getProperty3 ( ) { } public boolean isProperty4 ( ) { } } static class Super { } static class Sub extends HelperTests . Super { } static class Unconvertable { } private void checkMatch ( Class [ ] inputTypes , Class [ ] expectedTypes , StandardTypeConverter typeConverter , ArgsMatchKind expectedMatchKind , int ... argsForConversion ) { } private void checkMatch2 ( Class [ ] inputTypes , Class [ ] expectedTypes , StandardTypeConverter typeConverter , ArgsMatchKind expectedMatchKind , int ... argsForConversion ) { } private void checkArguments ( Object [ ] args , Object ... expected ) { } private void checkArgument ( Object expected , Object actual ) { } }

Fix:
Assert . assertTrue ( ( ( s . indexOf ( "<seq2seq4repair_space>OpPlus<seq2seq4repair_space>value:((((3<seq2seq4repair_space>+<seq2seq4repair_space>4)<seq2seq4repair_space>+<seq2seq4repair_space>5)<seq2seq4repair_space>+<seq2seq4repair_space>6)<seq2seq4repair_space>+<seq2seq4repair_space>7)<seq2seq4repair_space>#children:2" ) ) != ( - 1 ) ) ) ;
Buggy code:
public class RootLoggerAdd extends AbstractAddStepHandler { public static final RootLoggerAdd INSTANCE = new RootLoggerAdd ( ) ; public static final String OPERATION_NAME = "set-root-logger" ; @ Override protected void populateModel ( ModelNode operation , ModelNode model ) throws OperationFailedException { } protected void performRuntime ( OperationContext context , ModelNode operation , ModelNode model , ServiceVerificationHandler verificationHandler , List < ServiceController < ? > > newControllers ) throws OperationFailedException { final PathAddress address = PathAddress . pathAddress ( rootLoggerPath ) ; final String name = address . getLastElement ( ) . getValue ( ) ; final ModelNode level = CommonAttributes . LEVEL . resolveModelAttribute ( context , model ) ; final ModelNode handlers = CommonAttributes . HANDLERS . resolveModelAttribute ( context , model ) ; final ServiceTarget target = context . getServiceTarget ( ) ; try { final RootLoggerService service = new RootLoggerService ( ) ; if ( level . isDefined ( ) ) service . setLevel ( ModelParser . parseLevel ( level ) ) ; newControllers . add ( target . addService ( LogServices . loggerName ( name ) , service ) . addListener ( verificationHandler ) . setInitialMode ( ACTIVE ) . install ( ) ) ; } catch ( Throwable t ) { throw new OperationFailedException ( new ModelNode ( ) . set ( t . getLocalizedMessage ( ) ) ) ; } try { if ( handlers . isDefined ( ) ) { <START_BUG> newControllers . addAll ( LogServices . installLoggerHandlers ( target , name , handlers , verificationHandler ) ) ; <END_BUG> } } catch ( Throwable t ) { throw new OperationFailedException ( new ModelNode ( ) . set ( t . getLocalizedMessage ( ) ) ) ; } } }

Fix:
newControllers . addAll ( LoggerAssignHandler . addHandlers ( CommonAttributes . HANDLERS , model , context , name , verificationHandler ) ) ;
Buggy code:
public class ConstructorInvocation extends Statement { private ASTNode . NodeList arguments = new ASTNode . NodeList ( true , Expression . class ) ; ConstructorInvocation ( AST ast ) { } public int getNodeType ( ) { } ASTNode clone ( AST target ) { ConstructorInvocation result = new ConstructorInvocation ( target ) ; result . setSourceRange ( this . getStartPosition ( ) , this . getLength ( ) ) ; <START_BUG> result . setLeadingComment ( getLeadingComment ( ) ) ; <END_BUG> result . arguments ( ) . addAll ( ASTNode . copySubtrees ( target , arguments ( ) ) ) ; return result ; } public boolean subtreeMatch ( ASTMatcher matcher , Object other ) { } void accept0 ( ASTVisitor visitor ) { } public List arguments ( ) { } public IMethodBinding resolveConstructorBinding ( ) { } int memSize ( ) { } int treeSize ( ) { } }

Fix:
result . copyLeadingComment ( this ) ;
Buggy code:
public class ErrorsTag extends AbstractHtmlElementBodyTag implements BodyTag { public static final String MESSAGES_ATTRIBUTE = "messages" ; public static final String SPAN_TAG = "span" ; private String element = ErrorsTag . SPAN_TAG ; private String delimiter = "<br//>" ; private Object oldMessages ; private boolean errorMessagesWereExposed ; public void setElement ( String element ) { } public String getElement ( ) { } public void setDelimiter ( String delimiter ) { } public String getDelimiter ( ) { } @ Override protected String autogenerateId ( ) throws JspException { String path = getPropertyPath ( ) ; <START_BUG> if ( "" . equals ( path ) ) { <END_BUG> path = ( ( String ) ( this . pageContext . getAttribute ( MODEL_ATTRIBUTE_VARIABLE_NAME , REQUEST_SCOPE ) ) ) ; } return ( StringUtils . deleteAny ( path , "[]" ) ) + ".errors" ; } @ Override protected String getName ( ) throws JspException { } @ Override protected boolean shouldRender ( ) throws JspException { } @ Override protected void renderDefaultContent ( TagWriter tagWriter ) throws JspException { } @ Override protected void exposeAttributes ( ) throws JspException { } @ Override protected void removeAttributes ( ) { } }

Fix:
if ( ( "" . equals ( path ) ) || ( "*" . equals ( path ) ) ) {
Buggy code:
public class PageFactory implements IPageFactory { private final Log log = LogFactory . getLog ( PageFactory . class ) ; private final Map constructors = new ConcurrentHashMap ( ) ; private final IApplication application ; private IPageFactory childFactory ; public PageFactory ( final IApplication application ) { } public final void setChildFactory ( final IPageFactory childFactory ) { } public final IPageFactory getChildFactory ( ) { } public final IApplication getApplication ( ) { } public final Page newPage ( final Class pageClass ) { } public final Page newPage ( final String pageClassName ) { } public final Page newPage ( final Class pageClass , final HttpRequest request ) { } public final Page newPage ( final String pageClassName , final HttpRequest request ) { } public Page newPage ( final Class pageClass , final PageParameters parameters ) { } public Page newPage ( final String pageClassName , final PageParameters parameters ) { } public final Page newPage ( final Class pageClass , final Page page ) { } public final Page newPage ( final String pageClassName , final Page page ) { } protected final Constructor getConstructor ( final Class pageClass , final Class parameter ) { Constructor constructor = ( ( Constructor ) ( constructors . get ( pageClass . getName ( ) ) ) ) ; if ( constructor == null ) { try { if ( parameter == null ) { <START_BUG> constructor = pageClass . getConstructor ( null ) ; <END_BUG> } else { constructor = pageClass . getConstructor ( new Class [ ] { parameter } ) ; } constructors . put ( pageClass . getName ( ) , constructor ) ; } catch ( NoSuchMethodException e ) { throw new RenderException ( ( ( ( "Could<seq2seq4repair_space>not<seq2seq4repair_space>find<seq2seq4repair_space>proper<seq2seq4repair_space>page<seq2seq4repair_space>constructor<seq2seq4repair_space>in<seq2seq4repair_space>" + pageClass ) + ";<seq2seq4repair_space>Constructor<seq2seq4repair_space>parameter=" ) + ( parameter == null ? "null" : parameter . getName ( ) ) ) , e ) ; } } return constructor ; } protected final void removeConstructor ( final String pageClassName ) { } protected Page newPage ( final Constructor constructor , final Object parameter ) { } public Class getClassInstance ( final String classname ) { } }

Fix:
constructor = pageClass . getConstructor ( ( ( Class [ ] ) ( null ) ) ) ;
Buggy code:
public class ManagedClassSubclasser { private static final Localizer _loc = Localizer . forPackage ( ManagedClassSubclasser . class ) ; public static List < Class > prepareUnenhancedClasses ( final OpenJPAConfiguration conf , final Collection < ? extends Class > classes , final ClassLoader envLoader ) { } private static Set < Class > collectRelatedUnspecifiedTypes ( ClassMetaData meta , Collection < ? extends Class > classes , Set < Class > unspecified ) { } private static Set < Class > collectUnspecifiedType ( Class cls , Collection < ? extends Class > classes , Set < Class > unspecified ) { } private static void configureMetaData ( OpenJPAConfiguration conf , ClassLoader envLoader , Class cls , boolean redefineAvailable ) { } private static void configureMetaData ( ClassMetaData meta , OpenJPAConfiguration conf , boolean redefineAvailable , boolean warn ) { ManagedClassSubclasser . setDetachedState ( meta ) ; if ( ( warn && ( ( ( AccessCode . isField ( meta . getAccessType ( ) ) ) && ( ! ( meta . isMixedAccess ( ) ) ) ) || ( meta . isMixedAccess ( ) ) ) ) && ( ! redefineAvailable ) ) { for ( FieldMetaData fmd : meta . getDeclaredFields ( ) ) { <START_BUG> if ( ( fmd . getAccessType ( ) ) == ( ClassMetaData . ACCESS_PROPERTY ) ) <END_BUG> continue ; switch ( fmd . getTypeCode ( ) ) { case JavaTypes . COLLECTION : case JavaTypes . MAP : break ; default : if ( ( ! ( fmd . isInDefaultFetchGroup ( ) ) ) && ( ! ( ( fmd . isVersion ( ) ) || ( fmd . isPrimaryKey ( ) ) ) ) ) { Log log = conf . getLog ( LOG_ENHANCE ) ; log . warn ( ManagedClassSubclasser . _loc . get ( "subclasser-fetch-group-override" , meta . getDescribedType ( ) . getName ( ) , fmd . getName ( ) ) ) ; fmd . setInDefaultFetchGroup ( true ) ; } } } } } private static void write ( BCClass bc , PCEnhancer enhancer , Map < Class , byte [ ] > map , Class cls , List subs , List ints ) throws IOException { } private static void debugBytecodes ( BCClass bc ) throws IOException { } private static void setIntercepting ( OpenJPAConfiguration conf , ClassLoader envLoader , Class cls ) { } private static void setDetachedState ( ClassMetaData meta ) { } }

Fix:
if ( AccessCode . isProperty ( fmd . getAccessType ( ) ) )
Buggy code:
public class WebMarkupContainer extends MarkupContainer implements IHeaderContributor { private List headerComponents ; public WebMarkupContainer ( final String id ) { } public WebMarkupContainer ( final String id , IModel model ) { } public final String getMarkupType ( ) { } protected void onRender ( ) { } public void renderHead ( final HtmlHeaderContainer container ) { } private void checkBodyOnLoad ( ) { } private final WebMarkupContainer getHeaderPart ( ) { final MarkupStream associatedMarkupStream = getApplication ( ) . getMarkupCache ( ) . getMarkupStream ( this , false ) ; if ( associatedMarkupStream == null ) { return null ; } int index = Markup . NO_HEADER_FOUND ; if ( ( associatedMarkupStream . getHeaderIndex ( ) ) != ( Markup . NO_HEADER_FOUND ) ) { index = associatedMarkupStream . getHeaderIndex ( ) ; } if ( index != ( Markup . NO_HEADER_FOUND ) ) { associatedMarkupStream . setCurrentIndex ( index ) ; final MarkupElement element = associatedMarkupStream . get ( ) ; if ( element instanceof WicketTag ) { final WicketTag wTag = ( ( WicketTag ) ( element ) ) ; if ( ( ( wTag . isHeadTag ( ) ) == true ) && ( ( wTag . getNamespace ( ) ) != null ) ) { <START_BUG> final String headerId = ( "_" + ( Classes . name ( this . getClass ( ) ) ) ) + "Header" ; <END_BUG> WebMarkupContainer headerContainer = new WebMarkupContainer ( headerId ) ; headerContainer . setMarkupStream ( associatedMarkupStream ) ; headerContainer . setRenderBodyOnly ( true ) ; if ( ( this . headerComponents ) != null ) { for ( Iterator iter = headerComponents . iterator ( ) ; iter . hasNext ( ) ; ) { headerContainer . add ( ( ( Component ) ( iter . next ( ) ) ) ) ; } } return headerContainer ; } } } if ( ( this . headerComponents ) != null ) { throw new MarkupException ( ( "You<seq2seq4repair_space>have<seq2seq4repair_space>added<seq2seq4repair_space>header<seq2seq4repair_space>components<seq2seq4repair_space>but<seq2seq4repair_space>did<seq2seq4repair_space>not<seq2seq4repair_space>specify<seq2seq4repair_space>a<seq2seq4repair_space><wicket:head><seq2seq4repair_space>region<seq2seq4repair_space>in<seq2seq4repair_space>your<seq2seq4repair_space>Page<seq2seq4repair_space>markup:<seq2seq4repair_space>" + ( this . toString ( ) ) ) ) ; } return null ; } public final void addToHeader ( final Component child ) { } }

Fix:
final String headerId = ( ( "_" + ( Classes . name ( this . getClass ( ) ) ) ) + ( this . getVariation ( ) ) ) + "Header" ;
Buggy code:
public class TestCollectionUtil extends LuceneTestCase { private List < Integer > createRandomList ( int maxSize ) { } public void testQuickSort ( ) { } public void testMergeSort ( ) { } public void testInsertionSort ( ) { } public void testEmptyArraySort ( ) { <START_BUG> List < Integer > list = Collections . emptyList ( ) ; <END_BUG> CollectionUtil . quickSort ( list ) ; CollectionUtil . mergeSort ( list ) ; CollectionUtil . insertionSort ( list ) ; CollectionUtil . quickSort ( list , Collections . reverseOrder ( ) ) ; CollectionUtil . mergeSort ( list , Collections . reverseOrder ( ) ) ; CollectionUtil . insertionSort ( list , Collections . reverseOrder ( ) ) ; } }

Fix:
List < Integer > list = Arrays . asList ( new Integer [ 0 ] ) ;
Buggy code:
public class RectifyNullifiedProcess extends WorkflowActivity < SiadapProcess , NullifyRatifyActivityInformation > { @ Override public boolean isActive ( SiadapProcess process , User user ) { Boolean nulled = process . getSiadap ( ) . getNulled ( ) ; <START_BUG> return ( ( nulled != null ) && nulled ) && ( ( DynamicGroup . get ( "StructureManagementGroup" ) . isMember ( Authenticate . getUser ( ) ) ) || ( DynamicGroup . get ( "CcaMembersGroup" ) . isMember ( Authenticate . getUser ( ) ) ) ) ; <END_BUG> } @ Override protected void process ( NullifyRatifyActivityInformation activityInformation ) { } @ Override protected String [ ] getArgumentsDescription ( NullifyRatifyActivityInformation activityInformation ) { } @ Override public boolean isUserAwarenessNeeded ( SiadapProcess process ) { } @ Override public ActivityInformation < SiadapProcess > getActivityInformation ( SiadapProcess process ) { } @ Override public String getUsedBundle ( ) { } }

Fix:
return ( ( nulled != null ) && nulled ) && ( ( DynamicGroup . get ( "SiadapStructureManagementGroup" ) . isMember ( Authenticate . getUser ( ) ) ) || ( DynamicGroup . get ( "CcaMembersGroup" ) . isMember ( Authenticate . getUser ( ) ) ) ) ;
Buggy code:
@ Controller public class SignUpController { @ Autowired UserService userService ; @ RequestMapping ( value = "//signUpAction" , method = RequestMethod . POST ) public String signUp ( User user ) { String id = user . getId ( ) ; if ( ( userService . getUser ( id ) ) != null ) { return "signUp" ; } userService . addUser ( user ) ; <START_BUG> return "productList" ; <END_BUG> } }

Fix:
return "redirect://productList" ;
Buggy code:
@ RunWith ( Parameterized . class ) public class SocketBindingGroupTransformersTestCase extends AbstractCoreModelTest { private final ModelVersion modelVersion ; private final ModelTestControllerVersion testControllerVersion ; @ Parameters public static List < Object [ ] > parameters ( ) { } public SocketBindingGroupTransformersTestCase ( TransformersTestParameters params ) { } @ Test public void testSocketBindingGroupsTransformer ( ) throws Exception { <START_BUG> boolean below14 = ( ( modelVersion . getMajor ( ) ) == 1 ) && ( ( modelVersion . getMinor ( ) ) <= 3 ) ; <END_BUG> KernelServicesBuilder builder = createKernelServicesBuilder ( DOMAIN ) . setXmlResource ( ( below14 ? "domain-transformers-1.3.xml" : "domain.xml" ) ) ; LegacyKernelServicesInitializer legacyInit = builder . createLegacyKernelServicesBuilder ( modelVersion , testControllerVersion ) ; if ( below14 ) { ExcludeCommonOperations . excludeBadOps_7_1_x ( legacyInit ) ; } KernelServices mainServices = builder . build ( ) ; Assert . assertTrue ( mainServices . isSuccessfulBoot ( ) ) ; KernelServices legacyServices = mainServices . getLegacyServices ( modelVersion ) ; Assert . assertTrue ( legacyServices . isSuccessfulBoot ( ) ) ; checkCoreModelTransformation ( mainServices , modelVersion ) ; } }

Fix:
boolean below14 = ( ModelVersion . compare ( ModelVersion . create ( 1 , 4 , 0 ) , modelVersion ) ) < 0 ;
Buggy code:
public class GoHomePlugin extends CordovaPlugin { @ Override public boolean execute ( String action , JSONArray args , CallbackContext callbackContext ) throws JSONException { } private boolean doGoHomeAction ( JSONArray args , CallbackContext callbackContext ) { } private void logError ( String description ) { <START_BUG> Log . e ( EvanPlugin . class . getName ( ) , description ) ; <END_BUG> } }

Fix:
Log . e ( GoHomePlugin . class . getName ( ) , description ) ;
Buggy code:
public class LockingMetricsHandler extends AbstractRuntimeOnlyHandler { @ Override protected void executeRuntimeStep ( OperationContext context , ModelNode operation ) throws OperationFailedException { <START_BUG> PathAddress address = context . getCurrentAddress ( ) ; <END_BUG> String containerName = address . getElement ( ( ( address . size ( ) ) - 3 ) ) . getValue ( ) ; String cacheName = address . getElement ( ( ( address . size ( ) ) - 2 ) ) . getValue ( ) ; String name = Operations . getAttributeName ( operation ) ; LockingMetric metric = LockingMetric . forName ( name ) ; if ( metric == null ) { context . getFailureDescription ( ) . set ( ROOT_LOGGER . unknownMetric ( name ) ) ; } else { Cache < ? , ? > cache = ServiceContainerHelper . findValue ( context . getServiceRegistry ( false ) , CACHE . getServiceName ( containerName , cacheName ) ) ; if ( cache != null ) { context . getResult ( ) . set ( metric . getValue ( ( ( LockManagerImpl ) ( cache . getAdvancedCache ( ) . getLockManager ( ) ) ) ) ) ; } } context . completeStep ( NOOP_RESULT_HANDLER ) ; } }

Fix:
PathAddress address = Operations . getPathAddress ( operation ) ;
Buggy code:
public class LogansDemo extends BasicGame { private EntityManager eManager ; public LogansDemo ( String title ) { } @ Override public void init ( GameContainer container ) throws SlickException { <START_BUG> eManager . addEntity ( new Car ( new Vector2f ( ) , 0 ) ) ; <END_BUG> for ( Entity e : eManager . getAllEntities ( ) ) { e . init ( container ) ; } } @ Override public void update ( GameContainer container , int delta ) throws SlickException { } @ Override public void render ( GameContainer container , Graphics g ) throws SlickException { } }

Fix:
eManager . addEntity ( new Car ( new Vector2f ( ) , 0 , 0 ) ) ;
Buggy code:
public class House extends Pit { private House oppositeHouse ; public House ( int index , int seeds ) { } public int retrieveSeeds ( ) { } public House getOppositeHouse ( ) { } public void setOppositeHouse ( House oppositePit ) { } @ Override public boolean isStore ( ) { } @ Override public String toString ( ) { <START_BUG> return ( "House<seq2seq4repair_space>[" + ( getSeeds ( ) ) ) + "]" ; <END_BUG> } }

Fix:
return ( "H[" + ( getSeeds ( ) ) ) + "]" ;