nus-yam/ex-repair huggingface dataset:
Buggy code:
@ SupportedAnnotationTypes ( "com.hazelcast.annotation.GenerateCodec" ) @ SupportedSourceVersion ( SourceVersion . RELEASE_6 ) public class CodecCodeGenerator extends AbstractProcessor { private Filer filer ; private Elements elementUtils ; private Messager messager ; private Map < Lang , Template > codecTemplateMap = new HashMap < Lang , Template > ( ) ; private Map < Lang , Template > messageTypeTemplateMap = new HashMap < Lang , Template > ( ) ; private Map < TypeElement , Map < String , ExecutableElement > > requestMap = new HashMap < TypeElement , Map < String , ExecutableElement > > ( ) ; private Map < Integer , ExecutableElement > responseMap = new HashMap < Integer , ExecutableElement > ( ) ; private Map < Integer , ExecutableElement > eventResponseMap = new HashMap < Integer , ExecutableElement > ( ) ; @ Override public void init ( ProcessingEnvironment env ) { } @ Override public boolean process ( Set < ? extends TypeElement > elements , RoundEnvironment env ) { } public void generateContent ( Lang lang ) { } public void register ( TypeElement classElement ) { } private Map < TypeElement , Map < String , CodecModel > > createAllCodecModel ( Lang lang ) { Map < TypeElement , Map < String , CodecModel > > model = new HashMap < TypeElement , Map < String , CodecModel > > ( ) ; for ( Map . Entry < TypeElement , Map < String , ExecutableElement > > entry : requestMap . entrySet ( ) ) { HashMap < String , CodecModel > map = new HashMap < String , CodecModel > ( ) ; TypeElement parent = entry . getKey ( ) ; model . put ( parent , map ) ; for ( Map . Entry < String , ExecutableElement > entrySub : entry . getValue ( ) . entrySet ( ) ) { ExecutableElement methodElement = entrySub . getValue ( ) ; CodecModel codecModel = createCodecModel ( methodElement , lang ) ; <START_BUG> codecModel . commment = elementUtils . getDocComment ( methodElement ) ; <END_BUG> map . put ( entrySub . getKey ( ) , codecModel ) ; } } return model ; } private CodecModel createCodecModel ( ExecutableElement methodElement , Lang lang ) { } public void generateCodec ( CodecModel codecModel , Template codecTemplate ) { } public void generateDoc ( Object model , Template codecTemplate ) { } private void generateMessageTypeEnum ( TypeElement classElement , Lang lang , Template messageTypeTemplate ) { } private String generateFromTemplate ( Template template , Object model ) { } private void saveContent ( Model codecModel , String content ) { } private void saveClass ( String packageName , String className , String content ) { } private void saveFile ( String fileName , String packageName , String content ) { } public static void setUtilModel ( Map modelMap ) throws TemplateModelException { } }

Fix:
codecModel . comment = elementUtils . getDocComment ( methodElement ) ;
Buggy code:
public class FieldReference extends Reference implements InvocationSite { public Expression receiver ; public char [ ] token ; public FieldBinding binding ; public FieldBinding codegenBinding ; public long nameSourcePosition ; MethodBinding syntheticReadAccessor ; MethodBinding syntheticWriteAccessor ; public TypeBinding receiverType ; public FieldReference ( char [ ] source , long pos ) { } public FlowInfo analyseAssignment ( BlockScope currentScope , FlowContext flowContext , FlowInfo flowInfo , Assignment assignment , boolean isCompound ) { } public FlowInfo analyseCode ( BlockScope currentScope , FlowContext flowContext , FlowInfo flowInfo ) { } public FlowInfo analyseCode ( BlockScope currentScope , FlowContext flowContext , FlowInfo flowInfo , boolean valueRequired ) { } public FieldBinding fieldBinding ( ) { } public void generateAssignment ( BlockScope currentScope , CodeStream codeStream , Assignment assignment , boolean valueRequired ) { } public void generateCode ( BlockScope currentScope , CodeStream codeStream , boolean valueRequired ) { } public void generateCompoundAssignment ( BlockScope currentScope , CodeStream codeStream , Expression expression , int operator , int assignmentImplicitConversion , boolean valueRequired ) { } public void generatePostIncrement ( BlockScope currentScope , CodeStream codeStream , CompoundAssignment postIncrement , boolean valueRequired ) { } public static final Constant getConstantFor ( FieldBinding binding , boolean implicitReceiver , Reference reference , Scope referenceScope , int indexInQualification ) { } public boolean isSuperAccess ( ) { } public boolean isTypeAccess ( ) { } public void manageSyntheticReadAccessIfNecessary ( BlockScope currentScope ) { } public void manageSyntheticWriteAccessIfNecessary ( BlockScope currentScope ) { } public TypeBinding resolveType ( BlockScope scope ) { this . receiverType = receiver . resolveType ( scope ) ; if ( ( this . receiverType ) == null ) { constant = NotAConstant ; return null ; } this . codegenBinding = this . binding = scope . getField ( this . receiverType , token , this ) ; if ( ! ( binding . isValidBinding ( ) ) ) { constant = NotAConstant ; scope . problemReporter ( ) . invalidField ( this , this . receiverType ) ; return null ; } if ( isFieldUseDeprecated ( binding , scope ) ) scope . problemReporter ( ) . deprecatedField ( binding , this ) ; constant = FieldReference . getConstantFor ( binding , ( ( receiver ) == ( ThisImplicit ) ) , this , scope , 0 ) ; <START_BUG> if ( ! ( receiver . isThis ( ) ) ) <END_BUG> constant = NotAConstant ; return binding . type ; } public void setActualReceiverType ( ReferenceBinding receiverType ) { } public void setDepth ( int depth ) { } public void setFieldIndex ( int index ) { } public String toStringExpression ( ) { } public void traverse ( IAbstractSyntaxTreeVisitor visitor , BlockScope scope ) { } }

Fix:
if ( ( receiver ) != ( ThisImplicit ) )
Buggy code:
public class NamespaceObjectFactory implements ObjectFactory { public static Reference createReference ( final String contextIdentifier ) { <START_BUG> return new Reference ( Context . class . getName ( ) , new StringRefAddr ( "nns" , contextIdentifier ) , NamespaceObjectFactory . class . getName ( ) , null ) ; <END_BUG> } public Object getObjectInstance ( Object obj , Name name , Context nameCtx , Hashtable < ? , ? > environment ) throws Exception { } }

Fix:
return ModularReference . create ( Context . class , new StringRefAddr ( "nns" , contextIdentifier ) , NamespaceObjectFactory . class ) ;
Buggy code:
public class CachingMongoPersistentProperty extends BasicMongoPersistentProperty { private Boolean isIdProperty ; private String fieldName ; public CachingMongoPersistentProperty ( Field field , PropertyDescriptor propertyDescriptor , MongoPersistentEntity < ? > owner , SimpleTypeHolder simpleTypeHolder ) { } @ Override public boolean isIdProperty ( ) { } @ Override public String getFieldName ( ) { if ( ( this . fieldName ) == null ) { this . fieldName = super . getFieldName ( ) ; } <START_BUG> return super . getFieldName ( ) ; <END_BUG> } }

Fix:
return this . fieldName ;
Buggy code:
public class CompositeFileComparatorTest extends ComparatorAbstractTestCase { public CompositeFileComparatorTest ( String name ) { } @ Override protected void setUp ( ) throws Exception { } public void testConstructorIterable ( ) { List < Comparator < File > > list = new ArrayList < Comparator < File > > ( ) ; list . add ( SizeFileComparator . SIZE_COMPARATOR ) ; list . add ( ExtensionFileComparator . EXTENSION_COMPARATOR ) ; Comparator < File > c = new CompositeFileComparator ( list ) ; <START_BUG> assertTrue ( "equal" , ( ( c . compare ( equalFile1 , equalFile2 ) ) == 0 ) ) ; <END_BUG> assertTrue ( "less" , ( ( c . compare ( lessFile , moreFile ) ) < 0 ) ) ; assertTrue ( "more" , ( ( c . compare ( moreFile , lessFile ) ) > 0 ) ) ; } public void testConstructorIterableNull ( ) { } public void testConstructorArrayNull ( ) { } }

Fix:
assertEquals ( "equal" , 0 , c . compare ( equalFile1 , equalFile2 ) ) ;
Buggy code:
public class CompletionOnSingleTypeReference extends SingleTypeReference { public CompletionOnSingleTypeReference ( char [ ] source , long pos ) { } public void aboutToResolve ( Scope scope ) { <START_BUG> getTypeBinding ( scope . parent ) ; <END_BUG> } public TypeReference copyDims ( int dim ) { } public TypeBinding getTypeBinding ( Scope scope ) { } public TypeBinding resolveTypeEnclosing ( BlockScope scope , ReferenceBinding enclosingType ) { } public String toStringExpression ( int tab ) { } }

Fix:
getTypeBinding ( scope ) ;
Buggy code:
public abstract class GenericDao < T > implements IGenericDao < T > { private Class < T > clazz ; public final void setClazz ( Class < T > clazz ) { } @ Override public void delete ( T obj ) { } @ Override public void persist ( T obj ) { } @ Override public void update ( T obj ) { } @ Override public T find ( UUID id ) { T entity = null ; Session session = HibernateUtil . getSessionFactory ( ) . openSession ( ) ; try { session . beginTransaction ( ) ; <START_BUG> entity = session . load ( clazz , id ) ; <END_BUG> session . getTransaction ( ) . commit ( ) ; } catch ( HibernateException e ) { e . printStackTrace ( ) ; } finally { session . close ( ) ; } return entity ; } @ SuppressWarnings ( "unchecked" ) @ Override public List < T > findAll ( ) { } @ SuppressWarnings ( "unchecked" ) @ Override public List < T > findMany ( Query query ) { } @ SuppressWarnings ( "unchecked" ) @ Override public T findOne ( Query query ) { } protected final Session getCurrentSession ( ) { } }

Fix:
entity = session . get ( clazz , id ) ;
Buggy code:
public class Troy extends Instrumentation { static final String tag = Troy . class . getPackage ( ) . getName ( ) ; Intent aut = null ; String actName = null ; @ Override public void onCreate ( Bundle arg ) { } static Solo solo ; @ Override public void onStart ( ) { super . onStart ( ) ; Activity act = startActivitySync ( aut ) ; Troy . solo = new Solo ( this , act ) ; Troy . solo . getCurrentActivity ( ) ; <START_BUG> getContext ( ) . registerReceiver ( r , new android . content . IntentFilter ( Intent . ACTION_RUN ) ) ; <END_BUG> KeyguardManager km = ( ( KeyguardManager ) ( getContext ( ) . getSystemService ( KEYGUARD_SERVICE ) ) ) ; km . newKeyguardLock ( Troy . tag ) . disableKeyguard ( ) ; Log . i ( Troy . tag , actName ) ; while ( true ) { try { Thread . sleep ( 20742 ) ; } catch ( InterruptedException e ) { Log . e ( Troy . tag , e . toString ( ) ) ; } } } @ Override public void onDestroy ( ) { } enum Command { getViews , getActivities , back , down , up , menu , edit , clear , search , checked , click , clickLong , clickOn , clickIdx , clickImg , clickItem , drag , finish ; } private BroadcastReceiver r = new BroadcastReceiver ( ) { class Coordinates { public float x ; public float y ; Coordinates ( String x , String y ) { } } private String getWhat ( Intent intent ) { } private int getIdx ( Intent intent ) { } private int getItem ( Intent intent ) { } private Coordinates getCoordinate ( Intent intent , String key ) { } @ Override public void onReceive ( Context context , final Intent intent ) { } } ; private void getViews ( ) { } private void getActivities ( ) { } private void back ( ) { } private boolean scrollable ( ) { } private boolean checkScrollable ( ) { } private void down ( ) { } private void up ( ) { } private void menu ( ) { } private void edit ( int idx , String target ) { } private void clear ( String target ) { } private void search ( String target ) { } private void checked ( String target ) { } private void click ( String target , boolean isLong ) { } private void clickOn ( float x , float y ) { } private void clickIdx ( int idx ) { } private void clickImg ( int idx ) { } private void clickItem ( int idx , int item ) { } private void drag ( float x1 , float x2 , float y1 , float y2 ) { } private void tearDown ( ) { } }

Fix:
act . registerReceiver ( r , new android . content . IntentFilter ( Intent . ACTION_RUN ) ) ;
Buggy code:
public class DriverRegistryImpl implements DriverRegistry { private Map < String , InstalledDriver > drivers = new HashMap < String , InstalledDriver > ( ) ; @ Override public void registerInstalledDriver ( InstalledDriver driver ) throws IllegalArgumentException { } @ Override public void unregisterInstalledDriver ( InstalledDriver driver ) { if ( driver == null ) throw new IllegalArgumentException ( ConnectorMessages . MESSAGES . nullVar ( "driver" ) ) ; ConnectorLogger . DEPLOYMENT_CONNECTOR_REGISTRY_LOGGER . tracef ( "Removing<seq2seq4repair_space>deployment:<seq2seq4repair_space>%s" , driver ) ; synchronized ( drivers ) { <START_BUG> drivers . put ( driver . getDriverName ( ) , driver ) ; <END_BUG> } } @ Override public Set < InstalledDriver > getInstalledDrivers ( ) { } @ Override public InstalledDriver getInstalledDriver ( String name ) { } }

Fix:
drivers . remove ( driver . getDriverName ( ) ) ;
Buggy code:
@ Component public class SurveyRepositoryImpl implements SurveyRepositoryCustom { @ PersistenceContext protected EntityManager em ; @ Override public PagedResponse < SurveyEntity > findByCriteria ( SurveyCriteria criteria ) { String observer = JPAUtils . appendWildcard ( criteria . getObserver ( ) ) ; String locationId = JPAUtils . appendWildcard ( criteria . getLocationId ( ) ) ; String surveyCriteria = JPAUtils . appendWildcard ( criteria . getSurveyCriteria ( ) ) ; QSurveyEntity surveyEntity = QSurveyEntity . surveyEntity ; JPAQuery query = new JPAQuery ( em ) . from ( surveyEntity ) ; if ( observer != null ) { query . where ( surveyEntity . observer . like ( observer ) ) ; } if ( locationId != null ) { query . where ( surveyEntity . locationId . like ( locationId ) ) ; } if ( surveyCriteria != null ) { query . where ( surveyEntity . observer . like ( surveyCriteria ) . or ( surveyEntity . locationId . like ( surveyCriteria ) ) ) ; } <START_BUG> query . orderBy ( surveyEntity . locationId . asc ( ) , surveyEntity . observer . asc ( ) ) ; <END_BUG> PagedResponse < SurveyEntity > response = JPAUtils . listResults ( query , criteria , surveyEntity ) ; return response ; } }

Fix:
query . orderBy ( surveyEntity . receivedD . asc ( ) ) ;
Buggy code:
public class ChecksumTest extends BuildFileTest { public ChecksumTest ( String name ) { } public void setUp ( ) { } public void tearDown ( ) { } public void testCreateMd5 ( ) throws IOException { FileUtils fileUtils = FileUtils . newFileUtils ( ) ; executeTarget ( "createMd5" ) ; <START_BUG> assertTrue ( fileUtils . contentEquals ( project . resolveFile ( "expected//asf-logo.gif.MD5" ) , project . resolveFile ( "..//asf-logo.gif.MD5" ) ) ) ; <END_BUG> } public void testSetProperty ( ) { } public void testVerifyTotal ( ) { } public void testVerifyChecksumdir ( ) { } public void testVerifyAsTask ( ) { } public void testVerifyAsCondition ( ) { } public void testVerifyFromProperty ( ) { } private void testVerify ( String target ) { } }

Fix:
assertTrue ( fileUtils . contentEquals ( project . resolveFile ( "expected//asf-logo.gif.md5" ) , project . resolveFile ( "..//asf-logo.gif.MD5" ) ) ) ;
Buggy code:
public final class NamingSubsystemAdd extends AbstractSubsystemAdd < NamingSubsystemElement > { private static final long serialVersionUID = - 3087211831484406967L ; protected NamingSubsystemAdd ( ) { } private static final Logger log = Logger . getLogger ( "org.jboss.as.naming" ) ; protected < P > void applyUpdate ( final UpdateContext updateContext , final UpdateResultHandler < ? super Void , P > resultHandler , final P param ) { NamingSubsystemAdd . log . info ( "Activating<seq2seq4repair_space>Naming<seq2seq4repair_space>Subsystem" ) ; NamingContext . initializeNamingManager ( ) ; <START_BUG> final BatchBuilder builder = updateContext . getBatchBuilder ( ) ; <END_BUG> builder . addService ( SERVICE_NAME , new NamingService ( true ) ) . install ( ) ; final JavaContextService javaContextService = new JavaContextService ( ) ; builder . addService ( JavaContextService . SERVICE_NAME , javaContextService ) . addDependency ( SERVICE_NAME ) . install ( ) ; final ContextService globalContextService = new ContextService ( "global" ) ; builder . addService ( JavaContextService . SERVICE_NAME . append ( "global" ) , globalContextService ) . addDependency ( JavaContextService . SERVICE_NAME , Context . class , globalContextService . getParentContextInjector ( ) ) . install ( ) ; NamingSubsystemAdd . addContextFactory ( builder , "app" ) ; NamingSubsystemAdd . addContextFactory ( builder , "module" ) ; NamingSubsystemAdd . addContextFactory ( builder , "comp" ) ; final JndiView jndiView = new JndiView ( ) ; builder . addService ( JBOSS . append ( "naming" , "jndi" , "view" ) , jndiView ) . addOptionalDependency ( JBOSS . append ( "mbean" , "server" ) , MBeanServer . class , jndiView . getMBeanServerInjector ( ) ) . install ( ) ; } protected NamingSubsystemElement createSubsystemElement ( ) { } private static void addContextFactory ( final BatchBuilder builder , final String contextName ) { } }

Fix:
final BatchBuilder builder = updateContext . getServiceTarget ( ) ;
Buggy code:
public class PropertySetter { protected Object obj ; protected PropertyDescriptor [ ] props ; public PropertySetter ( Object obj ) { } protected void introspect ( ) { } public static void setProperties ( Object obj , Properties properties , String prefix ) { } public void setProperties ( Properties properties , String prefix ) { int len = prefix . length ( ) ; <START_BUG> for ( Enumeration e = properties . keys ( ) ; e . hasMoreElements ( ) ; ) { <END_BUG> String key = ( ( String ) ( e . nextElement ( ) ) ) ; if ( key . startsWith ( prefix ) ) { if ( ( key . indexOf ( '.' , ( len + 1 ) ) ) > 0 ) { continue ; } String value = OptionConverter . findAndSubst ( key , properties ) ; key = key . substring ( len ) ; if ( ( "layout" . equals ( key ) ) && ( ( obj ) instanceof Appender ) ) { continue ; } setProperty ( key , value ) ; } } activate ( ) ; } public void setProperty ( String name , String value ) { } public void setProperty ( PropertyDescriptor prop , String name , String value ) throws PropertySetterException { } protected Object convertArg ( String val , Class type ) { } protected PropertyDescriptor getPropertyDescriptor ( String name ) { } public void activate ( ) { } }

Fix:
for ( Enumeration e = properties . propertyNames ( ) ; e . hasMoreElements ( ) ; ) {
Buggy code:
public class ExecutionSelect extends AQLTest { public ExecutionSelect ( ) { } @ Test public void testSelectOnCluster ( ) throws Exception { System . out . println ( "-----<seq2seq4repair_space>testSelectOnCluster<seq2seq4repair_space>-----" ) ; <START_BUG> testFileExecution ( "SelectPK.aql" ) ; <END_BUG> } }

Fix:
testFileExecution ( "Select.aql" ) ;
Buggy code:
public class AddressbookAction extends FrameAction { public AddressbookAction ( ComposerController composerController ) { } public void actionPerformed ( ActionEvent evt ) { <START_BUG> ComposerController composerController = ( ( ComposerController ) ( getFrameController ( ) ) ) ; <END_BUG> composerController . getHeaderController ( ) . cleanupHeaderItemList ( ) ; SelectAddressDialog dialog = new SelectAddressDialog ( composerController . getView ( ) , composerController . getHeaderController ( ) . getHeaderItemLists ( ) ) ; Folder folder = ( ( Folder ) ( addressbookTreeModel . getFolder ( 101 ) ) ) ; dialog . setHeaderList ( folder . getHeaderItemList ( ) ) ; dialog . setVisible ( true ) ; composerController . getHeaderController ( ) . setHeaderItemLists ( dialog . getHeaderItemLists ( ) ) ; } }

Fix:
ComposerController composerController = ( ( ComposerController ) ( getFrameMediator ( ) ) ) ;
Buggy code:
public class ActivationWriteHandlerTestCase { @ Test public void testHandlerLazy ( ) throws Exception { ModelNode targetNode = new ModelNode ( ) ; targetNode . get ( ACTIVATION ) . set ( "eager" ) ; OperationContext context = Mockito . mock ( OperationContext . class ) ; Resource resource = Mockito . mock ( Resource . class ) ; Mockito . when ( resource . getModel ( ) ) . thenReturn ( targetNode ) ; Mockito . when ( context . readResourceForUpdate ( EMPTY_ADDRESS ) ) . thenReturn ( resource ) ; ModelNode operation = new ModelNode ( ) ; operation . get ( VALUE ) . set ( LAZY . toString ( ) . toLowerCase ( Locale . ENGLISH ) ) ; INSTANCE . execute ( context , operation ) ; <START_BUG> Mockito . verify ( context ) . completeStep ( ) ; <END_BUG> Assert . assertEquals ( LAZY . toString ( ) . toLowerCase ( ) , targetNode . get ( ACTIVATION ) . asString ( ) ) ; } }

Fix:
Mockito . verify ( context ) . completeStep ( NOOP_ROLLBACK_HANDLER ) ;
Buggy code:
public class TestCacheModeEmpty extends AbstractCacheModeTestCase { private static OpenJPAEntityManagerFactorySPI emf = null ; private static Cache cache = null ; private static List < String > sql = new ArrayList < String > ( ) ; private static JDBCListener listener ; private static Class < ? > [ ] expectedInCache = persistentTypes ; private static Class < ? > [ ] expectedNotInCache = new Class < ? > [ ] { } ; @ Override public OpenJPAEntityManagerFactorySPI getEntityManagerFactory ( ) { if ( ( TestCacheModeEmpty . emf ) == null ) { <START_BUG> TestCacheModeEmpty . emf = createEntityManagerFactory ( "cache-mode-empty" ) ; <END_BUG> assertNotNull ( TestCacheModeEmpty . emf ) ; TestCacheModeEmpty . cache = TestCacheModeEmpty . emf . getCache ( ) ; assertNotNull ( TestCacheModeEmpty . cache ) ; } return TestCacheModeEmpty . emf ; } public JDBCListener getListener ( ) { } public List < String > getSql ( ) { } public void testCacheables ( ) { } public void testUncacheables ( ) { } public void testUnspecified ( ) { } @ Override protected Class < ? > [ ] getExpectedInCache ( ) { } @ Override protected Class < ? > [ ] getExpectedNotInCache ( ) { } }

Fix:
TestCacheModeEmpty . emf = createEntityManagerFactory ( "cache-mode-empty" , null ) ;
Buggy code:
public class BatchImageBuilder extends AbstractImageBuilder { protected BatchImageBuilder ( JavaBuilder javaBuilder ) { } public void build ( ) { } protected void addAllSourceFiles ( final ArrayList sourceFiles ) throws CoreException { } protected void cleanOutputFolders ( ) throws CoreException { } protected void copyExtraResourcesBack ( ClasspathMultiDirectory sourceLocation , final boolean deletedAll ) throws CoreException { notifier . subTask ( Util . bind ( "build.copyingResources" ) ) ; final int segmentCount = sourceLocation . sourceFolder . getFullPath ( ) . segmentCount ( ) ; final char [ ] [ ] exclusionPatterns = sourceLocation . exclusionPatterns ; final IContainer outputFolder = sourceLocation . binaryFolder ; final boolean isAlsoProject = sourceLocation . sourceFolder . equals ( javaBuilder . currentProject ) ; sourceLocation . sourceFolder . accept ( new IResourceProxyVisitor ( ) { public boolean visit ( IResourceProxy proxy ) throws CoreException { IResource resource = null ; switch ( proxy . getType ( ) ) { case IResource . FILE : if ( ( Util . isJavaFileName ( proxy . getName ( ) ) ) || ( Util . isClassFileName ( proxy . getName ( ) ) ) ) return false ; resource = proxy . requestResource ( ) ; if ( javaBuilder . filterExtraResource ( resource ) ) return false ; if ( ( exclusionPatterns != null ) && ( Util . isExcluded ( resource , exclusionPatterns ) ) ) return false ; IPath partialPath = resource . getFullPath ( ) . removeFirstSegments ( segmentCount ) ; IResource copiedResource = outputFolder . getFile ( partialPath ) ; if ( copiedResource . exists ( ) ) { if ( deletedAll ) { IResource originalResource = findOriginalResource ( partialPath ) ; String id = originalResource . getFullPath ( ) . removeFirstSegments ( 1 ) . toString ( ) ; <START_BUG> createErrorFor ( resource , Util . bind ( "build.duplicateResource" , id ) ) ; <END_BUG> return false ; } copiedResource . delete ( IResource . FORCE , null ) ; } resource . copy ( copiedResource . getFullPath ( ) , IResource . FORCE , null ) ; copiedResource . setDerived ( true ) ; return false ; case IResource . FOLDER : resource = proxy . requestResource ( ) ; if ( javaBuilder . filterExtraResource ( resource ) ) return false ; if ( ( exclusionPatterns != null ) && ( Util . isExcluded ( resource , exclusionPatterns ) ) ) return false ; IPath folderPath = resource . getFullPath ( ) ; if ( isAlsoProject && ( isExcludedFromProject ( folderPath ) ) ) return false ; createFolder ( folderPath . removeFirstSegments ( segmentCount ) , outputFolder ) ; } return true ; } } , IResource . NONE ) ; } protected void copyPackages ( ClasspathMultiDirectory sourceLocation ) throws CoreException { } protected IResource findOriginalResource ( IPath partialPath ) { } public String toString ( ) { } }

Fix:
createProblemFor ( resource , Util . bind ( "build.duplicateResource" , id ) , javaBuilder . javaProject . getOption ( JavaCore . CORE_JAVA_BUILD_DUPLICATE_RESOURCE , true ) ) ;
Buggy code:
@ Component public class CollectorJob { private static final long TOO_OLD_MINUTES = ( ( 7 * 24 ) * 60 ) * ( IServerConstants . ONE_MINUTE ) ; protected static Logger logger = LoggerFactory . getLogger ( CollectorJob . class ) ; @ Autowired private IStationPersistence stationPersistence = null ; @ Autowired private IParameterPersistence parameterPersistence = null ; @ Autowired private IObservationPersistence observationPersistence = null ; @ Autowired private IStationPlugin stationPlugin = null ; @ Scheduled ( fixedRate = IServerConstants . COLLECTION_POLLING_TIME ) public synchronized void timeout ( ) { } @ Transactional ( propagation = Propagation . REQUIRED ) public List < Observation > collect ( ) { } @ Transactional ( propagation = Propagation . REQUIRED ) private boolean collect ( Station station , Date nextObservationPeriod , Map < String , String > configuredParameters , ICollector collector , IParser parser , List < Observation > result ) { } private void store ( List < Observation > observations ) { } private List < Observation > toObservations ( List < RawObservation > parseBlock , Station station , Date now ) { } private Observation toObservation ( RawObservation rawObservation , Station station , Date now ) { } private Variable findByAcronyn ( String acronym , Set < Variable > variables ) { for ( Variable variable : variables ) { if ( variable . getAcronym ( ) . equalsIgnoreCase ( acronym ) ) { return variable ; } } <START_BUG> throw new RuntimeException ( String . format ( "Variable<seq2seq4repair_space>'%'<seq2seq4repair_space>not<seq2seq4repair_space>found<seq2seq4repair_space>in<seq2seq4repair_space>the<seq2seq4repair_space>station" , acronym ) ) ; <END_BUG> } private Date getNextObservationPeriod ( Station station ) { } private boolean isTooOld ( Date lastCollectedPeriod ) { } private Map < String , String > asMap ( Set < Parameter > parameters ) { } }

Fix:
throw new RuntimeException ( String . format ( "Variable<seq2seq4repair_space>'%s'<seq2seq4repair_space>not<seq2seq4repair_space>found<seq2seq4repair_space>in<seq2seq4repair_space>the<seq2seq4repair_space>station" , acronym ) ) ;
Buggy code:
public class Ru implements org . luwrain . app . commander . Strings { @ Override public String appName ( ) { } @ Override public String leftPanel ( ) { } @ Override public String rightPanel ( ) { } @ Override public String operationsAreaName ( ) { } @ Override public String copyPopupName ( ) { } @ Override public String copyPopupPrefix ( File [ ] files ) { } @ Override public String copyOperationName ( File [ ] filesToCopy , File copyTo ) { } @ Override public String movePopupName ( ) { } @ Override public String movePopupPrefix ( File [ ] files ) { } @ Override public String mkdirPopupName ( ) { } @ Override public String mkdirPopupPrefix ( ) { } @ Override public String delPopupName ( ) { } @ Override public String delPopupPrefix ( File [ ] files ) { } @ Override public String operationCompletedMessage ( Operation op ) { } @ Override public String operationFinishDescr ( Operation op ) { switch ( op . getFinishCode ( ) ) { case Operation . OK : <START_BUG> return ( op . getOperationName ( ) ) + ":<seq2seq4repair_space>Готово" ; <END_BUG> case Operation . INTERRUPTED : return ( op . getOperationName ( ) ) + ":<seq2seq4repair_space>Прервано<seq2seq4repair_space>пользователем" ; default : return ( op . getOperationName ( ) ) + ":<seq2seq4repair_space>Ошибка" ; } } @ Override public String notAllOperationsFinished ( ) { } private String numberOfItems ( int num ) { } private String numberOfFiles ( int num ) { } private String afterNum ( int num , String afterZero , String afterOne , String afterTwo ) { } }

Fix:
return "Готово:<seq2seq4repair_space>" + ( op . getOperationName ( ) ) ;
Buggy code:
public class EnchantismListener implements Listener { @ EventHandler ( priority = EventPriority . HIGH ) public void onPlayerInteract ( PlayerInteractEvent event ) { if ( ( ( event . getAction ( ) ) == ( Action . RIGHT_CLICK_BLOCK ) ) && ( ( event . getClickedBlock ( ) . getType ( ) ) == ( Material . ENCHANTMENT_TABLE ) ) ) { event . setCancelled ( true ) ; Player thePlayer = event . getPlayer ( ) ; <START_BUG> openInventories . put ( thePlayer , new EnchantInventory ( thePlayer , thePlayer . getTargetBlock ( null , 500 ) . getLocation ( ) , Enchantism . getInstance ( ) . configuration . requireBookshelves ) ) ; <END_BUG> } } @ EventHandler ( priority = EventPriority . MONITOR ) public void onInventoryClose ( InventoryCloseEvent event ) { } @ EventHandler ( priority = EventPriority . HIGH ) public void onInventoryClick ( InventoryClickEvent event ) { } @ EventHandler ( priority = EventPriority . HIGH ) public void onInventoryDrag ( InventoryDragEvent event ) { } }

Fix:
openInventories . put ( thePlayer , new EnchantInventory ( thePlayer , event . getClickedBlock ( ) . getLocation ( ) , Enchantism . getInstance ( ) . configuration . requireBookshelves ) ) ;
Buggy code:
public class JavadocSingleTypeReference extends SingleTypeReference { public int tagSourceStart ; public int tagSourceEnd ; public PackageBinding packageBinding ; public JavadocSingleTypeReference ( char [ ] source , long pos , int tagStart , int tagEnd ) { } protected void reportInvalidType ( Scope scope ) { } protected void reportDeprecatedType ( Scope scope ) { } public void traverse ( ASTVisitor visitor , BlockScope scope ) { } public void traverse ( ASTVisitor visitor , ClassScope scope ) { } TypeBinding internalResolveType ( Scope scope ) { this . constant = Constant . NotAConstant ; if ( ( this . resolvedType ) != null ) return this . resolvedType . isValidBinding ( ) ? this . resolvedType : null ; this . resolvedType = getTypeBinding ( scope ) ; if ( ! ( this . resolvedType . isValidBinding ( ) ) ) { char [ ] [ ] tokens = new char [ ] [ ] { this . token } ; Binding binding = scope . getTypeOrPackage ( tokens ) ; if ( binding instanceof PackageBinding ) { this . packageBinding = ( ( PackageBinding ) ( binding ) ) ; } else { if ( ( this . resolvedType . problemId ( ) ) == ( ProblemReasons . NonStaticReferenceInStaticContext ) ) { <START_BUG> ReferenceBinding closestMatch = ( ( ProblemReferenceBinding ) ( this . resolvedType ) ) . closestMatch ; <END_BUG> if ( ( closestMatch != null ) && ( closestMatch . isTypeVariable ( ) ) ) { this . resolvedType = closestMatch ; return resolvedType ; } } reportInvalidType ( scope ) ; } return null ; } if ( isTypeUseDeprecated ( this . resolvedType , scope ) ) reportDeprecatedType ( scope ) ; if ( ( resolvedType ) instanceof ParameterizedTypeBinding ) { resolvedType = ( ( ParameterizedTypeBinding ) ( resolvedType ) ) . type ; } return resolvedType ; } public TypeBinding resolveType ( BlockScope blockScope , boolean checkBounds ) { } public TypeBinding resolveType ( ClassScope classScope ) { } }

Fix:
ReferenceBinding closestMatch = ( ( ProblemReferenceBinding ) ( this . resolvedType ) ) . closestMatch ( ) ;
Buggy code:
public class IntValue extends Value { private int value ; public IntValue ( String prop ) { } public Class < Integer > getValueType ( ) { } public void set ( int value ) { } <START_BUG> public int get ( ) { <END_BUG> return this . value ; } protected String getInternalString ( ) { } protected void setInternalString ( String val ) { } protected void setInternalObject ( Object obj ) { } }

Fix:
public Integer get ( ) {
Buggy code:
class ChangeLogParser { private static final int GET_FILE = 1 ; private static final int GET_DATE = 2 ; private static final int GET_COMMENT = 3 ; private static final int GET_REVISION = 4 ; private static final int GET_PREVIOUS_REV = 5 ; private static final SimpleDateFormat c_inputDate = new SimpleDateFormat ( "yyyy//MM//dd<seq2seq4repair_space>hh:mm:ss" ) ; private String m_file ; private String m_date ; private String m_author ; private String m_comment ; private String m_revision ; private String m_previousRevision ; private int m_status = ChangeLogParser . GET_FILE ; private final Hashtable m_entries = new Hashtable ( ) ; private final Properties m_userList ; public ChangeLogParser ( Properties userList ) { } CVSEntry [ ] getEntrySetAsArray ( ) { } public void stdout ( final String line ) { } private void processComment ( final String line ) { final String lineSeparator = System . getProperty ( "line.separator" ) ; if ( line . startsWith ( "======" ) ) { final int end = ( m_comment . length ( ) ) - ( lineSeparator . length ( ) ) ; m_comment = m_comment . substring ( 0 , end ) ; saveEntry ( ) ; m_status = ChangeLogParser . GET_FILE ; } else <START_BUG> if ( line . startsWith ( "------" ) ) { <END_BUG> final int end = ( m_comment . length ( ) ) - ( lineSeparator . length ( ) ) ; m_comment = m_comment . substring ( 0 , end ) ; m_status = ChangeLogParser . GET_PREVIOUS_REV ; } else { m_comment += line + lineSeparator ; } } private void processFile ( final String line ) { } private void processRevision ( final String line ) { } private void processDate ( final String line ) { } private void processGetPreviousRevision ( final String line ) { } private void saveEntry ( ) { } private Date parseDate ( final String date ) { } }

Fix:
if ( line . startsWith ( "----------------------------" ) ) {
Buggy code:
public final class InformationGainRatio extends AbstractJob { private double entropy ; private double informationGain ; private double informationGainRatio ; public static void main ( String [ ] args ) throws Exception { } @ Override public int run ( String [ ] args ) throws Exception { InformationGain job = new InformationGain ( ) ; <START_BUG> ToolRunner . run ( job , args ) ; <END_BUG> informationGain = job . getInformationGain ( ) ; entropy = job . getEntropy ( ) ; informationGainRatio = ( informationGain ) // ( entropy ) ; return 0 ; } public double getEntropy ( ) { } public double getInformationGain ( ) { } public double getInformationGainRatio ( ) { } }

Fix:
ToolRunner . run ( getConf ( ) , job , args ) ;
Buggy code:
public final class PAlignedConsensus extends AlignedConsensus { private final MutationArray mutations1 ; private final MutationArray mutations2 ; private final AlignmentResult alignmentResult1 ; private final AlignmentResult alignmentResult2 ; private final NucleotideSQPair consensusSQPair1 ; private final NucleotideSQPair consensusSQPair2 ; public PAlignedConsensus ( Sample sample , NucleotideSequence umi , NucleotideSQPair consensusSQPair1 , NucleotideSQPair consensusSQPair2 , AlignmentResult alignmentResult1 , AlignmentResult alignmentResult2 , MutationArray mutations1 , MutationArray mutations2 ) { } public MutationArray getMutations1 ( ) { } public MutationArray getMutations2 ( ) { } public AlignmentResult getAlignmentResult1 ( ) { } public AlignmentResult getAlignmentResult2 ( ) { } public NucleotideSQPair getConsensusSQPair1 ( ) { } public NucleotideSQPair getConsensusSQPair2 ( ) { } public boolean isMapped1 ( ) { } public boolean isMapped2 ( ) { <START_BUG> return ( alignmentResult1 ) != null ; <END_BUG> } public boolean isAligned1 ( ) { } public boolean isAligned2 ( ) { } @ Override public boolean isMapped ( ) { } @ Override public boolean isAligned ( ) { } @ Override public boolean isChimeric ( ) { } @ Override public boolean isPairedEnd ( ) { } }

Fix:
return ( alignmentResult2 ) != null ;
Buggy code:
public class MultiSessionStorageEvaluator implements SessionStorageEvaluator { private static final Logger logger = Logger . getLogger ( MultiSessionStorageEvaluator . class ) ; public boolean isSessionStorageEnabled ( Subject subject ) { boolean enabled = false ; if ( WebUtils . isWeb ( subject ) ) { HttpServletRequest request = WebUtils . getHttpRequest ( subject ) ; <START_BUG> if ( request . getHeader ( "accept" ) . equals ( null ) ) { <END_BUG> enabled = true ; } else if ( ( request . getHeader ( "accept" ) . indexOf ( "application//json" ) ) < 0 ) { enabled = true ; } else { enabled = false ; } } else { return enabled ; } return enabled ; } }

Fix:
if ( ( request . getHeader ( "accept" ) ) == null ) {
Buggy code:
public class ResendVerificationCodeActivity extends Activity { private ProgressDialog pDialog ; Button bResend ; EditText etLogin ; @ Override protected void onCreate ( Bundle savedInstanceState ) { } class ResendVerificationCode extends AsyncTask < String , String , String > { @ Override protected void onPreExecute ( ) { } protected String doInBackground ( String ... args ) { etLogin = ( ( EditText ) ( findViewById ( R . id . etLogin ) ) ) ; bResend = ( ( Button ) ( findViewById ( R . id . bResend ) ) ) ; AccountManagement resendUserVCode = new AccountManagement ( ) ; String result = resendUserVCode . resendVerificationCode ( etLogin . getText ( ) . toString ( ) ) ; <START_BUG> if ( ( etLogin . getText ( ) . toString ( ) ) == "" ) { <END_BUG> return "Error:<seq2seq4repair_space>Please<seq2seq4repair_space>enter<seq2seq4repair_space>your<seq2seq4repair_space>email<seq2seq4repair_space>address." ; } return result ; } protected void onPostExecute ( String result ) { } } }

Fix:
if ( etLogin . getText ( ) . toString ( ) . isEmpty ( ) ) {
Buggy code:
public class InfinispanBeanGroupFactory < G , I , T > implements BeanGroupFactory < G , I , T > { private final Cache < G , BeanGroupEntry < I , T > > cache ; private final CacheInvoker invoker ; private final MarshalledValueFactory < MarshallingContext > factory ; private final MarshallingContext context ; public InfinispanBeanGroupFactory ( Cache < G , BeanGroupEntry < I , T > > cache , CacheInvoker invoker , MarshalledValueFactory < MarshallingContext > factory , MarshallingContext context ) { } @ Override public BeanGroupEntry < I , T > createValue ( G id ) { Map < I , T > beans = new HashMap < > ( ) ; BeanGroupEntry < I , T > entry = new InfinispanBeanGroupEntry ( this . factory . createMarshalledValue ( beans ) ) ; <START_BUG> BeanGroupEntry < I , T > existing = this . invoker . invoke ( this . cache , new CreateOperation ( id , entry ) ) ; <END_BUG> return existing != null ? existing : entry ; } @ Override public BeanGroupEntry < I , T > findValue ( G id ) { } @ Override public void evict ( G id ) { } @ Override public void remove ( G id ) { } @ Override public BeanGroup < G , I , T > createGroup ( final G id , final BeanGroupEntry < I , T > entry ) { } private static class BeanGroupMutator < G , I , T > implements Mutator { private final CacheInvoker invoker ; private final Cache < G , BeanGroupEntry < I , T > > cache ; private final G id ; private final BeanGroupEntry < I , T > entry ; BeanGroupMutator ( CacheInvoker invoker , Cache < G , BeanGroupEntry < I , T > > cache , G id , BeanGroupEntry < I , T > entry ) { } @ Override public void mutate ( ) { } } }

Fix:
BeanGroupEntry < I , T > existing = this . invoker . invoke ( this . cache , new CreateOperation ( id , entry ) , FORCE_SYNCHRONOUS ) ;
Buggy code:
class OperationTransformationOverrideBuilderImpl extends AttributeTransformationDescriptionBuilderImpl < OperationTransformationOverrideBuilder > implements OperationTransformationOverrideBuilder { private boolean inherit = false ; private DiscardPolicy discardPolicy = DiscardPolicy . NEVER ; private OperationTransformer transformer = OperationTransformer . DEFAULT ; private String newName ; protected OperationTransformationOverrideBuilderImpl ( ResourceTransformationDescriptionBuilder builder ) { } @ Override public OperationTransformationOverrideBuilder inheritResourceAttributeDefinitions ( ) { } public OperationTransformationOverrideBuilder setCustomOperationTransformer ( OperationTransformer transformer ) { } @ Override public OperationTransformationOverrideBuilder rename ( String newName ) { } protected OperationTransformer createTransformer ( final AttributeTransformationDescriptionBuilderRegistry resourceRegistry ) { final AttributeTransformationDescriptionBuilderRegistry registry = resultingRegistry ( resourceRegistry ) ; final AttributeTransformationRule first = new AttributeTransformationRule ( registry . buildAttributes ( ) ) ; return new OperationTransformer ( ) { @ Override public TransformedOperation transformOperation ( final TransformationContext ctx , final PathAddress address , final ModelNode operation ) throws OperationFailedException { if ( discardPolicy . discard ( operation , address , ctx ) ) { return DISCARD . transformOperation ( ctx , address , operation ) ; } final Iterator < TransformationRule > iterator = Collections . < TransformationRule > emptyList ( ) . iterator ( ) ; final ModelNode originalModel = TransformationRule . cloneAndProtect ( operation ) ; final TransformationRule . ChainedOperationContext context = new TransformationRule . ChainedOperationContext ( ctx ) { @ Override void invokeNext ( OperationTransformer . TransformedOperation transformedOperation ) throws OperationFailedException { recordTransformedOperation ( transformedOperation ) ; if ( iterator . hasNext ( ) ) { final TransformationRule next = iterator . next ( ) ; next . transformOperation ( transformedOperation . getTransformedOperation ( ) , address , this ) ; } else { if ( ( newName ) != null ) { transformedOperation . getTransformedOperation ( ) . get ( OP ) . set ( newName ) ; } final TransformationContext ctx = getContext ( ) ; <START_BUG> transformer . transformOperation ( ctx , address , transformedOperation . getTransformedOperation ( ) ) ; <END_BUG> } } } ; operation . get ( OP_ADDR ) . set ( address . toModelNode ( ) ) ; first . transformOperation ( operation , address , context ) ; return context . createOp ( ) ; } } ; } protected AttributeTransformationDescriptionBuilderRegistry resultingRegistry ( final AttributeTransformationDescriptionBuilderRegistry resourceRegistry ) { } @ Override protected OperationTransformationOverrideBuilder thisBuilder ( ) { } }

Fix:
recordTransformedOperation ( transformer . transformOperation ( ctx , address , transformedOperation . getTransformedOperation ( ) ) ) ;
Buggy code:
public class Applet extends WebComponent implements IResourceListener , IFormSubmitListener { private static final long serialVersionUID = 1L ; private Class appletClass ; private List classes = new ArrayList ( 2 ) ; public Applet ( final String id , final Class appletClass ) { } public Applet ( final String id , final IModel model , final Class appletClass ) { } public void addClass ( final Class c ) { } public Object getAppletModel ( ) { } public void onFormSubmitted ( ) { } public void onResourceRequested ( ) { } <START_BUG> public void setAppletModel ( Object model ) { <END_BUG> setModelObject ( model ) ; } protected int getHeight ( ) { } protected int getWidth ( ) { } protected void onComponentTag ( final ComponentTag tag ) { } protected void onComponentTagBody ( final MarkupStream markupStream , final ComponentTag openTag ) { } private void addAppletClass ( final Class appletClass ) { } }

Fix:
public void setAppletModel ( final Object model ) {
Buggy code:
public class ModClusterGetProxyConfiguration implements OperationStepHandler , DescriptionProvider { static final ModClusterGetProxyConfiguration INSTANCE = new ModClusterGetProxyConfiguration ( ) ; @ Override public ModelNode getModelDescription ( Locale locale ) { } @ Override public void execute ( OperationContext context , ModelNode operation ) throws OperationFailedException { <START_BUG> if ( ( context . getType ( ) ) == ( Type . SERVER ) ) { <END_BUG> context . addStep ( new OperationStepHandler ( ) { @ Override public void execute ( OperationContext context , ModelNode operation ) throws OperationFailedException { ServiceController < ? > controller = context . getServiceRegistry ( false ) . getService ( NAME ) ; ModCluster modcluster = ( ( ModCluster ) ( controller . getValue ( ) ) ) ; Map < InetSocketAddress , String > map = modcluster . getProxyConfiguration ( ) ; ModClusterLogger . ROOT_LOGGER . debugf ( "Mod_cluster<seq2seq4repair_space>ProxyConfiguration<seq2seq4repair_space>%s" , map ) ; if ( ! ( map . isEmpty ( ) ) ) { final ModelNode result = new ModelNode ( ) ; Object [ ] addr = map . keySet ( ) . toArray ( ) ; for ( int i = 0 ; i < ( addr . length ) ; i ++ ) { InetSocketAddress address = ( ( InetSocketAddress ) ( addr [ i ] ) ) ; result . add ( ( ( ( address . getHostName ( ) ) + ":" ) + ( address . getPort ( ) ) ) ) ; result . add ( map . get ( addr [ i ] ) ) ; } context . getResult ( ) . set ( result ) ; } context . completeStep ( ) ; } } , RUNTIME ) ; } context . completeStep ( ) ; } }

Fix:
if ( context . getProcessType ( ) . isServer ( ) ) {
Buggy code:
@ Component public class TestDataGenerator { @ Autowired ErniLdapCache erniLdapCache ; @ Autowired MatchRepository matchRepository ; @ Autowired UserRepository userRepository ; @ Autowired LdapUserHelper ldapUserHelper ; public void generateUserData ( ) { } List < Match > generatePlanMatches ( int numberOfMatches ) { List < Match > matches = new ArrayList < > ( ) ; for ( int i = 0 ; i < numberOfMatches ; i ++ ) { Match match = new Match ( ) ; match . setPlaned ( true ) ; Calendar today = Calendar . getInstance ( ) ; int month = ( today . get ( Calendar . MONTH ) ) + 1 ; int day = ( today . get ( Calendar . DAY_OF_MONTH ) ) + ( ( int ) ( ( Math . random ( ) ) * 10 ) ) ; Date date = Date . from ( Instant . parse ( ( ( ( ( ( ( "2015-" + ( String . format ( "%02d" , month ) ) ) + "-" ) + ( String . format ( "%02d" , ( ( day > 30 ? day % 30 : day ) + 1 ) ) ) ) + "T" ) + ( String . format ( "%02d" , ( ( ( int ) ( ( Math . random ( ) ) * 11 ) ) + 1 ) ) ) ) + ":00:00.00Z" ) ) ) ; <START_BUG> match . setDateOfMatch ( date ) ; <END_BUG> match . addGame ( generateGame ( ) ) ; match . addGame ( generateGame ( ) ) ; if ( match . isDraw ( ) ) { match . addGame ( generateGame ( ) ) ; } addUsers ( match ) ; matches . add ( match ) ; } return matches ; } List < Match > generateMatches ( int numberOfMatches ) { } private void addUsers ( Match match ) { } User selectUser ( User ... excludes ) { } public Game generateGame ( ) { } }

Fix:
match . setDateOfMatch ( date . getTime ( ) ) ;
Buggy code:
public class UpgradeReceiver extends BroadcastReceiver { @ Override public void onReceive ( Context context , Intent intent ) { } private void upgradeUser ( Context context ) { } private void show ( String upgradeMessage , Context context ) { } private PendingIntent makeShowMessage ( String message , Context context ) { Intents intents = new Intents ( context ) ; Intent intent = intents . makeIntent ( UpgradeActivity . class ) . putExtra ( MESSAGE_INTENT_EXTRA_NAME , message ) ; <START_BUG> return intents . makePending ( intent ) ; <END_BUG> } private static final Map < Integer , Integer > upgradeMessages ; }

Fix:
return intents . makePending ( intent , ACTIVITY ) ;