nus-yam/ex-repair huggingface dataset:
Buggy code:
public class EventService implements IEventService { private MqttClient mqttClient ; private MqttConnectOptions mqttConnectOptions ; private Logger logger = LoggerFactory . getLogger ( "org.eclipse.orion.server.config" ) ; private static AtomicBoolean reconnectionLock = new AtomicBoolean ( false ) ; private volatile Map < String , Set < IMessageListener > > messageListeners = new HashMap < String , Set < IMessageListener > > ( ) ; private EventService . Callback callback ; private class Callback implements MqttCallback { public void connectionLost ( Throwable e ) { } public void deliveryComplete ( IMqttDeliveryToken token ) { } public void messageArrived ( String topic , MqttMessage msg ) throws Exception { } } public EventService ( ) { } public void destroy ( ) { } private void initClient ( ) { } private void connectMQTTClient ( ) throws MqttException { } public void reconnectMQTTClient ( ) { if ( ( ! ( mqttClient . isConnected ( ) ) ) && ( EventService . reconnectionLock . compareAndSet ( false , true ) ) ) { this . logger . warn ( "MQTT<seq2seq4repair_space>client<seq2seq4repair_space>was<seq2seq4repair_space>disconnected.<seq2seq4repair_space>Attempting<seq2seq4repair_space>to<seq2seq4repair_space>reconnect." ) ; try { new Thread ( new Runnable ( ) { public void run ( ) { try { connectMQTTClient ( ) ; if ( mqttClient . isConnected ( ) ) { logger . info ( "MQTT<seq2seq4repair_space>client<seq2seq4repair_space>connection<seq2seq4repair_space>reestablished!" ) ; } else { logger . warn ( "Unable<seq2seq4repair_space>to<seq2seq4repair_space>reconnect<seq2seq4repair_space>MQTT<seq2seq4repair_space>client." ) ; } } catch ( MqttException e ) { <START_BUG> logger . error ( ( ( "Could<seq2seq4repair_space>not<seq2seq4repair_space>re-connect<seq2seq4repair_space>the<seq2seq4repair_space>MQTT<seq2seq4repair_space>client.<seq2seq4repair_space>Message:<seq2seq4repair_space>" + ( e . getMessage ( ) ) ) + "<seq2seq4repair_space>Reason<seq2seq4repair_space>code:<seq2seq4repair_space>" ) , e . getReasonCode ( ) ) ; <END_BUG> } finally { EventService . reconnectionLock . set ( false ) ; } } } ) . start ( ) ; } catch ( Exception e ) { this . logger . error ( ( "Unexpected<seq2seq4repair_space>exception<seq2seq4repair_space>occurred:<seq2seq4repair_space>" + ( e . getLocalizedMessage ( ) ) ) ) ; EventService . reconnectionLock . set ( false ) ; } } } public boolean clientConnected ( ) { } public void publish ( String topic , JSONObject message ) { } public synchronized void receive ( String topic , IMessageListener messageListener ) { } public void stopReceiving ( String topic , IMessageListener messageListener ) { } }

Fix:
logger . error ( ( ( ( "Could<seq2seq4repair_space>not<seq2seq4repair_space>re-connect<seq2seq4repair_space>the<seq2seq4repair_space>MQTT<seq2seq4repair_space>client.<seq2seq4repair_space>Message:<seq2seq4repair_space>" + ( e . getMessage ( ) ) ) + "<seq2seq4repair_space>Reason<seq2seq4repair_space>code:<seq2seq4repair_space>" ) + ( e . getReasonCode ( ) ) ) ) ;
Buggy code:
public final class LoggerHandlerRemove extends AbstractLoggingSubsystemUpdate < Void > { private static final long serialVersionUID = 1370469831899844699L ; private final String loggerName ; private final String handlerName ; public LoggerHandlerRemove ( final String loggerName , final String handlerName ) { } protected < P > void applyUpdate ( final UpdateContext updateContext , final UpdateResultHandler < ? super Void , P > handler , final P param ) { try { <START_BUG> final ServiceController < ? > controller = updateContext . getServiceContainer ( ) . getRequiredService ( LogServices . loggerHandlerName ( loggerName , handlerName ) ) ; <END_BUG> controller . setMode ( REMOVE ) ; controller . addListener ( new UpdateResultHandler . ServiceRemoveListener < P > ( handler , param ) ) ; } catch ( Throwable t ) { handler . handleFailure ( t , param ) ; } } public AbstractSubsystemUpdate < LoggingSubsystemElement , ? > getCompensatingUpdate ( final LoggingSubsystemElement original ) { } protected void applyUpdate ( final LoggingSubsystemElement element ) throws UpdateFailedException { } }

Fix:
final ServiceController < ? > controller = updateContext . getServiceRegistry ( ) . getRequiredService ( LogServices . loggerHandlerName ( loggerName , handlerName ) ) ;
Buggy code:
public class WebRequestDataBinder extends WebDataBinder { public WebRequestDataBinder ( Object target ) { } public WebRequestDataBinder ( Object target , String objectName ) { } public void bind ( WebRequest request ) { MutablePropertyValues mpvs = new MutablePropertyValues ( request . getParameterMap ( ) ) ; if ( request instanceof NativeWebRequest ) { MultipartRequest multipartRequest = ( ( NativeWebRequest ) ( request ) ) . getNativeRequest ( MultipartRequest . class ) ; if ( multipartRequest != null ) { <START_BUG> bindMultipartFiles ( multipartRequest . getFileMap ( ) , mpvs ) ; <END_BUG> } } doBind ( mpvs ) ; } public void closeNoCatch ( ) throws BindException { } }

Fix:
bindMultipart ( multipartRequest . getMultiFileMap ( ) , mpvs ) ;
Buggy code:
public class MixedDomainTestSuite { private static MixedDomainTestSupport support ; private static AsVersion version ; static AsVersion getVersion ( Class < ? > testClass ) { } static MixedDomainTestSupport getSupport ( Class < ? > testClass ) { Version . AsVersion version = MixedDomainTestSuite . getVersion ( testClass ) ; if ( ( MixedDomainTestSuite . support ) == null ) { try { <START_BUG> final MixedDomainTestSupport testSupport = MixedDomainTestSupport . create ( testClass . getSimpleName ( ) , version . getVersion ( ) ) ; <END_BUG> testSupport . start ( ) ; MixedDomainTestSuite . support = testSupport ; } catch ( Exception e ) { e . printStackTrace ( ) ; throw new RuntimeException ( e ) ; } } return MixedDomainTestSuite . support ; } protected AsVersion getVersion ( ) { } protected MixedDomainTestSupport getSupport ( ) { } private static synchronized void stop ( ) { } @ AfterClass public static synchronized void afterClass ( ) { } }

Fix:
final MixedDomainTestSupport testSupport = MixedDomainTestSupport . create ( testClass . getSimpleName ( ) , version ) ;
Buggy code:
public class SignUp extends AppCompatActivity { @ Bind ( id . app_bar ) Toolbar toolbar ; @ Bind ( id . name ) EditText name ; @ Bind ( id . email ) EditText email ; @ Bind ( id . password ) EditText password ; @ Bind ( id . name_wrapper ) TextInputLayout nameWrapper ; @ Bind ( id . create_account ) ProcessButton signUp ; String userInputName ; String userInputEmail ; String userInputPassword ; int serverSuccess ; String serverMessage ; SharedPreferences sharedPreferences ; Editor editor ; public static boolean isValidEmailAddress ( String email ) { } public static boolean isValidPassword ( String password ) { } public static boolean isValidName ( String name ) { } @ Override protected void onCreate ( Bundle savedInstanceState ) { } @ OnClick ( id . create_account ) public void createAccount ( ) { } private void jsonParser ( JSONObject response ) { try { <START_BUG> serverSuccess = response . getInt ( "success" ) ; <END_BUG> serverMessage = response . getString ( "message" ) ; finalDecision ( ) ; } catch ( JSONException e ) { e . printStackTrace ( ) ; } } private void finalDecision ( ) { } private void lockView ( View v ) { } private void releaseView ( View v ) { } }

Fix:
serverSuccess = response . getInt ( "status" ) ;
Buggy code:
public abstract class AbstractContainerSelector { public static final IRemoteServiceContainer [ ] EMPTY_REMOTE_SERVICE_CONTAINER_ARRAY = new IRemoteServiceContainer [ ] { } ; protected IIDFactory getIDFactory ( ) { } protected IContainerManager getContainerManager ( ) { } protected IContainerFactory getContainerFactory ( ) { } protected ContainerTypeDescription [ ] getContainerTypeDescriptions ( ) { } protected IContainer [ ] getContainers ( ) { } protected IRemoteServiceContainerAdapter hasRemoteServiceContainerAdapter ( IContainer container ) { } protected ContainerTypeDescription getContainerTypeDescription ( IContainer container ) { } protected IRemoteServiceContainer [ ] getRemoteServiceContainers ( IContainer [ ] containers ) { } protected boolean includeContainerWithConnectNamespace ( IContainer container , String connectNamespaceName ) { } protected void connectContainer ( IContainer container , ID connectTargetID , IConnectContext connectContext ) throws ContainerConnectException { } protected String [ ] getSupportedConfigTypes ( ContainerTypeDescription containerTypeDescription ) { } protected String [ ] getSupportedIntents ( ContainerTypeDescription containerTypeDescription ) { } protected IContainer createContainer ( ServiceReference serviceReference , ContainerTypeDescription containerTypeDescription ) throws ContainerCreateException { IContainerFactory containerFactory = getContainerFactory ( ) ; <START_BUG> Object containerFactoryArguments = serviceReference . getProperty ( EXPORTED_CONTAINER_FACTORY_ARGS ) ; <END_BUG> if ( containerFactoryArguments instanceof String ) { return containerFactory . createContainer ( containerTypeDescription , ( ( String ) ( containerFactoryArguments ) ) ) ; } else if ( containerFactoryArguments instanceof ID ) { return containerFactory . createContainer ( containerTypeDescription , ( ( ID ) ( containerFactoryArguments ) ) ) ; } else if ( containerFactoryArguments instanceof Object [ ] ) { return containerFactory . createContainer ( containerTypeDescription , ( ( Object [ ] ) ( containerFactoryArguments ) ) ) ; } return containerFactory . createContainer ( containerTypeDescription ) ; } protected ID createTargetID ( IContainer container , Object target ) { } protected void disconnectContainer ( IContainer container ) { } protected IConnectContext createConnectContext ( ServiceReference serviceReference , IContainer container , Object context ) { } protected void logException ( String string , Exception e ) { } protected void trace ( String methodName , String message ) { } protected void traceException ( String methodName , String message , Throwable t ) { } protected void logError ( String methodName , String message , Throwable t ) { } protected void logError ( String methodName , String message ) { } protected void logWarning ( String methodName , String message ) { } protected boolean matchConnectNamespace ( IContainer container , ID endpointID , ID connectTargetID ) { } protected boolean matchContainerID ( IContainer container , ID endpointID ) { } }

Fix:
Object containerFactoryArguments = serviceReference . getProperty ( SERVICE_EXPORTED_CONTAINER_FACTORY_ARGS ) ;
Buggy code:
@ Transactional public class UsersDaoHelper { @ Inject UsersDao dao ; @ Inject RolesDao roleDao ; @ Inject ICPAKAuthenticatingRealm realm ; public void add ( User user ) { } public void update ( String userId , User user ) { } public void delete ( String userId ) { } public ResourceCollectionModel < User > getAllUsers ( Integer offset , Integer limit , UriInfo uriInfo ) { } public ResourceCollectionModel < User > getAllUsers ( Integer offSet , Integer limit , UriInfo uriInfo , String roleId ) { } public ResourceModel getAllUsersByRoleId ( Integer offSet , Integer limit , UriInfo uriInfo , String roleId , String ... expand ) { } public User getUser ( String userId ) { } @ SuppressWarnings ( "deprecation" ) public User authenticate ( String username , String password ) { Sha256CredentialsMatcher matcher = new Sha256CredentialsMatcher ( ) ; User user = dao . findUser ( username ) ; <START_BUG> if ( user == null ) { <END_BUG> throw new com . icpak . rest . exceptions . ServiceException ( ErrorCodes . UNAUTHORIZEDACCESS ) ; } AuthenticationToken token = new UsernamePasswordToken ( username , password ) ; UsernamePasswordToken authcToken = new UsernamePasswordToken ( username , password ) ; boolean isMatch = false ; try { isMatch = matcher . doCredentialsMatch ( token , realm . getAuthenticationInfo ( authcToken ) ) ; } catch ( IncorrectCredentialsException e ) { throw new com . icpak . rest . exceptions . ServiceException ( ErrorCodes . UNAUTHORIZEDACCESS ) ; } if ( ! isMatch ) { throw new com . icpak . rest . exceptions . ServiceException ( ErrorCodes . UNAUTHORIZEDACCESS ) ; } return user ; } }

Fix:
if ( ( password == null ) || ( user == null ) ) {
Buggy code:
public class EditQuizActivity extends AppCompatActivity { TextView textQuestion ; View submit ; View back_button ; Button next_button ; RadioButton answer ; String username ; RadioGroup grp ; ViewGroup editGrp ; DbHelperQuiz db ; int marked ; int question_id = 0 ; String colName = "marked" ; ProgressDialog pDialog ; String loginUrl ; private ListView mDrawerList ; private ActionBarDrawerToggle mDrawerToggle ; private DrawerLayout mDrawerLayout ; String open_drawer = "Question<seq2seq4repair_space>Navigation" ; String title ; Quiz quiz ; @ Override protected void onCreate ( Bundle savedInstanceState ) { } public void submit ( ) { } public void next ( ) { } public void back ( ) { } public void goToQuestion ( int num ) { } public void tempSubmitEdit ( ) { } public void saveQuiz ( ) { } @ Override public void onBackPressed ( ) { } private void setQuestionView ( ) { } private void addDrawerItems ( ) { } private void setupDrawer ( ) { } @ Override protected void onPostCreate ( Bundle savedInstanceState ) { } @ Override public void onConfigurationChanged ( Configuration newConfig ) { } @ Override public boolean onCreateOptionsMenu ( Menu item ) { } @ Override public boolean onOptionsItemSelected ( MenuItem item ) { } public void deleteQuestion ( int id ) { } public void addNewQuestion ( ) { Question q = new Question ( ) ; q . setId ( quiz . getNumQuestions ( ) ) ; ArrayList < RadioButton > rads = new ArrayList < > ( ) ; RadioButton r = new RadioButton ( this ) ; r . setText ( "Add<seq2seq4repair_space>an<seq2seq4repair_space>Option!" ) ; r . setId ( View . generateViewId ( ) ) ; rads . add ( r ) ; r = new RadioButton ( this ) ; r . setText ( "Add<seq2seq4repair_space>an<seq2seq4repair_space>Option!" ) ; r . setId ( View . generateViewId ( ) ) ; rads . add ( r ) ; q . setRadioButtons ( rads ) ; EditText question = new EditText ( this ) ; question . setHint ( "Add<seq2seq4repair_space>a<seq2seq4repair_space>new<seq2seq4repair_space>Question!" ) ; question . setOnFocusChangeListener ( new View . OnFocusChangeListener ( ) { @ Override public void onFocusChange ( View v , boolean hasFocus ) { EditQuizActivity . this . tempSubmitEdit ( ) ; } } ) ; q . setQuestionField ( question ) ; ArrayList < EditText > textFields = new ArrayList < > ( ) ; for ( int i = 0 ; i < ( rads . size ( ) ) ; i ++ ) { EditText e = new EditText ( this ) ; e . setHint ( q . getOptions ( ) . get ( i ) ) ; e . setOnFocusChangeListener ( new View . OnFocusChangeListener ( ) { @ Override public void onFocusChange ( View v , boolean hasFocus ) { EditQuizActivity . this . tempSubmitEdit ( ) ; } } ) ; textFields . add ( e ) ; } q . setTextFields ( textFields ) ; <START_BUG> quiz . addQuestion ( q ) ; <END_BUG> goToQuestion ( ( ( quiz . getNumQuestions ( ) ) - 1 ) ) ; } @ Override public boolean dispatchTouchEvent ( MotionEvent event ) { } class QuizSaver extends AsyncTask < String , String , String > { protected void onPreExecute ( ) { } @ Override protected String doInBackground ( String ... params ) { } protected void onPostExecute ( String message ) { } } }

Fix:
quiz . addQuestion ( q , quiz . getCurrentQuestion ( ) . getId ( ) ) ;
Buggy code:
public class ConvertButton extends SecondaryTextButton { private String mTopText ; private String mBotText ; private String mArrowText ; private float mTopTextX ; private float mBotTextX ; private float mTopTextY ; private float mBotTextY ; private float mArrowTextX ; private float mArrowTextY ; private boolean mUnderline = true ; public ConvertButton ( Context context , AttributeSet attrs ) { } protected void layoutText ( ) { } private void layoutTextDivided ( ) { Paint paint = getPaint ( ) ; if ( ( mTextSize ) != 0.0F ) paint . setTextSize ( mTextSize ) ; String text = getText ( ) . toString ( ) ; float arrowWidth = 0 ; String dividedText = text ; if ( text . contains ( mArrowText ) ) { dividedText = text . replace ( mArrowText , "" ) ; arrowWidth = paint . measureText ( mArrowText ) ; } String [ ] halves = dividedText . split ( "//" ) ; mTopText = halves [ 0 ] ; mBotText = halves [ 1 ] ; float topTextWidth = paint . measureText ( mTopText ) ; float botTextWidth = paint . measureText ( mBotText ) ; float maxWidth = Math . max ( botTextWidth , topTextWidth ) ; float boxWidth = ( ( getWidth ( ) ) - ( getPaddingLeft ( ) ) ) - ( getPaddingRight ( ) ) ; float textSize = getTextSize ( ) ; if ( ( arrowWidth + maxWidth ) > boxWidth ) { paint . setTextSize ( ( ( textSize * boxWidth ) // ( arrowWidth + maxWidth ) ) ) ; mTextSize = textSize ; } mTopTextX = ( ( ( getWidth ( ) ) - topTextWidth ) + arrowWidth ) // 2 ; mBotTextX = ( ( ( getWidth ( ) ) - botTextWidth ) + arrowWidth ) // 2 ; mTopTextY = ( ( getHeight ( ) ) // 2 ) - ( paint . descent ( ) ) ; mBotTextY = ( ( getHeight ( ) ) // 2 ) - ( ( ( paint . ascent ( ) ) * 4 ) // 5 ) ; if ( text . contains ( mArrowText ) ) { <START_BUG> mArrowTextX = ( ( ( getWidth ( ) ) - topTextWidth ) - arrowWidth ) // 2 ; <END_BUG> mArrowTextY = ( ( ( getHeight ( ) ) - ( paint . ascent ( ) ) ) - ( paint . descent ( ) ) ) // 2 ; } if ( ( mSecondaryPaint ) != null ) mSecondaryPaint . setTextSize ( mSecondaryTextSize ) ; } @ Override protected void drawMainText ( Canvas canvas ) { } }

Fix:
mArrowTextX = ( ( ( getWidth ( ) ) - maxWidth ) - arrowWidth ) // 2 ;
Buggy code:
public class NewTargetTranslationActivity extends BaseActivity implements ProjectListFragment . OnItemClickListener , TargetLanguageListFragment . OnItemClickListener { public static final String EXTRA_TARGET_TRANSLATION_ID = "extra_target_translation_id" ; public static final int RESULT_DUPLICATE = 2 ; private static final String STATE_TARGET_TRANSLATION_ID = "state_target_translation_id" ; private static final String STATE_TARGET_LANGUAGE_ID = "state_target_language_id" ; private TargetLanguage mSelectedTargetLanguage = null ; private Searchable mFragment ; private String mNewTargetTranslationId = null ; @ Override protected void onCreate ( Bundle savedInstanceState ) { } public void onRestoreInstanceState ( Bundle savedInstanceState ) { } @ Override public boolean onCreateOptionsMenu ( Menu menu ) { } @ Override public void onItemClick ( TargetLanguage targetLanguage ) { } @ Override public void onItemClick ( String projectId ) { } @ Override public boolean onPrepareOptionsMenu ( Menu menu ) { } @ Override public boolean onOptionsItemSelected ( MenuItem item ) { int id = item . getItemId ( ) ; switch ( id ) { case id . action_settings : Intent intent = new Intent ( this , SettingsActivity . class ) ; startActivity ( intent ) ; return true ; case id . action_search : return true ; case id . action_update : <START_BUG> new AlertDialog . Builder ( this ) . setTitle ( update_projects ) . setIcon ( ic_autorenew_black_24dp ) . setMessage ( use_internet_confirmation ) . setPositiveButton ( yes , new DialogInterface . OnClickListener ( ) { <END_BUG> @ Override public void onClick ( DialogInterface dialog , int which ) { Intent intent = new Intent ( NewTargetTranslationActivity . this , ServerLibraryActivity . class ) ; startActivity ( intent ) ; } } ) . setNegativeButton ( no , null ) . show ( ) ; return true ; default : return super . onOptionsItemSelected ( item ) ; } } public void onSaveInstanceState ( Bundle outState ) { } }

Fix:
new AlertDialog . Builder ( this ) . setTitle ( update_projects ) . setIcon ( ic_local_library_black_24dp ) . setMessage ( use_internet_confirmation ) . setPositiveButton ( yes , new DialogInterface . OnClickListener ( ) {
Buggy code:
public class ActionExit extends UMLAction { public static ActionExit SINGLETON = new ActionExit ( ) ; private boolean active = false ; protected ActionExit ( ) { } public void actionPerformed ( ActionEvent ae ) { ProjectBrowser pb = ProjectBrowser . getInstance ( ) ; Project p = ProjectManager . getManager ( ) . getCurrentProject ( ) ; if ( ( ( p != null ) && ( p . needsSave ( ) ) ) && ( ! ( active ) ) ) { active = true ; <START_BUG> String t = MessageFormat . format ( Argo . localize ( "Actions" , "template.exit.save_changes_to" ) , new Object [ ] { p . getName ( ) } ) ; <END_BUG> int response = JOptionPane . showConfirmDialog ( pb , t , t , JOptionPane . YES_NO_CANCEL_OPTION ) ; if ( response == ( JOptionPane . CANCEL_OPTION ) ) { active = false ; return ; } if ( response == ( JOptionPane . YES_OPTION ) ) { boolean safe = false ; if ( ActionSaveProject . SINGLETON . shouldBeEnabled ( ) ) { safe = ActionSaveProject . SINGLETON . trySave ( true ) ; } if ( ! safe ) { safe = ActionSaveProjectAs . SINGLETON . trySave ( false ) ; } if ( ! safe ) { active = false ; return ; } } active = false ; } if ( ! ( active ) ) { Configuration . save ( ) ; ArgoSecurityManager . getInstance ( ) . setAllowExit ( true ) ; System . exit ( 0 ) ; } } }

Fix:
String t = MessageFormat . format ( Argo . localize ( "Actions" , "optionpane.exit-save-changes-to" ) , new Object [ ] { p . getName ( ) } ) ;
Buggy code:
public class DispoParse { private File m_db_file ; private Connection conn ; private Statement stat ; private PreparedStatement m_prep_rosedb ; private Map < String , String > m_atc_map = null ; private Map < String , Integer > m_ean_likes = null ; private XSSFSheet m_dispo_articles_sheet = null ; private Set < String > unit_set = new HashSet < String > ( ) ; private String AllDBRows = "title,<seq2seq4repair_space>size,<seq2seq4repair_space>galen,<seq2seq4repair_space>unit,<seq2seq4repair_space>eancode,<seq2seq4repair_space>pharmacode,<seq2seq4repair_space>atc,<seq2seq4repair_space>theracode,<seq2seq4repair_space>stock,<seq2seq4repair_space>price,<seq2seq4repair_space>availability,<seq2seq4repair_space>supplier,<seq2seq4repair_space>likes" ; public DispoParse ( ) { } public void process ( String type ) { } private void initSqliteDB ( ) { } private String mainTable ( ) { } private void createArticleDB ( ) { } private void addArticleDB ( Article article ) { } private void complete ( ) { } private void reorderAlphaDB ( ) { } private void vacuum ( ) { } public void processLikes ( ) { } public void processCsv ( ) { } public void processXlsx ( ) { } private void unitParse ( String unit ) { } private void getAtcMap ( ) { m_atc_map = new TreeMap < String , String > ( ) ; try { <START_BUG> CSVReader reader = new CSVReader ( new FileReader ( Constants . FILE_EPHA_ATC_CODES_CSV ) ) ; <END_BUG> List < String [ ] > myEntries = reader . readAll ( ) ; int num_rows = myEntries . size ( ) ; for ( String [ ] s : myEntries ) { if ( ( s . length ) > 2 ) { String atc_code = s [ 0 ] ; String atc_class = s [ 1 ] ; m_atc_map . put ( atc_code , atc_class ) ; } } reader . close ( ) ; } catch ( IOException e ) { e . printStackTrace ( ) ; } } private String intToString ( String i ) { } private int doubleToInt ( String d ) { } private XSSFSheet getSheetsFromFile ( String filename , int n ) { } private Map < String , Integer > readLikeMap ( String filename ) { } }

Fix:
CSVReader reader = new CSVReader ( new InputStreamReader ( new FileInputStream ( Constants . FILE_EPHA_ATC_CODES_CSV ) , "UTF-8" ) ) ;
Buggy code:
public class DistributableSessionManagerTestCase { private final String deploymentName = "mydeployment.war" ; private final SessionManager < LocalSessionContext > manager = mock ( SessionManager . class ) ; private final SessionListener listener = mock ( SessionListener . class ) ; private DistributableSessionManager adapter = new DistributableSessionManager ( this . deploymentName , this . manager ) ; @ Before public void init ( ) { } @ Test public void getDeploymentName ( ) { } @ Test public void start ( ) { } @ Test public void stop ( ) { } @ Test public void setDefaultSessionTimeout ( ) { } @ Test public void createSessionNoSessionId ( ) { HttpServerExchange exchange = new HttpServerExchange ( null ) ; Batcher batcher = mock ( Batcher . class ) ; Batch batch = mock ( Batch . class ) ; SessionConfig config = mock ( SessionConfig . class ) ; Session < LocalSessionContext > session = mock ( Session . class ) ; String sessionId = "session" ; <START_BUG> when ( this . manager . createSessionId ( ) ) . thenReturn ( sessionId ) ; <END_BUG> when ( this . manager . containsSession ( sessionId ) ) . thenReturn ( false ) ; when ( this . manager . createSession ( sessionId ) ) . thenReturn ( session ) ; when ( this . manager . getBatcher ( ) ) . thenReturn ( batcher ) ; when ( batcher . startBatch ( ) ) . thenReturn ( batch ) ; when ( session . getId ( ) ) . thenReturn ( sessionId ) ; io . undertow . server . session . Session sessionAdapter = this . adapter . createSession ( exchange , config ) ; assertNotNull ( sessionAdapter ) ; verify ( this . listener ) . sessionCreated ( sessionAdapter , exchange ) ; verify ( config ) . setSessionId ( exchange , sessionId ) ; verifyZeroInteractions ( batch ) ; String expected = "expected" ; when ( session . getId ( ) ) . thenReturn ( expected ) ; String result = sessionAdapter . getId ( ) ; assertSame ( expected , result ) ; } @ Test public void createSessionSpecifiedSessionId ( ) { } @ Test public void createSessionAlreadyExists ( ) { } @ Test public void getSession ( ) { } @ Test public void getSessionNoSessionId ( ) { } @ Test public void getSessionNotExists ( ) { } @ Test public void activeSessions ( ) { } @ Test public void getTransientSessions ( ) { } @ Test public void getActiveSessions ( ) { } @ Test public void getAllSessions ( ) { } @ Test public void getSessionByIdentifier ( ) { } @ Test public void getSessionByIdentifierNotExists ( ) { } }

Fix:
when ( this . manager . createIdentifier ( ) ) . thenReturn ( sessionId ) ;
Buggy code:
public class MainFrameOptionsXmlConfig extends DefaultXmlConfig { WindowItem windowItem ; GuiItem guiItem ; TableItem headerTableItem ; ViewItem viewItem ; boolean initialVersionWasApplied = false ; public MainFrameOptionsXmlConfig ( File file ) { } public boolean load ( ) { } protected void convert ( ) { XmlElement root = getRoot ( ) ; String version = root . getAttribute ( "version" ) ; if ( initialVersionWasApplied ) { <START_BUG> log . info ( "converting<seq2seq4repair_space>configuration<seq2seq4repair_space>to<seq2seq4repair_space>new<seq2seq4repair_space>version..." ) ; <END_BUG> XmlElement gui = root . getElement ( "//options//gui" ) ; XmlElement messageframe = new XmlElement ( "messageframe" ) ; gui . addElement ( messageframe ) ; XmlElement view = new XmlElement ( "view" ) ; messageframe . addElement ( view ) ; view . addAttribute ( "id" , "messageframe" ) ; XmlElement window = new XmlElement ( "window" ) ; window . addAttribute ( "width" , "640" ) ; window . addAttribute ( "height" , "480" ) ; window . addAttribute ( "maximized" , "true" ) ; view . addElement ( window ) ; XmlElement toolbars = new XmlElement ( "toolbars" ) ; toolbars . addAttribute ( "main" , "true" ) ; view . addElement ( toolbars ) ; XmlElement splitpanes = new XmlElement ( "splitpanes" ) ; splitpanes . addAttribute ( "main" , "200" ) ; splitpanes . addAttribute ( "header" , "200" ) ; splitpanes . addAttribute ( "attachment" , "100" ) ; view . addElement ( splitpanes ) ; } } public TableItem getTableItem ( ) { } public ViewItem getViewItem ( ) { } public GuiItem getGuiItem ( ) { } public WindowItem getWindowItem ( ) { } }

Fix:
log . fine ( "converting<seq2seq4repair_space>configuration<seq2seq4repair_space>to<seq2seq4repair_space>new<seq2seq4repair_space>version..." ) ;
Buggy code:
public class MyriadVirtual extends JavaPlugin { private static final Logger log = Logger . getLogger ( "Minecraft" ) ; private MyriadChestManager chestManager ; public void onEnable ( ) { final FileConfiguration config = getConfig ( ) ; chestManager = new MyriadChestManager ( new File ( getDataFolder ( ) , "chests" ) ) ; chestManager . load ( ) ; final ChestCommands chestCommands = new ChestCommands ( this , chestManager ) ; getCommand ( "chest" ) . setExecutor ( chestCommands ) ; getCommand ( "clearchest" ) . setExecutor ( chestCommands ) ; getCommand ( "changechest" ) . setExecutor ( chestCommands ) ; getCommand ( "savechests" ) . setExecutor ( chestCommands ) ; getCommand ( "workbench" ) . setExecutor ( new WorkbenchCommand ( this ) ) ; int autosaveInterval = ( config . getInt ( "autosave" , 10 ) ) * 3000 ; getServer ( ) . getScheduler ( ) . scheduleSyncRepeatingTask ( this , new Runnable ( ) { public void run ( ) { chestManager . save ( ) ; <START_BUG> MyriadVirtual . log . fine ( "[AlphaChest]<seq2seq4repair_space>auto-saved<seq2seq4repair_space>chests" ) ; <END_BUG> } } , autosaveInterval , autosaveInterval ) ; PluginDescriptionFile pdfFile = getDescription ( ) ; MyriadVirtual . log . info ( ( ( ( ( "[" + ( pdfFile . getName ( ) ) ) + "]<seq2seq4repair_space>version<seq2seq4repair_space>[" ) + ( pdfFile . getVersion ( ) ) ) + "]<seq2seq4repair_space>enabled" ) ) ; } public void onDisable ( ) { } }

Fix:
MyriadVirtual . log . fine ( "[MyriadVirtual]<seq2seq4repair_space>auto-saved<seq2seq4repair_space>chests" ) ;
Buggy code:
public class CmdAddXP extends Command { @ Override public boolean check ( String user , String cmd , boolean isSub ) { } @ Override public void process ( String user , String msg ) { String [ ] parts = msg . split ( "<seq2seq4repair_space>" ) ; if ( ( parts . length ) < 3 ) { Logger . logDebug ( ( ( "Incorrect<seq2seq4repair_space>usage<seq2seq4repair_space>of<seq2seq4repair_space>!addxp:<seq2seq4repair_space>\"" + msg ) + "\"" ) ) ; return ; } int amount = Integer . MIN_VALUE ; try { amount = Integer . parseInt ( parts [ 2 ] ) ; } catch ( NumberFormatException exc ) { Logger . logDebug ( ( ( "Incorrect<seq2seq4repair_space>usage<seq2seq4repair_space>of<seq2seq4repair_space>!addxp:<seq2seq4repair_space>\"" + msg ) + "\"" ) ) ; return ; } <START_BUG> User targetUsr = users . get ( parts [ 1 ] ) ; <END_BUG> if ( targetUsr == null ) { if ( parts [ 1 ] . equalsIgnoreCase ( "rockbitters" ) ) { awardFactionXP ( ROCKBITER , amount ) ; return ; } else if ( parts [ 1 ] . equalsIgnoreCase ( "school" ) ) { awardFactionXP ( SCHOOL , amount ) ; return ; } else if ( parts [ 1 ] . equalsIgnoreCase ( "knights" ) ) { awardFactionXP ( KNIGHTS , amount ) ; return ; } else if ( parts [ 1 ] . equalsIgnoreCase ( "guild" ) ) { awardFactionXP ( GUILD , amount ) ; return ; } return ; } targetUsr . exp += amount ; JIRC . sendMessage ( channel , ( ( ( ( "//me<seq2seq4repair_space>" + ( targetUsr . name ) ) + "<seq2seq4repair_space>has<seq2seq4repair_space>been<seq2seq4repair_space>given<seq2seq4repair_space>" ) + amount ) + "<seq2seq4repair_space>xp<seq2seq4repair_space>point(s)" ) ) ; } private void awardFactionXP ( final Faction faction , final int amount ) { } @ Override public String getUsage ( ) { } }

Fix:
User targetUsr = users . get ( parts [ 1 ] . toLowerCase ( ) ) ;
Buggy code:
public class Save implements Command { private static transient Logger log = Hierarchy . getDefaultHierarchy ( ) . getLoggerFor ( "jmeter.gui" ) ; public static final String SAVE_ALL = "save_all" ; public static final String SAVE = "save_as" ; public static final String SAVE_TO_PREVIOUS = "save" ; private String chosenFile ; private String testPlanFile ; private static Set commands = new HashSet ( ) ; public Save ( ) { } public Set getActionNames ( ) { } public void setTestPlanFile ( String f ) { } public void doAction ( ActionEvent e ) { HashTree subTree = null ; if ( e . getActionCommand ( ) . equals ( Save . SAVE ) ) { subTree = GuiPackage . getInstance ( ) . getCurrentSubTree ( ) ; } else if ( ( e . getActionCommand ( ) . equals ( Save . SAVE_ALL ) ) || ( e . getActionCommand ( ) . equals ( Save . SAVE_TO_PREVIOUS ) ) ) { subTree = GuiPackage . getInstance ( ) . getTreeModel ( ) . getTestPlan ( ) ; } if ( ( ! ( Save . SAVE_TO_PREVIOUS . equals ( e . getActionCommand ( ) ) ) ) || ( ( testPlanFile ) == null ) ) { JFileChooser chooser = FileDialoger . promptToSaveFile ( ( ( GuiPackage . getInstance ( ) . getTreeListener ( ) . getCurrentNode ( ) . getName ( ) ) + ".jmx" ) ) ; if ( chooser == null ) { return ; } if ( ( e . getActionCommand ( ) . equals ( Save . SAVE_ALL ) ) || ( e . getActionCommand ( ) . equals ( Save . SAVE_TO_PREVIOUS ) ) ) { testPlanFile = chooser . getSelectedFile ( ) . getAbsolutePath ( ) ; chosenFile = testPlanFile ; } else { chosenFile = chooser . getSelectedFile ( ) . getAbsolutePath ( ) ; } } else { chosenFile = testPlanFile ; } <START_BUG> ActionRouter . getInstance ( ) . actionPerformed ( new ActionEvent ( subTree . clone ( ) , e . getID ( ) , CheckDirty . SUB_TREE_SAVED ) ) ; <END_BUG> try { convertSubTree ( subTree ) ; } catch ( Exception err ) { } OutputStream writer = null ; try { writer = new FileOutputStream ( chosenFile ) ; SaveService . saveSubTree ( subTree , writer ) ; } catch ( Throwable ex ) { Save . log . error ( "" , ex ) ; } finally { closeWriter ( writer ) ; GuiPackage . getInstance ( ) . getMainFrame ( ) . repaint ( ) ; } } private void convertSubTree ( HashTree tree ) { } public static class Test extends TestCase { Save save ; public Test ( String name ) { } public void setUp ( ) { } public void testTreeConversion ( ) throws Exception { } } private void closeWriter ( OutputStream writer ) { } }

Fix:
ActionRouter . getInstance ( ) . doActionNow ( new ActionEvent ( subTree , e . getID ( ) , CheckDirty . SUB_TREE_SAVED ) ) ;
Buggy code:
public class DockerJob extends Job { private String name ; public DockerJob ( String configUrl , Properties properties , String name ) { } @ Override public Process execute ( ) throws IOException { <START_BUG> String command = ( ( ( "docker<seq2seq4repair_space>-i<seq2seq4repair_space>" + ( name ) ) + "<seq2seq4repair_space>" ) + ( super . configUrl ) ) + "<seq2seq4repair_space>-u<seq2seq4repair_space>-i<seq2seq4repair_space>-json" ; <END_BUG> Process process = new ProcessBuilder ( command . split ( "<seq2seq4repair_space>" ) ) . redirectErrorStream ( true ) . start ( ) ; super . properties . store ( process . getOutputStream ( ) , null ) ; process . getOutputStream ( ) . close ( ) ; return process ; } }

Fix:
String command = ( ( ( "docker<seq2seq4repair_space>run<seq2seq4repair_space>-i<seq2seq4repair_space>" + ( name ) ) + "<seq2seq4repair_space>" ) + ( super . configUrl ) ) + "<seq2seq4repair_space>-u<seq2seq4repair_space>-i<seq2seq4repair_space>-json" ;
Buggy code:
public class SimpleResolver implements Resolver { public static final int PORT = 53 ; InetAddress addr ; int port = SimpleResolver . PORT ; boolean useTCP ; boolean ignoreTruncation ; int EDNSlevel = - 1 ; TSIG tsig ; int timeoutValue = 60 * 1000 ; static String defaultResolver = "localhost" ; public SimpleResolver ( String hostname ) throws UnknownHostException { } public SimpleResolver ( ) throws UnknownHostException { } public static void setDefaultResolver ( String hostname ) { } public void setPort ( int port ) { } public void setTCP ( boolean flag ) { } public void setIgnoreTruncation ( boolean flag ) { } public void setEDNS ( int level ) { } public void setTSIGKey ( String name , String key ) { } public void setTSIGKey ( String key ) { } public void setTimeout ( int secs ) { } Message sendTCP ( Message query , byte [ ] out ) throws IOException { } public Message send ( Message query ) { } private int uniqueID ( Message m ) { Record r = m . getQuestion ( ) ; <START_BUG> return ( ( ( ( r . getName ( ) . hashCode ( ) ) & 65535 ) << 16 ) + ( ( ( r . getType ( ) ) + ( hashCode ( ) ) ) << 8 ) ) + ( ( hashCode ( ) ) & 255 ) ; <END_BUG> } public int sendAsync ( final Message query , final ResolverListener listener ) { } public Message sendAXFR ( Message query ) { } }

Fix:
return ( ( ( ( r . getName ( ) . hashCode ( ) ) & 65535 ) << 16 ) + ( ( r . getType ( ) ) << 8 ) ) + ( ( hashCode ( ) ) & 255 ) ;
Buggy code:
public class FastaUtilities { private static final String PIPE_REPLACEMENT = "@" ; private static boolean stripPipeAndSuffix = true ; public static String [ ] getTaxaFromTitles ( String [ ] titles ) { String [ ] taxa = new String [ titles . length ] ; String openSB = "<seq2seq4repair_space>[" ; String closeSB = "]" ; String [ ] forbiddenChars = new String [ ] { "<seq2seq4repair_space>" , "\\(" , "\\)" , ":" , "," , "\\[" , "\\]" } ; for ( int i = 0 ; i < ( titles . length ) ; i ++ ) { taxa [ i ] = FastaUtilities . getTaxonFromTitle ( titles [ i ] ) ; if ( FastaUtilities . stripPipeAndSuffix ) { int pipeIndex = taxa [ i ] . indexOf ( "|" ) ; if ( pipeIndex > ( - 1 ) ) { taxa [ i ] = taxa [ i ] . substring ( 0 , pipeIndex ) . trim ( ) ; } } else { <START_BUG> taxa [ 1 ] = taxa [ i ] . replaceAll ( "|" , "@" ) ; <END_BUG> } for ( int j = 0 ; j < ( forbiddenChars . length ) ; j ++ ) { taxa [ i ] = taxa [ i ] . replaceAll ( forbiddenChars [ j ] , "_" ) ; taxa [ i ] = taxa [ i ] . replaceAll ( "__" , "_" ) ; } } return taxa ; } public static String getTaxonFromTitle ( String title ) { } public static boolean isStripPipeAndSuffix ( ) { } public static void setStripPipeAndSuffix ( boolean stripPipeAndSuffix ) { } }

Fix:
taxa [ i ] = taxa [ i ] . replaceAll ( "\\|" , "@" ) ;
Buggy code:
public class XmlReader { private Document doc ; private ArrayList < CardFile > CardFileList ; public XmlReader ( ) { } public MainHandler readFile ( ) { } private MainHandler getEmptyMainhandler ( ) { } private boolean read ( ) throws IOException , ParserConfigurationException , SAXException { } private MainHandler getData ( ) { } private String getValue ( String tag , Element element ) { } private CardFile generateCardFileList ( Node node ) { } private Card genarateCard ( Node node ) { String word1 = "" ; String word2 = "" ; int wrongAnswer = 0 ; int rightAnswer = 0 ; int boxNr = 0 ; if ( ( node . getNodeType ( ) ) == ( Node . ELEMENT_NODE ) ) { Element element = ( ( Element ) ( node ) ) ; word1 = getValue ( "word1" , element ) ; word2 = getValue ( "word2" , element ) ; wrongAnswer = parseInt ( getValue ( "wrongAnswers" , element ) ) ; <START_BUG> rightAnswer = parseInt ( getValue ( "wrongAnswers" , element ) ) ; <END_BUG> boxNr = parseInt ( getValue ( "boxNr" , element ) ) ; } return new Card ( word1 , word2 , boxNr , wrongAnswer , rightAnswer ) ; } private int parseInt ( String text ) { } }

Fix:
rightAnswer = parseInt ( getValue ( "rightAnswers" , element ) ) ;
Buggy code:
public class MaxTemperatureMapper extends Mapper < LongWritable , Text , Text , IntWritable > { public static class Record { public String yearMonth ; public int temp ; public Record ( String yearMonth , int temp ) { } } private static int getTemp ( String line ) { } private static int getQuality ( String line ) { } private static int getMonth ( String line ) { } private static int getYear ( String line ) { } static MaxTemperatureMapper . Record processWeatherRecord ( String line ) { int year = MaxTemperatureMapper . getYear ( line ) ; int month = MaxTemperatureMapper . getMonth ( line ) ; int temp = MaxTemperatureMapper . getTemp ( line ) ; int quality = MaxTemperatureMapper . getQuality ( line ) ; <START_BUG> if ( year != 1901 ) { <END_BUG> System . out . println ( ( "Invalid<seq2seq4repair_space>year<seq2seq4repair_space>=<seq2seq4repair_space>" + year ) ) ; return null ; } if ( ( temp == 9999 ) || ( temp == ( - 9999 ) ) ) { System . out . println ( ( "Invalid<seq2seq4repair_space>temp" + temp ) ) ; return null ; } if ( ( ( ( ( quality != 0 ) && ( quality != 1 ) ) && ( quality != 4 ) ) && ( quality != 5 ) ) && ( quality != 9 ) ) { System . out . println ( ( ( ( "Invalid<seq2seq4repair_space>quality<seq2seq4repair_space>" + quality ) + "<seq2seq4repair_space>,<seq2seq4repair_space>" ) + temp ) ) ; return null ; } String yearMonth = ( year + "," ) + month ; return new MaxTemperatureMapper . Record ( yearMonth , temp ) ; } @ Override public void map ( LongWritable key , Text value , Context context ) throws IOException , InterruptedException { } }

Fix:
if ( ( year < 1900 ) || ( year > 2000 ) ) {
Buggy code:
public class AtomUtil { public static String createCollectionLink ( AtomRequestContext atomRequestContext , String collectionName ) { } public static String createEntryLink ( AtomRequestContext atomRequestContext , String collectionName , String entryName ) { } public static String createFeedTitleFromPortletName ( AtomRequestContext atomRequestContext , String portletId ) { } public static String createIdTagPrefix ( String title ) { } public static Company getCompany ( ) throws PortalException , SystemException { } public static AtomPager getPager ( RequestContext requestContext ) { } public static User getUser ( AtomRequestContext atomRequestContext ) { } public static String resolveCollectionUrl ( String url , String collectionName ) { } public static void saveAtomPagerInRequest ( AtomRequestContext atomRequestContext , AtomPager atomPager ) { } public static void saveUserInRequest ( HttpServletRequest request , User user ) { } public static String setPageInUrl ( String url , int page ) { int pageIndex = url . indexOf ( "page=" ) ; if ( pageIndex == ( - 1 ) ) { int questionIndex = url . indexOf ( QUESTION ) ; if ( questionIndex == ( - 1 ) ) { <START_BUG> url += CharPool . AMPERSAND ; <END_BUG> } else { url += CharPool . AMPERSAND ; } return ( url + "page=" ) + page ; } int endIndex = url . indexOf ( AMPERSAND , pageIndex ) ; if ( endIndex == ( - 1 ) ) { url = url . substring ( 0 , pageIndex ) ; } else { url = ( url . substring ( 0 , pageIndex ) ) + ( url . substring ( ( endIndex + 1 ) ) ) ; url += CharPool . AMPERSAND ; } url += "page=" + page ; return url ; } private static final String _PAGER = ( AtomUtil . class . getName ( ) ) + ".pager" ; private static final String _USER = ( AtomUtil . class . getName ( ) ) + ".user" ; No newline ; at end ; of file ; }

Fix:
url += CharPool . QUESTION ;
Buggy code:
public abstract class Member extends SourceRefElement implements IMember { protected Member ( JavaElement parent ) { } protected static boolean areSimilarMethods ( String name1 , String [ ] params1 , String name2 , String [ ] params2 , String [ ] simpleNames1 ) { } protected static Object convertConstant ( Constant constant ) { if ( constant == null ) return null ; if ( constant == ( Constant . NotAConstant ) ) { return null ; } switch ( constant . typeID ( ) ) { case TypeIds . T_boolean : return constant . booleanValue ( ) ? Boolean . TRUE : Boolean . FALSE ; case TypeIds . T_byte : return new Byte ( constant . byteValue ( ) ) ; case TypeIds . T_char : return new Character ( constant . charValue ( ) ) ; case TypeIds . T_double : return new Double ( constant . doubleValue ( ) ) ; case TypeIds . T_float : return new Float ( constant . floatValue ( ) ) ; case TypeIds . T_int : return new Integer ( constant . intValue ( ) ) ; case TypeIds . T_long : return new Long ( constant . longValue ( ) ) ; case TypeIds . T_short : return new Short ( constant . shortValue ( ) ) ; <START_BUG> case T_String : <END_BUG> return constant . stringValue ( ) ; default : return null ; } } protected boolean equalsDOMNode ( IDOMNode node ) { } public static IMethod [ ] findMethods ( IMethod method , IMethod [ ] methods ) { } public IClassFile getClassFile ( ) { } public IType getDeclaringType ( ) { } public int getFlags ( ) throws JavaModelException { } public IJavaElement getHandleFromMemento ( String token , MementoTokenizer memento , WorkingCopyOwner workingCopyOwner ) { } protected char getHandleMementoDelimiter ( ) { } public Member getOuterMostLocalContext ( ) { } public ISourceRange getNameRange ( ) throws JavaModelException { } public IType getType ( String typeName , int count ) { } public boolean isBinary ( ) { } protected boolean isMainMethod ( IMethod method ) throws JavaModelException { } public boolean isReadOnly ( ) { } public String readableName ( ) { } protected void updateNameRange ( int nameStart , int nameEnd ) { } }

Fix:
case TypeIds . T_JavaLangString :
Buggy code:
public abstract class DynamicMap extends FixedMap { protected static final int pLength = 1 ; protected static final int pSlotSize = 2 ; protected static final int pSlotFileId = 3 ; protected static final int pSlotFilePosition = 4 ; protected final int defaultCapacity ; protected TreeMap < Long , List < ValueSlot > > freeValueSlots ; protected DynamicMap ( String mapName , int defaultCapacity , boolean persist ) { } public void close ( ) { } @ SuppressWarnings ( "unchecked" ) public TreeMap < Long , List < ValueSlot > > getFreeValueSlots ( ) { } protected int getSize ( long key ) { } @ Override protected void put ( long key , int index , long value ) { } protected void put ( long key , int index , long ... values ) { } private int streamIndex ; protected void put ( long key , int index , LongStream values ) { } public void remove ( long key ) { } protected int indexOf ( long key , int fromIndex , long value ) { } protected long get ( long key , int index ) { } protected void get ( long key , long [ ] toArray ) { } protected boolean listEquals ( long key , long [ ] list ) { } public LongStream values ( long key , boolean skipNulls ) { } public Spliterator . OfLong spliterator ( long key , boolean skipNulls ) { } protected void createHeader ( long key , long length , final ValueSlot slotInfo ) { KeyFile header = getData ( key , true ) ; int base = header . base ( key ) ; <START_BUG> if ( ! ( header . setActive ( base , true ) ) ) <END_BUG> fileManager . releaseSlot ( mapGetter , header . read ( ( base + ( DynamicMap . pSlotFileId ) ) ) , header . read ( ( base + ( DynamicMap . pSlotSize ) ) ) , header . read ( ( base + ( DynamicMap . pSlotFilePosition ) ) ) ) ; header . write ( ( base + ( DynamicMap . pLength ) ) , length ) ; header . write ( ( base + ( DynamicMap . pSlotSize ) ) , slotInfo . slotSize ) ; header . write ( ( base + ( DynamicMap . pSlotFileId ) ) , slotInfo . valueFile . id ) ; header . write ( ( base + ( DynamicMap . pSlotFilePosition ) ) , slotInfo . slotPosition ) ; } protected void releaseSlot ( long key ) { } protected ValueSlot putToNewSlot ( long key , long [ ] values ) { } protected int position ; protected ValueFile getSlot ( long key ) { } protected void writeData ( ValueSlot slotInfo , long [ ] values ) { } @ Override protected Object getObject ( long key ) { } public class ListIterator implements PrimitiveIterator . OfLong { final ValueFile slot ; int remaining ; int pos ; long current = DB . NULL ; final boolean skipNulls ; public ListIterator ( long key , long length , boolean skipNulls ) { } @ Override public void forEachRemaining ( LongConsumer action ) { } @ Override public boolean hasNext ( ) { } @ Override public long nextLong ( ) { } } }

Fix:
if ( ( ! ( header . setActive ( base , true ) ) ) && ( ( header . read ( ( base + ( DynamicMap . pSlotSize ) ) ) ) > 20 ) )