nus-yam/ex-repair huggingface dataset:
Buggy code:
public class CreateClanPanel extends JPanel implements ActionListener { private final JTextArea description = new JTextArea ( ) ; private final JTextField name = new JTextField ( ) ; private final JButton button = new JButton ( "Create" ) ; private final JLabel nameLabel = new JLabel ( "name" ) ; private final JLabel descriptionLabel = new JLabel ( "Description" ) ; private final Refreshable board ; public CreateClanPanel ( Refreshable board ) { } private void makeThePanel ( ) { } @ Override public void actionPerformed ( ActionEvent e ) { try { if ( name . getText ( ) . equals ( "" ) ) { System . err . println ( "Need<seq2seq4repair_space>a<seq2seq4repair_space>clan<seq2seq4repair_space>name<seq2seq4repair_space>to<seq2seq4repair_space>create<seq2seq4repair_space>a<seq2seq4repair_space>clan!" ) ; } else { SerializableClan clan = new SerializableClan ( ) ; clan . clanName = name . getText ( ) ; clan . clanDescription = description . getText ( ) ; CreateClanRequest req = new CreateClanRequest ( clan ) ; CreateClanResponse resp = SocketController . send ( req ) ; if ( resp . isOK ( ) ) { board . refresh ( ) ; } else { System . err . println ( "Not<seq2seq4repair_space>posted!" ) ; } } } catch ( IOException e1 ) { <START_BUG> ClientWindow . showConnectionError ( this ) ; <END_BUG> } } }

Fix:
ClientWindow . showConnectionError ( ) ;
Buggy code:
public class MainActivity extends AppCompatActivity implements View . OnClickListener { private ImageView mImgView ; private Button mButton ; private Bitmap mBitmap ; static final String TAG = "MainActivity" ; private BaseLoaderCallback mLoaderCallback = new BaseLoaderCallback ( this ) { @ Override public void onManagerConnected ( int status ) { } } ; @ Override public void onResume ( ) { } @ Override protected void onCreate ( Bundle savedInstanceState ) { } @ Override public void onClick ( View v ) { Mat rgbMat = new Mat ( ) ; Utils . bitmapToMat ( mBitmap , rgbMat ) ; Mat grayMat = new Mat ( ) ; <START_BUG> Imgproc . cvtColor ( rgbMat , grayMat , COLOR_RGB2GRAY ) ; <END_BUG> Bitmap grayBmp = Bitmap . createBitmap ( grayMat . width ( ) , grayMat . height ( ) , RGB_565 ) ; Utils . matToBitmap ( grayMat , grayBmp ) ; mImgView . setImageBitmap ( grayBmp ) ; } }

Fix:
Imgproc . cvtColor ( rgbMat , grayMat , COLOR_BGR2GRAY ) ;
Buggy code:
public class FrameworkActivateProcessor implements DeploymentUnitProcessor { private final InitialDeploymentTracker deploymentTracker ; public FrameworkActivateProcessor ( InitialDeploymentTracker deploymentTracker ) { } @ Override public void deploy ( DeploymentPhaseContext phaseContext ) throws DeploymentUnitProcessingException { } @ Override public void undeploy ( final DeploymentUnit depUnit ) { } private boolean hasValidInjectionPoint ( DeploymentUnit depUnit ) { } private boolean hasInjectionPoint ( DeploymentUnit depUnit , String anName ) { boolean result = false ; CompositeIndex compositeIndex = depUnit . getAttachment ( COMPOSITE_ANNOTATION_INDEX ) ; List < AnnotationInstance > annotationList = compositeIndex . getAnnotations ( DotName . createSimple ( anName ) ) ; for ( AnnotationInstance instance : annotationList ) { AnnotationTarget target = instance . target ( ) ; if ( target instanceof FieldInfo ) { FieldInfo fieldInfo = ( ( FieldInfo ) ( target ) ) ; String typeName = fieldInfo . type ( ) . toString ( ) ; <START_BUG> if ( typeName . startsWith ( "org.osgi.framework" ) ) { <END_BUG> OSGiLogger . LOGGER . debugf ( "OSGi<seq2seq4repair_space>injection<seq2seq4repair_space>point<seq2seq4repair_space>of<seq2seq4repair_space>type<seq2seq4repair_space>'%s'<seq2seq4repair_space>detected:<seq2seq4repair_space>%s" , typeName , fieldInfo . declaringClass ( ) ) ; result = true ; break ; } } } return result ; } }

Fix:
if ( ( typeName . startsWith ( "org.osgi.framework" ) ) || ( typeName . startsWith ( "org.osgi.service" ) ) ) {
Buggy code:
public class Issue2179IT { private String webUrl ; private WebClient webClient ; @ Before public void setUp ( ) { } @ After public void tearDown ( ) { } @ Test public void testEncodeException ( ) throws Exception { } @ Test public void testDecodeException ( ) throws Exception { webClient . getOptions ( ) . setJavaScriptEnabled ( true ) ; webClient . setJavaScriptTimeout ( 60000 ) ; HtmlPage page = webClient . getPage ( ( ( webUrl ) + "//faces//issue2179-page2.xhtml" ) ) ; HtmlSubmitInput button = ( ( HtmlSubmitInput ) ( page . getElementById ( "form:submit" ) ) ) ; page = button . click ( ) ; webClient . waitForBackgroundJavaScript ( 60000 ) ; <START_BUG> assertTrue ( page . asXml ( ) . contains ( "decode:<seq2seq4repair_space>A<seq2seq4repair_space>RuntimeException<seq2seq4repair_space>Has<seq2seq4repair_space>Occurred!" ) ) ; <END_BUG> } }

Fix:
assertTrue ( page . asXml ( ) . contains ( "Name:<seq2seq4repair_space>form:submit<seq2seq4repair_space>Error:<seq2seq4repair_space>serverError" ) ) ;
Buggy code:
public class Transfer extends Transaction { private String destinationAccountID ; private int transferDelay ; public Transfer ( Account account , String to_account_id , int transfer_delay , double amount ) { } public String getDestinationAccountID ( ) { } public void setDestinationAccountID ( String destinationAccountID ) { } public int getTransferDelay ( ) { } public void setTransferDelay ( int transferDelay ) { } @ Override public synchronized void run ( ) { try { AccountFactory accountFactory = new AccountFactory ( ) ; Account destAccount = accountFactory . getAccount ( ( ( "out//Accounts//" + ( destinationAccountID ) ) + ".acc" ) ) ; String destCurrency = destAccount . getCurrency ( ) ; destAccount . changeCurrency ( acc . getCurrency ( ) ) ; ReceiveTransfer receiveTransfer = new ReceiveTransfer ( destAccount , acc . getAccountID ( ) , amount ) ; JOptionPane . showMessageDialog ( null , "Your<seq2seq4repair_space>transfer<seq2seq4repair_space>will<seq2seq4repair_space>be<seq2seq4repair_space>processed<seq2seq4repair_space>as<seq2seq4repair_space>soon<seq2seq4repair_space>as<seq2seq4repair_space>possible." ) ; sleep ( ( ( getTransferDelay ( ) ) * 1000 ) ) ; acc . updateSaldo ( ( - ( amount ) ) ) ; receiveTransfer . start ( ) ; receiveTransfer . join ( ) ; destAccount . changeCurrency ( destCurrency ) ; destAccount . saveAccount ( ) ; addToAccount ( ) ; <START_BUG> System . out . printf ( "Transfer<seq2seq4repair_space>from<seq2seq4repair_space>%s<seq2seq4repair_space>to<seq2seq4repair_space>%s<seq2seq4repair_space>has<seq2seq4repair_space>been<seq2seq4repair_space>processed." , acc . getAccountID ( ) , destAccount . getAccountID ( ) ) ; <END_BUG> } catch ( InterruptedException e ) { System . err . println ( e . getMessage ( ) ) ; } catch ( FileNotFoundException e ) { JOptionPane . showMessageDialog ( null , "Destination<seq2seq4repair_space>account<seq2seq4repair_space>is<seq2seq4repair_space>not<seq2seq4repair_space>found." , "" , JOptionPane . ERROR_MESSAGE ) ; } catch ( Exception e ) { } } }

Fix:
System . out . printf ( "Transfer<seq2seq4repair_space>from<seq2seq4repair_space>%s<seq2seq4repair_space>to<seq2seq4repair_space>%s<seq2seq4repair_space>has<seq2seq4repair_space>been<seq2seq4repair_space>processed.\n" , acc . getAccountID ( ) , destAccount . getAccountID ( ) ) ;
Buggy code:
public class DropColumnFamily extends Migration { private static final DropColumnFamily . Serializer serializer = new DropColumnFamily . Serializer ( ) ; private String tableName ; private String cfName ; private boolean blockOnFileDeletion ; private DropColumnFamily ( DataInputStream din ) throws IOException { } public DropColumnFamily ( String tableName , String cfName , boolean blockOnFileDeletion ) throws IOException , ConfigurationException { } private KSMetaData makeNewKeyspaceDefinition ( KSMetaData ksm ) { } @ Override public ICompactSerializer getSerializer ( ) { } @ Override public void applyModels ( ) throws IOException { KSMetaData existing = DatabaseDescriptor . getTableDefinition ( tableName ) ; CFMetaData cfm = existing . cfMetaData ( ) . get ( cfName ) ; KSMetaData ksm = makeNewKeyspaceDefinition ( existing ) ; CFMetaData . purge ( cfm ) ; DatabaseDescriptor . setTableDefinition ( ksm , newVersion ) ; <START_BUG> Table . open ( ksm . name ) . dropCf ( cfm . cfName ) ; <END_BUG> SystemTable . markForRemoval ( cfm ) ; CommitLog . instance ( ) . forceNewSegment ( ) ; Migration . cleanupDeadFiles ( blockOnFileDeletion ) ; } private static final class Serializer implements ICompactSerializer < DropColumnFamily > { public void serialize ( DropColumnFamily dropColumnFamily , DataOutputStream dos ) throws IOException { } public DropColumnFamily deserialize ( DataInputStream dis ) throws IOException { } } }

Fix:
Table . open ( ksm . name ) . dropCf ( cfm . cfId ) ;
Buggy code:
final class HttpServletRequestFacade implements HttpServletRequest { private static StringManager sm = StringManager . getManager ( "org.apache.tomcat.resources" ) ; private Request request ; HttpSessionFacade sessionFacade ; ServletInputStreamFacade isFacade = new ServletInputStreamFacade ( ) ; boolean isFacadeInitialized = false ; BufferedReader reader ; private boolean usingStream = false ; private boolean usingReader = false ; HttpServletRequestFacade ( Request request ) { } void recycle ( ) { } Request getRealRequest ( ) { } void setRequest ( Request req ) { } public Object getAttribute ( String name ) { } public Enumeration getAttributeNames ( ) { } public void setAttribute ( String name , Object value ) { } public void removeAttribute ( String name ) { } public String getCharacterEncoding ( ) { } public int getContentLength ( ) { } public String getContentType ( ) { } public Cookie [ ] getCookies ( ) { } public long getDateHeader ( String name ) { } public String getHeader ( String name ) { } public Enumeration getHeaders ( String name ) { } public Enumeration getHeaderNames ( ) { } public ServletInputStream getInputStream ( ) throws IOException { } public int getIntHeader ( String name ) throws NumberFormatException { } public String getMethod ( ) { } public String getParameter ( String name ) { } public String [ ] getParameterValues ( String name ) { } public Enumeration getParameterNames ( ) { } public String getPathInfo ( ) { } public String getPathTranslated ( ) { } public String getProtocol ( ) { } public String getQueryString ( ) { } public String getRemoteUser ( ) { } public String getScheme ( ) { } public String getServerName ( ) { } public int getServerPort ( ) { } public BufferedReader getReader ( ) throws IOException { } public String getRemoteAddr ( ) { } public String getRemoteHost ( ) { } public String getRequestURI ( ) { } public RequestDispatcher getRequestDispatcher ( String path ) { } public Locale getLocale ( ) { } public Enumeration getLocales ( ) { <START_BUG> return RequestUtil . getLocales ( request ) ; <END_BUG> } public String getContextPath ( ) { } public String getServletPath ( ) { } public String getRealPath ( String name ) { } public String getAuthType ( ) { } public boolean isSecure ( ) { } public boolean isUserInRole ( String role ) { } public Principal getUserPrincipal ( ) { } public HttpSession getSession ( ) { } public HttpSession getSession ( boolean create ) { } public String getRequestedSessionId ( ) { } public boolean isRequestedSessionIdValid ( ) { } public boolean isRequestedSessionIdFromCookie ( ) { } public boolean isRequestedSessionIdFromUrl ( ) { } public boolean isRequestedSessionIdFromURL ( ) { } }

Fix:
return RequestUtil . getLocales ( request . getMimeHeaders ( ) ) ;
Buggy code:
public class ChildFirstClassLoaderKernelServicesFactory { public static KernelServices create ( List < ModelNode > bootOperations , boolean validateOperations , ModelVersion legacyModelVersion , List < LegacyModelInitializerEntry > modelInitializerEntries ) throws Exception { TestModelType type = TestModelType . DOMAIN ; XMLMapper xmlMapper = Factory . create ( ) ; TestParser testParser = TestParser . create ( null , xmlMapper , type ) ; ModelInitializer modelInitializer = null ; if ( ( modelInitializerEntries != null ) && ( ( modelInitializerEntries . size ( ) ) > 0 ) ) { modelInitializer = new ChildFirstClassLoaderKernelServicesFactory . LegacyModelInitializer ( modelInitializerEntries ) ; } RunningModeControl runningModeControl = new org . jboss . as . host . controller . HostRunningModeControl ( RunningMode . ADMIN_ONLY , RestartMode . HC_ONLY ) ; ExtensionRegistry extensionRegistry = new ExtensionRegistry ( ProcessType . HOST_CONTROLLER , runningModeControl ) ; <START_BUG> return AbstractKernelServicesImpl . create ( HOST_CONTROLLER , runningModeControl , validateOperations , bootOperations , testParser , legacyModelVersion , type , modelInitializer , extensionRegistry ) ; <END_BUG> } private static class LegacyModelInitializer implements ModelInitializer { private final List < LegacyModelInitializerEntry > entries ; LegacyModelInitializer ( List < LegacyModelInitializerEntry > entries ) { } @ Override public void populateModel ( Resource rootResource ) { } } }

Fix:
return AbstractKernelServicesImpl . create ( HOST_CONTROLLER , runningModeControl , validateOperations , bootOperations , testParser , legacyModelVersion , type , modelInitializer , extensionRegistry , null ) ;
Buggy code:
public class DockerContainers extends ConcurrentHashMap < String , DockerContainer > { public DockerContainers ( ) { } public DockerContainer create ( CreateAgentRequest request , PluginSettings settings ) throws Exception { } public void refresh ( String containerId , PluginSettings settings ) throws Exception { } public void terminate ( String containerId , PluginSettings settings ) throws Exception { } public void terminateUnregisteredInstances ( PluginSettings settings , Agents agents ) throws Exception { DockerContainers toTerminate = unregisteredAfterTimeout ( settings , agents ) ; if ( toTerminate . isEmpty ( ) ) { return ; } DockerPlugin . LOG . warn ( ( ( "Terminating<seq2seq4repair_space>instances<seq2seq4repair_space>that<seq2seq4repair_space>did<seq2seq4repair_space>not<seq2seq4repair_space>register<seq2seq4repair_space>" + ( toTerminate . keySet ( ) ) ) + "." ) ) ; for ( DockerContainer container : toTerminate . values ( ) ) { <START_BUG> terminate ( container . id ( ) , settings ) ; <END_BUG> } } private void register ( DockerContainer container ) { } private DockerContainer dockerContainer ( Container container ) { } private DockerClient docker ( PluginSettings settings ) throws Exception { } private DockerContainers unregisteredAfterTimeout ( PluginSettings settings , Agents knownAgents ) throws Exception { } }

Fix:
toTerminate . terminate ( container . id ( ) , settings ) ;
Buggy code:
public class GcmIntentService extends IntentService { public static final int NOTIFICATION_ID = 1 ; public GcmIntentService ( ) { } @ Override protected void onHandleIntent ( Intent intent ) { } private void sendNotification ( String msg ) { String [ ] msgSplit = msg . split ( "," , 2 ) ; String news = msgSplit [ 1 ] . substring ( 29 ) ; NotificationCompat . BigTextStyle bigStyle = new NotificationCompat . BigTextStyle ( ) ; bigStyle . bigText ( news ) ; NotificationCompat . WearableExtender wearableExtender = new NotificationCompat . WearableExtender ( ) . setBackground ( BitmapFactory . decodeResource ( getResources ( ) , ht ) ) ; Intent i = new Intent ( this , ExpressWay . class ) ; i . putExtra ( "express_way" , msgSplit [ 0 ] ) ; <START_BUG> PendingIntent contentIntent = PendingIntent . getActivity ( this , 0 , i , FLAG_UPDATE_CURRENT ) ; <END_BUG> NotificationCompat . Builder mBuilder = new NotificationCompat . Builder ( this ) . setSmallIcon ( logo ) . setContentTitle ( "Heavy<seq2seq4repair_space>Traffic" ) . setStyle ( new NotificationCompat . BigTextStyle ( ) . bigText ( msgSplit [ 0 ] ) ) . setContentText ( news ) . setContentIntent ( contentIntent ) . setStyle ( bigStyle ) . extend ( wearableExtender ) ; mBuilder . setDefaults ( DEFAULT_SOUND ) ; mBuilder . setAutoCancel ( true ) ; NotificationManagerCompat notificationManager = NotificationManagerCompat . from ( this ) ; notificationManager . notify ( GcmIntentService . NOTIFICATION_ID , mBuilder . build ( ) ) ; } No newline ; at end ; of file ; }

Fix:
PendingIntent contentIntent = PendingIntent . getActivity ( this , 0 , i , FLAG_CANCEL_CURRENT ) ;
Buggy code:
public class BeanShellSamplerGui extends AbstractSamplerGui { private JTextField filename ; private JTextField parameters ; private JTextArea scriptField ; public BeanShellSamplerGui ( ) { } public void configure ( TestElement element ) { } public TestElement createTestElement ( ) { } public void modifyTestElement ( TestElement te ) { } public String getStaticLabel ( ) { <START_BUG> return ( JMeterUtils . getResString ( "bsh_sampler_title" ) ) + "<seq2seq4repair_space>(BETA<seq2seq4repair_space>CODE)" ; <END_BUG> } private JPanel createFilenamePanel ( ) { } private JPanel createParameterPanel ( ) { } private void init ( ) { } private JPanel createScriptPanel ( ) { } }

Fix:
return JMeterUtils . getResString ( "bsh_sampler_title" ) ;
Buggy code:
class SegmentTermDocs implements TermDocs { protected SegmentReader parent ; private InputStream freqStream ; private int count ; private int df ; private BitVector deletedDocs ; int doc = 0 ; int freq ; private int skipInterval ; private int skipCount ; private InputStream skipStream ; private int skipDoc ; private long freqPointer ; private long proxPointer ; private long skipPointer ; private boolean haveSkipped ; SegmentTermDocs ( SegmentReader parent ) throws IOException { } public void seek ( Term term ) throws IOException { } public void seek ( ) { } void seek ( TermInfo ti ) throws IOException { } public void close ( ) throws IOException { } public final int doc ( ) { } public final int freq ( ) { } protected void skippingDoc ( ) throws IOException { } public boolean next ( ) throws IOException { } public int read ( final int [ ] docs , final int [ ] freqs ) throws IOException { } protected void skipProx ( long proxPointer ) throws IOException { } public boolean skipTo ( int target ) throws IOException { if ( ( df ) > ( skipInterval ) ) { if ( ( skipStream ) == null ) skipStream = ( ( InputStream ) ( freqStream . clone ( ) ) ) ; if ( ! ( haveSkipped ) ) { skipStream . seek ( skipPointer ) ; haveSkipped = true ; } int lastSkipDoc = skipDoc ; long lastFreqPointer = freqStream . getFilePointer ( ) ; long lastProxPointer = - 1 ; int numSkipped = ( - 1 ) - ( ( count ) % ( skipInterval ) ) ; while ( target > ( skipDoc ) ) { lastSkipDoc = skipDoc ; lastFreqPointer = freqPointer ; lastProxPointer = proxPointer ; <START_BUG> if ( ( skipDoc ) >= ( doc ) ) <END_BUG> numSkipped += skipInterval ; if ( ( ( ( count ) + numSkipped ) + ( skipInterval ) ) > ( df ) ) break ; skipDoc += skipStream . readVInt ( ) ; freqPointer += skipStream . readVInt ( ) ; proxPointer += skipStream . readVInt ( ) ; ( skipCount ) ++ ; } if ( lastFreqPointer > ( freqStream . getFilePointer ( ) ) ) { freqStream . seek ( lastFreqPointer ) ; skipProx ( lastProxPointer ) ; doc = lastSkipDoc ; count += numSkipped ; } } do { if ( ! ( next ( ) ) ) return false ; } while ( target > ( doc ) ) ; return true ; } }

Fix:
if ( ( ( skipDoc ) != 0 ) && ( ( skipDoc ) >= ( doc ) ) )
Buggy code:
public class MainActivity extends FragmentActivity { public static CustomViewPager viewPager ; public static DynamicFragmentPagerAdapter adapter ; private static int currentPosition = 0 ; public static int count = 0 ; @ Override protected void onCreate ( Bundle savedInstanceState ) { } @ Override public boolean onCreateOptionsMenu ( Menu menu ) { } @ Override public boolean onOptionsItemSelected ( MenuItem item ) { } public static void createFragment ( String url ) { <START_BUG> if ( url . equals ( null ) ) <END_BUG> MainActivity . adapter . add ( ( "page" + ( ( MainActivity . count ) ++ ) ) , new CustomWebViewFragment ( null ) ) ; else MainActivity . adapter . add ( ( "page" + ( ( MainActivity . count ) ++ ) ) , new CustomWebViewFragment ( url ) ) ; MainActivity . adapter . notifyDataSetChanged ( ) ; MainActivity . viewPager . setCurrentItem ( ( ( MainActivity . adapter . getCount ( ) ) - 1 ) ) ; } public static void removeFragment ( ) { } }

Fix:
if ( url == null )
Buggy code:
@ Repository @ Transactional public class WebCodeRepository { @ PersistenceContext private EntityManager entityManager ; public WebCode save ( WebCode code ) { } public WebCode findOne ( Long aLong ) { } public List < WebCode > findWebCodeForTeam ( Party team ) { } public WebCode findWebCodeForTeamAndWebAgent ( Party team , WebAgent agent ) { } public boolean deleteCodeForParty ( Long partyId ) { try { <START_BUG> entityManager . createQuery ( ( "DELETE<seq2seq4repair_space>From<seq2seq4repair_space>WebCode<seq2seq4repair_space>a,<seq2seq4repair_space>Party<seq2seq4repair_space>b<seq2seq4repair_space>Where<seq2seq4repair_space>a.party<seq2seq4repair_space>=<seq2seq4repair_space>b.party" + "<seq2seq4repair_space>AND<seq2seq4repair_space>b.party.id<seq2seq4repair_space>=<seq2seq4repair_space>:partyId" ) ) . setParameter ( "partyId" , partyId ) . executeUpdate ( ) ; <END_BUG> return true ; } catch ( PersistenceException e ) { return false ; } } }

Fix:
entityManager . createQuery ( ( "DELETE<seq2seq4repair_space>From<seq2seq4repair_space>WebCode<seq2seq4repair_space>a<seq2seq4repair_space>Where" + "<seq2seq4repair_space>a.party.id<seq2seq4repair_space>=<seq2seq4repair_space>:partyId" ) ) . setParameter ( "partyId" , partyId ) . executeUpdate ( ) ;
Buggy code:
public class BlackBar extends Actor { private Texture tex ; public BlackBar ( ) { } @ Override public void draw ( Batch batch , float alpha ) { <START_BUG> batch . draw ( tex , 0 , 0 , REN_WIDTH , REN_HEIGHT ) ; <END_BUG> } }

Fix:
batch . draw ( tex , 0 , 0 , WIDTH , HEIGHT ) ;
Buggy code:
public class KEYRecord extends Record { private short flags ; private byte proto ; private byte alg ; private byte [ ] key ; private int footprint = - 1 ; public static final int FLAG_NOCONF = 32768 ; public static final int FLAG_NOAUTH = 16384 ; public static final int FLAG_NOKEY = 49152 ; public static final int OWNER_ZONE = 256 ; public static final int OWNER_HOST = 512 ; public static final int OWNER_USER = 0 ; public static final int PROTOCOL_TLS = 1 ; public static final int PROTOCOL_EMAIL = 2 ; public static final int PROTOCOL_DNSSEC = 3 ; public static final int PROTOCOL_IPSEC = 4 ; public static final int PROTOCOL_ANY = 255 ; private KEYRecord ( ) { } public KEYRecord ( Name _name , short _dclass , int _ttl , int _flags , int _proto , int _alg , byte [ ] _key ) { } KEYRecord ( Name _name , short _dclass , int _ttl , int length , DataByteInputStream in , Compression c ) throws IOException { } KEYRecord ( Name _name , short _dclass , int _ttl , MyStringTokenizer st , Name origin ) throws IOException { } public String rdataToString ( ) { } public short getFlags ( ) { } public byte getProtocol ( ) { } public byte getAlgorithm ( ) { } public byte [ ] getKey ( ) { } public short getFootprint ( ) { if ( ( footprint ) >= 0 ) return ( ( short ) ( footprint ) ) ; int foot = 0 ; DataByteOutputStream out = new DataByteOutputStream ( ) ; try { rrToWire ( out , null ) ; } catch ( IOException e ) { } byte [ ] rdata = out . toByteArray ( ) ; <START_BUG> if ( ( alg ) == ( DNSSEC . RSA ) ) { <END_BUG> int d1 = ( rdata [ ( ( rdata . length ) - 3 ) ] ) & 255 ; int d2 = ( rdata [ ( ( rdata . length ) - 2 ) ] ) & 255 ; foot = ( d1 << 8 ) + d2 ; } else { int i ; for ( i = 0 ; i < ( ( rdata . length ) - 1 ) ; i += 2 ) { int d1 = ( rdata [ i ] ) & 255 ; int d2 = ( rdata [ ( i + 1 ) ] ) & 255 ; foot += ( d1 << 8 ) + d2 ; } if ( i < ( rdata . length ) ) { int d1 = ( rdata [ i ] ) & 255 ; foot += d1 << 8 ; } foot += ( foot > > 16 ) & 65535 ; } footprint = foot & 65535 ; return ( ( short ) ( footprint ) ) ; } void rrToWire ( DataByteOutputStream out , Compression c ) throws IOException { } }

Fix:
if ( ( alg ) == ( DNSSEC . RSAMD5 ) ) {
Buggy code:
public class TestLuceneDictionary extends LuceneTestCase { private Directory store ; private IndexReader indexReader = null ; private LuceneDictionary ld ; private BytesRefIterator it ; private BytesRef spare = new BytesRef ( ) ; @ Override public void setUp ( ) throws Exception { super . setUp ( ) ; store = newDirectory ( ) ; IndexWriter writer = new IndexWriter ( store , newIndexWriterConfig ( TEST_VERSION_CURRENT , new org . apache . lucene . analysis . MockAnalyzer ( random ( ) , MockTokenizer . WHITESPACE , false ) ) ) ; Document doc ; doc = new Document ( ) ; doc . add ( newTextField ( "aaa" , "foo" , YES ) ) ; writer . addDocument ( doc ) ; doc = new Document ( ) ; doc . add ( newTextField ( "aaa" , "foo" , YES ) ) ; writer . addDocument ( doc ) ; doc = new Document ( ) ; doc . add ( newTextField ( "contents" , "Tom" , YES ) ) ; writer . addDocument ( doc ) ; doc = new Document ( ) ; doc . add ( newTextField ( "contents" , "Jerry" , YES ) ) ; writer . addDocument ( doc ) ; doc = new Document ( ) ; doc . add ( newTextField ( "zzz" , "bar" , YES ) ) ; writer . addDocument ( doc ) ; writer . forceMerge ( 1 ) ; <START_BUG> writer . close ( ) ; <END_BUG> } @ Override public void tearDown ( ) throws Exception { } public void testFieldNonExistent ( ) throws IOException { } public void testFieldAaa ( ) throws IOException { } public void testFieldContents_1 ( ) throws IOException { } public void testFieldContents_2 ( ) throws IOException { } public void testFieldZzz ( ) throws IOException { } public void testSpellchecker ( ) throws IOException { } }

Fix:
writer . shutdown ( ) ;
Buggy code:
public class SabaClient { private static SabaClient sabaClient ; private static Context mContext ; private static final String SABA_BASE_URL = "http:////www.saba-igc.org//mobileapp//datafeedproxy.php?sheetName=weekly&sheetId=" ; private static String PRAY_TIME_INFO_URL = "http:////praytime.info//getprayertimes.php?lat=34.024899&lon=-117.89730099999997&gmt=-480&m=11&d=31&y=2014&school=0" ; private static String PRAY_TIME_INFO_BASE_URL = "http:////praytime.info//getprayertimes.php?school=0&gmt=" ; private static final int TIME_OUT = 30000 ; public static synchronized SabaClient getInstance ( Context context ) { } public void getUpcomingPrograms ( final SabaServerResponseListener targert ) { } public void getWeeklyPrograms ( final SabaServerResponseListener targert ) { } public void getCommunityAnnouncements ( final SabaServerResponseListener targert ) { } public void getGeneralAnnouncements ( final SabaServerResponseListener targert ) { } private void sendRequest ( final String programName , final String url , final SabaServerResponseListener targert ) { } public void getCachedPrograms ( String string , SabaServerResponseListener target ) { } <START_BUG> public void getPrayTimes ( String timeZoneOffsetInMinutes , double longitude , double latitude , SabaServerResponseListener target ) { <END_BUG> StringBuilder sb = new StringBuilder ( SabaClient . PRAY_TIME_INFO_BASE_URL ) ; sb . append ( timeZoneOffsetInMinutes ) ; sb . append ( "&lat=" ) ; sb . append ( latitude ) ; sb . append ( "&lon=" ) ; sb . append ( longitude ) ; sb . append ( "&m=" ) ; sb . append ( ( ( Calendar . getInstance ( ) . get ( Calendar . MONTH ) ) + 1 ) ) ; sb . append ( "&d=" ) ; sb . append ( Calendar . getInstance ( ) . get ( Calendar . DAY_OF_MONTH ) ) ; sb . append ( "&y=" ) ; sb . append ( Calendar . getInstance ( ) . get ( Calendar . YEAR ) ) ; Log . d ( "PrayerTime<seq2seq4repair_space>URL:<seq2seq4repair_space>" , sb . toString ( ) ) ; sendRequest ( "Pray<seq2seq4repair_space>Times" , sb . toString ( ) , target ) ; } No newline ; at end ; of file ; }

Fix:
public void getPrayTimes ( String timeZoneOffsetInMinutes , double latitude , double longitude , SabaServerResponseListener target ) {
Buggy code:
public class ConnectorView implements ConnectorViewMBean { private final Connector connector ; public ConnectorView ( Connector connector ) { } @ Override public void start ( ) throws Exception { } public String getBrokerName ( ) { } @ Override public void stop ( ) throws Exception { } public String getBrokerURL ( ) { } public BrokerInfo getBrokerInfo ( ) { } @ Override public void resetStatistics ( ) { } @ Override public void enableStatistics ( ) { } @ Override public void disableStatistics ( ) { } @ Override public boolean isStatisticsEnabled ( ) { } @ Override public int connectionCount ( ) { } @ Override public boolean isUpdateClusterClients ( ) { <START_BUG> return this . connector . isUpdateClusterClientsOnRemove ( ) ; <END_BUG> } @ Override public boolean isRebalanceClusterClients ( ) { } @ Override public boolean isUpdateClusterClientsOnRemove ( ) { } @ Override public String getUpdateClusterFilter ( ) { } @ Override public boolean isAllowLinkStealingEnabled ( ) { } }

Fix:
return this . connector . isUpdateClusterClients ( ) ;
Buggy code:
public class Label extends Control { String text = "" ; Image image ; boolean isImage ; public Label ( Composite parent , int style ) { } static int checkStyle ( int style ) { } public Point computeSize ( int wHint , int hHint , boolean changed ) { } void createHandle ( ) { <START_BUG> state |= GRAB ; <END_BUG> int [ ] outControl = new int [ 1 ] ; int window = OS . GetControlOwner ( handle ) ; if ( ( ( style ) & ( SWT . SEPARATOR ) ) != 0 ) { OS . CreateSeparatorControl ( window , null , outControl ) ; } else { int just = OS . teFlushLeft ; if ( ( ( style ) & ( SWT . CENTER ) ) != 0 ) just = OS . teCenter ; if ( ( ( style ) & ( SWT . RIGHT ) ) != 0 ) just = OS . teFlushRight ; ControlFontStyleRec fontStyle = new ControlFontStyleRec ( ) ; fontStyle . flags |= OS . kControlUseJustMask ; fontStyle . just = ( ( short ) ( just ) ) ; OS . CreateStaticTextControl ( window , null , 0 , fontStyle , outControl ) ; } if ( ( outControl [ 0 ] ) == 0 ) error ( ERROR_NO_HANDLES ) ; handle = outControl [ 0 ] ; } int defaultThemeFont ( ) { } void drawBackground ( int control , int context ) { } void drawWidget ( int control , int context , int damageRgn , int visibleRgn , int theEvent ) { } public int getAlignment ( ) { } public int getBorderWidth ( ) { } public Image getImage ( ) { } String getNameText ( ) { } public String getText ( ) { } public void setAlignment ( int alignment ) { } public void setImage ( Image image ) { } public void setText ( String string ) { } }

Fix:
state |= ( GRAB ) | ( THEME_BACKGROUND ) ;
Buggy code:
@ RestController @ RequestMapping ( "//auth" ) public class UserManagementController { @ Autowired UserManager userManager ; @ RequestMapping ( value = "//create_user" , method = RequestMethod . POST , consumes = MediaType . APPLICATION_JSON_VALUE , produces = "application//json;<seq2seq4repair_space>charset=utf-8" ) public String createUser ( @ RequestBody UserCreationJSONObject userInfo ) throws UserCreationException , UserRetrievalException { } @ RequestMapping ( value = "//update_user" , method = RequestMethod . POST , consumes = MediaType . APPLICATION_JSON_VALUE , produces = "application//json;<seq2seq4repair_space>charset=utf-8" ) public String updateUserDetails ( @ RequestBody UserInfoJSONObject userInfo ) throws UserPermissionRetrievalException , UserRetrievalException { } @ RequestMapping ( value = "//delete_user" , method = RequestMethod . DELETE , produces = "application//json;<seq2seq4repair_space>charset=utf-8" ) public String deleteUser ( @ RequestParam ( "userName" ) String userName ) throws UserRetrievalException { } @ RequestMapping ( value = "//reset_password" , method = RequestMethod . POST , consumes = MediaType . APPLICATION_JSON_VALUE , produces = "application//json;<seq2seq4repair_space>charset=utf-8" ) public String resetPassword ( @ RequestBody LoginCredentials newCredentials ) throws UserRetrievalException { <START_BUG> userManager . updateUserPassword ( newCredentials . getPassword ( ) , newCredentials . getPassword ( ) ) ; <END_BUG> return "{\"passwordUpdated\"<seq2seq4repair_space>:<seq2seq4repair_space>true<seq2seq4repair_space>}" ; } @ RequestMapping ( value = "//grant_user_role" , method = RequestMethod . POST , consumes = MediaType . APPLICATION_JSON_VALUE , produces = "application//json;<seq2seq4repair_space>charset=utf-8" ) public String grantUserRole ( @ RequestBody GrantRoleJSONObject grantRoleObj ) throws UserPermissionRetrievalException , UserManagementException , UserRetrievalException { } @ RequestMapping ( value = "//grant_user_admin" , method = RequestMethod . POST , consumes = MediaType . APPLICATION_JSON_VALUE , produces = "application//json;<seq2seq4repair_space>charset=utf-8" ) public String grantUserAdmin ( @ RequestBody GrantAdminJSONObject grantAdminObj ) throws UserPermissionRetrievalException , UserManagementException , UserRetrievalException { } @ RequestMapping ( value = "//list_users" , method = RequestMethod . GET , produces = "application//json;<seq2seq4repair_space>charset=utf-8" ) @ ResponseBody public UserListJSONObject getUsers ( ) { } @ RequestMapping ( value = "//user_details" , method = RequestMethod . GET , produces = "application//json;<seq2seq4repair_space>charset=utf-8" ) @ ResponseBody public UserInfoJSONObject getUser ( @ RequestParam ( "userName" ) String userName ) throws UserRetrievalException { } }

Fix:
userManager . updateUserPassword ( newCredentials . getUserName ( ) , newCredentials . getPassword ( ) ) ;
Buggy code:
public final class Tester implements CommandRunnerObserver { private static final Log log = LogFactory . getLog ( Tester . class ) ; private static HttpClientParams params ; private int activeThreads = 0 ; private final List < Command > commands ; private String host = "localhost" ; private final boolean multipleSessions ; private final int numberOfThreads ; private int port = 8090 ; public Tester ( Command command , int numberOfThreads , boolean multipleSessions ) { } public Tester ( List < Command > commands , int numberOfThreads , boolean multipleSessions ) { } public String getHost ( ) { } public int getPort ( ) { } public synchronized void onDone ( CommandRunner runner ) { } public synchronized void onError ( CommandRunner runner , Exception e ) { } public void run ( ) throws Exception { activeThreads = 0 ; Server server = new Server ( port ) ; <START_BUG> WebAppContext ctx = new WebAppContext ( ".//src//webapp" , "//" ) ; <END_BUG> server . addHandler ( ctx ) ; server . start ( ) ; HttpConnectionManagerParams connManagerParams = new HttpConnectionManagerParams ( ) ; connManagerParams . setDefaultMaxConnectionsPerHost ( ( ( numberOfThreads ) * 2 ) ) ; MultiThreadedHttpConnectionManager manager = new MultiThreadedHttpConnectionManager ( ) ; manager . setParams ( connManagerParams ) ; try { ThreadGroup g = new ThreadGroup ( "runners" ) ; Thread [ ] threads = new Thread [ numberOfThreads ] ; HttpClient client = null ; for ( int i = 0 ; i < ( numberOfThreads ) ; i ++ ) { if ( multipleSessions ) { client = new HttpClient ( Tester . params , manager ) ; client . getHostConfiguration ( ) . setHost ( host , port ) ; } else { if ( client == null ) { client = new HttpClient ( Tester . params , manager ) ; client . getHostConfiguration ( ) . setHost ( host , port ) ; } } threads [ i ] = new Thread ( g , new CommandRunner ( commands , client , this ) ) ; } long start = System . currentTimeMillis ( ) ; for ( int i = 0 ; i < ( numberOfThreads ) ; i ++ ) { ( activeThreads ) ++ ; threads [ i ] . start ( ) ; } while ( ( activeThreads ) > 0 ) { synchronized ( this ) { wait ( ) ; } } long end = System . currentTimeMillis ( ) ; Tester . log . info ( ( ( "\n********<seq2seq4repair_space>finished<seq2seq4repair_space>in<seq2seq4repair_space>" + ( end - start ) ) + "<seq2seq4repair_space>miliseconds\n" ) ) ; } finally { MultiThreadedHttpConnectionManager . shutdownAll ( ) ; server . stop ( ) ; } } public void setHost ( String host ) { } public void setPort ( int port ) { } }

Fix:
WebAppContext ctx = new WebAppContext ( ".//src//main//webapp" , "//" ) ;
Buggy code:
public class ObjectivesComparator implements Comparator < Objectives > { @ Override public int compare ( Objectives o1 , Objectives o2 ) { <START_BUG> return o1 . compareTo ( o1 ) ; <END_BUG> } }

Fix:
return o1 . compareTo ( o2 ) ;
Buggy code:
@ ManagedBean @ SessionScoped public class CalculatorBean implements Serializable { private static final long serialVersionUID = 1L ; private String color = "#0F0" ; @ Min ( 7L ) @ Max ( 50L ) @ NotNull private int number1 = 42 ; @ Max ( 100L ) @ Min ( 10L ) @ NotNull private int number2 = 65 ; @ Max ( 100L ) @ Min ( 10L ) @ NotNull private int number3 = 33 ; private int sum = 0 ; public String add ( ) { sum = ( number1 ) + ( number2 ) ; String msg = ( ( ( ( "Last<seq2seq4repair_space>calculation<seq2seq4repair_space>on<seq2seq4repair_space>the<seq2seq4repair_space>server<seq2seq4repair_space>side:<seq2seq4repair_space>" + ( number1 ) ) + "+" ) + ( number2 ) ) + "=" ) + ( sum ) ; <START_BUG> FacesContext . getCurrentInstance ( ) . addMessage ( null , new FacesMessage ( FacesMessage . SEVERITY_INFO , msg , msg ) ) ; <END_BUG> return null ; } public String getColor ( ) { } public int getNumber1 ( ) { } public int getNumber2 ( ) { } public int getNumber3 ( ) { } public int getResult ( ) { } public int getServerSideResult ( ) { } public void setServerSideResult ( int result ) { } public void setRandomNumberFromServer ( int random ) { } public void setColor ( String color ) { } public void setNumber1 ( int number1 ) { } public void setNumber2 ( int number2 ) { } public void setNumber3 ( int i ) { } public void setResult ( int result ) { } public String getGridStyle ( ) { } public String getHeaderText ( ) { } public String getResultCaption ( ) { } public int getRandomNumberFromServer ( ) { } }

Fix:
FacesContext . getCurrentInstance ( ) . addMessage ( null , new FacesMessage ( FacesMessage . SEVERITY_INFO , "" , msg ) ) ;
Buggy code:
@ Repository public interface CommitRepository extends CrudRepository < CommitEntity , Long > { public List < CommitEntity > findByUserAndDate ( String username , DateTime date ) { } public List < CommitEntity > findByUser ( String username ) { } @ Query ( "SELECT<seq2seq4repair_space>commit<seq2seq4repair_space>FROM<seq2seq4repair_space>CommitEntity<seq2seq4repair_space>commit<seq2seq4repair_space>WHERE<seq2seq4repair_space>" + ( ( "commit.user<seq2seq4repair_space>=<seq2seq4repair_space>:user<seq2seq4repair_space>AND<seq2seq4repair_space>commit.date<seq2seq4repair_space>>=<seq2seq4repair_space>:startDate<seq2seq4repair_space>" + "AND<seq2seq4repair_space>commit.date<seq2seq4repair_space><=<seq2seq4repair_space>:endDate<seq2seq4repair_space>" ) + "AND<seq2seq4repair_space>HOUR(commit.date)<seq2seq4repair_space>>=<seq2seq4repair_space>:startHour<seq2seq4repair_space>AND<seq2seq4repair_space>HOUR(commit.date)<seq2seq4repair_space><<seq2seq4repair_space>:endHour" ) ) public List < CommitEntity > findByHourAndUser ( @ Param ( "user" ) String user , @ Param ( "startDate" ) DateTime startDate , @ Param ( "endDate" ) DateTime endDate , @ Param ( "startHour" ) int startHour , @ Param ( "endHour" ) int endHour ) { } @ Query ( "SELECT<seq2seq4repair_space>commit<seq2seq4repair_space>FROM<seq2seq4repair_space>CommitEntity<seq2seq4repair_space>commit<seq2seq4repair_space>WHERE<seq2seq4repair_space>" + ( ( "commit.user<seq2seq4repair_space>=<seq2seq4repair_space>:user<seq2seq4repair_space>AND<seq2seq4repair_space>" + "commit.date<seq2seq4repair_space>>=<seq2seq4repair_space>:startDate<seq2seq4repair_space>AND<seq2seq4repair_space>" ) + "commit.date<seq2seq4repair_space><<seq2seq4repair_space>:endDate" ) ) public List < CommitEntity > findByUserAndDateAtMidNight ( @ Param ( "user" ) String username , @ Param ( "startDate" ) DateTime startDate , @ Param ( "endDate" ) DateTime endDate ) { } <START_BUG> @ Query ( "SELECT<seq2seq4repair_space>commit<seq2seq4repair_space>FROM<seq2seq4repair_space>CommitEntity<seq2seq4repair_space>commit<seq2seq4repair_space>WHERE<seq2seq4repair_space>" + ( "commit.date<seq2seq4repair_space>>=<seq2seq4repair_space>:startDate<seq2seq4repair_space>AND<seq2seq4repair_space>" + "commit.date<seq2seq4repair_space><=<seq2seq4repair_space>:endDate" ) ) <END_BUG> public List < CommitEntity > findAllCommitsByDate ( @ Param ( "startDate" ) DateTime startDate , @ Param ( "endDate" ) DateTime endDate ) ; }

Fix:
@ Query ( "SELECT<seq2seq4repair_space>commit<seq2seq4repair_space>FROM<seq2seq4repair_space>CommitEntity<seq2seq4repair_space>commit<seq2seq4repair_space>WHERE<seq2seq4repair_space>" + ( "commit.date<seq2seq4repair_space>>=<seq2seq4repair_space>:startDate<seq2seq4repair_space>AND<seq2seq4repair_space>" + "commit.date<seq2seq4repair_space><<seq2seq4repair_space>:endDate" ) )
Buggy code:
public class JMSSubscriberGui extends AbstractSamplerGui implements ChangeListener { private static final long serialVersionUID = 240L ; private final JCheckBox useProperties = new JCheckBox ( JMeterUtils . getResString ( "jms_use_properties_file" ) , false ) ; private final JLabeledTextField jndiICF = new JLabeledTextField ( JMeterUtils . getResString ( "jms_initial_context_factory" ) ) ; private final JLabeledTextField urlField = new JLabeledTextField ( JMeterUtils . getResString ( "jms_provider_url" ) ) ; private final JLabeledTextField jndiConnFac = new JLabeledTextField ( JMeterUtils . getResString ( "jms_connection_factory" ) ) ; private final JLabeledTextField jmsDestination = new JLabeledTextField ( JMeterUtils . getResString ( "jms_topic" ) ) ; private final JLabeledTextField jmsUser = new JLabeledTextField ( JMeterUtils . getResString ( "jms_user" ) ) ; private final JLabeledTextField jmsPwd = new JLabeledTextField ( JMeterUtils . getResString ( "jms_pwd" ) ) ; private final JLabeledTextField iterations = new JLabeledTextField ( JMeterUtils . getResString ( "jms_itertions" ) ) ; private final JCheckBox useAuth = new JCheckBox ( JMeterUtils . getResString ( "jms_use_auth" ) , false ) ; private final JCheckBox readResponse = new JCheckBox ( JMeterUtils . getResString ( "jms_read_response" ) , true ) ; private final JLabeledTextField timeout = new JLabeledTextField ( JMeterUtils . getResString ( "jms_timeout" ) ) ; public static final String RECEIVE_RSC = "jms_subscriber_receive" ; public static final String ON_MESSAGE_RSC = "jms_subscriber_on_message" ; private static final String [ ] CLIENT_ITEMS = new String [ ] { JMSSubscriberGui . RECEIVE_RSC , JMSSubscriberGui . ON_MESSAGE_RSC } ; private final JLabeledRadioI18N clientChoice = new JLabeledRadioI18N ( "jms_client_type" , JMSSubscriberGui . CLIENT_ITEMS , JMSSubscriberGui . RECEIVE_RSC ) ; private final JCheckBox stopBetweenSamples = new JCheckBox ( JMeterUtils . getResString ( "jms_stop_between_samples" ) , true ) ; public JMSSubscriberGui ( ) { } public String getLabelResource ( ) { } public TestElement createTestElement ( ) { } public void modifyTestElement ( TestElement s ) { } private void init ( ) { } @ Override public void configure ( TestElement el ) { } @ Override public void clearGui ( ) { super . clearGui ( ) ; useProperties . setSelected ( false ) ; jndiICF . setText ( "" ) ; urlField . setText ( "" ) ; jndiConnFac . setText ( "" ) ; jmsDestination . setText ( "" ) ; jmsUser . setText ( "" ) ; jmsPwd . setText ( "" ) ; <START_BUG> iterations . setText ( "" ) ; <END_BUG> timeout . setText ( "" ) ; useAuth . setSelected ( false ) ; readResponse . setSelected ( true ) ; clientChoice . setText ( JMSSubscriberGui . RECEIVE_RSC ) ; stopBetweenSamples . setSelected ( false ) ; } public void stateChanged ( ChangeEvent event ) { } }

Fix:
iterations . setText ( "1" ) ;
Buggy code:
public class RegionList { private final List < Region > regions ; private boolean dirty ; private final ConversionGraph acg ; public RegionList ( ConversionGraph acg ) { } public List < Region > getRegions ( ) { } public void makeDirty ( ) { } public void updateRegionList ( ) { if ( ! ( dirty ) ) return ; regions . clear ( ) ; List < Conversion > convOrderedByStart = Lists . newArrayList ( ) ; convOrderedByStart . addAll ( acg . getConversions ( ) ) ; convOrderedByStart . sort ( ( Conversion o1 , Conversion o2 ) -> o1 . startSite - o2 . startSite ) ; List < Conversion > convOrderedByEnd = Lists . newArrayList ( ) ; convOrderedByEnd . addAll ( acg . getConversions ( ) ) ; convOrderedByEnd . sort ( ( Conversion o1 , Conversion o2 ) -> o1 . endSite - o2 . endSite ) ; Set < Conversion > activeConversions = Sets . newHashSet ( ) ; Region currentRegion = new Region ( ) ; currentRegion . leftBoundary = 0 ; <START_BUG> while ( ( ! ( convOrderedByStart . isEmpty ( ) ) ) && ( ! ( convOrderedByEnd . isEmpty ( ) ) ) ) { <END_BUG> int nextConvStartBoundary = Integer . MAX_VALUE ; if ( ! ( convOrderedByStart . isEmpty ( ) ) ) nextConvStartBoundary = convOrderedByStart . get ( 0 ) . startSite ; int nextConvEndBoundary = - 1 ; if ( ! ( convOrderedByEnd . isEmpty ( ) ) ) nextConvEndBoundary = ( convOrderedByEnd . get ( 0 ) . endSite ) + 1 ; if ( nextConvStartBoundary < nextConvEndBoundary ) { if ( nextConvStartBoundary != ( currentRegion . leftBoundary ) ) { currentRegion . rightBoundary = nextConvStartBoundary ; regions . add ( currentRegion ) ; currentRegion = new Region ( ) ; currentRegion . leftBoundary = nextConvStartBoundary ; } activeConversions . add ( convOrderedByStart . get ( 0 ) ) ; currentRegion . activeConversions . add ( convOrderedByStart . get ( 0 ) ) ; convOrderedByStart . remove ( 0 ) ; } else { if ( nextConvEndBoundary != ( currentRegion . leftBoundary ) ) { currentRegion . rightBoundary = nextConvEndBoundary ; regions . add ( currentRegion ) ; currentRegion = new Region ( ) ; currentRegion . leftBoundary = nextConvEndBoundary ; } activeConversions . remove ( convOrderedByEnd . get ( 0 ) ) ; currentRegion . activeConversions . remove ( convOrderedByEnd . get ( 0 ) ) ; convOrderedByEnd . remove ( 0 ) ; } } if ( ( currentRegion . leftBoundary ) < ( acg . getSequenceLength ( ) ) ) { if ( ! ( currentRegion . isClonalFrame ( ) ) ) throw new RuntimeException ( "Error<seq2seq4repair_space>updating<seq2seq4repair_space>region<seq2seq4repair_space>list!" ) ; currentRegion . rightBoundary = acg . getSequenceLength ( ) ; regions . add ( currentRegion ) ; } dirty = false ; } }

Fix:
while ( ( ! ( convOrderedByStart . isEmpty ( ) ) ) || ( ! ( convOrderedByEnd . isEmpty ( ) ) ) ) {
Buggy code:
public class TaskDefinition { private URL taskLibraryURL ; private String taskName ; private String taskClassName ; private Class taskClass = null ; private ClassLoader taskClassLoader ; public TaskDefinition ( URL taskLibraryURL , String taskName , String taskClassName , ClassLoader taskClassLoader ) { } public String getName ( ) { } public String getTaskClassName ( ) { } public URL getLibraryURL ( ) { } public synchronized Class getExecutionTaskClass ( ) throws ClassNotFoundException { if ( ( taskClass ) == null ) { <START_BUG> taskClass = taskClassLoader . loadClass ( taskClassName ) ; <END_BUG> } return taskClass ; } }

Fix:
taskClass = Class . forName ( taskClassName , true , taskClassLoader ) ;
Buggy code:
public class ControlFlowGraphBuilder { private BasicBlock startingBlock = new BasicBlock ( ) ; private BasicBlock currentBlock = startingBlock ; private Conditional currentConditional = null ; private Stack < Conditional > condStack = new Stack < Conditional > ( ) ; private Stack < BasicBlock > blockStack = new Stack < BasicBlock > ( ) ; public void addStatement ( Statement statement ) { } public void addCondition ( RelationalOp op ) { } public void beginTrueBlock ( ) { if ( ( currentConditional ) == null ) <START_BUG> throw new RuntimeException ( "Conditonal<seq2seq4repair_space>is<seq2seq4repair_space>null." ) ; <END_BUG> currentBlock = currentConditional . getTrueBlock ( ) ; } public void beginFalseBlock ( ) { } public void endConditional ( ) { } public void clear ( ) { } public BasicBlock getStartingBlock ( ) { } }

Fix:
throw new RuntimeException ( "Conditional<seq2seq4repair_space>is<seq2seq4repair_space>null." ) ;