nus-yam/ex-repair huggingface dataset:
Buggy code:
public class Base64OutputStream extends FilterOutputStream { private final boolean doEncode ; private final Base64 base64 ; private final byte [ ] singleByte = new byte [ 1 ] ; public Base64OutputStream ( OutputStream out ) { } public Base64OutputStream ( OutputStream out , boolean doEncode ) { } public Base64OutputStream ( OutputStream out , boolean doEncode , int lineLength , byte [ ] lineSeparator ) { } public void write ( int i ) throws IOException { } public void write ( byte [ ] b , int offset , int len ) throws IOException { if ( b == null ) { throw new NullPointerException ( ) ; } else <START_BUG> if ( ( ( offset < 0 ) || ( len < 0 ) ) || ( ( offset + len ) < 0 ) ) { <END_BUG> throw new IndexOutOfBoundsException ( ) ; } else if ( ( offset > ( b . length ) ) || ( ( offset + len ) > ( b . length ) ) ) { throw new IndexOutOfBoundsException ( ) ; } else if ( len > 0 ) { if ( doEncode ) { base64 . encode ( b , offset , len ) ; } else { base64 . decode ( b , offset , len ) ; } flush ( false ) ; } } private void flush ( boolean propogate ) throws IOException { } public void flush ( ) throws IOException { } public void close ( ) throws IOException { } }

Fix:
if ( ( offset < 0 ) || ( len < 0 ) ) {
Buggy code:
public class Asset { private Activity activity ; protected final String STORAGE_FOLDER ; public Asset ( Activity activity , String storageFolder ) { } public JSONObject parseURIs ( JSONObject notification ) { } public Uri getURIfromPath ( String path ) { if ( path . startsWith ( "res:" ) ) { return getUriForResourcePath ( path ) ; } else if ( path . startsWith ( "file://////" ) ) { return getUriForAbsolutePath ( path ) ; } else if ( path . startsWith ( "file:////" ) ) { return getUriForAssetPath ( path ) ; } else if ( path . startsWith ( "http" ) ) { return getUriForHTTP ( path ) ; } <START_BUG> return Uri . EMPTY ; <END_BUG> } private Uri getUriForAbsolutePath ( String path ) { } private Uri getUriForAssetPath ( String path ) { } private Uri getUriForResourcePath ( String path ) { } private Uri getUriForHTTP ( String path ) { } private void copyFile ( InputStream in , OutputStream out ) throws IOException { } private int getResId ( String resPath ) { } private String getPackageName ( ) { } }

Fix:
return Uri . parse ( path ) ;
Buggy code:
public class StompSubProtocolHandlerTests { private StompSubProtocolHandler protocolHandler ; private TestWebSocketSession session ; private MessageChannel channel ; @ SuppressWarnings ( "rawtypes" ) private ArgumentCaptor < Message > messageCaptor ; @ Before public void setup ( ) { } @ Test public void handleMessageToClientConnected ( ) { } @ Test public void handleMessageToClientConnectedUniqueUserName ( ) { } @ Test public void handleMessageToClientConnectedWithHeartbeats ( ) { } @ Test public void handleMessageToClientConnectAck ( ) { } @ Test public void eventPublication ( ) { } @ Test public void eventPublicationWithExceptions ( ) { } @ Test public void handleMessageToClientUserDestination ( ) { StompHeaderAccessor headers = StompHeaderAccessor . create ( MESSAGE ) ; headers . setMessageId ( "mess0" ) ; headers . setSubscriptionId ( "sub0" ) ; headers . setDestination ( "//queue//foo-user123" ) ; <START_BUG> headers . setHeader ( SUBSCRIBE_DESTINATION , "//user//queue//foo" ) ; <END_BUG> Message < byte [ ] > message = MessageBuilder . withPayload ( new byte [ 0 ] ) . setHeaders ( headers ) . build ( ) ; this . protocolHandler . handleMessageToClient ( this . session , message ) ; assertEquals ( 1 , this . session . getSentMessages ( ) . size ( ) ) ; WebSocketMessage < ? > textMessage = this . session . getSentMessages ( ) . get ( 0 ) ; assertTrue ( ( ( String ) ( textMessage . getPayload ( ) ) ) . contains ( "destination://user//queue//foo\n" ) ) ; } @ Test public void handleMessageFromClient ( ) { } @ Test public void handleMessageFromClientInvalidStompCommand ( ) { } private static class UniqueUser extends TestPrincipal implements DestinationUserNameProvider { private UniqueUser ( String name ) { } @ Override public String getDestinationUserName ( ) { } } private static class TestPublisher implements ApplicationEventPublisher { private final List < ApplicationEvent > events = new ArrayList < ApplicationEvent > ( ) ; @ Override public void publishEvent ( ApplicationEvent event ) { } } }

Fix:
headers . setHeader ( ORIGINAL_DESTINATION , "//user//queue//foo" ) ;
Buggy code:
public class ClobUpdateableReaderTest extends BaseJDBCTestCase { private final String dummy = "This<seq2seq4repair_space>is<seq2seq4repair_space>a<seq2seq4repair_space>new<seq2seq4repair_space>String" ; public ClobUpdateableReaderTest ( String name ) { } public void testUpdateableStoreReader ( ) throws Exception { } public void testUpdateableReader ( ) throws Exception { } private String getUnicodeString ( ) { } public void setUp ( ) throws Exception { } public static Test suite ( ) { TestSuite ts = new TestSuite ( "ClobUpdateableReaderTest" ) ; <START_BUG> ts . addTest ( TestConfiguration . embeddedSuite ( ClobUpdateableReaderTest . class ) ) ; <END_BUG> TestSuite encSuite = new TestSuite ( "ClobUpdateableReaderTest:encrypted" ) ; encSuite . addTestSuite ( ClobUpdateableReaderTest . class ) ; ts . addTest ( Decorator . encryptedDatabase ( encSuite ) ) ; return ts ; } protected void tearDown ( ) throws Exception { } }

Fix:
ts . addTest ( TestConfiguration . defaultSuite ( ClobUpdateableReaderTest . class ) ) ;
Buggy code:
@ SuppressWarnings ( "serial" ) public class MapEditorFrame extends JFrame implements ActionListener { private EditBoard editBoard ; private JButton quitButton ; private JButton saveButton ; private JButton saveAsButton ; private JButton openFileButton ; private JButton newMapButton ; private JButton [ ] [ ] map ; private JRadioButton [ ] options ; private MapIO m ; private int shiftX = 120 ; private int lastChosen = 3 ; private boolean saved ; public MapEditorFrame ( EditBoard board , MapIO io ) { } public void actionPerformed ( ActionEvent e ) { } public void open ( ) { try { JFileChooser choose = new JFileChooser ( ) ; choose . setSelectedFile ( new File ( ConfigIO . getDefaultConfigIO ( ) . getLastFile ( ) ) ) ; FileNameExtensionFilter filter = new FileNameExtensionFilter ( "Map<seq2seq4repair_space>File<seq2seq4repair_space>(*.map)" , "map" ) ; choose . addChoosableFileFilter ( filter ) ; choose . setAcceptAllFileFilterUsed ( false ) ; if ( ( choose . showOpenDialog ( this ) ) == ( JFileChooser . APPROVE_OPTION ) ) { String s = choose . getSelectedFile ( ) . getPath ( ) ; if ( ! ( s . equals ( "" ) ) ) { <START_BUG> ConfigIO . getDefaultConfigIO ( ) . setDefaultTheme ( s ) ; <END_BUG> m = new MapIO ( s ) ; editBoard = new EditBoard ( m . read ( ) . getBoard ( ) ) ; update ( ) ; saved = true ; } } } catch ( HeadlessException e1 ) { e1 . printStackTrace ( ) ; } catch ( IOException e1 ) { e1 . printStackTrace ( ) ; } } public void save ( ) { } public void saveAs ( ) { } private void update ( ) { } @ SuppressWarnings ( "unused" ) private int getChoice ( ) { } }

Fix:
ConfigIO . getDefaultConfigIO ( ) . setLastFile ( s ) ;
Buggy code:
public class ClientFrame extends JFrame { private static final Logger logger = LoggerFactory . getLogger ( ClientFrame . class . getName ( ) ) ; private JMenuBar menuBar ; private JMenu fileM ; private Long runId ; private JPanel startP ; private JPanel startGridP ; private JPanel inputP ; private JPanel statusReportP ; private JLabel report_milisL ; private JLabel report_branchesL ; private JLabel report_leavesL ; private String NO_REPORT_STRING = "No<seq2seq4repair_space>report<seq2seq4repair_space>up<seq2seq4repair_space>to<seq2seq4repair_space>now.<seq2seq4repair_space>//nWait<seq2seq4repair_space>for<seq2seq4repair_space>report" ; private JTextField rootUrlTF ; private JSpinner delaySp ; private JSpinner maxLimitSp ; private JSpinner statusReportSp ; private ResourcesList branchRL ; private ResourcesList leafRL ; private JButton startB ; private JLabel label ; private Timer timer ; private GridBagConstraints gbcLeft ; private GridBagConstraints gbcRight ; private CrawlerCommunicator communicator ; public ClientFrame ( ) throws NamingException { } private void initComponents ( ) { } private void initGBCs ( ) { } public static void main ( String [ ] args ) { } private boolean isFormValid ( ) { String rootUrl = rootUrlTF . getText ( ) ; <START_BUG> if ( ( ( ( rootUrl != null ) && ( rootUrl != "" ) ) && ( ( branchRL . getResources ( ) ) != null ) ) && ( ( leafRL . getResources ( ) ) != null ) ) { <END_BUG> return true ; } return false ; } private void lock ( ) { } private void unlock ( ) { } private void cancel ( ) { } class CloseAction extends AbstractAction { private static final long serialVersionUID = - 7789819639153350425L ; public CloseAction ( ) { } public void actionPerformed ( ActionEvent e ) { } } class CrawlAction extends AbstractAction { private static final long serialVersionUID = 1917611653336592043L ; public CrawlAction ( ) { } public void actionPerformed ( ActionEvent e ) { } } class CancelAction extends AbstractAction { public CancelAction ( ) { } public void actionPerformed ( ActionEvent e ) { } } }

Fix:
if ( ( ( rootUrl != null ) && ( rootUrl != "" ) ) && ( ( leafRL . getResources ( ) ) != null ) ) {
Buggy code:
public class TestUtil { private static long seed ; private static boolean seedSet ; public static long getRandomSeed ( ) { if ( ! ( TestUtil . seedSet ) ) { String configured = System . getProperty ( "test.seed" ) ; if ( configured != null ) TestUtil . seed = Long . valueOf ( configured ) ; else TestUtil . seed = System . currentTimeMillis ( ) ; <START_BUG> System . out . println ( ( "Random<seq2seq4repair_space>seed<seq2seq4repair_space>=<seq2seq4repair_space>" + ( TestUtil . seed ) ) ) ; <END_BUG> TestUtil . seedSet = true ; } return TestUtil . seed ; } public static Random createRandom ( ) { } public static byte [ ] randomBytes ( Random random ) { } public static String randomString ( Random random ) { } public static int randomLength ( Random random ) { } @ Test public void testRandomLength ( ) { } }

Fix:
System . out . println ( ( "test.seed=" + ( TestUtil . seed ) ) ) ;
Buggy code:
public class VerbNameParser extends VerbGroupParser { private static final UnaryMatcher < SyntaxToken > nounAdjectiveMatch = and ( hasAny ( NPRO , NOUN , ADJF ) , not ( directObjectCasesMatch ) , not ( hasAny ( NOMN ) ) ) ; private static final UnaryMatcher < SyntaxToken > casesByReflexiveVerbMatch = hasAny ( DATV , ABLT ) ; public VerbNameParser ( AbstractWordNet wordNet ) { } @ Override protected int getType ( SyntaxToken token ) { <START_BUG> if ( nounMatch . match ( token ) ) { <END_BUG> return IToken . TOKEN_TYPE_VERB_NOUN ; } else if ( adjectiveMatch . match ( token ) ) { return IToken . TOKEN_TYPE_VERB_ADJECTIVE ; } return - 1 ; } @ Override protected boolean checkAdditionalToken ( IToken token ) { } @ Override protected boolean matchTokensCouple ( Stack < IToken > sample ) { } }

Fix:
if ( ( nounMatch . match ( token ) ) || ( nproMatch . match ( token ) ) ) {
Buggy code:
public class ValidateRealmState implements State { private final StateValues stateValues ; private ConsoleWrapper theConsole ; public ValidateRealmState ( ConsoleWrapper theConsole , final StateValues stateValues ) { } @ Override public State execute ( ) { String enteredRealm = stateValues . getRealm ( ) ; if ( ( enteredRealm . length ( ) ) == 0 ) { <START_BUG> return new ErrorState ( theConsole , ROOT_LOGGER . realmMustBeSpecified ( ) , new PromptRealmState ( theConsole , stateValues ) , stateValues ) ; <END_BUG> } if ( ( stateValues . getFileMode ( ) ) != ( FileMode . UNDEFINED ) ) { final String expectedRealm = ( ( stateValues . getFileMode ( ) ) == ( FileMode . MANAGEMENT ) ) ? AddUser . DEFAULT_MANAGEMENT_REALM : AddUser . DEFAULT_APPLICATION_REALM ; if ( ( expectedRealm . equals ( enteredRealm ) ) == false ) { String message = ROOT_LOGGER . alternativeRealm ( expectedRealm ) ; String prompt = ( ( ( ( ( ROOT_LOGGER . realmConfirmation ( enteredRealm ) ) + "<seq2seq4repair_space>" ) + ( ROOT_LOGGER . yes ( ) ) ) + "//" ) + ( ROOT_LOGGER . no ( ) ) ) + "?" ; return new ConfirmationChoice ( theConsole , message , prompt , new PromptNewUserState ( theConsole , stateValues ) , new PromptRealmState ( theConsole , stateValues ) ) ; } } return new PromptNewUserState ( theConsole , stateValues ) ; } }

Fix:
return new ErrorState ( theConsole , ROOT_LOGGER . realmMustBeSpecified ( ) , new PromptRealmState ( theConsole , stateValues ) ) ;
Buggy code:
public class CollectorMK1Tile extends TileEmc implements IEmcProvider , IInventory , ISidedInventory { private ItemStack [ ] inventory ; private int [ ] accessibleSlots ; private final int invBufferSize ; private final int emcGen ; private final int lockSlot ; private final int upgradedSlot ; private boolean hasChargeableItem ; private boolean hasFuel ; public double storedFuelEmc ; public int displayEmc ; public int displaySunLevel ; public double displayItemCharge ; private int numUsing ; public CollectorMK1Tile ( ) { } public CollectorMK1Tile ( int maxEmc , int emcGen , int upgradedSlot , int lockSlot ) { } @ Override public void update ( ) { } private void sortInventory ( ) { } public void checkFuelOrKlein ( ) { } public void updateEmc ( ) { } private float getSunRelativeEmc ( int emc ) { } public ItemStack getChargingItem ( ) { } public double getEmcToNextGoal ( ) { } private double getItemCharge ( ) { } public int getKleinStarChargeScaled ( int i ) { <START_BUG> if ( ( ( inventory [ 0 ] ) == null ) || ( ( displayItemCharge ) <= 0 ) ) { <END_BUG> return 0 ; } return ( ( int ) ( Math . round ( ( ( ( displayItemCharge ) * i ) // ( ( ( IItemEmc ) ( inventory [ 0 ] . getItem ( ) ) ) . getMaximumEmc ( inventory [ 0 ] ) ) ) ) ) ) ; } public int getSunLevel ( ) { } public int getEmcScaled ( int i ) { } public int getSunLevelScaled ( int i ) { } public int getFuelProgressScaled ( int i ) { } @ Override public void readFromNBT ( NBTTagCompound nbt ) { } @ Override public void writeToNBT ( NBTTagCompound nbt ) { } @ Override public int getSizeInventory ( ) { } @ Override public ItemStack getStackInSlot ( int slot ) { } @ Override public ItemStack decrStackSize ( int slot , int qty ) { } @ Override public ItemStack removeStackFromSlot ( int slot ) { } @ Override public void setInventorySlotContents ( int slot , ItemStack stack ) { } @ Override public String getName ( ) { } @ Override public boolean hasCustomName ( ) { } @ Override public IChatComponent getDisplayName ( ) { } @ Override public int getInventoryStackLimit ( ) { } @ Override public boolean isUseableByPlayer ( EntityPlayer var1 ) { } @ Override public void openInventory ( EntityPlayer player ) { } @ Override public void closeInventory ( EntityPlayer player ) { } @ Override public boolean isItemValidForSlot ( int slot , ItemStack stack ) { } @ Override public int getField ( int id ) { } @ Override public void setField ( int id , int value ) { } @ Override public int getFieldCount ( ) { } @ Override public void clear ( ) { } @ Override public int [ ] getSlotsForFace ( EnumFacing side ) { } @ Override public boolean canInsertItem ( int slot , ItemStack stack , EnumFacing side ) { } @ Override public boolean canExtractItem ( int slot , ItemStack stack , EnumFacing side ) { } private void sendRelayBonus ( ) { } @ Override public double provideEMC ( EnumFacing side , double toExtract ) { } }

Fix:
if ( ( ( ( inventory [ 0 ] ) == null ) || ( ( displayItemCharge ) <= 0 ) ) || ( ! ( ( inventory [ 0 ] . getItem ( ) ) instanceof IItemEmc ) ) ) {
Buggy code:
public class GitDeltaConsumer implements VcsDeltaConsumer { @ NotNull private static final Logger log = LoggerFactory . getLogger ( GitDeltaConsumer . class ) ; @ NotNull private final Map < String , String > props ; @ NotNull private final GitWriter writer ; @ NotNull private final GitEntry entry ; @ Nullable private final User user ; @ Nullable private SVNDeltaProcessor window ; @ Nullable private final GitObject < ObjectId > originalId ; @ Nullable private final String originalMd5 ; @ Nullable private GitObject < ObjectId > objectId ; @ Nullable private final GitFilter oldFilter ; @ Nullable private GitFilter newFilter ; @ NotNull private TemporaryOutputStream temporaryStream ; @ Nullable private String md5 ; public GitDeltaConsumer ( @ NotNull GitWriter writer , @ NotNull GitEntry entry , @ Nullable GitFile file , @ Nullable User user ) throws IOException , SVNException { } @ NotNull @ Override public Map < String , String > getProperties ( ) { } @ Nullable public GitObject < ObjectId > getOriginalId ( ) { } @ Nullable public GitObject < ObjectId > getObjectId ( ) throws IOException , SVNException { } public boolean migrateFilter ( @ NotNull GitFilter filter ) throws IOException , SVNException { } @ Override public void applyTextDelta ( String path , @ Nullable String baseChecksum ) throws SVNException { try { if ( ( ( originalMd5 ) != null ) && ( baseChecksum != null ) ) { if ( ! ( baseChecksum . equals ( originalMd5 ) ) ) { throw new SVNException ( SVNErrorMessage . create ( CHECKSUM_MISMATCH ) ) ; } } if ( ( window ) != null ) throw new SVNException ( SVNErrorMessage . create ( RA_SVN_CMD_ERR ) ) ; newFilter = writer . getRepository ( ) . getFilter ( ( props . containsKey ( SPECIAL ) ? FileMode . SYMLINK : FileMode . REGULAR_FILE ) , entry . getRawProperties ( ) ) ; window = new SVNDeltaProcessor ( ) ; <START_BUG> window . applyTextDelta ( ( ( objectId ) != null ? objectId . openObject ( ) . openStream ( ) : new ByteArrayInputStream ( GitRepository . emptyBytes ) ) , newFilter . outputStream ( temporaryStream , user ) , true ) ; <END_BUG> } catch ( IOException e ) { throw new SVNException ( SVNErrorMessage . create ( IO_ERROR ) , e ) ; } } @ Override public OutputStream textDeltaChunk ( String path , SVNDiffWindow diffWindow ) throws SVNException { } @ Override public void textDeltaEnd ( String path ) throws SVNException { } @ Override public void validateChecksum ( @ NotNull String md5 ) throws SVNException { } @ NotNull public String getFilterName ( ) { } }

Fix:
window . applyTextDelta ( ( ( ( oldFilter ) != null ) && ( ( objectId ) != null ) ? oldFilter . inputStream ( objectId ) : new ByteArrayInputStream ( GitRepository . emptyBytes ) ) , newFilter . outputStream ( temporaryStream , user ) , true ) ;
Buggy code:
public abstract class ConfiguratorBase implements Configurator { public static final String DEBUG_KEY = "log4j.debug" ; protected Logger getLogger ( LoggerRepository repository ) { } protected void addError ( ErrorItem errorItem ) { } public abstract List getErrorList ( ) { } protected void attachListAppender ( LoggerRepository repository ) { } protected void detachListAppender ( LoggerRepository repository ) { } public static void attachTemporaryConsoleAppender ( LoggerRepository repository ) { Logger ll = repository . getLogger ( LOG4J_PACKAGE_NAME ) ; ConsoleAppender appender = new ConsoleAppender ( ) ; appender . setLayout ( new PatternLayout ( "LOG4J-INTERNAL:<seq2seq4repair_space>%d<seq2seq4repair_space>%level<seq2seq4repair_space>[%t]<seq2seq4repair_space>%c#%M:%L)-<seq2seq4repair_space>%m%n" ) ) ; appender . setName ( TEMP_CONSOLE_APPENDER_NAME ) ; <START_BUG> appender . activate ( ) ; <END_BUG> ll . addAppender ( appender ) ; } public static void detachTemporaryConsoleAppender ( LoggerRepository repository , List errorList ) { } public void dumpErrors ( ) { } }

Fix:
appender . activateOptions ( ) ;
Buggy code:
public class ChannelRangeModel extends AbstractTableModel { private static final long serialVersionUID = 1L ; private static final Logger mLog = LoggerFactory . getLogger ( ChannelRangeModel . class ) ; private static final int START = 0 ; private static final int STOP = 1 ; private static final int BASE = 2 ; private static final int SIZE = 3 ; private static final int ERROR = 4 ; protected int [ ] mColumnWidths = new int [ ] { 110 , 110 , 110 , - 1 , 80 } ; protected String [ ] mHeaders = new String [ ] { "Begin" , "End" , "Base" , "Size" , "Error" } ; private List < ChannelRange > mRanges = new CopyOnWriteArrayList < > ( ) ; private ChannelRangeModel . ChannelRangeEventListener mListener ; public ChannelRangeModel ( ) { } public void setListener ( ChannelRangeModel . ChannelRangeEventListener listener ) { } private void broadcastChange ( ) { } public void clear ( ) { } public List < ChannelRange > getChannelRanges ( ) { <START_BUG> return Collections . unmodifiableList ( mRanges ) ; <END_BUG> } public void addRanges ( List < ChannelRange > ranges ) { } public void addRange ( ChannelRange range ) { } public void removeRange ( ChannelRange range ) { } public int [ ] getColumnWidths ( ) { } public void setColumnWidths ( int [ ] widths ) { } @ Override public int getRowCount ( ) { } @ Override public int getColumnCount ( ) { } public String getColumnName ( int column ) { } public ChannelRange getChannelRange ( int index ) { } @ Override public Object getValueAt ( int rowIndex , int columnIndex ) { } private void validate ( ) { } public boolean isCellEditable ( int row , int column ) { } public void setValueAt ( Object value , int row , int column ) { } public interface ChannelRangeEventListener { public void channelRangesChanged ( ) { } } }

Fix:
return mRanges ;
Buggy code:
public class TestParentChild extends CombinatorialPersistenceTestCase { private static String Key_UpdateManager = "openjpa.jdbc.UpdateManager" ; private static String Key_SchemaFactory = "openjpa.jdbc.SchemaFactory" ; private static String Key_MappingDefaults = "openjpa.jdbc.MappingDefaults" ; private static String Key_PersistOrder = "persist-order" ; private static String [ ] Option_MappingDefaults = new String [ ] { "ForeignKeyDeleteAction=restrict,<seq2seq4repair_space>JoinForeignKeyDeleteAction=restrict" , "ForeignKeyDeleteAction=none,<seq2seq4repair_space>JoinForeignKeyDeleteAction=none" } ; private static String [ ] Option_SchemaFactory = new String [ ] { "native(ForeignKeys=false)" , "native(ForeignKeys=true)" } ; private static String [ ] Option_UpdateManager = new String [ ] { "operation-order" , "constraint" } ; private static enum PersistOrder { IMPLICIT_CASCADE , CHILD_THEN_PARENT , PARENT_THEN_CHILD ; } public void setUp ( ) { } public void testInsert ( ) { } Parent createData ( TestParentChild . PersistOrder order , int nChild ) { } void validateData ( Object pid , int childCount ) { } void assertPhysicalForeignKeyCreation ( ) { <START_BUG> String regex = "ALTER<seq2seq4repair_space>TABLE<seq2seq4repair_space>.*<seq2seq4repair_space>ADD<seq2seq4repair_space>FOREIGN<seq2seq4repair_space>KEY<seq2seq4repair_space>\\(PARENT_ID\\)<seq2seq4repair_space>" + "REFERENCES<seq2seq4repair_space>Parent<seq2seq4repair_space>\\(id\\)" ; <END_BUG> if ( getMappingDefaults ( ) . contains ( "restrict" ) ) { assertSQL ( regex ) ; } else { assertNotSQL ( regex ) ; } } void assertPostInsertUpdate ( ) { } void assertLogicalOrPhysicalForeignKey ( ) { } ForeignKey getChildParentForeignKey ( ) { } TestParentChild . PersistOrder getPersistOrder ( ) { } String getMappingDefaults ( ) { } String getSchemaFactory ( ) { } }

Fix:
String regex = "ALTER<seq2seq4repair_space>TABLE<seq2seq4repair_space>.*<seq2seq4repair_space>ADD<seq2seq4repair_space>FOREIGN<seq2seq4repair_space>KEY<seq2seq4repair_space>\\(PARENT_ID\\)<seq2seq4repair_space>" + "REFERENCES<seq2seq4repair_space>Parent<seq2seq4repair_space>\\(id\\)(\\sDEFERRABLE)?" ;
Buggy code:
public class HandlerPointcut extends Pointcut { TypePattern exceptionType ; public HandlerPointcut ( TypePattern exceptionType ) { } public FuzzyBoolean match ( Shadow shadow ) { } public boolean equals ( Object other ) { } public int hashCode ( ) { } public String toString ( ) { } public void write ( DataOutputStream s ) throws IOException { } public static Pointcut read ( DataInputStream s , ISourceContext context ) throws IOException { } public void resolveBindings ( IScope scope , Bindings bindings ) { <START_BUG> exceptionType = exceptionType . resolveBindings ( scope , bindings , false ) ; <END_BUG> } public Test findResidue ( Shadow shadow , ExposedState state ) { } public Pointcut concretize1 ( ResolvedTypeX inAspect , IntMap bindings ) { } }

Fix:
exceptionType = exceptionType . resolveBindings ( scope , bindings , false , false ) ;
Buggy code:
public class InMemoryMetricsTable implements MetricsTable { private final String tableName ; public InMemoryMetricsTable ( String name ) { } @ Override public byte [ ] get ( byte [ ] row , byte [ ] column ) throws Exception { } @ Override public void put ( NavigableMap < byte [ ] , NavigableMap < byte [ ] , Long > > updates ) throws Exception { } @ Override public boolean swap ( byte [ ] row , byte [ ] column , byte [ ] oldValue , byte [ ] newValue ) throws Exception { } @ Override public void increment ( byte [ ] row , Map < byte [ ] , Long > increments ) throws Exception { } @ Override public void increment ( NavigableMap < byte [ ] , NavigableMap < byte [ ] , Long > > updates ) throws Exception { } @ Override public long incrementAndGet ( byte [ ] row , byte [ ] column , long delta ) throws Exception { } @ Override public void deleteAll ( byte [ ] prefix ) throws Exception { } @ Override public void delete ( byte [ ] row , byte [ ] [ ] columns ) throws Exception { for ( byte [ ] column : columns ) { <START_BUG> InMemoryOrderedTableService . deleteColumns ( tableName , row , column ) ; <END_BUG> } } @ Override public void delete ( Collection < byte [ ] > rows ) throws Exception { } @ Override public void deleteRange ( @ Nullable byte [ ] start , @ Nullable byte [ ] stop , @ Nullable byte [ ] [ ] columns , @ Nullable FuzzyRowFilter filter ) { } @ Override public Scanner scan ( @ Nullable byte [ ] start , @ Nullable byte [ ] stop , @ Nullable byte [ ] [ ] columns , @ Nullable FuzzyRowFilter filter ) { } private NavigableMap < byte [ ] , NavigableMap < byte [ ] , byte [ ] > > getLatest ( NavigableMap < byte [ ] , NavigableMap < byte [ ] , NavigableMap < Long , byte [ ] > > > versionedRows ) { } @ Override public void close ( ) throws IOException { } }

Fix:
InMemoryTableService . deleteColumns ( tableName , row , column ) ;
Buggy code:
public class JGroupsSubsystemTest extends AbstractSubsystemBaseTest { public JGroupsSubsystemTest ( ) { } @ Override protected String getSubsystemXml ( ) throws IOException { } @ Override protected Set < PathAddress > getIgnoredChildResourcesForRemovalTest ( ) { } @ Test public void testProtocolOrdering ( ) throws Exception { } @ Override protected AdditionalInitialization createAdditionalInitialization ( ) { } @ Test public void testLegacyOperations ( ) throws Exception { List < ModelNode > ops = new LinkedList < ModelNode > ( ) ; PathAddress subsystemAddress = EMPTY_ADDRESS . append ( SUBSYSTEM , getMainSubsystemName ( ) ) ; PathAddress udpAddress = subsystemAddress . append ( "stack" , "udp" ) ; PathAddress tcpAddress = subsystemAddress . append ( "stack" , "tcp" ) ; ModelNode op = Util . createAddOperation ( subsystemAddress ) ; op . get ( "default-stack" ) . set ( "udp" ) ; ops . add ( op ) ; op = Util . createAddOperation ( udpAddress ) ; ModelNode transport = new ModelNode ( ) ; transport . get ( "type" ) . set ( "UDP" ) ; transport . get ( "socket-binding" ) . set ( "jgroups-udp" ) ; ModelNode protocols = new ModelNode ( ) ; String [ ] protocolList = new String [ ] { "PING" , "MERGE3" , "FD_SOCK" , "FD" , "VERIFY_SUSPECT" , "BARRIER" , "pbcast.NAKACK2" , "UNICAST2" , "pbcast.STABLE" , "pbcast.GMS" , "UFC" , "MFC" , "FRAG2" , "RSVP" } ; for ( int i = 0 ; i < ( protocolList . length ) ; i ++ ) { ModelNode protocol = new ModelNode ( ) ; protocol . get ( TYPE ) . set ( protocolList [ i ] ) ; protocol . get ( "socket-binding" ) . set ( "jgroups-udp" ) ; <START_BUG> System . out . println ( ( "adding<seq2seq4repair_space>protocol<seq2seq4repair_space>=<seq2seq4repair_space>" + ( protocol . toString ( ) ) ) ) ; <END_BUG> protocols . add ( protocol ) ; } op . get ( "transport" ) . set ( transport ) ; op . get ( "protocols" ) . set ( protocols ) ; ops . add ( op ) ; ops . add ( Util . getWriteAttributeOperation ( udpAddress . append ( "protocol" , "FD_SOCK" ) , "socket-binding" , new ModelNode ( "jgroups-udp-fd" ) ) ) ; KernelServices servicesA = createKernelServicesBuilder ( createAdditionalInitialization ( ) ) . setBootOperations ( ops ) . build ( ) ; Assert . assertTrue ( "Subsystem<seq2seq4repair_space>boot<seq2seq4repair_space>failed!" , servicesA . isSuccessfulBoot ( ) ) ; final ModelNode modelA = servicesA . readWholeModel ( ) ; validateModel ( modelA ) ; ModelNode protos = modelA . get ( SUBSYSTEM , getMainSubsystemName ( ) , "stack" , "udp" , "protocols" ) ; Assert . assertEquals ( "we<seq2seq4repair_space>should<seq2seq4repair_space>get<seq2seq4repair_space>back<seq2seq4repair_space>same<seq2seq4repair_space>number<seq2seq4repair_space>of<seq2seq4repair_space>protocols<seq2seq4repair_space>that<seq2seq4repair_space>we<seq2seq4repair_space>send" , 14 , protos . asList ( ) . size ( ) ) ; servicesA . shutdown ( ) ; } }

Fix:
System . out . println ( ( "adding<seq2seq4repair_space>protovcol<seq2seq4repair_space>=<seq2seq4repair_space>" + ( protocol . toString ( ) ) ) ) ;
Buggy code:
public class SelectionOnExplicitConstructorCall extends ExplicitConstructorCall { public SelectionOnExplicitConstructorCall ( int accessMode ) { } public StringBuffer printStatement ( int tab , StringBuffer output ) { } public void resolve ( BlockScope scope ) { super . resolve ( scope ) ; if ( ( ( binding ) == null ) || ( ! ( ( binding . isValidBinding ( ) ) || ( ( binding . problemId ( ) ) == ( ProblemReasons . NotVisible ) ) ) ) ) throw new SelectionNodeFound ( ) ; else <START_BUG> throw new SelectionNodeFound ( binding ) ; <END_BUG> } }

Fix:
throw new SelectionNodeFound ( this , binding ) ;
Buggy code:
public class BoardPanel extends JPanel { private static final long serialVersionUID = - 1700922085295001317L ; Square [ ] [ ] squares = new Square [ 8 ] [ 8 ] ; public BoardPanel ( ) { } private void initLayout ( ) { this . setLayout ( new GridLayout ( 8 , 8 ) ) ; for ( int y = 0 ; y < 8 ; y ++ ) for ( int x = 0 ; x < 8 ; x ++ ) { Color color ; <START_BUG> if ( ( ( x + y ) % 2 ) == 1 ) <END_BUG> color = new Color ( 139 , 69 , 19 ) ; else color = new Color ( 245 , 222 , 189 ) ; squares [ x ] [ y ] = new Square ( x , y , color ) ; squares [ x ] [ y ] . setName ( "thisname" ) ; this . add ( squares [ x ] [ y ] ) ; } } public void setPieceListener ( ActionListener listener ) { } }

Fix:
if ( ( ( x + y ) % 2 ) != 0 )
Buggy code:
@ Singleton public class ImageForVAppTemplate implements Function < QueryResultVAppTemplateRecord , Image > { private static final String CENTOS = "centos" ; private static final String UBUNTU = "ubuntu" ; private static final String SUSE = "sles" ; private static final String WINDOWS = "windows" ; private static final String UNRECOGNIZED = "unrecognized" ; @ Resource @ Named ( ComputeServiceConstants . COMPUTE_LOGGER ) public Logger logger = Logger . NULL ; private final Function < String , Image . Status > toPortableImageStatus ; private final Function < URI , Envelope > templateToEnvelope ; @ Inject protected ImageForVAppTemplate ( Function < String , Image . Status > toPortableImageStatus , Function < URI , Envelope > templateToEnvelope ) { } @ Override public Image apply ( QueryResultVAppTemplateRecord from ) { } private String getVappId ( QueryResultVAppTemplateRecord from ) { String vApp = from . getHref ( ) . getPath ( ) . substring ( from . getHref ( ) . getPath ( ) . lastIndexOf ( "//" ) ) ; <START_BUG> return vApp . substring ( ( ( vApp . indexOf ( "-" ) ) + 1 ) ) ; <END_BUG> } private boolean is64bit ( String osType ) { } private OperatingSystem setOsDetails ( OperatingSystemSection operatingSystemSection ) { } private Function < String , String > parseVersion ( final String osFamily , final String osType ) { } }

Fix:
return "urn:vcloud:vapptemplate:" + ( vApp . substring ( ( ( vApp . indexOf ( "-" ) ) + 1 ) ) ) ;
Buggy code:
public class RepeatingView extends AbstractRepeater { private static final long serialVersionUID = 1L ; private long childIdCounter = 0 ; public RepeatingView ( String id ) { } public RepeatingView ( String id , IModel model ) { } public String newChildId ( ) { ( childIdCounter ) ++ ; if ( ( childIdCounter ) == ( Long . MAX_VALUE ) ) { throw new RuntimeException ( "generateChildId()<seq2seq4repair_space>out<seq2seq4repair_space>of<seq2seq4repair_space>space." ) ; } <START_BUG> return "id" + ( String . valueOf ( childIdCounter ) ) ; <END_BUG> } protected Iterator renderIterator ( ) { } }

Fix:
return String . valueOf ( childIdCounter ) ;
Buggy code:
public final class YuiLib { private static ResourceReference YUILOADER ; public static void load ( IHeaderResponse response ) { <START_BUG> response . renderJavascriptReference ( YuiLib . getYuiLoader ( ) ) ; <END_BUG> } private static ResourceReference getYuiLoader ( ) { } private YuiLib ( ) { } }

Fix:
response . renderJavaScriptReference ( YuiLib . getYuiLoader ( ) ) ;
Buggy code:
public class Snippet136 { public static void main ( String [ ] args ) { String html = "<HTML><HEAD><TITLE>HTML<seq2seq4repair_space>Test<//TITLE><//HEAD><BODY>" ; for ( int i = 0 ; i < 100 ; i ++ ) html += ( "<P>This<seq2seq4repair_space>is<seq2seq4repair_space>line<seq2seq4repair_space>" + i ) + "<//P>" ; html += "<//BODY><//HTML>" ; Display display = new Display ( ) ; Shell shell = new Shell ( display ) ; shell . setLayout ( new FillLayout ( ) ) ; Browser browser ; try { browser = new Browser ( shell , SWT . NONE ) ; } catch ( SWTError e ) { <START_BUG> System . out . println ( ( "Count<seq2seq4repair_space>not<seq2seq4repair_space>instantiate<seq2seq4repair_space>Browser:<seq2seq4repair_space>" + ( e . getMessage ( ) ) ) ) ; <END_BUG> return ; } browser . setText ( html ) ; shell . open ( ) ; while ( ! ( shell . isDisposed ( ) ) ) { if ( ! ( display . readAndDispatch ( ) ) ) display . sleep ( ) ; } display . dispose ( ) ; } }

Fix:
System . out . println ( ( "Could<seq2seq4repair_space>not<seq2seq4repair_space>instantiate<seq2seq4repair_space>Browser:<seq2seq4repair_space>" + ( e . getMessage ( ) ) ) ) ;
Buggy code:
public class ClassifierEndCodePiece extends NamedCodePiece { private CodePiece bracket ; public ClassifierEndCodePiece ( CodePiece bracket ) { } <START_BUG> public String getText ( ) { <END_BUG> return bracket . getText ( ) ; } public int getStartPosition ( ) { } public int getEndPosition ( ) { } public int getStartLine ( ) { } public int getEndLine ( ) { } public void write ( Writer writer , Stack parseStateStack , int column ) throws Exception { } }

Fix:
public StringBuffer getText ( ) {
Buggy code:
public abstract class QueryNodeImpl implements Cloneable , QueryNode { private static final long serialVersionUID = 5569870883474845989L ; public static final String PLAINTEXT_FIELD_NAME = "_plain" ; private boolean isLeaf = true ; private Hashtable < String , Object > tags = new Hashtable < String , Object > ( ) ; private List < QueryNode > clauses = null ; protected void allocate ( ) { } public final void add ( QueryNode child ) { } public final void add ( List < QueryNode > children ) { } public boolean isLeaf ( ) { } public final void set ( List < QueryNode > children ) { } public QueryNode cloneTree ( ) throws CloneNotSupportedException { } @ Override public Object clone ( ) throws CloneNotSupportedException { } protected void setLeaf ( boolean isLeaf ) { } public final List < QueryNode > getChildren ( ) { } @ Deprecated public void setTag ( CharSequence tagName , Object value ) { } public void setTag ( String tagName , Object value ) { } public void unsetTag ( String tagName ) { } @ Deprecated public void unsetTag ( CharSequence tagName ) { } @ Deprecated public boolean containsTag ( CharSequence tagName ) { } public boolean containsTag ( String tagName ) { <START_BUG> return this . tags . containsKey ( tagName ) ; <END_BUG> } @ Deprecated public Object getTag ( CharSequence tagName ) { } public Object getTag ( String tagName ) { } private QueryNode parent = null ; private void setParent ( QueryNode parent ) { } public QueryNode getParent ( ) { } protected boolean isRoot ( ) { } protected boolean toQueryStringIgnoreFields = false ; protected boolean isDefaultField ( CharSequence fld ) { } @ Override public String toString ( ) { } @ SuppressWarnings ( { "unchecked" } ) @ Deprecated public Map < CharSequence , Object > getTags ( ) { } @ SuppressWarnings ( "unchecked" ) public Map < String , Object > getTagMap ( ) { } }

Fix:
return this . tags . containsKey ( tagName . toLowerCase ( ) ) ;
Buggy code:
public class CalendarUtils { public static int getDaysInMonth ( int month , int year ) { switch ( month ) { case Calendar . JANUARY : case Calendar . MARCH : case Calendar . MAY : case Calendar . JULY : case Calendar . AUGUST : case Calendar . OCTOBER : case Calendar . DECEMBER : return 31 ; case Calendar . APRIL : case Calendar . JUNE : case Calendar . SEPTEMBER : case Calendar . NOVEMBER : return 30 ; case Calendar . FEBRUARY : <START_BUG> return ( ( ( year % 4 ) == 0 ) && ( ( year % 100 ) != 0 ) ) || ( ( year % 400 ) == 0 ) ? 28 : 29 ; <END_BUG> default : throw new IllegalArgumentException ( "Invalid<seq2seq4repair_space>Month" ) ; } } }

Fix:
return ( ( ( year % 4 ) == 0 ) && ( ( year % 100 ) != 0 ) ) || ( ( year % 400 ) == 0 ) ? 29 : 28 ;
Buggy code:
public class ClientListDAOImpl implements ClientListDAO { private static final Logger log = LoggerFactory . getLogger ( ClientListDAOImpl . class ) ; private final String marker = Marker . ANY_MARKER ; @ Override public boolean addClient ( ClientListPOJO params ) { } @ Override public boolean delClient ( String nickName ) { } @ Override public ClientListPOJO getClientByNick ( String nick ) { } @ Override public List < ClientListPOJO > getClientList ( Boolean regOnly ) { Session session = HibernateUtils . getSessionFactory ( ) . openSession ( ) ; Transaction tx = session . getTransaction ( ) ; <START_BUG> String query = "from<seq2seq4repair_space>ClientListPOJO<seq2seq4repair_space>where<seq2seq4repair_space>isReg<seq2seq4repair_space>=<seq2seq4repair_space>:flag<seq2seq4repair_space>order<seq2seq4repair_space>by<seq2seq4repair_space>nickName,regDate" ; <END_BUG> try { tx . begin ( ) ; Query request = session . createQuery ( query ) . setParameter ( "flag" , regOnly ) ; List < ClientListPOJO > result = ( ( List < ClientListPOJO > ) ( request . list ( ) ) ) ; tx . commit ( ) ; return result ; } catch ( Exception ex ) { ClientListDAOImpl . log . error ( marker , ex ) ; tx . rollback ( ) ; } return null ; } @ Override public boolean updateClient ( ClientListPOJO object ) { } }

Fix:
String query = "from<seq2seq4repair_space>ClientListPOJO<seq2seq4repair_space>where<seq2seq4repair_space>registred<seq2seq4repair_space>=<seq2seq4repair_space>:flag<seq2seq4repair_space>order<seq2seq4repair_space>by<seq2seq4repair_space>nickName,regDate" ;
Buggy code:
public class Version { private Version ( ) { } public static String id ( ) { <START_BUG> return "4.4" ; <END_BUG> } public static void main ( String [ ] args ) { } }

Fix:
return "4.5-SNAPSHOT-20070720-1711" ;
Buggy code:
public class SolApplication implements ApplicationListener { private SolInputManager myInputMan ; private UiDrawer myUiDrawer ; private MenuScreens myMenuScreens ; private TextureManager myTextureManager ; private SolLayouts myLayouts ; private boolean myReallyMobile ; private GameOptions myOptions ; private CommonDrawer myCommonDrawer ; private FPSLogger myFpsLogger ; private String myFatalErrorMsg ; private String myFatalErrorTrace ; private float myAccum = 0 ; private SolGame myGame ; public SolApplication ( ) { } @ Override public void create ( ) { myReallyMobile = ( ( app . getType ( ) ) == ( ApplicationType . Android ) ) || ( ( app . getType ( ) ) == ( ApplicationType . iOS ) ) ; if ( myReallyMobile ) DebugOptions . read ( null ) ; myOptions = new GameOptions ( isMobile ( ) , null ) ; myTextureManager = new TextureManager ( ) ; myCommonDrawer = new CommonDrawer ( ) ; myUiDrawer = new UiDrawer ( myTextureManager , myCommonDrawer ) ; myInputMan = new SolInputManager ( myTextureManager , myUiDrawer . r ) ; myLayouts = new SolLayouts ( myUiDrawer . r ) ; <START_BUG> myMenuScreens = new MenuScreens ( myLayouts , myTextureManager , isMobile ( ) , myUiDrawer . r ) ; <END_BUG> myInputMan . setScreen ( this , myMenuScreens . main ) ; myFpsLogger = new FPSLogger ( ) ; } @ Override public void resize ( int i , int i1 ) { } public void render ( ) { } @ Override public void pause ( ) { } @ Override public void resume ( ) { } private void safeUpdate ( ) { } private void update ( ) { } private void draw ( ) { } public void loadNewGame ( boolean tut , boolean usePrevShip ) { } public void startNewGame ( boolean tut , boolean usePrevShip ) { } public SolInputManager getInputMan ( ) { } public MenuScreens getMenuScreens ( ) { } public void dispose ( ) { } public SolGame getGame ( ) { } public SolLayouts getLayouts ( ) { } public void finishGame ( ) { } public TextureManager getTexMan ( ) { } public boolean isMobile ( ) { } public GameOptions getOptions ( ) { } public void paused ( ) { } }

Fix:
myMenuScreens = new MenuScreens ( myLayouts , myTextureManager , isMobile ( ) , myUiDrawer . r , myOptions ) ;
Buggy code:
public final class NatClassApp { private MainFrame frame = null ; private Thread t ; private static Boolean isMac = null ; public static Boolean isMac ( ) { } private NatClassApp ( ) throws Exception { } public void newProject ( ) { } public Boolean openProject ( String filePath ) { } public Boolean saveAsProject ( String filePath ) { } public Boolean saveProject ( ) { } public void exitApplication ( ) { } private void run ( String [ ] args ) { EventQueue . invokeLater ( new Runnable ( ) { @ Override public void run ( ) { frame . setVisible ( true ) ; } } ) ; t = new Thread ( new Runnable ( ) { @ Override public void run ( ) { int c = 20000 ; while ( c > 0 ) { try { Set < Entity > s = ProjectManager . getInstance ( ) . getCollectionOfEntities ( ) ; synchronized ( s ) { <START_BUG> Thread . sleep ( 100 ) ; <END_BUG> int count ; int mode = ( ( int ) ( ( 0.5 + ( ( Math . random ( ) ) * 6 ) ) + 1 ) ) ; if ( ( ( ( mode & 1 ) == 0 ) && ( ( mode & 2 ) == 0 ) ) && ( ( mode & 4 ) == 0 ) ) { break ; } if ( ( mode & 1 ) != 0 ) { Entity e1 = new Entity ( ( "Object:<seq2seq4repair_space>" + ( ( int ) ( ( Math . random ( ) ) * 10 ) ) ) ) ; count = 1 + ( ( int ) ( ( Math . random ( ) ) * 10 ) ) ; for ( int i = 0 ; i < count ; i ++ ) { e1 . getAttributes ( ) . add ( new Attribute ( ( "a" + ( ( int ) ( ( Math . random ( ) ) * 10 ) ) ) , ( "" + ( ( int ) ( ( Math . random ( ) ) * 10 ) ) ) ) ) ; } ProjectManager . getInstance ( ) . getCollectionOfIdealClasses ( ) . add ( e1 ) ; } if ( ( mode & 2 ) != 0 ) { Entity e2 = new Entity ( ( "Object:<seq2seq4repair_space>" + ( ( int ) ( ( Math . random ( ) ) * 10 ) ) ) ) ; count = 1 + ( ( int ) ( ( Math . random ( ) ) * 10 ) ) ; for ( int i = 0 ; i < count ; i ++ ) { e2 . getAttributes ( ) . add ( new Attribute ( ( "a" + ( ( int ) ( ( Math . random ( ) ) * 10 ) ) ) , ( "" + ( ( int ) ( ( Math . random ( ) ) * 10 ) ) ) ) ) ; } ProjectManager . getInstance ( ) . getCollectionOfEntities ( ) . add ( e2 ) ; } if ( ( mode & 4 ) != 0 ) { Regularity r = new Regularity ( ) ; r . setTarget ( new Attribute ( ( "a" + ( ( int ) ( ( Math . random ( ) ) * 10 ) ) ) , ( "" + ( ( int ) ( ( Math . random ( ) ) * 10 ) ) ) ) ) ; count = 1 + ( ( int ) ( ( Math . random ( ) ) * 10 ) ) ; for ( int i = 0 ; i < count ; i ++ ) { r . getConditions ( ) . add ( new Attribute ( ( "a" + ( ( int ) ( ( Math . random ( ) ) * 10 ) ) ) , ( "" + ( ( int ) ( ( Math . random ( ) ) * 10 ) ) ) ) ) ; } count = 1 + ( ( int ) ( ( Math . random ( ) ) * 10 ) ) ; for ( int i = 0 ; i < count ; i ++ ) { r . getContext ( ) . add ( new Attribute ( ( "a" + ( ( int ) ( ( Math . random ( ) ) * 10 ) ) ) , ( "" + ( ( int ) ( ( Math . random ( ) ) * 10 ) ) ) ) ) ; } ProjectManager . getInstance ( ) . getCollectionOfRegularities ( ) . add ( r ) ; c -- ; } } } catch ( InterruptedException ex ) { break ; } } } } ) ; t . start ( ) ; } public static void main ( String [ ] args ) { } }

Fix:
Thread . sleep ( 1 ) ;
Buggy code:
public final class StripJavaComments extends BaseFilterReader implements ChainableReader { private int readAheadCh = - 1 ; private boolean inString = false ; private boolean quoted = false ; public StripJavaComments ( ) { } public StripJavaComments ( final Reader in ) { } public int read ( ) throws IOException { int ch = - 1 ; if ( ( readAheadCh ) != ( - 1 ) ) { ch = readAheadCh ; readAheadCh = - 1 ; } else { ch = in . read ( ) ; if ( ( ch == '"' ) && ( ! ( quoted ) ) ) { inString = ! ( inString ) ; quoted = false ; } else if ( ch == '\\' ) { quoted = ! ( quoted ) ; } else { quoted = false ; if ( ! ( inString ) ) { if ( ch == '//' ) { ch = in . read ( ) ; if ( ch == '//' ) { while ( ( ( ch != '\n' ) && ( ch != ( - 1 ) ) ) && ( ch != '\r' ) ) { ch = in . read ( ) ; } } else if ( ch == '*' ) { while ( ch != ( - 1 ) ) { ch = in . read ( ) ; if ( ch == '*' ) { ch = in . read ( ) ; <START_BUG> while ( ( ch == '*' ) && ( ch != ( - 1 ) ) ) { <END_BUG> ch = in . read ( ) ; } if ( ch == '//' ) { ch = read ( ) ; break ; } } } } else { readAheadCh = ch ; ch = '//' ; } } } } } return ch ; } public Reader chain ( final Reader rdr ) { } }

Fix:
while ( ch == '*' ) {
Buggy code:
public class BackgroundStage extends BaseBackgroundStage { private static final String DEFAULT_BACKGROUND = "Hintergrund01.png" ; private Image backgroundImage ; private Map < String , Texture > backgroundTextures ; public BackgroundStage ( SolarEngine SE ) { } protected void changeBackground ( String name ) { clear ( ) ; backgroundImage = new Image ( backgroundTextures . get ( name ) ) ; backgroundImage . setScaling ( fill ) ; backgroundImage . setPosition ( 0 , 0 ) ; <START_BUG> backgroundImage . setSize ( graphics . getWidth ( ) , graphics . getHeight ( ) ) ; <END_BUG> addActor ( backgroundImage ) ; } protected void loadTextures ( ) { } @ Override public void dispose ( ) { } @ Override public void resize ( int width , int height ) { } }

Fix:
backgroundImage . setColor ( 1 , 1 , 1 , 0.6F ) ;
Buggy code:
public class AttachProvider extends BaseWrappedClass { private static final Map < Integer , AttachProvider > apInstances = new ConcurrentHashMap < Integer , AttachProvider > ( ) ; public static Collection < AttachProvider > getAttachProviders ( ) { } public static AttachProvider getInstance ( Object delegate ) { } public List < VirtualMachineDescriptor > listVirtualMachines ( ) { } public VirtualMachine attachVirtualMachine ( String id ) { } public VirtualMachine attachVirtualMachine ( VirtualMachineDescriptor vmd ) { } public String name ( ) { } public String type ( ) { } public static List < AttachProvider > providers ( ) { } static void init ( ) { try { pushCl ( ) ; Class < ? > clazz = Thread . currentThread ( ) . getContextClassLoader ( ) . loadClass ( ATTACH_PROVIDER_CLASS ) ; Method m = clazz . getDeclaredMethod ( "providers" ) ; m . setAccessible ( true ) ; List < ? > aps = ( ( List < ? > ) ( m . invoke ( null ) ) ) ; for ( Object del : aps ) { AttachProvider . getInstance ( del ) ; } } catch ( Exception e ) { <START_BUG> throw new RuntimeException ( "Failed<seq2seq4repair_space>to<seq2seq4repair_space>initialize<seq2seq4repair_space>AttachProvider<seq2seq4repair_space>Cache" , new Throwable ( ) ) ; <END_BUG> } finally { popCl ( ) ; } } private AttachProvider ( Object delegate ) { } }

Fix:
throw new RuntimeException ( "Failed<seq2seq4repair_space>to<seq2seq4repair_space>initialize<seq2seq4repair_space>AttachProvider<seq2seq4repair_space>Cache" , e ) ;
Buggy code:
public class SubscribeFolderCommand extends Command { private IMAPRootFolder root ; private IMAPServer store ; public SubscribeFolderCommand ( SubscribeCommandReference reference ) { } public void execute ( WorkerStatusController worker ) throws Exception { SubscribeCommandReference subscribeReference = ( ( SubscribeCommandReference ) ( getReference ( ) ) ) ; <START_BUG> root = ( ( IMAPRootFolder ) ( subscribeReference . getFolder ( ) ) ) ; <END_BUG> store = root . getServer ( ) ; store . subscribeFolder ( subscribeReference . getMailbox ( ) ) ; } public void updateGUI ( ) throws Exception { } }

Fix:
root = ( ( IMAPRootFolder ) ( subscribeReference . getSourceFolder ( ) ) ) ;