nus-yam/ex-repair huggingface dataset:
Buggy code:
public class PlayerListener extends BaseListener { public PlayerListener ( ) { } @ EventHandler public void onJoin ( PlayerJoinEvent je ) { } private void inGameInteractEntity ( PlayerInteractEntityEvent iee , Game game , Player player ) { } @ EventHandler ( priority = EventPriority . HIGHEST ) public void onPlayerRespawn ( PlayerRespawnEvent pre ) { } @ EventHandler ( priority = EventPriority . HIGHEST ) public void onPlayerDie ( PlayerDeathEvent pde ) { Player player = pde . getEntity ( ) ; Game game = Game . getGameOfPlayer ( player ) ; if ( game == null ) { return ; } if ( ( game . getState ( ) ) == ( GameState . RUNNING ) ) { pde . setDroppedExp ( 0 ) ; pde . setDeathMessage ( null ) ; pde . getDrops ( ) . clear ( ) ; try { Class < ? > clazz = Class . forName ( ( ( "io.github.yannici.bedwarsreloaded.Com." + ( Main . getInstance ( ) . getCurrentVersion ( ) ) ) + ".PerformRespawnRunnable" ) ) ; BukkitRunnable respawnRunnable = ( ( BukkitRunnable ) ( clazz . getDeclaredConstructor ( Player . class ) . newInstance ( player ) ) ) ; <START_BUG> respawnRunnable . runTaskLater ( Main . getInstance ( ) , 20 ) ; <END_BUG> } catch ( Exception e ) { e . printStackTrace ( ) ; } pde . setKeepInventory ( false ) ; game . getCycle ( ) . onPlayerDies ( player , player . getKiller ( ) ) ; } } @ EventHandler public void onInventoryClick ( InventoryClickEvent ice ) { } @ SuppressWarnings ( { "rawtypes" , "unchecked" } ) private void onIngameInventoryClick ( InventoryClickEvent ice , Player player , Game game ) { } @ EventHandler ( priority = EventPriority . HIGHEST ) public void onCommand ( PlayerCommandPreprocessEvent pcpe ) { } @ EventHandler public void onSleep ( PlayerBedEnterEvent bee ) { } @ EventHandler public void onInteractEntity ( PlayerInteractEntityEvent iee ) { } @ EventHandler public void onFly ( PlayerToggleFlightEvent tfe ) { } @ SuppressWarnings ( "incomplete-switch" ) @ EventHandler public void onPlayerInteract ( PlayerInteractEvent pie ) { } @ SuppressWarnings ( "deprecation" ) private void onLobbyInventoryClick ( InventoryClickEvent ice , Player player , Game game ) { } @ EventHandler public void onDrop ( PlayerDropItemEvent die ) { } @ EventHandler ( priority = EventPriority . HIGHEST ) public void onQuit ( PlayerQuitEvent pqe ) { } @ EventHandler public void onDamage ( EntityDamageEvent ede ) { } }

Fix:
respawnRunnable . runTaskLater ( Main . getInstance ( ) , 40 ) ;
Buggy code:
public class CustomControlExample extends ControlExample { public CustomControlExample ( Composite parent ) { } Tab [ ] createTabs ( ) { } public static void main ( String [ ] args ) { Display display = new Display ( ) ; Shell shell = new Shell ( display ) ; shell . setLayout ( new FillLayout ( ) ) ; CustomControlExample instance = new CustomControlExample ( shell ) ; shell . setText ( getResourceString ( "custom.window.title" ) ) ; <START_BUG> setShellSize ( shell ) ; <END_BUG> shell . open ( ) ; while ( ! ( shell . isDisposed ( ) ) ) { if ( ! ( display . readAndDispatch ( ) ) ) display . sleep ( ) ; } instance . dispose ( ) ; } }

Fix:
setShellSize ( instance , shell ) ;
Buggy code:
@ Component public class MultiTenantProxyUtil { private JsonSerde jsonSerde = new JsonSerde ( ) ; @ Autowired ParametersConfig parametersConfig ; public Tenant getOtherTenantInfo ( List < BaseStatement > statements ) { } public SqlResults proxyCall ( String url , String sql ) throws IOException { String result = "succeed" ; StringBuilder sb = new StringBuilder ( ) ; HttpClient client = new DefaultHttpClient ( ) ; try { HttpPost post = new HttpPost ( url ) ; List < NameValuePair > nameValuePairs = new ArrayList < NameValuePair > ( 1 ) ; <START_BUG> nameValuePairs . add ( new BasicNameValuePair ( "sql" , sql ) ) ; <END_BUG> post . setEntity ( new org . apache . http . client . entity . UrlEncodedFormEntity ( nameValuePairs ) ) ; HttpResponse response = client . execute ( post ) ; HttpEntity entity = response . getEntity ( ) ; if ( entity != null ) { BufferedReader rd = new BufferedReader ( new InputStreamReader ( response . getEntity ( ) . getContent ( ) ) ) ; String line = "" ; while ( ( line = rd . readLine ( ) ) != null ) { sb . append ( line ) ; } } post . abort ( ) ; result = sb . toString ( ) ; } catch ( Exception e ) { result = e . getMessage ( ) ; } finally { if ( client != null ) { client . getConnectionManager ( ) . shutdown ( ) ; } } return ( ( SqlResults ) ( jsonSerde . deserialize ( result , new org . codehaus . jackson . type . TypeReference < SqlResults > ( ) { } ) ) ) ; } }

Fix:
nameValuePairs . add ( new BasicNameValuePair ( "sql" , sql . replace ( "\n" , "" ) ) ) ;
Buggy code:
public abstract class MSVSS extends Task { private static final String SS_EXE = "ss" ; public static final String PROJECT_PREFIX = "$" ; public static final String COMMAND_GET = "Get" ; public static final String COMMAND_CHECKOUT = "Checkout" ; public static final String COMMAND_CHECKIN = "Checkin" ; public static final String COMMAND_LABEL = "Label" ; public static final String COMMAND_HISTORY = "History" ; public static final String FLAG_LOGIN = "-Y" ; public static final String FLAG_OVERRIDE_WORKING_DIR = "-GL" ; public static final String FLAG_AUTORESPONSE_DEF = "-I-" ; public static final String FLAG_AUTORESPONSE_YES = "-I-Y" ; public static final String FLAG_AUTORESPONSE_NO = "-I-N" ; public static final String FLAG_RECURSION = "-R" ; public static final String FLAG_VERSION = "-V" ; public static final String FLAG_VERSION_DATE = "-Vd" ; public static final String FLAG_VERSION_LABEL = "-VL" ; public static final String FLAG_WRITABLE = "-W" ; public static final String VALUE_NO = "-N" ; public static final String VALUE_YES = "-Y" ; public static final String FLAG_QUIET = "-O-" ; private String m_SSDir = "" ; private String m_vssLogin = null ; private String m_vssPath = null ; private String m_serverPath = null ; public final void setLogin ( String login ) { } public final void setServerpath ( String serverPath ) { } public final void setSsdir ( final File dir ) { } public final void setVsspath ( String vssPath ) { } public final String getSSCommand ( ) { } public void getLoginCommand ( Commandline cmd ) { if ( ( m_vssLogin ) == null ) { return ; } else { <START_BUG> cmd . createArgument ( ) . setValue ( ( ( MSVSS . FLAG_LOGIN ) + ( m_vssLogin ) ) ) ; <END_BUG> } } public String getVsspath ( ) { } protected int run ( Commandline cmd ) throws TaskException { } }

Fix:
cmd . addArgument ( ( ( MSVSS . FLAG_LOGIN ) + ( m_vssLogin ) ) ) ;
Buggy code:
public class PlayerStatusesAppState extends ClientBaseAppState { private LinkedList < Integer > updatingStatuses = new LinkedList < Integer > ( ) ; private HashMap < Integer , PlayerStatus > statuses = new HashMap < Integer , PlayerStatus > ( ) ; @ Override public void initialize ( HeadlessAppStateManager stateManager , HeadlessApplication application ) { } public PlayerStatus getPlayerStatus ( int playerID ) { updatingStatuses . add ( playerID ) ; NetworkClient networkClient = getAppState ( NetworkClientHeadlessAppState . class ) . getNetworkClient ( ) ; <START_BUG> networkClient . sendMessage ( new Message_GetPlayerStatus ( 0 ) ) ; <END_BUG> while ( true ) { if ( ! ( updatingStatuses . contains ( playerID ) ) ) { return statuses . get ( playerID ) ; } try { Thread . sleep ( 100 ) ; } catch ( Exception ex ) { } } } public void setStatus ( int playerID , PlayerStatus playerStatus ) { } }

Fix:
networkClient . sendMessage ( new Message_GetPlayerStatus ( playerID ) ) ;
Buggy code:
if ( ( sourceGroupId > 0 ) && ( sourceGroupId != ( layout . getGroupId ( ) ) ) ) { Group sourceGroup = GroupLocalServiceUtil . getGroup ( sourceGroupId ) ; <START_BUG> if ( SitesUtil . isUserGroupLayoutSetViewable ( permissionChecker , sourceGroup ) ) { <END_BUG>

Fix:
if ( SitesUtil . isUserGroupLayoutSetViewable ( permissionChecker , layout . getGroup ( ) ) ) {
Buggy code:
public class Module extends BaseModule implements Persistent { private static final String className = "Module" ; private static final NumberKey ROOT_ID = new NumberKey ( "0" ) ; static String getCacheKey ( ObjectKey key ) { } public Issue getNewIssue ( ScarabUser user ) throws Exception { } public static Module getInstance ( ObjectKey modId ) throws Exception { } public Attribute [ ] getAttributes ( Criteria criteria ) throws Exception { } public Attribute [ ] getDedupeAttributes ( ) throws Exception { } public Attribute [ ] getQuickSearchAttributes ( ) throws Exception { } public List getRModuleAttributes ( boolean activeOnly ) throws Exception { } public Attribute [ ] getAllAttributes ( ) throws Exception { } public List getRModuleOptions ( Attribute attribute ) throws Exception { } public List getRModuleOptions ( Attribute attribute , boolean activeOnly ) throws Exception { Criteria crit = new Criteria ( 2 ) ; if ( activeOnly ) { crit . add ( ACTIVE , true ) ; } crit . add ( ATTRIBUTE_ID , attribute . getAttributeId ( ) ) ; crit . addOrderByColumn ( PREFERRED_ORDER ) ; crit . addOrderByColumn ( NUMERIC_VALUE ) ; crit . addOrderByColumn ( DISPLAY_VALUE ) ; crit . addOrderByColumn ( OPTION_NAME ) ; List rModOpts = null ; Module module = this ; Module prevModule = null ; do { <START_BUG> rModOpts = module . getRModuleOptionsJoinAttributeOption ( crit ) ; <END_BUG> prevModule = module ; module = prevModule . getModuleRelatedByParentId ( ) ; } while ( ( ( rModOpts . size ( ) ) == 0 ) && ( ! ( Module . ROOT_ID . equals ( ( ( NumberKey ) ( prevModule . getPrimaryKey ( ) ) ) ) ) ) ) ; return rModOpts ; } public List getLeafRModuleOptions ( Attribute attribute ) throws Exception { } public List getLeafRModuleOptions ( Attribute attribute , boolean activeOnly ) throws Exception { } public List getOptionTree ( Attribute attribute ) throws Exception { } public List getOptionTree ( Attribute attribute , boolean activeOnly ) throws Exception { } public List getUsers ( String partialUserName , Role [ ] includeRoles , Role [ ] excludeRoles ) throws Exception { } public void save ( ) throws Exception { } public Module doPopulate ( RunData data ) throws Exception { } public Module doPopulate ( RunData data , boolean validate ) throws Exception { } public class OptionInList { public int Level ; private AttributeOption attOption ; private RModuleOption modOption ; public OptionInList ( int level , AttributeOption option ) { } public OptionInList ( int level , RModuleOption option ) { } public boolean equals ( Object obj ) { } public NumberKey getOptionId ( ) { } public String getDisplayValue ( ) { } } }

Fix:
rModOpts = module . getRModuleOptions ( crit ) ;
Buggy code:
public class NALPerfLoop { public static void main ( String [ ] args ) { int repeats = 2 ; int warmups = 1 ; <START_BUG> int maxConcepts = 2000 ; <END_BUG> int extraCycles = 2048 ; int randomExtraCycles = 512 ; Parameters . THREADS = 1 ; NAR n = new NAR ( new Default ( ) . setConceptBagSize ( maxConcepts ) ) ; Collection c = NALTest . params ( ) ; while ( true ) { for ( Object o : c ) { String examplePath = ( ( String ) ( ( ( Object [ ] ) ( o ) ) [ 1 ] ) ) ; Parameters . DEBUG = false ; NALStressMeasure . perfNAL ( n , examplePath , ( extraCycles + ( ( int ) ( ( Math . random ( ) ) * randomExtraCycles ) ) ) , repeats , warmups , true ) ; } } } }

Fix:
int maxConcepts = 1024 ;
Buggy code:
public class ZipStreamMetaDataIterator implements MetaDataFilter . Resource , MetaDataIterator { private final ZipInputStream _stream ; private final MetaDataFilter _filter ; private ZipEntry _entry = null ; private ZipEntry _last = null ; private byte [ ] _buf = null ; public ZipStreamMetaDataIterator ( ZipInputStream stream , MetaDataFilter filter ) { } public boolean hasNext ( ) throws IOException { } <START_BUG> public Object next ( ) throws IOException { <END_BUG> if ( ! ( hasNext ( ) ) ) throw new NoSuchElementException ( ) ; String ret = _entry . getName ( ) ; _last = _entry ; _entry = null ; return ret ; } public InputStream getInputStream ( ) { } public File getFile ( ) { } public void close ( ) { } public String getName ( ) { } public byte [ ] getContent ( ) throws IOException { } private class NoCloseInputStream extends InputStream { public int available ( ) throws IOException { } public int read ( ) throws IOException { } public int read ( byte [ ] b , int off , int len ) throws IOException { } public void close ( ) { } } }

Fix:
public String next ( ) throws IOException {
Buggy code:
public class DataUrlToImageFile extends CordovaPlugin { public static final String ACTION = "saveImageData" ; @ Override public boolean execute ( String action , JSONArray data , CallbackContext callbackContext ) throws JSONException { } private File savePhoto ( Bitmap bmp , String format ) { File retVal = null ; try { Calendar c = Calendar . getInstance ( ) ; String date = ( ( ( ( ( "" + ( c . get ( Calendar . DAY_OF_MONTH ) ) ) + ( c . get ( Calendar . MONTH ) ) ) + ( c . get ( Calendar . YEAR ) ) ) + ( c . get ( Calendar . HOUR_OF_DAY ) ) ) + ( c . get ( Calendar . MINUTE ) ) ) + ( c . get ( Calendar . SECOND ) ) ; String deviceVersion = VERSION . RELEASE ; Log . i ( "DataUrlToImageFile" , ( "Android<seq2seq4repair_space>version<seq2seq4repair_space>" + deviceVersion ) ) ; int check = deviceVersion . compareTo ( "2.3.3" ) ; File folder ; if ( check >= 1 ) { folder = Environment . getExternalStoragePublicDirectory ( DIRECTORY_PICTURES ) ; if ( ! ( folder . exists ( ) ) ) { folder . mkdirs ( ) ; } } else { folder = Environment . getExternalStorageDirectory ( ) ; } File imageFile = null ; String extension = ".jpg" ; <START_BUG> int compressionFormat = CompressFormat . JPEG ; <END_BUG> if ( format . equals ( "image//png" ) ) { extension = ".png" ; compressionFormat = CompressFormat . PNG ; } else if ( format . equals ( "image//webp" ) ) { extension = ".webp" ; compressionFormat = CompressFormat . WEBP ; } imageFile = new File ( folder , ( ( date . toString ( ) ) + extension ) ) ; FileOutputStream out = new FileOutputStream ( imageFile ) ; bmp . compress ( compressionFormat , 100 , out ) ; out . flush ( ) ; out . close ( ) ; retVal = imageFile ; } catch ( Exception e ) { Log . e ( "DataUrlToImageFile" , ( "An<seq2seq4repair_space>exception<seq2seq4repair_space>occured<seq2seq4repair_space>while<seq2seq4repair_space>saving<seq2seq4repair_space>image:<seq2seq4repair_space>" + ( e . toString ( ) ) ) ) ; } return retVal ; } private void scanPhoto ( File imageFile ) { } }

Fix:
Bitmap . CompressFormat compressionFormat = CompressFormat . JPEG ;
Buggy code:
public class User extends ADigitalPerson { private String password = "password" ; private boolean requireLogin = true ; private List < Conversation > conversationList ; private List < Contact > contactList ; public User ( String username , Profile profile ) { } public void addConversation ( Conversation conversation ) { } public List < Contact > getContactList ( ) { } public List < Conversation > getConversationList ( ) { } @ Override public String toString ( ) { } public boolean addContact ( String userName ) { } public boolean removeContact ( Contact contact ) { } public void sendMessage ( ClientMessage clientMessage ) { } public Conversation addMessage ( ClientMessage clientMessage ) { } private Conversation conversationExists ( List < ADigitalPerson > participants ) { } public boolean changePassword ( String password ) { <START_BUG> return SystemUser . getInstance ( ) . getConnection ( ) . changePassword ( password ) ; <END_BUG> } private void updateObservers ( final ClientMessage message ) { } public Conversation getConversation ( int conversationId ) { } }

Fix:
return sketchagram . chalmers . com . network . Connection . getInstance ( ) . changePassword ( password ) ;
Buggy code:
public class Vectors { private Vectors ( ) { } public static double distance ( Vector v1 , Vector v2 ) { } public static Vector mean ( List < Vector > vectors ) { } public static Vector EntropyVector ( String str ) { } public static Vector EntropyVector ( Collection < String > strings ) { Vector [ ] vectors = new Vector [ strings . size ( ) ] ; int i = 0 ; for ( String str : strings ) { <START_BUG> vectors [ i ] = Vectors . EntropyVector ( str ) ; <END_BUG> } double [ ] supremeArray = new double [ 3 ] ; for ( int j = 0 ; j < 3 ; j ++ ) { double sum = 0.0 ; for ( Vector v : vectors ) { sum += v . get ( j ) ; } supremeArray [ j ] = sum // ( vectors . length ) ; } return new Vector ( supremeArray ) ; } public static Vector featureVector ( Host host , List < String > domains ) { } private static double [ ] entropyFeatures ( List < String > domains ) { } private static double [ ] ngramFeatures ( List < String > domains ) { } private static double [ ] structuralFeatures ( List < String > domains ) { } }

Fix:
vectors [ ( i ++ ) ] = Vectors . EntropyVector ( str ) ;
Buggy code:
public class LobFieldStrategy extends AbstractFieldStrategy { private int fieldType ; private boolean isBlob ; public void map ( boolean adapt ) { } public Boolean isCustomInsert ( OpenJPAStateManager sm , JDBCStore store ) { } public void delete ( OpenJPAStateManager sm , JDBCStore store , RowManager rm ) throws SQLException { } public void insert ( OpenJPAStateManager sm , JDBCStore store , RowManager rm ) throws SQLException { } public void customInsert ( OpenJPAStateManager sm , JDBCStore store ) throws SQLException { } public Boolean isCustomUpdate ( OpenJPAStateManager sm , JDBCStore store ) { } public void update ( OpenJPAStateManager sm , JDBCStore store , RowManager rm ) throws SQLException { Object ob = toDataStoreValue ( sm . fetchObjectField ( field . getIndex ( ) ) , store ) ; if ( field . getColumnIO ( ) . isUpdatable ( 0 , ( ob == null ) ) ) { Row row = field . getRow ( sm , store , rm , ACTION_UPDATE ) ; Select sel = createSelect ( sm , store ) ; if ( isBlob ) { store . getDBDictionary ( ) . insertBlobForStreamingLoad ( row , field . getColumns ( ) [ 0 ] , store , ob , sel ) ; } else { <START_BUG> store . getDBDictionary ( ) . insertClobForStreamingLoad ( row , field . getColumns ( ) [ 0 ] , sel ) ; <END_BUG> } } } public void customUpdate ( OpenJPAStateManager sm , JDBCStore store ) throws SQLException { } public int supportsSelect ( Select sel , int type , OpenJPAStateManager sm , JDBCStore store , JDBCFetchConfiguration fetch ) { } public int select ( Select sel , OpenJPAStateManager sm , JDBCStore store , JDBCFetchConfiguration fetch , int eagerMode ) { } public void load ( OpenJPAStateManager sm , JDBCStore store , JDBCFetchConfiguration fetch , Result res ) throws SQLException { } protected void assertNotMappedBy ( ) { } public void setFieldMapping ( FieldMapping owner ) { } private Select createSelect ( OpenJPAStateManager sm , JDBCStore store ) { } }

Fix:
store . getDBDictionary ( ) . insertClobForStreamingLoad ( row , field . getColumns ( ) [ 0 ] , ob ) ;
Buggy code:
@ WebServlet ( "//LoginServlet" ) public class LoginServlet extends HttpServlet { private static final long serialVersionUID = 1L ; public LoginServlet ( ) { } protected void doGet ( HttpServletRequest request , HttpServletResponse response ) throws IOException , ServletException { } protected void doPost ( HttpServletRequest request , HttpServletResponse response ) throws IOException , ServletException { response . setContentType ( "text//html;<seq2seq4repair_space>charset=UTF-8" ) ; AccountManager accounts = ( ( AccountManager ) ( getServletContext ( ) . getAttribute ( "accounts" ) ) ) ; String username = request . getParameter ( "username" ) ; String password = request . getParameter ( "password" ) ; if ( AccountManager . accountExists ( username ) ) { try { if ( AccountManager . passwordMatches ( username , password ) ) { Account acct = accounts . getAccount ( username ) ; getServletContext ( ) . setAttribute ( "session_user" , username ) ; if ( acct . isAdmin ( ) ) { RequestDispatcher dispatch = request . getRequestDispatcher ( "adminHomepage.jsp" ) ; dispatch . forward ( request , response ) ; } else { <START_BUG> RequestDispatcher dispatch = request . getRequestDispatcher ( "homepage.jsp" ) ; <END_BUG> dispatch . forward ( request , response ) ; } } else { request . setAttribute ( "errMsg" , "<h1>Sorry,<seq2seq4repair_space>the<seq2seq4repair_space>username<seq2seq4repair_space>or<seq2seq4repair_space>password<seq2seq4repair_space>was<seq2seq4repair_space>invalid.<//h1>" ) ; RequestDispatcher dispatch = request . getRequestDispatcher ( "login.jsp" ) ; dispatch . forward ( request , response ) ; } } catch ( NoSuchAlgorithmException e ) { request . setAttribute ( "errMsg" , "<h1>Sorry,<seq2seq4repair_space>the<seq2seq4repair_space>username<seq2seq4repair_space>or<seq2seq4repair_space>password<seq2seq4repair_space>was<seq2seq4repair_space>invalid.<//h1>" ) ; RequestDispatcher dispatch = request . getRequestDispatcher ( "login.jsp" ) ; dispatch . forward ( request , response ) ; } } else { request . setAttribute ( "errMsg" , "<h1>Sorry,<seq2seq4repair_space>the<seq2seq4repair_space>username<seq2seq4repair_space>or<seq2seq4repair_space>password<seq2seq4repair_space>was<seq2seq4repair_space>invalid.<//h1>" ) ; RequestDispatcher dispatch = request . getRequestDispatcher ( "login.jsp" ) ; dispatch . forward ( request , response ) ; } } }

Fix:
RequestDispatcher dispatch = request . getRequestDispatcher ( ( ( "\"homepage.jsp?id=" + username ) + "\"" ) ) ;
Buggy code:
public class TaskdefsModuleTests extends TestCase { <START_BUG> public static Test suite ( ) { <END_BUG> TestSuite suite = new TestSuite ( TaskdefsModuleTests . class . getName ( ) ) ; suite . addTest ( TaskdefsTests . suite ( ) ) ; return suite ; } public TaskdefsModuleTests ( String name ) { } }

Fix:
public static TestSuite suite ( ) {
Buggy code:
public class AnnotationDrivenBeanDefinitionParserTests { private GenericWebApplicationContext appContext ; @ Before public void setup ( ) { } @ Test public void testMessageCodesResolver ( ) { loadBeanDefinitions ( "mvc-config-message-codes-resolver.xml" ) ; RequestMappingHandlerAdapter adapter = appContext . getBean ( RequestMappingHandlerAdapter . class ) ; assertNotNull ( adapter ) ; Object initializer = adapter . getWebBindingInitializer ( ) ; assertNotNull ( initializer ) ; MessageCodesResolver resolver = ( ( org . springframework . web . bind . support . ConfigurableWebBindingInitializer ) ( initializer ) ) . getMessageCodesResolver ( ) ; assertNotNull ( resolver ) ; assertEquals ( TestMessageCodesResolver . class , resolver . getClass ( ) ) ; <START_BUG> assertEquals ( true , new org . springframework . beans . DirectFieldAccessor ( adapter ) . getPropertyValue ( "ignoreDefaultModelOnRedirect" ) ) ; <END_BUG> } @ Test public void testMessageConverters ( ) { } @ Test public void testMessageConvertersWithoutDefaultRegistrations ( ) { } @ SuppressWarnings ( "unchecked" ) @ Test public void testArgumentResolvers ( ) { } @ SuppressWarnings ( "unchecked" ) @ Test public void testReturnValueHandlers ( ) { } @ Test public void beanNameUrlHandlerMapping ( ) { } private void loadBeanDefinitions ( String fileName ) { } @ SuppressWarnings ( "unchecked" ) private void verifyMessageConverters ( Object bean , boolean hasDefaultRegistrations ) { } }

Fix:
assertEquals ( false , new org . springframework . beans . DirectFieldAccessor ( adapter ) . getPropertyValue ( "ignoreDefaultModelOnRedirect" ) ) ;
Buggy code:
@ Repository public class DomainSearchByNameStrategy extends AbstractDomainSearchStrategy { protected static final Logger LOGGER = LoggerFactory . getLogger ( DomainSearchByNameStrategy . class ) ; @ Override public boolean support ( QueryParam queryParam ) { } @ Override public Long searchCount ( QueryParam queryParam , JdbcTemplate jdbcTemplate ) { } @ Override public List < Domain > search ( QueryParam queryParam , JdbcTemplate jdbcTemplate ) { DomainSearchParam domainSearchParam = ( ( DomainSearchParam ) ( queryParam ) ) ; final String domainName = domainSearchParam . getQ ( ) ; final String punyName = domainSearchParam . getPunyName ( ) ; final String domainNameLikeClause = generateLikeClause ( domainName ) ; final String punyNameLikeClause = generateLikeClause ( punyName ) ; final String sql = "select<seq2seq4repair_space>*<seq2seq4repair_space>from<seq2seq4repair_space>RDAP_DOMAIN<seq2seq4repair_space>domain<seq2seq4repair_space>" + ( "<seq2seq4repair_space>where<seq2seq4repair_space>LDH_NAME<seq2seq4repair_space>like<seq2seq4repair_space>?<seq2seq4repair_space>or<seq2seq4repair_space>UNICODE_NAME<seq2seq4repair_space>like<seq2seq4repair_space>?<seq2seq4repair_space>" + "<seq2seq4repair_space>order<seq2seq4repair_space>by<seq2seq4repair_space>domain.LDH_NAME<seq2seq4repair_space>limit<seq2seq4repair_space>?,?<seq2seq4repair_space>" ) ; final PageBean page = domainSearchParam . getPageBean ( ) ; int startPage = ( page . getCurrentPage ( ) ) - 1 ; startPage = ( startPage >= 0 ) ? startPage : 0 ; final long startRow = startPage * ( page . getMaxRecords ( ) ) ; DomainQueryDaoImpl domainDao = new DomainQueryDaoImpl ( ) ; List < Domain > result = null ; result = jdbcTemplate . query ( new PreparedStatementCreator ( ) { @ Override public PreparedStatement createPreparedStatement ( Connection connection ) throws SQLException { PreparedStatement ps = connection . prepareStatement ( sql ) ; ps . setString ( 1 , punyNameLikeClause ) ; ps . setString ( 2 , domainNameLikeClause ) ; ps . setLong ( 3 , startRow ) ; ps . setLong ( 4 , page . getMaxRecords ( ) ) ; return ps ; } } , domainDao . new DomainWithStatusResultSetExtractor ( ) ) ; for ( Domain domain : result ) { <START_BUG> domainDao . queryDomainStatus ( domain ) ; <END_BUG> } return result ; } }

Fix:
domainDao . queryDomainStatus ( domain , jdbcTemplate ) ;
Buggy code:
public class JavaBuilder extends IncrementalProjectBuilder { IProject currentProject ; IJavaProject javaProject ; IWorkspaceRoot workspaceRoot ; ClasspathLocation [ ] classpath ; IContainer outputFolder ; IContainer [ ] sourceFolders ; SimpleLookupTable prereqOutputFolders ; State lastState ; BuildNotifier notifier ; public static final String JAVA_EXTENSION = "java" ; public static final String CLASS_EXTENSION = "class" ; public static final String JAR_EXTENSION = "jar" ; public static final String ZIP_EXTENSION = "zip" ; public static boolean DEBUG = false ; public static State readState ( DataInputStream in ) throws IOException { } public static void writeState ( Object state , DataOutputStream out ) throws IOException { } public JavaBuilder ( ) { } protected IProject [ ] build ( int kind , Map ignored , IProgressMonitor monitor ) throws CoreException { } private void buildAll ( ) { } private void buildDeltas ( SimpleLookupTable deltas ) { } private void cleanup ( ) { } private void clearLastState ( ) { } private void createFolder ( IContainer folder ) throws CoreException { } private SimpleLookupTable findDeltas ( ) { } private State getLastState ( IProject project ) { } private IProject [ ] getRequiredProjects ( ) { } private boolean hasClasspathChanged ( ) { } private boolean hasOutputLocationChanged ( ) { <START_BUG> return ! ( outputFolder . getLocation ( ) . toString ( ) . equalsIgnoreCase ( lastState . outputLocationString ) ) ; <END_BUG> } private void initializeBuilder ( ) throws CoreException { } private void recordNewState ( State state ) { } public String toString ( ) { } }

Fix:
return ! ( outputFolder . getLocation ( ) . toString ( ) . equals ( lastState . outputLocationString ) ) ;
Buggy code:
class Stringz { <START_BUG> static String className ( Object o ) { <END_BUG> return o != null ? o . getClass ( ) . getName ( ) : null ; } }

Fix:
static String className ( final Object o ) {
Buggy code:
public class ButtonFloat extends Button { int sizeIcon = 24 ; int sizeRadius = 28 ; ImageView icon ; Drawable drawableIcon ; public ButtonFloat ( Context context , AttributeSet attrs ) { } protected void setDefaultProperties ( ) { } protected void setAttributes ( AttributeSet attrs ) { int bacgroundColor = attrs . getAttributeResourceValue ( ANDROIDXML , "background" , ( - 1 ) ) ; if ( bacgroundColor != ( - 1 ) ) { setBackgroundColor ( getResources ( ) . getColor ( bacgroundColor ) ) ; } else { String background = attrs . getAttributeValue ( ANDROIDXML , "background" ) ; if ( background != null ) setBackgroundColor ( Color . parseColor ( background ) ) ; } <START_BUG> int iconResource = attrs . getAttributeResourceValue ( MATERIALDESIGNXML , "icon" , ( - 1 ) ) ; <END_BUG> if ( iconResource != ( - 1 ) ) drawableIcon = getResources ( ) . getDrawable ( iconResource ) ; boolean animate = attrs . getAttributeBooleanValue ( MATERIALDESIGNXML , "animate" , false ) ; if ( animate ) { post ( new Runnable ( ) { @ Override public void run ( ) { float originalY = ( ViewHelper . getY ( ButtonFloat . this ) ) - ( Utils . dpToPx ( 24 , getResources ( ) ) ) ; ViewHelper . setY ( ButtonFloat . this , ( ( ViewHelper . getY ( ButtonFloat . this ) ) + ( ( getHeight ( ) ) * 3 ) ) ) ; ObjectAnimator animator = ObjectAnimator . ofFloat ( ButtonFloat . this , "y" , originalY ) ; animator . setInterpolator ( new BounceInterpolator ( ) ) ; animator . setDuration ( 1500 ) ; animator . start ( ) ; } } ) ; } } Integer height ; Integer width ; @ Override protected void onDraw ( Canvas canvas ) { } public ImageView getIcon ( ) { } public void setIcon ( ImageView icon ) { } public Drawable getDrawableIcon ( ) { } public void setDrawableIcon ( Drawable drawableIcon ) { } public Bitmap cropCircle ( Bitmap bitmap ) { } @ Override public TextView getTextView ( ) { } }

Fix:
int iconResource = attrs . getAttributeResourceValue ( MATERIALDESIGNXML , "iconFloat" , ( - 1 ) ) ;
Buggy code:
public class DatabaseConnection extends SQLiteOpenHelper { private static final String DATABASE_NAME = "datenbrille" ; private static final int DATABASE_VERSION = 2 ; private static final String OPEN_DATA_PACKAGES_TABLE = "openDataPackages" ; private static final String ID_OPEN_DATA_PACKAGE = "id" ; private static final String NAME_OPEN_DATA_PACKAGE = "name" ; private static final String TITLE_OPEN_DATA_PACKAGE = "title" ; private static final String NOTES_OPEN_DATA_PACKAGE = "notes" ; private static final String UPDATE_TIMESTAMP_OPEN_DATA_PACKAGE = "updateTimestamp" ; private static final String DATAPOINT_TABLE = "datapoints" ; private static final String ID_DATAPOINT = "idDatapoint" ; private static final String ID_OPEN_DATA_PACKAGE_IN_DATAPOINT = "idOpenDataPackage" ; private static final String LATITUDE_DATAPOINT = "latitude" ; private static final String LONGITUDE_DATAPOINT = "longitude" ; private static final String WEBLINK_DATAPOINT = "weblink" ; private static final String DESCRIPTION_DATAPOINT = "description" ; private static final String IMAGE_DATAPOINT = "image" ; private static final String TITLE_DATAPOINT = "title" ; private static final String NAME_DATAPOINT = "name" ; private static DatabaseConnection myInstance = null ; private static Context myContext = null ; private DatabaseConnection ( Context context ) { } public static synchronized DatabaseConnection getInstance ( Context context ) { if ( ( DatabaseConnection . myInstance ) == null ) { <START_BUG> if ( ( DatabaseConnection . myContext ) == null ) { <END_BUG> DatabaseConnection . myInstance = new DatabaseConnection ( context ) ; } else { DatabaseConnection . myInstance = new DatabaseConnection ( DatabaseConnection . myContext ) ; } } return DatabaseConnection . myInstance ; } public static void setContext ( Context context ) { } public static void insertPackage ( OpenDataPackage odPackage ) { } public static void addDatapoint ( String html , Bitmap image , String title , String packageId , String latitude , String longitude , String weblink ) { } public static String [ ] getDatapointByLocation ( Location location ) { } public static boolean isPackageInDatabase ( OpenDataPackage openDataPackage ) { } public static void deletePackageInclusiveDatapoints ( OpenDataPackage openDataPackage ) { } public static void deletePackageInclusiveDatapoints ( String packageId ) { } public static boolean checkForPackageUpdate ( OpenDataPackage openDataPackage ) { } public static List < GPSDatapointObject > getAllDatapoints ( ) { } @ Override public void onOpen ( SQLiteDatabase db ) { } @ Override public void onCreate ( SQLiteDatabase db ) { } @ Override public void onUpgrade ( SQLiteDatabase db , int oldVersion , int newVersion ) { } }

Fix:
if ( context != null ) {
Buggy code:
public class LocateExpression extends BinaryOperatorExpression { private final Expression _start ; public LocateExpression ( Expression key , String str , int start ) { } public LocateExpression ( Expression key , Expression str , int start ) { } public LocateExpression ( Expression key , String str , Expression start ) { } public LocateExpression ( Expression key , Expression str , Expression start ) { } public String asExpression ( AliasContext ctx ) { String start = ( ( _start ) == null ) ? EMPTY : ( COMMA ) + ( ( ( Visitable ) ( _start ) ) . asExpression ( ctx ) ) ; <START_BUG> return new StringBuffer ( _op . toString ( ) ) . append ( OPEN_BRACE ) . append ( ( ( Visitable ) ( _e1 ) ) . asExpression ( ctx ) ) . append ( COMMA ) . append ( ( ( Visitable ) ( _e2 ) ) . asExpression ( ctx ) ) . append ( start ) . append ( CLOSE_BRACE ) . toString ( ) ; <END_BUG> } }

Fix:
return new StringBuilder ( _op . toString ( ) ) . append ( OPEN_BRACE ) . append ( ( ( Visitable ) ( _e1 ) ) . asExpression ( ctx ) ) . append ( COMMA ) . append ( ( ( Visitable ) ( _e2 ) ) . asExpression ( ctx ) ) . append ( start ) . append ( CLOSE_BRACE ) . toString ( ) ;
Buggy code:
public class Parser { private int index ; private ArrayList < String > commands ; public Parser ( String asmFile ) { } public void reset ( ) { } private void fill ( String src ) { } public boolean hasMoreCommands ( ) { } public void advance ( ) { } public CommandType commandType ( ) { String currentCommand = commands . get ( index ) ; <START_BUG> if ( currentCommand . startsWith ( ")" ) ) { <END_BUG> return CommandType . L_COMMAND ; } if ( currentCommand . startsWith ( "@" ) ) { return CommandType . A_COMMAND ; } else { return CommandType . C_COMMAND ; } } public String symbol ( ) { } public String dest ( ) { } public String comp ( ) { } public String jump ( ) { } }

Fix:
if ( currentCommand . startsWith ( "(" ) ) {
Buggy code:
public class VectorEntity extends Actor { private double xComp ; private double yComp ; final double pi = Math . PI ; public void act ( ) { } public VectorEntity ( double xValue , double yValue ) { } public VectorEntity ( ) { } public double getXComp ( ) { } public double getYComp ( ) { } public double getUnitXComp ( ) { } public double getUnitYComp ( ) { } public double getDirection ( ) { } public double getMagnitude ( ) { } public void changeXComp ( double xValue ) { } public void changeYComp ( double yValue ) { } public void addVector ( double xValue , double yValue ) { } public void subtractVector ( double xValue , double yValue ) { } public String toString ( ) { } public String norm ( ) { } public void gravity ( ) { <START_BUG> if ( ( getY ( ) ) >= ( ( getWorld ( ) . getHeight ( ) ) - 35 ) ) { <END_BUG> changeYComp ( 0.0 ) ; } else { accelerate ( ( ( 3 * ( pi ) ) // 2 ) , ( - 1 ) ) ; } } public void move ( ) { } public void accelerate ( double direction , double magnitude ) { } }

Fix:
if ( ( getY ( ) ) >= ( ( getWorld ( ) . getHeight ( ) ) - 40 ) ) {
Buggy code:
class ResourceTransformationDescriptionBuilderImpl extends AbstractTransformationDescriptionBuilder implements ResourceTransformationDescriptionBuilder { private DiscardPolicy discardPolicy = DiscardPolicy . NEVER ; private final AttributeTransformationDescriptionBuilderRegistry registry = new AttributeTransformationDescriptionBuilderImpl . AttributeTransformationDescriptionBuilderRegistry ( ) ; protected ResourceTransformationDescriptionBuilderImpl ( final PathElement pathElement ) { } protected ResourceTransformationDescriptionBuilderImpl ( final PathElement pathElement , final PathAddressTransformer pathAddressTransformer ) { } @ Override public ResourceTransformationDescriptionBuilder addChildResource ( final PathElement pathElement ) { } @ Override public ResourceTransformationDescriptionBuilder addChildResource ( final ResourceDefinition definition ) { } @ Override public DiscardTransformationDescriptionBuilder discardChildResource ( final PathElement pathElement ) { } @ Override public ResourceTransformationDescriptionBuilder addChildRedirection ( final PathElement current , final PathElement legacy ) { } @ Override public ResourceTransformationDescriptionBuilder addChildRedirection ( final PathElement oldAddress , final PathAddressTransformer pathAddressTransformer ) { } @ Override public ResourceTransformationDescriptionBuilder addChildBuilder ( TransformationDescriptionBuilder builder ) { } @ Override public ResourceTransformationDescriptionBuilder setCustomResourceTransformer ( final ResourceTransformer resourceTransformer ) { } @ Override public TransformationDescription build ( ) { } @ Override public OperationTransformationOverrideBuilder addOperationTransformationOverride ( final String operationName ) { <START_BUG> final OperationTransformationOverrideBuilderImpl transformationBuilder = new OperationTransformationOverrideBuilderImpl ( this ) ; <END_BUG> addOperationTransformerEntry ( operationName , new OperationTransformationEntry ( ) { @ Override OperationTransformer getOperationTransformer ( AttributeTransformationDescriptionBuilderImpl . AttributeTransformationDescriptionBuilderRegistry resourceRegistry ) { return transformationBuilder . createTransformer ( resourceRegistry ) ; } } ) ; return transformationBuilder ; } @ Override public ResourceTransformationDescriptionBuilder addRawOperationTransformationOverride ( final String operationName , final OperationTransformer operationTransformer ) { } @ Override public ConcreteAttributeTransformationDescriptionBuilder getAttributeBuilder ( ) { } }

Fix:
final OperationTransformationOverrideBuilderImpl transformationBuilder = new OperationTransformationOverrideBuilderImpl ( operationName , this ) ;
Buggy code:
public class ColorEffects implements Animator { private Sprite controllingSprite ; private float pointInTransition ; private float duration ; private float startRed ; private float startGreen ; private float startBlue ; private float startAlpha ; private float slopeRed ; private float slopeGreen ; private float slopeBlue ; private float slopeAlpha ; private float endRed ; private float endGreen ; private float endBlue ; private float endAlpha ; private float currentRed ; private float currentGreen ; private float currentBlue ; private float currentAlpha ; private boolean transforming ; private boolean running ; private OnAnimationFinishedListener finishedListener ; private float delay ; public ColorEffects ( Color startColor , Color endColor , float duration ) { } public ColorEffects ( Color startColor , Color endColor , float duration , float delay ) { } public static boolean colorsMatch ( Color color1 , Color color2 , float marginOfError ) { } public void update ( float delta ) { } @ Override public void start ( boolean isProtected ) { } public Color getCurrentColor ( ) { } @ Override public void setSprite ( Sprite control , boolean x , boolean y ) { } @ Override public boolean updateY ( ) { } @ Override public boolean updateX ( ) { } @ Override public float getAmount ( ) { } @ Override public Animator duplicate ( ) { <START_BUG> return new ColorEffects ( new Color ( startRed , startGreen , startBlue , 1 ) , new Color ( endRed , endGreen , endBlue , 1 ) , duration ) ; <END_BUG> } @ Override public boolean isRunning ( ) { } @ Override public void setOnFinishedListener ( OnAnimationFinishedListener listener ) { } @ Override public Sprite getSprite ( ) { } }

Fix:
return new ColorEffects ( new Color ( startRed , startGreen , startBlue , startAlpha ) , new Color ( endRed , endGreen , endBlue , endAlpha ) , duration ) ;
Buggy code:
class BrowserTab extends Tab { Browser browser ; Group browserGroup ; Button mozillaButton ; String errorMessage ; BrowserTab ( ControlExample instance ) { } void createBackgroundModeGroup ( ) { } void createColorAndFontGroup ( ) { } void createExampleGroup ( ) { } void createExampleWidgets ( ) { } void createOtherGroup ( ) { } void createSizeGroup ( ) { } void createStyleGroup ( ) { } Composite createTabFolderPage ( final TabFolder tabFolder ) { } public static String getContents ( InputStream in ) throws IOException { } String [ ] getCustomEventNames ( ) { } Widget [ ] getExampleWidgets ( ) { } String [ ] getMethodNames ( ) { } String getTabText ( ) { } void hookCustomListener ( final String eventName ) { } boolean rtlSupport ( ) { } void setExampleWidgetState ( ) { super . setExampleWidgetState ( ) ; mozillaButton . setSelection ( ( ( browser ) == null ? false : ( ( browser . getStyle ( ) ) & ( SWT . MOZILLA ) ) != 0 ) ) ; <START_BUG> borderButton . setSelection ( ( ( ( browser . getStyle ( ) ) & ( SWT . BORDER ) ) != 0 ) ) ; <END_BUG> } }

Fix:
borderButton . setSelection ( ( ( browser ) == null ? false : ( ( browser . getStyle ( ) ) & ( SWT . BORDER ) ) != 0 ) ) ;
Buggy code:
public class TestMergeSchedulerExternal extends LuceneTestCase { volatile boolean mergeCalled ; volatile boolean mergeThreadCreated ; volatile boolean excCalled ; private class MyMergeScheduler extends ConcurrentMergeScheduler { private class MyMergeThread extends ConcurrentMergeScheduler . MergeThread { public MyMergeThread ( IndexWriter writer , MergePolicy . OneMerge merge ) { } } @ Override protected MergeThread getMergeThread ( IndexWriter writer , MergePolicy . OneMerge merge ) throws IOException { } @ Override protected void handleMergeException ( Throwable t ) { } @ Override protected void doMerge ( MergePolicy . OneMerge merge ) throws IOException { } } private static class FailOnlyOnMerge extends MockDirectoryWrapper . Failure { @ Override public void eval ( MockDirectoryWrapper dir ) throws IOException { } } public void testSubclassConcurrentMergeScheduler ( ) throws IOException { <START_BUG> MockDirectoryWrapper dir = newDirectory ( ) ; <END_BUG> dir . failOn ( new TestMergeSchedulerExternal . FailOnlyOnMerge ( ) ) ; Document doc = new Document ( ) ; Field idField = newStringField ( "id" , "" , YES ) ; doc . add ( idField ) ; IndexWriter writer = new IndexWriter ( dir , newIndexWriterConfig ( TEST_VERSION_CURRENT , new org . apache . lucene . analysis . MockAnalyzer ( random ( ) ) ) . setMergeScheduler ( new TestMergeSchedulerExternal . MyMergeScheduler ( ) ) . setMaxBufferedDocs ( 2 ) . setRAMBufferSizeMB ( DISABLE_AUTO_FLUSH ) . setMergePolicy ( newLogMergePolicy ( ) ) ) ; LogMergePolicy logMP = ( ( LogMergePolicy ) ( writer . getConfig ( ) . getMergePolicy ( ) ) ) ; logMP . setMergeFactor ( 10 ) ; for ( int i = 0 ; i < 20 ; i ++ ) writer . addDocument ( doc ) ; ( ( TestMergeSchedulerExternal . MyMergeScheduler ) ( writer . getConfig ( ) . getMergeScheduler ( ) ) ) . sync ( ) ; writer . close ( ) ; assertTrue ( mergeThreadCreated ) ; assertTrue ( mergeCalled ) ; assertTrue ( excCalled ) ; dir . close ( ) ; } private static class ReportingMergeScheduler extends MergeScheduler { @ Override public void merge ( IndexWriter writer ) throws IOException { } @ Override public void close ( ) throws IOException { } } public void testCustomMergeScheduler ( ) throws Exception { } }

Fix:
MockDirectoryWrapper dir = newMockDirectory ( ) ;
Buggy code:
public class WarListener implements Listener { private War plugin ; private Map < Player , Set < Player > > movers = Collections . synchronizedMap ( new HashMap < Player , Set < Player > > ( ) ) ; private int warSight = 64 ; public WarListener ( War plugin ) { } @ EventHandler public void onPlayerDeath ( EntityDeathEvent event ) { } @ EventHandler public void onPlayerMove ( PlayerMoveEvent event ) { Iterator < Entity > itr = event . getPlayer ( ) . getNearbyEntities ( warSight , warSight , warSight ) . iterator ( ) ; while ( itr . hasNext ( ) ) { Entity entity = itr . next ( ) ; if ( entity instanceof Player ) { if ( plugin . isAtWarWith ( event . getPlayer ( ) , ( ( Player ) ( entity ) ) ) ) { if ( ! ( isAround ( event . getPlayer ( ) , ( ( Player ) ( entity ) ) ) ) ) { addNearby ( event . getPlayer ( ) , ( ( Player ) ( entity ) ) ) ; event . getPlayer ( ) . sendMessage ( ( ( ( ( ( ChatColor . DARK_PURPLE ) + "[WAR]<seq2seq4repair_space>" ) + ( ChatColor . WHITE ) ) + "<seq2seq4repair_space>You<seq2seq4repair_space>are<seq2seq4repair_space>within<seq2seq4repair_space>range<seq2seq4repair_space>of<seq2seq4repair_space>an<seq2seq4repair_space>enemy!<seq2seq4repair_space>" ) + ( ( ( Player ) ( entity ) ) . getDisplayName ( ) ) ) ) ; } } if ( plugin . isAtWarWith ( ( ( Player ) ( entity ) ) , event . getPlayer ( ) ) ) { if ( ! ( isAround ( ( ( Player ) ( entity ) ) , event . getPlayer ( ) ) ) ) { addNearby ( ( ( Player ) ( entity ) ) , event . getPlayer ( ) ) ; ( ( Player ) ( entity ) ) . sendMessage ( ( ( ( ( ( ChatColor . DARK_PURPLE ) + "[WAR]<seq2seq4repair_space>" ) + ( ChatColor . WHITE ) ) + "<seq2seq4repair_space>An<seq2seq4repair_space>enemy<seq2seq4repair_space>has<seq2seq4repair_space>come<seq2seq4repair_space>within<seq2seq4repair_space>range!<seq2seq4repair_space>" ) + ( event . getPlayer ( ) . getDisplayName ( ) ) ) ) ; } } } } <START_BUG> if ( ( movers ) != null ) { <END_BUG> Iterator < Player > pitr = movers . get ( event . getPlayer ( ) ) . iterator ( ) ; while ( pitr . hasNext ( ) ) { Player wasNearby = pitr . next ( ) ; if ( ( ! ( event . getPlayer ( ) . getNearbyEntities ( warSight , warSight , warSight ) . contains ( wasNearby ) ) ) && ( plugin . isAtWarWith ( event . getPlayer ( ) , wasNearby ) ) ) { event . getPlayer ( ) . sendMessage ( ( ( ( ( ( ChatColor . DARK_PURPLE ) + "[WAR]<seq2seq4repair_space>" ) + ( ChatColor . WHITE ) ) + "<seq2seq4repair_space>You<seq2seq4repair_space>are<seq2seq4repair_space>no<seq2seq4repair_space>longer<seq2seq4repair_space>in<seq2seq4repair_space>range<seq2seq4repair_space>of<seq2seq4repair_space>an<seq2seq4repair_space>enemy!<seq2seq4repair_space>" ) + ( wasNearby . getDisplayName ( ) ) ) ) ; removeNearby ( event . getPlayer ( ) , wasNearby ) ; } else if ( ! ( plugin . isAtWarWith ( event . getPlayer ( ) , wasNearby ) ) ) { removeNearby ( event . getPlayer ( ) , wasNearby ) ; } } } } private boolean isAround ( Player player , Player target ) { } private void addNearby ( Player player , Player target ) { } private void removeNearby ( Player player , Player target ) { } No newline ; at end ; of file ; }

Fix:
if ( ( movers . get ( event . getPlayer ( ) ) ) != null ) {
Buggy code:
public class SymlinkTest extends BuildFileTest { private Project p ; private boolean supportsSymlinks = Os . isFamily ( "unix" ) ; private boolean testfail = false ; public SymlinkTest ( String name ) { } public void setUp ( ) { if ( supportsSymlinks ) { <START_BUG> configureProject ( "src//etc//testcases//taskdefs//optional//symlink.xml" ) ; <END_BUG> executeTarget ( "setup" ) ; } } public void testSingle ( ) { } public void testDelete ( ) { } public void testRecord ( ) { } public void testRecreate ( ) { } public void tearDown ( ) { } }

Fix:
configureProject ( "src//etc//testcases//taskdefs//optional//unix//symlink.xml" ) ;
Buggy code:
class ModulePathFactory { static File [ ] resolveModulePath ( final File [ ] modulePath ) { final String jbossHome = System . getProperty ( "jboss.home" , System . getenv ( "JBOSS_HOME" ) ) ; final File root = ( jbossHome == null ) ? new File ( "." ) : new File ( jbossHome ) ; try { <START_BUG> return ModulePathFactory . load ( root , modulePath ) ; <END_BUG> } catch ( IOException e ) { throw new RuntimeException ( e ) ; } } protected static File [ ] load ( final File jbossHome , final File [ ] modulePath ) throws IOException { } static String readRef ( final File file ) throws IOException { } static List < String > readRefs ( final File file ) throws IOException { } static String readRef ( final InputStream is ) throws IOException { } static List < String > readRefs ( final InputStream is ) throws IOException { } static boolean readLine ( InputStream is , StringBuffer buffer ) throws IOException { } static void safeClose ( final Closeable closeable ) { } }

Fix:
return ModulePathFactory . load ( root . getAbsoluteFile ( ) , modulePath ) ;