nus-yam/ex-repair huggingface dataset:
Buggy code:
abstract class AuditLogItem { private final Date date = new Date ( ) ; private final String asVersion ; protected final boolean readOnly ; protected final boolean booting ; protected final String userId ; protected final String domainUUID ; protected final AccessMechanism accessMechanism ; protected final InetAddress remoteAddress ; AuditLogItem ( String asVersion , boolean readOnly , boolean booting , String userId , String domainUUID , AccessMechanism accessMechanism , InetAddress remoteAddress ) { } static AuditLogItem createModelControllerItem ( String asVersion , boolean readOnly , boolean booting , ResultAction resultAction , String userId , String domainUUID , AccessMechanism accessMechanism , InetAddress remoteAddress , Resource resultantModel , List < ModelNode > operations ) { } static AuditLogItem createMethodAccessItem ( String asVersion , boolean readOnly , boolean booting , String userId , String domainUUID , AccessMechanism accessMechanism , InetAddress remoteAddress , String methodName , String [ ] methodSignature , Object [ ] methodParams , Throwable error ) { } abstract String format ( AuditLogItemFormatter formatter ) { } public String getAsVersion ( ) { } boolean isReadOnly ( ) { } boolean isBooting ( ) { } String getUserId ( ) { } String getDomainUUID ( ) { } AccessMechanism getAccessMechanism ( ) { } InetAddress getRemoteAddress ( ) { } public Date getDate ( ) { <START_BUG> return date ; <END_BUG> } static class ModelControllerAuditLogItem extends AuditLogItem { private final ResultAction resultAction ; private final Resource resultantModel ; private final List < ModelNode > operations ; ModelControllerAuditLogItem ( String asVersion , boolean readOnly , boolean booting , ResultAction resultAction , String userId , String domainUUID , AccessMechanism accessMechanism , InetAddress remoteAddress , Resource resultantModel , List < ModelNode > operations ) { } @ Override String format ( AuditLogItemFormatter formatter ) { } ResultAction getResultAction ( ) { } Resource getResultantModel ( ) { } List < ModelNode > getOperations ( ) { } } static class MethodAccessAuditLogItem extends AuditLogItem { private final String methodName ; private final String [ ] methodSignature ; private final Object [ ] methodParams ; private final Throwable error ; MethodAccessAuditLogItem ( String asVersion , boolean readOnly , boolean booting , String userId , String domainUUID , AccessMechanism accessMechanism , InetAddress remoteAddress , String methodName , String [ ] methodSignature , Object [ ] methodParams , Throwable error ) { } @ Override String format ( AuditLogItemFormatter formatter ) { } String getMethodName ( ) { } String [ ] getMethodSignature ( ) { } Object [ ] getMethodParams ( ) { } Throwable getError ( ) { } } }

Fix:
return ( ( Date ) ( date . clone ( ) ) ) ;
Buggy code:
public class WebComponentProcessor implements DeploymentUnitProcessor { @ Override public void deploy ( DeploymentPhaseContext phaseContext ) throws DeploymentUnitProcessingException { final DeploymentUnit deploymentUnit = phaseContext . getDeploymentUnit ( ) ; if ( ! ( DeploymentTypeMarker . isType ( WAR , deploymentUnit ) ) ) { return ; } final Map < String , AbstractComponentDescription > componentByClass = new HashMap < String , AbstractComponentDescription > ( ) ; final Map < String , ComponentInstantiator > webComponents = new HashMap < String , ComponentInstantiator > ( ) ; final EEModuleDescription moduleDescription = deploymentUnit . getAttachment ( EE_MODULE_DESCRIPTION ) ; final String applicationName = ( ( deploymentUnit . getParent ( ) ) == null ) ? deploymentUnit . getName ( ) : deploymentUnit . getParent ( ) . getName ( ) ; if ( moduleDescription == null ) { return ; } for ( AbstractComponentDescription component : moduleDescription . getComponentDescriptions ( ) ) { componentByClass . put ( component . getComponentClassName ( ) , component ) ; } final WarMetaData warMetaData = deploymentUnit . getAttachment ( ATTACHMENT_KEY ) ; final Set < String > classes = getAllComponentClasses ( warMetaData ) ; for ( String clazz : classes ) { AbstractComponentDescription description = componentByClass . get ( clazz ) ; if ( description != null ) { if ( ! ( ( description . getViewClassNames ( ) . size ( ) ) == 1 ) ) { throw new RuntimeException ( ( clazz + "<seq2seq4repair_space>has<seq2seq4repair_space>the<seq2seq4repair_space>wrong<seq2seq4repair_space>component<seq2seq4repair_space>type,<seq2seq4repair_space>is<seq2seq4repair_space>cannot<seq2seq4repair_space>be<seq2seq4repair_space>used<seq2seq4repair_space>as<seq2seq4repair_space>a<seq2seq4repair_space>web<seq2seq4repair_space>component" ) ) ; } ManagedBeanComponentInstantiator instantiator = new ManagedBeanComponentInstantiator ( deploymentUnit , description ) ; webComponents . put ( clazz , instantiator ) ; } else { <START_BUG> description = new WebComponentDescription ( clazz , clazz , deploymentUnit . getName ( ) , applicationName ) ; <END_BUG> moduleDescription . addComponent ( description ) ; webComponents . put ( clazz , new WebComponentInstantiator ( deploymentUnit , description ) ) ; } } deploymentUnit . putAttachment ( WEB_COMPONENT_INSTANTIATORS , webComponents ) ; } @ Override public void undeploy ( DeploymentUnit context ) { } private Set < String > getAllComponentClasses ( WarMetaData metaData ) { } private void getAllComponentClasses ( WebMetaData metaData , Set < String > classes ) { } private void getAllComponentClasses ( WebFragmentMetaData metaData , Set < String > classes ) { } }

Fix:
description = new WebComponentDescription ( clazz , clazz , moduleDescription . getModuleName ( ) , moduleDescription . getAppName ( ) ) ;
Buggy code:
public interface ITransactionalSpout < T > extends IComponent { public interface Coordinator < X > { X initializeTransaction ( BigInteger txid , X prevMetadata ) { } void close ( ) { } } public interface Emitter < X > { <START_BUG> void emitBatch ( TransactionAttempt tx , X coordinatorMeta , TransactionalOutputCollector collector ) ; <END_BUG> void cleanupBefore ( BigInteger txid ) { } void close ( ) { } } ITransactionalSpout . Coordinator < T > getCoordinator ( Map conf , TopologyContext context ) { } ITransactionalSpout . Emitter < T > getEmitter ( Map conf , TopologyContext context ) { } }

Fix:
void emitBatch ( TransactionAttempt tx , X coordinatorMeta , BatchOutputCollector collector ) ;
Buggy code:
public class C extends Platform { public static final int PTR_SIZEOF = C . PTR_sizeof ( ) ; public static native final void free ( int ptr ) { } <START_BUG> public static native final int getenv ( byte [ ] wcsToMbcs ) ; <END_BUG> public static native final int malloc ( int size ) { } public static native final void memmove ( int dest , byte [ ] src , int size ) { } public static native final void memmove ( int dest , char [ ] src , int size ) { } public static native final void memmove ( int dest , double [ ] src , int size ) { } public static native final void memmove ( int dest , float [ ] src , int size ) { } public static native final void memmove ( int dest , int [ ] src , int size ) { } public static native final void memmove ( int dest , long [ ] src , int size ) { } public static native final void memmove ( int dest , short [ ] src , int size ) { } public static native final void memmove ( byte [ ] dest , char [ ] src , int size ) { } public static native final void memmove ( byte [ ] dest , int src , int size ) { } public static native final void memmove ( int dest , int src , int size ) { } public static native final void memmove ( char [ ] dest , int src , int size ) { } public static native final void memmove ( double [ ] dest , int src , int size ) { } public static native final void memmove ( float [ ] dest , int src , int size ) { } public static native final void memmove ( int [ ] dest , byte [ ] src , int size ) { } public static native final void memmove ( short [ ] dest , int src , int size ) { } public static native final void memmove ( int [ ] dest , int src , int size ) { } public static native final void memmove ( long [ ] dest , int src , int size ) { } public static native final int memset ( int buffer , int c , int num ) { } public static native final int PTR_sizeof ( ) { } public static native final int strlen ( int s ) { } }

Fix:
public static native final int getenv ( byte [ ] env ) ;
Buggy code:
public class JarEntryFile extends PlatformObject implements IStorage { private String entryName ; private String zipName ; private IPath path ; public JarEntryFile ( String entryName , String zipName ) { } public InputStream getContents ( ) throws CoreException { try { if ( JavaModelManager . ZIP_ACCESS_VERBOSE ) { <START_BUG> System . out . println ( ( ( "Creating<seq2seq4repair_space>ZipFile<seq2seq4repair_space>on<seq2seq4repair_space>" + ( this . zipName ) ) + "<seq2seq4repair_space>[JavaModelJarEntryFile.getContents()]" ) ) ; <END_BUG> } ZipFile zipFile = new ZipFile ( this . zipName ) ; ZipEntry zipEntry = zipFile . getEntry ( this . entryName ) ; if ( zipEntry == null ) { throw new JavaModelException ( new JavaModelStatus ( IJavaModelStatusConstants . INVALID_PATH , this . entryName ) ) ; } return zipFile . getInputStream ( zipEntry ) ; } catch ( IOException e ) { throw new JavaModelException ( e , IJavaModelStatusConstants . IO_EXCEPTION ) ; } } public IPath getFullPath ( ) { } public String getName ( ) { } public boolean isReadOnly ( ) { } public String toString ( ) { } }

Fix:
System . out . println ( ( "[JavaModelJarEntryFile.getContents()]<seq2seq4repair_space>Creating<seq2seq4repair_space>ZipFile<seq2seq4repair_space>on<seq2seq4repair_space>" + ( this . zipName ) ) ) ;
Buggy code:
@ Controller @ RequestMapping ( "//admin//configurations" ) public class ConfigurationController { private final AbTestConfigurationService abTestConfigurationService ; private final AbTestDecisionService abTestDecisionService ; @ Autowired public ConfigurationController ( AbTestConfigurationService service , AbTestDecisionService abTestDecisionService ) { } @ RequestMapping ( "//" ) @ Secured ( "ROLE_USER" ) public String index ( Model model ) { } private List < String > toTestNames ( Iterable < AbTestConfiguration > allConfigurations ) { } @ RequestMapping ( "//edit" ) @ Secured ( "ROLE_ADMIN" ) public String edit ( @ RequestParam ( value = "name" , required = false ) String name , Model model ) { } @ RequestMapping ( value = "//save" , method = RequestMethod . POST ) @ Secured ( "ROLE_ADMIN" ) public String save ( @ Valid AbTestConfiguration configuration , BindingResult bindingResult , Model model ) { } @ RequestMapping ( value = "//save" , params = { "addVariant" } ) @ Secured ( "ROLE_ADMIN" ) public String addVariant ( AbTestConfiguration configuration , BindingResult bindingResult , Model model ) { } @ RequestMapping ( value = "//save" , params = { "removeVariant" } ) @ Secured ( "ROLE_ADMIN" ) public String removeVariant ( AbTestConfiguration configuration , BindingResult bindingResult , int removeVariant , Model model ) { } @ RequestMapping ( "//delete//{name}" ) @ Secured ( "ROLE_ADMIN" ) public String delete ( @ PathVariable String name , @ RequestParam Optional < Boolean > deleteDecisions ) { } @ RequestMapping ( "//delete-orphan//{name}" ) @ Secured ( "ROLE_ADMIN" ) public String deleteOrphan ( @ PathVariable String name ) { } private String editInternal ( AbTestConfiguration configuration , Model model ) { model . addAttribute ( "abTestConfiguration" , ( configuration != null ? configuration : createNewConfiguration ( ) ) ) ; <START_BUG> return "//admin//configuration//editConfiguration" ; <END_BUG> } private AbTestConfiguration createNewConfiguration ( ) { } }

Fix:
return "admin//configuration//editConfiguration" ;
Buggy code:
public abstract class JDBCAbstractCreateCommand implements JDBCCreateCommand { protected Logger log ; protected boolean debug ; protected boolean trace ; protected JDBCEntityBridge entity ; protected AuthenticationManager securityManager ; protected boolean createAllowed ; protected SQLExceptionProcessorMBean exceptionProcessor ; protected String insertSQL ; protected JDBCFieldBridge [ ] insertFields ; protected boolean insertAfterEjbPostCreate ; private JDBCCMPFieldBridge createdPrincipal ; private JDBCCMPFieldBridge createdTime ; private JDBCCMPFieldBridge updatedPrincipal ; private JDBCCMPFieldBridge updatedTime ; public void init ( JDBCStoreManager manager ) throws DeploymentException { } protected void initEntityCommand ( JDBCEntityCommandMetaData entityCommand ) throws DeploymentException { } public Object execute ( Method m , Object [ ] args , EntityEnterpriseContext ctx ) throws CreateException { } protected void checkCreateAllowed ( ) throws CreateException { } protected JDBCCMPFieldBridge getGeneratedPKField ( ) throws DeploymentException { } protected void initGeneratedFields ( ) throws DeploymentException { } protected void generateFields ( EntityEnterpriseContext ctx ) throws CreateException { if ( ( securityManager ) != null ) { <START_BUG> String principalName = ctx . getEJBContext ( ) . getCallerPrincipal ( ) . getName ( ) ; <END_BUG> if ( ( ( createdPrincipal ) != null ) && ( ( createdPrincipal . getInstanceValue ( ctx ) ) == null ) ) { createdPrincipal . setInstanceValue ( ctx , principalName ) ; } } Date date = null ; if ( ( ( createdTime ) != null ) && ( ( createdTime . getInstanceValue ( ctx ) ) == null ) ) { date = new Date ( ) ; createdTime . setInstanceValue ( ctx , date ) ; } } protected void initInsertFields ( ) { } protected boolean isInsertField ( JDBCFieldBridge field ) { } protected void initInsertSQL ( ) { } protected void beforeInsert ( EntityEnterpriseContext ctx ) throws CreateException { } protected void performInsert ( EntityEnterpriseContext ctx ) throws CreateException { } protected PreparedStatement prepareStatement ( Connection c , String sql , EntityEnterpriseContext ctx ) throws SQLException { } protected int executeInsert ( PreparedStatement ps , EntityEnterpriseContext ctx ) throws SQLException { } protected void afterInsert ( EntityEnterpriseContext ctx ) throws CreateException { } protected Object getPrimaryKey ( EntityEnterpriseContext ctx ) { } }

Fix:
String principalName = ctx . getCallerPrincipal ( ) . getName ( ) ;
Buggy code:
public class DefaultErrorPage extends HttpServlet { public void service ( HttpServletRequest requestH , HttpServletResponse responseH ) throws IOException , ServletException { Request request = ( ( HttpServletRequestFacade ) ( requestH ) ) . getRealRequest ( ) ; Response response = request . getResponse ( ) ; int status = response . getStatus ( ) ; String msg = ( ( String ) ( request . getAttribute ( "javax.servlet.error.message" ) ) ) ; Throwable e = ( ( Throwable ) ( request . getAttribute ( "tomcat.servlet.error.throwable" ) ) ) ; if ( e != null ) { <START_BUG> e . printStackTrace ( ) ; <END_BUG> sendPrivateError ( request , response , 500 , exceptionString ( e ) ) ; return ; } if ( status == ( HttpServletResponse . SC_MOVED_TEMPORARILY ) ) { redirect ( request , response , msg ) ; } else { sendPrivateError ( request , response , status , msg ) ; } } private void sendPrivateError ( Request request , Response response , int sc , String msg ) throws IOException { } public void redirect ( Request request , Response response , String location ) throws IOException { } private String makeAbsolute ( Request request , String location ) { } public String exceptionString ( Throwable e ) { } void printRootCause ( ServletException e , PrintWriter out ) { } }

Fix:
request . getContext ( ) . log ( exceptionString ( e ) ) ;
Buggy code:
public class IsEmptyExpression extends UnaryExpressionPredicate { public IsEmptyExpression ( Expression op ) { } @ Override public String asExpression ( AliasContext ctx ) { <START_BUG> return ( ( ( ( Visitable ) ( _e ) ) . asExpression ( ctx ) ) + "<seq2seq4repair_space>" ) + ( _op ) ; <END_BUG> } }

Fix:
return ( ( ( ( Visitable ) ( _e ) ) . asExpression ( ctx ) ) + ( SPACE ) ) + ( _op ) ;
Buggy code:
public class RadioToast { private Context context ; private Toast mToast ; private RelativeLayout mLayout ; private TextView tvRadioText1 ; private TextView tvRadioText2 ; private String Text1 ; private String Text2 ; private boolean isShowSecondLine = true ; RadioToast ( Context context ) { } public void SetRadioText ( String text1 , String text2 ) { <START_BUG> if ( ( ( ( ( text1 == ( GS . RADIO_BLANK_STATION_NAME ) ) || ( text1 . equals ( null ) ) ) || ( text1 . isEmpty ( ) ) ) || ( text1 . equals ( "" ) ) ) || ( text1 . equals ( "null" ) ) ) { <END_BUG> isShowSecondLine = false ; Text1 = String . format ( "%1$s<seq2seq4repair_space>MHz" , text2 ) ; Text2 = "" ; } else { isShowSecondLine = true ; Text1 = text1 ; Text2 = String . format ( "%1$s<seq2seq4repair_space>MHz" , text2 ) ; } } public void showToast ( ) { } public void cancel ( ) { } }

Fix:
if ( text1 . equals ( RADIO_BLANK_STATION_NAME ) ) {
Buggy code:
public class latestitems extends ActionBarActivity implements NavigationDrawerCallbacks { private Toolbar mToolbar ; private NavigationDrawerFragment mNavigationDrawerFragment ; private RecyclerView mRecyclerView ; private Adapter mAdapter ; private LayoutManager mLayoutManager ; List < ItemInfo > iteminfo ; SwipeRefreshLayout swipeRefreshLayout ; @ Override protected void onCreate ( Bundle savedInstanceState ) { super . onCreate ( savedInstanceState ) ; setContentView ( activity_myitems ) ; NavigationDrawerFragment . mCurrentSelectedPosition = 1 ; mToolbar = ( ( Toolbar ) ( findViewById ( toolbar_actionbar1 ) ) ) ; setSupportActionBar ( mToolbar ) ; getSupportActionBar ( ) . setDisplayShowHomeEnabled ( true ) ; getSupportActionBar ( ) . setTitle ( "Latest<seq2seq4repair_space>Items" ) ; mRecyclerView = ( ( RecyclerView ) ( findViewById ( my_recycler_view1 ) ) ) ; <START_BUG> mRecyclerView . setHasFixedSize ( true ) ; <END_BUG> mLayoutManager = new LinearLayoutManager ( this ) ; mRecyclerView . setLayoutManager ( mLayoutManager ) ; iteminfo = new ArrayList < ItemInfo > ( ) ; mAdapter = new MainAdapter ( iteminfo ) ; mRecyclerView . setAdapter ( mAdapter ) ; mNavigationDrawerFragment = ( ( NavigationDrawerFragment ) ( getFragmentManager ( ) . findFragmentById ( fragment_drawer1 ) ) ) ; mNavigationDrawerFragment . setup ( fragment_drawer1 , ( ( DrawerLayout ) ( findViewById ( drawer1 ) ) ) , mToolbar ) ; swipeRefreshLayout = ( ( SwipeRefreshLayout ) ( findViewById ( swipe_refresh_layout ) ) ) ; swipeRefreshLayout . setColorSchemeResources ( myPrimaryColor ) ; swipeRefreshLayout . setOnRefreshListener ( new SwipeRefreshLayout . OnRefreshListener ( ) { @ Override public void onRefresh ( ) { refreshPostList ( ) ; } } ) ; refreshPostList ( ) ; } @ Override public boolean onCreateOptionsMenu ( Menu menu ) { } @ Override public void onNavigationDrawerItemSelected ( int position ) { } @ Override public void onBackPressed ( ) { } public int check ( ParseObject item ) { } private void refreshPostList ( ) { } public boolean onOptionsItemSelected ( MenuItem item ) { } }

Fix:
mRecyclerView . setHasFixedSize ( false ) ;
Buggy code:
public class LogWriterJavaStandaloneAsync implements LogWriter { @ Override public void write ( final LogMessageContainer logMessageContainer ) { try { LogWriterJavaStandaloneAsync . LogWriterJavaStandaloneExecutor logWriterJavaStandaloneExecutor = new LogWriterJavaStandaloneAsync . LogWriterJavaStandaloneExecutor ( ) ; Runnable task = new Runnable ( ) { @ Override public void run ( ) { try { Transactions transactions = new ProxyObjectMapperImpl ( ) . logToSOAPTransactions ( logMessageContainer ) ; QName QName = new QName ( "urn:generic.com:Global:TransactionLogger" , "TransactionLogAsynchronousService" ) ; URL wsdlLocation = new URL ( LoggerPropertyUtil . getProperty ( LOGMESSAGESERVICE_WSDL_LOCATION_ASYNC ) ) ; TransactionLogAsynchronousService service = new TransactionLogAsynchronousService ( wsdlLocation , QName ) ; service . getTransactionLogAsynchronousInPort ( ) . persist ( transactions ) ; } catch ( MalformedURLException ex ) { String msgText = getMalformedURLExceptionText ( LOGMESSAGESERVICE_WSDL_LOCATION_ASYNC ) . toString ( ) ; <START_BUG> Logger . getLogger ( LogWriterGlassFishAsync . class . getName ( ) ) . log ( Level . SEVERE , msgText ) ; <END_BUG> Logger . getLogger ( LogWriterJavaStandaloneAsync . class . getName ( ) ) . log ( Level . SEVERE , ex . getMessage ( ) ) ; } catch ( Throwable ex ) { Logger . getLogger ( LogWriterJavaStandaloneAsync . class . getName ( ) ) . log ( Level . SEVERE , "===========<seq2seq4repair_space>[<seq2seq4repair_space>JAVA<seq2seq4repair_space>Client<seq2seq4repair_space>Exception<seq2seq4repair_space>]<seq2seq4repair_space>=========" ) ; Logger . getLogger ( LogWriterJavaStandaloneAsync . class . getName ( ) ) . log ( Level . SEVERE , ex . getMessage ( ) ) ; } } } ; logWriterJavaStandaloneExecutor . execute ( task ) ; } catch ( Exception ex ) { Logger . getLogger ( LogWriterJavaStandaloneAsync . class . getName ( ) ) . log ( Level . SEVERE , "===========<seq2seq4repair_space>[<seq2seq4repair_space>JAVA<seq2seq4repair_space>Client<seq2seq4repair_space>Exception<seq2seq4repair_space>]<seq2seq4repair_space>=========" ) ; Logger . getLogger ( LogWriterJavaStandaloneAsync . class . getName ( ) ) . log ( Level . SEVERE , ex . getMessage ( ) ) ; } } private class LogWriterJavaStandaloneExecutor implements Executor { @ Override public void execute ( Runnable runnable ) { } } private StringBuilder getMalformedURLExceptionText ( String wsdl_location ) { } }

Fix:
Logger . getLogger ( LogWriterJavaStandaloneAsync . class . getName ( ) ) . log ( Level . SEVERE , msgText ) ;
Buggy code:
public class WorkflowConfiguration { private static final String WORKFLOW_STATUSES_SUFFIX = "_WORKFLOW_STATUSES" ; private final IConfigDaoService configDaoService ; private final ConstantsManager constantsManager ; public enum NormalizedStatus { OPEN , RESOLVED , CLOSED , REOPENED ; public ConfigRefEnum toConfigRefEnum ( ) { } } public WorkflowConfiguration ( IConfigDaoService configDaoService , ConstantsManager constantsManager ) { } public List < String > getStatuses ( WorkflowConfiguration . NormalizedStatus status ) { } public String getStatusesAsCSV ( WorkflowConfiguration . NormalizedStatus status ) { } public List < String > getStatusesId ( WorkflowConfiguration . NormalizedStatus status ) { } public void saveStatuses ( WorkflowConfiguration . NormalizedStatus status , String [ ] statusesId ) { <START_BUG> List < String > ids = Arrays . asList ( statusesId ) ; <END_BUG> Collections . sort ( ids ) ; StringBuilder builder = new StringBuilder ( ) ; for ( String id : ids ) { builder . append ( id ) . append ( "," ) ; } configDaoService . setValue ( status . toConfigRefEnum ( ) , builder . toString ( ) ) ; } }

Fix:
List < String > ids = ( statusesId != null ) ? Arrays . asList ( statusesId ) : Collections . < String > emptyList ( ) ;
Buggy code:
public class CreateCompilationUnitOperation extends JavaModelOperation { protected String fName ; protected String fSource = null ; public CreateCompilationUnitOperation ( IPackageFragment parentElement , String name , String source , boolean force ) { } protected void executeOperation ( ) throws JavaModelException { try { beginTask ( Messages . operation_createUnitProgress , 2 ) ; JavaElementDelta delta = newJavaElementDelta ( ) ; ICompilationUnit unit = getCompilationUnit ( ) ; IPackageFragment pkg = ( ( IPackageFragment ) ( getParentElement ( ) ) ) ; IContainer folder = ( ( IContainer ) ( pkg . getResource ( ) ) ) ; worked ( 1 ) ; IFile compilationUnitFile = folder . getFile ( new Path ( fName ) ) ; if ( compilationUnitFile . exists ( ) ) { if ( force ) { IBuffer buffer = unit . getBuffer ( ) ; if ( buffer == null ) return ; buffer . setContents ( fSource ) ; unit . save ( new NullProgressMonitor ( ) , false ) ; resultElements = new IJavaElement [ ] { unit } ; if ( ( ! ( Util . isExcluded ( unit ) ) ) && ( unit . getParent ( ) . exists ( ) ) ) { for ( int i = 0 ; i < ( resultElements . length ) ; i ++ ) { delta . changed ( resultElements [ i ] , IJavaElementDelta . F_CONTENT ) ; } addDelta ( delta ) ; } } else { <START_BUG> throw new JavaModelException ( new JavaModelStatus ( IJavaModelStatusConstants . NAME_COLLISION , Messages . bind ( Messages . status_nameCollision , new String [ ] { compilationUnitFile . getFullPath ( ) . toString ( ) } ) ) ) ; <END_BUG> } } else { try { String encoding = null ; try { encoding = folder . getDefaultCharset ( ) ; } catch ( CoreException ce ) { } InputStream stream = new ByteArrayInputStream ( ( encoding == null ? fSource . getBytes ( ) : fSource . getBytes ( encoding ) ) ) ; createFile ( folder , unit . getElementName ( ) , stream , force ) ; resultElements = new IJavaElement [ ] { unit } ; if ( ( ! ( Util . isExcluded ( unit ) ) ) && ( unit . getParent ( ) . exists ( ) ) ) { for ( int i = 0 ; i < ( resultElements . length ) ; i ++ ) { delta . added ( resultElements [ i ] ) ; } addDelta ( delta ) ; } } catch ( IOException e ) { throw new JavaModelException ( e , IJavaModelStatusConstants . IO_EXCEPTION ) ; } } worked ( 1 ) ; } finally { done ( ) ; } } protected ICompilationUnit getCompilationUnit ( ) { } protected ISchedulingRule getSchedulingRule ( ) { } public IJavaModelStatus verify ( ) { } }

Fix:
throw new JavaModelException ( new JavaModelStatus ( IJavaModelStatusConstants . NAME_COLLISION , Messages . bind ( Messages . status_nameCollision , compilationUnitFile . getFullPath ( ) . toString ( ) ) ) ) ;
Buggy code:
public class LoggingEvent implements Serializable { private static long startTime = System . currentTimeMillis ( ) ; public final transient String fqnOfCategoryClass ; public transient Category logger ; public final String categoryName ; public transient Priority level ; private String ndc ; private Hashtable mdcCopy ; private boolean ndcLookupRequired = true ; private boolean mdcLookupRequired = true ; private transient Object message ; private String renderedMessage ; private String threadName ; private ThrowableInformation throwableInfo ; public final long timeStamp ; private LocationInfo locationInfo ; static final long serialVersionUID = - 868428216207166145L ; static final Integer [ ] PARAM_ARRAY = new Integer [ 1 ] ; static final String TO_LEVEL = "toLevel" ; static final Class [ ] TO_LEVEL_PARAMS = new Class [ ] { int . class } ; static final Hashtable methodCache = new Hashtable ( 3 ) ; public LoggingEvent ( String fqnOfCategoryClass , Category logger , Priority priority , Object message , Throwable throwable ) { } public LoggingEvent ( String fqnOfCategoryClass , Category logger , long timeStamp , Priority priority , Object message , Throwable throwable ) { } public LocationInfo getLocationInformation ( ) { } public Object getMessage ( ) { } public String getNDC ( ) { } public Object getMDC ( String key ) { } public void getMDCCopy ( ) { } public String getRenderedMessage ( ) { } public static long getStartTime ( ) { } public String getThreadName ( ) { } public ThrowableInformation getThrowableInformation ( ) { } public String [ ] getThrowableStrRep ( ) { } private void readLevel ( ObjectInputStream ois ) throws IOException , ClassNotFoundException { int p = ois . readInt ( ) ; try { String className = ( ( String ) ( ois . readObject ( ) ) ) ; if ( className == null ) { level = Level . toLevel ( p ) ; } else { Method m = ( ( Method ) ( LoggingEvent . methodCache . get ( className ) ) ) ; if ( m == null ) { <START_BUG> Class clazz = Loader . loadClass ( className ) ; <END_BUG> m = clazz . getDeclaredMethod ( LoggingEvent . TO_LEVEL , LoggingEvent . TO_LEVEL_PARAMS ) ; LoggingEvent . methodCache . put ( className , m ) ; } LoggingEvent . PARAM_ARRAY [ 0 ] = new Integer ( p ) ; level = ( ( Level ) ( m . invoke ( null , LoggingEvent . PARAM_ARRAY ) ) ) ; } } catch ( Exception e ) { LogLog . warn ( "Level<seq2seq4repair_space>deserialization<seq2seq4repair_space>failed,<seq2seq4repair_space>reverting<seq2seq4repair_space>to<seq2seq4repair_space>default." , e ) ; level = Level . toLevel ( p ) ; } } private void readObject ( ObjectInputStream ois ) throws IOException , ClassNotFoundException { } private void writeObject ( ObjectOutputStream oos ) throws IOException { } private void writeLevel ( ObjectOutputStream oos ) throws IOException { } }

Fix:
Class clazz = Class . forName ( className ) ;
Buggy code:
public class BytesQueue { private static final int SIZE = 8 ; private static final int LOCKED = - 1 ; private static final int FLAG = 1 ; private final BytesQueue . BytesRingBuffer bytes ; private final BytesQueue . Header header ; public BytesQueue ( @ NotNull final Bytes buffer ) throws Exception { } private enum States { BUSY , READY , USED ; } public boolean offer ( @ NotNull Bytes bytes ) throws InterruptedException { } @ Nullable public Bytes poll ( @ NotNull Bytes using ) throws IllegalStateException , InterruptedException { } private static void checkSize ( @ NotNull Bytes using , long elementSize ) { } private long writeLocation ( ) { } private long remainingForWrite ( long offset ) { } private class Header { private final long writeLocationOffset ; private final long writeUpToOffset ; private final long readLocationOffset ; private final Bytes buffer ; private Header ( @ NotNull Bytes buffer ) throws Exception { } private boolean compareAndSetWriteLocation ( long expectedValue , long newValue ) { <START_BUG> if ( Jvm . VMSupportsCS8 ( ) ) <END_BUG> return buffer . compareAndSwapLong ( writeLocationOffset , expectedValue , newValue ) ; synchronized ( this ) { if ( expectedValue == ( getWriteLocation ( ) ) ) { setWriteLocation ( newValue ) ; return true ; } return false ; } } private void setWriteLocation ( long value ) { } private long getWriteLocation ( ) { } private void setWriteUpTo ( long value ) { } private long getWriteUpTo ( ) { } private void setReadLocation ( long value ) { } private long getReadLocation ( ) { } } private class BytesRingBuffer { @ NotNull final Bytes buffer ; final boolean isBytesBigEndian ; public BytesRingBuffer ( @ NotNull Bytes buffer ) { } private long write ( long offset , @ NotNull Bytes bytes ) { } private long write ( long offset , long value ) { } public long writeByte ( long l , int i ) { } private long read ( @ NotNull Bytes bytes , long offset ) { } private long makeLong ( byte b7 , byte b6 , byte b5 , byte b4 , byte b3 , byte b2 , byte b1 , byte b0 ) { } long readLong ( long offset ) { } public byte readByte ( long l ) { } long nextOffset ( long offset , long increment ) { } long nextOffset ( long offset ) { } long capacity ( ) { } boolean isBytesBigEndian ( ) { } void putLongB ( long offset , long value ) { } void putLongL ( long offset , long value ) { } } }

Fix:
if ( Jvm . vmSupportsCS8 ( ) )
Buggy code:
public class ClientApplication { public static final int DEFAULT_WAITTIME = 40000 ; public static final int DEFAULT_TIMEOUT = TCPServerSOContainer . DEFAULT_KEEPALIVE ; public static final String CONTAINER_FACTORY_NAME = GenericContainerInstantiator . class . getName ( ) ; public static final String CONTAINER_FACTORY_CLASS = ClientApplication . CONTAINER_FACTORY_NAME ; public static final String COMPOSENT_CONTAINER_NAME = GenericContainerInstantiator . class . getName ( ) ; static int clientCount = 1 ; ISharedObjectContainer [ ] sm = new ISharedObjectContainer [ ClientApplication . clientCount ] ; String serverName = null ; String [ ] sharedObjectClassNames = null ; ID [ ] sharedObjects = null ; static ContainerTypeDescription contd = null ; static Random aRan = new Random ( ) ; public ClientApplication ( ) { } public void init ( String [ ] args ) throws Exception { serverName = TCPServerSOContainer . getDefaultServerURL ( ) ; if ( ( args . length ) > 0 ) { if ( ! ( args [ 0 ] . equals ( "-" ) ) ) serverName = args [ 0 ] ; } if ( ( args . length ) > 1 ) { sharedObjectClassNames = new String [ ( args . length ) - 1 ] ; for ( int i = 0 ; i < ( ( args . length ) - 1 ) ; i ++ ) { sharedObjectClassNames [ i ] = args [ ( i + 1 ) ] ; } } <START_BUG> ClientApplication . contd = new ContainerTypeDescription ( ClientApplication . class . getClassLoader ( ) , ClientApplication . CONTAINER_FACTORY_NAME , ClientApplication . CONTAINER_FACTORY_CLASS , null ) ; <END_BUG> ContainerFactory . getDefault ( ) . addDescription ( ClientApplication . contd ) ; for ( int i = 0 ; i < ( ClientApplication . clientCount ) ; i ++ ) { sm [ i ] = createClient ( ) ; } } protected ISharedObjectContainer createClient ( ) throws Exception { } public void connect ( ID server ) throws Exception { } public void disconnect ( ) { } public void createSharedObjects ( ) throws Exception { } public void removeSharedObjects ( ) throws Exception { } public static void main ( String [ ] args ) throws Exception { } }

Fix:
ClientApplication . contd = new ContainerTypeDescription ( ClientApplication . CONTAINER_FACTORY_NAME , ClientApplication . CONTAINER_FACTORY_CLASS , null ) ;
Buggy code:
public class Main { public static void main ( String [ ] args ) { Server server = new Server ( 1234 ) ; server . start ( ) ; <START_BUG> SQL sql = new SQL ( "192.168.1.63" , "user" , "pass" ) ; <END_BUG> DecimalFormat df = new DecimalFormat ( "#.#" ) ; while ( true ) { String temperature = server . getData ( "rabbit1" , "temp" ) ; String gas = server . getData ( "rabbit1" , "gas" ) ; if ( ( temperature != null ) && ( gas != null ) ) { temperature = df . format ( Float . parseFloat ( temperature ) ) ; sql . write ( "rabbit1" , gas , temperature ) ; } sql . read ( "rabbit1" , 300 ) ; try { Thread . sleep ( 5000 ) ; } catch ( Exception e ) { e . printStackTrace ( ) ; } } } No newline ; at end ; of file ; }

Fix:
SQL sql = new SQL ( "192.168.1.63" , "raziskovalna" , "Raziskovalna123" ) ;
Buggy code:
public interface DeclareErrorOrWarning { <START_BUG> String getPointcutExpression ( ) ; <END_BUG> String getMessage ( ) { } boolean isError ( ) { } }

Fix:
PointcutExpression getPointcutExpression ( ) ;
Buggy code:
public class SimpleFragmentsBuilderTest extends AbstractTestCase { public void test1TermIndex ( ) throws Exception { } public void test2Frags ( ) throws Exception { } public void test3Frags ( ) throws Exception { } public void testTagsAndEncoder ( ) throws Exception { FieldFragList ffl = ffl ( new TermQuery ( new org . apache . lucene . index . Term ( F , "a" ) ) , "<h1><seq2seq4repair_space>a<seq2seq4repair_space><//h1>" ) ; SimpleFragmentsBuilder sfb = new SimpleFragmentsBuilder ( ) ; String [ ] preTags = new String [ ] { "[" } ; String [ ] postTags = new String [ ] { "]" } ; <START_BUG> assertEquals ( "&lt;h1&gt;<seq2seq4repair_space>[a]<seq2seq4repair_space>&lt;//h1&gt;" , sfb . createFragment ( reader , 0 , F , ffl , preTags , postTags , new SimpleHTMLEncoder ( ) ) ) ; <END_BUG> } private FieldFragList ffl ( Query query , String indexValue ) throws Exception { } public void test1PhraseShortMV ( ) throws Exception { } public void test1PhraseLongMV ( ) throws Exception { } public void test1PhraseLongMVB ( ) throws Exception { } public void testUnstoredField ( ) throws Exception { } protected void makeUnstoredIndex ( ) throws Exception { } public void test1StrMV ( ) throws Exception { } public void testMVSeparator ( ) throws Exception { } public void testDiscreteMultiValueHighlighting ( ) throws Exception { } public void testRandomDiscreteMultiValueHighlighting ( ) throws Exception { } private String getRandomValue ( String [ ] randomValues , Map < String , Set < Integer > > valueToDocId , int docId ) { } private static class Doc { final String [ ] [ ] fieldValues ; private Doc ( String [ ] [ ] fieldValues ) { } } }

Fix:
assertEquals ( "&lt;h1&gt;<seq2seq4repair_space>[a]<seq2seq4repair_space>&lt;&#x2F;h1&gt;" , sfb . createFragment ( reader , 0 , F , ffl , preTags , postTags , new SimpleHTMLEncoder ( ) ) ) ;
Buggy code:
public class AddMessageCommand extends Command { protected HeaderInterface [ ] headerList = new HeaderInterface [ 1 ] ; protected Folder folder ; public AddMessageCommand ( DefaultCommandReference [ ] references ) { } public void updateGUI ( ) throws Exception { <START_BUG> TableChangedEvent ev = new TableChangedEvent ( TableChangedEvent . ADD , folder , headerList ) ; <END_BUG> treeModel . nodeChanged ( folder ) ; TableUpdater . tableChanged ( ev ) ; } public void execute ( Worker worker ) throws Exception { } public void undo ( Worker worker ) throws Exception { } public void redo ( Worker worker ) throws Exception { } }

Fix:
TableChangedEvent ev = new TableChangedEvent ( TableChangedEvent . UPDATE , folder ) ;
Buggy code:
public class User { private int ID ; private String userName ; private String encryptedPassword ; private static int numberOfUser = 0 ; public User ( String userName ) { } public int getID ( ) { } public String getUserName ( ) { } public String getEncryptedPassword ( ) { } public void setPassword ( String pass ) { } public String encrypt ( String password ) { } public boolean authenticate ( String password ) { } public void transferUsernamePassword ( ) throws IOException { <START_BUG> FileWriter file = new FileWriter ( "//Users//QuangVu//Desktop//workspace//SE262-FPTS//src//Account.txt" , true ) ; <END_BUG> PrintWriter writer = null ; try { writer = new PrintWriter ( file ) ; writer . println ( ( ( ( userName ) + "," ) + ( encryptedPassword ) ) ) ; } finally { if ( writer != null ) { writer . close ( ) ; } } } }

Fix:
FileWriter file = new FileWriter ( "src//Account.txt" , true ) ;
Buggy code:
@ Ignore public class MultiBitHDFestTest extends FestSwingTestCaseTemplate { private static final Logger log = LoggerFactory . getLogger ( MultiBitHDFestTest . class ) ; private FrameFixture window ; private MultiBitHD testObject ; @ BeforeClass public static void setUpOnce ( ) throws Exception { } @ Before public void setUp ( ) { } @ After public void tearDown ( ) { } @ Test public void verifyWelcomeWizardCreateWallet_en_US ( ) throws Exception { } @ Test public void verifyWelcomeWizardCreateWallet_ro_RO ( ) throws Exception { } @ Test public void verifyWelcomeWizardRestoreWallet_en_US ( ) throws Exception { } @ Test public void verifyRestorePassword ( ) throws Exception { } @ Test public void verifyUseExistingWallet ( ) throws Exception { } @ Test public void verifySidebarScreens ( ) throws Exception { } @ Test public void verifySendRequestScreen ( ) throws Exception { } @ Test public void verifyPaymentsScreen ( ) throws Exception { } @ Test public void verifyContactsScreen ( ) throws Exception { } @ Test public void verifySettingsScreen ( ) throws Exception { } @ Test public void verifyManageWalletScreen ( ) throws Exception { } @ Test public void verifyToolsScreen ( ) throws Exception { } @ Test public void verifyHardwareWalletBeforeUnlock ( ) throws Exception { } @ Test public void verifyHardwareWalletAfterUnlock ( ) throws Exception { } private void arrangeFresh ( ) throws Exception { } private void arrangeFreshWithAttachedHardwareWallet ( ) throws Exception { MultiBitHDFestTest . log . info ( "Arranging<seq2seq4repair_space>fresh<seq2seq4repair_space>environment<seq2seq4repair_space>with<seq2seq4repair_space>attached<seq2seq4repair_space>hardware<seq2seq4repair_space>wallet..." ) ; AbstractTrezorHardwareWalletClient mockClient = HardwareWalletFixtures . createAttachedClient ( ) ; HardwareWalletService hardwareWalletService = new HardwareWalletService ( mockClient ) ; CoreServices . setHardwareWalletService ( hardwareWalletService ) ; <START_BUG> HardwareWalletEventFixtures . newInitialiseTrezorUseCase ( ) ; <END_BUG> setUpAfterArrange ( false , false ) ; } private void arrangeEmpty ( ) throws Exception { } private void arrangeEmptyWithAttachedHardwareWallet ( ) throws Exception { } private void arrangeStandard ( ) throws Exception { } private void setUpAfterArrange ( boolean licenceAccepted , final boolean hardwareWalletAttached ) throws Exception { } }

Fix:
HardwareWalletEventFixtures . prepareInitialiseTrezorUseCaseEvents ( ) ;
Buggy code:
public class MainMenuScreen implements Screen { GbitsGame game ; public MainMenuScreen ( GbitsGame gg ) { } @ Override public void render ( float delta ) { gl . glClearColor ( 0 , 0 , 0.2F , 1 ) ; gl . glClear ( GL_COLOR_BUFFER_BIT ) ; game . batch . setProjectionMatrix ( game . camera . combined ) ; game . camera . update ( ) ; game . batch . begin ( ) ; game . font . draw ( game . batch , "Welcome<seq2seq4repair_space>to<seq2seq4repair_space>Gbits!!!<seq2seq4repair_space>" , 100 , 400 ) ; game . font . draw ( game . batch , "Tap<seq2seq4repair_space>anywhere<seq2seq4repair_space>to<seq2seq4repair_space>begin!" , 100 , 350 ) ; game . batch . end ( ) ; <START_BUG> if ( input . isTouched ( ) ) { <END_BUG> game . setScreen ( game . STS ) ; } } @ Override public void resize ( int width , int height ) { } @ Override public void show ( ) { } @ Override public void hide ( ) { } @ Override public void pause ( ) { } @ Override public void resume ( ) { } @ Override public void dispose ( ) { } }

Fix:
if ( input . justTouched ( ) ) {
Buggy code:
public class SURQueryMixTest extends SURBaseTest { public SURQueryMixTest ( final String model , final String query , final String cursorName , final boolean positioned ) { } public void runTest ( ) throws SQLException { } private Map createRowMap ( final ResultSet rs ) throws SQLException { } private List createRandomSample ( final Map rows , int k ) { Random r = new Random ( ) ; ArrayList sampledKeys = new ArrayList ( ) ; int n = 0 ; for ( Iterator i = rows . keySet ( ) . iterator ( ) ; i . hasNext ( ) ; ) { Object key = i . next ( ) ; n ++ ; if ( n <= k ) { sampledKeys . add ( key ) ; } else { double d = r . nextDouble ( ) ; double p = ( ( double ) ( k ) ) // ( ( double ) ( n ) ) ; if ( d < p ) { <START_BUG> int keyToReplace = ( Math . abs ( r . nextInt ( ) ) ) % k ; <END_BUG> sampledKeys . set ( keyToReplace , key ) ; } } } return sampledKeys ; } private void deleteRandomSampleOfNRecords ( final ResultSet rs , final Map rows , final Set deletedRows , final int k ) throws SQLException { } private void updateRandomSampleOfNRecords ( final ResultSet rs , final Map rows , final Set updatedRows , final int k ) throws SQLException { } private void updateRow ( final ResultSet rs , final ResultSetMetaData meta ) throws SQLException { } private void updatePositioned ( final ResultSet rs , final ResultSetMetaData meta ) throws SQLException { } private void testNavigation ( final ResultSet rs , final Map rows , final Set updatedRows , final Set deletedRows ) throws SQLException { } private String getRowString ( final ResultSet rs ) throws SQLException { } private final String query ; private final String cursorName ; private final boolean positioned ; private boolean checkRowUpdated ; private boolean checkRowDeleted ; private static final String [ ] selectConditions = new String [ ] { "WHERE<seq2seq4repair_space>c<seq2seq4repair_space>like<seq2seq4repair_space>'T%'" , "<seq2seq4repair_space>" , "WHERE<seq2seq4repair_space>b<seq2seq4repair_space>><seq2seq4repair_space>5" , "WHERE<seq2seq4repair_space>id<seq2seq4repair_space>>=<seq2seq4repair_space>a" , "WHERE<seq2seq4repair_space>id<seq2seq4repair_space>><seq2seq4repair_space>1<seq2seq4repair_space>and<seq2seq4repair_space>id<seq2seq4repair_space><<seq2seq4repair_space>900" , "WHERE<seq2seq4repair_space>id<seq2seq4repair_space>=<seq2seq4repair_space>1" , "WHERE<seq2seq4repair_space>id<seq2seq4repair_space>in<seq2seq4repair_space>(1,3,4,600,900,955,966,977,978)" , "WHERE<seq2seq4repair_space>a<seq2seq4repair_space>in<seq2seq4repair_space>(1,3,4,600,9200,955,966,977,978)" , "WHERE<seq2seq4repair_space>a>2<seq2seq4repair_space>and<seq2seq4repair_space>a<9000" } ; private static final String [ ] projectConditions = new String [ ] { "id,c,a,b" , "id,c" , "a,b" , "*" , "id,a,b,c" , "id,a" , "a,b,c" , "a,c" } ; private static TestSuite createTestCases ( final String modelName ) { } public static Test suite ( ) { } private static Test baseSuite ( String name ) { } }

Fix:
int keyToReplace = r . nextInt ( k ) ;
Buggy code:
public class MailFilterAction extends FilterAction { public MailFilterAction ( XmlElement root ) { } public MailFilterAction ( FilterAction parent ) { } public void setMarkVariant ( String s ) { <START_BUG> set ( "markvariant" , s ) ; <END_BUG> } public String getMarkVariant ( ) { } }

Fix:
setString ( "markvariant" , s ) ;
Buggy code:
public final class PrototypeBasedTargetSourceTests { @ Test public void testSerializability ( ) throws Exception { MutablePropertyValues tsPvs = new MutablePropertyValues ( ) ; <START_BUG> tsPvs . addPropertyValue ( "targetBeanName" , "person" ) ; <END_BUG> RootBeanDefinition tsBd = new RootBeanDefinition ( PrototypeBasedTargetSourceTests . TestTargetSource . class , tsPvs ) ; MutablePropertyValues pvs = new MutablePropertyValues ( ) ; RootBeanDefinition bd = new RootBeanDefinition ( SerializablePerson . class , pvs ) ; bd . setScope ( SCOPE_PROTOTYPE ) ; DefaultListableBeanFactory bf = new DefaultListableBeanFactory ( ) ; bf . registerBeanDefinition ( "ts" , tsBd ) ; bf . registerBeanDefinition ( "person" , bd ) ; PrototypeBasedTargetSourceTests . TestTargetSource cpts = ( ( PrototypeBasedTargetSourceTests . TestTargetSource ) ( bf . getBean ( "ts" ) ) ) ; TargetSource serialized = ( ( TargetSource ) ( SerializationTestUtils . serializeAndDeserialize ( cpts ) ) ) ; assertTrue ( "Changed<seq2seq4repair_space>to<seq2seq4repair_space>SingletonTargetSource<seq2seq4repair_space>on<seq2seq4repair_space>deserialization" , ( serialized instanceof SingletonTargetSource ) ) ; SingletonTargetSource sts = ( ( SingletonTargetSource ) ( serialized ) ) ; assertNotNull ( sts . getTarget ( ) ) ; } private static class TestTargetSource extends AbstractPrototypeBasedTargetSource { private TestBean thisFieldIsNotSerializable = new TestBean ( ) ; public Object getTarget ( ) throws Exception { } public void releaseTarget ( Object target ) throws Exception { } } }

Fix:
tsPvs . add ( "targetBeanName" , "person" ) ;
Buggy code:
public class ChangeData { public static void main ( String [ ] args ) throws IOException { } void run ( String num ) throws IOException { Random random = new Random ( ) ; BufferedReader allData = new BufferedReader ( new FileReader ( "allData.txt" ) ) ; <START_BUG> int size = ( ( int ) ( allData . lines ( ) . count ( ) ) ) ; <END_BUG> allData . close ( ) ; allData = new BufferedReader ( new FileReader ( "allData.txt" ) ) ; PrintWriter trainWriter = new PrintWriter ( ( ( "train" + num ) + ".txt" ) , "UTF-8" ) ; PrintWriter testWriter = new PrintWriter ( ( ( "test" + num ) + ".txt" ) , "UTF-8" ) ; double percent = 0.7 ; String line = allData . readLine ( ) ; int trainSize = 0 ; while ( line != null ) { if ( ( ( random . nextInt ( 2 ) ) == 0 ) && ( trainSize < ( ( int ) ( size * percent ) ) ) ) { trainSize ++ ; trainWriter . println ( line ) ; line = allData . readLine ( ) ; } else { testWriter . println ( line ) ; line = allData . readLine ( ) ; } } trainWriter . close ( ) ; testWriter . close ( ) ; allData . close ( ) ; } }

Fix:
int size = Main . countLines ( allData ) ;
Buggy code:
public class DefaultKeyValue < K , V > extends AbstractKeyValue < K , V > { public DefaultKeyValue ( ) { } public DefaultKeyValue ( final K key , final V value ) { } public DefaultKeyValue ( final KeyValue < K , V > pair ) { } public DefaultKeyValue ( final Map . Entry < K , V > entry ) { } public K setKey ( final K key ) { } public V setValue ( final V value ) { } public Map . Entry < K , V > toMapEntry ( ) { } @ Override public boolean equals ( final Object obj ) { if ( obj == ( this ) ) { return true ; } if ( ( obj instanceof DefaultKeyValue ) == false ) { return false ; } <START_BUG> DefaultKeyValue < ? , ? > other = ( ( DefaultKeyValue < ? , ? > ) ( obj ) ) ; <END_BUG> return ( ( DefaultKeyValue . getKey ( ) ) == null ? ( other . getKey ( ) ) == null : DefaultKeyValue . getKey ( ) . equals ( other . getKey ( ) ) ) && ( ( DefaultKeyValue . getValue ( ) ) == null ? ( other . getValue ( ) ) == null : DefaultKeyValue . getValue ( ) . equals ( other . getValue ( ) ) ) ; } @ Override public int hashCode ( ) { } }

Fix:
final DefaultKeyValue < ? , ? > other = ( ( DefaultKeyValue < ? , ? > ) ( obj ) ) ;