nus-yam/ex-repair huggingface dataset:
Buggy code:
public abstract class AbstractTaskTestCase { protected File tempDir ; protected DirectoryStructure env ; protected ProductConfig productConfig ; @ Before public void setup ( ) throws Exception { tempDir = IoUtils . mkdir ( new File ( System . getProperty ( "java.io.tmpdir" ) ) , TestUtils . randomString ( ) ) ; File jbossHome = IoUtils . mkdir ( tempDir , "jboss-installation" ) ; IoUtils . mkdir ( jbossHome , Constants . MODULES , "system" , Constants . LAYERS , Constants . BASE ) ; IoUtils . mkdir ( jbossHome , Constants . BUNDLES , "system" , Constants . LAYERS , Constants . BASE ) ; <START_BUG> env = DirectoryStructure . createLegacy ( jbossHome ) ; <END_BUG> productConfig = new ProductConfig ( "product" , "version" , "consoleSlot" ) ; } @ After public void tearDown ( ) { } public InstalledIdentity loadInstalledIdentity ( ) throws IOException { } protected PatchTool newPatchTool ( ) throws IOException { } protected PatchingResult executePatch ( final File file ) throws IOException , PatchingException { } protected PatchingResult rollback ( String patchId ) throws IOException , PatchingException { } protected PatchingResult rollback ( String patchId , final boolean rollbackTo ) throws IOException , PatchingException { } }

Fix:
env = TestUtils . createLegacyTestStructure ( jbossHome ) ;
Buggy code:
public class NewLocalDomainControllerClient implements HostControllerClient { private final NewHostController hostController ; public NewLocalDomainControllerClient ( final NewHostController hostController ) { } @ Override public String getId ( ) { } @ Override public boolean isActive ( ) { } @ Override public void updateDomainModel ( final DomainModel domain ) { } @ Override public HostModel getHostModel ( ) { <START_BUG> return hostController . getHostModel ( ) ; <END_BUG> } @ Override public List < HostUpdateResult < ? > > updateHostModel ( List < AbstractHostModelUpdate < ? > > updates ) { } @ Override public List < ModelUpdateResponse < List < ServerIdentity > > > updateDomainModel ( List < AbstractDomainModelUpdate < ? > > updates ) { } @ Override public Map < ServerIdentity , ServerStatus > getServerStatuses ( ) { } @ Override public ServerModel getServerModel ( String serverName ) { } @ Override public List < UpdateResultHandlerResponse < ? > > updateServerModel ( final String serverName , final List < AbstractServerModelUpdate < ? > > updates , final boolean allowOverallRollback ) { } @ Override public ServerStatus restartServer ( String serverName , long gracefulTimeout ) { } @ Override public ServerStatus startServer ( String serverName ) { } @ Override public ServerStatus stopServer ( String serverName , long gracefulTimeout ) { } private ModelUpdateResponse < List < ServerIdentity > > executeUpdate ( AbstractDomainModelUpdate < ? > domainUpdate ) { } private ModelUpdateResponse < List < ServerIdentity > > executeUpdate ( AbstractHostModelUpdate < ? > hostUpdate ) { } }

Fix:
return hostController . getOldHostModel ( ) ;
Buggy code:
public final class ConnectorSubsystemAdd extends AbstractSubsystemAdd < ConnectorSubsystemElement > { private static final long serialVersionUID = - 874698675049495644L ; private boolean archiveValidation = true ; private boolean archiveValidationFailOnError = true ; private boolean archiveValidationFailOnWarn = false ; private boolean beanValidation = true ; protected ConnectorSubsystemAdd ( ) { } @ Override protected < P > void applyUpdate ( final UpdateContext updateContext , final UpdateResultHandler < ? super Void , P > resultHandler , final P param ) { final BatchBuilder builder = updateContext . getBatchBuilder ( ) ; final ConnectorSubsystemConfiguration config = new ConnectorSubsystemConfiguration ( ) ; config . setArchiveValidation ( archiveValidation ) ; config . setArchiveValidationFailOnError ( archiveValidationFailOnError ) ; config . setArchiveValidationFailOnWarn ( archiveValidationFailOnWarn ) ; config . setBeanValidation ( beanValidation ) ; final ConnectorConfigService connectorConfigService = new ConnectorConfigService ( config ) ; final BatchServiceBuilder < ConnectorSubsystemConfiguration > serviceBuilder = builder . addService ( CONNECTOR_CONFIG_SERVICE , connectorConfigService ) ; <START_BUG> serviceBuilder . setInitialMode ( IMMEDIATE ) ; <END_BUG> } protected ConnectorSubsystemElement createSubsystemElement ( ) { } public boolean isArchiveValidation ( ) { } public void setArchiveValidation ( final boolean archiveValidation ) { } public boolean isArchiveValidationFailOnError ( ) { } public void setArchiveValidationFailOnError ( final boolean archiveValidationFailOnError ) { } public boolean isArchiveValidationFailOnWarn ( ) { } public void setArchiveValidationFailOnWarn ( final boolean archiveValidationFailOnWarn ) { } public boolean isBeanValidation ( ) { } public void setBeanValidation ( final boolean beanValidation ) { } }

Fix:
serviceBuilder . setInitialMode ( ACTIVE ) ;
Buggy code:
public class Decoder extends DecoderBase { private static final int one_byte_size_ready = 0 ; private static final int eight_byte_size_ready = 1 ; private static final int flags_ready = 2 ; private static final int message_ready = 3 ; private final byte [ ] tmpbuf ; private Msg in_progress ; private final long maxmsgsize ; private IMsgSink msg_sink ; public Decoder ( int bufsize_ , long maxmsgsize_ ) { } @ Override public void set_msg_sink ( IMsgSink msg_sink_ ) { } @ Override protected boolean next ( ) { } private boolean one_byte_size_ready ( ) { } private boolean eight_byte_size_ready ( ) { final long payload_length = ByteBuffer . wrap ( tmpbuf ) . getLong ( ) ; <START_BUG> if ( payload_length == 0 ) { <END_BUG> decoding_error ( ) ; return false ; } if ( ( ( maxmsgsize ) >= 0 ) && ( ( payload_length - 1 ) > ( maxmsgsize ) ) ) { decoding_error ( ) ; return false ; } if ( ( payload_length - 1 ) > ( Integer . MAX_VALUE ) ) { decoding_error ( ) ; return false ; } final int msg_size = ( ( int ) ( payload_length - 1 ) ) ; in_progress = new Msg ( msg_size ) ; next_step ( tmpbuf , 1 , Decoder . flags_ready ) ; return true ; } private boolean flags_ready ( ) { } private boolean message_ready ( ) { } }

Fix:
if ( payload_length <= 0 ) {
Buggy code:
public class MessageListenerService extends WearableListenerService implements GoogleApiClient . ConnectionCallbacks , GoogleApiClient . OnConnectionFailedListener { private static final String TAG = "MessageListenerService" ; private GoogleApiClient mGoogleApiClient ; @ Override public void onMessageReceived ( MessageEvent messageEvent ) { } @ Override public void onConnected ( Bundle connectionHint ) { } @ Override public void onConnectionSuspended ( int cause ) { } @ Override public void onConnectionFailed ( ConnectionResult result ) { } private void fetchWeather ( ) { ETime etime = new ETime ( ) . setToNow ( ) . generateStartET ( ) ; final ArrayList < ETime > etimeList = new ArrayList < > ( ) ; for ( int i = - 1 ; i < 4 ; i ++ ) { <START_BUG> etimeList . add ( new ETime ( ) . setEtMillis ( ( ( etime . time ) - ( ( ( ETime . HOUR_IN_MILLIS ) * 8 ) * i ) ) ) ) ; <END_BUG> } WeatherApi . getWeatherList ( this , new WeatherApi . WeatherCallback ( ) { @ Override public void onResult ( List < WeatherApi . Weather > weatherList ) { ArrayList < DataMap > dataMapList = new ArrayList < > ( ) ; for ( WeatherApi . Weather weather : weatherList ) { DataMap dataMap = new DataMap ( ) ; dataMap . putInt ( KEY_WEATHER_ID , weather . weather ) ; dataMap . putInt ( KEY_WEATHER_AREA , weather . area ) ; ETime time = etimeList . get ( ( ( weather . time ) + 1 ) ) ; dataMap . putInt ( KEY_WEATHER_YEAR , time . year ) ; dataMap . putInt ( KEY_WEATHER_MONTH , time . month ) ; dataMap . putInt ( KEY_WEATHER_DAY , time . day ) ; dataMap . putInt ( KEY_WEATHER_HOUR , time . hour ) ; dataMapList . add ( dataMap ) ; } DataMap dataMap = new DataMap ( ) ; dataMap . putDataMapArrayList ( KEY_WEATHER_LIST , dataMapList ) ; MessageSender . sendMessage ( mGoogleApiClient , PATH_DATA_WEATHER , dataMap ) ; } } ) ; } }

Fix:
etimeList . add ( new ETime ( ) . setEtMillis ( ( ( etime . time ) + ( ( ( ETime . HOUR_IN_MILLIS ) * 8 ) * i ) ) ) ) ;
Buggy code:
public final class PatternValidator extends AbstractValidator { private final Pattern pattern ; public PatternValidator ( final String pattern ) { } public PatternValidator ( final String pattern , final int flags ) { } public PatternValidator ( final Pattern pattern ) { } public PatternValidator ( final MetaPattern pattern ) { } public ValidationErrorMessage validate ( final FormComponent component ) { <START_BUG> final String value = component . getStringValue ( ) ; <END_BUG> if ( ! ( pattern . matcher ( value ) . matches ( ) ) ) { return errorMessage ( value , component ) ; } return NO_ERROR ; } public String toString ( ) { } }

Fix:
final String value = component . getRequestString ( ) ;
Buggy code:
public class SleepTest extends AbstractJavaSamplerClient implements Serializable { public static final long DEFAULT_SLEEP_TIME = 1000 ; public static final long DEFAULT_SLEEP_MASK = 1023 ; private long sleepTime ; private long sleepMask ; public SleepTest ( ) { } public void setupTest ( JavaSamplerContext context ) { } public SampleResult runTest ( JavaSamplerContext context ) { } public void teardownTest ( JavaSamplerContext context ) { } public Arguments getDefaultParameters ( ) { Arguments params = new Arguments ( ) ; params . addArgument ( "SleepTime" , String . valueOf ( SleepTest . DEFAULT_SLEEP_TIME ) ) ; <START_BUG> params . addArgument ( "SleepMask" , ( "0x" + ( Long . toHexString ( SleepTest . DEFAULT_SLEEP_MASK ) . toUpperCase ( ) ) ) ) ; <END_BUG> return params ; } private void listParameters ( JavaSamplerContext context ) { } private String whoAmI ( ) { } private long getSleepTime ( ) { } private long getSleepMask ( ) { } }

Fix:
params . addArgument ( "SleepMask" , ( "0x" + ( Long . toHexString ( SleepTest . DEFAULT_SLEEP_MASK ) . toUpperCase ( Locale . ENGLISH ) ) ) ) ;
Buggy code:
public class TestDutchStemmer extends BaseTokenStreamTestCase { public void testWithSnowballExamples ( ) throws Exception { } @ Deprecated public void testOldBuggyStemmer ( ) throws Exception { } public void testSnowballCorrectness ( ) throws Exception { } public void testReusableTokenStream ( ) throws Exception { } public void testExclusionTableViaCtor ( ) throws IOException { } public void testStemOverrides ( ) throws IOException { } @ Deprecated public void testBuggyStemOverrides ( ) throws IOException { } @ Deprecated public void testBuggyStopwordsCasing ( ) throws IOException { } public void testStopwordsCasing ( ) throws IOException { } private void check ( final String input , final String expected ) throws Exception { } public void testRandomStrings ( ) throws Exception { <START_BUG> checkRandomData ( random ( ) , new DutchAnalyzer ( TEST_VERSION_CURRENT ) , ( 10000 * ( RANDOM_MULTIPLIER ) ) ) ; <END_BUG> } }

Fix:
checkRandomData ( random ( ) , new DutchAnalyzer ( TEST_VERSION_CURRENT ) , ( 1000 * ( RANDOM_MULTIPLIER ) ) ) ;
Buggy code:
public class ComplexFormat extends CompositeFormat { private static final long serialVersionUID = - 3343698360149467646L ; private static final String DEFAULT_IMAGINARY_CHARACTER = "i" ; private String imaginaryCharacter ; private NumberFormat imaginaryFormat ; private NumberFormat realFormat ; public ComplexFormat ( ) { } public ComplexFormat ( NumberFormat format ) { } public ComplexFormat ( NumberFormat realFormat , NumberFormat imaginaryFormat ) { } public ComplexFormat ( String imaginaryCharacter ) { } public ComplexFormat ( String imaginaryCharacter , NumberFormat format ) { } public ComplexFormat ( String imaginaryCharacter , NumberFormat realFormat , NumberFormat imaginaryFormat ) { } public static Locale [ ] getAvailableLocales ( ) { } public static String formatComplex ( Complex c ) { } public StringBuffer format ( Complex complex , StringBuffer toAppendTo , FieldPosition pos ) { } @ Override public StringBuffer format ( Object obj , StringBuffer toAppendTo , FieldPosition pos ) { } public String getImaginaryCharacter ( ) { } public NumberFormat getImaginaryFormat ( ) { } public static ComplexFormat getInstance ( ) { } public static ComplexFormat getInstance ( Locale locale ) { } public NumberFormat getRealFormat ( ) { } public Complex parse ( String source ) throws ParseException { ParsePosition parsePosition = new ParsePosition ( 0 ) ; Complex result = parse ( source , parsePosition ) ; if ( ( parsePosition . getIndex ( ) ) == 0 ) { <START_BUG> throw MathRuntimeException . createParseException ( parsePosition . getErrorIndex ( ) , "unparseable<seq2seq4repair_space>complex<seq2seq4repair_space>number:<seq2seq4repair_space>\"{0}\"" , source ) ; <END_BUG> } return result ; } public Complex parse ( String source , ParsePosition pos ) { } @ Override public Object parseObject ( String source , ParsePosition pos ) { } public void setImaginaryCharacter ( String imaginaryCharacter ) { } public void setImaginaryFormat ( NumberFormat imaginaryFormat ) { } public void setRealFormat ( NumberFormat realFormat ) { } }

Fix:
throw MathRuntimeException . createParseException ( parsePosition . getErrorIndex ( ) , UNPARSEABLE_COMPLEX_NUMBER , source ) ;
Buggy code:
public class CookiePanel extends AbstractConfigGui implements ActionListener { private static final long serialVersionUID = 240L ; 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 [ ] COLUMN_RESOURCE_NAMES = new String [ ] { "name" , "value" , "domain" , "path" , "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 = CookieManager . getCookieSpecs ( ) ; private JLabeledChoice policy ; public CookiePanel ( ) { } public String getLabelResource ( ) { } public void actionPerformed ( ActionEvent e ) { } private void addCookieToTable ( Cookie cookie ) { } public void modifyTestElement ( TestElement cm ) { } @ Override public void clearGui ( ) { super . clearGui ( ) ; tableModel . clearData ( ) ; clearEachIteration . setSelected ( false ) ; <START_BUG> policy . setSelectedIndex ( ( ( policies . length ) - 1 ) ) ; <END_BUG> deleteButton . setEnabled ( false ) ; saveButton . setEnabled ( false ) ; } private Cookie createCookie ( Object [ ] rowData ) { } private void populateTable ( CookieManager manager ) { } public TestElement createTestElement ( ) { } @ Override public void configure ( TestElement el ) { } private void init ( ) { } public JPanel createCookieTablePanel ( ) { } private JButton createButton ( String resName , char mnemonic , String command , boolean enabled ) { } private JPanel createButtonPanel ( ) { } }

Fix:
policy . setText ( DEFAULT_POLICY ) ;
Buggy code:
@ RunWith ( Arquillian . class ) @ RunAsClient @ ServerSetup ( AfterResourceCreationDeploymentTestCase . AfterResourceCreationDeploymentTestCaseSetup . class ) public class AfterResourceCreationDeploymentTestCase extends ContainerResourceMgmtTestBase { static String deploymentName = "basic-after.rar" ; @ ContainerResource private Context context ; static class AfterResourceCreationDeploymentTestCaseSetup extends AbstractMgmtServerSetupTask { @ Override public void tearDown ( final ManagementClient managementClient , final String containerId ) throws Exception { } @ Override protected void doSetup ( final ManagementClient managementClient ) throws Exception { } } private void setup ( ) throws Exception { String xml = FileUtils . readFile ( AfterResourceCreationDeploymentTestCase . class , "basic-after.xml" ) ; <START_BUG> List < ModelNode > operations = xmlToModelOperations ( xml , CURRENT . getUriString ( ) , new ResourceAdapterSubsystemParser ( ) ) ; <END_BUG> executeOperation ( operationListToCompositeOperation ( operations ) ) ; final ModelNode address = new ModelNode ( ) ; address . add ( "subsystem" , "resource-adapters" ) ; address . add ( "resource-adapter" , AfterResourceCreationDeploymentTestCase . deploymentName ) ; address . protect ( ) ; final ModelNode operation = new ModelNode ( ) ; operation . get ( OP ) . set ( "activate" ) ; operation . get ( OP_ADDR ) . set ( address ) ; executeOperation ( operation ) ; } @ Deployment ( name = "basic-after.rar" ) public static ResourceAdapterArchive createDeployment ( ) throws Exception { } @ Test public void testConfiguration ( ) throws Throwable { } }

Fix:
List < ModelNode > operations = xmlToModelOperations ( xml , RESOURCEADAPTERS_1_0 . getUriString ( ) , new ResourceAdapterSubsystemParser ( ) ) ;
Buggy code:
public class Group extends Composite { int clientHandle ; int labelHandle ; String text = "" ; public Group ( Composite parent , int style ) { } static int checkStyle ( int style ) { } protected void checkSubclass ( ) { } int clientHandle ( ) { } public Point computeSize ( int wHint , int hHint , boolean changed ) { } public Rectangle computeTrim ( int x , int y , int width , int height ) { } void createHandle ( int index ) { } void deregister ( ) { } void enableWidget ( boolean enabled ) { } int eventHandle ( ) { } String getNameText ( ) { } public String getText ( ) { } void hookEvents ( ) { super . hookEvents ( ) ; if ( ( labelHandle ) != 0 ) { <START_BUG> OS . g_signal_connect ( labelHandle , mnemonic_activate , windowProc3 , MNEMONIC_ACTIVATE ) ; <END_BUG> } } boolean mnemonicHit ( char key ) { } boolean mnemonicMatch ( char key ) { } int parentingHandle ( ) { } void register ( ) { } void releaseHandle ( ) { } void releaseWidget ( ) { } void setBackgroundColor ( GdkColor color ) { } void setFontDescription ( int font ) { } void setForegroundColor ( GdkColor color ) { } void setOrientation ( ) { } public void setText ( String string ) { } void showWidget ( ) { } }

Fix:
OS . g_signal_connect_closure_by_id ( labelHandle , display . signalIds [ MNEMONIC_ACTIVATE ] , 0 , display . closures [ MNEMONIC_ACTIVATE ] , false ) ;
Buggy code:
public class MobiComPushReceiver { public static final String MTCOM_PREFIX = "MT_" ; public static final List < String > notificationKeyList = new ArrayList < String > ( ) ; private static final String TAG = "MobiComPushReceiver" ; public static boolean isMobiComPushNotification ( Context context , Intent intent ) { String payLoad = intent . getStringExtra ( "collapse_key" ) ; Log . i ( MobiComPushReceiver . TAG , ( "Received<seq2seq4repair_space>notification:<seq2seq4repair_space>" + payLoad ) ) ; <START_BUG> if ( ( payLoad . contains ( MobiComPushReceiver . MTCOM_PREFIX ) ) || ( MobiComPushReceiver . notificationKeyList . contains ( payLoad ) ) ) { <END_BUG> return true ; } else { for ( String key : MobiComPushReceiver . notificationKeyList ) { payLoad = intent . getStringExtra ( key ) ; if ( payLoad != null ) { return true ; } } return false ; } } public static void processMessage ( Context context , Intent intent ) { } private static void processDeleteSingleMessageRequest ( Context context , String deletedSmsKeyString , String contactNumber ) { } public static void processMessageAsync ( final Context context , final Intent intent ) { } }

Fix:
if ( ( ( payLoad != null ) && ( payLoad . contains ( MobiComPushReceiver . MTCOM_PREFIX ) ) ) || ( MobiComPushReceiver . notificationKeyList . contains ( payLoad ) ) ) {
Buggy code:
public class PropertyAccessTests extends ExpressionTestCase { @ Test public void testSimpleAccess01 ( ) { } @ Test public void testSimpleAccess02 ( ) { } @ Test public void testSimpleAccess03 ( ) { } @ Test public void testNonExistentPropertiesAndMethods ( ) { } @ Test public void testAccessingOnNullObject ( ) throws Exception { } private void checkException ( Exception e , SpelMessage expectedMessage ) { } @ Test public void testAddingSpecificPropertyAccessor ( ) throws Exception { } @ Test public void testAddingRemovingAccessors ( ) { } private static class StringyPropertyAccessor implements PropertyAccessor { int flibbles = 7 ; public Class < ? > [ ] getSpecificTargetClasses ( ) { } public boolean canRead ( EvaluationContext context , Object target , String name ) throws AccessException { } public boolean canWrite ( EvaluationContext context , Object target , String name ) throws AccessException { } public TypedValue read ( EvaluationContext context , Object target , String name ) throws AccessException { if ( ! ( name . equals ( "flibbles" ) ) ) throw new RuntimeException ( "Assertion<seq2seq4repair_space>Failed!<seq2seq4repair_space>name<seq2seq4repair_space>should<seq2seq4repair_space>be<seq2seq4repair_space>flibbles" ) ; <START_BUG> return new TypedValue ( flibbles , TypeDescriptor . valueOf ( String . class ) ) ; <END_BUG> } public void write ( EvaluationContext context , Object target , String name , Object newValue ) throws AccessException { } } }

Fix:
return new TypedValue ( flibbles ) ;
Buggy code:
public class WicketTester extends BaseWicketTester { public static class DummyWebApplication extends WebApplication { public Class getHomePage ( ) { } protected ISessionStore newSessionStore ( ) { } protected WebResponse newWebResponse ( final HttpServletResponse servletResponse ) { } protected void outputDevelopmentModeWarning ( ) { } } public static class NonPageCachingDummyWebApplication extends WicketTester . DummyWebApplication { protected ISessionStore newSessionStore ( ) { } } private static final Logger log = LoggerFactory . getLogger ( WicketTester . class ) ; public WicketTester ( ) { } public WicketTester ( final Class homePage ) { } public WicketTester ( final WebApplication application ) { } public WicketTester ( final WebApplication application , final String path ) { } public void assertAjaxLocation ( ) { } public void assertComponent ( String path , Class expectedComponentClass ) { } public void assertComponentOnAjaxResponse ( Component component ) { } public void assertComponentOnAjaxResponse ( String componentPath ) { } public void assertContains ( String pattern ) { } public void assertErrorMessages ( String [ ] expectedErrorMessages ) { } public void assertInfoMessages ( String [ ] expectedInfoMessages ) { } public void assertInvisible ( String path ) { } public void assertLabel ( String path , String expectedLabelText ) { } public void assertModelValue ( String path , Object expectedValue ) { } public void assertListView ( String path , List expectedList ) { } public void assertNoErrorMessage ( ) { } public void assertNoInfoMessage ( ) { } public void assertPageLink ( String path , Class expectedPageClass ) { } public void assertRenderedPage ( Class expectedRenderedPageClass ) { } public void assertResultPage ( final Class clazz , final String filename ) throws Exception { } public void assertResultPage ( final String expectedDocument ) throws Exception { String document = getServletResponse ( ) . getDocument ( ) ; <START_BUG> Assert . assertTrue ( document . equals ( expectedDocument ) ) ; <END_BUG> } public void assertVisible ( String path ) { } private void assertResult ( Result result ) { } }

Fix:
Assert . assertEquals ( expectedDocument , document ) ;
Buggy code:
public class EditView extends JDialog implements MessageHandler { ToDoItem item ; Messenger messenger ; public EditView ( Frame parent , ToDoItem _item , Messenger _messenger ) { } @ Override public void messageHandler ( String messageName , Object messagePayload ) { } public void init ( ) { } private void setFieldValues ( ) { descriptionText . setText ( item . getDescription ( ) ) ; completedCheckBox . setSelected ( item . isDone ( ) ) ; <START_BUG> jXDatePicker1 . setDate ( null ) ; <END_BUG> } private void getValues ( ) { } private void itemAction ( String action ) { } @ SuppressWarnings ( "unchecked" ) private void initComponents ( ) { } private void cancelBtnActionPerformed ( ActionEvent evt ) { } private void okBtnActionPerformed ( ActionEvent evt ) { } private void deleteBtnActionPerformed ( ActionEvent evt ) { } private JButton cancelBtn ; private JCheckBox completedCheckBox ; private JButton deleteBtn ; private JTextArea descriptionText ; private JLabel jLabel1 ; private JLabel jLabel2 ; private JLabel jLabel3 ; private JLabel jLabel4 ; private JScrollPane jScrollPane1 ; private JXDatePicker jXDatePicker1 ; private JButton okBtn ; private BindingGroup bindingGroup ; }

Fix:
jXDatePicker1 . setDate ( item . getDate ( ) ) ;
Buggy code:
public class VersionedListNodeData implements Releasable { public final VersionedListNode thisNode ; public final int level ; public final int totalSize ; public final long created ; public final long deleted ; public final VersionedListNode leftNode ; public final Object value ; public final VersionedListNode rightNode ; protected final ImmutableFactory valueFactory ; public VersionedListNodeData ( VersionedListNode thisNode ) { } public VersionedListNodeData ( VersionedListNode thisNode , int level , int totalSize , long created , long deleted , VersionedListNode leftNode , Object value , VersionedListNode rightNode ) { } public VersionedListNodeData ( VersionedListNode thisNode , ByteBuffer byteBuffer ) { } public boolean isNil ( ) { } public int getDurableLength ( ) { } public void serialize ( ByteBuffer byteBuffer ) { } public boolean exists ( long time ) { } public int size ( long time ) { } public VersionedListNode getListNode ( int ndx ) { } public Object getExistingValue ( long time ) { } public int getIndex ( Object value , long time ) { } public int getIndexRight ( Object value , long time ) { } public int findIndex ( Object value , long time ) { } public int findIndexRight ( Object value , long time ) { } public int higherIndex ( int ndx , long time ) { } public int ceilingIndex ( int ndx , long time ) { } public int lowerIndex ( int ndx , long time ) { } public int floorIndex ( int ndx , long time ) { } public boolean isEmpty ( long time ) { } public void flatList ( List list , long time ) { } public VersionedListNode skew ( ) { if ( ( isNil ( ) ) || ( leftNode . isNil ( ) ) ) return thisNode ; VersionedListNodeData leftData = leftNode . getData ( ) ; if ( ( leftData . level ) == ( level ) ) { <START_BUG> VersionedListNode t = new VersionedListNode ( thisNode . factory , level , ( ( ( totalSize ) - ( leftData . totalSize ) ) + ( leftData . leftNode . totalSize ( ) ) ) , created , deleted , leftData . rightNode , value , rightNode ) ; <END_BUG> return new VersionedListNode ( thisNode . factory , leftData . level , totalSize , leftData . created , leftData . deleted , leftData . leftNode , leftData . value , t ) ; } else return thisNode ; } public VersionedListNode split ( ) { } public VersionedListNode add ( int ndx , Object value , long created , long deleted ) { } public VersionedListNode remove ( int ndx , long time ) { } public VersionedListNode copyList ( VersionedListNode n , long time ) { } public VersionedListNode clearList ( long time ) { } @ Override public void releaseAll ( ) throws IOException { } }

Fix:
VersionedListNode t = new VersionedListNode ( thisNode . factory , level , ( ( ( totalSize ) - ( leftData . totalSize ) ) + ( leftData . rightNode . totalSize ( ) ) ) , created , deleted , leftData . rightNode , value , rightNode ) ;
Buggy code:
public class NewNeighboursSaver extends AbstractSaver < NetworkModel , CSVContainer , ConfigurationDataImpl > { private Long lineCounter = 0L ; private INetworkModel networkModel ; private INodeToNodeRelationsModel n2nModel ; private IDataElement rootDataElement ; private Map < String , Integer > columnSynonyms ; private final int MAX_TX_BEFORE_COMMIT = 1000 ; public static final String NEIGHBOUR_SECTOR_CI = "neigh_sector_ci" ; public static final String NEIGHBOUR_SECTOR_LAC = "neigh_sector_lac" ; public static final String NEIGHBOUR_SECTOR_NAME = "neigh_sector_name" ; public static final String SERVING_SECTOR_CI = "serv_sector_ci" ; public static final String SERVING_SECTOR_LAC = "serv_sector_lac" ; public static final String SERVING_SECTOR_NAME = "serv_sector_name" ; private Map < String , String > fileSynonyms = new HashMap < String , String > ( ) ; private List < String > headers ; private static Logger LOGGER = Logger . getLogger ( NewNetworkSaver . class ) ; private Map < String , String [ ] > preferenceStoreSynonyms ; @ Override public void init ( ConfigurationDataImpl configuration , CSVContainer dataElement ) { } @ Override public void saveElement ( CSVContainer dataElement ) { } private void createNeighbour ( List < String > row ) { } private void makeIndexAppropriation ( ) { } private int getHeaderId ( String header ) { } private void makeAppropriationWithSynonyms ( List < String > keySet ) { boolean isAppropriation = false ; for ( String header : keySet ) { for ( String posibleHeader : preferenceStoreSynonyms . keySet ( ) ) { for ( String mask : preferenceStoreSynonyms . get ( posibleHeader ) ) { if ( header . toLowerCase ( ) . matches ( mask . toLowerCase ( ) ) ) { isAppropriation = true ; <START_BUG> String name = posibleHeader . substring ( 0 , posibleHeader . indexOf ( '.' ) ) ; <END_BUG> fileSynonyms . put ( name , header ) ; break ; } } if ( isAppropriation ) { isAppropriation = false ; break ; } } } } }

Fix:
String name = posibleHeader . substring ( 0 , posibleHeader . indexOf ( INFO_SEPARATOR ) ) ;
Buggy code:
class Expression { public String original ; public String value ; public static final Character SEP = 31 ; private static final Map < String , Integer > precedence = Expression . mapPrecedence ( ) ; public Expression ( String value ) throws LotusException { } public String toString ( ) { } private void fixSpaces ( ) throws LotusException { } public String spacenize ( String token ) { } private String fixRepSign ( String value ) { } private void fixSignals ( ) { } private boolean isSignal ( String [ ] tokens , int i ) { } public String toPostfix ( ) throws LotusException { int i ; int pt ; int ps ; String rpn = new String ( "" ) ; Matcher wholeOpM ; Matcher parenM ; String [ ] tokens = this . value . split ( Expression . SEP . toString ( ) ) ; Stack < String > op = new Stack < String > ( ) ; for ( String t : tokens ) { wholeOpM = wholeOpP . matcher ( t ) ; if ( t . equals ( "(" ) ) { op . push ( t ) ; } else if ( t . equals ( ")" ) ) { while ( ! ( op . peek ( ) . equals ( "(" ) ) ) { rpn += ( op . pop ( ) ) + ( Expression . SEP ) ; } op . pop ( ) ; } else if ( wholeOpM . matches ( ) ) { while ( ! ( op . isEmpty ( ) ) ) { pt = Expression . precedence . get ( t ) ; ps = Expression . precedence . get ( op . peek ( ) ) ; if ( ( ( ! ( t . equals ( "^" ) ) ) && ( pt <= ps ) ) || ( ( t . equals ( "^" ) ) && ( pt < ps ) ) ) { rpn += ( op . pop ( ) ) + ( Expression . SEP ) ; } else break ; } op . push ( t ) ; } else { rpn += t + ( Expression . SEP ) ; } } while ( ! ( op . isEmpty ( ) ) ) { parenM = parenP . matcher ( op . peek ( ) ) ; if ( parenM . matches ( ) ) { <START_BUG> throw new LotusException ( "missingParen" , this . value ) ; <END_BUG> } rpn += ( op . pop ( ) ) + ( Expression . SEP ) ; } return rpn ; } private static Map < String , Integer > mapPrecedence ( ) { } }

Fix:
throw new LotusException ( "missingParen" , this . original ) ;
Buggy code:
public class TestFinnishAnalyzer extends BaseTokenStreamTestCase { public void testResourcesAvailable ( ) { } public void testBasics ( ) throws IOException { } public void testExclude ( ) throws IOException { } public void testRandomStrings ( ) throws Exception { <START_BUG> checkRandomData ( random ( ) , new FinnishAnalyzer ( TEST_VERSION_CURRENT ) , ( 10000 * ( RANDOM_MULTIPLIER ) ) ) ; <END_BUG> } }

Fix:
checkRandomData ( random ( ) , new FinnishAnalyzer ( TEST_VERSION_CURRENT ) , ( 1000 * ( RANDOM_MULTIPLIER ) ) ) ;
Buggy code:
@ Service public class CustomerService extends ProjGService < Customer > { @ Autowired private CustomerRepository customerRepository ; public Customer findByCode ( String code ) { } public Map < String , String > getCustomerList ( ) { Map < String , String > customerMap = new HashMap < > ( ) ; Iterable < Customer > customerIter = findAll ( ) ; for ( Customer cust : customerIter ) { <START_BUG> customerMap . put ( cust . getName ( ) , cust . getName ( ) ) ; <END_BUG> } return customerMap ; } public Map < String , String > getTypeList ( ) { } @ Override protected ProjGRepository < Customer > getRepository ( ) { } }

Fix:
customerMap . put ( cust . getCode ( ) , cust . getName ( ) ) ;
Buggy code:
public class DispatchActivity extends Activity { @ Override protected void onCreate ( Bundle savedInstanceState ) { super . onCreate ( savedInstanceState ) ; if ( ( ParseUser . getCurrentUser ( ) ) != null ) { ParseUser . getCurrentUser ( ) . fetchInBackground ( new com . parse . GetCallback < ParseObject > ( ) { public void done ( ParseObject object , ParseException e ) { ParseInstallation installation = null ; ParseUser currUser = ( ( ParseUser ) ( object ) ) ; if ( currUser != null ) { try { installation = ParseInstallation . getCurrentInstallation ( ) . fetch ( ) ; <START_BUG> currUser . put ( "installationId" , installation ) ; <END_BUG> currUser . save ( ) ; } catch ( ParseException k ) { } Log . d ( "F8Debug" , ( "onCreate,<seq2seq4repair_space>got<seq2seq4repair_space>user,<seq2seq4repair_space>" + ( ParseUser . getCurrentUser ( ) . getUsername ( ) ) ) ) ; startActivity ( new android . content . Intent ( getApplicationContext ( ) , MainActivity . class ) ) ; } else { Log . d ( "F8Debug" , "onCreate,<seq2seq4repair_space>no<seq2seq4repair_space>user" ) ; startActivity ( new android . content . Intent ( getApplicationContext ( ) , SignInActivity . class ) ) ; } } } ) ; } else { startActivity ( new android . content . Intent ( getApplicationContext ( ) , SignInActivity . class ) ) ; } finish ( ) ; } No newline ; at end ; of file ; }

Fix:
currUser . put ( "installation_Id" , installation ) ;
Buggy code:
public class TransformStatistics { public static TransformStatistics . MatrixStatistics extractStatistics ( Matrix matrix ) { } public static TransformStatistics . MatrixStatistics extractStatistics ( Matrix matrix , boolean countRowOccurrances , boolean countColumnOccurrances ) { } public static TransformStatistics . MatrixStatistics extractStatistics ( File inputMatrixFile , Format format ) { } public static TransformStatistics . MatrixStatistics extractStatistics ( File inputMatrixFile , Format format , boolean countRowOccurrances , boolean countColumnOccurrances ) { } private static < T extends Number > double [ ] extractValues ( Map < Integer , T > map , int size ) { double [ ] values = new double [ size ] ; for ( Map . Entry < Integer , T > entry : map . entrySet ( ) ) { if ( ( entry . getKey ( ) ) > ( values . length ) ) throw new IllegalArgumentException ( ( "Array<seq2seq4repair_space>size<seq2seq4repair_space>is<seq2seq4repair_space>too<seq2seq4repair_space>small<seq2seq4repair_space>for<seq2seq4repair_space>values<seq2seq4repair_space>in<seq2seq4repair_space>the<seq2seq4repair_space>" + "given<seq2seq4repair_space>map" ) ) ; <START_BUG> values [ entry . getKey ( ) ] = ( ( double ) ( entry . getKey ( ) ) ) ; <END_BUG> } return values ; } public static class MatrixStatistics { public double [ ] rowSums ; public double [ ] columnSums ; public double matrixSum ; public MatrixStatistics ( double [ ] rowSums , double [ ] columnSums , double matrixSum ) { } } }

Fix:
values [ entry . getKey ( ) ] = entry . getValue ( ) . doubleValue ;
Buggy code:
public class DocumentManager { private static final String SERVER = "http:////localhost:8983//solr//" ; private static final String CORE_EN = "collections_en" ; private static final String CORE_HU = "collections_hu" ; private static final String CORE_RO = "collections_ro" ; private SolrClient clientEn ; private SolrClient clientHu ; private SolrClient clientRo ; public DocumentManager ( ) { } public void addDocument ( Document document , String language ) throws IOException , SolrServerException { } public void addDocuments ( List < Document > documents , List < String > languages ) throws IOException , ArrayIndexOutOfBoundsException , SolrServerException { } public List < Document > processQuery ( String query ) throws IOException , SolrServerException { SolrQuery q = new SolrQuery ( ) ; q . setQuery ( query ) ; q . setParam ( "defType" , "edismax" ) ; q . setParam ( "qf" , "image_name^40<seq2seq4repair_space>caption^40<seq2seq4repair_space>html_context^20" ) ; <START_BUG> q . setParam ( "shards" , "shard_en_hu_ro" ) ; <END_BUG> q . setRows ( 100 ) ; QueryResponse res = clientEn . query ( q ) ; SolrDocumentList list = res . getResults ( ) ; LinkedHashSet < Document > result = new LinkedHashSet < Document > ( ) ; for ( SolrDocument doc : list ) { Document document = new Document ( ( ( String ) ( doc . getFieldValue ( "url" ) ) ) , ( ( String ) ( doc . getFieldValue ( "caption" ) ) ) , ( ( String ) ( doc . getFieldValue ( "html_context" ) ) ) ) ; document . setUid ( UUID . fromString ( ( ( String ) ( doc . getFieldValue ( "uid" ) ) ) ) ) ; result . add ( document ) ; } return new ArrayList < Document > ( result ) ; } }

Fix:
q . setParam ( "shards" , ( ( ( ( ( ( ( ( DocumentManager . SERVER ) + ( DocumentManager . CORE_EN ) ) + "," ) + ( DocumentManager . SERVER ) ) + ( DocumentManager . CORE_HU ) ) + "," ) + ( DocumentManager . SERVER ) ) + ( DocumentManager . CORE_RO ) ) ) ;
Buggy code:
@ RunWith ( Arquillian . class ) public class InterceptorOrderTest { @ Deployment public static Archive < ? > deploy ( ) { } @ Test public void testOrder ( Processor processor ) { } @ Test public void testOrder2 ( Processor processor ) { Counter . count = 0 ; SimpleProcessor . count = 0 ; CdiInterceptor . count = 0 ; CdiInterceptor2 . count = 0 ; EjbInterceptor . count = 0 ; EjbInterceptor2 . count = 0 ; <START_BUG> int sum = processor . substract ( 34 , 13 ) ; <END_BUG> Assert . assertEquals ( 21 , sum ) ; Assert . assertEquals ( 0 , count ) ; Assert . assertEquals ( 1 , CdiInterceptor2 . count ) ; Assert . assertEquals ( 2 , CdiInterceptor . count ) ; Assert . assertEquals ( 3 , SimpleProcessor . count ) ; } }

Fix:
int sum = processor . subtract ( 34 , 13 ) ;
Buggy code:
public final class StringAutoCompleteRenderer extends AbstractAutoCompleteTextRenderer < Object > { private static final long serialVersionUID = 1L ; @ SuppressWarnings ( "unchecked" ) public static final IAutoCompleteRenderer INSTANCE = new StringAutoCompleteRenderer ( ) ; @ SuppressWarnings ( "unchecked" ) public static final < T > IAutoCompleteRenderer < T > instance ( ) { } @ Override <START_BUG> protected String getTextValue ( Object object ) { <END_BUG> return object . toString ( ) ; } }

Fix:
protected String getTextValue ( final Object object ) {
Buggy code:
public class Main { public static Parameters parameters ; private static void parseArguments ( String [ ] args ) { } public static void main ( String [ ] args ) { try { Main . parseArguments ( args ) ; <START_BUG> File inputFile = new File ( Main . parameters . inputFile ) ; <END_BUG> ReplaySpecification spec = RSParser . parse ( inputFile ) ; Aspect aspect = AspectJGenerator . generate ( spec ) ; File outputFile = new File ( ( ( ( ( inputFile . getParent ( ) ) + ( File . separator ) ) + ( aspect . name ) ) + ".aj" ) ) ; PrintWriter writer = new PrintWriter ( outputFile ) ; writer . println ( aspect . toString ( ) ) ; writer . close ( ) ; } catch ( Exception e ) { e . printStackTrace ( ) ; System . exit ( 1 ) ; } } }

Fix:
File inputFile = new File ( Main . parameters . inputFile . get ( 0 ) ) ;
Buggy code:
public class UnresolvedReferenceBinding extends ReferenceBinding { ReferenceBinding resolvedType ; TypeBinding [ ] wrappers ; UnresolvedReferenceBinding ( char [ ] [ ] compoundName , PackageBinding packageBinding ) { } void addWrapper ( TypeBinding wrapper ) { } public String debugName ( ) { } ReferenceBinding resolve ( LookupEnvironment environment , boolean convertGenericToRawType ) { ReferenceBinding targetType = this . resolvedType ; if ( targetType == null ) { targetType = this . fPackage . getType0 ( this . compoundName [ ( ( this . compoundName . length ) - 1 ) ] ) ; if ( targetType == ( this ) ) targetType = environment . askForType ( this . compoundName ) ; if ( ( targetType != null ) && ( targetType != ( this ) ) ) { setResolvedType ( targetType , environment ) ; } else { environment . problemReporter . isClassPathCorrect ( this . compoundName , null ) ; return null ; } } if ( convertGenericToRawType ) { <START_BUG> targetType = ( ( ReferenceBinding ) ( environment . convertToRawType ( targetType ) ) ) ; <END_BUG> } return targetType ; } void setResolvedType ( ReferenceBinding targetType , LookupEnvironment environment ) { } public String toString ( ) { } }

Fix:
targetType = ( ( ReferenceBinding ) ( environment . convertUnresolvedBinaryToRawType ( targetType ) ) ) ;
Buggy code:
public class ForwardInlineAction extends FrameAction implements SelectionListener { public ForwardInlineAction ( AbstractFrameController frameController ) { } public void actionPerformed ( ActionEvent evt ) { <START_BUG> FolderCommandReference [ ] r = ( ( org . columba . mail . gui . frame . AbstractMailFrameController ) ( getFrameController ( ) ) ) . getTableSelection ( ) ; <END_BUG> processor . addOp ( new org . columba . mail . gui . composer . command . ForwardInlineCommand ( r ) ) ; } public void selectionChanged ( SelectionChangedEvent e ) { } }

Fix:
FolderCommandReference [ ] r = ( ( org . columba . mail . gui . frame . AbstractMailFrameController ) ( getFrameMediator ( ) ) ) . getTableSelection ( ) ;
Buggy code:
public class PhoneControlShit { public String currentGesture = "NONE" ; Context mContext ; Activity mActivity ; MusicControlShit musicControl ; String number ; public PhoneControlShit ( Context context , Activity activity ) { } public boolean killCall ( Context context ) { } public boolean answerCall ( Context context ) { } public String getContactDisplayNameByNumber ( String number ) { } public String spacePhoneNumber ( String number ) { } class TeleListener extends PhoneStateListener { public void onCallStateChanged ( int state , String incomingNumber ) { super . onCallStateChanged ( state , incomingNumber ) ; switch ( state ) { case TelephonyManager . CALL_STATE_IDLE : Toast . makeText ( mContext , "CALL_STATE_IDLE" , LENGTH_LONG ) . show ( ) ; break ; case TelephonyManager . CALL_STATE_OFFHOOK : Toast . makeText ( mContext , "CALL_STATE_OFFHOOK" , LENGTH_LONG ) . show ( ) ; break ; case TelephonyManager . CALL_STATE_RINGING : Toast . makeText ( mContext , incomingNumber , LENGTH_LONG ) . show ( ) ; musicControl . pauseTrack ( ) ; number = getContactDisplayNameByNumber ( incomingNumber ) ; if ( ( number ) == null ) { number = spacePhoneNumber ( incomingNumber ) ; } <START_BUG> textToSpeech . speak ( number , QUEUE_FLUSH , null ) ; <END_BUG> GlobalVariables . incomingCall = true ; break ; default : break ; } } } }

Fix:
textToSpeech . speak ( ( ( number ) + "<seq2seq4repair_space>is<seq2seq4repair_space>calling" ) , QUEUE_FLUSH , null ) ;
Buggy code:
public class ConfigFrame extends JDialog implements ActionListener , ListSelectionListener { private JFrame frame ; public FilterListTable listView ; private Config config ; private boolean newAccount = false ; private int index = - 1 ; private FilterList filterList ; private Filter filter ; JPanel centerPanel = new JPanel ( ) ; JPanel eastPanel = new JPanel ( ) ; JPanel jPanel1 = new JPanel ( ) ; JTextField nameTextField = new JTextField ( ) ; JLabel nameLabel = new JLabel ( ) ; CloseButton closeButton = new CloseButton ( ) ; HelpButton helpButton = new HelpButton ( ) ; JButton addButton = new JButton ( ) ; JButton removeButton = new JButton ( ) ; JButton editButton = new JButton ( ) ; JButton enableButton = new JButton ( ) ; JButton disableButton = new JButton ( ) ; JButton moveupButton = new JButton ( ) ; JButton movedownButton = new JButton ( ) ; BorderLayout borderLayout3 = new BorderLayout ( ) ; GridLayout gridLayout1 = new GridLayout ( ) ; Folder folder ; public ConfigFrame ( Folder folder ) { } public Filter getSelected ( ) { } public void setSelected ( Filter f ) { } public void initComponents ( ) { } public void valueChanged ( ListSelectionEvent e ) { } public void showFilterDialog ( ) { Filter parent = getSelected ( ) ; if ( parent != null ) { <START_BUG> FilterDialog dialog = new FilterDialog ( folder . getFilterPluginHandler ( ) , parent ) ; <END_BUG> } } public void actionPerformed ( ActionEvent e ) { } public class WizardTopBorder extends AbstractBorder { protected Insets borderInsets = new Insets ( 2 , 0 , 0 , 0 ) ; public void paintBorder ( Component c , Graphics g , int x , int y , int w , int h ) { } public Insets getBorderInsets ( Component c ) { } } }

Fix:
FilterDialog dialog = new FilterDialog ( parent ) ;
Buggy code:
public class TestMaxTermFrequency extends LuceneTestCase { Directory dir ; IndexReader reader ; ArrayList < Integer > expected = new ArrayList < > ( ) ; @ Override public void setUp ( ) throws Exception { super . setUp ( ) ; dir = newDirectory ( ) ; IndexWriterConfig config = newIndexWriterConfig ( TEST_VERSION_CURRENT , new org . apache . lucene . analysis . MockAnalyzer ( random ( ) , MockTokenizer . SIMPLE , true ) ) . setMergePolicy ( newLogMergePolicy ( ) ) ; config . setSimilarity ( new TestMaxTermFrequency . TestSimilarity ( ) ) ; RandomIndexWriter writer = new RandomIndexWriter ( random ( ) , dir , config ) ; Document doc = new Document ( ) ; Field foo = newTextField ( "foo" , "" , NO ) ; doc . add ( foo ) ; for ( int i = 0 ; i < 100 ; i ++ ) { foo . setStringValue ( addValue ( ) ) ; writer . addDocument ( doc ) ; } reader = writer . getReader ( ) ; <START_BUG> writer . close ( ) ; <END_BUG> } @ Override public void tearDown ( ) throws Exception { } public void test ( ) throws Exception { } private String addValue ( ) { } class TestSimilarity extends TFIDFSimilarity { @ Override public float lengthNorm ( FieldInvertState state ) { } @ Override public long encodeNormValue ( float f ) { } @ Override public float decodeNormValue ( long norm ) { } @ Override public float coord ( int overlap , int maxOverlap ) { } @ Override public float queryNorm ( float sumOfSquaredWeights ) { } @ Override public float tf ( float freq ) { } @ Override public float idf ( long docFreq , long numDocs ) { } @ Override public float sloppyFreq ( int distance ) { } @ Override public float scorePayload ( int doc , int start , int end , BytesRef payload ) { } } }

Fix:
writer . shutdown ( ) ;