nus-yam/ex-repair huggingface dataset:
Buggy code:
public class Langjava extends Activity { int start = 1 ; final Context context = this ; @ Override public void onCreate ( Bundle savedInstanceState ) { } public void buttonClick ( String category ) { <START_BUG> Intent i = new Intent ( getApplicationContext ( ) , TestPagec . class ) ; <END_BUG> i . putExtra ( "cat" , category ) ; startActivity ( i ) ; } }

Fix:
Intent i = new Intent ( getApplicationContext ( ) , TestPagejava . class ) ;
Buggy code:
public class PanelCachingTab implements ITab { private static final long serialVersionUID = 1L ; private WebMarkupContainerWithAssociatedMarkup panel ; private final ITab delegate ; public PanelCachingTab ( ITab delegate ) { } public IModel < String > getTitle ( ) { } public WebMarkupContainerWithAssociatedMarkup getPanel ( final String panelId ) { } public boolean isVisible ( ) { <START_BUG> return true ; <END_BUG> } }

Fix:
return delegate . isVisible ( ) ;
Buggy code:
public class TypePatternMatcherTest extends TestCase { TypePatternMatcher tpm ; public void testMatching ( ) { } protected void setUp ( ) throws Exception { super . setUp ( ) ; <START_BUG> PointcutParser pp = new PointcutParser ( ) ; <END_BUG> tpm = pp . parseTypePattern ( "java.util.Map+" ) ; } }

Fix:
PointcutParser pp = PointcutParser . getPointcutParserSupportingAllPrimitivesAndUsingSpecifiedClassloaderForResolution ( this . getClass ( ) . getClassLoader ( ) ) ;
Buggy code:
class RemoteOutboundConnectionAdd extends AbstractOutboundConnectionAddHandler { static final RemoteOutboundConnectionAdd INSTANCE = new RemoteOutboundConnectionAdd ( ) ; static ModelNode getAddOperation ( final String connectionName , final String outboundSocketBindingRef , final Map < String , String > connectionCreationOptions ) { if ( ( connectionName == null ) || ( connectionName . trim ( ) . isEmpty ( ) ) ) { throw new IllegalArgumentException ( "Connection<seq2seq4repair_space>name<seq2seq4repair_space>cannot<seq2seq4repair_space>be<seq2seq4repair_space>null<seq2seq4repair_space>or<seq2seq4repair_space>empty" ) ; } if ( ( outboundSocketBindingRef == null ) || ( outboundSocketBindingRef . trim ( ) . isEmpty ( ) ) ) { throw new IllegalArgumentException ( ( "Outbound<seq2seq4repair_space>socket<seq2seq4repair_space>binding<seq2seq4repair_space>reference<seq2seq4repair_space>cannot<seq2seq4repair_space>be<seq2seq4repair_space>null<seq2seq4repair_space>or<seq2seq4repair_space>empty<seq2seq4repair_space>for<seq2seq4repair_space>connection<seq2seq4repair_space>named<seq2seq4repair_space>" + connectionName ) ) ; } final ModelNode addOperation = new ModelNode ( ) ; addOperation . get ( OP ) . set ( ADD ) ; final PathAddress address = PathAddress . pathAddress ( PathElement . pathElement ( SUBSYSTEM , SUBSYSTEM_NAME ) , PathElement . pathElement ( REMOTE_OUTBOUND_CONNECTION , connectionName ) ) ; addOperation . get ( OP_ADDR ) . set ( address . toModelNode ( ) ) ; addOperation . get ( OUTBOUND_SOCKET_BINDING_REF ) . set ( outboundSocketBindingRef ) ; if ( connectionCreationOptions != null ) { for ( final Map . Entry < String , String > entry : connectionCreationOptions . entrySet ( ) ) { if ( ( entry . getKey ( ) ) == null ) { continue ; } <START_BUG> addOperation . get ( CONNECTION_CREATION_OPTIONS ) . set ( entry . getKey ( ) , entry . getValue ( ) ) ; <END_BUG> } } return addOperation ; } private RemoteOutboundConnectionAdd ( ) { } @ Override protected void populateModel ( ModelNode operation , ModelNode model ) throws OperationFailedException { } @ Override protected void performRuntime ( OperationContext context , ModelNode operation , ModelNode model , ServiceVerificationHandler verificationHandler , List < ServiceController < ? > > newControllers ) throws OperationFailedException { } ServiceController installRuntimeService ( OperationContext context , String connectionName , ModelNode remoteOutboundConnection , ServiceVerificationHandler verificationHandler ) throws OperationFailedException { } }

Fix:
addOperation . get ( CONNECTION_CREATION_OPTIONS ) . add ( entry . getKey ( ) , entry . getValue ( ) ) ;
Buggy code:
@ Repository public class ClickRepositoryImpl implements ClickRepository { private static final Logger log = LoggerFactory . getLogger ( ClickRepositoryImpl . class ) ; private static final RowMapper < Click > rowMapper = new RowMapper < Click > ( ) { @ Override public Click mapRow ( ResultSet rs , int rowNum ) throws SQLException { } } ; @ Autowired protected JdbcTemplate jdbc ; public ClickRepositoryImpl ( ) { } public ClickRepositoryImpl ( JdbcTemplate jdbc ) { } @ Override public List < Click > findByHash ( String hash ) { } @ Override public Click save ( final Click cl ) { } @ Override public void update ( Click cl ) { try { <START_BUG> jdbc . update ( "update<seq2seq4repair_space>click<seq2seq4repair_space>set<seq2seq4repair_space>hash=?,<seq2seq4repair_space>date=?,<seq2seq4repair_space>created=?,<seq2seq4repair_space>referrer=?,<seq2seq4repair_space>browser=?,<seq2seq4repair_space>platform=?,<seq2seq4repair_space>ip=?,<seq2seq4repair_space>country=?<seq2seq4repair_space>where<seq2seq4repair_space>id=?" , cl . getHash ( ) , cl . getCreated ( ) , cl . getReferrer ( ) , cl . getBrowser ( ) , cl . getPlatform ( ) , cl . getIp ( ) , cl . getCountry ( ) , cl . getId ( ) ) ; <END_BUG> } catch ( Exception e ) { ClickRepositoryImpl . log . debug ( ( "When<seq2seq4repair_space>update<seq2seq4repair_space>for<seq2seq4repair_space>id<seq2seq4repair_space>" + ( cl . getId ( ) ) ) , e ) ; } } @ Override public void delete ( Long id ) { } @ Override public void deleteAll ( ) { } @ Override public Long count ( ) { } @ Override public List < Click > list ( Long limit , Long offset ) { } @ Override public Long clicksByHash ( String hash ) { } }

Fix:
jdbc . update ( "update<seq2seq4repair_space>click<seq2seq4repair_space>set<seq2seq4repair_space>hash=?,<seq2seq4repair_space>created=?,<seq2seq4repair_space>referrer=?,<seq2seq4repair_space>browser=?,<seq2seq4repair_space>platform=?,<seq2seq4repair_space>ip=?,<seq2seq4repair_space>country=?<seq2seq4repair_space>where<seq2seq4repair_space>id=?" , cl . getHash ( ) , cl . getCreated ( ) , cl . getReferrer ( ) , cl . getBrowser ( ) , cl . getPlatform ( ) , cl . getIp ( ) , cl . getCountry ( ) , cl . getId ( ) ) ;
Buggy code:
@ EActivity ( layout . activity_keepright_edit ) @ OptionsMenu ( menu . keepright_edit ) public class KeeprightEditActivity extends BaseActionBarActivity implements BugEditActivityConstants { @ ViewById ( id . txtvTitle ) TextView mTitle ; @ ViewById ( id . txtvText ) TextView mText ; @ ViewById ( id . edttxtComment ) EditText mComment ; @ ViewById ( id . spnState ) Spinner mState ; @ Extra ( EXTRA_BUG ) KeeprightBug mBug ; private MaterialDialog mSaveDialog = null ; @ AfterViews void init ( ) { getSupportActionBar ( ) . setDisplayShowHomeEnabled ( true ) ; getSupportActionBar ( ) . setIcon ( mBug . getIcon ( ) ) ; mTitle . setText ( mBug . getTitle ( ) ) ; Linkify . addLinks ( mTitle , WEB_URLS ) ; mTitle . setText ( Html . fromHtml ( mTitle . getText ( ) . toString ( ) ) ) ; mText . setText ( mBug . getDescription ( ) ) ; Linkify . addLinks ( mText , WEB_URLS ) ; mText . setText ( Html . fromHtml ( mText . getText ( ) . toString ( ) ) ) ; mText . setMovementMethod ( LinkMovementMethod . getInstance ( ) ) ; <START_BUG> mComment . setText ( mBug . getComment ( ) ) ; <END_BUG> mState . setAdapter ( new KeeprightEditActivity . KeeprightStateAdapter ( this , mBug . getOpenIcon ( ) ) ) ; switch ( mBug . getState ( ) ) { case OPEN : mState . setSelection ( 0 ) ; break ; case IGNORED_TMP : mState . setSelection ( 1 ) ; break ; case IGNORED : mState . setSelection ( 2 ) ; break ; } mSaveDialog = new MaterialDialog . Builder ( this ) . title ( saving ) . content ( please_wait ) . cancelable ( false ) . progress ( true , 0 ) . build ( ) ; } @ OptionsItem ( id . action_done ) void menuDoneClicked ( ) { } @ Background void uploadData ( String comment , KeeprightBug . STATE state ) { } @ UiThread void uploadDataDone ( boolean result ) { } private class KeeprightStateAdapter extends ArrayAdapter < KeeprightBug . STATE > { final Drawable mIcon ; public KeeprightStateAdapter ( Context context , Drawable icon ) { } @ Override public View getView ( int position , View convertView , ViewGroup parent ) { } @ Override public View getDropDownView ( int position , View convertView , ViewGroup parent ) { } private View getCustomView ( int position , View convertView , ViewGroup parent ) { } } }

Fix:
mComment . setText ( Html . fromHtml ( mBug . getComment ( ) ) ) ;
Buggy code:
public class GenericMessage < T > implements Serializable , Message < T > { private static final long serialVersionUID = - 9004496725833093406L ; private final T payload ; private final MessageHeaders headers ; protected GenericMessage ( T payload ) { } protected GenericMessage ( T payload , Map < String , Object > headers ) { } public MessageHeaders getHeaders ( ) { } public T getPayload ( ) { } public String toString ( ) { StringBuilder sb = new StringBuilder ( ) ; <START_BUG> if ( byte [ ] . class . equals ( this . payload . getClass ( ) ) ) { <END_BUG> sb . append ( "[Payload<seq2seq4repair_space>byte[" ) . append ( ( ( byte [ ] ) ( this . payload ) ) . length ) . append ( "]]" ) ; } else { sb . append ( "[Payload<seq2seq4repair_space>" ) . append ( this . payload . getClass ( ) . getSimpleName ( ) ) ; sb . append ( "<seq2seq4repair_space>content=" ) . append ( this . payload ) . append ( "]" ) ; } sb . append ( ( ( "[Headers=" + ( this . headers ) ) + "]" ) ) ; return sb . toString ( ) ; } public int hashCode ( ) { } public boolean equals ( Object obj ) { } }

Fix:
if ( ( this . payload ) instanceof byte [ ] ) {
Buggy code:
public class LocalRootFolder extends Folder { public LocalRootFolder ( FolderItem item ) { } protected static final ImageIcon rootIcon = ImageLoader . getSmallImageIcon ( "localhost.png" ) ; public ImageIcon getCollapsedIcon ( ) { } public ImageIcon getExpandedIcon ( ) { } public Object addMessage ( AbstractMessage message , WorkerStatusController worker ) throws Exception { } public Object addMessage ( String source , WorkerStatusController worker ) throws Exception { } public boolean exists ( Object uid , WorkerStatusController worker ) throws Exception { } public void expungeFolder ( Object [ ] uids , WorkerStatusController worker ) throws Exception { } public HeaderList getHeaderList ( WorkerStatusController worker ) throws Exception { } public ColumbaHeader getMessageHeader ( Object uid , WorkerStatusController worker ) throws Exception { } public String getMessageSource ( Object uid , WorkerStatusController worker ) throws Exception { } public MimePart getMimePart ( Object uid , Integer [ ] address , WorkerStatusController worker ) throws Exception { } public MimePartTree getMimePartTree ( Object uid , WorkerStatusController worker ) throws Exception { } public void markMessage ( Object [ ] uids , int variant , WorkerStatusController worker ) throws Exception { } public void removeMessage ( Object uid , WorkerStatusController worker ) throws Exception { } public Object [ ] searchMessages ( Filter filter , Object [ ] uids , WorkerStatusController worker ) throws Exception { } public Object [ ] searchMessages ( Filter filter , WorkerStatusController worker ) throws Exception { } <START_BUG> public Class getDefaultChild ( ) { <END_BUG> return null ; } }

Fix:
public String getDefaultChild ( ) {
Buggy code:
public class FileCellRenderer extends DefaultTreeCellRenderer { public static Icon fileIcon = GUIUtilities . loadIcon ( "File.png" ) ; public static Icon openFileIcon = GUIUtilities . loadIcon ( "OpenFile.png" ) ; public static Icon dirIcon = GUIUtilities . loadIcon ( "Folder.png" ) ; public static Icon openDirIcon = GUIUtilities . loadIcon ( "OpenFolder.png" ) ; public static Icon filesystemIcon = GUIUtilities . loadIcon ( "DriveSmall.png" ) ; public static Icon loadingIcon = GUIUtilities . loadIcon ( "ReloadSmall.png" ) ; public FileCellRenderer ( ) { } public Component getTreeCellRendererComponent ( JTree tree , Object value , boolean sel , boolean expanded , boolean leaf , int row , boolean focus ) { } public void paintComponent ( Graphics g ) { if ( underlined ) { Font font = getFont ( ) ; <START_BUG> FontMetrics fm = getFontMetrics ( getFont ( ) ) ; <END_BUG> int x ; int y ; if ( ( getIcon ( ) ) == null ) { x = 0 ; y = ( fm . getAscent ( ) ) + 2 ; } else { x = ( getIcon ( ) . getIconWidth ( ) ) + ( getIconTextGap ( ) ) ; y = Math . max ( ( ( fm . getAscent ( ) ) + 2 ) , 16 ) ; } g . setColor ( getForeground ( ) ) ; g . drawLine ( x , y , ( x + ( fm . stringWidth ( getText ( ) ) ) ) , y ) ; } super . paintComponent ( g ) ; } public static Icon getIconForFile ( VFS . DirectoryEntry file , boolean expanded ) { } boolean showIcons ; void propertiesChanged ( ) { } private Font plainFont ; private Font boldFont ; private boolean underlined ; }

Fix:
FontMetrics fm = getFontMetrics ( font ) ;
Buggy code:
public class SourceModifier implements ISourceModifier { private final String destinationIndent ; private final int sourceIndentLevel ; private final int tabWidth ; private final int indentWidth ; public SourceModifier ( int sourceIndentLevel , String destinationIndent , int tabWidth , int indentWidth ) { } public ISourceModifier copy ( ) { } public ReplaceEdit [ ] getModifications ( String source ) { List result = new ArrayList ( ) ; <START_BUG> int destIndentLevel = Indents . computeIndentUnits ( this . destinationIndent , this . tabWidth , this . indentWidth ) ; <END_BUG> if ( destIndentLevel == ( this . sourceIndentLevel ) ) { return ( ( ReplaceEdit [ ] ) ( result . toArray ( new ReplaceEdit [ result . size ( ) ] ) ) ) ; } return Indents . getChangeIndentEdits ( source , this . sourceIndentLevel , this . tabWidth , this . indentWidth , this . destinationIndent ) ; } }

Fix:
int destIndentLevel = Indents . measureIndentUnits ( this . destinationIndent , this . tabWidth , this . indentWidth ) ;
Buggy code:
public class DefaultSearchEngine { private static final Logger LOG = Logger . getLogger ( "org.columba.mail.folder.search" ) ; private static Hashtable filterCache ; private AbstractMessageFolder folder ; private QueryEngine nonDefaultEngine ; public DefaultSearchEngine ( AbstractMessageFolder folder ) { } public IStatusObservable getObservable ( ) { } protected synchronized AbstractFilter getFilter ( FilterCriteria filterCriteria , String type ) { if ( ( DefaultSearchEngine . filterCache . containsKey ( type ) ) == true ) { AbstractFilter f = ( ( AbstractFilter ) ( DefaultSearchEngine . filterCache . get ( type ) ) ) ; f . setUp ( filterCriteria ) ; return f ; } AbstractFilter instance = null ; try { <START_BUG> IExtensionHandler handler = PluginManager . getInstance ( ) . getHandler ( ORG_COLUMBA_MAIL_FILTER ) ; <END_BUG> IExtension extension = handler . getExtension ( type ) ; instance = ( ( AbstractFilter ) ( extension . instanciateExtension ( null ) ) ) ; } catch ( Exception ex ) { JOptionPane . showMessageDialog ( null , ( "Error<seq2seq4repair_space>while<seq2seq4repair_space>trying<seq2seq4repair_space>to<seq2seq4repair_space>load<seq2seq4repair_space>filter<seq2seq4repair_space>plugin<seq2seq4repair_space>=" + type ) ) ; ex . printStackTrace ( ) ; } instance . setUp ( filterCriteria ) ; if ( instance != null ) { DefaultSearchEngine . filterCache . put ( type , instance ) ; } return instance ; } protected boolean processRule ( Object uid , FilterCriteria criteria , String type ) throws Exception { } protected List processCriteria ( FilterRule rule , List uids ) throws Exception { } protected void divideFilterRule ( FilterRule filterRule , FilterRule notDefaultEngine , FilterRule defaultEngine ) { } public Object [ ] searchMessages ( Filter filter , Object [ ] uids ) throws Exception { } public Object [ ] searchMessages ( Filter filter ) throws Exception { } protected List queryEngine ( FilterRule filter , Object [ ] uids ) throws Exception { } protected List queryEngine ( FilterRule filter ) throws Exception { } public QueryEngine getNonDefaultEngine ( ) { } public void setNonDefaultEngine ( QueryEngine engine ) { } public void sync ( ) throws Exception { } public void save ( ) { } }

Fix:
IExtensionHandler handler = PluginManager . getInstance ( ) . getExtensionHandler ( ORG_COLUMBA_MAIL_FILTER ) ;
Buggy code:
public class UrlConnectionRetrieveFileTransfer extends AbstractRetrieveFileTransfer { private static final String USERNAME_PREFIX = Messages . UrlConnectionRetrieveFileTransfer_USERNAME_PROMPT ; private static final int HTTP_RANGE_RESPONSE = 206 ; private static final int OK_RESPONSE_CODE = 200 ; private static final String JRE_CONNECT_TIMEOUT_PROPERTY = "sun.net.client.defaultConnectTimeout" ; private static final String DEFAULT_CONNECT_TIMEOUT = "30000" ; private static final String JRE_READ_TIMEOUT_PROPERTY = "sun.net.client.defaultReadTimeout" ; private static final String DEFAULT_READ_TIMEOUT = "30000" ; protected URLConnection urlConnection ; protected int httpVersion = 1 ; protected int responseCode = - 1 ; private String remoteFileName ; protected String responseMessage = null ; private JREProxyHelper proxyHelper = null ; protected String username = null ; protected String password = null ; public UrlConnectionRetrieveFileTransfer ( ) { } public String getRemoteFileName ( ) { } protected void connect ( ) throws IOException { } protected boolean isConnected ( ) { } protected void setResumeRequestHeaderValues ( ) throws IOException { } protected void setRequestHeaderValues ( ) throws InvalidFileRangeSpecificationException { } private void setRangeHeader ( String value ) { } public int getResponseCode ( ) { } private boolean isHTTP ( ) { } private boolean isHTTP11 ( ) { } protected void getResponseHeaderValues ( ) throws IOException { } protected void getResumeResponseHeaderValues ( ) throws IOException { } protected void setupProxy ( final Proxy proxy2 ) { } protected void setupAuthentication ( ) throws IOException , UnsupportedCallbackException { } class UrlConnectionAuthenticator extends Authenticator { protected PasswordAuthentication getPasswordAuthentication ( ) { } } public void setConnectContextForAuthentication ( IConnectContext connectContext ) { } protected void openStreams ( ) throws IncomingFileTransferException { try { setupAuthentication ( ) ; connect ( ) ; setRequestHeaderValues ( ) ; setInputStream ( urlConnection . getInputStream ( ) ) ; getResponseHeaderValues ( ) ; fireReceiveStartEvent ( ) ; } catch ( final Exception e ) { <START_BUG> IncomingFileTransferException except = new IncomingFileTransferException ( NLS . bind ( UrlConnectionRetrieveFileTransfer_EXCEPTION_COULD_NOT_CONNECT , getRemoteFileURL ( ) . toString ( ) ) , e , getResponseCode ( ) ) ; <END_BUG> hardClose ( ) ; throw except ; } } protected void hardClose ( ) { } protected boolean doPause ( ) { } protected boolean doResume ( ) { } public Object getAdapter ( Class adapter ) { } private void setupTimeouts ( ) { } private boolean openStreamsForResume ( ) { } }

Fix:
IncomingFileTransferException except = new IncomingFileTransferException ( NLS . bind ( UrlConnectionRetrieveFileTransfer_EXCEPTION_COULD_NOT_CONNECT , getRemoteFileURL ( ) . toString ( ) ) , e ) ;
Buggy code:
public class Skeleton { public static int selectedUsecase = 1 ; static String [ ] useCaseOptions = new String [ ] { "Close<seq2seq4repair_space>tester" , "New<seq2seq4repair_space>game" , "Put<seq2seq4repair_space>putty" , "Put<seq2seq4repair_space>oil" , "Step<seq2seq4repair_space>on<seq2seq4repair_space>a<seq2seq4repair_space>putty" , "Step<seq2seq4repair_space>on<seq2seq4repair_space>an<seq2seq4repair_space>oil" , "Step<seq2seq4repair_space>on<seq2seq4repair_space>a<seq2seq4repair_space>safezone" , "Step<seq2seq4repair_space>on<seq2seq4repair_space>a<seq2seq4repair_space>dangerzone" , "Collision" , "Finish<seq2seq4repair_space>game" } ; static int [ ] requiredInputsInt = new int [ ] { 0 , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 } ; static String [ ] optionsType = new String [ ] { "Program" , "Use-Case" , "Use-Case" , "Use-Case" , "Use-Case" , "Use-Case" , "Use-Case" , "Use-Case" , "Use-Case" , "Use-Case" } ; public static enum UseCaseType { New_game , Put_putty , Put_oil , Step_on_a_putty , Step_on_an_oil , Step_on_a_safezone , Step_on_a_dangerzone , Collision , Finish_game , Close_tester ; } public static Skeleton . UseCaseType currentUseCase = Skeleton . UseCaseType . New_game ; private static String getUseCaseOptions ( int i ) { <START_BUG> return Skeleton . useCaseOptions [ i ] ; <END_BUG> } private static String getUseCaseString ( Skeleton . UseCaseType us ) { } private static Skeleton . UseCaseType getUseCaseType ( int i ) { } public static void main ( String [ ] args ) { } private static void insertSpace ( ) { } public static void drawLine ( ) { } public static int printMenuItems ( ) { } private static StackTraceElement [ ] cFunctions = Thread . currentThread ( ) . getStackTrace ( ) ; private static String getlcClassName ( ) { } public static String getClassName ( Object o ) { } private static String getlcMethodName ( ) { } private static int getCallDepth ( ) { } private static String pullLineIn ( ) { } public static void printLastCalledFunction ( String id , String [ ] parameters ) { } public static void printLastCalledFunction ( String id ) { } public static void printOutINFO ( String s ) { } public static void printOutDEBUG ( String s ) { } public static int requestUserInput ( String [ ] description , int [ ] requiredInputs , String [ ] optionsType ) throws Exception { } }

Fix:
return Skeleton . useCaseOptions [ Math . max ( i , 0 ) ] ;
Buggy code:
public abstract class AutoCompleteBehavior extends AbstractAutoCompleteBehavior { private static final long serialVersionUID = 1L ; private final IAutoCompleteRenderer renderer ; public AutoCompleteBehavior ( IAutoCompleteRenderer renderer ) { } protected final void onRequest ( final String val , RequestCycle requestCycle ) { IRequestTarget target = new IRequestTarget ( ) { public void respond ( RequestCycle requestCycle ) { Response r = requestCycle . getResponse ( ) ; Iterator comps = getChoices ( val ) ; renderer . renderHeader ( r ) ; while ( comps . hasNext ( ) ) { final Object comp = comps . next ( ) ; <START_BUG> renderer . render ( comp , r ) ; <END_BUG> } renderer . renderFooter ( r ) ; } public void detach ( RequestCycle requestCycle ) { } public Object getLock ( RequestCycle requestCycle ) { return requestCycle . getSession ( ) ; } } ; requestCycle . setRequestTarget ( target ) ; } protected abstract Iterator getChoices ( String input ) { } }

Fix:
renderer . render ( comp , r , val ) ;
Buggy code:
public abstract class MQTTBaseTest extends CamelTestSupport { protected static final Logger LOG = LoggerFactory . getLogger ( MQTTBaseTest . class ) ; protected static final String TEST_TOPIC = "ComponentTestTopic" ; protected static final String TEST_TOPIC_2 = "AnotherTestTopic" ; protected static final String TEST_TOPICS = ( ( MQTTBaseTest . TEST_TOPIC ) + "," ) + ( MQTTBaseTest . TEST_TOPIC_2 ) ; protected BrokerService brokerService ; protected int numberOfMessages = 100 ; public void setUp ( ) throws Exception { brokerService = new BrokerService ( ) ; brokerService . setPersistent ( false ) ; brokerService . setAdvisorySupport ( false ) ; <START_BUG> brokerService . addConnector ( "mqtt:////localhost:1883" ) ; <END_BUG> brokerService . start ( ) ; super . setUp ( ) ; } public void tearDown ( ) throws Exception { } }

Fix:
brokerService . addConnector ( "mqtt:////127.0.0.1:1883" ) ;
Buggy code:
public class LongKeyAnalyzer extends AbstractKeyAnalyzer < Long > { private static final long serialVersionUID = - 4119639247588227409L ; public static final LongKeyAnalyzer INSTANCE = new LongKeyAnalyzer ( ) ; public static final int LENGTH = Long . SIZE ; private static final long MSB = - 9223372036854775808L ; private static long mask ( final int bit ) { } public int bitsPerElement ( ) { } public int lengthInBits ( final Long key ) { } public boolean isBitSet ( final Long key , final int bitIndex , final int lengthInBits ) { <START_BUG> return ( key & ( LongKeyAnalyzer . mask ( bitIndex ) ) ) != 0 ; <END_BUG> } public int bitIndex ( final Long key , final int offsetInBits , final int lengthInBits , final Long other , final int otherOffsetInBits , final int otherLengthInBits ) { } public boolean isPrefix ( final Long prefix , final int offsetInBits , final int lengthInBits , final Long key ) { } }

Fix:
return ( ( key . longValue ( ) ) & ( LongKeyAnalyzer . mask ( bitIndex ) ) ) != 0 ;
Buggy code:
public abstract class TemplatePage extends WicketExamplePage { private String pageTitle = "(no<seq2seq4repair_space>title)" ; private Banner currentBanner ; public TemplatePage ( ) { } public final String getPageTitle ( ) { } <START_BUG> public final void setPageTitle ( String title ) { <END_BUG> this . pageTitle = title ; } @ Override public boolean isVersioned ( ) { } }

Fix:
public final void setPageTitle ( final String title ) {
Buggy code:
class OptionWriter { private final Object optionSource ; private final BindStatus bindStatus ; private final String valueProperty ; private final String labelProperty ; private final boolean htmlEscape ; public OptionWriter ( Object optionSource , BindStatus bindStatus , String valueProperty , String labelProperty , boolean htmlEscape ) { } public void writeOptions ( TagWriter tagWriter ) throws JspException { if ( this . optionSource . getClass ( ) . isArray ( ) ) { renderFromArray ( tagWriter ) ; } else if ( ( this . optionSource ) instanceof Collection ) { renderFromCollection ( tagWriter ) ; } else if ( ( this . optionSource ) instanceof Map ) { renderFromMap ( tagWriter ) ; } else <START_BUG> if ( ( ( this . optionSource ) instanceof Class ) && ( this . optionSource . getClass ( ) . isEnum ( ) ) ) { <END_BUG> renderFromEnum ( tagWriter ) ; } else { throw new JspException ( ( ( "Type<seq2seq4repair_space>[" + ( this . optionSource . getClass ( ) . getName ( ) ) ) + "]<seq2seq4repair_space>is<seq2seq4repair_space>not<seq2seq4repair_space>valid<seq2seq4repair_space>for<seq2seq4repair_space>option<seq2seq4repair_space>items" ) ) ; } } private void renderFromArray ( TagWriter tagWriter ) throws JspException { } private void renderFromMap ( TagWriter tagWriter ) throws JspException { } private void renderFromCollection ( TagWriter tagWriter ) throws JspException { } private void renderFromEnum ( TagWriter tagWriter ) throws JspException { } private void doRenderFromCollection ( Collection optionCollection , TagWriter tagWriter ) throws JspException { } private void renderOption ( TagWriter tagWriter , Object item , Object value , Object label ) throws JspException { } private String getDisplayString ( Object value ) { } private boolean isOptionSelected ( Object resolvedValue ) { } protected boolean isOptionDisabled ( ) throws JspException { } protected void writeCommonAttributes ( TagWriter tagWriter ) throws JspException { } }

Fix:
if ( ( ( this . optionSource ) instanceof Class ) && ( ( ( Class ) ( this . optionSource ) ) . isEnum ( ) ) ) {
Buggy code:
public class AtAjLTWTests extends XMLBasedAjcTestCase { public static Test suite ( ) { } protected File getSpecFile ( ) { } public void testRunThemAllWithJavacCompiledAndLTW ( ) { } public void testAjcLTWPerClauseTest_XnoWeave ( ) { } public void testAjcLTWPerClauseTest_Xreweavable ( ) { } public void testJavaCAjcLTWPerClauseTest ( ) { } public void testAjcLTWAroundInlineMungerTest_XnoWeave ( ) { } public void testAjcLTWAroundInlineMungerTest_Xreweavable ( ) { <START_BUG> runTest ( "AjcLTW<seq2seq4repair_space>AroundInlineMungerTest<seq2seq4repair_space>-Xreweavable" ) ; <END_BUG> } public void testAjcLTWAroundInlineMungerTest ( ) { } public void testAjcLTWAroundInlineMungerTest_XnoInline_Xreweavable ( ) { } public void testAjcLTWAroundInlineMungerTest2 ( ) { } public void testLTWDump ( ) { } public void testAjcAspect1LTWAspect2_Xreweavable ( ) { } public void testLTWLog ( ) { } public void testLTWUnweavable ( ) { } }

Fix:
runTest ( "AjcLTW<seq2seq4repair_space>AroundInlineMungerTest" ) ;
Buggy code:
public class GameRule implements GPSRule { private int color ; private int row ; private int col ; public GameRule ( int color , int row , int col ) { } @ Override public Integer getCost ( ) { } @ Override public String getName ( ) { } @ Override public GPSState evalRule ( GPSState state ) throws NotAppliableException { } private void isAppliable ( GameState gameState ) throws NotAppliableException { } private boolean isOcuppied ( GameState state ) { } private void blockOtherTailInRow ( GameState state ) throws NotAppliableException { } private GameRule getPairRule ( GameRule r ) { } private int [ ] [ ] copyBoard ( int [ ] [ ] board ) { } private void blockOtherTailInCol ( GameState state ) throws NotAppliableException { } private GameRule getRedRulesForTile ( int r , int col ) { } private boolean isColorFull ( GameState state ) { } private boolean hasThreeAdjacentTiles ( GameState state ) { int [ ] [ ] board = state . getBoard ( ) ; int top = 0 ; for ( int i = 1 ; i < 3 ; i ++ ) { if ( ( ( getRow ( ) ) - i ) >= 0 ) { if ( ( board [ ( ( getRow ( ) ) - i ) ] [ getCol ( ) ] ) == ( getColor ( ) ) ) { top ++ ; } } } if ( top == 2 ) return true ; int bottom = 0 ; for ( int i = 1 ; i < 3 ; i ++ ) { if ( ( ( getRow ( ) ) + i ) < ( state . getSize ( ) ) ) { if ( ( board [ ( ( getRow ( ) ) + i ) ] [ getCol ( ) ] ) == ( getColor ( ) ) ) { bottom ++ ; } } } if ( bottom == 2 ) return true ; int right = 0 ; for ( int i = 1 ; i < 3 ; i ++ ) { if ( ( ( getCol ( ) ) + i ) < ( state . getSize ( ) ) ) { if ( ( board [ getRow ( ) ] [ ( ( getCol ( ) ) + i ) ] ) == ( getColor ( ) ) ) { right ++ ; } } } if ( right == 2 ) return true ; int left = 0 ; for ( int i = 1 ; i < 3 ; i ++ ) { if ( ( ( getCol ( ) ) - i ) >= 0 ) { <START_BUG> if ( ( board [ getRow ( ) ] [ ( ( getCol ( ) ) - 1 ) ] ) == ( getColor ( ) ) ) { <END_BUG> left ++ ; } } } if ( left == 2 ) return true ; if ( ( ( ( getRow ( ) ) - 1 ) >= 0 ) && ( ( ( getRow ( ) ) + 1 ) < ( state . getSize ( ) ) ) ) { if ( ( ( board [ ( ( getRow ( ) ) - 1 ) ] [ getCol ( ) ] ) == ( getColor ( ) ) ) && ( ( board [ ( ( getRow ( ) ) + 1 ) ] [ getCol ( ) ] ) == ( getColor ( ) ) ) ) { return true ; } } if ( ( ( ( getCol ( ) ) - 1 ) >= 0 ) && ( ( ( getCol ( ) ) + 1 ) < ( state . getSize ( ) ) ) ) { if ( ( ( board [ getRow ( ) ] [ ( ( getCol ( ) ) - 1 ) ] ) == ( getColor ( ) ) ) && ( ( board [ getRow ( ) ] [ ( ( getCol ( ) ) + 1 ) ] ) == ( getColor ( ) ) ) ) { return true ; } } return false ; } private boolean filledRowOrCol ( GameState state ) { } public int getColor ( ) { } public int getRow ( ) { } public int getCol ( ) { } }

Fix:
if ( ( board [ getRow ( ) ] [ ( ( getCol ( ) ) - i ) ] ) == ( getColor ( ) ) ) {
Buggy code:
public class MoveDownAction extends AbstractColumbaAction implements SelectionListener { public MoveDownAction ( FrameMediator frameMediator ) { } public void actionPerformed ( ActionEvent arg0 ) { } public void selectionChanged ( SelectionChangedEvent e ) { if ( ( ( ( org . columba . mail . gui . tree . selection . TreeSelectionChangedEvent ) ( e ) ) . getSelected ( ) . length ) > 0 ) { AbstractFolder folder = ( ( org . columba . mail . gui . tree . selection . TreeSelectionChangedEvent ) ( e ) ) . getSelected ( ) [ 0 ] ; if ( ( folder != null ) && ( folder instanceof MessageFolder ) ) { <START_BUG> FolderItem item = folder . getFolderItem ( ) ; <END_BUG> if ( item . get ( "property" , "accessrights" ) . equals ( "user" ) ) { int index = folder . getParent ( ) . getIndex ( folder ) ; if ( index < ( ( folder . getParent ( ) . getChildCount ( ) ) - 1 ) ) { setEnabled ( true ) ; } else { setEnabled ( false ) ; } } else { setEnabled ( false ) ; } } } else { setEnabled ( false ) ; } } }

Fix:
FolderItem item = folder . getConfiguration ( ) ;
Buggy code:
class PrefixCodedTerms implements Iterable < Term > { final RAMFile buffer ; private PrefixCodedTerms ( RAMFile buffer ) { } public long getSizeInBytes ( ) { } public Iterator < Term > iterator ( ) { } class PrefixCodedTermsIterator implements Iterator < Term > { final IndexInput input ; String field = "" ; BytesRef bytes = new BytesRef ( ) ; Term term = new Term ( field , bytes ) ; PrefixCodedTermsIterator ( ) { } public boolean hasNext ( ) { } public Term next ( ) { } public void remove ( ) { } } public static class Builder { private RAMFile buffer = new RAMFile ( ) ; private RAMOutputStream output = new RAMOutputStream ( buffer ) ; private Term lastTerm = new Term ( "" ) ; public void add ( Term term ) { assert ( lastTerm . equals ( new Term ( "" ) ) ) || ( ( term . compareTo ( lastTerm ) ) > 0 ) ; try { int prefix = sharedPrefix ( lastTerm . bytes , term . bytes ) ; int suffix = ( term . bytes . length ) - prefix ; if ( term . field . equals ( lastTerm . field ) ) { output . writeVInt ( ( prefix << 1 ) ) ; } else { output . writeVInt ( ( ( prefix << 1 ) | 1 ) ) ; output . writeString ( term . field ) ; } output . writeVInt ( suffix ) ; output . writeBytes ( term . bytes . bytes , ( ( term . bytes . offset ) + prefix ) , suffix ) ; <START_BUG> lastTerm . bytes . copy ( term . bytes ) ; <END_BUG> lastTerm . field = term . field ; } catch ( IOException e ) { throw new RuntimeException ( e ) ; } } public PrefixCodedTerms finish ( ) { } private int sharedPrefix ( BytesRef term1 , BytesRef term2 ) { } } }

Fix:
lastTerm . bytes . copyBytes ( term . bytes ) ;
Buggy code:
public class WeatherUtilities { private static String checkLanguageSuport ( String language ) { } public static String getAQISource ( String paramString ) { } public static int getAnimationType ( String weatherStr ) { <START_BUG> Integer type = - 1 ; <END_BUG> String [ ] strs = weatherStr . split ( "转" ) ; if ( ( strs . length ) > 1 ) { String [ ] arrayOfString3 = strs [ 0 ] . split ( "到" ) ; if ( ( arrayOfString3 . length ) > 1 ) type = WEATHER_ANIMATION_MAP . get ( arrayOfString3 [ 1 ] ) ; else { type = WEATHER_ANIMATION_MAP . get ( strs [ 0 ] ) ; } } else { String [ ] arrayOfString2 = weatherStr . split ( "到" ) ; if ( ( arrayOfString2 . length ) > 1 ) type = WEATHER_ANIMATION_MAP . get ( arrayOfString2 [ 1 ] ) ; else type = WEATHER_ANIMATION_MAP . get ( weatherStr ) ; } return type ; } public static int getAqi ( String aqiStr ) { } public static String getAqiDesc ( int aqiLevel , String language ) { } public static String getAqiLevel ( int aqiLevel , String language ) { } public static String getChina ( String paramString ) { } public static int getHumidity ( String humidity ) { } public static String getIndexDesc ( String indexTitle , String indexType , String language ) { } public static String getIndexDetail ( String paramString1 , String paramString2 , String language ) { } public static String getIndexTitle ( String indexTitleKey , String language ) { } public static Integer getIndexType ( String indexTypeKey ) { } public static int getIntFromJSON ( JSONObject jsonObject , String paramString ) { } public static String getWeather ( String weatherStr ) { } public static WeatherUtilities . WeatherName getWeatherName ( String weatherStr , String language ) { } public static String getWind ( String windStr , String language ) { } public static String getWind ( String fx , String fl , String language ) { } public static String getWindIndexDetail ( String windIndex , String language ) { } public static class WeatherName { String from ; String name ; String to ; public String getFrom ( ) { } public String getName ( ) { } public String getTo ( ) { } public void setFrom ( String paramString ) { } public void setName ( String paramString ) { } public void setTo ( String paramString ) { } } No newline ; at end ; of file ; }

Fix:
int type = - 1 ;
Buggy code:
public class TestFieldInfos extends TestCase { private Document testDoc = new Document ( ) ; public TestFieldInfos ( String s ) { } protected void setUp ( ) { } protected void tearDown ( ) { } public void test ( ) { assertTrue ( ( ( testDoc ) != null ) ) ; FieldInfos fieldInfos = new FieldInfos ( ) ; fieldInfos . add ( testDoc ) ; <START_BUG> assertTrue ( ( ( fieldInfos . size ( ) ) == 7 ) ) ; <END_BUG> RAMDirectory dir = new RAMDirectory ( ) ; String name = "testFile" ; IndexOutput output = dir . createOutput ( name ) ; assertTrue ( ( output != null ) ) ; try { fieldInfos . write ( output ) ; output . close ( ) ; assertTrue ( ( ( output . length ( ) ) > 0 ) ) ; FieldInfos readIn = new FieldInfos ( dir , name ) ; assertTrue ( ( ( fieldInfos . size ( ) ) == ( readIn . size ( ) ) ) ) ; FieldInfo info = readIn . fieldInfo ( "textField1" ) ; assertTrue ( ( info != null ) ) ; assertTrue ( ( ( info . storeTermVector ) == false ) ) ; info = readIn . fieldInfo ( "textField2" ) ; assertTrue ( ( info != null ) ) ; assertTrue ( ( ( info . storeTermVector ) == true ) ) ; dir . close ( ) ; } catch ( IOException e ) { assertTrue ( false ) ; } } }

Fix:
assertTrue ( ( ( fieldInfos . size ( ) ) == 6 ) ) ;
Buggy code:
public class InOutLogDAO extends BaseDAO { public void create ( final InOutLogItem inoutLogItem ) { } public List < InOutLogItem > getLogList ( long projectID , long componentID ) { } public void deleteAllLog ( long projectID ) { <START_BUG> jdbcTemplate . execute ( sqlManager . getSQL ( "InOutLogDAO//ClearLog" , projectID ) ) ; <END_BUG> } }

Fix:
this . transactionExecute ( sqlManager . getSQL ( "InOutLogDAO//ClearLog" , projectID ) ) ;
Buggy code:
public abstract class Device implements Drawable { public static boolean DEBUG ; boolean debug = Device . DEBUG ; boolean tracking = Device . DEBUG ; Error [ ] errors ; Object [ ] objects ; public int hPalette = 0 ; int [ ] colorRefCount ; int systemFont ; int nFonts = 256 ; LOGFONT [ ] logFonts ; TEXTMETRIC metrics ; int [ ] pixels ; int [ ] scripts ; int [ ] gdipToken ; boolean disposed ; static final Object CREATE_LOCK = new Object ( ) ; protected static Device CurrentDevice ; protected static Runnable DeviceFinder ; static synchronized Device getDevice ( ) { } public Device ( ) { } public Device ( DeviceData data ) { } protected void checkDevice ( ) { } void checkGDIP ( ) { } protected void create ( DeviceData data ) { } int computePixels ( int height ) { } int computePoints ( LOGFONT logFont , int hFont ) { } protected void destroy ( ) { } public void dispose ( ) { } void dispose_Object ( Object object ) { } int EnumFontFamProc ( int lpelfe , int lpntme , int FontType , int lParam ) { } public Rectangle getBounds ( ) { } public DeviceData getDeviceData ( ) { } public Rectangle getClientArea ( ) { } public int getDepth ( ) { } public Point getDPI ( ) { } public FontData [ ] getFontList ( String faceName , boolean scalable ) { } String getLastError ( ) { } String getLastErrorText ( ) { } public Color getSystemColor ( int id ) { } public Font getSystemFont ( ) { } public boolean getWarnings ( ) { } protected void init ( ) { } public abstract int internal_new_GC ( GCData data ) { } public abstract void internal_dispose_GC ( int hDC , GCData data ) { } public boolean isDisposed ( ) { } void new_Object ( Object object ) { } protected void release ( ) { if ( ( gdipToken ) != null ) { <START_BUG> Gdip . GdiplusShutdown ( gdipToken ) ; <END_BUG> } gdipToken = null ; scripts = null ; if ( ( hPalette ) != 0 ) OS . DeleteObject ( hPalette ) ; hPalette = 0 ; colorRefCount = null ; logFonts = null ; nFonts = 0 ; } public void setWarnings ( boolean warnings ) { } }

Fix:
Gdip . GdiplusShutdown ( gdipToken [ 0 ] ) ;
Buggy code:
public class ButtonTableCell < S , T > extends TableCell < S , T > { private Button button = new Button ( "..." ) ; private ButtonCommand command ; public ButtonTableCell ( ButtonCommand command ) { } @ Override protected void updateItem ( T item , boolean empty ) { <START_BUG> if ( ( ! empty ) && ( item != null ) ) { <END_BUG> super . updateItem ( item , empty ) ; setGraphic ( button ) ; button . setOnAction ( ( ActionEvent event ) -> { try { if ( ( ( getTableRow ( ) . getIndex ( ) ) < 0 ) || ( ( getTableRow ( ) . getIndex ( ) ) >= ( getTableView ( ) . getItems ( ) . size ( ) ) ) ) return ; command . setData ( item ) ; command . execute ( event ) ; Object t = command . getData ( ) ; if ( t == null ) return ; S s = ( ( S ) ( getTableRow ( ) . getItem ( ) ) ) ; final String propName = ( ( PropertyValueFactory ) ( getTableColumn ( ) . getCellValueFactory ( ) ) ) . getProperty ( ) ; String methodName = ( "set" + ( propName . toUpperCase ( ) . charAt ( 0 ) ) ) + ( propName . substring ( 1 ) ) ; Method method = s . getClass ( ) . getDeclaredMethod ( methodName , t . getClass ( ) ) ; method . invoke ( s , t ) ; updateIndex ( getIndex ( ) ) ; DataLoader . getDataBaseService ( ) . getServiceByObjectType ( s ) . getRepository ( ) . save ( s ) ; } catch ( NoSuchMethodException | SecurityException | IllegalAccessException | IllegalArgumentException | InvocationTargetException ex ) { Logger . getLogger ( ButtonTableCell . class . getName ( ) ) . log ( Level . SEVERE , null , ex ) ; } } ) ; } } No newline ; at end ; of file ; }

Fix:
if ( ! empty ) {
Buggy code:
public class CommandCompleter implements CommandLineCompleter { private final CommandRegistry cmdRegistry ; private final CommandCandidatesProvider cmdProvider ; public CommandCompleter ( CommandRegistry cmdRegistry ) { } @ Override public int complete ( CommandContext ctx , String buffer , int cursor , List < String > candidates ) { if ( buffer . isEmpty ( ) ) { for ( String cmd : cmdRegistry . getTabCompletionCommands ( ) ) { CommandHandler handler = cmdRegistry . getCommandHandler ( cmd ) ; if ( handler . isAvailable ( ctx ) ) { candidates . add ( cmd ) ; } } Collections . sort ( candidates ) ; return 0 ; } final DefaultCallbackHandler parsedCmd = ( ( DefaultCallbackHandler ) ( ctx . getParsedCommandLine ( ) ) ) ; try { <START_BUG> parsedCmd . parse ( ctx . getPrefix ( ) , buffer , false ) ; <END_BUG> } catch ( CommandFormatException e ) { if ( ( ! ( parsedCmd . endsOnAddressOperationNameSeparator ( ) ) ) || ( ! ( parsedCmd . endsOnSeparator ( ) ) ) ) { return - 1 ; } } OperationCandidatesProvider candidatesProvider = cmdProvider ; if ( ! ( buffer . isEmpty ( ) ) ) { int cmdFirstIndex = 0 ; while ( cmdFirstIndex < ( buffer . length ( ) ) ) { final char ch = buffer . charAt ( ( cmdFirstIndex ++ ) ) ; if ( ! ( Character . isWhitespace ( ch ) ) ) { if ( ( ( ch == '.' ) || ( ch == ':' ) ) || ( ch == '//' ) ) { candidatesProvider = ctx . getOperationCandidatesProvider ( ) ; } break ; } } } return INSTANCE . complete ( ctx , parsedCmd , candidatesProvider , buffer , cursor , candidates ) ; } }

Fix:
parsedCmd . parse ( ctx . getCurrentNodePath ( ) , buffer , false ) ;
Buggy code:
public class ComponentConfiguratorProcessor implements DeploymentUnitProcessor { public void deploy ( DeploymentPhaseContext phaseContext ) throws DeploymentUnitProcessingException { final DeploymentUnit deploymentUnit = phaseContext . getDeploymentUnit ( ) ; final EEModuleDescription moduleDescription = deploymentUnit . getAttachment ( EE_MODULE_DESCRIPTION ) ; if ( moduleDescription == null ) { return ; } final EEModuleConfiguration moduleConfiguration = deploymentUnit . getAttachment ( EE_MODULE_CONFIGURATION ) ; if ( moduleConfiguration == null ) { throw new DeploymentUnitProcessingException ( "EE<seq2seq4repair_space>module<seq2seq4repair_space>description<seq2seq4repair_space>found,<seq2seq4repair_space>but<seq2seq4repair_space>no<seq2seq4repair_space>module<seq2seq4repair_space>configuration<seq2seq4repair_space>attached<seq2seq4repair_space>to<seq2seq4repair_space>the<seq2seq4repair_space>deployment." ) ; } final Collection < ComponentDescription > componentDescriptions = moduleDescription . getComponentDescriptions ( ) ; if ( componentDescriptions != null ) for ( ComponentDescription componentDescription : componentDescriptions ) { <START_BUG> final ComponentConfiguration componentConfiguration = new ComponentConfiguration ( componentDescription , moduleConfiguration . getClassConfiguration ( componentDescription . getComponentClassName ( ) ) ) ; <END_BUG> for ( ComponentConfigurator componentConfigurator : componentDescription . getConfigurators ( ) ) { componentConfigurator . configure ( phaseContext , componentDescription , componentConfiguration ) ; } moduleConfiguration . addComponentConfiguration ( componentConfiguration ) ; } } public void undeploy ( DeploymentUnit context ) { } }

Fix:
final ComponentConfiguration componentConfiguration = componentDescription . createConfiguration ( moduleConfiguration ) ;
Buggy code:
public class Zonation { private int zoneCount ; private Map < Unit , Zone > unitToZone ; public Zonation ( StmtBody body ) { } private void addTrapBoundary ( Unit unit , Trap t , Map < Unit , List < Trap > > unitToTrapBoundaries ) { <START_BUG> List < Trap > boundary = unitToTrapBoundaries . get ( t . getBeginUnit ( ) ) ; <END_BUG> if ( boundary == null ) { boundary = new ArrayList < Trap > ( ) ; unitToTrapBoundaries . put ( unit , boundary ) ; } boundary . add ( t ) ; } public Zone getZoneOf ( Unit u ) { } public int getZoneCount ( ) { } }

Fix:
List < Trap > boundary = unitToTrapBoundaries . get ( unit ) ;
Buggy code:
public class BranchLabel extends Label { public int [ ] forwardReferences = new int [ 10 ] ; public int forwardReferenceCount = 0 ; public int tagBits ; public static final int WIDE = 1 ; public static final int USED = 2 ; public BranchLabel ( ) { } public BranchLabel ( CodeStream codeStream ) { } void addForwardReference ( int pos ) { } public void appendForwardReferencesFrom ( BranchLabel otherLabel ) { } void branch ( ) { } void branchWide ( ) { this . tagBits |= BranchLabel . USED ; if ( ( position ) == ( Label . POS_NOT_SET ) ) { addForwardReference ( codeStream . position ) ; this . tagBits |= BranchLabel . WIDE ; codeStream . position += 4 ; codeStream . classFileOffset += 4 ; } else { <START_BUG> codeStream . writeWidePosition ( ( ( ( position ) - ( codeStream . position ) ) + 1 ) ) ; <END_BUG> } } public boolean hasForwardReferences ( ) { } public void initialize ( CodeStream stream ) { } public boolean isCaseLabel ( ) { } public boolean isStandardLabel ( ) { } public void place ( ) { } public String toString ( ) { } }

Fix:
codeStream . writeWidePosition ( this ) ;
Buggy code:
public class TreeController implements TreeWillExpandListener { private static final Logger LOG = Logger . getLogger ( "org.columba.mail.gui.tree" ) ; private TreeView folderTree ; private boolean b = false ; private TreePath treePath ; private FolderInfoPanel messageFolderInfoPanel ; public JScrollPane scrollPane ; private AbstractFolder oldSelection ; private FolderTreeMouseListener mouseListener ; private AbstractFolder selectedFolder ; private TreeModel model ; private TreeView view ; private FrameMediator frameController ; protected TreeMenu menu ; public TreeController ( FrameMediator frameController , TreeModel model ) { } public TreeModel getModel ( ) { } public TreeView getView ( ) { } public void setSelected ( MessageFolder folder ) { } public void createPopupMenu ( ) { } public JPopupMenu getPopupMenu ( ) { } public AbstractFolder getSelected ( ) { } public FrameMediator getFrameController ( ) { } public void treeWillExpand ( TreeExpansionEvent e ) throws ExpandVetoException { } public void treeWillCollapse ( TreeExpansionEvent e ) { } private void saveExpandedState ( AbstractFolder folder , TreePath path ) { <START_BUG> FolderItem item = folder . getFolderItem ( ) ; <END_BUG> XmlElement property = item . getElement ( "property" ) ; if ( ! ( getView ( ) . isExpanded ( path ) ) ) { property . addAttribute ( "expanded" , "true" ) ; } else { property . addAttribute ( "expanded" , "false" ) ; } } }

Fix:
FolderItem item = folder . getConfiguration ( ) ;