nus-yam/ex-repair huggingface dataset:
Buggy code:
abstract class DOMMember extends DOMNode implements IDOMMember { protected int fFlags = 0 ; protected String fComment = null ; protected int [ ] fCommentRange ; protected char [ ] fModifiers = null ; protected int [ ] fModifierRange ; DOMMember ( ) { } DOMMember ( char [ ] document , int [ ] sourceRange , String name , int [ ] nameRange , int [ ] commentRange , int flags , int [ ] modifierRange ) { } protected void appendFragmentedContents ( CharArrayBuffer buffer ) { } protected abstract void appendMemberBodyContents ( CharArrayBuffer buffer ) { } protected abstract void appendMemberDeclarationContents ( CharArrayBuffer buffer ) { } protected void appendMemberHeaderFragment ( CharArrayBuffer buffer ) { } protected abstract void appendSimpleContents ( CharArrayBuffer buffer ) { } protected String [ ] appendString ( String [ ] list , String element ) { } protected char [ ] generateFlags ( ) { } public String getComment ( ) { becomeDetailed ( ) ; if ( hasComment ( ) ) { if ( ( fComment ) != null ) { return fComment ; } else { <START_BUG> return new String ( CharOperation . subarray ( fDocument , fCommentRange [ 0 ] , ( ( fCommentRange [ 1 ] ) + 1 ) ) ) ; <END_BUG> } } else { return null ; } } public int getFlags ( ) { } protected abstract int getMemberDeclarationStartPosition ( ) { } protected char [ ] getModifiersText ( ) { } protected boolean hasBody ( ) { } protected boolean hasComment ( ) { } protected void offset ( int offset ) { } public void setComment ( String comment ) { } public void setFlags ( int flags ) { } protected void setHasBody ( boolean hasBody ) { } protected void setHasComment ( boolean hasComment ) { } protected void setStartPosition ( int start ) { } protected void shareContents ( DOMNode node ) { } }

Fix:
return new String ( fDocument , fCommentRange [ 0 ] , ( ( ( fCommentRange [ 1 ] ) + 1 ) - ( fCommentRange [ 0 ] ) ) ) ;
Buggy code:
public class ModClusterRefresh implements OperationStepHandler , DescriptionProvider { static final ModClusterRefresh INSTANCE = new ModClusterRefresh ( ) ; @ 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 ( ) ) ) ; modcluster . refresh ( ) ; context . completeStep ( ) ; } } , RUNTIME ) ; } context . completeStep ( ) ; } }

Fix:
if ( context . getProcessType ( ) . isServer ( ) ) {
Buggy code:
public class PantsOutputMessage { private final int myStart ; private final int myEnd ; private final int myLineNumber ; private final String myFilePath ; private final PantsOutputMessage . Level myLevel ; public PantsOutputMessage ( int start , int end , String filePath , int lineNumber ) { } public PantsOutputMessage ( int start , int end , String filePath , int lineNumber , PantsOutputMessage . Level level ) { } public int getStart ( ) { } public int getEnd ( ) { } public int getLineNumber ( ) { } @ NotNull public String getFilePath ( ) { } @ NotNull public PantsOutputMessage . Level getLevel ( ) { } @ Override public String toString ( ) { } @ Nullable public static PantsOutputMessage parseOutputMessage ( @ NotNull String message ) { } @ Nullable public static PantsOutputMessage parseCompilerMessage ( @ NotNull String message ) { } @ Nullable public static PantsOutputMessage parseMessage ( @ NotNull String line , boolean onlyCompilerMessages , boolean checkFileExistence ) { } public static boolean isWarning ( @ NotNull String line ) { } public static boolean isError ( @ NotNull String line ) { } public static boolean containsLevel ( @ NotNull String line , @ NotNull String level ) { <START_BUG> return ( StringUtil . containsIgnoreCase ( line , ( ( "[" + level ) + "]" ) ) ) || ( StringUtil . containsIgnoreCase ( line , ( level + ":" ) ) ) ; <END_BUG> } public enum Level { ERROR , WARNING , INFO ; } }

Fix:
return ( StringUtil . containsIgnoreCase ( line , ( ( "[" + level ) + "]" ) ) ) || ( StringUtil . containsIgnoreCase ( line , ( ( "<seq2seq4repair_space>" + level ) + ":" ) ) ) ;
Buggy code:
public class IndexOf extends AbstractVal { private final Val _val1 ; private final Val _val2 ; private ClassMetaData _meta = null ; private Class _cast = null ; public IndexOf ( Val val1 , Val val2 ) { } public Val getVal1 ( ) { } public Val getVal2 ( ) { } public ClassMetaData getMetaData ( ) { } public void setMetaData ( ClassMetaData meta ) { } public Class getType ( ) { } public void setImplicitType ( Class type ) { } public ExpState initialize ( Select sel , ExpContext ctx , int flags ) { } public void select ( Select sel , ExpContext ctx , ExpState state , boolean pks ) { } public void selectColumns ( Select sel , ExpContext ctx , ExpState state , boolean pks ) { } public void groupBy ( Select sel , ExpContext ctx , ExpState state ) { } public void orderBy ( Select sel , ExpContext ctx , ExpState state , boolean asc ) { <START_BUG> sel . orderBy ( newSQLBuffer ( sel , ctx , state ) , asc , false ) ; <END_BUG> } private SQLBuffer newSQLBuffer ( Select sel , ExpContext ctx , ExpState state ) { } public Object load ( ExpContext ctx , ExpState state , Result res ) throws SQLException { } public void calculateValue ( Select sel , ExpContext ctx , ExpState state , Val other , ExpState otherState ) { } public int length ( Select sel , ExpContext ctx , ExpState state ) { } public void appendTo ( Select sel , ExpContext ctx , ExpState state , SQLBuffer sql , int index ) { } public void acceptVisit ( ExpressionVisitor visitor ) { } public int getId ( ) { } }

Fix:
sel . orderBy ( newSQLBuffer ( sel , ctx , state ) , asc , false , getSelectAs ( ) ) ;
Buggy code:
public class MarkupInheritanceResolver implements IComponentResolver { private static final long serialVersionUID = 1L ; public boolean resolve ( final MarkupContainer container , final MarkupStream markupStream , final ComponentTag tag ) { if ( ( tag . isExtendTag ( ) ) || ( tag . isChildTag ( ) ) ) { <START_BUG> new wicket . markup . html . internal . TransparentWebMarkupContainer ( container , ( ( wicket . Component . AUTO_COMPONENT_PREFIX ) + ( tag . getId ( ) ) ) ) . autoAdded ( ) ; <END_BUG> return true ; } return false ; } }

Fix:
new wicket . markup . html . internal . TransparentWebMarkupContainer ( container , ( ( Component . AUTO_COMPONENT_PREFIX ) + ( tag . getId ( ) ) ) ) . render ( markupStream ) ;
Buggy code:
public class CliClient { private Client thriftClient_ = null ; private CliSessionState css_ = null ; public CliClient ( CliSessionState css , Cassandra . Client thriftClient ) { } public void executeCLIStmt ( String stmt ) throws InvalidRequestException , NotFoundException , TException , UnavailableException { } private void printCmdHelp ( ) { } private void cleanupAndExit ( ) { } private void executeGet ( CommonTree ast ) throws InvalidRequestException , NotFoundException , TException { } private void executeSet ( CommonTree ast ) throws InvalidRequestException , TException , UnavailableException { if ( ! ( CliMain . isConnected ( ) ) ) return ; int childCount = ast . getChildCount ( ) ; assert childCount == 2 ; CommonTree columnFamilySpec = ( ( CommonTree ) ( ast . getChild ( 0 ) ) ) ; assert ( columnFamilySpec . getType ( ) ) == ( CliParser . NODE_COLUMN_ACCESS ) ; String tableName = CliCompiler . getTableName ( columnFamilySpec ) ; String key = CliCompiler . getKey ( columnFamilySpec ) ; String columnFamily = CliCompiler . getColumnFamily ( columnFamilySpec ) ; int columnSpecCnt = CliCompiler . numColumnSpecifiers ( columnFamilySpec ) ; String value = Utils . unescapeSQLString ( ast . getChild ( 1 ) . getText ( ) ) ; if ( columnSpecCnt == 1 ) { String columnName = CliCompiler . getColumn ( columnFamilySpec , 0 ) ; try { <START_BUG> thriftClient_ . insert ( tableName , key , new ColumnPath ( columnFamily , null , columnName . getBytes ( "UTF-8" ) ) , value . getBytes ( ) , System . currentTimeMillis ( ) , 1 ) ; <END_BUG> } catch ( UnsupportedEncodingException e ) { throw new RuntimeException ( e ) ; } css_ . out . println ( "Value<seq2seq4repair_space>inserted." ) ; } else { assert false ; } } private void executeShowProperty ( CommonTree ast , String propertyName ) throws TException { } private void executeShowTables ( CommonTree ast ) throws TException { } private void executeDescribeTable ( CommonTree ast ) throws TException { } private void executeConnect ( CommonTree ast ) throws TException { } public void executeQueryOnServer ( String query ) throws TException { } }

Fix:
thriftClient_ . insert ( tableName , key , new ColumnPath ( columnFamily , null , columnName . getBytes ( "UTF-8" ) ) , value . getBytes ( ) , System . currentTimeMillis ( ) , ONE ) ;
Buggy code:
@ Path ( "//reset" ) public class Reset { @ GET @ Produces ( "application//json" ) public String clear ( @ QueryParam ( "confirm" ) String confirm , @ QueryParam ( "option" ) String opt ) { if ( "ontology" . equals ( opt ) ) { try { new Upload ( ) . reset ( false ) ; } catch ( Exception e ) { return new Gson ( ) . toJson ( "error" ) ; } } else { SimpleDateFormat sdf = new SimpleDateFormat ( "dd//MM//yy<seq2seq4repair_space>kk:mm" ) ; String dateStr = sdf . format ( Calendar . getInstance ( ) . getTime ( ) ) ; if ( dateStr . equals ( confirm ) ) { try { new Upload ( ) . reset ( true ) ; } catch ( Exception e ) { return new Gson ( ) . toJson ( "error" ) ; } } else { <START_BUG> return new Gson ( ) . toJson ( ( "Wrong<seq2seq4repair_space>confirmation<seq2seq4repair_space>date.<seq2seq4repair_space>Server<seq2seq4repair_space>date<seq2seq4repair_space>is:<seq2seq4repair_space>" + dateStr ) ) ; <END_BUG> } } return new Gson ( ) . toJson ( "success" ) ; } }

Fix:
return new Gson ( ) . toJson ( ( "Wrong<seq2seq4repair_space>confirmation<seq2seq4repair_space>date.<seq2seq4repair_space>Server<seq2seq4repair_space>date<seq2seq4repair_space>is<seq2seq4repair_space>" + dateStr ) ) ;
Buggy code:
public class PerformanceTestHarness { final IPerformanceTest test ; final String testFilePath ; final String statsOutfilePath ; final int warmupRuns ; final int observationRuns ; final int pollingInterval ; public PerformanceTestHarness ( final IPerformanceTest test , final String testFilePath , final String statsOutfilePath , final int warmupRuns , final int observationRuns , final int pollingInterval ) { } public void run ( ) { FileWriter output ; try { for ( int i = 0 ; i < ( warmupRuns ) ; i ++ ) { System . err . println ( ( ( ( test . getClass ( ) . getSimpleName ( ) ) + "<seq2seq4repair_space>warmup<seq2seq4repair_space>" ) + i ) ) ; final RecordIterator iter = new RecordIterator ( testFilePath , pollingInterval ) ; test . doRun ( iter ) ; } output = new FileWriter ( statsOutfilePath ) ; output . write ( "run,record_number,time,time_diff\n" ) ; output . flush ( ) ; for ( int i = 0 ; i < ( observationRuns ) ; i ++ ) { System . err . println ( ( ( ( test . getClass ( ) . getSimpleName ( ) ) + "<seq2seq4repair_space>obs<seq2seq4repair_space>" ) + i ) ) ; final RecordIterator iter = new RecordIterator ( testFilePath , pollingInterval ) ; test . doRun ( iter ) ; final long [ ] polledTimes = iter . getPolledTimes ( ) ; <START_BUG> long lastTime = 0 ; <END_BUG> for ( int j = 0 ; j < ( polledTimes . length ) ; j ++ ) { final int recordCount = ( j + 1 ) * ( pollingInterval ) ; final long time = polledTimes [ j ] ; final long timeDiff = time - lastTime ; output . write ( ( ( ( ( ( ( ( i + "," ) + recordCount ) + "," ) + time ) + "," ) + timeDiff ) + "\n" ) ) ; lastTime = time ; } output . flush ( ) ; } output . close ( ) ; } catch ( IOException e ) { e . printStackTrace ( ) ; throw new RuntimeException ( ( "Couldn't<seq2seq4repair_space>open<seq2seq4repair_space>file<seq2seq4repair_space>" + ( statsOutfilePath ) ) ) ; } } }

Fix:
long lastTime = iter . getStart ( ) ;
Buggy code:
public class Activator extends DependencyActivatorBase { @ Override public void destroy ( BundleContext context , DependencyManager manager ) throws Exception { } @ Override public void init ( BundleContext context , DependencyManager manager ) throws Exception { Properties props = new Properties ( ) ; props . put ( "alias" , "//stats" ) ; <START_BUG> manager . add ( createComponent ( ) . setInterface ( Servlet . class . getName ( ) , props ) . setImplementation ( ViewStatsServlet . class ) . add ( createServiceDependency ( ) . setService ( StatsProvider . class , "(service.imported=true)" ) . setCallbacks ( "add" , "remove" ) . setRequired ( false ) ) . add ( createServiceDependency ( ) . setService ( LogService . class ) . setRequired ( false ) ) ) ; <END_BUG> } }

Fix:
manager . add ( createComponent ( ) . setInterface ( Servlet . class . getName ( ) , props ) . setImplementation ( ViewStatsServlet . class ) . add ( createServiceDependency ( ) . setService ( StatsProvider . class ) . setCallbacks ( "add" , "remove" ) . setRequired ( false ) ) . add ( createServiceDependency ( ) . setService ( LogService . class ) . setRequired ( false ) ) ) ;
Buggy code:
public final class Lucene41PostingsBaseFormat extends PostingsBaseFormat { public Lucene41PostingsBaseFormat ( ) { } @ Override public PostingsReaderBase postingsReaderBase ( SegmentReadState state ) throws IOException { <START_BUG> return new Lucene41PostingsReader ( state . dir , state . fieldInfos , state . segmentInfo , state . context , state . segmentSuffix ) ; <END_BUG> } @ Override public PostingsWriterBase postingsWriterBase ( SegmentWriteState state ) throws IOException { } }

Fix:
return new Lucene41PostingsReader ( state . directory , state . fieldInfos , state . segmentInfo , state . context , state . segmentSuffix ) ;
Buggy code:
public class MobileWebPresentationModelFactory extends DefaultPresentationModelFactory { private RealtimeService _realtimeService ; private ConfigurationService _configurationService ; private long _lastUpdateTime = System . currentTimeMillis ( ) ; public MobileWebPresentationModelFactory ( RealtimeService realtimeService , ConfigurationService configurationService ) { } public long getLastUpdateTime ( ) { } @ Override public StopResult getStopModelForRoute ( StopBean stopBean , RouteBean route ) { } @ Override public RouteDestinationItem getRouteDestinationModelForStop ( StopGroupBean group , RouteBean route , StopBean stop ) { MobileWebRouteDestinationItem destination = new MobileWebRouteDestinationItem ( group , null ) ; <START_BUG> destination . setServiceAlerts ( _realtimeService . getServiceAlertsForStop ( stop . getId ( ) ) ) ; <END_BUG> List < MonitoredStopVisitStructure > visits = _realtimeService . getMonitoredStopVisitsForStop ( stop . getId ( ) , 0 ) ; List < String > distanceAwayStrings = new ArrayList < String > ( ) ; for ( MonitoredStopVisitStructure visit : visits ) { String routeId = visit . getMonitoredVehicleJourney ( ) . getLineRef ( ) . getValue ( ) ; if ( ! ( route . getId ( ) . equals ( routeId ) ) ) continue ; Long thisLastUpdateTime = visit . getRecordedAtTime ( ) . getTime ( ) ; if ( ( thisLastUpdateTime != null ) && ( thisLastUpdateTime > ( _lastUpdateTime ) ) ) { _lastUpdateTime = thisLastUpdateTime ; } MonitoredCallStructure monitoredCall = visit . getMonitoredVehicleJourney ( ) . getMonitoredCall ( ) ; if ( monitoredCall == null ) continue ; distanceAwayStrings . add ( getPresentableDistance ( visit . getMonitoredVehicleJourney ( ) , thisLastUpdateTime , true ) ) ; } destination . setDistanceAwayStrings ( distanceAwayStrings ) ; return destination ; } @ Override public RouteDestinationItem getRouteDestinationModelForRoute ( StopGroupBean group , RouteBean route , List < StopResult > stops ) { } private String getPresentableDistance ( MonitoredVehicleJourneyStructure journey , long updateTime , boolean isStopContext ) { } No newline ; at end ; of file ; }

Fix:
destination . setServiceAlerts ( _realtimeService . getServiceAlertsForRouteAndDirection ( route . getId ( ) , destination . getDirectionId ( ) ) ) ;
Buggy code:
public class LabeledStatement extends Statement { public static final ChildPropertyDescriptor LABEL_PROPERTY = new ChildPropertyDescriptor ( LabeledStatement . class , "label" , SimpleName . class , ASTNode . MANDATORY , ASTNode . NO_CYCLE_RISK ) ; public static final ChildPropertyDescriptor BODY_PROPERTY = new ChildPropertyDescriptor ( LabeledStatement . class , "body" , Statement . class , ASTNode . MANDATORY , ASTNode . CYCLE_RISK ) ; private static final List PROPERTY_DESCRIPTORS ; public static List propertyDescriptors ( int apiLevel ) { } private SimpleName labelName = null ; private Statement body = null ; LabeledStatement ( AST ast ) { } final List internalStructuralPropertiesForType ( int apiLevel ) { } final ASTNode internalGetSetChildProperty ( ChildPropertyDescriptor property , boolean get , ASTNode child ) { } final int getNodeType0 ( ) { } ASTNode clone0 ( AST target ) { LabeledStatement result = new LabeledStatement ( target ) ; <START_BUG> result . setSourceRange ( this . getStartPosition ( ) , this . getLength ( ) ) ; <END_BUG> result . setLabel ( ( ( SimpleName ) ( ASTNode . copySubtree ( target , getLabel ( ) ) ) ) ) ; result . setBody ( ( ( Statement ) ( ASTNode . copySubtree ( target , getBody ( ) ) ) ) ) ; return result ; } final boolean subtreeMatch0 ( ASTMatcher matcher , Object other ) { } void accept0 ( ASTVisitor visitor ) { } public SimpleName getLabel ( ) { } public void setLabel ( SimpleName label ) { } public Statement getBody ( ) { } public void setBody ( Statement statement ) { } int memSize ( ) { } int treeSize ( ) { } }

Fix:
result . setSourceRange ( getStartPosition ( ) , getLength ( ) ) ;
Buggy code:
public class ClusteringTask implements Callable < Object > { private WeightedDocument document ; private Collection < Cluster > clusterList ; public ClusteringTask ( WeightedDocument document , Collection < Cluster > clusterList ) { } @ Override public Object call ( ) { } private Cluster findClosestCluster ( WeightedDocument d ) { Cluster closest = null ; Double closestDistance = Double . MAX_VALUE ; for ( Cluster cluster : clusterList ) { <START_BUG> Double distance = cluster . getCentroid ( ) . getDistanceFromVector ( d . getVector ( ) ) ; <END_BUG> if ( distance < closestDistance ) { closestDistance = distance ; closest = cluster ; } } return closest ; } }

Fix:
Double distance = cluster . getCentroid ( false ) . getDistanceFromVector ( d . getVector ( ) ) ;
Buggy code:
public class TestBlockJoinValidation extends LuceneTestCase { public static final int AMOUNT_OF_SEGMENTS = 5 ; public static final int AMOUNT_OF_PARENT_DOCS = 10 ; public static final int AMOUNT_OF_CHILD_DOCS = 5 ; public static final int AMOUNT_OF_DOCS_IN_SEGMENT = ( TestBlockJoinValidation . AMOUNT_OF_PARENT_DOCS ) + ( ( TestBlockJoinValidation . AMOUNT_OF_PARENT_DOCS ) * ( TestBlockJoinValidation . AMOUNT_OF_CHILD_DOCS ) ) ; private Directory directory ; private IndexReader indexReader ; private IndexSearcher indexSearcher ; private Filter parentsFilter ; @ Rule public ExpectedException thrown = ExpectedException . none ( ) ; @ Before public void before ( ) throws Exception { directory = newDirectory ( ) ; final IndexWriterConfig config = new IndexWriterConfig ( TEST_VERSION_CURRENT , new org . apache . lucene . analysis . MockAnalyzer ( random ( ) ) ) ; final IndexWriter indexWriter = new IndexWriter ( directory , config ) ; for ( int i = 0 ; i < ( TestBlockJoinValidation . AMOUNT_OF_SEGMENTS ) ; i ++ ) { List < Document > segmentDocs = TestBlockJoinValidation . createDocsForSegment ( i ) ; indexWriter . addDocuments ( segmentDocs ) ; indexWriter . commit ( ) ; } indexReader = DirectoryReader . open ( indexWriter , random ( ) . nextBoolean ( ) ) ; <START_BUG> indexWriter . close ( ) ; <END_BUG> indexSearcher = new IndexSearcher ( indexReader ) ; parentsFilter = new FixedBitSetCachingWrapperFilter ( new QueryWrapperFilter ( new org . apache . lucene . search . WildcardQuery ( new Term ( "parent" , "*" ) ) ) ) ; } @ Test public void testNextDocValidationForToParentBjq ( ) throws Exception { } @ Test public void testAdvanceValidationForToParentBjq ( ) throws Exception { } @ Test public void testNextDocValidationForToChildBjq ( ) throws Exception { } @ Test public void testAdvanceValidationForToChildBjq ( ) throws Exception { } @ After public void after ( ) throws Exception { } private static List < Document > createDocsForSegment ( int segmentNumber ) { } private static List < Document > createParentDocWithChildren ( int segmentNumber , int parentNumber ) { } private static Document createParentDoc ( int segmentNumber , int parentNumber ) { } private static Document createChildDoc ( int segmentNumber , int parentNumber , int childNumber ) { } private static String createFieldValue ( int ... documentNumbers ) { } private static Query createChildrenQueryWithOneParent ( int childNumber ) { } private static Query createParentsQueryWithOneChild ( int randomChildNumber ) { } private static int getRandomParentId ( ) { } private static int getRandomParentNumber ( ) { } private static Query randomChildQuery ( int randomChildNumber ) { } private static int getRandomChildNumber ( int notLessThan ) { } }

Fix:
indexWriter . shutdown ( ) ;
Buggy code:
public class TestSpansAdvanced extends LuceneTestCase { protected Directory mDirectory ; protected IndexSearcher searcher ; private static final String FIELD_ID = "ID" ; protected static final String FIELD_TEXT = "TEXT" ; protected void setUp ( ) throws Exception { super . setUp ( ) ; super . setUp ( ) ; mDirectory = new RAMDirectory ( ) ; final IndexWriter writer = new IndexWriter ( mDirectory , new StandardAnalyzer ( ) , true , MaxFieldLength . LIMITED ) ; addDocument ( writer , "1" , "I<seq2seq4repair_space>think<seq2seq4repair_space>it<seq2seq4repair_space>should<seq2seq4repair_space>work." ) ; addDocument ( writer , "2" , "I<seq2seq4repair_space>think<seq2seq4repair_space>it<seq2seq4repair_space>should<seq2seq4repair_space>work." ) ; addDocument ( writer , "3" , "I<seq2seq4repair_space>think<seq2seq4repair_space>it<seq2seq4repair_space>should<seq2seq4repair_space>work." ) ; addDocument ( writer , "4" , "I<seq2seq4repair_space>think<seq2seq4repair_space>it<seq2seq4repair_space>should<seq2seq4repair_space>work." ) ; writer . close ( ) ; <START_BUG> searcher = new IndexSearcher ( mDirectory ) ; <END_BUG> } protected void tearDown ( ) throws Exception { } protected void addDocument ( final IndexWriter writer , final String id , final String text ) throws IOException { } public void testBooleanQueryWithSpanQueries ( ) throws IOException { } protected void doTestBooleanQueryWithSpanQueries ( IndexSearcher s , final float expectedScore ) throws IOException { } protected static void assertHits ( Searcher s , Query query , final String description , final String [ ] expectedIds , final float [ ] expectedScores ) throws IOException { } }

Fix:
searcher = new IndexSearcher ( mDirectory , true ) ;
Buggy code:
public class InfoToModelFactory { public static Entry infoToEntry ( PartData info ) { } protected static Entry setPlasmidFields ( PlasmidData plasmidData , Entry entry ) { } protected static Entry setStrainFields ( StrainData strainData , Entry entry ) { } protected static Entry setSeedFields ( ArabidopsisSeedData seedData , Entry entry ) { ArabidopsisSeed seed = ( ( ArabidopsisSeed ) ( entry ) ) ; if ( seedData == null ) return entry ; if ( ( seedData . getHomozygosity ( ) ) != null ) seed . setHomozygosity ( seedData . getHomozygosity ( ) ) ; <START_BUG> seed . setHarvestDate ( seedData . getHarvestDate ( ) ) ; <END_BUG> String ecoType = ( ( seedData . getEcotype ( ) ) == null ) ? "" : seedData . getEcotype ( ) ; seed . setEcotype ( ecoType ) ; String parents = ( ( seedData . getSeedParents ( ) ) == null ) ? "" : seedData . getSeedParents ( ) ; seed . setParents ( parents ) ; if ( ( seedData . getGeneration ( ) ) != null ) { Generation generation = Generation . fromString ( seedData . getGeneration ( ) . name ( ) ) ; seed . setGeneration ( generation ) ; } else { seed . setGeneration ( UNKNOWN ) ; } if ( ( seedData . getPlantType ( ) ) != null ) { PlantType plantType = PlantType . fromString ( seedData . getPlantType ( ) . name ( ) ) ; seed . setPlantType ( plantType ) ; } else { seed . setPlantType ( NULL ) ; } seed . setSentToABRC ( seedData . isSentToAbrc ( ) ) ; return entry ; } public static Entry updateEntryField ( PartData data , Entry entry ) { } private static Entry setCommon ( Entry entry , PartData info ) { } private static List < Parameter > getParameters ( ArrayList < CustomField > infos , Entry entry ) { } private static Set < SelectionMarker > getSelectionMarkers ( ArrayList < String > markerStr , Entry entry ) { } private static Set < Link > getLinks ( ArrayList < String > linkList , Entry entry ) { } public static Entry [ ] infoToEntryForField ( Entry entry , Entry plasmid , String value , EntryField field ) { } private static Entry infoToStrainForField ( Entry entry , String value , EntryField field ) { } private static Entry infoToPlasmidForField ( Entry entry , String value , EntryField field ) { } private static Entry infoToSeedForField ( Entry entry , String value , EntryField field ) { } }

Fix:
seed . setHarvestDate ( new Date ( seedData . getHarvestDate ( ) ) ) ;
Buggy code:
public class UserDataInterceptor extends HandlerInterceptorAdapter { private final PrivateMessageService service ; private final SecurityService securityService ; @ Autowired public UserDataInterceptor ( PrivateMessageService service , SecurityService securityService ) { } @ Override public void postHandle ( HttpServletRequest request , HttpServletResponse response , Object handler , ModelAndView modelAndView ) { <START_BUG> if ( ! ( modelAndView . getViewName ( ) . contains ( "redirect:" ) ) ) { <END_BUG> int newPmCount = service . currentUserNewPmCount ( ) ; request . setAttribute ( "newPmCount" , newPmCount ) ; User user = securityService . getCurrentUser ( ) ; String encodedUserName = ( user != null ) ? user . getEncodedUsername ( ) : null ; request . setAttribute ( "encodedUserName" , encodedUserName ) ; } } }

Fix:
if ( ( modelAndView != null ) && ( ! ( modelAndView . getViewName ( ) . contains ( "redirect:" ) ) ) ) {
Buggy code:
public class Cab extends MatchingTask { private ArrayList filesets = new ArrayList ( ) ; private boolean doCompress = true ; private boolean doVerbose = false ; protected String archiveType = "cab" ; private File baseDir ; private File cabFile ; private String cmdOptions ; public void setBasedir ( File baseDir ) { } public void setCabfile ( File cabFile ) { } public void setCompress ( boolean compress ) { } public void setOptions ( String options ) { } public void setVerbose ( boolean verbose ) { } public void addFileset ( FileSet set ) { } public void execute ( ) throws TaskException { } protected ArrayList getFileList ( ) throws TaskException { ArrayList files = new ArrayList ( ) ; if ( ( filesets . size ( ) ) == 0 ) { appendFiles ( files , super . getDirectoryScanner ( baseDir ) ) ; } else { for ( int i = 0 ; i < ( filesets . size ( ) ) ; i ++ ) { FileSet fs = ( ( FileSet ) ( filesets . get ( i ) ) ) ; if ( fs != null ) { <START_BUG> appendFiles ( files , fs . getDirectoryScanner ( getProject ( ) ) ) ; <END_BUG> } } } return files ; } protected boolean isUpToDate ( ArrayList files ) { } protected void appendFiles ( ArrayList files , DirectoryScanner ds ) { } protected void checkConfiguration ( ) throws TaskException { } protected void setupCommand ( File listFile , ExecTask exec ) throws TaskException { } protected ExecTask createExec ( ) throws TaskException { } protected File createListFile ( ArrayList files ) throws IOException { } }

Fix:
appendFiles ( files , fs . getDirectoryScanner ( ) ) ;
Buggy code:
public class RefreshingViewOnRemoveTest extends WicketTestCase { private final List < RefreshingViewOnRemoveTest . TestComponent > components = new ArrayList < RefreshingViewOnRemoveTest . TestComponent > ( ) ; private int round = 1 ; @ Test public void test ( ) { tester . startPage ( new RefreshingViewOnRemoveTest . TestPage ( ) ) ; for ( RefreshingViewOnRemoveTest . TestComponent c : components ) { <START_BUG> assertTrue ( c . detached ) ; <END_BUG> } ( round ) ++ ; tester . startPage ( tester . getLastRenderedPage ( ) ) ; for ( RefreshingViewOnRemoveTest . TestComponent c : components ) { assertTrue ( c . detached ) ; } boolean round1 = false ; boolean round2 = false ; for ( RefreshingViewOnRemoveTest . TestComponent c : components ) { if ( ( c . round ) == 1 ) round1 = true ; if ( ( c . round ) == 2 ) round2 = true ; } assertTrue ( round1 ) ; assertTrue ( round2 ) ; for ( RefreshingViewOnRemoveTest . TestComponent c : components ) { if ( ( c . round ) == 1 ) assertTrue ( c . removed ) ; } } protected Component newComponent ( String id ) { } static class TestComponent extends Label { private static final long serialVersionUID = 1L ; public boolean detached = false ; public boolean removed = false ; public final int round ; public TestComponent ( String id , int round ) { } @ Override protected void onDetach ( ) { } @ Override protected void onRemove ( ) { } } class TestPage extends WebPage implements IMarkupResourceStreamProvider { private static final long serialVersionUID = 1L ; public TestPage ( ) { } public IResourceStream getMarkupResourceStream ( MarkupContainer container , Class < ? > containerClass ) { } } }

Fix:
assertTrue ( ( ( "Component<seq2seq4repair_space>" + c ) + "<seq2seq4repair_space>is<seq2seq4repair_space>not<seq2seq4repair_space>detached." ) , c . detached ) ;
Buggy code:
public class RepeatBrick extends FormulaBrick implements OnClickListener , LoopBeginBrick { private static final long serialVersionUID = 1L ; private transient View prototypeView ; protected LoopEndBrick loopEndBrick ; private transient long beginLoopTime ; private transient LoopBeginBrick copy ; public RepeatBrick ( ) { } public RepeatBrick ( Sprite sprite , int timesToRepeatValue ) { } public RepeatBrick ( Sprite sprite , Formula timesToRepeat ) { } private void initializeBrickFields ( Formula timesToRepeat ) { } @ Override public int getRequiredResources ( ) { } @ Override public Brick clone ( ) { } @ Override public View getView ( Context context , int brickId , BaseAdapter baseAdapter ) { } @ Override public View getPrototypeView ( Context context ) { } @ Override public View getViewWithAlpha ( int alphaValue ) { } @ Override public void onClick ( View view ) { } @ Override public List < SequenceAction > addActionToSequence ( SequenceAction sequence ) { } @ Override public Brick copyBrickForSprite ( Sprite sprite , Script script ) { <START_BUG> ForeverBrick copyBrick = ( ( ForeverBrick ) ( clone ( ) ) ) ; <END_BUG> copyBrick . sprite = sprite ; copy = copyBrick ; return copyBrick ; } @ Override public long getBeginLoopTime ( ) { } @ Override public void setBeginLoopTime ( long beginLoopTime ) { } @ Override public LoopEndBrick getLoopEndBrick ( ) { } @ Override public void setLoopEndBrick ( LoopEndBrick loopEndBrick ) { } @ Override public LoopBeginBrick getCopy ( ) { } @ Override public boolean isInitialized ( ) { } @ Override public void initialize ( ) { } @ Override public boolean isDraggableOver ( Brick brick ) { } @ Override public List < NestingBrick > getAllNestingBrickParts ( boolean sorted ) { } }

Fix:
RepeatBrick copyBrick = ( ( RepeatBrick ) ( clone ( ) ) ) ;
Buggy code:
public class CBayesClassifierTest extends TestCase { protected CBayesModel model ; public CBayesClassifierTest ( String s ) { } protected void setUp ( ) { } protected void tearDown ( ) { } public void test ( ) { BayesClassifier classifier = new BayesClassifier ( ) ; ClassifierResult result ; String [ ] document = new String [ ] { "aa" , "ff" } ; result = classifier . classify ( model , document , "unknown" ) ; assertTrue ( "category<seq2seq4repair_space>is<seq2seq4repair_space>null<seq2seq4repair_space>and<seq2seq4repair_space>it<seq2seq4repair_space>shouldn't<seq2seq4repair_space>be" , ( result != null ) ) ; assertTrue ( ( ( result + "<seq2seq4repair_space>is<seq2seq4repair_space>not<seq2seq4repair_space>equal<seq2seq4repair_space>to<seq2seq4repair_space>" ) + "e" ) , result . getLabel ( ) . equals ( "e" ) ) ; document = new String [ ] { "ff" } ; result = classifier . classify ( model , document , "unknown" ) ; assertTrue ( "category<seq2seq4repair_space>is<seq2seq4repair_space>null<seq2seq4repair_space>and<seq2seq4repair_space>it<seq2seq4repair_space>shouldn't<seq2seq4repair_space>be" , ( result != null ) ) ; <START_BUG> assertTrue ( ( ( result + "<seq2seq4repair_space>is<seq2seq4repair_space>not<seq2seq4repair_space>equal<seq2seq4repair_space>to<seq2seq4repair_space>" ) + "unknown" ) , result . getLabel ( ) . equals ( "unknown" ) ) ; <END_BUG> document = new String [ ] { "cc" } ; result = classifier . classify ( model , document , "unknown" ) ; assertTrue ( "category<seq2seq4repair_space>is<seq2seq4repair_space>null<seq2seq4repair_space>and<seq2seq4repair_space>it<seq2seq4repair_space>shouldn't<seq2seq4repair_space>be" , ( result != null ) ) ; assertTrue ( ( ( result + "<seq2seq4repair_space>is<seq2seq4repair_space>not<seq2seq4repair_space>equal<seq2seq4repair_space>to<seq2seq4repair_space>" ) + "d" ) , result . getLabel ( ) . equals ( "d" ) ) ; } public void testResults ( ) throws Exception { } }

Fix:
assertTrue ( ( ( result + "<seq2seq4repair_space>is<seq2seq4repair_space>not<seq2seq4repair_space>equal<seq2seq4repair_space>to<seq2seq4repair_space>" ) + "d" ) , result . getLabel ( ) . equals ( "d" ) ) ;
Buggy code:
public class TridentWordCount { public static class Split extends BaseFunction { @ Override public void execute ( TridentTuple tuple , TridentCollector collector ) { } } public static StormTopology buildTopology ( LocalDRPC drpc ) { } public static void main ( String [ ] args ) throws Exception { Config conf = new Config ( ) ; conf . setMaxSpoutPending ( 20 ) ; if ( ( args . length ) == 0 ) { LocalDRPC drpc = new LocalDRPC ( ) ; LocalCluster cluster = new LocalCluster ( ) ; cluster . submitTopology ( "wordCounter" , conf , TridentWordCount . buildTopology ( drpc ) ) ; for ( int i = 0 ; i < 100 ; i ++ ) { System . out . println ( ( "DRPC<seq2seq4repair_space>RESULT:<seq2seq4repair_space>" + ( drpc . execute ( "words" , "cat<seq2seq4repair_space>the<seq2seq4repair_space>dog<seq2seq4repair_space>jumped" ) ) ) ) ; Thread . sleep ( 1000 ) ; } } else { conf . setNumWorkers ( 3 ) ; <START_BUG> StormSubmitter . submitTopology ( args [ 0 ] , conf , TridentWordCount . buildTopology ( null ) ) ; <END_BUG> } } }

Fix:
StormSubmitter . submitTopologyWithProgressBar ( args [ 0 ] , conf , TridentWordCount . buildTopology ( null ) ) ;
Buggy code:
public class JBossServiceXmlDescriptorParserTestCase { private JBossServiceXmlDescriptorParser parser ; private XMLMapper xmlMapper ; private XMLInputFactory inputFactory ; @ Before public void setupParser ( ) throws Exception { <START_BUG> parser = new JBossServiceXmlDescriptorParser ( ) ; <END_BUG> xmlMapper = Factory . create ( ) ; xmlMapper . registerRootElement ( new QName ( JBossServiceXmlDescriptorParser . NAMESPACE , "server" ) , parser ) ; inputFactory = XMLInputFactory . newInstance ( ) ; } @ Test public void testParse ( ) throws Exception { } protected URL getResource ( final Class < ? > testClass , final String path ) throws Exception { } protected File getResourceFile ( final Class < ? > testClass , final String path ) throws Exception { } }

Fix:
parser = new JBossServiceXmlDescriptorParser ( propertyReplacer ) ;
Buggy code:
public class ChannelServer implements Closeable { private final Endpoint endpoint ; private final Registration registration ; private final AcceptingChannel < ? extends ConnectedStreamChannel > streamServer ; private ChannelServer ( final Endpoint endpoint , final Registration registration , final AcceptingChannel < ? extends ConnectedStreamChannel > streamServer ) { } public static ChannelServer create ( final ChannelServer . Configuration configuration ) throws IOException { if ( configuration == null ) { throw new IllegalArgumentException ( "Null<seq2seq4repair_space>configuration" ) ; } configuration . validate ( ) ; final Endpoint endpoint = Remoting . createEndpoint ( configuration . getEndpointName ( ) , configuration . getOptionMap ( ) ) ; Registration registration = endpoint . addConnectionProvider ( configuration . getUriScheme ( ) , new RemoteConnectionProviderFactory ( ) , OptionMap . create ( SSL_ENABLED , Boolean . FALSE ) ) ; final NetworkServerProvider networkServerProvider = endpoint . getConnectionProviderInterface ( configuration . getUriScheme ( ) , NetworkServerProvider . class ) ; SimpleServerAuthenticationProvider provider = new SimpleServerAuthenticationProvider ( ) ; provider . addUser ( "TestUser" , "localhost.localdomain" , "TestUserPassword" . toCharArray ( ) ) ; System . out . println ( configuration . getBindAddress ( ) ) ; OptionMap options = OptionMap . create ( SASL_MECHANISMS , Sequence . of ( "ANONYMOUS" ) , SASL_POLICY_NOANONYMOUS , Boolean . FALSE ) ; <START_BUG> AcceptingChannel < ? extends ConnectedStreamChannel > streamServer = networkServerProvider . createServer ( configuration . getBindAddress ( ) , options , provider ) ; <END_BUG> return new ChannelServer ( endpoint , registration , streamServer ) ; } public void addChannelOpenListener ( final String channelName ) throws ServiceRegistrationException { } public void addChannelOpenListener ( final String channelName , final OpenListener openListener ) throws ServiceRegistrationException { } public void close ( ) { } public static final class Configuration { private String endpointName ; private OptionMap optionMap = OptionMap . EMPTY ; private String uriScheme ; private InetSocketAddress bindAddress ; private Executor executor ; public Configuration ( ) { } void validate ( ) { } public void setEndpointName ( String endpointName ) { } public String getEndpointName ( ) { } public String getUriScheme ( ) { } public void setUriScheme ( String uriScheme ) { } public OptionMap getOptionMap ( ) { } public void setOptionMap ( OptionMap optionMap ) { } public InetSocketAddress getBindAddress ( ) { } public void setBindAddress ( final InetSocketAddress bindAddress ) { } public Executor getExecutor ( ) { } public void setExecutor ( final Executor readExecutor ) { } } }

Fix:
AcceptingChannel < ? extends ConnectedStreamChannel > streamServer = networkServerProvider . createServer ( configuration . getBindAddress ( ) , options , provider , null ) ;
Buggy code:
public class EmptyStatement extends Statement { EmptyStatement ( AST ast ) { } public int getNodeType ( ) { } ASTNode clone ( AST target ) { } public boolean subtreeMatch ( ASTMatcher matcher , Object other ) { } void accept0 ( ASTVisitor visitor ) { <START_BUG> boolean visitChildren = visitor . visit ( this ) ; <END_BUG> visitor . endVisit ( this ) ; } int treeSize ( ) { } }

Fix:
visitor . visit ( this ) ;
Buggy code:
public final class TestClusterClassifier extends MahoutTestCase { private static ClusterClassifier newDMClassifier ( ) { } private static ClusterClassifier newKlusterClassifier ( ) { } private static ClusterClassifier newCosineKlusterClassifier ( ) { } private static ClusterClassifier newSoftClusterClassifier ( ) { } private static ClusterClassifier newGaussianClassifier ( ) { } private ClusterClassifier writeAndRead ( ClusterClassifier classifier ) throws IOException { } @ Test public void testDMClusterClassification ( ) { } @ Test public void testCanopyClassification ( ) { } @ Test public void testClusterClassification ( ) { } @ Test ( expected = UnsupportedOperationException . class ) public void testMSCanopyClassification ( ) { } @ Test public void testSoftClusterClassification ( ) { } @ Test public void testGaussianClusterClassification ( ) { } @ Test public void testDMClassifierSerialization ( ) throws Exception { } @ Test public void testClusterClassifierSerialization ( ) throws Exception { } @ Test public void testSoftClusterClassifierSerialization ( ) throws Exception { } @ Test public void testGaussianClassifierSerialization ( ) throws Exception { } @ Test public void testClusterIteratorKMeans ( ) { } @ Test public void testClusterIteratorDirichlet ( ) { } @ Test public void testSeqFileClusterIteratorKMeans ( ) throws IOException { } @ Test public void testMRFileClusterIteratorKMeans ( ) throws Exception { } @ Test public void testCosineKlusterClassification ( ) { ClusterClassifier classifier = TestClusterClassifier . newCosineKlusterClassifier ( ) ; Vector pdf = classifier . classify ( new DenseVector ( 2 ) ) ; assertEquals ( "[0,0]" , "[0.333,<seq2seq4repair_space>0.333,<seq2seq4repair_space>0.333]" , AbstractCluster . formatVector ( pdf , null ) ) ; pdf = classifier . classify ( new DenseVector ( 2 ) . assign ( 2 ) ) ; <START_BUG> assertEquals ( "[2,2]" , "[0.545,<seq2seq4repair_space>0.273,<seq2seq4repair_space>0.182]" , AbstractCluster . formatVector ( pdf , null ) ) ; <END_BUG> } }

Fix:
assertEquals ( "[2,2]" , "[0.429,<seq2seq4repair_space>0.429,<seq2seq4repair_space>0.143]" , AbstractCluster . formatVector ( pdf , null ) ) ;
Buggy code:
public class EncodeCaseInsensitiveKey implements Function < String , String > { @ Override public String apply ( final String input ) { String res = "" ; for ( int i = 0 ; i < ( input . length ( ) ) ; i ++ ) { final char testChar = input . charAt ( i ) ; assert testChar != '^' : ( "Found<seq2seq4repair_space>illegal<seq2seq4repair_space>character<seq2seq4repair_space>for<seq2seq4repair_space>Case<seq2seq4repair_space>Sensitive<seq2seq4repair_space>Encoding:<seq2seq4repair_space>^\n" + "<seq2seq4repair_space>In<seq2seq4repair_space>Key:<seq2seq4repair_space>" ) + input ; <START_BUG> if ( ( ( ( Character . isLowerCase ( testChar ) ) || ( testChar == '_' ) ) || ( testChar == '//' ) ) || ( testChar == '-' ) ) { <END_BUG> res += testChar ; } else { res += "^" + testChar ; } } return res ; } }

Fix:
if ( ( ( ( ! ( Character . isUpperCase ( testChar ) ) ) || ( testChar == '_' ) ) || ( testChar == '//' ) ) || ( testChar == '-' ) ) {
Buggy code:
class LocatorServiceListener implements IServiceListener { private Object listenerLock = new Object ( ) ; private ListenerQueue queue ; private EventManager eventManager ; class EndpointListenerEvent { private EndpointListenerHolder holder ; private boolean discovered ; public EndpointListenerEvent ( EndpointListenerHolder holder , boolean discovered ) { } public EndpointListenerHolder getEndpointListenerHolder ( ) { } public boolean isDiscovered ( ) { } } public LocatorServiceListener ( ) { } public void serviceDiscovered ( IServiceEvent anEvent ) { } public void serviceUndiscovered ( IServiceEvent anEvent ) { } private boolean matchServiceID ( IServiceID serviceId ) { } void handleService ( IServiceInfo serviceInfo , boolean discovered ) { } private void handleOSGiServiceEndpoint ( IServiceID serviceId , IServiceInfo serviceInfo , boolean discovered ) { } private void logError ( String message ) { } private void logError ( String message , Throwable t ) { } private EndpointDescription createEndpointDescription ( IServiceID serviceId , IServiceInfo serviceInfo , boolean discovered ) { Activator activator = Activator . getDefault ( ) ; if ( activator == null ) return null ; IEndpointDescriptionFactory factory = activator . getEndpointDescriptionFactory ( ) ; if ( factory == null ) { logError ( ( ( ( "No<seq2seq4repair_space>IEndpointDescriptionFactory<seq2seq4repair_space>found,<seq2seq4repair_space>could<seq2seq4repair_space>not<seq2seq4repair_space>create<seq2seq4repair_space>EndpointDescription<seq2seq4repair_space>for<seq2seq4repair_space>" + ( discovered ? "discovered" : "undiscovered" ) ) + "<seq2seq4repair_space>serviceInfo=" ) + serviceInfo ) ) ; return null ; } try { <START_BUG> return discovered ? factory . createDiscoveredEndpointDescription ( serviceId , serviceInfo ) : factory . getUndiscoveredEndpointDescription ( serviceId , serviceInfo ) ; <END_BUG> } catch ( Exception e ) { logError ( ( "Exception<seq2seq4repair_space>calling<seq2seq4repair_space>IEndpointDescriptionFactory." + ( discovered ? "createDiscoveredEndpointDescription" : "getUndiscoveredEndpointDescription" ) ) , e ) ; return null ; } catch ( NoClassDefFoundError e ) { logError ( ( "NoClassDefFoundError<seq2seq4repair_space>calling<seq2seq4repair_space>IEndpointDescriptionFactory." + ( discovered ? "createDiscoveredEndpointDescription" : "getUndiscoveredEndpointDescription" ) ) , e ) ; return null ; } } public void close ( ) { } }

Fix:
return discovered ? factory . createDiscoveredEndpointDescription ( serviceInfo ) : factory . getUndiscoveredEndpointDescription ( serviceId , serviceInfo ) ;
Buggy code:
public class TabFolder extends Composite { TabItem [ ] items ; int lastSelected = - 1 ; public TabFolder ( Composite parent , int style ) { } public void addSelectionListener ( SelectionListener listener ) { } static int checkStyle ( int style ) { } int callPaintEventHandler ( int control , int damageRgn , int visibleRgn , int theEvent , int nextHandler ) { } protected void checkSubclass ( ) { } public Point computeSize ( int wHint , int hHint , boolean changed ) { } public Rectangle computeTrim ( int x , int y , int width , int height ) { } void createHandle ( ) { } void createItem ( TabItem item , int index ) { } void createWidget ( ) { } void destroyItem ( TabItem item ) { } public Rectangle getClientArea ( ) { } public TabItem getItem ( int index ) { } public TabItem getItem ( Point point ) { } public int getItemCount ( ) { } public TabItem [ ] getItems ( ) { } public TabItem [ ] getSelection ( ) { } public int getSelectionIndex ( ) { } float getThemeAlpha ( ) { <START_BUG> return 0.25F * ( parent . getThemeAlpha ( ) ) ; <END_BUG> } public int indexOf ( TabItem item ) { } Point minimumSize ( int wHint , int hHint , boolean flushCache ) { } Rect getInset ( ) { } int kEventControlApplyBackground ( int nextHandler , int theEvent , int userData ) { } int kEventControlHit ( int nextHandler , int theEvent , int userData ) { } int kEventControlSetFocusPart ( int nextHandler , int theEvent , int userData ) { } void releaseChildren ( boolean destroy ) { } void removeControl ( Control control ) { } public void removeSelectionListener ( SelectionListener listener ) { } int setBounds ( int x , int y , int width , int height , boolean move , boolean resize , boolean events ) { } public void setSelection ( TabItem item ) { } public void setSelection ( TabItem [ ] items ) { } public void setSelection ( int index ) { } void setSelection ( int index , boolean notify , boolean force ) { } boolean traversePage ( boolean next ) { } }

Fix:
return ( ( background ) != null ? 1 : 0.25F ) * ( parent . getThemeAlpha ( ) ) ;
Buggy code:
@ RunWith ( Arquillian . class ) @ RunAsClient @ Ignore ( "[AS7-814]<seq2seq4repair_space>Fix<seq2seq4repair_space>or<seq2seq4repair_space>remove<seq2seq4repair_space>ignored<seq2seq4repair_space>smoke<seq2seq4repair_space>tests" ) public class WebAppTestCase { @ Deployment ( testable = false ) public static Archive < ? > getDeployment ( ) { } @ Test public void testWebApp ( ) throws Exception { } private void connect ( String urlPart ) throws Exception { } private static < T > T lookup ( String name , Class < T > expected ) throws Exception { ModelControllerClient client = Factory . create ( InetAddress . getByName ( "127.0.0.1" ) , 9999 , getCallbackHandler ( ) ) ; <START_BUG> MBeanServerConnection mbeanServer = JMXConnectorFactory . connect ( new JMXServiceURL ( "service:jmx:remote:////127.0.0.1:9999" ) ) . getMBeanServerConnection ( ) ; <END_BUG> ObjectName objectName = new ObjectName ( "jboss:name=test,type=fakejndi" ) ; Object o = mbeanServer . invoke ( objectName , "lookup" , new Object [ ] { name } , new String [ ] { "java.lang.String" } ) ; return expected . cast ( o ) ; } private static void usage ( Throwable t ) throws Exception { } }

Fix:
MBeanServerConnection mbeanServer = JMXConnectorFactory . connect ( new JMXServiceURL ( "service:jmx:remotng-jmx:////127.0.0.1:9999" ) ) . getMBeanServerConnection ( ) ;