nus-yam/ex-repair huggingface dataset:
Buggy code:
public class RangeFacetsExample implements Closeable { private final Directory indexDir = new RAMDirectory ( ) ; private IndexSearcher searcher ; private final long nowSec = System . currentTimeMillis ( ) ; final LongRange PAST_HOUR = new LongRange ( "Past<seq2seq4repair_space>hour" , ( ( nowSec ) - 3600 ) , true , nowSec , true ) ; final LongRange PAST_SIX_HOURS = new LongRange ( "Past<seq2seq4repair_space>six<seq2seq4repair_space>hours" , ( ( nowSec ) - ( 6 * 3600 ) ) , true , nowSec , true ) ; final LongRange PAST_DAY = new LongRange ( "Past<seq2seq4repair_space>day" , ( ( nowSec ) - ( 24 * 3600 ) ) , true , nowSec , true ) ; public RangeFacetsExample ( ) { } public void index ( ) throws IOException { IndexWriter indexWriter = new IndexWriter ( indexDir , new org . apache . lucene . index . IndexWriterConfig ( FacetExamples . EXAMPLES_VER , new org . apache . lucene . analysis . core . WhitespaceAnalyzer ( FacetExamples . EXAMPLES_VER ) ) ) ; for ( int i = 0 ; i < 100 ; i ++ ) { Document doc = new Document ( ) ; long then = ( nowSec ) - ( i * 1000 ) ; doc . add ( new NumericDocValuesField ( "timestamp" , then ) ) ; doc . add ( new org . apache . lucene . document . LongField ( "timestamp" , then , Store . NO ) ) ; indexWriter . addDocument ( doc ) ; } searcher = new IndexSearcher ( DirectoryReader . open ( indexWriter , true ) ) ; <START_BUG> indexWriter . close ( ) ; <END_BUG> } private FacetsConfig getConfig ( ) { } public FacetResult search ( ) throws IOException { } public TopDocs drillDown ( LongRange range ) throws IOException { } @ Override public void close ( ) throws IOException { } @ SuppressWarnings ( "unchecked" ) public static void main ( String [ ] args ) throws Exception { } }

Fix:
indexWriter . shutdown ( ) ;
Buggy code:
public class YamlWorld extends World { private static final String GROUPS = "groups" ; private static final String PERMISSIONS = "permissions" ; private static final String META = "meta" ; private static final String USERS = "users" ; private YamlConfiguration uconfig = new YamlConfiguration ( ) ; private YamlConfiguration gconfig = new YamlConfiguration ( ) ; private final File ufile = new File ( ( ( "plugins//bPermissions//" + ( getName ( ) ) ) + "//users.yml" ) ) ; private final File gfile = new File ( ( ( "plugins//bPermissions//" + ( getName ( ) ) ) + "//groups.yml" ) ) ; private final File dufile = new File ( "plugins//bPermissions//users.yml" ) ; private final File dgfile = new File ( "plugins//bPermissions//groups.yml" ) ; private final Permissions permissions ; public YamlWorld ( String world , Permissions permissions ) { } private boolean readDefaults ( ) { } @ Override public String getDefaultGroup ( ) { } public boolean load ( ) { } private void loadUnsafe ( ) throws Exception { } public boolean save ( ) { } private void saveUnsafe ( ) throws Exception { if ( ! ( ufile . exists ( ) ) ) { ufile . getParentFile ( ) . mkdirs ( ) ; ufile . createNewFile ( ) ; gfile . createNewFile ( ) ; } String def = getDefaultGroup ( ) ; uconfig = new YamlConfiguration ( ) ; gconfig = new YamlConfiguration ( ) ; gconfig . set ( "default" , def ) ; Set < Calculable > usr = getAll ( USER ) ; List < Calculable > users = new ArrayList < Calculable > ( usr ) ; MetaData . sort ( users ) ; for ( Calculable user : users ) { String name = user . getName ( ) ; uconfig . set ( ( ( ( ( ( YamlWorld . USERS ) + "." ) + name ) + "." ) + ( YamlWorld . PERMISSIONS ) ) , user . serialisePermissions ( ) ) ; uconfig . set ( ( ( ( ( ( YamlWorld . USERS ) + "." ) + name ) + "." ) + ( YamlWorld . GROUPS ) ) , user . serialiseGroups ( ) ) ; Map < String , String > meta = user . getMeta ( ) ; if ( ( meta . size ( ) ) > 0 ) for ( String key : meta . keySet ( ) ) uconfig . set ( ( ( ( ( ( ( ( YamlWorld . USERS ) + "." ) + name ) + "." ) + ( YamlWorld . META ) ) + "." ) + key ) , meta . get ( key ) ) ; } Set < Calculable > grp = getAll ( GROUP ) ; List < Calculable > groups = new ArrayList < Calculable > ( grp ) ; MetaData . sort ( groups ) ; for ( Calculable group : groups ) { String name = group . getName ( ) ; gconfig . set ( ( ( ( ( ( YamlWorld . GROUPS ) + "." ) + name ) + "." ) + ( YamlWorld . PERMISSIONS ) ) , group . serialisePermissions ( ) ) ; gconfig . set ( ( ( ( ( ( YamlWorld . GROUPS ) + "." ) + name ) + "." ) + ( YamlWorld . GROUPS ) ) , group . serialiseGroups ( ) ) ; Map < String , String > meta = group . getMeta ( ) ; if ( ( meta . size ( ) ) > 0 ) for ( String key : meta . keySet ( ) ) <START_BUG> gconfig . set ( ( ( ( ( ( ( ( YamlWorld . USERS ) + "." ) + name ) + "." ) + ( YamlWorld . META ) ) + "." ) + key ) , meta . get ( key ) ) ; <END_BUG> } uconfig . save ( ufile ) ; gconfig . save ( gfile ) ; } }

Fix:
gconfig . set ( ( ( ( ( ( ( ( YamlWorld . GROUPS ) + "." ) + name ) + "." ) + ( YamlWorld . META ) ) + "." ) + key ) , meta . get ( key ) ) ;
Buggy code:
public class ElfProfile extends Board { private static final long serialVersionUID = 1L ; String elf ; public ElfProfile ( ClientWindow clientWindow , SocketController socketController , String elf ) { } @ Override public void refresh ( ) { } @ Override public void handleRequestSuccess ( Response resp ) { ProfileResponse response = ( ( ProfileResponse ) ( resp ) ) ; setLayout ( new BoxLayout ( this , BoxLayout . Y_AXIS ) ) ; <START_BUG> JLabel title = new JLabel ( ( ( ( "Profile<seq2seq4repair_space>of<seq2seq4repair_space>" + ( response . elf . elfName ) ) + ",<seq2seq4repair_space>" ) + ( response . elf . numSocks ) ) ) ; <END_BUG> add ( title ) ; JTextArea description = new JTextArea ( response . elf . description ) ; description . setEditable ( false ) ; add ( new JScrollPane ( description ) ) ; JPanel postPanel = new JPanel ( ) ; postPanel . setLayout ( new BoxLayout ( postPanel , BoxLayout . Y_AXIS ) ) ; for ( SerializablePost post : response . elf . centralBoardPosts ) { postPanel . add ( new elfville . client . views . subcomponents . VotablePost ( this , post ) ) ; } JScrollPane scroll = new JScrollPane ( postPanel ) ; add ( scroll ) ; clientWindow . switchScreen ( this ) ; } }

Fix:
JLabel title = new JLabel ( ( ( ( "Profile<seq2seq4repair_space>of<seq2seq4repair_space>" + ( response . elf . elfName ) ) + ",<seq2seq4repair_space>" ) + ( Integer . toString ( response . elf . numSocks ) ) ) ) ;
Buggy code:
public class DefaultRequestTargetResolverStrategy implements IRequestTargetResolverStrategy { public DefaultRequestTargetResolverStrategy ( ) { } public final IRequestTarget resolve ( final RequestCycle requestCycle , final RequestParameters requestParameters ) { } protected IRequestTarget resolveSharedResource ( final RequestCycle requestCycle , final RequestParameters requestParameters ) { String resourceKey = requestParameters . getResourceKey ( ) ; <START_BUG> return new SharedResourceRequestTarget ( resourceKey ) ; <END_BUG> } protected IRequestTarget resolveRenderedPage ( final RequestCycle requestCycle , final RequestParameters requestParameters ) { } protected IRequestTarget resolveListenerInterfaceTarget ( RequestCycle requestCycle , final Page page , final String componentPath , final String interfaceName , RequestParameters requestParameters ) { } protected IRequestTarget resolveBookmarkablePage ( final RequestCycle requestCycle , final RequestParameters requestParameters ) { } protected IRequestTarget resolveHomePageTarget ( final RequestCycle requestCycle , final RequestParameters requestParameters ) { } protected IRequestTarget resolveExternalResource ( RequestCycle requestCycle ) { } }

Fix:
return new wicket . request . target . SharedResourceRequestTarget ( resourceKey , requestParameters ) ;
Buggy code:
final class JarFileResourceLoader extends AbstractResourceLoader { private final JarFile jarFile ; private final String rootName ; private final URL rootUrl ; private final String relativePath ; private final File fileOfJar ; JarFileResourceLoader ( final String rootName , final JarFile jarFile ) { } JarFileResourceLoader ( final String rootName , final JarFile jarFile , final String relativePath ) { } private static URI getJarURI ( final URI original , final String nestedPath ) throws URISyntaxException { } public String getRootName ( ) { } public synchronized ClassSpec getClassSpec ( final String fileName ) throws IOException { } private JarEntry getJarEntry ( final String fileName ) { } private static void safeClose ( final Closeable closeable ) { } public PackageSpec getPackageSpec ( final String name ) throws IOException { } public String getLibrary ( final String name ) { } public Resource getResource ( String name ) { try { final JarFile jarFile = this . jarFile ; if ( name . startsWith ( "//" ) ) name = name . substring ( 1 ) ; final JarEntry entry = getJarEntry ( name ) ; if ( entry == null ) { return null ; } String jarFilePath = new File ( jarFile . getName ( ) ) . toURI ( ) . toString ( ) ; <START_BUG> return new JarEntryResource ( jarFile , entry , new URI ( "jar" , ( ( jarFilePath + "!//" ) + ( entry . getName ( ) ) ) , null ) . toURL ( ) ) ; <END_BUG> } catch ( MalformedURLException e ) { return null ; } catch ( URISyntaxException e ) { return null ; } } public Collection < String > getPaths ( ) { } private static Collection < String > readIndex ( final InputStream stream , final Collection < String > index , final String relativePath ) throws IOException { } }

Fix:
return new JarEntryResource ( jarFile , entry , JarFileResourceLoader . getJarURI ( new File ( jarFile . getName ( ) ) . toURI ( ) , entry . getName ( ) ) . toURL ( ) ) ;
Buggy code:
public class ResourceReference { private Locale locale ; private final String name ; private transient Resource resource ; private final Class scope ; private String style ; public ResourceReference ( final Class scope , final String name ) { } public ResourceReference ( final String name ) { } public final void bind ( final Application application ) { } public final Locale getLocale ( ) { } public final String getName ( ) { } public final String getPath ( ) { final StringBuffer buffer = new StringBuffer ( ) ; buffer . append ( "resources//" ) ; buffer . append ( scope . getName ( ) ) ; <START_BUG> buffer . append ( '_' ) ; <END_BUG> buffer . append ( Application . localizedPath ( name , locale , style ) ) ; return buffer . toString ( ) ; } public final Resource getResource ( ) { } public final Class getScope ( ) { } public final String getStyle ( ) { } public final void invalidate ( ) { } public final void setLocale ( Locale locale ) { } public final void setStyle ( String style ) { } public String toString ( ) { } protected Resource newResource ( ) { } }

Fix:
buffer . append ( '//' ) ;
Buggy code:
@ Service @ Transactional public class ChatServiceImpl implements ChatService { @ Autowired private ChatRepository repository ; @ Autowired private GebruikerRepository gebruikerRepository ; @ Override public List < Chat > all ( ) { } @ Override public void create ( Chat chat ) { } @ Override public Chat find ( int id ) throws ChatNotFound { } @ Override public void update ( int id , Chat chat ) throws ChatNotFound { } @ Override public void delete ( int id ) throws ChatNotFound { } @ Override public void createMessage ( int id , int userId , Bericht bericht ) throws ChatNotFound { Chat chat = repository . findOne ( id ) ; <START_BUG> Gebruiker gebruiker = gebruikerRepository . findOne ( id ) ; <END_BUG> bericht . setGebruiker ( gebruiker ) ; if ( chat == null ) { throw new ChatNotFound ( ) ; } chat . addBericht ( bericht ) ; repository . save ( chat ) ; } }

Fix:
Gebruiker gebruiker = gebruikerRepository . findOne ( userId ) ;
Buggy code:
public class CreateFunctionDialog extends AbstractAction { private FunctionHelper helper = null ; private static Set commands ; public CreateFunctionDialog ( ) { } @ Override public Set getActionNames ( ) { } @ Override public void doAction ( ActionEvent arg0 ) { <START_BUG> helper . show ( ) ; <END_BUG> } }

Fix:
helper . setVisible ( true ) ;
Buggy code:
public final class DataSourcesAdd extends AbstractSubsystemAdd < DataSourcesSubsystemElement > { private static final long serialVersionUID = - 874698675049495644L ; private DataSources datasources ; public DataSources getDatasources ( ) { } public void setDatasources ( DataSources datasources ) { } protected DataSourcesAdd ( ) { } protected < P > void applyUpdate ( UpdateContext updateContext , UpdateResultHandler < ? super Void , P > resultHandler , P param ) { <START_BUG> final ServiceTarget serviceTarget = updateContext . getBatchBuilder ( ) ; <END_BUG> serviceTarget . addService ( NAME , new JDBCRARDeployService ( ) ) . addDependency ( RESOURCEADAPTERS_SERVICE ) . addDependency ( CONNECTOR_CONFIG_SERVICE ) . addDependency ( IRONJACAMAR_MDR ) . setInitialMode ( ON_DEMAND ) . install ( ) ; serviceTarget . addService ( DATASOURCES_SERVICE , new DataSourcesService ( datasources ) ) . setInitialMode ( ACTIVE ) . install ( ) ; } @ Override protected void applyUpdateBootAction ( final BootUpdateContext updateContext ) { } protected DataSourcesSubsystemElement createSubsystemElement ( ) { } }

Fix:
final ServiceTarget serviceTarget = updateContext . getServiceTarget ( ) ;
Buggy code:
public class SecurityRealmRemoveHandler implements OperationStepHandler { public static final SecurityRealmRemoveHandler INSTANCE = new SecurityRealmRemoveHandler ( ) ; private SecurityRealmRemoveHandler ( ) { } @ Override public void execute ( OperationContext context , ModelNode operation ) throws OperationFailedException { final ModelNode model = Tools . readModel ( context . readResource ( EMPTY_ADDRESS ) ) ; context . removeResource ( EMPTY_ADDRESS ) ; <START_BUG> RbacSanityCheckOperation . registerOperation ( context ) ; <END_BUG> context . addStep ( new OperationStepHandler ( ) { @ Override public void execute ( OperationContext context , ModelNode operation ) throws OperationFailedException { final boolean reloadRequired = ManagementUtil . isSecurityRealmReloadRequired ( context , operation ) ; final String realmName = ManagementUtil . getSecurityRealmName ( operation ) ; if ( reloadRequired ) { context . reloadRequired ( ) ; } else { removeServices ( context , realmName , model ) ; } context . completeStep ( new OperationContext . RollbackHandler ( ) { @ Override public void handleRollback ( OperationContext context , ModelNode operation ) { if ( reloadRequired ) { context . revertReloadRequired ( ) ; } else { recoverServices ( context , realmName , model ) ; } } } ) ; } } , RUNTIME ) ; context . completeStep ( NOOP_ROLLBACK_HANDLER ) ; } protected void removeServices ( final OperationContext context , final String realmName , final ModelNode model ) throws OperationFailedException { } protected void recoverServices ( OperationContext context , final String realmName , ModelNode model ) { } }

Fix:
RbacSanityCheckOperation . addOperation ( context ) ;
Buggy code:
public class MirrorFileFailbackTaskCompleter extends MirrorFileTaskCompleter { private static final Logger _log = LoggerFactory . getLogger ( MirrorFileFailbackTaskCompleter . class ) ; public MirrorFileFailbackTaskCompleter ( Class clazz , List < URI > ids , String opId ) { } public MirrorFileFailbackTaskCompleter ( Class clazz , URI id , String opId ) { } public MirrorFileFailbackTaskCompleter ( URI sourceURI , URI targetURI , String opId ) { } @ Override protected void complete ( DbClient dbClient , Status status , ServiceCoded coded ) throws DeviceControllerException { } @ Override protected MirrorStatus getFileMirrorStatusForSuccess ( ) { <START_BUG> return this . mirrorSyncStatus = MirrorStatus . IN_SYNC ; <END_BUG> } }

Fix:
return this . mirrorSyncStatus = MirrorStatus . SYNCHRONIZED ;
Buggy code:
@ RunWith ( Arquillian . class ) public class BMPEntityBeanTestCase { private static final String ARCHIVE_NAME = "SimpleLocalHomeTest.war" ; @ ArquillianResource private InitialContext iniCtx ; @ Deployment public static Archive < ? > deploy ( ) { WebArchive war = ShrinkWrap . create ( WebArchive . class , BMPEntityBeanTestCase . ARCHIVE_NAME ) ; war . addPackage ( BMPEntityBeanTestCase . class . getPackage ( ) ) ; <START_BUG> war . addAsWebInfResource ( "ejb//entity//bmp//ejb-jar.xml" , "ejb-jar.xml" ) ; <END_BUG> return war ; } @ Test public void testSimpleCreate ( ) throws Exception { } @ Test public void testFindByPrimaryKey ( ) throws Exception { } @ Test public void testSingleResultFinderMethod ( ) throws Exception { } @ Test public void testCollectionFinderMethod ( ) throws Exception { } @ Test public void testRemoveEntityBean ( ) throws Exception { } @ Test public void testCreateRemoveCreate ( ) throws Exception { } @ Test public void testIsIdentical ( ) throws Exception { } @ Test public void testEjbHomeMethod ( ) throws Exception { } @ Test public void testGetEJBLocalHome ( ) throws Exception { } @ Test public void testHomeInterfaceEquality ( ) throws Exception { } private BMPLocalHome getHome ( ) throws NamingException { } }

Fix:
war . addAsWebInfResource ( BMPEntityBeanTestCase . class . getPackage ( ) , "ejb-jar.xml" , "ejb-jar.xml" ) ;
Buggy code:
public class ConnectionFactoryAdd extends AbstractJMSSubsystemUpdate < Void > { private static final long serialVersionUID = - 629127809193102926L ; private final ConnectionFactoryElement cf ; public ConnectionFactoryAdd ( ConnectionFactoryElement cf ) { } protected void applyUpdate ( JMSSubsystemElement element ) throws UpdateFailedException { } protected < P > void applyUpdate ( UpdateContext context , UpdateResultHandler < ? super Void , P > handler , P param ) { final ConnectionFactoryService service = new ConnectionFactoryService ( transform ( ) ) ; final ServiceName serviceName = JMS_CF_BASE . append ( cf . getName ( ) ) ; <START_BUG> context . getBatchBuilder ( ) . addService ( serviceName , service ) . addDependency ( JMS_MANAGER , JMSServerManager . class , service . getJmsServer ( ) ) . addListener ( new UpdateResultHandler . ServiceStartListener < P > ( handler , param ) ) . setInitialMode ( ACTIVE ) . install ( ) ; <END_BUG> } public AbstractSubsystemUpdate < JMSSubsystemElement , ? > getCompensatingUpdate ( JMSSubsystemElement original ) { } private ConnectionFactoryConfiguration transform ( ) { } }

Fix:
context . getServiceTarget ( ) . addService ( serviceName , service ) . addDependency ( JMS_MANAGER , JMSServerManager . class , service . getJmsServer ( ) ) . addListener ( new UpdateResultHandler . ServiceStartListener < P > ( handler , param ) ) . setInitialMode ( ACTIVE ) . install ( ) ;
Buggy code:
public class WaitForPrint implements ProcessStateAction { public void processAction ( StateAction stateAction , Patient patient , PatientState patientState , HashMap < String , Object > parameters ) { PatientService patientService = Context . getPatientService ( ) ; ChirdlUtilBackportsService chirdlutilbackportsService = Context . getService ( ChirdlUtilBackportsService . class ) ; Integer patientId = patient . getPatientId ( ) ; patient = patientService . getPatient ( patientId ) ; Integer locationTagId = patientState . getLocationTagId ( ) ; FormInstance formInstance = ( ( FormInstance ) ( parameters . get ( "formInstance" ) ) ) ; if ( formInstance == null ) { Integer sessionId = patientState . getSessionId ( ) ; PatientState stateWithFormId = Util . getPrevProducePatientStateByAction ( patientState , sessionId ) ; formInstance = patientState . getFormInstance ( ) ; if ( ( formInstance == null ) && ( stateWithFormId != null ) ) { formInstance = stateWithFormId . getFormInstance ( ) ; } } patientState . setFormInstance ( formInstance ) ; chirdlutilbackportsService . updatePatientState ( patientState ) ; String mergeDirectory = IOUtil . formatDirectoryName ( org . openmrs . module . chirdlutilbackports . util . Util . getFormAttributeValue ( formInstance . getFormId ( ) , "defaultMergeDirectory" , locationTagId , formInstance . getLocationId ( ) ) ) ; FormAttributeValue fav = chirdlutilbackportsService . getFormAttributeValue ( formInstance . getFormId ( ) , FORM_ATTR_OUTPUT_TYPE , locationTagId , formInstance . getLocationId ( ) ) ; String outputType = null ; if ( ( ( fav == null ) || ( ( fav . getValue ( ) ) == null ) ) || ( ( fav . getValue ( ) . trim ( ) . length ( ) ) == 0 ) ) { outputType = Context . getAdministrationService ( ) . getGlobalProperty ( GLOBAL_PROP_DEFAULT_OUTPUT_TYPE ) ; } else { String [ ] outputTypes = fav . getValue ( ) . split ( GENERAL_INFO_COMMA ) ; <START_BUG> outputType = outputTypes [ 0 ] ; <END_BUG> } String mergeFilename = "" ; if ( ( FORM_ATTR_VAL_PDF . equalsIgnoreCase ( outputType ) ) || ( FORM_ATTR_VAL_TELEFORM_PDF . equalsIgnoreCase ( outputType ) ) ) { File pdfDir = new File ( mergeDirectory , ChirdlUtilConstants . FILE_PDF ) ; File mergeFile = new File ( pdfDir , ( ( formInstance . toString ( ) ) + ( ChirdlUtilConstants . FILE_EXTENSION_PDF ) ) ) ; mergeFilename = mergeFile . getAbsolutePath ( ) ; } else if ( FORM_ATTR_VAL_TELEFORM_XML . equalsIgnoreCase ( outputType ) ) { File mergeFile = new File ( mergeDirectory , ( ( formInstance . toString ( ) ) + ".20" ) ) ; mergeFilename = mergeFile . getAbsolutePath ( ) ; } TeleformFileState teleformFileState = TeleformFileMonitor . addToPendingStatesWithFilename ( formInstance , mergeFilename ) ; teleformFileState . addParameter ( "patientState" , patientState ) ; } public void changeState ( PatientState patientState , HashMap < String , Object > parameters ) { } }

Fix:
outputType = outputTypes [ 0 ] . trim ( ) ;
Buggy code:
@ RunWith ( Arquillian . class ) @ RunAsClient public class SimpleWebTestCase { @ Deployment ( name = "deployment-single" ) public static Archive < ? > deployment ( ) { WebArchive war = ShrinkWrap . create ( WebArchive . class , "distributable.war" ) ; war . addClass ( SimpleServlet . class ) ; <START_BUG> war . addAsWebInfResource ( SimpleWebTestCase . class . getPackage ( ) , "web.xml" ) ; <END_BUG> System . out . println ( war . toString ( true ) ) ; return war ; } @ Test @ OperateOnDeployment ( "deployment-single" ) public void test ( @ ArquillianResource ( SimpleServlet . class ) URL baseURL ) throws IOException , ClientProtocolException { } }

Fix:
war . setWebXML ( SimpleWebTestCase . class . getPackage ( ) , "web.xml" ) ;
Buggy code:
public class DeploymentScannerExtension implements Extension { public static final String SUBSYSTEM_NAME = CommonAttributes . DEPLOYMENT_SCANNER ; protected static final PathElement SCANNERS_PATH = PathElement . pathElement ( "scanner" ) ; static final String DEFAULT_SCANNER_NAME = "default" ; private static final String RESOURCE_NAME = ( DeploymentScannerExtension . class . getPackage ( ) . getName ( ) ) + ".LocalDescriptions" ; private static final int MANAGEMENT_API_MAJOR_VERSION = 1 ; private static final int MANAGEMENT_API_MINOR_VERSION = 0 ; private static final int MANAGEMENT_API_MICRO_VERSION = 0 ; static ResourceDescriptionResolver getResourceDescriptionResolver ( final String keyPrefix ) { } @ Override public void initialize ( ExtensionContext context ) { DeploymentScannerLogger . ROOT_LOGGER . debug ( "Initializing<seq2seq4repair_space>Deployment<seq2seq4repair_space>Scanner<seq2seq4repair_space>Extension" ) ; final SubsystemRegistration subsystem = context . registerSubsystem ( DEPLOYMENT_SCANNER , DeploymentScannerExtension . MANAGEMENT_API_MAJOR_VERSION , DeploymentScannerExtension . MANAGEMENT_API_MINOR_VERSION , DeploymentScannerExtension . MANAGEMENT_API_MICRO_VERSION ) ; subsystem . registerXMLElementWriter ( INSTANCE ) ; final ManagementResourceRegistration registration = subsystem . registerSubsystemModel ( new DeploymentScannerSubsystemDefinition ( ) ) ; <START_BUG> registration . registerOperationHandler ( DESCRIBE , GenericSubsystemDescribeHandler . INSTANCE , GenericSubsystemDescribeHandler . INSTANCE , false , PRIVATE ) ; <END_BUG> registration . registerSubModel ( new DeploymentScannerDefinition ( context . getPathManager ( ) ) ) ; } @ Override public void initializeParsers ( ExtensionParsingContext context ) { } }

Fix:
registration . registerOperationHandler ( DEFINITION , GenericSubsystemDescribeHandler . INSTANCE ) ;
Buggy code:
public class TvViewerJsonBootstrap { @ Inject InjectableServiceLayerDecorator isld ; @ Inject Provider < TvViewer > viewerProvider ; public String getViewerAsJson ( ) { SimpleRequestProcessor p = new SimpleRequestProcessor ( ServiceLayer . create ( isld ) ) ; TvViewer user = viewerProvider . get ( ) ; if ( user == null ) { return "" ; } MessageFactory factory = MessageFactoryHolder . FACTORY ; AutoBean < IdMessage > id = factory . id ( ) ; try { id . as ( ) . setServerId ( Base64Utils . toBase64 ( user . getId ( ) . toString ( ) . getBytes ( "UTF-8" ) ) ) ; } catch ( UnsupportedEncodingException e ) { return "" ; } id . as ( ) . setStrength ( PERSISTED ) ; id . as ( ) . setTypeToken ( TvViewerProxy . class . getName ( ) ) ; AutoBean < RequestMessage > msg = factory . request ( ) ; msg . as ( ) . setInvocations ( new ArrayList < InvocationMessage > ( ) ) ; InvocationMessage invocation = factory . invocation ( ) . as ( ) ; <START_BUG> invocation . setOperation ( "com.google.gwt.requestfactory.shared.impl.FindRequest::find" ) ; <END_BUG> invocation . setParameters ( new ArrayList < com . google . web . bindery . autobean . shared . Splittable > ( ) ) ; invocation . getParameters ( ) . add ( AutoBeanCodex . encode ( id ) ) ; msg . as ( ) . getInvocations ( ) . add ( invocation ) ; String value = p . process ( AutoBeanCodex . encode ( msg ) . getPayload ( ) ) ; ResponseMessage response = AutoBeanCodex . decode ( factory , ResponseMessage . class , value ) . as ( ) ; OperationMessage opMsg = response . getOperations ( ) . get ( 0 ) ; DefaultProxyStore store = new DefaultProxyStore ( ) ; store . put ( STORE_KEY , AutoBeanCodex . encode ( AutoBeanUtils . getAutoBean ( opMsg ) ) ) ; return store . encode ( ) ; } }

Fix:
invocation . setOperation ( "com.google.web.bindery.requestfactory.shared.impl.FindRequest::find" ) ;
Buggy code:
public class InjectorHolder { private static ConfigurableInjector injector = null ; public static ConfigurableInjector getInjector ( ) { if ( ( InjectorHolder . injector ) == null ) { <START_BUG> throw new IllegalStateException ( ( "InjectorHolder<seq2seq4repair_space>has<seq2seq4repair_space>not<seq2seq4repair_space>been<seq2seq4repair_space>assigned<seq2seq4repair_space>an<seq2seq4repair_space>injector.<seq2seq4repair_space>" + ( ( "Use<seq2seq4repair_space>SpringInjectorHolder.setInjector()<seq2seq4repair_space>to<seq2seq4repair_space>assign<seq2seq4repair_space>an<seq2seq4repair_space>injector.<seq2seq4repair_space>" + "In<seq2seq4repair_space>most<seq2seq4repair_space>cases<seq2seq4repair_space>this<seq2seq4repair_space>should<seq2seq4repair_space>be<seq2seq4repair_space>done<seq2seq4repair_space>once<seq2seq4repair_space>inside<seq2seq4repair_space>" ) + "SpringWebApplication<seq2seq4repair_space>subclass's<seq2seq4repair_space>init()<seq2seq4repair_space>method." ) ) ) ; <END_BUG> } return InjectorHolder . injector ; } public static void setInjector ( ConfigurableInjector newInjector ) { } }

Fix:
throw new IllegalStateException ( ( "InjectorHolder<seq2seq4repair_space>has<seq2seq4repair_space>not<seq2seq4repair_space>been<seq2seq4repair_space>assigned<seq2seq4repair_space>an<seq2seq4repair_space>injector.<seq2seq4repair_space>" + ( ( "Use<seq2seq4repair_space>InjectorHolder.setInjector()<seq2seq4repair_space>to<seq2seq4repair_space>assign<seq2seq4repair_space>an<seq2seq4repair_space>injector.<seq2seq4repair_space>" + "In<seq2seq4repair_space>most<seq2seq4repair_space>cases<seq2seq4repair_space>this<seq2seq4repair_space>should<seq2seq4repair_space>be<seq2seq4repair_space>done<seq2seq4repair_space>once<seq2seq4repair_space>inside<seq2seq4repair_space>" ) + "SpringWebApplication<seq2seq4repair_space>subclass's<seq2seq4repair_space>init()<seq2seq4repair_space>method." ) ) ) ;
Buggy code:
public abstract class Lob implements UnitOfWorkListener { public static final int STRING = 2 ; public static final int ASCII_STREAM = 4 ; public static final int UNICODE_STREAM = 8 ; public static final int CHARACTER_STREAM = 16 ; public static final int BINARY_STREAM = 32 ; public static final int BINARY_STRING = 64 ; protected Agent agent_ ; protected int dataType_ = 0 ; protected long sqlLength_ ; protected boolean lengthObtained_ ; protected Lob ( Agent agent ) { } protected void finalize ( ) throws Throwable { } public long sqlLength ( ) throws SqlException { } public void listenToUnitOfWork ( ) { <START_BUG> agent_ . connection_ . CommitAndRollbackListeners_ . add ( this ) ; <END_BUG> } public void completeLocalCommit ( Iterator listenerIterator ) { } public void completeLocalRollback ( Iterator listenerIterator ) { } public Agent getAgent ( ) { } void checkForClosedConnection ( ) throws SqlException { } void completeLocalRollback ( ) { } void completeLocalCommit ( ) { } }

Fix:
agent_ . connection_ . CommitAndRollbackListeners_ . put ( this , null ) ;
Buggy code:
public class Tile { private TileType tile ; private Character symbol = 'Ö' ; public Tile ( ) { } public TileType GetType ( ) { } public Character GetSymbol ( ) { } public void SetType ( TileType type ) { } @ Override public String toString ( ) { <START_BUG> return symbol . toString ( ) ; <END_BUG> } No newline ; at end ; of file ; }

Fix:
return "Tile<seq2seq4repair_space>symbol:<seq2seq4repair_space>" + ( symbol ) ;
Buggy code:
public class StandardServletMultipartResolver implements MultipartResolver { protected final Log logger = LogFactory . getLog ( getClass ( ) ) ; public boolean isMultipart ( HttpServletRequest request ) { } public MultipartHttpServletRequest resolveMultipart ( HttpServletRequest request ) throws MultipartException { } public void cleanupMultipart ( MultipartHttpServletRequest request ) { } private static class StandardMultipartHttpServletRequest extends AbstractMultipartHttpServletRequest { public StandardMultipartHttpServletRequest ( HttpServletRequest request ) throws MultipartException { } } private static class StandardMultipartFile implements MultipartFile { private final Part part ; public StandardMultipartFile ( Part part ) { } public String getName ( ) { } public String getOriginalFilename ( ) { } public String getContentType ( ) { } public boolean isEmpty ( ) { } public long getSize ( ) { } public byte [ ] getBytes ( ) throws IOException { } public InputStream getInputStream ( ) throws IOException { } public void transferTo ( File dest ) throws IOException , IllegalStateException { } public String getHeader ( String name ) { } public String [ ] getHeaders ( String name ) { } <START_BUG> public Iterator < String > getHeaderNames ( String name ) { <END_BUG> return this . part . getHeaderNames ( ) . iterator ( ) ; } } }

Fix:
public Iterator < String > getHeaderNames ( ) {
Buggy code:
public class SearchList extends ListFragment { public void onCreate ( Bundle savedInstanceState ) { } @ Override public void onActivityCreated ( Bundle savedState ) { super . onActivityCreated ( savedState ) ; getListView ( ) . setOnItemLongClickListener ( new OnItemLongClickListener ( ) { public boolean onItemLongClick ( AdapterView < ? > av , View v , int position , long id ) { String selectedItem = ( ( android . widget . TextView ) ( v ) ) . getText ( ) . toString ( ) ; boolean menu = ( selectedItem . endsWith ( "\n\n" ) ) ? false : true ; Toast . makeText ( getActivity ( ) , "Added<seq2seq4repair_space>to<seq2seq4repair_space>Favorites" , LENGTH_SHORT ) . show ( ) ; final SharedPreferences prefs = PreferenceManager . getDefaultSharedPreferences ( getActivity ( ) ) ; String favorites = prefs . getString ( ( menu ? "favoritemenus" : "favoriterests" ) , "" ) ; <START_BUG> favorites += ",,,<seq2seq4repair_space>" + ( selectedItem . replace ( "\n\n" , "" ) ) ; <END_BUG> SharedPreferences . Editor editor = prefs . edit ( ) ; editor . putString ( ( menu ? "favoritemenus" : "favoriterests" ) , favorites ) ; editor . commit ( ) ; return true ; } } ) ; } @ Override public void onListItemClick ( ListView l , View v , int position , long id ) { } }

Fix:
favorites += ( ( favorites . length ( ) ) > 0 ? ",,," : "" ) + ( selectedItem . replace ( "\n\n" , "" ) ) ;
Buggy code:
public class PageInstanceMapper extends AbstractComponentMapper { public PageInstanceMapper ( ) { } public IRequestHandler mapRequest ( Request request ) { Url url = request . getUrl ( ) ; if ( urlStartsWith ( url , getContext ( ) . getNamespace ( ) , getContext ( ) . getPageIdentifier ( ) ) ) { PageComponentInfo info = getPageComponentInfo ( url ) ; if ( ( info != null ) && ( ( info . getPageInfo ( ) . getPageId ( ) ) != null ) ) { Integer renderCount = ( ( info . getComponentInfo ( ) ) != null ) ? info . getComponentInfo ( ) . getRenderCount ( ) : null ; if ( ( info . getComponentInfo ( ) ) == null ) { PageProvider provider = new PageProvider ( info . getPageInfo ( ) . getPageId ( ) , renderCount ) ; provider . setPageSource ( getContext ( ) ) ; return new org . apache . wicket . request . handler . RenderPageRequestHandler ( provider ) ; } else { ComponentInfo componentInfo = info . getComponentInfo ( ) ; PageAndComponentProvider provider = new PageAndComponentProvider ( info . getPageInfo ( ) . getPageId ( ) , renderCount , componentInfo . getComponentPath ( ) ) ; provider . setPageSource ( getContext ( ) ) ; RequestListenerInterface listenerInterface = requestListenerInterfaceFromString ( componentInfo . getListenerInterface ( ) ) ; <START_BUG> return new org . apache . wicket . request . handler . ListenerInterfaceRequestHandler ( provider , listenerInterface , componentInfo . getBehaviorIndex ( ) ) ; <END_BUG> } } } return null ; } public Url mapHandler ( IRequestHandler requestHandler ) { } public int getCompatibilityScore ( Request request ) { } }

Fix:
return new org . apache . wicket . request . handler . ListenerInterfaceRequestHandler ( provider , listenerInterface , componentInfo . getBehaviorId ( ) ) ;
Buggy code:
; private static final byte [ ] URL_SAFE_ENCODE_TABLE = new byte [ ] { 'A' , 'B' , 'C' , 'D' , 'E' , 'F' , 'G' , 'H' , 'I' , 'J' , 'K' , 'L' , 'M' , 'N' , 'O' , 'P' , 'Q' , 'R' , 'S' , 'T' , 'U' , 'V' , 'W' , 'X' , 'Y' , 'Z' , 'a' , 'b' , 'c' , 'd' , 'e' , 'f' , 'g' , 'h' , 'i' , 'j' , 'k' , 'l' , 'm' , 'n' , 'o' , 'p' , 'q' , 'r' , 's' , 't' , 'u' , 'v' , 'w' , 'x' , 'y' , 'z' , '0' , '1' , '2' , '3' , '4' , '5' , '6' , '7' , '8' , '9' , '-' , '_' } ; private static final byte [ ] DECODE_TABLE = new byte [ ] { - 1 , - 1 , - 1 , - 1 , - 1 , - 1 , - 1 , - 1 , - 1 , - 1 , - 1 , - 1 , - 1 , - 1 , - 1 , - 1 , - 1 , - 1 , - 1 , - 1 , - 1 , - 1 , - 1 , - 1 , - 1 , - 1 , - 1 , - 1 , - 1 , - 1 , - 1 , - 1 , - 1 , - 1 , - 1 , - 1 , - 1 , - 1 , - 1 , - 1 , - 1 , - 1 , - 1 , 62 , - 1 , 62 , - 1 , 63 , 52 , 53 , 54 , 55 , 56 , 57 , 58 , 59 , 60 , 61 , - 1 , - 1 , - 1 , - 1 , - 1 , - 1 , - 1 , 0 , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 10 , 11 , 12 , 13 , 14 , 15 , 16 , 17 , 18 , 19 , 20 , 21 , 22 , 23 , 24 , 25 , - 1 , - 1 , - 1 , - 1 , 63 , - 1 , 26 , 27 , 28 , 29 , 30 , 31 , 32 , 33 , 34 , 35 , 36 , 37 , 38 , 39 , 40 , 41 , 42 , 43 , 44 , 45 , 46 , 47 , 48 , 49 , 50 , 51 } ; private static final int MASK_6BITS = 63 ; private final byte [ ] encodeTable ; private final byte [ ] decodeTable = Base64 . DECODE_TABLE ; private final byte [ ] lineSeparator ; private final int decodeSize ; private final int encodeSize ; public Base64 ( ) { } public Base64 ( boolean urlSafe ) { } public Base64 ( int lineLength ) { } public Base64 ( int lineLength , byte [ ] lineSeparator ) { } public Base64 ( int lineLength , byte [ ] lineSeparator , boolean urlSafe ) { } public boolean isUrlSafe ( ) { } @ Override void encode ( byte [ ] in , int inPos , int inAvail , BaseNCodec . Context context ) { if ( context . eof ) { return ; } if ( inAvail < 0 ) { context . eof = true ; if ( ( 0 == ( context . modulus ) ) && ( ( lineLength ) == 0 ) ) { return ; } final byte [ ] buffer = ensureBufferSize ( encodeSize , context ) ; <START_BUG> int savedPos = context . pos ; <END_BUG> switch ( context . modulus ) { case 1 : buffer [ ( ( context . pos ) ++ ) ] = encodeTable [ ( ( ( context . ibitWorkArea ) > > 2 ) & ( Base64 . MASK_6BITS ) ) ] ; buffer [ ( ( context . pos ) ++ ) ] = encodeTable [ ( ( ( context . ibitWorkArea ) << 4 ) & ( Base64 . MASK_6BITS ) ) ] ; if ( ( encodeTable ) == ( Base64 . STANDARD_ENCODE_TABLE ) ) { buffer [ ( ( context . pos ) ++ ) ] = PAD ; buffer [ ( ( context . pos ) ++ ) ] = PAD ; } break ; case 2 : buffer [ ( ( context . pos ) ++ ) ] = encodeTable [ ( ( ( context . ibitWorkArea ) > > 10 ) & ( Base64 . MASK_6BITS ) ) ] ; buffer [ ( ( context . pos ) ++ ) ] = encodeTable [ ( ( ( context . ibitWorkArea ) > > 4 ) & ( Base64 . MASK_6BITS ) ) ] ; buffer [ ( ( context . pos ) ++ ) ] = encodeTable [ ( ( ( context . ibitWorkArea ) << 2 ) & ( Base64 . MASK_6BITS ) ) ] ; if ( ( encodeTable ) == ( Base64 . STANDARD_ENCODE_TABLE ) ) { buffer [ ( ( context . pos ) ++ ) ] = PAD ; } break ;

Fix:
final int savedPos = context . pos ;
Buggy code:
public class Link { private Link ( ) { } public static void addLanePair ( int fromLane , RoadSegment fromRoadsegment , int toLane , RoadSegment toRoadSegment ) { } public static RoadSegment addJoin ( RoadSegment sourceRoad , RoadSegment sinkRoad ) { final int offset = ( sinkRoad . trafficLaneMin ( ) ) - ( sourceRoad . trafficLaneMin ( ) ) ; assert ( ( sourceRoad . laneCount ( ) ) + offset ) == ( sinkRoad . laneCount ( ) ) ; if ( offset < 0 ) { <START_BUG> final int limit = ( sourceRoad . laneCount ( ) ) - offset ; <END_BUG> for ( int i = 0 ; i < limit ; ++ i ) { Link . addLanePair ( ( i - offset ) , sourceRoad , i , sinkRoad ) ; } } else { final int laneCount = sourceRoad . laneCount ( ) ; for ( int i = 0 ; i < laneCount ; ++ i ) { Link . addLanePair ( i , sourceRoad , ( i + offset ) , sinkRoad ) ; } } return sinkRoad ; } public static void addOffsetJoin ( int offset , RoadSegment fromRoad , RoadSegment toRoad ) { } public static void addMerge ( RoadSegment fromRoad1 , RoadSegment fromRoad2 , RoadSegment toRoad ) { } public static void addFork ( RoadSegment fromRoad , RoadSegment toRoad1 , RoadSegment toRoad2 ) { } }

Fix:
final int limit = ( sourceRoad . laneCount ( ) ) + offset ;
Buggy code:
public class main { public static void main ( String [ ] args ) { <START_BUG> System . out . println ( "eow<seq2seq4repair_space>boy!" ) ; <END_BUG> } }

Fix:
System . out . println ( "eow<seq2seq4repair_space>boy!!!" ) ;
Buggy code:
public abstract class AutoDriverDataSource extends DBCPDriverDataSource { private static final Class < ? extends AutoDriverDataSource > implClass ; public static AutoDriverDataSource newInstance ( ) { } @ Override public Connection getConnection ( Properties props ) throws SQLException { <START_BUG> if ( ( ( ( ( conf ) == null ) || ( conf . isTransactionModeManaged ( ) ) ) || ( conf . isConnectionFactoryModeManaged ( ) ) ) || ( ! ( isDBCPLoaded ( ) ) ) ) { <END_BUG> return getSimpleConnection ( props ) ; } else { return getDBCPConnection ( props ) ; } } }

Fix:
if ( ( ( ( ( conf ) == null ) || ( conf . isTransactionModeManaged ( ) ) ) || ( conf . isConnectionFactoryModeManaged ( ) ) ) || ( ! ( isDBCPLoaded ( getClassLoader ( ) ) ) ) ) {
Buggy code:
public class QuestionFragment extends Fragment { private QuestionFragment . OnFragmentInteractionListener mListener ; private int gameId ; private int questionId ; private boolean dataSet = false ; private Question question ; private EditText txtAnswer ; private List < RadioButton > optionList ; public void setData ( int gameId , int questionId ) { } public QuestionFragment ( ) { } @ Override public void onCreate ( Bundle savedInstanceState ) { } @ Override public View onCreateView ( LayoutInflater inflater , ViewGroup container , Bundle savedInstanceState ) { } public void onButtonPressed ( Uri uri ) { } @ Override public void onAttach ( Activity activity ) { } @ Override public void onDetach ( ) { } public interface OnFragmentInteractionListener { public void onFragmentInteraction ( Uri uri ) { } } public void handleAnswer ( View v ) { } public void showMoreInfo ( View v ) { Intent intent = new Intent ( getActivity ( ) . getApplicationContext ( ) , InfoActivity . class ) ; intent . putExtra ( "gameId" , gameId ) ; intent . putExtra ( "questionId" , questionId ) ; <START_BUG> startActivity ( intent ) ; <END_BUG> } }

Fix:
startActivityForResult ( intent , 0 ) ;
Buggy code:
public class CheckNumberTest { public static void main ( String [ ] args ) { System . out . println ( "Please<seq2seq4repair_space>input<seq2seq4repair_space>a<seq2seq4repair_space>number<seq2seq4repair_space>you<seq2seq4repair_space>would<seq2seq4repair_space>like<seq2seq4repair_space>the<seq2seq4repair_space>characteristics<seq2seq4repair_space>of<seq2seq4repair_space>to<seq2seq4repair_space>be<seq2seq4repair_space>checked." ) ; <START_BUG> double targetNumber = Keyboard . getInteger ( ) ; <END_BUG> CheckNumber test1 = new CheckNumber ( ) ; System . out . println ( ( ( ( ( "The<seq2seq4repair_space>number<seq2seq4repair_space>" + targetNumber ) + "<seq2seq4repair_space>is<seq2seq4repair_space>" ) + ( ( test1 . isPrime ( targetNumber ) ) == true ? "" : "not<seq2seq4repair_space>" ) ) + "a<seq2seq4repair_space>prime<seq2seq4repair_space>number." ) ) ; System . out . println ( ( ( ( ( "The<seq2seq4repair_space>number<seq2seq4repair_space>" + targetNumber ) + "<seq2seq4repair_space>is<seq2seq4repair_space>" ) + ( ( test1 . isPositive ( targetNumber ) ) == true ? "" : "not<seq2seq4repair_space>" ) ) + "a<seq2seq4repair_space>positive<seq2seq4repair_space>number." ) ) ; System . out . println ( ( ( ( ( "The<seq2seq4repair_space>number<seq2seq4repair_space>" + targetNumber ) + "<seq2seq4repair_space>is<seq2seq4repair_space>" ) + ( ( test1 . isNegative ( targetNumber ) ) == true ? "" : "not<seq2seq4repair_space>" ) ) + "a<seq2seq4repair_space>negative<seq2seq4repair_space>number." ) ) ; System . out . println ( ( ( ( ( "The<seq2seq4repair_space>number<seq2seq4repair_space>" + targetNumber ) + "<seq2seq4repair_space>is<seq2seq4repair_space>" ) + ( ( test1 . ispalindrome ( targetNumber ) ) == true ? "" : "not<seq2seq4repair_space>" ) ) + "a<seq2seq4repair_space>palindrome." ) ) ; System . out . println ( test1 . displayNumberChararacteristics ( targetNumber ) ) ; } No newline ; at end ; of file ; }

Fix:
int targetNumber = Keyboard . getInteger ( ) ;
Buggy code:
public class ExplicitConstructorCall extends Statement implements InvocationSite { public Expression [ ] arguments ; public Expression qualification ; public MethodBinding binding ; protected MethodBinding codegenBinding ; MethodBinding syntheticAccessor ; public int accessMode ; public TypeReference [ ] typeArguments ; public TypeBinding [ ] genericTypeArguments ; public static final int ImplicitSuper = 1 ; public static final int Super = 2 ; public static final int This = 3 ; public VariableBinding [ ] [ ] implicitArguments ; boolean discardEnclosingInstance ; public int typeArgumentsSourceStart ; public ExplicitConstructorCall ( int accessMode ) { } public FlowInfo analyseCode ( BlockScope currentScope , FlowContext flowContext , FlowInfo flowInfo ) { } public void generateCode ( BlockScope currentScope , CodeStream codeStream ) { } public TypeBinding [ ] genericTypeArguments ( ) { } public boolean isImplicitSuper ( ) { } public boolean isSuperAccess ( ) { } public boolean isTypeAccess ( ) { } void manageEnclosingInstanceAccessIfNecessary ( BlockScope currentScope , FlowInfo flowInfo ) { } public void manageSyntheticAccessIfNecessary ( BlockScope currentScope , FlowInfo flowInfo ) { if ( ( ( flowInfo . tagBits ) & ( FlowInfo . UNREACHABLE ) ) == 0 ) { this . codegenBinding = this . binding . original ( ) ; if ( ( binding . isPrivate ( ) ) && ( ( accessMode ) != ( ExplicitConstructorCall . This ) ) ) { ReferenceBinding declaringClass = this . codegenBinding . declaringClass ; if ( ( ( ( declaringClass . tagBits ) & ( ( TagBits . IsAnonymousType ) | ( TagBits . IsLocalType ) ) ) != 0 ) && ( currentScope . compilerOptions ( ) . isPrivateConstructorAccessChangingVisibility ) ) { <START_BUG> this . codegenBinding . modifiers |= AccClearPrivateModifier ; <END_BUG> } else { syntheticAccessor = ( ( SourceTypeBinding ) ( declaringClass ) ) . addSyntheticMethod ( this . codegenBinding , isSuperAccess ( ) ) ; currentScope . problemReporter ( ) . needToEmulateMethodAccess ( this . codegenBinding , this ) ; } } } } public StringBuffer printStatement ( int indent , StringBuffer output ) { } public void resolve ( BlockScope scope ) { } public void setActualReceiverType ( ReferenceBinding receiverType ) { } public void setDepth ( int depth ) { } public void setFieldIndex ( int depth ) { } public void traverse ( ASTVisitor visitor , BlockScope scope ) { } }

Fix:
this . codegenBinding . tagBits |= TagBits . ClearPrivateModifier ;
Buggy code:
final class TermInfosReader { private Directory directory ; private String segment ; private FieldInfos fieldInfos ; private CloseableThreadLocal threadResources = new CloseableThreadLocal ( ) ; private SegmentTermEnum origEnum ; private long size ; private Term [ ] indexTerms = null ; private TermInfo [ ] indexInfos ; private long [ ] indexPointers ; private SegmentTermEnum indexEnum ; private int indexDivisor = 1 ; private int totalIndexInterval ; private static final int DEFAULT_CACHE_SIZE = 1024 ; private static final class ThreadResources { SegmentTermEnum termEnum ; Cache termInfoCache ; } TermInfosReader ( Directory dir , String seg , FieldInfos fis ) throws IOException , CorruptIndexException { } TermInfosReader ( Directory dir , String seg , FieldInfos fis , int readBufferSize ) throws IOException , CorruptIndexException { } public int getSkipInterval ( ) { } public int getMaxSkipLevels ( ) { } public void setIndexDivisor ( int indexDivisor ) throws IllegalStateException { } public int getIndexDivisor ( ) { } final void close ( ) throws IOException { } final long size ( ) { } private TermInfosReader . ThreadResources getThreadResources ( ) { } private synchronized void ensureIndexIsRead ( ) throws IOException { } private final int getIndexOffset ( Term term ) { int lo = 0 ; int hi = ( indexTerms . length ) - 1 ; while ( hi >= lo ) { <START_BUG> int mid = ( lo + hi ) > > 1 ; <END_BUG> int delta = term . compareTo ( indexTerms [ mid ] ) ; if ( delta < 0 ) hi = mid - 1 ; else if ( delta > 0 ) lo = mid + 1 ; else return mid ; } return hi ; } private final void seekEnum ( SegmentTermEnum enumerator , int indexOffset ) throws IOException { } TermInfo get ( Term term ) throws IOException { } private TermInfo get ( Term term , boolean useCache ) throws IOException { } final Term get ( int position ) throws IOException { } private final Term scanEnum ( SegmentTermEnum enumerator , int position ) throws IOException { } final long getPosition ( Term term ) throws IOException { } public SegmentTermEnum terms ( ) { } public SegmentTermEnum terms ( Term term ) throws IOException { } }

Fix:
int mid = ( lo + hi ) > > > 1 ;
Buggy code:
public class WebRequestCycle extends RequestCycle { private static final Log log = LogFactory . getLog ( WebRequestCycle . class ) ; private static final String resourceReferencePrefix = "//resource//" ; public WebRequestCycle ( final WebSession session , final WebRequest request , final Response response ) { } public WebRequest getWebRequest ( ) { } public WebResponse getWebResponse ( ) { } protected final boolean parseRequest ( ) { } protected void redirectTo ( final Page page ) { } final void setFormComponentValuesFromCookies ( final Page page ) { } private boolean bookmarkablePage ( ) { } private boolean callComponentListener ( ) { } private boolean homePage ( ) { } private void invokeInterface ( final Component component , final String interfaceName ) { } private void invokeInterface ( final Page page , final String path , final String interfaceName ) { } private final Page newPage ( final Class pageClass ) { } private void onExpiredPage ( ) { } private boolean renderStaticContent ( ) { try { final String url = getWebRequest ( ) . getRelativeURL ( ) ; final ServletContext context = ( ( WebApplication ) ( application ) ) . getWicketServlet ( ) . getServletContext ( ) ; response . setContentType ( context . getMimeType ( url ) ) ; final InputStream in = context . getResourceAsStream ( url ) ; if ( in != null ) { try { <START_BUG> Streams . writeStream ( in , getWebResponse ( ) . getHttpServletResponse ( ) . getOutputStream ( ) ) ; <END_BUG> } finally { in . close ( ) ; } return true ; } else { return false ; } } catch ( IOException e ) { throw new wicket . WicketRuntimeException ( ( "Cannot<seq2seq4repair_space>load<seq2seq4repair_space>static<seq2seq4repair_space>content<seq2seq4repair_space>for<seq2seq4repair_space>request<seq2seq4repair_space>" + ( request ) ) , e ) ; } } private boolean resourceReference ( ) { } }

Fix:
Streams . copy ( in , getWebResponse ( ) . getHttpServletResponse ( ) . getOutputStream ( ) ) ;