nus-yam/ex-repair huggingface dataset:
Buggy code:
public class GoGenElementToDerived implements TreeModelPrereqs { public String toString ( ) { <START_BUG> return Localizer . localize ( "Tree" , "Class->Subclass" ) ; <END_BUG> } public Object getRoot ( ) { } public Object getChild ( Object parent , int index ) { } public int getChildCount ( Object parent ) { } public int getIndexOfChild ( Object parent , Object child ) { } public boolean isLeaf ( Object node ) { } public void valueForPathChanged ( TreePath path , Object newValue ) { } public void addTreeModelListener ( TreeModelListener l ) { } public void removeTreeModelListener ( TreeModelListener l ) { } public Vector getPrereqs ( ) { } public Vector getProvidedTypes ( ) { } }

Fix:
return Localizer . localize ( "Tree" , "misc.class.subclass" ) ;
Buggy code:
public class FilePathSpecification extends RamlSpecification { private final String filePath ; public FilePathSpecification ( String name , String filePath ) { } @ Override protected Raml getRaml ( ) { try { File file = new File ( filePath ) ; if ( ! ( file . exists ( ) ) ) throw new IllegalArgumentException ( String . format ( "[<seq2seq4repair_space>%s<seq2seq4repair_space>]<seq2seq4repair_space>does<seq2seq4repair_space>not<seq2seq4repair_space>exist." , file . getPath ( ) ) ) ; if ( ( file . exists ( ) ) && ( ! ( file . canRead ( ) ) ) ) throw new IllegalStateException ( String . format ( "[<seq2seq4repair_space>%s<seq2seq4repair_space>]<seq2seq4repair_space>cannot<seq2seq4repair_space>be<seq2seq4repair_space>read." , file . getPath ( ) ) ) ; if ( ( file . exists ( ) ) && ( ! ( file . isFile ( ) ) ) ) throw new IllegalArgumentException ( String . format ( "[<seq2seq4repair_space>%s<seq2seq4repair_space>]<seq2seq4repair_space>is<seq2seq4repair_space>not<seq2seq4repair_space>a<seq2seq4repair_space>file." , file . getPath ( ) ) ) ; ResourceLoader loader = new FileResourceLoader ( file . getParent ( ) ) ; <START_BUG> return new org . raml . parser . visitor . RamlDocumentBuilder ( loader ) . build ( FileUtils . readFileToString ( file ) , file . getParent ( ) ) ; <END_BUG> } catch ( IOException e ) { throw new RuntimeException ( e ) ; } } }

Fix:
return new org . raml . parser . visitor . RamlDocumentBuilder ( loader ) . build ( FileUtils . readFileToString ( file ) , "//" ) ;
Buggy code:
public class ExtractFeature { private MultivariateStatisticalSummary summary ; public ExtractFeature ( JavaRDD < Vector > data ) { } public double [ ] computeAvgAcc ( ) { } public double [ ] computeVariance ( ) { } public static double [ ] computeAvgAbsDifference ( JavaRDD < Double [ ] > data , double [ ] mean ) { } public static double computeResultantAcc ( JavaRDD < Double [ ] > data ) { } public Double computeAvgTimeBetweenPeak ( JavaRDD < Long [ ] > data ) { double [ ] max = this . summary . max ( ) . toArray ( ) ; JavaRDD < Long > filtered_y = data . filter ( ( record ) -> ( record [ 1 ] ) > ( 0.9 * ( max [ 0 ] ) ) ) . map ( ( record ) -> record [ 0 ] ) . sortBy ( ( time ) -> time , true , 1 ) ; <START_BUG> if ( ( filtered_y . count ( ) ) > 0 ) { <END_BUG> Long firstElement = filtered_y . first ( ) ; Long lastElement = filtered_y . sortBy ( ( time ) -> time , false , 1 ) . first ( ) ; JavaRDD < Long > firstRDD = filtered_y . filter ( ( record ) -> record > firstElement ) ; JavaRDD < Long > secondRDD = filtered_y . filter ( ( record ) -> record < lastElement ) ; JavaRDD < Vector > product = firstRDD . cartesian ( secondRDD ) . map ( ( pair ) -> ( pair . _1 ( ) ) - ( pair . _2 ( ) ) ) . filter ( ( value ) -> value > 0 ) . map ( ( line ) -> Vectors . dense ( line ) ) ; return Statistics . colStats ( product . rdd ( ) ) . mean ( ) . toArray ( ) [ 0 ] ; } return 0.0 ; } No newline ; at end ; of file ; }

Fix:
if ( ( filtered_y . count ( ) ) > 1 ) {
Buggy code:
@ Service public class ApplyServiceImpl implements ApplyService { @ Resource private ApplyDao applyDao ; @ Resource private CourseDao courseDao ; @ Resource private ScheduleDao scheduleDao ; @ Resource private NoticeDao noticeDao ; @ Resource private UserDao userDao ; @ Resource private LabDao labDao ; @ Override public void addApply ( final Apply apply ) { } @ Override public List < Apply > getAllApply ( final Integer uid ) { } private static final int dayOfWeeks = 7 ; private static final int orders = 12 ; @ Override public Map < String , Object > getCourseDisplayByLabId ( final Integer labId ) { } @ Override public Map < String , Object > getCourseDisplayByCourse ( final Integer userId ) { } @ Override public Map < String , Object > getCourseDisplayByLab ( final Integer labId ) { } @ Override public void applyChangeState ( final Integer applyId , final Integer state ) { applyDao . applyChangeState ( applyId , state ) ; noticeDao . noticeStateChange ( applyId , state ) ; Notice no = noticeDao . getNoticeByApply ( applyId ) ; Notice notice = new Notice ( ) ; <START_BUG> notice . setState ( 1 ) ; <END_BUG> notice . setApplyId ( applyId ) ; notice . setTargetUser ( no . getUserId ( ) ) ; notice . setUserId ( no . getTargetUser ( ) ) ; notice . setCourseId ( no . getCourseId ( ) ) ; notice . setLabId ( no . getLabId ( ) ) ; noticeDao . addNotice ( notice ) ; } }

Fix:
notice . setState ( state ) ;
Buggy code:
public class TableColumn extends Item { Table parent ; boolean resizable ; public TableColumn ( Table parent , int style ) { } public TableColumn ( Table parent , int style , int index ) { } public void addControlListener ( ControlListener listener ) { } public void addSelectionListener ( SelectionListener listener ) { } static int checkStyle ( int style ) { } protected void checkSubclass ( ) { } public int getAlignment ( ) { } String getNameText ( ) { } public Table getParent ( ) { } public boolean getResizable ( ) { } public int getWidth ( ) { } public void pack ( ) { checkWidget ( ) ; int index = parent . indexOf ( this ) ; if ( index == ( - 1 ) ) return ; int hwnd = parent . handle ; TCHAR buffer = new TCHAR ( parent . getCodePage ( ) , text , true ) ; <START_BUG> int headerWidth = ( OS . SendMessage ( hwnd , LVM_GETSTRINGWIDTH , 0 , buffer ) ) + 10 ; <END_BUG> if ( ( image ) != null ) { int margin = 0 ; if ( ( OS . COMCTL32_VERSION ) >= ( OS . VERSION ( 5 , 80 ) ) ) { int hwndHeader = OS . SendMessage ( hwnd , LVM_GETHEADER , 0 , 0 ) ; margin = OS . SendMessage ( hwndHeader , HDM_GETBITMAPMARGIN , 0 , 0 ) ; } else { margin = ( OS . GetSystemMetrics ( SM_CXEDGE ) ) * 3 ; } Rectangle rect = image . getBounds ( ) ; headerWidth += ( rect . width ) + ( margin * 2 ) ; } if ( ( ( parent . style ) & ( SWT . VIRTUAL ) ) != 0 ) { if ( ( image ) == null ) { OS . SendMessage ( hwnd , LVM_SETCOLUMNWIDTH , index , LVSCW_AUTOSIZE_USEHEADER ) ; } else { OS . SendMessage ( hwnd , LVM_SETCOLUMNWIDTH , index , headerWidth ) ; } } else { OS . SendMessage ( hwnd , LVM_SETCOLUMNWIDTH , index , LVSCW_AUTOSIZE ) ; int columnWidth = OS . SendMessage ( hwnd , LVM_GETCOLUMNWIDTH , index , 0 ) ; if ( ( index == 0 ) && ( ( parent . imageList ) == null ) ) columnWidth += 2 ; if ( headerWidth > columnWidth ) { if ( ( image ) == null ) { OS . SendMessage ( hwnd , LVM_SETCOLUMNWIDTH , index , LVSCW_AUTOSIZE_USEHEADER ) ; } else { OS . SendMessage ( hwnd , LVM_SETCOLUMNWIDTH , index , headerWidth ) ; } } else { if ( index == 0 ) { OS . SendMessage ( hwnd , LVM_SETCOLUMNWIDTH , index , columnWidth ) ; } } } } void releaseChild ( ) { } void releaseWidget ( ) { } public void removeControlListener ( ControlListener listener ) { } public void removeSelectionListener ( SelectionListener listener ) { } public void setAlignment ( int alignment ) { } public void setImage ( Image image ) { } public void setResizable ( boolean resizable ) { } public void setText ( String string ) { } public void setWidth ( int width ) { } }

Fix:
int headerWidth = ( OS . SendMessage ( hwnd , LVM_GETSTRINGWIDTH , 0 , buffer ) ) + ( Table . HEADER_MARGIN ) ;
Buggy code:
public class InterleavedSubsystemTestCase { private ServiceContainer container ; @ Before public void setupController ( ) throws InterruptedException { } @ After public void shutdownServiceContainer ( ) { } @ Test public void testInterleavedOps ( ) throws Exception { } public static class InterleavedSubsystemModelControllerService extends ModelControllerImplUnitTestCase . ModelControllerService { InterleavedSubsystemModelControllerService ( final ControlledProcessState processState ) { } @ Override protected void initModel ( Resource rootResource , ManagementResourceRegistration rootRegistration ) { } } private static class FakeExtensionAddHandler extends ExtensionAddHandler { private final ManagementResourceRegistration rootRegistration ; private FakeExtensionAddHandler ( ManagementResourceRegistration rootRegistration ) { } @ Override public void execute ( OperationContext context , ModelNode operation ) throws OperationFailedException { Resource resource = context . createResource ( EMPTY_ADDRESS ) ; final PathAddress address = PathAddress . pathAddress ( operation . get ( OP_ADDR ) ) ; String module = address . getLastElement ( ) . getValue ( ) ; resource . getModel ( ) . get ( MODULE ) . set ( module ) ; ManagementResourceRegistration subsystem = rootRegistration . registerSubModel ( PathElement . pathElement ( SUBSYSTEM , module ) , DESC_PROVIDER ) ; subsystem . registerOperationHandler ( "add" , new InterleavedSubsystemTestCase . FakeSubsystemAddHandler ( ) , DESC_PROVIDER ) ; <START_BUG> context . completeStep ( NOOP_ROLLBACK_HANDLER ) ; <END_BUG> } } private static class FakeSubsystemAddHandler extends AbstractAddStepHandler { @ Override protected void populateModel ( ModelNode operation , ModelNode model ) throws OperationFailedException { } } private static class InterleavedConfigurationPersister extends AbstractConfigurationPersister { private static final InterleavedSubsystemTestCase . InterleavedConfigurationPersister INSTANCE = new InterleavedSubsystemTestCase . InterleavedConfigurationPersister ( ) ; private InterleavedConfigurationPersister ( ) { } @ Override public PersistenceResource store ( final ModelNode model , Set < PathAddress > affectedAddresses ) { } @ Override public List < ModelNode > load ( ) { } private static class NullPersistenceResource implements ConfigurationPersister . PersistenceResource { private static final InterleavedSubsystemTestCase . InterleavedConfigurationPersister . NullPersistenceResource INSTANCE = new InterleavedSubsystemTestCase . InterleavedConfigurationPersister . NullPersistenceResource ( ) ; @ Override public void commit ( ) { } @ Override public void rollback ( ) { } } } }

Fix:
context . stepCompleted ( ) ;
Buggy code:
public class Input extends Task { private String validargs = null ; private String message = "" ; private String addproperty = null ; private String input = null ; public Input ( ) { } public void setAddproperty ( String addproperty ) { } public void setMessage ( String message ) { } public void setTestinput ( String testinput ) { } public void setValidargs ( String validargs ) { } public void addText ( String msg ) throws TaskException { } public void execute ( ) throws TaskException { Vector accept = null ; if ( ( validargs ) != null ) { accept = new Vector ( ) ; StringTokenizer stok = new StringTokenizer ( validargs , "," , false ) ; while ( stok . hasMoreTokens ( ) ) { accept . addElement ( stok . nextToken ( ) ) ; } } log ( message , MSG_WARN ) ; if ( ( input ) == null ) { try { BufferedReader in = new BufferedReader ( new InputStreamReader ( System . in ) ) ; input = in . readLine ( ) ; if ( accept != null ) { while ( ! ( accept . contains ( input ) ) ) { log ( message , MSG_WARN ) ; input = in . readLine ( ) ; } } } catch ( IOException e ) { throw new TaskException ( "Failed<seq2seq4repair_space>to<seq2seq4repair_space>read<seq2seq4repair_space>input<seq2seq4repair_space>from<seq2seq4repair_space>Console." , e ) ; } } else { if ( ( accept != null ) && ( ! ( accept . contains ( input ) ) ) ) { throw new TaskException ( "Invalid<seq2seq4repair_space>input<seq2seq4repair_space>please<seq2seq4repair_space>reenter." ) ; } } if ( ( addproperty ) != null ) { if ( ( project . getProperty ( addproperty ) ) == null ) { <START_BUG> project . setProperty ( addproperty , input ) ; <END_BUG> } else { log ( ( "Override<seq2seq4repair_space>ignored<seq2seq4repair_space>for<seq2seq4repair_space>" + ( addproperty ) ) , MSG_VERBOSE ) ; } } } }

Fix:
setProperty ( addproperty , input ) ;
Buggy code:
public class ClientPreferencePage extends FieldEditorPreferencePage implements IWorkbenchPreferencePage { public static final String CONTAINER_TYPE = "CONTAINER_TYPE" ; public static final String TARGET_SERVER = "TARGET_SERVER" ; public static final String CHANNEL_ID = "CHANNEL_ID" ; public static final String LOCAL_NAME = "LOCAL_NAME" ; protected void performDefaults ( ) { super . performDefaults ( ) ; <START_BUG> getPreferenceStore ( ) . setDefault ( ClientPreferencePage . CONTAINER_TYPE , "ecf.generic.channel" ) ; <END_BUG> getPreferenceStore ( ) . setDefault ( ClientPreferencePage . TARGET_SERVER , "ecftcp:////localhost:3282//server" ) ; getPreferenceStore ( ) . setDefault ( ClientPreferencePage . CHANNEL_ID , "collab.editor" ) ; try { getPreferenceStore ( ) . setDefault ( ClientPreferencePage . LOCAL_NAME , Inet4Address . getLocalHost ( ) . getHostName ( ) ) ; } catch ( UnknownHostException e ) { Activator . getDefault ( ) . getLog ( ) . log ( new Status ( IStatus . ERROR , Activator . PLUGIN_ID , 0 , e . getLocalizedMessage ( ) , e ) ) ; } } public ClientPreferencePage ( ) { } public void createFieldEditors ( ) { } public void init ( IWorkbench workbench ) { } public void initializeDefaults ( ) { } }

Fix:
getPreferenceStore ( ) . setDefault ( ClientPreferencePage . CONTAINER_TYPE , "ecf.generic.client" ) ;
Buggy code:
public final class BlackboardPostEvent extends AutopsyEvent implements Serializable { private static final long serialVersionUID = 1L ; private static final Logger logger = Logger . getLogger ( BlackboardPostEvent . class . getName ( ) ) ; private transient ModuleDataEvent eventData ; public BlackboardPostEvent ( AutopsyEvent . SourceType sourceType , ModuleDataEvent eventData ) { } @ Override public Object getOldValue ( ) { if ( null != ( eventData ) ) { return eventData ; } try { BlackboardPostEvent . SerializableEventData data = ( ( BlackboardPostEvent . SerializableEventData ) ( super . getOldValue ( ) ) ) ; Collection < BlackboardArtifact > artifacts = new ArrayList < > ( ) ; for ( Long id : data . artifactIds ) { <START_BUG> Case . getCurrentCase ( ) . getSleuthkitCase ( ) . getBlackboardArtifact ( id ) ; <END_BUG> } eventData = new ModuleDataEvent ( data . moduleName , data . artifactType , artifacts ) ; return eventData ; } catch ( IllegalStateException | TskCoreException ex ) { BlackboardPostEvent . logger . log ( Level . SEVERE , "Error<seq2seq4repair_space>doing<seq2seq4repair_space>lazy<seq2seq4repair_space>load<seq2seq4repair_space>for<seq2seq4repair_space>remote<seq2seq4repair_space>event" , ex ) ; return null ; } } @ Immutable private static final class SerializableEventData implements Serializable { private static final long serialVersionUID = 1L ; private final String moduleName ; private ARTIFACT_TYPE artifactType ; private Collection < Long > artifactIds ; private SerializableEventData ( String moduleName , ARTIFACT_TYPE artifactType , Collection < Long > artifactIds ) { } } }

Fix:
artifacts . add ( Case . getCurrentCase ( ) . getSleuthkitCase ( ) . getBlackboardArtifact ( id ) ) ;
Buggy code:
public class TestPredicatedList < E > extends AbstractTestList < E > { public TestPredicatedList ( String testName ) { } protected Predicate < E > truePredicate = org . apache . commons . collections . functors . TruePredicate . < E > truePredicate ( ) ; protected List < E > decorateList ( List < E > list , Predicate < E > predicate ) { <START_BUG> return PredicatedList . decorate ( list , predicate ) ; <END_BUG> } @ Override public List < E > makeObject ( ) { } @ Override @ SuppressWarnings ( "unchecked" ) public E [ ] getFullElements ( ) { } protected Predicate < E > testPredicate = new Predicate < E > ( ) { public boolean evaluate ( E o ) { } } ; public List < E > makeTestList ( ) { } @ SuppressWarnings ( "unchecked" ) public void testIllegalAdd ( ) { } @ SuppressWarnings ( "unchecked" ) public void testIllegalAddAll ( ) { } @ SuppressWarnings ( "unchecked" ) public void testIllegalSet ( ) { } @ SuppressWarnings ( "unchecked" ) public void testLegalAddAll ( ) { } @ Override public String getCompatibilityVersion ( ) { } }

Fix:
return PredicatedList . predicatedList ( list , predicate ) ;
Buggy code:
public class HintedHandOffManager { public static final HintedHandOffManager instance = new HintedHandOffManager ( ) ; private static final Logger logger_ = LoggerFactory . getLogger ( HintedHandOffManager . class ) ; public static final String HINTS_CF = "HintsColumnFamily" ; private static final int PAGE_SIZE = 10000 ; private static final String SEPARATOR = "-" ; private final NonBlockingHashSet < InetAddress > queuedDeliveries = new NonBlockingHashSet < InetAddress > ( ) ; private final ExecutorService executor_ = new org . apache . cassandra . concurrent . JMXEnabledThreadPoolExecutor ( "HintedHandoff" , DatabaseDescriptor . getCompactionThreadPriority ( ) ) ; private static boolean sendMessage ( InetAddress endpoint , String tableName , String cfName , ByteBuffer key ) throws IOException { } private static void deleteHintKey ( ByteBuffer endpointAddress , ByteBuffer key , ByteBuffer tableCF , long timestamp ) throws IOException { } public static void deleteHintsForEndPoint ( InetAddress endpoint ) { } private static boolean pagingFinished ( ColumnFamily hintColumnFamily , ByteBuffer startColumn ) { } public static ByteBuffer makeCombinedName ( String tableName , String columnFamily ) { } private static String [ ] getTableAndCFNames ( ByteBuffer joined ) { int index ; index = ArrayUtils . lastIndexOf ( joined . array ( ) , HintedHandOffManager . SEPARATOR . getBytes ( ) [ 0 ] , ( ( joined . position ( ) ) + ( joined . arrayOffset ( ) ) ) ) ; if ( index < 1 ) throw new RuntimeException ( ( "Corrupted<seq2seq4repair_space>hint<seq2seq4repair_space>name<seq2seq4repair_space>" + ( joined . toString ( ) ) ) ) ; String [ ] parts = new String [ 2 ] ; parts [ 0 ] = new String ( ArrayUtils . subarray ( joined . array ( ) , ( ( joined . position ( ) ) + ( joined . arrayOffset ( ) ) ) , index ) ) ; <START_BUG> parts [ 1 ] = new String ( ArrayUtils . subarray ( joined . array ( ) , ( index + 1 ) , joined . limit ( ) ) ) ; <END_BUG> return parts ; } private void deliverHintsToEndpoint ( InetAddress endpoint ) throws IOException , TimeoutException , DigestMismatchException , InvalidRequestException { } public static void renameHints ( String oldTable , String newTable ) throws IOException { } public void deliverHints ( final InetAddress to ) { } public void deliverHints ( String to ) throws UnknownHostException { } }

Fix:
parts [ 1 ] = new String ( ArrayUtils . subarray ( joined . array ( ) , ( index + 1 ) , ( ( joined . limit ( ) ) + ( joined . arrayOffset ( ) ) ) ) ) ;
Buggy code:
@ RestController @ RequestMapping ( "//api//activity" ) public class ActivityController { private final ActivityService activityService ; @ Autowired public ActivityController ( final ActivityService activityService ) { } @ RequestMapping ( method = RequestMethod . GET , produces = "application//json" ) @ ResponseBody public List < Activity > findAllActivities ( ) { } @ RequestMapping ( value = "//{id}" , method = RequestMethod . GET , produces = "application//json" ) public Activity getById ( @ PathVariable final int id ) { } @ RequestMapping ( method = RequestMethod . POST , consumes = "application//json" ) public void createActivity ( @ RequestBody final Activity activity ) { } @ RequestMapping ( method = RequestMethod . PUT , consumes = "application//json" ) public void updateActivity ( @ RequestBody final Activity activity ) { } @ RequestMapping ( method = RequestMethod . DELETE , consumes = "application//json" ) public void deleteActivity ( @ RequestBody final Activity activity ) { } <START_BUG> @ RequestMapping ( value = "//{id}" , method = RequestMethod . DELETE , consumes = "application//json" ) <END_BUG> public void deleteActivityById ( @ PathVariable final int id ) { activityService . deleteById ( id ) ; } }

Fix:
@ RequestMapping ( value = "//{id}" , method = RequestMethod . DELETE )
Buggy code:
public class Lan { public enum Lanetype { SERIE ( "Serielån" ) , ANNUITET ( "Annuitetslån" ) ; private String tekst ; Lanetype ( String value ) { } public String getTekst ( ) { } public static Lan . Lanetype getByValue ( String value ) { for ( final Lan . Lanetype element : EnumSet . allOf ( Lan . Lanetype . class ) ) { <START_BUG> if ( element . toString ( ) . equals ( value ) ) { <END_BUG> return element ; } } return null ; } } private int lanebelop ; private int lopetid ; private int arligeTerminer ; private Lan . Lanetype lanetype ; private float renteFaktor ; private Termin [ ] terminer ; public Lan ( int lanebelop , int lopetid , int arligeTerminer , Lan . Lanetype lanetype , float renteSats ) { } public static String [ ] getLanetyper ( ) { } public void lagPlan ( ) { } private int calcRenter ( long restGjeld , float renteFaktor , int arligeTerminer ) { } public Termin getTermin ( int i ) { } @ Override public String toString ( ) { } }

Fix:
if ( element . getTekst ( ) . equals ( value ) ) {
Buggy code:
public class SN { public static long machineId ; private static long numBits ; public static final String NAMESPACE = "http:////www.ldbc.eu//ldbc_socialnet//1.0//data//" ; public static final String PREFIX = "sn:" ; public static final String BLANK_NODE = "_:" ; private static long minDate ; private static long maxDate ; public static void initialize ( ) { SN . minDate = dates . getStartDateTime ( ) ; SN . maxDate = dates . getMaxDateTime ( ) ; <START_BUG> SN . numBits = ( ( int ) ( Math . ceil ( ( ( Math . log10 ( numThreads ) ) // ( Math . log10 ( 2 ) ) ) ) ) ) ; <END_BUG> if ( ( SN . numBits ) > 14 ) System . out . print ( "WARNING:<seq2seq4repair_space>Possible<seq2seq4repair_space>id<seq2seq4repair_space>overlapp" ) ; } public static String prefixed ( String string ) { } public static String getUrl ( String string ) { } public static String fullprefixed ( String string ) { } public static String getPersonURI ( long id ) { } public static String getForumURI ( long id ) { } public static String getPostURI ( long id ) { } public static String getCommentURI ( long id ) { } public static String getMembershipURI ( long id ) { } public static String getLikeURI ( long id ) { } public static String getStudyAtURI ( long id ) { } public static String getWorkAtURI ( long id ) { } public static String getKnowsURI ( long id ) { } public static Long formId ( long id ) { } public static long composeId ( long id , long date ) { } No newline ; at end ; of file ; }

Fix:
SN . numBits = ( ( int ) ( Math . ceil ( ( ( Math . log10 ( Math . ceil ( ( ( DatagenParams . numPersons ) // ( ( double ) ( DatagenParams . blockSize ) ) ) ) ) ) // ( Math . log10 ( 2 ) ) ) ) ) ) ;
Buggy code:
public class SSHExec extends SSHBase { private String command = null ; private long maxwait = 0 ; private Thread thread = null ; private String outputProperty = null ; private File outputFile = null ; private boolean append = false ; private Resource commandResource = null ; private static final String TIMEOUT_MESSAGE = "Timeout<seq2seq4repair_space>period<seq2seq4repair_space>exceeded,<seq2seq4repair_space>connection<seq2seq4repair_space>dropped." ; public SSHExec ( ) { } public void setCommand ( String command ) { } public void setCommandResource ( String f ) { } public void setTimeout ( long timeout ) { } public void setOutput ( File output ) { } public void setAppend ( boolean append ) { } public void setOutputproperty ( String property ) { } public void execute ( ) throws BuildException { if ( ( getHost ( ) ) == null ) { throw new BuildException ( "Host<seq2seq4repair_space>is<seq2seq4repair_space>required." ) ; } if ( ( getUserInfo ( ) . getName ( ) ) == null ) { throw new BuildException ( "Username<seq2seq4repair_space>is<seq2seq4repair_space>required." ) ; } if ( ( ( getUserInfo ( ) . getKeyfile ( ) ) == null ) && ( ( getUserInfo ( ) . getPassword ( ) ) == null ) ) { throw new BuildException ( "Password<seq2seq4repair_space>or<seq2seq4repair_space>Keyfile<seq2seq4repair_space>is<seq2seq4repair_space>required." ) ; } if ( ( ( command ) == null ) && ( ( commandResource ) == null ) ) { <START_BUG> throw new BuildException ( "Command<seq2seq4repair_space>or<seq2seq4repair_space>commandFile<seq2seq4repair_space>is<seq2seq4repair_space>required." ) ; <END_BUG> } if ( ( command ) != null ) { executeCommand ( command ) ; } else { try { BufferedReader br = new BufferedReader ( new InputStreamReader ( commandResource . getInputStream ( ) ) ) ; String cmd ; while ( ( cmd = br . readLine ( ) ) != null ) { log ( ( "cmd<seq2seq4repair_space>:<seq2seq4repair_space>" + cmd ) , MSG_INFO ) ; executeCommand ( cmd ) ; } FileUtils . close ( br ) ; } catch ( IOException e ) { throw new BuildException ( e ) ; } } } private void executeCommand ( String cmd ) throws BuildException { } private void writeToFile ( String from , boolean append , File to ) throws IOException { } }

Fix:
throw new BuildException ( "Command<seq2seq4repair_space>or<seq2seq4repair_space>commandResource<seq2seq4repair_space>is<seq2seq4repair_space>required." ) ;
Buggy code:
public class Group extends Composite { String text = "" ; static final int CLIENT_INSET = 3 ; static final int GroupProc ; static final TCHAR GroupClass = new TCHAR ( 0 , ( OS . IsWinCE ? "BUTTON" : "SWT_GROUP" ) , true ) ; public Group ( Composite parent , int style ) { } int callWindowProc ( int hwnd , int msg , int wParam , int lParam ) { } static int checkStyle ( int style ) { } protected void checkSubclass ( ) { } public Point computeSize ( int wHint , int hHint , boolean changed ) { } public Rectangle computeTrim ( int x , int y , int width , int height ) { checkWidget ( ) ; Rectangle trim = super . computeTrim ( x , y , width , height ) ; int newFont ; int oldFont = 0 ; int hDC = OS . GetDC ( handle ) ; newFont = OS . SendMessage ( handle , WM_GETFONT , 0 , 0 ) ; if ( newFont != 0 ) oldFont = OS . SelectObject ( hDC , newFont ) ; TEXTMETRIC tm = ( OS . IsUnicode ) ? ( ( TEXTMETRIC ) ( new TEXTMETRICW ( ) ) ) : new TEXTMETRICA ( ) ; OS . GetTextMetrics ( hDC , tm ) ; if ( newFont != 0 ) OS . SelectObject ( hDC , oldFont ) ; OS . ReleaseDC ( handle , hDC ) ; int offsetY = ( ( ( OS . COMCTL32_MAJOR ) >= 6 ) && ( OS . IsAppThemed ( ) ) ) ? 0 : 1 ; trim . x -= Group . CLIENT_INSET ; trim . y -= ( tm . tmHeight ) + offsetY ; trim . width += ( Group . CLIENT_INSET ) * 2 ; <START_BUG> trim . height += ( tm . tmHeight ) + ( Group . CLIENT_INSET ) ; <END_BUG> return trim ; } void createHandle ( ) { } void enableWidget ( boolean enabled ) { } public Rectangle getClientArea ( ) { } String getNameText ( ) { } public String getText ( ) { } boolean mnemonicHit ( char key ) { } boolean mnemonicMatch ( char key ) { } void printWidget ( int hwnd , int hdc , GC gc ) { } void releaseWidget ( ) { } public void setFont ( Font font ) { } public void setText ( String string ) { } int widgetStyle ( ) { } TCHAR windowClass ( ) { } int windowProc ( ) { } LRESULT WM_ERASEBKGND ( int wParam , int lParam ) { } LRESULT WM_NCHITTEST ( int wParam , int lParam ) { } LRESULT WM_MOUSEMOVE ( int wParam , int lParam ) { } LRESULT WM_PRINTCLIENT ( int wParam , int lParam ) { } LRESULT WM_UPDATEUISTATE ( int wParam , int lParam ) { } LRESULT WM_WINDOWPOSCHANGING ( int wParam , int lParam ) { } }

Fix:
trim . height += ( ( tm . tmHeight ) + ( Group . CLIENT_INSET ) ) + offsetY ;
Buggy code:
public class SettingsTest extends ApplicationTestCase < Application > { private SharedPreferences sp = null ; public SettingsTest ( ) { } protected void setUp ( ) throws Exception { } public void testUnit ( ) { } public void testDateEU ( ) { <START_BUG> assertEquals ( "dd.MM.yyyy" , sp . getString ( "date" , "dd.MM.yyyy" ) ) ; <END_BUG> } public void testInterval ( ) { } public void testType ( ) { } No newline ; at end ; of file ; }

Fix:
assertEquals ( "dd.MM.yyyy<seq2seq4repair_space>HH:mm:ss" , sp . getString ( "date" , "dd.MM.yyyy<seq2seq4repair_space>HH:mm:ss" ) ) ;
Buggy code:
public class NavigationDrawerAdapter extends BaseAdapter { private ArrayList < String > mData = new ArrayList < String > ( ) ; private static final int TYPE_ITEM = 0 ; private static final int TYPE_SUBLIST = 1 ; private static final int TYPE_MAX_COUNT = ( NavigationDrawerAdapter . TYPE_SUBLIST ) + 1 ; private LayoutInflater mInflater ; private TreeSet mSublistSet = new TreeSet ( ) ; public NavigationDrawerAdapter ( Context context , int rawItemsPath ) { } @ Override public int getCount ( ) { } public void addItem ( final String item ) { } public void addSublistItem ( final String item ) { } @ Override public int getItemViewType ( int position ) { } @ Override public int getViewTypeCount ( ) { } @ Override public Object getItem ( int position ) { } @ Override public long getItemId ( int position ) { } @ Override public View getView ( int position , View convertView , ViewGroup viewGroup ) { <START_BUG> NavigationDrawerAdapter . ViewHolder holder = null ; <END_BUG> int type = getItemViewType ( position ) ; if ( convertView == null ) { holder = new NavigationDrawerAdapter . ViewHolder ( ) ; switch ( type ) { case NavigationDrawerAdapter . TYPE_ITEM : convertView = mInflater . inflate ( navigation_drawer_item , null ) ; holder . textView = ( ( TextView ) ( convertView . findViewById ( R . id . navigation_drawer_item ) ) ) ; break ; case NavigationDrawerAdapter . TYPE_SUBLIST : convertView = mInflater . inflate ( navigation_drawer_item_show_sublist , null ) ; holder . textView = ( ( TextView ) ( convertView . findViewById ( R . id . navigation_drawer_item_show_sublist ) ) ) ; break ; } convertView . setTag ( holder ) ; } else { holder = ( ( NavigationDrawerAdapter . ViewHolder ) ( convertView . getTag ( ) ) ) ; } holder . textView . setText ( mData . get ( position ) ) ; return convertView ; } public static class ViewHolder { public TextView textView ; } }

Fix:
NavigationDrawerAdapter . ViewHolder holder ;
Buggy code:
public class JLabeledTextField extends JPanel implements FocusListener , JLabeledField { private JLabel mLabel ; private JTextField mTextField ; private ArrayList mChangeListeners = new ArrayList ( 3 ) ; private String oldValue = "" ; public JLabeledTextField ( ) { } public JLabeledTextField ( String pLabel ) { } public JLabeledTextField ( String pLabel , int size ) { } public List getComponentList ( ) { } public void setEnabled ( boolean enable ) { } protected JTextField createTextField ( int size ) { } private void init ( ) { } public void focusLost ( FocusEvent pFocusEvent ) { <START_BUG> if ( ( oldValue . equals ( mTextField . getText ( ) ) ) == false ) { <END_BUG> notifyChangeListeners ( ) ; } } public void focusGained ( FocusEvent pFocusEvent ) { } public void setLabel ( String pLabel ) { } public void setText ( String pText ) { } public String getText ( ) { } public String getLabel ( ) { } public void addChangeListener ( ChangeListener pChangeListener ) { } public void removeChangeListener ( ChangeListener pChangeListener ) { } protected void notifyChangeListeners ( ) { } }

Fix:
if ( ! ( oldValue . equals ( mTextField . getText ( ) ) ) ) {
Buggy code:
public class RemoteLocalDatetimeChecker { private String LocalPath ; private String LocalFilename ; public RemoteLocalDatetimeChecker ( ) { } public RemoteLocalDatetimeChecker ( String newLocalFilename ) { } public RemoteLocalDatetimeChecker ( String newLocalPath , String newLocalFilename ) { } public void setLocalPath ( String newLocalPath ) { } public String getLocalPath ( ) { } public void setLocalFilename ( String newLocalFilename ) { } public String getLocalFilename ( ) { } public DateTimeRound checkLatestUpdatedLocalDateandTime ( ) throws IOException , FileDoesntSpecifiedException { DateTimeRound result = new DateTimeRound ( ) ; if ( this . getLocalFilename ( ) . equals ( "" ) ) throw new FileDoesntSpecifiedException ( ) ; PropertyManager prop = new PropertyManager ( this . getLocalPath ( ) , this . getLocalFilename ( ) ) ; try { prop . loadProperties ( ) ; } catch ( IOException e ) { prop . setProp ( new Properties ( ) ) ; prop . setValue ( "date" , "" ) ; prop . setValue ( "round" , "0" ) ; prop . storeProperties ( ) ; } if ( ( ( prop . getValue ( "date" ) ) == null ) || ( prop . getValue ( "date" ) . equals ( "" ) ) ) { GregorianCalendar tCalendar = new GregorianCalendar ( ) ; tCalendar . setTime ( new Date ( 1L ) ) ; result . setCalendar ( tCalendar ) ; } else { String [ ] dateandtime = ( ( String ) ( prop . getValue ( "date" ) ) ) . split ( "\\s" ) ; String [ ] YYMMDD = dateandtime [ 0 ] . split ( "\\." ) ; String [ ] hhmm = dateandtime [ 1 ] . split ( "\\:" ) ; int year = Integer . parseInt ( YYMMDD [ 0 ] ) ; int month = Integer . parseInt ( YYMMDD [ 1 ] ) ; int date = Integer . parseInt ( YYMMDD [ 2 ] ) ; int hour = Integer . parseInt ( hhmm [ 0 ] ) ; int minute = Integer . parseInt ( hhmm [ 1 ] ) ; <START_BUG> GregorianCalendar tCalendar = new GregorianCalendar ( year , month , date , hour , minute ) ; <END_BUG> tCalendar . set ( GregorianCalendar . ZONE_OFFSET , 32400000 ) ; tCalendar . set ( GregorianCalendar . ERA , 1 ) ; tCalendar . set ( GregorianCalendar . DST_OFFSET , 0 ) ; tCalendar . set ( GregorianCalendar . MILLISECOND , 1 ) ; result . setCalendar ( tCalendar ) ; } if ( ( prop . getValue ( "round" ) ) == null ) { result . setRoundVal ( 0 ) ; } else { String temp = ( ( String ) ( prop . getValue ( "round" ) ) ) ; result . setRoundVal ( Integer . parseInt ( temp ) ) ; } return result ; } public DateTimeRound checkLatestNoticeDateandTime ( ) throws FileNotFoundException , IOException { } }

Fix:
GregorianCalendar tCalendar = new GregorianCalendar ( year , ( month - 1 ) , date , hour , minute ) ;
Buggy code:
public final class NullPredicate < T > implements Serializable , Predicate < T > { private static final long serialVersionUID = 7533784454832764388L ; public static final Predicate < ? > INSTANCE = new NullPredicate < Object > ( ) ; @ SuppressWarnings ( "unchecked" ) public static < T > Predicate < T > nullPredicate ( ) { } private NullPredicate ( ) { } <START_BUG> public boolean evaluate ( T object ) { <END_BUG> return object == null ; } private Object readResolve ( ) { } }

Fix:
public boolean evaluate ( final T object ) {
Buggy code:
public class ClaimantEditItemController { private Item item ; public ClaimantEditItemController ( Item item ) { } public void editItem ( String dateSTR , String category , String description , Double amount , String currency ) throws StatusException { if ( ( AppSingleton . getInstance ( ) . getStatus ( ) . equals ( "Submitted" ) ) || ( AppSingleton . getInstance ( ) . getStatus ( ) . equals ( "Approved" ) ) ) { throw new StatusException ( ) ; } Date date = null ; try { date = AppSingleton . getDateFormat ( ) . parse ( dateSTR ) ; } catch ( ParseException e ) { date = null ; } item . setDate ( date ) ; item . setCategory ( category ) ; item . setDescription ( description ) ; item . setAmount ( amount ) ; item . setCurrency ( currency ) ; <START_BUG> if ( ( ( date . equals ( "" ) ) || ( description . equals ( "" ) ) ) || ( amount == null ) ) { <END_BUG> item . setMissValue ( true ) ; } else { item . setMissValue ( false ) ; } } }

Fix:
if ( ( ( date == null ) || ( description . equals ( "" ) ) ) || ( amount == null ) ) {
Buggy code:
public class RhinoAspectTest extends AopBaseTest { @ DataProvider ( name = "resultTypes" ) public static Object [ ] [ ] resultTypes ( ) { } @ DataProvider ( name = "logLevel" ) public static Object [ ] [ ] logLevel ( ) { } @ Test public void testGetRhinoScriptRunner ( ) throws Exception { } @ Test ( dataProvider = "resultTypes" ) public void testDoHandleRhinoException ( ResultType resultTyp ) throws Exception { } @ Test ( dataProvider = "resultTypes" ) public void testDoHandleRhinoExceptionResultString ( ResultType resultTyp ) throws Exception { } private void initMocks ( ) { } private void verifySahiReport ( ResultType resultTyp , int initialListSize ) { } @ Test ( dataProvider = "logLevel" ) public void testAddActionLog ( LogLevel logLevel ) throws Exception { } @ Test public void testDoEnvironmentLog ( ) throws Exception { } @ Test public void testDoLoggingLog ( ) throws Exception { } @ Test public void testdoScreenBasedActionLog ( ) throws Exception { } @ Test public void testDoTestCaseActionLog ( ) throws Exception { initMocks ( ) ; BaseActionLoader loader = mock ( BaseActionLoader . class ) ; TestCase sampleTc = new TestCase ( "test" , "testID" ) ; when ( loader . getCurrentTestCase ( ) ) . thenReturn ( sampleTc ) ; TestCaseAction testAction = new TestCaseAction ( ) ; ReflectionTestUtils . setField ( testAction , "loader" , loader , BaseActionLoader . class ) ; <START_BUG> testAction . init ( "testID" , 3 , 4 , null ) ; <END_BUG> assertLastLine ( testAction . getClass ( ) . getSimpleName ( ) , INFO , ( ( "\"test<seq2seq4repair_space>case<seq2seq4repair_space>[" + ( sampleTc . getActionValueString ( ) ) ) + "]\"<seq2seq4repair_space>TestCaseAction.init()<seq2seq4repair_space>-<seq2seq4repair_space>init<seq2seq4repair_space>a<seq2seq4repair_space>new<seq2seq4repair_space>test<seq2seq4repair_space>case<seq2seq4repair_space>with<seq2seq4repair_space>arg(s)<seq2seq4repair_space>[testID,<seq2seq4repair_space>3,<seq2seq4repair_space>4,<seq2seq4repair_space>NULL]" ) ) ; } No newline ; at end ; of file ; }

Fix:
testAction . init ( "testID" , 3 , 4 , new String [ ] { } ) ;
Buggy code:
public class OpenBitSet extends DocIdSet implements Serializable , Cloneable { protected long [ ] bits ; protected int wlen ; public OpenBitSet ( long numBits ) { } public OpenBitSet ( ) { } public OpenBitSet ( long [ ] bits , int numWords ) { } public DocIdSetIterator iterator ( ) { } public long capacity ( ) { } public long size ( ) { } public boolean isEmpty ( ) { } public long [ ] getBits ( ) { } public void setBits ( long [ ] bits ) { } public int getNumWords ( ) { } public void setNumWords ( int nWords ) { } public boolean get ( int index ) { } public boolean fastGet ( int index ) { } public boolean get ( long index ) { } public boolean fastGet ( long index ) { } public int getBit ( int index ) { } public void set ( long index ) { } public void fastSet ( int index ) { } public void fastSet ( long index ) { } public void set ( long startIndex , long endIndex ) { } protected int expandingWordNum ( long index ) { } public void fastClear ( int index ) { } public void fastClear ( long index ) { } public void clear ( long index ) { } public void clear ( long startIndex , long endIndex ) { } public boolean getAndSet ( int index ) { } public boolean getAndSet ( long index ) { } public void fastFlip ( int index ) { } public void fastFlip ( long index ) { } public void flip ( long index ) { } public boolean flipAndGet ( int index ) { } public boolean flipAndGet ( long index ) { } public void flip ( long startIndex , long endIndex ) { } public long cardinality ( ) { } public static long intersectionCount ( OpenBitSet a , OpenBitSet b ) { } public static long unionCount ( OpenBitSet a , OpenBitSet b ) { } public static long andNotCount ( OpenBitSet a , OpenBitSet b ) { } public static long xorCount ( OpenBitSet a , OpenBitSet b ) { } public int nextSetBit ( int index ) { } public long nextSetBit ( long index ) { } public Object clone ( ) { } public void intersect ( OpenBitSet other ) { } public void union ( OpenBitSet other ) { } public void remove ( OpenBitSet other ) { } public void xor ( OpenBitSet other ) { } public void and ( OpenBitSet other ) { } public void or ( OpenBitSet other ) { } public void andNot ( OpenBitSet other ) { } public boolean intersects ( OpenBitSet other ) { } public void ensureCapacityWords ( int numWords ) { } public void ensureCapacity ( long numBits ) { } public void trimTrailingZeros ( ) { } public static int bits2words ( long numBits ) { } public boolean equals ( Object o ) { } public int hashCode ( ) { long h = - 1737092556 ; for ( int i = bits . length ; ( -- i ) >= 0 ; ) { h ^= bits [ i ] ; <START_BUG> h = ( h << 1 ) | ( h > > > 31 ) ; <END_BUG> } return ( ( int ) ( ( h > > 32 ) ^ h ) ) ; } }

Fix:
h = ( h << 1 ) | ( h > > > 63 ) ;
Buggy code:
public class CreateReferenceApk extends Thread { private static final Logger logger = LoggerFactory . getLogger ( CreateReferenceApk . class ) ; private String userId = null ; public CreateReferenceApk ( final String userId ) { } @ Override public void run ( ) { } private void createApk ( ) { if ( StringUtils . isBlank ( this . userId ) ) { return ; } String channel_file = ( "//data//conf//" + ( this . userId ) ) + "//channel.txt" ; File file = new File ( channel_file ) ; if ( ! ( file . exists ( ) ) ) { CreateReferenceApk . makeDir ( file . getParentFile ( ) ) ; } try { file . createNewFile ( ) ; Files . write ( this . userId , file , Charsets . UTF_8 ) ; String result = Files . toString ( file , Charsets . UTF_8 ) ; String cmd = "python" ; String pyFile = "//data//script//MultiChannelBuildTool.py" ; String args = channel_file ; String apk = "//data//midas//midas.apk" ; String execute = ( ( ( ( ( cmd + "<seq2seq4repair_space>" ) + pyFile ) + "<seq2seq4repair_space>" ) + args ) + "<seq2seq4repair_space>" ) + apk ; <START_BUG> CreateReferenceApk . logger . info ( "python<seq2seq4repair_space>cmd<seq2seq4repair_space>is<seq2seq4repair_space>{}." , execute ) ; <END_BUG> Runtime . getRuntime ( ) . exec ( execute ) ; } catch ( IOException e ) { CreateReferenceApk . logger . error ( ExceptionUtils . getFullStackTrace ( e ) ) ; } } private static void makeDir ( File dir ) { } }

Fix:
CreateReferenceApk . logger . info ( "python<seq2seq4repair_space>cmd<seq2seq4repair_space>is<seq2seq4repair_space>{}" , execute ) ;
Buggy code:
public class OSPFArea extends RoutingProtocolDomain implements Serializable { public OSPFAreaConfiguration getConfiguration ( ) { <START_BUG> return ( ( OSPFAreaConfiguration ) ( this . getToAssociatedElementsByType ( AreaOfConfiguration . class ) ) ) ; <END_BUG> } public void setConfiguration ( OSPFAreaConfiguration config ) { } @ SuppressWarnings ( "unchecked" ) public List < OSPFProtocolEndpointBase > getEndpointsInArea ( ) { } public boolean addEndpointInArea ( OSPFProtocolEndpointBase ospfProtocolEndpointBase ) { } public boolean removeEndpointInArea ( OSPFProtocolEndpointBase ospfProtocolEndpointBase ) { } public OSPFArea ( ) { } private long areaID ; public long getAreaID ( ) { } public void setAreaID ( long areaID ) { } public enum AreaType { PLAIN , STUB , NSSA ; } private OSPFArea . AreaType areaType ; public OSPFArea . AreaType getAreaType ( ) { } public void setAreaType ( OSPFArea . AreaType areaType ) { } private long extLsdbLimit ; public long getExtLsdbLimit ( ) { } public void setExtLsdbLimit ( long extLsdbLimit ) { } }

Fix:
return ( ( OSPFAreaConfiguration ) ( this . getFisrtsToAssociatedElementByType ( AreaOfConfiguration . class ) ) ) ;
Buggy code:
public interface PartitionCoordinator { List < PartitionManager > getMyManagedPartitions ( ) { } <START_BUG> PartitionManager getManager ( GlobalPartitionId id ) ; <END_BUG> }

Fix:
PartitionManager getManager ( Partition partition ) ;
Buggy code:
public class ProgressView extends ViewPart implements IViewPart { DetailedProgressViewer viewer ; Action cancelAction ; Action clearAllAction ; public void createPartControl ( Composite parent ) { viewer = new DetailedProgressViewer ( parent , SWT . MULTI ) ; <START_BUG> viewer . setSorter ( ProgressManagerUtil . getProgressViewerSorter ( ) ) ; <END_BUG> viewer . getControl ( ) . setLayoutData ( new org . eclipse . swt . layout . GridData ( SWT . FILL , SWT . FILL , true , true ) ) ; PlatformUI . getWorkbench ( ) . getHelpSystem ( ) . setHelp ( parent , RESPONSIVE_UI ) ; initContentProvider ( ) ; createClearAllAction ( ) ; createCancelAction ( ) ; initContextMenu ( ) ; initPulldownMenu ( ) ; initToolBar ( ) ; getSite ( ) . setSelectionProvider ( viewer ) ; } public void setFocus ( ) { } protected void initContentProvider ( ) { } private void initContextMenu ( ) { } private void initPulldownMenu ( ) { } private void initToolBar ( ) { } private IStructuredSelection getSelection ( ) { } JobInfo getSelectedInfo ( ) { } private void createCancelAction ( ) { } private void createClearAllAction ( ) { } }

Fix:
viewer . setComparator ( ProgressManagerUtil . getProgressViewerComparator ( ) ) ;
Buggy code:
public class AbstractFilterTst extends TestCase { protected AbstractMessageFolder sourceFolder ; protected MailboxTstFactory factory ; public AbstractFilterTst ( String test ) { } public AbstractFilterTst ( MailboxTstFactory factory , String arg0 ) { } public AbstractMessageFolder getSourceFolder ( ) { } protected void setUp ( ) throws Exception { File file = new File ( "test_config" ) ; file . mkdir ( ) ; new Config ( file ) ; Logging . DEBUG = true ; Logging . createDefaultHandler ( ) ; new MailMain ( ) . init ( ) ; new AddressbookMain ( ) . init ( ) ; <START_BUG> PluginManager . getInstance ( ) . initPlugins ( ) ; <END_BUG> sourceFolder = factory . createFolder ( 1 ) ; } protected void tearDown ( ) throws Exception { } public Object addMessage ( ) throws Exception { } }

Fix:
PluginManager . getInstance ( ) . initCorePlugins ( ) ;
Buggy code:
public abstract class ResolvedTypeMunger { protected ResolvedTypeMunger . Kind kind ; protected ResolvedMember signature ; private Set superMethodsCalled = Collections . EMPTY_SET ; public ResolvedTypeMunger ( ResolvedTypeMunger . Kind kind , ResolvedMember signature ) { } public ConcreteTypeMunger concretize ( World world , ResolvedTypeX aspectType ) { } public boolean matches ( ResolvedTypeX matchType , ResolvedTypeX aspectType ) { ResolvedTypeX onType = matchType . getWorld ( ) . resolve ( signature . getDeclaringType ( ) ) ; if ( matchType . equals ( onType ) ) { if ( ! ( onType . isExposedToWeaver ( ) ) ) { <START_BUG> if ( ( onType . getWeaverState ( ) ) != null ) { <END_BUG> if ( matchType . getWorld ( ) . getLint ( ) . typeNotExposedToWeaver . isEnabled ( ) ) { matchType . getWorld ( ) . getLint ( ) . typeNotExposedToWeaver . signal ( matchType . getName ( ) , signature . getSourceLocation ( ) ) ; } } } return true ; } if ( onType . isInterface ( ) ) { return matchType . isTopmostImplementor ( onType ) ; } else { return false ; } } public String toString ( ) { } public static ResolvedTypeMunger read ( DataInputStream s , ISourceContext context ) throws IOException { } protected static Set readSuperMethodsCalled ( DataInputStream s ) throws IOException { } protected void writeSuperMethodsCalled ( DataOutputStream s ) throws IOException { } public abstract void write ( DataOutputStream s ) throws IOException { } public ResolvedTypeMunger . Kind getKind ( ) { } public static class Kind extends TypeSafeEnum { Kind ( String name , int key ) { } public static ResolvedTypeMunger . Kind read ( DataInputStream s ) throws IOException { } } public static final ResolvedTypeMunger . Kind Field = new ResolvedTypeMunger . Kind ( "Field" , 1 ) ; public static final ResolvedTypeMunger . Kind Method = new ResolvedTypeMunger . Kind ( "Method" , 2 ) ; public static final ResolvedTypeMunger . Kind Constructor = new ResolvedTypeMunger . Kind ( "Constructor" , 5 ) ; public static final ResolvedTypeMunger . Kind PerObjectInterface = new ResolvedTypeMunger . Kind ( "PerObjectInterface" , 3 ) ; public static final ResolvedTypeMunger . Kind PrivilegedAccess = new ResolvedTypeMunger . Kind ( "PrivilegedAccess" , 4 ) ; public static final ResolvedTypeMunger . Kind Parent = new ResolvedTypeMunger . Kind ( "Parent" , 6 ) ; public static final String SUPER_DISPATCH_NAME = "superDispatch" ; public void setSuperMethodsCalled ( Set c ) { } public Set getSuperMethodsCalled ( ) { } public ResolvedMember getSignature ( ) { } public ResolvedMember getMatchingSyntheticMember ( Member member , ResolvedTypeX aspectType ) { } public boolean changesPublicSignature ( ) { } public boolean needsAccessToTopmostImplementor ( ) { } }

Fix:
if ( ( onType . getWeaverState ( ) ) == null ) {