nus-yam/ex-repair huggingface dataset:
Buggy code:
public class TestAction extends AbstractSampler { private static final Logger log = LoggingManager . getLoggerForClass ( ) ; public static final int STOP = 0 ; public static final int PAUSE = 1 ; public static final int STOP_NOW = 2 ; public static final int THREAD = 0 ; public static final int TEST = 2 ; private static final String TARGET = "ActionProcessor.target" ; private static final String ACTION = "ActionProcessor.action" ; private static final String DURATION = "ActionProcessor.duration" ; public TestAction ( ) { } public SampleResult sample ( Entry e ) { JMeterContext context = JMeterContextService . getContext ( ) ; int target = getTarget ( ) ; int action = getAction ( ) ; if ( action == ( TestAction . PAUSE ) ) { pause ( getDurationAsString ( ) ) ; } else if ( ( action == ( TestAction . STOP ) ) || ( action == ( TestAction . STOP_NOW ) ) ) { if ( target == ( TestAction . THREAD ) ) { TestAction . log . info ( "Stopping<seq2seq4repair_space>current<seq2seq4repair_space>thread" ) ; context . getThread ( ) . stop ( ) ; } else if ( target == ( TestAction . TEST ) ) { if ( action == ( TestAction . STOP_NOW ) ) { TestAction . log . info ( "Stopping<seq2seq4repair_space>all<seq2seq4repair_space>threads<seq2seq4repair_space>now" ) ; <START_BUG> context . getEngine ( ) . askThreadsToStopNow ( ) ; <END_BUG> } else { TestAction . log . info ( "Stopping<seq2seq4repair_space>all<seq2seq4repair_space>threads" ) ; context . getEngine ( ) . askThreadsToStop ( ) ; } } } return null ; } private void pause ( String mili_s ) { } public void setTarget ( int target ) { } public int getTarget ( ) { } public void setAction ( int action ) { } public int getAction ( ) { } public void setDuration ( String duration ) { } public String getDurationAsString ( ) { } }

Fix:
context . getEngine ( ) . stopTest ( ) ;
Buggy code:
class NewWizardNewPage implements IDoubleClickListener , ISelectionChangedListener { private static final String DIALOG_SETTING_SECTION_NAME = "NewWizardSelectionPage." ; private static final int SIZING_LISTS_HEIGHT = 200 ; private static final int SIZING_VIEWER_WIDTH = 300 ; private static final String STORE_EXPANDED_CATEGORIES_ID = ( NewWizardNewPage . DIALOG_SETTING_SECTION_NAME ) + "STORE_EXPANDED_CATEGORIES_ID" ; private static final String STORE_SELECTED_ID = ( NewWizardNewPage . DIALOG_SETTING_SECTION_NAME ) + "STORE_SELECTED_ID" ; private static final String SHOW_ALL_ENABLED = ( NewWizardNewPage . DIALOG_SETTING_SECTION_NAME ) + ".SHOW_ALL_SELECTED" ; private TreeViewer viewer ; private NewWizardSelectionPage page ; private Hashtable selectedWizards = new Hashtable ( ) ; private IDialogSettings settings ; private Button showAllCheck ; private WizardCollectionElement wizardCategories ; private WorkbenchWizardElement [ ] primaryWizards ; private ToolItem helpButton ; private String wizardHelpHref ; private CLabel descImageCanvas ; private Map imageTable = new HashMap ( ) ; private WorkbenchWizardElement selectedElement ; private NewWizardActivityFilter filter = new NewWizardActivityFilter ( ) ; private boolean needShowAll ; public NewWizardNewPage ( NewWizardSelectionPage mainPage , IWorkbench aWorkbench , WizardCollectionElement wizardCategories , WorkbenchWizardElement [ ] primaryWizards ) { } private boolean allActivityEnabled ( WizardCollectionElement category ) { } private void trimPrimaryWizards ( ) { } private boolean allPrimary ( WizardCollectionElement category ) { } private boolean isPrimary ( WorkbenchWizardElement wizard ) { } public void activate ( ) { } protected Control createControl ( Composite parent ) { } private void createImage ( Composite parent ) { } private void createViewer ( Composite parent ) { } public void doubleClick ( DoubleClickEvent event ) { } protected void expandPreviouslyExpandedCategories ( ) { } protected Object getSingleSelection ( IStructuredSelection selection ) { } protected void restoreWidgetValues ( ) { } public void saveWidgetValues ( ) { } public void selectionChanged ( SelectionChangedEvent selectionEvent ) { } protected void selectPreviouslySelected ( ) { String selectedId = settings . get ( NewWizardNewPage . STORE_SELECTED_ID ) ; if ( selectedId == null ) return ; Object selected = wizardCategories . findChildCollection ( new Path ( selectedId ) ) ; if ( selected == null ) { selected = wizardCategories . findWizard ( selectedId , true ) ; if ( selected == null ) return ; } StructuredSelection selection = new StructuredSelection ( selected ) ; <START_BUG> viewer . setSelection ( selection ) ; <END_BUG> } public void setDialogSettings ( IDialogSettings settings ) { } protected void storeExpandedCategories ( ) { } protected void storeSelectedCategoryAndWizard ( ) { } private void updateDescription ( WorkbenchWizardElement selectedObject ) { } private boolean hasImage ( WorkbenchWizardElement selectedObject ) { } private void updateWizardSelection ( WorkbenchWizardElement selectedObject ) { } }

Fix:
viewer . setSelection ( selection , true ) ;
Buggy code:
public class SearchPage extends WicketExamplePage { private static Log log = LogFactory . getLog ( SearchPage . class ) ; private SearchPage . SearchCDResultsListView resultsListView ; private final SearchPage . SearchForm searchForm ; private final SearchModel searchModel ; private String infoMessageForNextRendering = null ; private final CDDao dao = new CDDao ( ) ; public SearchPage ( ) { } public SearchPage ( PageParameters pageParameters ) { } public void setCurrentResultPageToFirst ( ) { } public final void setInfoMessageForNextRendering ( String externalMessage ) { } protected void onBeginRender ( ) { } private int getNumberOfResults ( ) { } private class SearchForm extends Form { private String search ; public SearchForm ( final String componentName , final IFeedback errorHandler ) { } public final void onSubmit ( ) { } public final String getSearch ( ) { } public final void setSearch ( String search ) { } void setMessage ( String msg ) { } } private class SearchCDResultsListView extends PageableListView { public SearchCDResultsListView ( String componentName , IModel model , int pageSizeInCells ) { } public void populateItem ( final ListItem item ) { } } private final class DetailLink extends Link { public DetailLink ( String name , Long id ) { } public void onClick ( ) { final RequestCycle requestCycle = getRequestCycle ( ) ; final Long id = ( ( Long ) ( getModelObject ( ) ) ) ; <START_BUG> requestCycle . setPage ( new EditPage ( SearchPage . this , id ) ) ; <END_BUG> } } private final class DeleteLink extends Link { public DeleteLink ( String name , Long id ) { } public void onClick ( ) { final Long id = ( ( Long ) ( getModelObject ( ) ) ) ; dao . delete ( id ) ; info ( "<seq2seq4repair_space>cd<seq2seq4repair_space>deleted" ) ; } } private final class SortLink extends Link { private final String field ; public SortLink ( String componentName , String field ) { } public void onClick ( ) { searchModel . addOrdering ( field ) ; } } private static class CDTableNavigation extends PageableListViewNavigation { public CDTableNavigation ( String componentName , PageableListView table ) { } protected void populateItem ( ListItem item ) { } } }

Fix:
requestCycle . setResponsePage ( new EditPage ( SearchPage . this , id ) ) ;
Buggy code:
public abstract class HT_ItemDurable extends HT_Item < HT_ItemDurable > { public static final String KEY_DURABILITY = "durability" ; public static final String KEY_BROKEN = "broken" ; private static Random random = new Random ( ) ; public HT_ItemDurable ( String modid , String innerName ) { } @ Override public HT_ItemDurable multi ( String ... subNames ) { } public HT_ItemStackBuilder getBuilder ( int durability , int meta ) { } public HT_ItemStackBuilder getBuilder ( int meta ) { } @ Override public void HT_addInformation ( ItemStack itemStack , EntityPlayer player , List < String > list , boolean b ) { } @ Override public boolean showDurabilityBar ( ItemStack stack ) { } @ Override public double getDurabilityForDisplay ( ItemStack stack ) { <START_BUG> return ( ( double ) ( this . getDurability ( stack ) ) ) // ( ( double ) ( this . getMaxDurability ( stack ) ) ) ; <END_BUG> } public abstract int getMaxDurability ( ItemStack itemStack ) { } public int getDurability ( ItemStack itemStack ) { } public void updateDurability ( ItemStack itemStack , int durability ) { } public boolean isBroken ( ItemStack itemStack ) { } protected void onUsingBrokenItem ( ItemStack itemStack ) { } public void decreaseDurabilityBy ( ItemStack itemStack , int damage ) { } protected abstract int HT_getBonusWithEfficency ( ItemStack itemStack ) { } }

Fix:
return 1 - ( ( ( double ) ( this . getDurability ( stack ) ) ) // ( ( double ) ( this . getMaxDurability ( stack ) ) ) ) ;
Buggy code:
public class DisjunctionMaxQuery extends Query implements Iterable < Query > { private ArrayList < Query > disjuncts = new ArrayList < Query > ( ) ; private float tieBreakerMultiplier = 0.0F ; public DisjunctionMaxQuery ( float tieBreakerMultiplier ) { } public DisjunctionMaxQuery ( Collection < Query > disjuncts , float tieBreakerMultiplier ) { } public void add ( Query query ) { } public void add ( Collection < Query > disjuncts ) { } public Iterator < Query > iterator ( ) { } public ArrayList < Query > getDisjuncts ( ) { } public float getTieBreakerMultiplier ( ) { } protected class DisjunctionMaxWeight extends Weight { protected ArrayList < Weight > weights = new ArrayList < Weight > ( ) ; public DisjunctionMaxWeight ( IndexSearcher searcher ) throws IOException { } @ Override public Query getQuery ( ) { } @ Override public float getValueForNormalization ( ) throws IOException { } @ Override public void normalize ( float norm , float topLevelBoost ) { } @ Override public Scorer scorer ( AtomicReaderContext context , boolean scoreDocsInOrder , boolean topScorer , Bits acceptDocs ) throws IOException { Scorer [ ] scorers = new Scorer [ weights . size ( ) ] ; int idx = 0 ; for ( Weight w : weights ) { Scorer subScorer = w . scorer ( context , true , false , acceptDocs ) ; <START_BUG> if ( ( subScorer != null ) && ( ( subScorer . nextDoc ( ) ) != ( DocIdSetIterator . NO_MORE_DOCS ) ) ) { <END_BUG> scorers [ ( idx ++ ) ] = subScorer ; } } if ( idx == 0 ) return null ; DisjunctionMaxScorer result = new DisjunctionMaxScorer ( this , tieBreakerMultiplier , scorers , idx ) ; return result ; } @ Override public Explanation explain ( AtomicReaderContext context , int doc ) throws IOException { } } @ Override public Weight createWeight ( IndexSearcher searcher ) throws IOException { } @ Override public Query rewrite ( IndexReader reader ) throws IOException { } @ Override @ SuppressWarnings ( "unchecked" ) public DisjunctionMaxQuery clone ( ) { } @ Override public void extractTerms ( Set < Term > terms ) { } @ Override public String toString ( String field ) { } @ Override public boolean equals ( Object o ) { } @ Override public int hashCode ( ) { } }

Fix:
if ( subScorer != null ) {
Buggy code:
public abstract class Triple < L , M , R > implements Serializable , Comparable < Triple < L , M , R > > { private static final long serialVersionUID = 1L ; public static < L , M , R > Triple < L , M , R > of ( final L left , final M middle , final R right ) { } public abstract L getLeft ( ) { } public abstract M getMiddle ( ) { } public abstract R getRight ( ) { } @ Override public int compareTo ( final Triple < L , M , R > other ) { } @ Override public boolean equals ( final Object obj ) { if ( obj == ( this ) ) { return true ; } if ( obj instanceof Triple < ? , ? , ? > ) { <START_BUG> Triple < ? , ? , ? > other = ( ( Triple < ? , ? , ? > ) ( obj ) ) ; <END_BUG> return ( ( ObjectUtils . equals ( getLeft ( ) , other . getLeft ( ) ) ) && ( ObjectUtils . equals ( getMiddle ( ) , other . getMiddle ( ) ) ) ) && ( ObjectUtils . equals ( getRight ( ) , other . getRight ( ) ) ) ; } return false ; } @ Override public int hashCode ( ) { } @ Override public String toString ( ) { } public String toString ( final String format ) { } }

Fix:
final Triple < ? , ? , ? > other = ( ( Triple < ? , ? , ? > ) ( obj ) ) ;
Buggy code:
class MapToMap implements ConversionExecutor { private TypeDescriptor sourceType ; private TypeDescriptor targetType ; private GenericConversionService conversionService ; public MapToMap ( TypeDescriptor sourceType , TypeDescriptor targetType , GenericConversionService conversionService ) { } @ SuppressWarnings ( "unchecked" ) public Object execute ( Object source ) throws ConversionExecutionException { try { Map map = ( ( Map ) ( source ) ) ; Map targetMap = ( ( Map ) ( MapToMap . getImpl ( targetType . getType ( ) ) . newInstance ( ) ) ) ; Iterator < Map . Entry < ? , ? > > it = map . entrySet ( ) . iterator ( ) ; while ( it . hasNext ( ) ) { Map . Entry entry = it . next ( ) ; Object key = entry . getKey ( ) ; Object value = entry . getValue ( ) ; key = conversionService . executeConversion ( key , TypeDescriptor . valueOf ( targetType . getMapKeyType ( ) ) ) ; value = conversionService . executeConversion ( value , TypeDescriptor . valueOf ( targetType . getMapValueType ( ) ) ) ; targetMap . put ( key , value ) ; } return targetMap ; } catch ( Exception e ) { <START_BUG> throw new ConversionExecutionException ( source , sourceType , targetType , e ) ; <END_BUG> } } static Class < ? > getImpl ( Class < ? > targetClass ) { } }

Fix:
throw new ConversionExecutionException ( source , sourceType . getType ( ) , targetType , e ) ;
Buggy code:
public class DaoGenerator { private Pattern patternKeepIncludes ; private Pattern patternKeepFields ; private Pattern patternKeepMethods ; private Template templateDao ; private Template templateDaoMaster ; private Template templateDaoSession ; private Template templateEntity ; private Template templateDaoUnitTest ; public DaoGenerator ( ) throws IOException { } private Pattern compilePattern ( String sectionName ) { } public void generateAll ( Schema schema , String outDir ) throws Exception { } public void generateAll ( Schema schema , String outDir , String outDirTest ) throws Exception { long start = System . currentTimeMillis ( ) ; File outDirFile = toFileForceExists ( outDir ) ; File outDirTestFile = null ; if ( outDirTest != null ) { outDirTestFile = toFileForceExists ( outDirTest ) ; } schema . init2ndPass ( ) ; schema . init3ndPass ( ) ; List < Entity > entities = schema . getEntities ( ) ; for ( Entity entity : entities ) { generate ( templateDao , outDirFile , entity . getJavaPackageDao ( ) , entity . getClassNameDao ( ) , schema , entity ) ; if ( ( ! ( entity . isProtobuf ( ) ) ) && ( ! ( entity . isSkipGeneration ( ) ) ) ) { generate ( templateEntity , outDirFile , entity . getJavaPackage ( ) , entity . getClassName ( ) , schema , entity ) ; } <START_BUG> if ( outDirTestFile != null ) { <END_BUG> String javaPackageTest = entity . getJavaPackageTest ( ) ; String classNameTest = entity . getClassNameTest ( ) ; File javaFilename = toJavaFilename ( outDirTestFile , javaPackageTest , classNameTest ) ; if ( ! ( javaFilename . exists ( ) ) ) { generate ( templateDaoUnitTest , outDirTestFile , javaPackageTest , classNameTest , schema , entity ) ; } else { System . out . println ( ( "Skipped<seq2seq4repair_space>" + ( javaFilename . getCanonicalPath ( ) ) ) ) ; } } } generate ( templateDaoMaster , outDirFile , schema . getDefaultJavaPackageDao ( ) , "DaoMaster" , schema , null ) ; generate ( templateDaoSession , outDirFile , schema . getDefaultJavaPackageDao ( ) , "DaoSession" , schema , null ) ; long time = ( System . currentTimeMillis ( ) ) - start ; System . out . println ( ( ( ( ( "Processed<seq2seq4repair_space>" + ( entities . size ( ) ) ) + "<seq2seq4repair_space>entities<seq2seq4repair_space>in<seq2seq4repair_space>" ) + time ) + "ms" ) ) ; } protected File toFileForceExists ( String filename ) throws IOException { } private void generate ( Template template , File outDirFile , String javaPackage , String javaClassName , Schema schema , Entity entity ) throws Exception { } private void checkKeepSections ( File file , Map < String , Object > root ) { } protected File toJavaFilename ( File outDirFile , String javaPackage , String javaClassName ) { } }

Fix:
if ( ( outDirTestFile != null ) && ( ! ( entity . isSkipGenerationTest ( ) ) ) ) {
Buggy code:
public class NonBlockingQueryTest extends DocumentDBBaseTest { @ Parameters ( "url" ) public NonBlockingQueryTest ( @ Optional String url ) { } @ BeforeClass @ Override public void beforeClass ( ) throws Exception { } @ BeforeMethod @ Override public void beforeMethod ( ) throws Exception { } @ Test public void testClone ( ) { } @ Test public void testNonBlockingQuery ( ) { ODatabaseDocumentTx db = database ; final AtomicInteger counter = new AtomicInteger ( 0 ) ; for ( int i = 0 ; i < 1000 ; i ++ ) { db . command ( new OCommandSQL ( "insert<seq2seq4repair_space>into<seq2seq4repair_space>Foo<seq2seq4repair_space>(a)<seq2seq4repair_space>values<seq2seq4repair_space>('bar')" ) ) . execute ( ) ; } Future future = db . query ( new com . orientechnologies . orient . core . sql . query . OSQLNonBlockingQuery < Object > ( "select<seq2seq4repair_space>from<seq2seq4repair_space>Foo" , new OCommandResultListener ( ) { @ Override public boolean result ( Object iRecord ) { counter . incrementAndGet ( ) ; return true ; } @ Override public void end ( ) { } } ) ) ; <START_BUG> Assert . assertNotEquals ( counter . get ( ) , 1000 ) ; <END_BUG> try { future . get ( ) ; Assert . assertEquals ( counter . get ( ) , 1000 ) ; } catch ( InterruptedException e ) { Assert . fail ( ) ; e . printStackTrace ( ) ; } catch ( ExecutionException e ) { Assert . fail ( ) ; e . printStackTrace ( ) ; } } }

Fix:
Assert . assertFalse ( ( ( counter . get ( ) ) == 1000 ) ) ;
Buggy code:
@ Controller @ RequestMapping ( "gmail" ) public class GmailContactController { private Log logger = LogFactory . getLog ( GmailContactController . class ) ; @ Autowired UserTokenService userTokenService ; @ RequestMapping ( value = "" , method = RequestMethod . GET ) public ModelAndView getIndex ( ) { } @ LoginRequired @ RequestMapping ( "contacts" ) public ModelAndView getContactList ( HttpServletResponse response , HttpServletRequest request ) { ModelAndView mav = new ModelAndView ( "contacts" ) ; User user = ( ( User ) ( request . getAttribute ( "user" ) ) ) ; UserToken ut = userTokenService . getUserTokenById ( user . getId ( ) ) ; try { <START_BUG> List < ContactEntry > contactList = GmailContactsUtils . getContacts ( ut . getAccessToken ( ) ) ; <END_BUG> List < GmailContactEntry > gmailContactEntryList = new ArrayList < GmailContactEntry > ( ) ; for ( ContactEntry contact : contactList ) { gmailContactEntryList . add ( new GmailContactEntry ( contact ) ) ; } mav . addObject ( "contactList" , gmailContactEntryList ) ; } catch ( OAuthException e ) { logger . error ( e . getMessage ( ) , e ) ; } catch ( IOException e ) { logger . error ( e . getMessage ( ) , e ) ; } catch ( ServiceException e ) { logger . error ( e . getMessage ( ) , e ) ; } return mav ; } @ LoginRequired @ RequestMapping ( "contact//detail" ) public ModelAndView getContactDetail ( HttpServletResponse response , HttpServletRequest request , @ RequestParam ( "contactId" ) String contactId ) { } @ LoginRequired @ RequestMapping ( value = "contact//delete" , method = RequestMethod . GET ) public String delContact ( HttpServletResponse response , HttpServletRequest request , @ RequestParam ( "contactId" ) String contactId ) { } @ LoginRequired @ RequestMapping ( value = "contact//add" , method = RequestMethod . GET ) public ModelAndView getAddEventPage ( ) { } @ LoginRequired @ RequestMapping ( value = "contact//add" , method = RequestMethod . POST ) public String addContact ( HttpServletResponse response , HttpServletRequest request , @ RequestParam ( "familyName" ) String familyName , @ RequestParam ( "givenName" ) String givenName , @ RequestParam ( "emailAddress" ) String emailAddress , @ RequestParam ( "phoneNumber" ) String phoneNumber ) { } private ContactEntry initContact ( String familyName , String givenName , String emailAddress , String phoneNumber ) { } }

Fix:
List < ContactEntry > contactList = GmailContactsUtils . getContacts ( ut . getAccessToken ( ) , 200 ) ;
Buggy code:
public class OSMOldOutputter extends AbstractOutputter { private static final NumberFormat LAT_LON_FORMAT = NumberFormat . getInstance ( ) ; private File rootDir ; private String filePre ; private int count = 0 ; private String generator ; public OSMOldOutputter ( File rootDirFile , String filePrefix , String generatorString ) { } public void write ( OSMFile osmOut ) { } private void saveOsmOut ( OSMFile osmOut , File actualOutput ) { } private static void outputRelations ( Writer out , Iterator < Relation > relationIter ) throws IOException { } private static void outputMembers ( Writer out , Iterator < Member > memberIter ) throws IOException { } private static void outputWays ( Writer out , Iterator < Way > wayIter ) throws IOException { } private static void outputWayRefs ( Writer out , Iterator < Node > nodeIter ) throws IOException { } private static void outputNodes ( Writer out , Iterator < Node > nodeIter ) throws IOException { while ( nodeIter . hasNext ( ) ) { Node node = nodeIter . next ( ) ; out . write ( "<seq2seq4repair_space><node<seq2seq4repair_space>" ) ; OSMOldOutputter . writePrimitveAttrs ( out , node ) ; <START_BUG> OSMOldOutputter . writeAttr ( out , "lat" , OSMOldOutputter . LAT_LON_FORMAT . format ( node . getLon ( ) ) ) ; <END_BUG> OSMOldOutputter . writeAttr ( out , "lon" , OSMOldOutputter . LAT_LON_FORMAT . format ( node . getLon ( ) ) ) ; if ( node . hasTags ( ) ) { out . write ( ">\n" ) ; Iterator < Tag > tagIter = node . getTagIterator ( ) ; OSMOldOutputter . outputTags ( out , tagIter ) ; out . write ( "<seq2seq4repair_space><//node>\n" ) ; } else { out . write ( "//>\n" ) ; } } } private static void writePrimitveAttrs ( Writer out , Primitive prim ) throws IOException { } private static void writeAttr ( Writer out , String key , String value ) throws IOException { } private static void outputTags ( Writer out , Iterator < Tag > tagIter ) throws IOException { } }

Fix:
OSMOldOutputter . writeAttr ( out , "lat" , OSMOldOutputter . LAT_LON_FORMAT . format ( node . getLat ( ) ) ) ;
Buggy code:
public interface IChoiceRenderer extends Serializable { <START_BUG> String getDisplayValue ( Object object ) ; <END_BUG> String getIdValue ( Object object , int index ) { } }

Fix:
Object getDisplayValue ( Object object ) ;
Buggy code:
public class PredicatedCollection extends AbstractSerializableCollectionDecorator { private static final long serialVersionUID = - 5259182142076705162L ; protected final Predicate predicate ; public static Collection decorate ( Collection coll , Predicate predicate ) { } protected PredicatedCollection ( Collection coll , Predicate predicate ) { } protected void validate ( Object object ) { if ( ( predicate . evaluate ( object ) ) == false ) { <START_BUG> throw new IllegalArgumentException ( ( ( "Cannot<seq2seq4repair_space>add<seq2seq4repair_space>Object<seq2seq4repair_space>'" + object ) + "'<seq2seq4repair_space>-<seq2seq4repair_space>Predicate<seq2seq4repair_space>rejected<seq2seq4repair_space>it" ) ) ; <END_BUG> } } public boolean add ( Object object ) { } public boolean addAll ( Collection coll ) { } }

Fix:
throw new IllegalArgumentException ( ( ( ( ( "Cannot<seq2seq4repair_space>add<seq2seq4repair_space>Object<seq2seq4repair_space>'" + object ) + "'<seq2seq4repair_space>-<seq2seq4repair_space>Predicate<seq2seq4repair_space>'" ) + ( predicate ) ) + "'<seq2seq4repair_space>rejected<seq2seq4repair_space>it" ) ) ;
Buggy code:
public class TestMappingToolAutoDelete extends TestCase { private JDBCConfiguration _conf ; private OpenJPAEntityManagerFactory emf ; public void setUp ( ) { <START_BUG> Map props = new HashMap ( ) ; <END_BUG> props . put ( "openjpa.MetaDataFactory" , ( ( "jpa(Types=" + ( AllFieldTypes . class . getName ( ) ) ) + ")" ) ) ; emf = OpenJPAPersistence . cast ( Persistence . createEntityManagerFactory ( "test" , props ) ) ; _conf = ( ( JDBCConfiguration ) ( emf . getConfiguration ( ) ) ) ; EntityManager em = emf . createEntityManager ( ) ; em . getTransaction ( ) . begin ( ) ; em . persist ( new AllFieldTypes ( ) ) ; em . getTransaction ( ) . commit ( ) ; em . close ( ) ; } public void tearDown ( ) { } public void testMappingToolAutoDelete ( ) throws IOException , SQLException { } }

Fix:
Map props = new HashMap ( System . getProperties ( ) ) ;
Buggy code:
public class Client { public static void main ( String [ ] args ) { Socket sock ; int port = 8080 ; InetAddress addr = null ; BufferedReader inStream = null ; DataOutputStream outStream = null ; String buffer = null ; BufferedReader br = new BufferedReader ( new InputStreamReader ( System . in ) ) ; StringBuffer stringBuffer = null ; if ( ( args . length ) < 2 ) { System . err . println ( "Usage:<seq2seq4repair_space>java<seq2seq4repair_space>Client<seq2seq4repair_space><server_ip><seq2seq4repair_space><server_port>" ) ; System . exit ( 1 ) ; } try { port = Integer . parseInt ( args [ 1 ] ) ; } catch ( Exception e ) { System . err . println ( "Usage:<seq2seq4repair_space>java<seq2seq4repair_space>Client<seq2seq4repair_space><server_ip><seq2seq4repair_space><server_port>" ) ; System . exit ( 1 ) ; } if ( ( port > 65535 ) || ( port < 1024 ) ) { System . err . println ( "Port<seq2seq4repair_space>number<seq2seq4repair_space>must<seq2seq4repair_space>be<seq2seq4repair_space>in<seq2seq4repair_space>between<seq2seq4repair_space>1024<seq2seq4repair_space>and<seq2seq4repair_space>65535" ) ; System . exit ( 1 ) ; } try { addr = InetAddress . getByName ( args [ 0 ] ) ; } catch ( UnknownHostException e ) { System . err . println ( "Invalid<seq2seq4repair_space>address<seq2seq4repair_space>provided<seq2seq4repair_space>for<seq2seq4repair_space>server" ) ; System . exit ( 1 ) ; } while ( true ) { try { System . out . println ( "\nEnter<seq2seq4repair_space>data<seq2seq4repair_space>to<seq2seq4repair_space>send<seq2seq4repair_space>to<seq2seq4repair_space>server" ) ; stringBuffer = new StringBuffer ( ) ; while ( ( ( buffer = br . readLine ( ) ) . length ( ) ) != 0 ) { stringBuffer . append ( buffer ) ; stringBuffer . append ( "\r\n" ) ; } <START_BUG> sock = new Socket ( args [ 0 ] , port ) ; <END_BUG> System . out . println ( ( "Just<seq2seq4repair_space>connected<seq2seq4repair_space>to<seq2seq4repair_space>" + ( sock . getRemoteSocketAddress ( ) ) ) ) ; } catch ( IOException e ) { System . err . println ( "Unable<seq2seq4repair_space>to<seq2seq4repair_space>reach<seq2seq4repair_space>server" ) ; continue ; } try { inStream = new BufferedReader ( new InputStreamReader ( sock . getInputStream ( ) ) ) ; outStream = new DataOutputStream ( sock . getOutputStream ( ) ) ; outStream . writeChars ( stringBuffer . toString ( ) ) ; outStream . writeChar ( '\n' ) ; outStream . flush ( ) ; buffer = inStream . readLine ( ) ; System . out . println ( ( "Received<seq2seq4repair_space>:<seq2seq4repair_space>" + ( stringBuffer . toString ( ) ) ) ) ; sock . close ( ) ; } catch ( IOException e ) { continue ; } } } }

Fix:
sock = new Socket ( addr , port ) ;
Buggy code:
public class StatementParser { Map < Class , Listener > listeners = new HashMap < Class , Listener > ( ) ; BlockStatement block = null ; Map firstNode = new HashMap ( 2 ) ; public StatementParser ( Statement [ ] sts , GroupTemplate gt , String resourceId ) { } public void addListener ( Class c , Listener ls ) { } public void parse ( ) { } protected boolean match ( Class astNodeType , Class [ ] matchClasses ) { } protected void exec ( Object astNode , Class [ ] matchClasses , Stack stack ) { stack . push ( astNode ) ; Class astNodeClass = astNode . getClass ( ) ; Field [ ] fields = astNodeClass . getFields ( ) ; for ( Field f : fields ) { if ( ( f . getModifiers ( ) ) != ( Modifier . PUBLIC ) ) continue ; Class target = null ; Class c = f . getType ( ) ; if ( c . isArray ( ) ) { target = c . getComponentType ( ) ; } else { target = c ; } if ( ! ( ASTNode . class . isAssignableFrom ( target ) ) ) continue ; Object values ; try { values = f . get ( astNode ) ; if ( values == null ) continue ; Class target2 = values . getClass ( ) ; if ( target2 . isArray ( ) ) { Object [ ] array = ( ( Object [ ] ) ( values ) ) ; if ( ( array . length ) == 0 ) continue ; for ( int i = 0 ; i < ( array . length ) ; i ++ ) { Object item = array [ i ] ; if ( item == null ) continue ; Class target3 = item . getClass ( ) ; if ( match ( target3 , matchClasses ) ) { stack . push ( item ) ; Listener ls = this . listeners . get ( target3 ) ; NodeEvent e = new NodeEvent ( stack ) ; Object newASTNode = ls . onEvent ( e ) ; if ( newASTNode != null ) { stack . pop ( ) ; stack . push ( newASTNode ) ; array [ i ] = newASTNode ; item = newASTNode ; } this . exec ( item , matchClasses , stack ) ; stack . pop ( ) ; } else { ASTNode node = ( ( ASTNode ) ( item ) ) ; this . exec ( node , matchClasses , stack ) ; } } } else { if ( match ( target2 , matchClasses ) ) { stack . push ( values ) ; Listener ls = this . listeners . get ( target2 ) ; NodeEvent e = new NodeEvent ( stack ) ; Object newASTNode = ls . onEvent ( e ) ; if ( newASTNode != null ) { stack . pop ( ) ; stack . push ( newASTNode ) ; try { <START_BUG> f . set ( astNode , values ) ; <END_BUG> } catch ( Exception ex ) { BeetlException be = new BeetlException ( BeetlException . ERROR , "替换ASTNode错" , ex ) ; be . pushToken ( ( ( ASTNode ) ( newASTNode ) ) . token ) ; throw be ; } values = newASTNode ; } this . exec ( values , matchClasses , stack ) ; stack . pop ( ) ; continue ; } else { ASTNode node = ( ( ASTNode ) ( values ) ) ; this . exec ( node , matchClasses , stack ) ; } } } catch ( Exception e ) { throw new RuntimeException ( e ) ; } } stack . pop ( ) ; } }

Fix:
f . set ( astNode , newASTNode ) ;
Buggy code:
public class RadioField extends FormFieldBase { public RadioField ( Form form , Field field , snap . forms . annotations . RadioField annotation ) { } @ Override public String render ( ) { } @ Override public String render ( Map < String , String > attributes ) { if ( ! ( isVisible ( ) ) ) return "" ; getFormFields ( ) ; String defaultValue = getDefaultValue ( ) ; <START_BUG> String which = getAttribute ( "which" ) ; <END_BUG> if ( which != null ) { removeAttribute ( "which" ) ; Optional < ? > optional = mOptions . stream ( ) . filter ( ( o ) -> isValue ( o , which ) ) . findFirst ( ) ; if ( ! ( optional . isPresent ( ) ) ) throw new snap . SnapException ( String . format ( "Can't<seq2seq4repair_space>render<seq2seq4repair_space>field<seq2seq4repair_space>for<seq2seq4repair_space>value<seq2seq4repair_space>%1$s<seq2seq4repair_space>of<seq2seq4repair_space>field<seq2seq4repair_space>%2$s" , which , mField . getName ( ) ) ) ; return doRender ( optional . get ( ) , defaultValue , attributes ) ; } else { return mOptions . stream ( ) . map ( ( o ) -> doRender ( o , defaultValue , attributes ) ) . collect ( Collectors . joining ( "\n" ) ) ; } } @ Override public String getLabel ( String which ) { } public String getHtmlId ( String which ) { } @ Override public void setFieldValue ( String [ ] values ) { } @ Override public String toString ( ) { } private boolean isValue ( Object o , String key ) { } private String doRender ( Object o , String defaultValue , Map < String , String > attributes ) { } private void getFormFields ( ) { } private String getDefaultValue ( ) { } private snap . forms . annotations . RadioField mAnnotation ; private List < ? > mOptions ; private Field mOptionsField ; }

Fix:
String which = attributes . get ( "which" ) ;
Buggy code:
public class PostingsList implements Serializable , Comparable { private LinkedList < src . PostingsEntry > list = new LinkedList < src . PostingsEntry > ( ) ; public int size ( ) { } public boolean isEmpty ( ) { } public PostingsEntry get ( int i ) { } public void addToken ( int docID , int offset ) { } public ListIterator < src . PostingsEntry > listIterator ( ) { } @ Override public int compareTo ( Object o ) { if ( o instanceof PostingsList ) { <START_BUG> return Integer . compare ( ( ( PostingsList ) ( o ) ) . size ( ) , size ( ) ) ; <END_BUG> } return 0 ; } }

Fix:
return Integer . compare ( size ( ) , ( ( PostingsList ) ( o ) ) . size ( ) ) ;
Buggy code:
public class AttributeModifierComponentTest extends TestCase { private static final Logger log = LoggerFactory . getLogger ( AttributeModifierComponentTest . class ) ; private WicketTester tester ; public AttributeModifierComponentTest ( final String name ) { } @ Override protected void setUp ( ) throws Exception { } @ Override protected void tearDown ( ) throws Exception { } public void testComponentTagAttributeModification ( ) throws Exception { <START_BUG> String document = tester . getServletResponse ( ) . getDocument ( ) ; <END_BUG> AttributeModifierComponentTest . log . info ( document ) ; Assert . assertTrue ( validateDocument ( document ) ) ; } private boolean validateDocument ( String document ) { } }

Fix:
String document = tester . getLastResponse ( ) . getTextResponse ( ) . toString ( ) ;
Buggy code:
public class GameEngine { private static final Logger log = Logger . getLogger ( GameEngine . class . getName ( ) ) ; private Game g ; public GameEngine ( Game g ) { } public void resetAllPlayers ( ) { } public void assignRoles ( ) { } private Player getRandomAvailablePlayer ( ) { } public Player determineNextVoterInRound1 ( Player lastVoter ) { } public Player determineNextVoterInRound2 ( Player lastVoter ) { } public Player determineNextVoterInNight ( Player lastVoter ) { } public ArrayList < Player > computeVotedIdsInRound1 ( ) { } public Player computeDeadPlayerInRound2 ( ) { } public Player computeDeadPlayerInNight ( ) { } public boolean hasGameEnded ( ) { int countOfAliveWolves = 0 ; int countOfAliveCitizens = 0 ; for ( Player p : g . getPlayers ( ) ) { if ( p . isAlive ( ) ) { if ( ( p . getRole ( ) ) == ( PlayerRole . WOLF ) ) { countOfAliveWolves ++ ; } else { countOfAliveCitizens ++ ; } } } <START_BUG> return ( countOfAliveWolves == 0 ) || ( countOfAliveWolves >= ( countOfAliveCitizens - 1 ) ) ; <END_BUG> } public void resetVotes ( ) { } public void updateGame ( Game g ) { } private void persistGame ( ) { } }

Fix:
return ( countOfAliveWolves == 0 ) || ( countOfAliveWolves >= countOfAliveCitizens ) ;
Buggy code:
public interface Validator extends Serializable { public static final String PCDATA = "#PCDATA" ; public AttributeDefinition getAttributeDefinition ( String element , String attribute ) { } <START_BUG> public AttributeDefinition [ ] getAttributeDefinitions ( String element ) ; <END_BUG> public Set getValidRootElements ( ) { } public Set < String > getValidItems ( String element ) { } public boolean isValidSequence ( String element , List < String > nodes , boolean partial ) { } public boolean isValidSequence ( String element , List < String > seq1 , List < String > seq2 , List < String > seq3 , boolean partial ) { } }

Fix:
public List < AttributeDefinition > getAttributeDefinitions ( String element ) ;
Buggy code:
public abstract class BaseTree extends AbstractTree { public BaseTree ( String id ) { } public BaseTree ( String id , IModel model ) { } private static final ResourceReference CSS = new CompressedResourceReference ( BaseTree . class , "res//base-tree.css" ) ; protected ResourceReference getCSS ( ) { } private static final long serialVersionUID = 1L ; private static final String JUNCTION_LINK_ID = "junctionLink" ; private static final String NODE_COMPONENT_ID = "nodeComponent" ; protected void populateTreeItem ( WebMarkupContainer item , int level ) { } protected String getSelectedClass ( ) { } protected abstract Component newNodeComponent ( String id , IModel model ) { } private static boolean isNodeLast ( TreeNode node ) { } private static class JunctionBorder implements IComponentBorder { private static final long serialVersionUID = 1L ; private final TreeNode node ; private final int level ; public JunctionBorder ( TreeNode node , int level ) { } public void renderAfter ( Component component ) { } public void renderBefore ( Component component ) { Response response = RequestCycle . get ( ) . getResponse ( ) ; TreeNode parent = node . getParent ( ) ; CharSequence [ ] classes = new CharSequence [ level ] ; for ( int i = 0 ; i < ( level ) ; ++ i ) { <START_BUG> if ( BaseTree . isNodeLast ( parent ) ) { <END_BUG> classes [ i ] = "spacer" ; } else { classes [ i ] = "line" ; } parent = parent . getParent ( ) ; } for ( int i = ( level ) - 1 ; i >= 0 ; -- i ) { response . write ( ( ( "<td<seq2seq4repair_space>class=\"" + ( classes [ i ] ) ) + "\"><span><//span><//td>" ) ) ; } if ( BaseTree . isNodeLast ( node ) ) { response . write ( "<td<seq2seq4repair_space>class=\"half-line\">" ) ; } else { response . write ( "<td<seq2seq4repair_space>class=\"line\">" ) ; } } } protected Component newJunctionLink ( MarkupContainer parent , final String id , final TreeNode node ) { } protected void onJunctionLinkClicked ( AjaxRequestTarget target , TreeNode node ) { } public static final class LinkType extends EnumeratedType { public static final BaseTree . LinkType AJAX = new BaseTree . LinkType ( "AJAX" ) ; public static final BaseTree . LinkType AJAX_FALLBACK = new BaseTree . LinkType ( "AJAX_FALLBACK" ) ; public static final BaseTree . LinkType REGULAR = new BaseTree . LinkType ( "REGULAR" ) ; private static final long serialVersionUID = 1L ; public LinkType ( String name ) { } } public interface ILinkCallback extends IClusterable { void onClick ( AjaxRequestTarget target ) { } } public MarkupContainer newLink ( String id , final BaseTree . ILinkCallback callback ) { } public BaseTree . LinkType getLinkType ( ) { } public void setLinkType ( BaseTree . LinkType linkType ) { } protected boolean isForceRebuildOnSelectionChange ( ) { } private BaseTree . LinkType linkType = BaseTree . LinkType . AJAX ; }

Fix:
if ( ( parent == null ) || ( BaseTree . isNodeLast ( parent ) ) ) {
Buggy code:
public class TestLRS extends SingleEMFTestCase { private long id ; public void setUp ( ) { } public void testEMClear ( ) { } public void testEMClose ( ) { } public void testDetachCopy ( ) { OpenJPAEntityManager em = emf . createEntityManager ( ) ; LRSEntity lrs = em . find ( LRSEntity . class , id ) ; assertLRS ( lrs , "lrs" ) ; <START_BUG> lrs = em . detach ( lrs ) ; <END_BUG> assertEquals ( "lrs" , lrs . getName ( ) ) ; assertNull ( lrs . getLRSList ( ) ) ; em . close ( ) ; assertMerge ( lrs ) ; } private void assertLRS ( LRSEntity lrs , String name ) { } private void assertMerge ( LRSEntity lrs ) { } public static void main ( String [ ] args ) { } }

Fix:
lrs = em . detachCopy ( lrs ) ;
Buggy code:
public class ExecTask extends Task { private static String LINE_SEP = System . getProperty ( "line.separator" ) ; private boolean m_newEnvironment ; private Integer m_timeout ; private EnvironmentData m_env = new EnvironmentData ( ) ; private Commandline m_command = new Commandline ( ) ; private FileOutputStream m_ouput ; private ByteArrayOutputStream m_byteArrayOutput ; private boolean m_useVMLauncher = true ; private File m_workingDirectory ; private String m_os ; private File m_outputFile ; private String m_outputProperty ; private String m_resultProperty ; public void setDir ( final File dir ) throws TaskException { } public void setExecutable ( final String value ) throws TaskException { } public void setNewenvironment ( final boolean newEnvironment ) { } public void setOs ( final String os ) { } public void setOutput ( final File outputFile ) { } public void setOutputproperty ( final String outputprop ) { } public void setResultProperty ( final String resultProperty ) { } public void setTimeout ( final Integer timeout ) { } public void setVMLauncher ( final boolean vmLauncher ) { } public void addEnv ( final EnvironmentVariable var ) { } public Argument createArg ( ) { } public void execute ( ) throws TaskException { } protected boolean isValidOs ( ) { } protected final void runExecute ( final Execute exe ) throws IOException , TaskException { } private void writeResultToProperty ( ) throws IOException , TaskException { } protected void checkConfiguration ( ) throws TaskException { } <START_BUG> protected ExecuteStreamHandler createHandler ( ) throws TaskException { <END_BUG> if ( ( m_outputFile ) != null ) { try { m_ouput = new FileOutputStream ( m_outputFile ) ; getLogger ( ) . debug ( ( "Output<seq2seq4repair_space>redirected<seq2seq4repair_space>to<seq2seq4repair_space>" + ( m_outputFile ) ) ) ; return new PumpStreamHandler ( m_ouput ) ; } catch ( FileNotFoundException fne ) { throw new TaskException ( ( "Cannot<seq2seq4repair_space>write<seq2seq4repair_space>to<seq2seq4repair_space>" + ( m_outputFile ) ) , fne ) ; } catch ( IOException ioe ) { throw new TaskException ( ( "Cannot<seq2seq4repair_space>write<seq2seq4repair_space>to<seq2seq4repair_space>" + ( m_outputFile ) ) , ioe ) ; } } else if ( ( m_outputProperty ) != null ) { m_byteArrayOutput = new ByteArrayOutputStream ( ) ; getLogger ( ) . debug ( "Output<seq2seq4repair_space>redirected<seq2seq4repair_space>to<seq2seq4repair_space>ByteArray" ) ; return new PumpStreamHandler ( m_byteArrayOutput ) ; } else { return new LogStreamHandler ( this , Project . MSG_INFO , Project . MSG_WARN ) ; } } protected ExecuteWatchdog createWatchdog ( ) throws TaskException { } protected void logFlush ( ) { } protected void maybeSetResultPropertyValue ( int result ) throws TaskException { } protected Execute prepareExec ( ) throws TaskException { } protected void runExec ( final Execute exe ) throws TaskException { } protected final Commandline getCommand ( ) { } }

Fix:
protected PumpStreamHandler createHandler ( ) throws TaskException {
Buggy code:
public class TestWindowsMMap extends LuceneTestCase { private static final String alphabet = "abcdefghijklmnopqrstuvwzyz" ; @ Override public void setUp ( ) throws Exception { } private String randomToken ( ) { } private String randomField ( ) { } public void testMmapIndex ( ) throws Exception { File dirPath = createTempDir ( "testLuceneMmap" ) ; rmDir ( dirPath ) ; MMapDirectory dir = new MMapDirectory ( dirPath , null ) ; MockAnalyzer analyzer = new MockAnalyzer ( random ( ) ) ; IndexWriter writer = new IndexWriter ( dir , new org . apache . lucene . index . IndexWriterConfig ( TEST_VERSION_CURRENT , analyzer ) . setOpenMode ( CREATE ) ) ; writer . commit ( ) ; IndexReader reader = DirectoryReader . open ( dir ) ; IndexSearcher searcher = newSearcher ( reader ) ; int num = atLeast ( 1000 ) ; for ( int dx = 0 ; dx < num ; dx ++ ) { String f = randomField ( ) ; Document doc = new Document ( ) ; doc . add ( newTextField ( "data" , f , YES ) ) ; writer . addDocument ( doc ) ; } reader . close ( ) ; <START_BUG> writer . close ( ) ; <END_BUG> rmDir ( dirPath ) ; } private void rmDir ( File dir ) { } }

Fix:
writer . shutdown ( ) ;
Buggy code:
public class Master { private Name origin ; private BufferedReader br ; private File file ; private Record last = null ; private int defaultTTL = 3600 ; private Master included = null ; Master ( File _file , Name defaultOrigin ) throws IOException { } public Master ( String filename ) throws IOException { } public Record nextRecord ( ) throws IOException { } private Name parseOrigin ( MyStringTokenizer st ) throws IOException { } private int parseTTL ( MyStringTokenizer st ) throws IOException { if ( ! ( st . hasMoreTokens ( ) ) ) throw new IOException ( "Missing<seq2seq4repair_space>TTL" ) ; <START_BUG> return new Integer ( st . nextToken ( ) ) . intValue ( ) ; <END_BUG> } private void parseInclude ( MyStringTokenizer st ) throws IOException { } private Record parseRR ( MyStringTokenizer st , boolean useLast , Record last , Name origin ) throws IOException { } private static String stripTrailing ( String s ) { } public static String readExtendedLine ( BufferedReader br ) throws IOException { } }

Fix:
return Integer . parseInt ( st . nextToken ( ) ) ;
Buggy code:
public class ContextLoaderUtilsMergedConfigTests extends AbstractContextLoaderUtilsTests { @ Test public void buildMergedConfigWithoutAnnotation ( ) { } @ Test public void buildMergedConfigWithBareAnnotations ( ) { Class < ? > testClass = BareAnnotations . class ; MergedContextConfiguration mergedConfig = buildMergedContextConfiguration ( testClass ) ; <START_BUG> assertMergedConfig ( mergedConfig , testClass , new String [ ] { "classpath://org//springframework//test//context//support//AbstractContextLoaderUtilsTests$BareAnnotations-context.xml" } , EMPTY_CLASS_ARRAY , DelegatingSmartContextLoader . class ) ; <END_BUG> } @ Test public void buildMergedConfigWithLocalAnnotationAndLocations ( ) { } @ Test public void buildMergedConfigWithMetaAnnotationAndLocations ( ) { } @ Test public void buildMergedConfigWithLocalAnnotationAndClasses ( ) { } @ Test public void buildMergedConfigWithLocalAnnotationAndOverriddenContextLoaderAndLocations ( ) { } @ Test public void buildMergedConfigWithLocalAnnotationAndOverriddenContextLoaderAndClasses ( ) { } @ Test public void buildMergedConfigWithLocalAndInheritedAnnotationsAndLocations ( ) { } @ Test public void buildMergedConfigWithLocalAndInheritedAnnotationsAndClasses ( ) { } @ Test public void buildMergedConfigWithAnnotationsAndOverriddenLocations ( ) { } @ Test public void buildMergedConfigWithAnnotationsAndOverriddenClasses ( ) { } }

Fix:
assertMergedConfig ( mergedConfig , testClass , new String [ ] { "classpath:org//springframework//test//context//support//AbstractContextLoaderUtilsTests$BareAnnotations-context.xml" } , EMPTY_CLASS_ARRAY , DelegatingSmartContextLoader . class ) ;
Buggy code:
public abstract class Session implements Serializable { private static final long serialVersionUID = 1L ; public static final String SESSION_ATTRIBUTE_NAME = "session" ; static final String pageMapEntryAttributePrefix = "p:" ; private static final String pageMapAttributePrefix = "m:" ; private static final ThreadLocal current = new ThreadLocal ( ) ; private static final Log log = LogFactory . getLog ( Session . class ) ; private transient Application application ; private transient IConverter converter ; private transient boolean dirty = false ; private transient IPageFactory pageFactory ; private transient ISessionStore sessionStore ; private transient List dirtyObjects ; private ClientInfo clientInfo ; private Locale locale ; private String style ; public static interface IPageMapVisitor { public void pageMap ( final PageMap pageMap ) { } } public static Session get ( ) { } public static void set ( final Session session ) { } protected Session ( final Application application ) { } public final void clear ( ) { } public final Application getApplication ( ) { } public IAuthorizationStrategy getAuthorizationStrategy ( ) { } public final IClassResolver getClassResolver ( ) { } public ClientInfo getClientInfo ( ) { } public String getId ( ) { } public Locale getLocale ( ) { } public final Page getPage ( final String pageMapName , final String path , final int versionNumber ) { } public final IPageFactory getPageFactory ( ) { } public final IPageFactory getPageFactory ( final Page page ) { } public final PageMap getPageMap ( String pageMapName ) { } public final List getPageMaps ( ) { } public final RequestCycle getRequestCycle ( ) { } public final int getSizeInBytes ( ) { } public final String getStyle ( ) { } public final void init ( ) { } public void invalidate ( ) { } public final PageMap newPageMap ( final String name ) { } public final RequestCycle newRequestCycle ( final Request request , final Response response ) { } public final void setApplication ( final Application application ) { } public final void setClientInfo ( ClientInfo clientInfo ) { } public final void setLocale ( final Locale locale ) { } public final void setStyle ( final String style ) { } public final void touch ( Page page ) { <START_BUG> page . getPageMap ( ) . put ( page . getPageMapEntry ( ) ) ; <END_BUG> } public final void visitPageMaps ( final Session . IPageMapVisitor visitor ) { } protected void detach ( ) { } protected final void dirty ( ) { } protected final Object getAttribute ( final String name ) { } protected final List getAttributeNames ( ) { } protected abstract IRequestCycleFactory getRequestCycleFactory ( ) { } protected final ISessionStore getSessionStore ( ) { } protected final void removeAttribute ( String name ) { } protected final void setAttribute ( String name , Object value ) { } protected void update ( ) { } final IConverter getConverter ( ) { } final void removePageMap ( final PageMap pageMap ) { } private final String attributeForPageMapName ( final String pageMapName ) { } void dirtyPageMap ( final PageMap map ) { } void dirtyPage ( final Page page ) { } }

Fix:
page . getPageMap ( ) . put ( page ) ;