nus-yam/ex-repair huggingface dataset:
Buggy code:
@ Path ( "//entity" ) public class EntityController extends Controller { public EntityController ( ) throws ClassNotFoundException { } public EntityController ( InputStream configFileStream ) throws ClassNotFoundException { } @ POST @ Path ( "//{entityName}" ) @ Consumes ( MediaType . APPLICATION_JSON ) @ Produces ( MediaType . APPLICATION_JSON ) public Response create ( @ PathParam ( "entityName" ) String entityName , String entityJson ) { log . info ( "POST<seq2seq4repair_space>//{}\n{}" , entityName , entityJson ) ; String res ; try ( Dao dao = factory . createDao ( ) ) { List < Entity > entities = mapper . readValue ( entityJson , List . class ) ; <START_BUG> List < Entity > createdEntities = dao . createOrUpdate ( factory . types ( entityName ) , entities ) ; <END_BUG> dao . commit ( ) ; res = mapper . writeValueAsString ( createdEntities ) ; } catch ( Exception e ) { return serverError ( "" , e ) ; } return Response . ok ( res ) . build ( ) ; } }

Fix:
List < Entity > createdEntities = dao . createOrUpdate ( entityName , entities ) ;
Buggy code:
public class ActionOpenProject extends UMLAction { public static ActionOpenProject SINGLETON = new ActionOpenProject ( ) ; public static final String separator = System . getProperty ( "file.separator" ) ; public ActionOpenProject ( ) { } public void actionPerformed ( ActionEvent e ) { ProjectBrowser pb = ProjectBrowser . TheInstance ; Project p = pb . getProject ( ) ; if ( ( p != null ) && ( p . needsSave ( ) ) ) { String t = MessageFormat . format ( Localizer . localize ( "Actions" , "template.open_project.save_changes_to" ) , new Object [ ] { p . getName ( ) } ) ; int response = JOptionPane . showConfirmDialog ( pb , t , t , JOptionPane . YES_NO_CANCEL_OPTION ) ; if ( response == ( JOptionPane . CANCEL_OPTION ) ) 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 ) return ; } } try { String directory = Globals . getLastDirectory ( ) ; JFileChooser chooser = OsUtil . getFileChooser ( directory ) ; if ( chooser == null ) <START_BUG> chooser = new JFileChooser ( ) ; <END_BUG> chooser . setDialogTitle ( Localizer . localize ( "Actions" , "text.open_project.chooser_title" ) ) ; SuffixFilter filter = FileFilters . CompressedFileFilter ; chooser . addChoosableFileFilter ( filter ) ; chooser . addChoosableFileFilter ( UncompressedFileFilter ) ; chooser . addChoosableFileFilter ( XMIFilter ) ; chooser . setFileFilter ( filter ) ; int retval = chooser . showOpenDialog ( pb ) ; if ( retval == 0 ) { File theFile = chooser . getSelectedFile ( ) ; if ( theFile != null ) { String path = theFile . getParent ( ) ; Globals . setLastDirectory ( path ) ; URL url = theFile . toURL ( ) ; if ( url != null ) { pb . setProject ( Project . makeEmptyProject ( ) ) ; p = Project . loadProject ( url ) ; pb . setProject ( p ) ; pb . showStatus ( MessageFormat . format ( Localizer . localize ( "Actions" , "template.open_project.status_read" ) , new Object [ ] { url . toString ( ) } ) ) ; } return ; } } } catch ( IOException ignore ) { System . out . println ( "got<seq2seq4repair_space>an<seq2seq4repair_space>IOException<seq2seq4repair_space>in<seq2seq4repair_space>ActionOpenProject" ) ; } } }

Fix:
chooser = OsUtil . getFileChooser ( ) ;
Buggy code:
public class OpenAction extends FrameAction implements SelectionListener { public OpenAction ( AbstractFrameController frameController ) { } public void actionPerformed ( ActionEvent evt ) { <START_BUG> processor . addOp ( new org . columba . mail . gui . attachment . command . OpenAttachmentCommand ( getFrameController ( ) . getSelectionManager ( ) . getHandler ( "mail.attachment" ) . getSelection ( ) ) ) ; <END_BUG> } public void selectionChanged ( SelectionChangedEvent e ) { } }

Fix:
processor . addOp ( new org . columba . mail . gui . attachment . command . OpenAttachmentCommand ( getFrameMediator ( ) . getSelectionManager ( ) . getHandler ( "mail.attachment" ) . getSelection ( ) ) ) ;
Buggy code:
public class CmpEntityBeanHomeFinderInterceptorFactory extends EntityBeanHomeFinderInterceptorFactory { private final Method finderMethod ; private final boolean localHome ; public CmpEntityBeanHomeFinderInterceptorFactory ( final Method finderMethod , final boolean localHome ) { } protected Object invokeFind ( final InterceptorContext context , final EntityBeanComponentInstance instance ) throws Exception { final CmpEntityBeanComponentInstance cmpInstance = CmpEntityBeanComponentInstance . class . cast ( instance ) ; final CmpEntityBeanComponent cmpComponent = cmpInstance . getComponent ( ) ; try { cmpComponent . getComponentClass ( ) . getDeclaredMethod ( finderMethod . getName ( ) , finderMethod . getParameterTypes ( ) ) ; return super . invokeFind ( context , instance ) ; } catch ( NoSuchMethodException ignored ) { } final JDBCEntityPersistenceStore store = cmpComponent . getStoreManager ( ) ; final CmpEntityBeanContext entityContext = cmpInstance . getEjbContext ( ) ; if ( ! ( store . getCmpConfig ( ) . isSyncOnCommitOnly ( ) ) ) { cmpComponent . synchronizeEntitiesWithinTransaction ( entityContext . getTransaction ( ) ) ; } final JDBCQueryCommand . EntityProxyFactory factory = new JDBCQueryCommand . EntityProxyFactory ( ) { public Object getEntityObject ( final Object primaryKey ) { <START_BUG> return localHome ? cmpComponent . getEjbLocalObject ( primaryKey ) : cmpComponent . getEJBObject ( primaryKey ) ; <END_BUG> } } ; if ( ( getReturnType ( ) ) == ( ReturnType . SINGLE ) ) { return store . findEntity ( context . getMethod ( ) , context . getParameters ( ) , entityContext , factory ) ; } else { return store . findEntities ( context . getMethod ( ) , context . getParameters ( ) , entityContext , factory ) ; } } protected Object prepareResults ( final InterceptorContext context , final Object result , final EntityBeanComponent component ) throws ObjectNotFoundException { } }

Fix:
return localHome ? cmpComponent . getEJBLocalObject ( primaryKey ) : cmpComponent . getEJBObject ( primaryKey ) ;
Buggy code:
public class InlineAttachmentsViewer extends JPanel implements ICustomViewer { private Vector attachmentPanels ; private Vector viewers ; private MailFrameMediator mediator ; private ViewerPluginHandler handler ; private int counter ; public InlineAttachmentsViewer ( MailFrameMediator mediator ) { } public void view ( IMailbox folder , Object uid , MailFrameMediator mediator ) throws Exception { } private void traverseChildren ( MimePart parent , MailFolderCommandReference ref ) throws Exception , PluginLoadingFailedException { } private void printAddress ( Integer [ ] address ) { } private void createChild ( MimePart child , MailFolderCommandReference ref ) throws Exception , PluginLoadingFailedException { printAddress ( child . getAddress ( ) ) ; printAddress ( ref . getAddress ( ) ) ; MimeHeader parentHeader = child . getHeader ( ) ; if ( parentHeader . getMimeType ( ) . equalsIgnoreCase ( "multipart//alternative" ) ) { traverseAlternativePart ( child , ref ) ; } else { <START_BUG> JPanel panel = createPanel ( ref ) ; <END_BUG> attachmentPanels . add ( panel ) ; } ( counter ) ++ ; } private void traverseAlternativePart ( MimePart mp , MailFolderCommandReference ref ) throws Exception { } private boolean prefersHTMLMimePart ( ) { } private JPanel createPanel ( MailFolderCommandReference ref ) throws Exception { } private IMimePartViewer getViewer ( String type , String subtype ) throws PluginLoadingFailedException { } private Integer [ ] getBodyPartAddress ( MimeTree mimePartTree ) { } private boolean hasHtmlPart ( MimePart mimeTypes ) { } private JPanel createMessagePane ( IViewer viewer , MailFolderCommandReference ref ) { } private MailFolderCommandReference createNewReference ( MimeHeader h , MimePart mp , IMailbox folder , Object uid ) throws Exception { } private JPanel createDefaultAttachmentPanel ( String description , IViewer viewer , MailFolderCommandReference ref ) { } public void updateGUI ( ) throws Exception { } private JPanel createFileAttachmentPanel ( String name , IViewer viewer , MailFolderCommandReference ref ) { } private JPanel createBasicPanel ( String name , MailFolderCommandReference ref , boolean withHeader ) { } public JComponent getView ( ) { } public boolean isVisible ( ) { } class OpenActionListener implements ActionListener { MailFolderCommandReference ref ; public OpenActionListener ( MailFolderCommandReference ref ) { } public void actionPerformed ( ActionEvent arg0 ) { } } class OpenWithActionListener implements ActionListener { MailFolderCommandReference ref ; public OpenWithActionListener ( MailFolderCommandReference ref ) { } public void actionPerformed ( ActionEvent arg0 ) { } } class SaveAsActionListener implements ActionListener { MailFolderCommandReference ref ; public SaveAsActionListener ( MailFolderCommandReference ref ) { } public void actionPerformed ( ActionEvent arg0 ) { } } }

Fix:
JPanel panel = createPanel ( new MailFolderCommandReference ( ref . getSourceFolder ( ) , ref . getUids ( ) , ref . getAddress ( ) ) ) ;
Buggy code:
public class ImportSettingsDialog extends AbstractSimulinkSettingsDialog { private String importedModelName ; private Map < String , BooleanFieldEditor > filterSelectors = Maps . newHashMap ( ) ; private Map < String , Boolean > filterSelections = Maps . newHashMap ( ) ; public Map < String , Boolean > getSelectedFiltersById ( ) { } private StringFieldEditor importedModelNameEditor ; private IPreferenceStore store ; public ImportSettingsDialog ( Shell parentShell , String exporterArgs , File targetDirectory ) { } @ Override protected void configureShell ( Shell newShell ) { } @ Override protected void buttonPressed ( int buttonId ) { if ( buttonId == ( IDialogConstants . OK_ID ) ) { importedModelName = importedModelNameEditor . getStringValue ( ) ; <START_BUG> Set < String > filterIds = filterSelections . keySet ( ) ; <END_BUG> for ( String filterId : filterIds ) { BooleanFieldEditor fieldEditor = filterSelectors . get ( filterId ) ; filterSelections . put ( filterId , fieldEditor . getBooleanValue ( ) ) ; } } super . buttonPressed ( buttonId ) ; } public String getImportedModelName ( ) { } @ Override protected List < FieldEditor > additionalFields ( Composite fieldEditorParent ) { } public void setPreferenceStore ( IPreferenceStore store ) { } No newline ; at end ; of file ; }

Fix:
Set < String > filterIds = filterSelectors . keySet ( ) ;
Buggy code:
public class ServerGroupProfileWriteAttributeHandler extends StringLengthValidatingHandler { public static final ServerGroupProfileWriteAttributeHandler INSTANCE = new ServerGroupProfileWriteAttributeHandler ( ) ; private ServerGroupProfileWriteAttributeHandler ( ) { } @ Override protected void modelChanged ( OperationContext context , ModelNode operation , String attributeName , ModelNode newValue , ModelNode currentValue ) throws OperationFailedException { if ( newValue . equals ( currentValue ) ) { ServerOperationResolver . addToDontPropagateToServersAttachment ( context , operation ) ; } final Resource profile = context . getOriginalRootResource ( ) . getChild ( PathElement . pathElement ( PROFILE , newValue . asString ( ) ) ) ; if ( profile == null ) { throw MESSAGES . noProfileCalled ( newValue . asString ( ) ) ; } <START_BUG> context . completeStep ( NOOP_ROLLBACK_HANDLER ) ; <END_BUG> } }

Fix:
context . stepCompleted ( ) ;
Buggy code:
public class ObjectElement extends AbstractJsonObject { public AbstractJsonObject parent ; public ObjectElement ( AbstractJsonObject parent ) { } @ Override public double similarity ( IElement anotherElement ) { } @ Override public String getText ( ) { <START_BUG> return ( this . parent . getText ( ) ) + "<seq2seq4repair_space>-><seq2seq4repair_space>{}" ; <END_BUG> } @ Override public int getMaxDependencies ( String dependencyID ) { } @ Override public int getMinDependencies ( String dependencyID ) { } }

Fix:
return ( this . parent . getText ( ) ) + "_{}" ;
Buggy code:
public interface KrollProxySupport { public void onPropertyChanged ( String name , Object value ) { } public void onPropertiesChanged ( Object [ ] [ ] changes ) { } public KrollObject getKrollObject ( ) { } public void setKrollObject ( KrollObject object ) { } public Object getIndexedProperty ( int index ) { } public void setIndexedProperty ( int index , Object value ) { } public void onHasListenersChanged ( String event , boolean hasListeners ) { } <START_BUG> public void onEventFired ( String event , Object [ ] args ) ; <END_BUG> }

Fix:
public void onEventFired ( String event , String data ) ;
Buggy code:
public class Client { private Socket socket ; private ClientController controller ; private ObjectOutputStream oos ; private ObjectInputStream ois ; private Client . Listener listener ; public Client ( String ip , int port , ClientController clientController ) { } public void disconnect ( ) { } public CommandMessage readMessage ( ) { } public void sendMessage ( CommandMessage cmdMessage ) { } public void listenForMessage ( ) { try { CommandMessage message = ( ( CommandMessage ) ( ois . readObject ( ) ) ) ; if ( ( message . getCommand ( ) ) == ( Commands . LOGIN ) ) { System . out . println ( "Login" ) ; controller . login ( ) ; } else if ( ( message . getCommand ( ) ) == ( Commands . GETHERO ) ) { System . out . println ( "GetHero" ) ; controller . setHero ( message ) ; } else if ( ( message . getCommand ( ) ) == ( Commands . MATCHMAKING_MATCH_FOUND ) ) { System . out . println ( "Match<seq2seq4repair_space>Found" ) ; controller . matchFound ( message ) ; } else if ( ( message . getCommand ( ) ) == ( Commands . MATCH_PLAYCARD ) ) ; { <START_BUG> controller . playCard ( ) ; <END_BUG> } } catch ( ClassNotFoundException | IOException e ) { System . out . println ( "User<seq2seq4repair_space>Disconnected" ) ; e . printStackTrace ( ) ; } } private class Listener extends Thread { @ Override public void run ( ) { } } }

Fix:
controller . cardPlayed ( message ) ;
Buggy code:
public class LibPath extends AbstractTask { private String libraryId ; private URL url ; public void setLibraryId ( String libraryId ) { } public void setURL ( URL url ) throws ExecutionException { } public void setFile ( File file ) throws ExecutionException { } public void setDir ( File dir ) throws ExecutionException { } public void validateComponent ( ) throws ExecutionException { } public void execute ( ) throws ExecutionException { <START_BUG> AntContext context = getContext ( ) ; <END_BUG> ComponentService componentService = ( ( ComponentService ) ( context . getCoreService ( ComponentService . class ) ) ) ; componentService . addLibPath ( libraryId , url ) ; } private void checkNullURL ( ) throws ExecutionException { } }

Fix:
AntContext context = getAntContext ( ) ;
Buggy code:
public class ExclamationTopology { public static class ExclamationBolt extends BaseRichBolt { OutputCollector _collector ; @ Override public void prepare ( Map conf , TopologyContext context , OutputCollector collector ) { } @ Override public void execute ( Tuple tuple ) { } @ Override public void declareOutputFields ( OutputFieldsDeclarer declarer ) { } } public static void main ( String [ ] args ) throws Exception { TopologyBuilder builder = new TopologyBuilder ( ) ; builder . setSpout ( "word" , new TestWordSpout ( ) , 10 ) ; builder . setBolt ( "exclaim1" , new ExclamationTopology . ExclamationBolt ( ) , 3 ) . shuffleGrouping ( "word" ) ; builder . setBolt ( "exclaim2" , new ExclamationTopology . ExclamationBolt ( ) , 2 ) . shuffleGrouping ( "exclaim1" ) ; Config conf = new Config ( ) ; conf . setDebug ( true ) ; if ( ( args != null ) && ( ( args . length ) > 0 ) ) { conf . setNumWorkers ( 3 ) ; <START_BUG> StormSubmitter . submitTopology ( args [ 0 ] , conf , builder . createTopology ( ) ) ; <END_BUG> } else { LocalCluster cluster = new LocalCluster ( ) ; cluster . submitTopology ( "test" , conf , builder . createTopology ( ) ) ; Utils . sleep ( 10000 ) ; cluster . killTopology ( "test" ) ; cluster . shutdown ( ) ; } } }

Fix:
StormSubmitter . submitTopologyWithProgressBar ( args [ 0 ] , conf , builder . createTopology ( ) ) ;
Buggy code:
public class HybiWebSocketFrameDecoder extends ReplayingDecoder < HybiWebSocketFrameDecoder . State > { private final UTF8Output utf8Output = new UTF8Output ( ) ; private final boolean isServer ; private final boolean requireMaskedInboundFrames ; private final byte [ ] outboundMaskingKey ; private boolean frameFin ; private int frameOpcode ; private long framePayloadLen ; private byte [ ] inboundMaskingKey ; private DecodingHybiFrame currentFrame ; public static enum State { FRAME_START , MASKING_KEY , PAYLOAD , CORRUPT ; } public static HybiWebSocketFrameDecoder serverSide ( ) { } public static HybiWebSocketFrameDecoder clientSide ( byte [ ] outboundMaskingKey ) { } private HybiWebSocketFrameDecoder ( boolean isServer , byte [ ] outboundMaskingKey ) { } @ Override protected Object decode ( ChannelHandlerContext ctx , Channel channel , ChannelBuffer buffer , HybiWebSocketFrameDecoder . State state ) throws Exception { } static void applyMask ( ChannelBuffer data , byte [ ] maskingKey ) { <START_BUG> int length = data . arrayOffset ( ) ; <END_BUG> for ( int i = 0 ; i < length ; i ++ ) { data . setByte ( i , ( ( data . getByte ( i ) ) ^ ( maskingKey [ ( i % 4 ) ] ) ) ) ; } } private void protocolViolation ( Channel channel , String reason ) throws CorruptedFrameException { } private int toFrameLength ( long l ) throws TooLongFrameException { } }

Fix:
int length = data . writerIndex ( ) ;
Buggy code:
@ Component @ Provides ( specifications = EventsService . class ) @ Instantiate public class EventsServiceImpl implements EventsService { @ Requires EventDao eventDao ; @ Requires TalkDao talkDao ; @ Requires SpeakerDao speakerDao ; @ Requires DSLContext dslContext ; private List < Event > getAndBuild ( Condition condition ) { } private Event fillCurrent ( IEvent currentEvent ) { List < Talk > talks = talkDao . fetchByEventId ( currentEvent . getId ( ) ) . stream ( ) . map ( ( ITalk talk ) -> { return org . jug . montpellier . models . Talk . build ( talk ) ; <START_BUG> } ) . collect ( Collectors . toList ( ) ) ; <END_BUG> List < ISpeaker > speakers = talks . stream ( ) . map ( ( Talk talk ) -> { ISpeaker speaker = speakerDao . fetchOneById ( talk . getSpeakerId ( ) ) ; talk . setSpeaker ( speaker ) ; return speaker ; } ) . collect ( Collectors . toList ( ) ) ; return Event . build ( currentEvent , speakers , talks ) ; } @ Override public Result renderEvents ( JugController . Templatable templatable ) { } @ Override public Result renderEvents ( JugController . Templatable templatable , Long id ) { } }

Fix:
} ) . sorted ( ( t1 , t2 ) -> t1 . getOrderinevent ( ) . compareTo ( t2 . getOrderinevent ( ) ) ) . collect ( Collectors . toList ( ) ) ;
Buggy code:
public class PratilipiContentUtil { private static final Logger logger = Logger . getLogger ( PratilipiContentUtil . class . getName ( ) ) ; private static final String pageBreak = "<div<seq2seq4repair_space>style=\"page-break-after:always\"><//div>" ; private static final Pattern pageBreakPattern = Pattern . compile ( ( "<div<seq2seq4repair_space>style=\"page-break-after:always\"><//div>" + ( ( ( "|" + "<div\\s+style=\"page-break-(before|after).+?>(.+?)<//div>" ) + "|" ) + "<hr\\s+style=\"page-break-(before|after).+?>" ) ) ) ; private static final Pattern titlePattern = Pattern . compile ( ( "<h1.*?>(<.+?>)*(?<title>.+?)(<//.+?>)*<//h1>" + ( "|" + "<h2.*?>(<.+?>)*(?<subTitle>.+?)(<//.+?>)*<//h2>" ) ) ) ; private static final String nonKeywordsPattern = "<[^>]*>|[!-//:-@\\[-`{-~]|।|&nbsp;|&lt;|&gt;|&amp;|&cent;|&pound;|&yen;|&euro;|&copy;|&reg;" ; private String content ; private Matcher matcher ; public PratilipiContentUtil ( String content ) { } public int getPageCount ( ) { } public String getContent ( int pageNo ) { } public String updateContent ( int pageNo , String pageContent ) { } public String updateContent ( int pageNo , String pageContent , boolean insertNew ) { } public String generateIndex ( ) { } public String generateKeywords ( ) { String [ ] words = this . content . replaceAll ( PratilipiContentUtil . nonKeywordsPattern , "<seq2seq4repair_space>" ) . split ( "\\s+(\\w\\s+)*" ) ; Set < String > wordSet = new HashSet < String > ( Arrays . asList ( words ) ) ; words = wordSet . toArray ( new String [ wordSet . size ( ) ] ) ; String keywords = "" ; for ( String word : words ) <START_BUG> keywords = word + "<seq2seq4repair_space>" ; <END_BUG> return keywords . trim ( ) ; } }

Fix:
keywords = ( keywords + word ) + "<seq2seq4repair_space>" ;
Buggy code:
public abstract class AbstractServerModelUpdate < R > extends AbstractModelUpdate < ServerModel , R > { private static final long serialVersionUID = 1977647714406421073L ; private final boolean requiresRestart ; private final boolean isDeploymentUpdate ; protected AbstractServerModelUpdate ( ) { } protected AbstractServerModelUpdate ( final boolean requiresRestart , final boolean isDeployment ) { } @ Override public final Class < ServerModel > getModelElementType ( ) { } public final boolean requiresRestart ( ) { } public boolean isDeploymentUpdate ( ) { } @ Override protected abstract void applyUpdate ( ServerModel element ) throws UpdateFailedException { } public < P > void applyUpdate ( UpdateContext updateContext , UpdateResultHandler < ? super R , P > resultHandler , P param ) { } <START_BUG> public void applyUpdateBootAction ( UpdateContext updateContext ) { <END_BUG> applyUpdate ( updateContext , NULL , null ) ; } @ Override protected final AbstractServerModelUpdate < R > getServerModelUpdate ( ) { } @ Override public abstract AbstractServerModelUpdate < ? > getCompensatingUpdate ( ServerModel original ) { } }

Fix:
public void applyUpdateBootAction ( BootUpdateContext updateContext ) {
Buggy code:
public class ErrorNotificationManager { private static final String ERROR_JOB = "errorstate.gif" ; static final String ERROR_JOB_KEY = "ERROR_JOB" ; private Collection errors = Collections . synchronizedSet ( new HashSet ( ) ) ; private JobErrorDialog dialog ; public ErrorNotificationManager ( ) { } void setUpImages ( URL iconsRoot ) throws MalformedURLException { } void addError ( IStatus status , Job job ) { } private void showError ( final ErrorInfo errorInfo ) { } Collection getErrors ( ) { } private IStatus openErrorDialog ( String title , String msg , final ErrorInfo errorInfo ) { IWorkbench workbench = PlatformUI . getWorkbench ( ) ; if ( ( workbench instanceof Workbench ) && ( ( ( Workbench ) ( workbench ) ) . isClosing ( ) ) ) return Status . CANCEL_STATUS ; <START_BUG> dialog = new JobErrorDialog ( ProgressManagerUtil . getNonModalShell ( ) , title , msg , errorInfo , ( ( ( ( IStatus . OK ) | ( IStatus . INFO ) ) | ( IStatus . WARNING ) ) | ( IStatus . ERROR ) ) ) ; <END_BUG> dialog . open ( ) ; return Status . OK_STATUS ; } void removeErrors ( Collection errorsToRemove ) { } private void removeFromFinishedJobs ( Collection errorsToRemove ) { } private void clearAllErrors ( ) { } public boolean showErrorFor ( Job job , String title , String msg ) { } private ErrorInfo getMostRecentError ( ) { } private ErrorInfo getErrorInfo ( Job job ) { } public boolean hasErrors ( ) { } public void dialogClosed ( ) { } }

Fix:
dialog = new JobErrorDialog ( ProgressManagerUtil . getDefaultParent ( ) , title , msg , errorInfo , ( ( ( ( IStatus . OK ) | ( IStatus . INFO ) ) | ( IStatus . WARNING ) ) | ( IStatus . ERROR ) ) ) ;
Buggy code:
@ RunWith ( Arquillian . class ) @ RunAsClient public class EarDeploymentTestCase extends ContainerResourceMgmtTestBase { @ ArquillianResource private ManagementClient managementClient ; @ ArquillianResource private URL url ; static String subdeploymentName = "complex_ij.rar" ; static String deploymentName = "new.ear" ; @ Deployment public static EnterpriseArchive createDeployment ( ) throws Exception { } @ Test public void testWebConfiguration ( ) throws Throwable { } @ Test @ Ignore public void testConfiguration ( ) throws Throwable { <START_BUG> assertNotNull ( "Deployment<seq2seq4repair_space>metadata<seq2seq4repair_space>for<seq2seq4repair_space>ear<seq2seq4repair_space>not<seq2seq4repair_space>found" , managementClient . getDeploymentMetaData ( EarDeploymentTestCase . deploymentName ) ) ; <END_BUG> final ModelNode address = new ModelNode ( ) ; address . add ( "deployment" , EarDeploymentTestCase . deploymentName ) . add ( "subdeployment" , EarDeploymentTestCase . subdeploymentName ) . add ( "subsystem" , "resource-adapters" ) ; address . protect ( ) ; final ModelNode snapshot = new ModelNode ( ) ; snapshot . get ( OP ) . set ( "read-resource" ) ; snapshot . get ( "recursive" ) . set ( "true" ) ; snapshot . get ( OP_ADDR ) . set ( address ) ; executeOperation ( snapshot ) ; } }

Fix:
assertNotNull ( "Deployment<seq2seq4repair_space>metadata<seq2seq4repair_space>for<seq2seq4repair_space>ear<seq2seq4repair_space>not<seq2seq4repair_space>found" , managementClient . getProtocolMetaData ( EarDeploymentTestCase . deploymentName ) ) ;
Buggy code:
public class AjaxController extends BaseController { private static Gson gson = new Gson ( ) ; @ Before protected static void beforeAction ( ) throws NoSuchMethodException , SecurityException { Logger . info ( "Action<seq2seq4repair_space>-<seq2seq4repair_space>%s" , Request . current ( ) . path ) ; if ( ( getActionAnnotation ( GuestAuthorization . class ) ) != null ) { return ; } String sessionId = Session . current ( ) . get ( "sid" ) ; <START_BUG> if ( StringUtils . isNotBlank ( sessionId ) ) { <END_BUG> sessionId = params . get ( "sid" ) ; } sessionInfo = AdminService . getSessionInfo ( sessionId ) ; if ( ( sessionInfo ) != null ) { if ( ! ( checkRouterPrivilege ( sessionInfo ) ) ) { AjaxController . renderErrorJson ( Messages . get ( "invalid.router" ) ) ; } return ; } AjaxController . renderErrorJson ( Messages . get ( "login.authorize.failed" ) ) ; } @ Catch ( Exception . class ) protected static void onException ( Throwable throwable ) { } protected static void renderSuccessJson ( ) { } protected static void renderSuccessJson ( Integer id ) { } protected static void renderSuccessJson ( String message ) { } protected static void renderSuccessJson ( Object obj ) { } protected static void renderErrorJson ( String message ) { } }

Fix:
if ( StringUtils . isBlank ( sessionId ) ) {
Buggy code:
public class AspectLogger implements ICommandFunction { @ Override public void execute ( String [ ] arguments , IPlayer player ) { List < String > lines = new ArrayList ( ) ; for ( Map . Entry < List , AspectList > entry : objectTags . entrySet ( ) ) { List < String > itemList = new ArrayList < String > ( ) ; for ( int i = 0 ; i < ( entry . getKey ( ) . size ( ) ) ; i += 2 ) { Item item = ( ( Item ) ( entry . getKey ( ) . get ( i ) ) ) ; <START_BUG> itemList . add ( ( ( ( ( "<" + ( item . itemRegistry . getNameForObject ( item ) ) ) + ":" ) + ( entry . getKey ( ) . get ( ( i + 1 ) ) ) ) + ">" ) ) ; <END_BUG> } lines . add ( ( ( ( itemList . toString ( ) ) + ":<seq2seq4repair_space>" ) + ( ThaumcraftHelper . aspectsToString ( entry . getValue ( ) ) ) ) ) ; } for ( EntityTags tags : ThaumcraftApi . scanEntities ) { List < String > tagsList = new ArrayList < String > ( ) ; for ( EntityTagsNBT tag : tags . nbts ) { tagsList . add ( ( ( ( tag . name ) + ":" ) + ( tag . value ) ) ) ; } String stringTags = "" ; if ( ( tags . nbts . length ) != 0 ) stringTags = ":" + ( tagsList . toString ( ) ) ; lines . add ( ( ( ( ( ( "<" + ( tags . entityName ) ) + stringTags ) + ">" ) + ":<seq2seq4repair_space>" ) + ( ThaumcraftHelper . aspectsToString ( tags . aspects ) ) ) ) ; } System . out . println ( ( "Aspects:<seq2seq4repair_space>" + ( lines . size ( ) ) ) ) ; for ( String line : lines ) { System . out . println ( ( "Aspect<seq2seq4repair_space>" + line ) ) ; MineTweakerAPI . logCommand ( line ) ; } if ( player != null ) { player . sendChat ( platform . getMessage ( "List<seq2seq4repair_space>generated;<seq2seq4repair_space>see<seq2seq4repair_space>minetweaker.log<seq2seq4repair_space>in<seq2seq4repair_space>your<seq2seq4repair_space>minecraft<seq2seq4repair_space>dir" ) ) ; } } }

Fix:
itemList . add ( ( ( ( ( "<" + ( itemRegistry . getNameForObject ( item ) ) ) + ":" ) + ( entry . getKey ( ) . get ( ( i + 1 ) ) ) ) + ">" ) ) ;
Buggy code:
public class AmzaService implements HostRingProvider , AmzaInstance { private static final MetricLogger LOG = MetricLoggerFactory . getLogger ( ) ; private RingHost ringHost ; private ScheduledExecutorService scheduledThreadPool ; private final OrderIdProvider orderIdProvider ; private final Marshaller marshaller ; private final TableReplicator tableReplicator ; private final AmzaTableWatcher amzaTableWatcher ; private final TableStoreProvider tableStoreProvider ; private final TableName tableIndexKey = new TableName ( "MASTER" , "TABLE_INDEX" , null , null ) ; public AmzaService ( OrderIdProvider orderIdProvider , Marshaller marshaller , TableReplicator tableReplicator , TableStoreProvider tableStoreProvider , AmzaTableWatcher amzaTableWatcher ) { } public synchronized RingHost ringHost ( ) { } public synchronized void start ( RingHost ringHost , long resendReplicasIntervalInMillis , long applyReplicasIntervalInMillis , long takeFromNeighborsIntervalInMillis , final long compactTombstoneIfOlderThanNMillis ) throws Exception { } public synchronized void stop ( ) throws Exception { } @ Override public void addRingHost ( String ringName , RingHost ringHost ) throws Exception { } @ Override public void removeRingHost ( String ringName , RingHost ringHost ) throws Exception { } @ Override public List < RingHost > getRing ( String ringName ) throws Exception { } @ Override public HostRing getHostRing ( String ringName ) throws Exception { } private TableName createRingTableName ( String ringName ) { } private boolean createTable ( TableName tableName ) throws Exception { } public AmzaTable getTable ( TableName tableName ) throws Exception { } @ Override public List < TableName > getTableNames ( ) { } public Map < TableName , AmzaTable > getTables ( ) throws Exception { } @ Override public void destroyTable ( TableName tableName ) throws Exception { } @ Override public void updates ( TableName tableName , RowScanable rowUpdates ) throws Exception { } public void watch ( TableName tableName , RowChanges rowChanges ) throws Exception { } public RowChanges unwatch ( TableName tableName ) throws Exception { } @ Override public void takeRowUpdates ( TableName tableName , long transationId , RowScan rowUpdates ) throws Exception { } public void buildRandomSubRing ( String ringName , int desiredRingSize ) throws Exception { <START_BUG> List < RingHost > ring = getRing ( "master" ) ; <END_BUG> if ( ( ring . size ( ) ) < desiredRingSize ) { throw new IllegalStateException ( ( "Current<seq2seq4repair_space>master<seq2seq4repair_space>ring<seq2seq4repair_space>is<seq2seq4repair_space>not<seq2seq4repair_space>large<seq2seq4repair_space>enough<seq2seq4repair_space>to<seq2seq4repair_space>support<seq2seq4repair_space>a<seq2seq4repair_space>ring<seq2seq4repair_space>of<seq2seq4repair_space>size:" + desiredRingSize ) ) ; } Collections . shuffle ( ring ) ; for ( int i = 0 ; i < desiredRingSize ; i ++ ) { addRingHost ( ringName , ring . get ( i ) ) ; } } public void printService ( ) throws Exception { } }

Fix:
List < RingHost > ring = getRing ( "MASTER" ) ;
Buggy code:
public class TestSlowFuzzyQuery2 extends LuceneTestCase { static final float epsilon = 1.0E-5F ; static int [ ] [ ] mappings = new int [ ] [ ] { new int [ ] { 64 , 65 } , new int [ ] { 64 , 405 } , new int [ ] { 64 , 2310 } , new int [ ] { 64 , 66575 } , new int [ ] { 404 , 405 } , new int [ ] { 404 , 2310 } , new int [ ] { 404 , 66575 } , new int [ ] { 2309 , 2310 } , new int [ ] { 2309 , 66575 } , new int [ ] { 66574 , 66575 } } ; public void testFromTestData ( ) throws Exception { } public void assertFromTestData ( int [ ] codePointTable ) throws Exception { if ( VERBOSE ) { System . out . println ( ( "TEST:<seq2seq4repair_space>codePointTable=" + codePointTable ) ) ; } InputStream stream = getClass ( ) . getResourceAsStream ( "fuzzyTestData.txt" ) ; BufferedReader reader = new BufferedReader ( new InputStreamReader ( stream , StandardCharsets . UTF_8 ) ) ; int bits = Integer . parseInt ( reader . readLine ( ) ) ; int terms = ( ( int ) ( Math . pow ( 2 , bits ) ) ) ; Directory dir = newDirectory ( ) ; RandomIndexWriter writer = new RandomIndexWriter ( random ( ) , dir , newIndexWriterConfig ( TEST_VERSION_CURRENT , new org . apache . lucene . analysis . MockAnalyzer ( random ( ) , MockTokenizer . KEYWORD , false ) ) . setMergePolicy ( newLogMergePolicy ( ) ) ) ; Document doc = new Document ( ) ; Field field = newTextField ( "field" , "" , NO ) ; doc . add ( field ) ; for ( int i = 0 ; i < terms ; i ++ ) { field . setStringValue ( TestSlowFuzzyQuery2 . mapInt ( codePointTable , i ) ) ; writer . addDocument ( doc ) ; } IndexReader r = writer . getReader ( ) ; IndexSearcher searcher = newSearcher ( r ) ; if ( VERBOSE ) { System . out . println ( ( "TEST:<seq2seq4repair_space>searcher=" + searcher ) ) ; } searcher . setSimilarity ( new DefaultSimilarity ( ) ) ; <START_BUG> writer . close ( ) ; <END_BUG> String line ; while ( ( line = reader . readLine ( ) ) != null ) { String [ ] params = line . split ( "," ) ; String query = TestSlowFuzzyQuery2 . mapInt ( codePointTable , Integer . parseInt ( params [ 0 ] ) ) ; int prefix = Integer . parseInt ( params [ 1 ] ) ; int pqSize = Integer . parseInt ( params [ 2 ] ) ; float minScore = Float . parseFloat ( params [ 3 ] ) ; SlowFuzzyQuery q = new SlowFuzzyQuery ( new Term ( "field" , query ) , minScore , prefix ) ; q . setRewriteMethod ( new MultiTermQuery . TopTermsBoostOnlyBooleanQueryRewrite ( pqSize ) ) ; int expectedResults = Integer . parseInt ( reader . readLine ( ) ) ; TopDocs docs = searcher . search ( q , expectedResults ) ; assertEquals ( expectedResults , docs . totalHits ) ; for ( int i = 0 ; i < expectedResults ; i ++ ) { String [ ] scoreDoc = reader . readLine ( ) . split ( "," ) ; assertEquals ( Integer . parseInt ( scoreDoc [ 0 ] ) , docs . scoreDocs [ i ] . doc ) ; assertEquals ( Float . parseFloat ( scoreDoc [ 1 ] ) , docs . scoreDocs [ i ] . score , TestSlowFuzzyQuery2 . epsilon ) ; } } r . close ( ) ; dir . close ( ) ; } private static String mapInt ( int [ ] codePointTable , int i ) { } }

Fix:
writer . shutdown ( ) ;
Buggy code:
public class FileBrowser extends TreeView < TreeFile > { private MainView mainview ; public FileBrowser ( MainView mainview ) { } @ SuppressWarnings ( "unchecked" ) private void init ( ) { getStylesheets ( ) . add ( "banger//gui//filebrowser//filebrowser.css" ) ; setMinWidth ( 150 ) ; setPrefWidth ( 200 ) ; setMaxWidth ( 300 ) ; getSelectionModel ( ) . clearSelection ( ) ; <START_BUG> findFiles ( new File ( "D:\\Musik" ) , null ) ; <END_BUG> } private void findFiles ( File dir , TreeItem < TreeFile > parent ) { } }

Fix:
findFiles ( new File ( "C:\\Users\\Merlin\\Music" ) , null ) ;
Buggy code:
public class BreakpointChangeClassifier { public static List < BreakpointChangeType > classify ( Breakpoint old_bp , Breakpoint new_bp ) { List < BreakpointChangeType > changes = new ArrayList < > ( ) ; <START_BUG> if ( old_bp == null ) { <END_BUG> changes . add ( UNKNOWN ) ; return changes ; } BreakpointChangeClassifier . checkForEnablementChanges ( old_bp , new_bp , changes ) ; BreakpointChangeClassifier . checkForHitCountChanges ( old_bp , new_bp , changes ) ; BreakpointChangeClassifier . checkForSuspendPolicyChanges ( old_bp , new_bp , changes ) ; BreakpointChangeClassifier . checkForConditionChanges ( old_bp , new_bp , changes ) ; if ( ( changes . size ( ) ) == 0 ) { changes . add ( UNKNOWN ) ; } return changes ; } private static void checkForEnablementChanges ( Breakpoint old_bp , Breakpoint new_bp , List < BreakpointChangeType > changes ) { } private static void checkForHitCountChanges ( Breakpoint old_bp , Breakpoint new_bp , List < BreakpointChangeType > changes ) { } private static void checkForSuspendPolicyChanges ( Breakpoint old_bp , Breakpoint new_bp , List < BreakpointChangeType > changes ) { } private static void checkForConditionChanges ( Breakpoint old_bp , Breakpoint new_bp , List < BreakpointChangeType > changes ) { } }

Fix:
if ( ( old_bp == null ) || ( new_bp == null ) ) {
Buggy code:
public class StringID extends BaseID { private static final long serialVersionUID = 3256437019155446068L ; public static class StringIDNamespace extends Namespace { private static final long serialVersionUID = 7924280015192029963L ; public StringIDNamespace ( String name , String desc ) { } public StringIDNamespace ( ) { } <START_BUG> public ID createInstance ( Class [ ] argTypes , Object [ ] args ) throws IDCreateException { <END_BUG> return new StringID ( this , ( ( String ) ( args [ 0 ] ) ) ) ; } public String getScheme ( ) { } } protected String value ; protected StringID ( Namespace n , String s ) { } public int compareTo ( Object o ) { } public boolean equals ( Object o ) { } public String getName ( ) { } public int hashCode ( ) { } public Namespace getNamespace ( ) { } public String toString ( ) { } public URI toURI ( ) throws URISyntaxException { } protected int namespaceCompareTo ( BaseID obj ) { } protected boolean namespaceEquals ( BaseID obj ) { } protected String namespaceGetName ( ) { } protected int namespaceHashCode ( ) { } protected URI namespaceToURI ( ) throws URISyntaxException { } protected synchronized void setEmptyNamespace ( ) { } }

Fix:
public ID createInstance ( Object [ ] args ) throws IDCreateException {
Buggy code:
public class SSLTest extends BaseJDBCTestCase { private InputStream [ ] _inputStreamHolder ; private NetworkServerTestSetup nsTestSetup ; public SSLTest ( String testName ) { } public static Test suite ( ) { } protected void tearDown ( ) throws Exception { } private static Test decorateTest ( String testName ) { } private static String [ ] getStartupProperties ( ) { } public void testSSLBasicDSConnect ( ) throws Exception { } public void testSSLBasicDSPlainConnect ( ) throws Exception { DataSource ds = JDBCDataSource . getDataSource ( ) ; JDBCDataSource . setBeanProperty ( ds , "createDatabase" , "create" ) ; try { Connection c2 = ds . getConnection ( ) ; c2 . close ( ) ; fail ( ) ; } catch ( SQLException e ) { <START_BUG> assertSQLState ( "8006" , e ) ; <END_BUG> } } }

Fix:
assertSQLState ( "08006" , e ) ;
Buggy code:
@ ExportedBean public class TreeDescription implements HttpResponse { private final TreeNode self ; public TreeDescription ( TreeNode self ) { } @ Exported ( inline = true ) public List < TreeNode > getParents ( ) { } public TreeNode getSelf ( ) { } @ Exported ( inline = true ) public List < TreeNode > getChildren ( ) { } @ Exported public String getPath ( ) { } <START_BUG> @ Exported <END_BUG> public String getDisplayName ( ) { return getSelf ( ) . getDisplayName ( ) ; } @ Exported public boolean hasChildren ( ) { } @ Exported public boolean isSelectable ( ) { } @ Exported public String getType ( ) { } @ Override public void generateResponse ( StaplerRequest req , StaplerResponse rsp , Object node ) throws IOException , ServletException { } }

Fix:
@ Exported ( name = "name" )
Buggy code:
public class BaseColumnNode extends ValueNode { private String columnName ; private TableName tableName ; public void init ( Object columnName , Object tableName , Object dts ) throws StandardException { } public String toString ( ) { } public String getColumnName ( ) { } public String getTableName ( ) { } public String getSchemaName ( ) throws StandardException { } public void generateExpression ( ExpressionClassBuilder acb , MethodBuilder mb ) throws StandardException { } protected int getOrderableVariantType ( ) { } protected boolean isEquivalent ( ValueNode o ) { if ( isSameNodeType ( o ) ) { BaseColumnNode other = ( ( BaseColumnNode ) ( o ) ) ; <START_BUG> return ( other . tableName . equals ( other . tableName ) ) && ( other . columnName . equals ( columnName ) ) ; <END_BUG> } return false ; } }

Fix:
return ( other . tableName . equals ( tableName ) ) && ( other . columnName . equals ( columnName ) ) ;
Buggy code:
public class AllureTestListener implements IConfigurationListener , ITestListener { private Allure lifecycle = Allure . LIFECYCLE ; private Map < String , String > suiteUid = new HashMap < String , String > ( ) ; private Set < String > startedTestNames = Collections . newSetFromMap ( new ConcurrentHashMap < String , Boolean > ( ) ) ; @ Override public void onConfigurationSuccess ( ITestResult iTestResult ) { } @ Override public void onConfigurationFailure ( ITestResult iTestResult ) { } @ Override public void onConfigurationSkip ( ITestResult iTestResult ) { } @ Override public void onStart ( ITestContext iTestContext ) { <START_BUG> getLifecycle ( ) . fire ( new ru . yandex . qatools . allure . events . TestSuiteStartedEvent ( getSuiteUid ( iTestContext ) , iTestContext . getSuite ( ) . getName ( ) ) . withTitle ( getCurrentSuiteTitle ( iTestContext ) ) . withLabels ( AllureModelUtils . createTestFrameworkLabel ( "TestNG" ) ) ) ; <END_BUG> addPendingMethods ( iTestContext ) ; } private void addPendingMethods ( ITestContext iTestContext ) { } @ Override public void onFinish ( ITestContext iTestContext ) { } @ Override public void onTestStart ( ITestResult iTestResult ) { } @ Override public void onTestSuccess ( ITestResult iTestResult ) { } @ Override public void onTestFailure ( ITestResult iTestResult ) { } @ Override public void onTestSkipped ( ITestResult iTestResult ) { } @ Override public void onTestFailedButWithinSuccessPercentage ( ITestResult iTestResult ) { } public Annotation [ ] getMethodAnnotations ( ITestResult iTestResult ) { } public Annotation [ ] getClassAnnotations ( ITestResult iTestResult ) { } private String getName ( ITestResult iTestResult ) { } String getCurrentSuiteTitle ( ITestContext iTestContext ) { } private String getCurrentSuitePrefix ( ITestResult iTestResult ) { } private void fireFinishTest ( ) { } Allure getLifecycle ( ) { } void setLifecycle ( Allure lifecycle ) { } String getSuiteUid ( ITestContext iTestContext ) { } }

Fix:
getLifecycle ( ) . fire ( new ru . yandex . qatools . allure . events . TestSuiteStartedEvent ( getSuiteUid ( iTestContext ) , getCurrentSuiteTitle ( iTestContext ) ) . withTitle ( getCurrentSuiteTitle ( iTestContext ) ) . withLabels ( AllureModelUtils . createTestFrameworkLabel ( "TestNG" ) ) ) ;
Buggy code:
public class TestThreadedOptimize extends LuceneTestCase { private static final Analyzer ANALYZER = new SimpleAnalyzer ( ) ; private static final int NUM_THREADS = 3 ; private static final int NUM_ITER = 2 ; private static final int NUM_ITER2 = 2 ; private boolean failed ; private void setFailed ( ) { } public void runTest ( Directory directory , boolean autoCommit , MergeScheduler merger ) throws Exception { } public void testThreadedOptimize ( ) throws Exception { Directory directory = new MockRAMDirectory ( ) ; runTest ( directory , false , null ) ; runTest ( directory , true , null ) ; runTest ( directory , false , new ConcurrentMergeScheduler ( ) ) ; runTest ( directory , true , new ConcurrentMergeScheduler ( ) ) ; directory . close ( ) ; String tempDir = System . getProperty ( "tempDir" ) ; if ( tempDir == null ) throw new IOException ( "tempDir<seq2seq4repair_space>undefined,<seq2seq4repair_space>cannot<seq2seq4repair_space>run<seq2seq4repair_space>test" ) ; String dirName = tempDir + "//luceneTestThreadedOptimize" ; <START_BUG> directory = FSDirectory . getDirectory ( dirName , null , false ) ; <END_BUG> runTest ( directory , false , null ) ; runTest ( directory , true , null ) ; runTest ( directory , false , new ConcurrentMergeScheduler ( ) ) ; runTest ( directory , true , new ConcurrentMergeScheduler ( ) ) ; directory . close ( ) ; _TestUtil . rmDir ( dirName ) ; } }

Fix:
directory = FSDirectory . getDirectory ( dirName ) ;
Buggy code:
@ Component public class MessageDeleter { private final int minuteInMillis = 60000 ; @ Autowired IMessageService MS ; private void executeCleaning ( ) { List < Message > messageList = MS . getAllMessages ( ) ; for ( Message vLookUp : messageList ) { Date deletionDate = new Date ( ( ( vLookUp . getDate ( ) . getTime ( ) ) + ( ( vLookUp . getTtl ( ) ) * ( minuteInMillis ) ) ) ) ; <START_BUG> if ( deletionDate . after ( new Date ( ) ) ) { <END_BUG> MS . delete ( vLookUp ) ; } } } @ Scheduled ( fixedRate = 5000 ) public void run ( ) { } }

Fix:
if ( deletionDate . before ( new Date ( ) ) ) {
Buggy code:
public class ObjectParser { private static final String [ ] objectArray = new String [ ] { "stick" , "flintstones" , "bear" , "beehive" , "volcanicStones" , "doorHinges" , "sailCloth" , "fruit" , "flower" , "bottleEmpty" , "treasureChest" , "valve" , "cloth" , "stickHatchet" , "stickFishingPole" , "fish" , "clearWater" , "fiberCrops1" , "fiberCrops2" , "fiberCrops3" , "thicket" } ; private static final ArrayList < String > objects = new ArrayList < String > ( Arrays . asList ( ObjectParser . objectArray ) ) ; private static final String [ ] locationArray = new String [ ] { "beachLeft" , "beachRight" , "cave" , "cave" , "volcano" , "cliff" , "cliff" , "jungle" , "opening" , "beachRight" , "lake" , "laboratory" , "rocks" , "jungle" , "waterfall" , "lake" , "waterfall" , "river" , "river" , "river" , "jungle" } ; private static final ArrayList < String > locations = new ArrayList < String > ( Arrays . asList ( ObjectParser . locationArray ) ) ; public static boolean isItem ( String objectName , boolean old ) { } public static boolean isObject ( String objectName ) { } public static List < String > getObjects ( String currentLocation , int old ) { } public static String useObject ( String objectName , List < String > items , long charId ) { } public static String useBeehive ( String item , long charId ) { } public static String useBear ( String item , long charId ) { } public static String useFish ( String item , long charId ) { } public static String useFiberCrop ( String object , String item , long charId ) { } public static String useThicket ( String item , long charId ) { } public static String useClearWater ( String item , long charId ) { } public static String useSpinach ( String item , long charId ) { if ( "" . equals ( item ) ) { List < String > removeItems = new ArrayList < String > ( ) ; Object . useObject ( "spinach" , Character . findById ( charId ) . game_id ) ; Character . reduceActionPoints ( charId , ( - 15 ) ) ; <START_BUG> return "The<seq2seq4repair_space>spinach<seq2seq4repair_space>makes<seq2seq4repair_space>you<seq2seq4repair_space>strong.<seq2seq4repair_space>You<seq2seq4repair_space>increased<seq2seq4repair_space>your<seq2seq4repair_space>action<seq2seq4repair_space>points." ; <END_BUG> } return "You<seq2seq4repair_space>can't<seq2seq4repair_space>use<seq2seq4repair_space>that<seq2seq4repair_space>item<seq2seq4repair_space>on<seq2seq4repair_space>the<seq2seq4repair_space>spinach<seq2seq4repair_space>can!" ; } }

Fix:
return "The<seq2seq4repair_space>spinach<seq2seq4repair_space>makes<seq2seq4repair_space>you<seq2seq4repair_space>strong.<seq2seq4repair_space>You<seq2seq4repair_space>increased<seq2seq4repair_space>your<seq2seq4repair_space>action<seq2seq4repair_space>points.[spinach]" ;