nus-yam/ex-repair huggingface dataset:
Buggy code:
public class SingletonService < T extends Serializable > implements ServiceProviderRegistry . Listener , SingletonRpcHandler < T > , Service < T > , StopContext { public static final String DEFAULT_CONTAINER = "cluster" ; private final InjectedValue < ServiceProviderRegistry > registryRef = new InjectedValue < ServiceProviderRegistry > ( ) ; private final InjectedValue < GroupRpcDispatcher > dispatcherRef = new InjectedValue < GroupRpcDispatcher > ( ) ; private final Service < T > service ; private final ServiceName serviceName ; private final AtomicBoolean master = new AtomicBoolean ( false ) ; private volatile ServiceProviderRegistry registry ; private volatile GroupRpcDispatcher dispatcher ; private volatile SingletonElectionPolicy electionPolicy ; private volatile SingletonRpcHandler < T > handler ; private volatile StartContext context ; private volatile boolean restartOnMerge = true ; public SingletonService ( Service < T > service , ServiceName serviceName ) { } public ServiceBuilder < T > build ( ServiceContainer target ) { } public ServiceBuilder < T > build ( ServiceContainer target , String container ) { } @ Override public void start ( StartContext context ) throws StartException { } @ Override public void stop ( StopContext context ) { } public void setElectionPolicy ( SingletonElectionPolicy electionPolicy ) { } public void setRestartOnMerge ( boolean restart ) { } @ Override public void serviceProvidersChanged ( Set < ClusterNode > nodes , boolean merge ) { } private boolean elected ( Set < ClusterNode > candidates ) { } private ClusterNode election ( Set < ClusterNode > candidates ) { List < ClusterNode > nodes = this . dispatcher . getClusterNodes ( ) ; nodes . retainAll ( candidates ) ; if ( nodes . isEmpty ( ) ) return null ; <START_BUG> return ( ( this . electionPolicy ) == null ) || ( ( nodes . size ( ) ) == 1 ) ? nodes . get ( 0 ) : this . electionPolicy . elect ( nodes ) ; <END_BUG> } private void startNewMaster ( ) { } @ Override public T getValue ( ) { } @ Override public AtomicReference < T > getValueRef ( ) { } @ Override public void stopOldMaster ( ) { } @ Override public void asynchronous ( ) throws IllegalStateException { } @ Override public void complete ( ) throws IllegalStateException { } @ Override public long getElapsedTime ( ) { } @ Override public ServiceController < ? > getController ( ) { } @ Override public void execute ( Runnable command ) { } private class RpcHandler implements SingletonRpcHandler < T > { private final GroupRpcDispatcher dispatcher ; private String name ; RpcHandler ( GroupRpcDispatcher dispatcher , String name ) { } @ Override public void stopOldMaster ( ) { } @ Override public AtomicReference < T > getValueRef ( ) { } } }

Fix:
return ( this . electionPolicy ) == null ? nodes . get ( 0 ) : this . electionPolicy . elect ( nodes ) ;
Buggy code:
public class MainActivity extends ActionBarActivity { ArrayList < String > items ; ArrayAdapter < String > itemsAdapter ; ListView lvItems ; private final int REQUEST_CODE = 20 ; @ Override protected void onCreate ( Bundle savedInstanceState ) { } private void setupListViewListener ( ) { } @ Override protected void onActivityResult ( int requestCode , int resultCode , Intent data ) { if ( resultCode == ( RESULT_OK ) ) { String newEditText = data . getExtras ( ) . getString ( "newEditedData" ) ; Log . d ( "SimpleToDoApp" , ( ( ( "*************Request<seq2seq4repair_space>code:<seq2seq4repair_space>" + requestCode ) + "<seq2seq4repair_space>with<seq2seq4repair_space>Data:<seq2seq4repair_space>" ) + newEditText ) ) ; <START_BUG> items . add ( requestCode , newEditText ) ; <END_BUG> itemsAdapter . notifyDataSetChanged ( ) ; writeItems ( ) ; } } private void readItems ( ) { } private void writeItems ( ) { } public void onAddItem ( View v ) { } @ Override public boolean onCreateOptionsMenu ( Menu menu ) { } @ Override public boolean onOptionsItemSelected ( MenuItem item ) { } }

Fix:
items . set ( requestCode , newEditText ) ;
Buggy code:
public class ParentResolver implements IComponentResolver { private static final long serialVersionUID = 1L ; public boolean resolve ( final MarkupContainer container , final MarkupStream markupStream , final ComponentTag tag ) { MarkupContainer parent = container ; while ( ( parent != null ) && ( parent . isTransparent ( ) ) ) { parent = parent . getParent ( ) ; if ( parent != null ) { Component component = parent . get ( tag . getId ( ) ) ; if ( component != null ) { <START_BUG> component . render ( ) ; <END_BUG> return true ; } } } parent = container . getParent ( ) ; if ( parent instanceof IComponentResolver ) { return ( ( IComponentResolver ) ( parent ) ) . resolve ( container , markupStream , tag ) ; } return false ; } }

Fix:
component . render ( markupStream ) ;
Buggy code:
public class ValidateSubsystemExtension implements Extension { public static final String NAMESPACE = "urn:mycompany:mysubsystem:1.0" ; public static final String SUBSYSTEM_NAME = "mysubsystem" ; private final ValidateSubsystemExtension . SubsystemParser parser = new ValidateSubsystemExtension . SubsystemParser ( ) ; private volatile DescriptionProvider addDescriptionProvider ; public void setAddDescriptionProvider ( DescriptionProvider addDescriptionProvider ) { } @ Override public void initializeParsers ( ExtensionParsingContext context ) { } @ Override public void initialize ( ExtensionContext context ) { <START_BUG> final SubsystemRegistration subsystem = context . registerSubsystem ( ValidateSubsystemExtension . SUBSYSTEM_NAME , 1 , 0 ) ; <END_BUG> final ManagementResourceRegistration registration = subsystem . registerSubsystemModel ( SUBSYSTEM ) ; registration . registerOperationHandler ( ADD , new OperationStepHandler ( ) { @ Override public void execute ( OperationContext context , ModelNode operation ) throws OperationFailedException { } } , addDescriptionProvider , false ) ; registration . registerOperationHandler ( DESCRIBE , ValidateSubsystemExtension . SubsystemDescribeHandler . INSTANCE , ValidateSubsystemExtension . SubsystemDescribeHandler . INSTANCE , false , PRIVATE ) ; subsystem . registerXMLElementWriter ( parser ) ; } private static ModelNode createAddSubsystemOperation ( ) { } private static class SubsystemParser implements XMLStreamConstants , XMLElementReader < List < ModelNode > > , XMLElementWriter < SubsystemMarshallingContext > { @ Override public void writeContent ( XMLExtendedStreamWriter writer , SubsystemMarshallingContext context ) throws XMLStreamException { } @ Override public void readElement ( XMLExtendedStreamReader reader , List < ModelNode > list ) throws XMLStreamException { } } private static class SubsystemDescribeHandler implements OperationStepHandler , DescriptionProvider { static final ValidateSubsystemExtension . SubsystemDescribeHandler INSTANCE = new ValidateSubsystemExtension . SubsystemDescribeHandler ( ) ; public void execute ( OperationContext context , ModelNode operation ) throws OperationFailedException { } @ Override public ModelNode getModelDescription ( Locale locale ) { } } }

Fix:
final SubsystemRegistration subsystem = context . registerSubsystem ( ValidateSubsystemExtension . SUBSYSTEM_NAME , 1 , 0 , 0 ) ;
Buggy code:
public class ConsoleContainer extends Fragment { MainFragment mMainFragment = null ; @ Override public void onCreate ( Bundle savedInstanceState ) { } @ Override public View onCreateView ( LayoutInflater inflater , ViewGroup container , Bundle savedInstanceState ) { View v = inflater . inflate ( container_console , container , false ) ; <START_BUG> if ( savedInstanceState == null ) { <END_BUG> mMainFragment = new MainFragment ( ) ; mMainFragment . setArguments ( getActivity ( ) . getIntent ( ) . getExtras ( ) ) ; getChildFragmentManager ( ) . beginTransaction ( ) . add ( main_fragment , mMainFragment ) . commit ( ) ; } return v ; } @ Override public void onCreateOptionsMenu ( Menu menu , MenuInflater inflater ) { } @ Override public boolean onOptionsItemSelected ( MenuItem item ) { } public void updateState ( State state ) { } }

Fix:
if ( ( savedInstanceState == null ) && ( ( getChildFragmentManager ( ) . findFragmentById ( main_fragment ) ) == null ) ) {
Buggy code:
public class EEModuleConfigurationProcessor implements DeploymentUnitProcessor { public void deploy ( DeploymentPhaseContext phaseContext ) throws DeploymentUnitProcessingException { final DeploymentUnit deploymentUnit = phaseContext . getDeploymentUnit ( ) ; final EEModuleDescription moduleDescription = deploymentUnit . getAttachment ( EE_MODULE_DESCRIPTION ) ; final Module module = deploymentUnit . getAttachment ( MODULE ) ; final DeploymentClassIndex classIndex = deploymentUnit . getAttachment ( CLASS_INDEX ) ; if ( moduleDescription == null ) { return ; } if ( module == null ) { return ; } final Set < ServiceName > failed = new HashSet < ServiceName > ( ) ; final EEModuleConfiguration moduleConfiguration = new EEModuleConfiguration ( moduleDescription ) ; deploymentUnit . putAttachment ( EE_MODULE_CONFIGURATION , moduleConfiguration ) ; final Iterator < ComponentDescription > iterator = moduleDescription . getComponentDescriptions ( ) . iterator ( ) ; while ( iterator . hasNext ( ) ) { final ComponentDescription componentDescription = iterator . next ( ) ; EeLogger . ROOT_LOGGER . debugf ( "Configuring<seq2seq4repair_space>component<seq2seq4repair_space>class:<seq2seq4repair_space>%s<seq2seq4repair_space>named<seq2seq4repair_space>%s" , componentDescription . getComponentClassName ( ) , componentDescription . getComponentName ( ) ) ; final ComponentConfiguration componentConfiguration ; try { <START_BUG> componentConfiguration = componentDescription . createConfiguration ( classIndex . classIndex ( componentDescription . getComponentClassName ( ) ) , module . getClassLoader ( ) ) ; <END_BUG> for ( final ComponentConfigurator componentConfigurator : componentDescription . getConfigurators ( ) ) { componentConfigurator . configure ( phaseContext , componentDescription , componentConfiguration ) ; } moduleConfiguration . addComponentConfiguration ( componentConfiguration ) ; } catch ( Exception e ) { if ( componentDescription . isOptional ( ) ) { EeLogger . ROOT_LOGGER . componentInstallationFailure ( e , componentDescription . getComponentName ( ) ) ; failed . add ( componentDescription . getStartServiceName ( ) ) ; failed . add ( componentDescription . getCreateServiceName ( ) ) ; failed . add ( componentDescription . getServiceName ( ) ) ; iterator . remove ( ) ; } else { throw EeMessages . MESSAGES . cannotConfigureComponent ( e , componentDescription . getComponentName ( ) ) ; } } } deploymentUnit . putAttachment ( FAILED_COMPONENTS , Collections . synchronizedSet ( failed ) ) ; } public void undeploy ( DeploymentUnit context ) { } }

Fix:
componentConfiguration = componentDescription . createConfiguration ( classIndex . classIndex ( componentDescription . getComponentClassName ( ) ) , module . getClassLoader ( ) , module . getModuleLoader ( ) ) ;
Buggy code:
public class StubMvcResult implements MvcResult { private MockHttpServletRequest request ; private Object handler ; private HandlerInterceptor [ ] interceptors ; private Exception resolvedException ; private ModelAndView mav ; private FlashMap flashMap ; private MockHttpServletResponse response ; public StubMvcResult ( MockHttpServletRequest request , Object handler , HandlerInterceptor [ ] interceptors , Exception resolvedException , ModelAndView mav , FlashMap flashMap , MockHttpServletResponse response ) { } @ Override public MockHttpServletRequest getRequest ( ) { } @ Override public Object getHandler ( ) { } @ Override public HandlerInterceptor [ ] getInterceptors ( ) { } @ Override public Exception getResolvedException ( ) { } @ Override public ModelAndView getModelAndView ( ) { } @ Override public FlashMap getFlashMap ( ) { } @ Override public MockHttpServletResponse getResponse ( ) { } public ModelAndView getMav ( ) { } public void setMav ( ModelAndView mav ) { } public void setRequest ( MockHttpServletRequest request ) { } public void setHandler ( Object handler ) { } public void setInterceptors ( HandlerInterceptor [ ] interceptors ) { } public void setResolvedException ( Exception resolvedException ) { } public void setFlashMap ( FlashMap flashMap ) { } public void setResponse ( MockHttpServletResponse response ) { } @ Override public Object getAsyncResult ( ) { } @ Override <START_BUG> public Object getAsyncResult ( long timeout ) { <END_BUG> return null ; } }

Fix:
public Object getAsyncResult ( long timeToWait ) {
Buggy code:
public class TestFuzzyQuery2 extends LuceneTestCase { static final float epsilon = 1.0E-5F ; static int [ ] [ ] mappings = new int [ ] [ ] { new int [ ] { 64 , 65 } , new int [ ] { 64 , 405 } , new int [ ] { 64 , 2310 } , new int [ ] { 64 , 66575 } , new int [ ] { 404 , 405 } , new int [ ] { 404 , 2310 } , new int [ ] { 404 , 66575 } , new int [ ] { 2309 , 2310 } , new int [ ] { 2309 , 66575 } , new int [ ] { 66574 , 66575 } } ; public void testFromTestData ( ) throws Exception { } public void assertFromTestData ( int [ ] codePointTable ) throws Exception { if ( VERBOSE ) { System . out . println ( ( "TEST:<seq2seq4repair_space>codePointTable=" + codePointTable ) ) ; } InputStream stream = getClass ( ) . getResourceAsStream ( "fuzzyTestData.txt" ) ; BufferedReader reader = new BufferedReader ( new InputStreamReader ( stream , "UTF-8" ) ) ; int bits = Integer . parseInt ( reader . readLine ( ) ) ; int terms = ( ( int ) ( Math . pow ( 2 , bits ) ) ) ; Directory dir = newDirectory ( ) ; RandomIndexWriter writer = new RandomIndexWriter ( random , dir , newIndexWriterConfig ( TEST_VERSION_CURRENT , new org . apache . lucene . analysis . MockAnalyzer ( random , MockTokenizer . KEYWORD , false ) ) . setMergePolicy ( newLogMergePolicy ( ) ) ) ; Document doc = new Document ( ) ; Field field = newField ( "field" , "" , TYPE_UNSTORED ) ; doc . add ( field ) ; for ( int i = 0 ; i < terms ; i ++ ) { <START_BUG> field . setValue ( TestFuzzyQuery2 . mapInt ( codePointTable , i ) ) ; <END_BUG> writer . addDocument ( doc ) ; } IndexReader r = writer . getReader ( ) ; IndexSearcher searcher = newSearcher ( r ) ; if ( VERBOSE ) { System . out . println ( ( "TEST:<seq2seq4repair_space>searcher=" + searcher ) ) ; } searcher . setSimilarity ( new DefaultSimilarity ( ) ) ; writer . close ( ) ; String line ; while ( ( line = reader . readLine ( ) ) != null ) { String [ ] params = line . split ( "," ) ; String query = TestFuzzyQuery2 . mapInt ( codePointTable , Integer . parseInt ( params [ 0 ] ) ) ; int prefix = Integer . parseInt ( params [ 1 ] ) ; int pqSize = Integer . parseInt ( params [ 2 ] ) ; float minScore = Float . parseFloat ( params [ 3 ] ) ; FuzzyQuery q = new FuzzyQuery ( new Term ( "field" , query ) , minScore , prefix ) ; q . setRewriteMethod ( new MultiTermQuery . TopTermsBoostOnlyBooleanQueryRewrite ( pqSize ) ) ; int expectedResults = Integer . parseInt ( reader . readLine ( ) ) ; TopDocs docs = searcher . search ( q , expectedResults ) ; assertEquals ( expectedResults , docs . totalHits ) ; for ( int i = 0 ; i < expectedResults ; i ++ ) { String [ ] scoreDoc = reader . readLine ( ) . split ( "," ) ; assertEquals ( Integer . parseInt ( scoreDoc [ 0 ] ) , docs . scoreDocs [ i ] . doc ) ; assertEquals ( Float . parseFloat ( scoreDoc [ 1 ] ) , docs . scoreDocs [ i ] . score , TestFuzzyQuery2 . epsilon ) ; } } r . close ( ) ; dir . close ( ) ; } private static String mapInt ( int [ ] codePointTable , int i ) { } }

Fix:
field . setStringValue ( TestFuzzyQuery2 . mapInt ( codePointTable , i ) ) ;
Buggy code:
public class Sketcher { public static Bitmap toSketcher ( final Bitmap img ) { } private static Bitmap origin2Gray ( final Bitmap img ) { } private static Bitmap gray2Gauss ( final Bitmap img , final int k ) { int w = img . getWidth ( ) ; int h = img . getHeight ( ) ; Bitmap gaussImg = Bitmap . createBitmap ( w , h , RGB_565 ) ; float sigma = ( ( ( k // 2.0F ) - 1.0F ) * 0.3F ) + 0.8F ; float [ ] [ ] gaussKernel = new float [ ( 2 * k ) + 1 ] [ ( 2 * k ) + 1 ] ; <START_BUG> for ( int i = 0 ; i <= ( ( 2 * k ) + 1 ) ; i ++ ) { <END_BUG> for ( int j = 0 ; j < ( ( 2 * k ) + 1 ) ; j ++ ) { float xDistance = ( i - k ) * ( i - k ) ; float yDistance = ( j - k ) * ( j - k ) ; gaussKernel [ i ] [ j ] = ( ( float ) ( Math . exp ( ( ( - ( xDistance + yDistance ) ) // ( ( 2.0F * sigma ) * sigma ) ) ) ) ) // ( ( ( 2.0F * sigma ) * sigma ) * ( ( float ) ( Math . PI ) ) ) ; } } for ( int i = 0 ; i < w ; i ++ ) { for ( int j = 0 ; j < h ; j ++ ) { float gray = 0.0F ; for ( int ii = 0 ; ii < ( ( 2 * k ) + 1 ) ; ii ++ ) { if ( ( ( i - k ) + ii ) < 0 ) { ii = k - i ; } else if ( ( ( i - k ) + ii ) >= w ) { break ; } for ( int jj = 0 ; jj < ( ( 2 * k ) + 1 ) ; jj ++ ) { if ( ( ( j - k ) + jj ) < 0 ) { jj = k - j ; } else if ( ( ( j - k ) + jj ) >= h ) { break ; } int c = img . getPixel ( ( ( i - k ) + ii ) , ( ( j - k ) + jj ) ) ; gray += ( 255.0F - ( Color . red ( c ) ) ) * ( gaussKernel [ ii ] [ jj ] ) ; } } gaussImg . setPixel ( i , j , Color . rgb ( ( ( int ) ( gray ) ) , ( ( int ) ( gray ) ) , ( ( int ) ( gray ) ) ) ) ; } } return gaussImg ; } private static Bitmap gray2Gauss ( final Bitmap img ) { } }

Fix:
for ( int i = 0 ; i < ( ( 2 * k ) + 1 ) ; i ++ ) {
Buggy code:
public class KEYRecord extends Record { private static KEYRecord member = new KEYRecord ( ) ; private short flags ; private byte proto ; private byte alg ; private byte [ ] key ; private int footprint = - 1 ; public static final int FLAG_NOCONF = 32768 ; public static final int FLAG_NOAUTH = 16384 ; public static final int FLAG_NOKEY = 49152 ; public static final int OWNER_ZONE = 256 ; public static final int OWNER_HOST = 512 ; public static final int OWNER_USER = 0 ; public static final int PROTOCOL_TLS = 1 ; public static final int PROTOCOL_EMAIL = 2 ; public static final int PROTOCOL_DNSSEC = 3 ; public static final int PROTOCOL_IPSEC = 4 ; public static final int PROTOCOL_ANY = 255 ; private KEYRecord ( ) { } private KEYRecord ( Name name , short dclass , int ttl ) { } static KEYRecord getMember ( ) { } public KEYRecord ( Name name , short dclass , int ttl , int flags , int proto , int alg , byte [ ] key ) { } Record rrFromWire ( Name name , short type , short dclass , int ttl , int length , DataByteInputStream in ) throws IOException { } Record rdataFromString ( Name name , short dclass , int ttl , MyStringTokenizer st , Name origin ) throws TextParseException { KEYRecord rec = new KEYRecord ( name , dclass , ttl ) ; rec . flags = ( ( short ) ( Integer . decode ( st . nextToken ( ) ) . intValue ( ) ) ) ; rec . proto = ( ( byte ) ( Integer . parseInt ( st . nextToken ( ) ) ) ) ; rec . alg = ( ( byte ) ( Integer . parseInt ( st . nextToken ( ) ) ) ) ; <START_BUG> if ( ! ( ( ( flags ) & ( KEYRecord . FLAG_NOKEY ) ) == ( KEYRecord . FLAG_NOKEY ) ) ) <END_BUG> rec . key = base64 . fromString ( st . remainingTokens ( ) ) ; else rec . key = null ; return rec ; } public String rdataToString ( ) { } public short getFlags ( ) { } public byte getProtocol ( ) { } public byte getAlgorithm ( ) { } public byte [ ] getKey ( ) { } public short getFootprint ( ) { } void rrToWire ( DataByteOutputStream out , Compression c ) throws IOException { } }

Fix:
if ( ! ( ( ( rec . flags ) & ( KEYRecord . FLAG_NOKEY ) ) == ( KEYRecord . FLAG_NOKEY ) ) )
Buggy code:
public abstract class AbstractIndexer implements IIndexConstants { SearchDocument document ; String indexPath ; public AbstractIndexer ( SearchDocument document , String indexPath ) { } public void addClassDeclaration ( int modifiers , char [ ] packageName , char [ ] name , char [ ] [ ] enclosingTypeNames , char [ ] superclass , char [ ] [ ] superinterfaces ) { } public void addConstructorDeclaration ( char [ ] typeName , char [ ] [ ] parameterTypes , char [ ] [ ] exceptionTypes ) { } public void addConstructorReference ( char [ ] typeName , int argCount ) { } public void addFieldDeclaration ( char [ ] typeName , char [ ] fieldName ) { } public void addFieldReference ( char [ ] fieldName ) { } protected void addIndexEntry ( char [ ] category , char [ ] key ) { <START_BUG> org . eclipse . jdt . core . search . SearchParticipant . addIndexEntry ( category , key , this . document . getPath ( ) , this . indexPath ) ; <END_BUG> } public void addInterfaceDeclaration ( int modifiers , char [ ] packageName , char [ ] name , char [ ] [ ] enclosingTypeNames , char [ ] [ ] superinterfaces ) { } public void addMethodDeclaration ( char [ ] methodName , char [ ] [ ] parameterTypes , char [ ] returnType , char [ ] [ ] exceptionTypes ) { } public void addMethodReference ( char [ ] methodName , int argCount ) { } public void addNameReference ( char [ ] name ) { } public void addTypeReference ( char [ ] typeName ) { } public abstract void indexDocument ( ) { } }

Fix:
org . eclipse . jdt . core . search . SearchParticipant . addIndexEntry ( category , key , this . document , this . indexPath ) ;
Buggy code:
public class MySoftwareFm implements ILoginDisplayStrategy , IHasComposite { private final Composite content ; private final ILoginStrategy loginStrategy ; private final CardConfig cardConfig ; protected String email ; protected String crypto ; protected String signupSalt ; protected ICallback < String > restart ; public MySoftwareFm ( Composite parent , CardConfig cardConfig , ILoginStrategy loginStrategy ) { } public void start ( ) { } public void start ( final String email ) { if ( ( crypto ) != null ) showLoggedIn ( ) ; else <START_BUG> display ( loginCardType , contactingServerTitle , contactingServerText , email ) ; <END_BUG> loginStrategy . requestSessionSalt ( new IRequestSaltCallback ( ) { @ Override public void saltReceived ( String salt ) { MySoftwareFm . this . signupSalt = salt ; showLogin ( salt , email ) ; } @ Override public void problemGettingSalt ( String message ) { displayWithClickBackToStart ( loginCardType , failedToContactServerTitle , failedToContactServerText , email , message ) ; } } ) ; } @ SuppressWarnings ( "unused" ) public void showLoggedIn ( ) { } @ Override public Control getControl ( ) { } @ Override public Composite getComposite ( ) { } public void display ( final String cardType , final String title , final String text , final String ... args ) { } public void displayWithClickBackToStart ( final String cardType , final String title , final String text , final String email , final String ... args ) { } public void displayWithClick ( final String cardType , final String title , final String text , final String email , final Runnable runnable , final String ... args ) { } @ Override public void showLogin ( String sessionSalt , String initialEmail ) { } @ Override public void showForgotPassword ( String sessionSalt , String initialEmail ) { } @ Override public void showSignup ( String sessionSalt , String initialEmail ) { } @ Override public void showChangePassword ( final String email ) { } public static void main ( String [ ] args ) { } public String getSignupSalt ( ) { } public void logout ( ) { } public void forceFocus ( ) { } }

Fix:
displayWithClickBackToStart ( loginCardType , contactingServerTitle , contactingServerText , email ) ;
Buggy code:
public class InAppPurchaseManager { public static String TAG = "[InAppPurchaseManager]<seq2seq4repair_space>" ; private final InAppPurchaseListener listener ; private SKProductsRequest productsRequest ; private final CustomTransactionObserver paymentObserver ; private boolean requestingProducts ; private boolean purchasingProduct ; public InAppPurchaseManager ( InAppPurchaseListener listener ) { } public boolean canMakePayments ( ) { } public void unregisterObserver ( ) { } public void requestProducts ( String ... productIds ) { } public void requestProduct ( List < String > productIds ) { } public void requestProducts ( Set < String > productIds ) { } public void purchaseProduct ( SKProduct product ) { if ( purchasingProduct ) { System . out . println ( ( ( InAppPurchaseManager . TAG ) + "Already<seq2seq4repair_space>purchasing<seq2seq4repair_space>a<seq2seq4repair_space>product!" ) ) ; return ; } if ( product == null ) { System . out . println ( ( ( InAppPurchaseManager . TAG ) + "The<seq2seq4repair_space>product<seq2seq4repair_space>to<seq2seq4repair_space>be<seq2seq4repair_space>purchased<seq2seq4repair_space>cannot<seq2seq4repair_space>be<seq2seq4repair_space>null!" ) ) ; return ; } purchasingProduct = true ; System . out . println ( ( ( ( ( InAppPurchaseManager . TAG ) + "Purchasing<seq2seq4repair_space>product<seq2seq4repair_space>'" ) + ( product . getLocalizedTitle ( ) ) ) + "'..." ) ) ; <START_BUG> SKPayment payment = SKPayment . createFromProduct ( product ) ; <END_BUG> SKPaymentQueue . getDefaultQueue ( ) . addPayment ( payment ) ; } public void restoreTransactions ( ) { } public boolean isPurchasingProduct ( ) { } public boolean isRequestingProducts ( ) { } private class RequestDelegate extends SKProductsRequestDelegateAdapter { @ Override public void didReceiveResponse ( SKProductsRequest request , SKProductsResponse response ) { } @ Override public void didFail ( SKRequest request , NSError error ) { } } protected void transactionCompleted ( SKPaymentTransaction transaction ) { } protected void transactionRestored ( SKPaymentTransaction transaction ) { } protected void transactionFailed ( SKPaymentTransaction transaction ) { } protected void restoreCompleted ( SKPaymentQueue queue ) { } protected void restoreFailed ( SKPaymentQueue queue , NSError error ) { } }

Fix:
SKPayment payment = SKPayment . create ( product ) ;
Buggy code:
public interface VEXDocument { public void addDocumentListener ( DocumentListener listener ) { } public boolean canInsertFragment ( int offset , VEXDocumentFragment fragment ) { } public boolean canInsertText ( int offset ) { } public Position createPosition ( int offset ) { } public void delete ( int startOffset , int endOffset ) throws DocumentValidationException { } public VEXElement findCommonElement ( int offset1 , int offset2 ) { } public char getCharacterAt ( int offset ) { } public VEXElement getElementAt ( int offset ) { } public String getEncoding ( ) { } public VEXDocumentFragment getFragment ( int startOffset , int endOffset ) { } public int getLength ( ) { } public List < String > getNodeNames ( int startOffset , int endOffset ) { } <START_BUG> public VEXNode [ ] getNodes ( int startOffset , int endOffset ) ; <END_BUG> public String getRawText ( int startOffset , int endOffset ) { } public VEXElement getRootElement ( ) { } public String getText ( int startOffset , int endOffset ) { } public Validator getValidator ( ) { } public void insertElement ( int offset , VEXElement defaults ) throws DocumentValidationException { } public void insertFragment ( int offset , VEXDocumentFragment fragment ) throws DocumentValidationException { } public void insertText ( int offset , String text ) throws DocumentValidationException { } public boolean isUndoEnabled ( ) { } public void removeDocumentListener ( DocumentListener listener ) { } public String getPublicID ( ) { } public void setPublicID ( String publicID ) { } public void setSystemID ( String systemID ) { } public String getSystemID ( ) { } public void setUndoEnabled ( boolean undoEnabled ) { } public void setValidator ( Validator validator ) { } public void fireAttributeChanged ( DocumentEvent documentEvent ) { } }

Fix:
public List < VEXNode > getNodes ( int startOffset , int endOffset ) ;
Buggy code:
public class ServerJobRule implements TestRule { public static final String RUN_AS_ANONYMOUS = "anonymous" ; private Class < ? extends IServerSession > m_serverSessionClass ; public ServerJobRule ( ) { } public ServerJobRule ( final Class < ? extends IServerSession > serverSessionClass ) { } @ Override public Statement apply ( final Statement base , final Description description ) { } @ Internal protected void runInServerJob ( final Statement base , final Subject subject ) throws Throwable { } @ Internal protected Subject newTestSubject ( final Description description ) { RunAs runAsAnnotation = description . getAnnotation ( RunAs . class ) ; <START_BUG> if ( runAsAnnotation == null ) { <END_BUG> runAsAnnotation = description . getTestClass ( ) . getAnnotation ( RunAs . class ) ; } final String runAs = ( runAsAnnotation != null ) ? runAsAnnotation . value ( ) : null ; final Subject subject = new Subject ( ) ; subject . getPrincipals ( ) . add ( new org . eclipse . scout . commons . security . SimplePrincipal ( StringUtility . nvl ( runAs , ServerJobRule . RUN_AS_ANONYMOUS ) ) ) ; subject . setReadOnly ( ) ; return subject ; } @ Internal protected IServerSession lookupServerSession ( final ServerJobInput input ) throws ProcessingException { } }

Fix:
if ( ( runAsAnnotation == null ) && ( ( description . getTestClass ( ) ) != null ) ) {
Buggy code:
public class WildcardBinding extends ReferenceBinding { ReferenceBinding genericType ; int rank ; public TypeBinding bound ; char [ ] genericSignature ; public int kind ; ReferenceBinding superclass ; ReferenceBinding [ ] superInterfaces ; TypeVariableBinding typeVariable ; LookupEnvironment environment ; public WildcardBinding ( ReferenceBinding genericType , int rank , TypeBinding bound , int kind , LookupEnvironment environment ) { } public int bindingType ( ) { } public boolean boundCheck ( TypeBinding argumentType ) { } public boolean canBeInstantiated ( ) { } public void collectSubstitutes ( TypeBinding otherType , Map substitutes ) { } public String debugName ( ) { } public TypeBinding erasure ( ) { } public char [ ] genericTypeSignature ( ) { } void initialize ( ReferenceBinding someGenericType , TypeBinding someBound ) { } public boolean isEquivalentTo ( TypeBinding otherType ) { } public boolean isSuperclassOf ( ReferenceBinding otherType ) { } public boolean isUnboundWildcard ( ) { } public boolean isWildcard ( ) { } public char [ ] readableName ( ) { } ReferenceBinding resolve ( ) { } public char [ ] shortReadableName ( ) { } public char [ ] signature ( ) { } public char [ ] sourceName ( ) { } public ReferenceBinding superclass ( ) { } public ReferenceBinding [ ] superInterfaces ( ) { } public void swapUnresolved ( UnresolvedReferenceBinding unresolvedType , ReferenceBinding resolvedType , LookupEnvironment env ) { boolean affected = false ; if ( ( this . genericType ) == unresolvedType ) { this . genericType = resolvedType ; affected = true ; } else if ( ( this . bound ) == unresolvedType ) { <START_BUG> this . bound = ( resolvedType . isGenericType ( ) ) ? env . createRawType ( resolvedType , null ) : resolvedType ; <END_BUG> affected = true ; } if ( affected ) initialize ( this . genericType , this . bound ) ; } public String toString ( ) { } public TypeVariableBinding typeVariable ( ) { } }

Fix:
this . bound = ( resolvedType . isGenericType ( ) ) ? env . createRawType ( resolvedType , resolvedType . enclosingType ( ) ) : resolvedType ;
Buggy code:
@ EnableWebSocket @ Configuration @ ComponentScan ( "de.rwth.idsg.bikeman.ixsi" ) @ Slf4j public class IxsiConfiguration implements WebSocketConfigurer { @ Autowired private WebSocketEndpoint webSocketEndpoint ; @ Autowired private SystemValidator systemValidator ; @ Override public void registerWebSocketHandlers ( WebSocketHandlerRegistry registry ) { <START_BUG> registry . addHandler ( webSocketEndpoint , WS_ENDPOINT ) . addInterceptors ( new de . rwth . idsg . bikeman . ixsi . HandshakeInterceptor ( systemValidator ) ) ; <END_BUG> } @ Bean public JAXBContext jaxbContext ( ) throws JAXBException { } @ Bean public DatatypeFactory datatypeFactory ( ) throws DatatypeConfigurationException { } }

Fix:
registry . addHandler ( webSocketEndpoint , WS_ENDPOINT ) . setAllowedOrigins ( "*" ) . addInterceptors ( new de . rwth . idsg . bikeman . ixsi . HandshakeInterceptor ( systemValidator ) ) ;
Buggy code:
@ Component public class StatusFunctions { @ Autowired private StatusFacade facade ; private static final String STATUS_ERROR = "Undefined" ; private static long LAST_CALL = 0 ; private static final long FIVE_MINUTES = 300000 ; private static Map < String , String > regions ; public Map < String , String > getAllServerStatus ( ) { long currentTime = System . currentTimeMillis ( ) ; long dif = currentTime - ( StatusFunctions . LAST_CALL ) ; if ( dif > ( StatusFunctions . FIVE_MINUTES ) ) { StatusFunctions . regions = new HashMap < > ( ) ; String status = null ; <START_BUG> for ( RegionEnum region : RegionEnum . values ( ) ) { <END_BUG> try { status = facade . getStatusByRegion ( region ) ; } catch ( BadRequestException | UnauthorizedException | EntityNotFoundException | RateLimitExceededException | InternalServerException e ) { status = StatusFunctions . STATUS_ERROR ; } finally { StatusFunctions . regions . put ( region . toString ( ) , status ) ; } } StatusFunctions . LAST_CALL = currentTime ; } return StatusFunctions . regions ; } }

Fix:
for ( RegionEnum region : RegionEnum . valuesOfServer ( ) ) {
Buggy code:
public class AdviceAdapter extends CursorAdapter { public static class ViewHolder { public final ImageView iconView ; public final TextView titleView ; public final TextView timerView ; public ViewHolder ( View view ) { } } public AdviceAdapter ( Context context , Cursor c , int flags ) { } @ Override public View newView ( Context context , Cursor cursor , ViewGroup parent ) { } @ Override public void bindView ( View view , Context context , Cursor cursor ) { AdviceAdapter . ViewHolder viewHolder = ( ( AdviceAdapter . ViewHolder ) ( view . getTag ( ) ) ) ; viewHolder . iconView . setImageResource ( timer ) ; String title = cursor . getString ( COL_TITLE ) ; viewHolder . titleView . setText ( title ) ; <START_BUG> String timer = cursor . getString ( COL_TIME ) ; <END_BUG> viewHolder . timerView . setText ( timer ) ; } }

Fix:
String timer = String . valueOf ( cursor . getInt ( COL_TIME ) ) ;
Buggy code:
public class TriggerFluidContainer extends BCStatement implements ITriggerExternal { public enum State { Empty , Contains , Space , Full ; } public TriggerFluidContainer . State state ; public TriggerFluidContainer ( TriggerFluidContainer . State state ) { } @ Override public int maxParameters ( ) { } @ Override public String getDescription ( ) { } @ Override public boolean isTriggerActive ( TileEntity tile , ForgeDirection side , IStatementContainer statementContainer , IStatementParameter [ ] parameters ) { if ( tile instanceof IFluidHandler ) { IFluidHandler container = ( ( IFluidHandler ) ( tile ) ) ; FluidStack searchedFluid = null ; <START_BUG> if ( ( ( parameters != null ) && ( ( parameters . length ) >= 1 ) ) && ( ( parameters [ 0 ] . getItemStack ( ) ) != null ) ) { <END_BUG> searchedFluid = FluidContainerRegistry . getFluidForFilledItem ( parameters [ 0 ] . getItemStack ( ) ) ; } if ( searchedFluid != null ) { searchedFluid . amount = 1 ; } FluidTankInfo [ ] liquids = container . getTankInfo ( side ) ; if ( ( liquids == null ) || ( ( liquids . length ) == 0 ) ) { return false ; } switch ( state ) { case Empty : for ( FluidTankInfo c : liquids ) { if ( ( ( ( c . fluid ) != null ) && ( ( c . fluid . amount ) > 0 ) ) && ( ( searchedFluid == null ) || ( searchedFluid . isFluidEqual ( c . fluid ) ) ) ) { return false ; } } return true ; case Contains : for ( FluidTankInfo c : liquids ) { if ( ( ( ( c . fluid ) != null ) && ( ( c . fluid . amount ) > 0 ) ) && ( ( searchedFluid == null ) || ( searchedFluid . isFluidEqual ( c . fluid ) ) ) ) { return true ; } } return false ; case Space : if ( searchedFluid == null ) { for ( FluidTankInfo c : liquids ) { if ( ( ( c . fluid ) == null ) || ( ( c . fluid . amount ) < ( c . capacity ) ) ) { return true ; } } return false ; } return ( container . fill ( side , searchedFluid , false ) ) > 0 ; case Full : if ( searchedFluid == null ) { for ( FluidTankInfo c : liquids ) { if ( ( ( c . fluid ) == null ) || ( ( c . fluid . amount ) < ( c . capacity ) ) ) { return false ; } } return true ; } return ( container . fill ( side , searchedFluid , false ) ) <= 0 ; } } return false ; } @ Override public int getIconIndex ( ) { } }

Fix:
if ( ( ( ( parameters != null ) && ( ( parameters . length ) >= 1 ) ) && ( ( parameters [ 0 ] ) != null ) ) && ( ( parameters [ 0 ] . getItemStack ( ) ) != null ) ) {
Buggy code:
public class Radio extends WebMarkupContainer { private static final long serialVersionUID = 1L ; public Radio ( String id ) { } public Radio ( String id , IModel model ) { } protected void onComponentTag ( final ComponentTag tag ) { checkComponentTag ( tag , "input" ) ; checkComponentTagAttribute ( tag , "type" , "radio" ) ; RadioGroup group = ( ( RadioGroup ) ( findParent ( RadioGroup . class ) ) ) ; if ( group == null ) { <START_BUG> throw new wicket . WicketRuntimeException ( ( ( "RadioChoice<seq2seq4repair_space>component<seq2seq4repair_space>[" + ( getPath ( ) ) ) + "]<seq2seq4repair_space>cannot<seq2seq4repair_space>find<seq2seq4repair_space>its<seq2seq4repair_space>parent<seq2seq4repair_space>RadioGroup.<seq2seq4repair_space>All<seq2seq4repair_space>Radio<seq2seq4repair_space>components<seq2seq4repair_space>must<seq2seq4repair_space>be<seq2seq4repair_space>a<seq2seq4repair_space>child<seq2seq4repair_space>of<seq2seq4repair_space>or<seq2seq4repair_space>below<seq2seq4repair_space>in<seq2seq4repair_space>the<seq2seq4repair_space>hierarchy<seq2seq4repair_space>of<seq2seq4repair_space>a<seq2seq4repair_space>RadioGroup<seq2seq4repair_space>component." ) ) ; <END_BUG> } tag . put ( "name" , group . getInputName ( ) ) ; tag . put ( "value" , getPath ( ) ) ; if ( Objects . equal ( group . getModelObject ( ) , getModelObject ( ) ) ) { tag . put ( "checked" , "checked" ) ; } super . onComponentTag ( tag ) ; } }

Fix:
throw new wicket . WicketRuntimeException ( ( ( "Radio<seq2seq4repair_space>component<seq2seq4repair_space>[" + ( getPath ( ) ) ) + "]<seq2seq4repair_space>cannot<seq2seq4repair_space>find<seq2seq4repair_space>its<seq2seq4repair_space>parent<seq2seq4repair_space>RadioGroup.<seq2seq4repair_space>All<seq2seq4repair_space>Radio<seq2seq4repair_space>components<seq2seq4repair_space>must<seq2seq4repair_space>be<seq2seq4repair_space>a<seq2seq4repair_space>child<seq2seq4repair_space>of<seq2seq4repair_space>or<seq2seq4repair_space>below<seq2seq4repair_space>in<seq2seq4repair_space>the<seq2seq4repair_space>hierarchy<seq2seq4repair_space>of<seq2seq4repair_space>a<seq2seq4repair_space>RadioGroup<seq2seq4repair_space>component." ) ) ;
Buggy code:
public class MainGameTester { public static void main ( String [ ] args ) { DisplayManager . createDisplay ( ) ; Renderer renderer = new Renderer ( ) ; GameWorld gameWorld = new GameWorld ( new ChunkMap ( ) , new LayerMap ( ) ) ; Chunk chk = new Chunk ( new Vector2i ( 0 , 0 ) ) ; gameWorld . getChunkMap ( ) . put ( chk . getPosition ( ) , chk ) ; gameWorld . getChunkMap ( ) . addTile ( new fr . iutvalence . info . dut . m2107 . tiles . Tile ( TileType . Dirt , 0 , 0 ) ) ; gameWorld . getChunkMap ( ) . addTile ( new fr . iutvalence . info . dut . m2107 . tiles . Tile ( TileType . Dirt , 2 , 0 ) ) ; gameWorld . getChunkMap ( ) . addTile ( new fr . iutvalence . info . dut . m2107 . tiles . Tile ( TileType . Dirt , 4 , 0 ) ) ; gameWorld . getChunkMap ( ) . addTile ( new fr . iutvalence . info . dut . m2107 . tiles . Tile ( TileType . Dirt , 6 , 0 ) ) ; Chunk chk2 = new Chunk ( new Vector2i ( ( - 1 ) , 0 ) ) ; gameWorld . getChunkMap ( ) . put ( chk2 . getPosition ( ) , chk2 ) ; gameWorld . getChunkMap ( ) . addTile ( new fr . iutvalence . info . dut . m2107 . tiles . Tile ( TileType . Stone , ( - 1 ) , 0 ) ) ; gameWorld . getChunkMap ( ) . addTile ( new fr . iutvalence . info . dut . m2107 . tiles . Tile ( TileType . Stone , ( - 3 ) , 0 ) ) ; gameWorld . getChunkMap ( ) . addTile ( new fr . iutvalence . info . dut . m2107 . tiles . Tile ( TileType . Stone , ( - 5 ) , 0 ) ) ; gameWorld . getChunkMap ( ) . addTile ( new fr . iutvalence . info . dut . m2107 . tiles . Tile ( TileType . Stone , ( - 7 ) , 0 ) ) ; <START_BUG> gameWorld . getLayerMap ( ) . addEmptyRange ( 0 , 4 ) ; <END_BUG> WorldSaver . setFilePath ( "res//test.sav" ) ; WorldLoader . setFilePath ( "res//test.sav" ) ; while ( ! ( Display . isCloseRequested ( ) ) ) { gameWorld . update ( ) ; renderer . prepare ( ) ; renderer . render ( gameWorld ) ; DisplayManager . updateDisplay ( ) ; } renderer . cleanUp ( ) ; TILE_LOADER . unloadAll ( ) ; SPRITE_LOADER . unloadAll ( ) ; DisplayManager . closeDisplay ( ) ; } }

Fix:
gameWorld . getLayerMap ( ) . addEmpty ( 4 ) ;
Buggy code:
public class RuntimeConfigurable implements Serializable { private String elementTag = null ; private Vector children = new Vector ( ) ; private transient Object wrappedObject = null ; private transient AttributeList attributes ; private Vector attributeNames = new Vector ( ) ; private Hashtable attributeMap = new Hashtable ( ) ; private StringBuffer characters = new StringBuffer ( ) ; private boolean proxyConfigured = false ; public RuntimeConfigurable ( Object proxy , String elementTag ) { } void setProxy ( Object proxy ) { } public Object getProxy ( ) { } public void setAttributes ( AttributeList attributes ) { } public void setAttribute ( String name , String value ) { } public Hashtable getAttributeMap ( ) { } public AttributeList getAttributes ( ) { } public void addChild ( RuntimeConfigurable child ) { } RuntimeConfigurable getChild ( int index ) { } Enumeration getChildren ( ) { } public void addText ( String data ) { } public void addText ( char [ ] buf , int start , int count ) { } public StringBuffer getText ( ) { } public String getElementTag ( ) { } public void maybeConfigure ( Project p ) throws BuildException { } public void maybeConfigure ( Project p , boolean configureChildren ) throws BuildException { String id = null ; if ( proxyConfigured ) { return ; } Object target = ( ( wrappedObject ) instanceof TaskAdapter ) ? ( ( TaskAdapter ) ( wrappedObject ) ) . getProxy ( ) : wrappedObject ; IntrospectionHelper ih = IntrospectionHelper . getHelper ( p , target . getClass ( ) ) ; for ( int i = 0 ; i < ( attributeNames . size ( ) ) ; i ++ ) { String name = ( ( String ) ( attributeNames . elementAt ( i ) ) ) ; String value = ( ( String ) ( attributeMap . get ( name ) ) ) ; value = p . replaceProperties ( value ) ; try { ih . setAttribute ( p , target , name . toLowerCase ( Locale . US ) , value ) ; } catch ( BuildException be ) { if ( ! ( name . equals ( "id" ) ) ) { throw be ; } } } id = ( ( String ) ( attributeMap . get ( "id" ) ) ) ; if ( ( characters . length ( ) ) != 0 ) { <START_BUG> ProjectHelper . addText ( p , wrappedObject , characters . toString ( ) ) ; <END_BUG> } Enumeration = children . elements ( ) ; } }

Fix:
ProjectHelper . addText ( p , wrappedObject , characters . substring ( 0 ) ) ;
Buggy code:
public final class SignIn2Application extends WicketExampleApplication { public SignIn2Application ( ) { } public Class getHomePage ( ) { } public Session newSession ( Request request , Response response ) { <START_BUG> return new SignIn2Session ( this , request , response ) ; <END_BUG> } protected void init ( ) { } protected IRequestCycleProcessor newRequestCycleProcessor ( ) { } }

Fix:
return new SignIn2Session ( this , request ) ;
Buggy code:
public class JMXProtocolPackager implements DeploymentPackager { private static final List < String > defaultDependencies = new ArrayList < String > ( ) ; private static final Logger log = Logger . getLogger ( JMXProtocolPackager . class ) ; private ServiceArchiveHolder archiveHolder ; JMXProtocolPackager ( ServiceArchiveHolder archiveHolder ) { } @ Override public Archive < ? > generateDeployment ( TestDeployment testDeployment , Collection < ProtocolArchiveProcessor > protocolProcessors ) { final Archive < ? > appArchive = testDeployment . getApplicationArchive ( ) ; if ( ( archiveHolder . getArchive ( ) ) == null ) { final Collection < Archive < ? > > auxArchives = testDeployment . getAuxiliaryArchives ( ) ; JavaArchive archive = generateArquillianServiceArchive ( auxArchives ) ; archiveHolder . setArchive ( archive ) ; } addModulesManifestDependencies ( appArchive ) ; <START_BUG> archiveHolder . addPreparedDeployment ( appArchive ) ; <END_BUG> return appArchive ; } private JavaArchive generateArquillianServiceArchive ( Collection < Archive < ? > > auxArchives ) { } private void addModulesManifestDependencies ( Archive < ? > appArchive ) { } }

Fix:
archiveHolder . addPreparedDeployment ( testDeployment . getDeploymentName ( ) ) ;
Buggy code:
public class EjbDependencyDeploymentUnitProcessor implements DeploymentUnitProcessor { private static final ModuleIdentifier JAVAEE_MODULE_IDENTIFIER = ModuleIdentifier . create ( "javaee.api" ) ; private static final ModuleIdentifier EJB_SUBSYSTEM = ModuleIdentifier . create ( "org.jboss.as.ejb3" ) ; private static final ModuleIdentifier EJB_CLIENT = ModuleIdentifier . create ( "org.jboss.ejb-client" ) ; private static final ModuleIdentifier EJB_IIOP_CLIENT = ModuleIdentifier . create ( "org.jboss.iiop-client" ) ; private static final ModuleIdentifier JACORB = ModuleIdentifier . create ( "org.jboss.as.jacorb" ) ; @ Override public void deploy ( DeploymentPhaseContext phaseContext ) throws DeploymentUnitProcessingException { DeploymentUnit deploymentUnit = phaseContext . getDeploymentUnit ( ) ; final ModuleLoader moduleLoader = Module . getBootModuleLoader ( ) ; final ModuleSpecification moduleSpecification = deploymentUnit . getAttachment ( MODULE_SPECIFICATION ) ; moduleSpecification . addSystemDependency ( new org . jboss . as . server . deployment . module . ModuleDependency ( moduleLoader , EjbDependencyDeploymentUnitProcessor . EJB_CLIENT , false , false , true , false ) ) ; moduleSpecification . addSystemDependency ( new org . jboss . as . server . deployment . module . ModuleDependency ( moduleLoader , EjbDependencyDeploymentUnitProcessor . EJB_IIOP_CLIENT , false , false , false , false ) ) ; <START_BUG> moduleSpecification . addSystemDependency ( new org . jboss . as . server . deployment . module . ModuleDependency ( moduleLoader , EjbDependencyDeploymentUnitProcessor . EJB_SUBSYSTEM , false , false , false , false ) ) ; <END_BUG> if ( JacORBDeploymentMarker . isJacORBDeployment ( deploymentUnit ) ) { moduleSpecification . addSystemDependency ( new org . jboss . as . server . deployment . module . ModuleDependency ( moduleLoader , EjbDependencyDeploymentUnitProcessor . JACORB , false , false , false , false ) ) ; } if ( ( ! ( EjbDeploymentMarker . isEjbDeployment ( deploymentUnit ) ) ) && ( ! ( DeploymentTypeMarker . isType ( APPLICATION_CLIENT , deploymentUnit ) ) ) ) { return ; } if ( Boolean . getBoolean ( "org.jboss.as.ejb3.EMBEDDED" ) ) moduleSpecification . addSystemDependency ( new org . jboss . as . server . deployment . module . ModuleDependency ( moduleLoader , ModuleIdentifier . CLASSPATH , false , false , false , false ) ) ; moduleSpecification . addSystemDependency ( new org . jboss . as . server . deployment . module . ModuleDependency ( moduleLoader , EjbDependencyDeploymentUnitProcessor . JAVAEE_MODULE_IDENTIFIER , false , false , false , false ) ) ; } @ Override public void undeploy ( DeploymentUnit context ) { } }

Fix:
moduleSpecification . addSystemDependency ( new org . jboss . as . server . deployment . module . ModuleDependency ( moduleLoader , EjbDependencyDeploymentUnitProcessor . EJB_SUBSYSTEM , false , false , true , false ) ) ;
Buggy code:
public class ReadMessageTest extends SchemaLoader { @ Test public void testMakeReadMessage ( ) throws IOException { } private ReadCommand serializeAndDeserializeReadMessage ( ReadCommand rm ) throws IOException { } @ Test public void testGetColumn ( ) throws IOException , ColumnFamilyNotDefinedException { Table table = Table . open ( "Keyspace1" ) ; RowMutation rm ; DecoratedKey dk = Util . dk ( "key1" ) ; rm = new RowMutation ( "Keyspace1" , dk . key ) ; <START_BUG> rm . add ( new QueryPath ( "Standard1" , null , "Column1" . getBytes ( ) ) , "abcd" . getBytes ( ) , 0 ) ; <END_BUG> rm . apply ( ) ; ReadCommand command = new SliceByNamesReadCommand ( "Keyspace1" , dk . key , new QueryPath ( "Standard1" ) , Arrays . asList ( "Column1" . getBytes ( ) ) ) ; Row row = command . getRow ( table ) ; IColumn col = row . cf . getColumn ( "Column1" . getBytes ( ) ) ; assert Arrays . equals ( col . value ( ) , "abcd" . getBytes ( ) ) ; } }

Fix:
rm . add ( new QueryPath ( "Standard1" , null , "Column1" . getBytes ( ) ) , "abcd" . getBytes ( ) , new TimestampClock ( 0 ) ) ;