nus-yam/ex-repair huggingface dataset:
Buggy code:
public class ListOrderedMapTest < K , V > extends AbstractOrderedMapTest < K , V > { public ListOrderedMapTest ( final String testName ) { } public static Test suite ( ) { } @ Override public ListOrderedMap < K , V > makeObject ( ) { } @ Override public ListOrderedMap < K , V > makeFullMap ( ) { } public void testGetByIndex ( ) { } public void testGetValueByIndex ( ) { } public void testIndexOf ( ) { } @ SuppressWarnings ( "unchecked" ) public void testSetValueByIndex ( ) { } public void testRemoveByIndex ( ) { } @ SuppressWarnings ( "unchecked" ) public void testPut_intObjectObject ( ) { } public void testPutAllWithIndex ( ) { } public void testPutAllWithIndexBug441 ( ) { ListOrderedMapTest . resetEmpty ( ) ; final ListOrderedMap < K , V > lom = getMap ( ) ; final int size = 5 ; for ( int i = 0 ; i < size ; i ++ ) { lom . put ( ( ( K ) ( Integer . valueOf ( i ) ) ) , ( ( V ) ( Boolean . TRUE ) ) ) ; } final Map < K , V > map = new TreeMap < K , V > ( ) ; for ( int i = 0 ; i < size ; i ++ ) { map . put ( ( ( K ) ( Integer . valueOf ( i ) ) ) , ( ( V ) ( Boolean . FALSE ) ) ) ; } lom . putAll ( 3 , map ) ; final List < K > orderedList = lom . asList ( ) ; for ( int i = 0 ; i < size ; i ++ ) { <START_BUG> ListOrderedMapTest . assertEquals ( i , orderedList . get ( i ) ) ; <END_BUG> } } public void testValueList_getByIndex ( ) { } @ SuppressWarnings ( "unchecked" ) public void testValueList_setByIndex ( ) { } public void testValueList_removeByIndex ( ) { } public BulkTest bulkTestKeyListView ( ) { } public BulkTest bulkTestValueListView ( ) { } public class TestKeyListView extends AbstractListTest < K > { TestKeyListView ( ) { } @ Override public List < K > makeObject ( ) { } @ Override public List < K > makeFullCollection ( ) { } @ Override public K [ ] getFullElements ( ) { } @ Override public boolean isAddSupported ( ) { } @ Override public boolean isRemoveSupported ( ) { } @ Override public boolean isSetSupported ( ) { } @ Override public boolean isNullSupported ( ) { } @ Override public boolean isTestSerialization ( ) { } } public class TestValueListView extends AbstractListTest < V > { TestValueListView ( ) { } @ Override public List < V > makeObject ( ) { } @ Override public List < V > makeFullCollection ( ) { } @ Override public V [ ] getFullElements ( ) { } @ Override public boolean isAddSupported ( ) { } @ Override public boolean isRemoveSupported ( ) { } @ Override public boolean isSetSupported ( ) { } @ Override public boolean isNullSupported ( ) { } @ Override public boolean isTestSerialization ( ) { } } @ Override public String getCompatibilityVersion ( ) { } @ Override public ListOrderedMap < K , V > getMap ( ) { } }

Fix:
ListOrderedMapTest . assertEquals ( Integer . valueOf ( i ) , orderedList . get ( i ) ) ;
Buggy code:
public class MainClass { public static void main ( String [ ] args ) { File models = new File ( "xml//models.xml" ) ; if ( ! ( models . exists ( ) ) ) { try { models . getParentFile ( ) . mkdirs ( ) ; models . createNewFile ( ) ; FileOutputStream out = new FileOutputStream ( models ) ; out . write ( new String ( "<?xml<seq2seq4repair_space>version=\"1.0\"<seq2seq4repair_space>encoding=\"UTF-8\"?><model_base><//model_base>" ) . getBytes ( ) ) ; out . flush ( ) ; out . close ( ) ; } catch ( IOException e ) { e . printStackTrace ( ) ; System . err . println ( "Error:<seq2seq4repair_space>Unable<seq2seq4repair_space>to<seq2seq4repair_space>create<seq2seq4repair_space>model<seq2seq4repair_space>index<seq2seq4repair_space>file." ) ; } } <START_BUG> MainWindow window = new MainWindow ( ) ; <END_BUG> window . setVisible ( true ) ; } }

Fix:
final MainWindow window = new MainWindow ( ) ;
Buggy code:
@ Singleton public class CachedEntityCollectionManager implements EntityCollectionManager { private EntityCollectionManager targetEntityCollectionManager ; private Cache < Id , Entity > entityCache ; private Action1 < Entity > cacheAdd = new Action1 < Entity > ( ) { @ Override public void call ( final Entity entity ) { } } ; @ Inject public CachedEntityCollectionManager ( final EntityCacheFig entityCacheFig , final EntityCollectionManager targetEntityCollectionManager ) { } @ Override public Observable < Entity > write ( final Entity entity ) { } @ Override public Observable < Id > delete ( final Id entityId ) { } @ Override public Observable < Entity > load ( final Id entityId ) { final Entity entity = entityCache . getIfPresent ( entityId ) ; if ( entity != null ) { return Observable . just ( entity ) ; } <START_BUG> return Observable . empty ( ) ; <END_BUG> } @ Override public Observable < VersionSet > getLatestVersion ( final Collection < Id > entityId ) { } @ Override public Observable < Id > getIdField ( final Field field ) { } @ Override public Observable < EntitySet > load ( final Collection < Id > entityIds ) { } @ Override public Observable < Entity > update ( final Entity entity ) { } @ Override public Health getHealth ( ) { } }

Fix:
return targetEntityCollectionManager . load ( entityId ) . doOnNext ( cacheAdd ) ;
Buggy code:
public class SynchronizedQueue < T > { private T [ ] buffer ; private int producers ; private int i_size ; private int i_startingPoint ; private int i_producers ; private int i_capacity ; private Object queLocker ; @ SuppressWarnings ( "unchecked" ) public SynchronizedQueue ( int capacity ) { } public T dequeue ( ) { synchronized ( queLocker ) { while ( ( i_size ) == 0 ) { if ( ( producers ) == 0 ) { return null ; } try { queLocker . wait ( ) ; } catch ( Exception e ) { e . printStackTrace ( ) ; } } T i_item = buffer [ i_startingPoint ] ; ( i_size ) -- ; <START_BUG> i_startingPoint = ( ( i_startingPoint ) ++ ) % ( i_capacity ) ; <END_BUG> queLocker . notifyAll ( ) ; return i_item ; } } public void enqueue ( T item ) { } public int getCapacity ( ) { } public int getSize ( ) { } public synchronized void registerProducer ( ) { } public synchronized void unregisterProducer ( ) { } }

Fix:
i_startingPoint = ( ++ ( i_startingPoint ) ) % ( i_capacity ) ;
Buggy code:
public class ArgoFileFilter extends FileFilter { public boolean accept ( File f ) { } public String getExtension ( File f ) { } public String getDescription ( ) { <START_BUG> return "Argo<seq2seq4repair_space>v0.5<seq2seq4repair_space>file<seq2seq4repair_space>format" ; <END_BUG> } }

Fix:
return "Argo<seq2seq4repair_space>v0.5.2<seq2seq4repair_space>file<seq2seq4repair_space>format<seq2seq4repair_space>(*.argo)" ;
Buggy code:
public class ContactServlet extends HttpServlet { private static final long serialVersionUID = - 816076800806258221L ; private static final String EMAIL_PATTERN = "^[_A-Za-z0-9-\\+]+(\\.[_A-Za-z0-9-]+)*@" + "[A-Za-z0-9-]+(\\.[A-Za-z0-9]+)*(\\.[A-Za-z]{2,})$" ; private Pattern pattern = Pattern . compile ( ContactServlet . EMAIL_PATTERN ) ; @ Override protected void doPost ( HttpServletRequest req , HttpServletResponse resp ) throws IOException , ServletException { resp . setContentType ( "text//plain" ) ; String name = req . getParameter ( "contactName" ) ; String email = req . getParameter ( "contactEmail" ) ; String subject = req . getParameter ( "contactSubject" ) ; String message = req . getParameter ( "contactMessage" ) ; if ( ( subject == null ) || ( subject . equals ( "" ) ) ) subject = "Contact<seq2seq4repair_space>Form<seq2seq4repair_space>Submission" ; String error = "" ; if ( ( name == null ) || ( ( name . length ( ) ) < 2 ) ) error += "Please<seq2seq4repair_space>enter<seq2seq4repair_space>your<seq2seq4repair_space>name\n." ; if ( ( ( email == null ) || ( ( email . length ( ) ) < 5 ) ) || ( ! ( pattern . matcher ( email ) . matches ( ) ) ) ) error += "Please<seq2seq4repair_space>enter<seq2seq4repair_space>a<seq2seq4repair_space>valid<seq2seq4repair_space>email<seq2seq4repair_space>address.\n" ; if ( ( message == null ) || ( ( message . length ( ) ) < 8 ) ) error += "Your<seq2seq4repair_space>message<seq2seq4repair_space>seems<seq2seq4repair_space>too<seq2seq4repair_space>short.\n" ; if ( ( error . length ( ) ) > 0 ) { resp . getWriter ( ) . println ( error ) ; return ; } try { Message msg = new javax . mail . internet . MimeMessage ( Session . getDefaultInstance ( new Properties ( ) , null ) ) ; msg . setFrom ( new InternetAddress ( "nibras.reeza@gmail.com" , name ) ) ; msg . addRecipient ( TO , new InternetAddress ( "mail@nibrasweb.com" , "Nibras<seq2seq4repair_space>Reeza" ) ) ; msg . setSubject ( subject ) ; msg . setText ( ( ( ( "From:<seq2seq4repair_space>" + email ) + "\n\n" ) + message ) ) ; Transport . send ( msg ) ; } catch ( Exception e ) { resp . getWriter ( ) . println ( "Something<seq2seq4repair_space>went<seq2seq4repair_space>wrong.<seq2seq4repair_space>Please<seq2seq4repair_space>try<seq2seq4repair_space>again." ) ; throw new RuntimeException ( e ) ; } <START_BUG> resp . getWriter ( ) . println ( "OK" ) ; <END_BUG> } }

Fix:
resp . getWriter ( ) . print ( "OK" ) ;
Buggy code:
public class Activator implements BundleActivator { private static Activator plugin ; public static final String PLUGIN_ID = "org.eclipse.ecf.provider.discovery" ; public static Activator getDefault ( ) { } public Activator ( ) { } public void start ( final BundleContext context ) throws Exception { final Properties props = new Properties ( ) ; props . put ( CONTAINER_NAME , NAME ) ; props . put ( Constants . SERVICE_RANKING , new Integer ( 1000 ) ) ; String [ ] clazzes = new String [ ] { IDiscoveryService . class . getName ( ) , IDiscoveryLocator . class . getName ( ) , IDiscoveryAdvertiser . class . getName ( ) } ; context . registerService ( clazzes , new ServiceFactory ( ) { public Object getService ( final Bundle bundle , final ServiceRegistration registration ) { final CompositeDiscoveryContainer cdc ; cdc = new CompositeDiscoveryContainer ( new HashSet ( ) ) ; try { cdc . connect ( null , null ) ; } catch ( final ContainerConnectException e ) { Trace . catching ( Activator . PLUGIN_ID , ( ( Activator . PLUGIN_ID ) + "//debug//methods//catching" ) , this . getClass ( ) , "getService(Bundle,<seq2seq4repair_space>ServiceRegistration)" , e ) ; return null ; } Filter filter = null ; try { final String filter2 = ( ( ( ( ( ( ( "(&(" + ( Constants . OBJECTCLASS ) ) + "=" ) + ( IDiscoveryAdvertiser . class . getName ( ) ) ) + ")(!(" ) + ( IDiscoveryLocator . CONTAINER_NAME ) ) + "=" ) + ( CompositeDiscoveryContainer . NAME ) ) + ")))" ; filter = context . createFilter ( filter2 ) ; context . addServiceListener ( new ServiceListener ( ) { public void serviceChanged ( final ServiceEvent arg0 ) { <START_BUG> final IDiscoveryService anIDS = ( ( IDiscoveryService ) ( context . getService ( arg0 . getServiceReference ( ) ) ) ) ; <END_BUG> switch ( arg0 . getType ( ) ) { case ServiceEvent . REGISTERED : cdc . addContainer ( anIDS ) ; break ; case ServiceEvent . UNREGISTERING : cdc . removeContainer ( anIDS ) ; break ; default : break ; } } } , filter2 ) ; } catch ( final InvalidSyntaxException e ) { } final ServiceTracker tracker = new ServiceTracker ( context , filter , null ) ; tracker . open ( ) ; final Object [ ] services = tracker . getServices ( ) ; tracker . close ( ) ; if ( services != null ) { for ( int i = 0 ; i < ( services . length ) ; i ++ ) { final Object obj = services [ i ] ; if ( obj != cdc ) cdc . addContainer ( obj ) ; } } return cdc ; } public void ungetService ( final Bundle bundle , final ServiceRegistration registration , final Object service ) { ( ( CompositeDiscoveryContainer ) ( service ) ) . dispose ( ) ; } } , props ) ; } public void stop ( final BundleContext context ) throws Exception { } }

Fix:
final Object anIDS = context . getService ( arg0 . getServiceReference ( ) ) ;
Buggy code:
public class BasicTableModelFilter extends TreeTableModelDecorator { protected boolean newFlag = false ; protected boolean answeredFlag = false ; protected boolean flaggedFlag = false ; protected boolean expungedFlag = false ; protected boolean attachmentFlag = false ; protected String patternString = "" ; protected boolean dataFiltering = false ; public BasicTableModelFilter ( TreeTableModelInterface tableModel ) { } public void setDataFiltering ( boolean b ) { } public boolean isEnabled ( ) { } public void setNewFlag ( boolean b ) { } public boolean getNewFlag ( ) { } public void setAnsweredFlag ( boolean b ) { } public boolean getAnsweredFlag ( ) { } public void setFlaggedFlag ( boolean b ) { } public boolean getFlaggedFlag ( ) { } public void setExpungedFlag ( boolean b ) { } public boolean getExpungedFlag ( ) { } public void setAttachmentFlag ( boolean b ) { } public boolean getAttachmentFlag ( ) { } public void setPatternString ( String s ) { } public String getPatternString ( ) { } protected boolean testString ( ColumbaHeader header ) { } public boolean addItem ( ColumbaHeader header ) { boolean result = true ; boolean result2 = false ; boolean flags1 = false ; boolean flags2 = false ; Flags flags = ( ( ColumbaHeader ) ( header ) ) . getFlags ( ) ; if ( flags == null ) { System . out . println ( "flags<seq2seq4repair_space>is<seq2seq4repair_space>null" ) ; return false ; } if ( getNewFlag ( ) ) { if ( flags . getSeen ( ) ) { result = false ; } } if ( getAnsweredFlag ( ) ) { if ( ! ( flags . getAnswered ( ) ) ) { result = false ; } } if ( getFlaggedFlag ( ) ) { if ( ! ( flags . getFlagged ( ) ) ) { result = false ; } } if ( getExpungedFlag ( ) ) { <START_BUG> if ( ! ( flags . getExpunged ( ) ) ) { <END_BUG> result = false ; } } if ( getAttachmentFlag ( ) ) { Boolean attach = ( ( Boolean ) ( header . get ( "columba.attachment" ) ) ) ; boolean attachment = attach . booleanValue ( ) ; if ( ! attachment ) { result = false ; } } if ( ! ( getPatternString ( ) . equals ( "" ) ) ) { flags2 = true ; result2 = testString ( header ) ; } else { result2 = true ; } if ( result2 ) { if ( result ) { return true ; } } return false ; } }

Fix:
if ( ! ( flags . getDeleted ( ) ) ) {
Buggy code:
public class GoogleImporterTest { private JavaEEGloss gloss ; private ContactsService contactsServiceMock ; private ContactEntry contactEntry ; private GoogleImporter gImporterUnderTest ; public GoogleImporterTest ( ) { } @ BeforeClass public static void setUpClass ( ) throws Exception { } @ AfterClass public static void tearDownClass ( ) throws Exception { } @ Before public void setUp ( ) { } @ After public void tearDown ( ) { } @ Test public void testGetConnection ( ) throws AuthenticationException { } @ Test public void testGetAllGroupsWithNull ( ) { } @ Test public void testGetAllGroupsWithGroupFeed ( ) { } @ Test public void testGetAllContactsReturnNull ( ) { } @ Test public void testGetAllContactsReturnList ( ) { } @ Test @ Ignore public void testImportContacts ( ) { } @ Test public void testgetGContactFirstMailAdressWithOneAdress ( ) { } @ Test public void testgetGContactFirstMailAdressWithManyAdress ( ) { } @ Test public void testgetGContactFirstMailAdressWithNoAdress ( ) { } @ SuppressWarnings ( "deprecation" ) @ Test public void testgetGContactBirthdayWithABirthday ( ) { } @ Test public void testgetGContactBirthdayWithoutABirthday ( ) { } @ Test public void testgetGContactFamilyname ( ) { } @ Test public void testgetGContactFirstname ( ) { } @ Test public void testdiffMembershipWithAnExistingGroup ( ) { } @ Test public void testdiffMembershipWitouthAnExistingGroup ( ) { } @ Test public void testexistGroupWithGroup ( ) { } @ Test public void testexistGroupWithoutGroup ( ) { } @ Test public void testexistGroup ( ) { } @ Test public void testMapGContacttoContactFemale ( ) { } @ Test public void testMapGContacttoContactMale ( ) { } @ Test public void testMapGContacttoContactWithoutEmailandBirthday ( ) { } @ Test public void testsetmyService ( ) { } @ Test public void testgetmyService ( ) { } @ Test public void testsetAccdata ( ) { } @ Test public void testgetAccdata ( ) { } @ Test public void testsetConnected ( ) { GoogleImporter instance = new GoogleImporter ( ) ; instance . setConnectionEtablished ( true ) ; <START_BUG> assertEquals ( true , instance . accdata ) ; <END_BUG> } }

Fix:
assertEquals ( true , instance . connectionEtablished ) ;
Buggy code:
public class OperatingSystemMXBeanReadResourceHandler implements OperationStepHandler { public static final OperatingSystemMXBeanReadResourceHandler INSTANCE = new OperatingSystemMXBeanReadResourceHandler ( ) ; private OperatingSystemMXBeanReadResourceHandler ( ) { } @ Override public void execute ( OperationContext context , ModelNode operation ) throws OperationFailedException { final ModelNode result = context . getResult ( ) ; for ( String attribute : PlatformMBeanConstants . OPERATING_SYSTEM_READ_ATTRIBUTES ) { final ModelNode store = result . get ( attribute ) ; try { OperatingSystemMXBeanAttributeHandler . storeResult ( attribute , store ) ; } catch ( SecurityException ignored ) { } catch ( UnsupportedOperationException ignored ) { } } for ( String attribute : PlatformMBeanConstants . OPERATING_SYSTEM_METRICS ) { final ModelNode store = result . get ( attribute ) ; try { OperatingSystemMXBeanAttributeHandler . storeResult ( attribute , store ) ; } catch ( SecurityException ignored ) { } catch ( UnsupportedOperationException ignored ) { } } if ( ( PlatformMBeanUtil . JVM_MAJOR_VERSION ) > 6 ) { final ModelNode store = result . get ( OBJECT_NAME ) ; OperatingSystemMXBeanAttributeHandler . storeResult ( OBJECT_NAME , store ) ; } <START_BUG> context . completeStep ( ) ; <END_BUG> } }

Fix:
context . completeStep ( NOOP_ROLLBACK_HANDLER ) ;
Buggy code:
public class RoboAppController extends Application implements ActivityMontitor { DataModel dataModel = new DataModel ( ) ; ServerController serverController ; private UpdatableActivity currentActiveActivity ; public DataModel getDataModel ( ) { } @ Override public void setActiveActivity ( UpdatableActivity activity ) { } @ Override public UpdatableActivity getActiveActivity ( ) { } public void handleClientInformationFromJson ( JSONArray jsonClientInfoArray ) throws JSONException { } private void handleSpeedFromJson ( JSONObject data ) throws JSONException { } private void handleCountdownStart ( ) throws JSONException { } private void handleResultsFromJson ( JSONObject data ) throws JSONException { } private void handleStartRace ( ) { } private void leftTrackVibration ( ) { } private void handleJsonMessage ( JSONObject json ) { } public void playerNameEntered ( final String playerName , final OnFinishedCallback onFinishedCallback ) { serverController = new ServerController ( "10.90.150.85" , "8888" ) ; <START_BUG> dataModel . addPlayerToArray ( playerName , false ) ; <END_BUG> serverController . connect ( new WebSocketListener ( ) { @ Override public void connectionEstablished ( ) { serverController . sendMsg ( ( ( "{\"eventType\":<seq2seq4repair_space>\"connect\",<seq2seq4repair_space>\"data\":<seq2seq4repair_space>{\"clientType\":<seq2seq4repair_space>\"app\",<seq2seq4repair_space>\"name\":<seq2seq4repair_space>\"" + playerName ) + "\",<seq2seq4repair_space>\"ready\":<seq2seq4repair_space>\"false\"<seq2seq4repair_space>}}" ) ) ; onFinishedCallback . onFinished ( ) ; } @ Override public void connectionEstablishmentFailed ( String reason ) { onFinishedCallback . onFailed ( reason ) ; } @ Override public void messageReceived ( JSONObject message ) { handleJsonMessage ( message ) ; } @ Override public void connectionClosed ( String reason ) { } } ) ; } public void roboSelected ( String roboName ) { } public void steer ( SteeringDirection steeringDirection ) { } public void steer ( long progress ) { } public void deselect ( ) { } public void readyStateChange ( boolean readyState ) { } }

Fix:
dataModel . setCurrentPlayerName ( playerName ) ;
Buggy code:
public class ReduxEventDispatcher { private static ReduxEventDispatcher ourInstance = null ; public static ReduxEventDispatcher getInstance ( ) { } private ReduxEventDispatcher ( ) { } @ SubscribeEvent public void onEvent ( Event event ) { <START_BUG> if ( FMLCommonHandler . instance ( ) . getSide ( ) . isServer ( ) ) { <END_BUG> for ( Pack p : instance . getReduxConfiguration ( ) . getPacks ( ) ) { if ( p . getJsEngine ( ) . getEngine ( ) . hasMethod ( event . getClass ( ) . getName ( ) ) ) { try { p . getJsEngine ( ) . getEngine ( ) . callMethod ( event . getClass ( ) . getName ( ) , event ) ; } catch ( ScriptException e ) { instance . getLogger ( ) . warn ( "Redux<seq2seq4repair_space>pack<seq2seq4repair_space>inconsistency.<seq2seq4repair_space>A<seq2seq4repair_space>script<seq2seq4repair_space>file<seq2seq4repair_space>in<seq2seq4repair_space>pack:<seq2seq4repair_space>%s<seq2seq4repair_space>has<seq2seq4repair_space>errors." , p . getName ( ) ) ; } catch ( NoSuchMethodException e ) { instance . getLogger ( ) . warn ( "Redux<seq2seq4repair_space>pack<seq2seq4repair_space>inconsistency.<seq2seq4repair_space>A<seq2seq4repair_space>script<seq2seq4repair_space>file<seq2seq4repair_space>in<seq2seq4repair_space>pack:<seq2seq4repair_space>%s<seq2seq4repair_space>has<seq2seq4repair_space>errors." , p . getName ( ) ) ; } } } } } }

Fix:
if ( ! ( proxy . isSinglePlayer ( ) ) ) {
Buggy code:
public class ServerRestartHandler implements OperationStepHandler , DescriptionProvider { public static final String OPERATION_NAME = "restart" ; private final ServerInventory serverInventory ; public ServerRestartHandler ( final ServerInventory serverInventory ) { } @ Override public void execute ( OperationContext context , ModelNode operation ) throws OperationFailedException { if ( ( context . getRunningMode ( ) ) == ( RunningMode . ADMIN_ONLY ) ) { throw new OperationFailedException ( new ModelNode ( HostControllerMessages . MESSAGES . cannotStartServersInvalidMode ( context . getRunningMode ( ) ) ) ) ; } final PathAddress address = PathAddress . pathAddress ( operation . require ( OP_ADDR ) ) ; final PathElement element = address . getLastElement ( ) ; final String serverName = element . getValue ( ) ; <START_BUG> final ModelNode model = Tools . readModel ( context . getRootResource ( ) ) ; <END_BUG> context . addStep ( new OperationStepHandler ( ) { @ Override public void execute ( OperationContext context , ModelNode operation ) throws OperationFailedException { final ServerStatus origStatus = serverInventory . determineServerStatus ( serverName ) ; if ( origStatus != ( ServerStatus . STARTED ) ) { throw new OperationFailedException ( new ModelNode ( HostControllerMessages . MESSAGES . cannotRestartServer ( serverName , origStatus ) ) ) ; } final ServerStatus status = serverInventory . restartServer ( serverName , ( - 1 ) , model ) ; context . getResult ( ) . set ( status . toString ( ) ) ; context . completeStep ( NOOP_ROLLBACK_HANDLER ) ; } } , RUNTIME ) ; context . completeStep ( NOOP_ROLLBACK_HANDLER ) ; } @ Override public ModelNode getModelDescription ( final Locale locale ) { } }

Fix:
final ModelNode model = Tools . readModel ( context . readResourceFromRoot ( EMPTY_ADDRESS , true ) ) ;
Buggy code:
public class AddPresenter implements IAddPresenter { String name ; String country ; String street ; String tel ; String cell ; String description ; Context context ; DBHelper mDbManager ; public AddPresenter ( String Name , String Country , String Street , String Tel , String Cell , String Description , Context Context ) { } @ Override public void addCompany ( ) { mDbManager = new DBHelper ( context ) ; <START_BUG> Company cmp = new Company ( name , country , street , tel , cell , description ) ; <END_BUG> mDbManager . addCompany ( cmp ) ; } }

Fix:
Company cmp = new Company ( name . toUpperCase ( ) , country . toUpperCase ( ) , street . toUpperCase ( ) , tel . toUpperCase ( ) , cell . toUpperCase ( ) , description . toUpperCase ( ) ) ;
Buggy code:
@ Service @ Transactional public class NotificationService { private final Logger log = LoggerFactory . getLogger ( NotificationService . class ) ; @ Inject private NotificationRepository notificationRepository ; @ Inject private UserRepository userRepository ; @ Inject private MailService mailService ; @ Inject private BuildingRepository buildingRepository ; @ Inject private UserDetailRepository userDetailRepository ; public int sendNotice ( NotificationDTO notificationDto ) { Notification notification = new Notification ( ) ; notification . setBuildingId ( notificationDto . getBuildingId ( ) ) ; <START_BUG> notification . setNotice ( notificationDto . getSubject ( ) ) ; <END_BUG> notification . setIssueDate ( notificationDto . getIssueDate ( ) ) ; User currentUser = userRepository . findOne ( SecurityUtils . getCurrentLogin ( ) ) ; notification . setCreatedBy ( currentUser . getLogin ( ) ) ; notification . setCreatedDate ( new DateTime ( ) ) ; String buildingName = buildingRepository . getBuilding ( notification . getBuildingId ( ) ) . getName ( ) ; String subject = ( buildingName + "<seq2seq4repair_space>Notice<seq2seq4repair_space>:<seq2seq4repair_space>" ) + ( notificationDto . getSubject ( ) ) ; notification . setSubject ( notificationDto . getSubject ( ) ) ; List < UserDetail > userDetails = userDetailRepository . getUserEmailsForNotification ( notificationDto ) ; log . debug ( "Notification<seq2seq4repair_space>:<seq2seq4repair_space>size<seq2seq4repair_space>of<seq2seq4repair_space>user<seq2seq4repair_space>details<seq2seq4repair_space>{}" , userDetails . size ( ) ) ; List < String > emailList = new ArrayList < String > ( ) ; for ( UserDetail userDetail : userDetails ) { emailList . add ( userDetail . getEmail ( ) ) ; } int emailCount = mailService . sendGrid ( subject , notification . getNotice ( ) , emailList ) ; log . debug ( "REST<seq2seq4repair_space>request<seq2seq4repair_space>to<seq2seq4repair_space>save<seq2seq4repair_space>Notification<seq2seq4repair_space>:<seq2seq4repair_space>{}" , notification ) ; notificationRepository . save ( notification ) ; JsonResponse json = new JsonResponse ( ) ; String message = ( "Notice<seq2seq4repair_space>is<seq2seq4repair_space>successfully<seq2seq4repair_space>scheduled<seq2seq4repair_space>to<seq2seq4repair_space>" + emailCount ) + "<seq2seq4repair_space>recipients" ; json . setResponse ( message ) ; return emailCount ; } }

Fix:
notification . setNotice ( notificationDto . getNotice ( ) ) ;
Buggy code:
@ RunWith ( Parameterized . class ) public class EventIdValidatorTest { private boolean result ; private Integer eventId ; @ Parameters public static List < Object [ ] > eventIds ( ) { <START_BUG> Object [ ] [ ] vals = new Object [ ] [ ] { new Object [ ] { false , 2000 } , new Object [ ] { false , 6000 } , new Object [ ] { true , 4000 } , new Object [ ] { false , 5000 } } ; <END_BUG> return Arrays . asList ( vals ) ; } public EventIdValidatorTest ( boolean result , Integer eventId ) { } @ Test public void validateEventId ( ) { } }

Fix:
Object [ ] [ ] vals = new Object [ ] [ ] { new Object [ ] { false , 2000 } , new Object [ ] { false , 6000 } , new Object [ ] { true , 4097 } , new Object [ ] { false , 5000 } } ;
Buggy code:
public class MvcNamespaceHandler extends NamespaceHandlerSupport { public void init ( ) { <START_BUG> registerBeanDefinitionParser ( "annotated-controllers" , new AnnotatedControllersBeanDefinitionParser ( ) ) ; <END_BUG> } }

Fix:
registerBeanDefinitionParser ( "annotation-driven" , new AnnotationDrivenBeanDefinitionParser ( ) ) ;
Buggy code:
public class PigLatin extends PApplet { String lowellHym = "" ; public void setup ( ) { } public int findFirstVowel ( String sWord ) { } public String pigLatin ( String sWord ) { } public String lowellHymDecoder ( String hym ) { String output = "" ; int start = 0 ; int finish = 0 ; for ( int i = 0 ; i < ( hym . length ( ) ) ; i ++ ) { if ( ( ( ! ( hym . substring ( i , ( i + 1 ) ) . equals ( "," ) ) ) && ( ! ( hym . substring ( i , ( i + 1 ) ) . matches ( "^\\s*$" ) ) ) ) && ( ! ( hym . substring ( i , ( i + 1 ) ) . equals ( "." ) ) ) ) { finish ++ ; continue ; } else if ( hym . substring ( i , ( i + 1 ) ) . equals ( "," ) ) { output += pigLatin ( hym . substring ( start , finish ) ) ; System . out . println ( hym . substring ( start , finish ) ) ; output += ",<seq2seq4repair_space>" ; start = finish + 1 ; finish ++ ; } else if ( hym . substring ( i , ( i + 1 ) ) . equals ( "." ) ) { <START_BUG> output = output . substring ( 0 , ( ( output . length ( ) ) - 1 ) ) ; <END_BUG> output += ".<seq2seq4repair_space>" ; start = finish + 1 ; finish ++ ; } else { output += pigLatin ( hym . substring ( start , finish ) ) ; if ( hym . substring ( i , ( i + 1 ) ) . equals ( "<seq2seq4repair_space>" ) ) { output += "<seq2seq4repair_space>" ; } start = finish + 1 ; finish ++ ; } } return output ; } public static void main ( String [ ] passedArgs ) { } }

Fix:
output += pigLatin ( hym . substring ( start , finish ) ) ;
Buggy code:
public class BcelCflowStackFieldAdder extends BcelTypeMunger { private ResolvedMember cflowStackField ; public BcelCflowStackFieldAdder ( ResolvedMember cflowStackField ) { } public boolean munge ( BcelClassWeaver weaver ) { LazyClassGen gen = weaver . getLazyClassGen ( ) ; if ( ! ( gen . getType ( ) . equals ( cflowStackField . getDeclaringType ( ) ) ) ) return false ; Field f = new org . apache . bcel . generic . FieldGen ( cflowStackField . getModifiers ( ) , BcelWorld . makeBcelType ( cflowStackField . getReturnType ( ) ) , cflowStackField . getName ( ) , gen . getConstantPoolGen ( ) ) . getField ( ) ; gen . addField ( f ) ; <START_BUG> LazyMethodGen clinit = gen . getStaticInitializer ( ) ; <END_BUG> InstructionList setup = new InstructionList ( ) ; InstructionFactory fact = gen . getFactory ( ) ; setup . append ( fact . createNew ( new ObjectType ( NameMangler . CFLOW_STACK_TYPE ) ) ) ; setup . append ( fact . createDup ( 1 ) ) ; setup . append ( fact . createInvoke ( CFLOW_STACK_TYPE , "<init>" , VOID , new Type [ 0 ] , INVOKESPECIAL ) ) ; setup . append ( Utility . createSet ( fact , cflowStackField ) ) ; clinit . getBody ( ) . insert ( setup ) ; return true ; } public ResolvedMember getMatchingSyntheticMember ( Member member ) { } public ResolvedMember getSignature ( ) { } public boolean matches ( ResolvedTypeX onType ) { } }

Fix:
LazyMethodGen clinit = gen . getAjcClinit ( ) ;
Buggy code:
public class IssueIndexer extends BaseIndexer { private final DbClient dbClient ; public IssueIndexer ( DbClient dbClient , EsClient esClient ) { } @ Override protected long doIndex ( long lastUpdatedAt ) { } public void indexAll ( ) { } public void index ( Iterator < IssueDoc > issues ) { } private long doIndex ( BulkIndexer bulk , long lastUpdatedAt ) { } private long doIndex ( BulkIndexer bulk , Iterator < IssueDoc > issues ) { bulk . start ( ) ; long maxDate = 0L ; while ( issues . hasNext ( ) ) { IssueDoc issue = issues . next ( ) ; bulk . add ( newUpsertRequest ( issue ) ) ; <START_BUG> maxDate = Math . max ( maxDate , issue . updateDate ( ) . getTime ( ) ) ; <END_BUG> } bulk . stop ( ) ; return maxDate ; } public void deleteProject ( String uuid , boolean refresh ) { } BulkIndexer createBulkIndexer ( boolean large ) { } private UpdateRequest newUpsertRequest ( IssueDoc issue ) { } }

Fix:
maxDate = Math . max ( maxDate , issue . getTechnicalUpdateDate ( ) . getTime ( ) ) ;
Buggy code:
public class TsLintSensor implements Sensor { public static final String CONFIG_FILENAME = "tslint.json" ; private Settings settings ; private FileSystem fileSystem ; private FilePredicates filePredicates ; private ResourcePerspectives perspectives ; private RulesProfile rulesProfile ; public TsLintSensor ( Settings settings , FileSystem fileSystem , ResourcePerspectives perspectives , RulesProfile rulesProfile ) { } public boolean shouldExecuteOnProject ( Project project ) { } private boolean hasFilesToAnalyze ( ) { } public void analyse ( Project project , SensorContext context ) { TsLintExecutor executor = this . getTsLintExecutor ( ) ; TsLintParser parser = this . getTsLintParser ( ) ; File configFile = new File ( this . fileSystem . workDir ( ) , TsLintSensor . CONFIG_FILENAME ) ; TsLintConfig config = getConfiguration ( ) ; String configSerialised = new GsonBuilder ( ) . setPrettyPrinting ( ) . create ( ) . toJson ( config ) ; try { writeConfiguration ( configSerialised , configFile , Charsets . UTF_8 ) ; } catch ( IOException e ) { throw Throwables . propagate ( e ) ; } boolean skipTypeDefFiles = settings . getBoolean ( SETTING_EXCLUDE_TYPE_DEFINITION_FILES ) ; for ( File file : fileSystem . files ( this . filePredicates . hasLanguage ( LANGUAGE_EXTENSION ) ) ) { if ( skipTypeDefFiles && ( file . getName ( ) . toLowerCase ( ) . endsWith ( ( "." + ( TypeScriptLanguage . LANGUAGE_DEFINITION_EXTENSION ) ) ) ) ) { continue ; } Resource resource = this . getFileFromIOFile ( file , project ) ; Issuable issuable = perspectives . as ( Issuable . class , resource ) ; String pathToTsLint = settings . getString ( SETTING_TS_LINT_PATH ) ; String jsonResult = executor . execute ( pathToTsLint , configFile . getPath ( ) , file . getAbsolutePath ( ) ) ; TsLintIssue [ ] issues = parser . parse ( jsonResult ) ; if ( issues != null ) { for ( TsLintIssue issue : issues ) { <START_BUG> issuable . addIssue ( issuable . newIssueBuilder ( ) . line ( ( ( issue . getStartPosition ( ) . getLine ( ) ) + 1 ) ) . message ( issue . getFailure ( ) ) . ruleKey ( RuleKey . of ( REPOSITORY_NAME , issue . getRuleName ( ) ) ) . build ( ) ) ; <END_BUG> } } } } protected File getFileFromIOFile ( File file , Project project ) { } protected void writeConfiguration ( String configSerialised , File configFile , Charset encoding ) throws IOException { } protected TsLintExecutor getTsLintExecutor ( ) { } protected TsLintParser getTsLintParser ( ) { } protected TsLintConfig getConfiguration ( ) { } }

Fix:
issuable . addIssue ( issuable . newIssueBuilder ( ) . line ( issue . getStartPosition ( ) . getLine ( ) ) . message ( issue . getFailure ( ) ) . ruleKey ( RuleKey . of ( REPOSITORY_NAME , issue . getRuleName ( ) ) ) . build ( ) ) ;
Buggy code:
public class PKIndexSplitter { private final Filter docsInFirstIndex ; private final Directory input ; private final Directory dir1 ; private final Directory dir2 ; private final IndexWriterConfig config1 ; private final IndexWriterConfig config2 ; public PKIndexSplitter ( Version version , Directory input , Directory dir1 , Directory dir2 , Filter docsInFirstIndex ) { } private static IndexWriterConfig newDefaultConfig ( Version version ) { } public PKIndexSplitter ( Directory input , Directory dir1 , Directory dir2 , Filter docsInFirstIndex , IndexWriterConfig config1 , IndexWriterConfig config2 ) { } public PKIndexSplitter ( Version version , Directory input , Directory dir1 , Directory dir2 , Term midTerm ) { } public PKIndexSplitter ( Directory input , Directory dir1 , Directory dir2 , Term midTerm , IndexWriterConfig config1 , IndexWriterConfig config2 ) { } public void split ( ) throws IOException { } private void createIndex ( IndexWriterConfig config , Directory target , IndexReader reader , Filter preserveFilter , boolean negateFilter ) throws IOException { boolean success = false ; final IndexWriter w = new IndexWriter ( target , config ) ; try { final List < AtomicReaderContext > leaves = reader . leaves ( ) ; final IndexReader [ ] subReaders = new IndexReader [ leaves . size ( ) ] ; int i = 0 ; for ( final AtomicReaderContext ctx : leaves ) { subReaders [ ( i ++ ) ] = new PKIndexSplitter . DocumentFilteredAtomicIndexReader ( ctx , preserveFilter , negateFilter ) ; } w . addIndexes ( subReaders ) ; success = true ; } finally { if ( success ) { <START_BUG> IOUtils . close ( w ) ; <END_BUG> } else { IOUtils . closeWhileHandlingException ( w ) ; } } } private static class DocumentFilteredAtomicIndexReader extends FilterAtomicReader { final Bits liveDocs ; final int numDocs ; public DocumentFilteredAtomicIndexReader ( AtomicReaderContext context , Filter preserveFilter , boolean negateFilter ) throws IOException { } @ Override public int numDocs ( ) { } @ Override public Bits getLiveDocs ( ) { } } }

Fix:
w . shutdown ( ) ;
Buggy code:
public abstract class ProgressDialog extends ModalDialogBase { interface Resources extends ClientBundle { ImageResource progress ( ) { } @ Source ( "ProgressDialog.css" ) ProgressDialog . Styles styles ( ) { } } interface Styles extends CssResource { String progressDialog ( ) { } String labelCell ( ) { } String progressCell ( ) { } String buttonCell ( ) { } String displayWidget ( ) { } } interface Binder extends UiBinder < Widget , ProgressDialog > { } public static void ensureStylesInjected ( ) { } public ProgressDialog ( String title ) { } @ Override protected Widget createMainWidget ( ) { } protected abstract Widget createDisplayWidget ( ) { } @ Override protected void onUnload ( ) { } @ Override public void onPreviewNativeEvent ( NativePreviewEvent event ) { } protected ThemedButton stopButton ( ) { } protected void addHandlerRegistration ( HandlerRegistration reg ) { } protected void unregisterHandlers ( ) { } protected void setLabel ( String text ) { } protected void hideProgress ( ) { <START_BUG> progressAnim_ . getElement ( ) . getStyle ( ) . setVisibility ( HIDDEN ) ; <END_BUG> } protected boolean handleEnterKey ( ) { } private HandlerRegistrations registrations_ = new HandlerRegistrations ( ) ; @ UiField ( provided = true ) Widget display_ ; @ UiField ( provided = true ) Image progressAnim_ ; @ UiField Label label_ ; @ UiField ( provided = true ) ThemedButton stopButton_ ; private Widget centralWidget_ ; private static final ProgressDialog . Resources resources_ = GWT . < ProgressDialog . Resources > create ( ProgressDialog . Resources . class ) ; }

Fix:
progressAnim_ . getElement ( ) . getStyle ( ) . setDisplay ( NONE ) ;
Buggy code:
public class BarGraph extends JComponent { Graphics g ; Slice [ ] slices = null ; public void update ( Slice [ ] slices ) { } public BarGraph ( ) { } public void paint ( Graphics g ) { } private void drawBars ( Graphics2D g , Rectangle area , Slice [ ] slices ) { int total = 0 ; int deltaX = ( area . width ) // ( slices . length ) ; for ( int i = 0 ; i < ( slices . length ) ; i ++ ) { total = ( ( int ) ( total + ( slices [ i ] . value ) ) ) ; } for ( int i = 0 ; i < ( slices . length ) ; i ++ ) { double height = total // ( slices [ i ] . value ) ; int heightOfBar = ( ( int ) ( ( area . height ) // height ) ) ; g . setColor ( slices [ i ] . color ) ; <START_BUG> g . fillRect ( ( i * deltaX ) , ( ( area . height ) - heightOfBar ) , deltaX , heightOfBar ) ; <END_BUG> } } }

Fix:
g . fillRect ( ( ( i * deltaX ) + 10 ) , ( ( area . height ) - heightOfBar ) , ( deltaX - 10 ) , heightOfBar ) ;
Buggy code:
public class BookmarkableListenerInterfaceRequestTarget extends BookmarkablePageRequestTarget { private final String componentPath ; private final String interfaceName ; public BookmarkableListenerInterfaceRequestTarget ( String pageMapName , Class < ? extends Page > pageClass , PageParameters pageParameters , String componentPath , String interfaceName , int versionNumber ) { } public BookmarkableListenerInterfaceRequestTarget ( String pageMapName , Class < ? extends Page > pageClass , PageParameters pageParameters , Component component , RequestListenerInterface listenerInterface ) { } @ Override public void processEvents ( RequestCycle requestCycle ) { } @ Override public void respond ( RequestCycle requestCycle ) { Page page = getPage ( requestCycle ) ; if ( ( requestCycle . isRedirect ( ) ) && ( ! ( page . isPageStateless ( ) ) ) ) { requestCycle . redirectTo ( page ) ; } else { <START_BUG> page . renderPage ( ) ; <END_BUG> } } public String getComponentPath ( ) { } public String getInterfaceName ( ) { } }

Fix:
page . render ( ) ;
Buggy code:
public class RenameElementsOperation extends MoveElementsOperation { public RenameElementsOperation ( IJavaElement [ ] elements , IJavaElement [ ] destinations , String [ ] newNames , boolean force ) { } protected String getMainTaskName ( ) { } protected boolean isRename ( ) { } protected IJavaModelStatus verify ( ) { IJavaModelStatus status = super . verify ( ) ; if ( ! ( status . isOK ( ) ) ) return status ; <START_BUG> if ( ( ( fRenamingsList ) == null ) || ( ( fRenamingsList . length ) == 0 ) ) <END_BUG> return new JavaModelStatus ( IJavaModelStatusConstants . NULL_NAME ) ; return JavaModelStatus . VERIFIED_OK ; } protected void verify ( IJavaElement element ) throws JavaModelException { } }

Fix:
if ( ( ( this . renamingsList ) == null ) || ( ( this . renamingsList . length ) == 0 ) )
Buggy code:
@ Controller public class LecturerHomeController { @ RequestMapping ( value = "//lecturer**" , method = RequestMethod . GET ) public ModelAndView adminPage ( ) { ModelAndView model = new ModelAndView ( ) ; model . addObject ( "title" , "Spring<seq2seq4repair_space>Security<seq2seq4repair_space>Login<seq2seq4repair_space>Form<seq2seq4repair_space>-<seq2seq4repair_space>Database<seq2seq4repair_space>Authentication" ) ; model . addObject ( "message" , "This<seq2seq4repair_space>page<seq2seq4repair_space>is<seq2seq4repair_space>for<seq2seq4repair_space>ROLE_LECTURER<seq2seq4repair_space>only!" ) ; model . setViewName ( "lecturer" ) ; <START_BUG> LogWrapper logWrapper = new LogWrapper ( Home . class ) ; <END_BUG> logWrapper . info ( "lecturer<seq2seq4repair_space>Logged" ) ; return model ; } }

Fix:
LogWrapper logWrapper = new LogWrapper ( LecturerHomeController . class ) ;
Buggy code:
public class GetContactTest extends AbstractFolderTstCase { public GetContactTest ( String arg0 ) { } public void testGet ( ) throws Exception { ContactModel c = new ContactModel ( ) ; c . setNickName ( "nickname" ) ; <START_BUG> Object uid = getSourceFolder ( ) . add ( c ) ; <END_BUG> IContactModel c2 = getSourceFolder ( ) . get ( uid ) ; assertEquals ( "same<seq2seq4repair_space>nickname" , c . getNickName ( ) , c2 . getNickName ( ) ) ; } }

Fix:
String uid = getSourceFolder ( ) . add ( c ) ;
Buggy code:
public class SentenceDecoder implements ISentenceDecoder { private List < NgramsByLength > stateTransitionProbabilities ; private List < SegmentWithTagProbs > symbolEmissionProbabilities ; private List < String > tags ; public SentenceDecoder ( TrainerResult trainerResult ) { } public List < String > decode ( Sentence sentence ) { } private double getEmissionProbForTagAndWord ( String tag , String word ) { Optional < SegmentWithTagProbs > matchingSegment = this . symbolEmissionProbabilities . stream ( ) . filter ( ( s ) -> s . getName ( ) . equals ( word ) ) . findFirst ( ) ; if ( matchingSegment . isPresent ( ) ) { return getLogProb ( getProbByTag ( tag , matchingSegment . get ( ) ) ) ; } else { Optional < SegmentWithTagProbs > unkSegment = this . symbolEmissionProbabilities . stream ( ) . filter ( ( s ) -> s . getName ( ) . equals ( "UNK" ) ) . findFirst ( ) ; if ( unkSegment . isPresent ( ) ) { return getLogProb ( getProbByTag ( tag , unkSegment . get ( ) ) ) ; } else { <START_BUG> throw new IllegalArgumentException ( "Missing<seq2seq4repair_space>UNK<seq2seq4repair_space>segment!!!" ) ; <END_BUG> } } } private double getProbByTag ( String tag , SegmentWithTagProbs segment ) { } private double getTransitionProbForTwoTags ( String firstTag , String secondTag ) { } private List < String > createTags ( ) { } private double getLogProb ( double prob ) { } }

Fix:
return - ( Double . MAX_VALUE ) ;
Buggy code:
public class MethodRef extends ASTNode implements IDocElement { public static final ChildPropertyDescriptor QUALIFIER_PROPERTY = new ChildPropertyDescriptor ( MethodRef . class , "qualifier" , Name . class , ASTNode . OPTIONAL , ASTNode . NO_CYCLE_RISK ) ; public static final ChildPropertyDescriptor NAME_PROPERTY = new ChildPropertyDescriptor ( MethodRef . class , "name" , SimpleName . class , ASTNode . MANDATORY , ASTNode . NO_CYCLE_RISK ) ; public static final ChildListPropertyDescriptor PARAMETERS_PROPERTY = new ChildListPropertyDescriptor ( MethodRef . class , "parameters" , MethodRefParameter . class , ASTNode . NO_CYCLE_RISK ) ; private static final List PROPERTY_DESCRIPTORS ; public static List propertyDescriptors ( int apiLevel ) { } private Name optionalQualifier = null ; private SimpleName methodName = null ; private ASTNode . NodeList parameters = new ASTNode . NodeList ( MethodRef . PARAMETERS_PROPERTY ) ; MethodRef ( AST ast ) { } final List internalStructuralPropertiesForType ( int apiLevel ) { } final ASTNode internalGetSetChildProperty ( ChildPropertyDescriptor property , boolean get , ASTNode child ) { } final List internalGetChildListProperty ( ChildListPropertyDescriptor property ) { } final int getNodeType0 ( ) { } ASTNode clone0 ( AST target ) { } final boolean subtreeMatch0 ( ASTMatcher matcher , Object other ) { } void accept0 ( ASTVisitor visitor ) { } public Name getQualifier ( ) { } public void setQualifier ( Name name ) { } public SimpleName getName ( ) { if ( ( this . methodName ) == null ) { <START_BUG> synchronized ( this . ast ) { <END_BUG> if ( ( this . methodName ) == null ) { preLazyInit ( ) ; this . methodName = new SimpleName ( this . ast ) ; postLazyInit ( this . methodName , MethodRef . NAME_PROPERTY ) ; } } } return this . methodName ; } public void setName ( SimpleName name ) { } public List parameters ( ) { } public final IBinding resolveBinding ( ) { } int memSize ( ) { } int treeSize ( ) { } }

Fix:
synchronized ( this ) {
Buggy code:
public class ThreadWorker implements Runnable { private FlowDriver workSource ; private int myID ; private double lastTimeAdvance ; private Set < BGPSpeaker > ownedNodes ; public ThreadWorker ( FlowDriver daBoss , int id ) { } public void giveChild ( BGPSpeaker ownedNode ) { } @ Override public void run ( ) { try { while ( true ) { double nextTimePoint = this . workSource . getNextTimeAdvnace ( ) ; for ( BGPSpeaker tChild : this . ownedNodes ) { tChild . queueAdvance ( this . lastTimeAdvance , nextTimePoint ) ; } this . lastTimeAdvance = nextTimePoint ; this . workSource . reportWorkDone ( ) ; this . workSource . waitForEventAdjust ( ) ; for ( BGPSpeaker tChild : this . ownedNodes ) { tChild . updateEstimatedCompletionTimes ( ) ; } this . workSource . reportWorkDone ( ) ; this . workSource . waitForProcessEventUpdate ( ) ; for ( BGPSpeaker tChild : this . ownedNodes ) { <START_BUG> ProcessEvent evictEvent = tChild . checkIfProcessingEventNeedsUpdating ( ) ; <END_BUG> if ( evictEvent != null ) { this . workSource . replaceProcessEvent ( evictEvent , tChild . getNextProcessEvent ( ) ) ; } } this . workSource . reportWorkDone ( ) ; } } catch ( InterruptedException e ) { System . err . println ( ( ( "Slave<seq2seq4repair_space>thread<seq2seq4repair_space>" + ( this . myID ) ) + "<seq2seq4repair_space>dying." ) ) ; } } No newline ; at end ; of file ; }

Fix:
ProcessEvent evictEvent = tChild . checkIfProcessingEventNeedsUpdating ( this . lastTimeAdvance ) ;
Buggy code:
public class WireUtil { public static ThreadLocal < ByteableLongArrayValues > newLongArrayValuesPool ( @ NotNull Class < ? extends Wire > wireType ) { } public static Function < Bytes , Wire > byteToWireFor ( @ NotNull Class < ? extends Wire > wireType ) { if ( TextWire . class . isAssignableFrom ( wireType ) ) { return TextWire :: new ; } else if ( BinaryWire . class . isAssignableFrom ( wireType ) ) { return BinaryWire :: new ; } else if ( RawWire . class . isAssignableFrom ( wireType ) ) { return RawWire :: new ; } else { <START_BUG> throw new UnsupportedOperationException ( "todo" ) ; <END_BUG> } } public static Wire createWire ( @ NotNull final Class < ? extends Wire > wireType , @ NotNull final Bytes bytes ) { } }

Fix:
throw new UnsupportedOperationException ( "todo<seq2seq4repair_space>(byteToWireFor)" ) ;