nus-yam/ex-repair huggingface dataset:
Buggy code:
public class ReadCommand { public static final String DO_REPAIR = "READ-REPAIR" ; private static ReadCommandSerializer serializer = new ReadCommandSerializer ( ) ; public static ReadCommandSerializer serializer ( ) { } private static List < String > EMPTY_COLUMNS = Arrays . asList ( new String [ 0 ] ) ; public Message makeReadMessage ( ) throws IOException { } public final String table ; public final String key ; public final String columnFamilyColumn ; public final int start ; public final int count ; public final long sinceTimestamp ; public final List < String > columnNames ; private boolean isDigestQuery = false ; public ReadCommand ( String table , String key , String columnFamilyColumn , int start , int count , long sinceTimestamp , List < String > columnNames ) { } public ReadCommand ( String table , String key ) { } public ReadCommand ( String table , String key , String columnFamilyColumn ) { } public ReadCommand ( String table , String key , String columnFamilyColumn , List < String > columnNames ) { } public ReadCommand ( String table , String key , String columnFamilyColumn , int start , int count ) { } public ReadCommand ( String table , String key , String columnFamilyColumn , long sinceTimestamp ) { } public boolean isDigestQuery ( ) { } public void setDigestQuery ( boolean isDigestQuery ) { } public ReadCommand copy ( ) { } public Row getRow ( Table table ) throws IOException , ColumnFamilyNotDefinedException { <START_BUG> if ( ( columnNames ) != ( ReadCommand . EMPTY_COLUMNS ) ) { <END_BUG> return table . getRow ( key , columnFamilyColumn , columnNames ) ; } if ( ( sinceTimestamp ) > 0 ) { return table . getRow ( key , columnFamilyColumn , sinceTimestamp ) ; } if ( ( ( start ) > 0 ) || ( ( ( count ) > 0 ) && ( ( count ) < ( Integer . MAX_VALUE ) ) ) ) { return table . getRow ( key , columnFamilyColumn , start , count ) ; } return table . getRow ( key , columnFamilyColumn ) ; } public String toString ( ) { } }

Fix:
if ( ! ( columnNames . isEmpty ( ) ) ) {
Buggy code:
public final class PageMap implements Serializable { public static final String DEFAULT_NAME = null ; private static final Log log = LogFactory . getLog ( PageMap . class ) ; private static final long serialVersionUID = 1L ; private final ArrayListStack accessStack = new ArrayListStack ( 8 ) ; private String interceptContinuationURL ; private final String name ; private int pageId = 0 ; private transient Session session ; public static class Access implements Serializable { private static final long serialVersionUID = 1L ; int id ; int version ; public boolean equals ( Object obj ) { } public final int getId ( ) { } public final int getVersion ( ) { } public int hashCode ( ) { } public String toString ( ) { } } static interface IVisitor { public void entry ( final IPageMapEntry entry ) { } } public static PageMap forName ( final String pageMapName ) { } PageMap ( final String name , final Session session ) { } public final void clear ( ) { } public final ArrayListStack getAccessStack ( ) { } public final IPageMapEntry getEntry ( final int id ) { } public final String getName ( ) { } public final Session getSession ( ) { } public final long getSizeInBytes ( ) { } public final int getVersions ( ) { } public final boolean isDefault ( ) { } public final IPageMapEntry lastAccessedEntry ( ) { } public final void remove ( ) { } public final void remove ( final Page page ) { } public final void removeEntry ( final IPageMapEntry entry ) { } public String toString ( ) { } final String attributeForId ( final int id ) { } final String attributePrefix ( ) { } final boolean continueToOriginalDestination ( ) { } final Page get ( final int id , int versionNumber ) { } final int nextId ( ) { } final void put ( final Page page ) { <START_BUG> if ( ! ( page . isStateless ( ) ) ) { <END_BUG> final IPageMapEntry entry = page . getPageMapEntry ( ) ; pushAccess ( entry ) ; final String attribute = attributeForId ( entry . getNumericId ( ) ) ; session . setAttribute ( attribute , entry ) ; session . getApplication ( ) . getSessionSettings ( ) . getPageMapEvictionStrategy ( ) . evict ( this ) ; } } final void redirectToInterceptPage ( final Page page ) { } final void setSession ( final Session session ) { } final void visitEntries ( final PageMap . IVisitor visitor ) { } private final void access ( final IPageMapEntry entry , final int version ) { } private final List getEntries ( ) { } private final PageMap . Access peekAccess ( ) { } private final PageMap . Access popAccess ( ) { } private final void pushAccess ( IPageMapEntry entry ) { } private final int versionOf ( final IPageMapEntry entry ) { } }

Fix:
if ( ( ! ( page . isStateless ( ) ) ) && ( ! ( page . isErrorPage ( ) ) ) ) {
Buggy code:
public class Users extends Controller { private static final Form < AppUser > userForm = Form . form ( AppUser . class ) ; private static List < Hotel > hotels = Hotel . finder . all ( ) ; private static Finder < String , Hotel > finder = new Model . Finder < > ( . class ) ; private static List < AppUser > users = AppUser . finder . all ( ) ; private static Finder < String , AppUser > userFinder = new Model . Finder < > ( . class ) ; private static List < Feature > features = Feature . finder . all ( ) ; private static Finder < String , Feature > featureFinder = new Model . Finder < > ( . class ) ; public Result registerUser ( ) { } public Result saveUser ( ) { } public Result login ( ) { Form < AppUser > boundForm = Users . userForm . bindFromRequest ( ) ; String email = boundForm . field ( "email" ) . value ( ) ; String password = boundForm . field ( "password" ) . value ( ) ; AppUser user = AppUser . authenticate ( email , password ) ; if ( user == null ) { flash ( "error" , "Incorrect<seq2seq4repair_space>email<seq2seq4repair_space>or<seq2seq4repair_space>password!<seq2seq4repair_space>Please<seq2seq4repair_space>try<seq2seq4repair_space>again!" ) ; return badRequest ( list . render ( Users . hotels ) ) ; } else if ( ( user . userAccessLevel ) == ( UserAccessLevel . ADMIN ) ) { SessionsAndCookies . setUserSessionSata ( user ) ; SessionsAndCookies . setCookies ( user ) ; return ok ( adminPanel . render ( ) ) ; } else { SessionsAndCookies . setUserSessionSata ( user ) ; SessionsAndCookies . setCookies ( user ) ; <START_BUG> return redirect ( routes . Users . editUser ( user . email ) ) ; <END_BUG> } } @ Security . Authenticated ( isUserLogged . class ) public Result editUser ( String email ) { } public Result logOut ( ) { } @ Security . Authenticated ( AdminFilter . class ) public Result showAdminHotels ( ) { } @ Security . Authenticated ( AdminFilter . class ) public Result showAdminUsers ( ) { } @ Security . Authenticated ( AdminFilter . class ) public Result showAdminFeatures ( ) { } @ Security . Authenticated ( HotelManagerFilter . class ) public Result showManagerHotels ( ) { } @ Security . Authenticated ( AdminFilter . class ) public Result showAdminPanel ( ) { } @ Security . Authenticated ( AdminFilter . class ) public Result deleteUser ( String email ) { } @ Security . Authenticated ( isUserLogged . class ) public Result updateUser ( String email ) { } @ Security . Authenticated ( SellerFilter . class ) public Result getSellers ( ) { } @ Security . Authenticated ( AdminFilter . class ) public Result setRole ( String email ) { } }

Fix:
return redirect ( Application . index ( ) ) ;
Buggy code:
public class ResourceUrlProviderJavaConfigTests { private final ResourceUrlProviderJavaConfigTests . TestServlet servlet = new ResourceUrlProviderJavaConfigTests . TestServlet ( ) ; private MockFilterChain filterChain ; private MockHttpServletRequest request ; @ Before @ SuppressWarnings ( "resource" ) public void setup ( ) throws Exception { } @ Test public void rootServletMapping ( ) throws Exception { } @ Test public void prefixServletMapping ( ) throws Exception { } @ Test public void extensionServletMapping ( ) throws Exception { } @ Configuration static class WebConfig extends WebMvcConfigurationSupport { @ Override public void addResourceHandlers ( ResourceHandlerRegistry registry ) { <START_BUG> registry . addResourceHandler ( "//resources//**" ) . addResourceLocations ( "classpath:org//springframework//web//servlet//resource//test//" ) . addVersionHash ( "//**" ) ; <END_BUG> } } @ SuppressWarnings ( "serial" ) private static class TestServlet extends HttpServlet { private HttpServletResponse response ; @ Override protected void doGet ( HttpServletRequest request , HttpServletResponse response ) { } } }

Fix:
registry . addResourceHandler ( "//resources//**" ) . addResourceLocations ( "classpath:org//springframework//web//servlet//resource//test//" ) . addContentVersionStrategy ( "//**" ) ;
Buggy code:
public class Slider extends Control { boolean dragging ; boolean tracking ; int increment = 1 ; int pageIncrement = 10 ; public Slider ( Composite parent , int style ) { } public void addSelectionListener ( SelectionListener listener ) { } static int checkStyle ( int style ) { } int actionProc ( int theControl , int partCode ) { } public Point computeSize ( int wHint , int hHint , boolean changed ) { } void createHandle ( ) { } void drawBackground ( int control , int context ) { } public int getIncrement ( ) { } public int getMaximum ( ) { } public int getMinimum ( ) { } public int getPageIncrement ( ) { } public int getSelection ( ) { } public int getThumb ( ) { } int kEventControlTrack ( int nextHandler , int theEvent , int userData ) { } int kEventMouseDown ( int nextHandler , int theEvent , int userData ) { int status = super . kEventMouseDown ( nextHandler , theEvent , userData ) ; if ( status == ( OS . noErr ) ) return status ; display . grabControl = null ; display . runDeferredEvents ( ) ; dragging = tracking = false ; status = OS . CallNextEventHandler ( nextHandler , theEvent ) ; if ( dragging ) { Event event = new Event ( ) ; sendEvent ( Selection , event ) ; } dragging = false ; if ( tracking ) { org . eclipse . swt . internal . carbon . Point outPt = new org . eclipse . swt . internal . carbon . Point ( ) ; OS . GetGlobalMouse ( outPt ) ; Rect rect = new Rect ( ) ; int window = OS . GetControlOwner ( handle ) ; int x ; int y ; if ( OS . HIVIEW ) { CGPoint pt = new CGPoint ( ) ; pt . x = outPt . h ; pt . y = outPt . v ; OS . HIViewConvertPoint ( pt , 0 , handle ) ; x = ( ( int ) ( pt . x ) ) ; y = ( ( int ) ( pt . y ) ) ; OS . GetWindowBounds ( window , ( ( short ) ( kWindowStructureRgn ) ) , rect ) ; } else { OS . GetControlBounds ( handle , rect ) ; x = ( outPt . h ) - ( rect . left ) ; y = ( outPt . v ) - ( rect . top ) ; OS . GetWindowBounds ( window , ( ( short ) ( kWindowContentRgn ) ) , rect ) ; } x -= rect . left ; y -= rect . top ; short [ ] button = new short [ 1 ] ; OS . GetEventParameter ( theEvent , kEventParamMouseButton , typeMouseButton , null , 2 , null , button ) ; int chord = OS . GetCurrentEventButtonState ( ) ; int modifiers = OS . GetCurrentEventKeyModifiers ( ) ; <START_BUG> sendMouseEvent ( MouseUp , button [ 0 ] , chord , ( ( short ) ( x ) ) , ( ( short ) ( y ) ) , modifiers , true ) ; <END_BUG> } tracking = false ; return status ; } public void removeSelectionListener ( SelectionListener listener ) { } public void setIncrement ( int value ) { } public void setMaximum ( int value ) { } public void setMinimum ( int value ) { } public void setPageIncrement ( int value ) { } public void setSelection ( int value ) { } public void setThumb ( int value ) { } public void setValues ( int selection , int minimum , int maximum , int thumb , int increment , int pageIncrement ) { } }

Fix:
sendMouseEvent ( MouseUp , button [ 0 ] , true , chord , ( ( short ) ( x ) ) , ( ( short ) ( y ) ) , modifiers ) ;
Buggy code:
public class PackagesViewModel implements ViewModel { private static final String TAG = "PackagesViewModel" ; public ReplaySubject < List < ReplaySubject < Package > > > packages = ReplaySubject . create ( ) ; public ReplaySubject < List < Courier > > couriers = ReplaySubject . create ( ) ; private Context context ; public PackagesViewModel ( Context context ) { } @ Override public void destroy ( ) { } public Observable < Void > getCouriers ( ) { } public Observable < ReplaySubject < Package > > trackPackage ( ReplaySubject < Package > aPackage ) { } public Package packageForTrackingNumber ( String trackingNumber , Courier courier ) { } public void updatePackageName ( String name , ReplaySubject < Package > aPackage ) { Realm realm = Realm . getDefaultInstance ( ) ; realm . beginTransaction ( ) ; Package packageToUpdate = realm . where ( Package . class ) . equalTo ( "trackingNumber" , aPackage . getValue ( ) . getTrackingNumber ( ) ) . findFirst ( ) ; packageToUpdate . setName ( name ) ; realm . commitTransaction ( ) ; <START_BUG> aPackage . onNext ( aPackage . getValue ( ) ) ; <END_BUG> } public void addPackage ( ReplaySubject < Package > aPackage ) { } public void archivePackage ( ReplaySubject < Package > aPackage ) { } public void unarchivePackage ( Package aPackage ) { } public void refreshPackages ( ) { } private void loadCouriers ( ) { } private void loadPackages ( ) { } private void saveCouriers ( List < Courier > couriers ) { } private void savePackage ( Package aPackage ) { } }

Fix:
aPackage . onNext ( packageToUpdate ) ;
Buggy code:
public final class LauncherMain { public static void main ( final String ... args ) throws Exception { <START_BUG> final Launcher launcher = new Launcher ( ) ; <END_BUG> new ShutdownHook ( launcher :: stop ) . register ( ) ; launcher . start ( ) ; } }

Fix:
final Launcher launcher = new Launcher ( args ) ;
Buggy code:
System . out . println ( "SimpleStep<seq2seq4repair_space>must<seq2seq4repair_space>take<seq2seq4repair_space>1<seq2seq4repair_space>argument<seq2seq4repair_space>denoting<seq2seq4repair_space>direction,<seq2seq4repair_space>as<seq2seq4repair_space>either:<seq2seq4repair_space>{up,<seq2seq4repair_space>down,<seq2seq4repair_space>left,<seq2seq4repair_space>right}" ) ; return ; } String arg1 = args . get ( 0 ) ; if ( arg1 . equals ( "up" ) ) { if ( ! ( agent . isStepping ( ) ) ) { agent . setDir ( up ) ; if ( canStep ( agent , world , up ) ) { world . moveAgent ( agent , 0 , 1 , 0 ) ; agent . setOffsetY ( ( - 16 ) ) ; int [ ] pos = agent . getPos ( ) ; agent . setRenderOnPlaceholder ( true ) ; Placeholder h1 = new Placeholder ( agent , pos [ 0 ] , ( ( pos [ 1 ] ) - 1 ) , pos [ 2 ] ) ; world . addAgent ( h1 ) ; finishedStep = false ; agent . setStepping ( true ) ; } else { finishedStep = true ; return ; } } <START_BUG> System . out . println ( ( "Offset<seq2seq4repair_space>Y:<seq2seq4repair_space>" + ( agent . getOffsetY ( ) ) ) ) ; <END_BUG>

Fix:
agent . incrementYOffset ( ( ( ( agent . getSpeed ( ) ) * 16.0F ) // 32.0F ) ) ;
Buggy code:
public class Tokeniser { public String [ ] tokenise ( String userInput ) { <START_BUG> String [ ] stringArray = userInput . split ( "\\s" ) ; <END_BUG> return stringArray ; } }

Fix:
String [ ] stringArray = userInput . split ( "\\s+" ) ;
Buggy code:
public class XTest { public static void main ( String [ ] argv ) { } static void Usage ( String msg ) { } static void init ( String configFile ) { } static void sample ( ) { int i = - 1 ; <START_BUG> XCategory cat = ( ( XCategory ) ( XCategory . getInstance ( "some.cat" ) ) ) ; <END_BUG> Category root = Category . getRoot ( ) ; cat . trace ( ( "Message<seq2seq4repair_space>" + ( ++ i ) ) ) ; cat . debug ( ( "Message<seq2seq4repair_space>" + ( ++ i ) ) ) ; cat . warn ( ( "Message<seq2seq4repair_space>" + ( ++ i ) ) ) ; cat . error ( ( "Message<seq2seq4repair_space>" + ( ++ i ) ) ) ; cat . fatal ( ( "Message<seq2seq4repair_space>" + ( ++ i ) ) ) ; Exception e = new Exception ( "Just<seq2seq4repair_space>testing" ) ; cat . debug ( ( "Message<seq2seq4repair_space>" + ( ++ i ) ) , e ) ; } }

Fix:
XLogger cat = ( ( XLogger ) ( XLogger . getInstance ( "some.cat" ) ) ) ;
Buggy code:
public class FlintSubscriberExceptionHandler implements SubscriberExceptionHandler { private static FlintSubscriberExceptionHandler INSTANCE ; private FlintSubscriberExceptionHandler ( ) { } public static FlintSubscriberExceptionHandler getInstance ( ) { } public static void deinitialize ( ) { } @ Override public void handleException ( Throwable exception , SubscriberExceptionContext context ) { <START_BUG> CommonCore . logSevere ( ( ( ( "Failed<seq2seq4repair_space>to<seq2seq4repair_space>dispatch<seq2seq4repair_space>event<seq2seq4repair_space>" + ( context . getSubscriber ( ) ) ) + "<seq2seq4repair_space>to<seq2seq4repair_space>" ) + ( context . getSubscriberMethod ( ) ) ) ) ; <END_BUG> exception . printStackTrace ( ) ; } }

Fix:
CommonCore . logSevere ( ( ( ( "Failed<seq2seq4repair_space>to<seq2seq4repair_space>dispatch<seq2seq4repair_space>event<seq2seq4repair_space>" + ( context . getEvent ( ) . getClass ( ) ) ) + "<seq2seq4repair_space>to<seq2seq4repair_space>" ) + ( context . getSubscriberMethod ( ) ) ) ) ;
Buggy code:
public class RandomReplicationPolicy implements ReplicationPolicy { @ Override public Collection < Long > getSitesToReplicate ( Connection connection ) throws Exception { try ( Statement statement = connection . createStatement ( ) ) { ArrayList < Long > queryResult = new ArrayList < > ( ) ; <START_BUG> ResultSet resultSet = statement . executeQuery ( "SELECT<seq2seq4repair_space>storageSiteId<seq2seq4repair_space>FROM<seq2seq4repair_space>storage_site_table<seq2seq4repair_space>WHERE<seq2seq4repair_space>private=FALSE<seq2seq4repair_space>AND<seq2seq4repair_space>removing=FALSE" ) ; <END_BUG> while ( resultSet . next ( ) ) { queryResult . add ( resultSet . getLong ( 1 ) ) ; } Long [ ] queryResArr = queryResult . toArray ( new Long [ queryResult . size ( ) ] ) ; ArrayList < Long > result = new ArrayList < > ( ) ; result . add ( queryResArr [ new Random ( ) . nextInt ( queryResArr . length ) ] ) ; return result ; } } }

Fix:
ResultSet resultSet = statement . executeQuery ( "SELECT<seq2seq4repair_space>storageSiteId<seq2seq4repair_space>FROM<seq2seq4repair_space>storage_site_table<seq2seq4repair_space>WHERE<seq2seq4repair_space>private=FALSE<seq2seq4repair_space>AND<seq2seq4repair_space>removing=FALSE<seq2seq4repair_space>AND<seq2seq4repair_space>isCache=FALSE" ) ;
Buggy code:
public final class BatchTest extends BaseTest { private ArrayList filesets = new ArrayList ( ) ; private Project project ; public BatchTest ( Project project ) { } public static final String javaToClass ( String filename ) { } public final Iterator iterator ( ) { } public void addFileSet ( FileSet fs ) { } final void addTestsTo ( ArrayList v ) { } private String [ ] getFilenames ( ) { ArrayList v = new ArrayList ( ) ; final int size = this . filesets . size ( ) ; for ( int j = 0 ; j < size ; j ++ ) { FileSet fs = ( ( FileSet ) ( filesets . get ( j ) ) ) ; <START_BUG> DirectoryScanner ds = fs . getDirectoryScanner ( project ) ; <END_BUG> ds . scan ( ) ; String [ ] f = ds . getIncludedFiles ( ) ; for ( int k = 0 ; k < ( f . length ) ; k ++ ) { String pathname = f [ k ] ; if ( pathname . endsWith ( ".java" ) ) { v . add ( pathname . substring ( 0 , ( ( pathname . length ( ) ) - ( ".java" . length ( ) ) ) ) ) ; } else if ( pathname . endsWith ( ".class" ) ) { v . add ( pathname . substring ( 0 , ( ( pathname . length ( ) ) - ( ".class" . length ( ) ) ) ) ) ; } } } String [ ] files = new String [ v . size ( ) ] ; v . copyInto ( files ) ; return files ; } private JUnitTest [ ] createAllJUnitTest ( ) { } private JUnitTest createJUnitTest ( String classname ) { } }

Fix:
DirectoryScanner ds = fs . getDirectoryScanner ( ) ;
Buggy code:
public class Endpoint { private final Coordinate coordinate ; private final String name ; private final String host ; private final int port ; private final String protocol ; private final String endpointData ; @ JsonCreator public Endpoint ( @ JsonProperty ( "coordinate" ) Coordinate coordinate , @ JsonProperty ( "name" ) String name , @ JsonProperty ( "host" ) String host , @ JsonProperty ( "port" ) int port , @ JsonProperty ( "protocol" ) String protocol , @ JsonProperty ( "endpointData" ) String endpointData ) { } public Coordinate getCoordinate ( ) { } public String getName ( ) { } public String getHost ( ) { } public int getPort ( ) { } public String getProtocol ( ) { } public String getEndpointData ( ) { } public static String getEndpointKey ( Endpoint endpoint ) { <START_BUG> return ( endpoint . getCoordinate ( ) . asString ( ) ) + ( endpoint . getName ( ) ) ; <END_BUG> } public static Endpoint fromJson ( String json ) throws IOException { } public String toJson ( ) { } No newline ; at end ; of file ; }

Fix:
return ( ( endpoint . getCoordinate ( ) . asString ( ) ) + "@" ) + ( endpoint . getName ( ) ) ;
Buggy code:
public final class SystemMenuClose extends Action implements ISelfUpdatingAction { private IStackPresentationSite site ; public SystemMenuClose ( IStackPresentationSite site ) { } public void dispose ( ) { } public void run ( ) { IPresentablePart part = site . getSelectedPart ( ) ; if ( part != null ) { <START_BUG> site . close ( part ) ; <END_BUG> } } public void update ( ) { } public boolean shouldBeVisible ( ) { } }

Fix:
site . close ( new IPresentablePart [ ] { part } ) ;
Buggy code:
public class FileEditorMapping extends Object implements Cloneable , IFileEditorMapping { private String name = "*" ; private String extension ; private List editors = new ArrayList ( 1 ) ; private List deletedEditors = new ArrayList ( 1 ) ; public FileEditorMapping ( String extension ) { } public FileEditorMapping ( String name , String extension ) { } public void addEditor ( EditorDescriptor editor ) { } private void addToObjectActivityManager ( EditorDescriptor editor ) { } private IObjectActivityManager getObjectActivityManager ( ) { } public Object clone ( ) { } public boolean equals ( Object obj ) { } private boolean compareList ( List l1 , List l2 ) { } public IEditorDescriptor getDefaultEditor ( ) { } public IEditorDescriptor [ ] getEditors ( ) { } public IEditorDescriptor [ ] getDeletedEditors ( ) { } public String getExtension ( ) { } public ImageDescriptor getImageDescriptor ( ) { } public String getLabel ( ) { } public String getName ( ) { } public void removeEditor ( EditorDescriptor editor ) { } public void setDefaultEditor ( EditorDescriptor editor ) { } public void setEditorsList ( List newEditors ) { } public void setDeletedEditorsList ( List newDeletedEditors ) { } public void setExtension ( String extension ) { } public void setName ( String name ) { } private List filteredEditors ( ) { IObjectActivityManager objectManager = getObjectActivityManager ( ) ; if ( objectManager == null ) return editors ; ArrayList filtered = new ArrayList ( editors ) ; <START_BUG> filtered . retainAll ( objectManager . getActiveObjects ( ) ) ; <END_BUG> return filtered ; } }

Fix:
filtered . retainAll ( objectManager . getEnabledObjects ( ) ) ;
Buggy code:
public class FilenameUtils { private static final char EXTENSION_SEPARATOR = '.' ; private static final char UNIX_SEPARATOR = '//' ; private static final char WINDOWS_SEPARATOR = '\\' ; private static final char SYSTEM_SEPARATOR = File . separatorChar ; private static final char OTHER_SEPARATOR ; public FilenameUtils ( ) { } private static boolean isSeparator ( char ch ) { } public static String normalize ( String filename ) { } public static String concat ( String basePath , String fullFilenameToAdd ) { int prefix = FilenameUtils . getPrefixLength ( fullFilenameToAdd ) ; if ( prefix < 0 ) { return null ; } if ( prefix > 0 ) { return FilenameUtils . normalize ( fullFilenameToAdd ) ; } if ( basePath == null ) { return null ; } int len = basePath . length ( ) ; if ( len == 0 ) { return FilenameUtils . normalize ( fullFilenameToAdd ) ; } char ch = basePath . charAt ( ( len - 1 ) ) ; <START_BUG> if ( FilenameUtils . isSeparator ( basePath . charAt ( ( len - 1 ) ) ) ) { <END_BUG> return FilenameUtils . normalize ( ( basePath + fullFilenameToAdd ) ) ; } else { return FilenameUtils . normalize ( ( ( basePath + '//' ) + fullFilenameToAdd ) ) ; } } public static String separatorsToUnix ( String path ) { } public static String separatorsToWindows ( String path ) { } public static String separatorsToSystem ( String path ) { } public static int getPrefixLength ( String filename ) { } public static int indexOfLastSeparator ( String filename ) { } public static int indexOfExtension ( String filename ) { } public static String getPrefix ( String filename ) { } public static String getPath ( String filename ) { } public static String getFullPath ( String filename ) { } public static String getName ( String filename ) { } public static String getBaseName ( String filename ) { } public static String getExtension ( String filename ) { } public static String removeExtension ( String filename ) { } public static boolean equals ( String filename1 , String filename2 ) { } public static boolean equalsOnSystem ( String filename1 , String filename2 ) { } public static boolean equalsNormalized ( String filename1 , String filename2 ) { } public static boolean equalsNormalizedOnSystem ( String filename1 , String filename2 ) { } private static boolean equals ( String filename1 , String filename2 , boolean system , boolean normalized ) { } public static boolean isExtension ( String filename , String extension ) { } public static boolean isExtension ( String filename , String [ ] extensions ) { } public static boolean isExtension ( String filename , Collection extensions ) { } public static boolean wildcardMatch ( String filename , String wildcardMatcher ) { } public static boolean wildcardMatchOnSystem ( String filename , String wildcardMatcher ) { } private static boolean wildcardMatch ( String filename , String wildcardMatcher , boolean system ) { } static String [ ] splitOnTokens ( String text ) { } }

Fix:
if ( FilenameUtils . isSeparator ( ch ) ) {
Buggy code:
class ChainsawTabbedPane extends JTabbedPane { public ChainsawTabbedPane ( ) { } public ChainsawTabbedPane ( int tabPlacement ) { } boolean containsWelcomePanel ( ) { } public void addANewTab ( String name , JComponent component , Icon icon ) { int selectedIndex = getSelectedIndex ( ) ; super . insertTab ( name , icon , component , null , 0 ) ; if ( ( getTabCount ( ) ) > 1 ) { <START_BUG> setSelectedIndex ( ( selectedIndex + 1 ) ) ; <END_BUG> } super . fireStateChanged ( ) ; } public void setSelectedTab ( int index ) { } public void addANewTab ( String name , JComponent component , Icon icon , String tooltip ) { } public void remove ( Component component ) { } }

Fix:
setSelectedIndex ( Math . min ( ( selectedIndex + 1 ) , ( ( getTabCount ( ) ) - 1 ) ) ) ;
Buggy code:
public class TopologyForceCreationResource extends ServerResource { @ Get ( "json" ) public String retrieve ( ) throws FileNotFoundException , UnsupportedEncodingException { INetTopologyService pihr = ( ( INetTopologyService ) ( getContext ( ) . getAttributes ( ) . get ( INetTopologyService . class . getCanonicalName ( ) ) ) ) ; pihr . createTopology ( ) ; <START_BUG> return "{<seq2seq4repair_space>'msg'<seq2seq4repair_space>:<seq2seq4repair_space>'topology<seq2seq4repair_space>created!'<seq2seq4repair_space>}" ; <END_BUG> } No newline ; at end ; of file ; }

Fix:
return "{<seq2seq4repair_space>\"msg\"<seq2seq4repair_space>:<seq2seq4repair_space>\"topology<seq2seq4repair_space>created!\"<seq2seq4repair_space>}" ;
Buggy code:
public abstract class AbstractAjaxTimerBehavior extends AbstractDefaultAjaxBehavior { private final Duration updateInterval ; private boolean attachedBodyOnLoadModifier = false ; public AbstractAjaxTimerBehavior ( final Duration updateInterval ) { } protected void onBind ( ) { } protected void onRenderHeadContribution ( final Response response ) { super . onRenderHeadContribution ( response ) ; if ( ( this . attachedBodyOnLoadModifier ) == false ) { this . attachedBodyOnLoadModifier = true ; <START_BUG> ( ( wicket . markup . html . WebPage ) ( getComponent ( ) . getPage ( ) ) ) . getBodyContainer ( ) . addOnLoadModifier ( getJsTimeoutCall ( updateInterval ) ) ; <END_BUG> } } protected final String getJsTimeoutCall ( final Duration updateInterval ) { } protected final void respond ( final AjaxRequestTarget target ) { } protected abstract void onTimer ( final AjaxRequestTarget target ) { } }

Fix:
( ( wicket . markup . html . WebPage ) ( getComponent ( ) . getPage ( ) ) ) . getBodyContainer ( ) . addOnLoadModifier ( getJsTimeoutCall ( updateInterval ) , getComponent ( ) ) ;
Buggy code:
public class MyIdeasListFragment extends IdeaListFragment { public static MyIdeasListFragment newInstance ( ) { } @ Override protected void handleArguments ( Bundle arguments ) { } @ Override protected void getIdeasToDisplay ( IdeaAPI . GetIdeasListener ideasListener ) { if ( ! ( User . isUserLoggedIn ( ) ) ) { <START_BUG> LoginUtil . showLoginDialog ( getActivity ( ) , login_necessary_my_ideas ) ; <END_BUG> } IdeaAPI . getMyIdeas ( ideasListener ) ; } @ Override protected int getEmptyListText ( ) { } }

Fix:
LoginUtil . showLoginDialog ( getActivity ( ) , login_necessary_my_ideas , null ) ;
Buggy code:
public class ParserTest extends TestCase { private Expression parse ( final String expression ) { } public final void testSimple ( ) { } public final void testSimple2 ( ) { } public final void testIfExpression ( ) { } public void testIfExpression2 ( ) throws Exception { } public void testIfExpression3 ( ) throws Exception { } public final void testEscaped ( ) { } public final void testNot ( ) { } public final void testCast ( ) { } public final void testSwitch ( ) { } public final void testChainExpression ( ) { } public final void testPositionInfo ( ) { } public final void testPositionInfo2 ( ) { } public final void testPositionInfo3 ( ) { } public final void testTypeLiterals ( ) { <START_BUG> final Expression e = parse ( ( "{" + ( ( ( ( ( ( ( "<seq2seq4repair_space>Object,\n" + "<seq2seq4repair_space>String,\n" ) + "Collection,\n" ) + "<seq2seq4repair_space>Set,\n" ) + "<seq2seq4repair_space>List,\n" ) + "<seq2seq4repair_space>oaw::Type,\n" ) + "<seq2seq4repair_space>oaw::Feature,\n" ) + "<seq2seq4repair_space>oaw::Property\n}" ) ) ) ; <END_BUG> assertNotNull ( e ) ; } }

Fix:
final Expression e = parse ( ( "{" + ( ( ( ( ( ( ( "<seq2seq4repair_space>Object,\n" + "<seq2seq4repair_space>String,\n" ) + "Collection,\n" ) + "<seq2seq4repair_space>Set,\n" ) + "<seq2seq4repair_space>List,\n" ) + "<seq2seq4repair_space>xpand2::Type,\n" ) + "<seq2seq4repair_space>xpand2::Feature,\n" ) + "<seq2seq4repair_space>xpand2::Property\n}" ) ) ) ;
Buggy code:
public class JsonConverterTest { @ Test public void primitiveConversion ( ) throws ParseException { <START_BUG> JsonConverterTest . Primitives o = JsonConverter . objectFromJson ( new StringReader ( ( "{" + ( ( ( ( ( "\"boolean\":<seq2seq4repair_space>true,<seq2seq4repair_space>" + "\"int\":<seq2seq4repair_space>42,<seq2seq4repair_space>" ) + "\"double\":<seq2seq4repair_space>41.99,<seq2seq4repair_space>" ) + "\"string\":<seq2seq4repair_space>\"discworld\",<seq2seq4repair_space>" ) + "\"date\":\"2015-07-09T19:02:17+0000\"" ) + "}" ) ) ) , new JsonConverterTest . Primitives ( ) ) ; <END_BUG> assertEquals ( true , o . getBoolean ( ) ) ; assertEquals ( 42 , o . getInt ( ) ) ; assertEquals ( 41.99 , o . getDouble ( ) , 0.001 ) ; assertEquals ( "discworld" , o . getString ( ) ) ; assertEquals ( 1436468537000L , o . getDate ( ) . getTime ( ) ) ; } public static class Primitives implements Factory { @ Override public JsonConverterTest . Primitives create ( ) { } private boolean b ; public boolean getBoolean ( ) { } public void setBoolean ( boolean b ) { } private int i ; public int getInt ( ) { } public void setInt ( int i ) { } private long l ; public long getLong ( ) { } public void setLong ( long l ) { } private double d ; public double getDouble ( ) { } public void setDouble ( double d ) { } private String s ; public String getString ( ) { } public void setString ( String s ) { } private Date t ; public Date getDate ( ) { } public void setDate ( Date t ) { } } }

Fix:
JsonConverterTest . Primitives o = JsonConverter . objectFromJson ( new StringReader ( ( "{" + ( ( ( ( ( "\"boolean\":<seq2seq4repair_space>true,<seq2seq4repair_space>" + "\"int\":<seq2seq4repair_space>42,<seq2seq4repair_space>" ) + "\"double\":<seq2seq4repair_space>41.99,<seq2seq4repair_space>" ) + "\"string\":<seq2seq4repair_space>\"discworld\",<seq2seq4repair_space>" ) + "\"date\":\"2015-07-09T19:02:17.000Z\"" ) + "}" ) ) ) , new JsonConverterTest . Primitives ( ) ) ;
Buggy code:
public class WeldInjectionFactory implements InjectionFactory { private final ServiceName beanManagerServiceName ; private final ServiceTarget serviceTarget ; private final DeploymentUnit deploymentUnit ; private final ClassLoader classLoader ; public WeldInjectionFactory ( ServiceTarget serviceTarget , DeploymentUnit deploymentUnit , ClassLoader classLoader ) { } @ Override public ComponentInjector createInjector ( AbstractComponentConfiguration component ) { <START_BUG> final ServiceName serviceName = deploymentUnit . getServiceName ( ) . append ( "component" , component . getDescription ( ) . getComponentName ( ) , "weldinjector" ) ; <END_BUG> WeldComponentInjectionService service = new WeldComponentInjectionService ( serviceName , component . getComponentClass ( ) , classLoader ) ; serviceTarget . addService ( serviceName , service ) . addDependency ( beanManagerServiceName , BeanManagerImpl . class , service . getBeanManager ( ) ) . install ( ) ; return service ; } }

Fix:
final ServiceName serviceName = deploymentUnit . getServiceName ( ) . append ( "component" , component . getComponentName ( ) , "weldinjector" ) ;
Buggy code:
public class SweetSpotSimilarity extends DefaultSimilarity { private int ln_min = 1 ; private int ln_max = 1 ; private float ln_steep = 0.5F ; private float tf_base = 0.0F ; private float tf_min = 0.0F ; private float tf_hyper_min = 0.0F ; private float tf_hyper_max = 2.0F ; private double tf_hyper_base = 1.3 ; private float tf_hyper_xoffset = 10.0F ; public SweetSpotSimilarity ( ) { } public void setBaselineTfFactors ( float base , float min ) { } public void setHyperbolicTfFactors ( float min , float max , double base , float xoffset ) { } public void setLengthNormFactors ( int min , int max , float steepness , boolean discountOverlaps ) { } @ Override public float lengthNorm ( FieldInvertState state ) { } public float computeLengthNorm ( int numTerms ) { } @ Override <START_BUG> public float tf ( int freq ) { <END_BUG> return baselineTf ( freq ) ; } public float baselineTf ( float freq ) { } public float hyperbolicTf ( float freq ) { } }

Fix:
public float tf ( float freq ) {
Buggy code:
public class CaseStatement extends Statement { public Expression constantExpression ; public CaseLabel targetLabel ; public boolean isEnumConstant ; public CaseStatement ( Expression constantExpression , int sourceEnd , int sourceStart ) { } public FlowInfo analyseCode ( BlockScope currentScope , FlowContext flowContext , FlowInfo flowInfo ) { } public StringBuffer printStatement ( int tab , StringBuffer output ) { } public void generateCode ( BlockScope currentScope , CodeStream codeStream ) { } public void resolve ( BlockScope scope ) { } public Constant resolveCase ( BlockScope scope , TypeBinding switchExpressionType , SwitchStatement switchStatement ) { scope . enclosingCase = this ; if ( ( constantExpression ) == null ) { if ( ( switchStatement . defaultCase ) != null ) scope . problemReporter ( ) . duplicateDefaultCase ( this ) ; switchStatement . defaultCase = this ; return Constant . NotAConstant ; } switchStatement . cases [ ( ( switchStatement . caseCount ) ++ ) ] = this ; if ( ( ( switchExpressionType != null ) && ( switchExpressionType . isEnum ( ) ) ) && ( ( constantExpression ) instanceof SingleNameReference ) ) { ( ( SingleNameReference ) ( constantExpression ) ) . setActualReceiverType ( ( ( ReferenceBinding ) ( switchExpressionType ) ) ) ; } TypeBinding caseType = constantExpression . resolveType ( scope ) ; if ( ( caseType == null ) || ( switchExpressionType == null ) ) return Constant . NotAConstant ; if ( ( constantExpression . isConstantValueOfTypeAssignableToType ( caseType , switchExpressionType ) ) || ( caseType . isCompatibleWith ( switchExpressionType ) ) ) { if ( caseType . isEnum ( ) ) { this . isEnumConstant = true ; if ( ( ( ( this . constantExpression . bits ) & ( ASTNode . ParenthesizedMASK ) ) > > ( ASTNode . ParenthesizedSHIFT ) ) != 0 ) { scope . problemReporter ( ) . enumConstantsCannotBeSurroundedByParenthesis ( this . constantExpression ) ; } if ( ( ( constantExpression ) instanceof NameReference ) && ( ( ( constantExpression . bits ) & ( ASTNode . RestrictiveFlagMASK ) ) == ( Binding . FIELD ) ) ) { NameReference reference = ( ( NameReference ) ( constantExpression ) ) ; FieldBinding field = reference . fieldBinding ( ) ; if ( ( ( field . modifiers ) & ( ClassFileConstants . AccEnum ) ) == 0 ) { scope . problemReporter ( ) . enumSwitchCannotTargetField ( reference , field ) ; } else if ( reference instanceof QualifiedNameReference ) { scope . problemReporter ( ) . cannotUseQualifiedEnumConstantInCaseLabel ( reference , field ) ; } <START_BUG> return Constant . fromValue ( field . original ( ) . id ) ; <END_BUG> } } else { return constantExpression . constant ; } } else if ( scope . isBoxingCompatibleWith ( caseType , switchExpressionType ) ) { constantExpression . computeConversion ( scope , caseType , switchExpressionType ) ; return constantExpression . constant ; } scope . problemReporter ( ) . typeMismatchError ( caseType , switchExpressionType , constantExpression ) ; return Constant . NotAConstant ; } public void traverse ( ASTVisitor visitor , BlockScope blockScope ) { } }

Fix:
return IntConstant . fromValue ( field . original ( ) . id ) ;
Buggy code:
public class TableModelThreadedView extends TreeTableModelDecorator { private static final Logger LOG = Logger . getLogger ( "org.columba.mail.gui.table.model" ) ; private boolean enabled ; private HashMap hashtable ; private int idCount = 0 ; private Collator collator ; public TableModelThreadedView ( TreeTableModelInterface tableModel ) { } public boolean isEnabled ( ) { } public void setEnabled ( boolean b ) { } public static String [ ] parseReferences ( String references ) { } protected boolean add ( MessageNode node , MessageNode rootNode ) { } protected void thread ( MessageNode rootNode ) { } private String getMessageID ( MessageNode node ) { } private void createHashmap ( MessageNode rootNode ) { } protected void sort ( MessageNode node ) { } protected boolean containsRecentChildren ( MessageNode parent ) { for ( int i = 0 ; i < ( parent . getChildCount ( ) ) ; i ++ ) { MessageNode child = ( ( MessageNode ) ( parent . getChildAt ( i ) ) ) ; <START_BUG> if ( ( ( org . columba . mail . message . ColumbaHeader ) ( child . getHeader ( ) ) ) . getFlags ( ) . getRecent ( ) ) { <END_BUG> TableModelThreadedView . LOG . info ( "found<seq2seq4repair_space>recent<seq2seq4repair_space>message" ) ; return true ; } else { containsRecentChildren ( child ) ; } } return false ; } public void update ( ) { } class MessageHeaderComparator implements Comparator { protected int column ; protected boolean ascending ; public MessageHeaderComparator ( int sortCol , boolean sortAsc ) { } public int compare ( Object o1 , Object o2 ) { } public boolean equals ( Object obj ) { } } }

Fix:
if ( ( ( ( org . columba . mail . message . ColumbaHeader ) ( child . getHeader ( ) ) ) . getFlags ( ) . getSeen ( ) ) == false ) {
Buggy code:
public class Decl extends Tool { public static String findFile ( String query ) { } public static String findFile ( String cp , String query ) { } public Decl ( ) { } public String getName ( ) { } public String getCopy ( ) { } public void init ( ) { } public Node parse ( Reader in , File file ) throws IOException , ParseException { } public void process ( Node node ) { } public static void populateVTables ( Bubble root ) { } public static void formatConstructors ( ) { } public static void markNewMethods ( ) { } public static void start ( Bubble object ) { } public static String formatHConstruct ( String s ) { String begin = Mubble . getStringBetween ( s , "" , "(" ) ; String params = Mubble . getStringBetween ( s , "(" , ")" ) . trim ( ) ; String [ ] paramSplit = params . split ( "<seq2seq4repair_space>" ) ; String [ ] temp ; int emptyCount = 0 ; for ( int i = 0 ; i < ( paramSplit . length ) ; i ++ ) { if ( ( paramSplit [ i ] . length ( ) ) == 0 ) { emptyCount ++ ; } } temp = new String [ ( paramSplit . length ) - emptyCount ] ; int ti = 0 ; for ( int i = 0 ; i < ( paramSplit . length ) ; i ++ ) { if ( ! ( ( paramSplit [ i ] . length ( ) ) == 0 ) ) { temp [ ti ] = paramSplit [ i ] ; ti ++ ; } } paramSplit = temp ; for ( int i = 0 ; i < ( paramSplit . length ) ; i ++ ) { if ( ( paramSplit [ i ] . length ( ) ) != 0 ) { String word = paramSplit [ i ] ; if ( word . equals ( "int" ) ) paramSplit [ i ] = "int32_t" ; if ( word . equals ( "boolean" ) ) paramSplit [ i ] = "bool" ; if ( ( word . charAt ( ( ( word . length ( ) ) - 1 ) ) ) == ']' ) { paramSplit [ i ] = ( "__rt::Array<" + ( word . substring ( 0 , ( ( word . length ( ) ) - 2 ) ) ) ) + ">*" ; } } } String correctHeader = "" ; for ( int i = 0 ; i < ( ( paramSplit . length ) - 1 ) ; i += 2 ) { correctHeader += ( ( ( paramSplit [ i ] ) + "<seq2seq4repair_space>" ) + ( paramSplit [ ( i + 1 ) ] ) ) + ",<seq2seq4repair_space>" ; } if ( ( correctHeader . length ( ) ) == 0 ) <START_BUG> return "" ; <END_BUG> else return ( ( begin + "(" ) + ( correctHeader . substring ( 0 , ( ( correctHeader . length ( ) ) - 2 ) ) ) ) + ");" ; } static Decl d ; public static Impl Q ; static ArrayList < Bubble > bubbleList = new ArrayList < Bubble > ( ) ; static ArrayList < PNode > packageTree = new ArrayList < PNode > ( ) ; public static ArrayList < Mubble > mubbleList = new ArrayList < Mubble > ( ) ; public static void main ( String [ ] args ) { } public static PNode constructPackageTree ( String packageName ) { } public static String indentLevel ( int indent ) { } }

Fix:
return begin + "();" ;
Buggy code:
public final class LayoutEditorPane extends JPanel { private final Action copyAction ; private final Action cutAction ; private final JToolBar editorToolbar = new JToolBar ( ) ; private final JToolBar okCancelToolbar = new JToolBar ( ) ; private final JButton okButton = new JButton ( "Ok" ) ; private final JButton cancelButton = new JButton ( "Cancel" ) ; private final JEditorPane patternEditor = new JEditorPane ( "text//plain" , "" ) ; private final JEditorPane previewer = new JEditorPane ( ChainsawConstants . DETAIL_CONTENT_TYPE , "" ) ; private final JScrollPane patternEditorScroll = new JScrollPane ( JScrollPane . VERTICAL_SCROLLBAR_ALWAYS , JScrollPane . HORIZONTAL_SCROLLBAR_ALWAYS ) ; private final JScrollPane previewEditorScroll = new JScrollPane ( JScrollPane . VERTICAL_SCROLLBAR_ALWAYS , JScrollPane . HORIZONTAL_SCROLLBAR_ALWAYS ) ; private LoggingEvent event ; private EventDetailLayout layout = new EventDetailLayout ( ) ; public LayoutEditorPane ( ) { } private Action createCutAction ( ) { } private Action createCopyAction ( ) { } private void setupListeners ( ) { } private void updatePreview ( ) { } private void updateTextActions ( boolean enabled ) { } private void createEvent ( ) { } private void initComponents ( ) { } public void setConversionPattern ( String pattern ) { } public String getConversionPattern ( ) { } public void addOkActionListener ( ActionListener l ) { } public void addCancelActionListener ( ActionListener l ) { } public static void main ( String [ ] args ) { JDialog dialog = new JDialog ( ( ( Frame ) ( null ) ) , "Pattern<seq2seq4repair_space>Editor" ) ; dialog . getContentPane ( ) . add ( new LayoutEditorPane ( ) ) ; dialog . setResizable ( true ) ; <START_BUG> dialog . setDefaultCloseOperation ( JDialog . EXIT_ON_CLOSE ) ; <END_BUG> dialog . setSize ( new Dimension ( 640 , 480 ) ) ; dialog . setVisible ( true ) ; } }

Fix:
dialog . setDefaultCloseOperation ( JDialog . DISPOSE_ON_CLOSE ) ;
Buggy code:
public final class HandlerSubmission implements Comparable { private static final int HASH_FACTOR = 89 ; private static final int HASH_INITIAL = HandlerSubmission . class . getName ( ) . hashCode ( ) ; private final String activePartId ; private final Shell activeShell ; private final IWorkbenchPartSite activeWorkbenchPartSite ; private final String commandId ; private final IHandler handler ; private transient int hashCode ; private transient boolean hashCodeComputed ; private final Priority priority ; private transient String string ; public HandlerSubmission ( String activePartId , Shell activeShell , IWorkbenchPartSite activeWorkbenchPartSite , String commandId , IHandler handler , Priority priority ) { } public int compareTo ( Object object ) { } public String getActivePartId ( ) { } public Shell getActiveShell ( ) { } public IWorkbenchPartSite getActiveWorkbenchPartSite ( ) { } public String getCommandId ( ) { } public IHandler getHandler ( ) { } public Priority getPriority ( ) { } public int hashCode ( ) { } public String toString ( ) { if ( ( string ) == null ) { final StringBuffer stringBuffer = new StringBuffer ( ) ; stringBuffer . append ( "[activePartId=" ) ; stringBuffer . append ( activePartId ) ; <START_BUG> stringBuffer . append ( "activeShell=" ) ; <END_BUG> stringBuffer . append ( activeShell ) ; stringBuffer . append ( ",activeWorkbenchSite=" ) ; stringBuffer . append ( activeWorkbenchPartSite ) ; stringBuffer . append ( ",commandId=" ) ; stringBuffer . append ( commandId ) ; stringBuffer . append ( ",handler=" ) ; stringBuffer . append ( handler ) ; stringBuffer . append ( ",priority=" ) ; stringBuffer . append ( priority ) ; stringBuffer . append ( ']' ) ; string = stringBuffer . toString ( ) ; } return string ; } }

Fix:
stringBuffer . append ( ",activeShell=" ) ;
Buggy code:
public final class EEDefaultPermissionsProcessor implements DeploymentUnitProcessor { private static final Permissions DEFAULT_PERMISSIONS ; public void deploy ( final DeploymentPhaseContext phaseContext ) throws DeploymentUnitProcessingException { DeploymentUnit deploymentUnit = phaseContext . getDeploymentUnit ( ) ; final ModuleSpecification attachment = deploymentUnit . getAttachment ( MODULE_SPECIFICATION ) ; if ( attachment == null ) { return ; } final List < PermissionFactory > permissions = attachment . getPermissionFactories ( ) ; final Enumeration < Permission > e = EEDefaultPermissionsProcessor . DEFAULT_PERMISSIONS . elements ( ) ; while ( e . hasMoreElements ( ) ) { permissions . add ( new ImmediatePermissionFactory ( e . nextElement ( ) ) ) ; } ResourceRoot root = deploymentUnit . getAttachment ( DEPLOYMENT_ROOT ) ; try { File file = root . getRoot ( ) . getPhysicalFile ( ) ; if ( ( file != null ) && ( file . isDirectory ( ) ) ) { <START_BUG> FilePermission permission = new FilePermission ( ( ( ( file . getAbsolutePath ( ) ) + ( File . separatorChar ) ) + "-" ) , "read" ) ; <END_BUG> permissions . add ( new ImmediatePermissionFactory ( permission ) ) ; } } catch ( IOException ex ) { throw new DeploymentUnitProcessingException ( ex ) ; } } public void undeploy ( final DeploymentUnit context ) { } }

Fix:
FilePermission permission = new FilePermission ( ( ( file . getAbsolutePath ( ) ) + "//-" ) , "read" ) ;
Buggy code:
public interface JMeterProperty extends Serializable , Cloneable , Comparable < JMeterProperty > { public boolean isRunningVersion ( ) { } public String getName ( ) { } public void setName ( String name ) { } public void setRunningVersion ( boolean runningVersion ) { } public void recoverRunningVersion ( TestElement owner ) { } public void mergeIn ( JMeterProperty prop ) { } public int getIntValue ( ) { } public long getLongValue ( ) { } public double getDoubleValue ( ) { } public float getFloatValue ( ) { } public boolean getBooleanValue ( ) { } public String getStringValue ( ) { } public Object getObjectValue ( ) { } public void setObjectValue ( Object value ) { } <START_BUG> public Object clone ( ) ; <END_BUG> }

Fix:
public JMeterProperty clone ( ) ;