nus-yam/ex-repair huggingface dataset:
Buggy code:
public class SingingActivity extends SimpleTabActivity { public static final String EXTRA_LEAD_ID = "__SINGING_LEAD_ID" ; @ Override protected void onCreate ( Bundle savedInstanceState ) { } @ Override protected int getLayoutId ( ) { } @ Override protected void onCreateTabs ( ) { } public static class SingingSongListFragment extends CursorListFragment { @ Override public View onCreateView ( LayoutInflater inflater , ViewGroup container , Bundle savedInstanceState ) { View root = inflater . inflate ( fragment_singing_songlist , container , false ) ; <START_BUG> inflateList ( inflater , root , savedInstanceState ) ; <END_BUG> return root ; } @ Override public void onViewCreated ( final View view , Bundle savedInstanceState ) { } @ Override public void onLoadFinished ( Cursor cursor ) { } @ Override public void onListItemClick ( ListView l , View v , int position , long id ) { } protected void sendIntent ( long leaderId , long leadId ) { } } public static class FullTextFragment extends Fragment { @ Override public View onCreateView ( LayoutInflater inflater , ViewGroup container , Bundle savedInstanceState ) { return inflater . inflate ( fragment_singing_text , container , false ) ; } @ Override public void onViewCreated ( final View view , Bundle savedInstanceState ) { } } }

Fix:
inflateList ( inflater , ( ( ViewGroup ) ( root ) ) , savedInstanceState ) ;
Buggy code:
public class Whisper extends Skill { public Whisper ( Character self ) { } @ Override public boolean usable ( Combat c , Character target ) { } @ Override public float priorityMod ( Combat c ) { } @ Override public int getMojoBuilt ( Combat c ) { } @ Override public boolean resolve ( Combat c , Character target ) { } @ Override public boolean requirements ( Combat c , Character user , Character target ) { } @ Override public Skill copy ( Character user ) { } @ Override public int speed ( ) { } @ Override public Tactics type ( Combat c ) { } @ Override public String deal ( Combat c , int damage , Result modifier , Character target ) { } @ Override public String receive ( Combat c , int damage , Result modifier , Character target ) { if ( modifier == ( Result . special ) ) { <START_BUG> return ( ( ( getSelf ( ) . name ( ) ) + "<seq2seq4repair_space>whispers<seq2seq4repair_space>in<seq2seq4repair_space>your<seq2seq4repair_space>ear<seq2seq4repair_space>in<seq2seq4repair_space>some<seq2seq4repair_space>eldritch<seq2seq4repair_space>language." ) + "<seq2seq4repair_space>Her<seq2seq4repair_space>words<seq2seq4repair_space>echo<seq2seq4repair_space>through<seq2seq4repair_space>your<seq2seq4repair_space>head<seq2seq4repair_space>and<seq2seq4repair_space>you<seq2seq4repair_space>feel<seq2seq4repair_space>a" ) + "<seq2seq4repair_space>strong<seq2seq4repair_space>compulsion<seq2seq4repair_space>to<seq2seq4repair_space>do<seq2seq4repair_space>what<seq2seq4repair_space>she<seq2seq4repair_space>tells<seq2seq4repair_space>you" ; <END_BUG> } else { return ( getSelf ( ) . name ( ) ) + "<seq2seq4repair_space>whispers<seq2seq4repair_space>some<seq2seq4repair_space>deliciously<seq2seq4repair_space>seductive<seq2seq4repair_space>suggestions<seq2seq4repair_space>in<seq2seq4repair_space>your<seq2seq4repair_space>ear." ; } } @ Override public String describe ( Combat c ) { } }

Fix:
return ( ( ( getSelf ( ) . name ( ) ) + "<seq2seq4repair_space>whispers<seq2seq4repair_space>in<seq2seq4repair_space>your<seq2seq4repair_space>ear<seq2seq4repair_space>in<seq2seq4repair_space>some<seq2seq4repair_space>eldritch<seq2seq4repair_space>language." ) + "<seq2seq4repair_space>Her<seq2seq4repair_space>words<seq2seq4repair_space>echo<seq2seq4repair_space>through<seq2seq4repair_space>your<seq2seq4repair_space>head<seq2seq4repair_space>and<seq2seq4repair_space>you<seq2seq4repair_space>feel<seq2seq4repair_space>a" ) + "<seq2seq4repair_space>strong<seq2seq4repair_space>compulsion<seq2seq4repair_space>to<seq2seq4repair_space>do<seq2seq4repair_space>what<seq2seq4repair_space>she<seq2seq4repair_space>tells<seq2seq4repair_space>you." ;
Buggy code:
public class PlugInUtilities { public static final String HTTP_GET = "Get" ; public static final String HTTP_POST = "Post" ; public static final int PLOT_CATEGORY_AXIX_LABEL_CUT_OFF = 16 ; public PlugInUtilities ( ) { } public static Set < Variable > getOutputVariables ( FactorGraph fg ) { Set < Variable > outputs = new HashSet < Variable > ( ) ; for ( Variable var : fg . getVariables ( ) ) { if ( PlugInUtilities . isCentralDogmaVariable ( var ) ) continue ; List < Factor > factors = var . getFactors ( ) ; for ( Factor factor : factors ) { List < Variable > variables = factor . getVariables ( ) ; if ( ( variables == null ) || ( ( variables . size ( ) ) == 0 ) ) continue ; Variable var1 = variables . get ( 0 ) ; if ( var1 == var ) <START_BUG> break ; <END_BUG> String varName1 = var1 . getName ( ) ; if ( varName1 . matches ( "(\\d+)_OUTPUT" ) ) outputs . add ( var ) ; } } return outputs ; } private static boolean isCentralDogmaVariable ( Variable var ) { } public static double [ ] convertDoubleListToArray ( List < Double > list ) { } public static List < Double > convertArrayToList ( double [ ] values ) { } public static int getCytoPanelComponent ( CytoPanel cytoPanel , String title ) { } public static CategoryMarker createMarker ( Comparable < ? > category ) { } public static void zoomToSelected ( CyNetworkView networkView , int totalSelected ) { } public static void zoomOut ( CyNetwork network , int times ) { } public static boolean createNewSession ( ) { } private static void ungetServices ( BundleContext context , ServiceReference ... references ) { } public static void showNode ( View < CyNode > nodeView ) { } public static void hideNode ( View < CyNode > nodeView ) { } public static void showEdge ( View < CyEdge > edgeView ) { } public static void hideEdge ( View < CyEdge > edgeView ) { } public static void setNodeSelected ( CyNetwork network , CyNode node , boolean isSelected ) { } public static CyNetwork createNetwork ( ) { } public static JDesktopPane getCytoscapeDesktop ( ) { } public static String formatProbability ( double value ) { } public static void showErrorMessage ( String title , String message ) { } public static void queryGeneCard ( String gene ) { } public static void openURL ( String url ) { } private static HttpClient initializeHTTPClient ( PostMethod post , String sendType , String query ) throws UnsupportedEncodingException { } public static Element callHttpInXML ( String url , String type , String query ) throws Exception { } public static String callHttpInText ( String url , String type , String query ) throws IOException { } public static String postHttpInXML ( String url , String query ) throws IOException { } private static String callHttp ( String url , String type , String query , String sendType , String requestType ) throws IOException { } }

Fix:
continue ;
Buggy code:
public class AttributeValuePeer extends BaseAttributeValuePeer { private static final String keyPrefix = "AttributeValueSubClass" ; private static String getClassCacheKey ( String key ) { } public static Class getOMClass ( Record record , int offset ) throws TorqueException { Class c = null ; try { NumberKey attId = new NumberKey ( record . getValue ( ( ( offset - 1 ) + 3 ) ) . asString ( ) ) ; <START_BUG> Attribute attribute = Attribute . getInstance ( attId ) ; <END_BUG> String className = attribute . getAttributeType ( ) . getJavaClassName ( ) ; TurbineGlobalCacheService tgcs = ( ( TurbineGlobalCacheService ) ( TurbineServices . getInstance ( ) . getService ( SERVICE_NAME ) ) ) ; String key = AttributeValuePeer . getClassCacheKey ( className ) ; try { c = ( ( Class ) ( tgcs . getObject ( key ) . getContents ( ) ) ) ; } catch ( ObjectExpiredException oee ) { c = Class . forName ( className ) ; tgcs . addObject ( key , new CachedObject ( c ) ) ; } } catch ( Exception e ) { throw new TorqueException ( e ) ; } return c ; } }

Fix:
Attribute attribute = AttributeManager . getInstance ( attId ) ;
Buggy code:
public class Application extends Controller { @ Before static void addDefaults ( ) { } @ Before public static void initData ( ) { } public static Date processedDate ( Integer year , Integer month , Integer day , boolean isStart ) { } public static Map < Integer , Booking > getBookingsByDate ( Integer year , Integer month , Integer day ) { } public static void index ( String date ) { Date currentDate = null ; try { SimpleDateFormat sdf = new SimpleDateFormat ( "MMM//dd//yyyy" ) ; ParsePosition pos = new ParsePosition ( 0 ) ; currentDate = sdf . parse ( date , pos ) ; } catch ( NullPointerException p ) { } if ( date == null ) System . out . println ( "SFSDFSDFS" ) ; if ( currentDate == null ) { Calendar startDate = Calendar . getInstance ( ) ; int daysUntilSaturday = 7 - ( startDate . get ( Calendar . DAY_OF_WEEK ) ) ; startDate . add ( Calendar . DATE , daysUntilSaturday ) ; currentDate = DateUtils . round ( startDate . getTime ( ) , Calendar . DATE ) ; } List < Category > categoryList = Category . findAll ( ) ; Map < Long , Category > allCategories = new HashMap < Long , Category > ( ) ; for ( Category cat : categoryList ) { allCategories . put ( cat . id , cat ) ; } List < Stall > stallList = Stall . findAll ( ) ; Map < Integer , Stall > allStalls = new HashMap < Integer , Stall > ( ) ; for ( Stall stall : stallList ) { allStalls . put ( stall . number , stall ) ; } List < Booking > currentBookingList = Booking . findAll ( ) ; <START_BUG> Map < Integer , Booking > currentBookings = Application . getBookingsByDate ( startDate . getYear ( ) , startDate . getMonth ( ) , startDate . getYear ( ) ) ; <END_BUG> System . out . println ( currentBookings ) ; System . out . println ( currentBookings . get ( 1 ) ) ; Map < Long , Merchant > merchants = new HashMap < Long , Merchant > ( ) ; for ( Booking booking : currentBookingList ) { Merchant merchant = Merchant . findById ( booking . merchantid ) ; merchants . put ( booking . merchantid , merchant ) ; } for ( Booking booking : currentBookingList ) { currentBookings . put ( booking . stallnumber , booking ) ; } render ( allStalls , allCategories , currentBookings , merchants , currentDate ) ; } public static void add_booking ( ) { } public static void stalls ( String date ) { } public static void finance ( ) { } public static void merchants ( ) { } }

Fix:
Map < Integer , Booking > currentBookings = Application . getBookingsByDate ( currentDate . getDate ( ) , currentDate . getMonth ( ) , currentDate . getYear ( ) ) ;
Buggy code:
public class DefaultConversionService extends GenericConversionService { public DefaultConversionService ( ) { } protected void addDefaultConverters ( ) { } protected void addDefaultAliases ( ) { addAlias ( "string" , String . class ) ; addAlias ( "byte" , Byte . class ) ; addAlias ( "boolean" , Boolean . class ) ; addAlias ( "char" , Character . class ) ; addAlias ( "short" , Short . class ) ; addAlias ( "int" , Integer . class ) ; addAlias ( "long" , Long . class ) ; addAlias ( "float" , Float . class ) ; addAlias ( "double" , Double . class ) ; <START_BUG> addAlias ( "bigInteger" , BigInteger . class ) ; <END_BUG> addAlias ( "bigDecimal" , BigDecimal . class ) ; addAlias ( "locale" , Locale . class ) ; addAlias ( "enum" , Enum . class ) ; addAlias ( "date" , Date . class ) ; } }

Fix:
addAlias ( "bigInt" , BigInteger . class ) ;
Buggy code:
class DomainDeploymentResourceDefinition extends DeploymentResourceDefinition { private OperationDefinition addDefinition ; private DomainDeploymentResourceDefinition ( DeploymentResourceParent parent , OperationDefinition addDefinition , OperationStepHandler addHandler , OperationStepHandler removeHandler ) { } public static DomainDeploymentResourceDefinition createForDomainRoot ( boolean isMaster , ContentRepository contentRepository , HostFileRepository fileRepository ) { } <START_BUG> public static DomainDeploymentResourceDefinition createForServerGroup ( ContentRepository contentRepository , HostFileRepository fileRepository ) { <END_BUG> return new DomainDeploymentResourceDefinition ( DeploymentResourceParent . SERVER_GROUP , DeploymentAttributes . SERVER_GROUP_DEPLOYMENT_ADD_DEFINITION , new org . jboss . as . domain . controller . operations . deployment . ServerGroupDeploymentAddHandler ( fileRepository ) , ServerGroupDeploymentRemoveHandler . INSTANCE ) ; } @ Override public void registerOperations ( ManagementResourceRegistration resourceRegistration ) { } @ Override protected void registerAddOperation ( ManagementResourceRegistration registration , OperationStepHandler handler , Flag ... flags ) { } }

Fix:
public static DomainDeploymentResourceDefinition createForServerGroup ( HostFileRepository fileRepository ) {
Buggy code:
public interface SoundDataModel { Set < EnhancedMediaPlayer > getCurrentlyPlayingSounds ( ) { } List < EnhancedMediaPlayer > getPlayList ( ) { } Map < String , List < EnhancedMediaPlayer > > getSounds ( ) { } List < EnhancedMediaPlayer > getSoundsInFragment ( String fragmentTag ) { } <START_BUG> void toggleSoundInPlaylist ( String playerId , boolean addToPlayList ) ; <END_BUG> }

Fix:
boolean toggleSoundInPlaylist ( String playerId , boolean addToPlayList ) ;
Buggy code:
public class EventPlanning_ActualEvent extends Composite { private final FormToolkit toolkit = new FormToolkit ( Display . getCurrent ( ) ) ; private Table table_eventPlanning_actualEvent_tableItinerary ; private Table table_eventPlanning_actualEvent_participants ; private Table table_eventPlanning_actualEvents_allocOfManpower ; private Table table_eventPlanning_actualEvents_facilitators ; private Event event ; private ArrayList < Itinerary > itineraryList ; private ArrayList < ManpowerAllocation > manpowerList ; public EventPlanning_ActualEvent ( Composite parent , int style , Event event ) { } public void importItineraryData ( ) { } public void importManpowerAllocationData ( ) { DatabaseReader db = new DatabaseReader ( ) ; manpowerList = db . getManpowerAllocation ( event ) ; <START_BUG> for ( int i = 0 ; i > ( manpowerList . size ( ) ) ; i ++ ) { <END_BUG> TableItem temp = new TableItem ( table_eventPlanning_actualEvents_allocOfManpower , SWT . NULL ) ; temp . setText ( 0 , manpowerList . get ( i ) . getTaskDescription ( ) ) ; temp . setText ( 1 , manpowerList . get ( i ) . getAssignedTo ( ) ) ; temp . setText ( 2 , manpowerList . get ( i ) . getDate ( ) . toString ( ) ) ; if ( ( manpowerList . get ( i ) . isDone ( ) ) == true ) temp . setText ( 3 , "Yes" ) ; else temp . setText ( 3 , "No" ) ; } } public class ItineraryAddItemPage extends SelectionAdapter { public void widgetSelected ( SelectionEvent e ) { } } public class ItineraryDeleteItem extends SelectionAdapter { public void widgetSelected ( SelectionEvent e ) { } } public class ItineraryEditItemPage extends SelectionAdapter { public void widgetSelected ( SelectionEvent e ) { } } public class AllocOfManpowerAddItemPage extends SelectionAdapter { public void widgetSelected ( SelectionEvent e ) { } } public class AllocOfManpowerDelItem extends SelectionAdapter { public void widgetSelected ( SelectionEvent e ) { } } public class AllocOfManpowerEditItemPage extends SelectionAdapter { public void widgetSelected ( SelectionEvent e ) { } } public class FacilitatorAddItemPage extends SelectionAdapter { public void widgetSelected ( SelectionEvent e ) { } } public class FacilitatorDeleteItem extends SelectionAdapter { public void widgetSelected ( SelectionEvent e ) { } } public class FacilitatorEditItemPage extends SelectionAdapter { public void widgetSelected ( SelectionEvent e ) { } } public class ParticipantAddItemPage extends SelectionAdapter { public void widgetSelected ( SelectionEvent e ) { } } public class ParticipantDeleteItem extends SelectionAdapter { public void widgetSelected ( SelectionEvent e ) { } } public class ParticipantEditItemPage extends SelectionAdapter { public void widgetSelected ( SelectionEvent e ) { } } }

Fix:
for ( int i = 0 ; i < ( manpowerList . size ( ) ) ; i ++ ) {
Buggy code:
public class StudyImporterFactory { private static final Collection < Class > IMPORTERS = Collections . unmodifiableCollection ( new ArrayList < Class > ( ) { } ) ; private NodeFactory nodeFactory ; private ParserFactory parserFactory ; public StudyImporterFactory ( ParserFactory parserFactory , NodeFactory nodeFactory ) { } public StudyImporter instantiateImporter ( Class < StudyImporter > clazz ) throws StudyImporterException { try { <START_BUG> Constructor < StudyImporter > aConstructor = clazz . getConstructor ( ParserFactory . class , NodeFactoryImpl . class ) ; <END_BUG> return aConstructor . newInstance ( parserFactory , nodeFactory ) ; } catch ( Exception ex ) { throw new StudyImporterException ( ( ( "failed<seq2seq4repair_space>to<seq2seq4repair_space>create<seq2seq4repair_space>study<seq2seq4repair_space>importer<seq2seq4repair_space>for<seq2seq4repair_space>[" + ( clazz . toString ( ) ) ) + "]" ) , ex ) ; } } public static Collection < Class > getOpenImporters ( ) { } public static Collection < Class > getDarkImporters ( ) { } }

Fix:
Constructor < StudyImporter > aConstructor = clazz . getConstructor ( ParserFactory . class , NodeFactory . class ) ;
Buggy code:
public class ArticleIndexer { private String path = "" ; public ArticleIndexer ( String path ) { } public void writeArticlesToIndex ( List < Article > articles ) throws IOException { } private Document buildDoc ( Article article ) { Document doc = new Document ( ) ; doc . add ( new org . apache . lucene . document . TextField ( "title" , article . getTitle ( ) , Store . YES ) ) ; doc . add ( new org . apache . lucene . document . TextField ( "description" , article . getDescription ( ) , Store . YES ) ) ; doc . add ( new org . apache . lucene . document . TextField ( "source" , article . getSource ( ) , Store . YES ) ) ; doc . add ( new org . apache . lucene . document . TextField ( "language" , article . getLanguage ( ) , Store . YES ) ) ; doc . add ( new org . apache . lucene . document . TextField ( "text" , article . getText ( ) , Store . YES ) ) ; doc . add ( new org . apache . lucene . document . TextField ( "logo" , article . getLogo ( ) , Store . YES ) ) ; doc . add ( new org . apache . lucene . document . TextField ( "link" , article . getLink ( ) , Store . YES ) ) ; doc . add ( new org . apache . lucene . document . TextField ( "description" , article . getDescription ( ) , Store . YES ) ) ; <START_BUG> doc . add ( new org . apache . lucene . document . TextField ( "date" , new SimpleDateFormat ( "yyyy.MM.dd.HH.mm.ss" ) . format ( article . getDate ( ) ) , Store . YES ) ) ; <END_BUG> doc . add ( new org . apache . lucene . document . IntField ( "clusterID" , article . getClusterID ( ) , Store . YES ) ) ; return doc ; } }

Fix:
doc . add ( new org . apache . lucene . document . TextField ( "date" , new SimpleDateFormat ( "yyyy.MM.dd.HH.mm.ss" ) . format ( article . getDate ( ) . getTime ( ) ) , Store . YES ) ) ;
Buggy code:
public class SWESensorDataRecordWidget extends AbstractSensorElementWidget { private Panel container ; private Panel linePanel ; private Panel labelPanel ; private Panel defPanel ; private Panel innerContainer ; private boolean hasLabel = false ; public SWESensorDataRecordWidget ( ) { } @ Override public Panel getPanel ( ) { } @ Override protected void activeMode ( MODE mode ) { } @ Override protected void addSensorWidget ( ISensorWidget widget ) { if ( ( widget . getName ( ) . equals ( "label" ) ) && ( ( widget . getDef ( ) ) == ( TAG_DEF . SWE ) ) ) { if ( ! ( widget . getElements ( ) . isEmpty ( ) ) ) { widget . getElements ( ) . get ( 0 ) . getPanel ( ) . addStyleName ( "font-bold" ) ; } labelPanel . add ( widget . getPanel ( ) ) ; hasLabel = true ; } else if ( ( widget . getName ( ) . equals ( "definition" ) ) && ( ( widget . getType ( ) ) == ( TAG_TYPE . ATTRIBUTE ) ) ) { defPanel . add ( widget . getPanel ( ) ) ; } else <START_BUG> if ( ( widget . getName ( ) . equals ( "field" ) ) || ( widget . getName ( ) . equals ( "coordinate" ) ) ) { <END_BUG> List < ISensorWidget > children = widget . getElements ( ) ; boolean foundDataRecord = false ; for ( ISensorWidget child : children ) { if ( child . getName ( ) . equals ( "DataRecord" ) ) { foundDataRecord = true ; break ; } } if ( ! foundDataRecord ) { innerContainer . add ( widget . getPanel ( ) ) ; } else { for ( ISensorWidget child : children ) { if ( child . getName ( ) . equals ( "DataRecord" ) ) { for ( ISensorWidget dataRecordChild : child . getElements ( ) ) { addSensorWidget ( dataRecordChild ) ; } } else { } } } if ( hasLabel ) { innerContainer . addStyleName ( "swe-dataRecord-vertical-panel" ) ; } else { innerContainer . addStyleName ( "swe-dataRecord-nolabel-vertical-panel" ) ; } } } @ Override protected AbstractSensorElementWidget newInstance ( ) { } public APPENDER appendTo ( ) { } }

Fix:
if ( ( ( widget . getName ( ) . equals ( "field" ) ) || ( widget . getName ( ) . equals ( "coordinate" ) ) ) || ( widget . getName ( ) . equals ( "time" ) ) ) {
Buggy code:
public class ChunkData { private int x ; private int z ; public ChunkData ( int x , int z ) { } public boolean containsPoint ( int xPos , int zPos ) { <START_BUG> return ( ( ( xPos > ( x ) ) && ( xPos < ( ( x ) + 16 ) ) ) && ( zPos > ( z ) ) ) && ( zPos < ( ( z ) + 16 ) ) ; <END_BUG> } public int getX ( ) { } public void setX ( int x ) { } public int getZ ( ) { } public void setZ ( int z ) { } @ Override public boolean equals ( Object obj ) { } }

Fix:
return ( ( ( xPos > ( x ) ) && ( xPos <= ( ( x ) + 16 ) ) ) && ( zPos > ( z ) ) ) && ( zPos <= ( ( z ) + 16 ) ) ;
Buggy code:
public class RecipeManagerMoon { private static void addUniversalRecipes ( ) { <START_BUG> RecipeUtil . addRecipe ( new net . minecraft . item . ItemStack ( MoonItems . moonPortalTrigger , 1 , 0 ) , new Object [ ] { "X<seq2seq4repair_space>X" , "<seq2seq4repair_space>X<seq2seq4repair_space>" , "<seq2seq4repair_space>X<seq2seq4repair_space>" , "Z" , 'X' , "pipeSteel" } ) ; <END_BUG> } public static void loadRecipes ( ) { } }

Fix:
RecipeUtil . addRecipe ( new net . minecraft . item . ItemStack ( MoonItems . moonPortalTrigger , 1 , 0 ) , new Object [ ] { "X<seq2seq4repair_space>X" , "XXX" , "<seq2seq4repair_space>X<seq2seq4repair_space>" , 'X' , "pipeSteel" } ) ;
Buggy code:
public class PayAnalyticsForKlassAndSchool implements Serializable { private static final long serialVersionUID = 1L ; private String klass ; private String school ; private int instalmentStudentNumber ; private int onepayStudentNumber ; private int instalmentNotClearStudentNumber ; private int onepayNotClearStudentNumber ; private BigDecimal instalmentTotal ; private BigDecimal onepayTotal ; private BigDecimal instalmentPayTotal ; private BigDecimal onepayPayTotal ; public String getKlass ( ) { } public void setKlass ( String klass ) { } public String getSchool ( ) { } public void setSchool ( String school ) { } public int getInstalmentStudentNumber ( ) { } public void setInstalmentStudentNumber ( int instalmentStudentNumber ) { } public int getOnepayStudentNumber ( ) { } public void setOnepayStudentNumber ( int onepayStudentNumber ) { } public int getInstalmentNotClearStudentNumber ( ) { } public void setInstalmentNotClearStudentNumber ( int instalmentNotClearStudentNumber ) { } public int getOnepayNotClearStudentNumber ( ) { } public void setOnepayNotClearStudentNumber ( int onepayNotClearStudentNumber ) { } public BigDecimal getInstalmentTotal ( ) { } public void setInstalmentTotal ( BigDecimal instalmentTotal ) { } public BigDecimal getOnepayTotal ( ) { } public void setOnepayTotal ( BigDecimal onepayTotal ) { } public BigDecimal getInstalmentPayTotal ( ) { } public void setInstalmentPayTotal ( BigDecimal instalmentPayTotal ) { } public BigDecimal getOnepayPayTotal ( ) { } public void setOnepayPayTotal ( BigDecimal onepayPayTotal ) { } public BigDecimal getTotal ( ) { } public BigDecimal getPayTotal ( ) { } public BigDecimal getRest ( ) { } public BigDecimal getInstalmentRest ( ) { } public BigDecimal getOnepayRest ( ) { } public int getHasPayStudentNumber ( ) { } public int getNotClearStudentNumber ( ) { } public int getClearStudentNumber ( ) { <START_BUG> return ( getHasPayStudentNumber ( ) ) - ( getInstalmentNotClearStudentNumber ( ) ) ; <END_BUG> } public int getInstalmentClearStudentNumber ( ) { } public int getOnepayClearStudentNumber ( ) { } }

Fix:
return ( getHasPayStudentNumber ( ) ) - ( getNotClearStudentNumber ( ) ) ;
Buggy code:
public class TwitterQuery implements BundleActivator { public void start ( BundleContext context ) throws Exception { Twitter twitter = new Twitter ( ) ; Query query = new Query ( "from:theasf" ) ; try { QueryResult result = twitter . search ( query ) ; List < Tweet > tweets = result . getTweets ( ) ; System . out . println ( ( "hits:" + ( tweets . size ( ) ) ) ) ; <START_BUG> for ( Tweet tweet : result . getTweets ( ) ) { <END_BUG> System . out . println ( ( ( ( tweet . getFromUser ( ) ) + ":" ) + ( StringEscapeUtils . unescapeXml ( tweet . getText ( ) ) ) ) ) ; } } catch ( Exception e ) { e . printStackTrace ( ) ; } } public void stop ( BundleContext context ) throws Exception { } }

Fix:
for ( Tweet tweet : tweets ) {
Buggy code:
public class IndexManager extends JobManager implements IIndexConstants { public static int MAX_FILES_IN_MEMORY = 0 ; public IWorkspace workspace ; Map indexes = new HashMap ( 5 ) ; private Map monitors = new HashMap ( 5 ) ; private boolean needToSave = false ; private static final CRC32 checksumCalculator = new CRC32 ( ) ; private IPath javaPluginLocation = null ; IProject [ ] projectsToCheck = null ; public void activateProcessing ( ) { try { <START_BUG> Thread . currentThread ( ) . sleep ( 10000 ) ; <END_BUG> } catch ( InterruptedException ie ) { } checkIndexConsistency ( ) ; super . activateProcessing ( ) ; } public void addSource ( IFile resource , IPath indexedContainer ) { } public void addBinary ( IFile resource , IPath indexedContainer ) { } public void indexSourceFolder ( JavaProject javaProject , IPath sourceFolder ) { } public void checkIndexConsistency ( ) { } private String computeIndexName ( IPath path ) { } public synchronized IIndex getIndex ( IPath path , boolean reuseExistingFile , boolean createIfMissing ) { } private IPath getJavaPluginWorkingLocation ( ) { } public ReadWriteMonitor getMonitorFor ( IIndex index ) { } public void indexAll ( IProject project ) { } protected synchronized void moveToNextJob ( ) { } protected void notifyIdle ( long idlingTime ) { } public String processName ( ) { } public synchronized IIndex recreateIndex ( IPath path ) { } public void remove ( String resourceName , IPath indexedContainer ) { } public synchronized void removeIndex ( IPath path ) { } public synchronized void removeIndexFamily ( IPath path ) { } public void removeSourceFolderFromIndex ( JavaProject javaProject , IPath sourceFolder ) { } public void reset ( ) { } public void saveIndexes ( ) { } public void shutdown ( ) { } public void indexLibrary ( IPath path , IProject referingProject ) { } }

Fix:
Thread . sleep ( 10000 ) ;
Buggy code:
@ Service ( "entityUpdateServiceImpl" ) public class EntityUpdateServiceImpl extends EntityUpdateBaseServiceImpl { private static final Logger LOGGER = LoggerFactory . getLogger ( EntityUpdateServiceImpl . class ) ; @ Override protected void execute ( Entity entity ) { EntityUpdateServiceImpl . LOGGER . debug ( "update<seq2seq4repair_space>entity..." ) ; getDao ( ) . update ( entity ) ; EntityUpdateServiceImpl . LOGGER . debug ( "update<seq2seq4repair_space>status..." ) ; getDao ( ) . updateStatus ( entity ) ; EntityDto dto = ( ( EntityDto ) ( entity . getDto ( ) ) ) ; updateEntityAddresses ( entity ) ; <START_BUG> updateEntitiesRel ( entity ) ; <END_BUG> updatePublicIds ( dto . getPublicIds ( ) , entity ) ; updateBaseModel ( entity ) ; } @ Override protected Entity convertDtoToModel ( EntityDto dto ) { } @ Override protected ValidationResult validate ( EntityDto entityDto ) { } }

Fix:
updateEntityTels ( entity ) ;
Buggy code:
public class ProgressWindow { private Window parent ; private JDialog jd ; public ProgressWindow ( Window parent ) { } public StatusUpdate prepare ( ) { jd = new JDialog ( parent ) ; jd . setTitle ( TITLE ) ; jd . setResizable ( false ) ; jd . setLayout ( null ) ; jd . getContentPane ( ) . setLayout ( null ) ; jd . setIconImages ( icons ) ; jd . setDefaultCloseOperation ( JFrame . DO_NOTHING_ON_CLOSE ) ; final JProgressBar jp = new JProgressBar ( 0 , 100 ) ; jp . setSize ( new Dimension ( 350 , 35 ) ) ; jp . setLocation ( 0 , 0 ) ; jp . setBorderPainted ( true ) ; jp . setStringPainted ( true ) ; jp . setForeground ( Color . decode ( "#608AEE" ) ) ; jd . add ( jp ) ; final DefaultListModel < String > model = new DefaultListModel < > ( ) ; JList < String > jl = new JList < > ( model ) ; jl . setSelectionModel ( new DefaultListSelectionModel ( ) { private static final long serialVersionUID = 1L ; @ Override public void setSelectionInterval ( int i0 , int i1 ) { super . setSelectionInterval ( ( - 1 ) , ( - 1 ) ) ; } } ) ; model . addElement ( "<seq2seq4repair_space>" ) ; jl . setVisibleRowCount ( 5 ) ; jl . setSize ( new Dimension ( jp . getWidth ( ) , ( ( jl . getPreferredScrollableViewportSize ( ) . height ) + 10 ) ) ) ; jl . setLocation ( 0 , jp . getHeight ( ) ) ; jl . setBorder ( new EmptyBorder ( 5 , 5 , 5 , 5 ) ) ; jd . add ( jl ) ; Dimension thesize = new Dimension ( jp . getWidth ( ) , ( ( jp . getHeight ( ) ) + ( jl . getHeight ( ) ) ) ) ; jd . getContentPane ( ) . setPreferredSize ( thesize ) ; jd . setSize ( thesize ) ; <START_BUG> jd . setLocationRelativeTo ( null ) ; <END_BUG> model . remove ( 0 ) ; return new StatusUpdate ( ) { private boolean active = true ; private WindowListener wl = new WindowAdapter ( ) { @ Override public void windowClosing ( WindowEvent e ) { finished ( ) ; active = false ; } } ; @ Override public void start ( ) { SwingUtilities . invokeLater ( new Runnable ( ) { @ Override public void run ( ) { jd . setVisible ( true ) ; jd . pack ( ) ; jd . setLocationRelativeTo ( null ) ; } } ) ; } @ Override public void finished ( ) { if ( active ) { jd . removeWindowListener ( wl ) ; jd . dispose ( ) ; } } @ Override public void receiveProgress ( int perc ) { jp . setValue ( perc ) ; } @ Override public void receiveDetailsProgress ( int perc ) { } @ Override public void receiveMessageSummary ( String msg ) { receiveMessageDetails ( msg ) ; } @ Override public void receiveMessageDetails ( final String msg ) { SwingUtilities . invokeLater ( new Runnable ( ) { public void run ( ) { try { while ( ( model . size ( ) ) >= 5 ) { model . remove ( 0 ) ; } model . addElement ( msg ) ; } catch ( Exception e ) { e . printStackTrace ( ) ; } } } ) ; } @ Override public boolean isActive ( ) { return active ; } } ; } }

Fix:
jd . setLocationRelativeTo ( parent ) ;
Buggy code:
public class ColaSynchronizer implements SynchronizationStrategy { private final LinkedList unacknowledgedLocalOperations ; private final boolean isInitiator ; private long localOperationsCount ; private long remoteOperationsCount ; private static Map sessionStrategies = new HashMap ( ) ; private ColaSynchronizer ( DocShare docshare ) { } public static ColaSynchronizer getInstanceFor ( DocShare docshare ) { } public static void cleanUpFor ( DocShare docshare ) { } public UpdateMessage registerOutgoingMessage ( UpdateMessage localMsg ) { } public UpdateMessage transformIncomingMessage ( final UpdateMessage remoteMsg ) { if ( ! ( remoteMsg instanceof ColaUpdateMessage ) ) { throw new IllegalArgumentException ( "UpdateMessage<seq2seq4repair_space>is<seq2seq4repair_space>incompatible<seq2seq4repair_space>with<seq2seq4repair_space>Cola<seq2seq4repair_space>SynchronizationStrategy" ) ; } Trace . entering ( PLUGIN_ID , METHODS_ENTERING , this . getClass ( ) , "transformIncomingMessage" , remoteMsg ) ; ColaUpdateMessage transformedRemote = ( ( ColaUpdateMessage ) ( remoteMsg ) ) ; ( remoteOperationsCount ) ++ ; if ( ! ( unacknowledgedLocalOperations . isEmpty ( ) ) ) { for ( final Iterator it = unacknowledgedLocalOperations . iterator ( ) ; it . hasNext ( ) ; ) { ColaUpdateMessage unackedLocalOp = ( ( ColaUpdateMessage ) ( it . next ( ) ) ) ; if ( ( transformedRemote . getRemoteOperationsCount ( ) ) > ( unackedLocalOp . getLocalOperationsCount ( ) ) ) { Trace . trace ( PLUGIN_ID , NLS . bind ( "transformIncomingMessage.removing<seq2seq4repair_space>{0}" , unackedLocalOp ) ) ; it . remove ( ) ; } else { Trace . trace ( PLUGIN_ID , "breaking<seq2seq4repair_space>out<seq2seq4repair_space>of<seq2seq4repair_space>unackedLocalOperations<seq2seq4repair_space>loop" ) ; break ; } } if ( ! ( unacknowledgedLocalOperations . isEmpty ( ) ) ) { ColaUpdateMessage localOp = ( ( ColaUpdateMessage ) ( unacknowledgedLocalOperations . getFirst ( ) ) ) ; <START_BUG> Assert . isTrue ( ( ( transformedRemote . getRemoteOperationsCount ( ) ) == ( localOp . localOperationsCount ) ) ) ; <END_BUG> for ( final Iterator it = unacknowledgedLocalOperations . iterator ( ) ; it . hasNext ( ) ; ) { transformedRemote = transformedRemote . transformAgainst ( ( ( ColaUpdateMessage ) ( it . next ( ) ) ) , isInitiator ) ; } } } Trace . exiting ( PLUGIN_ID , METHODS_EXITING , this . getClass ( ) , "transformIncomingMessage" , transformedRemote ) ; return transformedRemote ; } public String toString ( ) { } }

Fix:
Assert . isTrue ( ( ( transformedRemote . getRemoteOperationsCount ( ) ) == ( localOp . getLocalOperationsCount ( ) ) ) ) ;
Buggy code:
public class TextListenerTest extends TestCase { private JUnitCore runner ; private OutputStream results ; private TextListener listener ; @ Override public void setUp ( ) { } public static class OneTest { @ Test public void one ( ) { } } public void testSuccess ( ) throws Exception { } public static class ErrorTest { @ Test public void error ( ) throws Exception { } } public void testError ( ) throws Exception { } public static class Slow { @ Test public void pause ( ) throws InterruptedException { } } public void testTime ( ) { } private String convert ( String string ) { } public static class IgnoreTest { @ Ignore ( "Antimilos<seq2seq4repair_space>is<seq2seq4repair_space>a<seq2seq4repair_space>Greek<seq2seq4repair_space>island<seq2seq4repair_space>in<seq2seq4repair_space>the<seq2seq4repair_space>Cyclades,<seq2seq4repair_space>and<seq2seq4repair_space>an<seq2seq4repair_space>odd<seq2seq4repair_space>reason<seq2seq4repair_space>to<seq2seq4repair_space>ignore<seq2seq4repair_space>a<seq2seq4repair_space>test." ) @ Test public void failsIfRun ( ) { } } public void testIgnore ( ) { } public static class AssumptionFailureTest { @ Test public void failsAssumption ( ) { } } public void testAssumptionFailureIsReflected ( ) { runner . run ( TextListenerTest . AssumptionFailureTest . class ) ; <START_BUG> Assert . assertThat ( results . toString ( ) , containsString ( "Spain" ) ) ; <END_BUG> } }

Fix:
Assert . assertThat ( results . toString ( ) , both ( containsString ( "Spain" ) ) . and ( containsString ( "INVALID<seq2seq4repair_space>ASSUMPTION<seq2seq4repair_space>1)" ) ) ) ;
Buggy code:
@ Component public class HealthBlockCsvUploadHandler { private StateService stateService ; private DistrictService districtService ; private TalukaService talukaService ; private HealthBlockCsvService healthBlockCsvService ; private HealthBlockService healthBlockService ; private BulkUploadErrLogService bulkUploadErrLogService ; private static Logger logger = LoggerFactory . getLogger ( HealthBlockCsvUploadHandler . class ) ; @ Autowired public HealthBlockCsvUploadHandler ( StateService stateService , DistrictService districtService , TalukaService talukaService , HealthBlockCsvService healthBlockCsvService , HealthBlockService healthBlockService , BulkUploadErrLogService bulkUploadErrLogService ) { } @ MotechListener ( subjects = { LocationConstants . HEALTH_BLOCK_CSV_SUCCESS } ) public void healthBlockCsvSuccess ( MotechEvent motechEvent ) { } private HealthBlock mapHealthBlockCsv ( HealthBlockCsv record ) throws DataValidationException { HealthBlock newRecord = new HealthBlock ( ) ; <START_BUG> String healthBlockName = ParseDataHelper . validateAndParseString ( "TalukaName" , record . getName ( ) , true ) ; <END_BUG> Long stateCode = ParseDataHelper . validateAndParseLong ( "StateCode" , record . getStateCode ( ) , true ) ; Long districtCode = ParseDataHelper . validateAndParseLong ( "DistrictCode" , record . getDistrictCode ( ) , true ) ; Long talukaCode = ParseDataHelper . validateAndParseLong ( "TalukaCode" , record . getTalukaCode ( ) , true ) ; Long healthBlockCode = ParseDataHelper . validateAndParseLong ( "HealthBlockCode" , record . getHealthBlockCode ( ) , true ) ; State state = stateService . findRecordByStateCode ( stateCode ) ; if ( state == null ) { ParseDataHelper . raiseInvalidDataException ( "State" , "StateCode" ) ; } District district = districtService . findDistrictByParentCode ( districtCode , stateCode ) ; if ( district == null ) { ParseDataHelper . raiseInvalidDataException ( "District" , "DistrictCode" ) ; } Taluka taluka = talukaService . findTalukaByParentCode ( stateCode , districtCode , talukaCode ) ; if ( taluka == null ) { ParseDataHelper . raiseInvalidDataException ( "Taluka" , "TalukaCode" ) ; } newRecord . setName ( healthBlockName ) ; newRecord . setStateCode ( stateCode ) ; newRecord . setDistrictCode ( districtCode ) ; newRecord . setTalukaCode ( talukaCode ) ; newRecord . setHealthBlockCode ( healthBlockCode ) ; newRecord . setCreator ( record . getCreator ( ) ) ; newRecord . setOwner ( record . getOwner ( ) ) ; newRecord . setModifiedBy ( record . getModifiedBy ( ) ) ; return newRecord ; } private void processHealthBlockData ( HealthBlock healthBlockData ) throws DataValidationException { } private void updateHealthBlock ( HealthBlock existHealthBlockData , HealthBlock healthBlockData ) { } }

Fix:
String healthBlockName = ParseDataHelper . validateAndParseString ( "HealthBlockName" , record . getName ( ) , true ) ;
Buggy code:
class BSHSwitchStatement extends SimpleNode implements ParserConstants { public BSHSwitchStatement ( int id ) { } public Object eval ( CallStack callstack , Interpreter interpreter ) throws EvalError { int numchild = jjtGetNumChildren ( ) ; int child = 0 ; SimpleNode switchExp = ( ( SimpleNode ) ( jjtGetChild ( ( child ++ ) ) ) ) ; Object switchVal = switchExp . eval ( callstack , interpreter ) ; BSHSwitchLabel label ; Object node ; ReturnControl returnControl = null ; if ( child >= numchild ) <START_BUG> throw new EvalError ( "Empty<seq2seq4repair_space>switch<seq2seq4repair_space>statement..." ) ; <END_BUG> label = ( ( BSHSwitchLabel ) ( jjtGetChild ( ( child ++ ) ) ) ) ; while ( ( child < numchild ) && ( returnControl == null ) ) { if ( ( label . isDefault ) || ( label . eval ( callstack , interpreter ) . equals ( switchVal ) ) ) { while ( child < numchild ) { node = jjtGetChild ( ( child ++ ) ) ; if ( node instanceof BSHSwitchLabel ) continue ; Object value = ( ( SimpleNode ) ( node ) ) . eval ( callstack , interpreter ) ; if ( value instanceof ReturnControl ) { returnControl = ( ( ReturnControl ) ( value ) ) ; break ; } } } else { while ( child < numchild ) { node = jjtGetChild ( ( child ++ ) ) ; if ( node instanceof BSHSwitchLabel ) { label = ( ( BSHSwitchLabel ) ( node ) ) ; break ; } } } } if ( ( returnControl != null ) && ( ( returnControl . kind ) == ( RETURN ) ) ) return returnControl ; else return Primitive . VOID ; } }

Fix:
throw new EvalError ( "Empty<seq2seq4repair_space>switch<seq2seq4repair_space>statement." , this , callstack ) ;
Buggy code:
public class EuclideanIntegerPoint implements Serializable , Clusterable < EuclideanIntegerPoint > { private static final long serialVersionUID = 3946024775784901369L ; private final int [ ] point ; public EuclideanIntegerPoint ( final int [ ] point ) { } public int [ ] getPoint ( ) { } public double distanceFrom ( final EuclideanIntegerPoint p ) { } public EuclideanIntegerPoint centroidOf ( final Collection < EuclideanIntegerPoint > points ) { } @ Override public boolean equals ( final Object other ) { } @ Override public int hashCode ( ) { } @ Override public String toString ( ) { <START_BUG> final StringBuffer buff = new StringBuffer ( "(" ) ; <END_BUG> final int [ ] coordinates = getPoint ( ) ; for ( int i = 0 ; i < ( coordinates . length ) ; i ++ ) { buff . append ( coordinates [ i ] ) ; if ( i < ( ( coordinates . length ) - 1 ) ) { buff . append ( "," ) ; } } buff . append ( ")" ) ; return buff . toString ( ) ; } }

Fix:
final StringBuilder buff = new StringBuilder ( "(" ) ;
Buggy code:
public class PickerView extends View { public static final String TAG = "PickerView" ; public static final float MARGIN_ALPHA = 2.8F ; public static final float SPEED = 2 ; private List < String > mDataList ; private int mCurrentSelected ; private Paint mPaint ; private float mMaxTextSize = 80 ; private float mMinTextSize = 40 ; private float mMaxTextAlpha = 255 ; private float mMinTextAlpha = 120 ; private int mColorText = 3355443 ; private int mViewHeight ; private int mViewWidth ; private float mLastDownY ; private float mMoveLen = 0 ; private boolean isInit = false ; private PickerView . onSelectListener mSelectListener ; private Timer timer ; private PickerView . MyTimerTask mTask ; Handler updateHandler ; public PickerView ( Context context ) { } public PickerView ( Context context , AttributeSet attrs ) { } public void setOnSelectListener ( PickerView . onSelectListener listener ) { } private void performSelect ( ) { } public void setData ( List < String > datas ) { mDataList = datas ; <START_BUG> mCurrentSelected = ( datas . size ( ) ) // 2 ; <END_BUG> invalidate ( ) ; } public void setSelected ( int selected ) { } private void moveHeadToTail ( ) { } private void moveTailToHead ( ) { } @ Override protected void onMeasure ( int widthMeasureSpec , int heightMeasureSpec ) { } private void init ( ) { } @ Override protected void onDraw ( Canvas canvas ) { } private void drawData ( Canvas canvas ) { } private void drawOtherText ( Canvas canvas , int position , int type ) { } private float parabola ( float zero , float x ) { } @ Override public boolean onTouchEvent ( MotionEvent event ) { } private void doDown ( MotionEvent event ) { } private void doMove ( MotionEvent event ) { } private void doUp ( MotionEvent event ) { } class MyTimerTask extends TimerTask { Handler handler ; public MyTimerTask ( Handler handler ) { } @ Override public void run ( ) { } } public interface onSelectListener { void onSelect ( String text ) { } } No newline ; at end ; of file ; }

Fix:
mCurrentSelected = 0 ;
Buggy code:
public class VirtualFolder extends MessageFolder { protected int nextUid ; protected HeaderList headerList ; public VirtualFolder ( FolderItem item , String path ) { } public VirtualFolder ( String name , String type , String path ) { } protected Object generateNextUid ( ) { } public void setNextUid ( int next ) { } public JDialog showFilterDialog ( AbstractMailFrameController frameController ) { } public boolean exists ( Object uid ) throws Exception { } public HeaderList getHeaderList ( ) throws Exception { headerList . clear ( ) ; <START_BUG> getMessageFolderInfo ( ) . clear ( ) ; <END_BUG> applySearch ( ) ; return headerList ; } public void addSearchToHistory ( ) throws Exception { } protected void applySearch ( ) throws Exception { } protected void applySearch ( MessageFolder parent , Filter filter ) throws Exception { } public DefaultSearchEngine getSearchEngine ( ) { } public Filter getFilter ( ) { } public Object getVirtualUid ( MessageFolder parent , Object uid ) throws Exception { } public void add ( ColumbaHeader header , MessageFolder f , Object uid ) throws Exception { } public void markMessage ( Object [ ] uids , int variant ) throws Exception { } protected void removeMessage ( Object uid ) throws Exception { } public MimePart getMimePart ( Object uid , Integer [ ] address ) throws Exception { } public MimeTree getMimePartTree ( Object uid ) throws Exception { } public ColumbaHeader getMessageHeader ( Object uid ) throws Exception { } public ColumbaMessage getMessage ( Object uid , WorkerStatusController worker ) throws Exception { } public Object [ ] searchMessages ( Filter filter , Object [ ] uids ) throws Exception { } public Object [ ] searchMessages ( Filter filter ) throws Exception { } public String getDefaultChild ( ) { } public static XmlElement getDefaultProperties ( ) { } public FolderCommandReference [ ] getCommandReference ( FolderCommandReference [ ] r ) { } public boolean tryToGetLock ( Object locker ) { } public Object [ ] getUids ( ) throws Exception { } public Object addMessage ( InputStream in ) throws Exception { } public Object getAttribute ( Object uid , String key ) throws Exception { } public Flags getFlags ( Object uid ) throws Exception { } public Header getHeaderFields ( Object uid , String [ ] keys ) throws Exception { } public InputStream getMessageSourceStream ( Object uid ) throws Exception { } public InputStream getMimePartBodyStream ( Object uid , Integer [ ] address ) throws Exception { } public InputStream getMimePartSourceStream ( Object uid , Integer [ ] address ) throws Exception { } public boolean supportsAddMessage ( ) { } public boolean supportsAddFolder ( AbstractFolder newFolder ) { } public void innerCopy ( MailboxInterface destFolder , Object [ ] uids ) { } public void setAttribute ( Object uid , String key , Object value ) throws Exception { } public Attributes getAttributes ( Object uid ) throws Exception { } public Object addMessage ( InputStream in , Attributes attributes , Flags flags ) throws Exception { } public HeaderListStorage getHeaderListStorage ( ) { } public boolean supportsMove ( ) { } }

Fix:
getMessageFolderInfo ( ) . reset ( ) ;
Buggy code:
public class WiFiDirectActivity extends ActionBarActivity implements ChannelListener , DeviceActionListener { public static int groupOwnerIntent ; public static final String TAG = "wifidirectdemo" ; private WifiP2pManager manager ; private boolean isWifiP2pEnabled = false ; private boolean retryChannel = false ; private boolean isHost = false ; private final IntentFilter intentFilter = new IntentFilter ( ) ; private Channel channel ; private BroadcastReceiver receiver = null ; private WifiP2pDnsSdServiceRequest serviceRequest ; final HashMap < String , String > buddies = new HashMap < String , String > ( ) ; public void setIsWifiP2pEnabled ( boolean isWifiP2pEnabled ) { } @ Override protected void onCreate ( Bundle savedInstanceState ) { super . onCreate ( savedInstanceState ) ; <START_BUG> setContentView ( main ) ; <END_BUG> Toolbar toolbar = ( ( Toolbar ) ( findViewById ( wifidirect_toolbar ) ) ) ; setSupportActionBar ( toolbar ) ; getSupportActionBar ( ) . setDisplayHomeAsUpEnabled ( true ) ; intentFilter . addAction ( WIFI_P2P_STATE_CHANGED_ACTION ) ; intentFilter . addAction ( WIFI_P2P_PEERS_CHANGED_ACTION ) ; intentFilter . addAction ( WIFI_P2P_CONNECTION_CHANGED_ACTION ) ; intentFilter . addAction ( WIFI_P2P_THIS_DEVICE_CHANGED_ACTION ) ; manager = ( ( WifiP2pManager ) ( getSystemService ( WIFI_P2P_SERVICE ) ) ) ; channel = manager . initialize ( this , getMainLooper ( ) , null ) ; isHost = getIntent ( ) . getBooleanExtra ( "isHost" , false ) ; if ( isHost ) { WiFiDirectActivity . groupOwnerIntent = 15 ; server . getServer ( ) . start ( ) ; } } @ Override public void onResume ( ) { } @ Override public void onPause ( ) { } public void initiateDiscoverPeers ( ) { } private static String getWiFiP2pFailureMessage ( int errorCode ) { } public void resetData ( ) { } @ Override public boolean onCreateOptionsMenu ( Menu menu ) { } @ Override public boolean onOptionsItemSelected ( MenuItem item ) { } @ Override public void showDetails ( WifiP2pDevice device ) { } @ Override public void connect ( WifiP2pConfig config ) { } @ Override public void disconnect ( ) { } @ Override public void onChannelDisconnected ( ) { } @ Override public void cancelDisconnect ( ) { } }

Fix:
setContentView ( peerdiscovery ) ;