nus-yam/ex-repair huggingface dataset:
Buggy code:
class ComboTab extends Tab { Combo combo1 ; Group comboGroup ; Button dropDownButton ; Button readOnlyButton ; Button simpleButton ; static String [ ] ListData = new String [ ] { ControlExample . getResourceString ( "ListData0_0" ) , ControlExample . getResourceString ( "ListData0_1" ) , ControlExample . getResourceString ( "ListData0_2" ) , ControlExample . getResourceString ( "ListData0_3" ) , ControlExample . getResourceString ( "ListData0_4" ) , ControlExample . getResourceString ( "ListData0_5" ) , ControlExample . getResourceString ( "ListData0_6" ) , ControlExample . getResourceString ( "ListData0_7" ) , ControlExample . getResourceString ( "ListData0_8" ) } ; ComboTab ( ControlExample instance ) { } void createExampleGroup ( ) { super . createExampleGroup ( ) ; comboGroup = new Group ( exampleGroup , SWT . NONE ) ; comboGroup . setLayout ( new GridLayout ( ) ) ; <START_BUG> comboGroup . setLayoutData ( new GridData ( ( ( ( GridData . GRAB_HORIZONTAL ) | ( GridData . HORIZONTAL_ALIGN_FILL ) ) | ( GridData . VERTICAL_ALIGN_FILL ) ) ) ) ; <END_BUG> comboGroup . setText ( "Combo" ) ; } void createExampleWidgets ( ) { } Composite createTabFolderPage ( TabFolder tabFolder ) { } void createStyleGroup ( ) { } Control [ ] getExampleWidgets ( ) { } String [ ] getMethodNames ( ) { } String getTabText ( ) { } void setExampleWidgetState ( ) { } }

Fix:
comboGroup . setLayoutData ( new GridData ( SWT . FILL , SWT . FILL , true , true ) ) ;
Buggy code:
public class NettyConsumerClientModeTest extends BaseNettyTest { private NettyConsumerClientModeTest . MyServer server ; public void startNettyServer ( ) throws Exception { } public void shutdownServer ( ) { } @ Test public void testNettyRoute ( ) throws Exception { } @ Override protected RouteBuilder createRouteBuilder ( ) throws Exception { } private static class MyServer { private int port ; private ServerBootstrap bootstrap ; private Channel channel ; private EventLoopGroup bossGroup ; private EventLoopGroup workerGroup ; public MyServer ( int port ) { } public void start ( ) throws Exception { } public void shutdown ( ) { <START_BUG> channel . close ( ) ; <END_BUG> bossGroup . shutdownGracefully ( ) ; workerGroup . shutdownGracefully ( ) ; } } private static class ServerHandler extends SimpleChannelInboundHandler < String > { public void channelActive ( ChannelHandlerContext ctx ) throws Exception { } @ Override public void exceptionCaught ( ChannelHandlerContext ctx , Throwable cause ) throws Exception { } @ Override protected void channelRead0 ( ChannelHandlerContext ctx , String msg ) throws Exception { } public void channelReadComplete ( ChannelHandlerContext ctx ) throws Exception { } } private static class ServerInitializer extends ChannelInitializer < SocketChannel > { private static final StringDecoder DECODER = new StringDecoder ( ) ; private static final StringEncoder ENCODER = new StringEncoder ( ) ; private static final NettyConsumerClientModeTest . ServerHandler SERVERHANDLER = new NettyConsumerClientModeTest . ServerHandler ( ) ; @ Override public void initChannel ( SocketChannel ch ) throws Exception { } } }

Fix:
channel . disconnect ( ) ;
Buggy code:
public class JSONHandler { private static Logger log = Logger . getLogger ( JSONHandler . class ) ; public JSONHandler ( ) { } public String createJSONFromItemList ( ArrayList < Item > itemList ) { JSONArray jsonItems = new JSONArray ( ) ; try { int i = 0 ; for ( Item item : itemList ) { <START_BUG> Log . d ( "ShoppingList//JSONHandler" , ( "JSONifying<seq2seq4repair_space>" + ( item . getName ( ) ) ) ) ; <END_BUG> jsonItems . put ( i , item . getName ( ) ) ; jsonItems . put ( ( 1 + i ) , item . getDescription ( ) ) ; jsonItems . put ( ( 2 + i ) , item . getUsageCounter ( ) ) ; jsonItems . put ( ( 3 + i ) , item . getNumberInLine ( ) ) ; jsonItems . put ( ( 4 + i ) , Utils . getTimeStamp ( item . getFirstSeen ( ) ) ) ; jsonItems . put ( ( 5 + i ) , Utils . getTimeStamp ( item . getLastSeen ( ) ) ) ; i += 6 ; } } catch ( JSONException e ) { return null ; } return jsonItems . toString ( ) ; } public ArrayList < Item > createItemListFromJSON ( String json ) { } }

Fix:
JSONHandler . log . debug ( ( "JSONifying<seq2seq4repair_space>" + ( item . getName ( ) ) ) ) ;
Buggy code:
public class VersionTest extends TestCase { private static final String ME = "org.aspectj.bridge.VersionTest" ; public static void main ( String [ ] args ) { } public VersionTest ( String name ) { } public void testVersion ( ) { if ( time_text . equals ( "" ) ) return ; Date date = new Date ( Version . time ) ; <START_BUG> SimpleDateFormat format = new SimpleDateFormat ( Version . SIMPLE_DATE_FORMAT , Locale . UK ) ; <END_BUG> format . setTimeZone ( TimeZone . getTimeZone ( "GMT" ) ) ; String timeString = format . format ( date ) ; assertEquals ( time_text , timeString ) ; } }

Fix:
SimpleDateFormat format = new SimpleDateFormat ( Version . SIMPLE_DATE_FORMAT , Locale . getDefault ( ) ) ;
Buggy code:
public class CookiePanel extends AbstractConfigGui implements ActionListener { private static final Logger log = LoggingManager . getLoggerForClass ( ) ; private static final String ADD_COMMAND = "Add" ; private static final String DELETE_COMMAND = "Delete" ; private static final String LOAD_COMMAND = "Load" ; private static final String SAVE_COMMAND = "Save" ; private JTable cookieTable ; private PowerTableModel tableModel ; private JCheckBox clearEachIteration ; private static final String clearEachIterationLabel = "clear_cookies_per_iter" ; private static final String [ ] columnNames = new String [ ] { JMeterUtils . getResString ( "name" ) , JMeterUtils . getResString ( "value" ) , JMeterUtils . getResString ( "domain" ) , JMeterUtils . getResString ( "path" ) , JMeterUtils . getResString ( "secure" ) } ; private static final Class [ ] columnClasses = new Class [ ] { String . class , String . class , String . class , String . class , Boolean . class } ; private JButton addButton ; private JButton deleteButton ; private JButton loadButton ; private JButton saveButton ; private final String [ ] policies = new String [ ] { CookiePolicy . BROWSER_COMPATIBILITY , CookiePolicy . NETSCAPE , CookiePolicy . RFC_2109 , CookiePolicy . DEFAULT , CookiePolicy . IGNORE_COOKIES } ; private JLabeledChoice policy ; public CookiePanel ( ) { } public String getLabelResource ( ) { } public void actionPerformed ( ActionEvent e ) { } private void addCookieToTable ( Cookie cookie ) { } public void modifyTestElement ( TestElement cm ) { } private Cookie createCookie ( Object [ ] rowData ) { } private void populateTable ( CookieManager manager ) { } public TestElement createTestElement ( ) { } public void configure ( TestElement el ) { } private void init ( ) { tableModel = new PowerTableModel ( CookiePanel . columnNames , CookiePanel . columnClasses ) ; clearEachIteration = new JCheckBox ( JMeterUtils . getResString ( CookiePanel . clearEachIterationLabel ) , false ) ; policy = new JLabeledChoice ( JMeterUtils . getResString ( "cookie_manager_policy" ) , policies ) ; policy . setText ( DEFAULT_POLICY ) ; setLayout ( new BorderLayout ( ) ) ; setBorder ( makeBorder ( ) ) ; JPanel northPanel = new JPanel ( ) ; <START_BUG> northPanel . setLayout ( new VerticalLayout ( 5 , VerticalLayout . LEFT ) ) ; <END_BUG> northPanel . add ( makeTitlePanel ( ) ) ; northPanel . add ( clearEachIteration ) ; northPanel . add ( policy ) ; add ( northPanel , BorderLayout . NORTH ) ; add ( createCookieTablePanel ( ) , BorderLayout . CENTER ) ; } public JPanel createCookieTablePanel ( ) { } private JButton createButton ( String resName , char mnemonic , String command , boolean enabled ) { } private JPanel createButtonPanel ( ) { } }

Fix:
northPanel . setLayout ( new VerticalLayout ( 5 , VerticalLayout . BOTH ) ) ;
Buggy code:
public class ReservoirSampler < T > implements Serializable { private static final long serialVersionUID = 171565809692064783L ; private int k ; private int i ; private HashMap < T , Integer > mapIndex ; private Random random ; private List < T > lstItems ; public ReservoirSampler ( int k , boolean indexItems ) { } public synchronized boolean add ( T item ) { } public synchronized T findItem ( T item ) { if ( ( this . mapIndex ) != null ) { <START_BUG> if ( this . mapIndex . containsKey ( item ) ) { <END_BUG> return this . lstItems . get ( this . mapIndex . get ( item ) ) ; } } else { for ( T curItem : this . lstItems ) { if ( curItem . equals ( item ) ) { return curItem ; } } } return null ; } public void reset ( ) { } public List < T > getItems ( ) { } public int size ( ) { } public boolean isFull ( ) { } public int getK ( ) { } public int getTotalAddedItems ( ) { } }

Fix:
if ( ( this . mapIndex . containsKey ( item ) ) && ( ( this . lstItems . size ( ) ) > ( this . mapIndex . get ( item ) ) ) ) {
Buggy code:
public class LifecycleCMTTxInterceptor extends CMTTxInterceptor implements Interceptor { private final TransactionAttributeType transactionAttributeType ; private final int transactionTimeout ; public LifecycleCMTTxInterceptor ( final TransactionAttributeType transactionAttributeType , final int transactionTimeout ) { } @ Override public Object processInvocation ( InterceptorContext invocation ) throws Exception { } public static class Factory extends ComponentInterceptorFactory { private final MethodIdentifier methodIdentifier ; private final boolean treatRequiredAsRequiresNew ; public Factory ( final MethodIdentifier methodIdentifier , final boolean treatRequiredAsRequiresNew ) { } @ Override protected Interceptor create ( Component component , InterceptorFactoryContext context ) { final EJBComponent ejb = ( ( EJBComponent ) ( component ) ) ; TransactionAttributeType txAttr ; if ( ( methodIdentifier ) == null ) { if ( treatRequiredAsRequiresNew ) { txAttr = TransactionAttributeType . REQUIRED ; } else { txAttr = TransactionAttributeType . NOT_SUPPORTED ; } } else { txAttr = ejb . getTransactionAttributeType ( BEAN , methodIdentifier , ( treatRequiredAsRequiresNew ? TransactionAttributeType . REQUIRES_NEW : TransactionAttributeType . NOT_SUPPORTED ) ) ; } final int txTimeout ; if ( ( methodIdentifier ) == null ) { txTimeout = - 1 ; } else { txTimeout = ejb . getTransactionTimeout ( BEAN , methodIdentifier ) ; } if ( ( treatRequiredAsRequiresNew ) && ( txAttr == ( TransactionAttributeType . REQUIRED ) ) ) { txAttr = TransactionAttributeType . REQUIRES_NEW ; } if ( ! ( treatRequiredAsRequiresNew ) ) { if ( ( txAttr != ( TransactionAttributeType . NOT_SUPPORTED ) ) && ( txAttr != ( TransactionAttributeType . REQUIRES_NEW ) ) ) { <START_BUG> ROOT_LOGGER . invalidTransactionTypeForSfsbLifecycleMethod ( txAttr , methodIdentifier ) ; <END_BUG> txAttr = TransactionAttributeType . NOT_SUPPORTED ; } } final LifecycleCMTTxInterceptor interceptor = new LifecycleCMTTxInterceptor ( txAttr , txTimeout ) ; return interceptor ; } } }

Fix:
ROOT_LOGGER . invalidTransactionTypeForSfsbLifecycleMethod ( txAttr , methodIdentifier , ejb . getComponentClass ( ) ) ;
Buggy code:
public class CCUpdate extends ClearCase { public static final String FLAG_GRAPHICAL = "-graphical" ; public static final String FLAG_LOG = "-log" ; public static final String FLAG_OVERWRITE = "-overwrite" ; public static final String FLAG_NOVERWRITE = "-noverwrite" ; public static final String FLAG_RENAME = "-rename" ; public static final String FLAG_CURRENTTIME = "-ctime" ; public static final String FLAG_PRESERVETIME = "-ptime" ; private boolean m_Graphical = false ; private boolean m_Overwrite = false ; private boolean m_Rename = false ; private boolean m_Ctime = false ; private boolean m_Ptime = false ; private String m_Log = null ; public void setCurrentTime ( boolean ct ) { } public void setGraphical ( boolean graphical ) { } public void setLog ( String log ) { } public void setOverwrite ( boolean ow ) { } public void setPreserveTime ( boolean pt ) { } public void setRename ( boolean ren ) { } public boolean getCurrentTime ( ) { } public boolean getGraphical ( ) { } public String getLog ( ) { } public boolean getOverwrite ( ) { } public boolean getPreserveTime ( ) { } public boolean getRename ( ) { } public void execute ( ) throws BuildException { Commandline commandLine = new Commandline ( ) ; Project aProj = getProject ( ) ; int result = 0 ; if ( ( getViewPath ( ) ) == null ) { setViewPath ( aProj . getBaseDir ( ) . getPath ( ) ) ; } commandLine . setExecutable ( getClearToolCommand ( ) ) ; commandLine . createArgument ( ) . setValue ( COMMAND_UPDATE ) ; checkOptions ( commandLine ) ; System . out . println ( commandLine . toString ( ) ) ; result = run ( commandLine ) ; if ( result != 0 ) { String msg = "Failed<seq2seq4repair_space>executing:<seq2seq4repair_space>" + ( commandLine . toString ( ) ) ; <START_BUG> throw new BuildException ( msg , location ) ; <END_BUG> } } private void getLogCommand ( Commandline cmd ) { } private void checkOptions ( Commandline cmd ) { } }

Fix:
throw new BuildException ( msg ) ;
Buggy code:
public class Activator extends Activity implements EventListener , BundleActivator { private static final String TAG = "GearNoti" ; public enum TemplateTypes { SMALL_HEADER ; } private static BundleContext context ; public static Context AppContext ; public static SrnRichNotificationManager mRichNotificationManager ; class Notify { public String m_power ; public String m_name ; public Notify ( ) { } } static int OBSERVE_TYPE_TO_USE = OBSERVE . getValue ( ) ; public static Activator . Notify myNotify ; public static OcResource curResource ; public static OcResourceHandle resourceHandle ; static int oc = 0 ; static Activity mActivity ; static BundleContext getContext ( ) { } public void start ( BundleContext bundleContext ) throws Exception { Activator . context = bundleContext ; ServiceReference < Context > ref = Activator . context . getServiceReference ( Context . class ) ; Activator . AppContext = Activator . context . getService ( ref ) ; Activator . myNotify = new Activator . Notify ( ) ; Srn srn = new Srn ( ) ; try { srn . initialize ( Activator . AppContext ) ; Log . w ( Activator . TAG , "SRN<seq2seq4repair_space>initialized" ) ; } catch ( SsdkUnsupportedException e ) { Log . w ( Activator . TAG , "SsdkUnsupportedException" ) ; } Activator . mRichNotificationManager = new SrnRichNotificationManager ( Activator . AppContext ) ; if ( Activator . mRichNotificationManager . isConnected ( ) ) { Activator . mRichNotificationManager . start ( ) ; Log . w ( Activator . TAG , "RichNoti<seq2seq4repair_space>Manager<seq2seq4repair_space>Started" ) ; SrnRichNotification myRichNotification = new SrnRichNotification ( Activator . AppContext ) ; Log . w ( Activator . TAG , "RichNoti<seq2seq4repair_space>instance<seq2seq4repair_space>created" ) ; PlatformConfig cfg = new PlatformConfig ( this , ServiceType . IN_PROC , ModeType . CLIENT_SERVER , "0.0.0.0" , 0 , QualityOfService . LOW ) ; OcPlatform . Configure ( cfg ) ; EntityHandlerNoti entitycb = new EntityHandlerNoti ( ) ; <START_BUG> Activator . resourceHandle = OcPlatform . registerResource ( "//a//galaxy//gear" , "device.notify" , "oc.mi.def" , entitycb , EnumSet . of ( DISCOVERABLE ) ) ; <END_BUG> } else { Log . w ( Activator . TAG , "Something<seq2seq4repair_space>Happened" ) ; } } @ Override protected void onResume ( ) { } @ Override protected void onPause ( ) { } @ Override public void onError ( UUID arg0 , ErrorType arg1 ) { } @ Override public void onRead ( UUID arg0 ) { } @ Override public void onRemoved ( UUID arg0 ) { } @ Override public void stop ( BundleContext arg0 ) throws Exception { } }

Fix:
Activator . resourceHandle = OcPlatform . registerResource ( "//a//galaxy//gear" , "device.notify" , DEFAULT_INTERFACE , entitycb , EnumSet . of ( DISCOVERABLE ) ) ;
Buggy code:
public class AndroidVersion { public static boolean isFroyo ( ) { } public static boolean isGingerbread ( ) { } public static boolean isIcs ( ) { boolean bRet = false ; <START_BUG> if ( ( VERSION . SDK_INT ) == 14 ) { <END_BUG> bRet = true ; } return bRet ; } }

Fix:
if ( ( VERSION . SDK_INT ) >= 14 ) {
Buggy code:
public class ConverterLocator implements IConverterLocator { private class DefaultConverter implements IConverter { private static final long serialVersionUID = 1L ; private final WeakReference < Class < ? > > type ; private DefaultConverter ( Class < ? > type ) { } public Object convertToObject ( String value , Locale locale ) { if ( value == null ) { return null ; } Class < ? > theType = type . get ( ) ; if ( "" . equals ( value ) ) { <START_BUG> if ( theType . equals ( String . class ) ) { <END_BUG> return theType . cast ( "" ) ; } return null ; } try { Object converted = Objects . convertValue ( value , theType ) ; if ( theType . isAssignableFrom ( converted . getClass ( ) ) ) { return theType . cast ( converted ) ; } else { throw new ConversionException ( ( ( ( ( "Could<seq2seq4repair_space>not<seq2seq4repair_space>convert<seq2seq4repair_space>value:<seq2seq4repair_space>" + value ) + "<seq2seq4repair_space>to<seq2seq4repair_space>type:<seq2seq4repair_space>" ) + ( theType . getName ( ) ) ) + ".<seq2seq4repair_space>Could<seq2seq4repair_space>not<seq2seq4repair_space>find<seq2seq4repair_space>compatible<seq2seq4repair_space>converter." ) ) . setSourceValue ( value ) ; } } catch ( Exception e ) { throw new ConversionException ( e . getMessage ( ) , e ) . setSourceValue ( value ) ; } } public String convertToString ( Object value , Locale locale ) { } } private static final long serialVersionUID = 1L ; private final Map < String , IConverter > classToConverter = new HashMap < String , IConverter > ( ) ; public ConverterLocator ( ) { } public final IConverter get ( Class < ? > c ) { } public final IConverter getConverter ( Class < ? > type ) { } public final IConverter remove ( Class < ? > c ) { } @ SuppressWarnings ( "unchecked" ) public final IConverter set ( final Class c , final IConverter converter ) { } }

Fix:
if ( String . class . equals ( theType ) ) {
Buggy code:
public class ProgressBar extends Control { static final int DELAY = 100 ; static final int TIMER_ID = 100 ; static final int MINIMUM_WIDTH = 100 ; static final int ProgressBarProc ; static final TCHAR ProgressBarClass = new TCHAR ( 0 , OS . PROGRESS_CLASS , true ) ; public ProgressBar ( Composite parent , int style ) { } int callWindowProc ( int hwnd , int msg , int wParam , int lParam ) { } static int checkStyle ( int style ) { } public Point computeSize ( int wHint , int hHint , boolean changed ) { } void createHandle ( ) { } int defaultForeground ( ) { } public int getMaximum ( ) { } public int getMinimum ( ) { } public int getSelection ( ) { } public int getState ( ) { } void releaseWidget ( ) { } void startTimer ( ) { } void stopTimer ( ) { } void setBackgroundPixel ( int pixel ) { } void setForegroundPixel ( int pixel ) { } public void setMaximum ( int value ) { } public void setMinimum ( int value ) { } public void setSelection ( int value ) { } public void setState ( int state ) { } int widgetStyle ( ) { } TCHAR windowClass ( ) { } int windowProc ( ) { } LRESULT WM_GETDLGCODE ( int wParam , int lParam ) { } LRESULT WM_SIZE ( int wParam , int lParam ) { LRESULT result = super . WM_SIZE ( wParam , lParam ) ; if ( result != null ) return result ; if ( ( ( style ) & ( SWT . INDETERMINATE ) ) != 0 ) { <START_BUG> if ( ( OS . COMCTL32_MAJOR ) >= 6 ) { <END_BUG> forceResize ( ) ; RECT rect = new RECT ( ) ; OS . GetClientRect ( handle , rect ) ; int oldBits = OS . GetWindowLong ( handle , GWL_STYLE ) ; int newBits = oldBits ; if ( ( ( rect . right ) - ( rect . left ) ) < ( ProgressBar . MINIMUM_WIDTH ) ) { newBits &= ~ ( OS . PBS_MARQUEE ) ; } else { newBits |= OS . PBS_MARQUEE ; } if ( newBits != oldBits ) { stopTimer ( ) ; OS . SetWindowLong ( handle , GWL_STYLE , newBits ) ; startTimer ( ) ; } } } return result ; } LRESULT WM_TIMER ( int wParam , int lParam ) { } }

Fix:
if ( ( ( OS . WIN32_VERSION ) == ( OS . VERSION ( 5 , 1 ) ) ) || ( ( ( OS . COMCTL32_MAJOR ) >= 6 ) && ( ! ( OS . IsAppThemed ( ) ) ) ) ) {
Buggy code:
public class Name implements Comparable { private static final int LABEL_NORMAL = 0 ; private static final int LABEL_COMPRESSION = 192 ; private static final int LABEL_EXTENDED = 64 ; private static final int LABEL_MASK = 192 ; private static final int EXT_LABEL_BITSTRING = 1 ; private Object [ ] name ; private byte offset ; private byte labels ; private boolean qualified ; private boolean hasBitString ; private int hashcode ; public static final Name root = Name . fromConstantString ( "." ) ; static final int MAXLABELS = 128 ; private static final int STARTLABELS = 4 ; private static final DecimalFormat byteFormat = new DecimalFormat ( ) ; private static final byte [ ] lowercase = new byte [ 256 ] ; private static final Name wildcardName = Name . fromConstantString ( "*" ) ; private static final byte [ ] wildcardLabel = ( ( byte [ ] ) ( Name . wildcardName . name [ 0 ] ) ) ; private Name ( ) { } private final void grow ( int n ) { } private final void grow ( ) { } private final void compact ( ) { } public Name ( String s , Name origin ) { } public Name ( String s ) { } public static Name fromString ( String s , Name origin ) throws TextParseException { } public static Name fromString ( String s ) throws TextParseException { } public static Name fromConstantString ( String s ) { } public Name ( DataByteInputStream in ) throws IOException { } public Name ( Name src , int n ) { } public static Name concatenate ( Name prefix , Name suffix ) { } public Name wild ( int n ) { } public Name fromDNAME ( DNAMERecord dname ) { } public boolean isWild ( ) { } public boolean isQualified ( ) { } public short length ( ) { } public byte labels ( ) { } public boolean subdomain ( Name domain ) { } private String byteString ( byte [ ] array ) { } public String toString ( ) { StringBuffer sb = new StringBuffer ( ) ; if ( ( labels ) == 0 ) sb . append ( "." ) ; for ( int i = offset ; i < ( ( labels ) + ( offset ) ) ; i ++ ) { if ( ( name [ i ] ) instanceof BitString ) sb . append ( name [ i ] ) ; else sb . append ( byteString ( ( ( byte [ ] ) ( name [ i ] ) ) ) ) ; <START_BUG> if ( ( qualified ) || ( i < ( ( labels ) - 1 ) ) ) <END_BUG> sb . append ( "." ) ; } return sb . toString ( ) ; } public String getLabelString ( int n ) { } public void toWire ( DataByteOutputStream out , Compression c ) throws IOException { } public void toWireCanonical ( DataByteOutputStream out ) throws IOException { } public byte [ ] toWireCanonical ( ) throws IOException { } public boolean equals ( Object arg ) { } public int hashCode ( ) { } public int compareTo ( Object o ) { } }

Fix:
if ( ( qualified ) || ( i < ( labels ) ) )
Buggy code:
public class SeenCommand extends AbstractLogCommand { public SeenCommand ( MyPolly polly , PollyLoggingManager logManager ) throws DuplicatedSignatureException { } @ Override protected boolean executeOnBoth ( User executer , String channel , Signature signature ) throws CommandException { if ( this . match ( signature , 0 ) ) { String user = signature . getStringValue ( 0 ) ; try { LogEntry le = this . logManager . seenUser ( user ) ; <START_BUG> this . logManager . outputLogResults ( polly , executer , Collections . singletonList ( le ) , channel ) ; <END_BUG> } catch ( Exception e ) { throw new CommandException ( e ) ; } } return false ; } }

Fix:
this . logManager . outputLogResults ( this . getMyPolly ( ) , executer , Collections . singletonList ( le ) , channel ) ;
Buggy code:
public class Snippet260 { public static void main ( String [ ] args ) { Display display = new Display ( ) ; Shell shell = new Shell ( display ) ; shell . setLayout ( new FillLayout ( ) ) ; shell . setText ( "Mozilla" ) ; final Browser browser ; try { browser = new Browser ( shell , SWT . MOZILLA ) ; } catch ( SWTError e ) { <START_BUG> System . out . println ( ( "Count<seq2seq4repair_space>not<seq2seq4repair_space>instantiate<seq2seq4repair_space>Browser:<seq2seq4repair_space>" + ( e . getMessage ( ) ) ) ) ; <END_BUG> return ; } shell . open ( ) ; browser . setUrl ( "http:////mozilla.org" ) ; while ( ! ( shell . isDisposed ( ) ) ) { if ( ! ( display . readAndDispatch ( ) ) ) display . sleep ( ) ; } display . dispose ( ) ; } }

Fix:
System . out . println ( ( "Could<seq2seq4repair_space>not<seq2seq4repair_space>instantiate<seq2seq4repair_space>Browser:<seq2seq4repair_space>" + ( e . getMessage ( ) ) ) ) ;
Buggy code:
public class DefaultConfigurerTest extends AbstractComponentTest { private static final Resources REZ = ResourceManager . getPackageResources ( DefaultConfigurerTest . class ) ; private Configurer m_configurer ; private DefaultTaskContext m_context ; public DefaultConfigurerTest ( String name ) { } protected void setUp ( ) throws Exception { super . setUp ( ) ; m_configurer = ( ( Configurer ) ( getComponentManager ( ) . lookup ( ROLE ) ) ) ; <START_BUG> m_context = new DefaultTaskContext ( getComponentManager ( ) ) ; <END_BUG> final File baseDir = new File ( "." ) . getAbsoluteFile ( ) ; m_context . setProperty ( BASE_DIRECTORY , baseDir ) ; } public void testSetAttribute ( ) throws Exception { } public void testAttributeConvert ( ) throws Exception { } public void testSetUnknownAttribute ( ) throws Exception { } public void testSetElement ( ) throws Exception { } public void testSetUnknownElement ( ) throws Exception { } public void testContent ( ) throws Exception { } public void testUnexpectedContent ( ) throws Exception { } public void testPropResolution ( ) throws Exception { } public void testReferenceAttribute ( ) throws Exception { } public void testReferenceElement ( ) throws Exception { } public void testReferenceElementExtra ( ) throws Exception { } public void testNonInterfaceTypedAdder ( ) throws Exception { } public void testMultipleTypedAdder ( ) throws Exception { } public void testTypedAdder ( ) throws Exception { } public void testTypedAdderAttribute ( ) throws Exception { } public void testTypedConfigAdder ( ) throws Exception { } public void testConfigAdder ( ) throws Exception { } public void testConfigable ( ) throws Exception { } public void testIdResolve ( ) throws Exception { } public void testUnknownReference ( ) throws Exception { } public void testMismatchedRefType ( ) throws Exception { } public void testTypedAdderReference ( ) throws Exception { } public void testNestedErrors ( ) throws Exception { } public void testIgnoreStringMethods ( ) throws Exception { } }

Fix:
m_context = new DefaultTaskContext ( ) ;
Buggy code:
public abstract class AbstractComponentMapper extends AbstractMapper implements IRequestMapper { public AbstractComponentMapper ( ) { } protected IMapperContext getContext ( ) { <START_BUG> return Application . get ( ) . getEncoderContext ( ) ; <END_BUG> } protected String requestListenerInterfaceToString ( RequestListenerInterface listenerInterface ) { } protected RequestListenerInterface requestListenerInterfaceFromString ( String interfaceName ) { } protected PageComponentInfo getPageComponentInfo ( final Url url ) { } protected void encodePageComponentInfo ( Url url , PageComponentInfo info ) { } protected Class < ? extends IRequestablePage > getPageClass ( String name ) { } @ Override protected void removeMetaParameter ( final Url urlCopy ) { } }

Fix:
return Application . get ( ) . getMapperContext ( ) ;
Buggy code:
public class WebservicesSubsystemParserTestCase extends AbstractSubsystemBaseTest { public WebservicesSubsystemParserTestCase ( ) { } @ Override protected String getSubsystemXml ( ) throws IOException { <START_BUG> return readResource ( "ws-subsystem20.xml" ) ; <END_BUG> } protected AdditionalInitialization createAdditionalInitialization ( ) { } @ Override protected String getSubsystemXml ( String configId ) throws IOException { } @ Test public void testParseV10 ( ) throws Exception { } @ Test public void testParseV11 ( ) throws Exception { } @ Test public void testParseV12 ( ) throws Exception { } private void checkSubsystemBasics ( ModelNode model ) throws Exception { } private void checkEndpointConfigs ( ModelNode model ) throws Exception { } private void checkClientConfigs ( ModelNode model ) throws Exception { } private FailedOperationTransformationConfig getConfig ( ) { } private void testRejectExpressions_1_1_0 ( ModelTestControllerVersion controllerVersion ) throws Exception { } @ Test public void testTransformersAS712 ( ) throws Exception { } @ Test public void testTransformersAS713 ( ) throws Exception { } @ Test public void testTransformersEAP600 ( ) throws Exception { } @ Test public void testTransformersEAP601 ( ) throws Exception { } @ Test public void testTransformersAS720 ( ) throws Exception { } @ Test public void testTransformersEAP610 ( ) throws Exception { } @ Test public void testTransformersEAP611 ( ) throws Exception { } private void testTransformers_1_2_0 ( ModelTestControllerVersion controllerVersion ) throws Exception { } }

Fix:
return readResource ( "ws-subsystem12.xml" ) ;
Buggy code:
public class IMAPFolder extends RemoteFolder { private ImapItem item ; private Object aktMessageUid ; private ColumbaMessage aktMessage ; private boolean mailcheck = false ; private IMAPStore store ; protected HeaderList headerList ; protected RemoteHeaderCache cache ; protected boolean existsOnServer ; public IMAPFolder ( FolderItem folderItem ) { } public Object [ ] searchMessages ( Filter filter , Object [ ] uids ) throws Exception { } public Object [ ] searchMessages ( Filter filter ) throws Exception { } public void removeFolder ( ) throws Exception { } public boolean renameFolder ( String name ) throws Exception { } public FolderTreeNode getRootFolder ( ) { } public IMAPStore getStore ( ) { } public HeaderList getHeaderList ( ) throws Exception { } protected void updateFlags ( Flags [ ] flagsList ) { } public void save ( ) throws Exception { } public List synchronize ( HeaderList headerList , List newList ) throws Exception { } protected boolean existsRemotely ( String uid , int startIndex , List uidList ) throws Exception { } protected boolean existsLocally ( String uid , HeaderList list ) throws Exception { } public MimeTree getMimePartTree ( Object uid ) throws Exception { } public MimePart getMimePart ( Object uid , Integer [ ] address ) throws Exception { } public void innerCopy ( MailboxInterface destFolder , Object [ ] uids ) throws Exception { } public Object addMessage ( ColumbaMessage message ) throws Exception { } public Object addMessage ( String source ) throws Exception { } public boolean exists ( Object uid ) throws Exception { } protected void markMessage ( Object uid , int variant ) throws Exception { } public void markMessage ( Object [ ] uids , int variant ) throws Exception { } public void removeMessage ( Object uid ) throws Exception { } public Object [ ] getUids ( ) throws Exception { } public void expungeFolder ( ) throws Exception { } public String getMessageSource ( Object uid ) throws Exception { } public ColumbaHeader getMessageHeader ( Object uid ) throws Exception { } public ColumbaMessage getMessage ( Object uid ) throws Exception { } public String getImapPath ( ) { } public static XmlElement getDefaultProperties ( ) { } public boolean tryToGetLock ( Object locker ) { } public void releaseLock ( ) { } public IMAPFolder ( String name , String type ) throws Exception { } public void addSubfolder ( FolderTreeNode child ) throws Exception { } public StatusObservable getObservable ( ) { } public Object addMessage ( InputStream in ) throws Exception { } public Object getAttribute ( Object uid , String key ) throws Exception { } public Flags getFlags ( Object uid ) throws Exception { } public Header getHeaderFields ( Object uid , String [ ] keys ) throws Exception { <START_BUG> return null ; <END_BUG> } public InputStream getMessageSourceStream ( Object uid ) throws Exception { } public InputStream getMimePartSourceStream ( Object uid , Integer [ ] address ) throws Exception { } public InputStream getMimePartBodyStream ( Object uid , Integer [ ] address ) throws Exception { } }

Fix:
return getStore ( ) . getHeaders ( uid , keys , getImapPath ( ) ) ;
Buggy code:
public class TabItem extends Item { int labelHandle ; int imageHandle ; int pageHandle ; Control control ; TabFolder parent ; String toolTipText ; public TabItem ( TabFolder parent , int style ) { } public TabItem ( TabFolder parent , int style , int index ) { } protected void checkSubclass ( ) { } void createWidget ( int index ) { } void deregister ( ) { } void destroyWidget ( ) { } public Control getControl ( ) { } public TabFolder getParent ( ) { } public String getToolTipText ( ) { } int gtk_mnemonic_activate ( int widget , int arg1 ) { } void hookEvents ( ) { super . hookEvents ( ) ; if ( ( labelHandle ) != 0 ) <START_BUG> OS . g_signal_connect ( labelHandle , mnemonic_activate , windowProc3 , MNEMONIC_ACTIVATE ) ; <END_BUG> } void register ( ) { } void releaseHandle ( ) { } void releaseParent ( ) { } public void setControl ( Control control ) { } void setFontDescription ( int font ) { } void setForegroundColor ( GdkColor color ) { } public void setImage ( Image image ) { } void setOrientation ( ) { } public void setText ( String string ) { } public void setToolTipText ( String string ) { } }

Fix:
OS . g_signal_connect_closure_by_id ( labelHandle , display . signalIds [ MNEMONIC_ACTIVATE ] , 0 , display . closures [ MNEMONIC_ACTIVATE ] , false ) ;
Buggy code:
public CheckIndex . Status checkIndex ( List < String > onlySegments , CodecProvider codecs ) throws IOException { NumberFormat nf = NumberFormat . getInstance ( ) ; <START_BUG> SegmentInfos sis = new SegmentInfos ( ) ; <END_BUG>

Fix:
SegmentInfos sis = new SegmentInfos ( codecs ) ;
Buggy code:
public class Frequency implements Serializable { private static final long serialVersionUID = - 3845586908418844111L ; private final TreeMap < Comparable < ? > , Long > freqTable ; public Frequency ( ) { } @ SuppressWarnings ( "unchecked" ) public Frequency ( Comparator < ? > comparator ) { } @ Override public String toString ( ) { } @ Deprecated public void addValue ( Object v ) { } public void addValue ( Comparable < ? > v ) { } public void addValue ( int v ) { } public void addValue ( Integer v ) { } public void addValue ( long v ) { } public void addValue ( char v ) { } public void clear ( ) { } public Iterator < Comparable < ? > > valuesIterator ( ) { } public long getSumFreq ( ) { } @ Deprecated public long getCount ( Object v ) { } public long getCount ( Comparable < ? > v ) { } public long getCount ( int v ) { } public long getCount ( long v ) { } public long getCount ( char v ) { } @ Deprecated public double getPct ( Object v ) { <START_BUG> return getCumPct ( ( ( Comparable < ? > ) ( v ) ) ) ; <END_BUG> } public double getPct ( Comparable < ? > v ) { } public double getPct ( int v ) { } public double getPct ( long v ) { } public double getPct ( char v ) { } @ Deprecated public long getCumFreq ( Object v ) { } @ SuppressWarnings ( "unchecked" ) public long getCumFreq ( Comparable < ? > v ) { } public long getCumFreq ( int v ) { } public long getCumFreq ( long v ) { } public long getCumFreq ( char v ) { } @ Deprecated public double getCumPct ( Object v ) { } public double getCumPct ( Comparable < ? > v ) { } public double getCumPct ( int v ) { } public double getCumPct ( long v ) { } public double getCumPct ( char v ) { } private static class NaturalComparator < T extends Comparable < T > > implements Serializable , Comparator < Comparable < T > > { private static final long serialVersionUID = - 3852193713161395148L ; @ SuppressWarnings ( "unchecked" ) public int compare ( Comparable < T > o1 , Comparable < T > o2 ) { } } @ Override public int hashCode ( ) { } @ Override public boolean equals ( Object obj ) { } }

Fix:
return getPct ( ( ( Comparable < ? > ) ( v ) ) ) ;
Buggy code:
public class RemoteViewManagedReferenceFactory implements ManagedReferenceFactory { private final String appName ; private final String moduleName ; private final String distinctName ; private final String beanName ; private final String viewClass ; private final boolean stateful ; public RemoteViewManagedReferenceFactory ( final String appName , final String moduleName , final String distinctName , final String beanName , final String viewClass , final boolean stateful ) { } @ Override public ManagedReference getReference ( ) { final ClassLoader tccl = SecurityActions . getContextClassLoader ( ) ; final Class < ? > viewClass ; try { viewClass = Class . forName ( this . viewClass , false , tccl ) ; } catch ( ClassNotFoundException e ) { throw new RuntimeException ( ( "Could<seq2seq4repair_space>not<seq2seq4repair_space>load<seq2seq4repair_space>view<seq2seq4repair_space>class<seq2seq4repair_space>for<seq2seq4repair_space>ejb<seq2seq4repair_space>" + ( beanName ) ) , e ) ; } <START_BUG> final Object proxy = EJBClient . getProxy ( appName , moduleName , distinctName , viewClass , beanName ) ; <END_BUG> if ( stateful ) { EJBClient . createSession ( proxy ) ; } return new org . jboss . as . naming . ValueManagedReference ( new org . jboss . msc . value . ImmediateValue < Object > ( proxy ) ) ; } }

Fix:
final Object proxy = EJBClient . getProxy ( appName , moduleName , distinctName , beanName , viewClass ) ;
Buggy code:
public class NetworkPacketManager implements Runnable { private List < SentNetworkPacket > _packetSentList ; private final Thread _localThread ; private final Object _lock = new Object ( ) ; private NetworkPacketManager ( ) { } private volatile boolean _isRunning = true ; @ Override public void run ( ) { while ( _isRunning ) { try { <START_BUG> Thread . sleep ( 100000 ) ; <END_BUG> synchronized ( _lock ) { Iterator < SentNetworkPacket > iterator = _packetSentList . iterator ( ) ; while ( iterator . hasNext ( ) ) { SentNetworkPacket sentNetworkPacket = iterator . next ( ) ; if ( ( ( new Date ( ) . getTime ( ) ) - ( sentNetworkPacket . getTime ( ) ) ) > 10000 ) { sentNetworkPacket . resendPacket ( ) ; iterator . remove ( ) ; } } } } catch ( InterruptedException e ) { } } } public void close ( ) { } public void sentNetworkPacket ( NetworkPacket packet , NetworkPacketHandler destination ) { } public void receivedAcknowledge ( NetworkPacket packet ) { } private void removePacket ( Integer id ) { } public void removePacketsByConnection ( NetworkConnection connection ) { } private static NetworkPacketManager _instance = null ; public static synchronized NetworkPacketManager getInstance ( ) { } }

Fix:
Thread . sleep ( 10000 ) ;
Buggy code:
@ Service public class ProductionCountingGenerateProductionBalance extends Observable { <START_BUG> public void generateProductionBalance ( Entity entity ) { <END_BUG> setChanged ( ) ; notifyObservers ( entity ) ; } }

Fix:
public void generateProductionBalance ( final Entity entity ) {
Buggy code:
public class QualifiedTypeReference extends TypeReference { public char [ ] [ ] tokens ; public long [ ] sourcePositions ; public QualifiedTypeReference ( char [ ] [ ] sources , long [ ] poss ) { } public TypeReference copyDims ( int dim ) { } protected TypeBinding findNextTypeBinding ( int tokenIndex , Scope scope , PackageBinding packageBinding ) { try { if ( ( this . resolvedType ) == null ) { this . resolvedType = scope . getType ( this . tokens [ tokenIndex ] , packageBinding ) ; } else { this . resolvedType = scope . getMemberType ( this . tokens [ tokenIndex ] , ( ( ReferenceBinding ) ( this . resolvedType ) ) ) ; if ( ( this . resolvedType ) instanceof ProblemReferenceBinding ) { ProblemReferenceBinding problemBinding = ( ( ProblemReferenceBinding ) ( this . resolvedType ) ) ; <START_BUG> this . resolvedType = new ProblemReferenceBinding ( CharOperation . subarray ( this . tokens , 0 , ( tokenIndex + 1 ) ) , problemBinding . closestMatch , this . resolvedType . problemId ( ) ) ; <END_BUG> } } return this . resolvedType ; } catch ( AbortCompilation e ) { e . updateContext ( this , scope . referenceCompilationUnit ( ) . compilationResult ) ; throw e ; } } public char [ ] getLastToken ( ) { } protected TypeBinding getTypeBinding ( Scope scope ) { } public char [ ] [ ] getTypeName ( ) { } public StringBuffer printExpression ( int indent , StringBuffer output ) { } public void traverse ( ASTVisitor visitor , BlockScope scope ) { } public void traverse ( ASTVisitor visitor , ClassScope scope ) { } }

Fix:
this . resolvedType = new ProblemReferenceBinding ( CharOperation . subarray ( this . tokens , 0 , ( tokenIndex + 1 ) ) , problemBinding . closestMatch ( ) , this . resolvedType . problemId ( ) ) ;
Buggy code:
public abstract class Link extends WebMarkupContainer implements ILinkListener { private String afterDisabledLink ; private boolean autoEnable = true ; private String beforeDisabledLink ; private boolean enabled = true ; private PopupSettings popupSettings = null ; public Link ( final String id ) { } public Link ( final String id , IModel object ) { } public String getAfterDisabledLink ( ) { } public final boolean getAutoEnable ( ) { } public String getBeforeDisabledLink ( ) { } public final PopupSettings getPopupSettings ( ) { } public final boolean isEnabled ( ) { } public abstract void onClick ( ) { } public final void onLinkClicked ( ) { } public void setAfterDisabledLink ( final String afterDisabledLink ) { } public final Link setAutoEnable ( final boolean autoEnable ) { } public void setBeforeDisabledLink ( final String beforeDisabledLink ) { } public final Link setEnabled ( final boolean enabled ) { } public final Link setPopupSettings ( PopupSettings popupSettings ) { } protected String getOnClickScript ( final String url ) { } protected String getURL ( ) { <START_BUG> return getRequestCycle ( ) . urlFor ( this , ILinkListener . class ) ; <END_BUG> } protected boolean linksTo ( final Page page ) { } protected final void onComponentTag ( final ComponentTag tag ) { } protected final void onComponentTagBody ( final MarkupStream markupStream , final ComponentTag openTag ) { } }

Fix:
return getPage ( ) . urlFor ( this , ILinkListener . class ) ;
Buggy code:
public class ParseHelper { public static final long ONE_MINUTE = 60 * 1000 ; public static final long ONE_HOUR = ( ParseHelper . ONE_MINUTE ) * 60 ; public static final long ONE_DAY = ( ParseHelper . ONE_HOUR ) * 24 ; public static TussamCardDTO parseData ( String cardDataString ) { } public static String parseDate ( Context context , Long date ) { String dateString = "" ; <START_BUG> if ( context != null ) { <END_BUG> Date nowDate = new Date ( ) ; long nowDateDifferenceLong = ( nowDate . getTime ( ) ) - date ; if ( nowDateDifferenceLong < ( ParseHelper . ONE_MINUTE ) ) { dateString = context . getString ( updated_now ) ; } else if ( ( nowDateDifferenceLong >= ( ParseHelper . ONE_MINUTE ) ) && ( nowDateDifferenceLong < ( ParseHelper . ONE_HOUR ) ) ) { dateString = String . format ( Locale . US , "%d<seq2seq4repair_space>%s" , ( nowDateDifferenceLong // ( ParseHelper . ONE_MINUTE ) ) , context . getString ( updated_minutes_ago ) ) ; } else if ( ( nowDateDifferenceLong >= ( ParseHelper . ONE_HOUR ) ) && ( nowDateDifferenceLong < ( ParseHelper . ONE_DAY ) ) ) { dateString = String . format ( Locale . US , "%d<seq2seq4repair_space>%s" , ( nowDateDifferenceLong // ( ParseHelper . ONE_HOUR ) ) , context . getString ( updated_hours_ago ) ) ; } else { dateString = new SimpleDateFormat ( context . getString ( updated_date_format ) ) . format ( new Date ( date ) ) ; } } return dateString ; } }

Fix:
if ( ( context != null ) && ( date != null ) ) {
Buggy code:
@ Slow public class RecoveryZkTest extends AbstractFullDistribZkTestBase { private static Logger log = LoggerFactory . getLogger ( RecoveryZkTest . class ) ; private StopableIndexingThread indexThread ; private StopableIndexingThread indexThread2 ; public RecoveryZkTest ( ) { } @ Override public void doTest ( ) throws Exception { handle . clear ( ) ; handle . put ( "QTime" , SKIPVAL ) ; handle . put ( "timestamp" , SKIPVAL ) ; indexThread = new StopableIndexingThread ( 0 , true ) ; indexThread . start ( ) ; indexThread2 = new StopableIndexingThread ( 10000 , true ) ; indexThread2 . start ( ) ; Thread . sleep ( atLeast ( 2000 ) ) ; JettySolrRunner replica = chaosMonkey . stopShard ( "shard1" , 1 ) . jetty ; Thread . sleep ( atLeast ( 2000 ) ) ; replica . start ( ) ; Thread . sleep ( 1500 ) ; ZkStateReader zkStateReader = cloudClient . getZkStateReader ( ) ; waitForRecoveriesToFinish ( DEFAULT_COLLECTION , zkStateReader , false , true ) ; indexThread . safeStop ( ) ; indexThread2 . safeStop ( ) ; indexThread . join ( ) ; indexThread2 . join ( ) ; Thread . sleep ( 500 ) ; waitForRecoveriesToFinish ( DEFAULT_COLLECTION , zkStateReader , false , true ) ; commit ( ) ; <START_BUG> checkShardConsistency ( "shard1" , false ) ; <END_BUG> SolrQuery query = new SolrQuery ( "*:*" ) ; query . setParam ( "distrib" , "false" ) ; long client1Docs = shardToJetty . get ( "shard1" ) . get ( 0 ) . client . solrClient . query ( query ) . getResults ( ) . getNumFound ( ) ; long client2Docs = shardToJetty . get ( "shard1" ) . get ( 1 ) . client . solrClient . query ( query ) . getResults ( ) . getNumFound ( ) ; assertTrue ( ( client1Docs > 0 ) ) ; assertEquals ( client1Docs , client2Docs ) ; } @ Override protected void indexDoc ( SolrInputDocument doc ) throws IOException , SolrServerException { } @ Override public void tearDown ( ) throws Exception { } @ Override protected void indexr ( Object ... fields ) throws Exception { } }

Fix:
checkShardConsistency ( "shard1" , false , false ) ;
Buggy code:
public class NamespaceSupport implements NamespaceContext { protected String [ ] fNamespace = new String [ 16 * 2 ] ; protected int fNamespaceSize ; protected int [ ] fContext = new int [ 8 ] ; protected int fCurrentContext ; protected String [ ] fPrefixes = new String [ 16 ] ; public NamespaceSupport ( ) { } public NamespaceSupport ( NamespaceContext context ) { } public void reset ( ) { } public void pushContext ( ) { } public void popContext ( ) { } public boolean declarePrefix ( String prefix , String uri ) { } public String getURI ( String prefix ) { } public String getPrefix ( String uri ) { } public int getDeclaredPrefixCount ( ) { } public String getDeclaredPrefixAt ( int index ) { } public Enumeration getAllPrefixes ( ) { } public boolean containsPrefix ( String prefix ) { } protected final class Prefixes implements Enumeration { private String [ ] prefixes ; private int counter = 0 ; private int size = 0 ; public Prefixes ( String [ ] prefixes , int size ) { } public boolean hasMoreElements ( ) { } public Object nextElement ( ) { } public String toString ( ) { StringBuffer buf = new StringBuffer ( ) ; for ( int i = 0 ; i < ( size ) ; i ++ ) { buf . append ( prefixes [ i ] ) ; <START_BUG> buf . append ( "<seq2seq4repair_space>" ) ; <END_BUG> } return buf . toString ( ) ; } } }

Fix:
buf . append ( '<seq2seq4repair_space>' ) ;