nus-yam/ex-repair huggingface dataset:
Buggy code:
abstract class AbstractPatchingTask < T extends ContentItem > implements PatchingTask { protected final T contentItem ; protected final PatchingTaskDescription description ; private boolean ignoreApply ; private boolean skipExecution ; private byte [ ] backupHash = IoUtils . NO_CONTENT ; AbstractPatchingTask ( PatchingTaskDescription description , Class < T > expected ) { } @ Override public T getContentItem ( ) { } abstract byte [ ] backup ( PatchingTaskContext context ) throws IOException { } abstract byte [ ] apply ( final PatchingTaskContext context , final PatchContentLoader loader ) throws IOException { } abstract ContentModification createRollbackEntry ( ContentModification original , byte [ ] targetHash , byte [ ] itemHash ) { } protected boolean failOnContentMismatch ( PatchingTaskContext context ) { } protected ContentModification getOriginalModification ( byte [ ] targetHash , byte [ ] itemHash ) { } protected void setIgnoreApply ( ) { } @ Override public boolean prepare ( final PatchingTaskContext context ) throws IOException { backupHash = backup ( context ) ; final byte [ ] contentHash = contentItem . getContentHash ( ) ; if ( Arrays . equals ( backupHash , contentHash ) ) { <START_BUG> skipExecution = ( ( contentItem . getContentType ( ) ) == ( ContentType . MISC ) ) && ( ( backupHash ) != ( IoUtils . NO_CONTENT ) ) ; <END_BUG> return true ; } final byte [ ] expected = description . getModification ( ) . getTargetHash ( ) ; if ( Arrays . equals ( backupHash , expected ) ) { return ! ( description . hasConflicts ( ) ) ; } return false ; } @ Override public void execute ( final PatchingTaskContext context ) throws IOException { } }

Fix:
skipExecution = ( contentItem . getContentType ( ) ) == ( ContentType . MISC ) ;
Buggy code:
public class Utils { public static SimpleDateFormat formatter = new SimpleDateFormat ( "yyyyMMdd" ) ; public static Record parseFile ( BufferedReader reader ) throws FileNotFoundException { } public static void createDirectory ( String directoryName ) { } private static void copyFileUsingFileChannels ( File source , File dest ) throws IOException { } public static Date parseDateString ( String date ) { } public static Date addYear ( Date date ) { } public static Date addMonth ( Date date ) { } public static String getMonthString ( Date date ) { } public static String getYearString ( Date date ) { } public static String dateToString ( Date date ) { } public static List < VectorPoint > readVectors ( File file , int startIndex , int endIndex ) { List < VectorPoint > vecs = new ArrayList < VectorPoint > ( ) ; BufferedReader br = null ; try { br = new BufferedReader ( new FileReader ( file ) ) ; String line ; int count = 0 ; int readCount = 0 ; while ( ( line = br . readLine ( ) ) != null ) { if ( count >= startIndex ) { readCount ++ ; String [ ] parts = line . trim ( ) . split ( "<seq2seq4repair_space>" ) ; if ( ( ( parts . length ) > 0 ) && ( ! ( ( ( parts . length ) == 1 ) && ( parts [ 0 ] . equals ( "" ) ) ) ) ) { int key = Integer . parseInt ( parts [ 0 ] ) ; double cap = Double . parseDouble ( parts [ 1 ] ) ; int vectorLength = ( parts . length ) - 2 ; double [ ] numbers = new double [ vectorLength ] ; for ( int i = 2 ; i < ( parts . length ) ; i ++ ) { <START_BUG> numbers [ ( i - 1 ) ] = Double . parseDouble ( parts [ i ] ) ; <END_BUG> } VectorPoint p = new VectorPoint ( key , numbers ) ; p . addCap ( cap ) ; vecs . add ( p ) ; } } count ++ ; if ( readCount > ( endIndex - startIndex ) ) { break ; } } } catch ( IOException e ) { e . printStackTrace ( ) ; } finally { if ( br != null ) { try { br . close ( ) ; } catch ( IOException ignore ) { } } } return vecs ; } public static List < Integer > readVectorKeys ( File file ) { } public static Point readPoint ( String line ) { } public static SectorRecord readSectorRecord ( String line ) { } }

Fix:
numbers [ ( i - 2 ) ] = Double . parseDouble ( parts [ i ] ) ;
Buggy code:
class RealmReadinessFilter extends Filter { private final DomainCallbackHandler domainCBH ; private final String redirectTo ; RealmReadinessFilter ( final DomainCallbackHandler domainCBH , final String redirectTo ) { } @ Override public void doFilter ( HttpExchange exchange , Chain chain ) throws IOException { if ( domainCBH . isReady ( ) ) { chain . doFilter ( exchange ) ; } else { Headers responseHeaders = exchange . getResponseHeaders ( ) ; <START_BUG> responseHeaders . add ( Constants . LOCATION , ( ( redirectTo ) + "//" ) ) ; <END_BUG> exchange . sendResponseHeaders ( Constants . TEMPORARY_REDIRECT , 0 ) ; exchange . close ( ) ; } } @ Override public String description ( ) { } }

Fix:
responseHeaders . add ( Constants . LOCATION , redirectTo ) ;
Buggy code:
public class OrganizationTest extends TestCase { public void testCopyConstructor ( ) { Organization entity1 = new Organization ( ) ; entity1 . setActive ( true ) ; entity1 . setCreatedDate ( new Date ( ) ) ; entity1 . setHomeURL ( "//Test" ) ; entity1 . setModelId ( "1" ) ; entity1 . setLogoId ( 1L ) ; entity1 . setMaxUsers ( 2000 ) ; entity1 . setModifiedDate ( new Date ( ) ) ; entity1 . setName ( "Test" ) ; Organization entity2 = new Organization ( entity1 ) ; assertEquals ( true , ( ( entity2 . isActive ( ) . booleanValue ( ) ) == ( entity1 . isActive ( ) . booleanValue ( ) ) ) ) ; assertEquals ( true , ( ( entity2 . getCreatedDate ( ) . getTime ( ) ) == ( entity1 . getCreatedDate ( ) . getTime ( ) ) ) ) ; assertEquals ( true , entity2 . getHomeURL ( ) . equals ( entity1 . getHomeURL ( ) ) ) ; <START_BUG> assertEquals ( true , ( ( entity2 . getModelId ( ) ) == null ) ) ; <END_BUG> assertEquals ( true , ( ( entity2 . getLogoId ( ) . intValue ( ) ) == ( entity1 . getLogoId ( ) . intValue ( ) ) ) ) ; assertEquals ( true , ( ( entity2 . getMaxUsers ( ) . intValue ( ) ) == ( entity1 . getMaxUsers ( ) . intValue ( ) ) ) ) ; assertEquals ( true , ( ( entity2 . getModifiedDate ( ) . getTime ( ) ) == ( entity1 . getModifiedDate ( ) . getTime ( ) ) ) ) ; assertEquals ( true , entity2 . getName ( ) . equals ( entity1 . getName ( ) ) ) ; } public void testPropertySet ( ) { } }

Fix:
assertEquals ( true , entity2 . getModelId ( ) . equals ( "1" ) ) ;
Buggy code:
public class MAudit extends AbstractMetamataTask { static final String AUDIT_PATTERN = "(?:file:)?(.+):(\\d+)\\s*:\\s+(.*)" ; protected File outFile = null ; protected Path searchPath = null ; protected boolean fix = false ; protected boolean list = false ; protected boolean unused = false ; public MAudit ( ) { } static final MAudit . Violation createViolation ( int line , String msg ) { } public void setFix ( boolean flag ) { } public void setList ( boolean flag ) { } public void setTofile ( File outFile ) { } public void setUnused ( boolean flag ) { } public Path createSearchpath ( ) { } protected ArrayList getOptions ( ) { } protected void checkOptions ( ) throws TaskException { super . checkOptions ( ) ; if ( ( unused ) && ( ( searchPath ) == null ) ) { throw new TaskException ( "'searchpath'<seq2seq4repair_space>element<seq2seq4repair_space>must<seq2seq4repair_space>be<seq2seq4repair_space>set<seq2seq4repair_space>when<seq2seq4repair_space>looking<seq2seq4repair_space>for<seq2seq4repair_space>'unused'<seq2seq4repair_space>declarations." ) ; } if ( ( ! ( unused ) ) && ( ( searchPath ) != null ) ) { <START_BUG> log ( "'searchpath'<seq2seq4repair_space>element<seq2seq4repair_space>ignored.<seq2seq4repair_space>'unused'<seq2seq4repair_space>attribute<seq2seq4repair_space>is<seq2seq4repair_space>disabled." , MSG_WARN ) ; <END_BUG> } } protected void cleanUp ( ) throws TaskException { } protected void setupStreamHandler ( final Execute exe ) throws TaskException { } static final class Violation { String error ; int line ; } }

Fix:
getLogger ( ) . warn ( "'searchpath'<seq2seq4repair_space>element<seq2seq4repair_space>ignored.<seq2seq4repair_space>'unused'<seq2seq4repair_space>attribute<seq2seq4repair_space>is<seq2seq4repair_space>disabled." ) ;
Buggy code:
public final class PreferenceStoreAdapter extends PropertyMapAdapter { private IPreferenceStore store ; private IPropertyChangeListener listener = new IPropertyChangeListener ( ) { public void propertyChange ( PropertyChangeEvent event ) { } } ; public PreferenceStoreAdapter ( IPreferenceStore toConvert ) { } protected void attachListener ( ) { } protected void detachListener ( ) { } public Set keySet ( ) { } public Object getValue ( String propertyId , Class propertyType ) { if ( propertyType . isAssignableFrom ( String . class ) ) { return store . getString ( propertyId ) ; } if ( propertyType == ( Boolean . class ) ) { <START_BUG> return new Boolean ( store . getBoolean ( propertyId ) ) ; <END_BUG> } if ( propertyType == ( Double . class ) ) { return new Double ( store . getDouble ( propertyId ) ) ; } if ( propertyType == ( Float . class ) ) { return new Float ( store . getFloat ( propertyId ) ) ; } if ( propertyType == ( Integer . class ) ) { return new Integer ( store . getInt ( propertyId ) ) ; } if ( propertyType == ( Long . class ) ) { return new Long ( store . getLong ( propertyId ) ) ; } return null ; } public boolean propertyExists ( String propertyId ) { } public void setValue ( String propertyId , Object newValue ) { } }

Fix:
return store . getBoolean ( propertyId ) ? Boolean . TRUE : Boolean . FALSE ;
Buggy code:
public class WelcomeLogic implements AuroraScreenLogic { private final WelcomeUI startScreenUI ; private WelcomeHandler startHandler ; private final AuroraCoreUI coreUI ; private AScrollingImage imgHexPane ; private AImage imgTopLogo ; private int topHeight ; private AImage imgTopLogoSmall ; private int topSmallImageHeight ; private int topSmallImageWidth ; private AThreadWorker animateTransision ; private int centerHeight ; private DashboardUI dashboardUI ; static final Logger logger = Logger . getLogger ( WelcomeLogic . class ) ; private int frameControlHeight ; private AFileManager fileIO ; public WelcomeLogic ( WelcomeUI aStartScreenUI ) { } @ Override public void setHandler ( AuroraScreenHandler handler ) { } private void loadTransitionUI ( ) { } public void transisionToDashboard ( ) { } private void showDashdoard ( ) { } public static boolean checkOnline ( String URL ) { } public void sendAnalytics ( ) { } public void incrementAuroraLaunch ( ) { } public void checkAuroraCoverDB ( APrompter promptDisplay ) { } public Boolean downloadAuroraDB ( ) { WelcomeLogic . logger . info ( "Downloading<seq2seq4repair_space>AuroraDB..." ) ; try { <START_BUG> fileIO . downloadFile ( new URL ( "http:////s3.amazonaws.com//AuroraStorage//AuroraDB.h2.db" ) , new File ( ( ( fileIO . getPath ( ) ) + "//AuroraDB.h2.db" ) ) ) ; <END_BUG> } catch ( IOException ex ) { java . util . logging . Logger . getLogger ( WelcomeUI . class . getName ( ) ) . log ( Level . SEVERE , null , ex ) ; WelcomeLogic . logger . info ( "Un-Sucessful<seq2seq4repair_space>Download!" ) ; return false ; } WelcomeLogic . logger . info ( "Successful<seq2seq4repair_space>Download" ) ; return true ; } public boolean checkUser ( ) { } public boolean checkMainDir ( ) { } public boolean checkSubDir ( ) { } public boolean checkDBFiles ( ) { } private void setSize ( ) { } public void setFileIO ( AFileManager fileIO ) { } }

Fix:
fileIO . downloadFile ( new URL ( "http:////s3.amazonaws.com//AuroraStorage//AuroraDB.h2.db" ) , new File ( ( ( ( fileIO . getPath ( ) ) + ( main . DATA_PATH ) ) + "//AuroraDB.h2.db" ) ) ) ;
Buggy code:
public class CommsCallback implements Runnable { private static final String CLASS_NAME = CommsCallback . class . getName ( ) ; private static final Logger log = LoggerFactory . getLogger ( MQTT_CLIENT_MSG_CAT , CommsCallback . CLASS_NAME ) ; private static final int INBOUND_QUEUE_SIZE = 10 ; private MqttCallback mqttCallback ; private ClientComms clientComms ; private Vector messageQueue ; private Vector completeQueue ; public boolean running = false ; private boolean quiescing = false ; private Object lifecycle = new Object ( ) ; private Thread callbackThread ; private Object workAvailable = new Object ( ) ; private Object spaceAvailable = new Object ( ) ; private ClientState clientState ; CommsCallback ( ClientComms clientComms ) { } public void setClientState ( ClientState clientState ) { } public void start ( String threadName ) { } public void stop ( ) { } public void setCallback ( MqttCallback mqttCallback ) { } public void run ( ) { } private void handleActionComplete ( MqttToken token ) throws MqttException { final String methodName = "handleActionComplete" ; synchronized ( token ) { CommsCallback . log . fine ( CommsCallback . CLASS_NAME , methodName , "705" , new Object [ ] { token . internalTok . getKey ( ) } ) ; token . internalTok . notifyComplete ( ) ; if ( ! ( token . internalTok . isNotified ( ) ) ) { if ( ( ( ( mqttCallback ) != null ) && ( token instanceof MqttDeliveryToken ) ) && ( token . isComplete ( ) ) ) { mqttCallback . deliveryComplete ( ( ( MqttDeliveryToken ) ( token ) ) ) ; } fireActionEvent ( token ) ; } if ( token . isComplete ( ) ) { <START_BUG> if ( ( token instanceof MqttDeliveryToken ) || ( ( token . getActionCallback ( ) ) instanceof ConnectActionListener ) ) { <END_BUG> token . internalTok . setNotified ( true ) ; } } if ( token . isComplete ( ) ) { clientState . notifyComplete ( token ) ; } } } public void connectionLost ( MqttException cause ) { } public void fireActionEvent ( MqttToken token ) { } public void messageArrived ( MqttPublish sendMessage ) { } public void quiesce ( ) { } public boolean isQuiesced ( ) { } private void handleMessage ( MqttPublish publishMessage ) throws Exception , MqttException { } public void asyncOperationComplete ( MqttToken token ) { } protected Thread getThread ( ) { } }

Fix:
if ( ( token instanceof MqttDeliveryToken ) || ( ( token . getActionCallback ( ) ) instanceof IMqttActionListener ) ) {
Buggy code:
public class DefaultEntitlementMigrationApi implements EntitlementMigrationApi { private final EntitlementDao dao ; private final MigrationPlanAligner migrationAligner ; private final SubscriptionFactory factory ; private final CatalogService catalogService ; private final Clock clock ; @ Inject public DefaultEntitlementMigrationApi ( MigrationPlanAligner migrationAligner , SubscriptionFactory factory , CatalogService catalogService , EntitlementDao dao , Clock clock ) { } @ Override public void migrate ( EntitlementAccountMigration toBeMigrated ) throws EntitlementMigrationApiException { AccountMigrationData accountMigrationData = createAccountMigrationData ( toBeMigrated ) ; <START_BUG> dao . migrate ( accountMigrationData ) ; <END_BUG> } @ Override public void undoMigration ( UUID accountId ) { } private AccountMigrationData createAccountMigrationData ( EntitlementAccountMigration toBeMigrated ) throws EntitlementMigrationApiException { } private SubscriptionMigrationData createBaseSubscriptionMigrationData ( UUID bundleId , ProductCategory productCategory , EntitlementSubscriptionMigrationCase [ ] input , DateTime now ) throws EntitlementMigrationApiException { } private List < EntitlementEvent > toEvents ( SubscriptionData subscriptionData , DateTime now , TimedMigration [ ] migrationEvents ) { } }

Fix:
dao . migrate ( toBeMigrated . getAccountKey ( ) , accountMigrationData ) ;
Buggy code:
public class SurvivalOfTheFittest { private static ArrayList < Animal > animals = new ArrayList < Animal > ( ) ; private static Life life = new Life ( ) ; public static void main ( String [ ] args ) { SurvivalOfTheFittest . addAnimals ( ) ; SurvivalOfTheFittest . checkForCheaters ( ) ; while ( ( SurvivalOfTheFittest . animals . size ( ) ) > 1 ) SurvivalOfTheFittest . life . survive ( SurvivalOfTheFittest . animals ) ; if ( ( SurvivalOfTheFittest . animals . size ( ) ) > 0 ) System . out . println ( ( "The<seq2seq4repair_space>sole<seq2seq4repair_space>survivor<seq2seq4repair_space>is...<seq2seq4repair_space>" + ( SurvivalOfTheFittest . animals . get ( 0 ) . toString ( ) . toUpperCase ( ) ) ) ) ; else <START_BUG> System . out . println ( "There<seq2seq4repair_space>is<seq2seq4repair_space>no<seq2seq4repair_space>survivor..." ) ; <END_BUG> } public static void checkForCheaters ( ) { } public static void addAnimals ( ) { } No newline ; at end ; of file ; }

Fix:
System . out . println ( "It<seq2seq4repair_space>is<seq2seq4repair_space>a<seq2seq4repair_space>cruel<seq2seq4repair_space>world..." ) ;
Buggy code:
class CompilationUnitResolver extends Compiler { public CompilationUnitResolver ( INameEnvironment environment , IErrorHandlingPolicy policy , Map settings , ICompilerRequestor requestor , IProblemFactory problemFactory ) { } public void accept ( ISourceType [ ] sourceTypes , PackageBinding packageBinding ) { } protected static IErrorHandlingPolicy getHandlingPolicy ( ) { } protected static INameEnvironment getNameEnvironment ( ICompilationUnit sourceUnit ) throws JavaModelException { } protected static INameEnvironment getNameEnvironment ( IJavaProject javaProject ) throws JavaModelException { } protected static ICompilerRequestor getRequestor ( ) { } public static CompilationUnitDeclaration resolve ( ICompilationUnit unitElement , IAbstractSyntaxTreeVisitor visitor ) throws JavaModelException { } public static CompilationUnitDeclaration parse ( char [ ] source ) { if ( source == null ) { throw new IllegalArgumentException ( ) ; } CompilerOptions compilerOptions = new CompilerOptions ( JavaCore . getOptions ( ) ) ; <START_BUG> Parser parser = new Parser ( new ProblemReporter ( DefaultErrorHandlingPolicies . proceedWithAllProblems ( ) , compilerOptions , new DefaultProblemFactory ( Locale . getDefault ( ) ) ) , false , compilerOptions . assertMode ) ; <END_BUG> org . eclipse . jdt . internal . compiler . env . ICompilationUnit sourceUnit = new CompilationUnit ( source , "" , compilerOptions . defaultEncoding ) ; CompilationUnitDeclaration compilationUnitDeclaration = parser . dietParse ( sourceUnit , new CompilationResult ( sourceUnit , 0 , 0 , compilerOptions . maxProblemsPerUnit ) ) ; if ( compilationUnitDeclaration . ignoreMethodBodies ) { compilationUnitDeclaration . ignoreFurtherInvestigation = true ; return compilationUnitDeclaration ; } parser . scanner . setSource ( source ) ; TypeDeclaration [ ] types = compilationUnitDeclaration . types ; if ( types != null ) { for ( int i = types . length ; ( -- i ) >= 0 ; ) types [ i ] . parseMethod ( parser , compilationUnitDeclaration ) ; } return compilationUnitDeclaration ; } protected static IProblemFactory getProblemFactory ( final char [ ] fileName , final IAbstractSyntaxTreeVisitor visitor ) { } public static CompilationUnitDeclaration resolve ( char [ ] source , String unitName , IJavaProject javaProject , IAbstractSyntaxTreeVisitor visitor ) throws JavaModelException { } }

Fix:
Parser parser = new Parser ( new ProblemReporter ( DefaultErrorHandlingPolicies . proceedWithAllProblems ( ) , compilerOptions , new DefaultProblemFactory ( Locale . getDefault ( ) ) ) , false , ( ( compilerOptions . sourceLevel ) >= ( JDK1_4 ) ) ) ;
Buggy code:
public class BodyInjectorHandler extends PipedHttpHandler { private static final String JSON_MEDIA_TYPE = "application//json" ; public BodyInjectorHandler ( PipedHttpHandler next ) { } @ Override public void handleRequest ( HttpServerExchange exchange , RequestContext context ) throws Exception { if ( ( ( ( context . getMethod ( ) ) == ( METHOD . GET ) ) || ( ( context . getMethod ( ) ) == ( METHOD . OPTIONS ) ) ) || ( ( context . getMethod ( ) ) == ( METHOD . DELETE ) ) ) { next . handleRequest ( exchange , context ) ; return ; } HeaderValues contentTypes = exchange . getRequestHeaders ( ) . get ( CONTENT_TYPE ) ; if ( ( ( contentTypes == null ) || ( contentTypes . isEmpty ( ) ) ) || ( contentTypes . stream ( ) . noneMatch ( ( ct ) -> ( ct . startsWith ( Representation . HAL_JSON_MEDIA_TYPE ) ) || ( ct . startsWith ( JSON_MEDIA_TYPE ) ) ) ) ) { <START_BUG> ResponseHelper . endExchangeWithMessage ( exchange , SC_UNSUPPORTED_MEDIA_TYPE , ( ( ( "Contet-Type<seq2seq4repair_space>must<seq2seq4repair_space>be<seq2seq4repair_space>either<seq2seq4repair_space>" + ( Representation . HAL_JSON_MEDIA_TYPE ) ) + "<seq2seq4repair_space>or<seq2seq4repair_space>" ) + ( BodyInjectorHandler . JSON_MEDIA_TYPE ) ) ) ; <END_BUG> return ; } String _content = ChannelReader . read ( exchange . getRequestChannel ( ) ) ; DBObject content ; try { content = ( ( DBObject ) ( JSON . parse ( _content ) ) ) ; } catch ( JSONParseException ex ) { ResponseHelper . endExchangeWithMessage ( exchange , SC_NOT_ACCEPTABLE , "invalid<seq2seq4repair_space>data" , ex ) ; return ; } HashSet < String > keysToRemove = new HashSet < > ( ) ; if ( content == null ) { context . setContent ( null ) ; } else { content . keySet ( ) . stream ( ) . filter ( ( key ) -> ( key . startsWith ( "_" ) ) && ( ! ( key . equals ( "_id" ) ) ) ) . forEach ( ( key ) -> { keysToRemove . add ( key ) ; } ) ; keysToRemove . stream ( ) . map ( ( keyToRemove ) -> { content . removeField ( keyToRemove ) ; return keyToRemove ; } ) . forEach ( ( keyToRemove ) -> { context . addWarning ( ( ( "the<seq2seq4repair_space>reserved<seq2seq4repair_space>field<seq2seq4repair_space>" + keyToRemove ) + "<seq2seq4repair_space>was<seq2seq4repair_space>filtered<seq2seq4repair_space>out<seq2seq4repair_space>from<seq2seq4repair_space>the<seq2seq4repair_space>request" ) ) ; } ) ; HALUtils . replaceStringsWithObjectIds ( content ) ; context . setContent ( content ) ; } next . handleRequest ( exchange , context ) ; } }

Fix:
ResponseHelper . endExchangeWithMessage ( exchange , SC_UNSUPPORTED_MEDIA_TYPE , ( ( ( "Content-Type<seq2seq4repair_space>must<seq2seq4repair_space>be<seq2seq4repair_space>either<seq2seq4repair_space>" + ( Representation . HAL_JSON_MEDIA_TYPE ) ) + "<seq2seq4repair_space>or<seq2seq4repair_space>" ) + ( BodyInjectorHandler . JSON_MEDIA_TYPE ) ) ) ;
Buggy code:
public class MockWebApplication extends WebApplication { private final MockServletContext context ; private Page lastRenderedPage ; private final MockHttpServletRequest servletRequest ; private final MockHttpServletResponse servletResponse ; private final MockHttpSession servletSession ; private WebRequest wicketRequest ; private WebResponse wicketResponse ; private WebSession wicketSession ; public MockWebApplication ( final String path ) { } public ApplicationSettings createApplicationSettings ( ) { return new ApplicationSettings ( this ) { <START_BUG> public IResourceFinder createResourceFinder ( ) { <END_BUG> return new wicket . util . file . WebApplicationPath ( context ) ; } } ; } public Page getLastRenderedPage ( ) { } public ServletContext getServletContext ( ) { } public MockHttpServletRequest getServletRequest ( ) { } public MockHttpServletResponse getServletResponse ( ) { } public MockHttpSession getServletSession ( ) { } public WebRequest getWicketRequest ( ) { } public WebResponse getWicketResponse ( ) { } public WebSession getWicketSession ( ) { } public void processRequestCycle ( ) throws ServletException { } public WebRequestCycle createRequestCycle ( ) { } public void setupRequestAndResponse ( ) throws IOException { } }

Fix:
public IResourceFinder newResourceFinder ( ) {
Buggy code:
public class DataSet { private ArrayList < UserData > userdatas ; private String xname ; private String yname ; public DataSet ( String xname , String yname ) { } public void addProcessData ( UserData data ) { } public ArrayList < UserData > getUserDatas ( ) { ArrayList < UserData > temp = new ArrayList ( ) ; for ( UserData userdata : userdatas ) { <START_BUG> temp . add ( userdata ) ; <END_BUG> } return temp ; } public UserData getUserData ( int index ) { } public int getUserDataSize ( ) { } public void setUserData ( int index , UserData userdata ) { } public String getXname ( ) { } public void setXname ( String xname ) { } public void setYname ( String yname ) { } public String getYname ( ) { } }

Fix:
temp . add ( userdata . clone ( ) ) ;
Buggy code:
public class TestArmenianAnalyzer extends BaseTokenStreamTestCase { public void testResourcesAvailable ( ) { } public void testBasics ( ) throws IOException { } public void testExclude ( ) throws IOException { } public void testRandomStrings ( ) throws Exception { <START_BUG> checkRandomData ( random ( ) , new ArmenianAnalyzer ( TEST_VERSION_CURRENT ) , ( 10000 * ( RANDOM_MULTIPLIER ) ) ) ; <END_BUG> } }

Fix:
checkRandomData ( random ( ) , new ArmenianAnalyzer ( TEST_VERSION_CURRENT ) , ( 1000 * ( RANDOM_MULTIPLIER ) ) ) ;
Buggy code:
public class SingletonComponent extends SessionBeanComponent implements LockableComponent { private volatile SingletonComponentInstance singletonComponentInstance ; private final boolean initOnStartup ; private final Map < String , LockType > beanLevelLockType ; private final Map < EJBBusinessMethod , LockType > methodLockTypes ; private final Map < EJBBusinessMethod , AccessTimeoutDetails > methodAccessTimeouts ; private final List < ServiceName > dependsOn ; private final DefaultAccessTimeoutService defaultAccessTimeoutProvider ; private final Object creationLock = new Object ( ) ; public SingletonComponent ( final SingletonComponentCreateService singletonComponentCreateService , final List < ServiceName > dependsOn ) { } @ Override protected BasicComponentInstance instantiateComponentInstance ( Interceptor preDestroyInterceptor , Map < Method , Interceptor > methodInterceptors , Map < Object , Object > context ) { } public SingletonComponentInstance getComponentInstance ( ) { } @ Override public void start ( ) { super . start ( ) ; if ( this . initOnStartup ) { <START_BUG> ROOT_LOGGER . debug ( ( ( this . getComponentName ( ) ) + "<seq2seq4repair_space>bean<seq2seq4repair_space>is<seq2seq4repair_space>a<seq2seq4repair_space>@Startup<seq2seq4repair_space>(a.k.a<seq2seq4repair_space>init-on-startup)<seq2seq4repair_space>bean,<seq2seq4repair_space>creating//getting<seq2seq4repair_space>the<seq2seq4repair_space>singleton<seq2seq4repair_space>instance" ) ) ; <END_BUG> this . getComponentInstance ( ) ; } } @ Override public void done ( ) { } @ Override public LockType getLockType ( Method method ) { } @ Override public AccessTimeoutDetails getAccessTimeout ( Method method ) { } @ Override public AccessTimeoutDetails getDefaultAccessTimeout ( ) { } private void destroySingletonInstance ( ) { } @ Override public AllowedMethodsInformation getAllowedMethodsInformation ( ) { } private static ServiceContainer currentServiceContainer ( ) { } }

Fix:
ROOT_LOGGER . debugf ( "%s<seq2seq4repair_space>bean<seq2seq4repair_space>is<seq2seq4repair_space>a<seq2seq4repair_space>@Startup<seq2seq4repair_space>(a.k.a<seq2seq4repair_space>init-on-startup)<seq2seq4repair_space>bean,<seq2seq4repair_space>creating//getting<seq2seq4repair_space>the<seq2seq4repair_space>singleton<seq2seq4repair_space>instance" , this . getComponentName ( ) ) ;
Buggy code:
public class TestTimSorter extends BaseSortTestCase { public TestTimSorter ( ) { } @ Override public Sorter newSorter ( Entry [ ] arr ) { <START_BUG> return new ArrayTimSorter < Entry > ( arr , ArrayUtil . < Entry > naturalComparator ( ) , random ( ) . nextInt ( arr . length ) ) ; <END_BUG> } }

Fix:
return new ArrayTimSorter < Entry > ( arr , ArrayUtil . < Entry > naturalComparator ( ) , _TestUtil . nextInt ( random ( ) , 0 , arr . length ) ) ;
Buggy code:
public class KernelDeploymentParsingProcessor implements DeploymentUnitProcessor { private final XMLMapper xmlMapper = Factory . create ( ) ; private final XMLInputFactory inputFactory = XMLInputFactory . newInstance ( ) ; public KernelDeploymentParsingProcessor ( ) { } @ Override public void deploy ( DeploymentPhaseContext phaseContext ) throws DeploymentUnitProcessingException { final VirtualFile deploymentRoot = phaseContext . getDeploymentUnit ( ) . getAttachment ( DEPLOYMENT_ROOT ) . getRoot ( ) ; if ( ( deploymentRoot == null ) || ( ( deploymentRoot . exists ( ) ) == false ) ) return ; <START_BUG> final String deploymentRootName = deploymentRoot . getName ( ) ; <END_BUG> VirtualFile beansXmlFile = null ; if ( deploymentRootName . endsWith ( ".jar" ) ) { beansXmlFile = deploymentRoot . getChild ( "META-INF//jboss-beans.xml" ) ; } else if ( deploymentRootName . endsWith ( "jboss-beans.xml" ) ) { beansXmlFile = deploymentRoot ; } if ( ( beansXmlFile == null ) || ( ( beansXmlFile . exists ( ) ) == false ) ) return ; InputStream xmlStream = null ; try { xmlStream = beansXmlFile . openStream ( ) ; final XMLStreamReader reader = inputFactory . createXMLStreamReader ( xmlStream ) ; final ParseResult < KernelDeploymentXmlDescriptor > result = new ParseResult < KernelDeploymentXmlDescriptor > ( ) ; xmlMapper . parseDocument ( result , reader ) ; final KernelDeploymentXmlDescriptor xmlDescriptor = result . getResult ( ) ; if ( xmlDescriptor != null ) phaseContext . getDeploymentUnit ( ) . putAttachment ( ATTACHMENT_KEY , xmlDescriptor ) ; else throw new DeploymentUnitProcessingException ( ( ( "Failed<seq2seq4repair_space>to<seq2seq4repair_space>parse<seq2seq4repair_space>MC<seq2seq4repair_space>beans<seq2seq4repair_space>xml<seq2seq4repair_space>[" + beansXmlFile ) + "]" ) ) ; } catch ( Exception e ) { throw new DeploymentUnitProcessingException ( ( ( "Failed<seq2seq4repair_space>to<seq2seq4repair_space>parse<seq2seq4repair_space>MC<seq2seq4repair_space>beans<seq2seq4repair_space>xml<seq2seq4repair_space>[" + beansXmlFile ) + "]" ) , e ) ; } finally { VFSUtils . safeClose ( xmlStream ) ; } } @ Override public void undeploy ( DeploymentUnit context ) { } }

Fix:
final String deploymentRootName = deploymentRoot . getLowerCaseName ( ) ;
Buggy code:
public class Waitlist extends ActionBarActivity { private int queuePosition ; private int mNotifyId ; private CharSequence msg ; Builder mBuilder ; NotificationManager mNotifyMgr ; @ Override protected void onCreate ( Bundle savedInstanceState ) { } private void getQueuePosition ( ) { } private void createNotif ( ) { <START_BUG> mBuilder = new NotificationCompat . Builder ( this ) . setSmallIcon ( ic_launcher ) . setContentTitle ( "Waitroom<seq2seq4repair_space>Position" ) . setContentText ( msg ) ; <END_BUG> mNotifyMgr . notify ( mNotifyId , mBuilder . build ( ) ) ; } private void refresh ( ) { } }

Fix:
mBuilder = new NotificationCompat . Builder ( this ) . setSmallIcon ( icon ) . setContentTitle ( "Waitroom<seq2seq4repair_space>Position" ) . setContentText ( msg ) ;
Buggy code:
public class HttpSender implements Sender { private static Logger LOG = LoggerFactory . getLogger ( HttpSender . class ) ; private MessagePack msgpack ; private Map < String , ExtendedPacker > chunks ; private int chunkLimit = ( 8 * 1024 ) * 1024 ; private LinkedBlockingQueue < QueueEvent > queue ; private int queueLimit = 50 ; private HttpSenderThread senderThread ; public HttpSender ( final String host , final int port , final String apiKey ) { } public boolean emit ( String tag , Map < String , Object > record ) { <START_BUG> return emit ( tag , System . currentTimeMillis ( ) , record ) ; <END_BUG> } public boolean emit ( String tag , long timestamp , Map < String , Object > record ) { } private boolean emit0 ( String tag , Map < String , Object > record ) { } public byte [ ] getBuffer ( ) { } public void close ( ) { } }

Fix:
return emit ( tag , ( ( System . currentTimeMillis ( ) ) // 1000 ) , record ) ;
Buggy code:
public abstract class IndexFactory { private static final Logger LOGGER = LoggerFactory . getLogger ( IndexFactory . class ) ; private static IndexFactory . IIndexFactory indexFactory ; private static void initFactory ( ) { Class cl ; try { cl = IndexFactory . class . getClassLoader ( ) . loadClass ( "org.lex.perf.impl.IndexFactoryImpl" ) ; IndexFactory . indexFactory = ( ( IndexFactory . IIndexFactory ) ( cl . newInstance ( ) ) ) ; <START_BUG> } catch ( Throwable e ) { <END_BUG> IndexFactory . LOGGER . error ( "Can't<seq2seq4repair_space>instantiate<seq2seq4repair_space>IndexFactory" , e ) ; IndexFactory . indexFactory = new NopIndexFactory ( ) ; } } public static IndexFactory . IIndexFactory getFactory ( ) { } public interface IIndexFactory { public void registerGauge ( IndexSeriesImpl impl , GaugeIndex gaugeIndex ) { } IndexSeriesImpl createIndexSeriesImpl ( String indexSeriesName ) { } } private static final Map < String , IndexSeries > INDEX_SERIES = new ConcurrentHashMap < String , IndexSeries > ( ) ; public static synchronized IndexSeries registerIndexSeries ( String indexSeriesName ) { } public static void registerGauge ( IndexSeries indexSeries , GaugeIndex gaugeIndex ) { } }

Fix:
} catch ( Exception e ) {
Buggy code:
public class TenantDetailsView extends ViewImpl implements TenantDetailsPresenter . MyView { public interface Binder extends UiBinder < Widget , TenantDetailsView > { } private final Widget widget ; private TenantDetailUiHandlers presenter ; @ UiField Element title ; @ UiField Element name ; @ UiField Element firstName ; @ UiField Element email ; @ UiField Element phoneNumber ; @ UiField Element mobileNumber ; @ UiField Element birthDay ; @ UiField Element addresse ; @ UiField Element maritalStatus ; @ UiField Element matrimonialRegime ; @ UiField Element bic ; @ UiField Element iban ; @ UiField Element nationalRegister ; @ UiField Element nationality ; @ UiField Element job ; @ UiField Element fax ; @ UiField Element placeOfBirth ; @ Inject public TenantDetailsView ( final TenantDetailsView . Binder binder ) { } @ Override public Widget asWidget ( ) { } @ UiHandler ( "btnDelete" ) public void onDeleteClicked ( ClickEvent e ) { } @ UiHandler ( "btnToList" ) public void onGoToListClicked ( ClickEvent e ) { } @ UiHandler ( "btnUpdate" ) public void onUpdateClicked ( ClickEvent e ) { } @ Override public void setTenant ( Tenant o ) { title . setInnerText ( UiHelper . translateEnum ( "Title_" , o . getTitle ( ) ) ) ; name . setInnerText ( o . getLastName ( ) ) ; firstName . setInnerText ( o . getFirstName ( ) ) ; iban . setInnerText ( o . getIban ( ) ) ; bic . setInnerText ( o . getBic ( ) ) ; email . setInnerText ( o . getEmail ( ) ) ; phoneNumber . setInnerText ( o . getPhoneNumber ( ) ) ; mobileNumber . setInnerText ( o . getMobilePhoneNumber ( ) ) ; fax . setInnerText ( o . getFax ( ) ) ; placeOfBirth . setInnerText ( o . getPlaceOfBirth ( ) ) ; nationality . setInnerText ( o . getNationality ( ) ) ; job . setInnerText ( o . getJobTitle ( ) ) ; nationalRegister . setInnerText ( o . getNationalRegisterNumber ( ) ) ; <START_BUG> birthDay . setInnerText ( ( ( o . getDateOfBirth ( ) ) != null ? o . getDateOfBirth ( ) . toGMTString ( ) : "" ) ) ; <END_BUG> addresse . setInnerText ( ( ( ( ( ( o . getStreet ( ) ) + "<seq2seq4repair_space>" ) + ( o . getCity ( ) ) ) + "<seq2seq4repair_space>" ) + ( o . getCountry ( ) ) ) ) ; maritalStatus . setInnerText ( ( ( o . getMaritalStatus ( ) ) != null ? UiHelper . translateEnum ( "MaritalStatus_" , o . getMaritalStatus ( ) ) : "" ) ) ; matrimonialRegime . setInnerText ( ( ( o . getMatrimonialRegime ( ) ) != null ? UiHelper . translateEnum ( "MatrimonialRegime_" , o . getMatrimonialRegime ( ) ) : "" ) ) ; } @ Override public void setTenantDetailUiHandler ( TenantDetailUiHandlers handler ) { } No newline ; at end ; of file ; }

Fix:
birthDay . setInnerText ( UiHelper . displayDate ( o . getDateOfBirth ( ) ) ) ;
Buggy code:
public class InterfacePanel extends JPanel implements ActionListener { private static final long serialVersionUID = 1L ; JButton [ ] buttons ; JRadioButton [ ] radioButtons1 ; JRadioButton [ ] radioButtons2 ; JComboBox player1Depth ; JComboBox player2Depth ; GUI gui ; public InterfacePanel ( GUI gui ) { } private void makeButtons ( ) { } public void actionPerformed ( ActionEvent e ) { if ( ( e . getSource ( ) ) == ( buttons [ 0 ] ) ) { HelpFunc . clearMatrix ( gui . currBoard ) ; gui . player1Time = 0 ; gui . player2Time = 0 ; gui . playersIDTurn = 1 ; } else if ( ( e . getSource ( ) ) == ( buttons [ 1 ] ) ) { System . exit ( 0 ) ; } else if ( ( e . getSource ( ) ) == ( radioButtons1 [ 0 ] ) ) { gui . player1mode = 0 ; } else if ( ( e . getSource ( ) ) == ( radioButtons1 [ 1 ] ) ) { gui . player1mode = 1 ; } else if ( ( e . getSource ( ) ) == ( radioButtons1 [ 2 ] ) ) { gui . player1mode = 2 ; } else if ( ( e . getSource ( ) ) == ( radioButtons1 [ 3 ] ) ) { gui . player1mode = 3 ; } else if ( ( e . getSource ( ) ) == ( radioButtons1 [ 4 ] ) ) { gui . player1mode = 4 ; } else if ( ( e . getSource ( ) ) == ( radioButtons2 [ 0 ] ) ) { gui . player2mode = 0 ; } else if ( ( e . getSource ( ) ) == ( radioButtons2 [ 1 ] ) ) { gui . player2mode = 1 ; } else if ( ( e . getSource ( ) ) == ( radioButtons2 [ 2 ] ) ) { gui . player2mode = 2 ; } else if ( ( e . getSource ( ) ) == ( radioButtons2 [ 3 ] ) ) { gui . player2mode = 3 ; } else if ( ( e . getSource ( ) ) == ( radioButtons2 [ 4 ] ) ) { <START_BUG> gui . player1mode = 4 ; <END_BUG> } else if ( ( e . getSource ( ) ) == ( player1Depth ) ) { JComboBox cb = ( ( JComboBox ) ( e . getSource ( ) ) ) ; String depth = ( ( String ) ( cb . getSelectedItem ( ) ) ) ; gui . player1Depth = Integer . parseInt ( depth ) ; } else if ( ( e . getSource ( ) ) == ( player2Depth ) ) { JComboBox cb = ( ( JComboBox ) ( e . getSource ( ) ) ) ; String depth = ( ( String ) ( cb . getSelectedItem ( ) ) ) ; gui . player2Depth = Integer . parseInt ( depth ) ; } } }

Fix:
gui . player2mode = 4 ;
Buggy code:
@ Path ( "jcomparser" ) public class REST { String pcm_url = "http:////172.16.64.113:1205//models//" ; String processserver = "http:////172.16.64.113:1205//" ; @ POST @ Path ( "launch//{scenarioID}" ) public int startComparser ( @ PathParam ( "scenarioID" ) <START_BUG> int scenarioID ) throws IOException , ParserConfigurationException , SAXException { <END_BUG> String scenario_url = ( ( pcm_url ) + scenarioID ) + ".pm" ; return de . uni_potsdam . hpi . bpt . bp2014 . jcomparser . JComparser . main ( scenario_url , processserver ) ; } @ GET @ Path ( "scenarios" ) @ Produces ( MediaType . APPLICATION_JSON ) public Response showScenarios ( ) { } @ GET @ Path ( "scenarios//{modelID}//image//" ) @ Produces ( "image//png" ) public Response showModelImage ( @ PathParam ( "modelID" ) String modelID ) { } class JsonHashMapIntegerString { private LinkedList < Integer > ids ; private HashMap < Integer , String > label ; public JsonHashMapIntegerString ( LinkedList < Integer > ids , HashMap < Integer , String > labels ) { } } class JsonIntegerList { private HashMap < String , String > ids ; public JsonIntegerList ( HashMap < String , String > ids ) { } } class JsonInteger { private Integer id ; public JsonInteger ( Integer id ) { } } }

Fix:
String scenarioID ) throws IOException , ParserConfigurationException , SAXException {
Buggy code:
public final class PortletWrappingControllerTests { private static final String RESULT_RENDER_PARAMETER_NAME = "result" ; private static final String PORTLET_WRAPPING_CONTROLLER_BEAN_NAME = "controller" ; private static final String RENDERED_RESPONSE_CONTENT = "myPortlet-view" ; private static final String PORTLET_NAME_ACTION_REQUEST_PARAMETER_NAME = "portletName" ; private PortletWrappingController controller ; @ Before public void setUp ( ) { } @ Test public void testActionRequest ( ) throws Exception { } @ Test public void testRenderRequest ( ) throws Exception { } @ Test ( expected = IllegalArgumentException . class ) public void testActionRequestWithNoParameters ( ) throws Exception { } @ Test ( expected = IllegalArgumentException . class ) public void testRejectsPortletClassThatDoesNotImplementPortletInterface ( ) throws Exception { } @ Test ( expected = IllegalArgumentException . class ) public void testRejectsIfPortletClassIsNotSupplied ( ) throws Exception { } @ Test ( expected = IllegalStateException . class ) public void testDestroyingTheControllerPropagatesDestroyToWrappedPortlet ( ) throws Exception { } @ Test public void testPortletName ( ) throws Exception { } @ Test public void testDelegationToMockPortletConfigIfSoConfigured ( ) throws Exception { } public static final class MyPortlet implements Portlet { private PortletConfig portletConfig ; public void init ( PortletConfig portletConfig ) { } public void processAction ( ActionRequest request , ActionResponse response ) throws PortletException { } public void render ( RenderRequest request , RenderResponse response ) throws IOException { } public PortletConfig getPortletConfig ( ) { } public void destroy ( ) { } } private static final class MyApplicationContext extends StaticPortletApplicationContext { public void refresh ( ) throws BeansException { MutablePropertyValues pvs = new MutablePropertyValues ( ) ; <START_BUG> pvs . addPropertyValue ( "portletClass" , PortletWrappingControllerTests . MyPortlet . class ) ; <END_BUG> registerSingleton ( PortletWrappingControllerTests . PORTLET_WRAPPING_CONTROLLER_BEAN_NAME , PortletWrappingController . class , pvs ) ; super . refresh ( ) ; } } }

Fix:
pvs . add ( "portletClass" , PortletWrappingControllerTests . MyPortlet . class ) ;
Buggy code:
public class ScopedComponentResolverTest extends WicketTestCase { public ScopedComponentResolverTest ( String name ) { } protected void setUp ( ) throws Exception { super . setUp ( ) ; <START_BUG> application . getApplication ( ) . getPageSettings ( ) . addComponentResolver ( new ScopedComponentResolver ( ) ) ; <END_BUG> } public void testRenderHomePage ( ) throws Exception { } }

Fix:
tester . getApplication ( ) . getPageSettings ( ) . addComponentResolver ( new ScopedComponentResolver ( ) ) ;
Buggy code:
public class BeanShellPostProcessor extends AbstractTestElement implements Serializable , PostProcessor , TestBean , TestListener , ThreadListener { private static final Logger log = LoggingManager . getLoggerForClass ( ) ; private static final long serialVersionUID = 3 ; private String script ; private transient BeanShellInterpreter bshInterpreter = null ; private static final String INIT_FILE = "beanshell.postprocessor.init" ; public BeanShellPostProcessor ( ) { } private void init ( ) { try { bshInterpreter = new BeanShellInterpreter ( JMeterUtils . getProperty ( BeanShellPostProcessor . INIT_FILE ) , BeanShellPostProcessor . log ) ; } catch ( ClassNotFoundException e ) { <START_BUG> BeanShellPostProcessor . log . error ( ( "Cannot<seq2seq4repair_space>find<seq2seq4repair_space>BeanShell:<seq2seq4repair_space>" + ( e . getLocalizedMessage ( ) ) ) ) ; <END_BUG> } } private Object readResolve ( ) { } public void process ( ) { } public Object clone ( ) { } public String getScript ( ) { } public void setScript ( String s ) { } public void threadStarted ( ) { } public void threadFinished ( ) { } public void testEnded ( ) { } public void testEnded ( String host ) { } public void testIterationStart ( LoopIterationEvent event ) { } public void testStarted ( ) { } public void testStarted ( String host ) { } }

Fix:
BeanShellPostProcessor . log . error ( ( "Cannot<seq2seq4repair_space>find<seq2seq4repair_space>BeanShell:<seq2seq4repair_space>" + ( e . toString ( ) ) ) ) ;
Buggy code:
public class Gravity { private final float GRAVITY_CONSTANT ; public Gravity ( float gravity ) { } public float getGravity ( ) { } public float getNewVelocity ( float yVelocity , float delta ) { <START_BUG> final float TERMINAL_VELOCITY = 5.0F ; <END_BUG> final float nextYVelocity = yVelocity + ( ( this . getGravity ( ) ) * delta ) ; if ( nextYVelocity > TERMINAL_VELOCITY ) { return TERMINAL_VELOCITY ; } else { return nextYVelocity ; } } public float getNewYPosition ( float yPosition , float yVelocity , float delta ) { } No newline ; at end ; of file ; }

Fix:
final float TERMINAL_VELOCITY = 300.0F ;
Buggy code:
public class StandardEvaluationContext implements EvaluationContext { private Object rootObject ; private StandardTypeUtilities typeUtils ; private final Map < String , Object > variables = new HashMap < String , Object > ( ) ; private final List < MethodResolver > methodResolvers = new ArrayList < MethodResolver > ( ) ; private final List < ConstructorResolver > constructorResolvers = new ArrayList < ConstructorResolver > ( ) ; private final List < PropertyAccessor > propertyResolvers = new ArrayList < PropertyAccessor > ( ) ; private final Map < String , Map < String , Object > > simpleReferencesMap = new HashMap < String , Map < String , Object > > ( ) ; public StandardEvaluationContext ( ) { } public StandardEvaluationContext ( Object rootContextObject ) { } public void setClassLoader ( ClassLoader loader ) { } public void registerImport ( String importPrefix ) { } public void setClasspath ( String classpath ) { StringTokenizer st = new StringTokenizer ( classpath , File . pathSeparator ) ; List < URL > urls = new ArrayList < URL > ( ) ; while ( st . hasMoreTokens ( ) ) { String element = st . nextToken ( ) ; try { <START_BUG> urls . add ( new File ( element ) . toURL ( ) ) ; <END_BUG> } catch ( MalformedURLException e ) { throw new RuntimeException ( ( "Invalid<seq2seq4repair_space>element<seq2seq4repair_space>in<seq2seq4repair_space>classpath<seq2seq4repair_space>" + element ) ) ; } } ClassLoader cl = new URLClassLoader ( urls . toArray ( new URL [ ] { } ) , Thread . currentThread ( ) . getContextClassLoader ( ) ) ; TypeLocator tLocator = typeUtils . getTypeLocator ( ) ; if ( tLocator instanceof StandardTypeLocator ) { ( ( StandardTypeLocator ) ( tLocator ) ) . setClassLoader ( cl ) ; } } public Object lookupVariable ( String name ) { } public TypeUtils getTypeUtils ( ) { } public Object getRootContextObject ( ) { } public Object lookupReference ( Object contextName , Object objectName ) { } public List < PropertyAccessor > getPropertyAccessors ( ) { } public void addPropertyAccessor ( PropertyAccessor accessor ) { } public void removePropertyAccessor ( PropertyAccessor accessor ) { } public void insertPropertyAccessor ( int position , PropertyAccessor accessor ) { } public List < MethodResolver > getMethodResolvers ( ) { } public List < ConstructorResolver > getConstructorResolvers ( ) { } public void setVariable ( String name , Object value ) { } public void registerFunction ( String name , Method m ) { } public void setRootObject ( Object o ) { } public void addMethodResolver ( MethodResolver resolver ) { } public void removeMethodResolver ( MethodResolver resolver ) { } public void insertMethodResolver ( int pos , MethodResolver resolver ) { } public void addConstructorResolver ( ConstructorResolver resolver ) { } public void addReference ( String contextName , String objectName , Object value ) { } public void addTypeConverter ( StandardIndividualTypeConverter newConverter ) { } }

Fix:
urls . add ( new File ( element ) . toURI ( ) . toURL ( ) ) ;
Buggy code:
public class SettingsActivity extends Activity implements OnClickListener { private Spinner spinner ; private static final String [ ] paths = new String [ ] { "Easy" , "Medium" , "Hard" , "YOLO" } ; Button ok ; Button cancel ; @ Override protected void onCreate ( Bundle savedInstanceState ) { } @ Override public boolean onCreateOptionsMenu ( Menu menu ) { } @ Override public boolean onOptionsItemSelected ( MenuItem item ) { } public void loadPrevious ( SQLiteDatabase db ) { String sqlString = "SELECT<seq2seq4repair_space>*<seq2seq4repair_space>FROM<seq2seq4repair_space>settings" ; Cursor mcursor = db . rawQuery ( sqlString , null ) ; mcursor . moveToFirst ( ) ; String un = mcursor . getString ( 1 ) ; int diff = mcursor . getInt ( 2 ) ; int music = mcursor . getInt ( 3 ) ; spinner . setSelection ( diff ) ; EditText username = ( ( EditText ) ( findViewById ( unEditText ) ) ) ; CheckBox checkmusic = ( ( CheckBox ) ( findViewById ( checkMusic ) ) ) ; username . setText ( un ) ; if ( music == 1 ) checkmusic . setChecked ( true ) ; else if ( music == 0 ) <START_BUG> checkmusic . setChecked ( true ) ; <END_BUG> else Log . e ( "MyActivity" , "oti<seq2seq4repair_space>nanai" ) ; Log . e ( "MyActivity" , ( "update<seq2seq4repair_space>name<seq2seq4repair_space>" + ( username . getText ( ) . toString ( ) ) ) ) ; } public void updateSettings ( ) { } public void onClick ( View v ) { } }

Fix:
checkmusic . setChecked ( false ) ;