nus-yam/ex-repair huggingface dataset:
Buggy code:
public class UndertowTestServer implements WebSocketTestServer { private Undertow server ; private DeploymentManager manager ; private final int port ; public UndertowTestServer ( ) { } @ Override public int getPort ( ) { } @ Override public void deployConfig ( WebApplicationContext cxt ) { UndertowTestServer . DispatcherServletInstanceFactory servletFactory = new UndertowTestServer . DispatcherServletInstanceFactory ( cxt ) ; DeploymentInfo servletBuilder = deployment ( ) . setClassLoader ( UndertowTestServer . class . getClassLoader ( ) ) . setDeploymentName ( "undertow-websocket-test" ) . setContextPath ( "//" ) . addServlet ( servlet ( "DispatcherServlet" , DispatcherServlet . class , servletFactory ) . addMapping ( "//" ) ) . addServletContextAttribute ( ATTRIBUTE_NAME , new WebSocketDeploymentInfo ( ) ) ; this . manager = defaultContainer ( ) . addDeployment ( servletBuilder ) ; this . manager . deploy ( ) ; try { <START_BUG> this . server = Undertow . builder ( ) . addListener ( this . port , "localhost" ) . setHandler ( this . manager . start ( ) ) . build ( ) ; <END_BUG> } catch ( ServletException ex ) { throw new IllegalStateException ( ex ) ; } } @ Override public void undeployConfig ( ) { } @ Override public void start ( ) throws Exception { } @ Override public void stop ( ) throws Exception { } private static class DispatcherServletInstanceFactory implements InstanceFactory < Servlet > { private final WebApplicationContext wac ; public DispatcherServletInstanceFactory ( WebApplicationContext wac ) { } @ Override public InstanceHandle < Servlet > createInstance ( ) throws InstantiationException { } } }

Fix:
this . server = Undertow . builder ( ) . addHttpListener ( this . port , "localhost" ) . setHandler ( this . manager . start ( ) ) . build ( ) ;
Buggy code:
public class FollowerServerProtocol extends ServerProtocol { private ServerBean leaderBean ; public FollowerServerProtocol ( ServerBean leaderBean ) { } private String forwardMsgToLeader ( String clintId , String lockKey , int msgType ) { } @ Override public String handleClientApply ( String clientId , String lockKey ) { } @ Override public String handleClientRelase ( String clientId , String lockKey ) { } @ Override public String processInput ( String input ) { ClientMsg msg = gson . fromJson ( input , ClientMsg . class ) ; String result ; System . out . println ( ( "processinput<seq2seq4repair_space>=<seq2seq4repair_space>" + msg ) ) ; System . out . println ( ( "msg<seq2seq4repair_space>type<seq2seq4repair_space>=<seq2seq4repair_space>" + ( msg . getMessageType ( ) ) ) ) ; switch ( msg . getMessageType ( ) ) { case Message . CHECKISOWN : result = handleClientCheckOwn ( msg . getClientId ( ) , ( ( String ) ( msg . getMessageContent ( ) ) ) ) ; break ; case Message . APPLY : result = handleClientApply ( msg . getClientId ( ) , ( ( String ) ( msg . getMessageContent ( ) ) ) ) ; break ; case Message . BROADCAST : System . out . println ( ( "follow<seq2seq4repair_space>get<seq2seq4repair_space>the<seq2seq4repair_space>broadcast..." + ( msg . getMessageContent ( ) ) ) ) ; lockMap . clear ( ) ; Type type = new TypeToken < ConcurrentHashMap < String , String > > ( ) { } . getType ( ) ; Server . lockMap = gson . fromJson ( ( ( String ) ( msg . getMessageContent ( ) ) ) , type ) ; <START_BUG> result = null ; <END_BUG> break ; case Message . RELEASE : result = handleClientRelase ( msg . getClientId ( ) , ( ( String ) ( msg . getMessageContent ( ) ) ) ) ; break ; default : result = "" ; } return result ; } No newline ; at end ; of file ; }

Fix:
result = Message . ECHO_BROADCAST ;
Buggy code:
public class TestTermsEnum2 extends LuceneTestCase { private Directory dir ; private IndexReader reader ; private IndexSearcher searcher ; private SortedSet < BytesRef > terms ; private Automaton termsAutomaton ; int numIterations ; @ Override public void setUp ( ) throws Exception { super . setUp ( ) ; numIterations = atLeast ( 50 ) ; dir = newDirectory ( ) ; RandomIndexWriter writer = new RandomIndexWriter ( random ( ) , dir , newIndexWriterConfig ( TEST_VERSION_CURRENT , new org . apache . lucene . analysis . MockAnalyzer ( random ( ) , MockTokenizer . KEYWORD , false ) ) . setMaxBufferedDocs ( TestUtil . nextInt ( random ( ) , 50 , 1000 ) ) ) ; Document doc = new Document ( ) ; Field field = newStringField ( "field" , "" , YES ) ; doc . add ( field ) ; terms = new TreeSet ( ) ; int num = atLeast ( 200 ) ; for ( int i = 0 ; i < num ; i ++ ) { String s = TestUtil . randomUnicodeString ( random ( ) ) ; field . setStringValue ( s ) ; terms . add ( new BytesRef ( s ) ) ; writer . addDocument ( doc ) ; } termsAutomaton = BasicAutomata . makeStringUnion ( terms ) ; reader = writer . getReader ( ) ; searcher = newSearcher ( reader ) ; <START_BUG> writer . close ( ) ; <END_BUG> } @ Override public void tearDown ( ) throws Exception { } public void testFiniteVersusInfinite ( ) throws Exception { } public void testSeeking ( ) throws Exception { } public void testSeekingAndNexting ( ) throws Exception { } public void testIntersect ( ) throws Exception { } }

Fix:
writer . shutdown ( ) ;
Buggy code:
public class RendererFactory { private Context context ; private MapController mapController ; private Map < Position , Renderer > rendererCache ; public RendererFactory ( Context context , MapController mapController ) { } public Renderer getRenderer ( Position position , float x , float y ) { Renderer renderer = rendererCache . get ( position ) ; if ( renderer == null ) { if ( position instanceof Developer ) { renderer = new DeveloperRenderer ( ( ( Developer ) ( position ) ) , context , mapController , context . getDeveloperCompilerImage ( ) , x , y ) ; } else if ( position instanceof Production ) { renderer = new ProductionRenderer ( ( ( Production ) ( position ) ) , context , mapController , context . getProduction ( ) , x , y ) ; } else { <START_BUG> renderer = new EmptyRenderer ( context ) ; <END_BUG> } rendererCache . put ( position , renderer ) ; if ( ( rendererCache . size ( ) ) > 1000 ) { rendererCache . clear ( ) ; } } return renderer ; } }

Fix:
renderer = new EmptyRenderer ( ) ;
Buggy code:
public class WebServiceSEINoWebParamRuleTest extends AbstractWebServiceSEIRule { @ Override protected Annotation getAnnotation ( ) { } public void testWebServiceSEIPresentNoWebParamRule ( ) { try { assertNotNull ( annotation ) ; assertEquals ( WebParam . class . getSimpleName ( ) , AnnotationUtils . getAnnotationName ( annotation ) ) ; IMethod method = source . findPrimaryType ( ) . getMethod ( "methodOne" , new String [ ] { "QString;" } ) ; assertNotNull ( method ) ; AnnotationUtils . addImportChange ( compilationUnit , WebParam . class , textFileChange , true ) ; SingleVariableDeclaration parameter = AnnotationUtils . getMethodParameter ( compilationUnit , method , 250 ) ; AnnotationUtils . createMethodParameterAnnotationChange ( source , compilationUnit , rewriter , parameter , method , annotation , textFileChange ) ; assertTrue ( executeChange ( new NullProgressMonitor ( ) , textFileChange ) ) ; <START_BUG> parameter = AnnotationUtils . getMethodParameter ( AnnotationUtils . getASTParser ( method . getCompilationUnit ( ) ) , method , 278 ) ; <END_BUG> assertTrue ( AnnotationUtils . isAnnotationPresent ( parameter , annotation ) ) ; Job . getJobManager ( ) . join ( ResourcesPlugin . FAMILY_AUTO_BUILD , null ) ; IMarker [ ] allmarkers = source . getResource ( ) . findMarkers ( IMarker . PROBLEM , true , IResource . DEPTH_INFINITE ) ; assertEquals ( 1 , allmarkers . length ) ; IMarker annotationProblemMarker = allmarkers [ 0 ] ; assertEquals ( source . getResource ( ) , annotationProblemMarker . getResource ( ) ) ; assertEquals ( WEBSERVICE_ENPOINTINTERFACE_NO_WEBPARAM , annotationProblemMarker . getAttribute ( IMarker . MESSAGE ) ) ; } catch ( CoreException ce ) { fail ( ce . getLocalizedMessage ( ) ) ; } catch ( OperationCanceledException oce ) { fail ( oce . getLocalizedMessage ( ) ) ; } catch ( InterruptedException ie ) { fail ( ie . getLocalizedMessage ( ) ) ; } } }

Fix:
parameter = AnnotationUtils . getMethodParameter ( AnnotationUtils . getASTParser ( method . getCompilationUnit ( ) , false ) , method , 278 ) ;
Buggy code:
public class TestSpanRegexQuery extends LuceneTestCase { Directory indexStoreA ; Directory indexStoreB ; @ Override public void setUp ( ) throws Exception { } @ Override public void tearDown ( ) throws Exception { } public void testSpanRegex ( ) throws Exception { Directory directory = newDirectory ( ) ; IndexWriter writer = new IndexWriter ( directory , newIndexWriterConfig ( TEST_VERSION_CURRENT , new org . apache . lucene . analysis . MockAnalyzer ( random ( ) ) ) ) ; Document doc = new Document ( ) ; doc . add ( newTextField ( "field" , "auto<seq2seq4repair_space>update" , NO ) ) ; writer . addDocument ( doc ) ; doc = new Document ( ) ; doc . add ( newTextField ( "field" , "first<seq2seq4repair_space>auto<seq2seq4repair_space>update" , NO ) ) ; writer . addDocument ( doc ) ; writer . forceMerge ( 1 ) ; <START_BUG> writer . close ( ) ; <END_BUG> IndexReader reader = DirectoryReader . open ( directory ) ; IndexSearcher searcher = newSearcher ( reader ) ; SpanQuery srq = new org . apache . lucene . search . spans . SpanMultiTermQueryWrapper ( new RegexQuery ( new Term ( "field" , "aut.*" ) ) ) ; SpanFirstQuery sfq = new SpanFirstQuery ( srq , 1 ) ; int numHits = searcher . search ( sfq , null , 1000 ) . totalHits ; assertEquals ( 1 , numHits ) ; reader . close ( ) ; directory . close ( ) ; } }

Fix:
writer . shutdown ( ) ;
Buggy code:
public final class WicketTagIdentifier extends AbstractMarkupFilter { private static List < String > wellKnownTagNames ; private final MarkupResourceStream markup ; public WicketTagIdentifier ( final MarkupResourceStream markup ) { } public MarkupElement nextTag ( ) throws ParseException { <START_BUG> XmlTag xmlTag = ( ( XmlTag ) ( getParent ( ) . nextTag ( ) ) ) ; <END_BUG> if ( xmlTag == null ) { return xmlTag ; } final String namespace = markup . getWicketNamespace ( ) ; final String wicketIdValue = xmlTag . getAttributes ( ) . getString ( ( namespace + ":id" ) ) ; ComponentTag tag ; if ( namespace . equalsIgnoreCase ( xmlTag . getNamespace ( ) ) ) { tag = new org . apache . wicket . markup . WicketTag ( xmlTag ) ; if ( Strings . isEmpty ( wicketIdValue ) ) { tag . setId ( ( ( "_" + ( tag . getName ( ) ) ) + ( getCount ( ) ) ) ) ; tag . setAutoComponentTag ( true ) ; tag . setModified ( true ) ; } if ( ! ( isWellKnown ( xmlTag ) ) ) { throw new org . apache . wicket . markup . WicketParseException ( ( ( "Unknown<seq2seq4repair_space>tag<seq2seq4repair_space>name<seq2seq4repair_space>with<seq2seq4repair_space>Wicket<seq2seq4repair_space>namespace:<seq2seq4repair_space>'" + ( xmlTag . getName ( ) ) ) + "'.<seq2seq4repair_space>Might<seq2seq4repair_space>be<seq2seq4repair_space>you<seq2seq4repair_space>haven't<seq2seq4repair_space>installed<seq2seq4repair_space>the<seq2seq4repair_space>appropriate<seq2seq4repair_space>resolver?" ) , tag ) ; } } else { tag = new ComponentTag ( xmlTag ) ; } if ( wicketIdValue != null ) { if ( ( wicketIdValue . trim ( ) . length ( ) ) == 0 ) { throw new org . apache . wicket . markup . WicketParseException ( "The<seq2seq4repair_space>wicket:id<seq2seq4repair_space>attribute<seq2seq4repair_space>value<seq2seq4repair_space>must<seq2seq4repair_space>not<seq2seq4repair_space>be<seq2seq4repair_space>empty.<seq2seq4repair_space>May<seq2seq4repair_space>be<seq2seq4repair_space>unmatched<seq2seq4repair_space>quotes?!?" , tag ) ; } tag . setId ( wicketIdValue ) ; } return tag ; } public static final void registerWellKnownTagName ( final String name ) { } private boolean isWellKnown ( final XmlTag xmlTag ) { } }

Fix:
XmlTag xmlTag = ( ( XmlTag ) ( getNextFilter ( ) . nextTag ( ) ) ) ;
Buggy code:
public final class ExpandProperties extends BaseFilterReader implements ChainableReader { private String queuedData = null ; public ExpandProperties ( ) { } public ExpandProperties ( final Reader in ) { } public int read ( ) throws IOException { int ch = - 1 ; if ( ( ( queuedData ) != null ) && ( ( queuedData . length ( ) ) == 0 ) ) { queuedData = null ; } if ( ( queuedData ) != null ) { ch = queuedData . charAt ( 0 ) ; queuedData = queuedData . substring ( 1 ) ; if ( ( queuedData . length ( ) ) == 0 ) { queuedData = null ; } } else { queuedData = readFully ( ) ; <START_BUG> if ( ( queuedData ) == null ) { <END_BUG> ch = - 1 ; } else { Project project = getProject ( ) ; queuedData = project . replaceProperties ( queuedData ) ; return read ( ) ; } } return ch ; } public Reader chain ( final Reader rdr ) { } }

Fix:
if ( ( queuedData . length ( ) ) == 0 ) {
Buggy code:
public class FormTest extends WicketTestCase { private IVisitor visitor ; public FormTest ( String name ) { } protected void setUp ( ) throws Exception { } public void testShouldContinueTraversalIfListenerAllowsChildProcessing ( ) { } public void testShouldContinueTraversalButDontGoDeeperIfListenerDisallowsChildProcessing ( ) { } private void assertTraversalStatus ( Object expected , final boolean processChildren ) { <START_BUG> assertEquals ( expected , visitor . formComponent ( new IFormProcessingListener ( ) { <END_BUG> public boolean processChildren ( ) { return processChildren ; } } ) ) ; } public void testFormMethodGet ( ) throws Exception { } }

Fix:
assertEquals ( expected , visitor . formComponent ( new IFormVisitorParticipant ( ) {
Buggy code:
public class File extends java . io . File implements IModifiable { private static final long serialVersionUID = 1L ; public File ( final File parent , final String child ) { } public File ( final java . io . File parent , final String child ) { } public File ( final java . io . File file ) { } public File ( final String pathname ) { } public File ( final String parent , final String child ) { } public File ( final URI uri ) { } public File file ( final String name ) { } public String getExtension ( ) { } public Folder getParentFolder ( ) { } public InputStream inputStream ( ) throws FileNotFoundException { } public Time lastModifiedTime ( ) { <START_BUG> return Time . valueOf ( lastModified ( ) ) ; <END_BUG> } public OutputStream outputStream ( ) throws FileNotFoundException { } public String readString ( ) throws IOException { } public Object readObject ( ) throws IOException , ClassNotFoundException { } public void writeObject ( final Serializable object ) throws IOException { } public boolean remove ( ) { } public void sync ( ) throws IOException { } public String toQuotedString ( ) { } public int write ( final File file ) throws IOException { } public int write ( final InputStream input ) throws IOException { } public void write ( final String string ) throws IOException { } }

Fix:
return Time . millis ( lastModified ( ) ) ;
Buggy code:
public class SwitchStatement extends Statement { public Expression expression ; public Statement [ ] statements ; public BlockScope scope ; public int explicitDeclarations ; public Label breakLabel ; public CaseStatement [ ] cases ; public CaseStatement defaultCase ; public int caseCount = 0 ; public int blockStart ; int preSwitchInitStateIndex = - 1 ; int mergedInitStateIndex = - 1 ; public SwitchStatement ( ) { } public FlowInfo analyseCode ( BlockScope currentScope , FlowContext flowContext , FlowInfo flowInfo ) { flowInfo = expression . analyseCode ( currentScope , flowContext , flowInfo ) ; SwitchFlowContext switchContext = new SwitchFlowContext ( flowContext , this , ( breakLabel = new Label ( ) ) ) ; <START_BUG> FlowInfo caseInits = FlowInfo . emptyDeadEnd ( ) ; <END_BUG> preSwitchInitStateIndex = currentScope . methodScope ( ) . recordInitializationStates ( flowInfo ) ; int caseIndex = 0 ; if ( ( statements ) != null ) { boolean didAlreadyComplain = false ; for ( int i = 0 , max = statements . length ; i < max ; i ++ ) { Statement statement = statements [ i ] ; if ( ( caseIndex < ( caseCount ) ) && ( statement == ( cases [ caseIndex ] ) ) ) { caseIndex ++ ; caseInits = caseInits . mergedWith ( flowInfo . copy ( ) . unconditionalInits ( ) ) ; didAlreadyComplain = false ; } else if ( statement == ( defaultCase ) ) { caseInits = caseInits . mergedWith ( flowInfo . copy ( ) . unconditionalInits ( ) ) ; didAlreadyComplain = false ; } if ( ! ( statement . complainIfUnreachable ( caseInits , scope , didAlreadyComplain ) ) ) { caseInits = statement . analyseCode ( scope , switchContext , caseInits ) ; } else { didAlreadyComplain = true ; } } } if ( ( defaultCase ) == null ) { flowInfo . addPotentialInitializationsFrom ( caseInits . mergedWith ( switchContext . initsOnBreak ) ) ; mergedInitStateIndex = currentScope . methodScope ( ) . recordInitializationStates ( flowInfo ) ; return flowInfo ; } FlowInfo mergedInfo = caseInits . mergedWith ( switchContext . initsOnBreak ) ; mergedInitStateIndex = currentScope . methodScope ( ) . recordInitializationStates ( mergedInfo ) ; return mergedInfo ; } public void generateCode ( BlockScope currentScope , CodeStream codeStream ) { } public StringBuffer printStatement ( int indent , StringBuffer output ) { } public void resetStateForCodeGeneration ( ) { } public void resolve ( BlockScope upperScope ) { } public void traverse ( IAbstractSyntaxTreeVisitor visitor , BlockScope blockScope ) { } public void branchChainTo ( Label label ) { } }

Fix:
FlowInfo caseInits = FlowInfo . DEAD_END ;
Buggy code:
public class Scripts { private int LEFT = 1 ; private int CENTER = 2 ; private int RIGHT = 3 ; private int [ ] home = new int [ ] { 0 , 90 , 0 , - 90 , 90 } ; private int [ ] restPos = new int [ ] { 0 , 0 , 0 , 0 , 0 } ; private int [ ] killRight = new int [ ] { - 19 , 119 , - 90 , - 147 , 96 } ; private int [ ] killMid = new int [ ] { 6 , 119 , - 90 , - 147 , 96 } ; private int [ ] killLeft = new int [ ] { 39 , 119 , - 90 , - 147 , 96 } ; private int [ ] boop = new int [ ] { - 43 , 119 , - 90 , - 147 , 96 } ; private int [ ] boopLeft = new int [ ] { 79 , 119 , - 90 , - 147 , 96 } ; private GolfBallDeliveryActivity mGolfBallDeliveryActivity ; protected Handler mCommandHandler = new Handler ( ) ; private int ARM_REMOVAL_TIME_MS = 3000 ; public Scripts ( GolfBallDeliveryActivity golfBallDeliveryActivity ) { } public void testStraightDriveScript ( ) { } public void nearBallScript ( ) { Toast . makeText ( mGolfBallDeliveryActivity , "Drive<seq2seq4repair_space>103<seq2seq4repair_space>ft<seq2seq4repair_space>to<seq2seq4repair_space>near<seq2seq4repair_space>ball." , LENGTH_SHORT ) . show ( ) ; double distanceToNearBall = NavUtils . getDistance ( 15 , 0 , 90 , 50 ) ; long driveTimeToNearBallMs = ( ( long ) ( ( distanceToNearBall // ( RobotActivity . DEFAULT_SPEED_FT_PER_SEC ) ) * 1000 ) ) ; driveTimeToNearBallMs = 3000 ; mGolfBallDeliveryActivity . sendWheelSpeed ( mGolfBallDeliveryActivity . mLeftStraightPwmValue , mGolfBallDeliveryActivity . mRightStraightPwmValue ) ; mCommandHandler . postDelayed ( new Runnable ( ) { @ Override public void run ( ) { removeBallAtLocation ( mGolfBallDeliveryActivity . mNearBallLocation ) ; } } , driveTimeToNearBallMs ) ; mCommandHandler . postDelayed ( new Runnable ( ) { @ Override public void run ( ) { if ( ( mGolfBallDeliveryActivity . mState ) == ( State . NEAR_BALL_SCRIPT ) ) { <START_BUG> mGolfBallDeliveryActivity . setState ( DRIVE_TOWARDS_FAR_BALL ) ; <END_BUG> } } } , ( driveTimeToNearBallMs + ( ARM_REMOVAL_TIME_MS ) ) ) ; } public void farBallScript ( ) { } public void removeBallAtLocation ( final int location ) { } private void sendPos ( int [ ] toSend ) { } No newline ; at end ; of file ; }

Fix:
mGolfBallDeliveryActivity . setState ( FAR_BALL_SCRIPT ) ;
Buggy code:
public class ChatroomUpdateDTOTest { public ChatroomUpdateDTOTest ( ) { } @ BeforeClass public static void setUpClass ( ) { } @ AfterClass public static void tearDownClass ( ) { } @ Before public void setUp ( ) { } @ After public void tearDown ( ) { <START_BUG> ChatroomCheckInsideDTO . cleanValidator ( ) ; <END_BUG> } @ Test public void testSomething ( ) throws JsonMappingException , InappropriateValidatorException , NoValidatorsAssignedException , ValidatorNotListedException , IOException { } @ Test public void testAddingPrintingAndRemovingValidators ( ) throws InappropriateValidatorException , ValidatorNotListedException { } private void printList ( ) throws ValidatorNotListedException { } @ Test public void testRegisterRoomAccessMethodValidator ( ) throws Exception { } @ Test public void testRegisterPasswordValidator ( ) throws Exception { } @ Test public void testRegisterRoomNameValidator ( ) throws Exception { } @ Test public void testRegisterRoomPrivilegeValidator ( ) throws Exception { } @ Test public void testRegisterRoomRangeValidator ( ) throws Exception { } @ Test public void testRegisterWrongValidator ( ) { } @ Test public void testRegisterInappropriateValidator ( ) { } @ Test public void testCleanValidator ( ) throws Exception { } @ Test public void testGetValidatorList ( ) throws Exception { } @ Test public void testRemovePasswordValidator ( ) throws Exception { } @ Test public void testRemoveRoomAccessMethodValidator ( ) throws Exception { } @ Test public void testRemoveRoomNameValidator ( ) throws Exception { } @ Test public void testRemoveRangeValidator ( ) throws Exception { } @ Test public void testRemovePrivilegeValidator ( ) throws Exception { } @ Test public void testRemoveValidatorOnZeroSpot ( ) throws Exception { } @ Test public void testRemoveValidatorUsernameNonExist ( ) throws Exception { } @ Test public void testRemoveValidatorRoomnameNonExist ( ) throws Exception { } @ Test public void testRemoveValidatorNotListed ( ) { } @ Test public void testGetValidatorListNotListed ( ) { } @ Test public void testNameGetter ( ) { } @ Test public void testValidateSuccess ( ) throws Exception { } @ Test public void testValidateFailRoomName ( ) throws Exception { } @ Test public void testValidateNewRoomName ( ) throws Exception { } @ Test public void testValidateFailPrivilege ( ) throws Exception { } @ Test public void testValidateFailRoomAccessMethod ( ) throws Exception { } @ Test public void testValidateFailPassword ( ) throws Exception { } @ Test public void testValidateFailPasswordProtection ( ) throws Exception { } @ Test public void testValidateFailRange ( ) throws Exception { } }

Fix:
ChatroomUpdateDTO . cleanValidator ( ) ;
Buggy code:
public class MergeCuboidMapper extends Mapper < Text , Text , Text , Text > { private KylinConfig config ; private String cubeName ; private String segmentName ; private CubeManager cubeManager ; private CubeInstance cube ; private CubeDesc cubeDesc ; private CubeSegment mergedCubeSegment ; private CubeSegment sourceCubeSegment ; private Text outputKey = new Text ( ) ; private byte [ ] newKeyBuf ; private RowKeySplitter rowKeySplitter ; private HashMap < TblColRef , Boolean > dictsNeedMerging = new HashMap < TblColRef , Boolean > ( ) ; private static final Pattern JOB_NAME_PATTERN = Pattern . compile ( "kylin-([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})" ) ; private Boolean checkNeedMerging ( TblColRef col ) throws IOException { } private String extractJobIDFromPath ( String path ) { } private CubeSegment findSegmentWithUuid ( String jobID , CubeInstance cubeInstance ) { for ( CubeSegment segment : cubeInstance . getSegments ( ) ) { <START_BUG> if ( segment . getUuid ( ) . equalsIgnoreCase ( jobID ) ) { <END_BUG> return segment ; } } throw new IllegalStateException ( ( "No<seq2seq4repair_space>merging<seq2seq4repair_space>segment's<seq2seq4repair_space>last<seq2seq4repair_space>build<seq2seq4repair_space>job<seq2seq4repair_space>ID<seq2seq4repair_space>equals<seq2seq4repair_space>" + jobID ) ) ; } @ Override protected void setup ( Context context ) throws IOException , InterruptedException { } @ Override public void map ( Text key , Text value , Context context ) throws IOException , InterruptedException { } }

Fix:
if ( segment . getLastBuildJobID ( ) . equalsIgnoreCase ( jobID ) ) {
Buggy code:
public class FunctionReference extends SpelNodeImpl { private final String name ; private Method method ; private boolean argumentConversionOccurred ; public FunctionReference ( String functionName , int pos , SpelNodeImpl ... arguments ) { } @ Override public TypedValue getValueInternal ( ExpressionState state ) throws EvaluationException { } private TypedValue executeFunctionJLRMethod ( ExpressionState state , Method method ) throws EvaluationException { } @ Override public String toStringAST ( ) { } private Object [ ] getArguments ( ExpressionState state ) throws EvaluationException { } @ Override public boolean isCompilable ( ) { } @ Override public void generateCode ( MethodVisitor mv , CodeFlow cf ) { String methodDeclaringClassSlashedDescriptor = this . method . getDeclaringClass ( ) . getName ( ) . replace ( '.' , '//' ) ; <START_BUG> CodeFlow . generateCodeForArguments ( mv , cf , method , this . children ) ; <END_BUG> mv . visitMethodInsn ( INVOKESTATIC , methodDeclaringClassSlashedDescriptor , this . method . getName ( ) , CodeFlow . createSignatureDescriptor ( this . method ) , false ) ; cf . pushDescriptor ( this . exitTypeDescriptor ) ; } }

Fix:
generateCodeForArguments ( mv , cf , method , this . children ) ;
Buggy code:
public class Robot extends IterativeRobot { public static OI oi ; public static DriveTrain dt ; public static Elevator elevator ; public static Camera camera ; public static Intake intake ; public static Compressor comp ; public static DataLogger totalCurrentLogger = new DataLogger ( "Total<seq2seq4repair_space>Current" , 100 ) ; public static DataLogger leftMotorCurrentLogger = new DataLogger ( "Left<seq2seq4repair_space>Motor<seq2seq4repair_space>Current" , 100 ) ; public static PowerDistributionPanel pdp = new PowerDistributionPanel ( ) ; public static Timer timer = new Timer ( ) ; Command autonomousCommand ; public void robotInit ( ) { } public void disabledPeriodic ( ) { } public void autonomousInit ( ) { } public void autonomousPeriodic ( ) { } public void teleopInit ( ) { if ( ( autonomousCommand ) != null ) autonomousCommand . cancel ( ) ; Robot . dt . zeroGyro ( ) ; <START_BUG> Robot . comp . start ( ) ; <END_BUG> } public void disabledInit ( ) { } public void teleopPeriodic ( ) { } public void testPeriodic ( ) { } }

Fix:
Robot . comp . setClosedLoopControl ( true ) ;
Buggy code:
public final class Font { public int handle ; Device device ; Font ( ) { } public Font ( Device device , FontData fd ) { } public Font ( Device device , FontData [ ] fds ) { } public Font ( Device device , String name , int height , int style ) { } public void dispose ( ) { } public boolean equals ( Object object ) { } public FontData [ ] getFontData ( ) { if ( isDisposed ( ) ) SWT . error ( ERROR_GRAPHIC_DISPOSED ) ; LOGFONT logFont = ( OS . IsUnicode ) ? ( ( LOGFONT ) ( new LOGFONTW ( ) ) ) : new LOGFONTA ( ) ; OS . GetObject ( handle , sizeof , logFont ) ; <START_BUG> return new FontData [ ] { FontData . win32_new ( logFont , device . computePoints ( logFont ) ) } ; <END_BUG> } public int hashCode ( ) { } void init ( Device device , FontData fd ) { } public boolean isDisposed ( ) { } public String toString ( ) { } public static Font win32_new ( Device device , int handle ) { } }

Fix:
return new FontData [ ] { FontData . win32_new ( logFont , device . computePoints ( logFont , handle ) ) } ;
Buggy code:
@ RunWith ( SpringJUnit4ClassRunner . class ) @ ContextConfiguration ( locations = "//spring//ServiceTest-context.xml" ) @ Transactional public final class TypesServiceTest { @ Resource Contract typesService ; @ Test public void shouldGetType ( ) { } @ Test public void shouldPersistTypes ( ) { final ExtId . Type type1 = Type . newBuilder ( ) . setId ( 10 ) . setName ( "PAPER_BOOK" ) . build ( ) ; final ExtId . Type type2 = Type . newBuilder ( ) . setName ( "MOVIE" ) . build ( ) ; typesService . saveType ( type1 ) ; typesService . saveType ( type2 ) ; <START_BUG> assertEquals ( Arrays . asList ( type1 , Type . newBuilder ( ) . setId ( 11 ) . setName ( "PERSON" ) . build ( ) , Type . newBuilder ( type2 ) . setId ( 50 ) . build ( ) ) , typesService . getTypes ( ) ) ; <END_BUG> } }

Fix:
assertEquals ( Arrays . asList ( type1 , Type . newBuilder ( ) . setId ( 11 ) . setName ( "PERSON" ) . build ( ) , Type . newBuilder ( type2 ) . setId ( 1000000 ) . build ( ) ) , typesService . getTypes ( ) ) ;
Buggy code:
public class ShowFAQAction extends AbstractColumbaAction { public ShowFAQAction ( FrameMediator frameMediator ) { } public void actionPerformed ( ActionEvent evt ) { URLController c = new URLController ( ) ; try { <START_BUG> c . open ( new URL ( "http:////columba.sourceforge.net//faq_user.php" ) ) ; <END_BUG> } catch ( MalformedURLException mue ) { } } }

Fix:
c . open ( new URL ( "http:////columba.sourceforge.net//index.php?option=com_content&task=section&id=3&Itemid=40" ) ) ;
Buggy code:
public class TestBooleanMinShouldMatch extends LuceneTestCase { public Directory index ; public IndexReader r ; public IndexSearcher s ; public void setUp ( ) throws Exception { super . setUp ( ) ; String [ ] data = new String [ ] { "A<seq2seq4repair_space>1<seq2seq4repair_space>2<seq2seq4repair_space>3<seq2seq4repair_space>4<seq2seq4repair_space>5<seq2seq4repair_space>6" , "Z<seq2seq4repair_space>4<seq2seq4repair_space>5<seq2seq4repair_space>6" , null , "B<seq2seq4repair_space>2<seq2seq4repair_space>4<seq2seq4repair_space>5<seq2seq4repair_space>6" , "Y<seq2seq4repair_space>3<seq2seq4repair_space>5<seq2seq4repair_space>6" , null , "C<seq2seq4repair_space>3<seq2seq4repair_space>6" , "X<seq2seq4repair_space>4<seq2seq4repair_space>5<seq2seq4repair_space>6" } ; index = new RAMDirectory ( ) ; IndexWriter writer = new IndexWriter ( index , new WhitespaceAnalyzer ( ) , true , MaxFieldLength . LIMITED ) ; for ( int i = 0 ; i < ( data . length ) ; i ++ ) { Document doc = new Document ( ) ; doc . add ( new org . apache . lucene . document . Field ( "id" , String . valueOf ( i ) , Store . YES , Index . NOT_ANALYZED ) ) ; doc . add ( new org . apache . lucene . document . Field ( "all" , "all" , Store . YES , Index . NOT_ANALYZED ) ) ; if ( null != ( data [ i ] ) ) { doc . add ( new org . apache . lucene . document . Field ( "data" , data [ i ] , Store . YES , Index . ANALYZED ) ) ; } writer . addDocument ( doc ) ; } writer . optimize ( ) ; writer . close ( ) ; <START_BUG> r = IndexReader . open ( index ) ; <END_BUG> s = new IndexSearcher ( r ) ; } public void verifyNrHits ( Query q , int expected ) throws Exception { } public void testAllOptional ( ) throws Exception { } public void testOneReqAndSomeOptional ( ) throws Exception { } public void testSomeReqAndSomeOptional ( ) throws Exception { } public void testOneProhibAndSomeOptional ( ) throws Exception { } public void testSomeProhibAndSomeOptional ( ) throws Exception { } public void testOneReqOneProhibAndSomeOptional ( ) throws Exception { } public void testSomeReqOneProhibAndSomeOptional ( ) throws Exception { } public void testOneReqSomeProhibAndSomeOptional ( ) throws Exception { } public void testSomeReqSomeProhibAndSomeOptional ( ) throws Exception { } public void testMinHigherThenNumOptional ( ) throws Exception { } public void testMinEqualToNumOptional ( ) throws Exception { } public void testOneOptionalEqualToMin ( ) throws Exception { } public void testNoOptionalButMin ( ) throws Exception { } public void testNoOptionalButMin2 ( ) throws Exception { } public void testRandomQueries ( ) throws Exception { } protected void printHits ( String test , ScoreDoc [ ] h , Searcher searcher ) throws Exception { } }

Fix:
r = IndexReader . open ( index , true ) ;
Buggy code:
public class ExecTask extends Task { private String os ; private File out ; private File dir ; protected boolean failOnError = false ; protected boolean newEnvironment = false ; private Long timeout = null ; private Environment env = new Environment ( ) ; protected Commandline cmdl = new Commandline ( ) ; private FileOutputStream fos = null ; private ByteArrayOutputStream baos = null ; private String outputprop ; private String resultProperty ; private boolean failIfExecFails = true ; private boolean append = false ; private boolean vmLauncher = true ; public void setTimeout ( Long value ) { } public void setTimeout ( Integer value ) { } public void setExecutable ( String value ) { } public void setDir ( File d ) { } public void setOs ( String os ) { } public void setCommand ( Commandline cmdl ) { } public void setOutput ( File out ) { } public void setOutputproperty ( String outputprop ) { } public void setFailonerror ( boolean fail ) { } public void setNewenvironment ( boolean newenv ) { } public void addEnv ( Environment . Variable var ) { } public Argument createArg ( ) { } public void setResultProperty ( String resultProperty ) { } protected void maybeSetResultPropertyValue ( int result ) { } public void setFailIfExecutionFails ( boolean flag ) { } public void setAppend ( boolean append ) { } public void execute ( ) throws BuildException { } protected void checkConfiguration ( ) throws BuildException { } protected boolean isValidOs ( ) { } public void setVMLauncher ( boolean vmLauncher ) { } protected Execute prepareExec ( ) throws BuildException { } protected final void runExecute ( Execute exe ) throws IOException { int err = - 1 ; err = exe . execute ( ) ; if ( exe . killedProcess ( ) ) { log ( "Timeout:<seq2seq4repair_space>killed<seq2seq4repair_space>the<seq2seq4repair_space>sub-process" , MSG_WARN ) ; } maybeSetResultPropertyValue ( err ) ; if ( err != 0 ) { if ( failOnError ) { throw new BuildException ( ( ( ( taskType ) + "<seq2seq4repair_space>returned:<seq2seq4repair_space>" ) + err ) , location ) ; } else { log ( ( "Result:<seq2seq4repair_space>" + err ) , MSG_ERR ) ; } } if ( ( baos ) != null ) { <START_BUG> BufferedReader in = new BufferedReader ( new StringReader ( baos . toString ( ) ) ) ; <END_BUG> String line = null ; StringBuffer val = new StringBuffer ( ) ; while ( ( line = in . readLine ( ) ) != null ) { if ( ( val . length ( ) ) != 0 ) { val . append ( LINE_SEP ) ; } val . append ( line ) ; } project . setNewProperty ( outputprop , val . toString ( ) ) ; } } protected void runExec ( Execute exe ) throws BuildException { } protected ExecuteStreamHandler createHandler ( ) throws BuildException { } protected ExecuteWatchdog createWatchdog ( ) throws BuildException { } protected void logFlush ( ) { } }

Fix:
BufferedReader in = new BufferedReader ( new StringReader ( Execute . toString ( baos ) ) ) ;
Buggy code:
public final class ComponentInstallProcessor implements DeploymentUnitProcessor { private static final Logger logger = Logger . getLogger ( ComponentInstallProcessor . class ) ; public void deploy ( final DeploymentPhaseContext phaseContext ) throws DeploymentUnitProcessingException { final DeploymentUnit deploymentUnit = phaseContext . getDeploymentUnit ( ) ; final Module module = deploymentUnit . getAttachment ( MODULE ) ; if ( module == null ) { return ; } final EEModuleConfiguration moduleDescription = deploymentUnit . getAttachment ( Attachments . EE_MODULE_CONFIGURATION ) ; final Set < ServiceName > dependencies = deploymentUnit . getAttachment ( JNDI_DEPENDENCIES ) ; final ServiceName bindingDependencyService = JndiNamingDependencyProcessor . serviceName ( deploymentUnit ) ; <START_BUG> for ( ComponentConfiguration configuration : moduleDescription . getComponentConfigurations ( ) ) { <END_BUG> try { ComponentInstallProcessor . logger . tracef ( "Installing<seq2seq4repair_space>component<seq2seq4repair_space>%s" , configuration . getComponentClass ( ) . getName ( ) ) ; deployComponent ( phaseContext , configuration , dependencies , bindingDependencyService ) ; } catch ( Exception e ) { throw new DeploymentUnitProcessingException ( ( "Failed<seq2seq4repair_space>to<seq2seq4repair_space>install<seq2seq4repair_space>component<seq2seq4repair_space>" + ( configuration . getComponentName ( ) ) ) , e ) ; } } } protected void deployComponent ( final DeploymentPhaseContext phaseContext , final ComponentConfiguration configuration , final Set < ServiceName > dependencies , final ServiceName bindingDependencyService ) throws DeploymentUnitProcessingException { } private void processBindings ( DeploymentPhaseContext phaseContext , ComponentConfiguration configuration , ServiceTarget serviceTarget , ServiceName contextServiceName , InjectionSource . ResolutionContext resolutionContext , List < BindingConfiguration > bindings , final Set < ServiceName > dependencies , final Set < ServiceName > bound ) throws DeploymentUnitProcessingException { } public void undeploy ( final DeploymentUnit context ) { } }

Fix:
for ( final ComponentConfiguration configuration : moduleDescription . getComponentConfigurations ( ) ) {
Buggy code:
public class StringResourceModel extends LoadableDetachableModel < String > implements IComponentAssignedModel < String > { private static final long serialVersionUID = 1L ; private transient Locale locale ; private transient Localizer localizer ; private final IModel < ? > model ; private final Object [ ] parameters ; private Component component ; private final String resourceKey ; private final String defaultValue ; public IWrapModel < String > wrapOnAssignment ( Component component ) { } private class AssignmentWrapper implements IWrapModel < String > { private static final long serialVersionUID = 1L ; private final Component component ; public AssignmentWrapper ( Component component ) { } public void detach ( ) { } public String getObject ( ) { } public void setObject ( String object ) { } public IModel < String > getWrappedModel ( ) { } } public StringResourceModel ( final String resourceKey , final Component component , final IModel < ? > model ) { } public StringResourceModel ( final String resourceKey , final Component component , final IModel < ? > model , final String defaultValue ) { } public StringResourceModel ( final String resourceKey , final Component component , final IModel < ? > model , final Object [ ] parameters ) { } public StringResourceModel ( final String resourceKey , final Component component , final IModel < ? > model , final Object [ ] parameters , final String defaultValue ) { } public StringResourceModel ( final String resourceKey , final IModel < ? > model ) { } public StringResourceModel ( final String resourceKey , final IModel < ? > model , final String defaultValue ) { } public StringResourceModel ( final String resourceKey , final IModel < ? > model , final Object [ ] parameters ) { } public StringResourceModel ( final String resourceKey , final IModel < ? > model , final Object [ ] parameters , final String defaultValue ) { } public Localizer getLocalizer ( ) { } public final String getString ( ) { } public final void setLocalizer ( final Localizer localizer ) { } @ Override public String toString ( ) { <START_BUG> StringBuffer sb = new StringBuffer ( "StringResourceModel[" ) ; <END_BUG> sb . append ( "key:" ) ; sb . append ( resourceKey ) ; sb . append ( ",default:" ) ; sb . append ( defaultValue ) ; sb . append ( ",params:" ) ; if ( ( parameters ) != null ) { sb . append ( Arrays . asList ( parameters ) ) ; } sb . append ( "]" ) ; return sb . toString ( ) ; } protected Object [ ] getParameters ( ) { } protected final String getResourceKey ( ) { } @ Override protected String load ( ) { } @ Override protected final void onDetach ( ) { } @ Override public void setObject ( String object ) { } }

Fix:
StringBuilder sb = new StringBuilder ( "StringResourceModel[" ) ;
Buggy code:
public class TestTermVectorsReader extends LuceneTestCase { private String [ ] testFields = new String [ ] { "f1" , "f2" , "f3" , "f4" } ; private boolean [ ] testFieldsStorePos = new boolean [ ] { true , false , true , false } ; private boolean [ ] testFieldsStoreOff = new boolean [ ] { true , false , false , true } ; private String [ ] testTerms = new String [ ] { "this" , "is" , "a" , "test" } ; private int [ ] [ ] positions = new int [ testTerms . length ] [ ] ; private Directory dir ; private SegmentInfoPerCommit seg ; private FieldInfos fieldInfos = new FieldInfos ( new FieldInfo [ 0 ] ) ; private static int TERM_FREQ = 3 ; private class TestToken implements Comparable < TestTermVectorsReader . TestToken > { String text ; int pos ; int startOffset ; int endOffset ; public int compareTo ( TestTermVectorsReader . TestToken other ) { } } TestTermVectorsReader . TestToken [ ] tokens = new TestTermVectorsReader . TestToken [ ( testTerms . length ) * ( TestTermVectorsReader . TERM_FREQ ) ] ; @ Override public void setUp ( ) throws Exception { } @ Override public void tearDown ( ) throws Exception { } private class MyTokenizer extends Tokenizer { private int tokenUpto ; private final CharTermAttribute termAtt ; private final PositionIncrementAttribute posIncrAtt ; private final OffsetAttribute offsetAtt ; public MyTokenizer ( Reader reader ) { } @ Override public boolean incrementToken ( ) { } @ Override public void reset ( ) throws IOException { } } private class MyAnalyzer extends Analyzer { @ Override public TokenStreamComponents createComponents ( String fieldName , Reader reader ) { } } public void test ( ) throws IOException { } public void testReader ( ) throws IOException { } public void testDocsEnum ( ) throws IOException { TermVectorsReader reader = Codec . getDefault ( ) . termVectorsFormat ( ) . vectorsReader ( dir , seg . info , fieldInfos , newIOContext ( random ( ) ) ) ; for ( int j = 0 ; j < 5 ; j ++ ) { Terms vector = reader . get ( j ) . terms ( testFields [ 0 ] ) ; assertNotNull ( vector ) ; assertEquals ( testTerms . length , vector . size ( ) ) ; TermsEnum termsEnum = vector . iterator ( null ) ; DocsEnum docsEnum = null ; for ( int i = 0 ; i < ( testTerms . length ) ; i ++ ) { final BytesRef text = termsEnum . next ( ) ; assertNotNull ( text ) ; String term = text . utf8ToString ( ) ; assertEquals ( testTerms [ i ] , term ) ; <START_BUG> docsEnum = _TestUtil . docs ( random ( ) , termsEnum , null , docsEnum , false ) ; <END_BUG> assertNotNull ( docsEnum ) ; int doc = docsEnum . docID ( ) ; assertTrue ( ( ( doc == ( - 1 ) ) || ( doc == ( DocIdSetIterator . NO_MORE_DOCS ) ) ) ) ; assertTrue ( ( ( docsEnum . nextDoc ( ) ) != ( DocIdSetIterator . NO_MORE_DOCS ) ) ) ; assertEquals ( NO_MORE_DOCS , docsEnum . nextDoc ( ) ) ; } assertNull ( termsEnum . next ( ) ) ; } reader . close ( ) ; } public void testPositionReader ( ) throws IOException { } public void testOffsetReader ( ) throws IOException { } public void testBadParams ( ) throws IOException { } }

Fix:
docsEnum = _TestUtil . docs ( random ( ) , termsEnum , null , docsEnum , 0 ) ;
Buggy code:
public abstract class SessionFacade { private Map sessionIdToSessionStore = Collections . synchronizedMap ( new HashMap ( ) ) ; public abstract void bind ( Request request , Session newSession ) { } public abstract String getSessionId ( Request request ) { } public final Session getSession ( Request request ) { } public final ISessionStore getSessionStore ( Request request ) { } protected abstract ISessionStore newSessionStore ( String sessionId ) { } protected abstract Session lookup ( Request request ) { } protected final void unbind ( String applicationKey , String sessionId ) { onUnbind ( applicationKey , sessionId ) ; <START_BUG> ISessionStore sessionStore = getSessionStore ( sessionId ) ; <END_BUG> sessionStore . destroy ( ) ; } protected void onUnbind ( String applicationKey , String sessionId ) { } private final ISessionStore getSessionStore ( String sessionId ) { } }

Fix:
ISessionStore sessionStore = ( ( ISessionStore ) ( sessionIdToSessionStore . remove ( sessionId ) ) ) ;
Buggy code:
public class FSDirectory extends Directory { private static final Hashtable DIRECTORIES = new Hashtable ( ) ; private static boolean disableLocks = false ; public static void setDisableLocks ( boolean doDisableLocks ) { } public static boolean getDisableLocks ( ) { } public static final String LOCK_DIR = System . getProperty ( "org.apache.lucene.lockDir" , System . getProperty ( "java.io.tmpdir" ) ) ; private static Class IMPL ; private static MessageDigest DIGESTER ; private byte [ ] buffer = null ; public static FSDirectory getDirectory ( String path ) throws IOException { } public static FSDirectory getDirectory ( String path , LockFactory lockFactory ) throws IOException { } public static FSDirectory getDirectory ( File file ) throws IOException { } public static FSDirectory getDirectory ( File file , LockFactory lockFactory ) throws IOException { } public static FSDirectory getDirectory ( String path , boolean create ) throws IOException { } public static FSDirectory getDirectory ( File file , boolean create ) throws IOException { } private void create ( ) throws IOException { if ( directory . exists ( ) ) { String [ ] files = directory . list ( IndexFileNameFilter . getFilter ( ) ) ; if ( files == null ) <START_BUG> throw new IOException ( ( "Cannot<seq2seq4repair_space>read<seq2seq4repair_space>directory<seq2seq4repair_space>" + ( directory . getAbsolutePath ( ) ) ) ) ; <END_BUG> for ( int i = 0 ; i < ( files . length ) ; i ++ ) { File file = new File ( directory , files [ i ] ) ; if ( ! ( file . delete ( ) ) ) throw new IOException ( ( "Cannot<seq2seq4repair_space>delete<seq2seq4repair_space>" + file ) ) ; } } lockFactory . clearLock ( WRITE_LOCK_NAME ) ; } private File directory = null ; private int refCount ; protected FSDirectory ( ) { } private void init ( File path , LockFactory lockFactory ) throws IOException { } public String [ ] list ( ) { } public boolean fileExists ( String name ) { } public long fileModified ( String name ) { } public static long fileModified ( File directory , String name ) { } public void touchFile ( String name ) { } public long fileLength ( String name ) { } public void deleteFile ( String name ) throws IOException { } public synchronized void renameFile ( String from , String to ) throws IOException { } public IndexOutput createOutput ( String name ) throws IOException { } public IndexInput openInput ( String name ) throws IOException { } private static final char [ ] HEX_DIGITS = new char [ ] { '0' , '1' , '2' , '3' , '4' , '5' , '6' , '7' , '8' , '9' , 'a' , 'b' , 'c' , 'd' , 'e' , 'f' } ; public String getLockID ( ) { } public synchronized void close ( ) { } public File getFile ( ) { } public String toString ( ) { } }

Fix:
throw new IOException ( ( ( "cannot<seq2seq4repair_space>read<seq2seq4repair_space>directory<seq2seq4repair_space>" + ( directory . getAbsolutePath ( ) ) ) + ":<seq2seq4repair_space>list()<seq2seq4repair_space>returned<seq2seq4repair_space>null" ) ) ;
Buggy code:
public class SampleAction { private String firstName ; private String lastName ; public SampleAction ( ) { } public SampleAction ( final String firstName , final String lastName ) { } public final boolean checkParameter ( final HttpServletRequest request ) { firstName = request . getParameter ( "FirstName" ) ; if ( ( ( firstName ) == null ) || ( "" . equals ( firstName ) ) ) { return false ; } lastName = request . getParameter ( "LastName" ) ; if ( ( ( lastName ) == null ) || ( "" . equals ( lastName ) ) ) { <START_BUG> return true ; <END_BUG> } return true ; } public final String execute ( final HttpServletRequest request ) { } }

Fix:
return false ;