nus-yam/ex-repair huggingface dataset:
Buggy code:
@ RunWith ( Arquillian . class ) public class TransactionTestCase { private static final String ARCHIVE_NAME = "jpa_transaction" ; private static final String persistence_xml = "<?xml<seq2seq4repair_space>version=\"1.0\"<seq2seq4repair_space>encoding=\"UTF-8\"?><seq2seq4repair_space>" + ( ( ( ( ( ( ( ( "<persistence<seq2seq4repair_space>xmlns=\"http:////java.sun.com//xml//ns//persistence\"<seq2seq4repair_space>version=\"1.0\">" + "<seq2seq4repair_space><persistence-unit<seq2seq4repair_space>name=\"mypc\">" ) + "<seq2seq4repair_space><description>Persistence<seq2seq4repair_space>Unit." ) + "<seq2seq4repair_space><//description>" ) + "<seq2seq4repair_space><jta-data-source>java:jboss//datasources//ExampleDS<//jta-data-source>" ) + "<properties><seq2seq4repair_space><property<seq2seq4repair_space>name=\"hibernate.hbm2ddl.auto\"<seq2seq4repair_space>value=\"create-drop\"//>" ) + "<//properties>" ) + "<seq2seq4repair_space><//persistence-unit>" ) + "<//persistence>" ) ; @ Deployment public static Archive < ? > deploy ( ) { } @ ArquillianResource private static InitialContext iniCtx ; protected < T > T lookup ( String beanName , Class < T > interfaceType ) throws NamingException { } protected < T > T rawLookup ( String name , Class < T > interfaceType ) throws NamingException { } @ Test public void testMultipleNonTXTransactionalEntityManagerInvocations ( ) throws Exception { } @ Test public void testQueryNonTXTransactionalEntityManagerInvocations ( ) throws Exception { } @ Test public void testQueryNonTXTransactionalDetach ( ) throws Exception { } @ Test public void testTransactionRequiredException ( ) throws Exception { } @ Test public void testFailInDAOCalls ( ) throws Exception { SLSB1 slsb1 = lookup ( "SLSB1" , SLSB1 . class ) ; slsb1 . addEmployee ( ) ; <START_BUG> String message = slsb1 . failAfterCalls ( ) ; <END_BUG> assertEquals ( "DB<seq2seq4repair_space>should<seq2seq4repair_space>be<seq2seq4repair_space>unchanged,<seq2seq4repair_space>which<seq2seq4repair_space>we<seq2seq4repair_space>indicate<seq2seq4repair_space>by<seq2seq4repair_space>returning<seq2seq4repair_space>'success'" , "success" , message ) ; message = slsb1 . failInSecondCall ( ) ; assertEquals ( "DB<seq2seq4repair_space>should<seq2seq4repair_space>be<seq2seq4repair_space>unchanged,<seq2seq4repair_space>which<seq2seq4repair_space>we<seq2seq4repair_space>indicate<seq2seq4repair_space>by<seq2seq4repair_space>returning<seq2seq4repair_space>'success'" , "success" , message ) ; message = slsb1 . failAfterCalls ( ) ; assertEquals ( "DB<seq2seq4repair_space>should<seq2seq4repair_space>be<seq2seq4repair_space>unchanged,<seq2seq4repair_space>which<seq2seq4repair_space>we<seq2seq4repair_space>indicate<seq2seq4repair_space>by<seq2seq4repair_space>returning<seq2seq4repair_space>'success'" , "success" , message ) ; } @ Test public void testUserTxRollbackDiscardsChanges ( ) throws Exception { } @ Test public void testEnlistXPCInUserTx ( ) throws Exception { } }

Fix:
String message = slsb1 . failInFirstCall ( ) ;
Buggy code:
public class AsyncAnnotationBeanPostProcessorTests { @ Test public void proxyCreated ( ) { } @ Test public void invokedAsynchronously ( ) { } @ Test public void threadNamePrefix ( ) { StaticApplicationContext context = new StaticApplicationContext ( ) ; BeanDefinition processorDefinition = new RootBeanDefinition ( AsyncAnnotationBeanPostProcessor . class ) ; ThreadPoolTaskExecutor executor = new ThreadPoolTaskExecutor ( ) ; executor . setThreadNamePrefix ( "testExecutor" ) ; executor . afterPropertiesSet ( ) ; <START_BUG> processorDefinition . getPropertyValues ( ) . addPropertyValue ( "executor" , executor ) ; <END_BUG> BeanDefinition targetDefinition = new RootBeanDefinition ( AsyncAnnotationBeanPostProcessorTests . TestBean . class ) ; context . registerBeanDefinition ( "postProcessor" , processorDefinition ) ; context . registerBeanDefinition ( "target" , targetDefinition ) ; context . refresh ( ) ; AsyncAnnotationBeanPostProcessorTests . ITestBean testBean = ( ( AsyncAnnotationBeanPostProcessorTests . ITestBean ) ( context . getBean ( "target" ) ) ) ; testBean . test ( ) ; testBean . await ( 3000 ) ; Thread asyncThread = testBean . getThread ( ) ; assertTrue ( asyncThread . getName ( ) . startsWith ( "testExecutor" ) ) ; context . close ( ) ; } private static interface ITestBean { Thread getThread ( ) { } void test ( ) { } void await ( long timeout ) { } } private static class TestBean implements AsyncAnnotationBeanPostProcessorTests . ITestBean { private Thread thread ; private final CountDownLatch latch = new CountDownLatch ( 1 ) ; public Thread getThread ( ) { } @ Async public void test ( ) { } public void await ( long timeout ) { } } }

Fix:
processorDefinition . getPropertyValues ( ) . add ( "executor" , executor ) ;
Buggy code:
public class Transaction extends BaseTransaction implements Persistent { private Attachment aAttachment = null ; public void create ( NumberKey typeId , ScarabUser user , Attachment attachment ) throws Exception { } public Attachment getAttachment ( ) throws Exception { } public void setAttachment ( Attachment v ) throws Exception { } public List getActivityList ( ) throws Exception { } public void sendEmail ( TemplateContext context , Issue issue , String subject , String template ) throws Exception { TemplateEmail te = new TemplateEmail ( ) ; if ( context == null ) { context = new DefaultTemplateContext ( ) ; } context . put ( "issue" , issue ) ; context . put ( "attachment" , aAttachment ) ; context . put ( "activityList" , getActivityList ( ) ) ; te . setContext ( context ) ; te . setFrom ( Turbine . getConfiguration ( ) . getString ( "scarab.email.modifyissue.fromName" , "Scarab<seq2seq4repair_space>System" ) , Turbine . getConfiguration ( ) . getString ( "scarab.email.modifyissue.fromAddress" , "help@scarab.tigris.org" ) ) ; if ( subject == null ) { <START_BUG> te . setSubject ( ( ( "Issue<seq2seq4repair_space>#" + ( issue . getIssueId ( ) ) ) + "<seq2seq4repair_space>modified" ) ) ; <END_BUG> } else { te . setSubject ( subject ) ; } if ( template == null ) { te . setTemplate ( Turbine . getConfiguration ( ) . getString ( "scarab.email.modifyissue.template" , "email//ModifyIssue.vm" ) ) ; } else { te . setTemplate ( template ) ; } List associatedUsers = issue . getAssociatedUsers ( ) ; Iterator iter = associatedUsers . iterator ( ) ; while ( iter . hasNext ( ) ) { ScarabUser toUser = ( ( ScarabUser ) ( iter . next ( ) ) ) ; te . setTo ( ( ( ( toUser . getFirstName ( ) ) + "<seq2seq4repair_space>" ) + ( toUser . getLastName ( ) ) ) , toUser . getUserName ( ) ) ; te . send ( ) ; } } public void sendEmail ( TemplateContext context , Issue issue ) throws Exception { } public void sendEmail ( Issue issue ) throws Exception { } public void sendEmail ( Issue issue , String subject , String template ) throws Exception { } }

Fix:
te . setSubject ( ( ( ( ( "[" + ( issue . getScarabModule ( ) . getName ( ) . toUpperCase ( ) ) ) + "]<seq2seq4repair_space>Issue<seq2seq4repair_space>#" ) + ( issue . getUniqueId ( ) ) ) + "<seq2seq4repair_space>modified" ) ) ;
Buggy code:
public class SOAPMsgPolicyContextHandler implements PolicyContextHandler { public static final String SEI_ARGS_KEY = "javax.xml.soap.SOAPMessage" ; private static ThreadLocal ejbContext = new ThreadLocal ( ) ; static void setMessage ( SOAPMessage msg ) { } public Object getContext ( String key , Object data ) throws PolicyContextException { Object context = null ; <START_BUG> if ( ( key . equalsIgnoreCase ( SOAPMsgPolicyContextHandler . SEI_ARGS_KEY ) ) == false ) <END_BUG> context = SOAPMsgPolicyContextHandler . ejbContext . get ( ) ; return context ; } public String [ ] getKeys ( ) throws PolicyContextException { } public boolean supports ( String key ) throws PolicyContextException { } }

Fix:
if ( ( key . equalsIgnoreCase ( SOAPMsgPolicyContextHandler . SEI_ARGS_KEY ) ) == true )
Buggy code:
public class UIATokenElement extends UIAToken { private UIATokenEdge top = null ; private UIATokenEdge bottom = null ; private UIATokenEdge right = null ; private UIATokenEdge left = null ; private final String id ; private final UIATokenContainer m_parent ; public UIATokenElement ( UIATokenContainer parent , String name ) { } private void init ( ) { } public boolean equals ( Object o ) { } void setLeft ( UIATokenEdge left ) { } void setTop ( UIATokenEdge top ) { } void setBottom ( UIATokenEdge bottom ) { } void setRight ( UIATokenEdge right ) { } public UIATokenEdge getTop ( ) { } public UIATokenEdge getBottom ( ) { } public UIATokenEdge getRight ( ) { } public UIATokenEdge getLeft ( ) { } public String getId ( ) { } public String toString ( ) { } HashSet < UIATokenElement > getAllLeft ( ) { } HashSet < UIATokenElement > getAllRight ( ) { } HashSet < UIATokenElement > getAllTop ( ) { HashSet < UIATokenElement > erg = new HashSet < UIATokenElement > ( ) ; erg . add ( this ) ; if ( ! ( getTop ( ) . isLastEdge ( ) ) ) <START_BUG> for ( UIATokenElement elem : getLeft ( ) . getLeftsideElements ( ) ) <END_BUG> erg . addAll ( elem . getAllTop ( ) ) ; return erg ; } HashSet < UIATokenElement > getAllBottom ( ) { } public UIATokenElement [ ] getAreasVisibleFrom ( ) { } }

Fix:
for ( UIATokenElement elem : getTop ( ) . getLeftsideElements ( ) )
Buggy code:
public class ForgotPassword extends ScarabTemplateAction { private static final int UNIQUE_ID_MAX_LEN = 10 ; public void doForgotpassword ( RunData data , TemplateContext context ) throws Exception { } public boolean forgotPassword ( RunData data , TemplateContext context ) throws Exception { IntakeTool intake = getIntakeTool ( context ) ; Group password = intake . get ( "ForgotPassword" , DEFAULT_KEY ) ; String username = password . get ( "Username" ) . toString ( ) ; ScarabUser user = null ; try { user = ( ( ScarabUser ) ( TurbineSecurity . getUser ( username ) ) ) ; String tempPassword = GenerateUniqueId . getIdentifier ( ) ; if ( ( tempPassword . length ( ) ) > ( ForgotPassword . UNIQUE_ID_MAX_LEN ) ) { tempPassword = tempPassword . substring ( 0 , ForgotPassword . UNIQUE_ID_MAX_LEN ) ; } user . setPasswordExpire ( Calendar . getInstance ( ) ) ; user . setHasLoggedIn ( Boolean . FALSE ) ; data . setUser ( user ) ; data . save ( ) ; TurbineSecurity . forcePassword ( user , tempPassword ) ; context . put ( "password" , tempPassword ) ; TemplateEmail te = new TemplateEmail ( ) ; te . setContext ( new org . apache . turbine . modules . ContextAdapter ( context ) ) ; te . setTo ( ( ( ( user . getFirstName ( ) ) + "<seq2seq4repair_space>" ) + ( user . getLastName ( ) ) ) , user . getEmail ( ) ) ; <START_BUG> te . setFrom ( Turbine . getConfiguration ( ) . getString ( "scarab.email.forgotpassword.fromName" , "Scarab<seq2seq4repair_space>System" ) , Turbine . getConfiguration ( ) . getString ( "scarab.email.forgotpassword.fromAddress" , "help@scarab.tigris.org" ) ) ; <END_BUG> te . setSubject ( Turbine . getConfiguration ( ) . getString ( "scarab.email.forgotpassword.subject" , "Account<seq2seq4repair_space>Password" ) ) ; te . setTemplate ( Turbine . getConfiguration ( ) . getString ( "scarab.email.forgotpassword.template" , "email//ForgotPassword.vm" ) ) ; te . send ( ) ; } catch ( TurbineSecurityException e ) { getScarabRequestTool ( context ) . setAlertMessage ( "Invalid<seq2seq4repair_space>username." ) ; Log . get ( ) . error ( "ForgotPassword:<seq2seq4repair_space>" , e ) ; setTarget ( data , "ForgotPassword.vm" ) ; return false ; } return true ; } }

Fix:
te . setFrom ( Turbine . getConfiguration ( ) . getString ( "scarab.email.forgotpassword.fromName" , "Scarab<seq2seq4repair_space>System" ) , Turbine . getConfiguration ( ) . getString ( "scarab.email.forgotpassword.fromAddress" , "help@localhost" ) ) ;
Buggy code:
public class PairTest { @ Test public void testAccessor ( ) { final Pair < Integer , Double > p = new Pair < Integer , Double > ( new Integer ( 1 ) , new Double ( 2 ) ) ; Assert . assertEquals ( new Integer ( 1 ) , p . getKey ( ) ) ; <START_BUG> Assert . assertEquals ( new Double ( 2 ) , p . getValue ( ) , Math . ulp ( 1.0 ) ) ; <END_BUG> } @ Test public void testAccessor2 ( ) { } @ Test public void testEquals ( ) { } @ Test public void testHashCode ( ) { } private static class MyInteger { private int i ; public MyInteger ( int i ) { } public void set ( int i ) { } @ Override public boolean equals ( Object o ) { } @ Override public int hashCode ( ) { } } }

Fix:
Assert . assertEquals ( 2 , p . getValue ( ) . doubleValue ( ) , Math . ulp ( 1.0 ) ) ;
Buggy code:
public class OlsMap extends XdfTable { private PMap map ; private boolean omitCategories ; public OlsMap ( PMap map , boolean omitCategories ) { } @ Override public String getUniqueId ( ) { } @ Override public String getTitle ( ) { } @ Override public XdfAxis getRowAxis ( ) { } @ Override public XdfAxis getColAxis ( ) { } @ Override public XdfAxis getValueAxis ( ) { return new XdfAxis ( ) { @ Override public String getDimension ( ) { return "z" ; } @ Override public XdfEmbedded getEmbedded ( ) { return new XdfEmbedded ( ) { @ Override public int getXdfWidth ( ) { return ( map . getValueType ( ) . width ) * 8 ; } @ Override public String getXdfAddress ( ) { return getUniqueId ( ) ; } @ Override public String getTypeFlags ( ) { <START_BUG> return "0x03" ; <END_BUG> } } ; } @ Override public XdfMath getXdfMath ( ) { return new OlsMath ( map . getValue ( ) ) ; } } ; } private Axis getyAxis ( ) { } private Axis getxAxis ( ) { } private boolean shouldFlip ( ) { } @ Override public XdfCategoryMem getCategory ( ) { } }

Fix:
return String . format ( "0x%X" , ( ( map . isSigned ( ) ? 1 : 0 ) + ( map . getValueType ( ) . isLsbFirst ( ) ? 2 : 0 ) ) ) ;
Buggy code:
public class MainModel { public List < Politician > getRankedFulfillment ( int numOfPolitician ) { } private List < Politician > makeFulfillmentList ( ResultSet rs ) { } public List getLocalInfo ( ) { ArrayList < LocalInfo > localList = new ArrayList < LocalInfo > ( ) ; <START_BUG> Set < String > local = new HashSet < String > ( Arrays . asList ( new String [ ] { "서울특별시" , "광주광역시" , "부산광역시" , "대구광역시" , "대전광역시" , "세종특별자치시" , "울산광역시" , "인천광역시" , "강원도" , "충청북도" , "충청남도" , "전라북도" , "전라남도" , "경상남도" , "경상북도" , "제주도" } ) ) ; <END_BUG> ResultSet rs = null ; String sql = "SELECT<seq2seq4repair_space>local,<seq2seq4repair_space>SUM(percent//promise_count)<seq2seq4repair_space>AS<seq2seq4repair_space>local_sum,<seq2seq4repair_space>COUNT(*)<seq2seq4repair_space>AS<seq2seq4repair_space>politician_num<seq2seq4repair_space>FROM<seq2seq4repair_space>(SELECT<seq2seq4repair_space>politician.local,<seq2seq4repair_space>SUM(promise.vote_score//promise.vote_count)<seq2seq4repair_space>AS<seq2seq4repair_space>percent,<seq2seq4repair_space>COUNT(*)<seq2seq4repair_space>AS<seq2seq4repair_space>promise_count<seq2seq4repair_space>FROM<seq2seq4repair_space>promise<seq2seq4repair_space>INNER<seq2seq4repair_space>JOIN<seq2seq4repair_space>politician<seq2seq4repair_space>ON<seq2seq4repair_space>promise.politician_id<seq2seq4repair_space>=<seq2seq4repair_space>politician.id<seq2seq4repair_space>GROUP<seq2seq4repair_space>BY<seq2seq4repair_space>politician.name)<seq2seq4repair_space>SUB<seq2seq4repair_space>GROUP<seq2seq4repair_space>BY<seq2seq4repair_space>local" ; ArrayList < Object > queryValues = new ArrayList < Object > ( ) ; PstmtQuerySet querySet = new PstmtQuerySet ( sql , queryValues ) ; DAOFactory DAO = new DAOFactory ( ) ; try { rs = DAO . selectQuery ( querySet ) ; while ( rs . next ( ) ) { if ( local . contains ( rs . getString ( "local" ) ) ) { localList . add ( new LocalInfo ( rs . getString ( "local" ) , rs . getInt ( "local_sum" ) , rs . getInt ( "politician_num" ) ) ) ; } } } catch ( SQLException e ) { e . printStackTrace ( ) ; } finally { try { DAO . closeConnections ( ) ; } catch ( SQLException e ) { e . printStackTrace ( ) ; } } return localList ; } public int getTotalPercent ( ) { } }

Fix:
Set < String > local = new HashSet < String > ( Arrays . asList ( new String [ ] { "서울특별시" , "경기도" , "광주광역시" , "부산광역시" , "대구광역시" , "대전광역시" , "세종특별자치시" , "울산광역시" , "인천광역시" , "강원도" , "충청북도" , "충청남도" , "전라북도" , "전라남도" , "경상남도" , "경상북도" , "제주도" } ) ) ;
Buggy code:
public class hWorkerThread implements Callable < String > { private static hihTransactions transactions ; private static hMarketThread market ; private hihUtil util ; private int consistency_mode ; private String workload_mix ; hWorkerThread ( hihTransactions transactions , hMarketThread market , int const_mode , BenStatistics stats , String mix ) { } private volatile boolean running = true ; public void terminate ( ) { } public String call ( ) { util . CONNECT ( ) ; util . setConsistency ( consistency_mode ) ; try { List txnsToRun ; txnsToRun = hihUtil . workloadMix ( workload_mix ) ; int i = 0 ; int j = 0 ; int numberOfTxns = txnsToRun . size ( ) ; <START_BUG> while ( j < 10 ) { <END_BUG> hWorkerThread . DoTxn ( util , txnsToRun . get ( i ) . toString ( ) ) ; i ++ ; if ( i == numberOfTxns ) { j ++ ; i = 0 ; } } util . DISCONNECT ( ) ; return ( "Thread<seq2seq4repair_space>" + ( Thread . currentThread ( ) . getName ( ) ) ) + "<seq2seq4repair_space>is<seq2seq4repair_space>finished.<seq2seq4repair_space>" ; } catch ( Exception e ) { e . printStackTrace ( ) ; util . DISCONNECT ( ) ; return ( ( "Thread<seq2seq4repair_space>" + ( Thread . currentThread ( ) . getName ( ) ) ) + "<seq2seq4repair_space>got<seq2seq4repair_space>Exception:<seq2seq4repair_space>" ) + e ; } } static void DoTxn ( hihUtil util , String txnFrame ) { } }

Fix:
while ( j < 2 ) {
Buggy code:
public class FixedOrderComparatorTest extends AbstractComparatorTest < String > { private static final String [ ] topCities = new String [ ] { "Tokyo" , "Mexico<seq2seq4repair_space>City" , "Mumbai" , "Sao<seq2seq4repair_space>Paulo" , "New<seq2seq4repair_space>York" , "Shanghai" , "Lagos" , "Los<seq2seq4repair_space>Angeles" , "Calcutta" , "Buenos<seq2seq4repair_space>Aires" } ; public FixedOrderComparatorTest ( final String name ) { } @ Override public Comparator < String > makeObject ( ) { } @ Override public List < String > getComparableObjectsOrdered ( ) { } @ Override public String getCompatibilityVersion ( ) { } @ Test public void testConstructorPlusAdd ( ) { } @ Test public void testArrayConstructor ( ) { } @ Test public void testListConstructor ( ) { } @ Test public void testAddAsEqual ( ) { } @ Test public void testLock ( ) { } @ Test public void testUnknownObjectBehavior ( ) { } private void assertComparatorYieldsOrder ( final String [ ] orderedObjects , final Comparator < String > comparator ) { final String [ ] keys = orderedObjects . clone ( ) ; boolean isInNewOrder = false ; final Random rand = new Random ( ) ; <START_BUG> while ( ( ( keys . length ) > 1 ) && ( isInNewOrder == false ) ) { <END_BUG> for ( int i = ( keys . length ) - 1 ; i > 0 ; i -- ) { final String swap = keys [ i ] ; final int j = rand . nextInt ( ( i + 1 ) ) ; keys [ i ] = keys [ j ] ; keys [ j ] = swap ; } for ( int i = 0 ; ( i < ( keys . length ) ) && ( ! isInNewOrder ) ; i ++ ) { if ( ! ( orderedObjects [ i ] . equals ( keys [ i ] ) ) ) { isInNewOrder = true ; } } } Arrays . sort ( keys , comparator ) ; for ( int i = 0 ; i < ( orderedObjects . length ) ; i ++ ) { assertEquals ( orderedObjects [ i ] , keys [ i ] ) ; } } }

Fix:
while ( ( ( keys . length ) > 1 ) && ( ! isInNewOrder ) ) {
Buggy code:
class PublishedGraphTracker extends PlatformObject implements ISharedObject { private static final ID [ ] NO_GRAPHS = new ID [ ] { } ; private static final int JOIN = 0 ; private static final int LEAVE = 1 ; private static final int ADD = 2 ; private static final int REMOVE = 3 ; private class Table { private final Hashtable graphs = new Hashtable ( ) ; private final Hashtable containers = new Hashtable ( ) ; public synchronized void add ( ID containerID , ID [ ] graphs ) { } public synchronized void remove ( ID containerID , ID graph ) { } public synchronized void remove ( ID containerID ) { } public synchronized boolean contains ( ID graph ) { <START_BUG> return containers . contains ( graph ) ; <END_BUG> } public synchronized ID [ ] getGraphs ( ID containerID ) { } } private final PublishedGraphTracker . Table table = new PublishedGraphTracker . Table ( ) ; private ISharedObjectConfig config ; public synchronized void add ( ID graph ) throws ECFException { } public synchronized boolean isPublished ( ID graph ) { } public synchronized void init ( ISharedObjectConfig initData ) throws SharedObjectInitException { } public void handleEvent ( Event event ) { } private void handleJoin ( ID containerID , ID [ ] graphs ) { } private void handleLeave ( ID containerID ) { } private void handleAdd ( ID containerID , ID [ ] graphs ) { } private void handleRemove ( ID containerID , ID graph ) { } private void handleJoined ( ) { } private void handleDeactivated ( ) { } private void handleRemoved ( ID graph ) { } public void handleEvents ( Event [ ] events ) { } public synchronized void dispose ( ID containerID ) { } }

Fix:
return containers . containsKey ( graph ) ;
Buggy code:
public class RModuleAttribute extends BaseRModuleAttribute implements Persistent { private Attribute aAttribute = null ; public Attribute getAttribute ( ) throws Exception { } public void setAttribute ( Attribute v ) throws Exception { } public String getDisplayValue ( ) { } public void delete ( ScarabUser user ) throws Exception { ModuleEntity module = getScarabModule ( ) ; <START_BUG> if ( user . hasPermission ( ITEM__APPROVE , module ) ) { <END_BUG> Criteria c = new Criteria ( ) . add ( MODULE_ID , getModuleId ( ) ) . add ( ISSUE_TYPE_ID , getIssueTypeId ( ) ) . add ( ATTRIBUTE_ID , getAttributeId ( ) ) ; RModuleAttributePeer . doDelete ( c ) ; } else { throw new org . tigris . scarab . util . ScarabException ( ScarabConstants . NO_PERMISSION_MESSAGE ) ; } } }

Fix:
if ( user . hasPermission ( MODULE__EDIT , module ) ) {
Buggy code:
public class MCEventHandler { @ SubscribeEvent public void onPlayerLogin ( PlayerLoggedInEvent event ) { } @ SubscribeEvent public void onServerCommand ( CommandEvent event ) { } @ SideOnly ( Side . CLIENT ) public boolean onClientChat ( String text ) { } @ SideOnly ( Side . CLIENT ) public boolean onClientEmote ( String text ) { } @ SubscribeEvent public void onServerChat ( ServerChatEvent event ) { IChatComponent senderComponent = event . player . func_145748_c_ ( ) ; EnumChatFormatting nameColor = Utils . getColorFormattingForPlayer ( event . player ) ; if ( nameColor != null ) { senderComponent . getChatStyle ( ) . setColor ( nameColor ) ; } <START_BUG> event . component = new net . minecraft . util . ChatComponentTranslation ( "chat.type.text" , senderComponent , event . message ) ; <END_BUG> if ( ! ( MinecraftServer . getServer ( ) . isSinglePlayer ( ) ) ) { if ( IRCCommandHandler . onChatCommand ( event . player , event . message , true ) ) { event . setCanceled ( true ) ; return ; } relayChatServer ( event . player , event . message , false , false , null ) ; } } @ SubscribeEvent @ SideOnly ( Side . CLIENT ) public void relayChatClient ( RelayChat event ) { } @ SideOnly ( Side . CLIENT ) private void relayChatClient ( String message , boolean isEmote , boolean isNotice , IRCContext target , boolean clientBridge ) { } @ SubscribeEvent @ SideOnly ( Side . SERVER ) public void relayChatServer ( RelayChat event ) { } private void relayChatServer ( ICommandSender sender , String message , boolean isEmote , boolean isNotice , IRCContext target ) { } @ SubscribeEvent public void onPlayerDeath ( LivingDeathEvent event ) { } @ SubscribeEvent ( priority = EventPriority . HIGHEST ) public void onPlayerNameFormat ( PlayerEvent . NameFormat event ) { } @ SubscribeEvent public void onPlayerLogout ( PlayerLoggedOutEvent event ) { } public void onPlayerNickChange ( String oldNick , String newNick ) { } }

Fix:
event . component = new net . minecraft . util . ChatComponentTranslation ( "chat.type.text" , senderComponent , MessageFormat . createChatComponentWithFixedLinks ( event . message ) ) ;
Buggy code:
public class IndexActivity extends ListActivity implements SourceUpdateable { private static final int CONFIG_ID = Menu . FIRST ; private static final int CLEAR_ID = ( Menu . FIRST ) + 1 ; private static final int ACCOUNT_LIST_ID = ( Menu . FIRST ) + 2 ; private AccountDB accountDB ; private SourceDB sourceDB ; private Cursor sourceCursor ; private DeviceInfo deviceInfo ; private BaseAdapter adapter ; private boolean updated ; @ Override protected void onNewIntent ( Intent intent ) { } public DeviceInfo getDeviceInfoFromApplicationContext ( ) { } public void onCreate ( Bundle savedInstanceState ) { } @ Override public boolean onContextItemSelected ( MenuItem item ) { } private void bindAdapter ( ) { } @ Override protected void onStart ( ) { } private void openDatabase ( ) { } private void closeDB ( ) { } @ Override protected void onResume ( ) { super . onResume ( ) ; openDatabase ( ) ; bindAdapter ( ) ; adapter . notifyDataSetChanged ( ) ; <START_BUG> boolean shallUpdate = NetworkUtil . toLoadImage ( this ) ; <END_BUG> if ( shallUpdate ) { new Thread ( new Runnable ( ) { public void run ( ) { if ( ! ( updated ) ) { try { Thread . sleep ( 2000 ) ; } catch ( InterruptedException e ) { } SourceUpdateManager updateManager = new SourceUpdateManager ( sourceDB , SourceCache . getInstance ( IndexActivity . this ) , IndexActivity . this , RecommendSourceDB . getInstance ( IndexActivity . this ) ) ; updateManager . updateAll ( ) ; updated = true ; } } } ) . start ( ) ; } } @ Override protected void onPause ( ) { } @ Override protected void onListItemClick ( ListView l , View v , int position , long id ) { } @ Override public boolean onCreateOptionsMenu ( Menu menu ) { } @ Override public boolean onPrepareOptionsMenu ( Menu menu ) { } @ Override public boolean onOptionsItemSelected ( MenuItem item ) { } public void notifyUpdating ( final CachedArticleSource cachedArticleSource ) { } public void notifyHasNew ( CachedArticleSource cachedArticleSource ) { } Handler hander = new Handler ( ) ; public void notifyNoNew ( CachedArticleSource cachedArticleSource ) { } public void notifyUpdateDone ( CachedArticleSource cachedArticleSource ) { } No newline ; at end ; of file ; }

Fix:
boolean shallUpdate = NetworkUtil . toUpdateSource ( this ) ;
Buggy code:
public class Server4Emer extends Server { private String service = "write" ; @ Override public void insert ( EventMSG msg , String lati , String longi ) { JSONObject json = new JSONObject ( ) ; Emergency e = ( ( Emergency ) ( msg ) ) ; JSONObject inner = new JSONObject ( ) ; try { json . put ( "MSG" , inner ) ; inner . put ( "type" , "emergency" ) ; inner . put ( "abstract" , e . abstr ) ; inner . put ( "text" , e . text ) ; <START_BUG> inner . put ( "map" , ( e . mapOn ? 1 : 0 ) ) ; <END_BUG> inner . put ( "lat" , lati ) ; inner . put ( "lng" , longi ) ; inner . put ( "userid" , USERID ) ; json . put ( "OP" , "insert" ) ; } catch ( JSONException e1 ) { e1 . printStackTrace ( ) ; } callGet ( json , service ) ; } public void report ( String id ) { } }

Fix:
inner . put ( "map" , ( e . mapOn ? "1" : "0" ) ) ;
Buggy code:
public class ProtoFileStorage implements Storage { private static int numOfInstances = 0 ; private File currFile ; private List < Task > listTask ; private int personalID ; public ProtoFileStorage ( ) { } public ProtoFileStorage ( String fileName ) { } public ProtoFileStorage ( ProtoFileStorage fileStorage ) { } public String getCurrFileName ( ) { } public int getCurrNumOfRunningInstances ( ) { } public Task deepCopyTask ( Task item ) { } public List < Task > duplicateCurrentListTask ( boolean duplicateTask ) { } public String currentListTaskString ( boolean toAddTags ) { } private void updateLineNum ( ) { } public State addTask ( Command command ) { Task toAdd = command . getTask ( ) ; int taskId = command . getTask ( ) . getLineNumber ( ) ; if ( taskId == ( - 1 ) ) { taskId = listTask . size ( ) ; toAdd . setLineNumber ( taskId ) ; } <START_BUG> listTask . add ( ( ( command . getTask ( ) . getLineNumber ( ) ) - 1 ) , command . getTask ( ) ) ; <END_BUG> updateLineNum ( ) ; JsonIOHandler . writeJSONList ( currFile , listTask ) ; return new State ( command , new Command ( toAdd , CommandType . DELETE , null ) , getAllTasks ( ) , true ) ; } public State editTask ( Command command ) { } public State deleteTask ( Command command ) { } private boolean isValidDeleteOp ( Command command ) { } public List < Task > getAllTasks ( ) { } public State clearAll ( ) { } public State refillAll ( List < Task > tasks ) { } }

Fix:
listTask . add ( taskId , command . getTask ( ) ) ;
Buggy code:
public class ActionZoom extends UMLAction { protected double _scale ; public ActionZoom ( int scale_percent ) { } public boolean shouldBeEnabled ( ) { } public void actionPerformed ( ActionEvent ae ) { Editor ce = Globals . curEditor ( ) ; SelectionManager sm = ce . getSelectionManager ( ) ; <START_BUG> Vector nodes = ( ( Diagram ) ( ProjectBrowser . TheInstance . getTarget ( ) ) ) . getLayer ( ) . getContents ( ) ; <END_BUG> for ( int i = 0 ; i < ( nodes . size ( ) ) ; i ++ ) { sm . select ( ( ( Fig ) ( nodes . elementAt ( i ) ) ) ) ; } sm . startTrans ( ) ; ce . setScale ( _scale ) ; sm . endTrans ( ) ; sm . deselectAll ( ) ; } }

Fix:
Vector nodes = ( ( Diagram ) ( ProjectBrowser . TheInstance . getActiveDiagram ( ) ) ) . getLayer ( ) . getContents ( ) ;
Buggy code:
public class StringToIntegerConverter extends AbstractConverter { private static final Resources REZ = ResourceManager . getPackageResources ( StringToFloatConverter . class ) ; public StringToIntegerConverter ( ) { } <START_BUG> public Object convert ( final Object object , final Context context ) throws ConverterException { <END_BUG> try { return new Integer ( ( ( String ) ( object ) ) ) ; } catch ( final NumberFormatException nfe ) { final String message = StringToIntegerConverter . REZ . getString ( "convert.bad-integer.error" , object ) ; throw new ConverterException ( message , nfe ) ; } } }

Fix:
public Object convert ( final Object object , final Object context ) throws ConverterException {
Buggy code:
public class CompilerMessagesCellRenderer extends JLabel implements ListCellRenderer { public Component getListCellRendererComponent ( JList list , Object value , int index , boolean isSelected , boolean cellHasFocus ) { String label = "<no<seq2seq4repair_space>message>" ; String detail = null ; <START_BUG> IMessage . Kind kind = IMessage . INFO ; <END_BUG> if ( value instanceof IMessage ) { IMessage cm = ( ( IMessage ) ( value ) ) ; label = cm . getMessage ( ) ; if ( LangUtil . isEmpty ( label ) ) { label = cm . getMessage ( ) . toString ( ) ; } kind = cm . getKind ( ) ; Throwable thrown = cm . getThrown ( ) ; if ( null != thrown ) { detail = LangUtil . renderException ( thrown ) ; } } else if ( null != value ) { label = value . toString ( ) ; } setText ( label ) ; if ( kind . equals ( WARNING ) ) { setIcon ( AjdeUIManager . getDefault ( ) . getIconRegistry ( ) . getWarningIcon ( ) ) ; } else if ( IMessage . ERROR . isSameOrLessThan ( kind ) ) { setIcon ( AjdeUIManager . getDefault ( ) . getIconRegistry ( ) . getErrorIcon ( ) ) ; } else { setIcon ( null ) ; } if ( isSelected ) { setBackground ( list . getSelectionBackground ( ) ) ; setForeground ( list . getSelectionForeground ( ) ) ; } else { setBackground ( list . getBackground ( ) ) ; setForeground ( list . getForeground ( ) ) ; } setEnabled ( list . isEnabled ( ) ) ; setFont ( list . getFont ( ) ) ; setOpaque ( true ) ; if ( null != detail ) { setToolTipText ( detail ) ; } return this ; } }

Fix:
IMessage . Kind kind = IMessage . ERROR ;
Buggy code:
public class ServerResponsesFactory { public static JsonObject createNotificationInsertMessage ( DeviceNotificationMessage deviceNotification , UUID subId ) { } public static JsonObject createCommandInsertMessage ( DeviceCommandMessage deviceCommandMessage , UUID subId ) { } public static JsonObject createCommandUpdateMessage ( DeviceCommandMessage deviceCommand ) { } public static String parseNotificationStatus ( DeviceNotificationMessage notificationMessage ) { } public static DeviceNotificationMessage createNotificationForDevice ( Device device , String notificationName ) { DeviceNotificationMessage notification = new DeviceNotificationMessage ( ) ; notification . setNotification ( notificationName ) ; notification . setDeviceGuid ( device . getGuid ( ) ) ; Gson gson = GsonFactory . createGson ( DEVICE_PUBLISHED ) ; JsonElement deviceAsJson = gson . toJsonTree ( device ) ; <START_BUG> notification . setParameters ( deviceAsJson . getAsJsonObject ( ) . getAsString ( ) ) ; <END_BUG> return notification ; } public static DeviceEquipment parseDeviceEquipmentNotification ( DeviceNotificationMessage notification , Device device ) { } private static DeviceEquipment constructDeviceEquipmentObject ( JsonObject jsonEquipmentObject , Device device ) { } No newline ; at end ; of file ; }

Fix:
notification . setParameters ( deviceAsJson . toString ( ) ) ;
Buggy code:
public abstract class AbstractFeedsActivity extends FragmentActivity implements ItemsFragment . OnItemListener { abstract void addNewFeed ( Feed feed ) { } @ Override public boolean onCreateOptionsMenu ( Menu menu ) { } @ Override public boolean onOptionsItemSelected ( MenuItem item ) { } public void onItemSelected ( RSSItem item ) { } private void lightsOut ( ) { <START_BUG> final View view = findViewById ( second_pane ) ; <END_BUG> view . setSystemUiVisibility ( STATUS_BAR_HIDDEN ) ; getActionBar ( ) . hide ( ) ; view . postDelayed ( new Runnable ( ) { public void run ( ) { view . setSystemUiVisibility ( STATUS_BAR_VISIBLE ) ; getActionBar ( ) . show ( ) ; } } , 5000 ) ; } protected void addItems ( FragmentTransaction xaction , Feed feed ) { } No newline ; at end ; of file ; }

Fix:
final View view = findViewById ( content ) ;
Buggy code:
public class MySQLDictionary extends DBDictionary { public static final String SELECT_HINT = "openjpa.hint.MySQLSelectHint" ; public static final String DELIMITER_BACK_TICK = "`" ; public String tableType = "innodb" ; public boolean useClobs = true ; public boolean driverDeserializesBlobs = false ; public boolean optimizeMultiTableDeletes = false ; public static final String tinyBlobTypeName = "TINYBLOB" ; public static final String mediumBlobTypeName = "MEDIUMBLOB" ; public static final String longBlobTypeName = "LONGBLOB" ; public MySQLDictionary ( ) { } @ Override public void connectedConfiguration ( Connection conn ) throws SQLException { } @ Override public Connection decorate ( Connection conn ) throws SQLException { } private static int [ ] getMajorMinorVersions ( String versionStr ) throws IllegalArgumentException { } @ Override public String [ ] getCreateTableSQL ( Table table ) { String [ ] sql = super . getCreateTableSQL ( table ) ; if ( ! ( StringUtils . isEmpty ( tableType ) ) ) <START_BUG> sql [ 0 ] = ( ( sql [ 0 ] ) + "<seq2seq4repair_space>TYPE<seq2seq4repair_space>=<seq2seq4repair_space>" ) + ( tableType ) ; <END_BUG> return sql ; } @ Override public String [ ] getDropIndexSQL ( Index index ) { } @ Override public String [ ] getDropPrimaryKeySQL ( PrimaryKey pk ) { } @ Override public String [ ] getDropForeignKeySQL ( ForeignKey fk , Connection conn ) { } @ Override public String [ ] getAddPrimaryKeySQL ( PrimaryKey pk ) { } @ Override public String [ ] getDeleteTableContentsSQL ( Table [ ] tables , Connection conn ) { } @ Override protected void appendSelectRange ( SQLBuffer buf , long start , long end , boolean subselect ) { } @ Override protected Column newColumn ( ResultSet colMeta ) throws SQLException { } @ Override public Object getBlobObject ( ResultSet rs , int column , JDBCStore store ) throws SQLException { } @ Override public int getPreferredType ( int type ) { } @ Override public void appendXmlComparison ( SQLBuffer buf , String op , FilterValue lhs , FilterValue rhs , boolean lhsxml , boolean rhsxml ) { } private void appendXmlValue ( SQLBuffer buf , FilterValue val ) { } @ Override public int getBatchFetchSize ( int batchFetchSize ) { } @ Override public String getSelectOperation ( JDBCFetchConfiguration fetch ) { } @ Override protected Collection < String > getSelectTableAliases ( Select sel ) { } @ Override public String getTypeName ( Column col ) { } }

Fix:
sql [ 0 ] = ( ( sql [ 0 ] ) + "<seq2seq4repair_space>ENGINE<seq2seq4repair_space>=<seq2seq4repair_space>" ) + ( tableType ) ;
Buggy code:
public class ObjectActivityManager implements IObjectActivityManager { private static Map managersMap = new HashMap ( 17 ) ; public static ObjectActivityManager getManager ( String id , boolean create ) { } private Collection activeObjects = new HashSet ( 17 ) ; private IActivityListener activityListener = new IActivityListener ( ) { public void activityChanged ( ActivityEvent activityEvent ) { } } ; private IMutableActivityManager activityManager ; private IActivityManagerListener activityManagerListener = new IActivityManagerListener ( ) { public void activityManagerChanged ( ActivityManagerEvent activityManagerEvent ) { } } ; private Map activityMap = new HashMap ( ) ; private boolean dirty = true ; private String managerId ; private Map objectMap = new HashMap ( ) ; public ObjectActivityManager ( String id , IMutableActivityManager activityManager ) { } public void addActivityBinding ( IObjectContributionRecord record , String activityId ) { } public IObjectContributionRecord addObject ( String pluginId , String localId , Object object ) { } public void applyPatternBindings ( ) { } void applyPatternBindings ( Collection objectIds ) { Collection activities = activityManager . getDefinedActivityIds ( ) ; for ( Iterator actItr = activities . iterator ( ) ; actItr . hasNext ( ) ; ) { IActivity activity = activityManager . getActivity ( ( ( String ) ( actItr . next ( ) ) ) ) ; for ( Iterator objItr = objectIds . iterator ( ) ; objItr . hasNext ( ) ; ) { IObjectContributionRecord objectId = ( ( IObjectContributionRecord ) ( objItr . next ( ) ) ) ; <START_BUG> if ( activity . isMatch ( objectId . toString ( ) ) ) { <END_BUG> addActivityBinding ( objectId , activity . getId ( ) ) ; } } } } public void applyPatternBindings ( IObjectContributionRecord record ) { } public Collection findObjectContributionRecords ( Object objectOfInterest ) { } public Collection getEnabledObjects ( ) { } private Set getActivityIdsFor ( IObjectContributionRecord record , boolean create ) { } public String getId ( ) { } public Set getObjectIds ( ) { } protected void invalidateCache ( ) { } public void removeObject ( IObjectContributionRecord record ) { } protected void removePatternBindings ( ) { } public void setEnablementFor ( Object objectOfInterest , boolean enablement ) { } }

Fix:
if ( activity . match ( objectId . toString ( ) ) ) {
Buggy code:
public final class Program { String name ; byte [ ] fsRef ; static final String PREFIX_HTTP = "http:////" ; static final String PREFIX_HTTPS = "https:////" ; Program ( ) { } public static Program findProgram ( String extension ) { } public static String [ ] getExtensions ( ) { } public static Program [ ] getPrograms ( ) { } static int getURL ( String fileName ) { } static boolean isExecutable ( String fileName ) { } public static boolean launch ( String fileName ) { } public static boolean launch ( String fileName , String workingDir ) { if ( fileName == null ) SWT . error ( ERROR_NULL_ARGUMENT ) ; <START_BUG> if ( Program . isExecutable ( fileName ) ) { <END_BUG> try { Compatibility . exec ( new String [ ] { fileName } , null , workingDir ) ; return true ; } catch ( IOException e ) { return false ; } } int rc = - 1 ; int url = Program . getURL ( fileName ) ; if ( url != 0 ) { rc = OS . LSOpenCFURLRef ( url , null ) ; OS . CFRelease ( url ) ; } return rc == ( OS . noErr ) ; } public boolean execute ( String fileName ) { } ImageData createImageFromFamily ( int family , int type , int maskType , int width , int height ) { } public ImageData getImageData ( ) { } public String getName ( ) { } static Program getProgram ( byte [ ] fsRef ) { } public boolean equals ( Object other ) { } public int hashCode ( ) { } public String toString ( ) { } }

Fix:
if ( ( workingDir != null ) && ( Program . isExecutable ( fileName ) ) ) {
Buggy code:
class DecorationBuilder implements IDecoration { private static int DECORATOR_ARRAY_SIZE = 5 ; private List prefixes = new ArrayList ( ) ; private List suffixes = new ArrayList ( ) ; private ImageDescriptor [ ] descriptors = new ImageDescriptor [ DecorationBuilder . DECORATOR_ARRAY_SIZE ] ; private Color foregroundColor ; private Color backgroundColor ; private Font font ; LightweightDecoratorDefinition currentDefinition ; private boolean valueSet = false ; DecorationBuilder ( ) { } void setCurrentDefinition ( LightweightDecoratorDefinition definition ) { } public void addOverlay ( ImageDescriptor overlay ) { } public void addOverlay ( ImageDescriptor overlay , int quadrant ) { } public void addPrefix ( String prefixString ) { } public void addSuffix ( String suffixString ) { } DecorationResult createResult ( ) { } void clearContents ( ) { } boolean hasValue ( ) { } void applyResult ( DecorationResult result ) { prefixes . addAll ( result . getPrefixes ( ) ) ; suffixes . addAll ( result . getSuffixes ( ) ) ; ImageDescriptor [ ] resultDescriptors = result . getDescriptors ( ) ; if ( resultDescriptors != null ) { for ( int i = 0 ; i < ( descriptors . length ) ; i ++ ) { if ( ( resultDescriptors [ i ] ) != null ) descriptors [ i ] = resultDescriptors [ i ] ; } } setForegroundColor ( result . getForegroundColor ( ) ) ; <START_BUG> setBackgroundColor ( result . getForegroundColor ( ) ) ; <END_BUG> setFont ( result . getFont ( ) ) ; valueSet = true ; } public void setBackgroundColor ( Color bgColor ) { } public void setFont ( Font newFont ) { } public void setForegroundColor ( Color fgColor ) { } }

Fix:
setBackgroundColor ( result . getBackgroundColor ( ) ) ;
Buggy code:
public class PermissionRelay { public static boolean hasPermission ( Player player , String permission ) { if ( ( OpenInv . permissionHandler ) == null ) { <START_BUG> return player . isOp ( ) ; <END_BUG> } else { return permissionHandler . has ( player , permission ) ; } } }

Fix:
return player . isOp ( ) ? true : player . hasPermission ( permission ) ;
Buggy code:
public class ChronologicalOrderToken extends SemanticErrorToken { private String propertyKey2 = null ; public ChronologicalOrderToken ( String propertyKey1 , String propertyKey2 ) { } @ Override public JsonElement getContent ( ) { } @ Override public String getErrorToken ( ) { <START_BUG> return "must_lie_after" ; <END_BUG> } }

Fix:
return "must_lie_before" ;
Buggy code:
public abstract class ResourceUninstaller { private static final Logger logger = LoggerFactory . getLogger ( ResourceUninstaller . class ) ; public static ResourceUninstaller newInstance ( Resource resource , AriesSubsystem subsystem ) { } protected static void removeConstituent ( AriesSubsystem subsystem , Resource resource ) { } protected static void removeReference ( AriesSubsystem subsystem , Resource resource ) { } protected final AriesSubsystem provisionTo ; protected final Resource resource ; protected final AriesSubsystem subsystem ; public ResourceUninstaller ( Resource resource , AriesSubsystem subsystem ) { } public abstract void uninstall ( ) { } protected boolean isExplicit ( ) { } protected boolean isTransitive ( ) { } protected boolean isResourceUninstallable ( ) { } protected void removeConstituent ( ) { <START_BUG> ResourceUninstaller . removeConstituent ( provisionTo , resource ) ; <END_BUG> } protected void removeReference ( ) { } }

Fix:
ResourceUninstaller . removeConstituent ( subsystem , resource ) ;
Buggy code:
class SashFormTab extends Tab { Group sashFormGroup ; SashForm form ; List list1 ; List list2 ; Text text ; Button horizontalButton ; Button verticalButton ; Button smoothButton ; static String [ ] ListData0 = new String [ ] { ControlExample . getResourceString ( "ListData0_0" ) , ControlExample . getResourceString ( "ListData0_1" ) , ControlExample . getResourceString ( "ListData0_2" ) , ControlExample . getResourceString ( "ListData0_3" ) , ControlExample . getResourceString ( "ListData0_4" ) , ControlExample . getResourceString ( "ListData0_5" ) , ControlExample . getResourceString ( "ListData0_6" ) , ControlExample . getResourceString ( "ListData0_7" ) } ; static String [ ] ListData1 = new String [ ] { ControlExample . getResourceString ( "ListData1_0" ) , ControlExample . getResourceString ( "ListData1_1" ) , ControlExample . getResourceString ( "ListData1_2" ) , ControlExample . getResourceString ( "ListData1_3" ) , ControlExample . getResourceString ( "ListData1_4" ) , ControlExample . getResourceString ( "ListData1_5" ) , ControlExample . getResourceString ( "ListData1_6" ) , ControlExample . getResourceString ( "ListData1_7" ) } ; SashFormTab ( ControlExample instance ) { } void createExampleGroup ( ) { super . createExampleGroup ( ) ; sashFormGroup = new Group ( exampleGroup , SWT . NONE ) ; sashFormGroup . setLayout ( new GridLayout ( ) ) ; <START_BUG> sashFormGroup . setLayoutData ( new GridData ( ( ( ( GridData . GRAB_HORIZONTAL ) | ( GridData . HORIZONTAL_ALIGN_FILL ) ) | ( GridData . VERTICAL_ALIGN_FILL ) ) ) ) ; <END_BUG> sashFormGroup . setText ( "SashForm" ) ; } void createExampleWidgets ( ) { } void createStyleGroup ( ) { } Control [ ] getExampleWidgets ( ) { } String getTabText ( ) { } void setExampleWidgetState ( ) { } }

Fix:
sashFormGroup . setLayoutData ( new GridData ( SWT . FILL , SWT . FILL , true , true ) ) ;
Buggy code:
public abstract class PageMap implements IClusterable , IPageMap { static interface IVisitor { public void entry ( final IPageMapEntry entry ) { } } public static final String DEFAULT_NAME = null ; private static final long serialVersionUID = 1L ; public static IPageMap forName ( final String pageMapName ) { } private String interceptContinuationURL ; private final String name ; private int pageId = 0 ; public PageMap ( String name ) { } public final String attributeForId ( final int id ) { } public void clear ( ) { } public final boolean continueToOriginalDestination ( ) { } public abstract Page get ( final int id , int versionNumber ) { } public final IPageMapEntry getEntry ( final int id ) { } public final String getName ( ) { } public final Session getSession ( ) { } public final long getSizeInBytes ( ) { } public final boolean isDefault ( ) { } public final int nextId ( ) { } public abstract void put ( final Page page ) { } public final void redirectToInterceptPage ( final Class pageClazz ) { } public final void redirectToInterceptPage ( final Page page ) { } private void setUpRedirect ( final RequestCycle cycle ) { Session session = Session . get ( ) ; if ( session . isTemporary ( ) ) { session . bind ( ) ; } <START_BUG> interceptContinuationURL = cycle . getRequest ( ) . getPath ( ) ; <END_BUG> dirty ( ) ; cycle . setRedirect ( true ) ; } public final void remove ( ) { } public final void remove ( final Page page ) { } public abstract void removeEntry ( final IPageMapEntry entry ) { } public String toString ( ) { } private final List getEntries ( ) { } protected final void dirty ( ) { } protected final void visitEntries ( final PageMap . IVisitor visitor ) { } final String attributePrefix ( ) { } }

Fix:
interceptContinuationURL = "//" + ( cycle . getRequest ( ) . getURL ( ) ) ;
Buggy code:
class JSSESupport implements SSLSupport { private SSLSocket ssl ; JSSESupport ( SSLSocket sock ) { } public String getCipherSuite ( ) throws IOException { } <START_BUG> public Certificate [ ] getPeerCertificateChain ( ) throws IOException { <END_BUG> SSLSession session = ssl . getSession ( ) ; if ( session == null ) return null ; X509Certificate [ ] jsseCerts = null ; java . security . cert . X509Certificate [ ] x509Certs = null ; try { jsseCerts = session . getPeerCertificateChain ( ) ; if ( jsseCerts == null ) jsseCerts = new X509Certificate [ 0 ] ; x509Certs = new java . security . cert . X509Certificate [ jsseCerts . length ] ; for ( int i = 0 ; i < ( x509Certs . length ) ; i ++ ) { byte [ ] buffer = jsseCerts [ i ] . getEncoded ( ) ; CertificateFactory cf = CertificateFactory . getInstance ( "X.509" ) ; ByteArrayInputStream stream = new ByteArrayInputStream ( buffer ) ; x509Certs [ i ] = ( ( java . security . cert . X509Certificate ) ( cf . generateCertificate ( stream ) ) ) ; } } catch ( Throwable t ) { return null ; } if ( ( x509Certs == null ) || ( ( x509Certs . length ) < 1 ) ) return null ; return x509Certs ; } }

Fix:
public Object [ ] getPeerCertificateChain ( ) throws IOException {