nus-yam/ex-repair huggingface dataset:
Buggy code:
public class HubMagic extends Plugin { @ Getter private static HubMagic plugin ; @ Getter private List < ServerInfo > servers ; @ Getter private PingManager pingManager ; @ Getter private ServerSelector serverSelector ; @ Getter private PingStrategy pingStrategy ; @ Getter private Configuration configuration ; @ Override public void onEnable ( ) { HubMagic . plugin = this ; reloadPlugin ( ) ; if ( configuration . getBoolean ( "kicks-lead-to-hub.enabled" ) ) { String [ ] reason = ChatColor . translateAlternateColorCodes ( '&' , configuration . getString ( "kicks-lead-to-hub.message" ) ) . split ( "\n" ) ; ServerSelector selector = ServerSelectors . parse ( configuration . getString ( "kicks-lead-to-hub.selector" , "sequential" ) ) ; selector = ( selector == null ) ? SEQUENTIAL . get ( ) : selector ; <START_BUG> getProxy ( ) . getPluginManager ( ) . registerListener ( this , new ReconnectListener ( configuration . getStringList ( "kicks-lead-to-hub.reasons" ) , configuration . getStringList ( "kicks-lead-to-hub.servers" ) , ReconnectDetermination . valueOf ( configuration . getString ( "kicks-lead-to-hub.mode" ) . toUpperCase ( ) ) , ImmutableList . copyOf ( reason ) , selector ) ) ; <END_BUG> } if ( configuration . getBoolean ( "hub-command.enabled" ) ) { HubCommandConfiguration configuration1 = new HubCommandConfiguration ( configuration ) ; for ( String alias : configuration . getStringList ( "hub-command.aliases" ) ) { getProxy ( ) . getPluginManager ( ) . registerCommand ( this , new HubCommand ( alias , configuration1 ) ) ; } } getProxy ( ) . getPluginManager ( ) . registerListener ( this , new ConnectionListener ( ) ) ; getProxy ( ) . getPluginManager ( ) . registerCommand ( this , new HubMagicCommand ( ) ) ; getProxy ( ) . registerChannel ( "HubMagic" ) ; getProxy ( ) . getPluginManager ( ) . registerListener ( this , new HubMagicPluginMessageListener ( ) ) ; Logger . getLogger ( "io.netty.util.concurrent.DefaultPromise.rejectedExecution" ) . setLevel ( Level . OFF ) ; } @ Override public void onDisable ( ) { } void reloadPlugin ( ) { } private Configuration createOrLoadConfig ( ) throws IOException { } private void configurePlugin ( ) { } }

Fix:
getProxy ( ) . getPluginManager ( ) . registerListener ( this , new ReconnectListener ( configuration . getStringList ( "kicks-lead-to-hub.reasons" ) , configuration . getStringList ( "kicks-lead-to-hub.servers" ) , ReconnectDetermination . valueOf ( configuration . getString ( "kicks-lead-to-hub.mode" , "reasons" ) . toUpperCase ( ) ) , ImmutableList . copyOf ( reason ) , selector ) ) ;
Buggy code:
public class ChickenChunks { @ SubscribeEvent public void onPostPlace ( TEPostPlaceEvent e ) { } @ SubscribeEvent public void onPreMove ( BlockPreMoveEvent e ) { } public void performChickenChunksPostInit ( BlockRecord record ) { } public void handleChickenChunks ( World worldObj , BlockRecord record , BlockRecord newPosition ) { if ( ( record . entityRecord ) == null ) return ; TileEntity te = worldObj . getTileEntity ( record . X , record . Y , record . Z ) ; if ( te != null ) { if ( te instanceof TileChunkLoaderBase ) { <START_BUG> if ( ( ( ( record . X ) > > 4 ) != ( ( newPosition . X ) > > 4 ) ) && ( ( ( record . Z ) > > 4 ) != ( ( newPosition . Z ) > > 4 ) ) ) { <END_BUG> if ( ( ( TileChunkLoaderBase ) ( te ) ) . active ) { NBTTagCompound tag = new NBTTagCompound ( ) ; ChickenChunkLoader loader = new ChickenChunkLoader ( ( ( TileChunkLoaderBase ) ( te ) ) ) ; loader . writeToNBT ( tag ) ; record . entityRecord . setTag ( "ChickenChunkLoader" , tag ) ; } } } } } }

Fix:
if ( ! ( ( ( ( record . X ) > > 4 ) == ( ( newPosition . X ) > > 4 ) ) && ( ( ( record . Z ) > > 4 ) == ( ( newPosition . Z ) > > 4 ) ) ) ) {
Buggy code:
public class botMain { public static void main ( String [ ] args ) { try { String server = "irc.quakenet.org" ; String [ ] channels = new String [ ] { "#BeginnersProgramming" , "#testing1234" } ; String [ ] chatChannels = new String [ channels . length ] ; for ( int i = 0 ; i < ( channels . length ) ; i ++ ) { chatChannels [ i ] = channels [ i ] . concat ( "<seq2seq4repair_space>:" ) ; } ircBot ircBot = new ircBot ( ) ; ircBot . setSocket ( new Socket ( server , 6667 ) ) ; ircBot . setWriter ( new BufferedWriter ( new OutputStreamWriter ( ircBot . getSocket ( ) . getOutputStream ( ) ) ) ) ; ircBot . setReader ( new BufferedReader ( new InputStreamReader ( ircBot . getSocket ( ) . getInputStream ( ) ) ) ) ; String line ; boolean isAdmin = false ; Connect . Connect ( ircBot . getReader ( ) , ircBot . getWriter ( ) , channels ) ; try { while ( ( line = ircBot . getReader ( ) . readLine ( ) ) != null ) { PrintWriter out = new PrintWriter ( new BufferedWriter ( new FileWriter ( "ircLogs.txt" , true ) ) ) ; <START_BUG> if ( ! ( line . toLowerCase ( ) . startsWith ( "ping" ) ) ) { <END_BUG> out . println ( ( ( ( globalFunctions . timeStamp ( ) ) + "--" ) + line ) ) ; } if ( line . toLowerCase ( ) . startsWith ( "ping" ) ) { ircBot . getWriter ( ) . write ( ( ( "PONG<seq2seq4repair_space>" + ( line . substring ( 5 ) ) ) + "\r\n" ) ) ; ircBot . getWriter ( ) . flush ( ) ; } if ( ( line . startsWith ( ":DemonSkye!" ) ) || ( line . startsWith ( ":thearrowflies!" ) ) ) { isAdmin = true ; } int found = globalFunctions . channelCheck ( chatChannels , line ) ; if ( found >= 0 ) { String command = line ; String channelName = globalFunctions . getChannelName ( chatChannels , line ) ; if ( ! ( ( ( ( line . contains ( "!Weather" ) ) || ( line . contains ( "!weather" ) ) ) || ( line . contains ( "!temp" ) ) ) || ( line . contains ( "!Temp" ) ) ) ) { command = line . substring ( found , line . length ( ) ) ; command = command . substring ( channelName . length ( ) , command . length ( ) ) ; } Commands . handleCommands ( command , ircBot , channelName , isAdmin ) ; } out . close ( ) ; } } catch ( IOException e ) { System . out . println ( ( "Error:<seq2seq4repair_space>" + ( e . getMessage ( ) ) ) ) ; e . printStackTrace ( ) ; } } catch ( Exception e ) { System . out . println ( ( "Error:<seq2seq4repair_space>" + ( e . getMessage ( ) ) ) ) ; e . printStackTrace ( ) ; } } }

Fix:
if ( ( ( ! ( line . toLowerCase ( ) . startsWith ( "ping" ) ) ) && ( line . contains ( "PRIVMSG<seq2seq4repair_space>" ) ) ) && ( line . contains ( "!" ) ) ) {
Buggy code:
class NativeManagementServices { private static final int WINDOW_SIZE = Configuration . WINDOW_SIZE ; private static final OptionMap OPTIONS = OptionMap . create ( RECEIVE_WINDOW_SIZE , NativeManagementServices . WINDOW_SIZE ) ; static synchronized void installRemotingServicesIfNotInstalled ( final ServiceTarget serviceTarget , final String hostName , final ServiceVerificationHandler verificationHandler , final List < ServiceController < ? > > newControllers , final ServiceRegistry serviceContainer ) { if ( ( serviceContainer . getService ( MANAGEMENT_ENDPOINT ) ) == null ) { ManagementChannelRegistryService . addService ( serviceTarget , MANAGEMENT_ENDPOINT ) ; <START_BUG> ManagementRemotingServices . installRemotingManagementEndpoint ( serviceTarget , MANAGEMENT_ENDPOINT , hostName , MANAGEMENT , NativeManagementServices . OPTIONS , verificationHandler , newControllers ) ; <END_BUG> ManagementRemotingServices . installManagementChannelServices ( serviceTarget , MANAGEMENT_ENDPOINT , new ModelControllerClientOperationHandlerFactoryService ( ) , JBOSS_SERVER_CONTROLLER , MANAGEMENT_CHANNEL , verificationHandler , newControllers ) ; } } }

Fix:
ManagementRemotingServices . installRemotingEndpoint ( serviceTarget , MANAGEMENT_ENDPOINT , hostName , MANAGEMENT , NativeManagementServices . OPTIONS , verificationHandler , newControllers ) ;
Buggy code:
public class SearchEngine { public static IJavaSearchScope createHierarchyScope ( IType type ) throws JavaModelException { } public static IJavaSearchScope createJavaSearchScope ( IResource [ ] resources ) { } public static IJavaSearchScope createJavaSearchScope ( IJavaElement [ ] elements ) { } public static IJavaSearchScope createJavaSearchScope ( IJavaElement [ ] elements , boolean includeReferencedProjects ) { } public static ISearchPattern createOrSearchPattern ( ISearchPattern leftPattern , ISearchPattern rightPattern ) { } public static ISearchPattern createSearchPattern ( String stringPattern , int searchFor , int limitTo , boolean isCaseSensitive ) { } public static ISearchPattern createSearchPattern ( IJavaElement element , int limitTo ) { } public static IJavaSearchScope createWorkspaceScope ( ) { } public void search ( IWorkspace workspace , String patternString , int searchFor , int limitTo , IJavaSearchScope scope , IJavaSearchResultCollector resultCollector ) throws JavaModelException { <START_BUG> search ( workspace , SearchEngine . createSearchPattern ( patternString , searchFor , limitTo , false ) , scope , resultCollector ) ; <END_BUG> } public void search ( IWorkspace workspace , IJavaElement element , int limitTo , IJavaSearchScope scope , IJavaSearchResultCollector resultCollector ) throws JavaModelException { } public void search ( IWorkspace workspace , ISearchPattern searchPattern , IJavaSearchScope scope , IJavaSearchResultCollector resultCollector ) throws JavaModelException { } public void searchAllTypeNames ( IWorkspace workspace , char [ ] packageName , char [ ] typeName , int matchMode , boolean isCaseSensitive , int searchFor , IJavaSearchScope scope , final ITypeNameRequestor nameRequestor , int waitingPolicy , IProgressMonitor progressMonitor ) throws JavaModelException { } public void searchDeclarationsOfAccessedFields ( IWorkspace workspace , IJavaElement enclosingElement , IJavaSearchResultCollector resultCollector ) throws JavaModelException { } public void searchDeclarationsOfReferencedTypes ( IWorkspace workspace , IJavaElement enclosingElement , IJavaSearchResultCollector resultCollector ) throws JavaModelException { } public void searchDeclarationsOfSentMessages ( IWorkspace workspace , IJavaElement enclosingElement , IJavaSearchResultCollector resultCollector ) throws JavaModelException { } }

Fix:
search ( workspace , SearchEngine . createSearchPattern ( patternString , searchFor , limitTo , true ) , scope , resultCollector ) ;
Buggy code:
public class ActionSetActionBars extends SubActionBars { private String actionSetId ; private CoolItemToolBarManager coolItemToolBarMgr ; public ActionSetActionBars ( IActionBars parent , String actionSetId ) { } protected SubMenuManager createSubMenuManager ( IMenuManager parent ) { } protected SubToolBarManager createSubToolBarManager ( IToolBarManager parent ) { } public void dispose ( ) { } public IToolBarManager getToolBarManager ( ) { IToolBarManager parentMgr = parent . getToolBarManager ( ) ; if ( parentMgr instanceof ToolBarManager ) { return super . getToolBarManager ( ) ; } else if ( parentMgr instanceof CoolBarManager ) { if ( ( coolItemToolBarMgr ) == null ) { CoolBarManager cBarMgr = ( ( CoolBarManager ) ( parentMgr ) ) ; coolItemToolBarMgr = new CoolItemToolBarManager ( cBarMgr . getStyle ( ) ) ; toolBarMgr = createSubToolBarManager ( coolItemToolBarMgr ) ; <START_BUG> CoolBarContributionItem coolBarItem = new CoolBarContributionItem ( cBarMgr , coolItemToolBarMgr , actionSetId ) ; <END_BUG> coolItemToolBarMgr . setVisible ( active ) ; } return coolItemToolBarMgr ; } return null ; } protected void setActive ( boolean set ) { } }

Fix:
new CoolBarContributionItem ( cBarMgr , coolItemToolBarMgr , actionSetId ) ;
Buggy code:
class SessionOpenRequestHandler extends EJBIdentifierBasedMessageHandler { private static final byte HEADER_SESSION_OPEN_RESPONSE = 2 ; private static final byte HEADER_EJB_NOT_STATEFUL = 13 ; private final ExecutorService executorService ; private final MarshallerFactory marshallerFactory ; SessionOpenRequestHandler ( final DeploymentRepository deploymentRepository , final MarshallerFactory marshallerFactory , final ExecutorService executorService ) { } @ Override public void processMessage ( ChannelAssociation channelAssociation , InputStream inputStream ) throws IOException { } private void writeSessionId ( final ChannelAssociation channelAssociation , final short invocationId , final SessionID sessionID , final Affinity hardAffinity ) throws IOException { } private class SessionIDGeneratorTask implements Runnable { private final StatefulSessionComponent statefulSessionComponent ; private final ChannelAssociation channelAssociation ; private final short invocationId ; SessionIDGeneratorTask ( final StatefulSessionComponent statefulSessionComponent , final ChannelAssociation channelAssociation , final short invocationId ) { } @ Override public void run ( ) { final SessionID sessionID ; try { try { <START_BUG> sessionID = statefulSessionComponent . createSessionRemote ( ) ; <END_BUG> } catch ( Throwable t ) { ROOT_LOGGER . exceptionGeneratingSessionId ( t , statefulSessionComponent . getComponentName ( ) , invocationId , channelAssociation . getChannel ( ) ) ; SessionOpenRequestHandler . this . writeException ( channelAssociation , SessionOpenRequestHandler . this . marshallerFactory , invocationId , t , null ) ; return ; } final Affinity hardAffinity = statefulSessionComponent . getCache ( ) . getStrictAffinity ( ) ; SessionOpenRequestHandler . this . writeSessionId ( channelAssociation , invocationId , sessionID , hardAffinity ) ; } catch ( IOException ioe ) { ROOT_LOGGER . exceptionGeneratingSessionId ( ioe , statefulSessionComponent . getComponentName ( ) , invocationId , channelAssociation . getChannel ( ) ) ; IoUtils . safeClose ( this . channelAssociation . getChannel ( ) ) ; return ; } } } }

Fix:
sessionID = statefulSessionComponent . createSession ( ) ;
Buggy code:
public class FilterBasedRollingTest extends TestCase { public FilterBasedRollingTest ( String name ) { } public void setUp ( ) { } public void tearDown ( ) { } public void test1 ( ) throws Exception { } public void xtest2 ( ) throws Exception { PatternLayout layout = new PatternLayout ( "%m\n" ) ; RollingFileAppender rfa = new RollingFileAppender ( ) ; rfa . setName ( "ROLLING" ) ; rfa . setLayout ( layout ) ; FixedWindowRollingPolicy swrp = new FixedWindowRollingPolicy ( ) ; FilterBasedTriggeringPolicy fbtp = new FilterBasedTriggeringPolicy ( ) ; LevelRangeFilter rf = new LevelRangeFilter ( ) ; rf . setLevelMin ( Level . INFO ) ; fbtp . addFilter ( rf ) ; fbtp . activateOptions ( ) ; swrp . setMinIndex ( 0 ) ; swrp . setActiveFileName ( "output//filterBased-test2.log" ) ; swrp . setFileNamePattern ( "output//filterBased-test2.%i" ) ; swrp . activateOptions ( ) ; rfa . setRollingPolicy ( swrp ) ; rfa . setTriggeringPolicy ( fbtp ) ; <START_BUG> rfa . activate ( ) ; <END_BUG> Logger . getRootLogger ( ) . addAppender ( rfa ) ; common ( "output//filterBased-test2" ) ; } private void common ( String baseName ) throws Exception { } }

Fix:
rfa . activateOptions ( ) ;
Buggy code:
@ Listener ( sync = false ) public class RegistryService < K , V > implements Registry < K , V > , Service < Registry < K , V > > { static final Address LOCAL_ADDRESS = new Address ( ) { } ; private final CacheInvoker invoker = new BatchCacheInvoker ( ) ; private final Value < Cache < Address , Map . Entry < K , V > > > cache ; private final Value < RegistryEntryProvider < K , V > > provider ; private final Set < Listener < K , V > > listeners = new CopyOnWriteArraySet < Listener < K , V > > ( ) ; public RegistryService ( Value < Cache < Address , Map . Entry < K , V > > > cache , Value < RegistryEntryProvider < K , V > > provider ) { } @ Override public Registry < K , V > getValue ( ) { } @ Override public String getName ( ) { } @ Override public void addListener ( Listener < K , V > listener ) { } @ Override public void removeListener ( Listener < K , V > listener ) { } @ Override public Map < K , V > getEntries ( ) { } @ Override public Map . Entry < K , V > getLocalEntry ( ) { } @ Override public Map . Entry < K , V > getRemoteEntry ( Object address ) { } @ Override public void start ( StartContext context ) { } @ Override public Map . Entry < K , V > refreshLocalEntry ( ) { } void addLocalCacheEntry ( Cache < Address , Map . Entry < K , V > > cache , Map . Entry < K , V > entry ) { } Map . Entry < K , V > createLocalCacheEntry ( ) { } @ Override public void stop ( StopContext context ) { Cache < Address , Map . Entry < K , V > > cache = this . cache . getValue ( ) ; cache . removeListener ( this ) ; cache . getCacheManager ( ) . removeListener ( this ) ; RegistryService < K , V > . Operation < Void > operation = new Operation < Void > ( ) { @ Override public Void invoke ( Cache < Address , Map . Entry < K , V > > cache ) { <START_BUG> cache . removeAsync ( RegistryService . getLocalAddress ( cache ) ) ; <END_BUG> return null ; } } ; this . invoker . invoke ( this . cache . getValue ( ) , operation , SKIP_REMOTE_LOOKUP , SKIP_LOCKING ) ; } static Address getLocalAddress ( Cache < ? , ? > cache ) { } @ ViewChanged public void viewChanged ( final ViewChangedEvent event ) { } private ThreadLocal < Map . Entry < K , V > > entry = new ThreadLocal < Map . Entry < K , V > > ( ) ; @ CacheEntryModified public void modified ( CacheEntryModifiedEvent < Address , Map . Entry < K , V > > event ) { } @ CacheEntryRemoved public void removed ( CacheEntryRemovedEvent < Address , Map . Entry < K , V > > event ) { } abstract class Operation < R > implements CacheInvoker . Operation < Address , Map . Entry < K , V > , R > { } }

Fix:
cache . remove ( RegistryService . getLocalAddress ( cache ) ) ;
Buggy code:
public class CheckBox extends FormComponent implements IOnChangeListener { private static final long serialVersionUID = 1L ; public CheckBox ( final String id ) { } public CheckBox ( final String id , IModel model ) { } public void onSelectionChanged ( ) { } protected void onSelectionChanged ( Object newSelection ) { } protected boolean wantOnSelectionChangedNotifications ( ) { } protected boolean getStatelessHint ( ) { } protected final void onComponentTag ( final ComponentTag tag ) { checkComponentTag ( tag , "input" ) ; checkComponentTagAttribute ( tag , "type" , "checkbox" ) ; final String value = getValue ( ) ; if ( value != null ) { try { if ( Strings . isTrue ( value ) ) { tag . put ( "checked" , "checked" ) ; } else { tag . remove ( "checked" ) ; } } catch ( StringValueConversionException e ) { throw new wicket . WicketRuntimeException ( ( ( "Invalid<seq2seq4repair_space>boolean<seq2seq4repair_space>value<seq2seq4repair_space>\"" + value ) + "\"" ) , e ) ; } } if ( wantOnSelectionChangedNotifications ( ) ) { final CharSequence url = urlFor ( INTERFACE ) ; Form form = ( ( Form ) ( findParent ( Form . class ) ) ) ; if ( form != null ) { tag . put ( "onclick" , form . getJsForInterfaceUrl ( url ) ) ; } else { <START_BUG> tag . put ( "onclick" , ( ( ( ( "window.location.href='" + url ) + "&" ) + ( getInputName ( ) ) ) + "='<seq2seq4repair_space>+<seq2seq4repair_space>this.checked;" ) ) ; <END_BUG> } } super . onComponentTag ( tag ) ; } protected final boolean supportsPersistence ( ) { } protected Object convertValue ( String [ ] value ) { } }

Fix:
tag . put ( "onclick" , ( ( ( ( "window.location.href='" + url ) + "&amp;" ) + ( getInputName ( ) ) ) + "='<seq2seq4repair_space>+<seq2seq4repair_space>this.checked;" ) ) ;
Buggy code:
public class EditorElement extends AbstractElement { private static final String DIRTY_MARK = "*" ; private static final String separator = "<seq2seq4repair_space>-<seq2seq4repair_space>" ; private IEditorReference editorReference ; EditorElement ( IEditorReference editorReference , EditorProvider editorProvider ) { } public void execute ( ) { } public String getId ( ) { <START_BUG> return editorReference . getId ( ) ; <END_BUG> } public ImageDescriptor getImageDescriptor ( ) { } public String getLabel ( ) { } public String getSortLabel ( ) { } public int hashCode ( ) { } public boolean equals ( Object obj ) { } }

Fix:
return ( editorReference . getId ( ) ) + ( editorReference . getTitleToolTip ( ) ) ;
Buggy code:
@ WebServlet ( urlPatterns = "//customer//history" ) public class CustomerOrderTaxiHistoryServlet extends HttpServlet { private static final int pageSize = 10 ; @ Override protected void doGet ( HttpServletRequest req , HttpServletResponse resp ) throws IOException , ServletException { } private List < TaxiOrderHistory > getHistory ( Integer pageNumber , HttpServletRequest req ) { TaxiOrderBeanLocal taxiOrderBeanLocal = getTaxiOrderBean ( req ) ; List < TaxiOrderHistory > list = taxiOrderBeanLocal . getTaxiOrderHistory ( pageNumber , CustomerOrderTaxiHistoryServlet . pageSize , findCurrentUser ( ) ) ; <START_BUG> if ( ( list . size ( ) ) == 0 ) { <END_BUG> pageNumber -- ; getServletContext ( ) . setAttribute ( "pageNumber" , pageNumber ) ; list = taxiOrderBeanLocal . getTaxiOrderHistory ( pageNumber , CustomerOrderTaxiHistoryServlet . pageSize , findCurrentUser ( ) ) ; } return list ; } private Integer updatePageNumber ( HttpServletRequest req ) { } private User findCurrentUser ( ) { } private TaxiOrderBeanLocal getTaxiOrderBean ( HttpServletRequest req ) { } }

Fix:
if ( ( ( list . size ( ) ) == 0 ) && ( pageNumber > 1 ) ) {
Buggy code:
public class WicketNamespaceTest extends TestCase { private static Log log = LogFactory . getLog ( WicketNamespaceTest . class ) ; private MockWebApplication application ; public WicketNamespaceTest ( String name ) { } public void testRenderHomePage_1 ( ) throws Exception { } public void testRenderHomePage_2 ( ) throws Exception { } public void testRenderHomePage_3 ( ) throws Exception { } public void testRenderHomePage_4 ( ) throws Exception { } public void testRenderHomePage_5 ( ) throws Exception { } public void testRenderHomePage_6 ( ) throws Exception { } public void executeTest ( final Class pageClass , final String filename ) throws Exception { System . out . println ( ( ( "===<seq2seq4repair_space>" + ( pageClass . getName ( ) ) ) + "<seq2seq4repair_space>===" ) ) ; application = new MockWebApplication ( null ) ; <START_BUG> application . getRequiredPageSettings ( ) . setHomePage ( pageClass ) ; <END_BUG> application . setupRequestAndResponse ( ) ; application . processRequestCycle ( ) ; String document = application . getServletResponse ( ) . getDocument ( ) ; assertTrue ( DiffUtil . validatePage ( document , this . getClass ( ) , filename ) ) ; } }

Fix:
application . setHomePage ( pageClass ) ;
Buggy code:
OS . class_addMethod ( cls , sel_drawImage_withFrame_inView_ , drawImageWithFrameInViewProc , "@:@{NSFrame}@" ) ; OS . class_addMethod ( cls , sel_cellSize , cellSizeProc , "@:" ) ; OS . class_addMethod ( cls , sel_drawInteriorWithFrame_inView_ , drawInteriorWithFrameInViewProc , "@:{NSRect}@" ) ; OS . class_addMethod ( cls , sel_titleRectForBounds_ , titleRectForBoundsProc , "@:{NSRect}" ) ; OS . objc_registerClassPair ( cls ) ; className = "SWTCanvasView" ; cls = OS . objc_allocateClassPair ( class_NSView , className , 0 ) ; OS . class_addIvar ( cls , Display . SWT_OBJECT , size , ( ( byte ) ( align ) ) , types ) ; <START_BUG> OS . class_addProtocol ( cls , OS . objc_getProtocol ( "NSTextInput" ) ) ; <END_BUG>

Fix:
OS . class_addProtocol ( cls , protocol_NSTextInput ) ;
Buggy code:
public class CSVUtils { private static final String [ ] EMPTY_STRING_ARRAY = new String [ 0 ] ; private static final String [ ] [ ] EMPTY_DOUBLE_STRING_ARRAY = new String [ 0 ] [ 0 ] ; public CSVUtils ( ) { } public static String printLine ( String [ ] values , CSVFormat format ) { } public static String [ ] [ ] parse ( String s ) throws IOException { if ( s == null ) { throw new IllegalArgumentException ( "Null<seq2seq4repair_space>argument<seq2seq4repair_space>not<seq2seq4repair_space>allowed." ) ; } <START_BUG> String [ ] [ ] result = new CSVParser ( new StringReader ( s ) ) . getAllValues ( ) ; <END_BUG> if ( result == null ) { result = CSVUtils . EMPTY_DOUBLE_STRING_ARRAY ; } return result ; } public static String [ ] parseLine ( String s ) throws IOException { } }

Fix:
String [ ] [ ] result = new CSVParser ( new StringReader ( s ) ) . getRecords ( ) ;
Buggy code:
public class EmailActivity extends Activity { private EditText recipientEditText ; private EditText subjectEditText ; private EditText claimStringEditText ; private Button sendEmailButton ; private String recipient ; private String subject ; private String claimString ; private Claim currentClaim ; @ Override protected void onCreate ( Bundle savedInstanceState ) { super . onCreate ( savedInstanceState ) ; setContentView ( email_view_layout ) ; Bundle extras = getIntent ( ) . getExtras ( ) ; int position_clicked = extras . getInt ( CLAIM_CLICKED_INTENT ) ; currentClaim = ClaimsData . get ( getApplicationContext ( ) ) . getClaims ( ) . get ( position_clicked ) ; claimString = currentClaim . toString ( ) ; recipientEditText = ( ( EditText ) ( findViewById ( recipient_edit_text ) ) ) ; subjectEditText = ( ( EditText ) ( findViewById ( subject_edit_text ) ) ) ; <START_BUG> claimStringEditText = ( ( EditText ) ( findViewById ( claims_string_edit_text ) ) ) ; <END_BUG> sendEmailButton = ( ( Button ) ( findViewById ( send_email_button ) ) ) ; claimStringEditText . setText ( claimString ) ; recipientEditText . addTextChangedListener ( new TextWatcher ( ) { @ Override public void onTextChanged ( CharSequence s , int start , int before , int count ) { recipient = s . toString ( ) ; } @ Override public void beforeTextChanged ( CharSequence s , int start , int count , int after ) { } @ Override public void afterTextChanged ( Editable s ) { } } ) ; subjectEditText . addTextChangedListener ( new TextWatcher ( ) { @ Override public void onTextChanged ( CharSequence s , int start , int before , int count ) { subject = s . toString ( ) ; } @ Override public void beforeTextChanged ( CharSequence s , int start , int count , int after ) { } @ Override public void afterTextChanged ( Editable s ) { } } ) ; claimStringEditText . addTextChangedListener ( new TextWatcher ( ) { @ Override public void onTextChanged ( CharSequence s , int start , int before , int count ) { claimString = s . toString ( ) ; } @ Override public void beforeTextChanged ( CharSequence s , int start , int count , int after ) { } @ Override public void afterTextChanged ( Editable s ) { } } ) ; sendEmailButton . setOnClickListener ( new View . OnClickListener ( ) { @ Override public void onClick ( View v ) { Intent i = new Intent ( Intent . ACTION_SEND ) ; i . setType ( "message//rfc822" ) ; i . putExtra ( EXTRA_EMAIL , recipient ) ; i . putExtra ( EXTRA_SUBJECT , subject ) ; i . putExtra ( EXTRA_TEXT , claimString ) ; try { startActivity ( Intent . createChooser ( i , "Send<seq2seq4repair_space>claim" ) ) ; } catch ( android e ) { Toast . makeText ( EmailActivity . this , "Email<seq2seq4repair_space>client<seq2seq4repair_space>not<seq2seq4repair_space>found" , LENGTH_SHORT ) . show ( ) ; } } } ) ; } }

Fix:
claimStringEditText = ( ( EditText ) ( findViewById ( claims_string_text ) ) ) ;
Buggy code:
public class QueryResultCacheImpl implements QueryResultCache { private final DelegatingQueryCache _cache ; public QueryResultCacheImpl ( QueryCache cache ) { } public QueryCache getDelegate ( ) { } public void pin ( Query q ) { } public void unpin ( Query q ) { } public void evict ( Query q ) { } public void evictAll ( ) { } public void evictAll ( Class cls ) { } private QueryKey toQueryKey ( Query q ) { QueryImpl impl = ( ( QueryImpl ) ( q ) ) ; if ( impl . hasPositionalParameters ( ) ) <START_BUG> return QueryKey . newInstance ( impl . getDelegate ( ) , impl . getPositionalParameters ( ) . toArray ( ) ) ; <END_BUG> return QueryKey . newInstance ( impl . getDelegate ( ) , impl . getNamedParameters ( ) ) ; } public int hashCode ( ) { } public boolean equals ( Object other ) { } }

Fix:
return QueryKey . newInstance ( impl . getDelegate ( ) , impl . getPositionalParameters ( ) ) ;
Buggy code:
public class ParameterizedSingleTypeReference extends ArrayTypeReference { public TypeReference [ ] typeArguments ; public boolean didResolve = false ; public ParameterizedSingleTypeReference ( char [ ] name , TypeReference [ ] typeArguments , int dim , long pos ) { } public void checkBounds ( Scope scope ) { if ( ( this . resolvedType ) == null ) return ; if ( ( this . resolvedType . leafComponentType ( ) ) instanceof ParameterizedTypeBinding ) { ParameterizedTypeBinding parameterizedType = ( ( ParameterizedTypeBinding ) ( this . resolvedType . leafComponentType ( ) ) ) ; <START_BUG> ReferenceBinding currentType = parameterizedType . type ; <END_BUG> TypeVariableBinding [ ] typeVariables = currentType . typeVariables ( ) ; TypeBinding [ ] argTypes = parameterizedType . arguments ; if ( ( argTypes != null ) && ( typeVariables != null ) ) { parameterizedType . boundCheck ( scope , this . typeArguments ) ; } } } public TypeReference copyDims ( int dim ) { } public char [ ] [ ] getParameterizedTypeName ( ) { } protected TypeBinding getTypeBinding ( Scope scope ) { } private TypeBinding internalResolveType ( Scope scope , ReferenceBinding enclosingType , boolean checkBounds ) { } public StringBuffer printExpression ( int indent , StringBuffer output ) { } public TypeBinding resolveType ( BlockScope scope , boolean checkBounds ) { } public TypeBinding resolveType ( ClassScope scope ) { } public TypeBinding resolveTypeEnclosing ( BlockScope scope , ReferenceBinding enclosingType ) { } public void traverse ( ASTVisitor visitor , BlockScope scope ) { } public void traverse ( ASTVisitor visitor , ClassScope scope ) { } }

Fix:
ReferenceBinding currentType = parameterizedType . genericType ( ) ;
Buggy code:
public class SteampunkyFX extends Application { private Stage stage ; private int portNumber ; private String ipAddress ; private boolean uitloggen = false ; private Scene scene ; private AnchorPane page ; @ Override public void start ( Stage stage ) throws Exception { System . out . println ( "CLIENT<seq2seq4repair_space>USING<seq2seq4repair_space>REGISTRY" ) ; Scanner input = new Scanner ( System . in ) ; <START_BUG> ipAddress = Inet4Address . getLocalHost ( ) . getHostAddress ( ) ; <END_BUG> portNumber = 1099 ; try { this . stage = stage ; this . stage . setTitle ( "SteamPunky" ) ; this . stage . setMinWidth ( 100 ) ; this . stage . setMinHeight ( 100 ) ; stage . setResizable ( false ) ; gotoLoginselect ( ) ; this . stage . show ( ) ; } catch ( Exception ex ) { ex . printStackTrace ( ) ; } } protected void gotoLoginselect ( ) { } protected void gotoLobbyselect ( Client client , IGameServer ServerMock ) { } protected void gotoGameRoomselect ( Client client , ILobby l , IGameServer ServerMock ) { } private Initializable replaceSceneContent ( String fxml ) throws Exception { } public static void main ( String [ ] args ) { } public Stage getstage ( ) { } }

Fix:
ipAddress = "192.168.1.254" ;
Buggy code:
public abstract class AbstractServiceInfoFactory extends AbstractMetadataFactory implements IServiceInfoFactory { protected Map < AbstractServiceInfoFactory . ServiceInfoKey , IServiceInfo > serviceInfos = new HashMap ( ) ; protected class ServiceInfoKey { private EndpointDescription endpointDescription ; private Namespace discoveryNamespace ; private int hashCode = 7 ; public ServiceInfoKey ( EndpointDescription endpointDescription , Namespace discoveryNamespace ) { } public boolean equals ( Object other ) { } public int hashCode ( ) { } } public IServiceInfo createServiceInfoForDiscovery ( IDiscoveryAdvertiser advertiser , EndpointDescription endpointDescription ) { } protected IServiceInfo createServiceInfo ( URI uri , String serviceName , IServiceTypeID serviceTypeID , IServiceProperties serviceProperties ) { } protected IServiceProperties createServiceProperties ( EndpointDescription endpointDescription , IDiscoveryAdvertiser advertiser , IServiceTypeID serviceTypeID , String serviceName , URI uri ) { } protected URI createURI ( EndpointDescription endpointDescription , IDiscoveryAdvertiser advertiser , IServiceTypeID serviceTypeID , String serviceName ) throws URISyntaxException { String path = "//" + serviceName ; <START_BUG> String str = endpointDescription . getContainerID ( ) . getName ( ) ; <END_BUG> URI uri = null ; while ( true ) { try { uri = new URI ( str ) ; if ( ( uri . getHost ( ) ) != null ) { break ; } else { final String rawSchemeSpecificPart = uri . getRawSchemeSpecificPart ( ) ; if ( str . equals ( rawSchemeSpecificPart ) ) { uri = null ; break ; } else { str = rawSchemeSpecificPart ; } } } catch ( URISyntaxException e ) { uri = null ; break ; } } String scheme = RemoteConstants . SERVICE_TYPE ; int port = 32565 ; if ( uri != null ) { port = uri . getPort ( ) ; if ( port == ( - 1 ) ) port = 32565 ; } String host = null ; if ( uri != null ) { host = uri . getHost ( ) ; } else { try { host = InetAddress . getLocalHost ( ) . getHostAddress ( ) ; } catch ( Exception e ) { logInfo ( "createURI" , "failed<seq2seq4repair_space>to<seq2seq4repair_space>get<seq2seq4repair_space>local<seq2seq4repair_space>host<seq2seq4repair_space>adress,<seq2seq4repair_space>falling<seq2seq4repair_space>back<seq2seq4repair_space>to<seq2seq4repair_space>\'localhost\'." , e ) ; host = "localhost" ; } } return new URI ( scheme , null , host , port , path , null , null ) ; } protected String createServiceName ( EndpointDescription endpointDescription , IDiscoveryAdvertiser advertiser , IServiceTypeID serviceTypeID ) { } protected String createDefaultServiceName ( EndpointDescription endpointDescription , IDiscoveryAdvertiser advertiser , IServiceTypeID serviceTypeID ) { } protected IServiceTypeID createServiceTypeID ( EndpointDescription endpointDescription , IDiscoveryAdvertiser advertiser ) { } public IServiceInfo removeServiceInfoForUndiscovery ( IDiscoveryAdvertiser advertiser , EndpointDescription endpointDescription ) { } public void close ( ) { } }

Fix:
String str = endpointDescription . getID ( ) . getName ( ) ;
Buggy code:
@ SuppressWarnings ( "unused" ) public class MethodInvocationTests extends ExpressionTestCase { public void testSimpleAccess01 ( ) { } public void testStringClass ( ) { } public void testNonExistentMethods ( ) { } public void testWidening01 ( ) { } public void testArgumentConversion01 ( ) { } public void testVarargsInvocation01 ( ) { } public void testVarargsInvocation02 ( ) { } public void testInvocationOnNullContextObject ( ) { <START_BUG> evaluateAndCheckError ( "null.toString()" , ATTEMPTED_METHOD_CALL_ON_NULL_CONTEXT_OBJECT ) ; <END_BUG> } }

Fix:
evaluateAndCheckError ( "null.toString()" , METHOD_CALL_ON_NULL_OBJECT_NOT_ALLOWED ) ;
Buggy code:
public class ImplicitLocalViewProcessor extends AbstractComponentConfigProcessor { private static Logger logger = Logger . getLogger ( ImplicitLocalViewProcessor . class ) ; @ Override protected void processComponentConfig ( DeploymentUnit deploymentUnit , DeploymentPhaseContext phaseContext , CompositeIndex index , ComponentDescription componentDescription ) throws DeploymentUnitProcessingException { if ( ! ( componentDescription instanceof SessionBeanComponentDescription ) ) { return ; } SessionBeanComponentDescription sessionBeanComponentDescription = ( ( SessionBeanComponentDescription ) ( componentDescription ) ) ; if ( sessionBeanComponentDescription . hasNoInterfaceView ( ) ) { return ; } <START_BUG> if ( ! ( sessionBeanComponentDescription . getViewClassNames ( ) . isEmpty ( ) ) ) { <END_BUG> return ; } String ejbClassName = sessionBeanComponentDescription . getComponentClassName ( ) ; final Module module = deploymentUnit . getAttachment ( MODULE ) ; if ( module == null ) { throw new IllegalStateException ( ( "Module<seq2seq4repair_space>hasn't<seq2seq4repair_space>yet<seq2seq4repair_space>been<seq2seq4repair_space>attached<seq2seq4repair_space>to<seq2seq4repair_space>deployment<seq2seq4repair_space>unit:<seq2seq4repair_space>" + deploymentUnit ) ) ; } ClassLoader cl = module . getClassLoader ( ) ; Class < ? > ejbClass = null ; try { ejbClass = cl . loadClass ( ejbClassName ) ; } catch ( ClassNotFoundException cnfe ) { throw new DeploymentUnitProcessingException ( cnfe ) ; } if ( this . exposesNoInterfaceView ( ejbClass ) ) { ImplicitLocalViewProcessor . logger . debug ( ( ( "Bean:<seq2seq4repair_space>" + ( sessionBeanComponentDescription . getEJBName ( ) ) ) + "<seq2seq4repair_space>will<seq2seq4repair_space>be<seq2seq4repair_space>marked<seq2seq4repair_space>for<seq2seq4repair_space>(implicit)<seq2seq4repair_space>no-interface<seq2seq4repair_space>view" ) ) ; sessionBeanComponentDescription . addNoInterfaceView ( ) ; return ; } Class < ? > defaultLocalView = this . getDefaultLocalView ( ejbClass ) ; if ( defaultLocalView != null ) { ImplicitLocalViewProcessor . logger . debug ( ( ( ( "Bean:<seq2seq4repair_space>" + ( sessionBeanComponentDescription . getEJBName ( ) ) ) + "<seq2seq4repair_space>will<seq2seq4repair_space>be<seq2seq4repair_space>marked<seq2seq4repair_space>for<seq2seq4repair_space>default<seq2seq4repair_space>local<seq2seq4repair_space>view:<seq2seq4repair_space>" ) + ( defaultLocalView . getName ( ) ) ) ) ; sessionBeanComponentDescription . addLocalBusinessInterfaceViews ( Collections . singleton ( defaultLocalView . getName ( ) ) ) ; return ; } } private boolean exposesNoInterfaceView ( Class < ? > beanClass ) { } private Class < ? > getDefaultLocalView ( Class < ? > beanClass ) { } private List < Class < ? > > filterInterfaces ( List < Class < ? > > interfaces ) { } }

Fix:
if ( ! ( sessionBeanComponentDescription . getViews ( ) . isEmpty ( ) ) ) {
Buggy code:
public class AndOrNotTestCase extends TestCase { public AndOrNotTestCase ( String name ) { } World world ; public void testMatch ( ) throws IOException { } public void testJoinPointMatch ( ) { } private Pointcut makePointcut ( String pattern ) { } private void checkEquals ( String pattern , Pointcut p ) throws IOException { } private void checkMatches ( Pointcut p , JoinPoint jp , JoinPoint . StaticPart jpsp , FuzzyBoolean expected ) { } private void checkSerialization ( String string ) throws IOException { Pointcut p = makePointcut ( string ) ; ByteArrayOutputStream bo = new ByteArrayOutputStream ( ) ; DataOutputStream out = new DataOutputStream ( bo ) ; p . write ( out ) ; out . close ( ) ; ByteArrayInputStream bi = new ByteArrayInputStream ( bo . toByteArray ( ) ) ; <START_BUG> DataInputStream in = new DataInputStream ( bi ) ; <END_BUG> Pointcut newP = Pointcut . read ( in , null ) ; assertEquals ( "write//read" , p , newP ) ; } private static class Foo { } private static class Bar { } private static class C { } }

Fix:
VersionedDataInputStream in = new VersionedDataInputStream ( bi ) ;
Buggy code:
public class ImportWizardLauncher { public ImportWizardLauncher ( ) { } public void launchWizard ( ) { final ImportPluginHandler pluginHandler ; try { pluginHandler = ( ( ImportPluginHandler ) ( pluginManager . getHandler ( "org.columba.addressbook.import" ) ) ) ; } catch ( PluginHandlerNotFoundException ex ) { NotifyDialog d = new NotifyDialog ( ) ; d . showDialog ( ex ) ; return ; } DataModel data = new DataModel ( ) ; data . registerDataLookup ( "Plugin.handler" , new DataLookup ( ) { public Object lookupData ( ) { return pluginHandler ; } } ) ; WizardModel model = new net . javaprog . ui . wizard . DefaultWizardModel ( new Step [ ] { new PluginStep ( data ) , new LocationStep ( data ) } ) ; model . addWizardModelListener ( new AddressbookImporter ( data ) ) ; <START_BUG> Wizard wizard = new Wizard ( model , AddressbookResourceLoader . getString ( "dialog" , "addressbookimport" , "title" ) , ImageLoader . getSmallImageIcon ( "stock_convert-32.png" ) ) ; <END_BUG> wizard . pack ( ) ; wizard . setLocationRelativeTo ( null ) ; wizard . setVisible ( true ) ; } }

Fix:
Wizard wizard = new Wizard ( model , AddressbookResourceLoader . getString ( "dialog" , "addressbookimport" , "title" ) , ImageLoader . getSmallImageIcon ( "stock_convert.png" ) ) ;
Buggy code:
public interface OperationHandler { <START_BUG> Cancellable execute ( NewOperationContext context , ModelNode operation , ResultHandler resultHandler ) ; <END_BUG> }

Fix:
Cancellable execute ( OperationContext context , ModelNode operation , ResultHandler resultHandler ) ;
Buggy code:
public class CopyPackageFragmentRootOperation extends JavaModelOperation { IPath destination ; int updateResourceFlags ; int updateModelFlags ; IClasspathEntry sibling ; public CopyPackageFragmentRootOperation ( IPackageFragmentRoot root , IPath destination , int updateResourceFlags , int updateModelFlags , IClasspathEntry sibling ) { } protected void executeOperation ( ) throws JavaModelException { } protected void copyResource ( IPackageFragmentRoot root , IClasspathEntry rootEntry , final IWorkspaceRoot workspaceRoot ) throws JavaModelException { } protected void addEntryToClasspath ( IClasspathEntry rootEntry , IWorkspaceRoot workspaceRoot ) throws JavaModelException { } protected IClasspathEntry copy ( IClasspathEntry entry ) throws JavaModelException { } public IJavaModelStatus verify ( ) { IJavaModelStatus status = super . verify ( ) ; if ( ! ( status . isOK ( ) ) ) { return status ; } IPackageFragmentRoot root = ( ( IPackageFragmentRoot ) ( getElementToProcess ( ) ) ) ; if ( ( root == null ) || ( ! ( root . exists ( ) ) ) ) { return new JavaModelStatus ( IJavaModelStatusConstants . ELEMENT_DOES_NOT_EXIST , root ) ; } IResource resource = root . getResource ( ) ; if ( resource instanceof IFolder ) { if ( resource . isLinked ( ) ) { return new JavaModelStatus ( IJavaModelStatusConstants . INVALID_RESOURCE , root ) ; } } if ( ( ( this . updateModelFlags ) & ( IPackageFragmentRoot . DESTINATION_PROJECT_CLASSPATH ) ) != 0 ) { String destProjectName = this . destination . segment ( 0 ) ; IProject project = ResourcesPlugin . getWorkspace ( ) . getRoot ( ) . getProject ( destProjectName ) ; if ( JavaProject . hasJavaNature ( project ) ) { try { IJavaProject destProject = JavaCore . create ( project ) ; IClasspathEntry [ ] destClasspath = destProject . getRawClasspath ( ) ; boolean foundSibling = false ; boolean foundExistingEntry = false ; for ( int i = 0 , length = destClasspath . length ; i < length ; i ++ ) { IClasspathEntry entry = destClasspath [ i ] ; if ( entry . equals ( this . sibling ) ) { foundSibling = true ; break ; } if ( entry . getPath ( ) . equals ( this . destination ) ) { foundExistingEntry = true ; } } if ( ( ( this . sibling ) != null ) && ( ! foundSibling ) ) { <START_BUG> return new JavaModelStatus ( IJavaModelStatusConstants . INVALID_SIBLING , ( ( this . sibling ) == null ? "null" : this . sibling . toString ( ) ) ) ; <END_BUG> } if ( foundExistingEntry && ( ( ( this . updateModelFlags ) & ( IPackageFragmentRoot . REPLACE ) ) == 0 ) ) { return new JavaModelStatus ( IJavaModelStatusConstants . NAME_COLLISION , Messages . bind ( Messages . status_nameCollision , new String [ ] { this . destination . toString ( ) } ) ) ; } } catch ( JavaModelException e ) { return e . getJavaModelStatus ( ) ; } } } return JavaModelStatus . VERIFIED_OK ; } }

Fix:
return new JavaModelStatus ( IJavaModelStatusConstants . INVALID_SIBLING , this . sibling . toString ( ) ) ;
Buggy code:
public class PhenotypeOverviewView extends ViewWithUiHandlers < PhenotypeOverviewUiHandlers > implements PhenotypeOverviewPresenter . MyView { private final Widget widget ; public interface Binder extends UiBinder < Widget , PhenotypeOverviewView > { } @ UiField ( provided = true ) DataGrid < PhenotypeProxy > dataGrid ; @ UiField CustomPager pager ; @ UiField NavLink navAll ; @ UiField NavLink navPrivate ; @ UiField NavLink navPublished ; @ UiField NavLink navRecent ; @ UiField TextBox searchBox ; private final PlaceManager placeManager ; private final BiMap < ConstEnums . TABLE_FILTER , NavLink > navLinkMap ; @ Inject public PhenotypeOverviewView ( final PhenotypeOverviewView . Binder binder , final PlaceManager placeManager , final CustomDataGridResources customDataGridResources ) { } @ Override public Widget asWidget ( ) { } private void initGrid ( ) { dataGrid . setWidth ( "100%" ) ; dataGrid . setEmptyTableWidget ( new Label ( "No<seq2seq4repair_space>Records<seq2seq4repair_space>found" ) ) ; dataGrid . addColumn ( new PhenotypeListDataGridColumns . TitleColumn ( placeManager , new PlaceRequest . Builder ( ) . nameToken ( phenotype ) ) , "Name" ) ; <START_BUG> dataGrid . addColumn ( new PhenotypeListDataGridColumns . ExperimentColumn ( ) , "Experiment" ) ; <END_BUG> dataGrid . addColumn ( new PhenotypeListDataGridColumns . TraitOntologyColumn ( ) , "Trait-Ontology" ) ; dataGrid . addColumn ( new PhenotypeListDataGridColumns . EnvironOntologyColumn ( ) , "Env-Ontology" ) ; dataGrid . addColumn ( new PhenotypeListDataGridColumns . ProtocolColumn ( ) , "Protocol" ) ; dataGrid . addColumn ( new com . gmi . nordborglab . browser . client . ui . cells . OwnerLinkColumn ( placeManager ) , "Owner" ) ; dataGrid . addColumn ( new AccessColumn ( ) , "Access" ) ; dataGrid . setColumnWidth ( 0 , 15 , PCT ) ; dataGrid . setColumnWidth ( 1 , 15 , PCT ) ; dataGrid . setColumnWidth ( 2 , 15 , PCT ) ; dataGrid . setColumnWidth ( 3 , 15 , PCT ) ; dataGrid . setColumnWidth ( 4 , 40 , PCT ) ; dataGrid . setColumnWidth ( 5 , 100 , PX ) ; dataGrid . setColumnWidth ( 6 , 100 , PX ) ; } @ Override public HasData < PhenotypeProxy > getDisplay ( ) { } @ Override public void setActiveNavLink ( ConstEnums . TABLE_FILTER filter ) { } @ Override public void displayFacets ( List < FacetProxy > facets , String searchString ) { } private String getFilterTitleFromType ( ConstEnums . TABLE_FILTER filter ) { } @ UiHandler ( "searchBox" ) public void onKeyUpSearchBox ( KeyUpEvent e ) { } }

Fix:
dataGrid . addColumn ( new PhenotypeListDataGridColumns . ExperimentColumn ( ) , "Study" ) ;
Buggy code:
public class ResponseStatusExceptionResolver extends AbstractHandlerExceptionResolver implements MessageSourceAware { private MessageSource messageSource ; @ Override public void setMessageSource ( MessageSource messageSource ) { } @ Override protected ModelAndView doResolveException ( HttpServletRequest request , HttpServletResponse response , Object handler , Exception ex ) { } protected ModelAndView resolveResponseStatus ( ResponseStatus responseStatus , HttpServletRequest request , HttpServletResponse response , Object handler , Exception ex ) throws Exception { int statusCode = responseStatus . code ( ) . value ( ) ; String reason = responseStatus . reason ( ) ; if ( ( this . messageSource ) != null ) { reason = this . messageSource . getMessage ( reason , null , reason , LocaleContextHolder . getLocale ( ) ) ; } if ( ! ( StringUtils . hasLength ( reason ) ) ) { <START_BUG> response . sendError ( statusCode ) ; <END_BUG> } else { response . sendError ( statusCode , reason ) ; } return new ModelAndView ( ) ; } }

Fix:
response . setStatus ( statusCode ) ;
Buggy code:
public class ServerSOContainer extends SOContainer implements ISharedObjectContainerGroupManager { protected IJoinPolicy joinpolicy ; public ServerSOContainer ( ISharedObjectContainerConfig config ) { } public boolean isGroupServer ( ) { } public Object getAdapter ( Class clazz ) { if ( clazz . equals ( ISharedObjectContainerGroupManager . class ) ) { return this ; } else <START_BUG> return null ; <END_BUG> } public boolean isGroupManager ( ) { } public ID getGroupID ( ) { } protected void queueContainerMessage ( ContainerMessage message ) throws IOException { } protected void forwardToRemote ( ID from , ID to , ContainerMessage data ) throws IOException { } protected void forwardExcluding ( ID from , ID excluding , ContainerMessage data ) throws IOException { } protected void handleViewChangeMessage ( ContainerMessage mess ) throws IOException { } public void leaveGroup ( ) { } protected ContainerMessage acceptNewClient ( Socket socket , String target , Serializable data , ISynchAsynchConnection conn ) { } protected Object checkJoin ( SocketAddress saddr , ID fromID , String target , Serializable data ) throws Exception { } protected void handleLeaveGroupMessage ( ContainerMessage mess ) { } public void ejectGroupMember ( ID memberID , Serializable reason ) { } public void ejectAllGroupMembers ( Serializable reason ) { } protected ID getIDForConnection ( IAsynchConnection conn ) { } protected IAsynchConnection getConnectionForID ( ID memberID ) { } protected ISynchConnection getSynchConnectionForID ( ID memberID ) { } private final void queueToAll ( ContainerMessage message ) { } public void dispose ( long timeout ) { } public void joinGroup ( ID groupID , IJoinContext joinContext ) throws ContainerJoinException { } public void setJoinPolicy ( IJoinPolicy policy ) { } }

Fix:
return super . getAdapter ( clazz ) ;