nus-yam/ex-repair huggingface dataset:
Buggy code:
public class DefinitionsUpdateResponseVerbHandler implements IVerbHandler { private static final Logger logger = LoggerFactory . getLogger ( DefinitionsUpdateResponseVerbHandler . class ) ; public void doVerb ( final Message message ) { try { Collection < Column > cols = MigrationManager . makeColumns ( message ) ; for ( Column col : cols ) { final UUID version = UUIDGen . getUUID ( col . name ( ) ) ; if ( ( version . timestamp ( ) ) > ( DatabaseDescriptor . getDefsVersion ( ) . timestamp ( ) ) ) { <START_BUG> final Migration m = Migration . deserialize ( col . value ( ) ) ; <END_BUG> assert m . getVersion ( ) . equals ( version ) ; StageManager . getStage ( MIGRATION ) . submit ( new WrappedRunnable ( ) { @ Override protected void runMayThrow ( ) throws Exception { if ( ( DatabaseDescriptor . getDefsVersion ( ) . timestamp ( ) ) == ( version . timestamp ( ) ) ) DefinitionsUpdateResponseVerbHandler . logger . debug ( ( "Not<seq2seq4repair_space>appling<seq2seq4repair_space>(equal)<seq2seq4repair_space>" + ( version . toString ( ) ) ) ) ; else if ( ( DatabaseDescriptor . getDefsVersion ( ) . timestamp ( ) ) > ( version . timestamp ( ) ) ) DefinitionsUpdateResponseVerbHandler . logger . debug ( ( "Not<seq2seq4repair_space>applying<seq2seq4repair_space>(before)" + ( version . toString ( ) ) ) ) ; else { DefinitionsUpdateResponseVerbHandler . logger . debug ( "Applying<seq2seq4repair_space>{}<seq2seq4repair_space>from<seq2seq4repair_space>{}" , m . getClass ( ) . getSimpleName ( ) , message . getFrom ( ) ) ; try { m . apply ( ) ; m . passiveAnnounce ( ) ; } catch ( ConfigurationException ex ) { DefinitionsUpdateResponseVerbHandler . logger . debug ( ( "Migration<seq2seq4repair_space>not<seq2seq4repair_space>applied<seq2seq4repair_space>" + ( ex . getMessage ( ) ) ) ) ; } } } } ) ; } } } catch ( IOException ex ) { throw new IOError ( ex ) ; } } }

Fix:
final Migration m = Migration . deserialize ( col . value ( ) , message . getVersion ( ) ) ;
Buggy code:
@ RunWith ( Arquillian . class ) @ Run ( RunModeType . AS_CLIENT ) public class WSTestCase { @ Deployment public static Archive < ? > getDeployment ( ) { } @ Test public void testWSDL ( ) throws Exception { } @ Test public void testLegacyServlet ( ) throws Exception { } private static String performCall ( String params , String request ) throws Exception { URL url = new URL ( ( "http:////localhost:8080//ws-example//" + params ) ) ; UrlConnectionTask task = new UrlConnectionTask ( url , request ) ; <START_BUG> PollingUtils . retryWithTimeout ( 1500 , task ) ; <END_BUG> return task . getResponse ( ) ; } }

Fix:
PollingUtils . retryWithTimeout ( 10000 , task ) ;
Buggy code:
public class SystemWebViewActivity extends AppCompatActivity { private WebView mSystemWebView ; static final String TAG = "fujunwei" ; @ Override protected void onCreate ( Bundle savedInstanceState ) { } @ Override public boolean onCreateOptionsMenu ( Menu menu ) { } @ Override public boolean onOptionsItemSelected ( MenuItem item ) { int id = item . getItemId ( ) ; if ( id == ( id . action_settings ) ) { return true ; } else <START_BUG> if ( id == ( id . action_proxy ) ) { <END_BUG> SystemWebViewActivity . setProxyKK ( this , "child-p.intel.com" , 912 ) ; } else if ( id == ( id . action_baidu ) ) { mSystemWebView . loadUrl ( "http:////www.baidu.com//" ) ; } else if ( id == ( id . action_video ) ) { mSystemWebView . loadUrl ( "file://////android_asset//video.html" ) ; } return super . onOptionsItemSelected ( item ) ; } private static boolean setProxyKK ( Activity activity , String host , int port ) { } }

Fix:
if ( id == ( id . action_exitfullscreen ) ) {
Buggy code:
public final class ApplicationContextProvider implements ApplicationContextAware { private static ApplicationContext ctx = null ; public void setApplicationContext ( ApplicationContext applicationContext ) throws BeansException { <START_BUG> this . ctx = applicationContext ; <END_BUG> } public static ApplicationContext getCtx ( ) { } }

Fix:
ApplicationContextProvider . ctx = applicationContext ;
Buggy code:
@ RunWith ( ConcordionRunner . class ) @ Extensions ( ExcelExtension . class ) public class ParagraphLayout extends AbstractSpecTest { @ Override public String getBody ( ) { <START_BUG> return "<p><span>A<seq2seq4repair_space>simple<seq2seq4repair_space>HTML<seq2seq4repair_space>Paragraph<//span><//p><p><span<seq2seq4repair_space>style=\"background-color:<seq2seq4repair_space>#4BACC6;<seq2seq4repair_space>\">" + ( "Background<seq2seq4repair_space>colours<seq2seq4repair_space>are<seq2seq4repair_space>respected<//span><//p><p><span<seq2seq4repair_space>style=\"background-color:<seq2seq4repair_space>#EEECE1;<seq2seq4repair_space>\">" + "Cells<seq2seq4repair_space>on<seq2seq4repair_space>the<seq2seq4repair_space>same<seq2seq4repair_space>row<seq2seq4repair_space><//span><seq2seq4repair_space><span<seq2seq4repair_space>style=\"background-color:<seq2seq4repair_space>#9BBB59;<seq2seq4repair_space>\">are<seq2seq4repair_space>placed<seq2seq4repair_space>on<seq2seq4repair_space>a<seq2seq4repair_space>single<seq2seq4repair_space>line.<//span><//p>" ) ; <END_BUG> } }

Fix:
return "<p><span>A<seq2seq4repair_space>simple<seq2seq4repair_space>HTML<seq2seq4repair_space>Paragraph<//span><//p><p><span<seq2seq4repair_space>style=\"background-color:<seq2seq4repair_space>#4BACC6;<seq2seq4repair_space>\">" + ( "Background<seq2seq4repair_space>colours<seq2seq4repair_space>are<seq2seq4repair_space>respected<//span><//p><p><span<seq2seq4repair_space>style=\"background-color:<seq2seq4repair_space>#1F497D;<seq2seq4repair_space>\">" + "Cells<seq2seq4repair_space>on<seq2seq4repair_space>the<seq2seq4repair_space>same<seq2seq4repair_space>row<seq2seq4repair_space><//span><seq2seq4repair_space><span<seq2seq4repair_space>style=\"background-color:<seq2seq4repair_space>#9BBB59;<seq2seq4repair_space>\">are<seq2seq4repair_space>placed<seq2seq4repair_space>on<seq2seq4repair_space>a<seq2seq4repair_space>single<seq2seq4repair_space>line.<//span><//p>" ) ;
Buggy code:
public class SeleniumDriverFixture { private static final Logger LOG = LoggerFactory . getLogger ( SeleniumDriverFixture . class ) ; private CommandProcessor commandProcessor ; private long timeout = 30000 ; private long stepDelay = 0 ; private long pollDelay = 100 ; private ScreenCapture screenCapture = new ScreenCapture ( ) ; private LocatorCheck locatorCheck ; public SeleniumDriverFixture ( ) { } private CommandProcessor startWebDriverCommandProcessor ( final String browser , String browserUrl ) { } public void startBrowserOnUrl ( final String browser , final String browserUrl ) { } public void startBrowserOnUrlUsingRemoteServer ( final String browser , final String browserUrl ) { } public void startBrowserOnUrlUsingRemoteServerOnHost ( final String browser , final String browserUrl , final String serverHost ) { } public void startBrowserOnUrlUsingRemoteServerOnHostOnPort ( final String browser , final String browserUrl , final String serverHost , final int serverPort ) { } void setCommandProcessor ( CommandProcessor commandProcessor ) { } public void setTimeoutTo ( long timeout ) { } private void setTimeoutOnSelenium ( ) { } public void setStepDelayTo ( String stepDelay ) { } public void saveScreenshotAfter ( String policy ) { } public void saveScreenshotAfterInFolder ( String policy , String baseDir ) { } public boolean doOn ( final String command , final String target ) { } public boolean doOnWith ( final String command , final String target , final String value ) { } public String is ( final String command ) { } public String isOn ( final String command , final String target ) { } private boolean executeDoCommand ( final String methodName , final String [ ] values ) { } private String executeCommand ( final ExtendedSeleniumCommand command , final String [ ] values , long delay ) { } private String executeCommand ( String methodName , final String [ ] values ) { <START_BUG> String output = commandProcessor . getString ( methodName , values ) ; <END_BUG> if ( ( output != null ) && ( SeleniumDriverFixture . LOG . isDebugEnabled ( ) ) ) { SeleniumDriverFixture . LOG . debug ( ( ( "Command<seq2seq4repair_space>processor<seq2seq4repair_space>returned<seq2seq4repair_space>'" + output ) + "'" ) ) ; } return output ; } private String executeArrayCommand ( String methodName , final String [ ] values ) { } private boolean checkResult ( ExtendedSeleniumCommand command , String expected , String actual ) { } private void writeToFile ( final String filename , final String output ) { } public void stopBrowser ( ) { } }

Fix:
String output = commandProcessor . doCommand ( methodName , values ) ;
Buggy code:
final class WebMetaDataModifier { private final Logger log = Logger . getLogger ( WebMetaDataModifier . class ) ; WebMetaDataModifier ( ) { } void modify ( final Deployment dep ) { } private void configureEndpoints ( final Deployment dep , final JBossWebMetaData jbossWebMD ) { final String transportClassName = this . getTransportClassName ( dep ) ; this . log . trace ( "Modifying<seq2seq4repair_space>servlets" ) ; final Set < String > epNames = new HashSet < String > ( ) ; for ( Endpoint ep : dep . getService ( ) . getEndpoints ( ) ) { epNames . add ( ep . getTargetBeanName ( ) ) ; } for ( final ServletMetaData servletMD : jbossWebMD . getServlets ( ) ) { <START_BUG> final String endpointClassName = ASHelper . getEndpointName ( servletMD ) ; <END_BUG> if ( ( endpointClassName != null ) && ( ( endpointClassName . length ( ) ) > 0 ) ) { if ( epNames . contains ( endpointClassName ) ) { servletMD . setServletClass ( WSFServlet . class . getName ( ) ) ; this . log . debug ( ( ( ( "Setting<seq2seq4repair_space>transport<seq2seq4repair_space>class:<seq2seq4repair_space>" + transportClassName ) + "<seq2seq4repair_space>for<seq2seq4repair_space>servlet:<seq2seq4repair_space>" ) + endpointClassName ) ) ; final List < ParamValueMetaData > initParams = WebMetaDataHelper . getServletInitParams ( servletMD ) ; WebMetaDataHelper . newParamValue ( STACK_SERVLET_DELEGATE_CLASS , transportClassName , initParams ) ; WebMetaDataHelper . newParamValue ( INTEGRATION_CLASSLOADER , dep . getType ( ) . toString ( ) , initParams ) ; WebMetaDataHelper . newParamValue ( SEPID_DOMAIN_ENDPOINT , endpointClassName , initParams ) ; } } } } private void modifyContextRoot ( final Deployment dep , final JBossWebMetaData jbossWebMD ) { } private String getTransportClassName ( final Deployment dep ) { } }

Fix:
final String endpointClassName = ASHelper . getEndpointClassName ( servletMD ) ;
Buggy code:
public class MappingModuleDefinition extends SimpleResourceDefinition { protected static final SimpleAttributeDefinition CODE = new org . jboss . as . controller . SimpleAttributeDefinitionBuilder ( org . jboss . as . controller . descriptions . ModelDescriptionConstants . CODE , org . jboss . dmr . ModelType . STRING ) . setAllowNull ( false ) . build ( ) ; protected static final SimpleAttributeDefinition TYPE = new org . jboss . as . controller . SimpleAttributeDefinitionBuilder ( org . jboss . as . controller . descriptions . ModelDescriptionConstants . TYPE , org . jboss . dmr . ModelType . STRING ) . setAllowNull ( false ) . setAllowExpression ( true ) . build ( ) ; protected static final PropertiesAttributeDefinition MODULE_OPTIONS = new PropertiesAttributeDefinition . Builder ( Constants . MODULE_OPTIONS , true ) . setAllowExpression ( true ) . build ( ) ; private static final AttributeDefinition [ ] ATTRIBUTES = new AttributeDefinition [ ] { MappingModuleDefinition . CODE , MappingModuleDefinition . TYPE , LoginModuleResourceDefinition . MODULE , MappingModuleDefinition . MODULE_OPTIONS } ; MappingModuleDefinition ( String key ) { } @ Override public void registerOperations ( ManagementResourceRegistration resourceRegistration ) { } @ Override public void registerAttributes ( ManagementResourceRegistration resourceRegistration ) { super . registerAttributes ( resourceRegistration ) ; <START_BUG> SecurityDomainReloadWriteHandler writeHandler = new SecurityDomainReloadWriteHandler ( MappingModuleDefinition . ATTRIBUTES ) ; <END_BUG> for ( AttributeDefinition attr : getAttributes ( ) ) { resourceRegistration . registerReadWriteAttribute ( attr , null , writeHandler ) ; } } public AttributeDefinition [ ] getAttributes ( ) { } }

Fix:
SecurityDomainReloadWriteHandler writeHandler = new SecurityDomainReloadWriteHandler ( getAttributes ( ) ) ;
Buggy code:
public class StreamingSockJsSession extends AbstractHttpSockJsSession { private int byteCount ; public StreamingSockJsSession ( String sessionId , SockJsServiceConfig config , WebSocketHandler wsHandler , Map < String , Object > attributes ) { } @ Override public synchronized void handleInitialRequest ( ServerHttpRequest request , ServerHttpResponse response , SockJsFrameFormat frameFormat ) throws SockJsException { super . handleInitialRequest ( request , response , frameFormat ) ; if ( ! ( isClosed ( ) ) ) { <START_BUG> super . startLongPollingRequest ( request , response , frameFormat ) ; <END_BUG> } } @ Override protected void flushCache ( ) throws SockJsTransportFailureException { } @ Override protected synchronized void resetRequest ( ) { } @ Override protected synchronized void writeFrameInternal ( SockJsFrame frame ) throws IOException { } }

Fix:
super . startAsyncRequest ( ) ;
Buggy code:
public final class JApptoolsPin { public static final String VERSION = "1.2.2" ; private Logger logger = Logger . getLogger ( this . getClass ( ) ) ; private Encryption encryption = null ; private ConfigFile configFile = null ; private Administrator administrator = null ; private Mailsender adminMailsender = null ; private static JApptoolsPin instance = null ; protected JApptoolsPin ( ) { } public static JApptoolsPin getInstance ( ) { } public String getKey ( int keyLength ) { } public String encrypt ( String str ) { } public boolean initConfig ( ) { } public boolean initConfig ( String confPath ) { } public boolean initConfig ( String confPath , String confFilename ) { } public boolean initConfig ( String confPath , String confFilename , String logFilename ) { } public boolean initLog ( ) { } public Hashtable < String , String > getParams ( ) { } public Administrator getAdministrator ( ) { } public Serverconf getServerconf ( String serverID ) { } public boolean sendMail ( String subject , ArrayList < String > body , String serverID ) { } public boolean sendAlert ( String subject , ArrayList < String > body ) { boolean rslt = false ; <START_BUG> if ( ! ( getAdministrator ( ) . isSendAlert ( ) ) ) <END_BUG> return rslt ; if ( ! ( configFile . isConfigInitialized ( ) ) ) { if ( configFile . isLogInitialized ( ) ) logger . warn ( ResourcesMsg . getLog ( "SendmailNoinit" ) ) ; return rslt ; } if ( ( adminMailsender ) == null ) { Sendmailconf sendMailconf = configFile . getSendmailconf ( ) ; if ( sendMailconf != null ) adminMailsender = new Mailsender ( sendMailconf ) ; } if ( ( adminMailsender ) != null ) rslt = adminMailsender . sendMail ( subject , body , administrator ) ; return rslt ; } public boolean sendAlert ( String subject , String body ) { } }

Fix:
if ( ( ( getAdministrator ( ) ) == null ) || ( ! ( getAdministrator ( ) . isSendAlert ( ) ) ) )
Buggy code:
@ RunWith ( Arquillian . class ) @ RunAsClient public class ValidateOperationOperationTestCase extends AbstractMgmtTestBase { @ BeforeClass public static void initClient ( ) throws Exception { } @ AfterClass public static void closeClient ( ) throws Exception { } @ Test public void testValidRootOperation ( ) throws IOException , MgmtOperationException { } @ Test public void testFailedRootOperation ( ) throws IOException { } @ Test public void testValidChildOperation ( ) throws IOException , MgmtOperationException { } @ Test public void testInvalidChildOperation ( ) throws IOException { } @ Test public void testValidInheritedOperation ( ) throws IOException , MgmtOperationException { } @ Test public void testInvalidInheritedOperation ( ) throws IOException { } private ModelNode createValidateOperation ( ModelNode validatedOperation ) throws IOException { } private void executeInvalidOperation ( ModelNode operation ) throws IOException { try { executeOperation ( createValidateOperation ( operation ) ) ; <START_BUG> Assert . fail ( "Should<seq2seq4repair_space>have<seq2seq4repair_space>failed<seq2seq4repair_space>on<seq2seq4repair_space>no<seq2seq4repair_space>required<seq2seq4repair_space>paramter<seq2seq4repair_space>included" ) ; <END_BUG> } catch ( MgmtOperationException expected ) { } } }

Fix:
Assert . fail ( "Should<seq2seq4repair_space>have<seq2seq4repair_space>failed<seq2seq4repair_space>on<seq2seq4repair_space>no<seq2seq4repair_space>required<seq2seq4repair_space>parameter<seq2seq4repair_space>included" ) ;
Buggy code:
public class Property extends Task { protected String name ; protected String value ; protected File file ; protected String resource ; protected Path classpath ; protected String env ; protected Reference ref = null ; protected boolean userProperty = false ; public void setName ( String name ) { } public String getName ( ) { } public void setLocation ( File location ) { } public void setValue ( String value ) { } public String getValue ( ) { } public void setFile ( File file ) { } public File getFile ( ) { } public void setRefid ( Reference ref ) { } public Reference getRefid ( ) { } public void setResource ( String resource ) { } public String getResource ( ) { } public void setEnvironment ( String env ) { } public String getEnvironment ( ) { } public void setClasspath ( Path classpath ) { } public Path createClasspath ( ) { } public void setClasspathRef ( Reference r ) { } public void setUserProperty ( boolean userProperty ) { } public String toString ( ) { } public void execute ( ) throws BuildException { } protected void loadFile ( File file ) throws BuildException { } protected void loadResource ( String name ) { Properties props = new Properties ( ) ; log ( ( "Resource<seq2seq4repair_space>Loading<seq2seq4repair_space>" + name ) , MSG_VERBOSE ) ; try { ClassLoader cL = null ; InputStream is = null ; if ( ( classpath ) != null ) { <START_BUG> cL = new AntClassLoader ( project , classpath , false ) ; <END_BUG> } else { cL = this . getClass ( ) . getClassLoader ( ) ; } if ( cL == null ) { is = ClassLoader . getSystemResourceAsStream ( name ) ; } else { is = cL . getResourceAsStream ( name ) ; } if ( is != null ) { props . load ( is ) ; addProperties ( props ) ; } else { log ( ( "Unable<seq2seq4repair_space>to<seq2seq4repair_space>find<seq2seq4repair_space>resource<seq2seq4repair_space>" + name ) , MSG_WARN ) ; } } catch ( Exception ex ) { ex . printStackTrace ( ) ; } } protected void loadEnvironment ( String prefix ) { } protected void addProperties ( Properties props ) { } protected void addProperty ( String n , String v ) { } private void resolveAllProperties ( Hashtable props ) { } private boolean extractProperties ( String source , Vector properties ) { } }

Fix:
cL = new AntClassLoader ( project , classpath ) ;
Buggy code:
public class MemoryIndex { public int NUM_CHANGES = 100 ; SimpleLookupTable docsToReferences ; SimpleWordSet allWords ; String lastDocumentName ; HashtableOfObject lastReferenceTable ; MemoryIndex ( ) { } void addDocumentNames ( String substring , SimpleSet results ) { } void addIndexEntry ( char [ ] category , char [ ] key , String documentName ) { } HashtableOfObject addQueryResults ( char [ ] [ ] categories , char [ ] key , int matchRule , HashtableOfObject results ) { } boolean hasChanged ( ) { } void remove ( String documentName ) { } boolean shouldMerge ( ) { <START_BUG> return ( this . docsToReferences . elementSize ) >= ( NUM_CHANGES ) ; <END_BUG> } }

Fix:
return ( this . docsToReferences . elementSize ) >= ( this . NUM_CHANGES ) ;
Buggy code:
@ EActivity ( layout . activity_main ) @ OptionsMenu ( menu . menu_main ) public class TariffListActivity extends ActivityBase { public static String PARAM_SEARCH = "PARAM_SEARCH" ; public SearchTariffQuery tariffSearchQuery ; @ Bean public SearchTariffQueryHandler searchTariffQueryHandler ; @ OptionsMenuItem ( id . action_settings ) public MenuItem menuSettings ; @ ViewById ( id . tariffs_list ) public ListView tariffsList ; @ Bean public GenericListAdapter < Tariff , TariffListItemView > tariffListAdapter ; @ Bean public ComplexPreferences complexPreferences ; public ProgressDialog loadingDialog ; @ Override public void onCreate ( Bundle savedInstanceState ) { super . onCreate ( savedInstanceState ) ; Bundle args = this . getIntent ( ) . getExtras ( ) ; <START_BUG> if ( args . containsKey ( TariffListActivity . PARAM_SEARCH ) ) { <END_BUG> tariffSearchQuery = ( ( SearchTariffQuery ) ( args . getSerializable ( TariffListActivity . PARAM_SEARCH ) ) ) ; } else { tariffSearchQuery = complexPreferences . getObject ( CURRENT_SEARCH_QUERY , SearchTariffQuery . class ) ; } } @ AfterViews public void init ( ) { } @ OptionsItem ( id . action_settings ) public boolean menuSettingsSelected ( ) { } @ ItemClick ( id . tariffs_list ) public void tariffListItemClick ( Tariff selectedTariff ) { } @ Background public void doGetTarifsAsync ( ) { } @ UiThread public void bindTariffs ( ArrayList < Tariff > tariffs ) { } @ UiThread public void onError ( Exception ex ) { } public static void initialize ( Context context , SearchTariffQuery searchTariffQuery ) { } }

Fix:
if ( ( args != null ) && ( args . containsKey ( TariffListActivity . PARAM_SEARCH ) ) ) {
Buggy code:
public class AdjacencyListNode extends AbstractNode { protected static final int INITIAL_EDGE_CAPACITY = 16 ; protected static final double GROWTH_FACTOR = 1.1 ; protected static final char I_EDGE = 0 ; protected static final char IO_EDGE = 1 ; protected static final char O_EDGE = 2 ; protected AbstractEdge [ ] edges ; protected int ioStart ; protected int oStart ; protected int degree ; protected AdjacencyListNode ( AbstractGraph graph , String id ) { } protected char edgeType ( AbstractEdge e ) { } @ SuppressWarnings ( "unchecked" ) protected < T extends Edge > T locateEdge ( Node opposite , char type ) { } protected void removeEdge ( int i ) { } @ Override protected boolean addEdgeCallback ( AbstractEdge edge ) { } @ Override protected void removeEdgeCallback ( AbstractEdge edge ) { } @ Override protected void clearCallback ( ) { } @ Override public int getDegree ( ) { } @ Override public int getInDegree ( ) { } @ Override public int getOutDegree ( ) { } @ SuppressWarnings ( "unchecked" ) @ Override public < T extends Edge > T getEdge ( int i ) { } @ SuppressWarnings ( "unchecked" ) @ Override public < T extends Edge > T getEnteringEdge ( int i ) { } @ SuppressWarnings ( "unchecked" ) @ Override public < T extends Edge > T getLeavingEdge ( int i ) { if ( ( i < 0 ) || ( i >= ( getOutDegree ( ) ) ) ) throw new IndexOutOfBoundsException ( ( ( ( ( "Node<seq2seq4repair_space>\"" + ( this ) ) + "\"" ) + "<seq2seq4repair_space>has<seq2seq4repair_space>no<seq2seq4repair_space>edge<seq2seq4repair_space>" ) + i ) ) ; <START_BUG> return ( ( T ) ( edges [ ( ( oStart ) + i ) ] ) ) ; <END_BUG> } @ Override public < T extends Edge > T getEdgeBetween ( Node node ) { } @ Override public < T extends Edge > T getEdgeFrom ( Node node ) { } @ Override public < T extends Edge > T getEdgeToward ( Node node ) { } protected class EdgeIterator < T extends Edge > implements Iterator < T > { protected int iPrev ; protected int iNext ; protected int iEnd ; protected EdgeIterator ( char type ) { } public boolean hasNext ( ) { } @ SuppressWarnings ( "unchecked" ) public T next ( ) { } public void remove ( ) { } } @ Override public < T extends Edge > Iterator < T > getEdgeIterator ( ) { } @ Override public < T extends Edge > Iterator < T > getEnteringEdgeIterator ( ) { } @ Override public < T extends Edge > Iterator < T > getLeavingEdgeIterator ( ) { } }

Fix:
return ( ( T ) ( edges [ ( ( ioStart ) + i ) ] ) ) ;
Buggy code:
public class RestartHandler extends AbstractHandler { public Object execute ( ExecutionEvent event ) throws ExecutionException { if ( ( HandlerUtil . getActivePart ( event ) ) instanceof WotsView ) { WotsView view = ( ( WotsView ) ( HandlerUtil . getActivePart ( event ) ) ) ; <START_BUG> view . reset ( ) ; <END_BUG> } return null ; } }

Fix:
view . restart ( ) ;
Buggy code:
public class BayesianConcept { private final List < Point > points = new ArrayList < > ( ) ; private final Point mean ; private final Point stdDev ; public BayesianConcept ( final List < Point > points ) { } public BayesianConcept ( final Point ... points ) { } public static BayesianConcept randomConcept ( final int numDimensions , final Random random ) { } private static Point randomPoint ( final int numDimensions , final Random random ) { } public BayesianConcept update ( final Point point ) { <START_BUG> final List < Point > points = this . points ; <END_BUG> points . add ( point ) ; return new BayesianConcept ( points ) ; } public double likelihoodGiven ( final Point point ) { } private double pdf ( final double x , final double mu , final double sigma ) { } @ Override public String toString ( ) { } @ Override public boolean equals ( final Object obj ) { } @ Override public int hashCode ( ) { } }

Fix:
final List < Point > points = new ArrayList ( this . points ) ;
Buggy code:
abstract class XalanExecutor { protected AggregateTransformer caller ; private final void setCaller ( AggregateTransformer caller ) { } protected OutputStream getOutputStream ( ) throws IOException { } abstract void execute ( ) throws Exception { } static XalanExecutor newInstance ( AggregateTransformer caller ) throws BuildException { Class procVersion = null ; XalanExecutor executor = null ; try { procVersion = Class . forName ( "org.apache.xalan.processor.XSLProcessorVersion" ) ; executor = new Xalan2Executor ( ) ; } catch ( Exception xalan2missing ) { try { procVersion = Class . forName ( "org.apache.xalan.xslt.XSLProcessorVersion" ) ; <START_BUG> executor = ( ( XalanExecutor ) ( Class . forName ( "org.apache.tools.ant.taskdefs.optional.junit.Xalan1Executor()" ) . newInstance ( ) ) ) ; <END_BUG> } catch ( Exception xalan1missing ) { throw new BuildException ( "Could<seq2seq4repair_space>not<seq2seq4repair_space>find<seq2seq4repair_space>xalan2<seq2seq4repair_space>nor<seq2seq4repair_space>xalan1<seq2seq4repair_space>in<seq2seq4repair_space>the<seq2seq4repair_space>classpath.<seq2seq4repair_space>Check<seq2seq4repair_space>http:////xml.apache.org//xalan-j" ) ; } } String version = XalanExecutor . getXalanVersion ( procVersion ) ; caller . task . log ( ( "Using<seq2seq4repair_space>Xalan<seq2seq4repair_space>version:<seq2seq4repair_space>" + version ) ) ; executor . setCaller ( caller ) ; return executor ; } private static String getXalanVersion ( Class procVersion ) { } }

Fix:
executor = ( ( XalanExecutor ) ( Class . forName ( "org.apache.tools.ant.taskdefs.optional.junit.Xalan1Executor" ) . newInstance ( ) ) ) ;
Buggy code:
public class ReplicationWebFailoverTestCase extends ClusteredWebFailoverAbstractCase { @ Deployment ( name = DEPLOYMENT_1 , managed = false , testable = false ) @ TargetsContainer ( CONTAINER_1 ) public static Archive < ? > deployment0 ( ) { } @ Deployment ( name = DEPLOYMENT_2 , managed = false , testable = false ) @ TargetsContainer ( CONTAINER_2 ) public static Archive < ? > deployment1 ( ) { } private static Archive < ? > getDeployment ( ) { WebArchive war = ShrinkWrap . create ( WebArchive . class , "distributable.war" ) ; war . addClass ( SimpleServlet . class ) ; war . setWebXML ( ClusteredWebSimpleTestCase . class . getPackage ( ) , "web.xml" ) ; war . addClasses ( ViewChangeListenerServlet . class , ViewChangeListener . class , ViewChangeListenerBean . class ) ; war . setManifest ( new StringAsset ( "Manifest-Version:<seq2seq4repair_space>1.0\nDependencies:<seq2seq4repair_space>org.jboss.msc,<seq2seq4repair_space>org.jboss.as.clustering.common,<seq2seq4repair_space>org.infinispan\n" ) ) ; <START_BUG> System . out . println ( war . toString ( true ) ) ; <END_BUG> return war ; } }

Fix:
log . info ( war . toString ( true ) ) ;
Buggy code:
public final class LengthOperatorNode extends UnaryOperatorNode { private int parameterType ; private int parameterWidth ; public void setNodeType ( int nodeType ) { } public ValueNode bindExpression ( FromList fromList , SubqueryList subqueryList , Vector aggregateVector ) throws StandardException { TypeId operandType ; <START_BUG> super . bindExpression ( fromList , subqueryList , aggregateVector ) ; <END_BUG> operandType = operand . getTypeId ( ) ; switch ( operandType . getJDBCTypeId ( ) ) { case Types . CHAR : case Types . VARCHAR : case Types . BINARY : case Types . VARBINARY : case Types . LONGVARBINARY : case Types . LONGVARCHAR : case JDBC20Translation . SQL_TYPES_BLOB : case JDBC20Translation . SQL_TYPES_CLOB : break ; default : throw StandardException . newException ( LANG_UNARY_FUNCTION_BAD_TYPE , getOperatorString ( ) , operandType . getSQLTypeName ( ) ) ; } setType ( new org . apache . derby . iapi . types . DataTypeDescriptor ( TypeId . INTEGER_ID , operand . getTypeServices ( ) . isNullable ( ) ) ) ; return this ; } void bindParameter ( ) throws StandardException { } public String getReceiverInterfaceName ( ) { } }

Fix:
bindOperand ( fromList , subqueryList , aggregateVector ) ;
Buggy code:
public class PermutationMatrix { private final double [ ] [ ] matrix ; public PermutationMatrix ( double x1 , double y1 , double x2 , double y2 ) { } public PermutationMatrix ( double [ ] [ ] matrix ) { } public static PermutationMatrix generateIdentityMatrix ( ) { } public static PermutationMatrix generateFlipVMatrix ( ) { } public static PermutationMatrix generateFlipHMatrix ( ) { } public static PermutationMatrix generateRotationMatrix ( double angleInDegree ) { } public PermutationMatrix multiply ( PermutationMatrix pm ) { } public double [ ] [ ] getMatrix ( ) { } public void roundToIntegers ( ) { } private double round ( double x ) { <START_BUG> DecimalFormat df = new DecimalFormat ( "#.##" ) ; <END_BUG> df . setRoundingMode ( RoundingMode . HALF_UP ) ; return Double . valueOf ( df . format ( x ) ) ; } @ Override public int hashCode ( ) { } @ Override public boolean equals ( Object obj ) { } }

Fix:
DecimalFormat df = new DecimalFormat ( "#.####" ) ;
Buggy code:
public class CreateCompilationUnitOperation extends JavaModelOperation { protected String fName ; protected String fSource = null ; public CreateCompilationUnitOperation ( IPackageFragment parentElement , String name , String source , boolean force ) { } protected void executeOperation ( ) throws JavaModelException { beginTask ( Util . bind ( "operation.createUnitProgress" ) , 2 ) ; JavaElementDelta delta = newJavaElementDelta ( ) ; ICompilationUnit unit = getCompilationUnit ( ) ; IPackageFragment pkg = ( ( IPackageFragment ) ( getParentElement ( ) ) ) ; IContainer folder = ( ( IContainer ) ( pkg . getUnderlyingResource ( ) ) ) ; worked ( 1 ) ; IFile compilationUnitFile = folder . getFile ( new Path ( fName ) ) ; if ( compilationUnitFile . exists ( ) ) { if ( fForce ) { unit . getBuffer ( ) . setContents ( fSource ) ; unit . save ( new NullProgressMonitor ( ) , false ) ; fResultElements = new IJavaElement [ ] { unit } ; if ( unit . getParent ( ) . exists ( ) ) { for ( int i = 0 ; i < ( fResultElements . length ) ; i ++ ) { delta . changed ( fResultElements [ i ] , IJavaElementDelta . F_CONTENT ) ; } addDelta ( delta ) ; } } else { throw new JavaModelException ( new JavaModelStatus ( IJavaModelStatusConstants . NAME_COLLISION ) ) ; } } else { try { <START_BUG> String encoding = ( ( String ) ( JavaCore . getOptions ( ) . get ( JavaCore . CORE_ENCODING ) ) ) ; <END_BUG> InputStream stream = new ByteArrayInputStream ( ( encoding == null ? fSource . getBytes ( ) : fSource . getBytes ( encoding ) ) ) ; createFile ( folder , unit . getElementName ( ) , stream , false ) ; fResultElements = new IJavaElement [ ] { unit } ; if ( unit . getParent ( ) . exists ( ) ) { for ( int i = 0 ; i < ( fResultElements . length ) ; i ++ ) { delta . added ( fResultElements [ i ] ) ; } addDelta ( delta ) ; } } catch ( IOException e ) { throw new JavaModelException ( e , IJavaModelStatusConstants . IO_EXCEPTION ) ; } } worked ( 1 ) ; done ( ) ; } protected ICompilationUnit getCompilationUnit ( ) { } public IJavaModelStatus verify ( ) { } }

Fix:
String encoding = JavaCore . getOption ( JavaCore . CORE_ENCODING ) ;
Buggy code:
public class Group implements Steppable { public static final int MINIMUM_GROUP_SIZE = 3 ; public static final int MINIMUM_START_GROUP_SIZE = 3 ; public static final int MAXIMUM_START_GROUP_SIZE = 8 ; public static final double RECRUITMENT_REQUIRED = 0.6 ; public static final double LIKELIHOOD_OF_RANDOMLY_LEAVING_GROUP = 0.1 ; public static double LIKELIHOOD_OF_RANDOMLY_CHANGING_ATTRIBUTE = 0.1 ; public static final int NUM_PEOPLE_TO_RECRUIT = 10 ; private static int nextGroupId = 0 ; private int id ; private double recruitmentFactor ; private ArrayList < Person > students ; public Group ( ) { } private void selectStartingStudents ( ) { } private ArrayList < Person > findStudentsToRecruit ( ArrayList < Person > people ) { } private void recruitStudent ( Person s ) { } private boolean groupContainsStudent ( Person p ) { } public double affinityTo ( Person p ) { } private void influenceMembers ( ) { } private void possiblyLeaveGroup ( Person p ) { } public void step ( SimState state ) { System . out . println ( ( ( ( ( "####<seq2seq4repair_space>GROUP<seq2seq4repair_space>" + ( id ) ) + "<seq2seq4repair_space>(" ) + ( state . schedule . getTime ( ) ) ) + ")" ) ) ; influenceMembers ( ) ; ArrayList < Person > recruits = findStudentsToRecruit ( Sim . getPeople ( ) ) ; for ( int x = 0 ; x < ( recruits . size ( ) ) ; x ++ ) { recruitStudent ( recruits . get ( x ) ) ; } for ( int x = 0 ; x < ( students . size ( ) ) ; x ++ ) { possiblyLeaveGroup ( students . get ( x ) ) ; } if ( Sim . instance ( ) . nextMonthInAcademicYear ( ) ) { Sim . instance ( ) . schedule . scheduleOnceIn ( 1 , this ) ; } else { <START_BUG> Sim . instance ( ) . schedule . scheduleOnceIn ( NUM_MONTHS_IN_SUMMER , this ) ; <END_BUG> } } public void setRecruitmentFactor ( double r ) { } public int getSize ( ) { } public double getRecruitmentFactor ( ) { } private void listMembers ( ) { } public int getID ( ) { } public Person getPersonAtIndex ( int x ) { } public void removeStudent ( Person p ) { } public void removeEveryoneFromGroup ( ) { } }

Fix:
Sim . instance ( ) . schedule . scheduleOnceIn ( ( ( Sim . NUM_MONTHS_IN_SUMMER ) + 1 ) , this ) ;
Buggy code:
public class GroupDirectory { private static final String BASE_URL = "https:////developers.google.com" ; private static final String DIRECTORY_URL = "https:////hub.gdgx.io//api//v1//chapters?perpage=-1" ; private static final String ALL_CALENDAR_URL = ( GroupDirectory . BASE_URL ) + "//events//calendar//fc?start=1366581600&end=1367186400&_=1366664352089" ; private static final String GDL_CALENDAR_URL = ( GroupDirectory . BASE_URL ) + "//events//calendar//fc?calendar=gdl&start=1366581600&end=1367186400&_=1366664644691" ; private static final String CHAPTER_CALENDAR_URL = ( GroupDirectory . BASE_URL ) + "//events//feed//json" ; private static final String TAGGED_EVENTS_URL = "https:////hub.gdgx.io//api//v1//events//tag//" ; private static final String EVENT_DETAIL_URL = "https:////hub.gdgx.io//api//v1//events//" ; private static final String SHOWCASE_NEXT_URL = ( GroupDirectory . BASE_URL ) + "//showcase//next" ; private static final String PULSE_URL = ( GroupDirectory . BASE_URL ) + "//devreldash//gdg//pulse_stats//" ; private static final String COUNTRY_PULSE_URL = ( GroupDirectory . BASE_URL ) + "//devreldash//gdg//pulse_stats//%s//" ; private static final String LOG_TAG = "GDG-GroupDirectory" ; public GroupDirectory ( ) { } public ApiRequest getDirectory ( Response . Listener < Directory > successListener , Response . ErrorListener errorListener ) { } public ApiRequest getPulse ( Response . Listener < Pulse > successListener , Response . ErrorListener errorListener ) { } public ApiRequest getCountryPulse ( String country , Response . Listener < Pulse > successListener , Response . ErrorListener errorListener ) { } public ApiRequest getEvent ( String eventId , Response . Listener < EventFullDetails > successListener , Response . ErrorListener errorListener ) { <START_BUG> GsonRequest < Void , EventFullDetails > eventReq = new GsonRequest < Void , EventFullDetails > ( Method . GET , ( ( GroupDirectory . EVENT_DETAIL_URL ) + eventId ) , EventFullDetails . class , successListener , errorListener , GsonRequest . getGson ( FieldNamingPolicy . LOWER_CASE_WITH_UNDERSCORES , new ZuluDateTimeDeserializer ( ) ) ) ; <END_BUG> eventReq . setRetryPolicy ( new DefaultRetryPolicy ( 60000 , DefaultRetryPolicy . DEFAULT_MAX_RETRIES , DefaultRetryPolicy . DEFAULT_BACKOFF_MULT ) ) ; return new ApiRequest ( eventReq ) ; } public ApiRequest getChapterEventList ( final DateTime start , final DateTime end , final String chapterId , Response . Listener < ArrayList < Event > > successListener , Response . ErrorListener errorListener ) { } public ApiRequest getTaggedEventList ( final DateTime start , final DateTime end , final String tag , Response . Listener < PagedList < TaggedEvent > > successListener , Response . ErrorListener errorListener ) { } }

Fix:
GsonRequest < Void , EventFullDetails > eventReq = new GsonRequest < Void , EventFullDetails > ( Method . GET , ( ( GroupDirectory . EVENT_DETAIL_URL ) + eventId ) , EventFullDetails . class , successListener , errorListener , GsonRequest . getGson ( FieldNamingPolicy . IDENTITY , new ZuluDateTimeDeserializer ( ) ) ) ;
Buggy code:
public class MainActivity extends AppCompatActivity { private EditText groupSearch ; private RecyclerViewAdapter recyclerViewAdapter ; private ArrayList < VslaDataModel > _vslaDataModel ; private LinearLayout empty_view ; private LedgerLinkUtils ledgerLinkUtils ; private ProgressDialog progressDialog ; private UrlConstants constants = new UrlConstants ( ) ; private String vslaName ; private String groupRepresentativeName ; private String groupRepresentativePost ; private String groupRepresentativePhoneNumber ; private String groupBankAccount ; private String physicalAddress ; private String regionName ; private String groupPhoneNumber ; private String locationCoordinates ; private String groupSupportType ; private String TechnicalTrainerId ; private int VslaId ; @ Override protected void onCreate ( Bundle savedInstanceState ) { } private void initializeUIComponents ( ) { } private void uploadUnsentData ( int position ) { } private void updateDatabaseToSent ( ) { } private void showToastMessage ( String toastMessage ) { } private void validateSearchQuery ( String serverUrl ) { <START_BUG> String searchTerm = groupSearch . getText ( ) . toString ( ) ; <END_BUG> if ( ! ( ledgerLinkUtils . isInternetOn ( this ) ) ) { showToastMessage ( "No<seq2seq4repair_space>Internet<seq2seq4repair_space>Connection" ) ; } else if ( searchTerm . isEmpty ( ) ) { groupSearch . setError ( "Invalid<seq2seq4repair_space>Search<seq2seq4repair_space>Term" ) ; } else { groupSearch . setError ( null ) ; searchForGroupInformation ( searchTerm , serverUrl ) ; } } private void searchForGroupInformation ( String keyWord , String url ) { } private class queryDatabaseForGroupsAsyncTask extends AsyncTask < Void , Void , List < VslaDataModel > > { @ Override protected List < VslaDataModel > doInBackground ( Void ... params ) { } @ Override protected void onPostExecute ( List < VslaDataModel > vslaDataModels ) { } } private class HttpAsyncTaskClass extends AsyncTask < String , Integer , String > { @ Override protected void onPreExecute ( ) { } @ Override protected String doInBackground ( String ... params ) { } @ Override protected void onPostExecute ( String response ) { } } private void showResultFeedback ( String operationType , String operationResult ) { } }

Fix:
String searchTerm = groupSearch . getText ( ) . toString ( ) . replace ( "<seq2seq4repair_space>" , "" ) ;
Buggy code:
public final class SharedNothingBackupActivation extends Activation { private ReplicaPolicy replicaPolicy ; private ReplicationEndpoint replicationEndpoint ; private final ActiveMQServerImpl activeMQServer ; private SharedNothingBackupQuorum backupQuorum ; private final boolean attemptFailBack ; private final Map < String , Object > activationParams ; private final ShutdownOnCriticalErrorListener shutdownOnCriticalIO ; private String nodeID ; ClusterControl clusterControl ; private boolean closed ; private volatile boolean backupUpToDate = true ; private final ReusableLatch backupSyncLatch = new ReusableLatch ( 0 ) ; public SharedNothingBackupActivation ( ActiveMQServerImpl activeMQServer , boolean attemptFailBack , Map < String , Object > activationParams , ActiveMQServerImpl . ShutdownOnCriticalErrorListener shutdownOnCriticalIO , ReplicaPolicy replicaPolicy ) { } public void init ( ) throws Exception { } public void run ( ) { } public void close ( final boolean permanently , boolean restarting ) throws Exception { } @ Override public void preStorageClose ( ) throws Exception { } @ Override public JournalLoader createJournalLoader ( PostOffice postOffice , PagingManager pagingManager , StorageManager storageManager , QueueFactory queueFactory , NodeManager nodeManager , ManagementService managementService , GroupingHandler groupingHandler , Configuration configuration , ActiveMQServer parentServer ) throws ActiveMQException { <START_BUG> if ( ( replicaPolicy . getScaleDownPolicy ( ) ) != null ) { <END_BUG> return new BackupRecoveryJournalLoader ( postOffice , pagingManager , storageManager , queueFactory , nodeManager , managementService , groupingHandler , configuration , parentServer , ScaleDownPolicy . getScaleDownConnector ( replicaPolicy . getScaleDownPolicy ( ) , activeMQServer ) , activeMQServer . getClusterManager ( ) . getClusterController ( ) ) ; } else { return super . createJournalLoader ( postOffice , pagingManager , storageManager , queueFactory , nodeManager , managementService , groupingHandler , configuration , parentServer ) ; } } @ Override public void haStarted ( ) { } public boolean waitForBackupSync ( long timeout , TimeUnit unit ) throws InterruptedException { } public void failOver ( final ReplicationLiveIsStoppingMessage . LiveStopping finalMessage ) { } public ReplicationEndpoint getReplicationEndpoint ( ) { } public boolean isRemoteBackupUpToDate ( ) { } public void setRemoteBackupUpToDate ( ) { } public void remoteFailOver ( ReplicationLiveIsStoppingMessage . LiveStopping finalMessage ) throws ActiveMQException { } private class EndpointConnector implements Runnable { @ Override public void run ( ) { } private synchronized ReplicationEndpoint connectToReplicationEndpoint ( final ClusterControl control ) throws Exception { } } }

Fix:
if ( ( ( replicaPolicy . getScaleDownPolicy ( ) ) != null ) && ( replicaPolicy . getScaleDownPolicy ( ) . isEnabled ( ) ) ) {
Buggy code:
public class GlobalFeatureData { public static final int BINNED_BUCKET = 8 ; public static final int MAX_CHILD_NUM = 5 ; public static final int MAX_SPAN_LENGTH = 5 ; public static final int MAX_FEATURE_NUM = 7 ; int size ; LocalFeatureData lfd ; DependencyPipe pipe ; Parameters parameters ; SyntacticFeatureFactory synFactory ; DependencyInstance inst ; double gamma ; double [ ] cn ; double [ ] span ; double [ ] nb ; double [ ] ppcc1 ; double [ ] cc2 ; double [ ] nonproj ; public GlobalFeatureData ( LocalFeatureData lfd ) { } public FeatureVector getPPFeatureVector ( int gp , int h , int m ) { } public FeatureVector getCC1FeatureVector ( int left , int arg , int right ) { } public FeatureVector getCC2FeatureVector ( int arg , int head , int child ) { } public FeatureVector getPNXFeatureVector ( int head , int arg , int pair ) { } public FeatureVector getSpanFeatureVector ( int h , int end , int punc , int bin ) { } public FeatureVector getNeighborFeatureVector ( int par , int h , int left , int right ) { } public FeatureVector getChildNumFeatureVector ( int h , int leftNum , int rightNum ) { } public FeatureVector getNonprojFeatureVector ( DependencyArcList arclis , int h , int m ) { } public double getPPScore ( int gp , int h , int m ) { } public double getCC1Score ( int left , int arg , int right ) { } public double getCC2Score ( int arg , int head , int child ) { } public double getPNXScore ( int head , int arg , int pair ) { } public double getSpanScore ( int h , int end , int punc , int bin ) { } public double getNeighborScore ( int par , int h , int left , int right ) { int id = lfd . arc2id [ ( ( h * ( lfd . len ) ) + par ) ] ; int size = ( pipe . dictionaries . size ( POS ) ) + 1 ; Utils . Assert ( ( id >= 0 ) ) ; int pos = ( ( ( id * size ) + left ) * size ) + right ; if ( ( nb [ pos ] ) == ( LocalFeatureData . NULL ) ) { ScoreCollector col = new ScoreCollector ( parameters ) ; <START_BUG> synFactory . createNeighborFeatureVector ( col , inst , par , id , left , right ) ; <END_BUG> nb [ pos ] = ( col . score ) * ( gamma ) ; } return nb [ pos ] ; } public double getChildNumScore ( int h , int leftNum , int rightNum ) { } public double getNonprojScore ( DependencyArcList arclis , int h , int m ) { } public FeatureVector getFeatureVector ( DependencyInstance now ) { } public double getScore ( DependencyInstance now , DependencyArcList arcLis ) { } public double getScore ( int [ ] heads , DependencyArcList arcLis ) { } public FeatureVector getFeatureDifference ( DependencyInstance gold , DependencyInstance pred ) { } }

Fix:
synFactory . createNeighborFeatureVector ( col , inst , par , h , left , right ) ;
Buggy code:
public class TaskViewModelTest { @ Test public void test1 ( ) throws Throwable { TaskDto root = new TaskDto ( "root" ) ; root . addChild ( new TaskDto ( "firstChild" ) ) ; root . addChild ( new TaskDto ( "secondChild" ) ) ; <START_BUG> TaskViewModel model = new TaskViewModel ( root ) ; <END_BUG> assertThat ( model . getChildrenViews ( ) ) . hasSize ( 2 ) ; model . addNewChild ( ) ; assertThat ( model . getChildrenViews ( ) ) . hasSize ( 3 ) ; } }

Fix:
TaskViewModel model = new TaskViewModel ( root , null , true ) ;
Buggy code:
public class Model implements IModel { private static final long serialVersionUID = 3031804965001519439L ; private Serializable object ; public Model ( ) { } public Model ( final Serializable object ) { } public Object getObject ( ) { } public void setObject ( Object object ) { if ( object != null ) { if ( ! ( object instanceof Serializable ) ) { <START_BUG> throw new RuntimeException ( "object<seq2seq4repair_space>must<seq2seq4repair_space>be<seq2seq4repair_space>Serializable" ) ; <END_BUG> } } setObject ( ( ( Serializable ) ( object ) ) ) ; } public void setObject ( Serializable object ) { } }

Fix:
throw new RuntimeException ( "Model<seq2seq4repair_space>object<seq2seq4repair_space>must<seq2seq4repair_space>be<seq2seq4repair_space>Serializable" ) ;
Buggy code:
public class Console extends MainWindowPanel { private static final long serialVersionUID = - 8707628278434660233L ; protected static final int HEIGHT = 200 ; private JTextPane console = new JTextPane ( ) ; private StyledDocument log = console . getStyledDocument ( ) ; public Console ( final ConfigurationSet conf ) { } public StyledDocument getStyledDocument ( ) { } public void resetCaret ( ) { <START_BUG> console . setCaretPosition ( console . getText ( ) . length ( ) ) ; <END_BUG> } }

Fix:
console . setCaretPosition ( log . getLength ( ) ) ;
Buggy code:
@ RunWith ( Arquillian . class ) @ RunAsClient public class ManagedAsClientTestCase extends AbstractContainerTestCase { @ Deployment public static JavaArchive createDeployment ( ) throws Exception { } @ Override protected MBeanServerConnection getMBeanServer ( ) throws Exception { <START_BUG> MBeanServerConnectionProvider provider = new MBeanServerConnectionProvider ( InetAddress . getLocalHost ( ) , 1090 ) ; <END_BUG> return provider . getConnection ( ) ; } }

Fix:
MBeanServerConnectionProvider provider = new MBeanServerConnectionProvider ( InetAddress . getByName ( "127.0.0.1" ) , 1090 ) ;