nus-yam/ex-repair huggingface dataset:
Buggy code:
public abstract class AbstractListenerService < T > implements Service < T > { protected static final OptionMap SERVER_OPTIONS = OptionMap . builder ( ) . set ( TCP_NODELAY , true ) . set ( REUSE_ADDRESSES , true ) . getMap ( ) ; protected final InjectedValue < XnioWorker > worker = new InjectedValue ( ) ; protected final InjectedValue < SocketBinding > binding = new InjectedValue ( ) ; protected final InjectedValue < Pool > bufferPool = new InjectedValue ( ) ; protected final InjectedValue < Server > serverService = new InjectedValue ( ) ; private final String name ; protected volatile OpenListener openListener ; protected AbstractListenerService ( String name ) { } public InjectedValue < XnioWorker > getWorker ( ) { } public InjectedValue < SocketBinding > getBinding ( ) { } public InjectedValue < Pool > getBufferPool ( ) { } public InjectedValue < Server > getServerService ( ) { } protected int getBufferSize ( ) { <START_BUG> return 1024 ; <END_BUG> } public String getName ( ) { } public abstract boolean isSecure ( ) { } protected void registerBinding ( ) { } protected void unregisterBinding ( ) { } @ Override public void start ( StartContext context ) throws StartException { } @ Override public void stop ( StopContext context ) { } protected abstract OpenListener createOpenListener ( ) { } abstract void startListening ( XnioWorker worker , InetSocketAddress socketAddress , ChannelListener < AcceptingChannel < StreamConnection > > acceptListener ) throws IOException { } abstract void stopListening ( ) { } private static class ListenerBinding implements ManagedBinding { private final SocketBinding binding ; private ListenerBinding ( final SocketBinding binding ) { } @ Override public String getSocketBindingName ( ) { } @ Override public InetSocketAddress getBindAddress ( ) { } @ Override public void close ( ) throws IOException { } } }

Fix:
return 8192 ;
Buggy code:
@ Service @ Transactional public class AuthServiceImpl implements AuthService { @ Autowired private UserPropertiesRepository userPropertiesRepository ; @ Autowired private UserRepository userRepository ; @ Autowired private PropertiesRepository propertiesRepository ; @ Autowired private UserAuthRepository userAuthRepository ; @ Autowired private TextRepository textRepository ; @ Override public UserProperties findByUserId ( String userId ) { } @ Override public Result sendAuthCodeByPhone ( String userId , String phone ) { } @ Override public Result authPhone ( String userId , String phone , String validCode ) { } @ Override public Result authIdentify ( String userId , String realName , String idType , String idNumber ) { Result result = new Result ( ) ; User user = userRepository . findOne ( userId ) ; UserProperties userPro_c = userPropertiesRepository . findByIdNumberAndIdTypeAndAuthName ( idNumber , idType , PASS ) ; if ( userPro_c != null ) { <START_BUG> if ( ( userPro_c . getUser ( ) . getId ( ) ) != userId ) { <END_BUG> result . setType ( FAILURE ) ; result . addMessage ( App . message ( "result.failure.id.occupy" , null ) ) ; } } else { String res = idInterface ( realName , idType , idNumber ) ; UserProperties userPro_u = userPropertiesRepository . findByUser ( user ) ; userPro_u . setRealName ( realName ) ; userPro_u . setIdType ( idType ) ; userPro_u . setIdNumber ( idNumber ) ; userPro_u . setUpdateTime ( new Date ( ) ) ; if ( res == "3" ) { userPro_u . setAuthName ( PASS ) ; result . setType ( SUCCESS ) ; } else { userPro_u . setAuthName ( Auth . FAILURE ) ; result . setType ( FAILURE ) ; result . addMessage ( App . message ( "result.failure.id" , null ) ) ; } userPropertiesRepository . save ( userPro_u ) ; } return result ; } @ Override public boolean isAuth ( String code ) { } public void sendSms ( String phone , String validateCode ) { } private String idInterface ( String realName , String idType , String idNumber ) { } }

Fix:
if ( ! ( userPro_c . getUser ( ) . getId ( ) . equals ( userId ) ) ) {
Buggy code:
class GenericOutboundConnectionAdd extends AbstractOutboundConnectionAddHandler { static final GenericOutboundConnectionAdd INSTANCE = new GenericOutboundConnectionAdd ( ) ; static ModelNode getAddOperation ( final String connectionName , final String uri , PathAddress address ) { } private GenericOutboundConnectionAdd ( ) { } @ Override protected void populateModel ( ModelNode operation , ModelNode model ) throws OperationFailedException { } @ Override protected void performRuntime ( OperationContext context , ModelNode operation , ModelNode model , ServiceVerificationHandler verificationHandler , List < ServiceController < ? > > newControllers ) throws OperationFailedException { } ServiceController installRuntimeService ( final OperationContext context , final ModelNode operation , final ModelNode fullModel , ServiceVerificationHandler verificationHandler ) throws OperationFailedException { final PathAddress pathAddress = PathAddress . pathAddress ( operation . require ( OP_ADDR ) ) ; final String connectionName = pathAddress . getLastElement ( ) . getValue ( ) ; final OptionMap connectionCreationOptions = ConnectorResource . getOptions ( fullModel . get ( PROPERTY ) ) ; final URI uri = getDestinationURI ( context , operation ) ; final GenericOutboundConnectionService outboundRemotingConnectionService = new GenericOutboundConnectionService ( connectionName , uri , connectionCreationOptions ) ; final ServiceName serviceName = OUTBOUND_CONNECTION_BASE_SERVICE_NAME . append ( connectionName ) ; final ServiceName aliasServiceName = GENERIC_OUTBOUND_CONNECTION_BASE_SERVICE_NAME . append ( connectionName ) ; <START_BUG> final ServiceBuilder < GenericOutboundConnectionService > svcBuilder = context . getServiceTarget ( ) . addService ( serviceName , outboundRemotingConnectionService ) . addAliases ( aliasServiceName ) . addDependency ( SUBSYSTEM_ENDPOINT , Endpoint . class , outboundRemotingConnectionService . getEnpointInjector ( ) ) ; <END_BUG> if ( verificationHandler != null ) { svcBuilder . addListener ( verificationHandler ) ; } return svcBuilder . install ( ) ; } URI getDestinationURI ( final OperationContext context , final ModelNode outboundConnection ) throws OperationFailedException { } }

Fix:
final ServiceBuilder < GenericOutboundConnectionService > svcBuilder = context . getServiceTarget ( ) . addService ( serviceName , outboundRemotingConnectionService ) . addAliases ( aliasServiceName ) . addDependency ( SUBSYSTEM_ENDPOINT , Endpoint . class , outboundRemotingConnectionService . getEndpointInjector ( ) ) ;
Buggy code:
public class LoggingTestRunner extends BlockJUnit4ClassRunner { public LoggingTestRunner ( Class < ? > klass ) throws InitializationError { } protected EachTestNotifier makeNotifier ( FrameworkMethod method , RunNotifier notifier ) { <START_BUG> System . err . println ( ( ( ( ( "=====<seq2seq4repair_space>Test<seq2seq4repair_space>" + ( getTestClass ( ) . getJavaClass ( ) . getSimpleName ( ) ) ) + "." ) + ( testName ( method ) ) ) + "<seq2seq4repair_space>===========" ) ) ; <END_BUG> return super . makeNotifier ( method , notifier ) ; } }

Fix:
System . err . println ( ( ( ( ( "\n=====<seq2seq4repair_space>Test<seq2seq4repair_space>" + ( getTestClass ( ) . getJavaClass ( ) . getSimpleName ( ) ) ) + "." ) + ( testName ( method ) ) ) + "<seq2seq4repair_space>===========" ) ) ;
Buggy code:
public class GeoPagingTest extends AbstractRestIT { private static Logger log = LoggerFactory . getLogger ( GeoPagingTest . class ) ; @ Test public void groupQueriesWithGeoPaging ( ) throws IOException { } @ Test public void testFarAwayLocationFromCenter ( ) throws IOException { } @ Test public void groupQueriesWithConsistentResults ( ) throws IOException { int maxRangeLimit = 20 ; Entity [ ] saved = new Entity [ maxRangeLimit ] ; Entity actor = new Entity ( ) ; actor . put ( "displayName" , "Erin" ) ; actor . put ( "location" , new HashMapBuilder < String , Double > ( ) . map ( "latitude" , 37.0 ) . map ( "longitude" , ( - 75.0 ) ) ) ; Entity props = new Entity ( ) ; props . put ( "actor" , actor ) ; props . put ( "verb" , "go" ) ; props . put ( "content" , "bragh" ) ; for ( int i = 0 ; i < 20 ; i ++ ) { String newPath = String . format ( ( "//kero" + i ) ) ; props . put ( "path" , newPath ) ; props . put ( "ordinal" , i ) ; saved [ i ] = this . app ( ) . collection ( "groups" ) . post ( props ) ; } this . refreshIndex ( ) ; QueryParameters params = new QueryParameters ( ) ; for ( int consistent = 0 ; consistent < 20 ; consistent ++ ) { String query = String . format ( "select<seq2seq4repair_space>*<seq2seq4repair_space>where<seq2seq4repair_space>location<seq2seq4repair_space>within<seq2seq4repair_space>100<seq2seq4repair_space>of<seq2seq4repair_space>37,<seq2seq4repair_space>-75<seq2seq4repair_space>and<seq2seq4repair_space>ordinal<seq2seq4repair_space>>=<seq2seq4repair_space>%d<seq2seq4repair_space>and<seq2seq4repair_space>ordinal<seq2seq4repair_space><<seq2seq4repair_space>%d" , saved [ 7 ] . get ( "ordinal" ) , saved [ 10 ] . get ( "ordinal" ) ) ; params . setQuery ( query ) ; Collection collection = this . app ( ) . collection ( "groups" ) . get ( params ) ; assertEquals ( 3 , collection . getResponse ( ) . getEntityCount ( ) ) ; List entities = collection . getResponse ( ) . getEntities ( ) ; for ( int i = 0 ; i < 3 ; i ++ ) { <START_BUG> LinkedHashMap < String , Object > entity = ( ( LinkedHashMap < String , Object > ) ( entities . get ( i ) ) ) ; <END_BUG> Entity savedEntity = saved [ ( 7 + i ) ] ; assertEquals ( savedEntity . get ( "uuid" ) , entity . get ( "uuid" ) ) ; } } } @ Test public void testFarAwayLocationWithOneResultCloser ( ) throws IOException { } @ Test public void createHugeMatrixOfCoordinates ( ) throws IOException { } }

Fix:
Entity entity = ( ( Entity ) ( entities . get ( i ) ) ) ;
Buggy code:
public class ImageBindingRegistry implements IExtensionAdditionHandler , IExtensionRemovalHandler { static final String ICON = "icon" ; static final String ID = "id" ; private String tag ; private ImageRegistry registry = new ImageRegistry ( ) ; public ImageBindingRegistry ( String tag ) { } public void addInstance ( IExtensionTracker tracker , IExtension extension ) { } public IExtensionPoint getExtensionPointFilter ( ) { <START_BUG> return Platform . getExtensionRegistry ( ) . getExtensionPoint ( PLUGIN_ID , PL_ACTIVITIES ) ; <END_BUG> } public void removeInstance ( IExtension extension , Object [ ] objects ) { } public ImageDescriptor getImageDescriptor ( String id ) { } void dispose ( ) { } }

Fix:
return Platform . getExtensionRegistry ( ) . getExtensionPoint ( PLUGIN_ID , PL_ACTIVITYSUPPORT ) ;
Buggy code:
public class ClassificationTimeSeriesDescriptiveStatisticsTest { TimeSeries < Classification > clTsFalseAlarm ; ClassificationTimeSeriesDescriptiveStatistics ctsds ; @ Before public void setUp ( ) throws Exception { } @ Test public void testGetDuration ( ) { } @ Test public void testGetHeadDuration ( ) { } @ Test public void testGetTailDuration ( ) { } @ Test public void testGetAnomalyValueCount ( ) { } @ Test public void testGetHeadAnomalyValueCount ( ) { } @ Test public void testGetTailAnomalyValueCount ( ) { } @ Test public void testGetAnomalyValuePercent ( ) { } @ Test public void testGetHeadAnomalyValuePercent ( ) { } @ Test public void testGetTailAnomalyValuePercent ( ) { } @ Test public void testHasInducedFaultTimestamp ( ) { } @ Test public void testGetTotalMeanScoreValue ( ) { } @ Test public void testGetHeadMeanScoreValue ( ) { } @ Test public void testGetTailMeanScoreValue ( ) { } @ Test public void testGetTotalScoreVarianceValue ( ) { } @ Test public void testGetHeadScoreVarianceValue ( ) { } @ Test public void testGetTailScoreVarianceValue ( ) { } @ Test public void testGetPositiveQuadraticDistance ( ) { } @ Test public void testGetTimeSeries ( ) { } @ Test public void testGetFautlTimestamp ( ) { <START_BUG> Assert . assertEquals ( 9 , ctsds . getFautlTimestamp ( ) ) ; <END_BUG> } @ Test public void testGetHead ( ) { } @ Test public void testGetTail ( ) { } public TimeSeries < Classification > getTimeSeriesWithFalseAlarm ( ) { } }

Fix:
Assert . assertEquals ( 9 , ctsds . getFaultTimestamp ( ) ) ;
Buggy code:
public class TestForTooMuchCloning extends LuceneTestCase { public void test ( ) throws Exception { final MockDirectoryWrapper dir = newMockDirectory ( ) ; final TieredMergePolicy tmp = new TieredMergePolicy ( ) ; tmp . setMaxMergeAtOnce ( 2 ) ; final RandomIndexWriter w = new RandomIndexWriter ( random ( ) , dir , newIndexWriterConfig ( TEST_VERSION_CURRENT , new org . apache . lucene . analysis . MockAnalyzer ( random ( ) ) ) . setMaxBufferedDocs ( 2 ) . setMergePolicy ( tmp ) ) ; final int numDocs = 20 ; for ( int docs = 0 ; docs < numDocs ; docs ++ ) { StringBuilder sb = new StringBuilder ( ) ; for ( int terms = 0 ; terms < 100 ; terms ++ ) { sb . append ( TestUtil . randomRealisticUnicodeString ( random ( ) ) ) ; sb . append ( '<seq2seq4repair_space>' ) ; } final Document doc = new Document ( ) ; doc . add ( new org . apache . lucene . document . TextField ( "field" , sb . toString ( ) , Store . NO ) ) ; w . addDocument ( doc ) ; } final IndexReader r = w . getReader ( ) ; <START_BUG> w . close ( ) ; <END_BUG> final int cloneCount = dir . getInputCloneCount ( ) ; assertTrue ( ( "too<seq2seq4repair_space>many<seq2seq4repair_space>calls<seq2seq4repair_space>to<seq2seq4repair_space>IndexInput.clone<seq2seq4repair_space>during<seq2seq4repair_space>merging:<seq2seq4repair_space>" + ( dir . getInputCloneCount ( ) ) ) , ( cloneCount < 500 ) ) ; final IndexSearcher s = newSearcher ( r ) ; final TopDocs hits = s . search ( new org . apache . lucene . search . TermRangeQuery ( "field" , new BytesRef ( ) , new BytesRef ( "￿" ) , true , true ) , 10 ) ; assertTrue ( ( ( hits . totalHits ) > 0 ) ) ; final int queryCloneCount = ( dir . getInputCloneCount ( ) ) - cloneCount ; assertTrue ( ( "too<seq2seq4repair_space>many<seq2seq4repair_space>calls<seq2seq4repair_space>to<seq2seq4repair_space>IndexInput.clone<seq2seq4repair_space>during<seq2seq4repair_space>TermRangeQuery:<seq2seq4repair_space>" + queryCloneCount ) , ( queryCloneCount < 50 ) ) ; r . close ( ) ; dir . close ( ) ; } }

Fix:
w . shutdown ( ) ;
Buggy code:
public class MonthDV extends AbstractDateTimeDV { public Object getActualValue ( String content , ValidationContext context ) throws InvalidDatatypeValueException { } protected int [ ] parse ( String str , int [ ] date ) throws SchemaDateTimeException { } protected int compareDates ( int [ ] date1 , int [ ] date2 ) { if ( ( date1 [ utc ] ) == ( date2 [ utc ] ) ) { <START_BUG> return ( date1 [ M ] ) >= ( date2 [ M ] ) ? ( date1 [ M ] ) > ( date2 [ M ] ) ? - 1 : 0 : 1 ; <END_BUG> } if ( ( ( date1 [ utc ] ) == 'Z' ) || ( ( date2 [ utc ] ) == 'Z' ) ) { if ( ( date1 [ M ] ) == ( date2 [ M ] ) ) { return INDETERMINATE ; } if ( ( ( ( date1 [ M ] ) + 1 ) == ( date2 [ M ] ) ) || ( ( ( date1 [ M ] ) - 1 ) == ( date2 [ M ] ) ) ) { return INDETERMINATE ; } } if ( ( date1 [ M ] ) < ( date2 [ M ] ) ) { return - 1 ; } else { return 1 ; } } protected String dateToString ( int [ ] date ) { } }

Fix:
return ( date1 [ M ] ) >= ( date2 [ M ] ) ? ( date1 [ M ] ) > ( date2 [ M ] ) ? 1 : 0 : - 1 ;
Buggy code:
public class Timer { private Wizzball parent ; private int startTime ; private int timeLeft ; private boolean pause = true ; private int initialTime ; public Timer ( Wizzball parent ) { } public void start ( ) { } public void stop ( ) { } public void pause ( ) { } public void unpause ( ) { } public void init ( int secs ) { } public int getSecondsLeft ( ) { } private int getMilliSecondsLeft ( ) { } public boolean isPaused ( ) { } public void display ( int x , int y , int size ) { float percent = 1 - ( ( ( float ) ( getSecondsLeft ( ) ) ) // ( ( float ) ( initialTime ) ) ) ; float angle = ( ( float ) ( ( 2 * ( PApplet . PI ) ) * percent ) ) - ( ( PApplet . PI ) // 2 ) ; parent . pushStyle ( ) ; parent . fill ( 10 ) ; parent . stroke ( 230 ) ; parent . strokeWeight ( 10 ) ; parent . smooth ( 8 ) ; parent . ellipse ( x , y , ( size + 1 ) , size ) ; parent . stroke ( 255 , 25 , 25 ) ; <START_BUG> parent . arc ( ( ( float ) ( x ) ) , ( ( float ) ( y ) ) , ( ( float ) ( size ) ) , ( ( float ) ( size ) ) , ( ( - ( parent . PI ) ) // 2 ) , ( ( float ) ( angle ) ) ) ; <END_BUG> parent . pushStyle ( ) ; parent . stroke ( 0 ) ; for ( int i = 0 ; i <= 4 ; i ++ ) { parent . strokeWeight ( 2 ) ; float ang = i * ( ( PApplet . PI ) // 2 ) ; parent . line ( ( x + ( ( ( size * 0.8F ) + 3 ) * ( PApplet . cos ( ( ( float ) ( ang ) ) ) ) ) ) , ( y + ( ( ( size * 0.8F ) + 3 ) * ( PApplet . sin ( ( ( float ) ( ang ) ) ) ) ) ) , ( x + ( ( size + 3 ) * ( PApplet . cos ( ( ( float ) ( ang ) ) ) ) ) ) , ( y + ( ( size + 3 ) * ( PApplet . sin ( ( ( float ) ( ang ) ) ) ) ) ) ) ; parent . strokeWeight ( 1 ) ; for ( int j = 0 ; j < 3 ; j ++ ) { ang = ang + ( ( PApplet . PI ) // 8 ) ; parent . line ( ( x + ( ( ( size * 0.8F ) + 3 ) * ( PApplet . cos ( ( ( float ) ( ang ) ) ) ) ) ) , ( y + ( ( ( size * 0.8F ) + 3 ) * ( PApplet . sin ( ( ( float ) ( ang ) ) ) ) ) ) , ( x + ( ( size + 3 ) * ( PApplet . cos ( ( ( float ) ( ang ) ) ) ) ) ) , ( y + ( ( size + 3 ) * ( PApplet . sin ( ( ( float ) ( ang ) ) ) ) ) ) ) ; } } float s = ( 2 * size ) + 22 ; parent . image ( parent . watch , ( x - ( s // 2 ) ) , ( ( y - ( s // 2 ) ) - 3 ) , s , s ) ; parent . popStyle ( ) ; parent . popStyle ( ) ; parent . pushStyle ( ) ; parent . textAlign ( CENTER , CENTER ) ; parent . fill ( 200 , 250 , 38 ) ; int sFont = 30 ; parent . textFont ( parent . fontDigital , sFont ) ; parent . text ( getSecondsLeft ( ) , x , y ) ; parent . popStyle ( ) ; } }

Fix:
parent . arc ( ( ( float ) ( x ) ) , ( ( float ) ( y ) ) , ( ( float ) ( size ) ) , ( ( float ) ( size ) ) , ( ( - ( PApplet . PI ) ) // 2 ) , ( ( float ) ( angle ) ) ) ;
Buggy code:
public class PercentileTest extends UnivariateStatisticAbstractTest { protected Percentile stat ; public PercentileTest ( String name ) { } public static Test suite ( ) { } public UnivariateStatistic getUnivariateStatistic ( ) { } public double expectedValue ( ) { } public void testHighPercentile ( ) { } public void testPercentile ( ) { } public void testNISTExample ( ) { } public void test5 ( ) { } public void testNullEmpty ( ) { } public void testSingleton ( ) { } public void testSpecialValues ( ) { } public void testSetQuantile ( ) { Percentile percentile = new Percentile ( 10 ) ; percentile . setQuantile ( 100 ) ; assertEquals ( 100 , percentile . getQuantile ( ) , 0 ) ; try { percentile . setQuantile ( 0 ) ; fail ( "Expecting<seq2seq4repair_space>IllegalArgumentException" ) ; } catch ( IllegalArgumentException ex ) { } try { <START_BUG> percentile = new Percentile ( 0 ) ; <END_BUG> fail ( "Expecting<seq2seq4repair_space>IllegalArgumentException" ) ; } catch ( IllegalArgumentException ex ) { } } }

Fix:
new Percentile ( 0 ) ;
Buggy code:
public class HandInHand extends Application { @ Override public void start ( Stage stage ) throws Exception { Parent root = FXMLLoader . load ( getClass ( ) . getResource ( "//fxml//Scene.fxml" ) ) ; Scene scene = new Scene ( root ) ; <START_BUG> scene . getStylesheets ( ) . add ( "//styles//ButonAnimation.css" ) ; <END_BUG> stage . getIcons ( ) . add ( new Image ( getClass ( ) . getResource ( "//ico.jpg" ) . toExternalForm ( ) ) ) ; stage . setTitle ( "Hand<seq2seq4repair_space>in<seq2seq4repair_space>Hand" ) ; stage . setScene ( scene ) ; stage . show ( ) ; stage . setOnCloseRequest ( new EventHandler < WindowEvent > ( ) { @ Override public void handle ( WindowEvent event ) { viewFXMLController . getModel ( ) . close ( ) ; } } ) ; } public static void main ( String [ ] args ) { } }

Fix:
scene . getStylesheets ( ) . add ( "//styles//ButtonAnimation.css" ) ;
Buggy code:
public class EJBServlet extends HttpServlet { private static final long serialVersionUID = 1L ; private static final Logger log = Logger . getLogger ( EJBServlet . class ) ; @ EJB ( lookup = "java:global//ejb3-servlet-ejbs//Session30!org.jboss.as.test.integration.ejb.servlet.Session30BusinessRemote" ) Session30BusinessRemote injectedSession ; @ EJB ( lookup = "java:global//ejb3-servlet-ejbs//StatelessBean!org.jboss.as.test.integration.ejb.servlet.StatelessLocal" ) StatelessLocal injectedStateless ; protected void processRequest ( HttpServletRequest request , HttpServletResponse response ) throws IOException , ServletException { SecurityClient client = null ; try { InitialContext ctx = new InitialContext ( ) ; client = SecurityClientFactory . getSecurityClient ( ) ; <START_BUG> client . setSimple ( "somebody" , "password" ) ; <END_BUG> client . login ( ) ; injectedSession . hello ( ) ; injectedSession . goodbye ( ) ; injectedStateless . hello ( ) ; injectedStateless . goodbye ( ) ; String lookupString = "java:global//ejb3-servlet-ejbs//Session30!" ; EJBServletHelper test = new EJBServletHelper ( ) ; test . processRequest ( lookupString , ctx ) ; } catch ( Exception e ) { EJBServlet . log . error ( e ) ; throw new ServletException ( "Failed<seq2seq4repair_space>to<seq2seq4repair_space>call<seq2seq4repair_space>EJBs//Session30<seq2seq4repair_space>through<seq2seq4repair_space>remote<seq2seq4repair_space>and<seq2seq4repair_space>local<seq2seq4repair_space>interfaces" , e ) ; } finally { client . logout ( ) ; } response . setContentType ( "text//plain" ) ; PrintWriter out = response . getWriter ( ) ; out . print ( "EJBServlet<seq2seq4repair_space>OK" ) ; out . close ( ) ; } protected void doGet ( HttpServletRequest request , HttpServletResponse response ) throws IOException , ServletException { } protected void doPost ( HttpServletRequest request , HttpServletResponse response ) throws IOException , ServletException { } }

Fix:
client . setSimple ( "user1" , "password1" ) ;
Buggy code:
@ WebServlet ( name = "Controller" , urlPatterns = "//controller//*" ) public class ControllerServlet extends HttpServlet { private static final Logger log = LoggerFactory . getLogger ( ControllerServlet . class ) ; private ActionFactory actionFactory ; private Context context ; @ Override public void init ( ) throws ServletException { } @ Override public void service ( HttpServletRequest req , HttpServletResponse resp ) throws IOException , ServletException { context = new Context ( req , resp ) ; ControllerServlet . log . debug ( ( "Requested<seq2seq4repair_space>action:<seq2seq4repair_space>" + ( context . getRequestedAction ( ) ) ) ) ; ControllerServlet . log . debug ( ( "current<seq2seq4repair_space>URI:<seq2seq4repair_space>" + ( context . getURI ( ) ) ) ) ; ControllerServlet . log . debug ( ( "Referrer:<seq2seq4repair_space>" + ( req . getHeader ( "Referrer" ) ) ) ) ; Action action = actionFactory . getAction ( context ) ; if ( action == null ) { ControllerServlet . log . debug ( "Action<seq2seq4repair_space>not<seq2seq4repair_space>found" ) ; <START_BUG> context . forward ( "//ErrorHandler" ) ; <END_BUG> return ; } ControllerServlet . log . debug ( ( "Found<seq2seq4repair_space>action:<seq2seq4repair_space>" + ( action . getClass ( ) . getSimpleName ( ) ) ) ) ; ActionResult result = action . execute ( context ) ; doForwardOrRedirect ( result , req , resp ) ; } private void doForwardOrRedirect ( ActionResult result , HttpServletRequest req , HttpServletResponse resp ) throws IOException , ServletException { } }

Fix:
resp . sendError ( SC_NOT_FOUND ) ;
Buggy code:
public class TestCodecSupport extends SolrTestCaseJ4 { @ BeforeClass public static void beforeClass ( ) throws Exception { <START_BUG> initCore ( "solrconfig-basic.xml" , "schema_codec.xml" ) ; <END_BUG> } public void testPostingsFormats ( ) { } public void testDynamicFields ( ) { } public void testUnknownField ( ) { } }

Fix:
initCore ( "solrconfig_codec.xml" , "schema_codec.xml" ) ;
Buggy code:
public class CodeSnippetFieldReference extends FieldReference implements ProblemReasons , EvaluationConstants { EvaluationContext evaluationContext ; FieldBinding delegateThis ; public CodeSnippetFieldReference ( char [ ] source , long pos , EvaluationContext evaluationContext ) { } public void generateAssignment ( BlockScope currentScope , CodeStream codeStream , Assignment assignment , boolean valueRequired ) { } public void generateCode ( BlockScope currentScope , CodeStream codeStream , boolean valueRequired ) { } public void generateCompoundAssignment ( BlockScope currentScope , CodeStream codeStream , Expression expression , int operator , int assignmentImplicitConversion , boolean valueRequired ) { } public void generatePostIncrement ( BlockScope currentScope , CodeStream codeStream , CompoundAssignment postIncrement , boolean valueRequired ) { } public void manageSyntheticReadAccessIfNecessary ( BlockScope currentScope ) { } public void manageSyntheticWriteAccessIfNecessary ( BlockScope currentScope ) { } public TypeBinding resolveType ( BlockScope scope ) { receiverType = receiver . resolveType ( scope ) ; if ( ( receiverType ) == null ) { constant = NotAConstant ; return null ; } this . codegenBinding = this . binding = scope . getField ( receiverType , token , this ) ; FieldBinding firstAttempt = binding ; boolean isNotVisible = false ; if ( ! ( binding . isValidBinding ( ) ) ) { if ( ( ( binding ) instanceof ProblemFieldBinding ) && ( ( ( ( ProblemFieldBinding ) ( binding ) ) . problemId ( ) ) == ( ProblemReasons . NotVisible ) ) ) { isNotVisible = true ; if ( ( this . evaluationContext . declaringTypeName ) != null ) { delegateThis = scope . getField ( scope . enclosingSourceType ( ) , EvaluationConstants . DELEGATE_THIS , this ) ; if ( ( delegateThis ) == null ) { constant = NotAConstant ; scope . problemReporter ( ) . invalidField ( this , receiverType ) ; return null ; } } else { constant = NotAConstant ; scope . problemReporter ( ) . invalidField ( this , receiverType ) ; return null ; } CodeSnippetScope localScope = new CodeSnippetScope ( scope ) ; this . codegenBinding = this . binding = localScope . getFieldForCodeSnippet ( delegateThis . type , token , this ) ; } } if ( ! ( binding . isValidBinding ( ) ) ) { constant = NotAConstant ; if ( isNotVisible ) { this . codegenBinding = this . binding = firstAttempt ; } scope . problemReporter ( ) . invalidField ( this , receiverType ) ; return null ; } if ( isFieldUseDeprecated ( binding , scope ) ) scope . problemReporter ( ) . deprecatedField ( binding , this ) ; constant = FieldReference . getConstantFor ( binding , ( ( receiver ) == ( ThisImplicit ) ) , this , scope , 0 ) ; if ( ! ( receiver . isThis ( ) ) ) constant = NotAConstant ; <START_BUG> return this . expressionType = binding . type ; <END_BUG> } }

Fix:
return this . resolvedType = binding . type ;
Buggy code:
public class GUI { public static void main ( String [ ] args ) throws InterruptedException { Scanner cin = new Scanner ( System . in ) ; Board b = new Board ( ) ; <START_BUG> AI ai = new AI ( 1 ) ; <END_BUG> int player = 1 ; int c = 0 ; while ( ! ( b . isTerminal ( ) ) ) { System . out . println ( "<seq2seq4repair_space>0<seq2seq4repair_space>1<seq2seq4repair_space>2<seq2seq4repair_space>3<seq2seq4repair_space>4<seq2seq4repair_space>5<seq2seq4repair_space>6" ) ; System . out . println ( b ) ; ai . setState ( b ) ; if ( player == 1 ) { if ( ( ( c = cin . nextInt ( ) ) <= 6 ) && ( c >= ( - 1 ) ) ) { if ( c == ( - 1 ) ) { b . undo ( ) ; b . undo ( ) ; player = - player ; } else { b . move ( c ) ; } } } else { b . move ( ai . getMove ( 10 ) ) ; } player = - player ; } System . out . println ( "<seq2seq4repair_space>0<seq2seq4repair_space>1<seq2seq4repair_space>2<seq2seq4repair_space>3<seq2seq4repair_space>4<seq2seq4repair_space>5<seq2seq4repair_space>6" ) ; System . out . println ( b ) ; System . out . println ( ai . evaluate ( ) ) ; System . out . println ( b . getWinnerColor ( ) ) ; System . out . println ( b . getWinner ( ) ) ; cin . close ( ) ; } }

Fix:
AI ai = new AI ( 10 , 1 ) ;
Buggy code:
public class OpenNewMailWindowAction extends FrameAction { public OpenNewMailWindowAction ( AbstractFrameController controller ) { } public void actionPerformed ( ActionEvent evt ) { <START_BUG> FrameModel . openView ( "Mail" ) ; <END_BUG> } }

Fix:
FrameModel . openView ( "ThreePaneMail" ) ;
Buggy code:
public class Car extends OvalPortrayal2D implements Steppable { public static final int maxSpace = 5 ; public Shape shape ; protected int carID ; protected int spaceRemaining = Car . maxSpace ; protected int speed ; protected LinkedList < Int2D > pathLocal = new LinkedList < Int2D > ( ) ; protected ExpressCentre stationFrom ; protected ExpressCentre stationTo ; protected Int2D location ; protected Map map ; Ellipse2D . Double preciseEllipse = new Ellipse2D . Double ( ) ; private LinkedList < Parcel > carrying = new LinkedList < Parcel > ( ) ; private int stepCount = 0 ; private boolean hasArrived = false ; private boolean hasLeaved = false ; private LinkedList < ExpressCentre > globalPath ; private int basicCarDisplaySize = 2 ; public Car ( int carID , Int2D location , Map map ) { } public int getCurrLoading ( ) { } public LinkedList < Parcel > getCarrying ( ) { } public String toString ( ) { } public boolean loadParcel ( ) { } public void unloadParcel ( ) { } private List < Parcel > parcelsToUnload ( ExpressCentre s ) { List < Parcel > toUnload = new LinkedList < Parcel > ( ) ; LinkedList < Parcel > carCallerToUnload = new LinkedList < Parcel > ( ) ; for ( Parcel p : carrying ) { <START_BUG> if ( ( p . destination . stationID ) == ( s . stationID ) ) { <END_BUG> map . profit += p . getProfit ( ) ; System . out . println ( ( ( ( ( ( ( ( ( ( "Log:<seq2seq4repair_space>" + ( this ) ) + "<seq2seq4repair_space>has<seq2seq4repair_space>unloaded" ) + "<seq2seq4repair_space>" ) + p ) + "<seq2seq4repair_space>with<seq2seq4repair_space>wight<seq2seq4repair_space>" ) + ( p . weight ) ) + "<seq2seq4repair_space>with<seq2seq4repair_space>time<seq2seq4repair_space>spending<seq2seq4repair_space>" ) + ( p . getTimeSpending ( ) ) ) + "..." ) ) ; this . spaceRemaining += p . weight ; if ( p instanceof CarCaller ) { ( currStation ( ) . carCallerSema ) ++ ; carCallerToUnload . add ( p ) ; globalPath = null ; } else { toUnload . add ( p ) ; } } } carrying . removeAll ( carCallerToUnload ) ; return toUnload ; } public void arriveStation ( ) { } public void leaveStation ( ) { } private void setPathLocal ( ExpressCentre from , ExpressCentre to ) { } private void setPathGlobal ( ExpressCentre from , ExpressCentre to ) { } private ExpressCentre currStation ( ) { } private void parcelLoader ( LinkedList < Parcel > parcelsCouldBeLoad ) { } public void draw ( Object object , Graphics2D graphics , DrawInfo2D info ) { } @ Override public void step ( SimState state ) { } }

Fix:
if ( p . destination . equals ( s ) ) {
Buggy code:
public class TestDocTermOrdsRangeFilter extends LuceneTestCase { protected IndexSearcher searcher1 ; protected IndexSearcher searcher2 ; private IndexReader reader ; private Directory dir ; protected String fieldName ; @ Override public void setUp ( ) throws Exception { super . setUp ( ) ; dir = newDirectory ( ) ; fieldName = ( random ( ) . nextBoolean ( ) ) ? "field" : "" ; 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 ) ) ) ; List < String > terms = new ArrayList < > ( ) ; int num = atLeast ( 200 ) ; for ( int i = 0 ; i < num ; i ++ ) { Document doc = new Document ( ) ; doc . add ( newStringField ( "id" , Integer . toString ( i ) , NO ) ) ; int numTerms = random ( ) . nextInt ( 4 ) ; for ( int j = 0 ; j < numTerms ; j ++ ) { String s = TestUtil . randomUnicodeString ( random ( ) ) ; doc . add ( newStringField ( fieldName , s , NO ) ) ; if ( defaultCodecSupportsSortedSet ( ) ) { doc . add ( new org . apache . lucene . document . SortedSetDocValuesField ( fieldName , new BytesRef ( s ) ) ) ; } terms . add ( s ) ; } writer . addDocument ( doc ) ; } if ( VERBOSE ) { Collections . sort ( terms ) ; System . out . println ( "UTF16<seq2seq4repair_space>order:" ) ; for ( String s : terms ) { System . out . println ( ( "<seq2seq4repair_space>" + ( UnicodeUtil . toHexString ( s ) ) ) ) ; } } int numDeletions = random ( ) . nextInt ( ( num // 10 ) ) ; for ( int i = 0 ; i < numDeletions ; i ++ ) { writer . deleteDocuments ( new org . apache . lucene . index . Term ( "id" , Integer . toString ( random ( ) . nextInt ( num ) ) ) ) ; } reader = writer . getReader ( ) ; searcher1 = newSearcher ( reader ) ; searcher2 = newSearcher ( reader ) ; <START_BUG> writer . close ( ) ; <END_BUG> } @ Override public void tearDown ( ) throws Exception { } public void testRanges ( ) throws Exception { } protected void assertSame ( BytesRef lowerVal , BytesRef upperVal , boolean includeLower , boolean includeUpper ) throws IOException { } }

Fix:
writer . shutdown ( ) ;
Buggy code:
public class DataShareService implements IDataShareService { private ServiceManager mgr ; private ISharedObjectContainer container ; public DataShareService ( ServiceManager mgr , ISharedObjectContainer container ) { } public synchronized void publish ( Object dataGraph , ID id , IUpdateProvider provider , IPublicationCallback callback ) throws ECFException { } public synchronized ISharedData subscribe ( ID id , ISubscriptionCallback callback ) throws ECFException { Agent agent = ( ( Agent ) ( container . getSharedObjectManager ( ) . getSharedObject ( id ) ) ) ; if ( agent == null ) return null ; if ( callback != null ) <START_BUG> callback . dataSubscribed ( agent , container . getConfig ( ) . getID ( ) ) ; <END_BUG> return agent ; } public synchronized void dispose ( ) { } private IBootstrap getBootstrap ( ) { } private AbstractMulticaster getSender ( ) { } }

Fix:
callback . dataSubscribed ( agent , container . getID ( ) ) ;
Buggy code:
public class MenuAddition extends AdditionBase { private List additions = new ArrayList ( ) ; private ImageDescriptor imageDesc = null ; private Image icon = null ; private IMenuService menuService ; public MenuAddition ( IConfigurationElement element , IMenuService service ) { } public void readAdditions ( IConfigurationElement addition , int insertionIndex ) { } public String getMnemonic ( ) { } public String getLabel ( ) { } public String getTooltip ( ) { } public Image getIcon ( ) { } private String getIconPath ( ) { } public String toString ( ) { } public IContributionItem getContributionItem ( ) { } public void populateMenuManager ( ContributionManager mgr ) { } public int indexOf ( String additionId ) { int index = 0 ; for ( Iterator iterator = additions . iterator ( ) ; iterator . hasNext ( ) ; ) { AdditionBase addition = ( ( AdditionBase ) ( iterator . next ( ) ) ) ; if ( additionId . equals ( addition . getId ( ) ) ) return index ; index ++ ; } <START_BUG> return 0 ; <END_BUG> } }

Fix:
return - 1 ;
Buggy code:
@ RunAsClient @ RunWith ( Arquillian . class ) public class EnterpriseDeploymentTestCase { private static final long TIMEOUT = 10000 ; private static final String WAR_JBOSS_FILE = "WEB-INF//jboss-web.xml" ; private static final String JAR_JBOSS_FILE = "META-INF//jboss.xml" ; private static final String EAR_JBOSS_FILE = "META-INF//jboss-app.xml" ; private DeploymentManager deploymentManager ; @ Test public void testDeploymentManager ( ) throws Exception { } @ Test public void testDistributeWebApp ( ) throws Exception { } @ Test public void testDistributeBadWar ( ) throws Exception { } @ Test @ Ignore ( "AS7-2631" ) public void testDistributeEjbApp ( ) throws Exception { } @ Test @ Ignore ( "AS7-2631" ) public void testDistributeEARApp ( ) throws Exception { } @ Test @ Ignore ( "AS7-2631" ) public void testListAvailableModules ( ) throws Exception { } private DeploymentManager getDeploymentManager ( ) throws Exception { } private ProgressObject jsr88Deploy ( Archive < ? > archive ) throws Exception { } private ProgressObject jsr88Undeploy ( TargetModuleID [ ] resultTargetModuleIDs ) throws Exception { } private StateType awaitCompletion ( ProgressObject progress , long timeout ) throws InterruptedException { } private void assertServletAccess ( String context ) throws IOException { } private InputStream createDeploymentPlan ( String deploymentFile ) throws Exception { } private String getJBossFile ( String deploymentFile ) { } private File getResourceFile ( String resource ) { File file = new File ( resource ) ; if ( file . exists ( ) ) return file ; <START_BUG> String testResourcesDir = "target//test-classes" ; <END_BUG> file = new File ( ( ( testResourcesDir + "//" ) + resource ) ) ; if ( file . exists ( ) ) return file ; throw new IllegalArgumentException ( ( ( ( ( "Cannot<seq2seq4repair_space>obtain<seq2seq4repair_space>'" + testResourcesDir ) + "//" ) + resource ) + "'" ) ) ; } private Archive < ? > getWebArchive ( ) { } private Archive < ? > getBadWebArchive ( ) { } private Archive < ? > getEjbArchive ( ) { } private Archive < ? > getEarArchive ( ) { } }

Fix:
String testResourcesDir = ( System . getProperty ( "jbossas.ts.submodule.dir" ) ) + "//target//test-classes" ;
Buggy code:
public class OptionsTag extends TagSupport { protected static MessageResources messages = MessageResources . getMessageResources ( ( ( Constants . Package ) + ".LocalStrings" ) ) ; protected String collection = null ; public String getCollection ( ) { } public void setCollection ( String collection ) { } protected String labelName = null ; public String getLabelName ( ) { } public void setLabelName ( String labelName ) { } protected String labelProperty = null ; public String getLabelProperty ( ) { } public void setLabelProperty ( String labelProperty ) { } protected String name = null ; public String getName ( ) { } public void setName ( String name ) { } protected String property = null ; public String getProperty ( ) { } public void setProperty ( String property ) { } public int doStartTag ( ) throws JspException { } public int doEndTag ( ) throws JspException { } public void release ( ) { } protected void addOption ( StringBuffer sb , String value , String label , boolean matched ) { sb . append ( "<option<seq2seq4repair_space>value=\"" ) ; sb . append ( value ) ; sb . append ( "\"" ) ; if ( matched ) <START_BUG> sb . append ( "<seq2seq4repair_space>selected" ) ; <END_BUG> sb . append ( ">" ) ; sb . append ( ResponseUtils . filter ( label ) ) ; sb . append ( "<//option>\r\n" ) ; } protected Iterator getIterator ( String name , String property ) throws JspException { } }

Fix:
sb . append ( "<seq2seq4repair_space>selected=\"true\"" ) ;
Buggy code:
public final class PFPGrowthTest2 extends MahoutTestCase { private static final Logger log = LoggerFactory . getLogger ( PFPGrowthTest . class ) ; private final Parameters params = new Parameters ( ) ; @ Override public void setUp ( ) throws Exception { super . setUp ( ) ; params . set ( MIN_SUPPORT , "3" ) ; params . set ( MAX_HEAPSIZE , "4" ) ; params . set ( NUM_GROUPS , "2" ) ; params . set ( ENCODING , "UTF-8" ) ; params . set ( USE_FPG2 , "true" ) ; File inputDir = getTestTempDir ( "transactions" ) ; File outputDir = getTestTempDir ( "frequentpatterns" ) ; File input = new File ( inputDir , "test.txt" ) ; params . set ( INPUT , input . getAbsolutePath ( ) ) ; params . set ( OUTPUT , outputDir . getAbsolutePath ( ) ) ; Writer writer = Files . newWriter ( input , Charsets . UTF_8 ) ; try { Collection < List < String > > transactions = Lists . newArrayList ( ) ; transactions . add ( Arrays . asList ( "E" , "A" , "D" , "B" ) ) ; transactions . add ( Arrays . asList ( "D" , "A" , "C" , "E" , "B" ) ) ; transactions . add ( Arrays . asList ( "C" , "A" , "B" , "E" ) ) ; transactions . add ( Arrays . asList ( "B" , "A" , "D" ) ) ; <START_BUG> transactions . add ( Arrays . asList ( "D" ) ) ; <END_BUG> transactions . add ( Arrays . asList ( "D" , "B" ) ) ; transactions . add ( Arrays . asList ( "A" , "D" , "E" ) ) ; transactions . add ( Arrays . asList ( "B" , "C" ) ) ; for ( List < String > transaction : transactions ) { String sep = "" ; for ( String item : transaction ) { writer . write ( ( sep + item ) ) ; sep = "," ; } writer . write ( "\n" ) ; } } finally { Closeables . closeQuietly ( writer ) ; } } @ Test public void testStartParallelFPGrowth ( ) throws Exception { } @ Test public void testStartParallelFPGrowthInSteps ( ) throws Exception { } }

Fix:
transactions . add ( Arrays . asList ( "D" , "D" , "" , "D" , "D" ) ) ;
Buggy code:
public class FDistribution extends AbstractRealDistribution { public static final double DEFAULT_INVERSE_ABSOLUTE_ACCURACY = 1.0E-9 ; private static final long serialVersionUID = - 8516354193418641566L ; private final double numeratorDegreesOfFreedom ; private final double denominatorDegreesOfFreedom ; private final double solverAbsoluteAccuracy ; private double numericalVariance = Double . NaN ; private boolean numericalVarianceIsCalculated = false ; public FDistribution ( double numeratorDegreesOfFreedom , double denominatorDegreesOfFreedom ) throws NotStrictlyPositiveException { } public FDistribution ( double numeratorDegreesOfFreedom , double denominatorDegreesOfFreedom , double inverseCumAccuracy ) throws NotStrictlyPositiveException { } public FDistribution ( RandomGenerator rng , double numeratorDegreesOfFreedom , double denominatorDegreesOfFreedom , double inverseCumAccuracy ) throws NotStrictlyPositiveException { } public double density ( double x ) { } public double cumulativeProbability ( double x ) { } public double getNumeratorDegreesOfFreedom ( ) { } public double getDenominatorDegreesOfFreedom ( ) { } @ Override protected double getSolverAbsoluteAccuracy ( ) { } public double getNumericalMean ( ) { } public double getNumericalVariance ( ) { } protected double calculateNumericalVariance ( ) { } public double getSupportLowerBound ( ) { } public double getSupportUpperBound ( ) { } public boolean isSupportLowerBoundInclusive ( ) { <START_BUG> return true ; <END_BUG> } public boolean isSupportUpperBoundInclusive ( ) { } public boolean isSupportConnected ( ) { } }

Fix:
return false ;
Buggy code:
public class TableView extends JTreeTable { protected HeaderTableModel headerTableModel ; private int selectedRow = 0 ; private int update = 0 ; private String column ; private Vector tableModelPlugins ; protected TableModelFilteredView tableModelFilteredView ; protected HeaderTableModelSorter tableModelSorter ; protected TableModelThreadedView tableModelThreadedView ; protected HeaderList headerList ; public TableView ( HeaderTableModel headerTableModel ) { } protected void addMouseListenerToHeaderInTable ( ) { } public void enableThreadedView ( boolean b ) { if ( b == true ) { TableColumn tc = null ; try { tc = getColumn ( "Subject" ) ; tc . setCellRenderer ( null ) ; } catch ( Exception ex ) { System . out . println ( ( "headerTable->registerRenderer:<seq2seq4repair_space>" + ( ex . getMessage ( ) ) ) ) ; } <START_BUG> setTreeCellRenderer ( new org . columba . mail . gui . table . util . SubjectTreeCellRenderer ( getTree ( ) ) ) ; <END_BUG> } else { setTreeCellRenderer ( null ) ; TableColumn tc = null ; try { tc = getColumn ( "Subject" ) ; tc . setCellRenderer ( new org . columba . mail . gui . table . plugins . HeaderTableCommonRenderer ( getTree ( ) , "Subject" ) ) ; } catch ( Exception ex ) { System . out . println ( ( "headerTable->registerRenderer:<seq2seq4repair_space>" + ( ex . getMessage ( ) ) ) ) ; } } } protected void initRenderer ( boolean b ) throws Exception { } public void registerRenderer ( String name , TableCellRenderer cell , TableCellRenderer header , int size , boolean lockSize , int position ) { } public void registerRenderer ( String name , TableCellRenderer cell , TableCellRenderer header , int size , boolean lockSize ) { } public HeaderTableModelSorter getTableModelSorter ( ) { } public TableModelThreadedView getTableModelThreadedView ( ) { } public TableModelFilteredView getTableModelFilteredView ( ) { } public MessageNode getSelectedNode ( ) { } public MessageNode [ ] getSelectedNodes ( ) { } public MessageNode getMessagNode ( Object uid ) { } protected MouseInputListener createMouseInputListener ( ) { } }

Fix:
setTreeCellRenderer ( new SubjectTreeCellRenderer ( ) ) ;
Buggy code:
public class Maze { private static final String clear = "[2J" ; private static final String hide = "[?25l" ; private static final String show = "[?25h" ; private String go ( int x , int y ) { } private char [ ] [ ] maze ; private int [ ] solutionArray = new int [ 0 ] ; private int startx ; private int starty ; private int maxx ; private int maxy ; public void setstartx ( int x ) { } public void setstarty ( int y ) { } public Maze ( String filename ) { } public String toString ( ) { } public String toString ( boolean animate ) { } public boolean solve ( boolean animate , int mode ) { } public void tracePath ( Maze . Frontier frontier ) { <START_BUG> LinkedList < Maze . Coordinate > list = frontier . get ( ) ; <END_BUG> solutionArray = new int [ ( list . size ( ) ) * 2 ] ; for ( int i = 0 ; i < ( list . size ( ) ) ; i ++ ) { Maze . Coordinate current = list . get ( i ) ; int currentx = current . getx ( ) ; int currenty = current . gety ( ) ; solutionArray [ ( i * 2 ) ] = currentx ; solutionArray [ ( ( i * 2 ) + 1 ) ] = currenty ; if ( ( maze [ currentx ] [ currenty ] ) == 'x' ) { maze [ currentx ] [ currenty ] = '@' ; } } } public boolean solveBFS ( boolean animate ) { } public boolean solveDFS ( boolean animate ) { } public boolean solveBFS ( ) { } public boolean solveDFS ( ) { } public int [ ] solutionCoordinates ( ) { } public void wait ( int millis ) { } public class Frontier { private MyDeque < LinkedList < Maze . Coordinate > > deque ; private int mode ; public Frontier ( int mode ) { } public void add ( LinkedList < Maze . Coordinate > list ) { } public void remove ( ) { } public LinkedList < Maze . Coordinate > get ( ) { } public boolean isEmpty ( ) { } } public class Coordinate { private int x ; private int y ; public Coordinate ( int x , int y ) { } public int getx ( ) { } public int gety ( ) { } public String toString ( ) { } } }

Fix:
LinkedList < Maze . Coordinate > list = frontier . deque . getLast ( ) ;