nus-yam/ex-repair huggingface dataset:
Buggy code:
class MemoryCredit implements Credit { private int id ; private MemorySlip slip ; private MemoryCreditCode creditCode ; private String description ; private int price ; public MemoryCredit ( int id , MemorySlip slip , MemoryCreditCode creditCode , String description , int price ) { } @ Override public int id ( ) { } @ Override public MemorySlip slip ( ) { } public void slip ( MemorySlip slip ) { } @ Override public MemoryCreditCode creditCode ( ) { } public void creditCode ( MemoryCreditCode creditCode ) { } @ Override public String description ( ) { } public void description ( String description ) { } @ Override public int price ( ) { } public void price ( int price ) { } @ SuppressWarnings ( "unchecked" ) @ Override public < Target extends Account > Target target ( Class < Target > cls ) { } @ Override public int amount ( ) { <START_BUG> return price ; <END_BUG> } @ Override public int occurrenceId ( ) { } @ Override public LocalDateTime occurrenceDttm ( ) { } @ Override public String occurrenceLocation ( ) { } }

Fix:
return 0 - ( price ) ;
Buggy code:
public class CountDown extends Thread { private Game game ; private int time ; private ArrayList < Integer > wait = new ArrayList < > ( ) ; private boolean started = false ; public CountDown ( Game game , int time , int [ ] wait ) { } public void setTimer ( int time ) { } public void setGame ( Game game ) { } public void setCanStart ( boolean canstart ) { } public void stopCountDown ( ) { } public void startCountDown ( ) { } public void restartCountDown ( Game game ) { <START_BUG> this . started = true ; <END_BUG> this . time = 30 ; this . game = game ; } public void go ( ) { } }

Fix:
this . started = false ;
Buggy code:
public class NotificationsTest extends AndroidTestCase { @ SuppressLint ( "NewApi" ) private static final int MILLIS_PER_HOUR = ( ( int ) ( TimeUnit . HOURS . toMillis ( 1 ) ) ) ; private static final DateTime now = new DateTime ( 2014 , 1 , 23 , 18 , 8 , 31 , 540 ) ; private Preferences preferences ; @ Override public void setUp ( ) { <START_BUG> preferences = new Preferences ( getContext ( ) ) ; <END_BUG> preferences . clear ( ) ; preferences . setBoolean ( p_rmd_enable_quiet , true ) ; freezeAt ( NotificationsTest . now ) ; } @ Override public void tearDown ( ) { } public void testNotQuietWhenQuietHoursDisabled ( ) { } public void testIsQuietAtStartOfQuietHoursNoTimeWrap ( ) { } public void testIsNotQuietWhenStartAndEndAreSame ( ) { } public void testIsNotQuietAtEndOfQuietHoursNoTimeWrap ( ) { } public void testIsQuietAtStartOfQuietHoursTimeWrap ( ) { } public void testIsNotQuietAtEndOfQuietHoursTimeWrap ( ) { } private void setQuietHoursStart ( int hour ) { } private void setQuietHoursEnd ( int hour ) { } }

Fix:
preferences = new Preferences ( getContext ( ) , null ) ;
Buggy code:
public class XLoggerTestCase extends TestCase { static String FILTERED = "output//filtered" ; static XLogger logger = ( ( XLogger ) ( XLogger . getLogger ( XLoggerTestCase . class ) ) ) ; public XLoggerTestCase ( String name ) { } public void tearDown ( ) { } public void test1 ( ) throws Exception { } public void test2 ( ) throws Exception { } void common ( int number ) throws Exception { JoranConfigurator jc = new JoranConfigurator ( ) ; jc . doConfigure ( ( ( "input//xml//customLogger" + number ) + ".xml" ) , LogManager . getLoggerRepository ( ) ) ; int i = - 1 ; Logger root = Logger . getRootLogger ( ) ; XLoggerTestCase . logger . trace ( ( "Message<seq2seq4repair_space>" + ( ++ i ) ) ) ; XLoggerTestCase . logger . debug ( ( "Message<seq2seq4repair_space>" + ( ++ i ) ) ) ; XLoggerTestCase . logger . warn ( ( "Message<seq2seq4repair_space>" + ( ++ i ) ) ) ; XLoggerTestCase . logger . error ( ( "Message<seq2seq4repair_space>" + ( ++ i ) ) ) ; XLoggerTestCase . logger . fatal ( ( "Message<seq2seq4repair_space>" + ( ++ i ) ) ) ; Exception e = new Exception ( "Just<seq2seq4repair_space>testing" ) ; XLoggerTestCase . logger . debug ( ( "Message<seq2seq4repair_space>" + ( ++ i ) ) , e ) ; Transformer . transform ( "output//temp" , XLoggerTestCase . FILTERED , new Filter [ ] { new LineNumberFilter ( ) , new SunReflectFilter ( ) , new JunitTestRunnerFilter ( ) } ) ; <START_BUG> assertTrue ( Compare . compare ( XLoggerTestCase . FILTERED , ( "witness//customLogger." + number ) ) ) ; <END_BUG> } public static Test suite ( ) { } }

Fix:
assertTrue ( Compare . compare ( XLoggerTestCase . FILTERED , ( "witness//xml//customLogger." + number ) ) ) ;
Buggy code:
public class MessageDrivenComponentCreateService extends EJBComponentCreateService { private final Class < ? > messageListenerInterface ; private String resourceAdapterName ; private final Properties activationProps ; private final InjectedValue < PoolConfig > poolConfig = new InjectedValue < PoolConfig > ( ) ; private final InjectedValue < DefaultResourceAdapterService > defaultRANameService = new InjectedValue < DefaultResourceAdapterService > ( ) ; public MessageDrivenComponentCreateService ( final ComponentConfiguration componentConfiguration , final EjbJarConfiguration ejbJarConfiguration ) { } @ Override protected BasicComponent createComponent ( ) { } PoolConfig getPoolConfig ( ) { } public InjectedValue < PoolConfig > getPoolConfigInjector ( ) { } public InjectedValue < DefaultResourceAdapterService > getDefaultRANameServiceInjector ( ) { } String getDefaultResourceAdapterName ( ) { } private ClassLoader getDeploymentClassLoader ( ) { } private EndpointDeployer getEndpointDeployer ( ) { } private < S > ServiceController < S > getRequiredService ( final ServiceName serviceName , final Class < S > expectedType ) { } private ServiceRegistry getServiceRegistry ( ) { } ServiceName getResourceAdapterServiceName ( ) { <START_BUG> return ServiceName . of ( this . resourceAdapterName ) ; <END_BUG> } private String stripDotRarSuffix ( final String raName ) { } }

Fix:
return JBOSS . append ( "ra" ) . append ( this . resourceAdapterName ) ;
Buggy code:
public class FunctionsAdapter extends RecyclerView . Adapter < FunctionsAdapter . ViewHolder > { private List < Function > mFunctionsList ; private MainFragment mMainFragment ; public class ViewHolder extends RecyclerView . ViewHolder { public Display mDisplay ; public View mColorView ; public ImageButton mDeleteButton ; public ViewHolder ( View view ) { } } public FunctionsAdapter ( List < Function > functionsList , MainFragment fragment ) { } @ Override public FunctionsAdapter . ViewHolder onCreateViewHolder ( ViewGroup parent , int viewType ) { } @ Override public void onBindViewHolder ( final FunctionsAdapter . ViewHolder holder , int position ) { holder . mDisplay . setTextSize ( "24" ) ; holder . mDisplay . setIsFunction ( true ) ; holder . mDisplay . inputChanged ( mFunctionsList . get ( position ) . getFunction ( ) ) ; holder . mColorView . setBackgroundColor ( mFunctionsList . get ( position ) . getColor ( ) ) ; holder . mDeleteButton . setOnClickListener ( new View . OnClickListener ( ) { @ Override public void onClick ( View v ) { <START_BUG> mMainFragment . removeFunction ( holder . getAdapterPosition ( ) ) ; <END_BUG> mFunctionsList . remove ( holder . getAdapterPosition ( ) ) ; notifyItemRemoved ( holder . getAdapterPosition ( ) ) ; } } ) ; } @ Override public int getItemCount ( ) { } }

Fix:
mMainFragment . removeFunction ( holder . mDisplay . getSource ( ) ) ;
Buggy code:
public class ContactGroupActivity extends Activity { private static final String CONTACT_GROUP = "cg" ; private ContactGroup observed ; private LinearLayout layout ; private HashSet < ContactController > contactCtrlSet ; @ Override protected void onCreate ( Bundle savedInstanceState ) { super . onCreate ( savedInstanceState ) ; setContentView ( activity_contact_group ) ; Bundle data = this . getIntent ( ) . getExtras ( ) ; if ( data != null ) this . observed = ( ( ContactGroup ) ( data . get ( ContactGroupActivity . CONTACT_GROUP ) ) ) ; else this . observed = new ContactGroup ( ) ; this . layout = ( ( LinearLayout ) ( findViewById ( contact_list ) ) ) ; Button addContact = ( ( Button ) ( findViewById ( add_contact ) ) ) ; AddContactListener addContactListener = new AddContactListener ( this ) ; addContact . setOnClickListener ( addContactListener ) ; Button createGroup = ( ( Button ) ( findViewById ( register_group ) ) ) ; EditText et = ( ( EditText ) ( findViewById ( group_name ) ) ) ; <START_BUG> SaveGroupListener command = new SaveGroupListener ( this , et , this . observed ) ; <END_BUG> createGroup . setOnClickListener ( command ) ; } @ Override public boolean onCreateOptionsMenu ( Menu menu ) { } @ Override public boolean onOptionsItemSelected ( MenuItem item ) { } public static void launchOnContactGroup ( ContactGroup cg , Context ctx ) { } public void pickContact ( ) { } @ Override protected void onActivityResult ( int requestCode , int resultCode , Intent data ) { } }

Fix:
SaveGroupListener command = new SaveGroupListener ( this ) ;
Buggy code:
public class oreRespawnCommandListener { private Plugin plugin ; private oreRespawnRespawner respawn ; private oreRespawnConfig config ; private PermissionHandler Permissions ; private oreRespawnDBAndBlacklistWorker blacklist ; oreRespawnCommandListener ( Plugin plugin , oreRespawnRespawner oreRespawn , oreRespawnConfig configer , PermissionHandler Permissions , oreRespawnDBAndBlacklistWorker blacklist ) { } public boolean onCommand ( CommandSender sender , Command command , String label , String [ ] args ) { if ( sender instanceof Player ) { boolean ret = false ; String cmd = label ; Player pl = ( ( Player ) ( sender ) ) ; if ( ( ( Permissions ) != null ) || ( pl . isOp ( ) ) ) { if ( cmd . equals ( "ores" ) ) { if ( ( args . length ) == 0 ) { ret = defaultParam ( pl ) ; } else if ( args [ 0 ] . equals ( "spawnnow" ) ) { ret = oreRespawnParam ( pl ) ; } else if ( args [ 0 ] . equals ( "world" ) ) { ret = worldParam ( pl , args ) ; } else if ( args [ 0 ] . equals ( "maxdistance" ) ) { ret = maxdistanceParam ( pl , args ) ; } else <START_BUG> if ( args [ 0 ] . equals ( "region" ) ) { <END_BUG> ret = region ( sender , args ) ; } else if ( args [ 0 ] . equals ( "log" ) ) { ret = logParam ( pl , args ) ; } else { ret = defaultParam ( pl ) ; } if ( ! ret ) { pl . sendMessage ( "[oreRespawn]<seq2seq4repair_space>Permission<seq2seq4repair_space>denied!" ) ; } } } return ret ; } return false ; } private boolean region ( CommandSender sender , String [ ] args ) { } private boolean maxdistanceParam ( Player pl , String [ ] args ) { } private boolean oreRespawnParam ( Player pl ) { } private boolean defaultParam ( Player pl ) { } private boolean worldParam ( Player pl , String [ ] args ) { } private boolean logParam ( Player pl , String [ ] args ) { } }

Fix:
if ( ( args [ 0 ] . equals ( "region" ) ) && ( ( oreRespawn . worldEdit ) != null ) ) {
Buggy code:
public class ChestMode extends FightBase implements FightMode , Listener { private BukkitTask task ; private int counter ; private boolean areChestsOpen ; public ChestMode ( WarGear plugin , Arena arena ) { } @ Override public void start ( ) { } private void fillChest ( Location loc ) { } private ItemStack [ ] removeTNTStacks ( ItemStack [ ] withtnt ) { } private void fillChestWithTnt ( Location loc ) { } private void setChests ( Location chestOne , Location chestTwo ) { } private void chestOpenCountdown ( ) { if ( ( counter ) == 0 ) { <START_BUG> this . arena . broadcastMessage ( ( ( ChatColor . GOLD ) + "Kisten<seq2seq4repair_space>werden<seq2seq4repair_space>ge§ffnet<seq2seq4repair_space>in:" ) ) ; <END_BUG> this . arena . broadcastMessage ( ( ( ChatColor . GOLD ) + "5<seq2seq4repair_space>Sekunden" ) ) ; } else if ( ( ( counter ) > 0 ) && ( ( counter ) < 2 ) ) { int diff = 5 - ( counter ) ; this . arena . broadcastMessage ( ( ( ( ( ChatColor . GOLD ) + "" ) + diff ) + "<seq2seq4repair_space>Sekunden" ) ) ; } else if ( ( ( counter ) > 1 ) && ( ( counter ) < 5 ) ) { int diff = 5 - ( counter ) ; this . arena . broadcastMessage ( ( ( ( ( ChatColor . AQUA ) + "" ) + diff ) + "<seq2seq4repair_space>Sekunden" ) ) ; } else if ( ( counter ) == 5 ) { counter = 0 ; areChestsOpen = true ; this . arena . broadcastMessage ( ( ( ChatColor . AQUA ) + "Kisten<seq2seq4repair_space>geöffnet!" ) ) ; task . cancel ( ) ; task = this . plugin . getServer ( ) . getScheduler ( ) . runTaskTimer ( this . plugin , new Runnable ( ) { public void run ( ) { fightPreStartCountdown ( ) ; } } , 0 , 20 ) ; return ; } ( counter ) ++ ; } private void fightPreStartCountdown ( ) { } private void fightStartCountdown ( ) { } @ Override public void stop ( ) { } @ Override public String getName ( ) { } @ EventHandler ( priority = EventPriority . HIGHEST ) public void playerInteractHandler ( PlayerInteractEvent event ) { } private Boolean isItemChestLocation ( Location value , Location checkAgainst ) { } private Boolean equalsLocation ( Location one , Location two ) { } }

Fix:
this . arena . broadcastMessage ( ( ( ChatColor . GOLD ) + "Kisten<seq2seq4repair_space>werden<seq2seq4repair_space>geöffnet<seq2seq4repair_space>in:" ) ) ;
Buggy code:
public class FilenameSelectorTest extends BaseSelectorTest { private Project project ; public FilenameSelectorTest ( String name ) { } public BaseSelector getInstance ( ) { } public void testValidate ( ) { FilenameSelector s = ( ( FilenameSelector ) ( getInstance ( ) ) ) ; try { s . isSelected ( basedir , filenames [ 0 ] , files [ 0 ] ) ; fail ( "FilenameSelector<seq2seq4repair_space>did<seq2seq4repair_space>not<seq2seq4repair_space>check<seq2seq4repair_space>for<seq2seq4repair_space>required<seq2seq4repair_space>fields" ) ; } catch ( BuildException be1 ) { <START_BUG> assertEquals ( "The<seq2seq4repair_space>name<seq2seq4repair_space>attribute<seq2seq4repair_space>is<seq2seq4repair_space>required" , be1 . getMessage ( ) ) ; <END_BUG> } s = ( ( FilenameSelector ) ( getInstance ( ) ) ) ; Parameter param = new Parameter ( ) ; param . setName ( "garbage<seq2seq4repair_space>in" ) ; param . setValue ( "garbage<seq2seq4repair_space>out" ) ; Parameter [ ] params = new Parameter [ ] { param } ; s . setParameters ( params ) ; try { s . isSelected ( basedir , filenames [ 0 ] , files [ 0 ] ) ; fail ( "FilenameSelector<seq2seq4repair_space>did<seq2seq4repair_space>not<seq2seq4repair_space>check<seq2seq4repair_space>for<seq2seq4repair_space>valid<seq2seq4repair_space>parameter<seq2seq4repair_space>element" ) ; } catch ( BuildException be2 ) { assertEquals ( "Invalid<seq2seq4repair_space>parameter<seq2seq4repair_space>garbage<seq2seq4repair_space>in" , be2 . getMessage ( ) ) ; } } public void testSelectionBehaviour ( ) { } }

Fix:
assertEquals ( "The<seq2seq4repair_space>name<seq2seq4repair_space>or<seq2seq4repair_space>regex<seq2seq4repair_space>attribute<seq2seq4repair_space>is<seq2seq4repair_space>required" , be1 . getMessage ( ) ) ;
Buggy code:
public class ReactorComputation { private static final String TAG = ReactorComputation . class . getSimpleName ( ) ; private final int mId ; private final ArrayList < ReactorInvalidateCallback > mInvalidateCallbacks ; private final ReactorComputation mParent ; private final ReactorComputationFunction mFunction ; public boolean isStopped ( ) { } public boolean isInvalidated ( ) { } public boolean isErrored ( ) { } public boolean isRecomputing ( ) { } public boolean isConstructingComputation ( ) { } public ReactorComputation getParent ( ) { } private boolean mStopped ; private boolean mInvalidated ; private boolean mRecomputing ; private boolean mFirstRun ; private boolean mErrored ; private boolean mConstructingComputation = false ; ReactorComputation ( ReactorComputationFunction function , ReactorComputation parent ) { } public void stop ( ) { } public void invalidate ( ) { } public ReactorComputation addInvalidateComputationFunction ( ReactorInvalidateCallback callback ) { } private void compute ( ) { } void reCompute ( ) { mRecomputing = true ; try { while ( ( mInvalidated ) && ( ! ( mStopped ) ) ) { try { compute ( ) ; } catch ( Exception e ) { <START_BUG> e . printStackTrace ( ) ; <END_BUG> } } } finally { mRecomputing = false ; } } public int getId ( ) { } public boolean isFirstRun ( ) { } @ Override public String toString ( ) { } }

Fix:
throw e ;
Buggy code:
public class RuntimeModuleTests extends TestCase { <START_BUG> public static Test suite ( ) { <END_BUG> TestSuite suite = new TestSuite ( RuntimeModuleTests . class . getName ( ) ) ; suite . addTestSuite ( RuntimeModuleTests . class ) ; return suite ; } public RuntimeModuleTests ( String name ) { } public void testNothing ( ) { } }

Fix:
public static TestSuite suite ( ) {
Buggy code:
class ServerInterceptorFactory implements ServerMessageInterceptorFactory { @ Override public ServerMessageInterceptor create ( Channel channel ) { } private static class Interceptor implements ServerMessageInterceptor { private final Channel channel ; private Interceptor ( final Channel channel ) { } @ Override public void handleEvent ( final Event event ) throws IOException { UserInfo userInfo = channel . getConnection ( ) . getUserInfo ( ) ; if ( userInfo instanceof SubjectUserInfo ) { final Subject subject = ( ( SubjectUserInfo ) ( userInfo ) ) . getSubject ( ) ; Subject useSubject = subject ; PrivilegedAction < Subject > copyAction = new PrivilegedAction < Subject > ( ) { @ Override public Subject run ( ) { final Subject copySubject = new Subject ( ) ; copySubject . getPrincipals ( ) . addAll ( subject . getPrincipals ( ) ) ; copySubject . getPrivateCredentials ( ) . addAll ( subject . getPrivateCredentials ( ) ) ; copySubject . getPublicCredentials ( ) . addAll ( subject . getPublicCredentials ( ) ) ; Collection < Principal > principals = channel . getConnection ( ) . getPrincipals ( ) ; for ( Principal principal : principals ) { if ( principal instanceof InetAddressPrincipal ) { <START_BUG> copySubject . getPrincipals ( ) . add ( new org . jboss . as . controller . security . InetAddressPrincipal ( ( ( InetAddressPrincipal ) ( principal ) ) ) ) ; <END_BUG> break ; } } copySubject . getPrincipals ( ) . add ( new org . jboss . as . controller . security . AccessMechanismPrincipal ( AccessMechanism . JMX ) ) ; copySubject . setReadOnly ( ) ; return copySubject ; } } ; useSubject = ( WildFlySecurityManager . isChecking ( ) ) ? AccessController . doPrivileged ( copyAction ) : copyAction . run ( ) ; try { Subject . doAs ( useSubject , new PrivilegedExceptionAction < Void > ( ) { @ Override public Void run ( ) throws IOException { event . run ( ) ; return null ; } } ) ; } catch ( PrivilegedActionException e ) { Exception cause = e . getException ( ) ; if ( cause instanceof IOException ) { throw ( ( IOException ) ( cause ) ) ; } else { throw new IOException ( cause ) ; } } } else { event . run ( ) ; } } } }

Fix:
copySubject . getPrincipals ( ) . add ( new org . jboss . as . controller . security . InetAddressPrincipal ( ( ( InetAddressPrincipal ) ( principal ) ) . getInetAddress ( ) ) ) ;
Buggy code:
class ReviewRequestUpdatePage extends WizardPage { private Text _text ; public ReviewRequestUpdatePage ( ) { } public void createControl ( Composite parent ) { Composite control = new Composite ( parent , SWT . NONE ) ; <START_BUG> GridLayoutFactory . fillDefaults ( ) . numColumns ( 2 ) . applyTo ( control ) ; <END_BUG> Label label = new Label ( control , SWT . WRAP ) ; GridDataFactory . swtDefaults ( ) . align ( BEGINNING , BEGINNING ) . applyTo ( label ) ; label . setText ( "Change<seq2seq4repair_space>description\n(optional)" ) ; _text = new Text ( control , ( ( ( ( SWT . MULTI ) | ( SWT . BORDER ) ) | ( SWT . WRAP ) ) | ( SWT . V_SCROLL ) ) ) ; GridDataFactory . swtDefaults ( ) . hint ( TEXT_WIDTH , 60 ) . applyTo ( _text ) ; setControl ( control ) ; } public String getChangeDescription ( ) { } }

Fix:
GridLayoutFactory . fillDefaults ( ) . numColumns ( 1 ) . applyTo ( control ) ;
Buggy code:
public class SoundAdapter extends SoundProgressAdapter < SoundAdapter . ViewHolder > implements MediaPlayer . OnCompletionListener { private static final int VIEWPAGER_INDEX_SOUND_CONTROLS = 1 ; private SoundSheetFragment parent ; private SoundAdapter . OnItemDeleteListener onItemDeleteListener ; public SoundAdapter ( SoundSheetFragment parent ) { } public void setOnItemDeleteListener ( SoundAdapter . OnItemDeleteListener onItemDeleteListener ) { } public void addAll ( List < EnhancedMediaPlayer > mediaPlayers ) { } public void clear ( ) { } public void remove ( int index ) { } @ Override public int getItemCount ( ) { } @ Override public SoundAdapter . ViewHolder onCreateViewHolder ( ViewGroup parent , int position ) { } @ Override public void onBindViewHolder ( SoundAdapter . ViewHolder holder , int position ) { } @ Override public void onCompletion ( MediaPlayer mp ) { } public class ViewHolder extends DismissibleItemViewHolder implements View . OnClickListener , CompoundButton . OnCheckedChangeListener , SeekBar . OnSeekBarChangeListener , CustomEditText . OnTextEditedListener { private CustomEditText name ; private CheckBox play ; private CheckBox loop ; private CheckBox inPlaylist ; private View stop ; private SeekBar timePosition ; public ViewHolder ( View itemView ) { } @ Override protected PagerAdapter getPagerAdapter ( ) { } @ Override protected int getIndexOfContentPage ( ) { } @ Override public void onPageScrolled ( int i , float v , int i1 ) { } @ Override public void onPageScrollStateChanged ( int i ) { } @ Override public void onPageSelected ( final int selectedPage ) { } @ Override public void onTextEdited ( String text ) { } @ Override public void onCheckedChanged ( CompoundButton buttonView , boolean isChecked ) { EnhancedMediaPlayer player = sounds . get ( this . getPosition ( ) ) ; switch ( buttonView . getId ( ) ) { case id . cb_play : if ( isChecked ) player . playSound ( ) ; else player . pauseSound ( ) ; break ; case id . cb_loop : player . setLooping ( isChecked ) ; break ; case id . cb_add_to_playlist : <START_BUG> player . setInPlaylist ( isChecked ) ; <END_BUG> SoundManagerFragment fragment = ( ( SoundManagerFragment ) ( parent . getFragmentManager ( ) . findFragmentByTag ( TAG ) ) ) ; fragment . toggleSoundInPlaylist ( player . getMediaPlayerData ( ) . getPlayerId ( ) , isChecked ) ; fragment . notifyPlaylist ( ) ; notifyDataSetChanged ( ) ; break ; } } @ Override public void onClick ( View view ) { } @ Override public void onProgressChanged ( SeekBar seekBar , int progress , boolean fromUser ) { } @ Override public void onStartTrackingTouch ( SeekBar seekBar ) { } @ Override public void onStopTrackingTouch ( SeekBar seekBar ) { } } private class SoundItemPagerAdapter extends PagerAdapter { @ Override public int getCount ( ) { } @ Override public boolean isViewFromObject ( View view , Object object ) { } @ Override public Object instantiateItem ( ViewGroup container , int position ) { } } public static interface OnItemDeleteListener { public void onItemDelete ( EnhancedMediaPlayer data , int position ) { } } }

Fix:
player . setIsInPlaylist ( isChecked ) ;
Buggy code:
public class AppNotificationRepository extends AppRepository implements AppNotification { @ Log4jLogger Logger logger ; @ HibernateValidator Validator validator ; @ Inject Authorization auth ; public ActionResult < Notification > notifyUser ( int userId , String sourceModel , int sourceId , String targetModel , int targetId ) { } public void removeNotification ( int id ) { } public void setSeen ( int id ) { } public void clearNotifications ( int userId ) { if ( auth . userExist ( userId ) ) { <START_BUG> delete ( "delete<seq2seq4repair_space>Notification<seq2seq4repair_space>n<seq2seq4repair_space>where<seq2seq4repair_space>n.userId<seq2seq4repair_space>=<seq2seq4repair_space>?" , userId ) ; <END_BUG> } } public List < Notification > getAllNotifications ( int startIndex , int maxResult , int userId ) { } public List < Notification > getAllNotifications ( int startIndex , int maxResult , int userId , boolean isSeen ) { } private boolean isNotified ( int userId , String sourceModel , int sourceId , String targetModel , int targetId ) { } }

Fix:
delete ( "from<seq2seq4repair_space>Notification<seq2seq4repair_space>as<seq2seq4repair_space>n<seq2seq4repair_space>where<seq2seq4repair_space>n.userId<seq2seq4repair_space>=<seq2seq4repair_space>?" , userId ) ;
Buggy code:
public class RelativePmi { public static class MapClass extends Mapper < Ngram , NgramValue , Ngram , NgramValue > { @ Override public void map ( Ngram key , NgramValue value , Context context ) throws IOException , InterruptedException { } } public static class ReduceClass extends Reducer < Ngram , NgramValue , Text , DoubleWritable > { private Text wordOut = new Text ( ) ; @ Override public void reduce ( Ngram key , Iterable < NgramValue > values , Context context ) throws IOException , InterruptedException { <START_BUG> int count = 0 ; <END_BUG> double relPmi = 0 ; final Double minPmi = Double . parseDouble ( context . getConfiguration ( ) . get ( "minPmi" ) ) ; final Double relMinPmi = Double . parseDouble ( context . getConfiguration ( ) . get ( "relMinPmi" ) ) ; String word = ( key . getDecade ( ) . toString ( ) ) + "\t" ; for ( NgramValue value : values ) { if ( value . isFirst ( ) ) { count += value . getPmi ( ) . get ( ) ; } else { relPmi = ( value . getPmi ( ) . get ( ) ) // ( ( double ) ( count ) ) ; if ( ( relPmi >= relMinPmi ) || ( ( value . getPmi ( ) . get ( ) ) >= minPmi ) ) { wordOut . set ( ( word + ( value . getWords ( ) ) ) ) ; context . write ( wordOut , value . getPmi ( ) ) ; } } } } } }

Fix:
double count = 0 ;
Buggy code:
public class SendRequestPlugin extends CordovaPlugin { public SendRequestPlugin ( ) { } public static final String PASS_PERSON_INFO = "passPersonInfo" ; public static final String PASS_VEHICLE_INFO = "passVehicleInfo" ; @ Override public boolean execute ( String action , JSONArray args , CallbackContext callbackContext ) throws JSONException { try { if ( SendRequestPlugin . PASS_PERSON_INFO . equals ( action ) ) { JSONObject arg_object = args . getJSONObject ( 0 ) ; Intent reqestIntent = new Intent ( Intent . ACTION_SEND_MULTIPLE ) . setType ( "vnd.android.cursor.item//event" ) . putExtra ( "firstName" , arg_object . getString ( "firstName" ) ) . putExtra ( "lastName" , arg_object . getString ( "lastName" ) ) . putExtra ( "address1" , arg_object . getString ( "address1" ) ) . putExtra ( "address2" , arg_object . getString ( "address2" ) ) ; Log . i ( "PLUGIN" , ( "plugin<seq2seq4repair_space>is<seq2seq4repair_space>working!<seq2seq4repair_space>" + ( arg_object . getString ( "firstName" ) ) ) ) ; <START_BUG> Toast . makeText ( this . cordova . getActivity . getApplicationContext ( ) , "plugin<seq2seq4repair_space>running" , LENGTH_SHORT ) . show ( ) ; <END_BUG> callbackContext . success ( ) ; return true ; } callbackContext . error ( "Invalid<seq2seq4repair_space>action" ) ; return false ; } catch ( Exception e ) { System . err . println ( ( "Exception:<seq2seq4repair_space>" + ( e . getMessage ( ) ) ) ) ; callbackContext . error ( e . getMessage ( ) ) ; return false ; } } No newline ; at end ; of file ; }

Fix:
Toast . makeText ( this . cordova . getActivity ( ) . getApplicationContext ( ) , "plugin<seq2seq4repair_space>running" , LENGTH_SHORT ) . show ( ) ;
Buggy code:
public class UnitStandbyEvent implements GameEvent , Serializable { private static final long serialVersionUID = 4262015L ; private final int unit_x ; private final int unit_y ; public UnitStandbyEvent ( int unit_x , int unit_y ) { } @ Override public Point getFocus ( GameCore game ) { } @ Override public boolean canExecute ( GameCore game ) { } @ Override public void execute ( GameManager manager ) { } private void processAuraEffects ( Unit unit , GameManager manager ) { GameCore game = manager . getGame ( ) ; if ( unit . hasAbility ( ATTACK_AURA ) ) { for ( int i = - 1 ; i <= 1 ; i ++ ) { for ( int j = - 1 ; j <= 1 ; j ++ ) { if ( ( i != 0 ) || ( j != 0 ) ) { Unit target = game . getMap ( ) . getUnit ( ( ( unit . getX ( ) ) + i ) , ( ( unit . getY ( ) ) + j ) ) ; if ( ( target != null ) && ( ( game . getAlliance ( unit . getTeam ( ) ) ) == ( game . getAlliance ( target . getTeam ( ) ) ) ) ) { target . attachStatus ( new Status ( Status . INSPIRED , 0 ) ) ; } } } } } HashMap < Point , Integer > hp_change_map = new HashMap < Point , Integer > ( ) ; if ( unit . hasAbility ( HEALING_AURA ) ) { int heal = 15 + ( ( unit . getLevel ( ) ) * 5 ) ; Set < Point > attackable_positions = manager . createAttackablePositions ( unit ) ; attackable_positions . add ( game . getMap ( ) . getPosition ( unit . getX ( ) , unit . getY ( ) ) ) ; for ( Point target_position : attackable_positions ) { Unit target = game . getMap ( ) . getUnit ( target_position . x , target_position . y ) ; if ( ( game . canHeal ( unit , target ) ) && ( ! ( target . isSkeleton ( ) ) ) ) { hp_change_map . put ( target_position , heal ) ; } } <START_BUG> manager . executeGameEvent ( new HpChangeEvent ( hp_change_map ) ) ; <END_BUG> } } }

Fix:
manager . executeGameEvent ( new HpChangeEvent ( hp_change_map ) , false ) ;
Buggy code:
public class BookTester { Book b ; @ Before public void setUp ( ) { } @ Test public void getAuthorTitle ( ) { } @ Test public void checkAvailability ( ) { assertFalse ( b . isTaken ( ) ) ; <START_BUG> b . setTaken ( ) ; <END_BUG> assertTrue ( b . isTaken ( ) ) ; } }

Fix:
b . setTaken ( true ) ;
Buggy code:
public class PosterFragment extends Fragment { private static final String ARG_PARAM1 = "param1" ; private static final String ARG_PARAM2 = "param2" ; private String mParam1 ; private String mParam2 ; private PosterFragment . OnFragmentInteractionListener mListener ; public static PosterFragment newInstance ( ) { } public PosterFragment ( ) { } @ Override public void onCreate ( Bundle savedInstanceState ) { } @ Override public View onCreateView ( LayoutInflater inflater , ViewGroup container , Bundle savedInstanceState ) { } private void createAnswerLayout ( View rootView ) { } private void createPostContentLayout ( View rootView ) { } private void createBottomLayout ( View rootView ) { } private void sendResultToDatabase ( ) { } private void createTopLayout ( View rootView ) { ImageView backButton = ( ( ImageView ) ( rootView . findViewById ( back_button ) ) ) ; backButton . setOnClickListener ( new View . OnClickListener ( ) { @ Override public void onClick ( View v ) { } } ) ; TextView title = ( ( TextView ) ( rootView . findViewById ( location_poster ) ) ) ; <START_BUG> ImageView responseButton = ( ( ImageView ) ( rootView . findViewById ( response_button ) ) ) ; <END_BUG> responseButton . setOnClickListener ( new View . OnClickListener ( ) { @ Override public void onClick ( View v ) { Page4 responseFragment = new Page4 ( ) ; FragmentTransaction fragmentTransaction = getFragmentManager ( ) . beginTransaction ( ) ; fragmentTransaction . replace ( container , responseFragment ) . commit ( ) ; } } ) ; } public void onButtonPressed ( Uri uri ) { } @ Override public void onAttach ( Activity activity ) { } @ Override public void onDetach ( ) { } public interface OnFragmentInteractionListener { public void onFragmentInteraction ( Uri uri ) { } } }

Fix:
ImageView responseButton = ( ( ImageView ) ( rootView . findViewById ( response_poster_button ) ) ) ;
Buggy code:
public abstract class DataTypeUtilities { public static int getPrecision ( DataTypeDescriptor dtd ) { } public static int getDigitPrecision ( DataTypeDescriptor dtd ) { } public static boolean isCurrency ( DataTypeDescriptor dtd ) { } public static boolean isCaseSensitive ( DataTypeDescriptor dtd ) { } public static int isNullable ( DataTypeDescriptor dtd ) { } public static boolean isSigned ( DataTypeDescriptor dtd ) { } public static int getColumnDisplaySize ( DataTypeDescriptor dtd ) { } public static int getColumnDisplaySize ( int typeId , int storageLength ) { int size ; switch ( typeId ) { case Types . TIMESTAMP : <START_BUG> size = 26 ; <END_BUG> break ; case Types . DATE : size = 10 ; break ; case Types . TIME : size = 8 ; break ; case Types . INTEGER : size = 11 ; break ; case Types . SMALLINT : size = 6 ; break ; case Types . REAL : case Types . FLOAT : size = 13 ; break ; case Types . DOUBLE : size = 22 ; break ; case Types . TINYINT : size = 15 ; break ; case Types . BINARY : case Types . VARBINARY : case Types . LONGVARBINARY : case Types . BLOB : size = 2 * storageLength ; if ( size < 0 ) size = Integer . MAX_VALUE ; break ; case Types . BIGINT : size = 20 ; break ; case Types . BIT : case Types . BOOLEAN : size = 5 ; break ; default : int w = storageLength ; size = ( w > 0 ) ? w : JDBC30Translation . DEFAULT_COLUMN_DISPLAY_SIZE ; break ; } return size ; } public static int computeMaxWidth ( int precision , int scale ) { } }

Fix:
size = 29 ;
Buggy code:
public class CCMCheck extends Continuus { public static final String FLAG_COMMENT = "//comment" ; public static final String FLAG_TASK = "//task" ; private File _file = null ; private String _comment = null ; private String _task = null ; public CCMCheck ( ) { } public void setComment ( String v ) { } public void setFile ( File v ) { } public void setTask ( String v ) { } public String getComment ( ) { } public File getFile ( ) { } public String getTask ( ) { } public void execute ( ) throws BuildException { Commandline commandLine = new Commandline ( ) ; Project aProj = getProject ( ) ; int result = 0 ; commandLine . setExecutable ( getCcmCommand ( ) ) ; commandLine . createArgument ( ) . setValue ( getCcmAction ( ) ) ; checkOptions ( commandLine ) ; result = run ( commandLine ) ; if ( result != 0 ) { String msg = "Failed<seq2seq4repair_space>executing:<seq2seq4repair_space>" + ( commandLine . toString ( ) ) ; <START_BUG> throw new BuildException ( msg , location ) ; <END_BUG> } } private void checkOptions ( Commandline cmd ) { } }

Fix:
throw new BuildException ( msg ) ;
Buggy code:
@ Stateless public class ShopMatchingsServiceImpl implements ShopMatchingsService { @ Inject private MatchingsService matchingsService ; private static final Logger log = Logger . getLogger ( ShopMatchingsServiceImpl . class . getName ( ) ) ; public Response getAllMatchings ( ) throws ServiceException { } public Response getAllMatchingsByItem ( Long itemId ) throws ServiceException { List < Matching > allMatchings = matchingsService . getAllItemsByItem ( itemId ) ; JsonObjectBuilder jsonObjectBuilder = Json . createObjectBuilder ( ) ; jsonObjectBuilder . add ( "item_id" , itemId ) ; JsonArrayBuilder jsonArrayBuilder = Json . createArrayBuilder ( ) ; if ( allMatchings != null ) { for ( Matching m : allMatchings ) { JsonObjectBuilder jsonItemMatchedObjectBuilder = Json . createObjectBuilder ( ) ; if ( ( m . getItemMatched ( ) ) != null ) { jsonItemMatchedObjectBuilder . add ( "id" , ( ( m . getItemMatched ( ) . getId ( ) ) == null ? "" : m . getItemMatched ( ) . getId ( ) . toString ( ) ) ) . add ( "user_id" , ( ( m . getItemMatched ( ) . getUser ( ) . getId ( ) ) == null ? "" : m . getItemMatched ( ) . getUser ( ) . getId ( ) . toString ( ) ) ) . add ( "user_email" , ( ( m . getItemMatched ( ) . getUser ( ) . getEmail ( ) ) == null ? "" : m . getItemMatched ( ) . getUser ( ) . getEmail ( ) ) ) . add ( "club_id" , ( ( m . getItemMatched ( ) . getClub ( ) . getId ( ) ) == null ? "" : m . getItemMatched ( ) . getClub ( ) . getId ( ) . toString ( ) ) ) . add ( "type" , ( ( m . getItemMatched ( ) . getType ( ) ) == null ? "" : m . getItemMatched ( ) . getType ( ) . toString ( ) ) ) . add ( "name" , ( ( m . getItemMatched ( ) . getName ( ) ) == null ? "" : m . getItemMatched ( ) . getName ( ) ) ) . add ( "description" , ( ( m . getItemMatched ( ) . getDescription ( ) ) == null ? "" : m . getItemMatched ( ) . getDescription ( ) ) ) . add ( "hasImage" , m . getItemMatched ( ) . hasImage ( ) ) . add ( "minPrice" , ( ( m . getItemMatched ( ) . getMinPrice ( ) ) == null ? "" : m . getItemMatched ( ) . getMinPrice ( ) . toString ( ) ) ) . add ( "maxPrice" , ( ( m . getItemMatched ( ) . getMaxPrice ( ) ) == null ? "" : m . getItemMatched ( ) . getMaxPrice ( ) . toString ( ) ) ) ; if ( ( m . getItemMatched ( ) . getTags ( ) ) != null ) { JsonArrayBuilder jsonArrayBuilderInterest = Json . createArrayBuilder ( ) ; for ( String s : m . getItemMatched ( ) . getTags ( ) ) { jsonArrayBuilderInterest . add ( Json . createObjectBuilder ( ) . add ( "text" , s ) ) ; } jsonItemMatchedObjectBuilder . add ( "tags" , jsonArrayBuilderInterest ) ; } } <START_BUG> jsonArrayBuilder . add ( jsonObjectBuilder ) ; <END_BUG> } } jsonObjectBuilder . add ( "machedItems" , jsonArrayBuilder ) ; JsonObject jsonObject = jsonObjectBuilder . build ( ) ; return Response . ok ( jsonObject . toString ( ) ) . build ( ) ; } public Response get ( Long matchingId ) throws ServiceException { } }

Fix:
jsonArrayBuilder . add ( jsonItemMatchedObjectBuilder ) ;
Buggy code:
public final class Property { private final Class < ? > objectType ; private final Method readMethod ; private final Method writeMethod ; private final String name ; private final MethodParameter methodParameter ; private final Annotation [ ] annotations ; public Property ( Class < ? > objectType , Method readMethod , Method writeMethod ) { } public Class < ? > getObjectType ( ) { } public String getName ( ) { } public Class < ? > getType ( ) { } public Method getReadMethod ( ) { } public Method getWriteMethod ( ) { } MethodParameter getMethodParameter ( ) { } Annotation [ ] getAnnotations ( ) { } private String resolveName ( ) { } private MethodParameter resolveMethodParameter ( ) { MethodParameter read = resolveReadMethodParameter ( ) ; MethodParameter write = resolveWriteMethodParameter ( ) ; if ( ( read == null ) && ( write == null ) ) { <START_BUG> throw new IllegalStateException ( "Property<seq2seq4repair_space>is<seq2seq4repair_space>neither<seq2seq4repair_space>readable<seq2seq4repair_space>or<seq2seq4repair_space>writeable" ) ; <END_BUG> } if ( ( ( read != null ) && ( write != null ) ) && ( ! ( read . getParameterType ( ) . equals ( write . getParameterType ( ) ) ) ) ) { throw new IllegalStateException ( "Read<seq2seq4repair_space>and<seq2seq4repair_space>write<seq2seq4repair_space>parameter<seq2seq4repair_space>types<seq2seq4repair_space>are<seq2seq4repair_space>not<seq2seq4repair_space>the<seq2seq4repair_space>same" ) ; } return read != null ? read : write ; } private MethodParameter resolveReadMethodParameter ( ) { } private MethodParameter resolveWriteMethodParameter ( ) { } private MethodParameter resolveParameterType ( MethodParameter parameter ) { } private Annotation [ ] resolveAnnotations ( ) { } private Field getField ( ) { } private Class < ? > declaringClass ( ) { } }

Fix:
throw new IllegalStateException ( "Property<seq2seq4repair_space>is<seq2seq4repair_space>neither<seq2seq4repair_space>readable<seq2seq4repair_space>nor<seq2seq4repair_space>writeable" ) ;
Buggy code:
public class LocalVariablePattern extends VariablePattern implements IIndexConstants { LocalVariable localVariable ; public LocalVariablePattern ( boolean findDeclarations , boolean readAccess , boolean writeAccess , LocalVariable localVariable , int matchRule ) { } public void findIndexMatches ( Index index , IndexQueryRequestor requestor , SearchParticipant participant , IJavaSearchScope scope , IProgressMonitor progressMonitor ) { IPackageFragmentRoot root = ( ( IPackageFragmentRoot ) ( this . localVariable . getAncestor ( IJavaElement . PACKAGE_FRAGMENT_ROOT ) ) ) ; String path ; if ( root . isArchive ( ) ) { IType type = ( ( IType ) ( this . localVariable . getAncestor ( IJavaElement . TYPE ) ) ) ; String filePath = ( type . getFullyQualifiedName ( '//' ) . replace ( '.' , '//' ) ) + ( SuffixConstants . SUFFIX_STRING_class ) ; path = ( ( root . getPath ( ) ) + ( IJavaSearchScope . JAR_FILE_ENTRY_SEPARATOR ) ) + filePath ; } else { path = this . localVariable . getPath ( ) . toString ( ) ; } if ( scope instanceof JavaSearchScope ) { JavaSearchScope javaSearchScope = ( ( JavaSearchScope ) ( scope ) ) ; AccessRestriction access = javaSearchScope . getAccessRestriction ( path ) ; <START_BUG> if ( ! ( UNINIT_RESTRICTION . equals ( access ) ) ) { <END_BUG> if ( ! ( requestor . acceptIndexMatch ( path , this , participant , access ) ) ) throw new OperationCanceledException ( ) ; } } else if ( scope . encloses ( path ) ) { if ( ! ( requestor . acceptIndexMatch ( path , this , participant , null ) ) ) throw new OperationCanceledException ( ) ; } } protected StringBuffer print ( StringBuffer output ) { } }

Fix:
if ( ( NOT_INITIALIZED_RESTRICTION ) != access ) {
Buggy code:
public class Snippet232 { public static void main ( String [ ] args ) { final Display display = new Display ( ) ; Shell shell = new Shell ( display ) ; shell . setLayout ( new FillLayout ( ) ) ; <START_BUG> shell . setText ( "Show<seq2seq4repair_space>results<seq2seq4repair_space>as<seq2seq4repair_space>a<seq2seq4repair_space>bar<seq2seq4repair_space>chart<seq2seq4repair_space>in<seq2seq4repair_space>Table" ) ; <END_BUG> final Tree tree = new Tree ( shell , SWT . BORDER ) ; tree . setHeaderVisible ( true ) ; tree . setLinesVisible ( true ) ; TreeColumn column1 = new TreeColumn ( tree , SWT . NONE ) ; column1 . setText ( "Bug<seq2seq4repair_space>Status" ) ; column1 . setWidth ( 100 ) ; final TreeColumn column2 = new TreeColumn ( tree , SWT . NONE ) ; column2 . setText ( "Percent" ) ; column2 . setWidth ( 200 ) ; String [ ] states = new String [ ] { "Resolved" , "New" , "Won't<seq2seq4repair_space>Fix" , "Invalid" } ; String [ ] teams = new String [ ] { "UI" , "SWT" , "OSGI" } ; for ( int i = 0 ; i < ( teams . length ) ; i ++ ) { TreeItem item = new TreeItem ( tree , SWT . NONE ) ; item . setText ( teams [ i ] ) ; for ( int j = 0 ; j < ( states . length ) ; j ++ ) { TreeItem subItem = new TreeItem ( item , SWT . NONE ) ; subItem . setText ( states [ j ] ) ; } } tree . addListener ( PaintItem , new Listener ( ) { int [ ] percents = new int [ ] { 50 , 30 , 5 , 15 } ; public void handleEvent ( Event event ) { if ( ( event . index ) == 1 ) { TreeItem item = ( ( TreeItem ) ( event . item ) ) ; TreeItem parent = item . getParentItem ( ) ; if ( parent != null ) { GC gc = event . gc ; int index = parent . indexOf ( item ) ; int percent = percents [ index ] ; Color foreground = gc . getForeground ( ) ; Color background = gc . getBackground ( ) ; gc . setForeground ( display . getSystemColor ( COLOR_RED ) ) ; gc . setBackground ( display . getSystemColor ( COLOR_YELLOW ) ) ; int width = ( ( ( column2 . getWidth ( ) ) - 1 ) * percent ) // 100 ; gc . fillGradientRectangle ( event . x , event . y , width , event . height , true ) ; Rectangle rect2 = new Rectangle ( event . x , event . y , ( width - 1 ) , ( ( event . height ) - 1 ) ) ; gc . drawRectangle ( rect2 ) ; gc . setForeground ( display . getSystemColor ( COLOR_LIST_FOREGROUND ) ) ; String text = percent + "%" ; Point size = event . gc . textExtent ( text ) ; int offset = Math . max ( 0 , ( ( ( event . height ) - ( size . y ) ) // 2 ) ) ; gc . drawText ( text , ( ( event . x ) + 2 ) , ( ( event . y ) + offset ) , true ) ; gc . setForeground ( background ) ; gc . setBackground ( foreground ) ; } } } } ) ; shell . pack ( ) ; shell . open ( ) ; while ( ! ( shell . isDisposed ( ) ) ) { if ( ! ( display . readAndDispatch ( ) ) ) display . sleep ( ) ; } display . dispose ( ) ; } }

Fix:
shell . setText ( "Show<seq2seq4repair_space>results<seq2seq4repair_space>as<seq2seq4repair_space>a<seq2seq4repair_space>bar<seq2seq4repair_space>chart<seq2seq4repair_space>in<seq2seq4repair_space>Tree" ) ;
Buggy code:
public class LWCFeatures { private static LWC lwc ; public static void integrateLWC ( LWCPlugin test ) { } public static void clearOtherChests ( FLocation flocation , Faction faction ) { Location location = new Location ( Bukkit . getWorld ( flocation . getWorldName ( ) ) , ( ( flocation . getX ( ) ) * 16 ) , 5 , ( ( flocation . getZ ( ) ) * 16 ) ) ; Chunk chunk = location . getChunk ( ) ; BlockState [ ] blocks = chunk . getTileEntities ( ) ; List < Block > chests = new LinkedList < Block > ( ) ; for ( int x = 0 ; x < ( blocks . length ) ; x ++ ) { if ( ( blocks [ x ] . getType ( ) ) == ( Material . CHEST ) ) { chests . add ( blocks [ x ] . getBlock ( ) ) ; } } for ( int x = 0 ; x < ( chests . size ( ) ) ; x ++ ) { if ( ( LWCFeatures . lwc . findProtection ( chests . get ( x ) ) ) != null ) { <START_BUG> if ( ! ( faction . getFPlayers ( ) . contains ( i . get ( LWCFeatures . lwc . findProtection ( chests . get ( x ) ) . getBukkitOwner ( ) ) ) ) ) <END_BUG> LWCFeatures . lwc . findProtection ( chests . get ( x ) ) . remove ( ) ; } } } public static void clearAllChests ( FLocation flocation ) { } public static boolean getEnabled ( ) { } }

Fix:
if ( ! ( faction . getFPlayers ( ) . contains ( i . get ( LWCFeatures . lwc . findProtection ( chests . get ( x ) ) . getOwner ( ) ) ) ) )
Buggy code:
@ Configuration @ EnableWebMvcSecurity public class SecurityConfig extends WebSecurityConfigurerAdapter { @ Autowired private UserDetailsService userDetailsService ; @ Override protected void configure ( HttpSecurity http ) throws Exception { <START_BUG> http . formLogin ( ) . loginPage ( "//login" ) . failureUrl ( "//login?error" ) . usernameParameter ( "username" ) . permitAll ( ) . and ( ) . logout ( ) . logoutUrl ( "//logout" ) . deleteCookies ( "remember-me" ) . logoutSuccessUrl ( "//" ) . permitAll ( ) . and ( ) . rememberMe ( ) . and ( ) . authorizeRequests ( ) . antMatchers ( "//agents//create" , "//assets//**" ) . permitAll ( ) . anyRequest ( ) . authenticated ( ) . and ( ) . csrf ( ) . disable ( ) ; <END_BUG> } @ Override public void configure ( AuthenticationManagerBuilder auth ) throws Exception { } }

Fix:
http . formLogin ( ) . loginPage ( "//login" ) . failureUrl ( "//login?error" ) . usernameParameter ( "username" ) . permitAll ( ) . and ( ) . logout ( ) . logoutUrl ( "//logout" ) . deleteCookies ( "remember-me" ) . logoutSuccessUrl ( "//" ) . permitAll ( ) . and ( ) . rememberMe ( ) . and ( ) . authorizeRequests ( ) . antMatchers ( "//agent//create" , "//assets//**" ) . permitAll ( ) . anyRequest ( ) . authenticated ( ) . and ( ) . csrf ( ) . disable ( ) ;