nus-yam/ex-repair huggingface dataset:
Buggy code:
public class KafkaUtils { public static final Logger LOG = LoggerFactory . getLogger ( KafkaUtils . class ) ; private static final int NO_OFFSET = - 5 ; public static IBrokerReader makeBrokerReader ( Map stormConf , KafkaConfig conf ) { } public static long getOffset ( SimpleConsumer consumer , String topic , int partition , long startOffsetTime ) { TopicAndPartition topicAndPartition = new TopicAndPartition ( topic , partition ) ; Map < TopicAndPartition , PartitionOffsetRequestInfo > requestInfo = new HashMap < TopicAndPartition , PartitionOffsetRequestInfo > ( ) ; requestInfo . put ( topicAndPartition , new PartitionOffsetRequestInfo ( startOffsetTime , 1 ) ) ; <START_BUG> OffsetRequest request = new OffsetRequest ( requestInfo , kafka . api . OffsetRequest . CurrentVersion ( ) , kafka . api . OffsetRequest . DefaultClientId ( ) ) ; <END_BUG> long [ ] offsets = consumer . getOffsetsBefore ( request ) . offsets ( topic , partition ) ; if ( ( offsets . length ) > 0 ) { return offsets [ 0 ] ; } else { return KafkaUtils . NO_OFFSET ; } } public static class KafkaOffsetMetric implements IMetric { Map < GlobalPartitionId , Long > _partitionToOffset = new HashMap < GlobalPartitionId , Long > ( ) ; Set < GlobalPartitionId > _partitions ; String _topic ; DynamicPartitionConnections _connections ; public KafkaOffsetMetric ( String topic , DynamicPartitionConnections connections ) { } public void setLatestEmittedOffset ( GlobalPartitionId partition , long offset ) { } @ Override public Object getValueAndReset ( ) { } public void refreshPartitions ( Set < GlobalPartitionId > partitions ) { } } }

Fix:
OffsetRequest request = new OffsetRequest ( requestInfo , kafka . api . OffsetRequest . CurrentVersion ( ) , consumer . clientId ( ) ) ;
Buggy code:
public class DefaultAlertContextTests { private DefaultAlertContext context ; @ Before public void setUp ( ) { } @ Test public void addAlert ( ) { Alert alert = new Alert ( ) { public String getCode ( ) { return "invalidFormat" ; } public String getMessage ( ) { <START_BUG> return "Please<seq2seq4repair_space>enter<seq2seq4repair_space>a<seq2seq4repair_space>value<seq2seq4repair_space>in<seq2seq4repair_space>format<seq2seq4repair_space>yyy-dd-mm" ; <END_BUG> } public Severity getSeverity ( ) { return Severity . ERROR ; } } ; context . add ( "form.property" , alert ) ; assertEquals ( 1 , context . getAlerts ( ) . size ( ) ) ; assertEquals ( "invalidFormat" , context . getAlerts ( "form.property" ) . get ( 0 ) . getCode ( ) ) ; } }

Fix:
return "Please<seq2seq4repair_space>enter<seq2seq4repair_space>a<seq2seq4repair_space>value<seq2seq4repair_space>in<seq2seq4repair_space>format<seq2seq4repair_space>yyyy-dd-mm" ;
Buggy code:
public class GrantNode extends MiscellaneousStatementNode { private PrivilegeNode privileges ; private List grantees ; public String toString ( ) { } public String statementToString ( ) { } public void init ( Object privileges , Object grantees ) { } public QueryTreeNode bind ( ) throws StandardException { <START_BUG> privileges = ( ( PrivilegeNode ) ( privileges . bind ( new HashMap ( ) ) ) ) ; <END_BUG> return this ; } public ConstantAction makeConstantAction ( ) throws StandardException { } }

Fix:
privileges = ( ( PrivilegeNode ) ( privileges . bind ( new HashMap ( ) , grantees ) ) ) ;
Buggy code:
class LocalOutboundConnectionAdd extends AbstractOutboundConnectionAddHandler { static final LocalOutboundConnectionAdd INSTANCE = new LocalOutboundConnectionAdd ( ) ; private LocalOutboundConnectionAdd ( ) { } @ 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 ( final OperationContext context , final ModelNode operation , final ModelNode fullModel , final ServiceVerificationHandler verificationHandler ) throws OperationFailedException { final PathAddress address = PathAddress . pathAddress ( operation . require ( OP_ADDR ) ) ; final String connectionName = address . getLastElement ( ) . getValue ( ) ; final String outboundSocketBindingRef = OUTBOUND_SOCKET_BINDING_REF . resolveModelAttribute ( context , operation ) . asString ( ) ; final ServiceName outboundSocketBindingDependency = OUTBOUND_SOCKET_BINDING_BASE_SERVICE_NAME . append ( outboundSocketBindingRef ) ; final OptionMap connectionCreationOptions = ConnectorResource . getOptions ( fullModel . get ( PROPERTY ) ) ; final LocalOutboundConnectionService outboundConnectionService = new LocalOutboundConnectionService ( connectionName , connectionCreationOptions ) ; final ServiceName serviceName = OUTBOUND_CONNECTION_BASE_SERVICE_NAME . append ( connectionName ) ; final ServiceName aliasServiceName = LOCAL_OUTBOUND_CONNECTION_BASE_SERVICE_NAME . append ( connectionName ) ; <START_BUG> final ServiceBuilder < LocalOutboundConnectionService > svcBuilder = context . getServiceTarget ( ) . addService ( serviceName , outboundConnectionService ) . addAliases ( aliasServiceName ) . addDependency ( SUBSYSTEM_ENDPOINT , Endpoint . class , outboundConnectionService . getEnpointInjector ( ) ) . addDependency ( outboundSocketBindingDependency , OutboundSocketBinding . class , outboundConnectionService . getDestinationOutboundSocketBindingInjector ( ) ) ; <END_BUG> if ( verificationHandler != null ) { svcBuilder . addListener ( verificationHandler ) ; } return svcBuilder . install ( ) ; } }

Fix:
final ServiceBuilder < LocalOutboundConnectionService > svcBuilder = context . getServiceTarget ( ) . addService ( serviceName , outboundConnectionService ) . addAliases ( aliasServiceName ) . addDependency ( SUBSYSTEM_ENDPOINT , Endpoint . class , outboundConnectionService . getEndpointInjector ( ) ) . addDependency ( outboundSocketBindingDependency , OutboundSocketBinding . class , outboundConnectionService . getDestinationOutboundSocketBindingInjector ( ) ) ;
Buggy code:
public final class WhereStep < S > extends FilterStep < S > implements Scoping , TraversalParent { protected String startKey ; protected List < String > selectKeys ; protected P < Object > predicate ; protected Traversal . Admin < ? , ? > traversal ; protected Scope scope ; protected final Set < String > scopeKeys = new HashSet < > ( ) ; public WhereStep ( final Traversal . Admin traversal , final Scope scope , final Optional < String > startKey , final P < ? > predicate ) { } public WhereStep ( final Traversal . Admin traversal , final Scope scope , final Traversal < ? , ? > whereTraversal ) { } private void configureStartAndEndSteps ( final Traversal . Admin < ? , ? > whereTraversal ) { } private void configurePredicates ( final P < Object > predicate ) { } private void setPredicateValues ( final P < Object > predicate , final Traverser . Admin < S > traverser , final Iterator < String > selectKeysIterator ) { } @ Override protected boolean filter ( final Traverser . Admin < S > traverser ) { } @ Override public List < Traversal . Admin < ? , ? > > getLocalChildren ( ) { } @ Override public String toString ( ) { } @ Override public Set < String > getScopeKeys ( ) { <START_BUG> return this . scopeKeys ; <END_BUG> } @ Override public WhereStep < S > clone ( ) { } @ Override public int hashCode ( ) { } @ Override public Set < TraverserRequirement > getRequirements ( ) { } @ Override public void setScope ( final Scope scope ) { } @ Override public Scope getScope ( ) { } @ Override public Scope recommendNextScope ( ) { } public class WhereStartStep extends MapStep < S , Object > { private final String selectKey ; public WhereStartStep ( final Traversal . Admin traversal , final String selectKey ) { } @ Override protected Object map ( final Traverser . Admin < S > traverser ) { } @ Override public String toString ( ) { } @ Override public int hashCode ( ) { } } public class WhereEndStep extends FilterStep < Object > { private final String matchKey ; private Object matchValue = null ; public WhereEndStep ( final Traversal . Admin traversal , final String matchKey ) { } public void processStartTraverser ( final Traverser . Admin traverser ) { } @ Override protected boolean filter ( final Traverser . Admin < Object > traverser ) { } @ Override public String toString ( ) { } @ Override public int hashCode ( ) { } } }

Fix:
return Collections . unmodifiableSet ( this . scopeKeys ) ;
Buggy code:
public class ManagedBeanObjectFactory implements ObjectFactory { public Object getObjectInstance ( Object obj , Name name , Context nameCtx , Hashtable < ? , ? > environment ) throws Exception { final Reference reference = Reference . class . cast ( obj ) ; RefAddr refAddr = reference . get ( 0 ) ; final ServiceName managedBeanName = ( ( ServiceName ) ( refAddr . getContent ( ) ) ) ; final ManagedBeanService < ? > managedBeanService = ManagedBeanRegistry . get ( managedBeanName ) ; if ( managedBeanService == null ) { <START_BUG> throw new NamingException ( ( "Managed<seq2seq4repair_space>bean<seq2seq4repair_space>does<seq2seq4repair_space>not<seq2seq4repair_space>exist<seq2seq4repair_space>with<seq2seq4repair_space>name:<seq2seq4repair_space>" + name ) ) ; <END_BUG> } return managedBeanService . getValue ( ) ; } public static final Reference createReference ( final Class < ? > managedBeanClass , final ServiceName serviceName ) { } public static final class ServiceNameRefAdr extends RefAddr { private static final long serialVersionUID = - 8030736501810800377L ; private final ServiceName serviceName ; public ServiceNameRefAdr ( final ServiceName serviceName ) { } @ Override public Object getContent ( ) { } } }

Fix:
throw new NamingException ( ( "Managed<seq2seq4repair_space>bean<seq2seq4repair_space>does<seq2seq4repair_space>not<seq2seq4repair_space>exist<seq2seq4repair_space>with<seq2seq4repair_space>name:<seq2seq4repair_space>" + managedBeanName ) ) ;
Buggy code:
public class Town extends RealEstate { private static final transient Logger log = Logger . getLogger ( "Minecraft" ) ; protected static final transient String BANK_PREFIX = "tktown_5482154" ; protected Map < String , RealEstate > children ; protected Map < String , Outpost > outposts ; protected transient Optional < Set < Player > > residents = Optional . absent ( ) ; protected Set < UUID > residentsIds ; public Town ( ) { } public Town ( Claim claim , String name ) { } public boolean withdraw ( double amount , Player recipent ) { } public boolean deposit ( Player donor , double amount ) { } public double getBankBalance ( Player requester ) { } protected Map < String , RealEstate > getChildren ( ) { } public void addChild ( RealEstate re ) { } public RealEstate getChild ( String name ) { } public void removeChild ( String name ) { } protected void setChildren ( Map < String , RealEstate > children ) { } public void addResident ( Player player ) { } public boolean isResident ( Player player ) { } public void removeResident ( Player player ) { } public int countResidents ( ) { } public Set < Player > getResidents ( ) { } public boolean isMayor ( Player player ) { <START_BUG> return this . owner . equals ( player ) ; <END_BUG> } public void setMayor ( Player player ) { } public Player getMayor ( ) { } public void addOutpost ( Outpost out ) { } public void removeOutpost ( String name ) { } public Outpost getOutpost ( String name ) { } }

Fix:
return this . getOwner ( ) . equals ( player ) ;
Buggy code:
public class RestInformationDAO extends AsyncTask < String , Void , String > { public static String putData ( String url ) { } public static String getData ( String url ) { } public static void clearData ( ) { } private static List < Cookie > getLoginCookies ( ) { } @ Override protected String doInBackground ( String ... urls ) { Log . d ( "Rest" , "doinbackground" ) ; String response = "" ; for ( String url : urls ) { <START_BUG> response = RestInformationDAO . putData ( url ) ; <END_BUG> } return response ; } }

Fix:
response = RestInformationDAO . getData ( url ) ;
Buggy code:
public final class HT_ItemStackUtil { private HT_ItemStackUtil ( ) { } public static int getStackSize ( ItemStack itemStack ) { } public static < T extends Item > T getItemAs ( ItemStack itemStack , Class < T > itemClass ) { <START_BUG> return ( itemStack . getItem ( ) ) != null ? itemClass . isInstance ( itemStack . getItem ( ) ) ? itemClass . cast ( itemStack . getItem ( ) ) : null : null ; <END_BUG> } }

Fix:
return ( ( itemStack != null ) && ( ( itemStack . getItem ( ) ) != null ) ) && ( itemClass . isInstance ( itemStack . getItem ( ) ) ) ? itemClass . cast ( itemStack . getItem ( ) ) : null ;
Buggy code:
public final class TimeOfDayTest extends TestCase { public void test ( ) throws ParseException { <START_BUG> Assert . assertTrue ( ( ( MIDNIGHT . getHour ( ) ) == 0 ) ) ; <END_BUG> Assert . assertTrue ( TimeOfDay . valueOf ( MIDNIGHT . next ( ) ) . equals ( MIDNIGHT ) ) ; final TimeOfDay three = TimeOfDay . time ( 3 , 0 , PM ) ; final TimeOfDay five = TimeOfDay . time ( 5 , 0 , PM ) ; Assert . assertTrue ( five . after ( three ) ) ; } }

Fix:
Assert . assertTrue ( ( ( MIDNIGHT . hour ( ) ) == 0 ) ) ;
Buggy code:
public class TempTest { private static final Logger log = LogManager . getLogger ( TempTest . class ) ; @ Test public void test ( ) throws Exception { <START_BUG> TempTest . log . info ( new ObjectMapper ( ) . enable ( SerializationFeature . INDENT_OUTPUT ) . writeValueAsString ( Entity . asEntity ( "name" , "a" , "age" , 10 ) ) ) ; <END_BUG> } }

Fix:
TempTest . log . info ( new ObjectMapper ( ) . enable ( SerializationFeature . INDENT_OUTPUT ) . writeValueAsString ( Entity . entity ( "name" , "a" , "age" , 10 ) ) ) ;
Buggy code:
public class RandomAccessResultList extends AbstractNonSequentialResultList { private static final int OPEN = 0 ; private static final int FREED = 1 ; private static final int CLOSED = 2 ; private ResultObjectProvider _rop = null ; private Map _rows = null ; private Object [ ] _full = null ; private long _requests = 0 ; private int _state = RandomAccessResultList . OPEN ; private int _size = - 1 ; public RandomAccessResultList ( ResultObjectProvider rop ) { } protected Map newRowMap ( ) { } public boolean isProviderOpen ( ) { } public boolean isClosed ( ) { } public void close ( ) { } protected Object getInternal ( int index ) { if ( ( _full ) != null ) { if ( index >= ( _full . length ) ) return PAST_END ; return _full [ index ] ; } <START_BUG> Integer i = Numbers . valueOf ( index ) ; <END_BUG> Object ret = _rows . get ( i ) ; if ( ret != null ) { if ( ret instanceof RandomAccessResultList . Null ) return null ; return ret ; } ret = instantiateRow ( i ) ; return ret == null ? PAST_END : ret ; } private Object instantiateRow ( Integer i ) { } private void checkComplete ( ) { } public int size ( ) { } private void free ( ) { } public Object writeReplace ( ) throws ObjectStreamException { } public String toString ( ) { } public int hashCode ( ) { } public boolean equals ( Object other ) { } private static class Null { } }

Fix:
Integer i = index ;
Buggy code:
@ Service ( "redisMapCache" ) public class RedisMapCache { protected Logger logger = Logger . getLogger ( this . getClass ( ) ) ; @ SuppressWarnings ( "rawtypes" ) @ Resource private RedisTemplate redisTemplate ; private static final String namespace = "haalthy.map." ; @ SuppressWarnings ( "unchecked" ) public void putValue ( final String key , final String field , final String value , final long expire ) { logger . info ( ( ( ( "putObject<seq2seq4repair_space>to<seq2seq4repair_space>redis<seq2seq4repair_space>data:" + key ) + field ) + value ) ) ; redisTemplate . execute ( new org . springframework . data . redis . core . RedisCallback < String > ( ) { @ Override public String doInRedis ( RedisConnection connection ) throws DataAccessException { byte [ ] btyKey = redisTemplate . getStringSerializer ( ) . serialize ( ( ( RedisMapCache . namespace ) + key ) ) ; byte [ ] btyField = redisTemplate . getStringSerializer ( ) . serialize ( field ) ; byte [ ] btyValue = redisTemplate . getStringSerializer ( ) . serialize ( value ) ; <START_BUG> connection . hSetNX ( btyKey , btyField , btyValue ) ; <END_BUG> if ( expire > 0 ) connection . expire ( btyKey , expire ) ; return null ; } } ) ; } @ SuppressWarnings ( "unchecked" ) public void setValue ( final String key , final String field , final String value , final long expire ) { } @ SuppressWarnings ( "unchecked" ) public boolean Exists ( final String key , final String field ) { } @ SuppressWarnings ( "unchecked" ) public String getValue ( final String key , final String field ) { } @ SuppressWarnings ( "unchecked" ) public Map < String , String > getValues ( final String key , final List < String > fields ) { } @ SuppressWarnings ( "unchecked" ) public Map < String , String > getAllValues ( final String key ) { } @ SuppressWarnings ( "unchecked" ) public Map < String , String > getValuesUp ( final String key , final String value ) { } @ SuppressWarnings ( "unchecked" ) public List < String > getAllFields ( final String key ) { } @ SuppressWarnings ( "unchecked" ) public void delField ( final String key , final String field ) { } @ SuppressWarnings ( "unchecked" ) public void delFields ( final String key , final List < String > fields ) { } @ SuppressWarnings ( "unchecked" ) public void delKey ( final String key ) { } @ SuppressWarnings ( "unchecked" ) public void resetExpire ( final String key , final long seconds ) { } @ SuppressWarnings ( "unchecked" ) public long getLength ( final String key ) { } }

Fix:
connection . hSet ( btyKey , btyField , btyValue ) ;
Buggy code:
public class Snippet4 { public static void main ( String [ ] args ) { Display display = new Display ( ) ; final Shell shell = new Shell ( display ) ; Button b = new Button ( shell , SWT . PUSH ) ; b . setText ( "Open<seq2seq4repair_space>Dialog<seq2seq4repair_space>..." ) ; b . pack ( ) ; b . setLocation ( 10 , 10 ) ; b . addSelectionListener ( new SelectionAdapter ( ) { <START_BUG> public void widgetSelected ( SelectionEvent e ) { <END_BUG> Shell dialog = new Shell ( shell , SWT . DIALOG_TRIM ) ; dialog . addListener ( Traverse , new Listener ( ) { public void handleEvent ( Event e ) { if ( ( e . detail ) == ( SWT . TRAVERSE_ESCAPE ) ) { e . doit = false ; } } } ) ; dialog . open ( ) ; } } ) ; shell . open ( ) ; while ( ! ( shell . isDisposed ( ) ) ) { if ( ! ( display . readAndDispatch ( ) ) ) display . sleep ( ) ; } display . dispose ( ) ; } }

Fix:
public void widgetSelected ( SelectionEvent se ) {
Buggy code:
class MessagingSubsystemAdd extends AbstractBoottimeAddStepHandler { public static final MessagingSubsystemAdd INSTANCE = new MessagingSubsystemAdd ( ) ; private MessagingSubsystemAdd ( ) { } @ Override protected void populateModel ( ModelNode operation , ModelNode model ) throws OperationFailedException { } @ Override protected void performBoottime ( final OperationContext context , ModelNode operation , final ModelNode model , ServiceVerificationHandler verificationHandler , List < ServiceController < ? > > newControllers ) throws OperationFailedException { context . addStep ( new AbstractDeploymentChainStep ( ) { @ Override protected void execute ( DeploymentProcessorTarget processorTarget ) { processorTarget . addDeploymentProcessor ( SUBSYSTEM_NAME , PARSE , PARSE_EE_ANNOTATIONS , new MessagingJMSDefinitionAnnotationParser ( ) ) ; processorTarget . addDeploymentProcessor ( SUBSYSTEM_NAME , PARSE , PARSE_MESSAGING_XML_RESOURCES , new MessagingXmlParsingDeploymentUnitProcessor ( ) ) ; processorTarget . addDeploymentProcessor ( SUBSYSTEM_NAME , DEPENDENCIES , DEPENDENCIES_JMS , new MessagingDependencyProcessor ( ) ) ; processorTarget . addDeploymentProcessor ( SUBSYSTEM_NAME , POST_MODULE , POST_MODULE_JMS_CDI_EXTENSIONS , new CDIDeploymentProcessor ( ) ) ; <START_BUG> processorTarget . addDeploymentProcessor ( SUBSYSTEM_NAME , POST_MODULE , POST_MODULE_JMS_DEFINITION_DEPLOYMENT , new MessagingJMSDefinitionDeploymentProcessor ( ) ) ; <END_BUG> processorTarget . addDeploymentProcessor ( SUBSYSTEM_NAME , INSTALL , INSTALL_JMS_BINDINGS , new MessagingJndiBindingProcessor ( ) ) ; processorTarget . addDeploymentProcessor ( SUBSYSTEM_NAME , INSTALL , INSTALL_MESSAGING_XML_RESOURCES , new MessagingXmlInstallDeploymentUnitProcessor ( ) ) ; } } , RUNTIME ) ; } }

Fix:
processorTarget . addDeploymentProcessor ( SUBSYSTEM_NAME , POST_MODULE , POST_MODULE_EJB_REF , new MessagingJMSDefinitionDeploymentProcessor ( ) ) ;
Buggy code:
public class EmptyStatement extends Statement { private static final List PROPERTY_DESCRIPTORS ; public static List propertyDescriptors ( int apiLevel ) { } EmptyStatement ( AST ast ) { } final List internalStructuralPropertiesForType ( int apiLevel ) { } final int getNodeType0 ( ) { } ASTNode clone0 ( AST target ) { EmptyStatement result = new EmptyStatement ( target ) ; <START_BUG> result . setSourceRange ( this . getStartPosition ( ) , this . getLength ( ) ) ; <END_BUG> result . copyLeadingComment ( this ) ; return result ; } final boolean subtreeMatch0 ( ASTMatcher matcher , Object other ) { } void accept0 ( ASTVisitor visitor ) { } int treeSize ( ) { } }

Fix:
result . setSourceRange ( getStartPosition ( ) , getLength ( ) ) ;
Buggy code:
public class WebDriverLocalModule implements ModuleProvider < RemoteWebDriverInterface > { public static class Chrome extends WebDriverLocalModule implements PooledModule < RemoteWebDriverInterface > { @ Override public Object makeObject ( ) throws Exception { } } public static class Firefox extends WebDriverLocalModule implements PooledModule < RemoteWebDriverInterface > { @ Override public Object makeObject ( ) throws Exception { } } public static class HtmlUnitFirefox extends WebDriverLocalModule implements PooledModule < RemoteWebDriverInterface > { @ Override public Object makeObject ( ) throws Exception { } } public static class HtmlUnitIE6 extends WebDriverLocalModule implements PooledModule < RemoteWebDriverInterface > { @ Override public Object makeObject ( ) throws Exception { } } public String getName ( ) { } public Class < ? extends RemoteWebDriverInterface > getTargetClass ( ) { } public Map < String , Class < ? > > getDependencyDefinition ( ) { } public RemoteWebDriverInterface create ( Map < String , ? > dependencies ) { } public void destroy ( ) { } public String getModuleType ( ) { <START_BUG> return RemoteWebDriverInterface . class . getSimpleName ( ) ; <END_BUG> } public void destroyObject ( Object obj ) throws Exception { } public boolean validateObject ( Object obj ) { } public void activateObject ( Object obj ) throws Exception { } public void passivateObject ( Object obj ) throws Exception { } public int getMaxPoolElements ( ) { } }

Fix:
return WebDriverModule . class . getSimpleName ( ) ;
Buggy code:
public class OsisReader { private static final Logger LOGGER = LoggerFactory . getLogger ( OsisReader . class ) ; public static void main ( final String [ ] args ) throws Exception { final String version = "ESV" ; <START_BUG> final String ref = "1jo.3" ; <END_BUG> boolean format = true ; final Book currentBook = Books . installed ( ) . getBook ( version ) ; final BookData bookData = new BookData ( currentBook , currentBook . getKey ( ref ) ) ; final Element osisFragment = bookData . getOsisFragment ( ) ; final XMLOutputter xmlOutputter = new XMLOutputter ( ( format ? Format . getPrettyFormat ( ) : Format . getRawFormat ( ) ) ) ; OsisReader . LOGGER . debug ( xmlOutputter . outputString ( osisFragment ) ) ; final JSwordPassageServiceImpl jsi = new JSwordPassageServiceImpl ( TestUtils . mockVersificationService ( ) , null , null , null , TestUtils . mockVersionResolver ( ) , null ) ; final List < LookupOption > options = new ArrayList < LookupOption > ( ) ; options . add ( NOTES ) ; options . add ( HEADINGS ) ; options . add ( GREEK_ACCENTS ) ; final String osisText = jsi . getOsisText ( version , ref , options , "ESV" , NONE ) . getValue ( ) ; final SAXBuilder sb = new SAXBuilder ( ) ; try { final Document d = sb . build ( new StringReader ( osisText ) ) ; OsisReader . LOGGER . debug ( "Transformed<seq2seq4repair_space>is:\n<seq2seq4repair_space>{}" , xmlOutputter . outputString ( d ) ) ; xmlOutputter . outputString ( d ) ; } catch ( final JDOMParseException e ) { OsisReader . LOGGER . debug ( "Transformed<seq2seq4repair_space>is:\n<seq2seq4repair_space>[{}]" , osisText ) ; } OsisReader . LOGGER . debug ( "Double<seq2seq4repair_space>whitespace:<seq2seq4repair_space>{}" , osisText . contains ( "<seq2seq4repair_space>" ) ) ; } }

Fix:
final String ref = "Ps.1.1" ;
Buggy code:
public class Robot extends IterativeRobot { Joystick xbox360drive ; Joystick xbox360arm ; RobotDrive driveTrain1 ; Talon talon1 ; Talon talon2 ; DriveTrainGyro gyro1 ; Encoder encodeDriveL ; Encoder encodeDriveR ; ArmControl armControl ; BinArmSystem binArmSystem ; AutoProgram autoProgram ; int cameraSession ; Image imageFrame ; public void robotInit ( ) { talon1 = new Talon ( TALON_1_PORT ) ; talon2 = new Talon ( TALON_2_PORT ) ; talon1 . enableDeadbandElimination ( true ) ; talon2 . enableDeadbandElimination ( true ) ; driveTrain1 = new RobotDrive ( talon1 , talon2 ) ; driveTrain1 . setInvertedMotor ( kFrontLeft , true ) ; driveTrain1 . setInvertedMotor ( kRearLeft , true ) ; driveTrain1 . setInvertedMotor ( kFrontRight , true ) ; driveTrain1 . setInvertedMotor ( kRearRight , true ) ; gyro1 = new DriveTrainGyro ( driveTrain1 , GYRO1_PORT ) ; xbox360drive = new Joystick ( XBOX0_PORT ) ; xbox360arm = new Joystick ( XBOX1_PORT ) ; armControl = ArmControl . setupInstance ( xbox360arm ) ; binArmSystem = new BinArmSystem ( xbox360arm ) ; encodeDriveL = new Encoder ( 1 , 0 , false , EncodingType . k4X ) ; encodeDriveL . setDistancePerPulse ( ENCODER_DIST_PER_PULSE ) ; encodeDriveL . reset ( ) ; <START_BUG> autoProgram = new AutoProgram ( talon1 , talon2 , encodeDriveL ) ; <END_BUG> autoProgram . setProgram ( AUTO_RECYCLE ) ; setUpSmartDashboard ( ) ; setUpCamera ( ) ; } public void disabledInit ( ) { } public void autonomousInit ( ) { } public void autonomousPeriodic ( ) { } public void teleopInit ( ) { } public void teleopPeriodic ( ) { } private void normalDrive ( ) { } public void testInit ( ) { } public void testPeriodic ( ) { } void setUpSmartDashboard ( ) { } void setUpCamera ( ) { } }

Fix:
autoProgram = new AutoProgram ( talon1 , talon2 , encodeDriveL , gyro1 ) ;
Buggy code:
public class BridgeAdd extends AbstractAddStepHandler { public static final BridgeAdd INSTANCE = new BridgeAdd ( ) ; private BridgeAdd ( ) { } @ Override protected void populateModel ( ModelNode operation , ModelNode model ) throws OperationFailedException { model . setEmptyObject ( ) ; <START_BUG> AlternativeAttributeCheckHandler . checkAlternatives ( operation , BridgeDefinition . CONNECTOR_REFS . getName ( ) , BridgeDefinition . DISCOVERY_GROUP_NAME . getName ( ) ) ; <END_BUG> for ( final AttributeDefinition attributeDefinition : BridgeDefinition . ATTRIBUTES ) { attributeDefinition . validateAndSet ( operation , model ) ; } if ( operation . hasDefined ( FAILOVER_ON_SERVER_SHUTDOWN . getName ( ) ) ) { PathAddress pa = PathAddress . pathAddress ( operation . require ( OP_ADDR ) ) ; MESSAGING_LOGGER . deprecatedAttribute ( FAILOVER_ON_SERVER_SHUTDOWN . getName ( ) , pa ) ; } } @ Override protected void performRuntime ( OperationContext context , ModelNode operation , ModelNode model , ServiceVerificationHandler verificationHandler , List < ServiceController < ? > > newControllers ) throws OperationFailedException { } static void addBridgeConfigs ( final OperationContext context , final Configuration configuration , final ModelNode model ) throws OperationFailedException { } static BridgeConfiguration createBridgeConfiguration ( final OperationContext context , final String name , final ModelNode model ) throws OperationFailedException { } private static List < String > getStaticConnectors ( ModelNode model ) { } static void createBridge ( String name , BridgeConfiguration bridgeConfig , HornetQServerControl serverControl ) { } }

Fix:
AlternativeAttributeCheckHandler . checkAlternatives ( operation , BridgeDefinition . CONNECTOR_REFS . getName ( ) , BridgeDefinition . DISCOVERY_GROUP_NAME . getName ( ) , false ) ;
Buggy code:
@ Controller public class ChatController { private static final Logger logger = Logger . getLogger ( ChatController . class . getName ( ) ) ; @ Autowired private ProfanityChecker profanityFilter ; @ Autowired private SessionProfanity profanity ; @ Autowired private WebSocketMessageBrokerStats stats ; @ Autowired private ParticipantRepository participantRepository ; @ Autowired private SimpMessagingTemplate simpMessagingTemplate ; @ Autowired private MessageService messageService ; @ Autowired private UserService userService ; @ SubscribeMapping ( "//chat.participants" ) public Collection < LoginEvent > retrieveParticipants ( ) { } @ MessageMapping ( "//chat.message" ) public ChatMessage filterMessage ( Message message , @ Payload ChatMessage chatMessage , Principal principal ) { } @ MessageMapping ( "//chat.private.{username}" ) public void filterPrivateMessage ( Message message , @ Payload ChatMessage chatMessage , @ DestinationVariable ( "username" ) String username , Principal principal ) { <START_BUG> if ( StringUtils . hasText ( username ) ) { <END_BUG> throw new InvalidUserLoginException ( username ) ; } if ( ! ( userService . checkUserExists ( username ) ) ) { throw new UserDoesNotExistException ( username ) ; } checkProfanityAndSanitize ( chatMessage ) ; messageService . saveMessage ( setUpMessage ( chatMessage , principal , username , message ) ) ; simpMessagingTemplate . convertAndSend ( ( ( "//user//" + username ) + "//queue//chat.message" ) , chatMessage ) ; } private void checkProfanityAndSanitize ( ChatMessage message ) { } @ MessageExceptionHandler @ SendToUser ( value = "//queue//errors" , broadcast = false ) public String handleProfanity ( MessageHandlingException e ) { } @ RequestMapping ( "//stats" ) @ ResponseBody public WebSocketMessageBrokerStats showStats ( ) { } No newline ; at end ; of file ; }

Fix:
if ( ! ( StringUtils . hasText ( username ) ) ) {
Buggy code:
public class SchemaTreeCell extends TreeCell < String > { public SchemaTreeCell ( ) { } @ Override public void updateItem ( String item , boolean empty ) { super . updateItem ( item , empty ) ; if ( getStyleClass ( ) . contains ( "schemaNodeEmpty" ) ) getStyleClass ( ) . remove ( "schemaNodeEmpty" ) ; if ( empty || ( item == null ) ) { setText ( null ) ; setGraphic ( null ) ; if ( getStyleClass ( ) . contains ( "schemaNode" ) ) getStyleClass ( ) . remove ( "schemaNode" ) ; if ( getStyleClass ( ) . contains ( "tree-cell" ) ) getStyleClass ( ) . remove ( "tree-cell" ) ; } else { if ( ! ( getStyleClass ( ) . contains ( "tree-cell" ) ) ) getStyleClass ( ) . add ( "tree-cell" ) ; HBox hbox = new HBox ( ) ; hbox . setAlignment ( Pos . BOTTOM_LEFT ) ; Label lab = new Label ( item ) ; lab . getStyleClass ( ) . add ( "cellText" ) ; ImageView icon = null ; TreeItem < String > treeItem = getTreeItem ( ) ; if ( treeItem == null ) return ; boolean addHbox = false ; if ( treeItem instanceof SchemaNode ) { if ( ! ( getStyleClass ( ) . contains ( "schemaNode" ) ) ) getStyleClass ( ) . add ( "schemaNode" ) ; SchemaNode itemNode = ( ( SchemaNode ) ( treeItem ) ) ; <START_BUG> icon = new ImageView ( itemNode . getImage ( ) ) ; <END_BUG> updateDObj ( item ) ; addHbox = true ; } else { if ( treeItem instanceof SipPreviewNode ) { addHbox = true ; SipPreviewNode sipNode = ( ( SipPreviewNode ) ( treeItem ) ) ; icon = new ImageView ( sipNode . getIcon ( ) ) ; if ( sipNode . isContentModified ( ) ) { setText ( "*" ) ; } else setText ( "" ) ; } } if ( addHbox ) { hbox . getChildren ( ) . addAll ( icon , lab ) ; setGraphic ( hbox ) ; } } } private void updateDObj ( String title ) { } }

Fix:
icon = new ImageView ( itemNode . getIcon ( ) ) ;
Buggy code:
public class BinaryFormsTestCase extends CommandTestCase { public BinaryFormsTestCase ( String name ) { } public void testJar1 ( ) throws IOException { List args = new ArrayList ( ) ; args . add ( "-outjar" ) ; args . add ( "out//lib.jar" ) ; args . add ( "-classpath" ) ; args . add ( "..//runtime//bin" ) ; args . add ( "-d" ) ; args . add ( "out" ) ; args . add ( "testdata//src1//binary//lib//ConcreteA.aj" ) ; args . add ( "testdata//src1//binary//lib//AbstractA.aj" ) ; CommandTestCase . runCompiler ( args , NO_ERRORS ) ; args = new ArrayList ( ) ; args . add ( "-aspectpath" ) ; args . add ( "out//lib.jar" ) ; args . add ( "-classpath" ) ; args . add ( "..//runtime//bin" ) ; args . add ( "-d" ) ; args . add ( "out" ) ; args . add ( "testdata//src1//binary//client//Client.java" ) ; args . add ( "testdata//src1//binary//client//Client1.java" ) ; CommandTestCase . runCompiler ( args , NO_ERRORS ) ; TestUtil . runMain ( "out;out//lib.jar" , "client.Client" ) ; TestUtil . runMain ( "out;out//lib.jar" , "client.Client1" ) ; args = new ArrayList ( ) ; args . add ( "-aspectpath" ) ; args . add ( "out//lib.jar" ) ; args . add ( "-classpath" ) ; args . add ( "..//runtime//bin" ) ; args . add ( "-d" ) ; args . add ( "out" ) ; args . add ( "testdata//src1//binary//client//MyAspect.aj" ) ; args . add ( "testdata//src1//binary//client//Client1.java" ) ; CommandTestCase . runCompiler ( args , NO_ERRORS ) ; TestUtil . runMain ( "out;out//lib.jar" , "client.Client1" ) ; args = new ArrayList ( ) ; args . add ( "-aspectpath" ) ; args . add ( "out//lib.jar" ) ; args . add ( "-classpath" ) ; args . add ( "..//runtime//bin" ) ; args . add ( "-d" ) ; args . add ( "out" ) ; args . add ( "testdata//src1//binary//client//MyAspect1.aj" ) ; args . add ( "testdata//src1//binary//client//Client1.java" ) ; CommandTestCase . runCompiler ( args , new int [ ] { 24 , 30 } ) ; args = new ArrayList ( ) ; args . add ( "-classpath" ) ; args . add ( "..//runtime//bin;out//lib.jar" ) ; args . add ( "-d" ) ; args . add ( "out" ) ; args . add ( "testdata//src1//binary//client//Client1.java" ) ; <START_BUG> CommandTestCase . runCompiler ( args , new int [ ] { 9 , 11 , 15 , 17 } ) ; <END_BUG> args = new ArrayList ( ) ; args . add ( "-classpath" ) ; args . add ( "..//runtime//bin;out//lib.jar" ) ; args . add ( "-Xlint:error" ) ; args . add ( "-d" ) ; args . add ( "out" ) ; args . add ( "testdata//src1//binary//client//MyAspect.aj" ) ; args . add ( "testdata//src1//binary//client//Client1.java" ) ; CommandTestCase . runCompiler ( args , NO_ERRORS ) ; } }

Fix:
CommandTestCase . runCompiler ( args , new int [ ] { 15 , 17 , 22 } ) ;
Buggy code:
public class Iteration2PurchaseController implements PurchaseController { private PopInventory popInventory ; private CoinInventory coinInventory ; private CoinLocationManager coinLocationManager ; private CardManager cardManager ; public Iteration2PurchaseController ( PopInventory pop , CoinInventory coin , CoinLocationManager coinLocation , CardManager card ) { } @ Override public void disabled ( AbstractHardware < AbstractHardwareListener > arg0 ) { } @ Override public void enabled ( AbstractHardware < AbstractHardwareListener > arg0 ) { } @ Override public void pressed ( SelectionButton arg0 ) { int cost = popInventory . getCost ( arg0 ) ; if ( ! ( popInventory . hasPop ( arg0 ) ) ) { out . print ( "Notice:<seq2seq4repair_space>No<seq2seq4repair_space>Pop<seq2seq4repair_space>of<seq2seq4repair_space>that<seq2seq4repair_space>type" ) ; return ; } if ( ( coinInventory . getReceptacleAmount ( ) ) >= cost ) { if ( ChangeMaker . makeChange ( ( ( coinInventory . getReceptacleAmount ( ) ) - cost ) , coinLocationManager . getCoinRackMap ( ) , coinInventory ) ) { popInventory . dispense ( arg0 ) ; try { coinLocationManager . getCoinReceptacle ( ) . storeCoins ( ) ; } catch ( Exception e ) { coinInventory . coinsRemoved ( coinLocationManager . getCoinReceptacle ( ) ) ; } } else { <START_BUG> out . print ( "Notice:<seq2seq4repair_space>Cannot<seq2seq4repair_space>Make<seq2seq4repair_space>Change" ) ; <END_BUG> } } else if ( cardManager . hasCard ( ) ) { out . print ( "Notice:<seq2seq4repair_space>Please<seq2seq4repair_space>Enter<seq2seq4repair_space>PIN" ) ; String PIN = null ; if ( cardManager . verify ( PIN ) ) { cost -= coinInventory . getReceptacleAmount ( ) ; if ( cardManager . charge ( cost , PIN ) ) { try { coinLocationManager . getCoinReceptacle ( ) . storeCoins ( ) ; } catch ( CapacityExceededException | DisabledException e ) { } catch ( Exception e ) { coinInventory . coinsRemoved ( coinLocationManager . getCoinReceptacle ( ) ) ; } popInventory . dispense ( arg0 ) ; } else { out . print ( "Notice:<seq2seq4repair_space>Cannot<seq2seq4repair_space>Charge<seq2seq4repair_space>Card" ) ; } } else { out . print ( "Notice:<seq2seq4repair_space>PIN<seq2seq4repair_space>Not<seq2seq4repair_space>Valid" ) ; } } else { out . print ( ( "Notice:<seq2seq4repair_space>Price<seq2seq4repair_space>of<seq2seq4repair_space>Pop<seq2seq4repair_space>is<seq2seq4repair_space>" + ( ChangeMaker . toMoney ( popInventory . getCost ( arg0 ) ) ) ) ) ; } } }

Fix:
out . print ( "Notice:<seq2seq4repair_space>Cannot<seq2seq4repair_space>Make<seq2seq4repair_space>Change.<seq2seq4repair_space>Please<seq2seq4repair_space>call<seq2seq4repair_space>(555)555-5555." ) ;
Buggy code:
public class Assignment extends Expression { public Reference lhs ; public Expression expression ; public TypeBinding lhsType ; public Assignment ( Expression lhs , Expression expression , int sourceEnd ) { } public FlowInfo analyseCode ( BlockScope currentScope , FlowContext flowContext , FlowInfo flowInfo ) { } public void generateCode ( BlockScope currentScope , CodeStream codeStream , boolean valueRequired ) { } public TypeBinding resolveType ( BlockScope scope ) { constant = NotAConstant ; this . lhsType = lhs . resolveType ( scope ) ; TypeBinding expressionTb = expression . resolveType ( scope ) ; if ( ( ( this . lhsType ) == null ) || ( expressionTb == null ) ) return null ; <START_BUG> if ( ( ( expression . isConstantValueOfTypeAssignableToType ( expressionTb , this . lhsType ) ) || ( ( this . lhsType . isBaseType ( ) ) && ( BaseTypeBinding . isWidening ( this . lhsType . id , expressionTb . id ) ) ) ) || ( scope . areTypesCompatible ( expressionTb , this . lhsType ) ) ) { <END_BUG> expression . implicitWidening ( this . lhsType , expressionTb ) ; return this . lhsType ; } scope . problemReporter ( ) . typeMismatchErrorActualTypeExpectedType ( expression , expressionTb , this . lhsType ) ; return null ; } public String toString ( int tab ) { } public String toStringExpression ( ) { } public String toStringExpressionNoParenthesis ( ) { } public void traverse ( IAbstractSyntaxTreeVisitor visitor , BlockScope scope ) { } }

Fix:
if ( ( ( expression . isConstantValueOfTypeAssignableToType ( expressionTb , this . lhsType ) ) || ( ( this . lhsType . isBaseType ( ) ) && ( BaseTypeBinding . isWidening ( this . lhsType . id , expressionTb . id ) ) ) ) || ( org . eclipse . jdt . internal . compiler . lookup . Scope . areTypesCompatible ( expressionTb , this . lhsType ) ) ) {
Buggy code:
public class HoldrProjectResolver extends AbstractProjectResolverExtension { private static final Logger LOGGER = Logger . getInstance ( HoldrProjectResolver . class ) ; @ Override public void populateModuleExtraModels ( IdeaModule gradleModule , DataNode < ModuleData > ideModule ) { } @ Override @ NotNull public Set < Class > getExtraProjectModelClasses ( ) { <START_BUG> return Sets . < Class > newHashSet ( AndroidProject . class ) ; <END_BUG> } }

Fix:
return Sets . < Class > newHashSet ( AndroidProject . class , HoldrCompiler . class ) ;
Buggy code:
public class ActionSetModelElementNamespace extends UMLChangeAction { public static final ActionSetModelElementNamespace SINGLETON = new ActionSetModelElementNamespace ( ) ; protected ActionSetModelElementNamespace ( ) { } public void actionPerformed ( ActionEvent e ) { super . actionPerformed ( e ) ; Object source = e . getSource ( ) ; MNamespace oldNamespace = null ; MNamespace newNamespace = null ; MModelElement m = null ; if ( source instanceof UMLComboBox2 ) { UMLComboBox2 box = ( ( UMLComboBox2 ) ( source ) ) ; Object o = box . getTarget ( ) ; if ( o instanceof MModelElement ) { m = ( ( MModelElement ) ( o ) ) ; oldNamespace = m . getNamespace ( ) ; } o = box . getSelectedItem ( ) ; if ( o instanceof MNamespace ) { newNamespace = ( ( MNamespace ) ( o ) ) ; } } <START_BUG> if ( ( newNamespace != oldNamespace ) && ( m != null ) ) { <END_BUG> m . setNamespace ( newNamespace ) ; } } }

Fix:
if ( ( ( newNamespace != oldNamespace ) && ( m != null ) ) && ( newNamespace != null ) ) {
Buggy code:
public class TimeDV extends AbstractDateTimeDV { public Object getActualValue ( String content , ValidationContext context ) throws InvalidDatatypeValueException { try { <START_BUG> return parse ( content ) ; <END_BUG> } catch ( Exception ex ) { throw new InvalidDatatypeValueException ( "cvc-datatype-valid.1.2.1" , new Object [ ] { content , "time" } ) ; } } protected int [ ] parse ( String str ) throws SchemaDateTimeException { } protected String dateToString ( int [ ] date ) { } }

Fix:
return new DateTimeData ( parse ( content ) , this ) ;
Buggy code:
public class CityActivity extends AppCompatActivity implements LoaderCallbacks < Cursor > { private UtilCursorAdapter adapter ; @ Override protected void onCreate ( Bundle savedInstanceState ) { } @ Override protected void onDestroy ( ) { <START_BUG> getLoaderManager ( ) . destroyLoader ( 0 ) ; <END_BUG> super . onDestroy ( ) ; } @ Override public Loader < Cursor > onCreateLoader ( int id , Bundle args ) { } @ Override public void onLoadFinished ( Loader < Cursor > loader , Cursor data ) { } @ Override public void onLoaderReset ( Loader < Cursor > loader ) { } }

Fix:
getSupportLoaderManager ( ) . destroyLoader ( 0 ) ;
Buggy code:
public class Claim { private static DateFormat dateFormat = new SimpleDateFormat ( "MM//dd//yyyy" , Locale . US ) ; private User Claimant ; private User approver ; private String comment ; private int id ; private String name ; private Date startDate ; private Date endDate ; private String Description ; private String Status ; private ArrayList < Destination > destinations ; private ExpenseList expenseList ; private ArrayList < String > tagList ; private ArrayList < Listener > listeners ; public Claim ( String name , Date startDate , Date endDate , String description , User Claimant , int id ) { } public void returnClaim ( String name ) throws Exception { } public void approveClaim ( String name ) throws Exception { } public boolean editable ( ) { } public boolean incomplete ( ) { } public String toStringApproverList ( ) { } public String toStringClaimantList ( ) { } public String destinationsToString ( ) { } public String destinationsListToString ( ) { } public String toStringList ( ArrayList < String > list ) { } public String toStringTagList ( ArrayList < String > list ) { String string = "" ; for ( int i = 0 ; i < ( list . size ( ) ) ; i ++ ) { <START_BUG> if ( ( i + 1 ) == ( list . size ( ) ) ) { <END_BUG> string += ( list . get ( i ) ) + ",<seq2seq4repair_space>" ; } else { string += list . get ( i ) ; } } return string ; } public String toEmail ( ) { } public boolean equals ( Claim claim ) { } public void removeItem ( int i ) { } public void addItem ( ExpenseItem item ) { } public boolean containsItem ( ExpenseItem Item ) { } public void addDestination ( Destination destination ) throws AlreadyExistsException { } public void removeDestination ( int i ) { } public boolean containsDestination ( Destination Destination ) { } public void removeTag ( int pos ) { } public void addTag ( String tag ) throws AlreadyExistsException { } public boolean containsTag ( String tag ) { } public int getId ( ) { } public ArrayList < ExpenseItem > getExpenseItems ( ) { } public void setExpenseItems ( ArrayList < ExpenseItem > expenseItems ) { } public String getName ( ) { } public void setName ( String name ) { } public User getClaimant ( ) { } public void setClaimant ( User name ) { } public String getComment ( ) { } public void setComment ( String comment ) { } public String getDescription ( ) { } public void setDescription ( String desc ) { } public String getStatus ( ) { } public void setStatus ( String status ) { } public Date getStartDate ( ) { } public void setStartDate ( Date startDate ) { } public Date getEndDate ( ) { } public void setEndDate ( Date endDate ) { } public ArrayList < Destination > getDestination ( ) { } public void setDestination ( ArrayList < Destination > destination ) { } public User getApprover ( ) { } public void setApprover ( User app ) { } public ArrayList < String > getTagList ( ) { } public void setTagList ( ArrayList < String > list ) { } public ArrayList < String > getTotal ( ) { } private ArrayList < Listener > getListeners ( ) { } private void notifyListeners ( ) { } public void addListener ( Listener L ) { } public void removeListener ( Listener l ) { } }

Fix:
if ( ( i + 1 ) != ( list . size ( ) ) ) {
Buggy code:
public class StaticContentStep extends WizardStep { private static final long serialVersionUID = 1L ; private final boolean allowHtml ; private IModel content ; public StaticContentStep ( boolean allowHtml ) { } public StaticContentStep ( IModel title , IModel summary , IModel content , boolean allowHtml ) { } public StaticContentStep ( IModel title , IModel summary , String content , boolean allowHtml ) { } public StaticContentStep ( String title , String summary , IModel content , boolean allowHtml ) { } public StaticContentStep ( String title , String summary , String content , boolean allowHtml ) { } public final boolean getAllowHtml ( ) { } public final String getContent ( ) { <START_BUG> return ( content ) != null ? ( ( String ) ( content . getObject ( this ) ) ) : null ; <END_BUG> } public final IModel getContentModel ( ) { } public final void setContentModel ( IModel content ) { } }

Fix:
return ( content ) != null ? ( ( String ) ( content . getObject ( ) ) ) : null ;
Buggy code:
public class HttpTestSampleGui2 extends HttpTestSampleGui { public HttpTestSampleGui2 ( ) { } public TestElement createTestElement ( ) { } public String getStaticLabel ( ) { <START_BUG> return ( super . getStaticLabel ( ) ) + "<seq2seq4repair_space>HTTPCLient<seq2seq4repair_space>(ALPHA)" ; <END_BUG> } }

Fix:
return ( super . getStaticLabel ( ) ) + "<seq2seq4repair_space>HTTPCLient" ;
Buggy code:
public class PointCounter { private ArrayList < String > list = new ArrayList < String > ( ) ; public PointCounter ( ) { } PlayerPanel playerPanels = new PlayerPanel ( ) ; public int getPointVal ( String string ) { } private int thePoints ( String theString ) { int score = 0 ; String delims = "" ; String [ ] charArray = theString . split ( delims ) ; <START_BUG> for ( int i = 1 ; i <= ( theString . length ( ) ) ; i ++ ) { <END_BUG> String thePointChar = charArray [ i ] ; score = score + ( valueOfCharacter ( thePointChar ) ) ; } return score ; } public static ArrayList < String > readWordsFromFile ( String filename ) { } public int valueOfCharacter ( String thePointChar ) { } }

Fix:
for ( int i = 1 ; i < ( theString . length ( ) ) ; i ++ ) {