nus-yam/ex-repair huggingface dataset:
Buggy code:
public class AspectDeclaration extends MemberTypeDeclaration { private Aspect aspectAttribute ; public PerClause perClause ; public ResolvedMember aspectOfMethod ; public ResolvedMember hasAspectMethod ; public boolean isPrivileged ; public EclipseObjectType typeX ; public EclipseWorld world ; public TypePattern dominatesPattern ; public AspectDeclaration ( CompilationResult compilationResult ) { } public boolean isAbstract ( ) { } public void resolve ( ) { <START_BUG> if ( ( ( binding ) == null ) || ( ignoreFurtherInvestigation ) ) { <END_BUG> ignoreFurtherInvestigation = true ; return ; } if ( ( typeX ) != null ) typeX . checkPointcutDeclarations ( ) ; super . resolve ( ) ; } public void checkSpec ( ClassScope scope ) { } public void generateCode ( ClassFile enclosingClassFile ) { } public boolean needClassInitMethod ( ) { } protected void generateAttributes ( ClassFile classFile ) { } private void generatePerSupportMembers ( ClassFile classFile ) { } private static interface BodyGenerator { public void generate ( CodeStream codeStream ) { } } private void generateMethod ( ClassFile classFile , ResolvedMember member , AspectDeclaration . BodyGenerator gen ) { } private void generateMethod ( ClassFile classFile , MethodBinding methodBinding , AspectDeclaration . BodyGenerator gen ) { } private void generatePerCflowAspectOfMethod ( ClassFile classFile ) { } private void generatePerCflowHasAspectMethod ( ClassFile classFile ) { } private void generatePerCflowPushMethod ( ClassFile classFile ) { } private void generatePerCflowAjcClinitMethod ( ClassFile classFile ) { } private TypeBinding generatePerObjectInterface ( ClassFile classFile ) { } private void generatePerObjectAspectOfMethod ( ClassFile classFile , final TypeBinding interfaceType ) { } private void generatePerObjectHasAspectMethod ( ClassFile classFile , final TypeBinding interfaceType ) { } private void generatePerObjectBindMethod ( ClassFile classFile , final TypeBinding interfaceType ) { } private void generatePerSingletonAspectOfMethod ( ClassFile classFile ) { } private void generatePerSingletonHasAspectMethod ( ClassFile classFile ) { } private void generatePerSingletonAjcClinitMethod ( ClassFile classFile ) { } private Kind lookupPerClauseKind ( ReferenceBinding binding ) { } private void buildPerClause ( ClassScope scope ) { } private PerClause resolvePerClause ( ) { } public void buildInterTypeAndPerClause ( ClassScope classScope ) { } public String toString ( int tab ) { } public String toStringBody ( int tab ) { } public String toStringHeader ( ) { } }

Fix:
if ( ( binding ) == null ) {
Buggy code:
public abstract class AbstractResourcePropertyStore implements ResourcePropertyStore { static Logger log = LoggerFactory . getLogger ( AbstractResourcePropertyStore . class ) ; Map < String , String > cachedValues = new HashMap < String , String > ( ) ; Map < String , PropertyTemplate > templates = new HashMap < String , PropertyTemplate > ( ) ; Map < String , List < PropertyTemplate > > templatesByModule = new HashMap < String , List < PropertyTemplate > > ( ) ; EncryptionService encryptionService ; public AbstractResourcePropertyStore ( EncryptionService encryptionService ) { } public AbstractResourcePropertyStore ( ) { } protected void setEncryptionService ( EncryptionService encryptionService ) { } protected abstract String lookupPropertyValue ( PropertyTemplate template ) { } protected abstract void doSetProperty ( PropertyTemplate template , String value ) { } @ Override public void setProperty ( PropertyTemplate template , String value ) { } @ Override public String getPropertyValue ( PropertyTemplate template ) { } private String createCacheKey ( String resourceKey , AbstractResource resource ) { } @ Override public void registerTemplate ( PropertyTemplate template , String module ) { } @ Override public PropertyTemplate getPropertyTemplate ( String resourceKey ) { } protected abstract String lookupPropertyValue ( AbstractPropertyTemplate template , AbstractResource resource ) { } @ Override public String getPropertyValue ( AbstractPropertyTemplate template , AbstractResource resource ) { } protected abstract void doSetProperty ( AbstractPropertyTemplate template , AbstractResource resource , String value ) { } @ Override public void setPropertyValue ( AbstractPropertyTemplate template , AbstractResource resource , String value ) { String cacheKey = createCacheKey ( template . getResourceKey ( ) , resource ) ; <START_BUG> if ( template . isEncrypted ( ) ) { <END_BUG> value = encryptValue ( cacheKey , value ) ; doSetProperty ( template , resource , value ) ; } else { doSetProperty ( template , resource , value ) ; } cachedValues . remove ( cacheKey ) ; cachedValues . put ( cacheKey , value ) ; } private String encryptValue ( String cacheKey , String value ) { } private String decryptValue ( String cacheKey , String value ) { } }

Fix:
if ( ( template . isEncrypted ( ) ) && ( ! ( value . startsWith ( "!ENC!" ) ) ) ) {
Buggy code:
public class Level implements Serializable { private int xSize ; private int ySize ; private int difficulty ; private CellEntity [ ] [ ] cells ; private LinkedList < Enemy > enemies ; private Player player ; public Level ( int xSize , int ySize , int difficulty ) { } public int getXSize ( ) { } public int getYSize ( ) { } public int getDifficulty ( ) { } public void setDifficulty ( int newDifficulty ) { } public boolean gameover ( ) { } public boolean levelCleared ( ) { } public boolean isFree ( int x , int y ) { if ( ( player ) != null ) { for ( int pX = ( player . getX ( ) ) - 1 ; pX <= ( ( player . getX ( ) ) + 1 ) ; pX ++ ) { for ( int pY = ( player . getY ( ) ) - 1 ; pY <= ( ( player . getY ( ) ) + 1 ) ; pY ++ ) { <START_BUG> if ( ( isValid ( pX , pY ) ) && ( ( cells [ x ] [ y ] ) != null ) ) <END_BUG> return false ; } } } if ( isValid ( x , y ) ) return ( cells [ x ] [ y ] ) == null ; return false ; } public boolean isValid ( int x , int y ) { } public boolean isEnemy ( int x , int y ) { } public boolean isWall ( int x , int y ) { } public boolean isPortal ( int x , int y ) { } public Player getPlayer ( ) { } public CellEntity getEntity ( int x , int y ) { } public int getEnemyCount ( ) { } public Enemy getEnemy ( int index ) { } public void killPlayer ( ) { } public void clearCell ( int x , int y ) { } public void moveEntity ( int oldX , int oldY , int newX , int newY ) { } public void removeEnemy ( Enemy enemy ) { } public boolean addEnemy ( Enemy enemy ) { } public boolean addPlayer ( Player player ) { } public boolean addWall ( Wall wall ) { } public boolean addPortal ( Portal portal ) { } }

Fix:
if ( ( isValid ( pX , pY ) ) && ( ( cells [ pX ] [ pY ] ) != null ) )
Buggy code:
public class LordVetinari implements WinningCircumstances { @ Override public Boolean isWinner ( ) { int numberOfPlayers = playersInGame . size ( ) ; Player currentPlayer = null ; for ( Player player : BoardGame . playersInGame ) { <START_BUG> if ( player . getWinningCondition ( ) . equals ( "" ) ) { <END_BUG> currentPlayer = player ; } } if ( ( ( currentPlayer != null ) && ( ( currentPlayer . getPlayerAreas ( ) ) != null ) ) && ( ! ( currentPlayer . getPlayerAreas ( ) . isEmpty ( ) ) ) ) { if ( ( numberOfPlayers == 2 ) && ( ( currentPlayer . getPlayerAreas ( ) . size ( ) ) == 11 ) ) return Boolean . TRUE ; else if ( ( numberOfPlayers == 3 ) && ( ( currentPlayer . getPlayerAreas ( ) . size ( ) ) == 10 ) ) return Boolean . TRUE ; else if ( ( numberOfPlayers == 4 ) && ( ( currentPlayer . getPlayerAreas ( ) . size ( ) ) == 9 ) ) return Boolean . TRUE ; else return Boolean . FALSE ; } else return Boolean . FALSE ; } }

Fix:
if ( player . getWinningCondition ( ) . equals ( PersonalityCards . get ( 2 ) ) ) {
Buggy code:
public final class JoranDocument extends DefaultHandler { public static final String LOG4J_NS = "http:////jakarta.apache.org//log4j//" ; public static final String LS_NS = "http:////logging.apache.org//" ; private final List errorList ; private final List events = new ArrayList ( 20 ) ; private SAXParseException fatalError ; private Locator location ; public JoranDocument ( final List errorList ) { } public void error ( final SAXParseException spe ) { } public void fatalError ( final SAXParseException spe ) { } public void warning ( final SAXParseException spe ) { } private void errorReport ( final SAXParseException spe ) { } public void startElement ( final String namespaceURI , final String localName , final String qName , final Attributes attributes ) { } public void endElement ( final String namespaceURI , final String localName , final String qName ) { <START_BUG> if ( ( ( namespaceURI == null ) || ( ( namespaceURI . length ( ) ) == 0 ) ) || ( namespaceURI . equals ( JoranDocument . LOG4J_NS ) ) ) { <END_BUG> events . add ( new JoranDocument . EndElementEvent ( localName , location ) ) ; } } public void replay ( final ContentHandler handler ) throws SAXException { } public InputSource resolveEntity ( final String publicId , final String systemId ) throws SAXException { } public void setDocumentLocator ( Locator location ) { } private abstract static class ElementEvent { private String localName ; private Locator location ; ElementEvent ( final String localName , final Locator location ) { } public final String getLocalName ( ) { } public void replay ( final ContentHandler handler , final LocatorImpl replayLocation ) throws SAXException { } } private static class EndElementEvent extends JoranDocument . ElementEvent { public EndElementEvent ( final String localName , final Locator location ) { } public void replay ( final ContentHandler handler , final LocatorImpl replayLocation ) throws SAXException { } } private static class StartElementEvent extends JoranDocument . ElementEvent { private Attributes attributes ; public StartElementEvent ( final String localName , final Locator location , final Attributes attributes ) { } public void replay ( final ContentHandler handler , final LocatorImpl replayLocation ) throws SAXException { } } }

Fix:
if ( ( ( ( namespaceURI == null ) || ( ( namespaceURI . length ( ) ) == 0 ) ) || ( namespaceURI . equals ( JoranDocument . LOG4J_NS ) ) ) || ( namespaceURI . equals ( JoranDocument . LS_NS ) ) ) {
Buggy code:
public class BaseAlignCounts extends CommandLineTool { private static final Logger log = Logger . getLogger ( BaseAlignCounts . class ) ; @ Parameter ( names = { "-i" , "--input" } , description = "Input<seq2seq4repair_space>file<seq2seq4repair_space>(reads)" , required = true ) public IntervalFile < ? extends Interval > intervalFile ; @ Parameter ( names = { "-a" , "--assembly" } , description = "Genome<seq2seq4repair_space>assembly" , required = true ) public Assembly assembly ; @ Parameter ( names = { "-x" , "--extend" } , description = "Extend<seq2seq4repair_space>reads<seq2seq4repair_space>from<seq2seq4repair_space>5'<seq2seq4repair_space>end<seq2seq4repair_space>(default<seq2seq4repair_space>=<seq2seq4repair_space>read<seq2seq4repair_space>length)" ) public Integer extend ; @ Parameter ( names = { "-o" , "--output" } , description = "Output<seq2seq4repair_space>file<seq2seq4repair_space>(Wig)" , required = true ) public Path outputFile ; @ Override public void run ( ) throws IOException { BaseAlignCounts . log . debug ( "Initializing<seq2seq4repair_space>output<seq2seq4repair_space>file" ) ; int mapped = 0 ; try ( BufferedWriter writer = Files . newBufferedWriter ( outputFile , Charset . defaultCharset ( ) ) ) { TrackHeader header = new TrackHeader ( "wiggle_0" ) ; header . setName ( ( "Converted<seq2seq4repair_space>" + ( intervalFile . getPath ( ) . getFileName ( ) ) ) ) ; header . setDescription ( ( "Converted<seq2seq4repair_space>" + ( intervalFile . getPath ( ) . getFileName ( ) ) ) ) ; writer . write ( header . toString ( ) ) ; writer . newLine ( ) ; for ( String chr : assembly ) { BaseAlignCounts . log . debug ( ( "Processing<seq2seq4repair_space>chromosome<seq2seq4repair_space>" + chr ) ) ; writer . write ( ( ( "fixedStep<seq2seq4repair_space>chrom=" + chr ) + "<seq2seq4repair_space>start=1<seq2seq4repair_space>step=1<seq2seq4repair_space>span=1" ) ) ; writer . newLine ( ) ; int start = 1 ; while ( start < ( assembly . getChrLength ( chr ) ) ) { int stop = ( start + ( DEFAULT_CHUNK_SIZE ) ) - 1 ; int length = ( stop - start ) + 1 ; int [ ] count = new int [ length ] ; Iterator < ? extends Interval > it = intervalFile . query ( chr , start , stop ) ; while ( it . hasNext ( ) ) { Interval entry = it . next ( ) ; int entryStop = entry . getStop ( ) ; if ( ( extend ) != null ) { if ( entry . isWatson ( ) ) { entryStop = ( entry . getStart ( ) ) + ( extend ) ; } else { entryStop = ( entry . getStart ( ) ) - ( extend ) ; } } for ( int i = entry . getStart ( ) ; i <= entryStop ; i ++ ) { ( count [ ( i - start ) ] ) ++ ; } mapped ++ ; } for ( int i = 0 ; i < ( count . length ) ; i ++ ) { <START_BUG> writer . write ( count [ i ] ) ; <END_BUG> writer . newLine ( ) ; } start = stop + 1 ; } } } BaseAlignCounts . log . info ( ( ( "Mapped<seq2seq4repair_space>" + mapped ) + "<seq2seq4repair_space>reads" ) ) ; } public static void main ( String [ ] args ) { } No newline ; at end ; of file ; }

Fix:
writer . write ( Integer . toString ( count [ i ] ) ) ;
Buggy code:
public class GifiDaoImpl extends AbstractJdbcDaoSupport implements GifiDao { private GifiDaoImpl . AccountsQueryByType accountsQueryByType ; private GifiDaoImpl . GetGifiAccountBalancesQuery gifiAccountBalancesQuery ; @ Override protected void initDao ( ) throws Exception { } @ Override public List < GifiAccountBean > getGifiAccountList ( AccountType accountType ) { } @ Override public List < AccountBean > getGifiAccountBalances ( Date cutOffDate , AccountType accountType , Integer accountId ) { <START_BUG> Object [ ] params = new Object [ ] { cutOffDate , cutOffDate , accountId == null ? null : accountId , accountType == null ? null : accountType . getId ( ) } ; <END_BUG> List < AccountBean > list = ( ( List < AccountBean > ) ( gifiAccountBalancesQuery . execute ( params ) ) ) ; return list ; } private static class AccountsQueryByType extends MappingSqlQuery < GifiAccountBean > { private static final String QUERY = "SELECT<seq2seq4repair_space>GIFI_CODE,<seq2seq4repair_space>GIFI_NAME,<seq2seq4repair_space>COMMENTS,<seq2seq4repair_space>TYPE<seq2seq4repair_space>FROM<seq2seq4repair_space>GIFI<seq2seq4repair_space>WHERE<seq2seq4repair_space>TYPE<seq2seq4repair_space>=<seq2seq4repair_space>?<seq2seq4repair_space>ORDER<seq2seq4repair_space>BY<seq2seq4repair_space>GIFI_CODE" ; public AccountsQueryByType ( DataSource ds ) { } @ Override protected GifiAccountBean mapRow ( ResultSet rs , int index ) throws SQLException { } } private static class GetGifiAccountBalancesQuery extends GetAccountBalancesQuery { public GetGifiAccountBalancesQuery ( DataSource dataSource ) { } } }

Fix:
Object [ ] params = new Object [ ] { cutOffDate , cutOffDate , accountId , accountType == null ? null : accountType . getId ( ) } ;
Buggy code:
public class Configuration { private String storagePath ; private Long curTaskNum ; public Configuration ( String path , Long taskNum ) { } public Configuration ( String path ) { } public String getStoragePath ( ) { } public Long getCurTaskNum ( ) { <START_BUG> return ( curTaskNum ) - 1 ; <END_BUG> } public Long newTaskNumber ( ) { } public void setStoragePath ( String newPath ) { } }

Fix:
return curTaskNum ;
Buggy code:
public class JPAPushApplicationDao extends JPABaseDao < PushApplication , String > implements PushApplicationDao { @ Override public void delete ( PushApplication pushApplication ) { PushApplication entity = entityManager . find ( PushApplication . class , pushApplication . getId ( ) ) ; final List < Variant > variants = entity . getVariants ( ) ; if ( ! ( variants . isEmpty ( ) ) ) { <START_BUG> createQuery ( "delete<seq2seq4repair_space>from<seq2seq4repair_space>Installation<seq2seq4repair_space>i<seq2seq4repair_space>where<seq2seq4repair_space>i.variant<seq2seq4repair_space>in<seq2seq4repair_space>:variants" ) . setParameter ( "variants" , variants ) . executeUpdate ( ) ; <END_BUG> } super . delete ( entity ) ; } @ Override public PageResult < PushApplication > findAllForDeveloper ( String loginName , Integer page , Integer pageSize ) { } @ Override public List < String > findAllPushApplicationIDsForDeveloper ( String loginName ) { } @ Override public PushApplication findByPushApplicationIDForDeveloper ( String pushApplicationID , String loginName ) { } @ Override public PushApplication findByPushApplicationID ( String pushApplicationID ) { } @ Override public Map < String , Long > countInstallationsByType ( String pushApplicationID ) { } @ Override public long getNumberOfPushApplicationsForDeveloper ( String name ) { } @ Override public List < PushApplication > findByVariantIds ( List < String > variantIDs ) { } @ Override public Class < PushApplication > getType ( ) { } @ Override public PageResult < PushApplication > findAll ( Integer page , Integer pageSize ) { } @ Override public PushApplication findAllByPushApplicationID ( String pushApplicationID ) { } @ Override public long getNumberOfPushApplicationsForDeveloper ( ) { } }

Fix:
entityManager . createQuery ( "delete<seq2seq4repair_space>from<seq2seq4repair_space>Installation<seq2seq4repair_space>i<seq2seq4repair_space>where<seq2seq4repair_space>i.variant<seq2seq4repair_space>in<seq2seq4repair_space>:variants" ) . setParameter ( "variants" , variants ) . executeUpdate ( ) ;
Buggy code:
public class AdaptorInterceptor implements Serializable , AspectInterceptor { public static final Namespace NAMESPACE = Namespace . get ( AdaptorInterceptor . class . getName ( ) ) ; public static final QName ATTR_ADAPTOR = new QName ( "adaptor" , AdaptorInterceptor . NAMESPACE ) ; public static final QName ATTR_IMPLEMENTATION = new QName ( "implementation" , AdaptorInterceptor . NAMESPACE ) ; public static final QName ATTR_SIGLETON = new QName ( "singleton" , AdaptorInterceptor . NAMESPACE ) ; public Object singeltonObject ; public Class implementingClass ; public Class adaptorClass ; static final Method GET_ADAPTER_METHOD ; public Object invoke ( AspectInvocation invocation ) throws Throwable { if ( ! ( adaptorClass . equals ( invocation . args [ 0 ] ) ) ) { if ( invocation . isNextIntrestedInMethodCall ( ) ) return invocation . invokeNext ( ) ; return null ; } Object o = null ; if ( ( singeltonObject ) != null ) { o = singeltonObject ; } else { <START_BUG> Map attachments = invocation . attachments ; <END_BUG> o = attachments . get ( this ) ; if ( o == null ) { o = implementingClass . newInstance ( ) ; attachments . put ( this , o ) ; } } return o ; } public void init ( Element xml ) throws AspectInitizationException { } public Class [ ] getInterfaces ( ) { } public boolean isIntrestedInMethodCall ( Method method ) { } }

Fix:
Map attachments = invocation . aspectAttachments ;
Buggy code:
public class DeploymentManifest extends Manifest { public static DeploymentManifest newInstance ( SubsystemManifest manifest , SubsystemEnvironment environment ) { DeploymentManifest result = new DeploymentManifest ( ) ; result . headers . put ( NAME , manifest . getManifestVersion ( ) ) ; Collection < Requirement > requirements = new ArrayList < Requirement > ( ) ; for ( SubsystemContentHeader . Content content : manifest . getSubsystemContent ( ) . getContents ( ) ) { <START_BUG> Requirement requirement = OsgiIdentityRequirement . newInstance ( content ) ; <END_BUG> requirements . add ( requirement ) ; } Map < Resource , List < Wire > > resolution = Activator . getResolver ( ) . resolve ( environment , requirements . toArray ( new Requirement [ requirements . size ( ) ] ) ) ; Collection < Resource > deployedContent = new ArrayList < Resource > ( ) ; Collection < Resource > provisionResource = new ArrayList < Resource > ( ) ; for ( Resource resource : resolution . keySet ( ) ) { if ( environment . isContentResource ( resource ) ) deployedContent . add ( resource ) ; else provisionResource . add ( resource ) ; } result . headers . put ( DeployedContentHeader . NAME , DeployedContentHeader . newInstance ( deployedContent ) ) ; if ( ! ( provisionResource . isEmpty ( ) ) ) result . headers . put ( ProvisionResourceHeader . NAME , ProvisionResourceHeader . newInstance ( provisionResource ) ) ; result . headers . put ( SubsystemSymbolicNameHeader . NAME , manifest . getSubsystemSymbolicName ( ) ) ; result . headers . put ( SubsystemVersionHeader . NAME , manifest . getSubsystemVersion ( ) ) ; SubsystemTypeHeader typeHeader = manifest . getSubsystemType ( ) ; result . headers . put ( SubsystemTypeHeader . NAME , typeHeader ) ; if ( "osgi.application" . equals ( typeHeader . getValue ( ) ) ) { } else if ( "osgi.composite" . equals ( typeHeader . getValue ( ) ) ) { } return result ; } public DeploymentManifest ( File manifestFile ) throws IOException { } public DeploymentManifest ( InputStream in ) throws IOException { } private DeploymentManifest ( ) { } public DeploymentManifest ( Collection < Resource > deployedContent , Collection < Resource > provisionResource ) { } public DeployedContentHeader getDeployedContent ( ) { } public ProvisionResourceHeader getProvisionResource ( ) { } }

Fix:
Requirement requirement = new org . apache . aries . subsystem . core . internal . OsgiIdentityRequirement ( content . getName ( ) , content . getVersionRange ( ) , content . getType ( ) , false ) ;
Buggy code:
public class PageParametersTest extends TestCase { public void testNegativeNumberParameter ( ) { } public void test_1 ( ) { } public void test_2 ( ) { } public void test_3 ( ) { } public void test_4 ( ) { try { <START_BUG> PageParameters parameters = new PageParameters ( "=test" ) ; <END_BUG> fail ( "Expected<seq2seq4repair_space>an<seq2seq4repair_space>exception:<seq2seq4repair_space>invalid<seq2seq4repair_space>URL<seq2seq4repair_space>parameter" ) ; } catch ( IllegalArgumentException ex ) { } } }

Fix:
new PageParameters ( "=test" ) ;
Buggy code:
public class ServerTask extends AsyncTask < String , Void , String > { private static final String TAG = "ServerTask" ; public AsyncResponse delegate = null ; public static ServerTask task ; public ServerTask ( AsyncResponse asyncResponse ) { } @ Override public String doInBackground ( String ... request ) { if ( ( request [ 0 ] . toString ( ) . compareTo ( "login" ) ) == 0 ) { String result = login ( request [ 1 ] , request [ 2 ] ) ; <START_BUG> if ( ( result . compareTo ( "Password<seq2seq4repair_space>is<seq2seq4repair_space>incorrect" ) ) == 0 ) { <END_BUG> return "login<seq2seq4repair_space>failed" ; } else { return "login<seq2seq4repair_space>success" ; } } else if ( ( request [ 0 ] . toString ( ) . compareTo ( "addevent" ) ) == 0 ) { return "event<seq2seq4repair_space>added" ; } else { return "request<seq2seq4repair_space>not<seq2seq4repair_space>handled" ; } } public String login ( String user , String pass ) { } @ Override protected void onPostExecute ( String result ) { } }

Fix:
if ( ( ( result . compareTo ( "Password<seq2seq4repair_space>is<seq2seq4repair_space>incorrect" ) ) == 0 ) || ( ( result . compareTo ( "Could<seq2seq4repair_space>not<seq2seq4repair_space>complete<seq2seq4repair_space>query.<seq2seq4repair_space>Missing<seq2seq4repair_space>parameter" ) ) == 0 ) ) {
Buggy code:
public class ComponentStringResourceLoaderTest extends StringResourceLoaderTestBase { public ComponentStringResourceLoaderTest ( String message ) { } protected IStringResourceLoader createLoader ( ) { } public void testLoaderUnknownResources ( ) { } public void testNullComponent ( ) { } public void testNonPageComponent ( ) { Component c = new DummyComponent ( "hello" , application ) { } ; IStringResourceLoader loader = new ComponentStringResourceLoader ( ) ; try { loader . loadStringResource ( c , "test.string" , Locale . getDefault ( ) , null ) ; <START_BUG> Assert . fail ( "InvalidResourceSpecificationException<seq2seq4repair_space>should<seq2seq4repair_space>be<seq2seq4repair_space>thrown" ) ; <END_BUG> } catch ( IllegalStateException e ) { } } public void testPageEmbeddedComponentLoadFromPage ( ) { } public void testMultiLevelEmbeddedComponentLoadFromComponent ( ) { } public void testLoadDirectFromPage ( ) { } }

Fix:
Assert . fail ( "IllegalStateException<seq2seq4repair_space>should<seq2seq4repair_space>be<seq2seq4repair_space>thrown" ) ;
Buggy code:
public class ValidatorResources implements Serializable { protected ValidatorLog logger = null ; protected FastHashMap hFormSets = new FastHashMap ( ) ; protected FastHashMap hConstants = new FastHashMap ( ) ; protected FastHashMap hActions = new FastHashMap ( ) ; protected static Locale defaultLocale = Locale . getDefault ( ) ; public ValidatorResources ( ValidatorLog logger ) { } public ValidatorLog getLogger ( ) { } public void setLogger ( ValidatorLog logger ) { } public void put ( FormSet fs ) { } public void addConstant ( Constant c ) { } public void addValidatorAction ( ValidatorAction va ) { } public ValidatorAction getValidatorAction ( String key ) { } public Map getValidatorActions ( ) { } protected String buildKey ( FormSet fs ) { } public Form get ( Locale locale , Object formKey ) { } public Form get ( String language , String country , String variant , Object formKey ) { } public int getDebug ( ) { } public void setDebug ( int debug ) { } public void process ( ) { } public void processForms ( ) { String defaultKey = ValidatorResources . defaultLocale . toString ( ) ; for ( Iterator i = hFormSets . keySet ( ) . iterator ( ) ; i . hasNext ( ) ; ) { String key = ( ( String ) ( i . next ( ) ) ) ; FormSet fs = ( ( FormSet ) ( hFormSets . get ( key ) ) ) ; if ( key . equals ( defaultKey ) ) continue ; for ( Iterator x = fs . getForms ( ) . keySet ( ) . iterator ( ) ; x . hasNext ( ) ; ) { String formKey = ( ( String ) ( x . next ( ) ) ) ; Form form = ( ( Form ) ( fs . getForms ( ) . get ( formKey ) ) ) ; Form newForm = new Form ( ) ; newForm . setName ( form . getName ( ) ) ; Form defaultForm = get ( ValidatorResources . defaultLocale , formKey ) ; for ( Iterator defaultFields = defaultForm . getFields ( ) . iterator ( ) ; defaultFields . hasNext ( ) ; ) { Field defaultField = ( ( Field ) ( defaultFields . next ( ) ) ) ; <START_BUG> String fieldKey = defaultField . getProperty ( ) ; <END_BUG> if ( form . getFieldMap ( ) . containsKey ( fieldKey ) ) { newForm . addField ( ( ( Field ) ( form . getFieldMap ( ) . get ( fieldKey ) ) ) ) ; } else { Field field = getClosestLocaleField ( fs , formKey , fieldKey ) ; newForm . addField ( ( ( Field ) ( field . clone ( ) ) ) ) ; } } fs . addForm ( newForm ) ; } } for ( Iterator i = hFormSets . values ( ) . iterator ( ) ; i . hasNext ( ) ; ) { FormSet fs = ( ( FormSet ) ( i . next ( ) ) ) ; if ( ! ( fs . isProcessed ( ) ) ) fs . process ( hConstants ) ; } } protected Field getClosestLocaleField ( FormSet fs , String formKey , String fieldKey ) { } }

Fix:
String fieldKey = defaultField . getKey ( ) ;
Buggy code:
@ Controller @ RequestMapping ( "//inventory" ) public class InventoryController { @ Autowired private InventoryService inventoryService ; private static final Logger log = LoggerFactory . getLogger ( InventoryController . class ) ; @ RequestMapping ( value = "//add" , method = RequestMethod . POST , consumes = { MediaType . APPLICATION_JSON_VALUE } , produces = { MediaType . APPLICATION_JSON_VALUE } ) @ ResponseBody public String addInventory ( @ RequestBody InventoryAddParam inventoryAddParam ) { <START_BUG> InventoryController . log . info ( "addInventory" ) ; <END_BUG> ServiceRequest < InventoryAddParam > serviceRequest = convertAddParamtoServiceRequest ( inventoryAddParam ) ; validate ( inventoryAddParam ) ; inventoryService . addInventory ( serviceRequest ) ; return "Inventory<seq2seq4repair_space>Added<seq2seq4repair_space>Succesfully" ; } private ServiceRequest < InventoryAddParam > convertAddParamtoServiceRequest ( InventoryAddParam inventoryAddParam ) { } @ RequestMapping ( value = "//test" , method = RequestMethod . GET ) public void testInventory ( ) { } @ RequestMapping ( value = "//welcome" , method = RequestMethod . GET ) public String welcomePage ( ) { } @ RequestMapping ( value = "//viewAll" , method = RequestMethod . GET ) public List < Inventory > viewInventory ( ) { } @ RequestMapping ( value = "//search" , method = RequestMethod . GET ) public List < Inventory > searchInventory ( @ RequestBody InventorySearchCriteria searchCriteria ) { } private void validateSearchResulit ( ServiceResponse < List < Inventory > > response ) { } private void validate ( InventoryAddParam inventoryAddParam ) { } public void setInventoryService ( InventoryService inventoryService ) { } }

Fix:
System . out . println ( ( "Success<seq2seq4repair_space>" + ( inventoryAddParam . getName ( ) ) ) ) ;
Buggy code:
public class WolframAlphaCommand extends UserCommand implements ArgumentCommand { private String arguments ; public void setAgruments ( List < String > args ) { arguments = "" ; for ( String argument : args ) <START_BUG> arguments += argument ; <END_BUG> } private void l ( String s ) { } public String getCommand ( ) { } public String getUsage ( ) { } public String getInfo ( ) { } protected void onSuccess ( ) { } protected void onFailiture ( ) { } protected List < String > test ( ) { } }

Fix:
arguments += "<seq2seq4repair_space>" + argument ;
Buggy code:
class FileSaveAction extends AbstractAction { private LogUI parent ; private JFileChooser chooser = null ; public FileSaveAction ( LogUI parent ) { } public void actionPerformed ( ActionEvent e ) { if ( ( chooser ) == null ) { chooser = new JFileChooser ( ) ; } chooser . setAcceptAllFileFilterUsed ( true ) ; chooser . setDialogTitle ( "Save<seq2seq4repair_space>Events<seq2seq4repair_space>to<seq2seq4repair_space>XML<seq2seq4repair_space>file..." ) ; chooser . showSaveDialog ( parent ) ; File selectedFile = chooser . getSelectedFile ( ) ; XMLLayout layout = new XMLLayout ( ) ; LoggingEvent event = null ; PrintWriter out = null ; if ( selectedFile != null ) { try { <START_BUG> List v = ( ( EventContainer ) ( parent . getCurrentLogPanel ( ) . getModel ( ) ) ) . getAllEvents ( ) ; <END_BUG> if ( ( ( v != null ) && ( ( v . size ( ) ) == 0 ) ) || ( v == null ) ) { return ; } Iterator iter = v . iterator ( ) ; out = new PrintWriter ( new BufferedWriter ( new FileWriter ( selectedFile ) ) ) ; while ( iter . hasNext ( ) ) { event = ( ( LoggingEvent ) ( iter . next ( ) ) ) ; layout . setLocationInfo ( ( ( event . getThrowableInformation ( ) ) != null ) ) ; out . write ( layout . format ( event ) ) ; } } catch ( IOException ioe ) { ioe . printStackTrace ( ) ; } finally { if ( out != null ) { out . flush ( ) ; out . close ( ) ; } } } } }

Fix:
List v = parent . getCurrentLogPanel ( ) . getEvents ( ) ;
Buggy code:
public class WebScrapManager { private UpGradeClass upgradeClass ; private String url ; private int number ; private ArrayList < String > currentSectionNames ; private ArrayList < String > currentSectionPercents ; public WebScrapManager ( String gs_link ) { } public WebScrapManager ( UpGradeClass upgradeClass ) { } public UpGradeClass updateClass ( ) { url = upgradeClass . getGradeSourceLink ( ) ; number = upgradeClass . getGradeSourceNumber ( ) ; Document doc ; try { doc = Jsoup . connect ( url ) . get ( ) ; Elements tables = doc . select ( "table[cellpadding=3][cellspacing=0]" ) ; <START_BUG> System . out . println ( tables . size ( ) ) ; <END_BUG> for ( Element table : tables ) { int current ; for ( Element row : table . select ( "tr" ) ) { Elements columns = row . select ( "td" ) ; String secret_number = columns . get ( 0 ) . text ( ) ; if ( secret_number . equals ( "Secret<seq2seq4repair_space>Number" ) ) { for ( Element column : columns ) { if ( ! ( column . text ( ) . equals ( "Secret<seq2seq4repair_space>Number" ) ) ) currentSectionNames . add ( column . text ( ) ) ; } } try { current = Integer . parseInt ( secret_number ) ; } catch ( NumberFormatException e ) { continue ; } if ( current == ( number ) ) { for ( Element column : columns ) { String columnText = column . text ( ) ; if ( columnText . contains ( "%" ) ) { currentSectionPercents . add ( column . text ( ) ) ; } } currentSectionNames . remove ( 0 ) ; upgradeClass . setSectionNames ( currentSectionNames ) ; upgradeClass . setSectionPercents ( currentSectionPercents ) ; return upgradeClass ; } } } } catch ( IOException e ) { e . printStackTrace ( ) ; } return upgradeClass ; } public ArrayList < Integer > parseSection ( String sectionName ) { } }

Fix:
System . out . println ( ( "table<seq2seq4repair_space>size:<seq2seq4repair_space>" + ( tables . size ( ) ) ) ) ;
Buggy code:
public class Main implements EntryPoint { FindGamePanel mFindGamePanel ; RootPanel mRoot ; SerializationStreamFactory mPushServiceStreamFactory ; GameServiceAsync mGameService ; GameGroundPanel mGroundPanel ; private static final Logger mLogger = Logger . getLogger ( Main . class . getName ( ) ) ; public void onModuleLoad ( ) { } public void loginComplete ( final String playerName , LoginResults results ) { } private final void startPlay ( ) { mGroundPanel = new GameGroundPanel ( ) ; <START_BUG> mRoot . add ( mGroundPanel , 200 , 270 ) ; <END_BUG> mGroundPanel . setSize ( Integer . toString ( GAMEGROUND_WIDTH ) , Integer . toString ( GAMEGROUND_HEIGHT ) ) ; mGroundPanel . setVisible ( true ) ; } No newline ; at end ; of file ; }

Fix:
mRoot . add ( mGroundPanel , 200 , 265 ) ;
Buggy code:
public class Scale extends Control { int increment = 1 ; int pageIncrement = 10 ; public Scale ( Composite parent , int style ) { } int actionProc ( int theControl , int partCode ) { int result = super . actionProc ( theControl , partCode ) ; if ( result == ( OS . noErr ) ) return result ; <START_BUG> sendEvent ( Selection ) ; <END_BUG> return result ; } public void addSelectionListener ( SelectionListener listener ) { } static int checkStyle ( int style ) { } public Point computeSize ( int wHint , int hHint , boolean changed ) { } void createHandle ( ) { } public int getIncrement ( ) { } public int getMaximum ( ) { } public int getMinimum ( ) { } public int getPageIncrement ( ) { } public int getSelection ( ) { } int kEventMouseDown ( int nextHandler , int theEvent , int userData ) { } public void removeSelectionListener ( SelectionListener listener ) { } public void setIncrement ( int value ) { } public void setMaximum ( int value ) { } public void setMinimum ( int value ) { } public void setPageIncrement ( int value ) { } public void setSelection ( int value ) { } }

Fix:
sendSelectionEvent ( Selection , null , true ) ;
Buggy code:
public class TestBot extends Bot { public TestBot ( String name ) { } @ Override public void unload ( ) { } @ Override public void load ( ) { } @ Override public void ai ( ) { moveUp ( 0.1 ) ; <START_BUG> moveForward ( 0.5 ) ; <END_BUG> turnRight ( 5 ) ; } No newline ; at end ; of file ; }

Fix:
moveForward ( 0.1 ) ;
Buggy code:
public class JMeterTreeModel extends DefaultTreeModel { public JMeterTreeModel ( ) { } public List getNodesOfType ( Class type ) { } public JMeterTreeNode getNodeOf ( TestElement userObject ) { } public HashTree addSubTree ( HashTree subTree , JMeterTreeNode current ) throws IllegalUserActionException { } public JMeterTreeNode addComponent ( TestElement component , JMeterTreeNode node ) throws IllegalUserActionException { if ( ( node . getUserObject ( ) ) instanceof AbstractConfigGui ) { throw new IllegalUserActionException ( "This<seq2seq4repair_space>node<seq2seq4repair_space>cannot<seq2seq4repair_space>hold<seq2seq4repair_space>sub-elements" ) ; } component . setProperty ( GUI_CLASS , NameUpdater . getCurrentName ( component . getPropertyAsString ( GUI_CLASS ) ) ) ; GuiPackage . getInstance ( ) . updateCurrentNode ( ) ; JMeterGUIComponent guicomp = GuiPackage . getInstance ( ) . getGui ( component ) ; guicomp . configure ( component ) ; guicomp . modifyTestElement ( component ) ; GuiPackage . getInstance ( ) . getCurrentGui ( ) ; <START_BUG> JMeterTreeNode newNode = new JMeterTreeNode ( ( ( TestElement ) ( component ) ) , this ) ; <END_BUG> try { if ( ( ( component . getProperty ( ENABLED ) ) instanceof NullProperty ) || ( component . getPropertyAsBoolean ( ENABLED ) ) ) { newNode . setEnabled ( true ) ; } else { newNode . setEnabled ( false ) ; } } catch ( Exception e ) { newNode . setEnabled ( true ) ; } this . insertNodeInto ( newNode , node , node . getChildCount ( ) ) ; return newNode ; } public void removeNodeFromParent ( JMeterTreeNode node ) { } private void traverseAndFind ( Class type , JMeterTreeNode node , List nodeList ) { } private JMeterTreeNode traverseAndFind ( TestElement userObject , JMeterTreeNode node ) { } public HashTree getCurrentSubTree ( JMeterTreeNode node ) { } public HashTree getTestPlan ( ) { } public void clearTestPlan ( ) { } private void initTree ( ) { } }

Fix:
JMeterTreeNode newNode = new JMeterTreeNode ( component , this ) ;
Buggy code:
public abstract class Container extends Component { private static final Log log = LogFactory . getLog ( Container . class ) ; private static final Map markupCache = new HashMap ( ) ; private static final int MINIMAP_MAX_ENTRIES = 8 ; private static final boolean optimizeChildMapsForSpace = false ; private Map childForName ; private transient MarkupStream markupStream ; public Container ( final String name ) { } public Container ( String name , IModel model ) { } public Container ( String name , IModel model , String expression ) { } public Container ( String name , Serializable object ) { } public Container ( String name , Serializable object , String expression ) { } public Container add ( final Component child ) { } public final Component get ( final String path ) { } public final Iterator iterator ( ) { } public void removeAll ( ) { } public Container replace ( final Component child ) { } public final int size ( ) { } public String toString ( ) { } public final Object visitChildren ( final Class c , final IVisitor visitor ) { } public final Object visitChildren ( final IVisitor visitor ) { } protected final MarkupStream findMarkupStream ( ) { } protected final MarkupStream getMarkupStream ( ) { } protected String getMarkupType ( ) { } protected void handleBody ( final MarkupStream markupStream , final ComponentTag openTag ) { } protected void handleRender ( ) { } protected final void renderAssociatedMarkup ( final String openTagName , final String exceptionMessage ) { } protected final void renderBody ( final MarkupStream markupStream , final ComponentTag openTag ) { } protected boolean resolveComponent ( final MarkupStream markupStream , final ComponentTag tag ) { } protected final void setMarkupStream ( final MarkupStream markupStream ) { } final MarkupStream getAssociatedMarkupStream ( ) { } final void renderAll ( final MarkupStream markupStream ) { } private Markup loadMarkup ( final Application application , final String key , final Resource markupResource ) throws IOException , ParseException , ResourceNotFoundException { <START_BUG> final Markup markup = application . getMarkupParser ( getPage ( ) ) . read ( markupResource ) ; <END_BUG> Container . markupCache . put ( key , markup ) ; return markup ; } private Markup loadMarkupAndWatchForChanges ( final String key , final Resource markupResource ) { } private void optimize ( ) { } private void renderNext ( final MarkupStream markupStream ) { } }

Fix:
final Markup markup = application . getMarkupParser ( ) . read ( markupResource , getPage ( ) ) ;
Buggy code:
public class Application_Notify extends Application { Piggate _piggate ; public void onCreate ( ) { super . onCreate ( ) ; _piggate = new Piggate ( this ) ; _piggate . setListenerBeacon ( new Piggate . PiggateBeaconCallback ( ) { @ Override public void DeviceNotCompatible ( ) { } @ Override <START_BUG> public void BluetoohNotConnect ( ) { <END_BUG> } @ Override public void PreScanning ( ) { } @ Override public void onReady ( ) { } @ Override public void onErrorScanning ( ) { } @ Override public void GetNewBeacons ( ArrayList < PiggateBeacon > beacons ) { _piggate . postNotification ( "New<seq2seq4repair_space>offer!" , "Click<seq2seq4repair_space>to<seq2seq4repair_space>see<seq2seq4repair_space>the<seq2seq4repair_space>offer" , Activity_Main . class , ic_launcher ) ; } @ Override public void GetBeacons ( ArrayList < PiggateBeacon > beacons ) { } } ) ; _piggate . onStart ( ) ; } No newline ; at end ; of file ; }

Fix:
public void BluetoothNotConnect ( ) {
Buggy code:
public abstract class ValueSource { public abstract FunctionValues getValues ( Map context , AtomicReaderContext readerContext ) throws IOException { } @ Override public abstract boolean equals ( Object o ) { } @ Override public abstract int hashCode ( ) { } public abstract String description ( ) { } @ Override public String toString ( ) { } public void createWeight ( Map context , IndexSearcher searcher ) throws IOException { } public static Map newContext ( IndexSearcher searcher ) { } public SortField getSortField ( boolean reverse ) { } class ValueSourceSortField extends SortField { public ValueSourceSortField ( boolean reverse ) { } @ Override public SortField rewrite ( IndexSearcher searcher ) throws IOException { } } class ValueSourceComparatorSource extends FieldComparatorSource { private final Map context ; public ValueSourceComparatorSource ( Map context ) { } @ Override public FieldComparator < Double > newComparator ( String fieldname , int numHits , int sortPos , boolean reversed ) throws IOException { } } class ValueSourceComparator extends FieldComparator < Double > { private final double [ ] values ; private FunctionValues docVals ; private double bottom ; private final Map fcontext ; ValueSourceComparator ( Map fcontext , int numHits ) { } @ Override public int compare ( int slot1 , int slot2 ) { } @ Override public int compareBottom ( int doc ) { } @ Override public void copy ( int slot , int doc ) { } @ Override public FieldComparator setNextReader ( AtomicReaderContext context ) throws IOException { } @ Override public void setBottom ( final int bottom ) { } @ Override public Double value ( int slot ) { } @ Override public int compareDocToValue ( int doc , Double valueObj ) { final double value = valueObj ; final double docValue = docVals . doubleVal ( doc ) ; if ( docValue < value ) { return - 1 ; } else if ( docValue > value ) { <START_BUG> return - 1 ; <END_BUG> } else { return 0 ; } } } }

Fix:
return 1 ;
Buggy code:
public class Description extends DataType { public void addText ( String text ) { } public static String getDescription ( Project project ) { } private static void concatDescriptions ( Project project , Target t , StringBuffer description ) { if ( t == null ) { return ; } Vector tasks = Description . findElementInTarget ( project , t , "description" ) ; if ( tasks == null ) { return ; } for ( int i = 0 ; i < ( tasks . size ( ) ) ; i ++ ) { Task task = ( ( Task ) ( tasks . elementAt ( i ) ) ) ; if ( ! ( task instanceof UnknownElement ) ) { continue ; } UnknownElement ue = ( ( UnknownElement ) ( task ) ) ; StringBuffer descComp = ue . getWrapper ( ) . getText ( ) ; if ( descComp != null ) { <START_BUG> description . append ( descComp ) ; <END_BUG> } } } private static Vector findElementInTarget ( Project project , Target t , String name ) { } }

Fix:
description . append ( ( ( Object ) ( descComp ) ) ) ;
Buggy code:
public class CodeSnippetReturnStatement extends ReturnStatement implements InvocationSite , EvaluationConstants { MethodBinding setResultMethod ; public CodeSnippetReturnStatement ( Expression expr , int s , int e ) { } public FlowInfo analyseCode ( BlockScope currentScope , FlowContext flowContext , FlowInfo flowInfo ) { FlowInfo info = super . analyseCode ( currentScope , flowContext , flowInfo ) ; <START_BUG> this . expression . bits &= ~ ( ValueForReturnMASK ) ; <END_BUG> return info ; } public void generateReturnBytecode ( CodeStream codeStream ) { } public void generateStoreSaveValueIfNecessary ( CodeStream codeStream ) { } public TypeBinding [ ] genericTypeArguments ( ) { } public boolean isSuperAccess ( ) { } public boolean isTypeAccess ( ) { } public boolean needValue ( ) { } public void prepareSaveValueLocation ( TryStatement targetTryStatement ) { } public void resolve ( BlockScope scope ) { } public void setActualReceiverType ( ReferenceBinding receiverType ) { } public void setDepth ( int depth ) { } public void setFieldIndex ( int depth ) { } }

Fix:
this . expression . bits &= ~ ( ASTNode . IsReturnedValue ) ;
Buggy code:
class HelperAppLauncherDialog { XPCOMObject supports ; XPCOMObject helperAppLauncherDialog ; int refCount = 0 ; public HelperAppLauncherDialog ( ) { } int AddRef ( ) { } void createCOMInterfaces ( ) { } void disposeCOMInterfaces ( ) { } int getAddress ( ) { } int QueryInterface ( int riid , int ppvObject ) { } int Release ( ) { } <START_BUG> public int Show ( int aLauncher , int aContext , int aForced ) { <END_BUG> nsISupports supports = new nsISupports ( aLauncher ) ; int [ ] result = new int [ 1 ] ; int rc = supports . QueryInterface ( NS_IHELPERAPPLAUNCHER_IID , result ) ; if ( rc == 0 ) { nsIHelperAppLauncher_1_8 helperAppLauncher = new nsIHelperAppLauncher_1_8 ( aLauncher ) ; rc = helperAppLauncher . SaveToDisk ( 0 , false ) ; helperAppLauncher . Release ( ) ; return rc ; } nsIHelperAppLauncher helperAppLauncher = new nsIHelperAppLauncher ( aLauncher ) ; return helperAppLauncher . SaveToDisk ( 0 , false ) ; } public int PromptForSaveToFile ( int arg0 , int arg1 , int arg2 , int arg3 , int arg4 ) { } }

Fix:
public int Show ( int aLauncher , int aContext , int aReason ) {
Buggy code:
public class WorkbenchPreferencePage extends PreferencePage implements IWorkbenchPreferencePage { private IWorkbench workbench ; private Button autoBuildButton ; private Button autoSaveAllButton ; private Button linkButton ; private Button refreshButton ; private IntegerFieldEditor saveInterval ; private Button doubleClickButton ; private Button singleClickButton ; private Button selectOnHoverButton ; private Button openAfterDelayButton ; private boolean openOnSingleClick ; private boolean selectOnHover ; private boolean openAfterDelay ; private Composite createComposite ( Composite parent , int numColumns ) { } protected Control createContents ( Composite parent ) { } private void createSingleClickGroup ( Composite composite ) { } private void selectClickMode ( boolean singleClick ) { } private void createSaveIntervalGroup ( Composite composite ) { Composite groupComposite = new Composite ( composite , SWT . LEFT ) ; GridLayout layout = new GridLayout ( ) ; layout . numColumns = 2 ; groupComposite . setLayout ( layout ) ; GridData gd = new GridData ( ) ; <START_BUG> gd . horizontalAlignment = gd . FILL ; <END_BUG> gd . grabExcessHorizontalSpace = true ; groupComposite . setLayoutData ( gd ) ; groupComposite . setFont ( composite . getFont ( ) ) ; saveInterval = new IntegerFieldEditor ( IPreferenceConstants . SAVE_INTERVAL , WorkbenchMessages . getString ( "WorkbenchPreference.saveInterval" ) , groupComposite ) ; saveInterval . setPreferenceStore ( WorkbenchPlugin . getDefault ( ) . getPreferenceStore ( ) ) ; saveInterval . setPreferencePage ( this ) ; saveInterval . setTextLimit ( Integer . toString ( MAX_SAVE_INTERVAL ) . length ( ) ) ; saveInterval . setErrorMessage ( WorkbenchMessages . format ( "WorkbenchPreference.saveIntervalError" , new Object [ ] { new Integer ( IPreferenceConstants . MAX_SAVE_INTERVAL ) } ) ) ; saveInterval . setValidateStrategy ( VALIDATE_ON_KEY_STROKE ) ; saveInterval . setValidRange ( 1 , MAX_SAVE_INTERVAL ) ; IWorkspaceDescription description = ResourcesPlugin . getWorkspace ( ) . getDescription ( ) ; long interval = ( description . getSnapshotInterval ( ) ) // 60000 ; saveInterval . setStringValue ( Long . toString ( interval ) ) ; saveInterval . setPropertyChangeListener ( new IPropertyChangeListener ( ) { public void propertyChange ( PropertyChangeEvent event ) { if ( event . getProperty ( ) . equals ( IS_VALID ) ) setValid ( saveInterval . isValid ( ) ) ; } } ) ; } protected static Button createRadioButton ( Composite parent , String label ) { } protected static Combo createCombo ( Composite parent ) { } protected static Label createLabel ( Composite parent , String text ) { } protected static void createSpace ( Composite parent ) { } protected IPreferenceStore doGetPreferenceStore ( ) { } public void init ( IWorkbench aWorkbench ) { } protected void performDefaults ( ) { } public boolean performOk ( ) { } }

Fix:
gd . horizontalAlignment = GridData . FILL ;