nus-yam/ex-repair huggingface dataset:
Buggy code:
public class SystemBolt implements IBolt { private static Logger LOG = LoggerFactory . getLogger ( SystemBolt . class ) ; private static boolean _prepareWasCalled = false ; private static class MemoryUsageMetric implements IMetric { IFn _getUsage ; public MemoryUsageMetric ( IFn getUsage ) { } @ Override public Object getValueAndReset ( ) { MemoryUsage memUsage = ( ( MemoryUsage ) ( _getUsage . invoke ( ) ) ) ; return ImmutableMap . builder ( ) . put ( "maxBytes" , memUsage . getMax ( ) ) . put ( "committedBytes" , memUsage . getCommitted ( ) ) . put ( "initBytes" , memUsage . getInit ( ) ) . put ( "usedBytes" , memUsage . getUsed ( ) ) . put ( "virtualFreeBytes" , ( ( memUsage . getMax ( ) ) - ( memUsage . getUsed ( ) ) ) ) . put ( "unusedBytes" , ( ( memUsage . getCommitted ( ) ) - ( memUsage . getUsed ( ) ) ) ) . build ( ) ; } } private static class GarbageCollectorMetric implements IMetric { GarbageCollectorMXBean _gcBean ; Long _collectionCount ; Long _collectionTime ; public GarbageCollectorMetric ( GarbageCollectorMXBean gcBean ) { } @ Override public Object getValueAndReset ( ) { Long collectionCountP = _gcBean . getCollectionCount ( ) ; <START_BUG> Long collectionTimeP = _gcBean . getCollectionCount ( ) ; <END_BUG> Map ret = null ; if ( ( ( _collectionCount ) != null ) && ( ( _collectionTime ) != null ) ) { ret = ImmutableMap . builder ( ) . put ( "count" , ( collectionCountP - ( _collectionCount ) ) ) . put ( "timeMs" , ( collectionTimeP - ( _collectionTime ) ) ) . build ( ) ; } _collectionCount = collectionCountP ; _collectionTime = collectionTimeP ; return ret ; } } @ Override public void prepare ( final Map stormConf , TopologyContext context , OutputCollector collector ) { } @ Override public void execute ( Tuple input ) { } @ Override public void cleanup ( ) { } }

Fix:
Long collectionTimeP = _gcBean . getCollectionTime ( ) ;
Buggy code:
public class ManagementClient { private static final String SUBDEPLOYMENT = "subdeployment" ; private static final String WEB = "web" ; private static final String NAME = "name" ; private static final String SERVLET = "servlet" ; private static final String POSTFIX_WEB = ".war" ; private static final String POSTFIX_EAR = ".ear" ; private final String mgmtAddress ; private final int mgmtPort ; private final ModelControllerClient client ; private URI webUri ; private URI ejbUri ; private ModelNode rootNode = null ; private MBeanServerConnection connection ; private JMXConnector connector ; public ManagementClient ( ModelControllerClient client , final String mgmtAddress , final int managementPort ) { } public ModelControllerClient getControllerClient ( ) { } public URI getWebUri ( ) { } public ProtocolMetaData getDeploymentMetaData ( String deploymentName ) { } public boolean isServerInRunningState ( ) { try { ModelNode op = Util . getEmptyOperation ( READ_ATTRIBUTE_OPERATION , EMPTY_ADDRESS . toModelNode ( ) ) ; op . get ( ManagementClient . NAME ) . set ( "server-state" ) ; ModelNode rsp = client . execute ( op ) ; return ( ( SUCCESS . equals ( rsp . get ( OUTCOME ) . asString ( ) ) ) && ( ! ( STARTING . toString ( ) . equals ( rsp . get ( RESULT ) . asString ( ) ) ) ) ) && ( ! ( STOPPING . toString ( ) . equals ( rsp . get ( RESULT ) . asString ( ) ) ) ) ; <START_BUG> } catch ( Exception ignored ) { <END_BUG> return false ; } } public void close ( ) { } private URI extractSubSystemURI ( String subsystem ) { } private void readRootNode ( ) throws Exception { } private static ModelNode defined ( final ModelNode node , final String message ) { } private URI getBinding ( final String protocol , final String socketBinding ) { } private boolean isEnterpriseArchive ( String deploymentName ) { } private boolean isWebArchive ( String deploymentName ) { } private ModelNode createDeploymentAddress ( String deploymentName ) { } private void extractEnterpriseArchiveContexts ( HTTPContext context , ModelNode deploymentNode ) { } private void extractWebArchiveContexts ( HTTPContext context , ModelNode deploymentNode ) { } private void extractWebArchiveContexts ( HTTPContext context , String deploymentName , ModelNode deploymentNode ) { } private String toContextName ( String deploymentName ) { } private ModelNode readResource ( ModelNode address ) throws Exception { } private ModelNode executeForResult ( final ModelNode operation ) throws Exception { } private void checkSuccessful ( final ModelNode result , final ModelNode operation ) throws ManagementClient . UnSuccessfulOperationException { } private static class UnSuccessfulOperationException extends Exception { private static final long serialVersionUID = 1L ; public UnSuccessfulOperationException ( String message ) { } } private MBeanServerConnection getConnection ( ) { } public JMXServiceURL getRemoteJMXURL ( ) { } public int getMgmtPort ( ) { } public String getMgmtAddress ( ) { } public URI getRemoteEjbURL ( ) { } }

Fix:
} catch ( Throwable ignored ) {
Buggy code:
public abstract class DataNode { private int size ; protected DataNode ( ) { } public int getSize ( ) { } protected boolean checkAndUpdateSize ( DataNode childNode ) { } public String getExactStringValueOrNull ( ) { } public String getStringValueFromLiteralNodes ( ) { } public abstract void accept ( DataModelVisitor dataModelVisitor ) { } public BooleanNode convertToBooleanValue ( ) { } public BooleanNode isEqualTo ( DataNode dataNode ) { } public BooleanNode isIdenticalTo ( DataNode dataNode ) { if ( ( ( this ) instanceof BooleanNode ) && ( dataNode instanceof BooleanNode ) ) { BooleanNode v1 = ( ( BooleanNode ) ( this ) ) ; BooleanNode v2 = ( ( BooleanNode ) ( dataNode ) ) ; return v1 . isIdenticalTo ( v2 ) ; } if ( ( this ) == dataNode ) return BooleanNode . TRUE ; else <START_BUG> return BooleanNode . FALSE ; <END_BUG> } No newline ; at end ; of file ; }

Fix:
return BooleanNode . UNKNOWN ;
Buggy code:
public class MySQLDialect implements Dialect { @ Override public String paging ( String sql , long pageNumber , long pageSize ) throws SQLException { } @ Override public String count ( String sql ) throws SQLException { } @ Override public String createTableIfNotExist ( String tableName , Map < String , String > fields , String pk ) throws SQLException { StringBuilder sb = new StringBuilder ( ( ( "CREATE<seq2seq4repair_space>TABLE<seq2seq4repair_space>IF<seq2seq4repair_space>NOT<seq2seq4repair_space>EXISTS<seq2seq4repair_space>" + tableName ) + "<seq2seq4repair_space>(<seq2seq4repair_space>" ) ) ; for ( Map . Entry < String , String > field : fields . entrySet ( ) ) { String f = field . getValue ( ) . toLowerCase ( ) ; String t ; if ( ( f . equals ( "int" ) ) || ( f . equals ( "integer" ) ) ) { t = "INT" ; } else if ( f . equals ( "long" ) ) { t = "BIGINT" ; } else if ( f . equals ( "short" ) ) { t = "SMALLINT" ; } else if ( f . equals ( "string" ) ) { t = "VARCHAR(65535)" ; } else if ( ( f . equals ( "bool" ) ) || ( f . equals ( "boolean" ) ) ) { t = "BOOLEAN" ; } else if ( f . equals ( "float" ) ) { t = "FLOAT" ; } else if ( f . equals ( "double" ) ) { t = "DOUBLE" ; } else if ( f . equals ( "char" ) ) { t = "CHAR" ; } else if ( f . equals ( "date" ) ) { t = "TIMESTAMP" ; } else if ( f . equals ( "uuid" ) ) { t = "UUID" ; } else if ( f . equals ( "decimal" ) ) { t = "DECIMAL" ; } else { throw new SQLException ( ( "Not<seq2seq4repair_space>support<seq2seq4repair_space>type:" + f ) ) ; } sb . append ( ( ( ( ( field . getKey ( ) ) + "<seq2seq4repair_space>" ) + t ) + "<seq2seq4repair_space>," ) ) ; } if ( ( pk != null ) && ( ( pk . trim ( ) ) != "" ) ) { return sb . append ( ( ( "primary<seq2seq4repair_space>key(" + ( pk . trim ( ) ) ) + ")<seq2seq4repair_space>)" ) ) . toString ( ) ; } else { <START_BUG> return sb . substring ( 0 , ( ( sb . length ( ) ) - 1 ) ) . toString ( ) ; <END_BUG> } } }

Fix:
return ( sb . substring ( 0 , ( ( sb . length ( ) ) - 1 ) ) . toString ( ) ) + ")" ;
Buggy code:
public abstract class HibernateStatisticsTestSupport extends HibernateTestSupport { protected SessionFactory sf ; protected SessionFactory sf2 ; @ Before public void postConstruct ( ) { } @ After public void preDestroy ( ) { } protected HazelcastInstance getHazelcastInstance ( SessionFactory sf ) { } protected abstract Properties getCacheProperties ( ) { } protected void insertDummyEntities ( int count ) { } protected void insertDummyEntities ( int count , int childCount ) { } @ Test public void testEntity ( ) { } @ Test public void testQuery ( ) { final int entityCount = 10 ; final int queryCount = 3 ; insertDummyEntities ( entityCount ) ; sleep ( 2 ) ; List < DummyEntity > list = null ; for ( int i = 0 ; i < queryCount ; i ++ ) { list = executeQuery ( sf ) ; assertEquals ( entityCount , list . size ( ) ) ; <START_BUG> sleep ( 2 ) ; <END_BUG> } assertNotNull ( list ) ; Session session = sf . openSession ( ) ; Transaction tx = session . beginTransaction ( ) ; try { for ( DummyEntity dummy : list ) { session . delete ( dummy ) ; } tx . commit ( ) ; } catch ( Exception e ) { tx . rollback ( ) ; e . printStackTrace ( ) ; } finally { session . close ( ) ; } Statistics stats = sf . getStatistics ( ) ; assertEquals ( 1 , stats . getQueryCachePutCount ( ) ) ; assertEquals ( 1 , stats . getQueryCacheMissCount ( ) ) ; assertEquals ( ( queryCount - 1 ) , stats . getQueryCacheHitCount ( ) ) ; assertEquals ( 1 , stats . getQueryExecutionCount ( ) ) ; assertEquals ( entityCount , stats . getEntityInsertCount ( ) ) ; assertEquals ( entityCount , stats . getEntityLoadCount ( ) ) ; assertEquals ( entityCount , stats . getEntityDeleteCount ( ) ) ; assertEquals ( ( ( entityCount * ( queryCount - 1 ) ) * 2 ) , stats . getSecondLevelCacheHitCount ( ) ) ; assertEquals ( entityCount , stats . getSecondLevelCacheMissCount ( ) ) ; stats . logSummary ( ) ; } protected List < DummyEntity > executeQuery ( SessionFactory factory ) { } protected DummyEntity executeQuery ( SessionFactory factory , long id ) { } @ Test public void testQuery2 ( ) { } @ Category ( NightlyTest . class ) @ Test public void testQueryCacheCleanup ( ) { } }

Fix:
sleepAtLeastSeconds ( 1 ) ;
Buggy code:
public class VerifyAggregateExpressionsVisitor implements Visitor { private GroupByList groupByList ; public VerifyAggregateExpressionsVisitor ( GroupByList groupByList ) { } public Visitable visit ( Visitable node ) throws StandardException { if ( node instanceof ColumnReference ) { ColumnReference cr = ( ( ColumnReference ) ( node ) ) ; if ( ( groupByList ) == null ) { throw StandardException . newException ( LANG_INVALID_COL_REF_NON_GROUPED_SELECT_LIST , cr . getSQLColumnName ( ) ) ; } if ( ( groupByList . findGroupingColumn ( cr ) ) == null ) { <START_BUG> throw StandardException . newException ( LANG_INVALID_GROUPED_SELECT_LIST ) ; <END_BUG> } } else if ( node instanceof SubqueryNode ) { SubqueryNode subq = ( ( SubqueryNode ) ( node ) ) ; if ( ( ( subq . getSubqueryType ( ) ) != ( SubqueryNode . EXPRESSION_SUBQUERY ) ) || ( subq . hasCorrelatedCRs ( ) ) ) { throw StandardException . newException ( ( ( groupByList ) == null ? SQLState . LANG_INVALID_NON_GROUPED_SELECT_LIST : SQLState . LANG_INVALID_GROUPED_SELECT_LIST ) ) ; } HasNodeVisitor visitor = new HasNodeVisitor ( AggregateNode . class ) ; subq . accept ( visitor ) ; if ( visitor . hasNode ( ) ) { throw StandardException . newException ( ( ( groupByList ) == null ? SQLState . LANG_INVALID_NON_GROUPED_SELECT_LIST : SQLState . LANG_INVALID_GROUPED_SELECT_LIST ) ) ; } } return node ; } public boolean skipChildren ( Visitable node ) throws StandardException { } public boolean stopTraversal ( ) { } }

Fix:
throw StandardException . newException ( LANG_INVALID_COL_REF_GROUPED_SELECT_LIST , cr . getSQLColumnName ( ) ) ;
Buggy code:
public class ButtonPanel extends JPanel { public static final int ADD_BUTTON = 1 ; public static final int EDIT_BUTTON = 2 ; public static final int DELETE_BUTTON = 3 ; public static final int LOAD_BUTTON = 4 ; public static final int SAVE_BUTTON = 5 ; private JButton add ; private JButton delete ; private JButton edit ; private JButton load ; private JButton save ; public ButtonPanel ( ) { } public void addButtonListener ( int button , ActionListener listener ) { } private void initButtonMap ( ) { } private void init ( ) { add = new JButton ( JMeterUtils . getResString ( "add" ) ) ; add . setActionCommand ( "Add" ) ; edit = new JButton ( JMeterUtils . getResString ( "edit" ) ) ; edit . setActionCommand ( "Edit" ) ; delete = new JButton ( JMeterUtils . getResString ( "delete" ) ) ; delete . setActionCommand ( "Delete" ) ; load = new JButton ( JMeterUtils . getResString ( "load" ) ) ; load . setActionCommand ( "Load" ) ; save = new JButton ( JMeterUtils . getResString ( "save" ) ) ; save . setActionCommand ( "Save" ) ; Dimension d = delete . getPreferredSize ( ) ; add . setPreferredSize ( d ) ; edit . setPreferredSize ( d ) ; load . setPreferredSize ( d ) ; save . setPreferredSize ( d ) ; GridBagLayout g = new GridBagLayout ( ) ; this . setLayout ( g ) ; GridBagConstraints c = new GridBagConstraints ( ) ; <START_BUG> c . fill = c . NONE ; <END_BUG> c . gridwidth = 1 ; c . gridheight = 1 ; c . gridx = 1 ; c . gridy = 1 ; g . setConstraints ( add , c ) ; this . add ( add ) ; c . gridx = 2 ; c . gridy = 1 ; g . setConstraints ( edit , c ) ; this . add ( edit ) ; c . gridx = 3 ; c . gridy = 1 ; g . setConstraints ( delete , c ) ; this . add ( delete ) ; c . gridx = 2 ; c . gridy = 2 ; g . setConstraints ( load , c ) ; this . add ( load ) ; c . gridx = 3 ; c . gridy = 2 ; g . setConstraints ( save , c ) ; this . add ( save ) ; } }

Fix:
c . fill = GridBagConstraints . NONE ;
Buggy code:
public class HTMLAreaElementImpl extends HTMLElementImpl implements HTMLAreaElement { private static final long serialVersionUID = 7164004431531608995L ; public String getAccessKey ( ) { } public void setAccessKey ( String accessKey ) { } public String getAlt ( ) { } public void setAlt ( String alt ) { } public String getCoords ( ) { } public void setCoords ( String coords ) { } public String getHref ( ) { } public void setHref ( String href ) { } public boolean getNoHref ( ) { <START_BUG> return getBinary ( "href" ) ; <END_BUG> } public void setNoHref ( boolean noHref ) { } public String getShape ( ) { } public void setShape ( String shape ) { } public int getTabIndex ( ) { } public void setTabIndex ( int tabIndex ) { } public String getTarget ( ) { } public void setTarget ( String target ) { } public HTMLAreaElementImpl ( HTMLDocumentImpl owner , String name ) { } }

Fix:
return getBinary ( "nohref" ) ;
Buggy code:
public class EnumChoiceRenderer < T extends Enum < T > > implements IChoiceRenderer < T > { private static final long serialVersionUID = 1L ; private final Component resourceSource ; public EnumChoiceRenderer ( ) { } public EnumChoiceRenderer ( Component resourceSource ) { } public final Object getDisplayValue ( T object ) { } protected String resourceKey ( T object ) { <START_BUG> return ( ( object . getClass ( ) . getSimpleName ( ) ) + "." ) + ( object . name ( ) ) ; <END_BUG> } protected CharSequence postprocess ( String value ) { } public String getIdValue ( T object , int index ) { } }

Fix:
return ( ( object . getDeclaringClass ( ) . getSimpleName ( ) ) + "." ) + ( object . name ( ) ) ;
Buggy code:
final class ViewBindingInjectionSource extends InjectionSource { private static final int HASH_BASE = ( ViewBindingInjectionSource . class . hashCode ( ) ) * 127 ; private final ServiceName serviceName ; ViewBindingInjectionSource ( final ServiceName serviceName ) { } <START_BUG> public void getResourceValue ( final ComponentConfiguration componentConfiguration , final ServiceBuilder < ? > serviceBuilder , final DeploymentPhaseContext phaseContext , final Injector < ManagedReferenceFactory > injector ) { <END_BUG> serviceBuilder . addDependency ( serviceName , ComponentView . class , new ViewManagedReferenceFactory . Injector ( injector ) ) ; } public boolean equals ( final Object injectionSource ) { } private boolean equals ( final ViewBindingInjectionSource configuration ) { } public int hashCode ( ) { } }

Fix:
public void getResourceValue ( final ResolutionContext resolutionContext , final ServiceBuilder < ? > serviceBuilder , final DeploymentPhaseContext phaseContext , final Injector < ManagedReferenceFactory > injector ) {
Buggy code:
public class TermQParserPlugin extends QParserPlugin { public static String NAME = "term" ; public void init ( NamedList args ) { } @ Override public QParser createParser ( String qstr , SolrParams localParams , SolrParams params , SolrQueryRequest req ) { return new QParser ( qstr , localParams , params , req ) { @ Override public Query parse ( ) throws ParseException { String fname = localParams . get ( F ) ; FieldType ft = req . getSchema ( ) . getFieldTypeNoEx ( fname ) ; String val = localParams . get ( V ) ; BytesRef term = new BytesRef ( ) ; if ( ft != null ) { ft . readableToIndexed ( val , term ) ; } else { <START_BUG> term . copy ( val ) ; <END_BUG> } return new TermQuery ( new org . apache . lucene . index . Term ( fname , term ) ) ; } } ; } }

Fix:
term . copyChars ( val ) ;
Buggy code:
public class CopyResourceElementsOperation extends MultiOperation { protected ArrayList fRenamedCompilationUnits = null ; protected Map fDeltasPerProject = new HashMap ( 1 ) ; protected DOMFactory fFactory ; protected ArrayList fCreatedElements ; public CopyResourceElementsOperation ( IJavaElement [ ] resourcesToCopy , IJavaElement [ ] destContainers , boolean force ) { } public CopyResourceElementsOperation ( IJavaElement [ ] resourcesToCopy , IJavaElement destContainer , boolean force ) { } private IResource [ ] collectResourcesOfInterest ( IPackageFragment source ) throws JavaModelException { } private void createNeededPackageFragments ( IPackageFragmentRoot root , String newFragName ) throws JavaModelException { } private JavaElementDelta getDeltaFor ( IJavaProject javaProject ) { } protected String getMainTaskName ( ) { <START_BUG> return org . eclipse . jdt . internal . compiler . util . Util . bind ( "operation.copyResourceProgress" ) ; <END_BUG> } protected void prepareDeltas ( IJavaElement sourceElement , IJavaElement destinationElement ) { } private void processCompilationUnitResource ( ICompilationUnit source , IPackageFragment dest ) throws JavaModelException { } protected void processDeltas ( ) { } protected void processElement ( IJavaElement element ) throws JavaModelException { } protected void processElements ( ) throws JavaModelException { } private void processPackageFragmentResource ( IPackageFragment source , IPackageFragmentRoot root , String newName ) throws JavaModelException { } private String updatedContent ( ICompilationUnit cu , IPackageFragment dest , String newName ) throws JavaModelException { } private void updatePackageStatement ( IDOMCompilationUnit domCU , String pkgName ) throws JavaModelException { } private void updateTypeName ( ICompilationUnit cu , IDOMCompilationUnit domCU , String oldName , String newName ) throws JavaModelException { } protected IJavaModelStatus verify ( ) { } protected void verify ( IJavaElement element ) throws JavaModelException { } }

Fix:
return org . eclipse . jdt . internal . core . Util . bind ( "operation.copyResourceProgress" ) ;
Buggy code:
public class SampleTestCase extends TestCase { protected Random RANDOM = new Random ( ) ; public SampleTestCase ( ) { } public SampleTestCase ( String name ) { } public void testInt ( ) { } public void testShort ( ) { } public void testLong ( ) { } public void testFloat ( ) { } public void testDouble ( ) { <START_BUG> long time = nextInt ( ) ; <END_BUG> try { Thread . sleep ( time ) ; } catch ( InterruptedException e ) { fail ( e . getMessage ( ) ) ; } } public void setUp ( ) { } public void tearDown ( ) { } public int nextInt ( ) { } public long nextLong ( ) { } }

Fix:
long time = 250 ;
Buggy code:
public class Spinner extends Composite { public Spinner ( Composite parent , int style ) { } public void addModifyListener ( ModifyListener listener ) { } public void addSelectionListener ( SelectionListener listener ) { } void addVerifyListener ( VerifyListener listener ) { } static int checkStyle ( int style ) { } protected void checkSubclass ( ) { } public Point computeSize ( int wHint , int hHint , boolean changed ) { } public Rectangle computeTrim ( int x , int y , int width , int height ) { } public void copy ( ) { } void createHandle ( int index ) { } public void cut ( ) { } void deregister ( ) { } int fontHandle ( ) { } public int getDigits ( ) { } String getDecimalSeparator ( ) { } public int getIncrement ( ) { } public int getMaximum ( ) { } public int getMinimum ( ) { } public int getPageIncrement ( ) { } public int getSelection ( ) { } void hookEvents ( ) { } public void paste ( ) { } void register ( ) { } public void removeModifyListener ( ModifyListener listener ) { } public void removeSelectionListener ( SelectionListener listener ) { } void removeVerifyListener ( VerifyListener listener ) { } void setBackgroundPixel ( int pixel ) { } boolean setBounds ( int x , int y , int width , int height , boolean move , boolean resize ) { } public void setDigits ( int digits ) { checkWidget ( ) ; if ( digits < 0 ) <START_BUG> return ; <END_BUG> int [ ] argList1 = new int [ ] { OS . XmNposition , 0 } ; OS . XtGetValues ( handle , argList1 , ( ( argList1 . length ) // 2 ) ) ; int [ ] argList2 = new int [ ] { OS . XmNdecimalPoints , digits , OS . XmNposition , argList1 [ 1 ] } ; OS . XtSetValues ( handle , argList2 , ( ( argList2 . length ) // 2 ) ) ; } void setForegroundPixel ( int pixel ) { } public void setIncrement ( int value ) { } public void setMaximum ( int value ) { } public void setMinimum ( int value ) { } public void setPageIncrement ( int value ) { } public void setSelection ( int value ) { } void updateText ( ) { } int XmNactivateCallback ( int w , int client_data , int call_data ) { } int xFocusOut ( XFocusChangeEvent xEvent ) { } int XmNmodifyVerifyCallback ( int w , int client_data , int call_data ) { } int XmNvalueChangedCallback ( int w , int client_data , int call_data ) { } }

Fix:
error ( ERROR_INVALID_ARGUMENT ) ;
Buggy code:
public class BisectionSolver extends UnivariateRealSolverImpl { @ Deprecated public BisectionSolver ( UnivariateRealFunction f ) { } public BisectionSolver ( ) { } @ Deprecated public double solve ( double min , double max , double initial ) throws FunctionEvaluationException , MaxIterationsExceededException { } @ Deprecated public double solve ( double min , double max ) throws FunctionEvaluationException , MaxIterationsExceededException { } public double solve ( final UnivariateRealFunction f , double min , double max , double initial ) throws FunctionEvaluationException , MaxIterationsExceededException { <START_BUG> return solve ( min , max ) ; <END_BUG> } public double solve ( final UnivariateRealFunction f , double min , double max ) throws FunctionEvaluationException , MaxIterationsExceededException { } }

Fix:
return solve ( f , min , max ) ;
Buggy code:
class Extension extends AbstractVal implements Exp , Val { private final JDBCFilterListener _listener ; private final Val _target ; private final Val _arg ; private final ClassMapping _candidate ; private ClassMetaData _meta = null ; private Class _cast = null ; public Extension ( JDBCFilterListener listener , Val target , Val arg , ClassMapping candidate ) { } public ClassMetaData getMetaData ( ) { } public void setMetaData ( ClassMetaData meta ) { } public boolean isVariable ( ) { } public boolean isAggregate ( ) { } public Class getType ( ) { } private Class [ ] getArgTypes ( ) { } public void setImplicitType ( Class type ) { } public ExpState initialize ( Select sel , ExpContext ctx , int flags ) { } private static class ExtensionExpState extends ExpState { public final ExpState targetState ; public final ExpState argState ; public ExtensionExpState ( Joins joins , ExpState targetState , ExpState argState ) { } } public void select ( Select sel , ExpContext ctx , ExpState state , boolean pks ) { } public void selectColumns ( Select sel , ExpContext ctx , ExpState state , boolean pks ) { } public void groupBy ( Select sel , ExpContext ctx , ExpState state ) { } public void orderBy ( Select sel , ExpContext ctx , ExpState state , boolean asc ) { <START_BUG> sel . orderBy ( newSQLBuffer ( sel , ctx , state ) , asc , false ) ; <END_BUG> } private SQLBuffer newSQLBuffer ( Select sel , ExpContext ctx , ExpState state ) { } public Object load ( ExpContext ctx , ExpState state , Result res ) throws SQLException { } public void calculateValue ( Select sel , ExpContext ctx , ExpState state , Val other , ExpState otherState ) { } public int length ( Select sel , ExpContext ctx , ExpState state ) { } public void appendTo ( Select sel , ExpContext ctx , ExpState state , SQLBuffer sql , int index ) { } private FilterValue [ ] getArgs ( Select sel , ExpContext ctx , ExpState state ) { } public void acceptVisit ( ExpressionVisitor visitor ) { } public ExpState initialize ( Select sel , ExpContext ctx , Map contains ) { } public void appendTo ( Select sel , ExpContext ctx , ExpState state , SQLBuffer sql ) { } }

Fix:
sel . orderBy ( newSQLBuffer ( sel , ctx , state ) , asc , false , getSelectAs ( ) ) ;
Buggy code:
class CheckBoxListModel extends AbstractTableModel { Vector items ; CheckBoxListModel ( Vector _items ) { } CheckBoxListModel ( Object [ ] _items ) { } private JCheckBoxList . Entry createEntry ( Object obj ) { } public int getRowCount ( ) { } public int getColumnCount ( ) { } public String getColumnName ( int col ) { } public Object getValueAt ( int row , int col ) { JCheckBoxList . Entry entry = ( ( JCheckBoxList . Entry ) ( items . elementAt ( row ) ) ) ; switch ( col ) { case 0 : <START_BUG> return new Boolean ( entry . checked ) ; <END_BUG> case 1 : return entry . value ; default : throw new InternalError ( ) ; } } public Class getColumnClass ( int col ) { } public boolean isCellEditable ( int row , int col ) { } public void setValueAt ( Object value , int row , int col ) { } }

Fix:
return Boolean . valueOf ( entry . checked ) ;
Buggy code:
public class LogMessage extends NestedRoutine { public static final DateFormat formatter = new SimpleDateFormat ( "yyyy-MM-dd<seq2seq4repair_space>HH:mm:ss" ) ; private final IDataProvider < String > logNameDP ; private final Collection < IDataProvider < String > > messages ; private LogMessage ( ScriptLine scriptLine , IDataProvider < String > logNameDP , Collection < IDataProvider < String > > messages ) { } @ Override public void run ( EventData data ) throws BailException { } public static void register ( ) { } protected static class RoutineFactory extends NestedRoutine . RoutineFactory { @ Override public IRoutineBuilder getNew ( Matcher matcher , ScriptLine scriptLine , EventInfo info ) { } } private static class MessageRoutineBuilder implements ScriptLineHandler , IRoutineBuilder { ScriptLine scriptLine ; IDataProvider < String > logNameDP ; EventInfo info ; List < IDataProvider < String > > messages = new ArrayList < IDataProvider < String > > ( ) ; public MessageRoutineBuilder ( ScriptLine scriptLine , IDataProvider < String > logNameDP , EventInfo info ) { } public void addString ( String str ) { IDataProvider < String > msgDP = DataProvider . parse ( info , String . class , str ) ; if ( msgDP != null ) { messages . add ( msgDP ) ; <START_BUG> LogUtil . info ( msgDP . toString ( ) ) ; <END_BUG> } } @ Override public ScriptLineHandler handleLine ( ScriptLine line , boolean hasChildren ) { } @ Override public void done ( ) { } @ Override public ScriptLineHandler getScriptLineHandler ( ) { } @ Override public Routine buildRoutine ( ) { } } No newline ; at end ; of file ; }

Fix:
LogUtil . info ( msgDP . toString ( ) . replaceAll ( "%" , "%%" ) ) ;
Buggy code:
public class nsIInterfaceRequestor extends nsISupports { static final int LAST_METHOD_ID = ( nsISupports . LAST_METHOD_ID ) + 1 ; public static final String NS_IINTERFACEREQUESTOR_IID_STRING = "033A1470-8B2A-11d3-AF88-00A024FFC08C" ; public static final nsID NS_IINTERFACEREQUESTOR_IID = new nsID ( nsIInterfaceRequestor . NS_IINTERFACEREQUESTOR_IID_STRING ) ; public nsIInterfaceRequestor ( int address ) { } public int GetInterface ( nsID uuid , int [ ] result ) { <START_BUG> return XPCOM . VtblCall ( ( ( super . LAST_METHOD_ID ) + 1 ) , getAddress ( ) , uuid , result ) ; <END_BUG> } }

Fix:
return XPCOM . VtblCall ( ( ( nsISupports . LAST_METHOD_ID ) + 1 ) , getAddress ( ) , uuid , result ) ;
Buggy code:
public final class ThemeElementHelper { public static void populateRegistry ( ITheme theme , FontDefinition [ ] definitions , IPreferenceStore store ) { } private static FontDefinition [ ] addDefaulted ( FontDefinition [ ] definitions ) { } private static void installFont ( FontDefinition definition , ITheme theme , IPreferenceStore store , boolean setInRegistry ) { FontRegistry registry = theme . getFontRegistry ( ) ; String id = definition . getId ( ) ; String key = ThemeElementHelper . createPreferenceKey ( theme , id ) ; FontData [ ] prefFont = ( store != null ) ? PreferenceConverter . getFontDataArray ( store , key ) : null ; FontData [ ] defaultFont = null ; if ( ( definition . getValue ( ) ) != null ) defaultFont = definition . getValue ( ) ; else if ( ( definition . getDefaultsTo ( ) ) != null ) <START_BUG> defaultFont = registry . bestDataArray ( registry . getFontData ( definition . getDefaultsTo ( ) ) , Workbench . getInstance ( ) . getDisplay ( ) ) ; <END_BUG> else { defaultFont = registry . bestDataArray ( registry . getFontData ( key ) , Workbench . getInstance ( ) . getDisplay ( ) ) ; } if ( setInRegistry ) { if ( ( prefFont == null ) || ( prefFont == ( PreferenceConverter . FONTDATA_ARRAY_DEFAULT_DEFAULT ) ) ) { prefFont = defaultFont ; } if ( prefFont != null ) { registry . put ( id , prefFont ) ; } } if ( ( defaultFont != null ) && ( store != null ) ) { PreferenceConverter . setDefault ( store , key , defaultFont ) ; } } public static void populateRegistry ( ITheme theme , ColorDefinition [ ] definitions , IPreferenceStore store ) { } private static ColorDefinition [ ] getDefaults ( ColorDefinition [ ] definitions ) { } private static FontDefinition [ ] getDefaults ( FontDefinition [ ] definitions ) { } private static ColorDefinition [ ] addDefaulted ( ColorDefinition [ ] definitions ) { } private static SortedSet addDefaulted ( IHierarchalThemeElementDefinition [ ] definitions , IHierarchalThemeElementDefinition [ ] allDefs ) { } private static void installColor ( ColorDefinition definition , ITheme theme , IPreferenceStore store , boolean setInRegistry ) { } public static String createPreferenceKey ( ITheme theme , String id ) { } public static String [ ] splitPropertyName ( Theme theme , String property ) { } private ThemeElementHelper ( ) { } }

Fix:
defaultFont = registry . filterData ( registry . getFontData ( definition . getDefaultsTo ( ) ) , Workbench . getInstance ( ) . getDisplay ( ) ) ;
Buggy code:
public class MailingListsDwr extends BaseDwr { private final Log log = LogFactory . getLog ( MailingListsDwr . class ) ; @ DwrPermission ( admin = true ) public ProcessResult init ( ) { } @ DwrPermission ( admin = true ) public MailingList getMailingList ( int id ) { } @ DwrPermission ( admin = true ) public ProcessResult saveMailingList ( int id , String xid , String name , List < RecipientListEntryBean > entryBeans , List < Integer > inactiveIntervals ) { } @ DwrPermission ( admin = true ) public void deleteMailingList ( int mlId ) { } @ DwrPermission ( admin = true ) public ProcessResult sendTestEmail ( int id , String name , List < RecipientListEntryBean > entryBeans ) { ProcessResult response = new ProcessResult ( ) ; MailingList ml = createMailingList ( id , null , name , entryBeans ) ; new MailingListDao ( ) . populateEntrySubclasses ( ml . getEntries ( ) ) ; Set < String > addresses = new HashSet < String > ( ) ; ml . appendAddresses ( addresses , null ) ; String [ ] toAddrs = addresses . toArray ( new String [ 0 ] ) ; try { Translations translations = Common . getTranslations ( ) ; Map < String , Object > model = new HashMap < String , Object > ( ) ; model . put ( "message" , new com . serotonin . m2m2 . i18n . TranslatableMessage ( "ftl.userTestEmail" , ml . getName ( ) ) ) ; <START_BUG> MangoEmailContent cnt = new MangoEmailContent ( "ftl.testEmail" , model , translations , translations . translate ( "ftl.testEmail" ) , Common . UTF8 ) ; <END_BUG> EmailWorkItem . queueEmail ( toAddrs , cnt ) ; } catch ( Exception e ) { response . addGenericMessage ( "mailingLists.testerror" , e . getMessage ( ) ) ; log . warn ( "" , e ) ; } return response ; } private MailingList createMailingList ( int id , String xid , String name , List < RecipientListEntryBean > entryBeans ) { } }

Fix:
MangoEmailContent cnt = new MangoEmailContent ( "testEmail" , model , translations , translations . translate ( "ftl.testEmail" ) , Common . UTF8 ) ;
Buggy code:
public interface UnivariateStatistic { public double evaluate ( double [ ] values ) { } <START_BUG> public double evaluate ( double [ ] d , int begin , int length ) ; <END_BUG> }

Fix:
public double evaluate ( double [ ] values , int begin , int length ) ;
Buggy code:
public class DDTester { public static void main ( String [ ] args ) { Scanner input = new Scanner ( System . in ) ; GameSession game = new GameSession ( input ) ; SFXLibrary sfxLibrary = new SFXLibrary ( ) ; BGMLibrary bgmLibrary = new BGMLibrary ( ) ; game . titleScreen ( ) ; game . newGame ( ) ; MazeBuilder builder = new MazeBuilder ( 5 ) ; Maze maze = builder . build ( ) ; bgmLibrary . add ( "cave.wav" ) ; bgmLibrary . add ( "battle.wav" ) ; sfxLibrary . add ( "footsteps.wav" ) ; sfxLibrary . add ( "attack.wav" ) ; sfxLibrary . add ( "hurt.wav" ) ; sfxLibrary . add ( "arrow.wav" ) ; sfxLibrary . add ( "magic.wav" ) ; bgmLibrary . playBGM ( "cave.wav" ) ; while ( ! ( game . isGameOver ( maze ) ) ) { String cmd = game . getCommand ( input ) ; if ( cmd . equals ( "map" ) ) { System . out . println ( "\nMAP:\n" ) ; System . out . println ( maze . toString ( ) ) ; game . navigate ( maze ) ; sfxLibrary . playTrack ( "footsteps.wav" ) ; <START_BUG> game . initiateBattle ( maze ) ; <END_BUG> } else if ( cmd . equals ( "status" ) ) { game . getPartyStats ( ) ; } else { System . out . println ( "There<seq2seq4repair_space>was<seq2seq4repair_space>an<seq2seq4repair_space>error<seq2seq4repair_space>executing<seq2seq4repair_space>the<seq2seq4repair_space>command..." ) ; } } } }

Fix:
game . initiateBattle ( maze , bgmLibrary , sfxLibrary ) ;
Buggy code:
public class RaStructureProcessor implements DeploymentUnitProcessor { private static final String RAR_EXTENSION = ".rar" ; private static final String JAR_EXTENSION = ".jar" ; private static final SuffixMatchFilter CHILD_ARCHIVE_FILTER = new SuffixMatchFilter ( RaStructureProcessor . JAR_EXTENSION , VisitorAttributes . RECURSE_LEAVES_ONLY ) ; private static Closeable NO_OP_CLOSEABLE = new Closeable ( ) { public void close ( ) throws IOException { } } ; public void deploy ( DeploymentPhaseContext phaseContext ) throws DeploymentUnitProcessingException { final DeploymentUnit deploymentUnit = phaseContext . getDeploymentUnit ( ) ; final ResourceRoot resourceRoot = deploymentUnit . getAttachment ( DEPLOYMENT_ROOT ) ; if ( resourceRoot == null ) { return ; } final VirtualFile deploymentRoot = resourceRoot . getRoot ( ) ; if ( ( deploymentRoot == null ) || ( ! ( deploymentRoot . exists ( ) ) ) ) { return ; } final String deploymentRootName = deploymentRoot . getName ( ) . toLowerCase ( ) ; if ( ! ( deploymentRootName . endsWith ( RaStructureProcessor . RAR_EXTENSION ) ) ) { return ; } ModuleRootMarker . markRoot ( resourceRoot ) ; try { final List < VirtualFile > childArchives = deploymentRoot . getChildren ( RaStructureProcessor . CHILD_ARCHIVE_FILTER ) ; for ( final VirtualFile child : childArchives ) { final Closeable closable = ( child . isFile ( ) ) ? VFS . mountZip ( child , child , TempFileProviderService . provider ( ) ) : RaStructureProcessor . NO_OP_CLOSEABLE ; final MountHandle mountHandle = new MountHandle ( closable ) ; <START_BUG> final ResourceRoot childResource = new ResourceRoot ( child , mountHandle , false ) ; <END_BUG> ModuleRootMarker . markRoot ( childResource ) ; deploymentUnit . addToAttachmentList ( RESOURCE_ROOTS , childResource ) ; resourceRoot . addToAttachmentList ( INDEX_IGNORE_PATHS , child . getPathNameRelativeTo ( deploymentRoot ) ) ; } } catch ( IOException e ) { throw new DeploymentUnitProcessingException ( ( ( "Failed<seq2seq4repair_space>to<seq2seq4repair_space>process<seq2seq4repair_space>RA<seq2seq4repair_space>child<seq2seq4repair_space>archives<seq2seq4repair_space>for<seq2seq4repair_space>[" + deploymentRoot ) + "]" ) , e ) ; } } public void undeploy ( DeploymentUnit context ) { } }

Fix:
final ResourceRoot childResource = new ResourceRoot ( child , mountHandle ) ;
Buggy code:
public abstract class OsmCanvas < V extends Node > extends GisCanvas < V > implements TileLoaderListener { private static final long serialVersionUID = 1L ; private TileController tileController ; private Integer lastZoom ; private Coordinate lastTopLeft ; private Coordinate lastBottomRight ; public OsmCanvas ( List < V > nodes , List < Edge < V > > edges , NodePropertySchema nodeSchema , EdgePropertySchema edgeSchema , Naming naming ) { } public TileSource getTileSource ( ) { } public void setTileSource ( TileSource tileSource ) { } public void loadAllTiles ( ) { } @ Override public void borderAlphaChanged ( ) { } @ Override public void resetLayoutItemClicked ( ) { } @ Override public void tileLoadingFinished ( Tile tile , boolean success ) { } @ Override public VisualizationImageServer < V , Edge < V > > getVisualizationServer ( boolean toSvg ) { VisualizationImageServer < V , Edge < V > > server = super . getVisualizationServer ( toSvg ) ; <START_BUG> server . addPostRenderPaintable ( new PostPaintable ( ) ) ; <END_BUG> return server ; } @ Override protected void applyTransform ( ) { } @ Override protected GraphMouse < V , Edge < V > > createGraphMouse ( ) { } @ Override protected ZoomingPaintable createZoomingPaintable ( ) { } @ Override protected void paintGis ( Graphics g , boolean toSvg ) { } private Map < Point , Tile > getTiles ( boolean waitForLoading ) { } private class PostPaintable implements Paintable , MouseListener , MouseMotionListener { private Rectangle textRect ; private Rectangle imgRect ; private boolean textFocused ; private boolean imgFocused ; public PostPaintable ( ) { } @ Override public void paint ( Graphics g ) { } @ Override public boolean useTransform ( ) { } @ Override public void mouseDragged ( MouseEvent e ) { } @ Override public void mouseMoved ( MouseEvent e ) { } @ Override public void mouseClicked ( MouseEvent e ) { } @ Override public void mousePressed ( MouseEvent e ) { } @ Override public void mouseReleased ( MouseEvent e ) { } @ Override public void mouseEntered ( MouseEvent e ) { } @ Override public void mouseExited ( MouseEvent e ) { } } }

Fix:
server . prependPostRenderPaintable ( new PostPaintable ( ) ) ;
Buggy code:
public class FieldManager { private Field [ ] fields ; private TransferController transfercontroller ; private AbstractOutput output ; public FieldManager ( TransferController transfercontroller , AbstractOutput output ) { } public int getNumberOfFields ( ) { } public Field getField ( int position ) { } private Ownable [ ] getFieldsOwned ( Player player ) { } public int getFieldsTotalValue ( Player player ) { } public int getTotalPawnedValue ( Player player ) { } public Street [ ] getBuildableFields ( Player player ) { } public int getNumberOfOwnedFieldsInGroup ( Player owner , int groupID ) { } public Ownable [ ] getPawnableFields ( Player player ) { } public Ownable [ ] getPawnedFields ( Player player ) { } public void ReleaseFields ( Player player ) { } public void pawnFields ( int amount , Player player ) { } private void pawnField ( Player player , int position ) { } public void buyBackPawnedField ( Player player , int position ) { } public boolean buyHouse ( Player player , int position ) { } public boolean hasGroup ( Player player , int groupID ) { int fieldsInGroup = 0 ; int groupSize = 0 ; Ownable [ ] ownedFields = getFieldsOwned ( player ) ; for ( int i = 0 ; i < ( ownedFields . length ) ; i ++ ) { <START_BUG> if ( ( ownedFields [ i ] . getGroupID ( ) ) == groupID ) { <END_BUG> if ( ( ownedFields [ i ] ) instanceof Street ) { groupSize = ( ( Street ) ( ownedFields [ i ] ) ) . getGroupSize ( ) ; fieldsInGroup ++ ; } } } if ( fieldsInGroup == groupSize ) { return true ; } return false ; } private int roundToNearestHundred ( int amount ) { } private void init ( ) { } No newline ; at end ; of file ; }

Fix:
if ( ( ( ownedFields [ i ] . getGroupID ( ) ) == groupID ) && ( ! ( ownedFields [ i ] . getPawnStatus ( ) ) ) ) {
Buggy code:
public class Version { private Version ( ) { } public static String id ( ) { <START_BUG> return "4.5-SNAPSHOT-20080506-1730" ; <END_BUG> } public static void main ( String [ ] args ) { } }

Fix:
return "4.5-SNAPSHOT-20080513-1059" ;
Buggy code:
public class SystemMenuCloseOtherEditors extends Action implements ISelfUpdatingAction { private EditorPane editorPane ; public SystemMenuCloseOtherEditors ( EditorPane editorPane ) { } public void dispose ( ) { } public void run ( ) { } public void update ( ) { if ( ( editorPane ) == null ) { setEnabled ( false ) ; return ; } <START_BUG> setEnabled ( ( ( editorPane . getPage ( ) . getEditors ( ) . length ) > 1 ) ) ; <END_BUG> } public boolean shouldBeVisible ( ) { } public void setPane ( EditorPane pane ) { } }

Fix:
setEnabled ( ( ( editorPane . getPage ( ) . getEditorReferences ( ) . length ) > 1 ) ) ;
Buggy code:
public class SetClasspathOperation extends JavaModelOperation { IClasspathEntry [ ] oldResolvedPath ; IClasspathEntry [ ] newRawPath ; boolean canChangeResource ; boolean needCycleCheck ; boolean needValidation ; boolean needSave ; IPath newOutputLocation ; public static final IClasspathEntry [ ] ReuseClasspath = new IClasspathEntry [ 0 ] ; public static final IClasspathEntry [ ] UpdateClasspath = new IClasspathEntry [ 0 ] ; public static final IPath ReuseOutputLocation = new Path ( "Reuse<seq2seq4repair_space>Existing<seq2seq4repair_space>Output<seq2seq4repair_space>Location" ) ; public SetClasspathOperation ( IJavaProject project , IClasspathEntry [ ] oldResolvedPath , IClasspathEntry [ ] newRawPath , IPath newOutputLocation , boolean canChangeResource , boolean needValidation , boolean needSave ) { } protected void addClasspathDeltas ( IPackageFragmentRoot [ ] roots , int flag , JavaElementDelta delta ) { } protected int classpathContains ( IClasspathEntry [ ] list , IClasspathEntry entry ) { } protected void collectAllSubfolders ( IFolder folder , ArrayList collection ) throws JavaModelException { } protected ArrayList determineAffectedPackageFragments ( IPath location ) throws JavaModelException { } protected void executeOperation ( ) throws JavaModelException { } protected void generateClasspathChangeDeltas ( IClasspathEntry [ ] oldResolvedPath , IClasspathEntry [ ] newResolvedPath , JavaModelManager manager , final JavaProject project ) { } protected JavaProject getProject ( ) { } private int getSourceAttachmentDeltaFlag ( IPath oldPath , IPath newPath ) { } public boolean isReadOnly ( ) { } protected void saveClasspathIfNecessary ( ) throws JavaModelException { if ( ( ! ( this . canChangeResource ) ) || ( ! ( this . needSave ) ) ) return ; IClasspathEntry [ ] classpathForSave ; JavaProject project = getProject ( ) ; if ( ( ( this . newRawPath ) == ( SetClasspathOperation . ReuseClasspath ) ) || ( ( this . newRawPath ) == ( SetClasspathOperation . UpdateClasspath ) ) ) { classpathForSave = project . getRawClasspath ( ) ; } else { classpathForSave = this . newRawPath ; } IPath outputLocationForSave ; if ( ( this . newOutputLocation ) == ( SetClasspathOperation . ReuseOutputLocation ) ) { outputLocationForSave = project . getOutputLocation ( ) ; } else { outputLocationForSave = this . newOutputLocation ; } if ( project . saveClasspath ( classpathForSave , outputLocationForSave ) ) { <START_BUG> this . setAttribute ( "hasModifiedResource" , "true" ) ; <END_BUG> } } public String toString ( ) { } private void updateClasspath ( ) throws JavaModelException { } protected void updateAffectedProjects ( IPath prerequisiteProjectPath ) { } protected void updateCycleMarkersIfNecessary ( IClasspathEntry [ ] newResolvedPath ) { } protected void updateOutputLocation ( ) throws JavaModelException { } protected void updateProjectReferencesIfNecessary ( ) throws JavaModelException { } public IJavaModelStatus verify ( ) { } }

Fix:
this . setAttribute ( JavaModelOperation . HAS_MODIFIED_RESOURCE_ATTR , JavaModelOperation . TRUE ) ;
Buggy code:
public class LocalizedErrorMessageTest extends WicketTestCase { public void testWICKET_891 ( ) { } public void testWICKET_1927 ( ) { tester . getApplication ( ) . getMarkupSettings ( ) . setDefaultMarkupEncoding ( "UTF-8" ) ; tester . setupRequestAndResponse ( ) ; tester . getWicketSession ( ) . setLocale ( new Locale ( "de" ) ) ; LocalizedMessagePage page = new LocalizedMessagePage ( ) ; tester . startPage ( page ) ; tester . processRequestCycle ( ) ; tester . setupRequestAndResponse ( ) ; tester . getServletRequest ( ) . setRequestToComponent ( page . form ) ; tester . getServletRequest ( ) . setParameter ( page . integerField . getInputName ( ) , "foo" ) ; page . form . onFormSubmitted ( ) ; <START_BUG> tester . assertErrorMessages ( new String [ ] { "'foo'<seq2seq4repair_space>ist<seq2seq4repair_space>kein<seq2seq4repair_space>gültiger<seq2seq4repair_space>Wert<seq2seq4repair_space>für<seq2seq4repair_space>'Integer'." } ) ; <END_BUG> tester . getWicketSession ( ) . setLocale ( new Locale ( "pl" ) ) ; tester . getWicketSession ( ) . cleanupFeedbackMessages ( ) ; tester . setupRequestAndResponse ( ) ; page = new LocalizedMessagePage ( ) ; tester . startPage ( page ) ; tester . processRequestCycle ( ) ; tester . setupRequestAndResponse ( ) ; tester . getServletRequest ( ) . setRequestToComponent ( page . form ) ; tester . getServletRequest ( ) . setParameter ( page . integerField . getInputName ( ) , "foo" ) ; page . form . onFormSubmitted ( ) ; tester . assertErrorMessages ( new String [ ] { "\'foo\'<seq2seq4repair_space>nie<seq2seq4repair_space>jest<seq2seq4repair_space>właściwym<seq2seq4repair_space>Integer." } ) ; } }

Fix:
tester . assertErrorMessages ( new String [ ] { "\'foo\'<seq2seq4repair_space>ist<seq2seq4repair_space>kein<seq2seq4repair_space>gültiger<seq2seq4repair_space>Wert<seq2seq4repair_space>für<seq2seq4repair_space>\'Integer\'." } ) ;
Buggy code:
public class HTMLBuilder { public String build ( List < FitCommandDoc > process ) { } private void endHtml ( StringBuffer buffer ) { } private void endBody ( StringBuffer buffer ) { } private void endTable ( StringBuffer buffer ) { } private void addCommands ( StringBuffer buffer , List < FitCommandDoc > process , int highestCountOfParams ) { } private void startTable ( StringBuffer buffer ) { } private void tableHeaderLine ( int highestCountOfParams , StringBuffer buffer ) { } private void addCommand ( StringBuffer buffer , FitCommandDoc oneDoc , int highestCountOfParams ) { buffer . append ( "<tr>" ) ; <START_BUG> buffer . append ( ( ( ( ( "<td>" + ( oneDoc . getClassName ( ) ) ) + "" ) + ( oneDoc . getCommandName ( ) ) ) + "<//td>" ) ) ; <END_BUG> List < String > commandParams = oneDoc . getCommandParams ( ) ; for ( String oneParam : commandParams ) { buffer . append ( ( ( "<td>" + oneParam ) + "<//td>" ) ) ; highestCountOfParams -- ; } for ( int i = 0 ; i < highestCountOfParams ; i ++ ) { buffer . append ( "<td>&nbsp<seq2seq4repair_space><//td>" ) ; } buffer . append ( "<//tr>" ) ; } private int locateHighestCountOfParams ( List < FitCommandDoc > process ) { } private void startBody ( StringBuffer buffer ) { } private void createHead ( StringBuffer buffer ) { } private void startHtmlPage ( StringBuffer buffer ) { } }

Fix:
buffer . append ( ( ( ( ( "<td>" + ( oneDoc . getClassName ( ) ) ) + "." ) + ( oneDoc . getCommandName ( ) ) ) + "<//td>" ) ) ;