nus-yam/ex-repair huggingface dataset:
Buggy code:
public class ConfigSolrXml extends ConfigSolr { protected static Logger log = LoggerFactory . getLogger ( ConfigSolrXml . class ) ; private SolrCoreDiscoverer solrCoreDiscoverer = new SolrCoreDiscoverer ( ) ; private final Map < String , CoreDescriptor > coreDescriptorMap ; public ConfigSolrXml ( Config config , CoreContainer container ) throws IOException , ParserConfigurationException , SAXException { } private void checkForIllegalConfig ( ) throws IOException { failIfFound ( "solr//@coreLoadThreads" ) ; <START_BUG> failIfFound ( "solr//@persist" ) ; <END_BUG> failIfFound ( "solr//@sharedLib" ) ; failIfFound ( "solr//@zkHost" ) ; failIfFound ( "solr//logging//@class" ) ; failIfFound ( "solr//logging//@enabled" ) ; failIfFound ( "solr//logging//watcher//@size" ) ; failIfFound ( "solr//logging//watcher//@threshold" ) ; failIfFound ( "solr//cores//@adminHandler" ) ; failIfFound ( "solr//cores//@distribUpdateConnTimeout" ) ; failIfFound ( "solr//cores//@distribUpdateSoTimeout" ) ; failIfFound ( "solr//cores//@host" ) ; failIfFound ( "solr//cores//@hostContext" ) ; failIfFound ( "solr//cores//@hostPort" ) ; failIfFound ( "solr//cores//@leaderVoteWait" ) ; failIfFound ( "solr//cores//@managementPath" ) ; failIfFound ( "solr//cores//@shareSchema" ) ; failIfFound ( "solr//cores//@transientCacheSize" ) ; failIfFound ( "solr//cores//@zkClientTimeout" ) ; failIfFound ( "solr//cores//@defaultCoreName" ) ; failIfFound ( "solr//@persistent" ) ; failIfFound ( "solr//cores//@adminPath" ) ; } private void failIfFound ( String xPath ) { } private String doSub ( String path ) { } private void fillPropMap ( ) { } @ Override public Map < String , String > readCoreAttributes ( String coreName ) { } @ Override public List < String > getAllCoreNames ( ) { } @ Override public String getProperty ( String coreName , String property , String defaultVal ) { } @ Override public Properties readCoreProperties ( String coreName ) { } static Properties getCoreProperties ( String instanceDir , CoreDescriptor dcore ) { } @ Override public void substituteProperties ( ) { } }

Fix:
failIfFound ( "solr//@persistent" ) ;
Buggy code:
public class MethodWithAttributesBoundNode extends MethodBoundNode { private final IMethodCaller modifyContext ; private final IMethodCaller restoreContext ; private final List < Attribute > attributes ; private final int parameterCount ; public MethodWithAttributesBoundNode ( ISyntaxNode syntaxNode , IBoundNode [ ] child , IMethodCaller methodCaller , IMethodCaller modifyContext , IMethodCaller restoreContext , List < Attribute > attributes , int parameterCount ) { } @ Override public Object evaluateRuntime ( IRuntimeEnv env ) throws OpenLRuntimeException { Object target = ( ( getTargetNode ( ) ) == null ) ? env . getThis ( ) : getTargetNode ( ) . evaluate ( env ) ; Object [ ] arguments = evaluateChildren ( env ) ; Object [ ] methodParameters = Arrays . copyOfRange ( arguments , 0 , parameterCount ) ; <START_BUG> Object [ ] attributeParameters = Arrays . copyOfRange ( arguments , parameterCount , attributes . size ( ) ) ; <END_BUG> int attributesChanged = 0 ; try { for ( int i = 0 ; i < ( attributes . size ( ) ) ; i ++ ) { Object [ ] params = new Object [ ] { attributes . get ( i ) . getName ( ) , attributeParameters [ i ] } ; modifyContext . invoke ( target , params , env ) ; attributesChanged ++ ; } return getMethodCaller ( ) . invoke ( target , methodParameters , env ) ; } finally { for ( int i = 0 ; i < attributesChanged ; i ++ ) { restoreContext . invoke ( target , new Object [ 0 ] , env ) ; } } } }

Fix:
Object [ ] attributeParameters = Arrays . copyOfRange ( arguments , parameterCount , arguments . length ) ;
Buggy code:
@ PersistenceCapable public class Dao implements DatastoreDao { public void storeUser ( User u ) { } public List < User > getAllUsers ( ) { } public String getUserPassword ( String id ) { } public User getUser ( String id ) { } public boolean userExists ( String id ) { } public void updateUserInfo ( User u ) { } public void addFeed ( User u , DatastoreFeed f ) { } public void deleteFeed ( User u , String feedname ) { } @ Override public void updateUserFeeds ( User u ) { } public void updateUserObject ( User u ) { PersistenceManager pm = PMF . get ( ) . getPersistenceManager ( ) ; try { pm . makePersistent ( u ) ; } finally { pm . close ( ) ; <START_BUG> System . out . println ( "[DEBUG]:<seq2seq4repair_space>Dao.updateUserObject<seq2seq4repair_space>-><seq2seq4repair_space>did<seq2seq4repair_space>something<seq2seq4repair_space>without<seq2seq4repair_space>crashing!" ) ; <END_BUG> } } }

Fix:
System . out . println ( "[DEBUG]:<seq2seq4repair_space>Dao.updateUserObject<seq2seq4repair_space>-><seq2seq4repair_space>successfully<seq2seq4repair_space>overwritten<seq2seq4repair_space>user<seq2seq4repair_space>object" ) ;
Buggy code:
@ RunWith ( Arquillian . class ) public class MessagingTestCase { private static final String QUEUE_EXAMPLE_QUEUE = "queue.exampleQueue" ; static final Logger log = Logger . getLogger ( MessagingTestCase . class ) ; private static final String BODY = "msg.body" ; private ClientSessionFactory sf ; private ClientSession session ; @ Deployment public static JavaArchive createDeployment ( ) throws Exception { JavaArchive jar = ShrinkWrap . create ( JavaArchive . class , "messaging-example.jar" ) ; <START_BUG> jar . addAsManifestResource ( new StringAsset ( ( "Manifest-Version:<seq2seq4repair_space>1.0\n" + "Dependencies:<seq2seq4repair_space>org.hornetq\n" ) ) , "MANIFEST.MF" ) ; <END_BUG> jar . addClass ( MessagingTestCase . class ) ; return jar ; } @ Before public void start ( ) throws Exception { } @ After public void stop ( ) throws Exception { } @ Test public void testMessaging ( ) throws Exception { } private void sendMessage ( String text ) throws Exception { } private boolean isInContainer ( ) { } }

Fix:
jar . addAsManifestResource ( new StringAsset ( ( "Manifest-Version:<seq2seq4repair_space>1.0\n" + "Dependencies:<seq2seq4repair_space>org.hornetq,<seq2seq4repair_space>org.jboss.dmr\n" ) ) , "MANIFEST.MF" ) ;
Buggy code:
public class JodaTimeFormattingConfigurer { private FormatterRegistry formatterRegistry ; private String dateStyle ; private String timeStyle ; private String dateTimeStyle ; private boolean useISOFormat ; public JodaTimeFormattingConfigurer ( FormatterRegistry formatterRegistry ) { } public void setDateStyle ( String dateStyle ) { } public void setTimeStyle ( String timeStyle ) { } public void setDateTimeStyle ( String dateTimeStyle ) { } public void setUseISOFormat ( boolean useISOFormat ) { } public void registerJodaTimeFormatting ( ) { JodaTimeConverters . registerConverters ( this . formatterRegistry . getConverterRegistry ( ) ) ; DateTimeFormatter jodaDateFormatter = getJodaDateFormatter ( ) ; this . formatterRegistry . addFormatterForFieldType ( LocalDate . class , new ReadablePartialPrinter ( jodaDateFormatter ) , new DateTimeParser ( jodaDateFormatter ) ) ; DateTimeFormatter jodaTimeFormatter = getJodaTimeFormatter ( ) ; this . formatterRegistry . addFormatterForFieldType ( LocalTime . class , new ReadablePartialPrinter ( jodaTimeFormatter ) , new DateTimeParser ( jodaTimeFormatter ) ) ; DateTimeFormatter jodaDateTimeFormatter = getJodaDateTimeFormatter ( ) ; Parser < DateTime > dateTimeParser = new DateTimeParser ( jodaDateTimeFormatter ) ; this . formatterRegistry . addFormatterForFieldType ( LocalDateTime . class , new ReadablePartialPrinter ( jodaDateTimeFormatter ) , dateTimeParser ) ; Printer < ReadableInstant > readableInstantPrinter = new ReadableInstantPrinter ( jodaDateTimeFormatter ) ; this . formatterRegistry . addFormatterForFieldType ( ReadableInstant . class , readableInstantPrinter , dateTimeParser ) ; this . formatterRegistry . addFormatterForFieldType ( Calendar . class , readableInstantPrinter , dateTimeParser ) ; <START_BUG> this . formatterRegistry . addFormatterForFieldType ( Calendar . class , new MillisecondInstantPrinter ( jodaDateTimeFormatter ) , dateTimeParser ) ; <END_BUG> this . formatterRegistry . addFormatterForFieldAnnotation ( new DateTimeFormatAnnotationFormatterFactory ( ) ) ; } private DateTimeFormatter getJodaDateFormatter ( ) { } private DateTimeFormatter getJodaTimeFormatter ( ) { } private DateTimeFormatter getJodaDateTimeFormatter ( ) { } }

Fix:
this . formatterRegistry . addFormatterForFieldType ( Date . class , new MillisecondInstantPrinter ( jodaDateTimeFormatter ) , dateTimeParser ) ;
Buggy code:
public class JDBC { private static final boolean HAVE_DRIVER = JDBC . haveClass ( "java.sql.Driver" ) ; private static final boolean HAVE_SAVEPOINT = JDBC . haveClass ( "java.sql.Savepoint" ) ; private static final boolean HAVE_SQLXML = JDBC . haveClass ( "java.sql.SQLXML" ) ; protected static boolean haveClass ( String className ) { } public static boolean vmSupportsJDBC4 ( ) { } public static boolean vmSupportsJDBC3 ( ) { } public static boolean vmSupportsJDBC2 ( ) { } public static boolean vmSupportsJSR169 ( ) { } public static void cleanup ( Connection conn ) throws SQLException { } public static void dropSchema ( DatabaseMetaData dmd , String schema ) throws SQLException { } private static void dropUsingDMD ( Statement s , ResultSet rs , String schema , String mdColumn , String dropType ) throws SQLException { } public static void assertMetaDataMatch ( DatabaseMetaData dmd , ResultSetMetaData rsmd ) throws SQLException { } public static void assertDrainResults ( ResultSet rs ) throws SQLException { } public static void assertDrainResults ( ResultSet rs , int expectedRows ) throws SQLException { ResultSetMetaData rsmd = rs . getMetaData ( ) ; int rows = 0 ; while ( rs . next ( ) ) { for ( int col = 1 ; col <= ( rsmd . getColumnCount ( ) ) ; col ++ ) { String s = rs . getString ( col ) ; Assert . assertEquals ( ( s == null ) , rs . wasNull ( ) ) ; } rows ++ ; } rs . close ( ) ; <START_BUG> if ( rows >= 0 ) <END_BUG> Assert . assertEquals ( "Unexpected<seq2seq4repair_space>row<seq2seq4repair_space>count:" , expectedRows , rows ) ; } public static void assertColumnNames ( ResultSet rs , String [ ] expectedColNames ) throws SQLException { } public static void assertFullResultSet ( ResultSet rs , Object [ ] [ ] expectedRows , boolean allAsTrimmedStrings ) throws SQLException { } private static void assertRowInResultSet ( ResultSet rs , int rowNum , Object [ ] expectedRow , boolean asTrimmedStrings ) throws SQLException { } public static String escape ( String name ) { } public static String escape ( String schema , String name ) { } }

Fix:
if ( expectedRows >= 0 )
Buggy code:
@ SuppressWarnings ( "restriction" ) public class JAXWSAnnotateWidgetFactory implements INamedWidgetContributorFactory { private SimpleWidgetContributor jaxwsAnnotateWidgetContributor ; private JAXWSAnnotateJavaWidget jaxwsAnnotateJavaWidget = new JAXWSAnnotateJavaWidget ( ) ; public INamedWidgetContributor getFirstNamedWidget ( ) { } public INamedWidgetContributor getNextNamedWidget ( INamedWidgetContributor widgetContributor ) { } public void registerDataMappings ( DataMappingRegistry dataRegistry ) { } public void setJava2WSDataModel ( Java2WSDataModel model ) { } private void init ( ) { jaxwsAnnotateWidgetContributor = new SimpleWidgetContributor ( ) ; CXFContext context = CXFCorePlugin . getDefault ( ) . getJava2WSContext ( ) ; <START_BUG> String title = CXFCreationUIMessages . bind ( JAVA2WS_JAXWS_ANNOTATE_PAGE_TITLE , new Object [ ] { context . getCxfRuntimeEdition ( ) , context . getCxfRuntimeVersion ( ) } ) ; <END_BUG> jaxwsAnnotateWidgetContributor . setTitle ( title ) ; jaxwsAnnotateWidgetContributor . setDescription ( JAVA2WS_JAXWS_ANNOTATE_PAGE_DESCRIPTION ) ; jaxwsAnnotateWidgetContributor . setFactory ( new WidgetContributorFactory ( ) { public WidgetContributor create ( ) { return jaxwsAnnotateJavaWidget ; } } ) ; } }

Fix:
String title = CXFCreationUIMessages . bind ( JAVA2WS_JAXWS_ANNOTATE_PAGE_TITLE , new Object [ ] { context . getDefaultRuntimeType ( ) , context . getDefaultRuntimeVersion ( ) } ) ;
Buggy code:
public final class Date310Utils { private Date310Utils ( ) { } public static LocalDateTime dateToLocalDateTime ( final Date date ) { } public static Date localDateTimeToDate ( final LocalDateTime dateTime ) { } public static LocalDate dateToLocalDate ( final Date date ) { } public static Date localDateToDate ( final LocalDate date ) { } public static int getWeekNumber ( final LocalDate date , final boolean weekStartsSunday ) { final WeekFields weekField = ( weekStartsSunday ) ? WeekFields . SUNDAY_START : WeekFields . ISO ; <START_BUG> return date . get ( weekField . weekOfYear ( ) ) ; <END_BUG> } public static long getMilliseconds ( final LocalDateTime dateTime ) { } public static LocalDateTime getNoonDateTimeForDate ( final LocalDate date ) { } }

Fix:
return date . get ( weekField . weekOfWeekBasedYear ( ) ) ;
Buggy code:
@ Stateless public class TaskStore { @ PersistenceContext EntityManager entityManager ; public List < Task > listAll ( ) { <START_BUG> return entityManager . createNamedQuery ( "Task.findAll" ) . getResultList ( ) ; <END_BUG> } public List < Task > filterAll ( final Filter filter ) { } public Task get ( final long taskId ) { } public long save ( final Task task ) { } public void update ( final Task task ) { } public void delete ( final long taskId ) { } }

Fix:
return entityManager . createNamedQuery ( "Task.findAll" , Task . class ) . getResultList ( ) ;
Buggy code:
public abstract class HeaderlessColumn < T > extends AbstractColumn < T > { public HeaderlessColumn ( ) { } @ Override public Component < String > getHeader ( MarkupContainer parent , String componentId ) { <START_BUG> return super . getHeader ( parent , componentId ) . setEscapeModelStrings ( true ) ; <END_BUG> } }

Fix:
return super . getHeader ( parent , componentId ) . setEscapeModelStrings ( false ) ;
Buggy code:
public class IRTest { public static void main ( String [ ] args ) throws IOException , ClassNotFoundException , InstantiationException , SecurityException { } private static void generateCode ( X86Assembler os , String className ) throws ClassNotFoundException , InstantiationException , MalformedURLException { } private static < T extends X86Register > void generateCode ( X86Assembler os , VmByteCode code , CodeGenerator < T > cg , X86StackFrame stackFrame , VmMethod arithMethod , TypeSizeInfo typeSizeInfo ) throws ClassNotFoundException , MalformedURLException { IRControlFlowGraph < T > cfg = new IRControlFlowGraph < T > ( code ) ; BytecodeViewer bv = new BytecodeViewer ( ) ; BytecodeParser . parse ( code , bv ) ; System . out . println ( cfg . toString ( ) ) ; System . out . println ( ) ; <START_BUG> IRGenerator < T > irg = new IRGenerator < T > ( cfg , typeSizeInfo ) ; <END_BUG> BytecodeParser . parse ( code , irg ) ; X86Level2Compiler . initMethodArguments ( arithMethod , stackFrame , typeSizeInfo , irg ) ; IRTest . printCFG ( cfg , "Initial<seq2seq4repair_space>IR" ) ; cfg . constructSSA ( ) ; IRTest . printCFG ( cfg , "Constructed<seq2seq4repair_space>SSA" ) ; cfg . optimize ( ) ; IRTest . printCFG ( cfg , "Optimized<seq2seq4repair_space>SSA<seq2seq4repair_space>(pass<seq2seq4repair_space>2)" ) ; cfg . removeUnusedVars ( ) ; IRTest . printCFG ( cfg , "Unused<seq2seq4repair_space>vars<seq2seq4repair_space>removed<seq2seq4repair_space>SSA" ) ; cfg . deconstrucSSA ( ) ; cfg . fixupAddresses ( ) ; IRTest . printCFG ( cfg , "Deconstructed<seq2seq4repair_space>SSA" ) ; cfg . removeDefUseChains ( ) ; cfg . fixupAddresses ( ) ; IRTest . printCFG ( cfg , "Def-use<seq2seq4repair_space>chains<seq2seq4repair_space>removed<seq2seq4repair_space>SSA" ) ; cfg . fixupAddresses ( ) ; List liveVariables = cfg . computeLiveVariables ( ) ; System . out . println ( "Live<seq2seq4repair_space>ranges:" ) ; LiveRange < ? > [ ] liveRanges = X86Level2Compiler . getLiveRanges ( liveVariables ) ; LinearScanAllocator < ? > lsa = X86Level2Compiler . allocate ( liveRanges ) ; for ( LiveRange range : liveRanges ) { System . out . println ( range ) ; } System . out . println ( ) ; X86Level2Compiler . generateCode ( cg , cfg , irg , lsa ) ; } private static < T extends X86Register > void printCFG ( IRControlFlowGraph < T > cfg , String x ) { } private static VmByteCode loadByteCode ( String className , String methodName ) throws ClassNotFoundException , InstantiationException , MalformedURLException { } public static < T > void printQuadDetail ( Quad < T > quad ) { } }

Fix:
IRGenerator < T > irg = new IRGenerator < T > ( cfg , typeSizeInfo , arithMethod . getDeclaringClass ( ) . getLoader ( ) ) ;
Buggy code:
public abstract class Result { private int id ; public Result ( int id ) { } public int getId ( ) { } @ Override public int hashCode ( ) { } @ Override public boolean equals ( Object o ) { boolean equal = false ; if ( ( o != null ) && ( ( o . getClass ( ) ) == ( this . getClass ( ) ) ) ) { <START_BUG> equal = ( ( ( Category ) ( o ) ) . getId ( ) ) == ( getId ( ) ) ; <END_BUG> } return equal ; } }

Fix:
equal = ( ( ( Result ) ( o ) ) . getId ( ) ) == ( getId ( ) ) ;
Buggy code:
public class ModClusterRemoveMetric implements OperationStepHandler , DescriptionProvider { static final ModClusterRemoveMetric INSTANCE = new ModClusterRemoveMetric ( ) ; @ Override public ModelNode getModelDescription ( Locale locale ) { } @ Override public void execute ( OperationContext context , ModelNode operation ) throws OperationFailedException { <START_BUG> if ( context . getProcessType ( ) . isServer ( ) ) { <END_BUG> context . addStep ( new OperationStepHandler ( ) { @ Override public void execute ( OperationContext context , ModelNode operation ) throws OperationFailedException { final ModelNode dynamicLoadProvider = context . readResourceForUpdate ( EMPTY_ADDRESS ) . getModel ( ) . get ( DYNAMIC_LOAD_PROVIDER ) ; String type = null ; if ( dynamicLoadProvider . isDefined ( ) ) { List < Property > list = operation . asPropertyList ( ) ; Iterator < Property > it = list . iterator ( ) ; while ( it . hasNext ( ) ) { Property prop = it . next ( ) ; if ( prop . getName ( ) . equals ( "type" ) ) { type = prop . getValue ( ) . asString ( ) ; break ; } } if ( type != null ) { removeMetric ( dynamicLoadProvider , type ) ; } if ( ( ! ( dynamicLoadProvider . get ( LOAD_METRIC ) . isDefined ( ) ) ) && ( ! ( dynamicLoadProvider . get ( CUSTOM_LOAD_METRIC ) . isDefined ( ) ) ) ) { context . readResourceForUpdate ( EMPTY_ADDRESS ) . getModel ( ) . remove ( DYNAMIC_LOAD_PROVIDER ) ; } } context . completeStep ( ) ; } private void removeMetric ( ModelNode dynamicLoadProvider , String type ) { List < ModelNode > list = dynamicLoadProvider . get ( LOAD_METRIC ) . asList ( ) ; List < ModelNode > newlist = Collections . < ModelNode > emptyList ( ) ; dynamicLoadProvider . get ( LOAD_METRIC ) . set ( newlist ) ; Iterator < ModelNode > it = list . iterator ( ) ; while ( it . hasNext ( ) ) { ModelNode node = it . next ( ) ; if ( ! ( node . get ( "type" ) . asString ( ) . equals ( type ) ) ) { dynamicLoadProvider . get ( LOAD_METRIC ) . add ( node ) ; } } list = dynamicLoadProvider . get ( LOAD_METRIC ) . asList ( ) ; if ( list . isEmpty ( ) ) { dynamicLoadProvider . remove ( LOAD_METRIC ) ; } } } , MODEL ) ; } context . completeStep ( ) ; } }

Fix:
if ( context . isNormalServer ( ) ) {
Buggy code:
public abstract class SimpleMixedDomainTest { MixedDomainTestSupport support ; AsVersion version ; @ Before public void init ( ) throws Exception { } @ AfterClass public static synchronized void afterClass ( ) { } @ Test public void testServerRunning ( ) throws Exception { } @ Test public void testVersioning ( ) throws Exception { } private void cleanupKnownDifferencesInModelsForVersioningCheck ( ModelNode masterModel , ModelNode slaveModel ) { <START_BUG> if ( ( ( version ) == ( AsVersion . V_7_1_2_Final ) ) || ( ( version ) == ( AsVersion . V_7_1_3_Final ) ) ) { <END_BUG> cleanUndefinedNodes ( masterModel ) ; cleanUndefinedNodes ( slaveModel ) ; if ( ( masterModel . hasDefined ( NAMESPACES ) ) && ( masterModel . get ( NAMESPACES ) . asList ( ) . isEmpty ( ) ) ) { if ( ! ( slaveModel . hasDefined ( NAMESPACES ) ) ) { masterModel . remove ( NAMESPACES ) ; } } if ( ( masterModel . hasDefined ( SCHEMA_LOCATIONS ) ) && ( masterModel . get ( SCHEMA_LOCATIONS ) . asList ( ) . isEmpty ( ) ) ) { if ( ! ( slaveModel . hasDefined ( SCHEMA_LOCATIONS ) ) ) { masterModel . remove ( SCHEMA_LOCATIONS ) ; } } } } private void cleanUndefinedNodes ( ModelNode model ) { } private ModelNode readDomainModelForVersions ( DomainClient domainClient ) throws Exception { } }

Fix:
if ( ( ( version ) == ( AsVersion . AS_7_1_2_FINAL ) ) || ( ( version ) == ( AsVersion . AS_7_1_3_FINAL ) ) ) {
Buggy code:
public class EventHandler { StorageManager manage ; ArrayList < Event > events = new ArrayList < > ( ) ; EventGenerator generator ; Stack < ParsedCommand > commandHistory ; Event previousEvent ; public EventHandler ( ) { } public ArrayList < Event > execute ( ParsedCommand pc ) throws Exception { } private void setStorage ( ParsedCommand pc ) { } private ArrayList < Event > filter ( ParsedCommand pc ) { } public Event undo ( ) { } public Event add ( Event event ) { } public Event remove ( ParsedCommand pc ) { Event eventToBeRemoved = new Event ( ) ; for ( Event e : events ) { <START_BUG> if ( ( e . getId ( ) ) == ( pc . getId ( ) ) ) { <END_BUG> eventToBeRemoved = e ; break ; } } manage . remove ( eventToBeRemoved ) ; events . remove ( eventToBeRemoved ) ; return eventToBeRemoved ; } public Event update ( ParsedCommand pc ) { } public Event view ( ParsedCommand pc ) { } public List < Event > getAllEvents ( ) { } public List < Event > getOutstandingEvents ( ) { } public List < Event > getFilteredEvents ( Event event ) { } }

Fix:
if ( e . getId ( ) . equals ( pc . getId ( ) ) ) {
Buggy code:
public class ProcessMessage { private static final String TAG = ProcessMessage . class . getSimpleName ( ) ; private Context context ; private ProcessSms processSms ; private String errorMessage ; private MessageResultsController mMessageResultsController ; private Prefs prefs ; public ProcessMessage ( Context context , ProcessSms processSms ) { } public boolean saveMessage ( Message message ) { } public boolean syncReceivedSms ( Message message , MessageSyncHttpClient client ) { } public String getPhoneNumber ( ) { } public boolean syncPendingMessages ( final String uuid ) { } public boolean routePendingMessage ( Message message ) { } private void deleteMessage ( Message message ) { } public void smsServerResponse ( SmssyncResponse response ) { Logger . log ( ProcessMessage . TAG , ( ( "performResponseFromServer():<seq2seq4repair_space>" + "<seq2seq4repair_space>response:" ) + response ) ) ; if ( ! ( prefs . enableReplyFrmServer ( ) . get ( ) ) ) { return ; } <START_BUG> if ( ( ( response != null ) && ( ( response . getPayload ( ) ) != null ) ) && ( ( response . getPayload ( ) . getMessages ( ) . size ( ) ) > 0 ) ) { <END_BUG> for ( Message msg : response . getPayload ( ) . getMessages ( ) ) { sendTaskSms ( msg ) ; } } } public void performTask ( SyncUrl syncUrl ) { } private void sendSMSWithMessageResultsAPIEnabled ( SyncUrl syncUrl , List < Message > msgs ) { } private void sendSMSWithMessageResultsAPIDisabled ( List < Message > msgs ) { } public boolean routeSms ( Message message ) { } private void savePendingMessage ( Message message ) { } private void deleteFromSmsInbox ( Message message ) { } private boolean processMessage ( Message message , SyncUrl syncUrl ) { } private List < SyncUrl > fetchEnabledSyncUrl ( ) { } public boolean postToSentBox ( Message message ) { } public String getErrorMessage ( ) { } public void setErrorMessage ( String errorMessage ) { } public void logActivites ( String message ) { } private boolean sendTaskSms ( Message message ) { } }

Fix:
if ( ( ( response != null ) && ( ( response . getPayload ( ) ) != null ) ) && ( ! ( Util . isEmpty ( response . getPayload ( ) . getMessages ( ) ) ) ) ) {
Buggy code:
public class TreeColumn extends Item { int labelHandle ; int imageHandle ; int buttonHandle ; Tree parent ; int modelIndex ; int lastButton ; int lastTime ; int lastX ; int lastWidth ; boolean customDraw ; boolean useFixedWidth ; String toolTipText ; public TreeColumn ( Tree parent , int style ) { } public TreeColumn ( Tree parent , int style , int index ) { } public void addControlListener ( ControlListener listener ) { } public void addSelectionListener ( SelectionListener listener ) { } static int checkStyle ( int style ) { } protected void checkSubclass ( ) { } void createWidget ( int index ) { } void deregister ( ) { } void destroyWidget ( ) { } public int getAlignment ( ) { } public boolean getMoveable ( ) { } public Tree getParent ( ) { } public boolean getResizable ( ) { } public String getToolTipText ( ) { } public int getWidth ( ) { } int gtk_clicked ( int widget ) { boolean doubleClick = false ; boolean postEvent = true ; int eventPtr = OS . gtk_get_current_event ( ) ; if ( eventPtr != 0 ) { GdkEventButton gdkEvent = new GdkEventButton ( ) ; OS . memmove ( gdkEvent , eventPtr , sizeof ) ; OS . gdk_event_free ( eventPtr ) ; switch ( gdkEvent . type ) { case OS . GDK_BUTTON_RELEASE : { int clickTime = display . getDoubleClickTime ( ) ; int eventTime = gdkEvent . time ; int eventButton = gdkEvent . button ; if ( ( ( ( lastButton ) == eventButton ) && ( ( lastTime ) != 0 ) ) && ( ( Math . abs ( ( ( lastTime ) - eventTime ) ) ) <= clickTime ) ) { doubleClick = true ; } lastTime = ( eventTime == 0 ) ? 1 : eventTime ; lastButton = eventButton ; break ; } case OS . GDK_MOTION_NOTIFY : { if ( ( OS . GTK_VERSION ) < ( OS . VERSION ( 2 , 6 , 0 ) ) ) postEvent = false ; break ; } } } if ( postEvent ) <START_BUG> postEvent ( ( doubleClick ? SWT . DefaultSelection : SWT . Selection ) ) ; <END_BUG> return 0 ; } int gtk_event_after ( int widget , int gdkEvent ) { } int gtk_mnemonic_activate ( int widget , int arg1 ) { } int gtk_size_allocate ( int widget , int allocation ) { } void hookEvents ( ) { } public void pack ( ) { } void register ( ) { } void releaseHandle ( ) { } void releaseParent ( ) { } public void removeControlListener ( ControlListener listener ) { } public void removeSelectionListener ( SelectionListener listener ) { } public void setAlignment ( int alignment ) { } void setFontDescription ( int font ) { } public void setImage ( Image image ) { } public void setMoveable ( boolean moveable ) { } void setOrientation ( ) { } public void setResizable ( boolean resizable ) { } public void setText ( String string ) { } public void setToolTipText ( String string ) { } void setToolTipText ( Shell shell , String newString ) { } public void setWidth ( int width ) { } }

Fix:
sendSelectionEvent ( ( doubleClick ? SWT . DefaultSelection : SWT . Selection ) ) ;
Buggy code:
public class BooleanProperty extends AbstractProperty { private static final long serialVersionUID = 233L ; private boolean value ; private transient boolean savedValue ; public BooleanProperty ( String name , boolean v ) { } public BooleanProperty ( ) { } public void setObjectValue ( Object v ) { } public String getStringValue ( ) { } public Object getObjectValue ( ) { } @ Override <START_BUG> public Object clone ( ) { <END_BUG> BooleanProperty prop = ( ( BooleanProperty ) ( super . clone ( ) ) ) ; prop . value = value ; return prop ; } @ Override public boolean getBooleanValue ( ) { } @ Override public void setRunningVersion ( boolean runningVersion ) { } public void recoverRunningVersion ( TestElement owner ) { } }

Fix:
public BooleanProperty clone ( ) {
Buggy code:
@ Component @ Scope ( "singleton" ) public class FaceRecognition { public class Trainer implements Runnable { @ Override public void run ( ) { } } volatile RecognizerData data ; private volatile ReentrantLock dataUpdateLock = new ReentrantLock ( ) ; private volatile ReentrantLock trainingLock = new ReentrantLock ( ) ; private RecognizerDAO dataRepository ; private BiometricDataDAO biometricsRepository ; @ Autowired public FaceRecognition ( RecognizerDAO dataRepository , BiometricDataDAO biometricsRepository ) { } @ PostConstruct private void setup ( ) { } public void trainFromDB ( ) { } private IplImage createIPL ( BiometricData d ) { } void learn ( List < BiometricData > trainingData ) { } public ValidationResponse recognizeFace ( BiometricData face ) throws ValidationException { } private List < IplImage > loadFaceImageList ( List < BiometricData > dataList , TemporaryRecognizerData data ) { } private void doPCA ( TemporaryRecognizerData data ) { } private ArrayList < IplImage > initEigenVectors ( int nEigens , CvSize faceImgSize ) { ArrayList < IplImage > eigenVectors = new ArrayList < > ( nEigens ) ; for ( int i = 0 ; i < nEigens ; i ++ ) { <START_BUG> eigenVectors . set ( i , cvCreateImage ( faceImgSize , IPL_DEPTH_32F , 1 ) ) ; <END_BUG> } return eigenVectors ; } private void updateData ( ) { } private void updateData ( RecognizerData newData ) { } private int findNearestNeighbor ( float [ ] projectedTestFace , FloatPointer pConfidencePointer ) { } public boolean needsTraining ( ) { } private class TrainingUpdater implements Runnable { @ Override public void run ( ) { } } public void setNeedsTraining ( ) { } }

Fix:
eigenVectors . add ( cvCreateImage ( faceImgSize , IPL_DEPTH_32F , 1 ) ) ;
Buggy code:
public class Start extends AbstractAction { private static Set commands = new HashSet ( ) ; private StandardJMeterEngine engine ; public Start ( ) { } public Set getActionNames ( ) { } public void doAction ( ActionEvent e ) { if ( e . getActionCommand ( ) . equals ( "start" ) ) { startEngine ( ) ; } else if ( e . getActionCommand ( ) . equals ( "stop" ) ) { <START_BUG> GuiPackage . getInstance ( ) . getMainFrame ( ) . showStoppingMessage ( ) ; <END_BUG> engine . stopTest ( ) ; engine = null ; } } protected void startEngine ( ) { } }

Fix:
GuiPackage . getInstance ( ) . getMainFrame ( ) . showStoppingMessage ( "" ) ;
Buggy code:
public abstract class Definer extends DefBase { private static final String ANTLIB_XML = "//antlib.xml" ; private static class ResourceStack extends ThreadLocal { public Object initialValue ( ) { } Map getStack ( ) { } } private static Definer . ResourceStack resourceStack = new Definer . ResourceStack ( ) ; private String name ; private String classname ; private File file ; private String resource ; private int format = Definer . Format . PROPERTIES ; private boolean definerSet = false ; private int onError = Definer . OnError . FAIL ; private String adapter ; private String adaptTo ; private Class adapterClass ; private Class adaptToClass ; public static class OnError extends EnumeratedAttribute { public static final int FAIL = 0 ; public static final int REPORT = 1 ; public static final int IGNORE = 2 ; public static final int FAIL_ALL = 3 ; public static final String POLICY_FAIL = "fail" ; public static final String POLICY_REPORT = "report" ; public static final String POLICY_IGNORE = "ignore" ; public static final String POLICY_FAILALL = "failall" ; public OnError ( ) { } public OnError ( String value ) { } public String [ ] getValues ( ) { } } public static class Format extends EnumeratedAttribute { public static final int PROPERTIES = 0 ; public static final int XML = 1 ; public String [ ] getValues ( ) { } } public void setOnError ( Definer . OnError onError ) { } public void setFormat ( Definer . Format format ) { } public String getName ( ) { } public File getFile ( ) { } public String getResource ( ) { } public void execute ( ) throws BuildException { } public static String makeResourceFromURI ( String uri ) { } private URL fileToURL ( ) { } private Enumeration resourceToURLs ( ClassLoader classLoader ) { } protected void loadProperties ( ClassLoader al , URL url ) { } private void loadAntlib ( ClassLoader classLoader , URL url ) { try { Antlib antlib = Antlib . createAntlib ( getProject ( ) , url , getURI ( ) ) ; antlib . setClassLoader ( classLoader ) ; antlib . setURI ( getURI ( ) ) ; <START_BUG> antlib . perform ( ) ; <END_BUG> } catch ( BuildException ex ) { throw ProjectHelper . addLocationToBuildException ( ex , getLocation ( ) ) ; } } public void setFile ( File file ) { } public void setResource ( String res ) { } public void setName ( String name ) { } public String getClassname ( ) { } public void setClassname ( String classname ) { } public void setAdapter ( String adapter ) { } protected void setAdapterClass ( Class adapterClass ) { } public void setAdaptTo ( String adaptTo ) { } protected void setAdaptToClass ( Class adaptToClass ) { } protected void addDefinition ( ClassLoader al , String name , String classname ) throws BuildException { } private void tooManyDefinitions ( ) { } }

Fix:
antlib . execute ( ) ;
Buggy code:
public class SetSuperColumnMap extends DMLPlan { private static final Logger logger_ = Logger . getLogger ( SetUniqueKey . class ) ; private CFMetaData cfMetaData_ ; private OperandDef rowKey_ ; private SuperColumnMapExpr superColumnMapExpr_ ; public SetSuperColumnMap ( CFMetaData cfMetaData , OperandDef rowKey , SuperColumnMapExpr superColumnMapExpr ) { } public CqlResult execute ( ) { } public String explainPlan ( ) { <START_BUG> StringBuffer sb = new StringBuffer ( ) ; <END_BUG> String prefix = String . format ( ( "%s<seq2seq4repair_space>Column<seq2seq4repair_space>Family:<seq2seq4repair_space>Batch<seq2seq4repair_space>SET<seq2seq4repair_space>a<seq2seq4repair_space>set<seq2seq4repair_space>of<seq2seq4repair_space>Super<seq2seq4repair_space>Columns:<seq2seq4repair_space>\n" + ( ( "<seq2seq4repair_space>Table<seq2seq4repair_space>Name:<seq2seq4repair_space>%s\n" + "<seq2seq4repair_space>Column<seq2seq4repair_space>Famly:<seq2seq4repair_space>%s\n" ) + "<seq2seq4repair_space>RowKey:<seq2seq4repair_space>%s\n" ) ) , cfMetaData_ . columnType , cfMetaData_ . tableName , cfMetaData_ . cfName , rowKey_ . explain ( ) ) ; for ( Pair < OperandDef , ColumnMapExpr > superColumn : superColumnMapExpr_ ) { OperandDef superColumnKey = superColumn . getFirst ( ) ; ColumnMapExpr columnMapExpr = superColumn . getSecond ( ) ; for ( Pair < OperandDef , OperandDef > entry : columnMapExpr ) { OperandDef columnKey = entry . getFirst ( ) ; OperandDef value = entry . getSecond ( ) ; sb . append ( String . format ( ( "<seq2seq4repair_space>SuperColumnKey:<seq2seq4repair_space>%s\n" + ( "<seq2seq4repair_space>ColumnKey:<seq2seq4repair_space>%s\n" + "<seq2seq4repair_space>Value:<seq2seq4repair_space>%s\n" ) ) , superColumnKey . explain ( ) , columnKey . explain ( ) , value . explain ( ) ) ) ; } } return prefix + ( sb . toString ( ) ) ; } }

Fix:
StringBuilder sb = new StringBuilder ( ) ;
Buggy code:
public class MultiLogFactory implements LogFactory { private List < LogFactory > _delegates ; public MultiLogFactory ( LogFactory d1 , LogFactory d2 ) { } public MultiLogFactory ( LogFactory d1 , LogFactory d2 , LogFactory d3 ) { } public MultiLogFactory ( LogFactory [ ] delegates ) { } public void addLogFactory ( LogFactory factory ) { } public void removeLogFactory ( LogFactory factory ) { } public LogFactory [ ] getDelegates ( ) { <START_BUG> return ( ( LogFactory [ ] ) ( _delegates . toArray ( new LogFactory [ 0 ] ) ) ) ; <END_BUG> } public synchronized Log getLog ( String channel ) { } private static class MultiLog implements Log { private Log [ ] _logs ; public MultiLog ( Log [ ] logs ) { } public Log [ ] getDelegates ( ) { return _logs ; } public void trace ( Object msg ) { } public void trace ( Object msg , Throwable t ) { } public void info ( Object msg ) { } public void info ( Object msg , Throwable t ) { } public void warn ( Object msg ) { } public void warn ( Object msg , Throwable t ) { } public void error ( Object msg ) { } public void error ( Object msg , Throwable t ) { } public void fatal ( Object msg ) { } public void fatal ( Object msg , Throwable t ) { } public boolean isTraceEnabled ( ) { } public boolean isInfoEnabled ( ) { } public boolean isWarnEnabled ( ) { } public boolean isErrorEnabled ( ) { } public boolean isFatalEnabled ( ) { } } }

Fix:
return ( ( LogFactory [ ] ) ( _delegates . toArray ( new LogFactory [ _delegates . size ( ) ] ) ) ) ;
Buggy code:
public class PrefixLevel2TypeBufferLevel1TypeCompletionTestCase extends AbstractGeneratedAddressCompleterTest { @ Test public void testStringValues ( ) { assertAllCandidates ( Arrays . asList ( "last4" , "link4" , "other4" ) ) ; assertSelectedCandidates ( Arrays . asList ( "last4" , "link4" ) ) ; assertBufferPrefix ( ".//" ) ; <START_BUG> assertContextPrefix ( "link1=link2//link3" ) ; <END_BUG> } @ Override protected int getPrefixLevel ( ) { } }

Fix:
assertContextPrefix ( "//link1=link2//link3" ) ;
Buggy code:
public abstract class CommonDeployableContainer < T extends CommonContainerConfiguration > implements DeployableContainer < T > { private T containerConfig ; private ManagementClient managementClient ; @ Inject @ ContainerScoped private InstanceProducer < ArchiveDeployer > archiveDeployerInst ; @ Override public ProtocolDescription getDefaultProtocol ( ) { } @ Override public void setup ( T config ) { containerConfig = config ; ModelControllerClient modelControllerClient = Factory . create ( config . getManagementAddress ( ) , config . getManagementPort ( ) ) ; <START_BUG> managementClient = new ManagementClient ( modelControllerClient ) ; <END_BUG> archiveDeployerInst . set ( new ArchiveDeployer ( ServerDeploymentManager . Factory . create ( modelControllerClient ) ) ) ; } @ Override public final void start ( ) throws LifecycleException { } protected abstract void startInternal ( ) throws LifecycleException { } @ Override public final void stop ( ) throws LifecycleException { } protected abstract void stopInternal ( ) throws LifecycleException { } protected T getContainerConfiguration ( ) { } protected ManagementClient getManagementClient ( ) { } protected ModelControllerClient getModelControllerClient ( ) { } @ Override public ProtocolMetaData deploy ( Archive < ? > archive ) throws DeploymentException { } @ Override public void undeploy ( Archive < ? > archive ) throws DeploymentException { } @ Override public void deploy ( Descriptor descriptor ) throws DeploymentException { } @ Override public void undeploy ( Descriptor descriptor ) throws DeploymentException { } }

Fix:
managementClient = new ManagementClient ( modelControllerClient , config . getManagementAddress ( ) . getHostAddress ( ) ) ;
Buggy code:
public class PIM { private MoSyncThread mMoSyncThread ; private Hashtable < Integer , PIMList > mPIMLists ; private Hashtable < Integer , PIMItem > mPIMItems ; private PIMList mPIMContactsList ; private int mResourceIndex = 0 ; public Activity getActivity ( ) { } public ContentResolver getContentResolver ( ) { } public int throwError ( int errorCode , int panicCode , String panicText ) { } public PIM ( MoSyncThread thread ) { } public int maPimListOpen ( int listType ) { } PIMList getContactList ( ) { } boolean isContactListOpened ( ) { } int openContactsList ( ) { } public int maPimListNext ( int list ) { DebugPrint ( ( ( "maPimListNext(" + list ) + ")" ) ) ; PIMList pimList = null ; if ( ( list < 0 ) || ( ( pimList = mPIMLists . get ( list ) ) == null ) ) { return throwError ( MA_PIM_ERR_HANDLE_INVALID , PANIC_HANDLE_INVALID , sStrHandleInvalid ) ; } if ( pimList . hasNext ( ) ) { <START_BUG> mPIMItems . put ( mResourceIndex , pimList . next ( ) ) ; <END_BUG> } else { return MA_PIM_ERR_NONE ; } return ( mResourceIndex ) ++ ; } public int maPimListClose ( int list ) { } public int maPimItemCount ( int item ) { } public int maPimItemGetField ( int item , int n ) { } public int maPimItemFieldCount ( int item , int field ) { } public int maPimItemGetAttributes ( int item , int field , int index ) { } public int maPimItemSetLabel ( int item , int field , int buffPointer , int buffSize , int index ) { } public int maPimItemGetLabel ( int item , int field , int buffPointer , int buffSize , int index ) { } public int maPimFieldType ( int list , int field ) { } public int maPimItemGetValue ( int item , int field , int buffPointer , int buffSize , int index ) { } public int maPimItemSetValue ( int item , int field , int buffPointer , int buffSize , int index , int attributes ) { } public int maPimItemAddValue ( int item , int field , int buffPointer , int buffSize , int attributes ) { } public int maPimItemRemoveValue ( int item , int field , int index ) { } public int maPimItemClose ( int item ) { } public int maPimItemCreate ( int list ) { } public int maPimItemRemove ( int list , int item ) { } }

Fix:
mPIMItems . put ( mResourceIndex , pimList . next ( getContentResolver ( ) ) ) ;
Buggy code:
public class QualifiedTypeReference extends TypeReference { public char [ ] [ ] tokens ; public long [ ] sourcePositions ; public QualifiedTypeReference ( char [ ] [ ] sources , long [ ] poss ) { } public TypeReference copyDims ( int dim ) { } protected TypeBinding findNextTypeBinding ( int tokenIndex , Scope scope , PackageBinding packageBinding ) { } protected TypeBinding getTypeBinding ( Scope scope ) { if ( ( this . resolvedType ) != null ) return this . resolvedType ; Binding binding = scope . getPackage ( this . tokens ) ; if ( ( binding != null ) && ( ! ( binding . isValidBinding ( ) ) ) ) return ( ( ReferenceBinding ) ( binding ) ) ; PackageBinding packageBinding = ( binding == null ) ? null : ( ( PackageBinding ) ( binding ) ) ; boolean isClassScope = ( scope . kind ) == ( Scope . CLASS_SCOPE ) ; ReferenceBinding qualifiedType = null ; for ( int i = ( packageBinding == null ) ? 0 : packageBinding . compoundName . length , max = this . tokens . length ; i < max ; i ++ ) { findNextTypeBinding ( i , scope , packageBinding ) ; if ( ! ( this . resolvedType . isValidBinding ( ) ) ) return this . resolvedType ; if ( isClassScope ) <START_BUG> if ( ( ( ClassScope ) ( scope ) ) . detectCycle ( this . resolvedType , this , null ) ) <END_BUG> return null ; ReferenceBinding currentType = ( ( ReferenceBinding ) ( this . resolvedType ) ) ; if ( currentType . isGenericType ( ) ) { qualifiedType = scope . environment ( ) . createRawType ( currentType , qualifiedType ) ; } else { qualifiedType = ( ( qualifiedType != null ) && ( ( qualifiedType . isRawType ( ) ) || ( qualifiedType . isParameterizedType ( ) ) ) ) ? scope . createParameterizedType ( ( ( ReferenceBinding ) ( currentType . erasure ( ) ) ) , null , qualifiedType ) : currentType ; } } this . resolvedType = qualifiedType ; return this . resolvedType ; } public char [ ] [ ] getTypeName ( ) { } public StringBuffer printExpression ( int indent , StringBuffer output ) { } public void traverse ( ASTVisitor visitor , BlockScope scope ) { } public void traverse ( ASTVisitor visitor , ClassScope scope ) { } }

Fix:
if ( ( ( ClassScope ) ( scope ) ) . detectHierarchyCycle ( this . resolvedType , this , null ) )
Buggy code:
public class NotificationWindow { Color topAreaBlue = new Color ( 131 , 118 , 162 ) ; Color mainAreaWhite = new Color ( 222 , 222 , 222 ) ; Color notificationBlack = new Color ( 120 , 120 , 120 ) ; public void createWindow ( String s ) { } public class Window implements Runnable { String message ; public Window ( String message ) { } public void run ( ) { int width = 200 ; int height = 50 ; JFrame frame = new JFrame ( "Notification<seq2seq4repair_space>Window" ) ; frame . setUndecorated ( true ) ; frame . setDefaultCloseOperation ( JFrame . DISPOSE_ON_CLOSE ) ; frame . setSize ( width , height ) ; frame . setAlwaysOnTop ( true ) ; frame . setAutoRequestFocus ( false ) ; Dimension screenSize = Toolkit . getDefaultToolkit ( ) . getScreenSize ( ) ; double screenWidth = screenSize . getWidth ( ) ; frame . setLocation ( ( ( ( ( int ) ( screenWidth ) ) - width ) - 5 ) , 30 ) ; frame . setFocusable ( false ) ; frame . setVisible ( true ) ; Graphics g = frame . getGraphics ( ) ; try { <START_BUG> Thread . sleep ( 50 ) ; <END_BUG> } catch ( InterruptedException e1 ) { e1 . printStackTrace ( ) ; } g . setColor ( topAreaBlue ) ; g . fillRect ( 0 , 0 , width , 20 ) ; g . setColor ( mainAreaWhite ) ; g . fillRect ( 0 , 20 , width , ( height - 20 ) ) ; g . setFont ( new Font ( Font . SERIF , 12 , 12 ) ) ; g . drawString ( "Secure<seq2seq4repair_space>Chat<seq2seq4repair_space>Notification" , 40 , 14 ) ; g . setFont ( new Font ( Font . SANS_SERIF , 14 , 14 ) ) ; FontMetrics fontMet = g . getFontMetrics ( ) ; int widthOfMessage = fontMet . stringWidth ( message ) ; g . setColor ( notificationBlack ) ; g . drawString ( message , ( ( width // 2 ) - ( widthOfMessage // 2 ) ) , 40 ) ; try { Thread . sleep ( 3000 ) ; } catch ( InterruptedException e ) { e . printStackTrace ( ) ; } frame . dispose ( ) ; } } }

Fix:
Thread . sleep ( 75 ) ;
Buggy code:
public class JMDNSNamespace extends Namespace { private static final long serialVersionUID = 1L ; private static final String JMDNS_SCHEME = "jmdns" ; <START_BUG> public ID createInstance ( Class [ ] argTypes , Object [ ] args ) throws IDCreateException { <END_BUG> String type = ( ( String ) ( args [ 0 ] ) ) ; String name = null ; if ( ( args . length ) > 1 ) { name = ( ( String ) ( args [ 1 ] ) ) ; } return new JMDNSServiceID ( this , type , name ) ; } public String getScheme ( ) { } }

Fix:
public ID createInstance ( Object [ ] args ) throws IDCreateException {
Buggy code:
public abstract class ServiceCommandDispatcher < C > implements CommandDispatcher < C > { private static final RspFilter FILTER = new RspFilter ( ) { @ Override public boolean isAcceptable ( Object response , Address sender ) { } @ Override public boolean needMoreResponses ( ) { } } ; private final MessageDispatcher dispatcher ; private final CommandMarshaller < C > marshaller ; private final NodeFactory < Address > factory ; private final long timeout ; public ServiceCommandDispatcher ( MessageDispatcher dispatcher , CommandMarshaller < C > marshaller , NodeFactory < Address > factory , long timeout ) { } @ Override public < R > Map < Node , CommandResponse < R > > executeOnCluster ( Command < R , C > command , Node ... excludedNodes ) { } @ Override public < R > Map < Node , Future < R > > submitOnCluster ( Command < R , C > command , Node ... excludedNodes ) { } @ Override public < R > CommandResponse < R > executeOnNode ( Command < R , C > command , Node node ) { } @ Override public < R > Future < R > submitOnNode ( Command < R , C > command , Node node ) { } private < R > Message createMessage ( Command < R , C > command ) { } private < R > Message createMessage ( Command < R , C > command , Node node ) { } private static Address getAddress ( Node node ) { } private RequestOptions createRequestOptions ( Node ... excludedNodes ) { } private RequestOptions createRequestOptions ( ) { <START_BUG> return new RequestOptions ( ResponseMode . GET_ALL , this . timeout , false , ServiceCommandDispatcher . FILTER , Flag . DONT_BUNDLE , Flag . OOB ) ; <END_BUG> } static < R > CommandResponse < R > createCommandResponse ( Rsp < R > response ) { } private Address getLocalAddress ( ) { } private static class SimpleCommandResponse < T > implements CommandResponse < T > { private final T value ; private final ExecutionException exception ; SimpleCommandResponse ( T value ) { } SimpleCommandResponse ( Throwable exception ) { } @ Override public T get ( ) throws ExecutionException { } } private static class SimpleFuture < T > extends ServiceCommandDispatcher . SimpleCommandResponse < T > implements Future < T > { SimpleFuture ( T value ) { } SimpleFuture ( Throwable exception ) { } @ Override public boolean cancel ( boolean mayInterruptIfRunning ) { } @ Override public boolean isCancelled ( ) { } @ Override public boolean isDone ( ) { } @ Override public T get ( long timeout , TimeUnit unit ) throws ExecutionException { } } }

Fix:
return new RequestOptions ( ResponseMode . GET_ALL , this . timeout , false , ServiceCommandDispatcher . FILTER , Flag . DONT_BUNDLE ) ;