nus-yam/ex-repair huggingface dataset:
Buggy code:
public class IDA2 extends IDASolverInterface { int [ ] [ ] [ ] [ ] memo ; int [ ] [ ] [ ] pos_dest ; int [ ] pos ; IDA2 ( ) { } void precalculateFace ( int f ) { } int estimate ( Cube C ) { } int solveTwoPositions ( int sx , int sy , int ex , int ey ) { <START_BUG> if ( ( memo [ sx ] [ sy ] [ ex ] [ ey ] ) == ( - 1 ) ) <END_BUG> return memo [ sx ] [ sy ] [ ex ] [ ey ] ; Queue < Node > Q = new LinkedList < Node > ( ) ; Set < Node > S = new HashSet < Node > ( ) ; Node aux = new Node ( sx , sy , 0 ) ; Q . add ( aux ) ; S . add ( aux ) ; while ( ! ( Q . isEmpty ( ) ) ) { Node cur = Q . poll ( ) ; if ( ( ( cur . x ) == ex ) && ( ( cur . y ) == ey ) ) { memo [ sx ] [ sy ] [ ex ] [ ey ] = cur . dist ; return cur . dist ; } for ( int i = 0 ; i < 6 ; ++ i ) { for ( int j = 0 ; j < 3 ; ++ j ) { aux = new Node ( pos_dest [ cur . x ] [ i ] [ j ] , pos_dest [ cur . y ] [ i ] [ j ] , ( ( cur . dist ) + 1 ) ) ; if ( ! ( S . contains ( aux ) ) ) { Q . add ( aux ) ; S . add ( aux ) ; } } } } memo [ sx ] [ sy ] [ ex ] [ ey ] = INF ; return INF ; } }

Fix:
if ( ( memo [ sx ] [ sy ] [ ex ] [ ey ] ) != ( - 1 ) )
Buggy code:
public final class BinaryTypeBinding extends ReferenceBinding { private ReferenceBinding superclass ; private ReferenceBinding enclosingType ; private ReferenceBinding [ ] superInterfaces ; private FieldBinding [ ] fields ; private MethodBinding [ ] methods ; private ReferenceBinding [ ] memberTypes ; private LookupEnvironment environment ; public BinaryTypeBinding ( PackageBinding packageBinding , IBinaryType binaryType , LookupEnvironment environment ) { } public FieldBinding [ ] availableFields ( ) { } public MethodBinding [ ] availableMethods ( ) { } void cachePartsFrom ( IBinaryType binaryType , boolean needFieldsAndMethods ) { } private void createFields ( IBinaryField [ ] iFields ) { } private MethodBinding createMethod ( IBinaryMethod method ) { } private void createMethods ( IBinaryMethod [ ] iMethods ) { } public ReferenceBinding enclosingType ( ) { } public FieldBinding [ ] fields ( ) { } public MethodBinding getExactConstructor ( TypeBinding [ ] argumentTypes ) { } public MethodBinding getExactMethod ( char [ ] selector , TypeBinding [ ] argumentTypes ) { } public FieldBinding getField ( char [ ] fieldName , boolean needResolve ) { } public ReferenceBinding getMemberType ( char [ ] typeName ) { for ( int i = this . memberTypes . length ; ( -- i ) >= 0 ; ) { ReferenceBinding memberType = this . memberTypes [ i ] ; if ( memberType instanceof UnresolvedReferenceBinding ) { char [ ] name = memberType . sourceName ; <START_BUG> int prefixLength = ( this . sourceName . length ) + 1 ; <END_BUG> if ( ( name . length ) == ( prefixLength + ( typeName . length ) ) ) if ( CharOperation . fragmentEquals ( typeName , name , prefixLength , true ) ) return this . memberTypes [ i ] = ( ( UnresolvedReferenceBinding ) ( memberType ) ) . resolve ( environment ) ; } else if ( CharOperation . equals ( typeName , memberType . sourceName ) ) { return memberType ; } } return null ; } public MethodBinding [ ] getMethods ( char [ ] selector ) { } public boolean hasMemberTypes ( ) { } public ReferenceBinding [ ] memberTypes ( ) { } public MethodBinding [ ] methods ( ) { } TypeBinding resolveType ( TypeBinding type ) { } private FieldBinding resolveTypeFor ( FieldBinding field ) { } private MethodBinding resolveTypesFor ( MethodBinding method ) { } public ReferenceBinding superclass ( ) { } public ReferenceBinding [ ] superInterfaces ( ) { } MethodBinding [ ] unResolvedMethods ( ) { } public String toString ( ) { } }

Fix:
int prefixLength = ( this . compoundName [ ( ( this . compoundName . length ) - 1 ) ] . length ) + 1 ;
Buggy code:
public class LocaleFirstMapper extends AbstractComponentMapper { private final IRequestMapper chain ; public LocaleFirstMapper ( final IRequestMapper chain ) { } public int getCompatibilityScore ( final Request request ) { } public IRequestHandler mapRequest ( Request request ) { List < String > segments = request . getUrl ( ) . getSegments ( ) ; if ( ( segments != null ) && ( ( segments . size ( ) ) > 1 ) ) { String localeAsString = segments . get ( 0 ) ; if ( ! ( Strings . isEmpty ( localeAsString ) ) ) { Locale locale = LocaleHelper . parseLocale ( localeAsString ) ; Session . get ( ) . setLocale ( locale ) ; Url url = request . getUrl ( ) ; url . getSegments ( ) . remove ( 0 ) ; <START_BUG> request = request . requestWithUrl ( url ) ; <END_BUG> } } return chain . mapRequest ( request ) ; } public Url mapHandler ( IRequestHandler handler ) { } }

Fix:
request = request . cloneWithUrl ( url ) ;
Buggy code:
public class JenkinsJobExecutor { private ScheduledExecutorService service = null ; private ExecutorService executor = Executors . newCachedThreadPool ( ) ; private JenkinsJobExecutor ( ) { } private static JenkinsJobExecutor instance = null ; public static final JenkinsJobExecutor getInstance ( ) { } public static boolean checkJenkinsMasterReady ( JenkinsMaster master , long start , long timeout ) { } public static Map < String , ConcurrentLinkedQueue < String > > QueueHolder = new HashMap < String , ConcurrentLinkedQueue < String > > ( ) ; public void start ( ) { } private boolean checkVMReady ( VMModel vm , ConcurrentLinkedQueue < String > queue ) { while ( true ) { vm = VMHelper . getVMByID ( vm . getId ( ) ) ; switch ( vm . getStatus ( ) ) { case Initializing : queue . add ( ( "vm-log-" + ( vm . getId ( ) ) ) ) ; try { Thread . sleep ( 1000 ) ; } catch ( InterruptedException e1 ) { Logger . debug ( "Interrupted<seq2seq4repair_space>sleeping<seq2seq4repair_space>thread" , e1 ) ; } continue ; case Error : queue . add ( ( ( "VM<seq2seq4repair_space>" + ( vm . getPublicIP ( ) ) ) + "<seq2seq4repair_space>has<seq2seq4repair_space>occurred<seq2seq4repair_space>some<seq2seq4repair_space>errors<seq2seq4repair_space>in<seq2seq4repair_space>initialization<seq2seq4repair_space>phase" ) ) ; VMHelper . removeVM ( vm ) ; VMModel jenkins = VMHelper . getVMsByGroupID ( vm . getGroup ( ) . getId ( ) , new BasicDBObject ( "jenkins" , true ) ) . get ( 0 ) ; try { <START_BUG> VMHelper . getKnife ( ) . deleteNode ( vm . getName ( ) ) ; <END_BUG> } catch ( Exception e ) { Logger . debug ( "Cloud<seq2seq4repair_space>not<seq2seq4repair_space>release<seq2seq4repair_space>chef<seq2seq4repair_space>node" , e ) ; } try { new org . ats . jenkins . JenkinsSlave ( new JenkinsMaster ( jenkins . getPublicIP ( ) , "http" , 8080 ) , vm . getPublicIP ( ) ) . release ( ) ; } catch ( IOException e ) { Logger . debug ( "Could<seq2seq4repair_space>not<seq2seq4repair_space>release<seq2seq4repair_space>jenkins<seq2seq4repair_space>node<seq2seq4repair_space>" , e ) ; } CloudStackClient client = VMHelper . getCloudStackClient ( ) ; try { VirtualMachineAPI . destroyVM ( client , vm . getId ( ) , true ) ; } catch ( IOException e ) { Logger . debug ( "Cloud<seq2seq4repair_space>not<seq2seq4repair_space>destroy<seq2seq4repair_space>vm" , e ) ; } return false ; case Ready : vm . setStatus ( Running ) ; VMHelper . updateVM ( vm ) ; return true ; default : return false ; } } } private void runTest ( TestProjectModel project , JenkinsMaster jenkinsMaster , JenkinsJobModel jobModel , VMModel vm ) { } public void stop ( ) { } }

Fix:
VMHelper . getKnife ( jenkins ) . deleteNode ( vm . getName ( ) ) ;
Buggy code:
public class SwitchManager implements ISwitchManager { private NFSManager nfsManager ; private BootImageManager bootImageManager ; private FPGAManager fpgaManager ; private IConfigurationCenter configurationCenter ; public SwitchManager ( LDMCore ldmCore ) { } @ Override public void changeConnectionPropertyFromNFS ( Integer switchID , String controllerIP , int controllerPort ) throws IOException , InterruptedException { Map < String , String > nfsMapping = configurationCenter . getSwitchId2NFSRootDirectoryMapping ( ) ; String nfsRootPath = nfsMapping . get ( switchID . toString ( ) ) ; Process process2Copy = Runtime . getRuntime ( ) . exec ( ( "cp<seq2seq4repair_space>-r<seq2seq4repair_space>//export//backup<seq2seq4repair_space>//export//" + ( switchID . toString ( ) ) ) ) ; process2Copy . waitFor ( ) ; Logger . getAnonymousLogger ( ) . info ( ( "cp<seq2seq4repair_space>-r<seq2seq4repair_space>//export//backup<seq2seq4repair_space>//export//" + ( switchID . toString ( ) ) ) ) ; nfsManager . changeConnecitonPropertyFromNFS ( switchID , nfsRootPath , controllerIP , controllerPort ) ; Process process2Chmod = Runtime . getRuntime ( ) . exec ( ( ( "chmod<seq2seq4repair_space>-R<seq2seq4repair_space>777<seq2seq4repair_space>" + ( switchID . toString ( ) ) ) + "//" ) ) ; process2Chmod . waitFor ( ) ; <START_BUG> Logger . getAnonymousLogger ( ) . info ( ( ( "chmod<seq2seq4repair_space>-R<seq2seq4repair_space>777<seq2seq4repair_space>" + ( switchID . toString ( ) ) ) + "//" ) ) ; <END_BUG> } @ Override public void resetSwitchConf ( Integer switchID ) throws IOException , InterruptedException { } }

Fix:
Logger . getAnonymousLogger ( ) . info ( ( ( ( "chmod<seq2seq4repair_space>-R<seq2seq4repair_space>777<seq2seq4repair_space>" + "//export//" ) + ( switchID . toString ( ) ) ) + "//" ) ) ;
Buggy code:
@ RunWith ( Arquillian . class ) @ RunAsClient public class EJBClientClusterConfigurationTestCase { private static final Logger logger = Logger . getLogger ( EJBClientClusterConfigurationTestCase . class ) ; private static final String MODULE_NAME = "server-to-server-clustered-ejb-invocation" ; private static final String DEFAULT_JBOSSAS = "default-jbossas" ; private static final String JBOSSAS_WITH_REMOTE_OUTBOUND_CONNECTION = "jbossas-with-remote-outbound-connection" ; private static final String DEFAULT_AS_DEPLOYMENT = "default-jbossas-deployment" ; private static final String DEPLOYMENT_WITH_JBOSS_EJB_CLIENT_XML = "other-deployment" ; private static final String DEFAULT_JBOSSAS_NODE_NAME = "default-jbossas" ; private static final String JBOSSAS_WITH_OUTBOUND_CONNECTION_NODE_NAME = "jbossas-with-remote-outbound-connection" ; @ ArquillianResource private ContainerController container ; @ ArquillianResource private Deployer deployer ; private static Context context ; private static ContextSelector < EJBClientContext > previousClientContextSelector ; @ BeforeClass public static void beforeClass ( ) throws Exception { } @ AfterClass public static void afterClass ( ) { } @ Deployment ( name = EJBClientClusterConfigurationTestCase . DEFAULT_AS_DEPLOYMENT , managed = false , testable = false ) @ TargetsContainer ( EJBClientClusterConfigurationTestCase . DEFAULT_JBOSSAS ) public static Archive createContainer1Deployment ( ) { } @ Deployment ( name = EJBClientClusterConfigurationTestCase . DEPLOYMENT_WITH_JBOSS_EJB_CLIENT_XML , managed = false , testable = false ) @ TargetsContainer ( EJBClientClusterConfigurationTestCase . JBOSSAS_WITH_REMOTE_OUTBOUND_CONNECTION ) public static Archive createContainer2Deployment ( ) { final JavaArchive ejbJar = ShrinkWrap . create ( JavaArchive . class , ( ( EJBClientClusterConfigurationTestCase . MODULE_NAME ) + ".jar" ) ) ; <START_BUG> ejbJar . addClasses ( ClusteredStatefulNodeNameEcho . class , NonClusteredStatefulNodeNameEcho . class , NodeNameEcho . class , ApplicationSpecificClusterNodeSelector . class ) ; <END_BUG> ejbJar . addAsManifestResource ( NonClusteredStatefulNodeNameEcho . class . getPackage ( ) , "jboss-ejb-client.xml" , "jboss-ejb-client.xml" ) ; return ejbJar ; } @ Test public void testServerToServerClusterFormation ( ) throws Exception { } private static ContextSelector < EJBClientContext > setupEJBClientContextSelector ( ) throws IOException { } }

Fix:
ejbJar . addClasses ( ClusteredStatefulNodeNameEcho . class , CustomDeploymentNodeSelector . class , NonClusteredStatefulNodeNameEcho . class , NodeNameEcho . class , ApplicationSpecificClusterNodeSelector . class ) ;
Buggy code:
public class ColumbaTrayIcon { private static final Logger LOG = Logger . getLogger ( "org.columba.core.trayicon" ) ; public static final Icon DEFAULT_ICON = ImageLoader . getImageIcon ( "trayicon.png" ) ; private static ColumbaTrayIcon instance = new ColumbaTrayIcon ( ) ; private JPopupMenu menu ; private TrayIconInterface activeIcon ; protected ColumbaTrayIcon ( ) { } public static ColumbaTrayIcon getInstance ( ) { } public void addToSystemTray ( ) { activeIcon . addToTray ( ColumbaTrayIcon . DEFAULT_ICON , "Columba" ) ; activeIcon . setPopupMenu ( menu ) ; <START_BUG> ShutdownManager . getShutdownManager ( ) . register ( new Runnable ( ) { <END_BUG> public void run ( ) { ColumbaTrayIcon . getInstance ( ) . removeFromSystemTray ( ) ; } } ) ; } public void setTooltip ( String tooltip ) { } public void setIcon ( Icon icon ) { } public void removeFromSystemTray ( ) { } private void initPopupMenu ( ) { } public TrayIconInterface getActiveIcon ( ) { } public void setActiveIcon ( TrayIconInterface activeIcon ) { } }

Fix:
ShutdownManager . getInstance ( ) . register ( new Runnable ( ) {
Buggy code:
public class SobolSequenceGenerator implements RandomVectorGenerator { private static final int BITS = 52 ; private static final double SCALE = FastMath . pow ( 2 , SobolSequenceGenerator . BITS ) ; private static final int MAX_DIMENSION = 1000 ; private static final String RESOURCE_NAME = "//assets//org//apache//commons//math3//random//new-joe-kuo-6.1000" ; private static final String FILE_CHARSET = "US-ASCII" ; private final int dimension ; private int count = 0 ; private final long [ ] [ ] direction ; private final long [ ] x ; public SobolSequenceGenerator ( final int dimension ) throws OutOfRangeException { } public SobolSequenceGenerator ( final int dimension , final InputStream is ) throws IOException , MathParseException , NotStrictlyPositiveException { } private int initFromStream ( final InputStream is ) throws IOException , MathParseException { } private void initDirectionVector ( final int d , final int a , final int [ ] m ) { } public double [ ] nextVector ( ) { final double [ ] v = new double [ dimension ] ; if ( ( count ) == 0 ) { ( count ) ++ ; return v ; } int c = 1 ; int value = ( count ) - 1 ; while ( ( value & 1 ) == 1 ) { value >>= 1 ; c ++ ; } for ( int i = 0 ; i < ( dimension ) ; i ++ ) { <START_BUG> x [ i ] = ( x [ i ] ) ^ ( direction [ i ] [ c ] ) ; <END_BUG> v [ i ] = ( ( double ) ( x [ i ] ) ) // ( SobolSequenceGenerator . SCALE ) ; } ( count ) ++ ; return v ; } public double [ ] skipTo ( final int index ) throws NotPositiveException { } public int getNextIndex ( ) { } }

Fix:
x [ i ] ^= direction [ i ] [ c ] ;
Buggy code:
public class MVCCPortalCacheTest { @ ClassRule @ Rule public static final AggregateTestRule aggregateTestRule = new AggregateTestRule ( CodeCoverageAssertor . INSTANCE , AspectJNewEnvTestRule . INSTANCE ) ; @ Before public void setUp ( ) { } @ SuppressWarnings ( "unchecked" ) @ Test public void testForHiddenBridge ( ) { @ SuppressWarnings ( "rawtypes" ) MVCCPortalCache mvccPortalCache = new MVCCPortalCache ( new com . liferay . portal . cache . memory . MemoryPortalCache ( new MockPortalCacheManager ( MVCCPortalCacheTest . _PORTAL_CACHE_MANAGER_NAME ) , MVCCPortalCacheTest . _PORTAL_CACHE_NAME , 16 ) ) ; Serializable key = MVCCPortalCacheTest . _KEY_1 ; <START_BUG> Object value = new MVCCPortalCacheTest . MockMVCCModel ( MVCCPortalCacheTest . _VERSION_1 ) ; <END_BUG> mvccPortalCache . put ( key , value ) ; mvccPortalCache . put ( key , value , 10 ) ; } @ AdviseWith ( adviceClasses = { MVCCPortalCacheTest . MemoryPortalCacheAdvice . class } ) @ NewEnv ( type = Type . CLASSLOADER ) @ Test public void testMVCCCacheWithAdvice ( ) throws Exception { } @ Test public void testMVCCCacheWithoutTTL ( ) { } @ Test public void testMVCCCacheWithTTL ( ) { } @ Aspect public static class MemoryPortalCacheAdvice { public static void block ( ) { } public static void unblock ( int permits ) { } public static void waitUntilBlock ( int threadCount ) { } @ Around ( "execution(protected<seq2seq4repair_space>*<seq2seq4repair_space>com.liferay.portal.cache.memory." + "MemoryPortalCache.doPutIfAbsent(..))" ) public Object doPutIfAbsent ( ProceedingJoinPoint proceedingJoinPoint ) throws Throwable { } @ Around ( "execution(protected<seq2seq4repair_space>*<seq2seq4repair_space>com.liferay.portal.cache.memory." + "MemoryPortalCache.doReplace(..))" ) public Object doReplace ( ProceedingJoinPoint proceedingJoinPoint ) throws Throwable { } private static volatile Semaphore _semaphore ; } protected void doTestMVCCCache ( final boolean timeToLive ) { } private void _assertVersion ( long version , MVCCModel mvccModel ) { } private static final String _KEY_1 = "KEY_1" ; private static final String _KEY_2 = "KEY_2" ; private static final String _PORTAL_CACHE_MANAGER_NAME = "PORTAL_CACHE_MANAGER_NAME" ; private static final String _PORTAL_CACHE_NAME = "PORTAL_CACHE_NAME" ; private static final long _VERSION_0 = 0 ; private static final long _VERSION_1 = 1 ; private static final long _VERSION_2 = 2 ; private MVCCPortalCache < String , MVCCModel > _mvccPortalCache ; private PortalCache < String , MVCCModel > _portalCache ; private TestCacheListener < String , MVCCModel > _testCacheListener ; private TestCacheReplicator < String , MVCCModel > _testCacheReplicator ; private static class MockMVCCModel implements MVCCModel { public MockMVCCModel ( long version ) { } @ Override public boolean equals ( Object object ) { } @ Override public long getMvccVersion ( ) { } @ Override public int hashCode ( ) { } @ Override public void setMvccVersion ( long mvccVersion ) { } private long _version ; } No newline ; at end ; of file ; }

Fix:
MVCCModel value = new MVCCPortalCacheTest . MockMVCCModel ( MVCCPortalCacheTest . _VERSION_1 ) ;
Buggy code:
public class EmptyStatement extends Statement { public EmptyStatement ( int startPosition , int endPosition ) { } public FlowInfo analyseCode ( BlockScope currentScope , FlowContext flowContext , FlowInfo flowInfo ) { } public boolean complainIfUnreachable ( FlowInfo flowInfo , BlockScope scope , boolean didAlreadyComplain ) { } public void generateCode ( BlockScope currentScope , CodeStream codeStream ) { } public StringBuffer printStatement ( int tab , StringBuffer output ) { } public void resolve ( BlockScope scope ) { <START_BUG> if ( ( ( bits ) & ( IsUsefulEmptyStatementMASK ) ) == 0 ) { <END_BUG> scope . problemReporter ( ) . superfluousSemicolon ( this . sourceStart , this . sourceEnd ) ; } else { scope . problemReporter ( ) . emptyControlFlowStatement ( this . sourceStart , this . sourceEnd ) ; } } public void traverse ( ASTVisitor visitor , BlockScope scope ) { } }

Fix:
if ( ( ( bits ) & ( ASTNode . IsUsefulEmptyStatement ) ) == 0 ) {
Buggy code:
public final class WSIntegrationProcessorJAXWS_HANDLER extends AbstractIntegrationProcessorJAXWS { public WSIntegrationProcessorJAXWS_HANDLER ( ) { } @ Override protected void processAnnotation ( final DeploymentUnit unit , final ClassInfo classInfo , final AnnotationInstance wsAnnotation , final CompositeIndex compositeIndex ) throws DeploymentUnitProcessingException { final WSEndpointHandlersMapping mapping = getRequiredAttachment ( unit , WS_ENDPOINT_HANDLERS_MAPPING_KEY ) ; final String endpointClassName = classInfo . name ( ) . toString ( ) ; <START_BUG> if ( isJaxwsEjb ( classInfo ) ) { <END_BUG> for ( final EJBEndpoint ejbEndpoint : getJaxwsEjbs ( unit ) ) { if ( endpointClassName . equals ( ejbEndpoint . getClassName ( ) ) ) { for ( final String handlerClassName : mapping . getHandlers ( endpointClassName ) ) { final String ejbEndpointName = ejbEndpoint . getName ( ) ; final String handlerName = ( ejbEndpointName + "-" ) + handlerClassName ; final ComponentDescription jaxwsHandlerDescription = createComponentDescription ( unit , handlerName , handlerClassName , ejbEndpointName ) ; WSIntegrationProcessorJAXWS_HANDLER . propagateNamingContext ( jaxwsHandlerDescription , ejbEndpoint ) ; } } } } else { for ( final POJOEndpoint pojoEndpoint : getJaxwsPojos ( unit ) ) { if ( endpointClassName . equals ( pojoEndpoint . getClassName ( ) ) ) { for ( final String handlerClassName : mapping . getHandlers ( endpointClassName ) ) { final String pojoEndpointName = pojoEndpoint . getName ( ) ; final String handlerName = ( pojoEndpointName + "-" ) + handlerClassName ; createComponentDescription ( unit , handlerName , handlerClassName , pojoEndpointName ) ; } } } } } private static void propagateNamingContext ( final ComponentDescription jaxwsHandlerDescription , final EJBEndpoint ejbEndpoint ) { } }

Fix:
if ( isEjb3 ( classInfo ) ) {
Buggy code:
<START_BUG> public class StudentActivity { <END_BUG> @ Override protected void onCreate ( Bundle savedInstanceState ) { super . onCreate ( savedInstanceState ) ; setContentView ( activity_student ) ; } }

Fix:
public class StudentActivity extends Activity {
Buggy code:
public class RpcClientContainerInstantiator extends BaseContainerInstantiator implements IRemoteServiceContainerInstantiator { private static final String RPC_CONTAINER_TYPE = "ecf.xmlrpc.client" ; public IContainer createInstance ( ContainerTypeDescription description , Object [ ] parameters ) throws ContainerCreateException { try { RpcId ID = null ; if ( ( parameters != null ) && ( ( parameters [ 0 ] ) instanceof RpcId ) ) ID = ( ( RpcId ) ( parameters [ 0 ] ) ) ; else ID = ( ( RpcId ) ( IDFactory . getDefault ( ) . createID ( NAME , parameters ) ) ) ; return new org . eclipse . ecf . remoteservice . rpc . client . RpcClientContainer ( ID ) ; } catch ( Exception e ) { <START_BUG> throw new ContainerCreateException ( Messages . PRC_COULD_NOT_CREATE_CONTAINER , e ) ; <END_BUG> } } public String [ ] getSupportedAdapterTypes ( ContainerTypeDescription description ) { } public Class [ ] [ ] getSupportedParameterTypes ( ContainerTypeDescription description ) { } public String [ ] getImportedConfigs ( ContainerTypeDescription description , String [ ] exporterSupportedConfigs ) { } public Dictionary getPropertiesForImportedConfigs ( ContainerTypeDescription description , String [ ] importedConfigs , Dictionary exportedProperties ) { } public String [ ] getSupportedConfigs ( ContainerTypeDescription description ) { } }

Fix:
throw new ContainerCreateException ( Messages . RPC_COULD_NOT_CREATE_CONTAINER , e ) ;
Buggy code:
public class Strings { public static boolean isPalindrome ( String input ) { } public static int contains ( String s , String search ) { } private static int [ ] buildTable ( String search ) { } public static String multiply ( String a , String b ) { if ( ( a == null ) || ( b == null ) ) { throw new IllegalArgumentException ( "null<seq2seq4repair_space>input<seq2seq4repair_space>to<seq2seq4repair_space>string<seq2seq4repair_space>multiplication" ) ; } Pattern integer = Pattern . compile ( "^-?[0-9]+$" ) ; Matcher matcher = integer . matcher ( a ) ; if ( ! ( matcher . find ( ) ) ) { throw new IllegalArgumentException ( "input<seq2seq4repair_space>string<seq2seq4repair_space>a<seq2seq4repair_space>is<seq2seq4repair_space>improperly<seq2seq4repair_space>formatted" ) ; } matcher = integer . matcher ( b ) ; if ( ! ( matcher . find ( ) ) ) { throw new IllegalArgumentException ( "input<seq2seq4repair_space>string<seq2seq4repair_space>a<seq2seq4repair_space>is<seq2seq4repair_space>improperly<seq2seq4repair_space>formatted" ) ; } boolean negative = false ; if ( ( a . charAt ( 0 ) ) == '-' ) { negative = true ; a = a . substring ( 1 ) ; } if ( ( b . charAt ( 0 ) ) == '-' ) { negative = ! negative ; b = b . substring ( 1 ) ; } int [ ] result = new int [ ( ( a . length ( ) ) + ( b . length ( ) ) ) + 1 ] ; for ( int i = 0 ; i < ( a . length ( ) ) ; i ++ ) { for ( int j = 0 ; j < ( b . length ( ) ) ; j ++ ) { result [ ( i + j ) ] += ( ( a . charAt ( ( ( ( a . length ( ) ) - 1 ) - i ) ) ) - '0' ) * ( ( b . charAt ( ( ( ( b . length ( ) ) - 1 ) - j ) ) ) - '0' ) ; result [ ( ( i + j ) + 1 ) ] += ( result [ ( i + j ) ] ) // 10 ; result [ ( i + j ) ] = ( result [ ( i + j ) ] ) % 10 ; } } StringBuilder sb = new StringBuilder ( ) ; int i = ( result . length ) - 1 ; <START_BUG> while ( ( ( result [ i ] ) == 0 ) && ( i >= 0 ) ) { <END_BUG> i -- ; } if ( i == ( - 1 ) ) { return "0" ; } while ( i >= 0 ) { sb . append ( result [ i ] ) ; i -- ; } if ( negative ) { sb . insert ( 0 , '-' ) ; } return sb . toString ( ) ; } }

Fix:
while ( ( i >= 0 ) && ( ( result [ i ] ) == 0 ) ) {
Buggy code:
public class FetchNewMessagesCommand extends Command { POP3Server server ; int totalMessageCount ; int newMessageCount ; public FetchNewMessagesCommand ( FrameController frameController , DefaultCommandReference [ ] references ) { } public void execute ( Worker worker ) throws Exception { } protected void log ( String message , WorkerStatusController worker ) { } public void downloadMessage ( int index , int size , Object serverUID , Worker worker ) throws Exception { } protected int calculateTotalSize ( Vector newUIDList , Vector messageSizeList , Vector newMessagesUIDList ) { } public void downloadNewMessages ( Vector newUIDList , Vector messageSizeList , Vector newMessagesUIDList , Worker worker ) throws Exception { log . info ( ( ( "need<seq2seq4repair_space>to<seq2seq4repair_space>fetch<seq2seq4repair_space>" + ( newMessagesUIDList . size ( ) ) ) + "<seq2seq4repair_space>messages." ) ) ; int totalSize = calculateTotalSize ( newUIDList , messageSizeList , newMessagesUIDList ) ; worker . setProgressBarMaximum ( totalSize ) ; worker . setProgressBarValue ( 0 ) ; newMessageCount = newMessagesUIDList . size ( ) ; for ( int i = 0 ; i < ( newMessageCount ) ; i ++ ) { Object serverUID = newMessagesUIDList . get ( i ) ; log . info ( ( "fetch<seq2seq4repair_space>message<seq2seq4repair_space>with<seq2seq4repair_space>UID=" + serverUID ) ) ; <START_BUG> log ( ( ( ( ( "Fetching<seq2seq4repair_space>" + i ) + "//" ) + ( newMessageCount ) ) + "<seq2seq4repair_space>messages..." ) , worker ) ; <END_BUG> int index = newUIDList . indexOf ( serverUID ) ; log . info ( ( ( ( "vector<seq2seq4repair_space>index=" + index ) + "<seq2seq4repair_space>server<seq2seq4repair_space>index=" ) + ( index + 1 ) ) ) ; int size = Integer . parseInt ( ( ( String ) ( messageSizeList . get ( index ) ) ) ) ; size = Math . round ( ( size // 1024 ) ) ; if ( server . getAccountItem ( ) . getPopItem ( ) . isLimit ( ) ) { int maxSize = Integer . parseInt ( server . getAccountItem ( ) . getPopItem ( ) . getLimit ( ) ) ; if ( size > maxSize ) { log . info ( "skipping<seq2seq4repair_space>download<seq2seq4repair_space>of<seq2seq4repair_space>message,<seq2seq4repair_space>too<seq2seq4repair_space>big" ) ; continue ; } } downloadMessage ( index , Integer . parseInt ( ( ( String ) ( messageSizeList . get ( index ) ) ) ) , serverUID , worker ) ; } } public Vector synchronize ( Vector newUIDList ) throws Exception { } public Vector fetchMessageSizes ( WorkerStatusController worker ) throws Exception { } public Vector fetchUIDList ( int totalMessageCount , WorkerStatusController worker ) throws Exception { } public void logout ( WorkerStatusController worker ) throws Exception { } }

Fix:
log ( ( ( ( ( "Fetching<seq2seq4repair_space>" + ( i + 1 ) ) + "//" ) + ( newMessageCount ) ) + "<seq2seq4repair_space>messages..." ) , worker ) ;
Buggy code:
public class CreateSubFolderAction extends FrameAction implements SelectionListener { public CreateSubFolderAction ( AbstractFrameController frameController ) { } public void actionPerformed ( ActionEvent evt ) { EditFolderDialog dialog = new EditFolderDialog ( "New<seq2seq4repair_space>Folder" ) ; dialog . showDialog ( ) ; String name ; <START_BUG> if ( ( dialog . success ( ) ) == true ) { <END_BUG> name = dialog . getName ( ) ; } else { return ; } FolderCommandReference [ ] r = ( ( FolderCommandReference [ ] ) ( frameController . getSelectionManager ( ) . getSelection ( "mail.tree" ) ) ) ; r [ 0 ] . setFolderName ( name ) ; processor . addOp ( new org . columba . mail . gui . tree . command . CreateSubFolderCommand ( r ) ) ; } public void selectionChanged ( SelectionChangedEvent e ) { } }

Fix:
if ( dialog . success ( ) ) {
Buggy code:
public class IndexHashGrouping implements CustomStreamGrouping { public static int objectToIndex ( Object val , int numPartitions ) { if ( val == null ) return 0 ; else <START_BUG> return ( val . hashCode ( ) ) % numPartitions ; <END_BUG> } int _index ; List < Integer > _targets ; public IndexHashGrouping ( int index ) { } @ Override public void prepare ( WorkerTopologyContext context , GlobalStreamId stream , List < Integer > targetTasks ) { } @ Override public List < Integer > chooseTasks ( int fromTask , List < Object > values ) { } }

Fix:
return ( Math . abs ( val . hashCode ( ) ) ) % numPartitions ;
Buggy code:
final class AnalysisRunnerJobDelegate { private static final Logger logger = LoggerFactory . getLogger ( AnalysisRunnerJobDelegate . class ) ; private final AnalysisJob _job ; private final DataCleanerConfiguration _configuration ; private final TaskRunner _taskRunner ; private final AnalysisListener _analysisListener ; private final Queue < JobAndResult > _resultQueue ; private final ErrorAware _errorAware ; private final Collection < AnalyzerJob > _analyzerJobs ; private final Collection < TransformerJob > _transformerJobs ; private final Collection < FilterJob > _filterJobs ; private final SourceColumnFinder _sourceColumnFinder ; private final boolean _includeNonDistributedTasks ; public AnalysisRunnerJobDelegate ( AnalysisJob job , DataCleanerConfiguration configuration , TaskRunner taskRunner , AnalysisListener analysisListener , Queue < JobAndResult > resultQueue , ErrorAware errorAware , boolean includeNonDistributedTasks ) { } public AnalysisResultFuture run ( ) { try { final InjectionManager injectionManager = _configuration . getEnvironment ( ) . getInjectionManagerFactory ( ) . getInjectionManager ( _configuration , _job ) ; final LifeCycleHelper rowProcessingLifeCycleHelper = new LifeCycleHelper ( injectionManager , new ReferenceDataActivationManager ( ) , _includeNonDistributedTasks ) ; final RowProcessingPublishers publishers = new RowProcessingPublishers ( _job , _analysisListener , _taskRunner , rowProcessingLifeCycleHelper , _sourceColumnFinder ) ; final AnalysisJobMetrics analysisJobMetrics = publishers . getAnalysisJobMetrics ( ) ; JobCompletionTaskListener jobCompletionTaskListener = new JobCompletionTaskListener ( analysisJobMetrics , _analysisListener , 1 ) ; _analysisListener . jobBegin ( _job , analysisJobMetrics ) ; validateSingleTableInput ( _transformerJobs ) ; validateSingleTableInput ( _filterJobs ) ; validateSingleTableInput ( _analyzerJobs ) ; scheduleRowProcessing ( publishers , rowProcessingLifeCycleHelper , jobCompletionTaskListener , analysisJobMetrics ) ; return new AnalysisResultFutureImpl ( _resultQueue , jobCompletionTaskListener , _errorAware ) ; } catch ( RuntimeException e ) { <START_BUG> _analysisListener . errorUknown ( _job , e ) ; <END_BUG> throw e ; } } private void scheduleRowProcessing ( RowProcessingPublishers publishers , LifeCycleHelper lifeCycleHelper , JobCompletionTaskListener jobCompletionTaskListener , AnalysisJobMetrics analysisJobMetrics ) { } private void validateSingleTableInput ( Collection < ? extends ComponentJob > componentJobs ) { } }

Fix:
_analysisListener . errorUnknown ( _job , e ) ;
Buggy code:
public class Application extends Controller { public static Result index ( ) { } public static Result searchRoutines ( ) { } public static Result newRoutine ( long id ) { } public static Result deleteRoutine ( long id ) { } public static Result postRoutine ( ) { Form < RoutineFormData > formData = Form . form ( RoutineFormData . class ) . bindFromRequest ( ) ; if ( formData . hasErrors ( ) ) { System . out . println ( "HTTP<seq2seq4repair_space>Form<seq2seq4repair_space>Error." ) ; return badRequest ( NewRoutine . render ( formData ) ) ; } else { RoutineFormData data = formData . get ( ) ; RoutineDB . addRoutines ( data ) ; <START_BUG> return ok ( NewRoutine . render ( formData ) ) ; <END_BUG> } } }

Fix:
return ok ( SearchRoutines . render ( RoutineDB . getRoutines ( ) ) ) ;
Buggy code:
public class JournalGUI extends GuiScreen { private String [ ] authorList ; private PageBox [ ] currentPages ; private PageBox [ ] currentTitles ; private int displayPage ; private JournalPage [ ] pageIndex ; private PageBoxMetrics pageMetrics ; private PageBoxMetrics titleMetrics ; public JournalGUI ( String [ ] knowledgeKeys , String [ ] authors ) { } private void decrementPage ( ) { } @ Override public boolean doesGuiPauseGame ( ) { } private void drawFoldedPages ( ) { } private void drawJournalBackground ( ) { } private void drawPages ( ) { } @ Override public void drawScreen ( int mouseX , int mouseY , float unused ) { } private void incrementPage ( ) { <START_BUG> if ( ( displayPage ) < ( ( pageIndex . length ) - 1 ) ) { <END_BUG> ( displayPage ) ++ ; } } @ Override protected void keyTyped ( char c , int keycode ) { } @ Override protected void mouseClicked ( int mouseX , int mouseY , int mouseButton ) { } private void loadPage ( int displayPage ) { } }

Fix:
if ( ( displayPage ) < ( pageIndex . length ) ) {
Buggy code:
public class ScrollBar extends Widget { NSScroller view ; Scrollable parent ; int minimum ; int maximum = 100 ; int thumb = 10 ; int increment = 1 ; int pageIncrement = 10 ; id target ; int actionSelector ; ScrollBar ( ) { } public void addSelectionListener ( SelectionListener listener ) { } static int checkStyle ( int style ) { } void deregister ( ) { } public boolean getEnabled ( ) { } public int getIncrement ( ) { } public int getMaximum ( ) { } public int getMinimum ( ) { } public int getPageIncrement ( ) { } public Scrollable getParent ( ) { } public int getSelection ( ) { checkWidget ( ) ; NSScroller widget = ( ( NSScroller ) ( view ) ) ; <START_BUG> float value = widget . floatValue ( ) ; <END_BUG> return ( ( int ) ( ( ( ( ( maximum ) - ( thumb ) ) - ( minimum ) ) * value ) + ( minimum ) ) ) ; } public Point getSize ( ) { } public int getThumb ( ) { } public boolean getVisible ( ) { } public boolean isEnabled ( ) { } public boolean isVisible ( ) { } public void removeSelectionListener ( SelectionListener listener ) { } void register ( ) { } void releaseHandle ( ) { } void releaseParent ( ) { } void releaseWidget ( ) { } void sendSelection ( ) { } public void setIncrement ( int value ) { } public void setEnabled ( boolean enabled ) { } public void setMaximum ( int value ) { } public void setMinimum ( int value ) { } public void setPageIncrement ( int value ) { } public void setSelection ( int value ) { } public void setThumb ( int value ) { } public void setValues ( int selection , int minimum , int maximum , int thumb , int increment , int pageIncrement ) { } public void setVisible ( boolean visible ) { } void updateBar ( int selection , int minimum , int maximum , int thumb ) { } }

Fix:
double value = widget . doubleValue ( ) ;
Buggy code:
class RemoveFromIndex extends IndexRequest { String resourceName ; IPath indexPath ; IndexManager manager ; public RemoveFromIndex ( String resourceName , IPath indexPath , IndexManager manager ) { } public boolean belongsTo ( String jobFamily ) { } public boolean execute ( IProgressMonitor progressMonitor ) { if ( ( progressMonitor != null ) && ( progressMonitor . isCanceled ( ) ) ) return true ; try { <START_BUG> IIndex index = manager . getIndex ( this . indexPath , true , true ) ; <END_BUG> if ( index == null ) return true ; ReadWriteMonitor monitor = manager . getMonitorFor ( index ) ; if ( monitor == null ) return true ; try { monitor . enterWrite ( ) ; index . remove ( resourceName ) ; } finally { monitor . exitWrite ( ) ; } } catch ( IOException e ) { if ( JobManager . VERBOSE ) { JobManager . verbose ( ( ( "-><seq2seq4repair_space>failed<seq2seq4repair_space>to<seq2seq4repair_space>remove<seq2seq4repair_space>" + ( this . resourceName ) ) + "<seq2seq4repair_space>from<seq2seq4repair_space>index<seq2seq4repair_space>because<seq2seq4repair_space>of<seq2seq4repair_space>the<seq2seq4repair_space>following<seq2seq4repair_space>exception:" ) ) ; e . printStackTrace ( ) ; } return false ; } return true ; } public String toString ( ) { } }

Fix:
IIndex index = manager . getIndex ( this . indexPath , true , false ) ;
Buggy code:
public class RollingFileAppender extends FileAppender { File file ; TriggeringPolicy triggeringPolicy ; RollingPolicy rollingPolicy ; public RollingFileAppender ( ) { } public void rollover ( ) { rollingPolicy . rollover ( file ) ; <START_BUG> file = rollingPolicy . getLogFile ( fileName ) ; <END_BUG> try { this . setFile ( fileName , false , bufferedIO , bufferSize ) ; } catch ( IOException e ) { LogLog . error ( ( ( "setFile(" + ( fileName ) ) + ",<seq2seq4repair_space>false)<seq2seq4repair_space>call<seq2seq4repair_space>failed." ) , e ) ; } } public synchronized void setFile ( String fileName , boolean append , boolean bufferedIO , int bufferSize ) throws IOException { } protected void subAppend ( LoggingEvent event ) { } }

Fix:
file = rollingPolicy . getActiveLogFile ( fileName ) ;
Buggy code:
public class AjaxRequestTarget implements IRequestTarget { private final Map markupIdToComponent = new HashMap ( ) ; private final List javascripts = new ArrayList ( ) ; private final AjaxRequestTarget . EncodingResponse encodingResponse = new AjaxRequestTarget . EncodingResponse ( ) ; public AjaxRequestTarget ( ) { } public final void addComponent ( Component component ) { <START_BUG> addComponent ( component . getId ( ) , component ) ; <END_BUG> } public final void addComponent ( String markupId , Component component ) { } public final void addJavascript ( String javascript ) { } public final void respond ( final RequestCycle requestCycle ) { } private void respondInvocation ( final Response response , final String js ) { } private void respondComponent ( final Response response , final String markupId , final Component component ) { } public void cleanUp ( final RequestCycle requestCycle ) { } public Object getLock ( final RequestCycle requestCycle ) { } public boolean equals ( final Object obj ) { } public int hashCode ( ) { } public String toString ( ) { } protected String getEncodingName ( ) { } protected String encode ( String str ) { } protected boolean needsEncoding ( String str ) { } private final class EncodingResponse extends Response { private final AppendingStringBuffer buffer = new AppendingStringBuffer ( 256 ) ; private boolean escaped = false ; public EncodingResponse ( ) { } public void write ( String string ) { } public void reset ( ) { } public boolean isContentsEncoded ( ) { } public String getContents ( ) { } public OutputStream getOutputStream ( ) { } } }

Fix:
addComponent ( component . getMarkupId ( ) , component ) ;
Buggy code:
public class BorlandGenerateClient extends Task { static final String JAVA_MODE = "java" ; static final String FORK_MODE = "fork" ; boolean debug = false ; File ejbjarfile = null ; File clientjarfile = null ; String mode = BorlandGenerateClient . JAVA_MODE ; Path classpath ; public void setClasspath ( Path classpath ) throws TaskException { } public void setClasspathRef ( Reference r ) throws TaskException { } public void setClientjar ( File clientjar ) { } public void setDebug ( boolean debug ) { } public void setEjbjar ( File ejbfile ) { } public void setMode ( String s ) { } public Path createClasspath ( ) throws TaskException { if ( ( this . classpath ) == null ) { <START_BUG> this . classpath = new Path ( getProject ( ) ) ; <END_BUG> } return this . classpath . createPath ( ) ; } public void execute ( ) throws TaskException { } protected void executeFork ( ) throws TaskException { } protected void executeJava ( ) throws TaskException { } }

Fix:
this . classpath = new Path ( ) ;
Buggy code:
public class WeightedVectorTest extends AbstractVectorTest { @ Test public void testLength ( ) { } @ Override public Vector vectorToTest ( int size ) { } @ Test public void testOrdering ( ) { } @ Test public void testProjection ( ) { } @ Override public void testSize ( ) { <START_BUG> assertEquals ( "size" , 3 , getTestVector ( ) . getNumNondefaultElements ( ) ) ; <END_BUG> } @ Override Vector generateTestVector ( int cardinality ) { } }

Fix:
assertEquals ( "size" , 3 , getTestVector ( ) . getNumNonZeroElements ( ) ) ;
Buggy code:
public class ExternalLink extends AbstractLink { private static final long serialVersionUID = 1L ; private final IModel < String > label ; private boolean contextRelative = false ; private PopupSettings popupSettings = null ; public ExternalLink ( final String id , final String href , final String label ) { } public ExternalLink ( final String id , final String href ) { } public ExternalLink ( final String id , final IModel < String > href , final IModel < String > label ) { } public ExternalLink ( final String id , final IModel < String > href ) { } public final PopupSettings getPopupSettings ( ) { } public final ExternalLink setPopupSettings ( final PopupSettings popupSettings ) { } @ Override protected void onComponentTag ( ComponentTag tag ) { super . onComponentTag ( tag ) ; if ( ( isLinkEnabled ( ) ) == false ) { disableLink ( tag ) ; } else if ( ( getDefaultModel ( ) ) != null ) { Object hrefValue = getDefaultModelObject ( ) ; if ( hrefValue != null ) { String url = hrefValue . toString ( ) ; if ( contextRelative ) { if ( ( ( url . length ( ) ) > 0 ) && ( ( url . charAt ( 0 ) ) == '//' ) ) { url = url . substring ( 1 ) ; } url = ( RequestCycle . get ( ) . getRequest ( ) . getRelativePathPrefixToContextRoot ( ) ) + url ; } if ( ( ( tag . getName ( ) . equalsIgnoreCase ( "a" ) ) || ( tag . getName ( ) . equalsIgnoreCase ( "link" ) ) ) || ( tag . getName ( ) . equalsIgnoreCase ( "area" ) ) ) { tag . put ( "href" , Strings . replaceAll ( url , "&" , "&amp;" ) ) ; if ( ( popupSettings ) != null ) { tag . put ( "onclick" , popupSettings . getPopupJavaScript ( ) ) ; } } else { if ( ( popupSettings ) != null ) { popupSettings . setTarget ( ( ( "'" + url ) + "'" ) ) ; String popupScript = popupSettings . getPopupJavaScript ( ) ; tag . put ( "onclick" , popupScript ) ; } else { <START_BUG> tag . put ( "onclick" , ( ( "window.location.href='" + url ) + "';" ) ) ; <END_BUG> } } } if ( ( popupSettings ) != null ) { IPageMap popupPageMap = popupSettings . getPageMap ( this ) ; if ( ( popupPageMap != null ) && ( ( popupPageMap . getName ( ) ) != null ) ) { tag . put ( "target" , popupPageMap . getName ( ) ) ; } } } } @ Override protected void onComponentTagBody ( MarkupStream markupStream , ComponentTag openTag ) { } public boolean isContextRelative ( ) { } public ExternalLink setContextRelative ( boolean contextRelative ) { } public IModel < String > getLabel ( ) { } }

Fix:
tag . put ( "onclick" , ( ( "window.location.href='" + url ) + "';return<seq2seq4repair_space>false;" ) ) ;
Buggy code:
public class Player extends Actor { private static final String TEXTURE_FILENAME = "camacho.png" ; private static final String SFX_HIT_FILENAME = "sfx//hit.wav" ; private static final String SFX_DIE_FILENAME = "sfx//death.wav" ; private static final float MOVEMENT_DEAD_ZONE = 10.0F ; private static final int FRAME_WIDTH = 256 ; private static final int FRAME_HEIGHT = 256 ; private static final float TAP_COUNT_INTERVAL = 0.4F ; private final Texture texture ; private final TextureRegion [ ] textureRegions ; private final Sound hitSfx ; private final Sound dieSfx ; private final Animation idle ; private final Animation walk ; private final Animation attack ; private final Rectangle collisionArea ; private final Rectangle attackArea ; private boolean takingDamage = false ; private TextureRegion currentFrame ; private enum State { IDLE , WALK , ATTACK ; } private Player . State state ; private final Vector2 moveTarget ; private final Vector2 position ; public final Vector2 velocity ; private float speed = 500.0F ; private float stateTime = 0.0F ; private boolean flipX = false ; public Player ( final AssetManager manager ) { } public void reset ( ) { } @ Override public void act ( float delta ) { } private int currentAttackKeyFrame = 0 ; private void updateAttack ( float delta ) { } private void updateMovement ( float delta ) { } @ Override public void draw ( Batch batch , float parentAlpha ) { } @ Override public void drawDebug ( ShapeRenderer shapes ) { } public void moveTo ( Vector2 point ) { } public void stop ( ) { } public void performAttack ( int count ) { } public boolean isWalking ( ) { } public Vector2 getPosition ( ) { } public Rectangle getCollisionArea ( ) { } public Rectangle getAttackArea ( ) { } public void clearAttackArea ( ) { } public boolean isTakingDamage ( ) { } public void startWalkState ( ) { } public void takeDamage ( ) { if ( takingDamage ) return ; takingDamage = true ; hitSfx . play ( ) ; <START_BUG> addAction ( sequence ( sequence ( color ( BLACK , 0.15F ) , color ( WHITE , 0.15F ) , color ( BLACK , 0.15F ) , color ( WHITE , 0.15F ) , color ( BLACK , 0.15F ) , color ( WHITE , 0.15F ) ) , run ( new Runnable ( ) { <END_BUG> @ Override public void run ( ) { takingDamage = false ; } } ) ) ) ; } public void die ( ) { } }

Fix:
addAction ( sequence ( sequence ( color ( BLACK , 0.5F ) , color ( WHITE , 0.5F ) , color ( BLACK , 0.5F ) , color ( WHITE , 0.5F ) , color ( BLACK , 0.5F ) , color ( WHITE , 0.5F ) ) , run ( new Runnable ( ) {
Buggy code:
public class ArchonPlayer extends BasePlayer { private PowerNode core = null ; private Random r = new Random ( ) ; private MapLocation targetLoc = null ; private MapLocation [ ] powerNodes = myRC . senseCapturablePowerNodes ( ) ; private ArrayList < MapLocation > locsToBuild = new ArrayList < MapLocation > ( ) ; private ArrayList < MapLocation > enemyTowerLocs = new ArrayList < MapLocation > ( ) ; private PowerNode [ ] powerNodesOwned = myRC . senseAlliedPowerNodes ( ) ; private Navigation nav = null ; public ArchonPlayer ( RobotController rc ) { } public void run ( ) { while ( true ) { try { while ( myRC . isMovementActive ( ) ) { myRC . yield ( ) ; } if ( ( core ) == null ) { core = myRC . sensePowerCore ( ) ; } getNewTarget ( ) ; while ( ( Clock . getRoundNum ( ) ) < 200 ) { <START_BUG> spawnSoldierAndTransferFlux ( ) ; <END_BUG> } while ( ( ( targetLoc ) != null ) && ( ! ( myRC . getLocation ( ) . isAdjacentTo ( targetLoc ) ) ) ) { this . nav . getNextMove ( targetLoc ) ; myRC . yield ( ) ; updateUnownedNodes ( ) ; boolean quit = true ; for ( MapLocation i : locsToBuild ) { if ( i . equals ( targetLoc ) ) { quit = false ; } } if ( quit ) { getNewTarget ( ) ; } } if ( ( targetLoc ) == null ) { continue ; } if ( ( myRC . getDirection ( ) ) != ( myRC . getLocation ( ) . directionTo ( targetLoc ) ) ) { while ( myRC . isMovementActive ( ) ) { myRC . yield ( ) ; } myRC . setDirection ( myRC . getLocation ( ) . directionTo ( targetLoc ) ) ; myRC . yield ( ) ; } boolean enemyTower = enemyTowerPresent ( targetLoc ) ; if ( enemyTower == true ) { myRC . setIndicatorString ( 1 , ( "attempting<seq2seq4repair_space>destroy<seq2seq4repair_space>at:<seq2seq4repair_space>" + ( targetLoc . toString ( ) ) ) ) ; enemyTowerLocs . add ( targetLoc ) ; getNewTarget ( ) ; } else { myRC . setIndicatorString ( 1 , ( "attempting<seq2seq4repair_space>build<seq2seq4repair_space>at:<seq2seq4repair_space>" + ( targetLoc . toString ( ) ) ) ) ; buildTower ( targetLoc ) ; } myRC . yield ( ) ; } catch ( Exception e ) { System . out . println ( "caught<seq2seq4repair_space>exception:" ) ; e . printStackTrace ( ) ; } } } public void goCloser ( MapLocation target ) { } public void updateUnownedNodes ( ) { } public void getNewTarget ( ) { } public boolean enemyTowerPresent ( MapLocation target ) { } public void buildTower ( MapLocation target ) { } public void destroyTower ( MapLocation target ) { } public void spawnScoutAndTransferFlux ( ) { } public void spawnSoldierAndTransferFlux ( ) { } No newline ; at end ; of file ; }

Fix:
spawnScoutAndTransferFlux ( ) ;