nus-yam/ex-repair huggingface dataset:
Buggy code:
public class TestCompiler implements SampleListener , HashTreeTraverser { private static transient Logger log = Hierarchy . getDefaultHierarchy ( ) . getLoggerFor ( "jmeter.engine" ) ; LinkedList stack = new LinkedList ( ) ; Map samplerConfigMap = new HashMap ( ) ; Set objectsWithFunctions = new HashSet ( ) ; HashTree testTree ; SampleResult previousResult ; Sampler currentSampler ; JMeterVariables threadVars ; private static Set pairing = new HashSet ( ) ; public TestCompiler ( HashTree testTree , JMeterVariables vars ) { } public static void initialize ( ) { } public void sampleOccurred ( SampleEvent e ) { } public void sampleStarted ( SampleEvent e ) { } public void sampleStopped ( SampleEvent e ) { } public SamplePackage configureSampler ( Sampler sampler ) { } private void runPreProcessors ( List preProcessors ) { } public void done ( SamplePackage pack ) { } public void addNode ( Object node , HashTree subTree ) { } public void subtractNode ( ) { } public void processPath ( ) { } private void saveSamplerConfigs ( Sampler sam ) { } public static class Test extends TestCase { public Test ( String name ) { } public void testConfigGathering ( ) throws Exception { } class TestSampler extends AbstractSampler implements PerSampleClonable { public void addCustomTestElement ( TestElement t ) { } public SampleResult sample ( Entry e ) { } public Object clone ( ) { } } } private class ObjectPair { TestElement child ; TestElement parent ; public ObjectPair ( TestElement one , TestElement two ) { } public void addTestElements ( ) { <START_BUG> if ( ( ( parent ) instanceof Controller ) && ( ( child ) instanceof Sampler ) ) { <END_BUG> parent . addTestElement ( child ) ; } } public int hashCode ( ) { } public boolean equals ( Object o ) { } } private void configureWithConfigElements ( Sampler sam , List configs ) { } private void configureWithModifiers ( Sampler sam , List modifiers ) { } private void configureWithResponseModifiers ( Sampler sam , List responseModifiers ) { } }

Fix:
if ( ( ( parent ) instanceof Controller ) && ( ( ( child ) instanceof Sampler ) || ( ( child ) instanceof Controller ) ) ) {
Buggy code:
public class Multiplication implements Expression { private Expression x ; private Expression y ; public Multiplication ( Expression x , Expression y ) { } public Expression getX ( ) { } public Expression getY ( ) { } @ Override public double evaluate ( Assignments assignments ) { } @ Override public Expression derivative ( Variable var ) { <START_BUG> return new Multiplication ( this . x . derivative ( var ) , this . y . derivative ( var ) ) ; <END_BUG> } public boolean equals ( Expression other ) { } public String toString ( ) { } }

Fix:
return new Addition ( new Multiplication ( this . x . derivative ( var ) , this . y ) , new Multiplication ( this . x , this . y . derivative ( var ) ) ) ;
Buggy code:
public class ReactorNettyTcpClient < P > implements TcpOperations < P > { private static final Log logger = LogFactory . getLog ( ReactorNettyTcpClient . class ) ; private Environment environment ; private TcpClient < Message < P > , Message < P > > tcpClient ; public ReactorNettyTcpClient ( String host , int port , Codec < Buffer , Message < P > , Message < P > > codec ) { } @ Override public ListenableFuture < Void > connect ( TcpConnectionHandler < P > connectionHandler ) { } @ Override public ListenableFuture < Void > connect ( final TcpConnectionHandler < P > connectionHandler , final ReconnectStrategy reconnectStrategy ) { <START_BUG> Assert . notNull ( reconnectStrategy , "'reconnectStrategy'<seq2seq4repair_space>is<seq2seq4repair_space>required" ) ; <END_BUG> Stream < TcpConnection < Message < P > , Message < P > > > stream = this . tcpClient . open ( new Reconnect ( ) { @ Override public Tuple2 < InetSocketAddress , Long > reconnect ( InetSocketAddress address , int attempt ) { return Tuple . of ( address , reconnectStrategy . getTimeToNextAttempt ( attempt ) ) ; } } ) ; composeConnectionHandling ( stream , connectionHandler ) ; return new PassThroughPromiseToListenableFutureAdapter < Void > ( toPromise ( stream ) ) ; } private void composeConnectionHandling ( Composable < TcpConnection < Message < P > , Message < P > > > composable , final TcpConnectionHandler < P > connectionHandler ) { } private Promise < Void > toPromise ( Stream < TcpConnection < Message < P > , Message < P > > > stream ) { } @ Override public ListenableFuture < Void > shutdown ( ) { } }

Fix:
Assert . notNull ( reconnectStrategy , "ReconnectStrategy<seq2seq4repair_space>must<seq2seq4repair_space>not<seq2seq4repair_space>be<seq2seq4repair_space>null" ) ;
Buggy code:
public abstract class AbstractRenderableColumn extends AbstractColumn { private boolean contentAsTooltip = false ; private boolean escapeContent = true ; public AbstractRenderableColumn ( ColumnLocation location , String header ) { } public abstract String getNodeValue ( TreeNode node ) { } public boolean isContentAsTooltip ( ) { } public boolean isEscapeContent ( ) { } public Component newCell ( MarkupContainer < ? > parent , String id , TreeNode node , int level ) { } public IRenderable newCell ( TreeNode node , int level ) { return new IRenderable ( ) { private static final long serialVersionUID = 1L ; public void render ( TreeNode node , Response response ) { String content = getNodeValue ( node ) ; if ( isEscapeContent ( ) ) { content = Strings . escapeMarkup ( content ) . toString ( ) ; } <START_BUG> response . write ( "<span<seq2seq4repair_space>class=\"text\"" ) ; <END_BUG> if ( isContentAsTooltip ( ) ) { response . write ( ( ( "<seq2seq4repair_space>title=\"" + content ) + "\"" ) ) ; } response . write ( ">" ) ; response . write ( content ) ; response . write ( "<//span>" ) ; } } ; } public void setContentAsTooltip ( boolean contentAsTooltip ) { } public void setEscapeContent ( boolean escapeContent ) { } }

Fix:
response . write ( "<span" ) ;
Buggy code:
public class Database extends SQLiteOpenHelper { private static final int DB_VERSION = 1 ; private static final String DB_NAME = "database.db" ; private Context context ; private HashMap < Integer , String > categories ; public Database ( Context context ) { } @ Override public void onCreate ( SQLiteDatabase db ) { } @ Override public void onUpgrade ( SQLiteDatabase db , int oldVersion , int newVersion ) { } private void executeSQLScript ( SQLiteDatabase database , String dbname ) { } private void initCategories ( ) { } public void showTuples ( ) { } public Cursor getAllESubstances ( ) { } public Cursor getAllEsubstancesDependOnNumber ( String number ) { } public ESubstanceItem getESubstanceItemById ( int id ) { } public Cursor getAllDiseases ( ) { } public Cursor getAllDiseasesDependOnName ( String name ) { <START_BUG> return getReadableDatabase ( ) . rawQuery ( ( ( ( "SELECT<seq2seq4repair_space>*<seq2seq4repair_space>" + ( ( "<seq2seq4repair_space>FROM<seq2seq4repair_space>" + "diseases<seq2seq4repair_space>" ) + "<seq2seq4repair_space>WHERE<seq2seq4repair_space>name<seq2seq4repair_space>LIKE<seq2seq4repair_space>'%" ) ) + name ) + "%'" ) , null ) ; <END_BUG> } public ArrayList < DiseaseItem > getDiseaseBasedOnName ( String name ) { } public ArrayList < String > getAllCategories ( ) { } public ArrayList < String > getAllDiseasesBasedOnCategories ( String nameOfCategory ) { } }

Fix:
return getReadableDatabase ( ) . rawQuery ( ( ( ( ( "SELECT<seq2seq4repair_space>*<seq2seq4repair_space>" + ( ( "<seq2seq4repair_space>FROM<seq2seq4repair_space>" + "diseases<seq2seq4repair_space>" ) + "<seq2seq4repair_space>WHERE<seq2seq4repair_space>name<seq2seq4repair_space>LIKE<seq2seq4repair_space>'%" ) ) + name ) + "%'" ) + "<seq2seq4repair_space>GROUP<seq2seq4repair_space>BY<seq2seq4repair_space>name" ) , null ) ;
Buggy code:
public class RenameTestProjectHandler extends AbstractRenameHandler { @ Inject private IEclipseContext context ; @ Inject private TestProjectService testProjectService ; @ Inject private TestEditorTranslationService translationService ; private static final Logger LOGGER = Logger . getLogger ( RenameTestProjectHandler . class ) ; @ Override protected void executeSpecials ( TestStructure selected , String sbname ) { } @ Override protected AbstractRenameTestStructureWizardPage getRenameTestStructureWizardPage ( TestStructure selectedTS ) { } @ Override protected void executeRenaming ( TestStructure selectedTestStructure , String sbname ) throws SystemException { } @ Override @ Execute public boolean canExecute ( IEclipseContext context ) { TestExplorer explorer = ( ( TestExplorer ) ( context . get ( TEST_EXPLORER_VIEW ) ) ) ; CanExecuteTestExplorerHandlerRules rules = ContextInjectionFactory . make ( CanExecuteTestExplorerHandlerRules . class , context ) ; <START_BUG> return ( super . canExecute ( context ) ) & ( ( rules . canExecuteOnTestProjectRule ( explorer ) ) & ( ( ( ( TestStructure ) ( explorer . getSelection ( ) . getFirstElement ( ) ) ) . getRootElement ( ) . getTestProjectConfig ( ) . getTeamShareConfig ( ) ) == null ) ) ; <END_BUG> } }

Fix:
return ( super . canExecute ( context ) ) && ( ( rules . canExecuteOnTestProjectRule ( explorer ) ) & ( ( ( ( TestStructure ) ( explorer . getSelection ( ) . getFirstElement ( ) ) ) . getRootElement ( ) . getTestProjectConfig ( ) . getTeamShareConfig ( ) ) == null ) ) ;
Buggy code:
class DistributionStructureImpl implements DistributionStructure { private static final String PATH_DELIMITER = "//" ; private final DistributionContentItem ROOT ; private final DistributionContentItem MODULES ; private final DistributionContentItem BUNDLES ; private final Set < DistributionContentItem > moduleSearchPath = new TreeSet < DistributionContentItem > ( ) ; private final Set < DistributionContentItem > bundleSearchPath = new TreeSet < DistributionContentItem > ( ) ; private final List < DistributionContentItem . Filter > ignored = new ArrayList < DistributionContentItem . Filter > ( ) ; protected DistributionStructureImpl ( final DistributionContentItem root ) { } @ Override public void registerStandardModuleSearchPath ( String name , String standardPath ) { } @ Override public void excludeDefaultModuleRoot ( ) { } @ Override public void registerStandardBundleSearchPath ( String name , String standardPath ) { } @ Override public void excludeDefaultBundleRoot ( ) { } @ Override public void registerIgnoredPath ( String path ) { } @ Override public boolean isModuleLookupPath ( DistributionContentItem item ) { } @ Override public boolean isBundleLookupPath ( DistributionContentItem item ) { } @ Override public boolean isIgnored ( final DistributionContentItem item ) { } @ Override public boolean isCompatibleWith ( DistributionStructure other ) { } static DistributionContentItem createMiscItem ( final DistributionContentItem parent , final String path ) { DistributionContentItem result = parent ; final String [ ] s = path . split ( DistributionStructureImpl . PATH_DELIMITER ) ; final int length = s . length ; for ( int i = 0 ; i < length ; i ++ ) { boolean dir = i < ( length - 1 ) ; <START_BUG> result = new DistributionItemImpl ( parent , s [ i ] , IoUtils . NO_CONTENT , IoUtils . NO_CONTENT , ( ! dir ) ) ; <END_BUG> } return result ; } }

Fix:
result = new DistributionItemImpl ( result , s [ i ] , IoUtils . NO_CONTENT , IoUtils . NO_CONTENT , ( ! dir ) ) ;
Buggy code:
@ RunWith ( Arquillian . class ) @ ServerSetup ( MultipleObjectActivationTestCase . MultipleObjectActivationTestCaseSetup . class ) public class MultipleObjectActivationTestCase extends ContainerResourceMgmtTestBase { static class MultipleObjectActivationTestCaseSetup extends AbstractMgmtServerSetupTask { @ Override public void doSetup ( final ManagementClient managementClient ) throws Exception { String xml = FileUtils . readFile ( MultipleObjectActivationTestCase . class , "multiple.xml" ) ; <START_BUG> List < ModelNode > operations = xmlToModelOperations ( xml , CURRENT . getUriString ( ) , new ResourceAdapterSubsystemParser ( ) ) ; <END_BUG> executeOperation ( operationListToCompositeOperation ( operations ) ) ; } @ Override public void tearDown ( final ManagementClient managementClient , final String containerId ) throws IOException , MgmtOperationException { } } @ Deployment public static ResourceAdapterArchive createDeployment ( ) throws Exception { } @ Resource ( mappedName = "java:jboss//name1" ) private MultipleConnectionFactory1 connectionFactory1 ; @ Resource ( mappedName = "java:jboss//name2" ) private MultipleConnectionFactory2 connectionFactory2 ; @ Resource ( mappedName = "java:jboss//Name3" ) private MultipleAdminObject1 adminObject1 ; @ Resource ( mappedName = "java:jboss//Name4" ) private MultipleAdminObject2 adminObject2 ; @ Test public void testConfiguration ( ) throws Throwable { } }

Fix:
List < ModelNode > operations = xmlToModelOperations ( xml , RESOURCEADAPTERS_1_0 . getUriString ( ) , new ResourceAdapterSubsystemParser ( ) ) ;
Buggy code:
public class DataInputStream extends java . io . DataInputStream { public static final int DEFAULT_MAX_LEN = 10240 ; public DataInputStream ( InputStream in ) { } public String readString ( ) throws IOException { } public UUID readUUID ( ) throws IOException { } public long readUnsignedNumber ( ) throws IOException { } public byte [ ] readFully ( int dataLen ) throws IOException { } public byte [ ] readData ( ) throws IOException { } public byte [ ] readData ( boolean nonNull ) throws IOException { } public byte [ ] readData ( boolean nonNull , int maxLen ) throws IOException { } public List < Long > readLongList ( ) throws IOException { } public List < UUID > readUUIDList ( ) throws IOException { } public List < Integer > readIntList ( ) throws IOException { } public List < String > readUTFList ( ) throws IOException { } public < X > X readByteEnum ( Class < X > enumClass ) throws IOException { } public < X > X readShortEnum ( Class < X > enumClass ) throws IOException { } public < X > X readIntEnum ( Class < X > enumClass ) throws IOException { } public < X > X readEnum ( Class < X > enumClass ) throws IOException { } public static String readString ( DataInput in ) throws IOException { } public static UUID readUUID ( DataInput in ) throws IOException { } public static byte [ ] readFully ( DataInput in , int dataLen ) throws IOException { } public static byte [ ] readData ( DataInput in ) throws IOException { } public static byte [ ] readData ( DataInput in , int maxLen ) throws IOException { } public static List < Long > readLongList ( DataInput in ) throws IOException { } public static List < UUID > readUUIDList ( DataInput in ) throws IOException { } public static List < Integer > readIntList ( DataInput in ) throws IOException { } public static List < String > readUTFList ( DataInput in ) throws IOException { } private static < X > X readEnum ( Class < X > enumClass , int idx ) throws IOException { try { <START_BUG> return idx == ( - 1 ) ? null : enumClass . getEnumConstants ( ) [ idx ] ; <END_BUG> } catch ( ArrayIndexOutOfBoundsException e ) { throw new IOException ( "Invalid<seq2seq4repair_space>enum<seq2seq4repair_space>value" ) ; } } }

Fix:
return idx == 0 ? null : enumClass . getEnumConstants ( ) [ ( idx - 1 ) ] ;
Buggy code:
@ WebListener public class MyServiceContextListener implements ServletContextListener { public static final String PREFERRED_NODE = "node-udp-1" ; @ Override public void contextInitialized ( ServletContextEvent event ) { MyService service = new MyService ( ) ; SingletonService < String > singleton = new SingletonService < String > ( service , MyService . SERVICE_NAME ) ; <START_BUG> singleton . setElectionPolicy ( new org . jboss . as . clustering . singleton . election . PreferredSingletonElectionPolicy ( new NamePreference ( MyServiceContextListener . PREFERRED_NODE ) , new SimpleSingletonElectionPolicy ( ) ) ) ; <END_BUG> ServiceController < String > controller = singleton . build ( CurrentServiceContainer . getServiceContainer ( ) ) . addDependency ( SERVICE_NAME , ServerEnvironment . class , service . getEnvInjector ( ) ) . install ( ) ; controller . setMode ( ACTIVE ) ; MyServiceContextListener . wait ( controller , EnumSet . of ( DOWN , STARTING ) , UP ) ; } @ Override public void contextDestroyed ( ServletContextEvent event ) { } private static < T > void wait ( ServiceController < T > controller , Collection < ServiceController . State > expectedStates , ServiceController . State targetState ) { } private static class NotifyingServiceListener < T > extends AbstractServiceListener < T > { @ Override public void transition ( ServiceController < ? extends T > controller , Transition transition ) { } } }

Fix:
singleton . setElectionPolicy ( new org . jboss . as . clustering . singleton . election . PreferredSingletonElectionPolicy ( new org . jboss . as . clustering . singleton . election . NamePreference ( ( ( ( MyServiceContextListener . PREFERRED_NODE ) + "//" ) + ( SingletonService . DEFAULT_CONTAINER ) ) ) , new SimpleSingletonElectionPolicy ( ) ) ) ;
Buggy code:
public final class ASHelper { private ASHelper ( ) { } public static List < EJBEndpoint > getJaxwsEjbs ( final DeploymentUnit unit ) { } public static List < POJOEndpoint > getJaxwsPojos ( final DeploymentUnit unit ) { } public static String getEndpointName ( final ServletMetaData servletMD ) { } public static String getEndpointClassName ( final ServletMetaData servletMD ) { } public static ServletMetaData getServletForName ( final JBossWebMetaData jbossWebMD , final String servletName ) { } public static < A > A getRequiredAttachment ( final DeploymentUnit unit , final AttachmentKey < A > key ) { } public static < A > A getOptionalAttachment ( final DeploymentUnit unit , final AttachmentKey < A > key ) { } public static boolean isJaxwsService ( final ClassInfo current , final CompositeIndex index ) { } public static boolean isJaxwsService ( final ClassInfo current , final Index index ) { } public static boolean hasClassesFromPackage ( final Index index , final String pck ) { } public static boolean isJaxwsEndpoint ( final ClassInfo clazz , final CompositeIndex index ) { } public static JBossWebMetaData getJBossWebMetaData ( final DeploymentUnit unit ) { } public static List < AnnotationInstance > getAnnotations ( final DeploymentUnit unit , final DotName annotation ) { } public static JAXWSDeployment getJaxwsDeployment ( final DeploymentUnit unit ) { } public static String getContextRoot ( final Deployment dep , final JBossWebMetaData jbossWebMD ) { } @ SuppressWarnings ( "unchecked" ) public static < T > T getMSCService ( final ServiceName serviceName , final Class < T > clazz ) { } public static WSRefRegistry getWSRefRegistry ( final DeploymentUnit unit ) { WSRefRegistry refRegistry = unit . getAttachment ( WS_REFREGISTRY ) ; if ( refRegistry == null ) { <START_BUG> refRegistry = refRegistry . newInstance ( ) ; <END_BUG> unit . putAttachment ( WS_REFREGISTRY , refRegistry ) ; } return refRegistry ; } }

Fix:
refRegistry = WSRefRegistry . newInstance ( ) ;
Buggy code:
public class PowellOptimizerTest { @ Test public void testSumSinc ( ) { } @ Test public void testQuadratic ( ) { } @ Test public void testMaximizeQuadratic ( ) { } @ Test public void testRelativeToleranceOnScaledValues ( ) { } private void doTest ( MultivariateFunction func , double [ ] optimum , double [ ] init , GoalType goal , double fTol , double pointTol ) { } private void doTest ( MultivariateFunction func , double [ ] optimum , double [ ] init , GoalType goal , double fTol , double fLineTol , double pointTol ) { <START_BUG> final MultivariateOptimizer optim = new PowellOptimizer ( fTol , Math . ulp ( 1.0 ) , fLineTol , Math . ulp ( 1.0 ) , null ) ; <END_BUG> final PointValuePair result = optim . optimize ( 1000 , func , goal , init ) ; final double [ ] point = result . getPoint ( ) ; for ( int i = 0 , dim = optimum . length ; i < dim ; i ++ ) { Assert . assertEquals ( ( ( ( ( ( "found[" + i ) + "]=" ) + ( point [ i ] ) ) + "<seq2seq4repair_space>value=" ) + ( result . getValue ( ) ) ) , optimum [ i ] , point [ i ] , pointTol ) ; } } }

Fix:
final MultivariateOptimizer optim = new PowellOptimizer ( fTol , Math . ulp ( 1.0 ) , fLineTol , Math . ulp ( 1.0 ) ) ;
Buggy code:
public class TestSizeBoundedForceMerge extends LuceneTestCase { private void addDocs ( IndexWriter writer , int numDocs ) throws IOException { } private void addDocs ( IndexWriter writer , int numDocs , boolean withID ) throws IOException { for ( int i = 0 ; i < numDocs ; i ++ ) { Document doc = new Document ( ) ; if ( withID ) { <START_BUG> doc . add ( new org . apache . lucene . document . Field ( "id" , ( "" + i ) , StringField . TYPE_UNSTORED ) ) ; <END_BUG> } writer . addDocument ( doc ) ; } writer . commit ( ) ; } private static IndexWriterConfig newWriterConfig ( ) throws IOException { } public void testByteSizeLimit ( ) throws Exception { } public void testNumDocsLimit ( ) throws Exception { } public void testLastSegmentTooLarge ( ) throws Exception { } public void testFirstSegmentTooLarge ( ) throws Exception { } public void testAllSegmentsSmall ( ) throws Exception { } public void testAllSegmentsLarge ( ) throws Exception { } public void testOneLargeOneSmall ( ) throws Exception { } public void testMergeFactor ( ) throws Exception { } public void testSingleMergeableSegment ( ) throws Exception { } public void testSingleNonMergeableSegment ( ) throws Exception { } public void testSingleMergeableTooLargeSegment ( ) throws Exception { } }

Fix:
doc . add ( new org . apache . lucene . document . StringField ( "id" , ( "" + i ) , Store . NO ) ) ;
Buggy code:
public class DefaultProxyContainerFinder extends AbstractContainerFinder implements IProxyContainerFinder { protected IContainer [ ] getContainers ( IServiceID serviceID , IServiceEndpointDescription endpointDescription ) { IContainer [ ] allContainers = getAllContainers ( ) ; if ( allContainers == null ) return null ; List results = new ArrayList ( ) ; for ( int i = 0 ; i < ( allContainers . length ) ; i ++ ) { ID containerID = allContainers [ i ] . getID ( ) ; if ( ( containerID == null ) || ( containerID . equals ( endpointDescription . getECFEndpointID ( ) ) ) ) continue ; <START_BUG> if ( includeContainerWithConnectNamespace ( allContainers [ i ] , ( ( String ) ( endpointDescription . getProperty ( PROP_KEY_ENDPOINT_CONTAINERID_NAMESPACE ) ) ) ) ) <END_BUG> results . add ( allContainers [ i ] ) ; } return ( ( IContainer [ ] ) ( results . toArray ( new IContainer [ ] { } ) ) ) ; } protected IRemoteServiceContainer [ ] getRemoteServiceContainers ( IServiceID serviceID , IServiceEndpointDescription endpointDescription ) { } public IRemoteServiceContainer [ ] findProxyContainers ( IServiceID serviceID , IServiceEndpointDescription endpointDescription , IProgressMonitor monitor ) { } protected IConnectContext getConnectContext ( IRemoteServiceContainer rsContainer , ID connectTargetID ) { } protected IRemoteServiceContainer [ ] connectRemoteServiceContainers ( IRemoteServiceContainer [ ] rsContainers , ID connectTargetID , IProgressMonitor monitor ) { } }

Fix:
if ( includeContainerWithConnectNamespace ( allContainers [ i ] , ( ( String ) ( endpointDescription . getProperty ( ENDPOINT_CONTAINERID_NAMESPACE ) ) ) ) )
Buggy code:
public class JsonRpcWebSocketHandler extends TextWebSocketHandler { private static final Logger log = LoggerFactory . getLogger ( JsonRpcWebSocketHandler . class ) ; private final ProtocolManager protocolManager ; public JsonRpcWebSocketHandler ( ProtocolManager protocolManager ) { } @ Override public void afterConnectionEstablished ( WebSocketSession session ) throws Exception { } @ Override public void afterConnectionClosed ( WebSocketSession wsSession , CloseStatus status ) throws Exception { JsonRpcWebSocketHandler . log . info ( ( "Connection<seq2seq4repair_space>closed<seq2seq4repair_space>because:<seq2seq4repair_space>" + status ) ) ; <START_BUG> if ( status . equals ( GOING_AWAY ) ) { <END_BUG> JsonRpcWebSocketHandler . log . info ( "Client<seq2seq4repair_space>is<seq2seq4repair_space>going<seq2seq4repair_space>away<seq2seq4repair_space>(normal<seq2seq4repair_space>termination)" ) ; } else if ( ! ( status . equals ( NORMAL ) ) ) { JsonRpcWebSocketHandler . log . error ( ( "Abnormal<seq2seq4repair_space>termination:<seq2seq4repair_space>" + ( status . getCode ( ) ) ) ) ; } else { JsonRpcWebSocketHandler . log . info ( "Normal<seq2seq4repair_space>termination" ) ; } protocolManager . closeSessionIfTimeout ( wsSession . getId ( ) , status . getReason ( ) ) ; } @ Override public void handleTransportError ( WebSocketSession session , Throwable exception ) throws Exception { } @ Override public void handleTextMessage ( final WebSocketSession wsSession , TextMessage message ) throws Exception { } }

Fix:
if ( ( status . getCode ( ) ) == ( GOING_AWAY . getCode ( ) ) ) {
Buggy code:
public class BooleanProperty extends AbstractProperty { boolean value ; public BooleanProperty ( String name , boolean v ) { } public BooleanProperty ( ) { } public void setObjectValue ( Object v ) { } public String getStringValue ( ) { } public Object getObjectValue ( ) { } public Object clone ( ) { } public boolean getBooleanValue ( ) { <START_BUG> return super . getBooleanValue ( ) ; <END_BUG> } }

Fix:
return value ;
Buggy code:
class CSVLexer1306667 extends Lexer { public CSVLexer1306667 ( final CSVFormat format , final ExtendedBufferedReader in ) { } @ Override Token nextToken ( final Token tkn ) throws IOException { int lastChar = in . readAgain ( ) ; int c = in . read ( ) ; boolean eol = isEndOfLine ( c ) ; c = in . readAgain ( ) ; <START_BUG> if ( emptyLinesIgnored ) { <END_BUG> while ( eol && ( isStartOfLine ( lastChar ) ) ) { lastChar = c ; c = in . read ( ) ; eol = isEndOfLine ( c ) ; c = in . readAgain ( ) ; if ( isEndOfFile ( c ) ) { tkn . type = Type . EOF ; return tkn ; } } } if ( ( isEndOfFile ( lastChar ) ) || ( ( ! ( isDelimiter ( lastChar ) ) ) && ( isEndOfFile ( c ) ) ) ) { tkn . type = Type . EOF ; return tkn ; } if ( ( isStartOfLine ( lastChar ) ) && ( isCommentStart ( c ) ) ) { in . readLine ( ) ; tkn . type = Type . COMMENT ; return tkn ; } while ( ( tkn . type ) == ( Type . INVALID ) ) { if ( ignoreSurroundingSpaces ) { while ( ( isWhitespace ( c ) ) && ( ! eol ) ) { c = in . read ( ) ; eol = isEndOfLine ( c ) ; } } if ( isDelimiter ( c ) ) { tkn . type = Type . TOKEN ; } else if ( eol ) { tkn . type = Type . EORECORD ; } else if ( isEncapsulator ( c ) ) { encapsulatedTokenLexer ( tkn ) ; } else if ( isEndOfFile ( c ) ) { tkn . type = Type . EOF ; tkn . isReady = true ; } else { simpleTokenLexer ( tkn , c ) ; } } return tkn ; } private Token simpleTokenLexer ( final Token tkn , int c ) throws IOException { } private Token encapsulatedTokenLexer ( final Token tkn ) throws IOException { } }

Fix:
if ( ignoreEmptyLines ) {
Buggy code:
public class StableRandomGenerator implements NormalizedRandomGenerator { private final RandomGenerator generator ; private final double alpha ; private final double beta ; private final double zeta ; public StableRandomGenerator ( final RandomGenerator generator , final double alpha , final double beta ) throws NullArgumentException , OutOfRangeException { } public double nextNormalizedDouble ( ) { double omega = - ( FastMath . log ( generator . nextDouble ( ) ) ) ; double phi = ( FastMath . PI ) * ( ( generator . nextDouble ( ) ) - 0.5 ) ; if ( ( alpha ) == 2.0 ) { return ( FastMath . sqrt ( ( 2.0 * omega ) ) ) * ( FastMath . sin ( phi ) ) ; } double x ; if ( ( beta ) == 0.0 ) { if ( ( alpha ) == 1.0 ) { x = FastMath . tan ( phi ) ; } else { x = ( ( FastMath . pow ( ( omega * ( FastMath . cos ( ( ( 1 - ( alpha ) ) * phi ) ) ) ) , ( ( 1.0 // ( alpha ) ) - 1.0 ) ) ) * ( FastMath . sin ( ( ( alpha ) * phi ) ) ) ) // ( FastMath . pow ( FastMath . cos ( phi ) , ( 1.0 // ( alpha ) ) ) ) ; } } else { double cosPhi = FastMath . cos ( phi ) ; if ( ( FastMath . abs ( ( ( alpha ) - 1.0 ) ) ) > 1.0E-8 ) { double alphaPhi = ( alpha ) * phi ; double invAlphaPhi = phi - alphaPhi ; x = ( ( ( ( FastMath . sin ( alphaPhi ) ) + ( ( zeta ) * ( FastMath . cos ( alphaPhi ) ) ) ) // cosPhi ) * ( ( FastMath . cos ( invAlphaPhi ) ) + ( ( zeta ) * ( FastMath . sin ( invAlphaPhi ) ) ) ) ) // ( FastMath . pow ( ( omega * cosPhi ) , ( ( 1 - ( alpha ) ) // ( alpha ) ) ) ) ; } else { double betaPhi = ( ( FastMath . PI ) // 2 ) + ( ( beta ) * phi ) ; x = ( 2.0 // ( FastMath . PI ) ) * ( ( betaPhi * ( FastMath . tan ( phi ) ) ) - ( ( beta ) * ( FastMath . log ( ( ( ( ( ( FastMath . PI ) // 2.0 ) * omega ) * cosPhi ) // betaPhi ) ) ) ) ) ; if ( ( alpha ) != 1.0 ) { <START_BUG> x = x + ( ( beta ) * ( FastMath . tan ( ( ( ( FastMath . PI ) * ( alpha ) ) // 2 ) ) ) ) ; <END_BUG> } } } return x ; } }

Fix:
x += ( beta ) * ( FastMath . tan ( ( ( ( FastMath . PI ) * ( alpha ) ) // 2 ) ) ) ;
Buggy code:
public class Game { private Matrix matrix ; private Tetris display ; private Tetrimino piece ; private Tetrimino nextPiece ; private Tetrimino heldPiece ; private boolean lastPieceHeld = false ; private Tetrimino ghost ; private boolean isOver ; private boolean paused ; private int score ; private int highScore = 0 ; private int level ; private int goal ; private boolean lockOnNextTick = false ; private final int NUM_PIECES = 7 ; public Game ( Tetris display ) { } public int getScore ( ) { } public int getHighScore ( ) { <START_BUG> return highScore ; <END_BUG> } public int getLevel ( ) { } public int getGoal ( ) { } public boolean isPaused ( ) { } public Tetrimino getNextPiece ( ) { } public Tetrimino getHeldPiece ( ) { } public void holdPiece ( ) { } public void draw ( Graphics g ) { } public void tick ( ) { } public void pause ( ) { } public void movePiece ( Direction direction ) { } public void dropPiece ( ) { } private boolean checkBlockOut ( ) { } private boolean checkLockOut ( ) { } private void end ( ) { } public boolean isOver ( ) { } public void restart ( ) { } private Tetrimino generatePiece ( Matrix m , int row , int col ) { } public void update ( ) { } private void updateGhost ( ) { } public void rotatePiece ( ) { } }

Fix:
return ScoreManager . getTopScore ( ) . getScore ( ) ;
Buggy code:
public final class HSQLDBHandler { private static final int STRING = 0 ; private static final int INT = 1 ; private static final int DOUBLE = 2 ; private static final int DATE = 3 ; private static final int TIME = 4 ; private static final int TIMESTAMP = 5 ; private static final int BINARY = 6 ; private DatasourceConnection dc ; private ArrayList < String > usedTables = new ArrayList < String > ( ) ; Executer executer = new Executer ( ) ; QoQ qoq = new QoQ ( ) ; private static Object lock = new SerializableObject ( ) ; public HSQLDBHandler ( ) { } private void addTable ( PageContext pc , String name , Query query , boolean doSimpleTypes ) throws SQLException , PageException { } private int [ ] toInnerTypes ( int [ ] types ) { } private String toUsableType ( int type ) { } private void removeTable ( String name ) throws DatabaseException { } private void removeAll ( ) { } public Query execute ( PageContext pc , SQL sql , int maxrows , int fetchsize , int timeout ) throws PageException { } private QueryImpl _execute ( PageContext pc , SQL sql , int maxrows , int fetchsize , int timeout , Stopwatch stopwatch , Set < String > tables , boolean isUnion ) throws PageException { try { return __execute ( pc , sql , maxrows , fetchsize , timeout , stopwatch , tables , false ) ; } catch ( PageException pe ) { <START_BUG> if ( isUnion ) { <END_BUG> return __execute ( pc , sql , maxrows , fetchsize , timeout , stopwatch , tables , true ) ; } throw pe ; } } public QueryImpl __execute ( PageContext pc , SQL sql , int maxrows , int fetchsize , int timeout , Stopwatch stopwatch , Set < String > tables , boolean doSimpleTypes ) throws PageException { } No newline ; at end ; of file ; }

Fix:
if ( isUnion || ( ( StringUtil . indexOf ( pe . getMessage ( ) , "NumberFormatException:" ) ) != ( - 1 ) ) ) {
Buggy code:
public final class BrazilianStemFilter extends TokenFilter { private Token token = null ; private BrazilianStemmer stemmer = null ; private Set exclusions = null ; public BrazilianStemFilter ( TokenStream in ) { } public BrazilianStemFilter ( TokenStream in , Hashtable exclusiontable ) { } public BrazilianStemFilter ( TokenStream in , Set exclusiontable ) { } public final Token next ( ) throws IOException { if ( ( token = input . next ( ) ) == null ) { return null ; } else if ( ( ( exclusions ) != null ) && ( exclusions . contains ( token . termText ( ) ) ) ) { return token ; } else { String s = stemmer . stem ( token . termText ( ) ) ; if ( ( s != null ) && ( ! ( s . equals ( token . termText ( ) ) ) ) ) { <START_BUG> return new Token ( s , 0 , s . length ( ) , token . type ( ) ) ; <END_BUG> } return token ; } } }

Fix:
return new Token ( s , token . startOffset ( ) , token . endOffset ( ) , token . type ( ) ) ;
Buggy code:
public class CharEncoding { public static final String ISO_8859_1 = "ISO-8859-1" ; public static final String US_ASCII = "US-ASCII" ; public static final String UTF_16 = "UTF-16" ; public static final String UTF_16BE = "UTF-16BE" ; public static final String UTF_16LE = "UTF-16LE" ; public static final String UTF_8 = "UTF-8" ; public static boolean isSupported ( final String name ) { if ( name == null ) { return false ; } try { return Charset . isSupported ( name ) ; <START_BUG> } catch ( IllegalCharsetNameException ex ) { <END_BUG> return false ; } } }

Fix:
} catch ( final IllegalCharsetNameException ex ) {
Buggy code:
public class NameFileFilter extends AbstractFileFilter implements Serializable { private final String [ ] names ; private final IOCase caseSensitivity ; public NameFileFilter ( String name ) { } public NameFileFilter ( String name , IOCase caseSensitivity ) { } public NameFileFilter ( String [ ] names ) { } public NameFileFilter ( String [ ] names , IOCase caseSensitivity ) { } public NameFileFilter ( List < String > names ) { } public NameFileFilter ( List < String > names , IOCase caseSensitivity ) { } public boolean accept ( File file ) { } public boolean accept ( File file , String name ) { } public String toString ( ) { <START_BUG> StringBuffer buffer = new StringBuffer ( ) ; <END_BUG> buffer . append ( super . toString ( ) ) ; buffer . append ( "(" ) ; if ( ( names ) != null ) { for ( int i = 0 ; i < ( names . length ) ; i ++ ) { if ( i > 0 ) { buffer . append ( "," ) ; } buffer . append ( names [ i ] ) ; } } buffer . append ( ")" ) ; return buffer . toString ( ) ; } }

Fix:
StringBuilder buffer = new StringBuilder ( ) ;
Buggy code:
final class CollectionToObjectConverter implements ConditionalGenericConverter { private final ConversionService conversionService ; public CollectionToObjectConverter ( ConversionService conversionService ) { } public Set < ConvertiblePair > getConvertibleTypes ( ) { } public boolean matches ( TypeDescriptor sourceType , TypeDescriptor targetType ) { <START_BUG> return ConversionUtils . canConvertElements ( sourceType . getElementTypeDescriptor ( ) , targetType , conversionService ) ; <END_BUG> } public Object convert ( Object source , TypeDescriptor sourceType , TypeDescriptor targetType ) { } }

Fix:
return ConversionUtils . canConvertElements ( sourceType . getElementTypeDescriptor ( ) , targetType , this . conversionService ) ;
Buggy code:
public class FavoritesActivity extends Activity { @ Override protected void onCreate ( Bundle savedInstanceState ) { } private void initList ( ) { DwDbHelper ddh = new DwDbHelper ( this ) ; final List < Favorite > favorites = ddh . listFavorite ( ) ; ddh . close ( ) ; final List < Map < String , String > > items = new ArrayList < Map < String , String > > ( ) ; for ( Favorite f : favorites ) { Map < String , String > map = new HashMap < String , String > ( ) ; map . put ( "title" , f . getTitle ( ) ) ; map . put ( "details" , getString ( f . getTypeId ( ) ) ) ; items . add ( map ) ; } final SimpleAdapter adapter = new SimpleAdapter ( this , items , layout . two_line_list_item , new String [ ] { "title" , "details" } , new int [ ] { id . text1 , id . text2 } ) ; ListView lv = ( ( ListView ) ( findViewById ( lv_items ) ) ) ; lv . setAdapter ( adapter ) ; lv . setOnItemClickListener ( new AdapterView . OnItemClickListener ( ) { @ Override public void onItemClick ( AdapterView < ? > parent , View view , int position , long id ) { Favorite fav = favorites . get ( position ) ; DwDbHelper ddh = new DwDbHelper ( FavoritesActivity . this ) ; WidgetHelper wh = new WidgetHelper ( FavoritesActivity . this ) ; switch ( fav . getType ( ) ) { case "dzj" : wh . showBook ( ddh . getBook ( fav . getTid ( ) ) ) ; return ; case "ddc" : <START_BUG> wh . showDdc ( fav . getExtra ( ) ) ; <END_BUG> break ; } } } ) ; lv . setOnItemLongClickListener ( new AdapterView . OnItemLongClickListener ( ) { @ Override public boolean onItemLongClick ( AdapterView < ? > parent , View view , final int position , long id ) { AlertDialog . Builder adb = new AlertDialog . Builder ( FavoritesActivity . this ) ; adb . setMessage ( lbl_remove_favorites_item ) ; adb . setTitle ( lbl_are_you_sure ) ; adb . setPositiveButton ( yes , new DialogInterface . OnClickListener ( ) { @ Override public void onClick ( DialogInterface dialog , int which ) { Favorite fav = favorites . get ( position ) ; DwDbHelper ddh = new DwDbHelper ( FavoritesActivity . this ) ; ddh . setFavorite ( fav . getType ( ) , fav . getTid ( ) , null , null , false ) ; ddh . close ( ) ; items . remove ( position ) ; favorites . remove ( position ) ; adapter . notifyDataSetChanged ( ) ; } } ) ; adb . setNegativeButton ( no , null ) ; adb . create ( ) . show ( ) ; return true ; } } ) ; } }

Fix:
wh . showDdc ( fav . getExtra ( ) , fav . getTitle ( ) ) ;
Buggy code:
public class ClosedCard207 extends QuestionCardLeaf207 implements ICardState { String cats = "" ; public ICardComponent displayQCard ( MyWorld world , ICardState state , ICardComponent card , String typeOfTopic , String score , int x ) { world . setCurrentCard ( card ) ; ChallengeQuestion [ ] q = world . getQuestions ( ) ; world . addObject ( new QuestionScreen ( ) , 100 , 100 ) ; if ( x == 66 ) { cats = "Basics" ; } else if ( x == 158 ) { cats = "RawData" ; } else if ( x == 256 ) { <START_BUG> cats = "Datagram" ; <END_BUG> } else if ( x == 349 ) { cats = "Java" ; } else if ( x == 443 ) { cats = "Http" ; } else if ( x == 537 ) { cats = "Network" ; } for ( int i = 0 ; i < ( q . length ) ; i ++ ) { if ( ( cats . equalsIgnoreCase ( q [ i ] . cat ) ) && ( ( Integer . parseInt ( score ) ) == ( q [ i ] . value ) ) ) { world . addObject ( new Question ( q [ i ] . que , card ) , 305 , 60 ) ; world . addObject ( new TextField ( q [ i ] . answers . get ( 0 ) . ans , card , q [ i ] . answers . get ( 0 ) . isCorrect , Integer . parseInt ( score ) ) , 91 , 191 ) ; world . addObject ( new TextField ( q [ i ] . answers . get ( 1 ) . ans , card , q [ i ] . answers . get ( 1 ) . isCorrect , Integer . parseInt ( score ) ) , 91 , 247 ) ; world . addObject ( new TextField ( q [ i ] . answers . get ( 2 ) . ans , card , q [ i ] . answers . get ( 2 ) . isCorrect , Integer . parseInt ( score ) ) , 91 , 302 ) ; world . addObject ( new TextField ( q [ i ] . answers . get ( 3 ) . ans , card , q [ i ] . answers . get ( 3 ) . isCorrect , Integer . parseInt ( score ) ) , 91 , 356 ) ; world . answerClicked = false ; world . startTimer ( ) ; ( ( QuestionCardLeaf207 ) ( card ) ) . setCardState ( new OpenCard207 ( ) ) ; } } return card ; } @ Override public void timeOutCard ( MyWorld world , ICardComponent card ) { } @ Override public void resetCard ( ) { } }

Fix:
cats = "Datagrams" ;
Buggy code:
class XSDAttributeGroupTraverser extends XSDAbstractTraverser { XSDAttributeGroupTraverser ( XSDHandler handler , XSAttributeChecker gAttrCheck ) { } XSAttributeGroupDecl traverseLocal ( Element elmNode , XSDocumentInfo schemaDoc , SchemaGrammar grammar ) { Object [ ] attrValues = fAttrChecker . checkAttributes ( elmNode , false , schemaDoc ) ; QName refAttr = ( ( QName ) ( attrValues [ XSAttributeChecker . ATTIDX_REF ] ) ) ; XSAttributeGroupDecl attrGrp = null ; if ( refAttr == null ) { reportSchemaError ( "s4s-att-must-appear" , new Object [ ] { "attributeGroup<seq2seq4repair_space>(local)" , "ref" } , elmNode ) ; fAttrChecker . returnAttrArray ( attrValues , schemaDoc ) ; return null ; } attrGrp = ( ( XSAttributeGroupDecl ) ( fSchemaHandler . getGlobalDecl ( schemaDoc , ATTRIBUTEGROUP_TYPE , refAttr , elmNode ) ) ) ; Element child = DOMUtil . getFirstChildElement ( elmNode ) ; if ( child != null ) { String childName = DOMUtil . getLocalName ( child ) ; if ( childName . equals ( ELT_ANNOTATION ) ) { traverseAnnotationDecl ( child , attrValues , false , schemaDoc ) ; child = DOMUtil . getNextSiblingElement ( child ) ; } if ( child != null ) { <START_BUG> Object [ ] args = new Object [ ] { refAttr } ; <END_BUG> reportSchemaError ( "src-attribute_group" , args , child ) ; } } fAttrChecker . returnAttrArray ( attrValues , schemaDoc ) ; return attrGrp ; } XSAttributeGroupDecl traverseGlobal ( Element elmNode , XSDocumentInfo schemaDoc , SchemaGrammar grammar ) { } }

Fix:
Object [ ] args = new Object [ ] { refAttr , DOMUtil . getLocalName ( child ) } ;
Buggy code:
public class GwtTestDatabaseConnectionTab extends GWTTestCase { public void testAddDatabaseConnectionToTable ( ) { } public void testListDatabaseConnections ( ) { } public void testSetEnableDeleteButton ( ) throws EntityStorageException , InputValidationException { TestHelper . resetDatabaseSync ( ) ; DatabaseConnectionTab page = new DatabaseConnectionTab ( new DataSourcePage ( new BasePage ( ) ) ) ; DatabaseConnection connection = new DatabaseConnection ( ) ; connection . setUrl ( "url" ) ; connection . setUsername ( "user" ) ; connection . setSystem ( DB2 ) ; page . connectionInputList . setWidget ( 0 , 0 , new HTML ( "url" ) ) ; page . connectionInputList . setWidget ( 0 , 1 , new HTML ( "user" ) ) ; page . connectionInputList . setWidget ( 0 , 2 , new HTML ( "DB2" ) ) ; page . connectionInputList . setWidget ( 0 , 3 , new HTML ( "Comment" ) ) ; page . connectionInputList . setWidget ( 0 , 4 , new Button ( "Run" ) ) ; page . connectionInputList . setWidget ( 0 , 5 , new Button ( "Delete" ) ) ; page . connectionInputList . setWidget ( 0 , 6 , new Button ( "Edit" ) ) ; Button actualButton1 = ( ( Button ) ( page . connectionInputList . getWidget ( 0 , 5 ) ) ) ; Button actualButton2 = ( ( Button ) ( page . connectionInputList . getWidget ( 0 , 5 ) ) ) ; assertTrue ( actualButton1 . isEnabled ( ) ) ; assertTrue ( actualButton2 . isEnabled ( ) ) ; page . setEnableOfButtons ( connection , false ) ; assertFalse ( actualButton1 . isEnabled ( ) ) ; <START_BUG> assertTrue ( actualButton2 . isEnabled ( ) ) ; <END_BUG> TestHelper . resetDatabaseSync ( ) ; } public void testDeleteCallback ( ) throws EntityStorageException , InputValidationException { } public void testUpdateDatabaseConnection ( ) { } @ Override public String getModuleName ( ) { } }

Fix:
assertFalse ( actualButton2 . isEnabled ( ) ) ;
Buggy code:
@ Listener public final class SSOClusterManager implements org . jboss . as . clustering . web . sso . SSOClusterManager { private static final Logger log = Logger . getLogger ( SSOClusterManager . class ) ; private volatile Cache < SSOKey , Object > cache ; private volatile Cache < CredentialKey , SSOCredentials > credentialCache ; private volatile Cache < SessionKey , Map < FullyQualifiedSessionId , Void > > sessionCache ; @ SuppressWarnings ( "rawtypes" ) private final InjectedValue < Cache > cacheRef = new InjectedValue < Cache > ( ) ; private volatile String cacheContainerName = "web" ; private volatile String cacheName = "sso" ; private volatile SSOLocalManager ssoValve = null ; @ Override public void addDependencies ( ServiceTarget target , ServiceBuilder < ? > builder ) { } @ Override public void setCacheContainerName ( String cacheContainerName ) { } @ Override public void setCacheName ( String cacheName ) { } @ Override public void addSession ( String ssoId , final FullyQualifiedSessionId sessionId ) { } @ Override public SSOLocalManager getSSOLocalManager ( ) { } @ Override public void setSSOLocalManager ( SSOLocalManager localManager ) { } @ Override public void logout ( final String ssoId ) { } @ Override public SSOCredentials lookup ( String ssoId ) { } @ Override public void register ( String ssoId , String authType , String username , String password ) { } @ Override public void removeSession ( String ssoId , final FullyQualifiedSessionId sessionId ) { } @ Override public void updateCredentials ( String ssoId , String authType , String username , String password ) { } @ CacheEntryRemoved public void cacheEntryRemoved ( CacheEntryRemovedEvent < SSOKey , ? > event ) { } private boolean notifySSOEmpty ( String ssoId ) { } @ CacheEntryModified public void cacheEntryModified ( CacheEntryModifiedEvent < SSOKey , ? > event ) { } @ SuppressWarnings ( "unchecked" ) @ Override public void start ( ) throws Exception { @ SuppressWarnings ( "rawtypes" ) <START_BUG> AdvancedCache cache = this . cacheRef . getValue ( ) . getAdvancedCache ( ) . with ( this . getClass ( ) . getClassLoader ( ) ) ; <END_BUG> this . cache = cache ; this . credentialCache = cache ; this . sessionCache = new org . jboss . as . clustering . infinispan . atomic . AtomicMapCache < SessionKey , FullyQualifiedSessionId , Void > ( cache ) ; this . cache . addListener ( this ) ; } @ Override public void stop ( ) throws Exception { } private void storeCredentials ( final String ssoId , String authType , String username , String password ) { } < K extends SSOKey , V , R > R batch ( Cache < K , V > cache , CacheInvoker . Operation < K , V , R > operation ) { } abstract class Operation < R > implements CacheInvoker . Operation < SSOKey , Object , R > { } abstract class CredentialOperation < R > implements CacheInvoker . Operation < CredentialKey , SSOCredentials , R > { } abstract class SessionOperation < R > implements CacheInvoker . Operation < SessionKey , Map < FullyQualifiedSessionId , Void > , R > { } private void trace ( String message , Object ... args ) { } }

Fix:
AdvancedCache cache = this . cacheRef . getValue ( ) . getAdvancedCache ( ) ;
Buggy code:
public class TransactionRecoveryEJBClientContextInitializer implements EJBClientContextInitializer { @ Override public void initialize ( EJBClientContext context ) { context . registerEJBClientContextListener ( INSTANCE ) ; <START_BUG> ROOT_LOGGER . debugf ( "Registered<seq2seq4repair_space>%s<seq2seq4repair_space>as<seq2seq4repair_space>a<seq2seq4repair_space>listener<seq2seq4repair_space>to<seq2seq4repair_space>EJB<seq2seq4repair_space>client<seq2seq4repair_space>context<seq2seq4repair_space>%s" , INSTANCE , context ) ; <END_BUG> } }

Fix:
ROOT_LOGGER . debug ( ( ( ( "Registered<seq2seq4repair_space>" + ( EJBTransactionRecoveryService . INSTANCE ) ) + "<seq2seq4repair_space>as<seq2seq4repair_space>a<seq2seq4repair_space>listener<seq2seq4repair_space>to<seq2seq4repair_space>EJB<seq2seq4repair_space>client<seq2seq4repair_space>context<seq2seq4repair_space>" ) + context ) ) ;