nus-yam/ex-repair huggingface dataset:
Buggy code:
public class LocationWrapper implements Serializable { private static final long serialVersionUID = 3605072683155274382L ; String world ; double x ; double y ; double z ; LocationWrapper ( String world , double x , double y , double z ) { } public LocationWrapper ( Location location ) { } Location getLoc ( ) { Server server = TeleportationRunes . getInstance ( ) . getServer ( ) ; <START_BUG> return new Location ( server . getWorld ( "world" ) , x , y , z ) ; <END_BUG> } String getWorldName ( ) { } }

Fix:
return new Location ( server . getWorld ( world ) , x , y , z ) ;
Buggy code:
class HornetQServerRemove implements OperationStepHandler { static final HornetQServerRemove INSTANCE = new HornetQServerRemove ( ) ; @ Override public void execute ( final OperationContext context , final ModelNode operation ) throws OperationFailedException { } static void removeHornetQServer ( String serverName , OperationContext context , Resource resource ) { final ServiceName hqServiceName = MessagingServices . getHornetQServiceName ( serverName ) ; for ( final Resource . ResourceEntry jmsQueue : resource . getChildren ( JMS_QUEUE ) ) { context . removeService ( JMSServices . getJmsQueueBaseServiceName ( hqServiceName ) . append ( jmsQueue . getName ( ) ) ) ; } for ( final Resource . ResourceEntry jmsTopic : resource . getChildren ( JMS_TOPIC ) ) { context . removeService ( JMSServices . getJmsTopicBaseServiceName ( hqServiceName ) . append ( jmsTopic . getName ( ) ) ) ; } for ( final Resource . ResourceEntry cf : resource . getChildren ( CONNECTION_FACTORY ) ) { context . removeService ( JMSServices . getConnectionFactoryBaseServiceName ( hqServiceName ) . append ( cf . getName ( ) ) ) ; } for ( final Resource . ResourceEntry pcf : resource . getChildren ( POOLED_CONNECTION_FACTORY ) ) { context . removeService ( hqServiceName . append ( JMSServices . getPooledConnectionFactoryBaseServiceName ( hqServiceName ) ) . append ( pcf . getName ( ) ) ) ; } for ( final Resource . ResourceEntry queue : resource . getChildren ( QUEUE ) ) { context . removeService ( hqServiceName . append ( MessagingServices . getQueueBaseServiceName ( hqServiceName ) ) . append ( queue . getName ( ) ) ) ; } context . removeService ( JMSServices . getJmsManagerBaseServiceName ( hqServiceName ) ) ; context . removeService ( MessagingServices . getHornetQServiceName ( serverName ) ) ; for ( final Resource . ResourceEntry broadcastGroup : resource . getChildren ( BROADCAST_GROUP ) ) { context . removeService ( GroupBindingService . getBroadcastBaseServiceName ( hqServiceName ) . append ( broadcastGroup . getName ( ) ) ) ; } for ( final Resource . ResourceEntry divertGroup : resource . getChildren ( DISCOVERY_GROUP ) ) { context . removeService ( GroupBindingService . getDiscoveryBaseServiceName ( hqServiceName ) . append ( divertGroup . getName ( ) ) ) ; } context . removeService ( hqServiceName . append ( PATH_BASE ) . append ( DEFAULT_BINDINGS_DIR ) ) ; context . removeService ( hqServiceName . append ( PATH_BASE ) . append ( DEFAULT_JOURNAL_DIR ) ) ; <START_BUG> context . removeService ( hqServiceName . append ( PATH_BASE ) . append ( DEFAULT_LARGE_MESSSAGE_DIR ) ) ; <END_BUG> context . removeService ( hqServiceName . append ( PATH_BASE ) . append ( DEFAULT_PAGING_DIR ) ) ; } }

Fix:
context . removeService ( hqServiceName . append ( PATH_BASE ) . append ( DEFAULT_LARGE_MESSAGE_DIR ) ) ;
Buggy code:
public class Container { private String name ; private int height ; private boolean wasUsed ; public Container ( String name ) { } public void setUsed ( boolean used ) { } public void setHeight ( int height ) { } public boolean WasUsed ( ) { } public int getHeight ( ) { } public String getName ( ) { } @ Override public String toString ( ) { <START_BUG> return ( ( getHeight ( ) ) + "," ) + ( WasUsed ( ) ) ; <END_BUG> } }

Fix:
return ( ( ( getHeight ( ) ) + "," ) + ( WasUsed ( ) ) ) + "," ;
Buggy code:
public class KohaLookupUserService implements LookupUserService { @ Override public LookupUserResponseData performService ( LookupUserInitiationData initData , ServiceContext serviceContext , RemoteServiceManager serviceManager ) throws ServiceException { final LookupUserResponseData responseData = new LookupUserResponseData ( ) ; KohaRemoteServiceManager kohaRemoteServiceManager = ( ( KohaRemoteServiceManager ) ( serviceManager ) ) ; try { <START_BUG> if ( ( initData . getAuthenticationInputs ( ) ) != null ) { <END_BUG> processAuthInput ( initData , kohaRemoteServiceManager , responseData ) ; } else { if ( ( ( initData . getUserId ( ) ) == null ) || ( initData . getUserId ( ) . getUserIdentifierValue ( ) . trim ( ) . isEmpty ( ) ) ) { responseData . setProblems ( Arrays . asList ( new Problem ( new ProblemType ( "UserId<seq2seq4repair_space>is<seq2seq4repair_space>undefined." ) , null , null , "Cannot<seq2seq4repair_space>lookup<seq2seq4repair_space>unkown<seq2seq4repair_space>user<seq2seq4repair_space>.." ) ) ) ; } else { JSONObject kohaUser = kohaRemoteServiceManager . lookupUser ( initData ) ; updateResponseData ( initData , responseData , kohaUser , kohaRemoteServiceManager ) ; } } } catch ( MalformedURLException mue ) { Problem p = new Problem ( new ProblemType ( "Processing<seq2seq4repair_space>MalformedURLException<seq2seq4repair_space>error." ) , null , mue . getMessage ( ) ) ; responseData . setProblems ( Arrays . asList ( p ) ) ; } catch ( IOException ie ) { Problem p = new Problem ( new ProblemType ( "Processing<seq2seq4repair_space>IOException<seq2seq4repair_space>error." ) , ie . getMessage ( ) , "Are<seq2seq4repair_space>you<seq2seq4repair_space>connected<seq2seq4repair_space>to<seq2seq4repair_space>the<seq2seq4repair_space>Internet//Intranet?" ) ; responseData . setProblems ( Arrays . asList ( p ) ) ; } catch ( SAXException se ) { Problem p = new Problem ( new ProblemType ( "Processing<seq2seq4repair_space>SAXException<seq2seq4repair_space>error." ) , null , se . getMessage ( ) ) ; responseData . setProblems ( Arrays . asList ( p ) ) ; } catch ( KohaException ke ) { Problem p = new Problem ( new ProblemType ( ke . getShortMessage ( ) ) , null , ke . getMessage ( ) ) ; responseData . setProblems ( Arrays . asList ( p ) ) ; } catch ( Exception e ) { Problem p = new Problem ( new ProblemType ( "Unknown<seq2seq4repair_space>processing<seq2seq4repair_space>exception<seq2seq4repair_space>error." ) , null , e . getMessage ( ) ) ; responseData . setProblems ( Arrays . asList ( p ) ) ; } return responseData ; } private void processAuthInput ( LookupUserInitiationData initData , KohaRemoteServiceManager kohaRemoteServiceManager , LookupUserResponseData responseData ) throws IOException , MalformedURLException , URISyntaxException , ParseException , KohaException , SAXException { } private void updateResponseData ( LookupUserInitiationData initData , LookupUserResponseData responseData , JSONObject kohaUser , KohaRemoteServiceManager svcMgr ) throws ParseException { } }

Fix:
if ( ( ( initData . getAuthenticationInputs ( ) ) != null ) && ( ( initData . getAuthenticationInputs ( ) . size ( ) ) > 1 ) ) {
Buggy code:
public class TwitterRemoteServiceTest extends AbstractRestTestCase { private String username = System . getProperty ( "username" , "eclipsedummy" ) ; private String password = System . getProperty ( "password" , "eclipse" ) ; IContainer container ; IRemoteServiceRegistration registration ; protected void setUp ( ) throws Exception { container = createRestContainer ( TEST_TWITTER_TARGET ) ; IRestClientContainerAdapter adapter = ( ( IRestClientContainerAdapter ) ( getRestClientContainerAdapter ( container ) ) ) ; adapter . setConnectContextForAuthentication ( ConnectContextFactory . createUsernamePasswordConnectContext ( username , password ) ) ; <START_BUG> adapter . setRestResource ( createRestResource ( ) ) ; <END_BUG> List callables = new ArrayList ( ) ; callables . add ( new org . eclipse . ecf . remoteservice . rest . RestCallable ( "getUserStatuses" , "//statuses//user_timeline.json" , null , RequestType . GET ) ) ; registration = adapter . registerCallable ( new String [ ] { IUserTimeline . class . getName ( ) } , callables , null ) ; } protected void tearDown ( ) throws Exception { } private IRestResourceProcessor createRestResource ( ) { } public void testSyncCall ( ) { } public void testGetProxy ( ) { } public void testAsyncCall ( ) { } public void testAsyncCallWithListener ( ) throws Exception { } public void testProxyCall ( ) { } }

Fix:
adapter . setResourceProcessor ( createRestResource ( ) ) ;
Buggy code:
public class MessageSender implements Runnable { protected boolean running = true ; protected final ArrayList < String > messages = new ArrayList < String > ( ) ; private ServletResponse connection ; public synchronized void setConnection ( ServletResponse connection ) { } public void stop ( ) { } public void send ( String message ) { synchronized ( messages ) { <START_BUG> messages . add ( message ) ; <END_BUG> System . out . println ( ( "Message<seq2seq4repair_space>added<seq2seq4repair_space>#messages=" + ( messages . size ( ) ) ) ) ; messages . notify ( ) ; } } public void run ( ) { } No newline ; at end ; of file ; }

Fix:
messages . add ( 0 , message ) ;
Buggy code:
final class ExtensionRoleRegistry extends AbstractRoleRegistry { private IExtensionRegistry extensionRegistry ; private List roleActivityBindingDefinitions ; private List roleDefinitions ; ExtensionRoleRegistry ( IExtensionRegistry extensionRegistry ) { } private void load ( ) throws IOException { if ( ( roleActivityBindingDefinitions ) == null ) roleActivityBindingDefinitions = new ArrayList ( ) ; else roleActivityBindingDefinitions . clear ( ) ; if ( ( roleDefinitions ) == null ) roleDefinitions = new ArrayList ( ) ; else roleDefinitions . clear ( ) ; IConfigurationElement [ ] configurationElements = extensionRegistry . getConfigurationElementsFor ( PACKAGE_FULL ) ; for ( int i = 0 ; i < ( configurationElements . length ) ; i ++ ) { IConfigurationElement configurationElement = configurationElements [ i ] ; String name = configurationElement . getName ( ) ; <START_BUG> if ( TAG_ACTIVITY_BINDING . equals ( name ) ) <END_BUG> readRoleActivityBindingDefinition ( configurationElement ) ; else if ( TAG_ROLE . equals ( name ) ) readRoleDefinition ( configurationElement ) ; } boolean roleRegistryChanged = false ; if ( ! ( roleActivityBindingDefinitions . equals ( super . roleActivityBindingDefinitions ) ) ) { super . roleActivityBindingDefinitions = Collections . unmodifiableList ( roleActivityBindingDefinitions ) ; roleRegistryChanged = true ; } if ( ! ( roleDefinitions . equals ( super . roleDefinitions ) ) ) { super . roleDefinitions = Collections . unmodifiableList ( roleDefinitions ) ; roleRegistryChanged = true ; } if ( roleRegistryChanged ) fireRoleRegistryChanged ( ) ; } private String getPluginId ( IConfigurationElement configurationElement ) { } private void readRoleActivityBindingDefinition ( IConfigurationElement configurationElement ) { } private void readRoleDefinition ( IConfigurationElement configurationElement ) { } }

Fix:
if ( TAG_ROLE_ACTIVITY_BINDING . equals ( name ) )
Buggy code:
public abstract class AbstractCalendar extends WebComponent { public static final DateFormat FORMAT_DATE = new SimpleDateFormat ( "MM//dd//yyyy" ) ; public static final DateFormat FORMAT_PAGEDATE = new SimpleDateFormat ( "MM//yyyy" ) ; private static final long serialVersionUID = 1L ; private final boolean contributeDependencies ; public AbstractCalendar ( String id ) { } public AbstractCalendar ( String id , boolean contributeDependencies ) { } public final String getJavascriptId ( ) { } public final String getJavascriptWidgetId ( ) { } private void contributeDependencies ( IHeaderResponse response ) { <START_BUG> response . renderJavascriptReference ( new PackageResourceReference ( YuiLib . class , "yahoo-dom-event//yahoo-dom-event.js" ) ) ; <END_BUG> response . renderJavascriptReference ( new PackageResourceReference ( AbstractCalendar . class , "calendar-min.js" ) ) ; response . renderCSSReference ( new PackageResourceReference ( AbstractCalendar . class , "assets//skins//sam//calendar.css" ) ) ; } protected void appendToInit ( String markupId , String javascriptId , String javascriptWidgetId , StringBuffer b ) { } protected void configureWidgetProperties ( Map < Object , Object > widgetProperties ) { } @ Override public void renderHead ( IHeaderResponse response ) { } }

Fix:
response . renderJavascriptReference ( new PackageResourceReference ( YuiLib . class , "yahoodomevent//yahoo-dom-event.js" ) ) ;
Buggy code:
@ RunWith ( Arquillian . class ) public class OverlapTimerTestCase { @ Deployment public static Archive < ? > createDeployment ( ) { } @ Test public void testContinuedAfterOverlap ( ) throws Exception { Assert . assertTrue ( "Schedule<seq2seq4repair_space>timeout<seq2seq4repair_space>method<seq2seq4repair_space>was<seq2seq4repair_space>not<seq2seq4repair_space>invoked<seq2seq4repair_space>within<seq2seq4repair_space>3<seq2seq4repair_space>seconds!" , ScheduleRetryFailSingletonBean . startLatch ( ) . await ( 3 , TimeUnit . SECONDS ) ) ; <START_BUG> Assert . assertTrue ( "Schedule<seq2seq4repair_space>timer<seq2seq4repair_space>is<seq2seq4repair_space>not<seq2seq4repair_space>alive<seq2seq4repair_space>after<seq2seq4repair_space>overlapped<seq2seq4repair_space>invocation!" , ScheduleRetryFailSingletonBean . aliveLatch ( ) . await ( 4 , TimeUnit . SECONDS ) ) ; <END_BUG> } }

Fix:
Assert . assertTrue ( "Schedule<seq2seq4repair_space>timer<seq2seq4repair_space>is<seq2seq4repair_space>not<seq2seq4repair_space>alive<seq2seq4repair_space>after<seq2seq4repair_space>overlapped<seq2seq4repair_space>invocation!" , ScheduleRetryFailSingletonBean . aliveLatch ( ) . await ( 5 , TimeUnit . SECONDS ) ) ;
Buggy code:
public class FileVault { private static final String TAG = "FileVault" ; private static final String CIPHER_ALGORITHM = "AES" ; private static final String PASSWORD_HASH_ALGORITHM = "SHA-256" ; private static final String UTF8 = "UTF-8" ; private static final HashMap < String , Object > lockMap = new HashMap < String , Object > ( ) ; public static Object getLock ( final String key ) { } protected final Context context ; protected final String dataPassword ; protected final DataHandlerConfig config ; private final Key key ; public FileVault ( final Context context , final String dataPassword ) { } public String getPassword ( ) { } protected boolean canWriteToExternalStorage ( ) { } public File getLocalDirectory ( ) throws DataHandlerException { } public File getDirectory ( final File root , final String directoryName ) { } public Key buildKey ( ) { } private Cipher buildCipher ( int mode ) throws Exception { } public boolean isEncrypted ( ) { } public OutputStream openForWriting ( final File dataFile ) throws Exception { } public InputStream openForReading ( final File dataFile ) throws Exception { } public boolean isDueForUpload ( final File file ) { if ( file != null ) { String fileName = file . getName ( ) ; if ( fileName . contains ( JSON_FILE_SUFFIX ) ) { <START_BUG> String timeStr = fileName . substring ( 0 , fileName . indexOf ( ZIP_FILE_SUFFIX ) ) ; <END_BUG> long fileTimestamp = Long . parseLong ( timeStr ) ; long currTime = System . currentTimeMillis ( ) ; DataHandlerConfig config = DataHandlerConfig . getInstance ( ) ; long durationLimit = ( ( Long ) ( config . get ( DATA_LIFE_MILLIS , DEFAULT_FILE_LIFE_MILLIS ) ) ) ; if ( ( currTime - fileTimestamp ) > durationLimit ) { return true ; } } else if ( DataHandlerConfig . shouldLog ( ) ) { Log . d ( FileVault . TAG , ( fileName + ":<seq2seq4repair_space>not<seq2seq4repair_space>a<seq2seq4repair_space>.json<seq2seq4repair_space>file." ) ) ; } } return false ; } }

Fix:
String timeStr = fileName . substring ( 0 , fileName . indexOf ( JSON_FILE_SUFFIX ) ) ;
Buggy code:
public class BarChart extends XYChart { public static final String TYPE = "Bar" ; private static final int SHAPE_WIDTH = 12 ; protected BarChart . Type mType = BarChart . Type . DEFAULT ; public enum Type { DEFAULT , STACKED ; } BarChart ( ) { } public BarChart ( XYMultipleSeriesDataset dataset , XYMultipleSeriesRenderer renderer , BarChart . Type type ) { } @ Override protected ClickableArea [ ] clickableAreasForPoints ( float [ ] points , double [ ] values , float yAxisValue , int seriesIndex ) { } public void drawSeries ( Canvas canvas , Paint paint , float [ ] points , SimpleSeriesRenderer seriesRenderer , float yAxisValue , int seriesIndex ) { } protected void drawBar ( Canvas canvas , float xMin , float yMin , float xMax , float yMax , float halfDiffX , int seriesNr , int seriesIndex , Paint paint ) { } private void drawBar ( Canvas canvas , float xMin , float yMin , float xMax , float yMax , int scale , int seriesIndex , Paint paint ) { } private int getGradientPartialColor ( int minColor , int maxColor , float fraction ) { } protected void drawChartValuesText ( Canvas canvas , XYSeries series , SimpleSeriesRenderer renderer , Paint paint , float [ ] points , int seriesIndex ) { int seriesNr = mDataset . getSeriesCount ( ) ; float halfDiffX = getHalfDiffX ( points , points . length , seriesNr ) ; for ( int i = 0 ; i < ( points . length ) ; i += 2 ) { int index = i // 2 ; <START_BUG> if ( ( series . getY ( index ) ) != ( MathHelper . NULL_VALUE ) ) { <END_BUG> float x = points [ i ] ; if ( ( mType ) == ( BarChart . Type . DEFAULT ) ) { x += ( ( seriesIndex * 2 ) * halfDiffX ) - ( ( seriesNr - 1.5F ) * halfDiffX ) ; } drawText ( canvas , getLabel ( series . getY ( index ) ) , x , ( ( points [ ( i + 1 ) ] ) - ( renderer . getChartValuesSpacing ( ) ) ) , paint , 0 ) ; } } } public int getLegendShapeWidth ( int seriesIndex ) { } public void drawLegendShape ( Canvas canvas , SimpleSeriesRenderer renderer , float x , float y , int seriesIndex , Paint paint ) { } protected float getHalfDiffX ( float [ ] points , int length , int seriesNr ) { } protected float getCoeficient ( ) { } protected boolean isRenderNullValues ( ) { } public double getDefaultMinimum ( ) { } public String getChartType ( ) { } }

Fix:
if ( ! ( isNullValue ( series . getY ( index ) ) ) ) {
Buggy code:
public class Util { private static Logger getLogger ( ) { } public static void rename ( String from , String to ) throws RolloverFailure { File fromFile = new File ( from ) ; boolean success = false ; if ( fromFile . exists ( ) ) { File toFile = new File ( to ) ; <START_BUG> Util . getLogger ( ) . debug ( ( ( ( ( "Renaming<seq2seq4repair_space>file<seq2seq4repair_space>[" + fromFile ) + "]<seq2seq4repair_space>to<seq2seq4repair_space>[" ) + toFile ) + "]" ) ) ; <END_BUG> boolean result = fromFile . renameTo ( toFile ) ; if ( ! result ) { Logger logger = Util . getLogger ( ) ; logger . warn ( "Failed<seq2seq4repair_space>to<seq2seq4repair_space>rename<seq2seq4repair_space>file<seq2seq4repair_space>[{}]<seq2seq4repair_space>to<seq2seq4repair_space>[{}]." , fromFile , toFile ) ; logger . warn ( "Attemting<seq2seq4repair_space>to<seq2seq4repair_space>rename<seq2seq4repair_space>by<seq2seq4repair_space>copying." ) ; Util . renameByCopying ( from , to ) ; } } else { throw new RolloverFailure ( ( ( "File<seq2seq4repair_space>[" + from ) + "]<seq2seq4repair_space>does<seq2seq4repair_space>not<seq2seq4repair_space>exist." ) ) ; } } public static void renameByCopying ( String from , String to ) throws RolloverFailure { } }

Fix:
Util . getLogger ( ) . debug ( "Renaming<seq2seq4repair_space>file<seq2seq4repair_space>[{}<seq2seq4repair_space>to<seq2seq4repair_space>[{}]" , fromFile , toFile ) ;
Buggy code:
public class BoundedQueueThreadPoolMetricsHandler extends ThreadPoolMetricsHandler { public static final List < AttributeDefinition > METRICS = Arrays . asList ( CURRENT_THREAD_COUNT , LARGEST_THREAD_COUNT , REJECTED_COUNT , QUEUE_SIZE ) ; public BoundedQueueThreadPoolMetricsHandler ( final ServiceName serviceNameBase ) { } @ Override protected void setResult ( OperationContext context , final String attributeName , final Service < ? > service ) throws OperationFailedException { BoundedQueueThreadPoolService bounded = ( ( BoundedQueueThreadPoolService ) ( service ) ) ; if ( attributeName . equals ( CommonAttributes . CURRENT_THREAD_COUNT ) ) { context . getResult ( ) . set ( bounded . getCurrentThreadCount ( ) ) ; } else if ( attributeName . equals ( CommonAttributes . LARGEST_THREAD_COUNT ) ) { context . getResult ( ) . set ( bounded . getLargestThreadCount ( ) ) ; } else if ( attributeName . equals ( CommonAttributes . REJECTED_COUNT ) ) { context . getResult ( ) . set ( bounded . getRejectedCount ( ) ) ; } else if ( attributeName . equals ( CommonAttributes . QUEUE_SIZE ) ) { context . getResult ( ) . set ( bounded . getQueueSize ( ) ) ; } else { <START_BUG> throw ROOT_LOGGER . unsupportedBoundedQueueThreadPoolMetric ( attributeName ) ; <END_BUG> } } }

Fix:
throw MESSAGES . unsupportedBoundedQueueThreadPoolMetric ( attributeName ) ;
Buggy code:
public class RaAdd extends AbstractAddStepHandler { static final RaAdd INSTANCE = new RaAdd ( ) ; @ Override protected void populateModel ( ModelNode operation , ModelNode model ) throws OperationFailedException { } @ Override public void performRuntime ( final OperationContext context , ModelNode operation , ModelNode model , final ServiceVerificationHandler verificationHandler , final List < ServiceController < ? > > controllers ) throws OperationFailedException { final ModelNode address = operation . require ( OP_ADDR ) ; final String name = PathAddress . pathAddress ( address ) . getLastElement ( ) . getValue ( ) ; String archiveOrModuleName ; if ( model . get ( Constants . ARCHIVE . getName ( ) ) . isDefined ( ) ) { archiveOrModuleName = model . get ( Constants . ARCHIVE . getName ( ) ) . asString ( ) ; } else { archiveOrModuleName = model . get ( Constants . MODULE . getName ( ) ) . asString ( ) ; } if ( ( name . startsWith ( archiveOrModuleName ) ) && ( ( name . substring ( archiveOrModuleName . length ( ) ) . contains ( RA_SERVICE_NAME_SEPARATOR ) ) || ( name . equals ( archiveOrModuleName ) ) ) ) { archiveOrModuleName = name ; } else { Integer identifier = ConnectorServices . getResourceIdentifier ( archiveOrModuleName ) ; if ( ( identifier != null ) && ( identifier != 0 ) ) { archiveOrModuleName = ( archiveOrModuleName + ( ConnectorServices . RA_SERVICE_NAME_SEPARATOR ) ) + identifier ; } } if ( model . get ( Constants . ARCHIVE . getName ( ) ) . isDefined ( ) ) { model . get ( Constants . ARCHIVE . getName ( ) ) . set ( archiveOrModuleName ) ; } else { model . get ( Constants . MODULE . getName ( ) ) . set ( archiveOrModuleName ) ; } ModifiableResourceAdapter resourceAdapter = RaOperationUtil . buildResourceAdaptersObject ( context , operation , archiveOrModuleName ) ; if ( model . get ( Constants . ARCHIVE . getName ( ) ) . isDefined ( ) ) { RaOperationUtil . installRaServices ( context , verificationHandler , name , resourceAdapter ) ; } else { <START_BUG> RaOperationUtil . installRaServicesAndDeployFromModule ( context , verificationHandler , archiveOrModuleName , resourceAdapter , archiveOrModuleName ) ; <END_BUG> } } }

Fix:
RaOperationUtil . installRaServicesAndDeployFromModule ( context , verificationHandler , name , resourceAdapter , archiveOrModuleName ) ;
Buggy code:
public class TreeColumn extends Item { Tree parent ; boolean resizable ; boolean moveable ; public TreeColumn ( Tree parent , int style ) { } public TreeColumn ( Tree parent , int style , int index ) { } public void addControlListener ( ControlListener listener ) { } public void addSelectionListener ( SelectionListener listener ) { } static int checkStyle ( int style ) { } protected void checkSubclass ( ) { } public int getAlignment ( ) { } public boolean getMoveable ( ) { } String getNameText ( ) { } public Tree getParent ( ) { } public boolean getResizable ( ) { } public int getWidth ( ) { } public void pack ( ) { } void releaseChild ( ) { } void releaseWidget ( ) { super . releaseWidget ( ) ; <START_BUG> if ( ( parent . sortColumn ) == ( this ) ) { <END_BUG> parent . sortColumn = null ; } parent = null ; } public void removeControlListener ( ControlListener listener ) { } public void removeSelectionListener ( SelectionListener listener ) { } public void setAlignment ( int alignment ) { } public void setImage ( Image image ) { } void setImage ( Image image , boolean sort , boolean right ) { } public void setMoveable ( boolean moveable ) { } public void setResizable ( boolean resizable ) { } void setSortDirection ( int direction ) { } public void setText ( String string ) { } public void setWidth ( int width ) { } }

Fix:
if ( ( ( parent ) != null ) && ( ( parent . sortColumn ) == ( this ) ) ) {
Buggy code:
@ PrimaryType ( name = "tkn:gadgettoken" ) public abstract class GadgetTokenEntry { public BasicOAuthStoreTokenIndex getKey ( ) { } @ Property ( name = "userId" ) public abstract String getUserId ( ) { } public abstract void setUserId ( String userId ) { } @ Property ( name = "gadgetUri" ) public abstract String getGadgetUri ( ) { } public abstract void setGadgetUri ( String gadgetUri ) { } @ Property ( name = "moduleId" ) public abstract long getModuleId ( ) { } public abstract void setModuleId ( long moduleId ) { } @ Property ( name = "tokenName" ) public abstract String getTokenName ( ) { } public abstract void setTokenName ( String tokenName ) { } @ Property ( name = "serviceName" ) public abstract String getServiceName ( ) { } public abstract void setServiceName ( String serviceName ) { } @ Property ( name = "accessToken" ) public abstract String getAccessToken ( ) { } public abstract void setAccessToken ( String accessToken ) { } @ Property ( name = "tokenSecret" ) public abstract String getTokenSecret ( ) { } public abstract void setTokenSecret ( String tokenSecret ) { } @ Property ( name = "sessionHandle" ) public abstract String getSessionHandle ( ) { } public abstract void setSessionHandle ( String sessionHandle ) { } @ Property ( name = "tokenExpireMillis" ) public abstract long getTokenExpireMillis ( ) { } public abstract void setTokenExpireMillis ( long tokenExpireMillis ) { } @ Destroy public abstract void remove ( ) { } public GadgetToken getToken ( ) { <START_BUG> return new GadgetToken ( getAccessToken ( ) , getTokenSecret ( ) , getServiceName ( ) , getTokenExpireMillis ( ) ) ; <END_BUG> } }

Fix:
return new GadgetToken ( getAccessToken ( ) , getTokenSecret ( ) , getSessionHandle ( ) , getTokenExpireMillis ( ) ) ;
Buggy code:
public abstract class AjaxFormComponentUpdatingBehavior extends AjaxEventBehavior { private static final long serialVersionUID = 1L ; public AjaxFormComponentUpdatingBehavior ( final String event ) { } @ Override protected void onBind ( ) { } protected final FormComponent < ? > getFormComponent ( ) { } @ Override protected final CharSequence getEventHandler ( ) { <START_BUG> return generateCallbackScript ( new AppendingStringBuffer ( "wicketAjaxPost('" ) . append ( getCallbackUrl ( false ) ) . append ( ( ( "',<seq2seq4repair_space>wicketSerialize(Wicket.$('" + ( getComponent ( ) . getMarkupId ( ) ) ) + "'))" ) ) ) ; <END_BUG> } @ Override protected void onCheckEvent ( String event ) { } @ Override protected final void onEvent ( final AjaxRequestTarget target ) { } protected boolean getUpdateModel ( ) { } protected boolean disableFocusOnBlur ( ) { } protected abstract void onUpdate ( AjaxRequestTarget target ) { } protected void onError ( AjaxRequestTarget target , RuntimeException e ) { } }

Fix:
return generateCallbackScript ( new AppendingStringBuffer ( "wicketAjaxPost('" ) . append ( getCallbackUrl ( ) ) . append ( ( ( "',<seq2seq4repair_space>wicketSerialize(Wicket.$('" + ( getComponent ( ) . getMarkupId ( ) ) ) + "'))" ) ) ) ;
Buggy code:
public class XmlMarshallingHandler implements OperationStepHandler , DescriptionProvider { public static final String OPERATION_NAME = CommonDescriptions . READ_CONFIG_AS_XML ; private final ConfigurationPersister configPersister ; public XmlMarshallingHandler ( final ConfigurationPersister configPersister ) { } @ Override public ModelNode getModelDescription ( Locale locale ) { } @ Override public void execute ( OperationContext context , ModelNode operation ) { final Resource resource = context . readResourceFromRoot ( getBaseAddress ( ) ) ; final ModelNode model = Tools . readModel ( resource ) ; try { final ByteArrayOutputStream baos = new ByteArrayOutputStream ( ) ; try { BufferedOutputStream output = new BufferedOutputStream ( baos ) ; configPersister . marshallAsXml ( model , output ) ; output . close ( ) ; baos . close ( ) ; } finally { safeClose ( baos ) ; } String xml = new String ( baos . toByteArray ( ) ) ; context . getResult ( ) . set ( xml ) ; } catch ( RuntimeException e ) { throw e ; } catch ( Exception e ) { ControllerLogger . MGMT_OP_LOGGER . failedExecutingOperation ( e , operation . require ( OP ) , PathAddress . pathAddress ( operation . get ( OP_ADDR ) ) ) ; context . getFailureDescription ( ) . set ( e . toString ( ) ) ; } <START_BUG> context . completeStep ( ) ; <END_BUG> } protected PathAddress getBaseAddress ( ) { } private void safeClose ( final Closeable closeable ) { } }

Fix:
context . stepCompleted ( ) ;
Buggy code:
public class ExecutionTestCase extends TestCase { public void testVersionMatch ( ) { } public void testFailingBuild ( ) { <START_BUG> File file1 = new File ( "testdata//failing-build//Fail.java" ) ; <END_BUG> String [ ] args = new String [ ] { file1 . getAbsolutePath ( ) } ; org . aspectj . tools . ajdoc . Main . main ( args ) ; assertTrue ( Main . hasAborted ( ) ) ; } protected void setUp ( ) throws Exception { } protected void tearDown ( ) throws Exception { } }

Fix:
File file1 = new File ( "..//ajdoc//testdata//failing-build//Fail.java" ) ;
Buggy code:
public class TestESAVectors extends AbstractTestClass { public static void main ( String [ ] args ) throws IOException , ClassNotFoundException , SQLException { <START_BUG> TestCombinedESAVectors test = new TestCombinedESAVectors ( ) ; <END_BUG> test . doMain ( args ) ; } @ Override public IConceptVector getVector ( ) { } }

Fix:
TestESAVectors test = new TestESAVectors ( ) ;
Buggy code:
public class EJB3RemoteServiceRemove extends AbstractRemoveStepHandler { public static final EJB3RemoteServiceRemove INSTANCE = new EJB3RemoteServiceRemove ( ) ; @ Override protected void performRuntime ( OperationContext context , ModelNode operation , ModelNode model ) throws OperationFailedException { } @ Override protected void recoverServices ( OperationContext context , ModelNode operation , ModelNode model ) throws OperationFailedException { if ( context . isResourceServiceRestartAllowed ( ) ) { <START_BUG> EJB3RemoteServiceAdd . INSTANCE . installRuntimeServices ( context , model , null ) ; <END_BUG> } else { context . revertReloadRequired ( ) ; } } void removeRuntimeService ( OperationContext context , ModelNode operation ) { } }

Fix:
EJB3RemoteServiceAdd . INSTANCE . installRuntimeServices ( context , model ) ;
Buggy code:
public class Euler { public static void main ( String [ ] args ) { <START_BUG> Problem curProb = new PE0045 ( ) ; <END_BUG> String result = curProb . getResult ( ) ; IO . info ( ( "result<seq2seq4repair_space>for<seq2seq4repair_space>problem<seq2seq4repair_space>#" + curProb ) ) ; IO . info ( ( ( "<seq2seq4repair_space>is<seq2seq4repair_space>'" + result ) + "'" ) ) ; IO . infoln ( ( ( "<seq2seq4repair_space>found<seq2seq4repair_space>in<seq2seq4repair_space>" + ( curProb . getRuntime ( 2 ) ) ) + "<seq2seq4repair_space>ms" ) ) ; } }

Fix:
Problem curProb = new PE0046 ( ) ;
Buggy code:
public class StoppedGameState implements GameState { public static final int DELAY = 30 ; private final EventDispatcher dispatcher ; private final Game game ; public StoppedGameState ( final EventDispatcher eventDispatcher , Game aGame ) { } @ Override public void dispose ( ) { } public Event getStateEvent ( ) { } @ Override public GameState start ( ) { } @ Override public GameState stop ( ) { } @ Override <START_BUG> public GameState finish ( Integer team ) { <END_BUG> return this ; } @ Override public GameState waitForPlayers ( ) { } }

Fix:
public GameState finish ( final Integer team ) {
Buggy code:
class GenericAggregator { private final AggregatorInfo aggInfo ; int aggregatorColumnId ; private int inputColumnId ; private int resultColumnId ; private final ClassFactory cf ; private ExecAggregator cachedAggregator ; GenericAggregator ( AggregatorInfo aggInfo , ClassFactory cf ) { } void initialize ( ExecRow row ) throws StandardException { } void accumulate ( ExecRow inputRow , ExecRow accumulateRow ) throws StandardException { } void accumulate ( Object [ ] inputRow , Object [ ] accumulateRow ) throws StandardException { } void accumulate ( DataValueDescriptor inputColumn , DataValueDescriptor aggregatorColumn ) throws StandardException { } void merge ( ExecRow inputRow , ExecRow mergeRow ) throws StandardException { } void merge ( Object [ ] inputRow , Object [ ] mergeRow ) throws StandardException { } boolean finish ( ExecRow row ) throws StandardException { } ExecAggregator getAggregatorInstance ( ) throws StandardException { ExecAggregator aggregatorInstance ; if ( ( cachedAggregator ) == null ) { try { Class aggregatorClass = cf . loadApplicationClass ( aggInfo . getAggregatorClassName ( ) ) ; Object agg = aggregatorClass . newInstance ( ) ; aggregatorInstance = ( ( ExecAggregator ) ( agg ) ) ; cachedAggregator = aggregatorInstance ; <START_BUG> aggregatorInstance . setup ( cf , aggInfo . getAggregateName ( ) , aggInfo . getResultDescription ( ) . getColumnInfo ( ) [ 0 ] . getType ( ) ) ; <END_BUG> } catch ( Exception e ) { throw StandardException . unexpectedUserException ( e ) ; } } else { aggregatorInstance = cachedAggregator . newAggregator ( ) ; } return aggregatorInstance ; } int getColumnId ( ) { } DataValueDescriptor getInputColumnValue ( ExecRow row ) throws StandardException { } void merge ( Storable aggregatorColumnIn , Storable aggregatorColumnOut ) throws StandardException { } AggregatorInfo getAggregatorInfo ( ) { } }

Fix:
aggregatorInstance . setup ( cf , aggInfo . getAggregateName ( ) , aggInfo . getResultDescription ( ) . getColumnInfo ( 0 ) . getType ( ) ) ;
Buggy code:
public class SimplePage_3 extends SimplePage { private static final long serialVersionUID = 1L ; public SimplePage_3 ( ) { } @ Override public IMarkupFragment getMarkup ( ) { <START_BUG> return Markup . get ( ( "<html<seq2seq4repair_space>xmlns:wicket><body>" + ( ( ( ( "<span<seq2seq4repair_space>wicket:id='myLabel'>mein<seq2seq4repair_space>Label<//span>" + "<span<seq2seq4repair_space>wicket:id='test'>body<//span>" ) + "<span<seq2seq4repair_space>wicket:id='myPanel'>panel<//span>" ) + "<span<seq2seq4repair_space>wicket:id='myBorder'>border<//span>" ) + "<//body><//html>" ) ) ) ; <END_BUG> } }

Fix:
return Markup . of ( ( "<html<seq2seq4repair_space>xmlns:wicket><body>" + ( ( ( ( "<span<seq2seq4repair_space>wicket:id='myLabel'>mein<seq2seq4repair_space>Label<//span>" + "<span<seq2seq4repair_space>wicket:id='test'>body<//span>" ) + "<span<seq2seq4repair_space>wicket:id='myPanel'>panel<//span>" ) + "<span<seq2seq4repair_space>wicket:id='myBorder'>border<//span>" ) + "<//body><//html>" ) ) ) ;
Buggy code:
class Board { private static final int FALLTHRU_REQ = 22 ; public static final int PHASE_CHANCE = 13 ; public static final int NO_ROW_FOUND = - 99 ; public int score ; private int rowsRemoved ; private static final int SCORE_1_ROW = 100 ; private static final int SCORE_2_ROW = 300 ; private static final int SCORE_3_ROW = 500 ; private static final int SCORE_4_ROW = 800 ; private final SquareType [ ] [ ] squares ; private final int width ; private final int height ; private int rotateCount ; private final List < BoardListener > boardListenerList ; private final TetrominoMaker tetromaker ; private CollisionHandler collision ; private final Random rng ; private boolean gameOver ; public boolean isPaused ; private Poly falling ; private int fallingX ; private int fallingY ; Board ( final int width , final int height ) { } private void createBoard ( ) { } public void resetBoard ( ) { } public int getWidth ( ) { } public int getHeight ( ) { } public SquareType getSquareType ( int x , int y ) { } public boolean isGameRunning ( ) { } public void setSquareType ( int x , int y , SquareType sq ) { } public void addBoardListener ( BoardListener bl ) { } public void togglePause ( ) { } public void tick ( ) { if ( ! ( isPaused ) ) { if ( ( falling ) == null ) { falling = tetromaker . getPoly ( rng . nextInt ( TetrominoMaker . getNumberOfTypes ( ) ) ) ; fallingX = ( ( width ) - ( falling . getWidth ( ) ) ) // 2 ; fallingY = 0 ; rotateCount = 0 ; <START_BUG> if ( ( rng . nextInt ( Board . PHASE_CHANCE ) ) > 1 ) { <END_BUG> collision = new Phase ( ) ; } else if ( ( collision . getClass ( ) ) != ( DefaultCollisionHandler . class ) ) { collision = new DefaultCollisionHandler ( ) ; } if ( collision . hasCollision ( this ) ) { falling = null ; gameOver = true ; } } else { if ( ( rotateCount ) > ( Board . FALLTHRU_REQ ) ) { collision = new Fallthrough ( ) ; } removeFullRows ( ) ; calcScore ( ) ; if ( ! ( getCollisionHandler ( ) . equals ( "phase" ) ) ) fall ( ) ; } } notifyListeners ( ) ; } public void fall ( ) { } public String getCollisionHandler ( ) { } private void removeRow ( int row ) { } private boolean rowIsFull ( int row ) { } private int getFullRow ( ) { } private void removeFullRows ( ) { } private void calcScore ( ) { } public void moveFallingRight ( ) { } public void moveFallingLeft ( ) { } public void moveFallingUp ( ) { } public void rotate ( ) { } public void addFalling ( ) { } private void notifyListeners ( ) { } public int getFallingY ( ) { } public int getFallingX ( ) { } public Poly getFalling ( ) { } }

Fix:
if ( ( rng . nextInt ( Board . PHASE_CHANCE ) ) < 1 ) {
Buggy code:
public abstract class IndexCommit { public abstract String getSegmentsFileName ( ) { } public abstract Collection < String > getFileNames ( ) throws IOException { } public abstract Directory getDirectory ( ) { } public void delete ( ) { } public boolean isDeleted ( ) { } public boolean isOptimized ( ) { } @ Override public boolean equals ( Object other ) { } @ Override public int hashCode ( ) { <START_BUG> return ( getDirectory ( ) . hashCode ( ) ) + ( getSegmentsFileName ( ) . hashCode ( ) ) ; <END_BUG> } public long getVersion ( ) { } public long getGeneration ( ) { } public long getTimestamp ( ) throws IOException { } public Map < String , String > getUserData ( ) throws IOException { } }

Fix:
return ( ( int ) ( ( getDirectory ( ) . hashCode ( ) ) + ( getVersion ( ) ) ) ) ;
Buggy code:
public class SourceMethod extends NamedMember implements IMethod { protected String [ ] fParameterTypes ; protected SourceMethod ( JavaElement parent , String name , String [ ] parameterTypes ) { } protected void closing ( Object info ) throws JavaModelException { } public boolean equals ( Object o ) { } public int getElementType ( ) { } public String [ ] getExceptionTypes ( ) throws JavaModelException { } protected void getHandleMemento ( StringBuffer buff ) { } protected char getHandleMementoDelimiter ( ) { } public String getKey ( ) { } public int getNumberOfParameters ( ) { } public String [ ] getParameterNames ( ) throws JavaModelException { } public String [ ] getParameterTypes ( ) { } public ITypeParameter getTypeParameter ( String typeParameterName ) { } public ITypeParameter [ ] getTypeParameters ( ) throws JavaModelException { } public String [ ] getTypeParameterSignatures ( ) throws JavaModelException { } public IJavaElement getPrimaryElement ( boolean checkOwner ) { } public String getReturnType ( ) throws JavaModelException { } public String getSignature ( ) throws JavaModelException { SourceMethodElementInfo info = ( ( SourceMethodElementInfo ) ( getElementInfo ( ) ) ) ; <START_BUG> return info . getSignature ( ) ; <END_BUG> } public int hashCode ( ) { } public boolean isConstructor ( ) throws JavaModelException { } public boolean isMainMethod ( ) throws JavaModelException { } public boolean isResolved ( ) { } public boolean isSimilar ( IMethod method ) { } public String readableName ( ) { } protected void toStringInfo ( int tab , StringBuffer buffer , Object info ) { } protected void toStringName ( StringBuffer buffer ) { } protected void toStringName ( StringBuffer buffer , int flags ) { } }

Fix:
return Signature . createMethodSignature ( fParameterTypes , Signature . createTypeSignature ( info . getReturnTypeName ( ) , false ) ) ;
Buggy code:
public class OpenSessionInViewInterceptor implements WebRequestInterceptor { public static final String PARTICIPATE_SUFFIX = ".PARTICIPATE" ; protected final Log logger = LogFactory . getLog ( getClass ( ) ) ; private SessionFactory sessionFactory ; public void setSessionFactory ( SessionFactory sessionFactory ) { } public SessionFactory getSessionFactory ( ) { } public void preHandle ( WebRequest request ) throws DataAccessException { } public void postHandle ( WebRequest request , ModelMap model ) { } public void afterCompletion ( WebRequest request , Exception ex ) throws DataAccessException { } protected Session openSession ( ) throws DataAccessResourceFailureException { try { <START_BUG> Session session = getSessionFactory ( ) . openSession ( ) ; <END_BUG> session . setFlushMode ( MANUAL ) ; return session ; } catch ( HibernateException ex ) { throw new DataAccessResourceFailureException ( "Could<seq2seq4repair_space>not<seq2seq4repair_space>open<seq2seq4repair_space>Hibernate<seq2seq4repair_space>Session" , ex ) ; } } protected String getParticipateAttributeName ( ) { } }

Fix:
Session session = SessionFactoryUtils . openSession ( getSessionFactory ( ) ) ;
Buggy code:
public class ItemCopyDialogVBox extends VBox { @ FXML private ListView < Item > listView ; @ FXML private Label infoLabel ; @ FXML private TextField searchBox ; private ObservableList < Item > filteredDataList ; private ObservableList < Item > fullDataList = FXCollections . observableArrayList ( ) ; private Item selected = null ; public ItemCopyDialogVBox ( ) { } public Item getSelectedItem ( ) { } public void setItems ( ObservableList < ? extends Item > items ) { } public void setSelectedItem ( Item i ) { } @ FXML private void applyFilter ( ) { String text = searchBox . getText ( ) ; <START_BUG> Predicate < Item > variablesContain = DisplayUtil . createPredicateForSearch ( text , Item . class ) ; <END_BUG> Predicate < Item > itemContains = ( i ) -> i . toString ( ) . toLowerCase ( ) . contains ( text . toLowerCase ( ) ) ; selected = ( ( getSelectedItem ( ) ) == null ) ? selected : getSelectedItem ( ) ; filteredDataList . clear ( ) ; fullDataList . forEach ( ( i ) -> { if ( ( variablesContain . test ( i ) ) || ( itemContains . test ( i ) ) ) { filteredDataList . add ( i ) ; if ( ( selected ) == i ) { listView . getSelectionModel ( ) . select ( i ) ; } } } ) ; updateInfoLabel ( ) ; } private void updateInfoLabel ( ) { } }

Fix:
Predicate < Item > variablesContain = DisplayUtil . createPredicateForSearch ( text , Item . class , true ) ;
Buggy code:
public class PatternWeaveTestCase extends WeaveTestCase { public PatternWeaveTestCase ( String name ) { } String [ ] none = new String [ 0 ] ; public void testPublic ( ) throws IOException { } private void checkPointcut ( String pointcutSource , String [ ] expectedHelloShadows , String [ ] expectedFancyShadows ) throws IOException { } public void checkSerialize ( Pointcut p ) throws IOException { 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 ) ; } }

Fix:
VersionedDataInputStream in = new VersionedDataInputStream ( bi ) ;
Buggy code:
public class TransactionSortingMapper extends Mapper < LongWritable , Text , LongWritable , TransactionTree > { private final OpenObjectIntHashMap < String > fMap = new OpenObjectIntHashMap < String > ( ) ; private Pattern splitter ; @ Override protected void map ( LongWritable offset , Text input , Context context ) throws IOException , InterruptedException { } @ Override protected void setup ( Context context ) throws IOException , InterruptedException { super . setup ( context ) ; Parameters params = new Parameters ( context . getConfiguration ( ) . get ( PFP_PARAMETERS , "" ) ) ; int i = 0 ; <START_BUG> for ( Pair < String , Long > e : PFPGrowth . deserializeList ( params , F_LIST , context . getConfiguration ( ) ) ) { <END_BUG> fMap . put ( e . getFirst ( ) , ( i ++ ) ) ; } splitter = Pattern . compile ( params . get ( SPLIT_PATTERN , SPLITTER . toString ( ) ) ) ; } }

Fix:
for ( Pair < String , Long > e : PFPGrowth . readFList ( context . getConfiguration ( ) ) ) {
Buggy code:
public abstract class AbstractTest { private static String keyspace = "apispark" ; private String versionSchemaTable = "Version" ; public Session session ; public Plan . Result < String > result ; @ Before public void setUp ( ) { } @ After public void tearDown ( ) { } protected void mutate ( String path ) { } protected void checkMutationSuccessful ( ) { } protected void checkLastTimestamp ( String expectedTimestamp ) { } protected ResultSet query ( Object ... values ) { } protected Row getByPk ( String pk ) { } protected void createVersionSchemaTable ( ) { <START_BUG> String dropStatement = ( "DROP<seq2seq4repair_space>TABLE<seq2seq4repair_space>\"" + ( versionSchemaTable ) ) + "\";" ; <END_BUG> session . execute ( dropStatement ) ; String createStatement = ( ( ( "CREATE<seq2seq4repair_space>TABLE<seq2seq4repair_space>\"" + ( versionSchemaTable ) ) + "\"(<seq2seq4repair_space>versionid<seq2seq4repair_space>varchar,<seq2seq4repair_space>filename<seq2seq4repair_space>varchar,checksum<seq2seq4repair_space>varchar," ) + "execution_date<seq2seq4repair_space>timestamp,execution_time<seq2seq4repair_space>int," ) + "success<seq2seq4repair_space>boolean,<seq2seq4repair_space>PRIMARY<seq2seq4repair_space>KEY(versionid))" ; session . execute ( createStatement ) ; } protected void appendOneVersionRecord ( String version , String filename , String checksum , int execution_time , boolean success ) { } protected void dropTableTest ( ) { } }

Fix:
String dropStatement = ( "DROP<seq2seq4repair_space>TABLE<seq2seq4repair_space>IF<seq2seq4repair_space>EXISTS<seq2seq4repair_space>\"" + ( versionSchemaTable ) ) + "\";" ;
Buggy code:
public class CheckForNewMessagesCommand extends Command { POP3Server server ; public CheckForNewMessagesCommand ( DefaultCommandReference [ ] references ) { } public void execute ( Worker worker ) throws Exception { FetchNewMessagesCommand command = new FetchNewMessagesCommand ( getReferences ( ) ) ; POP3CommandReference [ ] r = ( ( POP3CommandReference [ ] ) ( getReferences ( FIRST_EXECUTION ) ) ) ; server = r [ 0 ] . getServer ( ) ; command . log ( "Authenticating..." , worker ) ; <START_BUG> int totalMessageCount = server . getMessageCount ( ) ; <END_BUG> try { Vector newUIDList = command . fetchUIDList ( totalMessageCount , worker ) ; Vector messageSizeList = command . fetchMessageSizes ( worker ) ; Vector newMessagesUIDList = command . synchronize ( newUIDList ) ; int newMessagesCount = newMessagesUIDList . size ( ) ; if ( ( newMessagesCount > 0 ) && ( server . getAccountItem ( ) . getPopItem ( ) . getBoolean ( "enable_sound" ) ) ) playSound ( ) ; if ( server . getAccountItem ( ) . getPopItem ( ) . getBoolean ( "automatically_download_new_messages" ) ) command . downloadNewMessages ( newUIDList , messageSizeList , newMessagesUIDList , worker ) ; command . logout ( worker ) ; } catch ( CommandCancelledException e ) { server . forceLogout ( ) ; } } protected void playSound ( ) { } }

Fix:
int totalMessageCount = server . getMessageCount ( worker ) ;
Buggy code:
public class TestGermanStemFilter extends BaseTokenStreamTestCase { Analyzer analyzer = new Analyzer ( ) { @ Override protected TokenStreamComponents createComponents ( String fieldName , Reader reader ) { } } ; public void testStemming ( ) throws Exception { } public void testEmpty ( ) throws Exception { } public void testRandomStrings ( ) throws Exception { <START_BUG> checkRandomData ( random ( ) , analyzer , ( 10000 * ( RANDOM_MULTIPLIER ) ) ) ; <END_BUG> } public void testEmptyTerm ( ) throws IOException { } }

Fix:
checkRandomData ( random ( ) , analyzer , ( 1000 * ( RANDOM_MULTIPLIER ) ) ) ;