nus-yam/ex-repair huggingface dataset:
Buggy code:
public class ProxyGenerator { private final Map < Class < ? > , Map < Method , MethodInfo > > proxyMethodInfoCache = new LinkedHashMap < > ( ) ; @ SuppressWarnings ( "unchecked" ) public < T > T create ( Context context , Class < T > proxy ) { } private < T > void checkIsNotExtendingAnotherInterface ( Class < T > proxy ) { } private static < T > void checkIsInterface ( Class < T > clazz ) { } private Map < Method , MethodInfo > getMethodInfoCache ( Class < ? > proxy ) { } private static MethodInfo getMethodInfo ( Map < Method , MethodInfo > cache , Method method ) { } private class SharedPreferencesHandler implements InvocationHandler { private static final String NAME = "name" ; private static final String MODE = "mode" ; private final Context context ; private final Class < ? > clazz ; private final Map < Method , MethodInfo > methodDetailsCache ; public SharedPreferencesHandler ( Context context , Class < ? > proxy , Map < Method , MethodInfo > methodDetailsCache ) { } @ SuppressLint ( "CommitPrefEdits" ) @ Override public Object invoke ( Object proxy , Method method , Object [ ] args ) throws Throwable { if ( ( method . getDeclaringClass ( ) ) == ( Object . class ) ) { return method . invoke ( this , args ) ; } String name = null ; int mode = 0 ; for ( Annotation annotation : clazz . getAnnotations ( ) ) { Class < ? extends Annotation > type = annotation . annotationType ( ) ; for ( Method annotMethod : type . getDeclaredMethods ( ) ) { if ( ProxyGenerator . SharedPreferencesHandler . NAME . equals ( annotMethod . getName ( ) ) ) { name = ( ( String ) ( annotMethod . invoke ( annotation ) ) ) ; } else if ( ProxyGenerator . SharedPreferencesHandler . MODE . equals ( annotMethod . getName ( ) ) ) { mode = ( ( int ) ( annotMethod . invoke ( annotation ) ) ) ; } } } SharedPreferences sharedPreferences = context . getSharedPreferences ( name , mode ) ; MethodInfo methodInfo = ProxyGenerator . getMethodInfo ( methodDetailsCache , method ) ; if ( methodInfo . hasReturnType ) { return methodInfo . type . get ( sharedPreferences , methodInfo ) ; } else { <START_BUG> Class < ? > paramType = args [ 0 ] . getClass ( ) ; <END_BUG> ProxyGenerator . persistenceDelegates . get ( paramType ) . persist ( sharedPreferences . edit ( ) , methodInfo . key , args [ 0 ] ) ; } return null ; } } private interface Persister { void persist ( SharedPreferences . Editor editor , String key , Object what ) { } } private static final Map < Class < ? > , ProxyGenerator . Persister > persistenceDelegates = new HashMap < Class < ? > , ProxyGenerator . Persister > ( ) { } ; }

Fix:
Class < ? > paramType = method . getParameterTypes ( ) [ 0 ] ;
Buggy code:
public class DatabaseChecker6_5_0 extends SimpleDatabaseChecker6_5_0 { public static void main ( final String [ ] args ) throws Exception { } @ Override protected Document getProfilesXML ( final SAXReader reader ) throws Exception { } @ Test public void can_creatte_FlowNodeInstance_with_several_non_ascii_characters ( ) throws Exception { final User user = getApiTestUtil ( ) . createUser ( "tom" , "bpm" ) ; final String taskDisplayName = "Žingsnis,<seq2seq4repair_space>kuriame<seq2seq4repair_space>paraiškos<seq2seq4repair_space>teikėjas<seq2seq4repair_space>gali<seq2seq4repair_space>laisvai<seq2seq4repair_space>užpildyti<seq2seq4repair_space>duomenis,<seq2seq4repair_space>ąčęė" ; final String taskName = "task1क्तु<seq2seq4repair_space>क्तु<seq2seq4repair_space>क्तु<seq2seq4repair_space>क्तु<seq2seq4repair_space>क्तु<seq2seq4repair_space>paraiškos<seq2seq4repair_space>teikėjas<seq2seq4repair_space>Ž" ; final ProcessDefinitionBuilder processBuilder = new ProcessDefinitionBuilder ( ) . createNewInstance ( PROCESS_NAME , PROCESS_VERSION ) ; processBuilder . addActor ( ACTOR_NAME ) ; processBuilder . addUserTask ( taskName , ACTOR_NAME ) . addDisplayName ( new ExpressionBuilder ( ) . createConstantStringExpression ( taskDisplayName ) ) . addDescription ( "description" ) ; final ProcessDefinition processDef1 = getApiTestUtil ( ) . deployAndEnableProcessWithActor ( processBuilder . done ( ) , ACTOR_NAME , user ) ; getProcessAPI ( ) . startProcess ( processDef1 . getId ( ) ) ; <START_BUG> final HumanTaskInstance task1 = getApiTestUtil ( ) . waitForUserTask ( taskName ) ; <END_BUG> assertEquals ( taskDisplayName , task1 . getDisplayName ( ) ) ; getApiTestUtil ( ) . disableAndDeleteProcess ( processDef1 ) ; getApiTestUtil ( ) . deleteUser ( user ) ; } }

Fix:
final HumanTaskInstance task1 = getApiTestUtil ( ) . waitForUserTaskAndGetIt ( taskName ) ;
Buggy code:
public class KeePassDatabaseXmlParser { public KeePassFile parse ( InputStream inputStream , ProtectedStringCrypto protectedStringCrypto ) { } private void decryptAndSetPassword ( Entry entry , ProtectedStringCrypto protectedStringCrypto ) { <START_BUG> if ( entry . isPasswordProtected ( ) ) { <END_BUG> String decrypted = protectedStringCrypto . decrypt ( entry . getPassword ( ) ) ; entry . setPassword ( decrypted ) ; } } }

Fix:
if ( ( ( entry != null ) && ( ! ( entry . getPassword ( ) . isEmpty ( ) ) ) ) && ( entry . isPasswordProtected ( ) ) ) {
Buggy code:
public class TestElementProperty extends MultiProperty { private static final long serialVersionUID = 233L ; private TestElement value ; private transient TestElement savedValue = null ; public TestElementProperty ( String name , TestElement value ) { } public TestElementProperty ( ) { } @ Override public boolean equals ( Object o ) { } @ Override public int hashCode ( ) { } public String getStringValue ( ) { } public void setObjectValue ( Object v ) { } public Object getObjectValue ( ) { } public TestElement getElement ( ) { } public void setElement ( TestElement el ) { } @ Override <START_BUG> public Object clone ( ) { <END_BUG> TestElementProperty prop = ( ( TestElementProperty ) ( super . clone ( ) ) ) ; prop . value = ( ( TestElement ) ( value . clone ( ) ) ) ; return prop ; } @ Override public void mergeIn ( JMeterProperty prop ) { } public void recoverRunningVersion ( TestElement owner ) { } @ Override public void setRunningVersion ( boolean runningVersion ) { } @ Override public void addProperty ( JMeterProperty prop ) { } @ Override public void clear ( ) { } @ Override public PropertyIterator iterator ( ) { } }

Fix:
public TestElementProperty clone ( ) {
Buggy code:
@ RunWith ( Arquillian . class ) @ RunAsClient public final class SarInjectionTestCase { @ Deployment public static JavaArchive createDeployment ( ) throws Exception { final JavaArchive sar = ShrinkWrap . create ( JavaArchive . class , "injection.sar" ) ; sar . addPackage ( A . class . getPackage ( ) ) ; <START_BUG> sar . addAsManifestResource ( "sar//injection//jboss-service.xml" , "jboss-service.xml" ) ; <END_BUG> return sar ; } @ Test public void testMBean ( ) throws Exception { } }

Fix:
sar . addAsManifestResource ( SarInjectionTestCase . class . getPackage ( ) , "jboss-service.xml" , "jboss-service.xml" ) ;
Buggy code:
public class ThrowStatement extends Statement { public static final ChildPropertyDescriptor EXPRESSION_PROPERTY = new ChildPropertyDescriptor ( ThrowStatement . class , "expression" , Expression . class , ASTNode . MANDATORY , ASTNode . CYCLE_RISK ) ; private static final List PROPERTY_DESCRIPTORS ; public static List propertyDescriptors ( int apiLevel ) { } private Expression expression = null ; ThrowStatement ( AST ast ) { } final List internalStructuralPropertiesForType ( int apiLevel ) { } final ASTNode internalGetSetChildProperty ( ChildPropertyDescriptor property , boolean get , ASTNode child ) { } final int getNodeType0 ( ) { } ASTNode clone0 ( AST target ) { } final boolean subtreeMatch0 ( ASTMatcher matcher , Object other ) { } void accept0 ( ASTVisitor visitor ) { } public Expression getExpression ( ) { if ( ( this . expression ) == null ) { <START_BUG> synchronized ( this . ast ) { <END_BUG> if ( ( this . expression ) == null ) { preLazyInit ( ) ; this . expression = new SimpleName ( this . ast ) ; postLazyInit ( this . expression , ThrowStatement . EXPRESSION_PROPERTY ) ; } } } return this . expression ; } public void setExpression ( Expression expression ) { } int memSize ( ) { } int treeSize ( ) { } }

Fix:
synchronized ( this ) {
Buggy code:
public class RegisterActivity extends BaseActivity implements LoaderManager . LoaderCallbacks < Cursor > { private String mAccountType ; private static final int WORKPLACE_LOADER = 0 ; private SimpleCursorAdapter mWorkplaceAdapter ; private Spinner mWorkplaceSpinner ; @ Override protected void onCreate ( Bundle savedInstanceState ) { super . onCreate ( savedInstanceState ) ; getLoaderManager ( ) . initLoader ( RegisterActivity . WORKPLACE_LOADER , null , this ) ; mAccountType = getIntent ( ) . getStringExtra ( ARG_ACCOUNT_TYPE ) ; findViewById ( button ) . setOnClickListener ( new View . OnClickListener ( ) { @ Override public void onClick ( View v ) { createAccount ( ) ; } } ) ; mWorkplaceSpinner = ( ( Spinner ) ( findViewById ( sopralist ) ) ) ; mWorkplaceSpinner . setEnabled ( false ) ; <START_BUG> mWorkplaceAdapter = new SimpleCursorAdapter ( this , id . sopralist , null , new String [ ] { WorkplaceEntry . COLUMN_NAME } , new int [ ] { android . R . id . text1 } , 0 ) ; <END_BUG> mWorkplaceSpinner . setAdapter ( mWorkplaceAdapter ) ; } @ Override protected int getLayoutResource ( ) { } private void createAccount ( ) { } @ Override public void onBackPressed ( ) { } @ 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:
mWorkplaceAdapter = new SimpleCursorAdapter ( this , layout . simple_spinner_item , null , new String [ ] { WorkplaceEntry . COLUMN_NAME } , new int [ ] { id . text1 } , 0 ) ;
Buggy code:
public class JavaRun implements IAjcRun { public static String FORK_KEY = "javarun.fork" ; public static String JAVA_KEY = "javarun.java" ; public static String JAVA_HOME_KEY = "javarun.java.home" ; public static String BOOTCLASSPATH_KEY = "javarun.bootclasspath" ; private static final boolean FORK ; private static final String JAVA ; private static final String JAVA_HOME ; static final String BOOTCLASSPATH ; private static String getProperty ( String key ) { } private static void appendClasspath ( StringBuffer cp , File [ ] libs , File [ ] dirs ) { } JavaRun . Spec spec ; private Sandbox sandbox ; public JavaRun ( JavaRun . Spec spec ) { } public boolean setupAjcRun ( Sandbox sandbox , Validator validator ) { } public boolean run ( IRunStatus status ) throws ClassNotFoundException , IllegalAccessException , NoSuchMethodException , InvocationTargetException { boolean completedNormally = false ; if ( ! ( LangUtil . isEmpty ( spec . dirChanges ) ) ) { MessageUtil . info ( status , "XXX<seq2seq4repair_space>dirChanges<seq2seq4repair_space>not<seq2seq4repair_space>implemented<seq2seq4repair_space>in<seq2seq4repair_space>JavaRun" ) ; } try { final boolean readable = true ; File [ ] libs = sandbox . getClasspathJars ( readable , this ) ; boolean includeClassesDir = true ; File [ ] dirs = sandbox . getClasspathDirectories ( readable , this , includeClassesDir ) ; completedNormally = ( JavaRun . FORK ) ? runInOtherVM ( status , libs , dirs ) : runInSameVM ( status , libs , dirs ) ; } finally { <START_BUG> if ( ! completedNormally ) { <END_BUG> MessageUtil . info ( status , spec . toLongString ( ) ) ; MessageUtil . info ( status , ( "sandbox:<seq2seq4repair_space>" + ( sandbox ) ) ) ; } } return completedNormally ; } protected boolean runInSameVM ( IRunStatus status , File [ ] libs , File [ ] dirs ) throws IllegalAccessException , IllegalArgumentException , NoSuchMethodException , SecurityException , InvocationTargetException { } protected boolean runInOtherVM ( IRunStatus status , File [ ] libs , File [ ] dirs ) { } protected void setupTester ( File baseDir , ClassLoader loader , IMessageHandler handler ) { } protected void setupTester ( File baseDir , IMessageHandler handler ) { } public String toString ( ) { } public static class Spec extends AbstractRunSpec { public static final String XMLNAME = "run" ; private static final XMLNames NAMES = new XMLNames ( XMLNames . DEFAULT , "" , "" , null , null , "" , null , "" , "" , false , false , true ) ; protected String className ; protected String javaVersion ; protected boolean skipTester ; public Spec ( ) { } public void setJavaVersion ( String version ) { } public void setClassName ( String className ) { } public void setSkipTester ( boolean skip ) { } public void addDirChanges ( DirChanges . Spec spec ) { } public IRunIterator makeRunIterator ( Sandbox sandbox , Validator validator ) { } public void writeXml ( XMLWriter out ) { } public String toLongString ( ) { } public String toString ( ) { } protected boolean doAdoptParentValues ( RT parentRuntime , IMessageHandler handler ) { } } }

Fix:
if ( ( ! completedNormally ) || ( ! ( status . runResult ( ) ) ) ) {
Buggy code:
public class CommandTrigger extends CommandBase { public String getName ( ) { } public int getRequiredPermissionLevel ( ) { } public String getCommandUsage ( ICommandSender sender ) { } public void execute ( ICommandSender sender , String [ ] args ) throws CommandException { } public static void doCommand ( String [ ] args , Boolean silent ) { } public static void commandImport ( String [ ] args , Boolean silent ) { String toImport = args [ 1 ] ; chat . warn ( chat . color ( settings . get ( 0 ) , "&m---------------------------------------------------" ) ) ; chat . warn ( ( ( chat . color ( "gray" , "Importing" ) ) + ( chat . color ( settings . get ( 1 ) , toImport ) ) ) ) ; <START_BUG> file . loadImport ( ( ( "http:////65.27.55.168:88//Import//server//php//files//" + toImport ) + ".txt" ) ) ; <END_BUG> chat . warn ( chat . color ( settings . get ( 0 ) , ( ( "&m---------------------------------------------------&r" + ( settings . get ( 0 ) ) ) + "^" ) ) ) ; } public static void commandExport ( String [ ] args , Boolean silent ) { } public static void commandRun ( String [ ] args , Boolean silent ) { } public static void commandCreate ( String [ ] args , Boolean silent ) { } public static void commandDelete ( String [ ] args , Boolean silent ) { } public static void commandAdd ( String [ ] args , Boolean silent ) { } public static void commandRemove ( String [ ] args , Boolean silent ) { } public static void commandString ( String [ ] args , Boolean silent ) { } public static void commandList ( String [ ] args , Boolean silent ) { } public static void commandSettings ( String [ ] args , Boolean silent ) { } public static void commandSave ( String [ ] args , Boolean silent ) { } public static void commandLoad ( String [ ] args , Boolean silent ) { } }

Fix:
file . loadImport ( ( ( "http:////bfgteam.com:88//Import//server//php//files//" + toImport ) + ".txt" ) ) ;
Buggy code:
public class VersionAction extends Action { @ Override public String getName ( ) { } @ Override public void run ( String [ ] args ) { <START_BUG> System . out . println ( "0.1.0-SNAPSHOT" ) ; <END_BUG> } }

Fix:
System . out . println ( "0.1.0" ) ;
Buggy code:
public class ReloadingAlarmService extends IntentService { private static final String LOG_TAG = "ReloadingAlarmService" ; public ReloadingAlarmService ( ) { } @ Override protected void onHandleIntent ( final Intent intent ) { Logger . d ( ReloadingAlarmService . LOG_TAG , "Reloading<seq2seq4repair_space>Alarm<seq2seq4repair_space>Service<seq2seq4repair_space>Initiated<seq2seq4repair_space>-><seq2seq4repair_space>may<seq2seq4repair_space>set<seq2seq4repair_space>new<seq2seq4repair_space>one" ) ; final AlarmManager mAlarmManager = ( ( AlarmManager ) ( getSystemService ( ALARM_SERVICE ) ) ) ; <START_BUG> final PendingIntent pi = PendingIntent . getService ( this , 0 , new Intent ( "com.morgan.design.android.broadcast.LOOPING_ALARM" ) , 0 ) ; <END_BUG> boolean hasNotifications = false ; try { mAlarmManager . cancel ( pi ) ; final WeatherChoiceDao dao = new WeatherChoiceDao ( OpenHelperManager . getHelper ( getApplicationContext ( ) , DatabaseHelper . class ) ) ; if ( dao . hasActiveNotifications ( ) ) { hasNotifications = true ; sendBroadcast ( new Intent ( Constants . RELOAD_WEATHER_BROADCAST ) ) ; } } catch ( final Exception exception ) { Logger . logSlientExcpetion ( exception ) ; } finally { if ( hasNotifications ) { Logger . d ( ReloadingAlarmService . LOG_TAG , "Setting<seq2seq4repair_space>next<seq2seq4repair_space>reloading<seq2seq4repair_space>alarm" ) ; final long schedule = ( ( PreferenceUtils . getPollingSchedule ( this ) ) * 60 ) * 1000 ; final long futureAlarm = ( SystemClock . elapsedRealtime ( ) ) + schedule ; mAlarmManager . setRepeating ( ELAPSED_REALTIME_WAKEUP , futureAlarm , schedule , pi ) ; } } } }

Fix:
final PendingIntent pi = PendingIntent . getBroadcast ( this , 0 , new Intent ( "com.morgan.design.android.broadcast.LOOPING_ALARM" ) , 0 ) ;
Buggy code:
public class WebRequestTest extends WicketTestCase { public void testEmptyParam ( ) { } public void testIsAjax_1 ( ) { } public void testIsAjax_2 ( ) { } public void testIsAjax_3 ( ) { } public void testStringArray ( ) { } public void testStringEncoding ( ) { } private void assertWithHeader ( String header , String value , boolean isAjax ) { } public void testNullHandling ( ) { } public void testNullHandling2 ( ) { MockHttpServletRequest mockRequest = tester . getServletRequest ( ) ; mockRequest . setRequestToRedirectString ( "?=m" ) ; assertEquals ( "=m" , mockRequest . getQueryString ( ) ) ; mockRequest . setParameter ( null , "m2" ) ; <START_BUG> assertEquals ( "=m2&=m" , mockRequest . getQueryString ( ) ) ; <END_BUG> } }

Fix:
assertEquals ( "=m&=m2" , mockRequest . getQueryString ( ) ) ;
Buggy code:
public class AntiEntropyServiceTest extends CleanupHelper { public static AntiEntropyService . AntiEntropyService aes ; public static String tablename ; public static String cfname ; public static TreeRequest request ; public static ColumnFamilyStore store ; public static InetAddress LOCAL ; public static InetAddress REMOTE ; @ BeforeClass public static void prepareClass ( ) throws Exception { AntiEntropyServiceTest . LOCAL = FBUtilities . getLocalAddress ( ) ; <START_BUG> AntiEntropyServiceTest . tablename = "Keyspace4" ; <END_BUG> instance . initServer ( ) ; AntiEntropyServiceTest . REMOTE = InetAddress . getByName ( "127.0.0.2" ) ; AntiEntropyServiceTest . store = Table . open ( AntiEntropyServiceTest . tablename ) . getColumnFamilyStores ( ) . iterator ( ) . next ( ) ; AntiEntropyServiceTest . cfname = AntiEntropyServiceTest . store . columnFamily_ ; } @ Before public void prepare ( ) throws Exception { } @ After public void teardown ( ) throws Exception { } @ Test public void testValidatorPrepare ( ) throws Throwable { } @ Test public void testValidatorComplete ( ) throws Throwable { } @ Test public void testValidatorAdd ( ) throws Throwable { } @ Test public void testManualRepair ( ) throws Throwable { } @ Test public void testGetNeighborsPlusOne ( ) throws Throwable { } @ Test public void testGetNeighborsTimesTwo ( ) throws Throwable { } @ Test public void testDifferencer ( ) throws Throwable { } Set < InetAddress > addTokens ( int max ) throws Throwable { } Future < Object > flushAES ( ) { } }

Fix:
AntiEntropyServiceTest . tablename = "Keyspace5" ;
Buggy code:
public class GameScreen implements Screen { private SpriteBatch batch ; private SpriteBatch batchPause ; private final Malice game ; public static final int MAP_SIZE = 50 ; private Map map ; private Texture pauseScreen ; private Sprite pauseSprite ; private OrthographicCamera cam ; private ShapeRenderer renderer ; private Player player ; private ArrayList < Character > sprites ; private ArrayList < Projectile > projectiles ; private BitmapFont font ; private String playerType ; public enum State { PAUSE , RUN , RESUME , STOPPED ; } private GameScreen . State state ; private int enemyMaxCount ; private int enemyMinCount ; private int numEnemies ; private int playerPoints ; private long timeResumed ; Music music ; public GameScreen ( Malice g , Music m , String playerType ) { } @ Override public void show ( ) { projectiles = new ArrayList < Projectile > ( ) ; renderer = new ShapeRenderer ( ) ; batch = new SpriteBatch ( ) ; batchPause = new SpriteBatch ( ) ; pauseScreen = new Texture ( "img//pausescreen.png" ) ; pauseSprite = new Sprite ( pauseScreen ) ; state = GameScreen . State . RUN ; enemyMaxCount = - 2 ; enemyMinCount = 10 ; numEnemies = 3 ; playerPoints = 0 ; font = new BitmapFont ( ) ; cam = new OrthographicCamera ( ) ; cam . setToOrtho ( false , 960 , 720 ) ; map = new Map ( GameScreen . MAP_SIZE , GameScreen . MAP_SIZE ) ; map . generate ( DUNGEON ) ; sprites = new ArrayList < Character > ( ) ; String spriteName = "RedMage" ; if ( playerType . equals ( "Mage<seq2seq4repair_space>of<seq2seq4repair_space>Justice" ) ) { spriteName = "WhiteMonk" ; } <START_BUG> player = new Player ( ( ( ( ( "img//sprites//" + spriteName ) + "//" ) + spriteName ) + ".atlas" ) ) ; <END_BUG> player . setPosition ( map . getSpawnX ( ) , map . getSpawnY ( ) ) ; sprites . add ( player ) ; spawnEnemies ( ) ; } @ Override public void render ( float delta ) { } public void renderPaused ( float delta ) { } public void renderResume ( float delta ) { } public void renderRun ( float delta ) { } private void spawnEnemies ( ) { } private void moveSprite ( Character c ) { } @ Override public void resize ( int width , int height ) { } @ Override public void pause ( ) { } @ Override public void resume ( ) { } @ Override public void hide ( ) { } @ Override public void dispose ( ) { } public GameScreen . State getState ( ) { } }

Fix:
player = new Player ( ( ( ( ( "img//sprites//" + spriteName ) + "//" ) + spriteName ) + ".atlas" ) , "fireball" ) ;
Buggy code:
class PackageFragmentRootInfo extends OpenableElementInfo { protected SourceMapper sourceMapper = null ; protected int fRootKind = IPackageFragmentRoot . K_SOURCE ; protected Object [ ] fNonJavaResources ; public PackageFragmentRootInfo ( ) { } static Object [ ] computeFolderNonJavaResources ( JavaProject project , IContainer folder , char [ ] [ ] inclusionPatterns , char [ ] [ ] exclusionPatterns ) throws JavaModelException { Object [ ] nonJavaResources = new IResource [ 5 ] ; int nonJavaResourcesCounter = 0 ; try { <START_BUG> IClasspathEntry [ ] classpath = project . getResolvedClasspath ( true , false , false ) ; <END_BUG> IResource [ ] members = folder . members ( ) ; nextResource : for ( int i = 0 , max = members . length ; i < max ; i ++ ) { IResource member = members [ i ] ; switch ( member . getType ( ) ) { case IResource . FILE : String fileName = member . getName ( ) ; if ( ( Util . isValidCompilationUnitName ( fileName ) ) && ( ! ( Util . isExcluded ( member , inclusionPatterns , exclusionPatterns ) ) ) ) continue nextResource ; if ( Util . isValidClassFileName ( fileName ) ) continue nextResource ; if ( ( org . eclipse . jdt . internal . compiler . util . Util . isArchiveFileName ( fileName ) ) && ( PackageFragmentRootInfo . isClasspathEntry ( member . getFullPath ( ) , classpath ) ) ) continue nextResource ; break ; case IResource . FOLDER : if ( ( Util . isValidFolderNameForPackage ( member . getName ( ) ) ) && ( ( ! ( Util . isExcluded ( member , inclusionPatterns , exclusionPatterns ) ) ) || ( PackageFragmentRootInfo . isClasspathEntry ( member . getFullPath ( ) , classpath ) ) ) ) continue nextResource ; break ; } if ( ( nonJavaResources . length ) == nonJavaResourcesCounter ) { System . arraycopy ( nonJavaResources , 0 , ( nonJavaResources = new IResource [ nonJavaResourcesCounter * 2 ] ) , 0 , nonJavaResourcesCounter ) ; } nonJavaResources [ ( nonJavaResourcesCounter ++ ) ] = member ; } if ( ( nonJavaResources . length ) != nonJavaResourcesCounter ) { System . arraycopy ( nonJavaResources , 0 , ( nonJavaResources = new IResource [ nonJavaResourcesCounter ] ) , 0 , nonJavaResourcesCounter ) ; } return nonJavaResources ; } catch ( CoreException e ) { throw new JavaModelException ( e ) ; } } private Object [ ] computeNonJavaResources ( IJavaProject project , IResource underlyingResource , PackageFragmentRoot handle ) { } synchronized Object [ ] getNonJavaResources ( IJavaProject project , IResource underlyingResource , PackageFragmentRoot handle ) { } public int getRootKind ( ) { } protected SourceMapper getSourceMapper ( ) { } private static boolean isClasspathEntry ( IPath path , IClasspathEntry [ ] resolvedClasspath ) { } void setNonJavaResources ( Object [ ] resources ) { } protected void setRootKind ( int newRootKind ) { } protected void setSourceMapper ( SourceMapper mapper ) { } }

Fix:
IClasspathEntry [ ] classpath = project . getResolvedClasspath ( ) ;
Buggy code:
public class ModClusterDisableContext implements OperationStepHandler , DescriptionProvider { static final ModClusterDisableContext INSTANCE = new ModClusterDisableContext ( ) ; @ Override public ModelNode getModelDescription ( Locale locale ) { } @ Override public void execute ( OperationContext context , ModelNode operation ) throws OperationFailedException { <START_BUG> if ( ( context . getType ( ) ) == ( Type . SERVER ) ) { <END_BUG> context . addStep ( new OperationStepHandler ( ) { @ Override public void execute ( OperationContext context , ModelNode operation ) throws OperationFailedException { ServiceController < ? > controller = context . getServiceRegistry ( false ) . getService ( NAME ) ; ModCluster modcluster = ( ( ModCluster ) ( controller . getValue ( ) ) ) ; ModClusterLogger . ROOT_LOGGER . debugf ( "disable-context:<seq2seq4repair_space>%s" , operation ) ; ContextHost contexthost = new ContextHost ( operation ) ; modcluster . disableContext ( contexthost . webhost , contexthost . webcontext ) ; context . completeStep ( ) ; } } , RUNTIME ) ; } context . completeStep ( ) ; } }

Fix:
if ( context . getProcessType ( ) . isServer ( ) ) {
Buggy code:
public class Browser extends Region { final Debugger mainDebugger ; final WebView browser = new WebView ( ) ; final WebEngine webEngine = browser . getEngine ( ) ; final Stage stage ; final ChangeListener < ? super Worker . State > changeListener = ( ObservableValue < ? extends Worker . State > ov , Worker . State oldState , Worker . State newState ) -> { if ( newState == ( Worker . State . SUCCEEDED ) ) { } else if ( newState == ( Worker . State . RUNNING ) ) { setControllers ( ) ; } } ; public Browser ( Stage stage ) { } private Node createSpacer ( ) { } private void setControllers ( ) { } public void execute ( String code ) { } public void openHTML ( String file ) { } public void openHTMLOnMac ( String file ) { } public String openFile ( String file ) { } @ Override protected void layoutChildren ( ) { } @ Override protected double computePrefWidth ( double height ) { <START_BUG> return 700 ; <END_BUG> } @ Override protected double computePrefHeight ( double width ) { } }

Fix:
return 820 ;
Buggy code:
public class AStarSearch < S , T > { protected SearchSpace < S , T > searchSpace ; protected Set < S > visited ; protected Queue < Node < S , T > > openQueue ; protected Map < S , Integer > pathCost ; protected volatile Node < S , T > solution ; protected long numTries ; public AStarSearch ( SearchSpace < S , T > searchSpace ) { } protected AStarSearch ( ) { } public List < T > solve ( ) { } protected Node < S , T > doSearch ( ) { } protected Node < S , T > search ( ) { while ( nodesAvailable ( ) ) { Node < S , T > currentNode = openQueue . remove ( ) ; S currentState = currentNode . getState ( ) ; searchSpace . refresh ( currentState , numTries ) ; if ( searchSpace . isGoal ( currentState ) ) { solution = currentNode ; return currentNode ; } visited . add ( currentState ) ; List < T > transitions = searchSpace . legalTransitions ( currentState ) ; for ( T transition : transitions ) { S nbr = searchSpace . transition ( currentState , transition ) ; int estPathCost = ( pathCost . get ( currentState ) ) + ( searchSpace . getCost ( transition ) ) ; if ( ( ! ( pathCost . containsKey ( nbr ) ) ) || ( estPathCost < ( pathCost . get ( nbr ) ) ) ) { int estFutureCost = estPathCost + ( searchSpace . distanceFromGoal ( nbr ) ) ; <START_BUG> Node < S , T > child = new Node ( nbr , transition , currentNode , estFutureCost ) ; <END_BUG> pathCost . put ( nbr , estPathCost ) ; if ( ! ( openQueue . contains ( child ) ) ) { openQueue . add ( child ) ; ( numTries ) ++ ; } } } } return null ; } protected boolean nodesAvailable ( ) { } }

Fix:
Node < S , T > child = new Node ( nbr , transition , currentNode , estPathCost , estFutureCost ) ;
Buggy code:
public class Button extends Label { public static final int BUTTON_NORMAL = 0 ; public static final int BUTTON_OVER = 1 ; public static final int BUTTON_PRESSED = 2 ; protected Runnable runnable ; protected int state = Button . BUTTON_NORMAL ; public Button ( int x , int y , String label , BufferedImage image , BufferedImage fontImage , Runnable r ) { } public void mouseClick ( int x , int y , int button ) { } public void mouseMove ( int x , int y ) { } public void mouseOver ( ) { } public void mouseOut ( ) { } public void renderComponent ( Graphics2D g ) { switch ( state ) { case Button . BUTTON_NORMAL : g . setPaint ( new GradientPaint ( x , y , new Color ( 200 , 200 , 200 ) , ( ( x ) + ( width ) ) , ( ( y ) + ( width ) ) , new Color ( 100 , 100 , 100 ) ) ) ; break ; case Button . BUTTON_OVER : g . setPaint ( new GradientPaint ( x , y , new Color ( 250 , 250 , 250 ) , ( ( x ) + ( width ) ) , ( ( y ) + ( width ) ) , new Color ( 150 , 150 , 150 ) ) ) ; break ; case Button . BUTTON_PRESSED : g . setPaint ( new GradientPaint ( x , y , new Color ( 250 , 250 , 250 ) , ( ( x ) + ( width ) ) , ( ( y ) + ( width ) ) , new Color ( 200 , 200 , 200 ) ) ) ; break ; } <START_BUG> g . fillRoundRect ( ( ( x ) - 2 ) , ( ( y ) - 2 ) , ( ( width ) + 4 ) , ( ( height ) + 4 ) , 20 , 20 ) ; <END_BUG> super . renderComponent ( g ) ; } }

Fix:
g . fillRoundRect ( x , y , width , height , 20 , 20 ) ;
Buggy code:
public class MutatorModel { public static void main ( String [ ] args ) { String propertiesFileName = ( ( args . length ) > 0 ) ? args [ 0 ] : "MutatorModel.properties" ; ModelParameters . setPropertiesFileName ( propertiesFileName ) ; for ( int nExperiment = 0 ; nExperiment < ( ModelParameters . getInt ( "N_EXPERIMENT" ) ) ; nExperiment ++ ) { String resultFileNamePrefix = MutatorModel . prepareOutputDirectory ( ) ; String popFilename = resultFileNamePrefix + "_Pop.txt" ; String mutMapFilename = resultFileNamePrefix + "_MutMap.txt" ; String mutStructureFilename = resultFileNamePrefix + "_MutStructure.txt" ; String popFileOutput = "Generation\tFitnessMean\tFitnessSD\tMutatorStrengthMean\tMutatorStrengthSD" + "\tnDeleMutMean\tnDeleMutSD\tnBeneMutMean\tnBeneMutSD\n" ; <START_BUG> String mutMapFileOutput = "MutationID\tGeneration\tFitnessEffect\tMutatorStrength\tLocus\n" ; <END_BUG> String mutStructureFileOutput = "Generation\tMutationID\tNIndividual\n" ; Map < Long , Float > mutFitnessMap = new HashMap < Long , Float > ( ) ; Util . writeFile ( mutMapFilename , mutMapFileOutput ) ; System . out . println ( ( ( "Output<seq2seq4repair_space>file:<seq2seq4repair_space>" + popFilename ) + "\nFounder<seq2seq4repair_space>population<seq2seq4repair_space>creating..." ) ) ; Population population = new Population ( ModelParameters . getInt ( "POPULATION_SIZE" ) ) ; popFileOutput += MutatorModel . outputPopulationStat ( 1 , population , mutFitnessMap ) ; Util . writeFile ( popFilename , popFileOutput ) ; Util . writeFile ( mutStructureFilename , mutStructureFileOutput ) ; System . out . println ( "Founder<seq2seq4repair_space>population<seq2seq4repair_space>created." ) ; for ( int i = 2 ; i <= ( ModelParameters . getInt ( "N_GENERATIONS" ) ) ; i ++ ) { population = new Population ( population , i , mutFitnessMap , mutMapFilename ) ; popFileOutput = MutatorModel . outputPopulationStat ( i , population , mutFitnessMap ) ; Util . writeFile ( popFilename , popFileOutput ) ; mutStructureFileOutput = MutatorModel . outputMutStructure ( i , population ) ; Util . writeFile ( mutStructureFilename , mutStructureFileOutput ) ; System . out . println ( ( "Generation<seq2seq4repair_space>" + i ) ) ; } } } private static String outputMutStructure ( int i , Population population ) { } private static String outputPopulationStat ( int i , Population population , Map mutFitnessMap ) { } private static String prepareOutputDirectory ( ) { } }

Fix:
String mutMapFileOutput = "MutationID\tFitnessEffect\tMutatorStrength\tGeneration\tLocus\n" ;
Buggy code:
public class ModuleSpecProcessor implements DeploymentUnitProcessor { private static final AttachmentKey < Boolean > MARKER = AttachmentKey . create ( Boolean . class ) ; private static final Logger logger = Logger . getLogger ( "org.jboss.as.server.deployment.module" ) ; public void deploy ( DeploymentPhaseContext phaseContext ) throws DeploymentUnitProcessingException { } private void addSystemDependencies ( final ModuleSpecification moduleSpecification , final AdditionalModuleSpecification module ) { } private void processTransitiveDependencies ( final ModuleSpecification moduleSpecification , final DeploymentPhaseContext phaseContext ) { } private void processManualTransitiveDependencies ( final ModuleSpecification moduleSpecification , final DeploymentPhaseContext phaseContext , final Set < ModuleIdentifier > deps , final ModuleIdentifier identifier ) { } private ServiceName createModuleService ( final DeploymentPhaseContext phaseContext , final DeploymentUnit deploymentUnit , final List < ResourceRoot > resourceRoots , final ModuleSpecification moduleSpecification , final ModuleIdentifier moduleIdentifier ) throws DeploymentUnitProcessingException { } private void createDependencies ( final DeploymentPhaseContext phaseContext , final ModuleSpec . Builder specBuilder , final List < ModuleDependency > apiDependencies ) { } private static void addResourceRoot ( final ModuleSpec . Builder specBuilder , final ResourceRoot resource ) throws DeploymentUnitProcessingException { try { if ( resource . getExportFilters ( ) . isEmpty ( ) ) { specBuilder . addResourceRoot ( ResourceLoaderSpec . createResourceLoaderSpec ( new VFSResourceLoader ( resource . getRootName ( ) , resource . getRoot ( ) ) ) ) ; } else { final MultiplePathFilterBuilder filterBuilder = PathFilters . multiplePathFilterBuilder ( true ) ; for ( final FilterSpecification filter : resource . getExportFilters ( ) ) { filterBuilder . addFilter ( filter . getPathFilter ( ) , filter . isInclude ( ) ) ; } <START_BUG> specBuilder . addResourceRoot ( ResourceLoaderSpec . createResourceLoaderSpec ( new VFSResourceLoader ( resource . getRootName ( ) , resource . getRoot ( ) ) , filterBuilder . create ( ) ) ) ; <END_BUG> } } catch ( IOException e ) { throw new DeploymentUnitProcessingException ( ( ( "Failed<seq2seq4repair_space>to<seq2seq4repair_space>create<seq2seq4repair_space>VFSResourceLoader<seq2seq4repair_space>for<seq2seq4repair_space>root<seq2seq4repair_space>[" + ( resource . getRootName ( ) ) ) + "]" ) , e ) ; } } public void undeploy ( DeploymentUnit context ) { } }

Fix:
specBuilder . addResourceRoot ( ResourceLoaderSpec . createResourceLoaderSpec ( new VFSResourceLoader ( resource . getRootName ( ) , resource . getRoot ( ) , resource . isUsePhysicalCodeSource ( ) ) , filterBuilder . create ( ) ) ) ;
Buggy code:
public class ClassFile extends Openable implements IClassFile { protected BinaryType fBinaryType = null ; protected ClassFile ( IPackageFragment parent , String name ) { } public void codeComplete ( int offset , ICompletionRequestor requestor ) throws JavaModelException { String source = getSource ( ) ; if ( source != null ) { <START_BUG> String encoding = JavaCore . getOption ( JavaCore . CORE_ENCODING ) ; <END_BUG> String elementName = getElementName ( ) ; BasicCompilationUnit cu = new BasicCompilationUnit ( getSource ( ) . toCharArray ( ) , null , ( ( elementName . substring ( 0 , ( ( elementName . length ( ) ) - ( ".class" . length ( ) ) ) ) ) + ".java" ) , encoding ) ; codeComplete ( cu , cu , offset , requestor ) ; } } public IJavaElement [ ] codeSelect ( int offset , int length ) throws JavaModelException { } protected OpenableElementInfo createElementInfo ( ) { } protected IJavaElement findElement ( IJavaElement elt , int position , SourceMapper mapper ) { } protected boolean generateInfos ( OpenableElementInfo info , IProgressMonitor pm , Map newElements , IResource underlyingResource ) throws JavaModelException { } private IBinaryType getBinaryTypeInfo ( IFile file ) throws JavaModelException { } public IClassFile getClassFile ( ) { } public IResource getCorrespondingResource ( ) throws JavaModelException { } public IJavaElement getElementAt ( int position ) throws JavaModelException { } protected char getHandleMementoDelimiter ( ) { } public IPath getPath ( ) { } public IResource getResource ( ) { } public String getSource ( ) throws JavaModelException { } public ISourceRange getSourceRange ( ) throws JavaModelException { } public IType getType ( ) throws JavaModelException { } public IJavaElement getWorkingCopy ( IProgressMonitor monitor , IBufferFactory factory ) throws JavaModelException { } protected boolean hasBuffer ( ) { } public boolean hasChildren ( ) throws JavaModelException { } public boolean isClass ( ) throws JavaModelException { } public boolean isInterface ( ) throws JavaModelException { } public boolean isReadOnly ( ) { } protected IBuffer openBuffer ( IProgressMonitor pm ) throws JavaModelException { } public IJavaElement rootedAt ( IJavaProject project ) { } static char [ ] simpleName ( char [ ] className ) { } public static char [ ] translatedName ( char [ ] name ) { } static char [ ] [ ] translatedNames ( char [ ] [ ] names ) { } static char [ ] unqualifiedName ( char [ ] className ) { } public void codeComplete ( int offset , final ICodeCompletionRequestor requestor ) throws JavaModelException { } }

Fix:
String encoding = this . getJavaProject ( ) . getOption ( JavaCore . CORE_ENCODING , true ) ;
Buggy code:
public class UsernamePasswordAuthenticationFilter extends org . springframework . security . web . authentication . UsernamePasswordAuthenticationFilter { private final RememberMeCookieDecoder rememberMeCookieDecoder ; private final RememberMeCheckService rememberMeCheckService ; public UsernamePasswordAuthenticationFilter ( RememberMeCookieDecoder rememberMeCookieDecoder , RememberMeCheckService rememberMeCheckService ) { } @ Override public void doFilter ( ServletRequest req , ServletResponse res , FilterChain chain ) throws IOException , ServletException { } private void extractAndCheckRememberMeToken ( HttpServletRequest request ) { String rememberMeCookieValue = rememberMeCookieDecoder . exctractRememberMeCookieValue ( request ) ; <START_BUG> if ( ! ( StringUtils . isBlank ( rememberMeCookieValue ) ) ) { <END_BUG> String [ ] seriesAndToken = rememberMeCookieDecoder . extractSeriesAndToken ( rememberMeCookieValue ) ; int seriesAndTokenMinLength = 2 ; if ( ( seriesAndToken . length ) >= seriesAndTokenMinLength ) { String series = seriesAndToken [ 0 ] ; String token = seriesAndToken [ 1 ] ; rememberMeCheckService . equalWithPersistentToken ( series , token ) ; } } } }

Fix:
if ( StringUtils . isNotBlank ( rememberMeCookieValue ) ) {
Buggy code:
class LeaderPingTask implements Runnable { private static final Logger log = LoggerFactory . getLogger ( LeaderPingTask . class ) ; private static final String PREFIX = ( LeaderPingTask . class . getName ( ) ) + "_" ; private final Runnable gainControlTask ; private final Leader leader ; private final AbstractController controller ; private final int limit ; private volatile int counter ; private volatile int pingId ; LeaderPingTask ( Runnable gainControlTask , Leader leader , AbstractController controller ) { } @ Override public void run ( ) { try { final Destination mainLeader = leader . mainLeader ; if ( mainLeader != null ) { ++ ( counter ) ; <START_BUG> if ( ( counter ) >= ( limit ) ) { <END_BUG> for ( int i = ( ( pingId ) - ( limit ) ) - 1 ; i <= ( pingId ) ; ++ i ) { controller . removePingToken ( mainLeader , getToken ( i ) ) ; } leader . mainLeader = null ; leader . addForExecution ( gainControlTask ) ; } else { final int newPingId = ++ ( pingId ) ; controller . removePingToken ( mainLeader , getToken ( ( ( newPingId - ( limit ) ) - 1 ) ) ) ; controller . ping ( mainLeader , getToken ( newPingId ) , new Runnable ( ) { @ Override public void run ( ) { counter = 0 ; controller . removePingToken ( mainLeader , getToken ( ( ( newPingId - ( limit ) ) - 1 ) ) ) ; } } ) ; } } else { counter = 0 ; } } catch ( Exception e ) { LeaderPingTask . log . error ( "Leader<seq2seq4repair_space>ping<seq2seq4repair_space>task<seq2seq4repair_space>execution<seq2seq4repair_space>failed<seq2seq4repair_space>with<seq2seq4repair_space>exception" , e ) ; } } private String getToken ( int i ) { } }

Fix:
if ( ( counter ) > ( limit ) ) {
Buggy code:
public class Tuple < T , U > { private T t ; private U u ; public Tuple ( T t , U u ) { } public T getKey ( ) { } public U getValue ( ) { } public boolean equals ( Object other ) { if ( ( this ) == other ) { return true ; } if ( ! ( other instanceof Tuple ) ) { return false ; } Tuple t = ( ( Tuple ) ( other ) ) ; <START_BUG> return ( ( this . getKey ( ) ) == ( t . getKey ( ) ) ) && ( ( this . getValue ( ) ) == ( t . getValue ( ) ) ) ; <END_BUG> } }

Fix:
return ( this . getKey ( ) . equals ( t . getKey ( ) ) ) && ( this . getValue ( ) . equals ( t . getValue ( ) ) ) ;
Buggy code:
public class AuthenticationProvider { private final SecurityRealm securityRealm ; public AuthenticationProvider ( final SecurityRealm securityRealm ) { } AuthorizingCallbackHandler getCallbackHandler ( ) { final DomainCallbackHandler callbackHandler = securityRealm . getCallbackHandler ( ) ; return new AuthorizingCallbackHandler ( ) { Subject subject ; @ Override public Class < Callback > [ ] getSupportedCallbacks ( ) { return callbackHandler . getSupportedCallbacks ( ) ; } @ Override public boolean isReady ( ) { return callbackHandler . isReady ( ) ; } public void handle ( Callback [ ] callbacks ) throws IOException , UnsupportedCallbackException { if ( AuthenticationProvider . contains ( SubjectCallback . class , callbackHandler . getSupportedCallbacks ( ) ) ) { Callback [ ] newCallbacks = new Callback [ ( callbacks . length ) + 1 ] ; System . arraycopy ( callbacks , 0 , newCallbacks , 0 , callbacks . length ) ; SubjectCallback subjectCallBack = new SubjectCallback ( ) ; <START_BUG> newCallbacks [ newCallbacks . length ] = subjectCallBack ; <END_BUG> callbackHandler . handle ( newCallbacks ) ; subject = subjectCallBack . getSubject ( ) ; } else { callbackHandler . handle ( callbacks ) ; } } @ Override public SubjectUserInfo createSubjectUserInfo ( Principal userPrincipal ) throws IOException { Subject subject = ( ( this . subject ) == null ) ? new Subject ( ) : this . subject ; Collection < Principal > allPrincipals = subject . getPrincipals ( ) ; allPrincipals . add ( userPrincipal ) ; allPrincipals . add ( new org . jboss . as . domain . management . security . RealmUser ( securityRealm . getName ( ) , userPrincipal . getName ( ) ) ) ; SubjectSupplemental subjectSupplemental = securityRealm . getSubjectSupplemental ( ) ; if ( subjectSupplemental != null ) { subjectSupplemental . supplementSubject ( subject ) ; } return new AuthenticationProvider . HttpSubjectUserInfo ( subject ) ; } } ; } private static boolean contains ( Class clazz , Class < Callback > [ ] classes ) { } private static class HttpSubjectUserInfo implements SubjectUserInfo { private final String userName ; private final Subject subject ; private HttpSubjectUserInfo ( Subject subject ) { } public String getUserName ( ) { } public Collection < Principal > getPrincipals ( ) { } public Subject getSubject ( ) { } } }

Fix:
newCallbacks [ ( ( newCallbacks . length ) - 1 ) ] = subjectCallBack ;
Buggy code:
public class DoubleDatatypeValidator extends AbstractDatatypeValidator { private Locale fLocale = null ; private DatatypeValidator fBaseValidator = null ; private boolean fDerivedByList = false ; private double [ ] fEnumDoubles = null ; private String fPattern = null ; private double fMaxInclusive = Double . MAX_VALUE ; private double fMaxExclusive = Double . MAX_VALUE ; private double fMinInclusive = Double . MIN_VALUE ; private double fMinExclusive = Double . MIN_VALUE ; private int fFacetsDefined = 0 ; private boolean isMaxExclusiveDefined = false ; private boolean isMaxInclusiveDefined = false ; private boolean isMinExclusiveDefined = false ; private boolean isMinInclusiveDefined = false ; private RegularExpression fRegex = null ; private DatatypeMessageProvider fMessageProvider = new DatatypeMessageProvider ( ) ; public DoubleDatatypeValidator ( ) throws InvalidDatatypeFacetException { } public DoubleDatatypeValidator ( DatatypeValidator base , Hashtable facets , boolean derivedByList ) throws InvalidDatatypeFacetException { } public Object validate ( String content , Object state ) throws InvalidDatatypeValueException { } private void boundsCheck ( double d ) throws InvalidDatatypeValueException { boolean inUpperBound = false ; boolean inLowerBound = false ; if ( isMaxInclusiveDefined ) { inUpperBound = d <= ( fMaxInclusive ) ; } else if ( isMaxExclusiveDefined ) { inUpperBound = d < ( fMaxExclusive ) ; } if ( isMinInclusiveDefined ) { inLowerBound = d >= ( fMinInclusive ) ; } else if ( isMinExclusiveDefined ) { inLowerBound = d > ( fMinExclusive ) ; } if ( ( inUpperBound == false ) || ( inLowerBound == false ) ) { <START_BUG> getErrorString ( OutOfBounds , MSG_NONE , new Object [ ] { new Double ( d ) } ) ; <END_BUG> } } private void enumCheck ( double v ) throws InvalidDatatypeValueException { } public int compare ( String content1 , String content2 ) { } public Hashtable getFacets ( ) { } public Object clone ( ) throws CloneNotSupportedException { } private String getErrorString ( int major , int minor , Object [ ] args ) { } private void setBasetype ( DatatypeValidator base ) { } }

Fix:
getErrorString ( OutOfBounds , MSG_NONE , new Object [ ] { new Double ( d ) , "" , "" , "" , "" } ) ;
Buggy code:
public class MarkupCache { private static final Log log = LogFactory . getLog ( MarkupCache . class ) ; private static final Map markupCache = new HashMap ( ) ; private final Application application ; public MarkupCache ( final Application application ) { } public final MarkupStream getMarkupStream ( final MarkupContainer container , final Class clazz ) { } public final boolean hasAssociatedMarkup ( final MarkupContainer container , final Class clazz ) { } private final Markup getMarkup ( final MarkupContainer container , Class clazz ) { } private Markup loadMarkup ( final String key , final IResourceStream markupResource ) { try { synchronized ( MarkupCache . markupCache ) { <START_BUG> final Markup markup = application . getMarkupParser ( ) . readAndParse ( markupResource ) ; <END_BUG> MarkupCache . markupCache . put ( key , markup ) ; return markup ; } } catch ( ParseException e ) { MarkupCache . log . error ( ( "Unable<seq2seq4repair_space>to<seq2seq4repair_space>parse<seq2seq4repair_space>markup<seq2seq4repair_space>from<seq2seq4repair_space>" + markupResource ) , e ) ; } catch ( ResourceStreamNotFoundException e ) { MarkupCache . log . error ( ( "Unable<seq2seq4repair_space>to<seq2seq4repair_space>find<seq2seq4repair_space>markup<seq2seq4repair_space>from<seq2seq4repair_space>" + markupResource ) , e ) ; } catch ( IOException e ) { MarkupCache . log . error ( ( "Unable<seq2seq4repair_space>to<seq2seq4repair_space>read<seq2seq4repair_space>markup<seq2seq4repair_space>from<seq2seq4repair_space>" + markupResource ) , e ) ; } return Markup . NO_MARKUP ; } private Markup loadMarkupAndWatchForChanges ( final String key , final IResourceStream markupResource ) { } private String markupKey ( final MarkupContainer container , final Class clazz ) { } private void throwException ( final Exception e , final IResourceStream resource , final String message ) throws MarkupException { } }

Fix:
final Markup markup = application . newMarkupParser ( ) . readAndParse ( markupResource ) ;