nus-yam/ex-repair huggingface dataset:
Buggy code:
public abstract class PostingsConsumer { public abstract void startDoc ( int docID , int freq ) throws IOException { } public abstract void addPosition ( int position , BytesRef payload , int startOffset , int endOffset ) throws IOException { } public abstract void finishDoc ( ) throws IOException { } public TermStats merge ( final MergeState mergeState , final DocsEnum postings , final FixedBitSet visitedDocs ) throws IOException { int df = 0 ; long totTF = 0 ; IndexOptions indexOptions = mergeState . fieldInfo . getIndexOptions ( ) ; if ( indexOptions == ( IndexOptions . DOCS_ONLY ) ) { while ( true ) { final int doc = postings . nextDoc ( ) ; if ( doc == ( DocIdSetIterator . NO_MORE_DOCS ) ) { break ; } visitedDocs . set ( doc ) ; this . startDoc ( doc , 0 ) ; this . finishDoc ( ) ; df ++ ; } totTF = - 1 ; } else if ( indexOptions == ( IndexOptions . DOCS_AND_FREQS ) ) { while ( true ) { final int doc = postings . nextDoc ( ) ; if ( doc == ( DocIdSetIterator . NO_MORE_DOCS ) ) { break ; } visitedDocs . set ( doc ) ; final int freq = postings . freq ( ) ; this . startDoc ( doc , freq ) ; this . finishDoc ( ) ; df ++ ; totTF += freq ; } } else if ( indexOptions == ( IndexOptions . DOCS_AND_FREQS_AND_POSITIONS ) ) { final DocsAndPositionsEnum postingsEnum = ( ( DocsAndPositionsEnum ) ( postings ) ) ; while ( true ) { final int doc = postingsEnum . nextDoc ( ) ; if ( doc == ( DocIdSetIterator . NO_MORE_DOCS ) ) { break ; } visitedDocs . set ( doc ) ; final int freq = postingsEnum . freq ( ) ; this . startDoc ( doc , freq ) ; totTF += freq ; for ( int i = 0 ; i < freq ; i ++ ) { final int position = postingsEnum . nextPosition ( ) ; final BytesRef payload ; if ( postingsEnum . hasPayload ( ) ) { payload = postingsEnum . getPayload ( ) ; } else { payload = null ; } this . addPosition ( position , payload , ( - 1 ) , ( - 1 ) ) ; } this . finishDoc ( ) ; df ++ ; } } else { assert indexOptions == ( IndexOptions . DOCS_AND_FREQS_AND_POSITIONS_AND_OFFSETS ) ; final DocsAndPositionsEnum postingsEnum = ( ( DocsAndPositionsEnum ) ( postings ) ) ; while ( true ) { final int doc = postingsEnum . nextDoc ( ) ; if ( doc == ( DocIdSetIterator . NO_MORE_DOCS ) ) { break ; } visitedDocs . set ( doc ) ; final int freq = postingsEnum . freq ( ) ; this . startDoc ( doc , freq ) ; totTF += freq ; for ( int i = 0 ; i < freq ; i ++ ) { final int position = postingsEnum . nextPosition ( ) ; final BytesRef payload ; if ( postingsEnum . hasPayload ( ) ) { payload = postingsEnum . getPayload ( ) ; } else { payload = null ; } this . addPosition ( position , payload , postingsEnum . startOffset ( ) , postingsEnum . endOffset ( ) ) ; } this . finishDoc ( ) ; df ++ ; } } <START_BUG> return new TermStats ( df , totTF ) ; <END_BUG> } }

Fix:
return new TermStats ( df , ( indexOptions == ( IndexOptions . DOCS_ONLY ) ? - 1 : totTF ) ) ;
Buggy code:
public class CoffiClassSource extends ClassSource { protected final InputStream classFile ; private final String fileName ; private final String zipFileName ; public CoffiClassSource ( String className , InputStream classFile , String fileName , String zipFileName ) { } public Dependencies resolve ( SootClass sc ) { } protected void addSourceFileTag ( soot . SootClass sc ) { if ( ( ( fileName ) == null ) && ( ( zipFileName ) == null ) ) return ; SourceFileTag tag = null ; if ( sc . hasTag ( "SourceFileTag" ) ) { tag = ( ( SourceFileTag ) ( sc . getTag ( "SourceFileTag" ) ) ) ; } else { tag = new SourceFileTag ( ) ; sc . addTag ( tag ) ; } <START_BUG> String name = ( ( zipFileName ) == null ) ? fileName : zipFileName ; <END_BUG> tag . setSourceFile ( name ) ; } }

Fix:
String name = ( ( zipFileName ) == null ) ? new File ( fileName ) . getName ( ) : zipFileName ;
Buggy code:
public class MortgageCalculator { public static List < MortgageParameter > mortgageParams = new ArrayList < > ( ) ; public static final String DELIMITER = "-----------------------------" ; public static void main ( String [ ] args ) throws Exception { } public void run ( String [ ] args ) throws Exception { } private void GettingCalculationInputFromConsole ( ) throws Exception { } private void CalculateData ( ) throws Exception { } private static void SumAndPrint ( MortgageParameter param ) { double totalPaymentToDate = ( ( param . closingCost ) + ( param . downPayment ) ) + ( ( param . monthlyPayment ) * ( param . ownMonthLength ) ) ; double totalPrincipalPaymentToDate = param . GetPrincipalPaymentSum ( ) ; double totalInterestPaymentToDate = param . GetInterestPaymentSum ( ) ; double totalPrincipalLeft = ( ( param . totalPrice ) - ( param . downPayment ) ) - totalPrincipalPaymentToDate ; double owningCost = totalPaymentToDate - ( ( param . totalPrice ) - totalPrincipalLeft ) ; MortgageCalculator . PrintDelimiter ( ) ; <START_BUG> System . out . println ( ( "APR<seq2seq4repair_space>Rate:<seq2seq4repair_space>" + ( new DecimalFormat ( "##.####" ) . format ( param . apr ) ) ) ) ; <END_BUG> System . out . println ( ( "Total<seq2seq4repair_space>Paid:<seq2seq4repair_space>" + ( new DecimalFormat ( "##.##" ) . format ( totalPaymentToDate ) ) ) ) ; System . out . println ( ( "<seq2seq4repair_space>--<seq2seq4repair_space>Down<seq2seq4repair_space>Payment:<seq2seq4repair_space>" + ( new DecimalFormat ( "##.##" ) . format ( param . downPayment ) ) ) ) ; System . out . println ( ( "<seq2seq4repair_space>--<seq2seq4repair_space>Total<seq2seq4repair_space>Principal:<seq2seq4repair_space>" + ( new DecimalFormat ( "##.##" ) . format ( totalPrincipalPaymentToDate ) ) ) ) ; System . out . println ( ( "<seq2seq4repair_space>--<seq2seq4repair_space>Total<seq2seq4repair_space>Interest:<seq2seq4repair_space>" + ( new DecimalFormat ( "##.##" ) . format ( totalInterestPaymentToDate ) ) ) ) ; System . out . println ( ( "Total<seq2seq4repair_space>Principal<seq2seq4repair_space>left:<seq2seq4repair_space>" + ( new DecimalFormat ( "##.##" ) . format ( totalPrincipalLeft ) ) ) ) ; System . out . println ( ( "Assume<seq2seq4repair_space>selling<seq2seq4repair_space>at<seq2seq4repair_space>purchase<seq2seq4repair_space>price,<seq2seq4repair_space>owning<seq2seq4repair_space>cost:<seq2seq4repair_space>" + ( new DecimalFormat ( "##.##" ) . format ( owningCost ) ) ) ) ; MortgageCalculator . PrintDelimiter ( ) ; } private static void PrintDelimiter ( ) { } }

Fix:
System . out . println ( ( "APR<seq2seq4repair_space>Rate:<seq2seq4repair_space>" + ( new DecimalFormat ( "##.######" ) . format ( param . apr ) ) ) ) ;
Buggy code:
@ Service public class EventServiceImpl implements NewEventService { @ Autowired private EventDAO eventDAO ; @ Autowired private EventPostResponse evntResponse ; private final Date tempDate = new Date ( ) ; @ Override public EventPostResponse submitNewEvent ( Event event , MultipartFile imageFile ) { } private String saveUploadedFile ( MultipartFile imageFile , String organiserName ) throws IOException { <START_BUG> if ( imageFile != null ) { <END_BUG> StringBuilder imageName = new StringBuilder ( ) ; imageName . append ( organiserName ) ; imageName . append ( "_" ) ; imageName . append ( tempDate . getTime ( ) ) ; imageName . append ( "_" ) ; imageName . append ( imageFile . getOriginalFilename ( ) ) ; StringBuilder builder = new StringBuilder ( ) ; builder . append ( IMAGE_UPLOAD_PATH ) ; builder . append ( imageName . toString ( ) ) ; StringBuilder imageURL = new StringBuilder ( ) ; imageURL . append ( AMAZON_IMAGE_URL ) ; imageURL . append ( imageName . toString ( ) ) ; File tempFile = new File ( builder . toString ( ) ) ; FileUtils . writeByteArrayToFile ( tempFile , imageFile . getBytes ( ) ) ; return imageURL . toString ( ) ; } return null ; } private void getLatLongForEventLocation ( Event event ) throws InvalidAddressException { } }

Fix:
if ( ( imageFile != null ) || ( ! ( imageFile . getName ( ) . isEmpty ( ) ) ) ) {
Buggy code:
public abstract class AbstractSharedObjectContainerAdapterFactory extends AbstractContainerAdapterFactory { protected static final int ADD_ADAPTER_ERROR_CODE = 300001 ; protected static final String ADD_ADAPTER_ERROR_MESSAGE = Messages . AbstractSharedObjectContainerAdapterFactory_Exception_Adding_Adapter ; private static final int CREATE_ADAPTER_ID_ERROR_CODE = 300002 ; private static final String CREATE_ADAPTER_ID_ERROR_MESSAGE = null ; protected Object getContainerAdapter ( IContainer container , Class adapterType ) { } protected synchronized ISharedObject getSharedObjectAdapter ( ISharedObjectContainer container , Class adapterType ) { } protected Map createAdapterProperties ( ISharedObjectContainer container , Class adapterType , ID sharedObjectID , ISharedObject sharedObjectAdapter ) { } protected ID createAdapterID ( ISharedObjectContainer container , Class adapterType ) { <START_BUG> String singletonName = adapterType . getClass ( ) . getName ( ) ; <END_BUG> try { return IDFactory . getDefault ( ) . createStringID ( singletonName ) ; } catch ( IDCreateException e ) { Trace . catching ( PLUGIN_ID , EXCEPTIONS_CATCHING , AbstractSharedObjectContainerAdapterFactory . class , "getAdapterID" , e ) ; Activator . getDefault ( ) . log ( new Status ( IStatus . ERROR , Activator . getDefault ( ) . getBundle ( ) . getSymbolicName ( ) , AbstractSharedObjectContainerAdapterFactory . CREATE_ADAPTER_ID_ERROR_CODE , AbstractSharedObjectContainerAdapterFactory . CREATE_ADAPTER_ID_ERROR_MESSAGE , e ) ) ; return null ; } } protected abstract ISharedObject createAdapter ( ISharedObjectContainer container , Class adapterType , ID adapterID ) { } public abstract Class [ ] getAdapterList ( ) { } }

Fix:
String singletonName = adapterType . getName ( ) ;
Buggy code:
@ RestController @ RequestMapping ( "//api//task" ) public class TaskRestController { @ Autowired UserManagementService userManagementService ; @ Autowired EventManagementService eventManagementService ; @ Autowired EventLogManagementService eventLogManagementService ; @ Autowired LogBookService logBookService ; @ Autowired GroupManagementService groupManagementService ; @ RequestMapping ( value = "//list//{id}//{phoneNumber}//{code}" , method = RequestMethod . GET ) public ResponseEntity < ResponseWrapper > getTasks ( @ PathVariable ( "phoneNumber" ) String phoneNumber , @ PathVariable ( "code" ) String code , @ PathVariable ( "id" ) String uid ) { } private List < TaskDTO > getTasks ( User user , Group group ) { List < TaskDTO > tasks = new ArrayList < > ( ) ; for ( Event event : eventManagementService . findByAppliesToGroup ( group ) ) { EventLog eventLog = eventLogManagementService . getEventLogOfUser ( event , user ) ; boolean hasResponded = eventLogManagementService . userRsvpForEvent ( event , user ) ; <START_BUG> if ( ! ( event . isSendBlocked ( ) ) ) { <END_BUG> tasks . add ( new TaskDTO ( event , eventLog , user , hasResponded ) ) ; } } for ( LogBook logBook : logBookService . getAllLogBookEntriesForGroup ( group . getId ( ) ) ) { if ( logBook . getCreatedByUserId ( ) . equals ( user . getId ( ) ) ) { tasks . add ( new TaskDTO ( logBook , user , user ) ) ; } else { User creatingUser = userManagementService . loadUser ( logBook . getCreatedByUserId ( ) ) ; if ( logBook . isRecorded ( ) ) { tasks . add ( new TaskDTO ( logBook , user , creatingUser ) ) ; } } } Collections . sort ( tasks ) ; return tasks ; } }

Fix:
if ( ( ! ( event . isSendBlocked ( ) ) ) && ( ( event . getEventStartDateTime ( ) ) != null ) ) {
Buggy code:
public class WizDescription extends WizStep { JTextArea _description = new JTextArea ( ) ; public WizDescription ( ) { } public void setTarget ( Object item ) { String message = "" ; super . setTarget ( item ) ; <START_BUG> Object target = TargetManager . getInstance ( ) . getTarget ( ) ; <END_BUG> if ( target == null ) { _description . setText ( Argo . localize ( "Cognitive" , "message.no-item-selected" ) ) ; } else if ( target instanceof ToDoItem ) { ToDoItem tdi = ( ( ToDoItem ) ( target ) ) ; _description . setEnabled ( true ) ; _description . setText ( tdi . getDescription ( ) ) ; _description . setCaretPosition ( 0 ) ; } else if ( target instanceof PriorityNode ) { message = MessageFormat . format ( Argo . localize ( "Cognitive" , "message.branch-priority" ) , new Object [ ] { target . toString ( ) } ) ; _description . setText ( message ) ; return ; } else if ( target instanceof Critic ) { message = MessageFormat . format ( Argo . localize ( "Cognitive" , "message.branch-critic" ) , new Object [ ] { target . toString ( ) } ) ; _description . setText ( message ) ; return ; } else if ( target instanceof MModelElement ) { message = MessageFormat . format ( Argo . localize ( "Cognitive" , "message.branch-model" ) , new Object [ ] { target . toString ( ) } ) ; _description . setText ( message ) ; return ; } else if ( target instanceof Decision ) { message = MessageFormat . format ( Argo . localize ( "Cognitive" , "message.branch-decision" ) , new Object [ ] { target . toString ( ) } ) ; _description . setText ( message ) ; return ; } else if ( target instanceof Goal ) { message = MessageFormat . format ( Argo . localize ( "Cognitive" , "message.branch-goal" ) , new Object [ ] { target . toString ( ) } ) ; _description . setText ( message ) ; return ; } else if ( target instanceof KnowledgeTypeNode ) { message = MessageFormat . format ( Argo . localize ( "Cognitive" , "message.branch-knowledge" ) , new Object [ ] { target . toString ( ) } ) ; _description . setText ( message ) ; return ; } else { _description . setText ( "" ) ; return ; } } }

Fix:
Object target = item ;
Buggy code:
public abstract class AbstractPresenter implements Presenter { protected final Messages messages = GWT . create ( Messages . class ) ; protected final RootLayoutPanel widgetTag ; protected final SimpleView simpleView ; private PresenterEventListner backEventListner = null ; private PresenterEventListner nextEventListner = null ; public AbstractPresenter ( RootLayoutPanel widgetTag , SimpleView simpleView ) { } @ Override public void setState ( final AppEventListner appEventListner , final AppEventListner . ApplicationState prevState , final AppEventListner . ApplicationState nextState ) { widgetTag . clear ( ) ; if ( prevState != null ) { backEventListner = new PresenterEventListner ( ) { @ Override public void eventFired ( Button button ) { appEventListner . requestApplicationState ( prevState ) ; } @ Override public String getLabel ( ) { return prevState . label ; } } ; } else { backEventListner = new PresenterEventListner ( ) { @ Override public void eventFired ( Button button ) { <START_BUG> appEventListner . requestApplicationState ( menu ) ; <END_BUG> } @ Override public String getLabel ( ) { return menu . label ; } } ; } setTitle ( backEventListner ) ; if ( nextState != null ) { nextEventListner = new PresenterEventListner ( ) { @ Override public void eventFired ( Button button ) { appEventListner . requestApplicationState ( nextState ) ; } @ Override public String getLabel ( ) { return nextState . label ; } } ; simpleView . setButton ( next , nextEventListner ) ; } setContent ( appEventListner ) ; simpleView . resizeView ( ) ; widgetTag . add ( simpleView ) ; } @ Override public void fireBackEvent ( ) { } @ Override public void fireResizeEvent ( ) { } protected abstract void setTitle ( PresenterEventListner titleBarListner ) { } protected abstract void setContent ( final AppEventListner appEventListner ) { } }

Fix:
appEventListner . requestApplicationState ( end ) ;
Buggy code:
public class MessageSender { private final String INVOICE_QUEUE = "invoice" ; private final String WAWISION_QUEUE = "waWision" ; private final String SUGAR_QUEUE = "sugar" ; private final String INVOICE_HOST = "141.22.29.97" ; private final String WAWISION_HOST = "141.22.29.96" ; private final String SUGAR_HOST = "141.22.29.95" ; private final String INVOICE_USER = "invoice" ; private final String WAWISION_USER = "wawision" ; private final String SUGAR_USER = "sugar" ; private final String INVOICE_PW = "invoice" ; private final String WAWISION_PW = "wawision" ; private final String SUGAR_PW = "sugar" ; private Channel channel ; private ConnectionFactory factory ; private Connection connection ; private String messageID ; public MessageSender ( ) { } public void sendToInvoice ( String nachricht ) throws IOException { } public void sendToSugar ( String nachricht ) throws IOException { } public void sendToWaWision ( String nachricht ) throws IOException { } private void send ( String host , String username , String password , String queuename , String nachricht ) throws IOException { } private void createConnection ( ) throws IOException { } private void declareQueue ( String queueName ) throws IOException { } private void setConnectionCredentials ( String host , String username , String password ) { System . out . println ( "setConnectionCerentials()" ) ; this . factory = new ConnectionFactory ( ) ; <START_BUG> this . factory . setHost ( "141.22.29.97" ) ; <END_BUG> this . factory . setUsername ( username ) ; this . factory . setPassword ( password ) ; } @ SuppressWarnings ( "static-access" ) private void publish ( String message , String queueName ) throws IOException { } private void closeConnection ( ) throws IOException { } public String getMessageID ( ) { } }

Fix:
this . factory . setHost ( this . INVOICE_HOST ) ;
Buggy code:
public abstract class AbstractKeyValue < K , V > implements KeyValue < K , V > { protected K key ; protected V value ; protected AbstractKeyValue ( K key , V value ) { } public K getKey ( ) { } public V getValue ( ) { } public String toString ( ) { <START_BUG> return new StringBuffer ( ) . append ( getKey ( ) ) . append ( '=' ) . append ( getValue ( ) ) . toString ( ) ; <END_BUG> } }

Fix:
return new StringBuilder ( ) . append ( getKey ( ) ) . append ( '=' ) . append ( getValue ( ) ) . toString ( ) ;
Buggy code:
@ RunWith ( Arquillian . class ) @ Run ( RunModeType . IN_CONTAINER ) public class ManagedBeanTestCase { @ Deployment public static EnterpriseArchive createDeployment ( ) throws Exception { } @ Test public void testManagedBean ( ) throws Exception { BeanWithSimpleInjected bean = LookupService . getBean ( ) ; Assert . assertNotNull ( bean ) ; Assert . assertNotNull ( bean . getSimple ( ) ) ; String s = bean . echo ( "Hello" ) ; Assert . assertNotNull ( s ) ; <START_BUG> Assert . assertEquals ( "#InterceptorBean##OtherInterceptorBean##BeanParent##BeanWithSimpleInjected#Hello#CDIBean" , s ) ; <END_BUG> } }

Fix:
Assert . assertEquals ( "#InterceptorBean##OtherInterceptorBean##BeanParent##BeanWithSimpleInjected#Hello#CDIBean#CDIBean" , s ) ;
Buggy code:
public class CliClient { private Client thriftClient_ = null ; private CliSessionState css_ = null ; public CliClient ( CliSessionState css , Cassandra . Client thriftClient ) { } public void executeCLIStmt ( String stmt ) throws InvalidRequestException , NotFoundException , TException , UnavailableException { } private void printCmdHelp ( ) { } private void cleanupAndExit ( ) { } private void executeGet ( CommonTree ast ) throws InvalidRequestException , NotFoundException , TException { if ( ! ( CliMain . isConnected ( ) ) ) return ; int childCount = ast . getChildCount ( ) ; assert childCount == 1 ; CommonTree columnFamilySpec = ( ( CommonTree ) ( ast . getChild ( 0 ) ) ) ; assert ( columnFamilySpec . getType ( ) ) == ( CliParser . NODE_COLUMN_ACCESS ) ; String tableName = CliCompiler . getTableName ( columnFamilySpec ) ; String key = CliCompiler . getKey ( columnFamilySpec ) ; String columnFamily = CliCompiler . getColumnFamily ( columnFamilySpec ) ; int columnSpecCnt = CliCompiler . numColumnSpecifiers ( columnFamilySpec ) ; if ( columnSpecCnt == 0 ) { List < column_t > columns = new ArrayList < column_t > ( ) ; <START_BUG> columns = thriftClient_ . get_slice ( tableName , key , columnFamily , true , 1000000 ) ; <END_BUG> int size = columns . size ( ) ; for ( Iterator < column_t > colIter = columns . iterator ( ) ; colIter . hasNext ( ) ; ) { column_t col = colIter . next ( ) ; css_ . out . printf ( "<seq2seq4repair_space>(column=%s,<seq2seq4repair_space>value=%s;<seq2seq4repair_space>timestamp=%d)\n" , col . columnName , col . value , col . timestamp ) ; } css_ . out . println ( ( ( "Returned<seq2seq4repair_space>" + size ) + "<seq2seq4repair_space>rows." ) ) ; } else if ( columnSpecCnt == 1 ) { String columnName = CliCompiler . getColumn ( columnFamilySpec , 0 ) ; column_t col = new column_t ( ) ; col = thriftClient_ . get_column ( tableName , key , ( ( columnFamily + ":" ) + columnName ) ) ; css_ . out . printf ( "==><seq2seq4repair_space>(name=%s,<seq2seq4repair_space>value=%s;<seq2seq4repair_space>timestamp=%d)\n" , col . columnName , col . value , col . timestamp ) ; } else { assert false ; } } private void executeSet ( CommonTree ast ) throws InvalidRequestException , TException , UnavailableException { } private void executeShowProperty ( CommonTree ast , String propertyName ) throws TException { } private void executeShowTables ( CommonTree ast ) throws TException { } private void executeDescribeTable ( CommonTree ast ) throws TException { } private void executeConnect ( CommonTree ast ) throws TException { } public void executeQueryOnServer ( String query ) throws TException { } }

Fix:
columns = thriftClient_ . get_slice ( tableName , key , columnFamily , true , 0 , 1000000 ) ;
Buggy code:
public class NotificationsMysqlConnector implements IAlertsDatabaseConnector { private static final Logger log = Logger . getLogger ( NotificationsMysqlConnector . class ) ; private DbUtils dbUtils ; private Gson gson ; private ExperimentalConfJsonStore webConfJsonStore ; private FeatureFlags featureFlags ; private static final String TABLE_NAME = "CollectorsNotifications" ; @ Inject public NotificationsMysqlConnector ( DbUtils dbUtils , Gson gson , ExperimentalConfJsonStore webConfJsonStore , FeatureFlags featureFlags ) { } public void createTables ( ) { if ( webConfJsonStore . get ( ) . readonly_web_server ( ) ) { NotificationsMysqlConnector . log . info ( "read<seq2seq4repair_space>only<seq2seq4repair_space>mode" ) ; return ; } <START_BUG> String colsDefinition = "notification_id<seq2seq4repair_space>VARCHAR(150)<seq2seq4repair_space>NOT<seq2seq4repair_space>NULL<seq2seq4repair_space>PRIMARY<seq2seq4repair_space>KEY,<seq2seq4repair_space>data<seq2seq4repair_space>text,<seq2seq4repair_space>collection_type_update_time<seq2seq4repair_space>BIGINT,<seq2seq4repair_space>collection_type<seq2seq4repair_space>BIGINT" ; <END_BUG> dbUtils . executeUpdate ( ( ( ( ( "create<seq2seq4repair_space>table<seq2seq4repair_space>if<seq2seq4repair_space>not<seq2seq4repair_space>exists<seq2seq4repair_space>" + ( NotificationsMysqlConnector . TABLE_NAME ) ) + "<seq2seq4repair_space>(" ) + colsDefinition ) + ")" ) ) ; } @ Override public void put ( CollectorNotificationJson collectorNotificationJson ) { } @ Override public Multimap < String , CollectorNotificationJson > getAlertsAndUpdate ( final AlertsCollectionType collType ) { } private void updateCollectionType ( final AlertsCollectionType collType , long time , int maxId ) { } private static class MapWithId { Multimap < String , CollectorNotificationJson > map ; int maxId ; public MapWithId ( Multimap < String , CollectorNotificationJson > map , int maxId ) { } } private NotificationsMysqlConnector . MapWithId query ( final AlertsCollectionType collType ) { } @ Override public void removeOldAlerts ( ) { } @ Override public String toString ( ) { } }

Fix:
String colsDefinition = "id<seq2seq4repair_space>INT<seq2seq4repair_space>NOT<seq2seq4repair_space>NULL<seq2seq4repair_space>AUTO_INCREMENT,<seq2seq4repair_space>INDEX<seq2seq4repair_space>(id),<seq2seq4repair_space>notification_id<seq2seq4repair_space>VARCHAR(150)<seq2seq4repair_space>NOT<seq2seq4repair_space>NULL<seq2seq4repair_space>PRIMARY<seq2seq4repair_space>KEY,<seq2seq4repair_space>data<seq2seq4repair_space>text,<seq2seq4repair_space>collection_type_update_time<seq2seq4repair_space>BIGINT,<seq2seq4repair_space>collection_type<seq2seq4repair_space>BIGINT" ;
Buggy code:
public class ScatterPlot extends Graph { public ScatterPlot ( XYSeriesCollection dataset , String title , String xAxisTitle , String yAxisTitle , Regression [ ] regression ) { } private JFreeChart getChart ( XYSeriesCollection dataset , String title , String xAxisTitle , String yAxisTitle , Regression [ ] regressions ) { <START_BUG> JFreeChart chart = ChartFactory . createScatterPlot ( title , xAxisTitle , yAxisTitle , dataset , HORIZONTAL , true , false , false ) ; <END_BUG> for ( Regression regression : regressions ) { regression . preformRegression ( dataset , chart . getXYPlot ( ) ) ; } return chart ; } }

Fix:
JFreeChart chart = ChartFactory . createScatterPlot ( title , xAxisTitle , yAxisTitle , dataset , VERTICAL , true , false , false ) ;
Buggy code:
@ WebServlet ( name = "ListMealServlet" , urlPatterns = "//listMeal" ) public class ListMealController extends HttpServlet { @ Override protected void doGet ( HttpServletRequest req , HttpServletResponse resp ) throws IOException , ServletException { List < Meal > allMeals = MealService . showAll ( ) ; PrintWriter writer = resp . getWriter ( ) ; <START_BUG> if ( allMeals . isEmpty ( ) ) { <END_BUG> writer . println ( MessageBuilder . buildStringFromList ( allMeals ) ) ; } else { writer . println ( EMPTY_SET ) ; } } }

Fix:
if ( ! ( allMeals . isEmpty ( ) ) ) {
Buggy code:
public class Label extends Control { String text = "" ; Image image ; boolean isImage ; public Label ( Composite parent , int style ) { } static int checkStyle ( int style ) { } public Point computeSize ( int wHint , int hHint , boolean changed ) { } void createHandle ( ) { } int defaultThemeFont ( ) { } void drawBackground ( int control , int context ) { if ( ( ( style ) & ( SWT . SEPARATOR ) ) != 0 ) { <START_BUG> drawBackground ( control , context , background ) ; <END_BUG> } } void drawWidget ( int control , int context , int damageRgn , int visibleRgn , int theEvent ) { } public int getAlignment ( ) { } public int getBorderWidth ( ) { } public Image getImage ( ) { } String getNameText ( ) { } public String getText ( ) { } public void setAlignment ( int alignment ) { } public void setImage ( Image image ) { } public void setText ( String string ) { } }

Fix:
fillBackground ( control , context , null ) ;
Buggy code:
class ConfigurationModelBeanDefinitionReader { private static final Log log = LogFactory . getLog ( ConfigurationModelBeanDefinitionReader . class ) ; private BeanDefinitionRegistry registry ; public ConfigurationModelBeanDefinitionReader ( ) { } public BeanDefinitionRegistry loadBeanDefinitions ( ConfigurationModel model ) { } private void loadBeanDefinitionsForConfigurationClass ( ConfigurationClass configClass ) { doLoadBeanDefinitionForConfigurationClass ( configClass ) ; <START_BUG> for ( BeanMethod method : configClass . getMethods ( ) ) <END_BUG> loadBeanDefinitionsForModelMethod ( method ) ; } private void doLoadBeanDefinitionForConfigurationClass ( ConfigurationClass configClass ) { } private void loadBeanDefinitionsForModelMethod ( BeanMethod method ) { } }

Fix:
for ( BeanMethod method : configClass . getBeanMethods ( ) )
Buggy code:
public class MutableDouble extends Number implements Comparable , Mutable { private static final long serialVersionUID = 1587163916L ; private double value ; public MutableDouble ( ) { } public MutableDouble ( double value ) { } public MutableDouble ( Number value ) { } public Object getValue ( ) { } public void setValue ( double value ) { } public void setValue ( Object value ) { } @ Override public int intValue ( ) { } @ Override public long longValue ( ) { } @ Override public float floatValue ( ) { } @ Override public double doubleValue ( ) { } public boolean isNaN ( ) { } public boolean isInfinite ( ) { } public Double toDouble ( ) { } public void increment ( ) { } public void decrement ( ) { } public void add ( double operand ) { } public void add ( Number operand ) { } public void subtract ( double operand ) { } public void subtract ( Number operand ) { } @ Override public boolean equals ( Object obj ) { } @ Override public int hashCode ( ) { } public int compareTo ( Object obj ) { MutableDouble other = ( ( MutableDouble ) ( obj ) ) ; double anotherVal = other . value ; <START_BUG> return NumberUtils . compare ( value , anotherVal ) ; <END_BUG> } @ Override public String toString ( ) { } }

Fix:
return Double . compare ( value , anotherVal ) ;
Buggy code:
public interface DestroyCallback { <START_BUG> public void callback ( Object key ) ; <END_BUG> }

Fix:
public void callback ( ) ;
Buggy code:
public class TestService implements ITestService { public String getString ( ) { <START_BUG> return EXPECTED_RESULT ; <END_BUG> } }

Fix:
return RESULT ;
Buggy code:
public final class WidgetStatus { private static boolean mediumWidget = false ; private static boolean smallWidget = false ; private static boolean bigWidget = false ; private static boolean notification = false ; private static DeckStatus sDeckStatus ; private static AsyncTask < Context , Void , Context > sUpdateDeckStatusAsyncTask ; private WidgetStatus ( ) { } public static void update ( Context context ) { } public static void update ( Context context , DeckStatus deckStatus ) { } public static void update ( Context context , DeckStatus deckStatus , boolean updateBigWidget ) { } public static DeckStatus [ ] fetch ( Context context ) { } public static int [ ] fetchSmall ( Context context ) { } public static int fetchDue ( Context context ) { } public static DeckStatus getDeckStatus ( Deck deck ) { } private static class UpdateDeckStatusAsyncTask extends AsyncTask < Context , Void , Context > { private static final DeckStatus [ ] EMPTY_DECK_STATUS = new DeckStatus [ 0 ] ; private static DeckStatus [ ] mDecks = WidgetStatus . UpdateDeckStatusAsyncTask . EMPTY_DECK_STATUS ; @ Override protected Context doInBackground ( Context ... params ) { } @ Override protected void onPostExecute ( Context context ) { Log . d ( TAG , "WidgetStatus.UpdateDeckStatusAsyncTask.onPostExecute()" ) ; MetaDB . storeWidgetStatus ( context , WidgetStatus . UpdateDeckStatusAsyncTask . mDecks ) ; if ( WidgetStatus . mediumWidget ) { Intent intent ; intent = new Intent ( context , UpdateService . class ) ; intent . setAction ( ACTION_UPDATE ) ; context . startService ( intent ) ; } if ( WidgetStatus . smallWidget ) { Intent intent ; intent = new Intent ( context , AnkiDroidWidgetSmall . UpdateService . class ) ; context . startService ( intent ) ; } if ( WidgetStatus . bigWidget ) { Intent intent ; <START_BUG> intent = new Intent ( context , AnkiDroidWidgetSmall . UpdateService . class ) ; <END_BUG> intent . setAction ( AnkiDroidWidgetBig . UpdateService . ACTION_UPDATE ) ; context . startService ( intent ) ; } if ( WidgetStatus . notification ) { Intent intent ; intent = new Intent ( context , NotificationService . class ) ; context . startService ( intent ) ; } } } public static class ByDueComparator implements Comparator < DeckStatus > { @ Override public int compare ( DeckStatus deck1 , DeckStatus deck2 ) { } } public static class ByNameComparator implements Comparator < DeckStatus > { @ Override public int compare ( DeckStatus deck1 , DeckStatus deck2 ) { } } public static final class AnkiFileFilter implements FileFilter { @ Override public boolean accept ( File pathname ) { } } }

Fix:
intent = new Intent ( context , AnkiDroidWidgetBig . UpdateService . class ) ;
Buggy code:
public class Main { public static void main ( String [ ] args ) { Tetris tet = new Tetris ( 10 , 20 ) ; Random r = new Random ( ) ; <START_BUG> double [ ] opt = CESolve . solve ( 100 , 10 , 30 , tet , r ) ; <END_BUG> tet . runTrial ( opt , true ) ; } }

Fix:
double [ ] opt = CESolve . solve ( 100 , 10 , 15 , tet , r ) ;
Buggy code:
public class ShoppingListFragment extends Fragment implements ShoppingListViewModel . Listener , ObservableArrayList . Listener < Item > { private static final String ARG_LISTID = "list_id" ; private static final int VOICE_RECOGNITION_REQUEST_CODE = 1234 ; public Menu overflow_menu ; private int listID = - 1 ; private AutoCompletionHelper autoCompletion ; private Integer sizeBoughtItems ; private ShoppingListViewModel viewModel ; private boolean updatingViewModel ; @ InjectView ( id . list_shoppingList ) DynamicListView shoppingListView ; @ InjectView ( id . textView_quickAdd ) MultiAutoCompleteTextView textView_QuickAdd ; @ InjectView ( id . fab ) FloatingActionButton floatingActionButton ; @ InjectView ( id . button_quickAdd ) View button_QuickAdd ; @ InjectView ( id . quickAdd ) RelativeLayout quickAddLayout ; @ InjectView ( id . micButton ) ImageButton micButton ; public static ShoppingListFragment newInstance ( int listID ) { } @ Override public void onCreate ( Bundle savedInstanceState ) { } @ Override public View onCreateView ( LayoutInflater inflater , ViewGroup container , Bundle savedInstanceState ) { } @ Override public void onResume ( ) { } @ Override public void onDestroyView ( ) { } private void refreshQuickAddAutoCompletion ( ) { } private void disableFloatingButtonWhileSoftKeyboardIsShown ( ) { } @ SuppressWarnings ( "unused" ) public void onEvent ( AutoCompletionHistoryDeletedEvent event ) { } @ OnTextChanged ( id . textView_quickAdd ) @ SuppressWarnings ( "unused" ) public void textView_ShoppingListName_OnTextChanged ( CharSequence s ) { } @ Override public void onQuickAddTextChanged ( ) { } @ Override public void onItemSortTypeChanged ( ) { } @ Override public void onNameChanged ( String value ) { } @ Override public void onFinish ( ) { } @ Override public void onItemAdded ( Item newItem ) { } @ Override public void onItemRemoved ( Item removedItem ) { } @ Override public void onItemModified ( Item modifiedItem ) { } @ Override public void onActivityResult ( int requestCode , int resultCode , Intent data ) { super . onActivityResult ( requestCode , resultCode , data ) ; getActivity ( ) ; <START_BUG> if ( requestCode == ( ShoppingListFragment . VOICE_RECOGNITION_REQUEST_CODE ) ) { <END_BUG> List < String > results = data . getStringArrayListExtra ( EXTRA_RESULTS ) ; String spokenText = results . get ( 0 ) ; textView_QuickAdd . setText ( spokenText ) ; } } }

Fix:
if ( ( requestCode == ( ShoppingListFragment . VOICE_RECOGNITION_REQUEST_CODE ) ) && ( resultCode == ( getActivity ( ) . RESULT_OK ) ) ) {
Buggy code:
public class JogPanel extends JPanel implements ActionListener , MouseListener { private final String JOGMODE_PREF_NAME = "controlpanel.jogmode" ; protected boolean continuousJogMode = false ; protected double jogRate ; protected Pattern jogPattern ; protected String [ ] jogStrings = new String [ ] { "0.01mm" , "0.05mm" , "0.1mm" , "0.5mm" , "1mm" , "5mm" , "10mm" , "20mm" , "50mm" , "Continuous<seq2seq4repair_space>Jog" } ; protected final Point5d feedrate ; protected EnumMap < AxisId , JTextField > positionFields = new EnumMap < AxisId , JTextField > ( AxisId . class ) ; protected MachineInterface machine ; public class JogButton extends JButton { public JogButton ( String root , String tooltip ) { } } protected JButton createJogButton ( String root , String tooltip ) { } protected JButton createJogButton ( String root , String tooltip , String action ) { } protected JTextField createDisplayField ( ) { } private void setJogMode ( String mode ) { } private JPanel buildPositionPanel ( ) { } private class FeedrateControl implements ActionListener , FocusListener , ChangeListener { final JSlider slider ; final AxisId axis ; final JTextField field ; private FeedrateControl ( String display , AxisId axis , JPanel parent ) { } String getPrefName ( ) { } void updateFromField ( ) { } public void actionPerformed ( ActionEvent e ) { } public void focusGained ( FocusEvent e ) { } public void focusLost ( FocusEvent e ) { } public void stateChanged ( ChangeEvent e ) { } } private JPanel makeRotationPanel ( AxisId axis ) { } public JogPanel ( MachineInterface machine ) { } DecimalFormat positionFormatter = new DecimalFormat ( "###.##" ) ; public synchronized void updateStatus ( ) { <START_BUG> Point5d current = machine . getDriverQueryInterface ( ) . getCurrentPosition ( true ) ; <END_BUG> for ( AxisId axis : machine . getModel ( ) . getAvailableAxes ( ) ) { double v = current . axis ( axis ) ; positionFields . get ( axis ) . setText ( positionFormatter . format ( v ) ) ; } } Pattern jogActionParser = Pattern . compile ( "([XYZAB])([\\+\\-])" ) ; Pattern centerActionParser = Pattern . compile ( "Center<seq2seq4repair_space>([XYZAB])" ) ; public void actionPerformed ( ActionEvent e ) { } public void mouseClicked ( MouseEvent arg0 ) { } public void mouseEntered ( MouseEvent arg0 ) { } public void mouseExited ( MouseEvent arg0 ) { } public void mousePressed ( MouseEvent e ) { } public void mouseReleased ( MouseEvent arg0 ) { } }

Fix:
Point5d current = machine . getDriverQueryInterface ( ) . getCurrentPosition ( false ) ;
Buggy code:
public abstract class CharacterDataImpl extends ChildNode { static final long serialVersionUID = 7931170150428474230L ; protected String data ; private static transient NodeList singletonNodeList = new NodeList ( ) { public Node item ( int index ) { } public int getLength ( ) { } } ; protected CharacterDataImpl ( DocumentImpl ownerDocument , String data ) { } public NodeList getChildNodes ( ) { } public String getNodeValue ( ) { } void setNodeValueInternal ( String value ) { } public void setNodeValue ( String value ) { if ( isReadOnly ( ) ) throw new DOMExceptionImpl ( DOMException . NO_MODIFICATION_ALLOWED_ERR , "DOM001<seq2seq4repair_space>Modification<seq2seq4repair_space>not<seq2seq4repair_space>allowed" ) ; if ( needsSyncData ( ) ) { synchronizeData ( ) ; } <START_BUG> String oldvalue = value ; <END_BUG> EnclosingAttr enclosingAttr = null ; if ( MUTATIONEVENTS ) { LCount lc = LCount . lookup ( DOM_ATTR_MODIFIED ) ; if ( ( ( ( lc . captures ) + ( lc . bubbles ) ) + ( lc . defaults ) ) > 0 ) { enclosingAttr = getEnclosingAttr ( ) ; } } this . data = value ; if ( ! ( setValueCalled ( ) ) ) { ownerDocument ( ) . replacedText ( this ) ; } if ( MUTATIONEVENTS ) { LCount lc = LCount . lookup ( DOM_CHARACTER_DATA_MODIFIED ) ; if ( ( ( ( lc . captures ) + ( lc . bubbles ) ) + ( lc . defaults ) ) > 0 ) { MutationEvent me = new MutationEventImpl ( ) ; me . initMutationEvent ( DOM_CHARACTER_DATA_MODIFIED , true , false , null , oldvalue , value , null ) ; dispatchEvent ( me ) ; } dispatchAggregateEvents ( enclosingAttr ) ; } } public String getData ( ) { } public int getLength ( ) { } public void appendData ( String data ) { } public void deleteData ( int offset , int count ) throws DOMException { } public void insertData ( int offset , String data ) throws DOMException { } public void replaceData ( int offset , int count , String data ) throws DOMException { } public void setData ( String value ) throws DOMException { } public String substringData ( int offset , int count ) throws DOMException { } }

Fix:
String oldvalue = this . data ;
Buggy code:
public class Start { public static void main ( String [ ] args ) { QueryBuilder queryBuilder = new QueryBuilder ( ) ; <START_BUG> System . out . println ( queryBuilder . showStudent ( ) ) ; <END_BUG> } }

Fix:
System . out . println ( queryBuilder . showStudentGroup ( ) ) ;
Buggy code:
public interface StreamOperations extends ResourceOperations { <START_BUG> public StreamDefinitionResource createStream ( String name , String defintion , boolean deploy ) ; <END_BUG> public PagedResources < StreamDefinitionResource > list ( ) { } }

Fix:
public StreamDefinitionResource createStream ( String name , String definition , boolean deploy ) ;
Buggy code:
public final class PageMap implements Serializable { public static final String DEFAULT_NAME = null ; private static final Log log = LogFactory . getLog ( PageMap . class ) ; private static final long serialVersionUID = 1L ; private final ArrayListStack accessStack = new ArrayListStack ( 8 ) ; private String interceptContinuationURL ; private final String name ; private int pageId = 0 ; private transient Session session ; public static class Access implements Serializable { private static final long serialVersionUID = 1L ; int id ; int version ; public boolean equals ( Object obj ) { } public final int getId ( ) { } public final int getVersion ( ) { } public int hashCode ( ) { } public String toString ( ) { } } static interface IVisitor { public void entry ( final IPageMapEntry entry ) { } } public static PageMap forName ( final String pageMapName ) { } PageMap ( final String name , final Session session ) { } public final void clear ( ) { } public final ArrayListStack getAccessStack ( ) { } public final IPageMapEntry getEntry ( final int id ) { } public final String getName ( ) { } public final Session getSession ( ) { } public final long getSizeInBytes ( ) { } public final int getVersions ( ) { } public final boolean isDefault ( ) { } public final IPageMapEntry lastAccessedEntry ( ) { } public final void remove ( ) { } public final void remove ( final Page page ) { } public final void removeEntry ( final IPageMapEntry entry ) { } public String toString ( ) { } final String attributeForId ( final int id ) { } final String attributePrefix ( ) { } final boolean continueToOriginalDestination ( ) { final RequestCycle cycle = RequestCycle . get ( ) ; if ( ( interceptContinuationURL ) != null ) { cycle . setRequestTarget ( new IRequestTarget ( ) { final String responseUrl = interceptContinuationURL ; <START_BUG> public void cleanUp ( RequestCycle requestCycle ) { <END_BUG> } public Object getLock ( RequestCycle requestCycle ) { return null ; } public void respond ( RequestCycle requestCycle ) { cycle . getResponse ( ) . redirect ( responseUrl ) ; } } ) ; interceptContinuationURL = null ; session . dirtyPageMap ( this ) ; return true ; } return false ; } final Page get ( final int id , int versionNumber ) { } final int nextId ( ) { } final void put ( final Page page ) { } final void redirectToInterceptPage ( final Page page ) { } final void setSession ( final Session session ) { } final void visitEntries ( final PageMap . IVisitor visitor ) { } private final void access ( final IPageMapEntry entry , final int version ) { } private final List getEntries ( ) { } private final PageMap . Access peekAccess ( ) { } private final PageMap . Access popAccess ( ) { } private final void pushAccess ( IPageMapEntry entry ) { } private final int versionOf ( final IPageMapEntry entry ) { } }

Fix:
public void detach ( RequestCycle requestCycle ) {
Buggy code:
public class MemoryMapState < T > implements ITupleCollection , Snapshottable < T > , MapState < T > { MemoryMapState . MemoryMapStateBacking < OpaqueValue > _backing ; SnapshottableMap < T > _delegate ; public MemoryMapState ( String id ) { } public T update ( ValueUpdater updater ) { } public void set ( T o ) { } public T get ( ) { } public void beginCommit ( Long txid ) { } public void commit ( Long txid ) { } public Iterator < List < Object > > getTuples ( ) { } public List < T > multiUpdate ( List < List < Object > > keys , List < ValueUpdater > updaters ) { } public void multiPut ( List < List < Object > > keys , List < T > vals ) { } public List < T > multiGet ( List < List < Object > > keys ) { } public static class Factory implements StateFactory { String _id ; public Factory ( ) { } @ Override public State makeState ( Map conf , IMetricsContext metrics , int partitionIndex , int numPartitions ) { <START_BUG> return new MemoryMapState ( ( ( _id ) + partitionIndex ) ) ; <END_BUG> } } static ConcurrentHashMap < String , Map < List < Object > , Object > > _dbs = new ConcurrentHashMap < String , Map < List < Object > , Object > > ( ) ; static class MemoryMapStateBacking < T > implements ITupleCollection , IBackingMap < T > { public static void clearAll ( ) { } Map < List < Object > , T > db ; Long currTx ; public MemoryMapStateBacking ( String id ) { } @ Override public List < T > multiGet ( List < List < Object > > keys ) { } @ Override public void multiPut ( List < List < Object > > keys , List < T > vals ) { } @ Override public Iterator < List < Object > > getTuples ( ) { } } }

Fix:
return new MemoryMapState ( _id ) ;
Buggy code:
@ Service public class FacilityService { private AllFacilities allFacilities ; private IdentifierGenerationService identifierGenerationService ; @ Autowired public FacilityService ( AllFacilities allFacilities , IdentifierGenerationService identifierGenerationService ) { } public String create ( String name , String country , String region , String district , String province , String phoneNumber , String additionalPhoneNumber1 , String additionalPhoneNumber2 , String additionalPhoneNumber3 ) throws FacilityAlreadyFoundException { <START_BUG> final List < Facility > facilities = allFacilities . facilitiesByName ( name ) ; <END_BUG> final MRSFacility mrsFacility = new MRSFacility ( name , country , region , district , province ) ; if ( isDuplicate ( facilities , mrsFacility , phoneNumber ) ) { throw new FacilityAlreadyFoundException ( ) ; } final Facility facility = new Facility ( mrsFacility ) . phoneNumber ( phoneNumber ) . additionalPhoneNumber1 ( additionalPhoneNumber1 ) . additionalPhoneNumber2 ( additionalPhoneNumber2 ) . additionalPhoneNumber3 ( additionalPhoneNumber3 ) . motechId ( identifierGenerationService . newFacilityId ( ) ) ; return save ( facility ) ; } private String save ( Facility facility ) { } public List < Facility > facilities ( ) { } public List < Facility > searchFacilities ( String motechId , String name , String country , String region , String district , String province ) { } private boolean isDuplicate ( List < Facility > facilities , MRSFacility mrsFacility , String phoneNumber ) { } private List < Facility > filterFacilities ( String field , String matcher , List < Facility > filteredFacilities ) { } public Facility getFacility ( String facilityId ) { } public void update ( String id , String facilityId , String name , String country , String region , String district , String province , String phoneNumber , String additionalPhoneNumber1 , String additionalPhoneNumber2 , String additionalPhoneNumber3 ) throws FacilityNotFoundException { } No newline ; at end ; of file ; }

Fix:
final List < Facility > facilities = facilities ( ) ;
Buggy code:
class FilterRefAdd extends AbstractAddStepHandler { FilterRefAdd ( ) { } @ Override protected void performRuntime ( OperationContext context , ModelNode operation , ModelNode model , ServiceVerificationHandler verificationHandler , List < ServiceController < ? > > newControllers ) throws OperationFailedException { final PathAddress address = PathAddress . pathAddress ( operation . get ( OP_ADDR ) ) ; final String name = address . getLastElement ( ) . getValue ( ) ; Predicate predicate = null ; if ( model . hasDefined ( FilterRefDefinition . PREDICATE . getName ( ) ) ) { String predicateString = model . get ( FilterRefDefinition . PREDICATE . getName ( ) ) . asString ( ) ; predicate = PredicateParser . parse ( predicateString , getClass ( ) . getClassLoader ( ) ) ; } final FilterRef service = new FilterRef ( predicate ) ; final ServiceTarget target = context . getServiceTarget ( ) ; <START_BUG> ServiceController < ? > sc = target . addService ( UndertowService . getFilterRefServiceName ( address , name ) , service ) . addDependency ( FILTER . append ( name ) , FilterService . class , service . getFilter ( ) ) . setInitialMode ( ON_DEMAND ) . install ( ) ; <END_BUG> if ( newControllers != null ) { newControllers . add ( sc ) ; } } }

Fix:
ServiceController < ? > sc = target . addService ( UndertowService . getFilterRefServiceName ( address , name ) , service ) . addDependency ( FILTER . append ( name ) , FilterService . class , service . getFilter ( ) ) . setInitialMode ( ACTIVE ) . install ( ) ;
Buggy code:
public class CheckBox extends FormComponent implements IOnChangeListener { private static final long serialVersionUID = 1L ; public CheckBox ( final String id ) { } public CheckBox ( final String id , IModel model ) { } public void onSelectionChanged ( ) { <START_BUG> convert ( ) ; <END_BUG> updateModel ( ) ; onSelectionChanged ( getModelObject ( ) ) ; } protected void onSelectionChanged ( Object newSelection ) { } protected boolean wantOnSelectionChangedNotifications ( ) { } protected boolean getStatelessHint ( ) { } protected final void onComponentTag ( final ComponentTag tag ) { } protected final boolean supportsPersistence ( ) { } protected Object convertValue ( String [ ] value ) { } }

Fix:
convertInput ( ) ;