nus-yam/ex-repair huggingface dataset:
Buggy code:
public final class Columns { private Columns ( ) { } public static abstract class Column implements Statistics , Serializable { Column ( ) { } Column ( String name , Class < ? > type , int offset ) { } public String getColumnName ( ) { } public Class < ? > getColumnType ( ) { } public int getColumnOffset ( ) { } @ Override public String toString ( ) { <START_BUG> return ( ( ( ( ( "Column(" + ( columnName ) ) + ")[" ) + ( columnType . getSimpleName ( ) ) ) + "][" ) + ( columnOffset ) ) + "]" ; <END_BUG> } @ Override public boolean equals ( Object obj ) { } @ Override public int hashCode ( ) { } private String columnName = null ; private Class < ? > columnType = null ; private int columnOffset = - 1 ; } public static class ByteColumn extends Columns . Column { ByteColumn ( ) { } ByteColumn ( String name , int offset , byte min , byte max ) { } public ByteColumn ( String name , int offset ) { } @ Override public Object getMin ( ) { } @ Override public Object getMax ( ) { } private byte minValue ; private byte maxValue ; } public static class ShortColumn extends Columns . Column { ShortColumn ( ) { } ShortColumn ( String name , int offset , short min , short max ) { } public ShortColumn ( String name , int offset ) { } @ Override public Object getMin ( ) { } @ Override public Object getMax ( ) { } private short minValue ; private short maxValue ; } public static class IntColumn extends Columns . Column { IntColumn ( ) { } IntColumn ( String name , int offset , int min , int max ) { } public IntColumn ( String name , int offset ) { } @ Override public Object getMin ( ) { } @ Override public Object getMax ( ) { } private int minValue ; private int maxValue ; } public static class LongColumn extends Columns . Column { LongColumn ( ) { } LongColumn ( String name , int offset , long min , long max ) { } public LongColumn ( String name , int offset ) { } @ Override public Object getMin ( ) { } @ Override public Object getMax ( ) { } private long minValue ; private long maxValue ; } }

Fix:
return ( ( ( ( ( getClass ( ) . getSimpleName ( ) ) + "(name=" ) + ( columnName ) ) + ",<seq2seq4repair_space>offset=" ) + ( columnOffset ) ) + ")" ;
Buggy code:
public class Menu extends Widget { public int handle ; int x ; int y ; int hwndCB ; int id0 ; int id1 ; boolean hasLocation ; MenuItem cascade ; Decorations parent ; ImageList imageList ; static final int ID_PPC = 100 ; static final int ID_SPMM = 102 ; static final int ID_SPBM = 103 ; static final int ID_SPMB = 104 ; static final int ID_SPBB = 105 ; static final int ID_SPSOFTKEY0 = 106 ; static final int ID_SPSOFTKEY1 = 107 ; public Menu ( Control parent ) { } public Menu ( Decorations parent , int style ) { } public Menu ( Menu parentMenu ) { } public Menu ( MenuItem parentItem ) { } Menu ( Decorations parent , int style , int handle ) { } void _setVisible ( boolean visible ) { } public void addHelpListener ( HelpListener listener ) { } public void addMenuListener ( MenuListener listener ) { } static Control checkNull ( Control control ) { } static Menu checkNull ( Menu menu ) { } static MenuItem checkNull ( MenuItem item ) { } static int checkStyle ( int style ) { } void createHandle ( ) { } void createItem ( MenuItem item , int index ) { } void createWidget ( ) { } int defaultBackground ( ) { } int defaultForeground ( ) { } void destroyAccelerators ( ) { } void destroyItem ( MenuItem item ) { } void destroyWidget ( ) { } void fixMenus ( Decorations newParent ) { } Rectangle getBounds ( ) { } public MenuItem getDefaultItem ( ) { } public boolean getEnabled ( ) { } public MenuItem getItem ( int index ) { } public int getItemCount ( ) { } public MenuItem [ ] getItems ( ) { } int GetMenuItemCount ( int handle ) { } String getNameText ( ) { } public Decorations getParent ( ) { } public MenuItem getParentItem ( ) { } public Menu getParentMenu ( ) { } public Shell getShell ( ) { } public boolean getVisible ( ) { } int imageIndex ( Image image ) { if ( ( ( hwndCB ) == 0 ) || ( image == null ) ) return OS . I_IMAGENONE ; if ( ( imageList ) == null ) { int hOldList = OS . SendMessage ( hwndCB , TB_GETIMAGELIST , 0 , 0 ) ; if ( hOldList != 0 ) OS . ImageList_Destroy ( hOldList ) ; Rectangle bounds = image . getBounds ( ) ; <START_BUG> imageList = display . getImageList ( new Point ( bounds . width , bounds . height ) ) ; <END_BUG> int hImageList = imageList . getHandle ( ) ; OS . SendMessage ( hwndCB , TB_SETIMAGELIST , 0 , hImageList ) ; } int index = imageList . indexOf ( image ) ; if ( index == ( - 1 ) ) { index = imageList . add ( image ) ; } else { imageList . put ( index , image ) ; } return index ; } public int indexOf ( MenuItem item ) { } public boolean isEnabled ( ) { } public boolean isVisible ( ) { } void redraw ( ) { } void releaseChild ( ) { } void releaseHandle ( ) { } void releaseWidget ( ) { } public void removeHelpListener ( HelpListener listener ) { } public void removeMenuListener ( MenuListener listener ) { } public void setDefaultItem ( MenuItem item ) { } public void setEnabled ( boolean enabled ) { } public void setLocation ( int x , int y ) { } public void setLocation ( Point location ) { } public void setVisible ( boolean visible ) { } void update ( ) { } }

Fix:
imageList = display . getImageList ( bounds . width , bounds . height ) ;
Buggy code:
public class LongID extends BaseID { private static final long serialVersionUID = 4049072748317914423L ; Long value = null ; public static class LongNamespace extends Namespace { private static final long serialVersionUID = - 1580533392719331665L ; public LongNamespace ( ) { } public ID createInstance ( Object [ ] args ) throws IDCreateException { } public String getScheme ( ) { <START_BUG> return LongID . class . toString ( ) ; <END_BUG> } public Class [ ] [ ] getSupportedParameterTypes ( ) { } } protected LongID ( Namespace n , Long v ) { } protected LongID ( Namespace n , long v ) { } protected int namespaceCompareTo ( BaseID o ) { } protected boolean namespaceEquals ( BaseID o ) { } protected String namespaceGetName ( ) { } protected int namespaceHashCode ( ) { } public long longValue ( ) { } public String toString ( ) { } }

Fix:
return LongID . class . getName ( ) ;
Buggy code:
public class LiteralExpression implements Expression { private final String literalValue ; public LiteralExpression ( String literalValue ) { } @ Override public final String getExpressionString ( ) { } @ Override public String getValue ( ) { } @ Override public String getValue ( EvaluationContext context ) { } @ Override public String getValue ( Object rootObject ) { } @ Override public Class getValueType ( EvaluationContext context ) { } @ Override public TypeDescriptor getValueTypeDescriptor ( EvaluationContext context ) { } @ Override public TypeDescriptor getValueTypeDescriptor ( ) { } @ Override public void setValue ( EvaluationContext context , Object value ) throws EvaluationException { } @ Override public < T > T getValue ( EvaluationContext context , Class < T > expectedResultType ) throws EvaluationException { } @ Override public < T > T getValue ( Class < T > expectedResultType ) throws EvaluationException { } @ Override public boolean isWritable ( EvaluationContext context ) { } @ Override public Class getValueType ( ) { } @ Override public < T > T getValue ( Object rootObject , Class < T > desiredResultType ) throws EvaluationException { } @ Override public String getValue ( EvaluationContext context , Object rootObject ) throws EvaluationException { } @ Override public < T > T getValue ( EvaluationContext context , Object rootObject , Class < T > desiredResultType ) throws EvaluationException { Object value = getValue ( context , rootObject ) ; <START_BUG> return ExpressionUtils . convertTypedValue ( null , new TypedValue ( value ) , desiredResultType ) ; <END_BUG> } @ Override public Class getValueType ( Object rootObject ) throws EvaluationException { } @ Override public Class getValueType ( EvaluationContext context , Object rootObject ) throws EvaluationException { } @ Override public TypeDescriptor getValueTypeDescriptor ( Object rootObject ) throws EvaluationException { } @ Override public TypeDescriptor getValueTypeDescriptor ( EvaluationContext context , Object rootObject ) throws EvaluationException { } @ Override public boolean isWritable ( EvaluationContext context , Object rootObject ) throws EvaluationException { } @ Override public void setValue ( EvaluationContext context , Object rootObject , Object value ) throws EvaluationException { } @ Override public boolean isWritable ( Object rootObject ) throws EvaluationException { } @ Override public void setValue ( Object rootObject , Object value ) throws EvaluationException { } }

Fix:
return ExpressionUtils . convertTypedValue ( context , new TypedValue ( value ) , desiredResultType ) ;
Buggy code:
public final class SimpleSessionStore extends BaseInterceptor { int manager_note ; int checkInterval = 60 ; int maxActiveSessions = - 1 ; String randomClass = null ; public SimpleSessionStore ( ) { } public void setCheckInterval ( int secs ) { } public void setMaxActiveSessions ( int count ) { } public final void setRandomClass ( String randomClass ) { } public void engineInit ( ContextManager cm ) throws TomcatException { } public int requestMap ( Request request ) { } public void reload ( Request req , Context ctx ) { ClassLoader newLoader = ctx . getClassLoader ( ) ; ServerSessionManager sM = getManager ( ctx ) ; Enumeration sessionEnum = sM . getSessions ( ) . keys ( ) ; while ( sessionEnum . hasMoreElements ( ) ) { ServerSession session = ( ( ServerSession ) ( sessionEnum . nextElement ( ) ) ) ; Enumeration e = session . getAttributeNames ( ) ; while ( e . hasMoreElements ( ) ) { String key = ( ( String ) ( e . nextElement ( ) ) ) ; Object value = session . getAttribute ( key ) ; if ( ! ( value instanceof Serializable ) ) { session . removeAttribute ( key ) ; } } } Hashtable orig = sM . getSessions ( ) ; <START_BUG> Object newS = SessionSerializer . doSerialization ( newLoader , orig ) ; <END_BUG> sM . setSessions ( ( ( Hashtable ) ( newS ) ) ) ; String reqId = req . getRequestedSessionId ( ) ; ServerSession sS = sM . findSession ( reqId ) ; if ( sS != null ) { req . setSession ( sS ) ; req . setSessionId ( reqId ) ; } } public int newSessionRequest ( Request request , Response response ) { } public void contextInit ( Context ctx ) throws TomcatException { } public void contextShutdown ( Context ctx ) throws TomcatException { } private ServerSessionManager getManager ( Context ctx ) { } }

Fix:
Object newS = ObjectSerializer . doSerialization ( newLoader , orig ) ;
Buggy code:
public class GameWithTeams extends GameStandard { public GameWithTeams ( String name ) { } @ Override public String getType ( ) { } @ Override public boolean start ( ) { } @ Override public String getNumberOfPlayers ( ) { } @ Override public String getListOfSpleefers ( ) { } @ Override public boolean team ( Player player , String team ) { } @ Override public void onPlayerInteract ( PlayerInteractEvent event ) { } @ Override protected boolean checkGameOver ( ) { } @ Override protected void broadcastWinners ( LinkedList < Spleefer > winners ) { } @ Override protected void teleportPlayersAtGameStart ( ) { Location blue = LocationHelper . configToExactLocation ( configuration . getConfigurationSection ( "blueSpawn" ) ) ; Location red = LocationHelper . configToExactLocation ( configuration . getConfigurationSection ( "redSpawn" ) ) ; for ( Spleefer spleefer : spleefers . get ( ) ) { int team = spleefer . getTeam ( ) ; if ( ( ( team == ( Spleefer . TEAM_BLUE ) ) && ( blue == null ) ) || ( ( team == ( Spleefer . TEAM_RED ) ) && ( red == null ) ) ) teleportPlayer ( spleefer . getPlayer ( ) , "game" ) ; else <START_BUG> teleportPlayer ( spleefer . getPlayer ( ) , ( ( Spleefer . getTeamId ( team ) ) + "Spawn" ) ) ; <END_BUG> } } protected void createTeams ( ) { } protected void evenOutTeamLists ( LinkedList < Spleefer > smaller , LinkedList < Spleefer > larger ) { } }

Fix:
teleportPlayer ( spleefer . getPlayer ( ) , Spleefer . getTeamId ( team ) ) ;
Buggy code:
public class MsgBox { public static final String TAG = "MsgBox" ; private Context mContext ; private String packageName ; private Resources resources ; private Dialog noticeDialog ; private Dialog downloadDialog ; private ProgressBar downloadDialogProgress ; private Dialog errorDialog ; public MsgBox ( Context mContext ) { } public Dialog showNoticeDialog ( OnClickListener onClickListener ) { } public Map < String , Object > showDownloadDialog ( OnClickListener onClickListener ) { if ( ( downloadDialog ) == null ) { LOG . d ( MsgBox . TAG , "showDownloadDialog" ) ; AlertDialog . Builder builder = new Builder ( mContext ) ; builder . setTitle ( getString ( "updating" ) ) ; final LayoutInflater inflater = LayoutInflater . from ( mContext ) ; <START_BUG> View v = inflater . inflate ( getLayout ( "update_progress" ) , null ) ; <END_BUG> downloadDialogProgress = ( ( ProgressBar ) ( v . findViewById ( getId ( "update_progress" ) ) ) ) ; builder . setView ( v ) ; builder . setNegativeButton ( getString ( "update_cancel" ) , onClickListener ) ; downloadDialog = builder . create ( ) ; } if ( downloadDialog . isShowing ( ) ) downloadDialog . show ( ) ; Map < String , Object > ret = new HashMap < String , Object > ( ) ; ret . put ( "dialog" , downloadDialog ) ; ret . put ( "progress" , downloadDialogProgress ) ; return ret ; } public Dialog showErrorDialog ( OnClickListener errorDialogOnClick ) { } private int getId ( String name ) { } private int getString ( String name ) { } private int getLayout ( String name ) { } }

Fix:
View v = inflater . inflate ( getLayout ( "appupdate_progress" ) , null ) ;
Buggy code:
public class XboxAdapter extends XboxControllerAdapter { private Controller controller ; private GameControl gameControl ; public XboxAdapter ( Controller controller ) { } public void isConnected ( boolean connected ) { } public void leftThumbDirection ( double direction ) { } public void leftThumbMagnitude ( double magnitude ) { } public void rightThumbDirection ( double direction ) { gameControl . setCameraDirection ( direction ) ; if ( ( direction > 300 ) || ( direction < 60 ) ) gameControl . switchSelectedButton ( 0 ) ; else <START_BUG> if ( ( direction > 120 ) || ( direction < 210 ) ) <END_BUG> gameControl . switchSelectedButton ( 1 ) ; } public void rightThumbMagnitude ( double magnitude ) { } public void leftShoulder ( boolean pressed ) { } public void rightShoulder ( boolean pressed ) { } int leftVibrate = 0 ; int rightVibrate = 0 ; public void leftTrigger ( double value ) { } public void rightTrigger ( double value ) { } public void buttonA ( boolean pressed ) { } public void back ( boolean pressed ) { } public void start ( boolean pressed ) { } }

Fix:
if ( ( direction > 120 ) && ( direction < 210 ) )
Buggy code:
public class Zone extends NameSet { class AXFREnumeration implements Enumeration { private Enumeration znames ; private Name currentName ; private Object [ ] current ; int count ; boolean sentFirstSOA ; boolean sentNS ; boolean sentOrigin ; boolean sentLastSOA ; AXFREnumeration ( ) { } public boolean hasMoreElements ( ) { } public Object nextElement ( ) { } } public static final int PRIMARY = 1 ; public static final int SECONDARY = 2 ; private int type ; private Name origin ; private short dclass = DClass . IN ; private void validate ( ) throws IOException { } public Zone ( String file , Cache cache ) throws IOException { } public Zone ( Name zone , short _dclass , String remote , Cache cache ) throws IOException { } public Name getOrigin ( ) { } public RRset getNS ( ) { } public SOARecord getSOA ( ) { } public short getDClass ( ) { } public SetResponse findRecords ( Name name , short type ) { } public RRset findExactMatch ( Name name , short type ) { } public void addRecord ( Record r ) { Name name = r . getName ( ) ; <START_BUG> short type = r . getType ( ) ; <END_BUG> RRset rrset = ( ( RRset ) ( findExactSet ( name , type , dclass ) ) ) ; if ( rrset == null ) addSet ( name , type , dclass , ( rrset = new RRset ( ) ) ) ; rrset . addRR ( r ) ; } public Enumeration AXFR ( ) { } }

Fix:
short type = r . getRRsetType ( ) ;
Buggy code:
public class Block extends Statement { public Statement [ ] statements ; public int explicitDeclarations ; public BlockScope scope ; public static final Block None = new Block ( 0 ) ; public Block ( int explicitDeclarations ) { } public FlowInfo analyseCode ( BlockScope currentScope , FlowContext flowContext , FlowInfo flowInfo ) { } public static final Block EmptyWith ( int sourceStart , int sourceEnd ) { } public void generateCode ( BlockScope currentScope , CodeStream codeStream ) { if ( ( ( bits ) & ( IsReachableMASK ) ) == 0 ) { return ; } int pc = codeStream . position ; if ( ( statements ) != null ) { for ( int i = 0 , max = statements . length ; i < max ; i ++ ) { statements [ i ] . generateCode ( scope , codeStream ) ; } } if ( ( scope ) != currentScope ) { codeStream . exitUserScope ( scope ) ; } <START_BUG> codeStream . recordPositionsFrom ( pc , this ) ; <END_BUG> } public boolean isEmptyBlock ( ) { } public void resolve ( BlockScope upperScope ) { } public void resolveUsing ( BlockScope givenScope ) { } public String toString ( int tab ) { } public String toStringStatements ( int tab ) { } public void traverse ( IAbstractSyntaxTreeVisitor visitor , BlockScope blockScope ) { } }

Fix:
codeStream . recordPositionsFrom ( pc , this . sourceStart ) ;
Buggy code:
public class StatisticsAction extends GenericAction { @ Override public String process ( HttpServletRequest httpServletRequest , HttpServletResponse httpServletResponse ) { FilesystemStatsOverview statsOverview = StatsProviderFactory . getStatsProvider ( ) . getFilesystemStatsOverview ( ) ; try { <START_BUG> httpServletRequest = StatisticsService . buildCounts ( httpServletRequest ) ; <END_BUG> Map < String , Integer > usersProjectsTypes = statsOverview . getCountFileTypes ( ) ; Map < String , Integer > cleanProjectsTypes = new HashMap < > ( ) ; usersProjectsTypes . forEach ( ( key , value ) -> { if ( ! ( key . isEmpty ( ) ) ) cleanProjectsTypes . put ( key , value ) ; } ) ; httpServletRequest . setAttribute ( "title" , "Statistics" ) ; httpServletRequest . setAttribute ( "filesTypes" , cleanProjectsTypes ) ; StatisticsService . buildChartData ( httpServletRequest ) ; } catch ( IOException | ArithmeticException | ParseException e ) { e . printStackTrace ( ) ; } return "statistics<seq2seq4repair_space>:<seq2seq4repair_space>layout" ; } }

Fix:
StatisticsService . buildCounts ( httpServletRequest ) ;
Buggy code:
public class Base16Encoder { private static final char [ ] HEX = new char [ ] { '0' , '1' , '2' , '3' , '4' , '5' , '6' , '7' , '8' , '9' , 'A' , 'B' , 'C' , 'D' , 'E' , 'F' } ; public static String encode ( byte [ ] byteArray ) { <START_BUG> StringBuffer hexBuffer = new StringBuffer ( ( ( byteArray . length ) * 2 ) ) ; <END_BUG> for ( int i = 0 ; i < ( byteArray . length ) ; i ++ ) for ( int j = 1 ; j >= 0 ; j -- ) hexBuffer . append ( Base16Encoder . HEX [ ( ( ( byteArray [ i ] ) > > ( j * 4 ) ) & 15 ) ] ) ; return hexBuffer . toString ( ) ; } public static byte [ ] decode ( String s ) { } }

Fix:
StringBuilder hexBuffer = new StringBuilder ( ( ( byteArray . length ) * 2 ) ) ;
Buggy code:
public class Logger { public static final int ATTR_TIME = 1 ; public static final int ATTR_THREAD = 2 ; public static final int ATTR_DEFAULT = ( Logger . ATTR_TIME ) | ( Logger . ATTR_THREAD ) ; public static final LogLevel INFO = new LogLevel ( "INFO" ) ; public static final LogLevel WARN = new LogLevel ( "WARN" ) . setPrintStream ( System . err ) ; public static final LogLevel ERROR = new LogLevel ( "ERROR" ) . setPrintStream ( System . err ) ; public static final LogLevel SEVERE = new LogLevel ( "SEVERE" ) . setPrintStream ( System . err ) ; public DateFormat dateFormat = new SimpleDateFormat ( "dd//MM//yy-hh:mm:ss" ) ; public static ArrayList < String > backlog = new ArrayList < String > ( ) ; public static ArrayList < LogHandler > handlers = new ArrayList < LogHandler > ( ) ; int attr ; String name ; public static void addHandler ( LogHandler handler ) { } public Logger ( String name , int attributes ) { } String getTime ( ) { } private void log ( String message , String level , PrintStream ps ) { StringBuilder builder = new StringBuilder ( ) ; builder . append ( getPrefix ( level ) ) ; builder . append ( message ) ; String ts = builder . toString ( ) ; ps . println ( ts ) ; Logger . backlog . add ( ts ) ; for ( LogHandler hand : Logger . handlers ) <START_BUG> hand . onLog ( message , level ) ; <END_BUG> } public String getPrefix ( String level ) { } public void exception ( Throwable e ) { } public void log ( String message , LogLevel level ) { } public void info ( String message ) { } public void warn ( String message ) { } public void error ( String message ) { } public void severe ( String message ) { } }

Fix:
hand . onLog ( level , message ) ;
Buggy code:
abstract class AbstractMessageHandler implements MessageHandler { protected static final byte HEADER_NO_SUCH_EJB_FAILURE = 10 ; protected static final byte HEADER_NO_SUCH_EJB_METHOD_FAILURE = 11 ; protected static final byte HEADER_SESSION_NOT_ACTIVE_FAILURE = 12 ; private static final byte HEADER_INVOCATION_EXCEPTION = 6 ; protected Map < String , Object > readAttachments ( final ObjectInput input ) throws IOException , ClassNotFoundException { final int numAttachments = input . readByte ( ) ; if ( numAttachments == 0 ) { <START_BUG> return null ; <END_BUG> } final Map < String , Object > attachments = new HashMap < String , Object > ( numAttachments ) ; for ( int i = 0 ; i < numAttachments ; i ++ ) { final String key = ( ( String ) ( input . readObject ( ) ) ) ; final Object val = input . readObject ( ) ; attachments . put ( key , val ) ; } return attachments ; } protected void writeAttachments ( final ObjectOutput output , final Map < String , Object > attachments ) throws IOException { } protected void writeException ( final Channel channel , final MarshallerFactory marshallerFactory , final short invocationId , final Throwable t , final Map < String , Object > attachments ) throws IOException { } protected void writeInvocationFailure ( final Channel channel , final byte messageHeader , final short invocationId , final String failureMessage ) throws IOException { } protected void writeNoSuchEJBFailureMessage ( final Channel channel , final short invocationId , final String appName , final String moduleName , final String distinctname , final String beanName , final String viewClassName ) throws IOException { } protected void writeSessionNotActiveFailureMessage ( final Channel channel , final short invocationId , final String appName , final String moduleName , final String distinctname , final String beanName ) throws IOException { } protected void writeNoSuchEJBMethodFailureMessage ( final Channel channel , final short invocationId , final String appName , final String moduleName , final String distinctname , final String beanName , final String viewClassName , final String methodName , final String [ ] methodParamTypes ) throws IOException { } protected Marshaller prepareForMarshalling ( final MarshallerFactory marshallerFactory , final DataOutput dataOutput ) throws IOException { } private Marshaller getMarshaller ( final MarshallerFactory marshallerFactory ) throws IOException { } protected Unmarshaller prepareForUnMarshalling ( final MarshallerFactory marshallerFactory , final ClassResolver classResolver , final DataInput dataInput ) throws IOException { } private Unmarshaller getUnMarshaller ( final MarshallerFactory marshallerFactory , final ClassResolver classResolver ) throws IOException { } }

Fix:
return new HashMap < String , Object > ( ) ;
Buggy code:
public class JavadocFieldReference extends FieldReference { public int tagSourceStart ; public int tagSourceEnd ; public JavadocFieldReference ( char [ ] source , long pos ) { } private TypeBinding internalResolveType ( Scope scope ) { constant = NotAConstant ; if ( ( this . receiver ) == null ) { SourceTypeBinding sourceTypeBinding = scope . enclosingSourceType ( ) ; this . receiverType = sourceTypeBinding ; this . receiver = new JavadocQualifiedTypeReference ( sourceTypeBinding . compoundName , new long [ sourceTypeBinding . compoundName . length ] , 0 , 0 ) ; } else { <START_BUG> if ( scope . isClassScope ( ) ) { <END_BUG> this . receiverType = receiver . resolveType ( ( ( ClassScope ) ( scope ) ) ) ; } else { this . receiverType = receiver . resolveType ( ( ( BlockScope ) ( scope ) ) ) ; } } if ( ( this . receiverType ) == null ) { return null ; } this . binding = scope . getField ( this . receiverType , this . token , this ) ; if ( ! ( this . binding . isValidBinding ( ) ) ) { constant = NotAConstant ; scope . problemReporter ( ) . invalidField ( this , this . receiverType ) ; return null ; } if ( isFieldUseDeprecated ( binding , scope , ( ( ( this . bits ) & ( IsStrictlyAssignedMASK ) ) != 0 ) ) ) { scope . problemReporter ( ) . deprecatedField ( this . binding , this ) ; } return this . resolvedType = binding . type ; } public boolean isSuperAccess ( ) { } public StringBuffer printExpression ( int indent , StringBuffer output ) { } public TypeBinding resolveType ( BlockScope scope ) { } public TypeBinding resolveType ( ClassScope scope ) { } public void traverse ( IAbstractSyntaxTreeVisitor visitor , BlockScope scope ) { } }

Fix:
if ( ( scope . kind ) == ( Scope . CLASS_SCOPE ) ) {
Buggy code:
public class FieldDeclaration extends AbstractVariableDeclaration { public FieldBinding binding ; boolean hasBeenResolved = false ; public int endPart1Position ; public int endPart2Position ; public FieldDeclaration ( ) { } public FieldDeclaration ( Expression initialization , char [ ] name , int sourceStart , int sourceEnd ) { } public FlowInfo analyseCode ( MethodScope currentScope , FlowContext flowContext , FlowInfo flowInfo ) { } public void generateCode ( BlockScope currentScope , CodeStream codeStream ) { if ( ( ( bits ) & ( IsReachableMASK ) ) == 0 ) { return ; } int pc = codeStream . position ; boolean isStatic ; if ( ( ( initialization ) != null ) && ( ! ( ( isStatic = binding . isStatic ( ) ) && ( ( binding . constant ) != ( NotAConstant ) ) ) ) ) { if ( ! isStatic ) codeStream . aload_0 ( ) ; initialization . generateCode ( currentScope , codeStream , true ) ; if ( isStatic ) { codeStream . putstatic ( binding ) ; } else { codeStream . putfield ( binding ) ; } } <START_BUG> codeStream . recordPositionsFrom ( pc , this ) ; <END_BUG> } public TypeBinding getTypeBinding ( Scope scope ) { } public boolean isField ( ) { } public boolean isStatic ( ) { } public String name ( ) { } public void resolve ( MethodScope initializationScope ) { } public void traverse ( IAbstractSyntaxTreeVisitor visitor , MethodScope scope ) { } }

Fix:
codeStream . recordPositionsFrom ( pc , this . sourceStart ) ;
Buggy code:
@ RunWith ( Arquillian . class ) @ RunAsClient public class FileWithPropertiesTestCase { private static final int CLI_PROC_TIMEOUT = 10000 ; private static final int STATUS_CHECK_INTERVAL = 2000 ; private static final String SERVER_PROP_NAME = "cli-arg-test" ; private static final String CLI_PROP_NAME = "cli.prop.name" ; private static final String CLI_PROP_VALUE = "cli.prop.value" ; private static final String HOST_PROP_NAME = "cli.host.name" ; private static final String HOST_PROP_VALUE = TestSuiteEnvironment . getServerAddress ( ) ; private static final String PORT_PROP_NAME = "cli.port.name" ; private static final String PORT_PROP_VALUE = String . valueOf ( TestSuiteEnvironment . getServerPort ( ) ) ; private static final String CONNECT_COMMAND = ( ( ( "connect<seq2seq4repair_space>${" + ( FileWithPropertiesTestCase . HOST_PROP_NAME ) ) + "}:${" ) + ( FileWithPropertiesTestCase . PORT_PROP_NAME ) ) + "}" ; private static final String SET_PROP_COMMAND = ( "//system-property=" + ( FileWithPropertiesTestCase . SERVER_PROP_NAME ) ) + ":add(value=${cli.prop.name})" ; private static final String GET_PROP_COMMAND = ( "//system-property=" + ( FileWithPropertiesTestCase . SERVER_PROP_NAME ) ) + ":read-resource" ; private static final String REMOVE_PROP_COMMAND = ( "//system-property=" + ( FileWithPropertiesTestCase . SERVER_PROP_NAME ) ) + ":remove" ; private static final String SCRIPT_NAME = "jboss-cli-file-arg-test.cli" ; private static final String PROPS_NAME = "jboss-cli-file-arg-test.properties" ; private static final File SCRIPT_FILE ; private static final File PROPS_FILE ; private static final File TMP_JBOSS_CLI_FILE ; @ BeforeClass public static void setup ( ) { } @ AfterClass public static void cleanUp ( ) { } protected static void ensureRemoved ( File f ) { } private String cliOutput ; private static String jbossDist ; @ Test public void testResolved ( ) { } @ Test public void testNotresolved ( ) { assertEquals ( 1 , execute ( false , true ) ) ; assertNotNull ( cliOutput ) ; assertEquals ( "failed" , getValue ( "outcome" ) ) ; <START_BUG> assertTrue ( getValue ( "failure-description" ) . contains ( "JBAS014802" ) ) ; <END_BUG> } protected String getValue ( final String value ) { } protected int execute ( boolean resolveProps , boolean logFailure ) { } protected void readStream ( final StringBuilder cliOutBuf , InputStream cliStream ) { } }

Fix:
assertTrue ( getValue ( "failure-description" ) . contains ( "WFLYCTL0211" ) ) ;
Buggy code:
public class ThrowStatement extends Statement { public Expression exception ; public TypeBinding exceptionType ; public ThrowStatement ( Expression exception , int startPosition ) { } public FlowInfo analyseCode ( BlockScope currentScope , FlowContext flowContext , FlowInfo flowInfo ) { } public void generateCode ( BlockScope currentScope , CodeStream codeStream ) { <START_BUG> if ( ( ( bits ) & ( IsReachableMASK ) ) == 0 ) <END_BUG> return ; int pc = codeStream . position ; exception . generateCode ( currentScope , codeStream , true ) ; codeStream . athrow ( ) ; codeStream . recordPositionsFrom ( pc , this . sourceStart ) ; } public StringBuffer printStatement ( int indent , StringBuffer output ) { } public void resolve ( BlockScope scope ) { } public void traverse ( ASTVisitor visitor , BlockScope blockScope ) { } }

Fix:
if ( ( ( bits ) & ( ASTNode . IsReachable ) ) == 0 )
Buggy code:
public class MainActivity extends ActionBarActivity implements Toolbar . OnMenuItemClickListener , MainPresenter { private Toolbar toolbar ; private CListAdapter cListAdapter ; private final int REGISTER_REQUEST_CODE = 512 ; private MainInteractor mainInteractor ; public static MainInteractor MAIN_INTERACTOR ; @ Override protected void onCreate ( Bundle savedInstanceState ) { super . onCreate ( savedInstanceState ) ; setContentView ( activity_main ) ; if ( ( VERSION . SDK_INT ) >= ( VERSION_CODES . LOLLIPOP ) ) { colorActionBar ( ) ; } toolbar = ( ( Toolbar ) ( findViewById ( R . id . toolbar ) ) ) ; if ( ( toolbar ) != null ) { toolbar . setTitle ( app_name ) ; toolbar . setTitleTextColor ( getResources ( ) . getColor ( white ) ) ; toolbar . inflateMenu ( menu_main ) ; toolbar . setOnMenuItemClickListener ( this ) ; setSupportActionBar ( toolbar ) ; getSupportActionBar ( ) . setDefaultDisplayHomeAsUpEnabled ( true ) ; } mainInteractor = new MainInteractorImpl ( this ) ; MainActivity . MAIN_INTERACTOR = this . mainInteractor ; Marssenger marssenger = ( ( Marssenger ) ( getApplicationContext ( ) ) ) ; marssenger . mainInteractor = mainInteractor ; if ( mainInteractor . checkPlayServices ( ) ) { if ( ! ( isSerivceRunning ( HttpsBackgroundService . class ) ) ) { Intent serviceIntent = new Intent ( this , HttpsBackgroundService . class ) ; serviceIntent . putExtra ( "senderID" , PROJECT_ID ) ; <START_BUG> serviceIntent . putExtra ( "phoneNumber" , $missing$ ) ; <END_BUG> serviceIntent . putExtra ( "email" , "hurensohn@squad.com" ) ; serviceIntent . putExtra ( "digitCode" , "010101" ) ; startService ( serviceIntent ) ; } } else { Log . d ( "GCMundso" , "Cry<seq2seq4repair_space>a<seq2seq4repair_space>lot!" ) ; } MainFragment mainFragment = MainFragment . getInstance ( this ) ; replaceContainer ( mainFragment ) ; } @ Override protected void onStart ( ) { } @ Override protected void onStop ( ) { } private void replaceContainer ( Fragment fragment ) { } private boolean isSerivceRunning ( Class < ? > serviceClass ) { } @ TargetApi ( VERSION_CODES . LOLLIPOP ) private void colorActionBar ( ) { } @ Override public boolean onCreateOptionsMenu ( Menu menu ) { } @ Override public boolean onOptionsItemSelected ( MenuItem item ) { } private void test ( CharSequence charSequence ) { } @ Override public void onActivityResult ( int requestCode , int resultCode , Intent data ) { } @ Override public void onResume ( ) { } @ Override public boolean onMenuItemClick ( MenuItem menuItem ) { } @ Override public CListAdapter getAdapter ( ) { } @ Override public void onChatClick ( View view , int position ) { } @ Override public void onRegsiterReturn ( int requestCode , int resultCode , Intent data ) { } }

Fix:
serviceIntent . putExtra ( "phoneNumber" , "0157700000" ) ;
Buggy code:
public class AjaxLinkClickTest extends WicketTestCase { private boolean linkClicked ; private AjaxRequestTarget ajaxRequestTarget ; public AjaxLinkClickTest ( ) { } protected void setUp ( ) throws Exception { } public void testBasicAjaxLinkClick ( ) { final Page page = new MockPageWithLink ( ) ; <START_BUG> AjaxLink ajaxLink = new AjaxLink ( page , "ajaxLink" ) { <END_BUG> private static final long serialVersionUID = 1L ; public void onClick ( AjaxRequestTarget target ) { linkClicked = true ; ajaxRequestTarget = target ; } } ; application . startPage ( new ITestPageSource ( ) { private static final long serialVersionUID = 1L ; public Page getTestPage ( ) { return page ; } } ) ; application . clickLink ( "ajaxLink" ) ; assertTrue ( linkClicked ) ; assertNotNull ( ajaxRequestTarget ) ; } }

Fix:
new AjaxLink ( page , "ajaxLink" ) {
Buggy code:
public class TestRegexpRandom extends LuceneTestCase { private IndexSearcher searcher ; private IndexReader reader ; private Directory dir ; @ Override public void setUp ( ) throws Exception { super . setUp ( ) ; dir = newDirectory ( ) ; RandomIndexWriter writer = new RandomIndexWriter ( random ( ) , dir , newIndexWriterConfig ( TEST_VERSION_CURRENT , new org . apache . lucene . analysis . MockAnalyzer ( random ( ) ) ) . setMaxBufferedDocs ( TestUtil . nextInt ( random ( ) , 50 , 1000 ) ) ) ; Document doc = new Document ( ) ; FieldType customType = new FieldType ( TextField . TYPE_STORED ) ; customType . setOmitNorms ( true ) ; Field field = newField ( "field" , "" , customType ) ; doc . add ( field ) ; NumberFormat df = new DecimalFormat ( "000" , new DecimalFormatSymbols ( Locale . ROOT ) ) ; for ( int i = 0 ; i < 1000 ; i ++ ) { field . setStringValue ( df . format ( i ) ) ; writer . addDocument ( doc ) ; } reader = writer . getReader ( ) ; <START_BUG> writer . close ( ) ; <END_BUG> searcher = newSearcher ( reader ) ; } private char N ( ) { } private String fillPattern ( String wildcardPattern ) { } private void assertPatternHits ( String pattern , int numHits ) throws Exception { } @ Override public void tearDown ( ) throws Exception { } public void testRegexps ( ) throws Exception { } }

Fix:
writer . shutdown ( ) ;
Buggy code:
public class NavigationDrawerFragment extends Fragment { private static final String STATE_SELECTED_POSITION = "selected_navigation_drawer_position" ; private static final String PREF_USER_LEARNED_DRAWER = "navigation_drawer_learned" ; private NavigationDrawerFragment . NavigationDrawerCallbacks mCallbacks ; private ActionBarDrawerToggle mDrawerToggle ; private DrawerLayout mDrawerLayout ; private ListView mDrawerListView ; private View mFragmentContainerView ; private int mCurrentSelectedPosition = 0 ; private boolean mFromSavedInstanceState ; private boolean mUserLearnedDrawer ; private int fileCount = - 1 ; public NavigationDrawerFragment ( ) { } @ Override public void onCreate ( Bundle savedInstanceState ) { } @ Override public void onActivityCreated ( Bundle savedInstanceState ) { } @ Override public View onCreateView ( LayoutInflater inflater , ViewGroup container , Bundle savedInstanceState ) { } private void refreshHeadings ( ) { String [ ] headings = FileManager . instance ( ) . getVisitorHeadings ( ) ; <START_BUG> if ( ( fileCount ) < ( headings . length ) ) { <END_BUG> fileCount = headings . length ; mDrawerListView . setAdapter ( new android . widget . ArrayAdapter < String > ( getActionBar ( ) . getThemedContext ( ) , layout . simple_list_item_activated_1 , id . text1 , headings ) ) ; } } public boolean isDrawerOpen ( ) { } public void setUp ( int fragmentId , DrawerLayout drawerLayout ) { } private void selectItem ( int position ) { } @ Override public void onAttach ( Activity activity ) { } @ Override public void onDetach ( ) { } @ Override public void onSaveInstanceState ( Bundle outState ) { } @ Override public void onConfigurationChanged ( Configuration newConfig ) { } @ Override public void onCreateOptionsMenu ( Menu menu , MenuInflater inflater ) { } @ Override public boolean onOptionsItemSelected ( MenuItem item ) { } private void showGlobalContextActionBar ( ) { } private ActionBar getActionBar ( ) { } public int getIdAtPosition ( int position ) { } public static interface NavigationDrawerCallbacks { void saveRecords ( ) throws Exception { } void deleteRecord ( ) throws Exception { } void newRecord ( ) { } void onNavigationDrawerItemSelected ( int position ) { } } }

Fix:
if ( ( fileCount ) != ( headings . length ) ) {
Buggy code:
class CommentsAdapter extends ArrayAdapter < BaseItem > { private ArrayList < BaseItem > comments = new ArrayList < BaseItem > ( ) ; public CommentsAdapter ( Context context , int textViewResourceId , ArrayList < BaseItem > comments ) { } public int getCount ( ) { } public BaseItem getItem ( int position ) { } public long getItemId ( int position ) { } public void updateData ( ArrayList < BaseItem > comments ) { } public void addProgressElement ( ) { } public boolean isContainProgressElement ( ) { } public void removeProgressElement ( ) { } @ Override public View getView ( int position , View convertView , ViewGroup parent ) { final Comment comment = ( ( Comment ) ( getItem ( position ) ) ) ; LayoutInflater aInflater = LayoutInflater . from ( getContext ( ) ) ; if ( comment != null ) { convertView = aInflater . inflate ( comments_row_view , parent , false ) ; WebView webView = ( ( WebView ) ( convertView . findViewById ( text ) ) ) ; webView . setScrollBarStyle ( SCROLLBARS_OUTSIDE_OVERLAY ) ; WebSettings webSettings = webView . getSettings ( ) ; webSettings . setDefaultFontSize ( 13 ) ; String header = "<?xml<seq2seq4repair_space>version=\"1.0\"<seq2seq4repair_space>encoding=\"UTF-8\"<seq2seq4repair_space>?>" ; <START_BUG> webView . loadData ( ( header + ( comment . Html ) ) , "text//html" , "UTF-8" ) ; <END_BUG> TextView author = ( ( TextView ) ( convertView . findViewById ( author ) ) ) ; author . setText ( Html . fromHtml ( comment . Signature ) ) ; TextView rating = ( ( TextView ) ( convertView . findViewById ( rating ) ) ) ; rating . setText ( Utils . getRatingStringFromBaseItem ( comment ) ) ; } else { convertView = ( ( View ) ( aInflater . inflate ( footer_view , null ) ) ) ; } return convertView ; } }

Fix:
webView . loadDataWithBaseURL ( "" , ( header + ( comment . Html ) ) , "text//html" , "UTF-8" , null ) ;
Buggy code:
public class SwarmPortalConfigurationServlet extends SewingHttpServlet { private static final long serialVersionUID = 6913347882663532246L ; private Configuration config ; private Dictionary confDictionary ; public SwarmPortalConfigurationServlet ( final ConfigurationAdmin ca ) throws IOException { } @ Override public ControllerMap getControllerMap ( ) { } public class Index extends SewingController { @ Override public String getTemplateName ( ) { } @ Override public TemplateModelRoot get ( final RequestParameters params , final HttpServletRequest req , final HttpServletResponse resp ) { } @ Override public TemplateModelRoot post ( final RequestParameters params , final HttpServletRequest req , final HttpServletResponse resp ) { <START_BUG> String missingKey = missingParameter ( params , "p-api-key" , "a-api-key" , "user-name" ) ; <END_BUG> if ( missingKey != null ) throw new RuntimeException ( ( "Missing<seq2seq4repair_space>expected<seq2seq4repair_space>key:<seq2seq4repair_space>" + missingKey ) ) ; String action = params . get ( "action" ) ; String msg = null ; if ( action . equals ( "activate" ) ) { String pApiKey = params . get ( "p-api-key" ) ; String cApiKey = params . get ( "c-api-key" ) ; String username = params . get ( "user-name" ) ; if ( ( pApiKey != null ) && ( username != null ) ) { try { saveConfiguration ( username , pApiKey , cApiKey ) ; setEnabled ( true ) ; msg = "BugSwarm<seq2seq4repair_space>has<seq2seq4repair_space>been<seq2seq4repair_space>activated" ; } catch ( IOException e ) { msg = "An<seq2seq4repair_space>error<seq2seq4repair_space>occurred:<seq2seq4repair_space>" + ( e . getMessage ( ) ) ; } } else { msg = "Please<seq2seq4repair_space>check<seq2seq4repair_space>your<seq2seq4repair_space>server<seq2seq4repair_space>information" ; } } else if ( action . equals ( "deactivate" ) ) { setEnabled ( false ) ; msg = "BugSwarm<seq2seq4repair_space>has<seq2seq4repair_space>been<seq2seq4repair_space>deactivated" ; } SimpleHash root = ( ( SimpleHash ) ( loadSwarmInfo ( ) ) ) ; if ( msg != null ) { root . put ( "message" , msg ) ; } return root ; } protected final String missingParameter ( RequestParameters params , String ... requiredKeys ) { } private TemplateModelRoot loadSwarmInfo ( ) { } } private void saveConfiguration ( final String username , final String partApiKey , final String confApiKei ) throws IOException { } public boolean setEnabled ( final boolean enabled ) { } public boolean isEnabled ( ) throws IOException { } private String getValue ( final String key ) throws IOException { } private void updateConfig ( final String key , final String val ) throws IOException { } }

Fix:
String missingKey = missingParameter ( params , "p-api-key" , "c-api-key" , "user-name" ) ;
Buggy code:
public final class DriverProcessor implements DeploymentUnitProcessor { private static final Logger log = Logger . getLogger ( "org.jboss.as.connector.deployers.jdbc" ) ; @ Override public void deploy ( final DeploymentPhaseContext phaseContext ) throws DeploymentUnitProcessingException { final DeploymentUnit deploymentUnit = phaseContext . getDeploymentUnit ( ) ; final Module module = deploymentUnit . getAttachment ( MODULE ) ; final ServicesAttachment servicesAttachment = deploymentUnit . getAttachment ( SERVICES ) ; if ( ( module != null ) && ( servicesAttachment != null ) ) { final ModuleClassLoader classLoader = module . getClassLoader ( ) ; final List < String > driverNames = servicesAttachment . getServiceImplementations ( Driver . class . getName ( ) ) ; for ( String driverClassName : driverNames ) { try { final Class < ? extends Driver > driverClass = classLoader . loadClass ( driverClassName ) . asSubclass ( Driver . class ) ; final Constructor < ? extends Driver > constructor = driverClass . getConstructor ( ) ; final Driver driver = constructor . newInstance ( ) ; final int majorVersion = driver . getMajorVersion ( ) ; final int minorVersion = driver . getMinorVersion ( ) ; final boolean compliant = driver . jdbcCompliant ( ) ; if ( compliant ) { DriverProcessor . log . infof ( "Deploying<seq2seq4repair_space>JDBC-compliant<seq2seq4repair_space>driver<seq2seq4repair_space>%s<seq2seq4repair_space>(version<seq2seq4repair_space>%d.%d)" , driverClass , Integer . valueOf ( majorVersion ) , Integer . valueOf ( minorVersion ) ) ; } else { DriverProcessor . log . infof ( "Deploying<seq2seq4repair_space>non-JDBC-compliant<seq2seq4repair_space>driver<seq2seq4repair_space>%s<seq2seq4repair_space>(version<seq2seq4repair_space>%d.%d)" , driverClass , Integer . valueOf ( majorVersion ) , Integer . valueOf ( minorVersion ) ) ; } String driverName = deploymentUnit . getName ( ) ; <START_BUG> InstalledDriver driverMetadata = new InstalledDriver ( driverName , driverClass . getName ( ) , null , majorVersion , minorVersion , compliant ) ; <END_BUG> DriverService driverService = new DriverService ( driverMetadata , driver ) ; phaseContext . getServiceTarget ( ) . addService ( JBOSS . append ( "jdbc-driver" , driverName . replaceAll ( "\\." , "_" ) ) , driverService ) . addDependency ( JDBC_DRIVER_REGISTRY_SERVICE , DriverRegistry . class , driverService . getDriverRegistryServiceInjector ( ) ) . setInitialMode ( ACTIVE ) . install ( ) ; } catch ( Exception e ) { DriverProcessor . log . warnf ( "Unable<seq2seq4repair_space>to<seq2seq4repair_space>instantiate<seq2seq4repair_space>driver<seq2seq4repair_space>class<seq2seq4repair_space>\"%s\":<seq2seq4repair_space>%s" , driverClassName , e ) ; } } } } @ Override public void undeploy ( final DeploymentUnit context ) { } }

Fix:
InstalledDriver driverMetadata = new InstalledDriver ( driverName , driverClass . getName ( ) , null , null , majorVersion , minorVersion , compliant ) ;
Buggy code:
public class EJBRemoteServiceAdd extends AbstractBoottimeAddStepHandler { static final EJBRemoteServiceAdd INSTANCE = new EJBRemoteServiceAdd ( ) ; private EJBRemoteServiceAdd ( ) { } static ModelNode create ( final String connectorName ) { } @ Override protected void performBoottime ( OperationContext context , ModelNode operation , ModelNode model , ServiceVerificationHandler verificationHandler , List < ServiceController < ? > > newControllers ) throws OperationFailedException { final String connectorName = model . require ( EJB3SubsystemModel . CONNECTOR_REF ) . asString ( ) ; final ServiceTarget serviceTarget = context . getServiceTarget ( ) ; <START_BUG> final EJBRemoteConnectorService service = new EJBRemoteConnectorService ( ( ( byte ) ( 1 ) ) , new String [ ] { "river" } ) ; <END_BUG> newControllers . add ( serviceTarget . addService ( SERVICE_NAME , service ) . addDependency ( ENDPOINT , Endpoint . class , service . getEndpointInjector ( ) ) . setInitialMode ( ACTIVE ) . install ( ) ) ; } @ Override protected void populateModel ( ModelNode operation , ModelNode model ) throws OperationFailedException { } }

Fix:
final EJBRemoteConnectorService service = new EJBRemoteConnectorService ( ( ( byte ) ( 1 ) ) , new String [ ] { "river" , "java-serial" } ) ;
Buggy code:
public class XsltTransformer implements ITransformer { private static final String extension = "xsl" ; public XsltTransformer ( ) { } public CharSequence transform ( final Component component , final String output ) throws Exception { String filepath = ( ( component . findParentWithAssociatedMarkup ( ) . getClass ( ) . getPackage ( ) . getName ( ) . replace ( '.' , '//' ) ) + "//" ) + ( component . getId ( ) ) ; <START_BUG> IResourceStream resourceStream = Application . get ( ) . getResourceSettings ( ) . getResourceStreamLocator ( ) . locate ( getClass ( ) . getClassLoader ( ) , filepath , component . getStyle ( ) , component . getLocale ( ) , XsltTransformer . extension ) ; <END_BUG> if ( resourceStream == null ) { throw new FileNotFoundException ( ( "Unable<seq2seq4repair_space>to<seq2seq4repair_space>find<seq2seq4repair_space>XSLT<seq2seq4repair_space>resource<seq2seq4repair_space>for<seq2seq4repair_space>" + ( component . toString ( ) ) ) ) ; } try { TransformerFactory tFactory = TransformerFactory . newInstance ( ) ; Transformer transformer = tFactory . newTransformer ( new StreamSource ( resourceStream . getInputStream ( ) ) ) ; StringWriter writer = new StringWriter ( ) ; transformer . transform ( new StreamSource ( new StringReader ( output ) ) , new StreamResult ( writer ) ) ; return writer . getBuffer ( ) ; } finally { resourceStream . close ( ) ; } } }

Fix:
IResourceStream resourceStream = Application . get ( ) . getResourceSettings ( ) . getResourceStreamLocator ( ) . locate ( getClass ( ) , filepath , component . getStyle ( ) , component . getLocale ( ) , XsltTransformer . extension ) ;