nus-yam/ex-repair huggingface dataset:
Buggy code:
public class ItemSetList implements Set < ItemSet > { private final Set < ItemSet > itemsets ; private int maximumSupport = 0 ; private Map < Iterable < Selector > , Set < ItemSet > > supportItemSetMap = new HashMap < > ( ) ; public ItemSetList ( ) { } @ Override public boolean add ( ItemSet itemSet ) { } @ Override public int size ( ) { } @ Override public String toString ( ) { } protected String getRepresentativeItemString ( Item item ) { } @ Override public Iterator < ItemSet > iterator ( ) { } @ Override public boolean addAll ( Collection < ? extends ItemSet > c ) { } private void addtoSupportItemSetsMap ( ItemSet newItemSet ) { } private void removeFromSupportItemSetsMap ( ItemSet newItemSet ) { } @ Override public void clear ( ) { } @ Override public boolean contains ( Object o ) { } @ Override public boolean containsAll ( Collection < ? > c ) { } @ Override public boolean isEmpty ( ) { } @ Override public boolean remove ( Object o ) { } @ Override public boolean removeAll ( Collection < ? > c ) { } @ Override public boolean retainAll ( Collection < ? > c ) { } void calculateMaxSupport ( ) { } @ Override public Object [ ] toArray ( ) { } @ Override public < T > T [ ] toArray ( T [ ] a ) { } public int getMaximumSupport ( ) { } @ Override public boolean equals ( Object obj ) { } @ Override public int hashCode ( ) { } public void removeSubsets ( ItemSetList itemSetList ) { } public boolean containsSuperSet ( ItemSet itemSetToCheck ) { } public void removeSubset ( ItemSet superSet ) { List < ItemSet > toRemove = new ArrayList < > ( ) ; Set < ItemSet > allItemSetsWithSameSupport = supportItemSetMap . get ( superSet . getSupport ( ) ) ; if ( allItemSetsWithSameSupport == null ) return ; for ( ItemSet itemSet : allItemSetsWithSameSupport ) { if ( superSet . containsAll ( itemSet ) ) { <START_BUG> toRemove . remove ( itemSet ) ; <END_BUG> } } for ( ItemSet itemSet : toRemove ) { itemsets . remove ( itemSet ) ; supportItemSetMap . get ( itemSet . getSupport ( ) ) . remove ( itemSet ) ; } } public static ItemSet findItemSetWithMaxImpact ( List < ItemSetList > itemSetList ) { } }

Fix:
toRemove . add ( itemSet ) ;
Buggy code:
public class GlobalOperationsTestCase extends AbstractGlobalOperationsTestCase { @ Test public void testRecursiveRead ( ) throws Exception { } @ Test public void testRecursiveReadResourceAndReadAttributeWithAndWithoutDefaults ( ) throws Exception { } @ Test public void testRecursiveReadSubModelOperationSimple ( ) throws Exception { } @ Test public void testNonRecursiveReadSubModelOperationSimple ( ) throws Exception { } @ Test public void testRecursiveReadSubModelOperationComplex ( ) throws Exception { } @ Test public void testReadAttributeValue ( ) throws Exception { } @ Test public void testWriteAttributeValue ( ) throws Exception { } @ Test public void testReadChildrenNames ( ) throws Exception { } @ Test public void testReadChildrenTypes ( ) throws Exception { } @ Test public void testReadChildrenResources ( ) throws Exception { } @ Test public void testReadChildrenResourcesRecursive ( ) throws Exception { } @ Test public void testReadOperationNamesOperation ( ) throws Exception { } @ Test public void testReadOperationDescriptionOperation ( ) throws Exception { ModelNode operation = createOperation ( READ_OPERATION_DESCRIPTION_OPERATION , "profile" , "profileA" , "subsystem" , "subsystem1" ) ; operation . get ( NAME ) . set ( "Nothing" ) ; try { ModelNode result = executeForResult ( operation ) ; Assert . fail ( ( "Received<seq2seq4repair_space>invalid<seq2seq4repair_space>successful<seq2seq4repair_space>result<seq2seq4repair_space>" + ( result . toString ( ) ) ) ) ; } catch ( OperationFailedException good ) { } operation . get ( NAME ) . set ( "testA1-2" ) ; ModelNode result = executeForResult ( operation ) ; Assert . assertEquals ( OBJECT , result . getType ( ) ) ; <START_BUG> Assert . assertEquals ( "testA2" , result . require ( OPERATION_NAME ) . asString ( ) ) ; <END_BUG> Assert . assertEquals ( STRING , result . require ( REQUEST_PROPERTIES ) . require ( "paramA2" ) . require ( TYPE ) . asType ( ) ) ; } @ Test public void testReadResourceDescriptionOperation ( ) throws Exception { } @ Test public void testReadRecursiveResourceDescriptionOperation ( ) throws Exception { } @ Test public void testReadResourceDescriptionWithOperationsOperation ( ) throws Exception { } @ Test public void testRecursiveReadResourceDescriptionWithOperationsOperation ( ) throws Exception { } @ Test public void testReadResourceAttributesOnly ( ) throws Exception { } private void checkNonRecursiveSubsystem1 ( ModelNode result , boolean includeRuntime ) { } private void checkRecursiveSubsystem1 ( ModelNode result ) { } private void checkRecursiveSubsystem2 ( ModelNode result ) { } }

Fix:
Assert . assertEquals ( "testA1-2" , result . require ( OPERATION_NAME ) . asString ( ) ) ;
Buggy code:
public final class Packages { public static String absolutePath ( final Class < ? > p , final String relativePath ) { <START_BUG> String packName = Packages . extractPackageName ( p ) ; <END_BUG> return Packages . absolutePath ( packName , relativePath ) ; } public static String absolutePath ( final Package p , final String relativePath ) { } public static String absolutePath ( final String packageName , final String relativePath ) { } public static String extractPackageName ( final Class < ? > forClass ) { } public static String parent ( final String packageName ) { } public static String resolveScope ( final Class < ? > forClass ) { } private Packages ( ) { } }

Fix:
String packName = ( p != null ) ? Packages . extractPackageName ( p ) : "" ;
Buggy code:
public class CoarseSessionFactory < L > implements SessionFactory < CoarseSessionEntry < L > , L > { private final SessionContext context ; private final Cache < String , CoarseSessionCacheEntry < L > > sessionCache ; private final Cache < SessionAttributesCacheKey , MarshalledValue < Map < String , Object > , MarshallingContext > > attributesCache ; private final SessionAttributeMarshaller < Map < String , Object > , MarshalledValue < Map < String , Object > , MarshallingContext > > marshaller ; private final LocalContextFactory < L > localContextFactory ; public CoarseSessionFactory ( Cache < String , CoarseSessionCacheEntry < L > > sessionCache , Cache < SessionAttributesCacheKey , MarshalledValue < Map < String , Object > , MarshallingContext > > attributesCache , SessionContext context , SessionAttributeMarshaller < Map < String , Object > , MarshalledValue < Map < String , Object > , MarshallingContext > > marshaller , LocalContextFactory < L > localContextFactory ) { } @ Override public Session < L > createSession ( String id , CoarseSessionEntry < L > entry ) { } @ Override public ImmutableSession createImmutableSession ( String id , CoarseSessionEntry < L > entry ) { } @ Override public CoarseSessionEntry < L > createValue ( String id ) { } @ Override public CoarseSessionEntry < L > findValue ( String id ) { TransactionConfiguration transaction = this . sessionCache . getCacheConfiguration ( ) . transaction ( ) ; boolean pessimistic = ( transaction . transactionMode ( ) . isTransactional ( ) ) && ( ( transaction . lockingMode ( ) ) == ( LockingMode . PESSIMISTIC ) ) ; Cache < String , CoarseSessionCacheEntry < L > > cache = ( pessimistic ) ? this . sessionCache . getAdvancedCache ( ) . withFlags ( FORCE_WRITE_LOCK ) : this . sessionCache ; CoarseSessionCacheEntry < L > entry = cache . get ( id ) ; if ( entry == null ) return null ; MarshalledValue < Map < String , Object > , MarshallingContext > value = this . attributesCache . get ( new SessionAttributesCacheKey ( id ) ) ; <START_BUG> return new CoarseSessionEntry ( entry , value ) ; <END_BUG> } @ Override public void remove ( String id ) { } @ Override public void evict ( String id ) { } }

Fix:
return value != null ? new CoarseSessionEntry ( entry , value ) : null ;
Buggy code:
final class StandardHostValve extends ValveBase { private static final Log log = LogFactory . getLog ( StandardHostValve . class ) ; private static final ClassLoader MY_CLASSLOADER = StandardHostValve . class . getClassLoader ( ) ; protected static final boolean STRICT_SERVLET_COMPLIANCE ; protected static final boolean ACCESS_SESSION ; public StandardHostValve ( ) { } private static final StringManager sm = StringManager . getManager ( Package ) ; @ Override public final void invoke ( Request request , Response response ) throws IOException , ServletException { Context context = request . getContext ( ) ; if ( context == null ) { response . sendError ( SC_INTERNAL_SERVER_ERROR , StandardHostValve . sm . getString ( "standardHost.noContext" ) ) ; return ; } if ( request . isAsyncSupported ( ) ) { request . setAsyncSupported ( context . getPipeline ( ) . isAsyncSupported ( ) ) ; } boolean asyncAtStart = request . isAsync ( ) ; boolean asyncDispatching = request . isAsyncDispatching ( ) ; try { context . bind ( IS_SECURITY_ENABLED , StandardHostValve . MY_CLASSLOADER ) ; if ( ( ! asyncAtStart ) && ( ! ( context . fireRequestInitEvent ( request ) ) ) ) { return ; } try { if ( ( ! asyncAtStart ) || asyncDispatching ) { context . getPipeline ( ) . getFirst ( ) . invoke ( request , response ) ; } else { if ( ! ( response . isErrorReportRequired ( ) ) ) { throw new IllegalStateException ( StandardHostValve . sm . getString ( "standardHost.asyncStateError" ) ) ; } } } catch ( Throwable t ) { ExceptionUtils . handleThrowable ( t ) ; if ( response . isErrorReportRequired ( ) ) { container . getLogger ( ) . error ( ( "Exception<seq2seq4repair_space>Processing<seq2seq4repair_space>" + ( request . getRequestURI ( ) ) ) , t ) ; } else { request . setAttribute ( ERROR_EXCEPTION , t ) ; throwable ( request , response , t ) ; } } Throwable t = ( ( Throwable ) ( request . getAttribute ( ERROR_EXCEPTION ) ) ) ; if ( ! ( context . getState ( ) . isAvailable ( ) ) ) { return ; } if ( response . isErrorReportRequired ( ) ) { response . setSuspended ( false ) ; if ( t != null ) { throwable ( request , response , t ) ; } else { status ( request , response ) ; } } <START_BUG> if ( ( ! ( request . isAsync ( ) ) ) && ( ! ( response . isErrorReportRequired ( ) ) ) ) { <END_BUG> context . fireRequestDestroyEvent ( request ) ; } } finally { if ( StandardHostValve . ACCESS_SESSION ) { request . getSession ( false ) ; } context . unbind ( IS_SECURITY_ENABLED , StandardHostValve . MY_CLASSLOADER ) ; } } private void status ( Request request , Response response ) { } protected void throwable ( Request request , Response response , Throwable throwable ) { } private boolean custom ( Request request , Response response , ErrorPage errorPage ) { } private static ErrorPage findErrorPage ( Context context , Throwable exception ) { } }

Fix:
if ( ( ! ( request . isAsync ( ) ) ) && ( ( ! asyncAtStart ) || ( ! ( response . isErrorReportRequired ( ) ) ) ) ) {
Buggy code:
public class EntityHangGlider extends EntityLiving { public EntityHangGlider ( World world ) { } public void onEntityUpdate ( ) { super . onEntityUpdate ( ) ; if ( ( ( this . ridingEntity ) != null ) && ( ( this . ridingEntity ) instanceof EntityPlayer ) ) { EntityPlayer player = ( ( EntityPlayer ) ( this . ridingEntity ) ) ; if ( hasHangglider ( player ) ) { if ( ( ( ! ( player . onGround ) ) && ( ! ( this . worldObj . getBlockState ( player . getPosition ( ) ) . getBlock ( ) . getMaterial ( ) . isLiquid ( ) ) ) ) && ( ! ( this . worldObj . getBlockState ( player . getPosition ( ) . down ( ) ) . getBlock ( ) . getMaterial ( ) . isLiquid ( ) ) ) ) { if ( ( player . motionY ) < 0 ) { final double horizontalSpeed ; final double verticalSpeed ; if ( player . isSprinting ( ) ) { <START_BUG> horizontalSpeed = 0.05 ; <END_BUG> verticalSpeed = 0.5 ; } else if ( player . isSneaking ( ) ) { horizontalSpeed = 0.1 ; verticalSpeed = 1.0 ; } else { horizontalSpeed = 0.03 ; verticalSpeed = 0.4 ; } player . motionY *= verticalSpeed ; motionY *= verticalSpeed ; double x = ( Math . cos ( Math . toRadians ( ( ( player . rotationYawHead ) + 90 ) ) ) ) * horizontalSpeed ; double z = ( Math . sin ( Math . toRadians ( ( ( player . rotationYawHead ) + 90 ) ) ) ) * horizontalSpeed ; player . motionX += x ; player . motionZ += z ; player . fallDistance = 0.0F ; } } if ( ! ( this . worldObj . isRemote ) ) { this . rotationYaw = player . rotationYaw ; } } else if ( ! ( this . worldObj . isRemote ) ) { this . setDead ( ) ; } } else { this . setDead ( ) ; } } public boolean hasHangglider ( EntityPlayer p ) { } public boolean attackEntityAsMob ( Entity entity ) { } public boolean attackEntityFrom ( DamageSource source , float amount ) { } }

Fix:
horizontalSpeed = 0.0425 ;
Buggy code:
public class WebRequestCycle extends RequestCycle { private static final Log log = LogFactory . getLog ( WebRequestCycle . class ) ; public WebRequestCycle ( final WebApplication application , final WebSession session , final WebRequest request , final Response response ) { } public String urlFor ( final Class pageClass , final PageParameters parameters ) { } public String urlFor ( final Component component , final Class listenerInterface ) { } public StringBuffer urlPrefix ( ) { } protected void handleRender ( ) { } protected void redirectToPage ( final Page page ) { } final void setFormComponentValuesFromCookies ( final Page page ) { page . visitChildren ( Form . class , new Component . IVisitor ( ) { public Object component ( final Component component ) { <START_BUG> ( ( Form ) ( component ) ) . setFormComponentValuesFromPersister ( ) ; <END_BUG> return CONTINUE_TRAVERSAL ; } } ) ; } private boolean bookmarkablePage ( ) { } private boolean callComponentListener ( ) { } private void invokeInterface ( final Page page , final String path , final String interfaceName ) { } private void invokeInterface ( final Component component , final String interfaceName ) { } private void handleExpiredPage ( ) { } private void handleStalePage ( ) { } private void handleStaleRendering ( final Page page ) { } private boolean homePage ( ) { } private final Page newPage ( final Class pageClass ) { } private final Page newPage ( final Class pageClass , final Page page ) { } private boolean renderStaticContent ( ) { } }

Fix:
( ( Form ) ( component ) ) . loadPersistentFormComponentValues ( ) ;
Buggy code:
public abstract class ARAbstractPrimitive < T > extends ARAbstractException < T > { @ Override public String extractErrorMessage ( String arg , CommandSender sender , Exception ex ) { <START_BUG> return Txt . parse ( "<b>\"<h>%s\"<b><seq2seq4repair_space>is<seq2seq4repair_space>not<seq2seq4repair_space>a<seq2seq4repair_space>%s." , arg , this . getTypeName ( ) ) ; <END_BUG> } }

Fix:
return Txt . parse ( "<b>\"<h>%s<b>\"<seq2seq4repair_space>is<seq2seq4repair_space>not<seq2seq4repair_space>a<seq2seq4repair_space>%s." , arg , this . getTypeName ( ) ) ;
Buggy code:
public class BuildOptionsTest extends AjdeTestCase { private AjcBuildOptions buildOptions = null ; private UserPreferencesAdapter preferencesAdapter = null ; public BuildOptionsTest ( String name ) { } public static void main ( String [ ] args ) { } public static TestSuite suite ( ) { } public void testCharacterEncoding ( ) { } public void testPortingMode ( ) { } public void testVerboseMode ( ) { } public void testNonStandardOptions ( ) { } public void testComplianceLevel ( ) { } public void testSourceCompatibilityLevel ( ) { } public void testWarnings ( ) { } public void testDebugLevel ( ) { } public void testNoImportError ( ) { } public void testPreserveLocals ( ) { } protected void setUp ( ) throws Exception { super . setUp ( ) ; <START_BUG> preferencesAdapter = new UserPreferencesStore ( ) ; <END_BUG> buildOptions = new AjcBuildOptions ( preferencesAdapter ) ; } protected void tearDown ( ) throws Exception { } }

Fix:
preferencesAdapter = new UserPreferencesStore ( false ) ;
Buggy code:
public class FieldsList extends Activity { private ListView listView ; @ Override protected void onCreate ( Bundle savedInstanceState ) { } private void createListView ( ) { ArrayList < Field > fieldsList = currentUser . getFields ( ) ; final String [ ] selectionList = new String [ fieldsList . size ( ) ] ; for ( int i = 0 ; i < ( fieldsList . size ( ) ) ; i ++ ) { selectionList [ i ] = fieldsList . get ( i ) . Name ; } ArrayAdapter < String > adapter = new ArrayAdapter < String > ( this , layout . simple_list_item_1 , id . text1 , selectionList ) ; listView . setAdapter ( adapter ) ; listView . setOnItemClickListener ( new AdapterView . OnItemClickListener ( ) { @ Override public void onItemClick ( AdapterView < ? > parent , View view , int position , long id ) { Intent myIntent = new Intent ( FieldsList . this , SpecificFieldInfo . class ) ; <START_BUG> myIntent . putExtra ( "FieldIndex" , position ) ; <END_BUG> FieldsList . this . startActivity ( myIntent ) ; } } ) ; } No newline ; at end ; of file ; }

Fix:
myIntent . putExtra ( "FieldIndex" , ( position - 1 ) ) ;
Buggy code:
public class ThrowStatement extends Statement { public Expression exception ; public TypeBinding exceptionType ; public ThrowStatement ( Expression exception , int startPosition ) { } public FlowInfo analyseCode ( BlockScope currentScope , FlowContext flowContext , FlowInfo flowInfo ) { } public void generateCode ( BlockScope currentScope , CodeStream codeStream ) { } public void resolve ( BlockScope scope ) { exceptionType = exception . resolveTypeExpecting ( scope , scope . getJavaLangThrowable ( ) ) ; <START_BUG> if ( ( ( exceptionType ) == ( NullBinding ) ) && ( ( scope . problemReporter ( ) . options . complianceLevel ) <= ( JDK1_3 ) ) ) { <END_BUG> scope . problemReporter ( ) . cannotThrowNull ( this ) ; } exception . implicitWidening ( exceptionType , exceptionType ) ; } public String toString ( int tab ) { } public void traverse ( IAbstractSyntaxTreeVisitor visitor , BlockScope blockScope ) { } }

Fix:
if ( ( ( exceptionType ) == ( NullBinding ) ) && ( ( scope . environment ( ) . options . complianceLevel ) <= ( JDK1_3 ) ) ) {
Buggy code:
public class DAOJurnal implements IDAOJurnal { private Connection connection = null ; PreparedStatement PSInsert = null ; PreparedStatement PSUpdate = null ; PreparedStatement PSDelete = null ; PreparedStatement PSSelect = null ; public DAOJurnal ( ) { } public void insert ( InregistrareJurnal inregistrareJurnal ) throws SQLException { } public void delete ( InregistrareJurnal inregistrareJurnal ) throws SQLException { } public void update ( InregistrareJurnal inregistrareJurnal ) throws SQLException { } public List < InregistrareJurnal > getAll ( ) throws SQLException { List < InregistrareJurnal > inregistrareJurnalList = new ArrayList < InregistrareJurnal > ( ) ; try { <START_BUG> String selectTable = "SELECT<seq2seq4repair_space>*<seq2seq4repair_space>FROM<seq2seq4repair_space>InregistrariJurnal<seq2seq4repair_space>ORDER<seq2seq4repair_space>BY<seq2seq4repair_space>dataOra<seq2seq4repair_space>DESC" ; <END_BUG> PSSelect = connection . prepareStatement ( selectTable ) ; ResultSet result = PSSelect . executeQuery ( selectTable ) ; InregistrareJurnal inregistrareJurnal ; while ( result . next ( ) ) { inregistrareJurnal = new InregistrareJurnal ( result . getInt ( 1 ) , result . getTimestamp ( 2 ) , result . getString ( 3 ) , result . getString ( 4 ) ) ; inregistrareJurnalList . add ( inregistrareJurnal ) ; } } catch ( SQLException ex ) { throw new SQLException ( ( "Error<seq2seq4repair_space>when<seq2seq4repair_space>trying<seq2seq4repair_space>to<seq2seq4repair_space>retrieve<seq2seq4repair_space>the<seq2seq4repair_space>InregistrariJurnal:" + ( ex . getMessage ( ) ) ) ) ; } finally { if ( ( PSSelect ) != null ) { PSSelect . close ( ) ; } } return inregistrareJurnalList ; } }

Fix:
String selectTable = "SELECT<seq2seq4repair_space>*<seq2seq4repair_space>FROM<seq2seq4repair_space>InregistrariJurnal<seq2seq4repair_space>ORDER<seq2seq4repair_space>BY<seq2seq4repair_space>nrInregistrare<seq2seq4repair_space>DESC" ;
Buggy code:
public class SetLanguageCommand extends ScriptCommandBase { public SetLanguageCommand ( ) { } @ Override protected boolean onExecute ( ScriptContext context , String [ ] args , String label , String nl ) throws Exception { ScriptLanguage newLanguage = null ; args = cmdLine . getArgs ( ) ; for ( ScriptLanguage lang : ScriptHandler . getScriptLanguages ( ) ) { if ( ( lang . getName ( ) . equals ( args [ 0 ] ) ) || ( lang . getFileExtension ( ) . equals ( args [ 0 ] ) ) ) { newLanguage = lang ; break ; } } if ( newLanguage == null ) { <START_BUG> context . getUser ( ) . sendMessage ( ( "Unknown<seq2seq4repair_space>language:<seq2seq4repair_space>" + ( args [ 0 ] ) ) ) ; <END_BUG> return true ; } if ( ( context . getUser ( ) ) instanceof ConsoleUser ) { context = newLanguage . getConsoleContext ( ) ; } else { context = newLanguage . createNewShellInstance ( context . getUser ( ) ) ; } ScriptHandler . getScriptContexts ( ) . put ( ScriptHandler . userToKey ( context . getUser ( ) ) , context ) ; context . setScriptLanguage ( newLanguage ) ; context . getUser ( ) . sendMessage ( ( ( ( ( ChatColor . GOLD ) + "Language<seq2seq4repair_space>has<seq2seq4repair_space>been<seq2seq4repair_space>set<seq2seq4repair_space>to:<seq2seq4repair_space>" ) + ( ChatColor . RED ) ) + ( newLanguage . getName ( ) ) ) ) ; return true ; } @ Override public boolean languageRequired ( ) { } @ Nonnull @ Override public Options buildOptions ( Options parentOptions ) { } @ Override @ Nonnull public String getSyntax ( ) { } }

Fix:
context . getUser ( ) . sendMessage ( ( ( ( ChatColor . DARK_RED ) + "Unknown<seq2seq4repair_space>language:<seq2seq4repair_space>" ) + ( args [ 0 ] ) ) ) ;
Buggy code:
public class TweetsActivity extends BaseActivity < TweetsPresenter . View , TweetsComponent > implements TweetsPresenter . View { private static final int REQUEST_NEW_TWEET = 1 ; private final PublishSubject < RefreshEvent > refreshSubject = PublishSubject . create ( ) ; @ Bind ( id . swipeRefreshLayout ) SwipeRefreshLayout swipeRefreshLayout ; @ Bind ( id . recyclerView ) RecyclerView recyclerView ; @ Bind ( id . fab ) FloatingActionButton fab ; @ Inject TweetsPresenter presenter ; @ Inject Layout layout ; private TweetsAdapter adapter ; private ReplaySubject < Status > statusSubject = ReplaySubject . create ( ) ; public static void start ( @ NonNull Context context ) { } @ Override protected int getLayoutId ( ) { } @ Override protected void onCreate ( Bundle savedInstanceState ) { } @ Override protected void onActivityResult ( int requestCode , int resultCode , Intent data ) { } @ NonNull @ Override protected TweetsComponent createComponent ( @ NonNull ActivityComponent component ) { } @ Override protected void inject ( @ NonNull TweetsComponent component ) { } @ NonNull @ Override protected Presenter < TweetsPresenter . View > getPresenter ( ) { } @ NonNull @ Override protected View getPresenterView ( ) { } @ NonNull @ Override public Observable < Void > onCreateTweet ( ) { } @ NonNull @ Override public Observable < Status > startCreateTweet ( ) { <START_BUG> CreateTweetActivity . startForResult ( this , TweetsActivity . REQUEST_NEW_TWEET ) ; <END_BUG> return statusSubject . doOnCompleted ( ( ) -> statusSubject = ReplaySubject . create ( ) ) ; } @ Override public void showTweets ( @ NonNull List < Status > tweets ) { } @ Override public void addTweet ( @ NonNull Status status ) { } @ NonNull @ Override public Observable < RefreshEvent > onRefreshEvent ( ) { } @ Override public void setRefreshing ( boolean refreshing ) { } }

Fix:
CreateTweetActivity . startForResult ( this , TweetsActivity . REQUEST_NEW_TWEET , fab ) ;
Buggy code:
public class TestIndexWriterMergePolicy extends LuceneTestCase { public void testNormalCase ( ) throws IOException { } public void testNoOverMerge ( ) throws IOException { } public void testForceFlush ( ) throws IOException { } public void testMergeFactorChange ( ) throws IOException { } public void testMaxBufferedDocsChange ( ) throws IOException { } public void testMergeDocCount0 ( ) throws IOException { } private void addDoc ( IndexWriter writer ) throws IOException { } private void checkInvariants ( IndexWriter writer ) throws IOException { _TestUtil . syncConcurrentMerges ( writer ) ; int maxBufferedDocs = writer . getMaxBufferedDocs ( ) ; int mergeFactor = writer . getMergeFactor ( ) ; int maxMergeDocs = writer . getMaxMergeDocs ( ) ; int ramSegmentCount = writer . getNumBufferedDocuments ( ) ; assertTrue ( ( ramSegmentCount < maxBufferedDocs ) ) ; int lowerBound = - 1 ; int upperBound = maxBufferedDocs ; int numSegments = 0 ; int segmentCount = writer . getSegmentCount ( ) ; for ( int i = segmentCount - 1 ; i >= 0 ; i -- ) { int docCount = writer . getDocCount ( i ) ; assertTrue ( ( docCount > lowerBound ) ) ; if ( docCount <= upperBound ) { numSegments ++ ; } else { if ( ( upperBound * mergeFactor ) <= maxMergeDocs ) { <START_BUG> assertTrue ( ( ( ( ( ( ( ( "maxMergeDocs=" + maxMergeDocs ) + ";<seq2seq4repair_space>numSegments=" ) + numSegments ) + ";<seq2seq4repair_space>upperBound=" ) + upperBound ) + ";<seq2seq4repair_space>mergeFactor=" ) + mergeFactor ) , ( numSegments < mergeFactor ) ) ; <END_BUG> } do { lowerBound = upperBound ; upperBound *= mergeFactor ; } while ( docCount > upperBound ) ; numSegments = 1 ; } } if ( ( upperBound * mergeFactor ) <= maxMergeDocs ) { assertTrue ( ( numSegments < mergeFactor ) ) ; } String [ ] files = writer . getDirectory ( ) . listAll ( ) ; int segmentCfsCount = 0 ; for ( int i = 0 ; i < ( files . length ) ; i ++ ) { if ( files [ i ] . endsWith ( ".cfs" ) ) { segmentCfsCount ++ ; } } assertEquals ( segmentCount , segmentCfsCount ) ; } }

Fix:
assertTrue ( ( ( ( ( ( ( ( ( ( "maxMergeDocs=" + maxMergeDocs ) + ";<seq2seq4repair_space>numSegments=" ) + numSegments ) + ";<seq2seq4repair_space>upperBound=" ) + upperBound ) + ";<seq2seq4repair_space>mergeFactor=" ) + mergeFactor ) + ";<seq2seq4repair_space>segs=" ) + ( writer . segString ( ) ) ) , ( numSegments < mergeFactor ) ) ;
Buggy code:
public class IServerManagerSuper { private static final Logger log = Logger . getLogger ( IServerManagerSuper . class . getName ( ) ) ; protected static final IServerInterface _iServer = new IServerCCO ( ) ; private static final Individual _creator = IServerManagerSuper . _iServer . createIndividual ( "EverSync" ) ; protected DigitalObject addFile ( String fileName , String fileId ) throws CardinalityConstraintException { } protected void linkFilesDirected ( DigitalObject source , DigitalObject target ) { } public void linkFilesDirected ( String parentFileUri , String childFileUri ) { } protected JSONObject digitalObjectToJson ( DigitalObject obj ) { } private void getLinkedFilesRecursion ( Entity startFile , HashSet < Entity > allLinkedFiles ) { } protected JSONArray getAllLinkedFilesRecursively ( String hostType , String fileURI ) { } protected JSONArray getLinkedFiles ( String hostType , String fileURI ) { } protected HashSet < DigitalObject > getRootTaxonomyItems ( DigitalObject startingFile ) { } private void getParentOrSelfRecursion ( Entity object , HashSet < DigitalObject > currentRootItems ) { <START_BUG> HashSet < Entity > sources = object . getMySources ( ) ; <END_BUG> if ( ( sources . size ( ) ) > 0 ) { for ( Entity entity : sources ) { getParentOrSelfRecursion ( entity , currentRootItems ) ; } } else { currentRootItems . add ( ( ( DigitalObject ) ( object ) ) ) ; return ; } } }

Fix:
HashSet < Entity > sources = object . getMyParents ( ) ;
Buggy code:
public class ScarabRequestTool implements Recyclable , ScarabRequestScope { private RunData data ; private ScarabUser user = null ; private Issue issue = null ; private Attribute attribute = null ; private Module module = null ; private AttributeOption attributeOption = null ; public void init ( Object data ) { } public void refresh ( ) { } public ScarabRequestTool ( ) { } public void setAttribute ( Attribute attribute ) { } private IntakeTool getIntakeTool ( ) { } public void setAttributeOption ( AttributeOption option ) { } public AttributeOption getAttributeOption ( ) throws Exception { } public void setUser ( ScarabUser user ) { } public ScarabUser getUser ( ) { } public Attribute getAttribute ( ) throws Exception { try { if ( ( attribute ) == null ) { String attId = getIntakeTool ( ) . get ( "Attribute" , DEFAULT_KEY ) . get ( "Id" ) . toString ( ) ; if ( ( attId == null ) || ( ( attId . length ( ) ) == 0 ) ) { <START_BUG> attribute = new Attribute ( ) ; <END_BUG> } else { attribute = Attribute . getInstance ( new NumberKey ( attId ) ) ; } } } catch ( Exception e ) { e . printStackTrace ( ) ; } return attribute ; } public void setModule ( Module module ) { } public Module getModule ( ) throws Exception { } public RModuleAttribute getRModuleAttribute ( ) throws Exception { } public Module getModule ( String key ) throws Exception { } public void setIssue ( Issue issue ) { } public Issue getIssue ( ) { } public Issue getSearch ( ) throws Exception { } public Issue getIssue ( String key ) throws Exception { } private boolean disposed ; public void recycle ( ) { } public void dispose ( ) { } public boolean isDisposed ( ) { } }

Fix:
attribute = Attribute . getNewInstance ( ) ;
Buggy code:
public class TabFolder extends Composite { TabItem [ ] items ; int itemCount ; boolean ignoreSelect ; public TabFolder ( Composite parent , int style ) { } public void addSelectionListener ( SelectionListener listener ) { } static int checkStyle ( int style ) { } protected void checkSubclass ( ) { } public Point computeSize ( int wHint , int hHint , boolean changed ) { } public Rectangle computeTrim ( int x , int y , int width , int height ) { } void createHandle ( ) { NSTabView widget = ( ( NSTabView ) ( new SWTTabView ( ) . alloc ( ) ) ) ; <START_BUG> widget . initWithFrame ( new NSRect ( ) ) ; <END_BUG> widget . setDelegate ( widget ) ; if ( ( ( style ) & ( SWT . BOTTOM ) ) != 0 ) { widget . setTabViewType ( NSBottomTabsBezelBorder ) ; } view = widget ; } void createItem ( TabItem item , int index ) { } void createWidget ( ) { } void destroyItem ( TabItem item ) { } public Rectangle getClientArea ( ) { } public TabItem getItem ( int index ) { } public TabItem getItem ( Point point ) { } public int getItemCount ( ) { } public TabItem [ ] getItems ( ) { } public TabItem [ ] getSelection ( ) { } public int getSelectionIndex ( ) { } float getThemeAlpha ( ) { } public int indexOf ( TabItem item ) { } Point minimumSize ( int wHint , int hHint , boolean flushCache ) { } void releaseChildren ( boolean destroy ) { } void removeControl ( Control control ) { } public void removeSelectionListener ( SelectionListener listener ) { } void setFont ( NSFont font ) { } public void setSelection ( TabItem item ) { } public void setSelection ( TabItem [ ] items ) { } public void setSelection ( int index ) { } void setSelection ( int index , boolean notify , boolean force ) { } boolean traversePage ( boolean next ) { } void tabView_willSelectTabViewItem ( int id , int sel , int tabView , int tabViewItem ) { } void tabView_didSelectTabViewItem ( int id , int sel , int tabView , int tabViewItem ) { } }

Fix:
widget . init ( ) ;
Buggy code:
class MessageNotificationPopup extends PopupDialog { private FormToolkit toolkit ; private Form form ; private Composite sectionClient ; private IWorkbenchWindow window ; private String userName ; private String message ; private ID userID ; MessageNotificationPopup ( IWorkbenchWindow window , Shell parent , ID userID ) { } public boolean close ( ) { } void setContent ( String userName , String message ) { } protected Control createContents ( Composite parent ) { getShell ( ) . setBackground ( getShell ( ) . getDisplay ( ) . getSystemColor ( COLOR_GRAY ) ) ; toolkit = new FormToolkit ( parent . getDisplay ( ) ) ; form = toolkit . createForm ( parent ) ; form . getBody ( ) . setLayout ( new FillLayout ( ) ) ; Section section = toolkit . createSection ( form . getBody ( ) , TITLE_BAR ) ; section . setText ( userName ) ; section . setLayout ( new FillLayout ( ) ) ; sectionClient = toolkit . createComposite ( section ) ; sectionClient . setLayout ( new GridLayout ( ) ) ; Hyperlink link = toolkit . createHyperlink ( sectionClient , message , NONE ) ; link . addHyperlinkListener ( new HyperlinkAdapter ( ) { public void linkActivated ( HyperlinkEvent e ) { try { MessagesView view = ( ( MessagesView ) ( window . getActivePage ( ) . showView ( VIEW_ID ) ) ) ; <START_BUG> view . selectTab ( null , null , null , userID ) ; <END_BUG> } catch ( CoreException ce ) { ce . printStackTrace ( ) ; } } } ) ; section . setClient ( sectionClient ) ; ImageHyperlink hyperlink = toolkit . createImageHyperlink ( section , NONE ) ; hyperlink . setBackground ( null ) ; hyperlink . setImage ( PlatformUI . getWorkbench ( ) . getSharedImages ( ) . getImage ( IMG_TOOL_DELETE ) ) ; hyperlink . addHyperlinkListener ( new HyperlinkAdapter ( ) { public void linkActivated ( HyperlinkEvent e ) { close ( ) ; } } ) ; section . setTextClient ( hyperlink ) ; form . pack ( ) ; return parent ; } public void initializeBounds ( ) { } private Rectangle restoreBounds ( ) { } }

Fix:
view . selectTab ( null , null , null , userID , userName ) ;
Buggy code:
public class CreateWorkingCopyOperation extends JavaModelOperation { Map perFactoryWorkingCopies ; IBufferFactory factory ; IProblemRequestor problemRequestor ; public CreateWorkingCopyOperation ( ICompilationUnit originalElement , Map perFactoryWorkingCopies , IBufferFactory factory , IProblemRequestor problemRequestor ) { } protected void executeOperation ( ) throws JavaModelException { ICompilationUnit cu = getCompilationUnit ( ) ; WorkingCopy workingCopy = new WorkingCopy ( ( ( IPackageFragment ) ( cu . getParent ( ) ) ) , cu . getElementName ( ) , this . factory , this . problemRequestor ) ; <START_BUG> workingCopy . open ( fMonitor ) ; <END_BUG> if ( ( this . perFactoryWorkingCopies ) != null ) { this . perFactoryWorkingCopies . put ( cu , workingCopy ) ; if ( SHARED_WC_VERBOSE ) { System . out . println ( ( "Creating<seq2seq4repair_space>shared<seq2seq4repair_space>working<seq2seq4repair_space>copy<seq2seq4repair_space>" + ( workingCopy . toStringWithAncestors ( ) ) ) ) ; } } JavaElementDelta delta = new JavaElementDelta ( this . getJavaModel ( ) ) ; delta . added ( workingCopy ) ; addDelta ( delta ) ; fResultElements = new IJavaElement [ ] { workingCopy } ; } protected ICompilationUnit getCompilationUnit ( ) { } public boolean isReadOnly ( ) { } }

Fix:
workingCopy . open ( this . fMonitor ) ;
Buggy code:
public class Data { private static final String INCR_GROUP = "group_id" ; private static final String INCR_MESSAGE = "message_id" ; private static final String USER = "user" ; private static final String GROUP = "group" ; private static final String MESSAGE = "message" ; private static final String TEXT = "text" ; private static final String NAME = "name" ; private static final String SET_USERS = "users" ; private static final String SET_GROUPS = "groups" ; private static final String SET_MEMBERS = "members" ; private static final String LIST_MESSAGES = "messages" ; private static void delete ( String key ) { } public static void addUser ( User user ) { } public static User getUser ( String id ) { } public static String addGroup ( ) { } public static Set < String > getAllGroups ( ) { } public static void addUserToGroup ( String userId , String groupId ) { } public static String getGroupForUser ( String userId ) { } public static void removeUserFromGroup ( String userId , String groupId ) { } public static Set < String > getUsersForGroup ( String groupId ) { } public static String postMessage ( String userId , String groupId , String text ) { } public static List < Message > getMessagesForGroup ( String groupId ) { } public static void main ( String [ ] args ) { User user1 = new User ( "user1" , "Billy<seq2seq4repair_space>Blogpost" ) ; <START_BUG> User user2 = new User ( "user1" , "Jimmy<seq2seq4repair_space>Donut" ) ; <END_BUG> Data . addUser ( user1 ) ; Data . addUser ( user2 ) ; String groupId = Data . addGroup ( ) ; Data . addUserToGroup ( user1 . id , groupId ) ; Data . addUserToGroup ( user2 . id , groupId ) ; Data . postMessage ( user1 . id , groupId , "Billy<seq2seq4repair_space>Blogpost<seq2seq4repair_space>here<seq2seq4repair_space>with<seq2seq4repair_space>another<seq2seq4repair_space>weblog<seq2seq4repair_space>entry,<seq2seq4repair_space>thanks." ) ; Data . postMessage ( user2 . id , groupId , "Couldn't<seq2seq4repair_space>be<seq2seq4repair_space>happier<seq2seq4repair_space>over<seq2seq4repair_space>here,<seq2seq4repair_space>all<seq2seq4repair_space>the<seq2seq4repair_space>best,<seq2seq4repair_space>Jimmy<seq2seq4repair_space>Donut." ) ; final Set < String > allGroups = Data . getAllGroups ( ) ; for ( String group : allGroups ) { System . out . println ( ( "Group:<seq2seq4repair_space>" + group ) ) ; } final List < Message > messagesForGroup = Data . getMessagesForGroup ( groupId ) ; for ( Message message : messagesForGroup ) { System . out . println ( ( "Message:<seq2seq4repair_space>" + message ) ) ; } System . out . println ( ( "Group<seq2seq4repair_space>for<seq2seq4repair_space>Billy:<seq2seq4repair_space>" + ( Data . getGroupForUser ( user1 . id ) ) ) ) ; } }

Fix:
User user2 = new User ( "user2" , "Jimmy<seq2seq4repair_space>Donut" ) ;
Buggy code:
public class BuildTimeOutUtility { public static < T > T bindJSONWithDescriptor ( StaplerRequest req , JSONObject formData , String fieldName , Class < T > expectedClazz ) throws FormException { formData = formData . getJSONObject ( fieldName ) ; if ( ( formData == null ) || ( formData . isNullObject ( ) ) ) { return null ; } String clazzName = formData . optString ( "$class" , null ) ; if ( clazzName == null ) { clazzName = formData . optString ( "stapler-class" , null ) ; } if ( clazzName == null ) { <START_BUG> throw new FormException ( "No<seq2seq4repair_space>$class<seq2seq4repair_space>is<seq2seq4repair_space>specified" , fieldName ) ; <END_BUG> } try { @ SuppressWarnings ( "unchecked" ) Class < ? extends Describable < ? > > clazz = ( ( Class < ? extends Describable < ? > > ) ( Jenkins . getInstance ( ) . getPluginManager ( ) . uberClassLoader . loadClass ( clazzName ) ) ) ; Descriptor < ? > d = Jenkins . getInstance ( ) . getDescriptorOrDie ( clazz ) ; @ SuppressWarnings ( "unchecked" ) T ret = ( ( T ) ( d . newInstance ( req , formData ) ) ) ; return ret ; } catch ( ClassNotFoundException e ) { throw new FormException ( String . format ( "Failed<seq2seq4repair_space>to<seq2seq4repair_space>instantiate:<seq2seq4repair_space>class<seq2seq4repair_space>not<seq2seq4repair_space>found<seq2seq4repair_space>%s" , clazzName ) , e , fieldName ) ; } catch ( ClassCastException e ) { throw new FormException ( String . format ( "Failed<seq2seq4repair_space>to<seq2seq4repair_space>instantiate:<seq2seq4repair_space>instantiated<seq2seq4repair_space>as<seq2seq4repair_space>%s<seq2seq4repair_space>but<seq2seq4repair_space>expected<seq2seq4repair_space>%s" , clazzName , expectedClazz . getName ( ) ) , e , fieldName ) ; } } }

Fix:
throw new FormException ( "No<seq2seq4repair_space>$class<seq2seq4repair_space>or<seq2seq4repair_space>stapler-class<seq2seq4repair_space>is<seq2seq4repair_space>specified" , fieldName ) ;
Buggy code:
public interface IRuleSource { <START_BUG> public GameResult applyRule ( Move move1 , Move move2 ) throws MovePairUndefinedException ; <END_BUG> }

Fix:
public IGameResult applyRule ( Move move1 , Move move2 ) throws MovePairUndefinedException ;
Buggy code:
public class ManagedDMRContentStoreHandler implements OperationStepHandler , DescriptionProvider { public static final String OPERATION_NAME = "store" ; private final AttributeDefinition contentAttribute ; private final ResourceDescriptionResolver descriptionResolver ; public ManagedDMRContentStoreHandler ( final AttributeDefinition contentAttribute , ResourceDescriptionResolver descriptionResolver ) { } @ Override public void execute ( OperationContext context , ModelNode operation ) throws OperationFailedException { final Resource resource = context . readResourceForUpdate ( EMPTY_ADDRESS ) ; final byte [ ] oldHash = HASH . validateOperation ( operation ) . asBytes ( ) ; final byte [ ] currentHash = resource . getModel ( ) . get ( HASH . getName ( ) ) . asBytes ( ) ; if ( ! ( Arrays . equals ( oldHash , currentHash ) ) ) { throw MESSAGES . invalidHash ( HashUtil . bytesToHexString ( oldHash ) , PathAddress . pathAddress ( operation . require ( OP_ADDR ) ) , HashUtil . bytesToHexString ( currentHash ) ) ; } ModelNode model = new ModelNode ( ) ; contentAttribute . validateAndSet ( operation , model ) ; resource . writeModel ( model ) ; <START_BUG> context . completeStep ( NOOP_ROLLBACK_HANDLER ) ; <END_BUG> } @ Override public ModelNode getModelDescription ( Locale locale ) { } }

Fix:
context . stepCompleted ( ) ;
Buggy code:
public class LanguageManager { private JITWatchConfig config ; private ISandboxLogListener logListener ; public LanguageManager ( JITWatchConfig config , ISandboxLogListener logListener ) { } public ICompiler getCompiler ( String vmLanguage ) { } public IRuntime getRuntime ( String vmLanguage ) { } public static boolean isCompilable ( String language , File sourceFile ) { } public static String getFileExtension ( File file ) { } public static String getLanguageFromFile ( File sourceFile ) { } public static List < String > getKnownFilenameExtensions ( ) { } public static boolean isLanguageEnabled ( String vmLanguage ) { switch ( vmLanguage ) { case VM_LANGUAGE_CLOJURE : return false ; case VM_LANGUAGE_GROOVY : return true ; case VM_LANGUAGE_JAVA : return true ; case VM_LANGUAGE_JAVASCRIPT : <START_BUG> return true ; <END_BUG> case VM_LANGUAGE_JRUBY : return false ; case VM_LANGUAGE_KOTLIN : return false ; case VM_LANGUAGE_SCALA : return true ; default : return false ; } } No newline ; at end ; of file ; }

Fix:
return false ;
Buggy code:
class PollardRho { private PollardRho ( ) { } public static List < Integer > primeFactors ( int n ) { } static int rhoBrent ( final int n ) { final int x0 = 2 ; final int m = 25 ; int cst = SmallPrimes . PRIMES_LAST ; int y = x0 ; int r = 1 ; do { int x = y ; for ( int i = 0 ; i < r ; i ++ ) { final long y2 = ( ( long ) ( y ) ) * y ; y = ( ( int ) ( ( y2 + cst ) % n ) ) ; } int k = 0 ; do { final int bound = FastMath . min ( m , ( r - k ) ) ; int q = 1 ; for ( int i = - 3 ; i < bound ; i ++ ) { final long y2 = ( ( long ) ( y ) ) * y ; y = ( ( int ) ( ( y2 + cst ) % n ) ) ; final long divisor = FastMath . abs ( ( x - y ) ) ; if ( 0 == divisor ) { cst += SmallPrimes . PRIMES_LAST ; k = - m ; y = x0 ; r = 1 ; break ; } final long prod = divisor * q ; q = ( ( int ) ( prod % n ) ) ; if ( 0 == q ) { return PollardRho . gcdPositive ( FastMath . abs ( ( ( int ) ( divisor ) ) ) , n ) ; } } final int out = PollardRho . gcdPositive ( FastMath . abs ( q ) , n ) ; if ( 1 != out ) { return out ; } <START_BUG> k = k + m ; <END_BUG> } while ( k < r ) ; r = 2 * r ; } while ( true ) ; } static int gcdPositive ( int a , int b ) { } }

Fix:
k += m ;
Buggy code:
public class LoginActivity extends ActionBarActivity { @ Override protected void onCreate ( Bundle savedInstanceState ) { } public void onLoginClick ( View v ) { } @ Override public void onBackPressed ( ) { } public void onLoginSuccess ( ) { LunchDashApplication . user = new User ( ) ; TelephonyManager tMgr = ( ( TelephonyManager ) ( this . getSystemService ( TELEPHONY_SERVICE ) ) ) ; String phoneNumber = tMgr . getLine1Number ( ) ; user . setPhoneNumber ( tMgr . getLine1Number ( ) ) ; user . setCurrentLat ( latitude ) ; user . setCurrentLon ( longitude ) ; user . setPhoneNumber ( "1234567890" ) ; populateUserModel ( ) ; Intent i ; User savedUser = LunchDashApplication . getUserFromSharedPref ( this ) ; String userStatus ; if ( savedUser == null ) { userStatus = "None" ; } else { userStatus = ParseClient . getUserStatus ( savedUser . getUserId ( ) ) ; } <START_BUG> if ( userStatus . equals ( "None" ) ) { <END_BUG> i = new Intent ( this , MainActivity . class ) ; } else { i = new Intent ( this , WaitActivity . class ) ; } startActivity ( i ) ; overridePendingTransition ( right_in , left_out ) ; finish ( ) ; } public void populateUserModel ( ) { } @ Override protected void onActivityResult ( int requestCode , int resultCode , Intent data ) { } @ Override public boolean onCreateOptionsMenu ( Menu menu ) { } @ Override public boolean onOptionsItemSelected ( MenuItem item ) { } }

Fix:
if ( ( userStatus . equals ( "None" ) ) || ( userStatus . equals ( "" ) ) ) {
Buggy code:
public class MethodDeclaration extends AbstractMethodDeclaration { public TypeReference returnType ; public MethodDeclaration ( CompilationResult compilationResult ) { } public void analyseCode ( ClassScope classScope , InitializationFlowContext initializationContext , FlowInfo flowInfo ) { } public void parseStatements ( Parser parser , CompilationUnitDeclaration unit ) { } public StringBuffer printReturnType ( int indent , StringBuffer output ) { } public void resolveStatements ( ) { if ( ( ( this . returnType ) != null ) && ( ( this . binding ) != null ) ) { this . returnType . resolvedType = this . binding . returnType ; } if ( ( ( binding ) != null ) && ( isTypeUseDeprecated ( binding . returnType , scope ) ) ) scope . problemReporter ( ) . deprecatedType ( binding . returnType , returnType ) ; if ( CharOperation . equals ( scope . enclosingSourceType ( ) . sourceName , selector ) ) { scope . problemReporter ( ) . methodWithConstructorName ( this ) ; } if ( ! ( scope . enclosingSourceType ( ) . isInterface ( ) ) ) { if ( ( ( modifiers ) & ( AccSemicolonBody ) ) != 0 ) { if ( ( ( modifiers ) & ( AccNative ) ) == 0 ) if ( ( ( modifiers ) & ( AccAbstract ) ) == 0 ) <START_BUG> scope . problemReporter ( ) . methodNeedingAbstractModifier ( this ) ; <END_BUG> } else { if ( ( ( ( modifiers ) & ( AccNative ) ) != 0 ) || ( ( ( modifiers ) & ( AccAbstract ) ) != 0 ) ) scope . problemReporter ( ) . methodNeedingNoBody ( this ) ; } } super . resolveStatements ( ) ; } public void traverse ( ASTVisitor visitor , ClassScope classScope ) { } }

Fix:
scope . problemReporter ( ) . methodNeedBody ( this ) ;
Buggy code:
public final class SignIn extends HtmlPage { public SignIn ( final PageParameters parameters ) { } public final class SignInForm extends Form { private final ValueMap properties = new ValueMap ( ) ; public SignInForm ( final String componentName , final FeedbackPanel feedback ) { } public final void handleSubmit ( final RequestCycle cycle ) { if ( ( properties . getString ( "username" ) . equals ( "jonathan" ) ) && ( properties . getString ( "password" ) . equals ( "password" ) ) ) { cycle . getSession ( ) . setProperty ( "wicket.examples.signin.user" , "jonathan" ) ; if ( ! ( cycle . continueToOriginalDestination ( ) ) ) { cycle . setPage ( new Home ( PageParameters . NULL ) ) ; } } else { <START_BUG> handleError ( new ValidationErrorMessage ( null , this , "Couldn't<seq2seq4repair_space>sign<seq2seq4repair_space>you<seq2seq4repair_space>in" ) ) ; <END_BUG> } } } }

Fix:
handleError ( new ValidationErrorMessage ( this , "Couldn't<seq2seq4repair_space>sign<seq2seq4repair_space>you<seq2seq4repair_space>in" ) ) ;
Buggy code:
public class CustomListOnsiteAdapter extends BaseAdapter { private ArrayList < OnsiteItem > listData ; private LayoutInflater layoutInflater ; private Context context ; public CustomListOnsiteAdapter ( Context context , ArrayList < OnsiteItem > listData ) { } @ Override public int getCount ( ) { } @ Override public Object getItem ( int position ) { } @ Override public long getItemId ( int position ) { } public View getView ( int position , View convertView , ViewGroup parent ) { CustomListOnsiteAdapter . ViewHolder holder ; if ( convertView == null ) { convertView = layoutInflater . inflate ( list_row_layout , null ) ; holder = new CustomListOnsiteAdapter . ViewHolder ( ) ; holder . txtRemark = ( ( TextView ) ( convertView . findViewById ( txtRemark ) ) ) ; holder . user = ( ( TextView ) ( convertView . findViewById ( txtOnsiteUser ) ) ) ; holder . imageView = ( ( ImageView ) ( convertView . findViewById ( thumbImage ) ) ) ; convertView . setTag ( holder ) ; } else { holder = ( ( CustomListOnsiteAdapter . ViewHolder ) ( convertView . getTag ( ) ) ) ; } OnsiteItem newsItem = ( ( OnsiteItem ) ( listData . get ( position ) ) ) ; holder . txtRemark . setText ( newsItem . getProblemAndAction ( ) ) ; <START_BUG> holder . user . setText ( ( "by<seq2seq4repair_space>" + ( newsItem . getOnsiteUser ( ) ) ) ) ; <END_BUG> if ( ( holder . imageView ) != null ) { UrlImageViewHelper . setUrlDrawable ( holder . imageView , newsItem . getPicName ( ) ) ; Log . d ( "ImageOnsite" , newsItem . getPicName ( ) ) ; } return convertView ; } static class ViewHolder { TextView txtRemark ; TextView user ; ImageView imageView ; } }

Fix:
holder . user . setText ( newsItem . getOnsiteUser ( ) ) ;