nus-yam/ex-repair huggingface dataset:
Buggy code:
public class InitialContextFactoryBuilder implements javax . naming . spi . InitialContextFactoryBuilder { private static final InitialContextFactory DEFAULT_FACTORY = new NamingContextFactory ( ) ; public InitialContextFactory createInitialContextFactory ( Hashtable < ? , ? > environment ) throws NamingException { final String factoryClassName = ( ( String ) ( environment . get ( Context . INITIAL_CONTEXT_FACTORY ) ) ) ; <START_BUG> if ( factoryClassName == null ) { <END_BUG> return InitialContextFactoryBuilder . DEFAULT_FACTORY ; } final ClassLoader classLoader = getContextClassLoader ( ) ; try { final Class < ? > factoryClass = classLoader . loadClass ( factoryClassName ) ; return ( ( InitialContextFactory ) ( factoryClass . newInstance ( ) ) ) ; } catch ( Exception e ) { throw new NamingException ( ( ( ( "Failed<seq2seq4repair_space>instantiate<seq2seq4repair_space>InitialContextFactory<seq2seq4repair_space>" + factoryClassName ) + "<seq2seq4repair_space>from<seq2seq4repair_space>classloader<seq2seq4repair_space>" ) + classLoader ) ) ; } } private ClassLoader getContextClassLoader ( ) { } }

Fix:
if ( ( factoryClassName == null ) || ( NamingContextFactory . class . getName ( ) . equals ( factoryClassName ) ) ) {
Buggy code:
@ Controller @ RequestMapping ( "//record" ) public class RecordController { Logger logger = LoggerFactory . getLogger ( RecordController . class ) ; @ Resource private RecordFacade recordFacade ; @ RequestMapping ( "query_records.do" ) @ PowerCheck public String getConsultantInfor ( HttpServletRequest request , HttpServletResponse response , Integer status , Integer isPaid , Integer pageNum ) throws IOException { logger . info ( "---系统后台调用咨询记录接口页面----" ) ; String response_page = "admin//record" ; RecordQueryRequestDto requestDto = new RecordQueryRequestDto ( ) ; try { if ( status != null ) { YesOrNoEnum st = YesOrNoEnum . toEnum ( status ) ; requestDto . setIsCompleted ( st ) ; if ( status == 0 ) { response_page = "admin//record_ing" ; } else { response_page = "admin//record_end" ; } } if ( isPaid != null ) { YesOrNoEnum st = YesOrNoEnum . toEnum ( isPaid ) ; requestDto . setIsPaid ( st ) ; } if ( pageNum == null ) { pageNum = 1 ; } Long count = recordFacade . queryCount ( requestDto ) ; Pagination page = new Pagination ( ) ; page . setMaxCountAndCurrentPage ( count , pageNum ) ; if ( status != null ) { page . putParams ( "status" , status ) ; } if ( isPaid != null ) { page . putParams ( "isPaid" , isPaid ) ; } page . setUrl ( ( ( request . getContextPath ( ) ) + "//record//query_records.do" ) ) ; RecordQueryResponseDto responseDto = recordFacade . queryPage ( requestDto , page ) ; if ( responseDto != null ) { <START_BUG> request . setAttribute ( "recordsList" , responseDto . getConsultantRecordList ( ) ) ; <END_BUG> request . setAttribute ( "page" , page ) ; } } catch ( Exception e ) { logger . error ( "后台查询咨询师分页结果出错" , e ) ; } return response_page ; } @ RequestMapping ( "change_state.do" ) @ PowerCheck public void changeRecordState ( HttpServletRequest request , HttpServletResponse response , Long id , Integer status ) throws IOException { } }

Fix:
request . setAttribute ( "recordsList" , responseDto . getRecordInfoExtendList ( ) ) ;
Buggy code:
public class LoadGamePhase extends CreateGamePhase { private Snapshot snapshot ; private LoadGameTilePackFactory tilePackFactory ; public LoadGamePhase ( Game game , Snapshot snapshot , GameController controller ) { } @ Override protected Snapshot getSnapshot ( ) { } @ Override protected void preparePlayers ( ) { } @ Override protected void preparePhases ( ) { } @ Override protected void preplaceTiles ( ) { } @ Override protected void prepareTilePack ( ) { tilePackFactory = new LoadGameTilePackFactory ( ) ; tilePackFactory . setGame ( game ) ; <START_BUG> tilePackFactory . setConfig ( getGameController ( ) . getConfig ( ) ) ; <END_BUG> tilePackFactory . setExpansions ( game . getExpansions ( ) ) ; tilePackFactory . setSnapshot ( snapshot ) ; DefaultTilePack tilePack = tilePackFactory . createTilePack ( ) ; game . setTilePack ( tilePack ) ; for ( String tileId : snapshot . getDiscardedTiles ( ) ) { Tile tile = tilePack . drawTile ( tileId ) ; game . getBoard ( ) . discardTile ( tile ) ; } } @ Override public void next ( ) { } }

Fix:
tilePackFactory . setConfig ( getConfig ( ) ) ;
Buggy code:
public class I18NUtils { public static boolean mustTraslateAttr ( String attrName ) { } public static void setI18NAttr ( BaseDocument doc , Element e , String attr , String value ) { } public static String genI18NKey ( BaseDocument doc , Element e , String attr ) { } public static String getDialogOptionId ( Element e ) { } public static void putTranslationsInElement ( BaseDocument doc , Element e ) { } public static void extractStrings ( BaseDocument doc , Element e ) { } public static void deleteUnusedKeys ( BaseDocument doc ) { } private static void getUsedKeys ( Element e , ArrayList < String > usedKeys ) { NamedNodeMap attrs = e . getAttributes ( ) ; for ( int i = 0 ; i < ( attrs . getLength ( ) ) ; i ++ ) { <START_BUG> if ( ( attrs . item ( i ) . getNodeValue ( ) . charAt ( 0 ) ) == ( BaseDocument . I18NPREFIX ) ) { <END_BUG> usedKeys . add ( attrs . item ( i ) . getNodeValue ( ) . substring ( 1 ) ) ; } } NodeList childs = e . getChildNodes ( ) ; for ( int i = 0 ; i < ( childs . getLength ( ) ) ; i ++ ) { if ( ( childs . item ( i ) ) instanceof Element ) I18NUtils . getUsedKeys ( ( ( Element ) ( childs . item ( i ) ) ) , usedKeys ) ; } } }

Fix:
if ( ( ( attrs . item ( i ) . getNodeValue ( ) . length ( ) ) > 0 ) && ( ( attrs . item ( i ) . getNodeValue ( ) . charAt ( 0 ) ) == ( BaseDocument . I18NPREFIX ) ) ) {
Buggy code:
public class ColorDrawableBuilder { private static final int [ ] STATE_PRESSED = new int [ ] { attr . state_enabled , attr . state_pressed } ; private static final int [ ] STATE_FOCUSED = new int [ ] { attr . state_enabled , attr . state_focused } ; private static final int [ ] STATE_NORMAL = new int [ ] { attr . state_enabled } ; private static final int [ ] STATE_DISABLED = new int [ ] { - ( attr . state_enabled ) } ; private int mDefaultBackgroundColor = Color . BLACK ; private int mFocusBackgroundColor = 0 ; private int mDisableBackgroundColor = 0 ; private int mBorderColor = Color . TRANSPARENT ; private int mDisableBorderColor = Color . TRANSPARENT ; private int mBorderWidth = 0 ; private float mRadius = 0.0F ; public ColorDrawableBuilder ( ) { } public ColorDrawableBuilder setBackgroundColor ( int color ) { } public ColorDrawableBuilder setFocusBackgroundColor ( int color ) { } public ColorDrawableBuilder setDisableBackgroundColor ( int color ) { } public ColorDrawableBuilder setBorderColor ( int color ) { } public ColorDrawableBuilder setDisableBorderColor ( int color ) { } public ColorDrawableBuilder setBorderWidth ( int width ) { } public ColorDrawableBuilder setRadius ( float radius ) { } private Drawable getDrawableForState ( int color , boolean enabled ) { } public Drawable build ( ) { Drawable normal = getDrawableForState ( mDefaultBackgroundColor , true ) ; StateListDrawable states = new StateListDrawable ( ) ; if ( ( mFocusBackgroundColor ) != 0 ) { Drawable focused = getDrawableForState ( mFocusBackgroundColor , true ) ; states . addState ( ColorDrawableBuilder . STATE_PRESSED , focused ) ; states . addState ( ColorDrawableBuilder . STATE_FOCUSED , focused ) ; } states . addState ( ColorDrawableBuilder . STATE_NORMAL , normal ) ; <START_BUG> if ( ( mDisableBackgroundColor ) != 0 ) { <END_BUG> Drawable disabled = getDrawableForState ( mDisableBackgroundColor , false ) ; states . addState ( ColorDrawableBuilder . STATE_DISABLED , disabled ) ; } else { states . addState ( new int [ ] { } , normal ) ; } return states ; } @ SuppressWarnings ( "deprecation" ) @ SuppressLint ( "NewApi" ) public void setAsBackground ( View view ) { } }

Fix:
if ( ( ( mDisableBackgroundColor ) != 0 ) || ( ( mDisableBorderColor ) != 0 ) ) {
Buggy code:
public class Task3Mapper extends Mapper < LongWritable , Text , RevDatePair , Text > { @ Override public void map ( LongWritable key , Text value , Context context ) throws IOException , InterruptedException { Calendar givenDate = DatatypeConverter . parseDateTime ( context . getConfiguration ( ) . get ( "date" ) ) ; String line = value . toString ( ) ; StringTokenizer tokenizer = new StringTokenizer ( line ) ; if ( tokenizer . hasMoreTokens ( ) ) { String word = tokenizer . nextToken ( ) ; if ( word . equals ( "REVISION" ) ) { long articleId = Long . parseLong ( tokenizer . nextToken ( ) ) ; long revId = Long . parseLong ( tokenizer . nextToken ( ) ) ; tokenizer . nextToken ( ) ; String date = tokenizer . nextToken ( ) ; <START_BUG> if ( DatatypeConverter . parseDateTime ( date ) . after ( givenDate ) ) <END_BUG> context . write ( new RevDatePair ( articleId , date ) , new Text ( ( ( revId + "<seq2seq4repair_space>" ) + date ) ) ) ; } } } }

Fix:
if ( DatatypeConverter . parseDateTime ( date ) . before ( givenDate ) )
Buggy code:
public class DD_Version implements Formatable { private transient DataDictionaryImpl bootingDictionary ; int majorVersionNumber ; private int minorVersionNumber ; public DD_Version ( ) { } DD_Version ( DataDictionaryImpl bootingDictionary , int majorVersionNumber ) { } public String toString ( ) { } private static String majorToString ( int majorVersionNumber ) { } void upgradeIfNeeded ( DD_Version dictionaryVersion , TransactionController tc , Properties startParams ) throws StandardException { } private void applySafeChanges ( TransactionController tc , int fromMajorVersionNumber , int lastSoftUpgradeVersion ) throws StandardException { } private void doFullUpgrade ( TransactionController tc , int fromMajorVersionNumber , String aid ) throws StandardException { } private void handleMinorRevisionChange ( TransactionController tc , DD_Version fromVersion , boolean softUpgradeRun ) throws StandardException { boolean isReadOnly = bootingDictionary . af . isReadOnly ( ) ; if ( ! isReadOnly ) { if ( ( fromVersion . majorVersionNumber ) >= ( DataDictionary . DD_VERSION_DERBY_10_5 ) ) bootingDictionary . updateMetadataSPSes ( tc ) ; bootingDictionary . clearSPSPlans ( ) ; DD_Version lastRun ; if ( softUpgradeRun ) { fromVersion . minorVersionNumber = 1 ; lastRun = fromVersion ; } else { lastRun = this ; fromVersion . majorVersionNumber = majorVersionNumber ; fromVersion . minorVersionNumber = minorVersionNumber ; } tc . setProperty ( CORE_DATA_DICTIONARY_VERSION , fromVersion , true ) ; } else { <START_BUG> bootingDictionary . readOnlyUpgrade = true ; <END_BUG> } bootingDictionary . clearCaches ( ) ; } protected void makeSystemCatalog ( TransactionController tc , TabInfoImpl ti ) throws StandardException { } protected void dropSystemCatalogDescription ( TransactionController tc , TableDescriptor td ) throws StandardException { } protected void dropSystemCatalog ( TransactionController tc , CatalogRowFactory crf ) throws StandardException { } protected void fillIndex ( TransactionController tc , long heapConglomerateNumber , TabInfoImpl tabInfo , int indexNumber ) throws StandardException { } public int getTypeFormatId ( ) { } public final void readExternal ( ObjectInput in ) throws IOException { } public final void writeExternal ( ObjectOutput out ) throws IOException { } private int getJBMSMinorVersionNumber ( ) { } private void modifySysTableNullability ( TransactionController tc , int catalogNum ) throws StandardException { } boolean checkVersion ( int requiredMajorVersion , String feature ) throws StandardException { } }

Fix:
bootingDictionary . setReadOnlyUpgrade ( ) ;
Buggy code:
public class BatchRepetition extends BatchGenerator { private BatchRepetition . BatchRepetitionWrapper [ ] bgs ; private int index ; private int total ; public BatchRepetition ( int count , BatchGenerator ... bgs ) { } private static BatchRepetition . BatchRepetitionWrapper [ ] getWrappers ( BatchGenerator [ ] bgs , int count ) { } public BatchRepetition ( BatchRepetition . BatchRepetitionWrapper ... bgs ) { } @ Override public Batch generate ( Graph g ) { } protected BatchGenerator getNext ( ) { int sum = 0 ; for ( BatchRepetition . BatchRepetitionWrapper bg : this . bgs ) { sum += bg . getCount ( ) ; <START_BUG> if ( sum >= ( this . index ) ) { <END_BUG> return bg . getBg ( ) ; } } return null ; } @ Override public void reset ( ) { } @ Override public boolean isFurtherBatchPossible ( Graph g ) { } public static class BatchRepetitionWrapper { private BatchGenerator bg ; private int count ; public BatchRepetitionWrapper ( BatchGenerator bg , int count ) { } public BatchGenerator getBg ( ) { } public int getCount ( ) { } } }

Fix:
if ( sum > ( this . index ) ) {
Buggy code:
public class DefaultDeployer extends AbstractLogEnabled implements Serviceable , Deployer { private static final Resources REZ = ResourceManager . getPackageResources ( DefaultDeployer . class ) ; private ConverterRegistry m_converterRegistry ; private TypeManager m_typeManager ; private RoleManager m_roleManager ; private ClassLoaderManager m_classLoaderManager ; private final Map m_classLoaderDeployers = new HashMap ( ) ; public void service ( final ServiceManager serviceManager ) throws ServiceException { } public Deployer createChildDeployer ( final ServiceManager componentManager ) throws ServiceException { } public TypeDeployer createDeployer ( final ClassLoader loader ) throws DeploymentException { } public TypeDeployer createDeployer ( final File file ) throws DeploymentException { } private Deployment createDeployment ( final ClassLoader loader , final URL jarUrl ) throws Exception { } public void deployService ( final Deployment deployment , final ServiceDefinition definition ) throws Exception { } public void deployType ( final Deployment deployment , final TypeDefinition typeDef ) throws Exception { } private void handleType ( final Deployment deployment , final Class roleType , final String typeName , final String className ) throws Exception { } private void handleConverter ( final Deployment deployment , final String className , final String source , final String destination ) throws Exception { } public void deployRole ( final Deployment deployment , final RoleDefinition roleDef ) throws Exception { final String name = roleDef . getShortHand ( ) ; final String role = roleDef . getRoleName ( ) ; final Class type = deployment . getClassLoader ( ) . loadClass ( role ) ; <START_BUG> final RoleInfo roleInfo = new RoleInfo ( role , name , type ) ; <END_BUG> m_roleManager . addRole ( roleInfo ) ; if ( getLogger ( ) . isDebugEnabled ( ) ) { final String debugMessage = DefaultDeployer . REZ . getString ( "register-role.notice" , role , name ) ; getLogger ( ) . debug ( debugMessage ) ; } } private RoleInfo getRole ( final String roleShorthand ) throws DeploymentException { } }

Fix:
final RoleInfo roleInfo = new RoleInfo ( role , name , type , null ) ;
Buggy code:
@ Description ( "A<seq2seq4repair_space>standard<seq2seq4repair_space>BEAST<seq2seq4repair_space>tree<seq2seq4repair_space>representation<seq2seq4repair_space>of<seq2seq4repair_space>a<seq2seq4repair_space>TreeColour<seq2seq4repair_space>object." ) public class FlatMultiTypeTree extends Tree { public Input < MultiTypeTree > multiTypeTreeInput = new Input < MultiTypeTree > ( "multiType" , "Multi-type<seq2seq4repair_space>tree<seq2seq4repair_space>to<seq2seq4repair_space>flatten." ) ; protected MultiTypeTree multiTypeTree ; public FlatMultiTypeTree ( ) { } @ Override public void initAndValidate ( ) { multiTypeTree = multiTypeTreeInput . get ( ) ; <START_BUG> setRoot ( multiTypeTree . getFlattenedTree ( ) . getRoot ( ) ) ; <END_BUG> initArrays ( ) ; } }

Fix:
setRoot ( multiTypeTree . getFlattenedTree ( false ) . getRoot ( ) ) ;
Buggy code:
public class TestCheckIndex extends LuceneTestCase { public void testDeletedDocs ( ) throws IOException { } public void testLuceneConstantVersion ( ) throws IOException { final String version = System . getProperty ( "lucene.version" ) ; assertNotNull ( "null<seq2seq4repair_space>version" , version ) ; assertTrue ( ( "Invalid<seq2seq4repair_space>version:<seq2seq4repair_space>" + version ) , ( ( version . equals ( ( ( Constants . LUCENE_MAIN_VERSION ) + "-SNAPSHOT" ) ) ) || ( version . equals ( LUCENE_MAIN_VERSION ) ) ) ) ; <START_BUG> assertTrue ( ( ( version + "<seq2seq4repair_space>should<seq2seq4repair_space>start<seq2seq4repair_space>with:<seq2seq4repair_space>" ) + ( Constants . LUCENE_VERSION ) ) , LUCENE_VERSION . startsWith ( version ) ) ; <END_BUG> } }

Fix:
assertTrue ( ( ( ( Constants . LUCENE_VERSION ) + "<seq2seq4repair_space>should<seq2seq4repair_space>start<seq2seq4repair_space>with:<seq2seq4repair_space>" ) + version ) , LUCENE_VERSION . startsWith ( version ) ) ;
Buggy code:
public class ExampleRunner { static final ModelNode SB_ADDR = new ModelNode ( ) ; static final ModelNode WC_ADDR = new ModelNode ( ) ; public static void main ( String [ ] args ) throws Exception { } protected void run ( ModelControllerClient client ) throws Exception { final ModelNode bindingResult = createSocketBinding ( client ) ; checkSuccess ( bindingResult ) ; final ModelNode connectorResult = createWebConnector ( client ) ; checkSuccess ( connectorResult ) ; try { InputStream in = null ; try { final URLConnection conn = new URL ( "http:////localhost:8181//" ) . openConnection ( ) ; conn . setDoInput ( true ) ; conn . connect ( ) ; in = new BufferedInputStream ( conn . getInputStream ( ) ) ; int i = in . read ( ) ; StringBuilder sb = new StringBuilder ( ) ; while ( i != ( - 1 ) ) { sb . append ( ( ( char ) ( i ) ) ) ; i = in . read ( ) ; } } catch ( Exception ignore ) { } finally { safeClose ( in ) ; } final ModelNode address = new ModelNode ( ) ; <START_BUG> address . add ( HOST , "local" ) ; <END_BUG> address . add ( SERVER , "server-one" ) ; address . add ( SUBSYSTEM , "web" ) ; address . add ( "connector" , "new" ) ; final ModelNode stats = new ModelNode ( ) ; stats . get ( OP ) . set ( READ_ATTRIBUTE_OPERATION ) ; stats . get ( OP_ADDR ) . set ( address ) ; stats . get ( NAME ) . set ( "requestCount" ) ; final ModelNode result = client . execute ( stats ) ; checkSuccess ( result ) ; System . out . println ( result . get ( RESULT ) ) ; } finally { final ModelNode remove1 = new ModelNode ( ) ; remove1 . get ( OP ) . set ( REMOVE ) ; remove1 . get ( OP_ADDR ) . set ( ExampleRunner . WC_ADDR ) ; final ModelNode result1 = client . execute ( remove1 ) ; checkSuccess ( result1 ) ; final ModelNode remove2 = new ModelNode ( ) ; remove2 . get ( OP ) . set ( REMOVE ) ; remove2 . get ( OP_ADDR ) . set ( ExampleRunner . SB_ADDR ) ; final ModelNode result2 = client . execute ( remove2 ) ; checkSuccess ( result2 ) ; } } ModelNode createSocketBinding ( final ModelControllerClient client ) throws Exception { } ModelNode createWebConnector ( final ModelControllerClient client ) throws Exception { } void checkSuccess ( final ModelNode result ) { } }

Fix:
address . add ( HOST , "master" ) ;
Buggy code:
public abstract class P4Base extends org . apache . tools . ant . Task { protected Perl5Util util = null ; protected String P4Port = "" ; protected String P4Client = "" ; protected String P4User = "" ; protected String P4View = "" ; protected String P4Opts = "" ; protected String P4CmdOpts = "" ; protected String shell ; public void setClient ( String P4Client ) { } public void setCmdopts ( String P4CmdOpts ) { } public void setPort ( String P4Port ) { } public void setUser ( String P4User ) { } public void setView ( String P4View ) { } public void init ( ) { } protected void execP4Command ( String command ) throws BuildException { } protected void execP4Command ( String command , P4Handler handler ) throws BuildException { try { Commandline commandline = new Commandline ( ) ; commandline . setExecutable ( "p4" ) ; if ( ( ( P4Port ) != null ) && ( ( P4Port . length ( ) ) != 0 ) ) { commandline . createArgument ( ) . setValue ( P4Port ) ; } if ( ( ( P4User ) != null ) && ( ( P4User . length ( ) ) != 0 ) ) { commandline . createArgument ( ) . setValue ( P4User ) ; } if ( ( ( P4Client ) != null ) && ( ( P4Client . length ( ) ) != 0 ) ) { commandline . createArgument ( ) . setValue ( P4Client ) ; } commandline . createArgument ( ) . setLine ( command ) ; String [ ] cmdline = commandline . getCommandline ( ) ; String cmdl = "" ; for ( int i = 0 ; i < ( cmdline . length ) ; i ++ ) { cmdl += ( cmdline [ i ] ) + "<seq2seq4repair_space>" ; } log ( ( "Execing<seq2seq4repair_space>" + cmdl ) , MSG_VERBOSE ) ; if ( handler == null ) handler = new SimpleP4OutputHandler ( this ) ; Execute exe = new Execute ( handler , null ) ; exe . setAntRun ( project ) ; exe . setCommandline ( commandline . getCommandline ( ) ) ; try { exe . execute ( ) ; } catch ( IOException e ) { <START_BUG> throw new BuildException ( e ) ; <END_BUG> } finally { try { handler . stop ( ) ; } catch ( Exception e ) { } } } catch ( Exception e ) { throw new BuildException ( ( "Problem<seq2seq4repair_space>exec'ing<seq2seq4repair_space>P4<seq2seq4repair_space>command:<seq2seq4repair_space>" + ( e . getMessage ( ) ) ) ) ; } } }

Fix:
throw new BuildException ( "Error" , e ) ;
Buggy code:
public class MatchLocatorParser extends Parser { public MatchSet matchSet ; private MatchLocatorParser . LocalDeclarationVisitor localDeclarationVisitor = new MatchLocatorParser . LocalDeclarationVisitor ( ) ; public class LocalDeclarationVisitor extends AbstractSyntaxTreeVisitorAdapter { public boolean visit ( AnonymousLocalTypeDeclaration anonymousTypeDeclaration , BlockScope scope ) { } public boolean visit ( ConstructorDeclaration constructorDeclaration , ClassScope scope ) { } public boolean visit ( FieldDeclaration fieldDeclaration , MethodScope scope ) { } public boolean visit ( Initializer initializer , MethodScope scope ) { } public boolean visit ( LocalTypeDeclaration localTypeDeclaration , BlockScope scope ) { } public boolean visit ( MemberTypeDeclaration memberTypeDeclaration , ClassScope scope ) { } public boolean visit ( MethodDeclaration methodDeclaration , ClassScope scope ) { } } public MatchLocatorParser ( ProblemReporter problemReporter , boolean assertMode ) { } protected void classInstanceCreation ( boolean alwaysQualified ) { } protected void consumeAssignment ( ) { } protected void consumeExplicitConstructorInvocation ( int flag , int recFlag ) { } protected void consumeFieldAccess ( boolean isSuperAccess ) { } protected void consumeMethodInvocationName ( ) { } protected void consumeMethodInvocationPrimary ( ) { } protected void consumeMethodInvocationSuper ( ) { } protected void consumeSingleTypeImportDeclarationName ( ) { } protected void consumeTypeImportOnDemandDeclarationName ( ) { } protected void consumeUnaryExpression ( int op , boolean post ) { } protected TypeReference copyDims ( TypeReference typeRef , int dim ) { } protected CompilationUnitDeclaration dietParse ( ICompilationUnit sourceUnit , MatchLocator locator , IFile file , CompilationUnit compilationUnit ) { MatchSet originalMatchSet = this . matchSet ; CompilationUnitDeclaration unit = null ; try { this . matchSet = new MatchSet ( locator ) ; <START_BUG> CompilationResult compilationResult = new CompilationResult ( sourceUnit , 0 , 0 ) ; <END_BUG> unit = this . dietParse ( sourceUnit , compilationResult ) ; } finally { if ( originalMatchSet == null ) { if ( ( ( ! ( this . matchSet . isEmpty ( ) ) ) && ( unit != null ) ) && ( file != null ) ) { MatchingOpenable matchingOpenable = new MatchingOpenable ( locator , file , compilationUnit , unit , this . matchSet ) ; locator . matchingOpenables . add ( matchingOpenable ) ; } this . matchSet = null ; } else { this . matchSet = originalMatchSet ; } } return unit ; } protected TypeReference getTypeReference ( int dim ) { } protected NameReference getUnspecifiedReference ( ) { } protected NameReference getUnspecifiedReferenceOptimized ( ) { } public void parseBodies ( CompilationUnitDeclaration unit ) { } private void parseBodies ( TypeDeclaration type , CompilationUnitDeclaration unit ) { } }

Fix:
CompilationResult compilationResult = new CompilationResult ( sourceUnit , 0 , 0 , 0 ) ;
Buggy code:
public abstract class AjaxFormSubmitBehavior extends AjaxEventBehavior { private static final long serialVersionUID = 1L ; private Form < ? > form ; public AjaxFormSubmitBehavior ( String event ) { } public AjaxFormSubmitBehavior ( Form < ? > form , String event ) { } protected Form < ? > getForm ( ) { } @ Override protected CharSequence getEventHandler ( ) { } @ Override protected void onEvent ( AjaxRequestTarget target ) { } protected abstract void onSubmit ( AjaxRequestTarget target ) { } protected abstract void onError ( AjaxRequestTarget target ) { } @ Override protected CharSequence getPreconditionScript ( ) { <START_BUG> return ( "return<seq2seq4repair_space>Wicket.$$(this)&amp;&amp;Wicket.$$('" + ( getForm ( ) . getMarkupId ( ) ) ) + "')" ; <END_BUG> } }

Fix:
return ( "return<seq2seq4repair_space>Wicket.$$(this)&&Wicket.$$('" + ( getForm ( ) . getMarkupId ( ) ) ) + "')" ;
Buggy code:
public class AddDeleteUpdateInferencePostprocessor extends ASTPostprocessor { private List < TextChangeOperation > bufferedTextChanges = new LinkedList < TextChangeOperation > ( ) ; private List < UserOperation > refactoringPredecessors = new LinkedList < UserOperation > ( ) ; @ Override protected String getResultFilePostfix ( ) { } @ Override protected void postprocess ( List < UserOperation > userOperations ) { } private void handleTextChangeOperation ( TextChangeOperation textChangeOperation ) { } private void applyAccumulatedOperations ( boolean shouldReplayBufferedTextChanges ) { } private boolean doBufferedTextChangesFormCycle ( ) { } private void handleNewFileOperation ( NewFileOperation newFileOperation ) { } private void handleCommittedFileOperation ( CommittedFileOperation committedFileOperation ) { } private void handleOneStepSnapshotedFileOperation ( SnapshotedFileOperation snapshotedFileOperation , boolean willReplaceFile , boolean shouldRestoreOriginalEditor ) { record ( snapshotedFileOperation ) ; IResource workspaceResource = ResourceHelper . findWorkspaceMember ( snapshotedFileOperation . getResourcePath ( ) ) ; if ( ( workspaceResource instanceof IFile ) && willReplaceFile ) { IFile editedFile = ( ( IFile ) ( workspaceResource ) ) ; String currentContent = ResourceHelper . readFileContent ( editedFile ) ; String newContent = snapshotedFileOperation . getFileContent ( ) ; replaySnapshotsAsEdits ( snapshotedFileOperation , editedFile , new String [ ] { currentContent , newContent } , shouldRestoreOriginalEditor ) ; } else { <START_BUG> replayAndRecord ( snapshotedFileOperation ) ; <END_BUG> } } private void handleRefreshedFileOperation ( RefreshedFileOperation refreshedFileOperation ) { } private void replaySnapshotsAsEdits ( SnapshotedFileOperation snapshotedFileOperation , IFile editedFile , String [ ] snapshots , boolean shouldRestoreOriginalEditor ) { } private void replaySnapshotDifference ( List < PerformedTextChangeOperation > snapshotDifference , IFile editedFile , long timestamp , boolean shouldRestoreOriginalEditor ) { } private IFile findOrCreateRefreshedCompilationUnit ( RefreshedFileOperation refreshedFileOperation ) { } private String getRefreshedFileCurrentContent ( IFile refreshedFile , String replacedText ) { } private void restoreOriginalEditor ( IEditorPart originalEditor , long timestamp ) { } }

Fix:
replay ( snapshotedFileOperation ) ;
Buggy code:
class LabelTab extends AlignableTab { Label label1 ; Label label2 ; Label label3 ; Label label4 ; Label label5 ; Label label6 ; Group textLabelGroup ; Group imageLabelGroup ; Button wrapButton ; Button separatorButton ; Button horizontalButton ; Button verticalButton ; Button shadowInButton ; Button shadowOutButton ; Button shadowNoneButton ; LabelTab ( ControlExample instance ) { } void createExampleGroup ( ) { } void createExampleWidgets ( ) { } void createStyleGroup ( ) { } Control [ ] getExampleWidgets ( ) { } String [ ] getMethodNames ( ) { <START_BUG> return new String [ ] { "Text" } ; <END_BUG> } String getTabText ( ) { } void setExampleWidgetAlignment ( ) { } void setExampleWidgetState ( ) { } }

Fix:
return new String [ ] { "Text" , "ToolTipText" } ;
Buggy code:
class CompilationUnitResolver extends Compiler { public CompilationUnitResolver ( INameEnvironment environment , IErrorHandlingPolicy policy , Map settings , ICompilerRequestor requestor , IProblemFactory problemFactory ) { } public void accept ( ISourceType [ ] sourceTypes , PackageBinding packageBinding ) { } protected static IErrorHandlingPolicy getHandlingPolicy ( ) { } protected static INameEnvironment getNameEnvironment ( ICompilationUnit sourceUnit ) throws JavaModelException { } protected static INameEnvironment getNameEnvironment ( IJavaProject javaProject ) throws JavaModelException { } protected static ICompilerRequestor getRequestor ( ) { } public static CompilationUnitDeclaration resolve ( ICompilationUnit unitElement , IAbstractSyntaxTreeVisitor visitor ) throws JavaModelException { } public static CompilationUnitDeclaration parse ( char [ ] source ) { if ( source == null ) { throw new IllegalArgumentException ( ) ; } CompilerOptions compilerOptions = new CompilerOptions ( JavaCore . getOptions ( ) ) ; Parser parser = new Parser ( new ProblemReporter ( DefaultErrorHandlingPolicies . proceedWithAllProblems ( ) , compilerOptions , new DefaultProblemFactory ( Locale . getDefault ( ) ) ) , false , compilerOptions . assertMode ) ; org . eclipse . jdt . internal . compiler . env . ICompilationUnit sourceUnit = new CompilationUnit ( source , "" , compilerOptions . defaultEncoding ) ; CompilationUnitDeclaration compilationUnitDeclaration = parser . dietParse ( sourceUnit , new CompilationResult ( sourceUnit , 0 , 0 ) ) ; if ( compilationUnitDeclaration . ignoreMethodBodies ) { compilationUnitDeclaration . ignoreFurtherInvestigation = true ; return compilationUnitDeclaration ; } <START_BUG> parser . scanner . setSourceBuffer ( source ) ; <END_BUG> TypeDeclaration [ ] types = compilationUnitDeclaration . types ; if ( types != null ) { for ( int i = types . length ; ( -- i ) >= 0 ; ) types [ i ] . parseMethod ( parser , compilationUnitDeclaration ) ; } return compilationUnitDeclaration ; } protected static IProblemFactory getProblemFactory ( final IAbstractSyntaxTreeVisitor visitor ) { } public static CompilationUnitDeclaration resolve ( char [ ] source , String unitName , IJavaProject javaProject , IAbstractSyntaxTreeVisitor visitor ) throws JavaModelException { } }

Fix:
parser . scanner . setSource ( source ) ;
Buggy code:
public class TestPlotGraph { public static void main ( String [ ] args ) { <START_BUG> String source = "//Users//Adrian//Dropbox//testIDFJfreeChart//" ; <END_BUG> String idfName = "One_Montgomery_Plaza" ; AnalyzeResult analyzeResult = new AnalyzeResult ( source , idfName ) ; int numSimulation = 4 ; analyzeResult . setHeader ( ) ; analyzeResult . setData ( numSimulation ) ; double confidenceLevel = 0.95 ; int numVars = analyzeResult . getVariableLength ( ) ; int numMonths = analyzeResult . getKeysLength ( ) ; int startYear = analyzeResult . getStartYear ( ) ; String startMonth = analyzeResult . getKey ( 0 ) ; for ( int i = 0 ; i < numVars ; i ++ ) { double [ ] averages = new double [ numMonths ] ; double [ ] lowerCI = new double [ numMonths ] ; double [ ] upperCI = new double [ numMonths ] ; for ( int j = 0 ; j < numMonths ; j ++ ) { String currentKey = analyzeResult . getKey ( j ) ; double [ ] temp = analyzeResult . getData ( currentKey , i ) ; GenerateStatistics stat = new GenerateStatistics ( temp ) ; averages [ j ] = stat . getMean ( ) ; double [ ] ci = stat . getCI ( confidenceLevel ) ; lowerCI [ j ] = ci [ 0 ] ; upperCI [ j ] = ci [ 1 ] ; } String currentVariable = analyzeResult . getVariable ( i ) ; String title = ( ( ( "Mean<seq2seq4repair_space>" + currentVariable ) + "<seq2seq4repair_space>with<seq2seq4repair_space>" ) + ( confidenceLevel * 100 ) ) + "%<seq2seq4repair_space>CI" ; PlotGraph plotGraph = new PlotGraph ( title , averages , lowerCI , upperCI , startMonth , numMonths , startYear ) ; plotGraph . pack ( ) ; RefineryUtilities . positionFrameRandomly ( plotGraph ) ; plotGraph . setVisible ( true ) ; } } }

Fix:
String source = "C:////Users////Weili////weilixu////testIDFJfreeChart////" ;
Buggy code:
final class ObjectToArrayGenericConverter implements GenericConverter { private final GenericConversionService conversionService ; public ObjectToArrayGenericConverter ( GenericConversionService conversionService ) { } public Object convert ( Object source , TypeDescriptor sourceType , TypeDescriptor targetType ) { TypeDescriptor targetElementType = targetType . getElementTypeDescriptor ( ) ; Object target = Array . newInstance ( targetElementType . getType ( ) , 1 ) ; if ( sourceType . isAssignableTo ( targetElementType ) ) { Array . set ( target , 0 , source ) ; } else { GenericConverter converter = this . conversionService . getConverter ( sourceType , targetElementType ) ; if ( converter == null ) { <START_BUG> throw new org . springframework . core . convert . ConverterNotFoundException ( sourceType , targetType ) ; <END_BUG> } Array . set ( target , 0 , converter . convert ( source , sourceType , targetElementType ) ) ; } return target ; } }

Fix:
throw new org . springframework . core . convert . ConverterNotFoundException ( sourceType , targetElementType ) ;
Buggy code:
public class SessionController { private Controller controller ; public SessionController ( Controller controller ) { } public void printSessionManagementMenu ( ) { } public void simulateSession ( ) { try { <START_BUG> System . out . print ( "Select<seq2seq4repair_space>subscriber:<seq2seq4repair_space>" ) ; <END_BUG> int indexOfSubscriber = controller . searchSubscriber ( ) ; Subscriber sub = controller . getSubscribers ( ) . get ( indexOfSubscriber ) ; System . out . print ( ( ( "The<seq2seq4repair_space>user<seq2seq4repair_space>'" + ( sub . getName ( ) ) ) + "'<seq2seq4repair_space>" ) ) ; System . out . println ( ( ( ( ( "<seq2seq4repair_space>has<seq2seq4repair_space>" + ( sub . getLeftDataVolume ( ) ) ) + "<seq2seq4repair_space>MB<seq2seq4repair_space>left<seq2seq4repair_space>data<seq2seq4repair_space>and<seq2seq4repair_space>" ) + ( sub . getLeftMinutes ( ) ) ) + "<seq2seq4repair_space>left<seq2seq4repair_space>minutes" ) ) ; System . out . print ( "Select<seq2seq4repair_space>service<seq2seq4repair_space>type:<seq2seq4repair_space>" ) ; ServiceType serviceType = getServiceType ( controller . readString ( ".+" ) ) ; System . out . print ( "Select<seq2seq4repair_space>time<seq2seq4repair_space>(in<seq2seq4repair_space>minutes):<seq2seq4repair_space>" ) ; int time = getTime ( controller . readString ( ".+" ) ) ; int left = sub . useService ( serviceType , time ) ; while ( left > 0 ) { System . out . println ( "Do<seq2seq4repair_space>you<seq2seq4repair_space>want<seq2seq4repair_space>extra<seq2seq4repair_space>1<seq2seq4repair_space>GB<seq2seq4repair_space>for<seq2seq4repair_space>10<seq2seq4repair_space>Euro?" ) ; if ( wantMore ( controller . readString ( ".+" ) ) ) { sub . addData ( ) ; } else { sub . useService ( serviceType , ( time - left ) ) ; break ; } left = sub . useService ( serviceType , time ) ; } System . out . println ( String . format ( "262-42-%s<seq2seq4repair_space>-<seq2seq4repair_space>%-8s<seq2seq4repair_space>Minutes:<seq2seq4repair_space>%4s,<seq2seq4repair_space>ServiceType:<seq2seq4repair_space>%4s,<seq2seq4repair_space>Used<seq2seq4repair_space>MB:<seq2seq4repair_space>%4s,<seq2seq4repair_space>Left<seq2seq4repair_space>MB:<seq2seq4repair_space>%4s<seq2seq4repair_space>MB,<seq2seq4repair_space>signal<seq2seq4repair_space>quality:<seq2seq4repair_space>%2.0f%%" , sub . getId ( ) , sub . getName ( ) , time , serviceType . toString ( ) , sub . getSessions ( ) . get ( ( ( sub . getSessions ( ) . size ( ) ) - 1 ) ) . getDataVolume ( ) , sub . getLeftDataVolume ( ) , ( ( sub . getSessions ( ) . get ( ( ( sub . getSessions ( ) . size ( ) ) - 1 ) ) . getSignalQuality ( ) ) * 100 ) ) ) ; } catch ( Exception e ) { System . out . println ( ( "Error:<seq2seq4repair_space>" + ( e . getMessage ( ) ) ) ) ; } controller . printStartMenu ( ) ; } private boolean wantMore ( String readString ) { } public ServiceType getServiceType ( String userInput ) { } public int getTime ( String readString ) { } }

Fix:
System . out . println ( "Select<seq2seq4repair_space>subscriber:<seq2seq4repair_space>" ) ;
Buggy code:
public class VeracodeReader extends Reader { public TestResults parse ( File f ) throws Exception { } private SimpleDateFormat sdf = new SimpleDateFormat ( "yyyy-MM-dd<seq2seq4repair_space>HH:mm:ss<seq2seq4repair_space>zzz" ) ; private String calculateTime ( String submitted , String published ) { } private TestCaseResult parseVeracodeVulnerability ( Node flaw ) { TestCaseResult tcr = new TestCaseResult ( ) ; String cwe = getAttributeValue ( "cweid" , flaw ) ; if ( cwe != null ) { tcr . setCWE ( translate ( Integer . parseInt ( cwe ) ) ) ; } else { System . out . println ( ( "flaw:<seq2seq4repair_space>" + flaw ) ) ; } tcr . setCategory ( getAttributeValue ( "categoryname" , flaw ) ) ; tcr . setConfidence ( Integer . parseInt ( getAttributeValue ( "exploitLevel" , flaw ) ) ) ; tcr . setEvidence ( getAttributeValue ( "categoryname" , flaw ) ) ; String testcase = getAttributeValue ( "sourcefile" , flaw ) ; <START_BUG> if ( testcase . startsWith ( "Benchmark" ) ) { <END_BUG> String testno = testcase . substring ( "BenchmarkTest" . length ( ) , ( ( testcase . length ( ) ) - 5 ) ) ; tcr . setNumber ( Integer . parseInt ( testno ) ) ; return tcr ; } return null ; } private int translate ( int cwe ) { } }

Fix:
if ( testcase . startsWith ( "BenchmarkTest" ) ) {
Buggy code:
public class Storage extends Component implements ISize < Storage > , ISpeed < Storage > { public enum StorageTechnology { HDD , SSD , Hybrid ; public static Storage . StorageTechnology getTechnologyFromString ( String string ) { } } private Size < Storage > size = new Size ( ) ; private Speed < Storage > speed = new Speed ( ) ; private Storage . StorageTechnology technology ; public Storage ( final String name ) { } @ Override public long getSize ( ) { } @ Override public double getSize ( final UnitPrefix prefix ) { } @ Override public Storage setSize ( final long size ) { } @ Override public Storage setSize ( final long size , final UnitPrefix prefix ) { } @ Override public Storage setSize ( double size , UnitPrefix prefix ) { } @ Override public long getSpeed ( ) { } @ Override public double getSpeed ( final UnitPrefix prefix ) { } @ Override public Storage setSpeed ( final long speed ) { } @ Override public Storage setSpeed ( long speed , UnitPrefix prefix ) { } @ Override public Storage setSpeed ( final double speed , final UnitPrefix prefix ) { } public Storage . StorageTechnology getTechnology ( ) { } public Storage setTechnology ( final Storage . StorageTechnology technology ) { } @ Override public double difference ( Object obj ) { } @ Override public boolean isDefault ( ) { <START_BUG> return ( ( ( super . isDefault ( ) ) && ( ( getSpeed ( ) ) == 0 ) ) && ( ( getSize ( ) ) == 0 ) ) && ( ( getTechnology ( ) ) == null ) ; <END_BUG> } }

Fix:
return ( ( super . isDefault ( ) ) && ( ( getSpeed ( ) ) == 0 ) ) && ( ( getSize ( ) ) == 0 ) ;
Buggy code:
public class TestThreadSafe extends LuceneTestCase { Directory dir1 ; IndexReader ir1 ; String failure = null ; class Thr extends Thread { final int iter ; final Random rand ; public Thr ( int iter , Random rand ) { } @ Override public void run ( ) { } void loadDoc ( IndexReader ir ) throws IOException { } } void validateField ( Fieldable f ) { } String [ ] words = "now<seq2seq4repair_space>is<seq2seq4repair_space>the<seq2seq4repair_space>time<seq2seq4repair_space>for<seq2seq4repair_space>all<seq2seq4repair_space>good<seq2seq4repair_space>men<seq2seq4repair_space>to<seq2seq4repair_space>come<seq2seq4repair_space>to<seq2seq4repair_space>the<seq2seq4repair_space>aid<seq2seq4repair_space>of<seq2seq4repair_space>their<seq2seq4repair_space>country" . split ( "<seq2seq4repair_space>" ) ; void buildDir ( Directory dir , int nDocs , int maxFields , int maxFieldLen ) throws IOException { } void doTest ( int iter , int nThreads ) throws Exception { } public void testLazyLoadThreadSafety ( ) throws Exception { dir1 = newDirectory ( ) ; buildDir ( dir1 , 15 , 5 , 2000 ) ; int num = 100 * ( RANDOM_MULTIPLIER ) ; for ( int i = 0 ; i < num ; i ++ ) { ir1 = IndexReader . open ( dir1 , false ) ; <START_BUG> doTest ( 10 , 100 ) ; <END_BUG> ir1 . close ( ) ; } dir1 . close ( ) ; } }

Fix:
doTest ( 10 , 10 ) ;
Buggy code:
public class InterventionsNamesFragment extends Fragment { InterventionsNamesFragment . OnResourceSelectedListener mCallback ; private ListView listViewInterventions ; public interface OnResourceSelectedListener { public void onResourceSelected ( int position ) { } } @ Override public View onCreateView ( LayoutInflater inflater , ViewGroup container , Bundle savedInstanceState ) { super . onCreate ( savedInstanceState ) ; <START_BUG> View v = inflater . inflate ( fragment_list_interventions , container , false ) ; <END_BUG> listViewInterventions = ( ( ListView ) ( v . findViewById ( R . id . listViewInterventions ) ) ) ; int layout = ( ( VERSION . SDK_INT ) >= ( VERSION_CODES . HONEYCOMB ) ) ? layout . simple_list_item_activated_1 : layout . simple_list_item_1 ; List < String > labelsInterventions = new ArrayList < > ( ) ; ListInterventionsActivity listInterventionsActivity = ( ( ListInterventionsActivity ) ( getActivity ( ) ) ) ; Intervention [ ] interventions = listInterventionsActivity . getInterventions ( ) ; for ( Intervention inter : interventions ) { labelsInterventions . add ( inter . getName ( ) ) ; } listViewInterventions . setAdapter ( new android . widget . ArrayAdapter < String > ( getActivity ( ) , layout , labelsInterventions ) ) ; listViewInterventions . setOnItemClickListener ( new AdapterView . OnItemClickListener ( ) { @ Override public void onItemClick ( AdapterView < ? > adapterView , View view , int position , long id ) { mCallback . onResourceSelected ( position ) ; listViewInterventions . setItemChecked ( position , true ) ; } } ) ; return v ; } @ Override public void onStart ( ) { } @ Override public void onAttach ( Activity activity ) { } No newline ; at end ; of file ; }

Fix:
View v = inflater . inflate ( fragment_list_interventions_agent , container , false ) ;
Buggy code:
public class SOManager implements ISharedObjectManager { private static final int GUID_SIZE = 20 ; SOContainer container = null ; Vector connectors = null ; public SOManager ( SOContainer cont ) { } protected void debug ( String msg ) { <START_BUG> Trace . trace ( PLUGIN_ID , DEBUG , ( ( msg + ":" ) + ( container . getID ( ) ) ) ) ; <END_BUG> } protected void traceStack ( String msg , Throwable e ) { } protected void addConnector ( ISharedObjectConnector conn ) { } protected boolean removeConnector ( ISharedObjectConnector conn ) { } protected List getConnectors ( ) { } protected Class [ ] getArgTypes ( String [ ] argTypes , Object [ ] args , ClassLoader cl ) throws ClassNotFoundException { } protected ISharedObject createSharedObjectInstance ( final Class newClass , final Class [ ] argTypes , final Object [ ] args ) throws Exception { } protected ISharedObject verifySharedObject ( Object newSharedObject ) { } protected ISharedObject loadSharedObject ( SharedObjectDescription sd ) throws Exception { } public ID [ ] getSharedObjectIDs ( ) { } public ID createSharedObject ( SharedObjectDescription sd ) throws SharedObjectCreateException { } protected ID createNewSharedObjectID ( SharedObjectDescription sd , ISharedObject newObject ) throws IDCreateException { } public ID addSharedObject ( ID sharedObjectID , ISharedObject sharedObject , Map properties ) throws SharedObjectAddException { } public ISharedObject getSharedObject ( ID sharedObjectID ) { } public ISharedObject removeSharedObject ( ID sharedObjectID ) { } public ISharedObjectConnector connectSharedObjects ( ID sharedObjectFrom , ID [ ] sharedObjectsTo ) throws SharedObjectConnectException { } public void disconnectSharedObjects ( ISharedObjectConnector connector ) throws SharedObjectDisconnectException { } protected void dispose ( ) { } public List getSharedObjectConnectors ( ID sharedObjectFrom ) { } public static Class [ ] getClassesForTypes ( String [ ] argTypes , Object [ ] args , ClassLoader cl ) throws ClassNotFoundException { } public void setRemoteAddPolicy ( ISharedObjectPolicy policy ) { } }

Fix:
Trace . trace ( PLUGIN_ID , SHAREDOBJECTMANAGER , ( ( msg + ":" ) + ( container . getID ( ) ) ) ) ;
Buggy code:
public class Player { protected ArrayList < Hand > hand ; protected int money ; protected int handWillPlay ; public Player ( ) { } public boolean hit ( Deck d ) { } public void stand ( ) { } public void surrender ( ) { } public void doubl ( Scanner sc , Deck d ) { } public int getDoubleBet ( Scanner sc ) { } public boolean split ( Deck d , boolean db ) { } protected boolean Bet ( int b ) { } public boolean getWillPlay ( ) { } public int getScore ( int h ) { } public int getMoney ( ) { } public boolean isBust ( int h ) { <START_BUG> return hand . get ( h ) . isHandPlayable ( ) ; <END_BUG> } public boolean isBlackJack ( int h ) { } public void deal ( Deck d , int h , boolean db ) { } public boolean hasHandNotBust ( ) { } }

Fix:
return ! ( hand . get ( h ) . isHandPlayable ( ) ) ;
Buggy code:
@ RunWith ( Arquillian . class ) @ RunAsClient public class ExtensionRemoveTestCase { private static final String MODULE_NAME = "extensionremovemodule" ; private static final String JAR_NAME = "extension-remove-module.jar" ; @ ContainerResource private ManagementClient managementClient ; private Archive < ? > createArchive ( ) { } @ Test public void testAddAndRemoveExtension ( ) throws Exception { } private ModelNode executeOperation ( ModelControllerClient client , String name , PathAddress address , boolean fail ) throws IOException { } private ModelNode readResourceDescription ( ModelControllerClient client ) throws IOException { } private ModelNode readResource ( ModelControllerClient client ) throws IOException { } private void deleteRecursively ( File file ) { } private void createTestModule ( File testModuleRoot ) throws IOException { } private void copyFile ( File target , InputStream src ) throws IOException { } private File getModulePath ( ) { String modulePath = System . getProperty ( "module.path" , null ) ; if ( modulePath == null ) { String jbossHome = System . getProperty ( "jboss.home" , null ) ; if ( jbossHome == null ) { throw new IllegalStateException ( "Neither<seq2seq4repair_space>-Dmodule.path<seq2seq4repair_space>nor<seq2seq4repair_space>-Djboss.home<seq2seq4repair_space>were<seq2seq4repair_space>set" ) ; } modulePath = ( jbossHome + ( File . separatorChar ) ) + "modules" ; } else { <START_BUG> modulePath = modulePath . split ( File . pathSeparator ) [ 0 ] ; <END_BUG> } File moduleDir = new File ( modulePath ) ; if ( ! ( moduleDir . exists ( ) ) ) { throw new IllegalStateException ( "Determined<seq2seq4repair_space>module<seq2seq4repair_space>path<seq2seq4repair_space>does<seq2seq4repair_space>not<seq2seq4repair_space>exist" ) ; } if ( ! ( moduleDir . isDirectory ( ) ) ) { throw new IllegalStateException ( "Determined<seq2seq4repair_space>module<seq2seq4repair_space>path<seq2seq4repair_space>is<seq2seq4repair_space>not<seq2seq4repair_space>a<seq2seq4repair_space>dir" ) ; } return moduleDir ; } }

Fix:
modulePath = modulePath . split ( File . pathSeparator ) [ 1 ] ;