nus-yam/ex-repair huggingface dataset:
Buggy code:
public class EvaluationSubmitterTest { private static final String EVALUATION_2_SUBMISSION_RECEIPT_MESSAGE = "Evaluation<seq2seq4repair_space>2<seq2seq4repair_space>Submission<seq2seq4repair_space>Receipt<seq2seq4repair_space>Message" ; private static final String EVALUATION_1_SUBMISSION_RECEIPT_MESSAGE = "Evaluation<seq2seq4repair_space>1<seq2seq4repair_space>Submission<seq2seq4repair_space>Receipt<seq2seq4repair_space>Message" ; EvaluationSubmitter submitter ; EvaluationSubmitterView mockView ; AuthenticationController mockAuthenticationController ; NodeModelCreator mockNodeModelCreator ; SynapseClientAsync mockSynapseClient ; ChallengeClientAsync mockChallengeClient ; GlobalApplicationState mockGlobalApplicationState ; JSONObjectAdapter jSONObjectAdapter = new JSONObjectAdapterImpl ( ) ; EvaluationSubmitter mockEvaluationSubmitter ; FileEntity entity ; EntityBundle bundle ; PaginatedResults < TermsOfUseAccessRequirement > requirements ; AccessRequirementsTransport art ; Submission returnSubmission ; Evaluation e1 ; TeamSubmissionEligibility testTeamSubmissionEligibility ; SubmissionEligibility teamEligibility ; List < MemberSubmissionEligibility > memberEligibilityList ; public static final Long ELIGIBILITY_STATE_HASH = 314159269L ; @ Before public void setup ( ) throws JSONObjectAdapterException , RestServiceException { } public void setupTeamSubmissionEligibility ( ) { } @ Test public void testSubmitToEvaluation ( ) throws JSONObjectAdapterException , RestServiceException { } @ Test public void testSubmitToEvaluationsWithSubmissionName ( ) throws JSONObjectAdapterException , RestServiceException { } @ Test public void testSubmitToEvaluationsFailure ( ) throws JSONObjectAdapterException , RestServiceException { } @ Test public void testShowAvailableEvaluations ( ) throws JSONObjectAdapterException , RestServiceException { } @ Test public void testShowAvailableEvaluationsNoResults ( ) throws JSONObjectAdapterException , RestServiceException { } @ Test public void testShowAvailableEvaluationsFailure1 ( ) throws JSONObjectAdapterException , RestServiceException { } private Challenge getTestChallenge ( ) { } @ Test public void testQueryForChallengeAndTeams ( ) throws RestServiceException { } private void configureSubmitter ( ) { } @ Test public void testQueryForChallengeAndEmptyTeams ( ) throws RestServiceException { } @ Test public void testContributorsListMemberEligibility ( ) throws RestServiceException { } @ Test public void testContributorsListInEligibleTeam ( ) throws RestServiceException { } @ Test public void testQueryForChallengeForbidden ( ) throws RestServiceException { } @ Test public void testOnTeamSelected ( ) { configureSubmitter ( ) ; <START_BUG> submitter . onTeamSelected ( "selected<seq2seq4repair_space>team<seq2seq4repair_space>name" ) ; <END_BUG> verify ( mockView ) . clearContributors ( ) ; verify ( mockView ) . setTeamInEligibleErrorVisible ( eq ( false ) , anyString ( ) ) ; } }

Fix:
submitter . onTeamSelected ( 0 ) ;
Buggy code:
public class EntityNyxSpider extends EntitySpider { public EntityNyxSpider ( World par1World ) { } @ Override public void addPotionEffect ( PotionEffect eff ) { } @ Override protected void applyEntityAttributes ( ) { } @ Override public boolean attackEntityAsMob ( Entity par1Entity ) { } protected void doUncloakSound ( ) { } @ Override protected void dropFewItems ( boolean par1 , int par2 ) { if ( ! par1 ) return ; if ( isInvisible ( ) ) dropItem ( experience_bottle , ( 1 + ( this . rand . nextInt ( ( 2 + par2 ) ) ) ) ) ; final int diff = IaSWorldHelper . getDifficulty ( this . worldObj ) ; <START_BUG> final int baite = ( this . rand . nextInt ( ( ( 8 - diff ) + par2 ) ) ) - par2 ; <END_BUG> if ( baite <= 0 ) dropItem ( toughGossamer , 1 ) ; if ( ( this . rand . nextInt ( 5 ) ) < ( 2 + diff ) ) dropItem ( resin , ( ( this . rand . nextInt ( 3 ) ) < ( par2 - 1 ) ? 2 : 1 ) ) ; } @ Override protected void dropRareDrop ( int par1 ) { } @ Override protected void fall ( float par1 ) { } @ Override protected Entity findPlayerToAttack ( ) { } @ Override protected void func_145780_a ( int p_145780_1_ , int p_145780_2_ , int p_145780_3_ , Block p_145780_4_ ) { } public float getAttackStrength ( Entity par1Entity ) { } @ Override public float getBlockPathWeight ( int i , int j , int k ) { } @ Override public float getBrightness ( float par1 ) { } @ SideOnly ( Side . CLIENT ) @ Override public int getBrightnessForRender ( float par1 ) { } @ Override public boolean getCanSpawnHere ( ) { } @ Override public EnumCreatureAttribute getCreatureAttribute ( ) { } @ Override protected String getDeathSound ( ) { } @ Override protected String getHurtSound ( ) { } @ Override protected String getLivingSound ( ) { } public double getScaledMaxHealth ( ) { } @ Override protected boolean isValidLightLevel ( ) { } @ Override public IEntityLivingData onSpawnWithEgg ( IEntityLivingData par1EntityLivingData ) { } @ Override public void setFire ( int time ) { } @ Override public void setRevengeTarget ( EntityLivingBase elb ) { } }

Fix:
final int baite = ( this . rand . nextInt ( ( ( Math . max ( 1 , ( 8 - diff ) ) ) + par2 ) ) ) - par2 ;
Buggy code:
public class JaxrsDependencyProcessor implements DeploymentUnitProcessor { public static ModuleIdentifier RESTEASY_ATOM = ModuleIdentifier . create ( "org.jboss.resteasy.resteasy-atom-provider" ) ; public static ModuleIdentifier RESTEASY_CDI = ModuleIdentifier . create ( "org.jboss.resteasy.resteasy-cdi" ) ; public static ModuleIdentifier RESTEASY_JAXRS = ModuleIdentifier . create ( "org.jboss.resteasy.resteasy-jaxrs" ) ; public static ModuleIdentifier RESTEASY_JAXB = ModuleIdentifier . create ( "org.jboss.resteasy.resteasy-jaxb-provider" ) ; public static ModuleIdentifier RESTEASY_JACKSON = ModuleIdentifier . create ( "org.jboss.resteasy.resteasy-jackson-provider" ) ; public static ModuleIdentifier RESTEASY_JETTISON = ModuleIdentifier . create ( "org.jboss.resteasy.resteasy-jettison-provider" ) ; public static ModuleIdentifier RESTEASY_JSAPI = ModuleIdentifier . create ( "org.jboss.resteasy.resteasy-jsapi" ) ; public static ModuleIdentifier RESTEASY_MULTIPART = ModuleIdentifier . create ( "org.jboss.resteasy.resteasy-multipart-provider" ) ; public static ModuleIdentifier RESTEASY_YAML = ModuleIdentifier . create ( "org.jboss.resteasy.resteasy-yaml-provider" ) ; public static ModuleIdentifier JAXB_API = ModuleIdentifier . create ( "javax.xml.bind.api" ) ; public static ModuleIdentifier JACKSON_CORE_ASL = ModuleIdentifier . create ( "org.codehaus.jackson.jackson-core-asl" ) ; public void deploy ( DeploymentPhaseContext phaseContext ) throws DeploymentUnitProcessingException { } private void addDepdenency ( ModuleSpecification moduleSpecification , ModuleLoader moduleLoader , ModuleIdentifier moduleIdentifier ) { <START_BUG> moduleSpecification . addSystemDependency ( new org . jboss . as . server . deployment . module . ModuleDependency ( moduleLoader , moduleIdentifier , false , false , true ) ) ; <END_BUG> } @ Override public void undeploy ( DeploymentUnit context ) { } }

Fix:
moduleSpecification . addSystemDependency ( new org . jboss . as . server . deployment . module . ModuleDependency ( moduleLoader , moduleIdentifier , false , false , true , false ) ) ;
Buggy code:
if ( uriType == ( CordovaResourceApi . URI_TYPE_UNKNOWN ) ) { JSONObject error = FileTransfer . createFileTransferError ( FileTransfer . INVALID_URL_ERR , source , target , null , 0 , null ) ; <START_BUG> Log . e ( FileTransfer . LOG_TAG , ( "Unsupported<seq2seq4repair_space>URI:<seq2seq4repair_space>" + targetUri ) ) ; <END_BUG>

Fix:
Log . e ( FileTransfer . LOG_TAG , ( "Unsupported<seq2seq4repair_space>URI:<seq2seq4repair_space>" + sourceUri ) ) ;
Buggy code:
public abstract class Migration { private static final Logger logger = LoggerFactory . getLogger ( Migration . class ) ; public static final String MIGRATIONS_CF = "Migrations" ; public static final String SCHEMA_CF = "Schema" ; public static final byte [ ] MIGRATIONS_KEY = "Migrations<seq2seq4repair_space>Key" . getBytes ( Charsets . UTF_8 ) ; public static final byte [ ] LAST_MIGRATION_KEY = "Last<seq2seq4repair_space>Migration" . getBytes ( Charsets . UTF_8 ) ; protected RowMutation rm ; protected final UUID newVersion ; protected UUID lastVersion ; protected transient final boolean clientMode ; Migration ( UUID newVersion , UUID lastVersion ) { } public void beforeApplyModels ( ) { } public final void apply ( ) throws IOException , ConfigurationException { } public final void announce ( ) { } public static UUID getLastMigrationId ( ) { } abstract void applyModels ( ) throws IOException { } public abstract ICompactSerializer getSerializer ( ) { } private byte [ ] getBytes ( ) throws IOException { } public UUID getVersion ( ) { } static RowMutation makeDefinitionMutation ( KSMetaData add , KSMetaData remove , UUID versionId ) throws IOException { List < KSMetaData > ksms = new ArrayList < KSMetaData > ( ) ; for ( String tableName : DatabaseDescriptor . getNonSystemTables ( ) ) { if ( ( ( remove != null ) && ( remove . name . equals ( tableName ) ) ) || ( ( add != null ) && ( add . name . equals ( tableName ) ) ) ) continue ; ksms . add ( DatabaseDescriptor . getTableDefinition ( tableName ) ) ; } if ( add != null ) ksms . add ( add ) ; RowMutation rm = new RowMutation ( Table . SYSTEM_TABLE , Migration . toUTF8Bytes ( versionId ) ) ; TimestampClock now = new TimestampClock ( System . currentTimeMillis ( ) ) ; for ( KSMetaData ksm : ksms ) rm . add ( new org . apache . cassandra . db . filter . QueryPath ( Migration . SCHEMA_CF , null , ksm . name . getBytes ( Charsets . UTF_8 ) ) , SerDeUtils . serialize ( ksm . deflate ( ) ) , now ) ; <START_BUG> rm . add ( new org . apache . cassandra . db . filter . QueryPath ( Migration . SCHEMA_CF , null , DefsTable . DEFINITION_SCHEMA_COLUMN_NAME ) , org . apache . cassandra . avro . KsDef . SCHEMA . . toString ( ) . getBytes ( Charsets . UTF_8 ) , now ) ; <END_BUG> return rm ; } static void cleanupDeadFiles ( boolean wait ) { } public static Migration deserialize ( InputStream in ) throws IOException { } public static Collection < IColumn > getLocalMigrations ( UUID start , UUID end ) { } public static byte [ ] toUTF8Bytes ( UUID version ) { } }

Fix:
rm . add ( new org . apache . cassandra . db . filter . QueryPath ( Migration . SCHEMA_CF , null , DefsTable . DEFINITION_SCHEMA_COLUMN_NAME ) , org . apache . cassandra . config . avro . KsDef . SCHEMA . . toString ( ) . getBytes ( Charsets . UTF_8 ) , now ) ;
Buggy code:
public class ThrowsPattern extends PatternNode { private TypePatternList required ; private TypePatternList forbidden ; public static final ThrowsPattern ANY = new ThrowsPattern ( TypePatternList . EMPTY , TypePatternList . EMPTY ) ; public ThrowsPattern ( TypePatternList required , TypePatternList forbidden ) { } public String toString ( ) { } public boolean equals ( Object other ) { } public int hashCode ( ) { } public ThrowsPattern resolveBindings ( IScope scope , Bindings bindings ) { } public boolean matches ( TypeX [ ] tys , World world ) { } private boolean matchesAny ( TypePattern typePattern , ResolvedTypeX [ ] types ) { for ( int i = ( types . length ) - 1 ; i >= 0 ; i -- ) { <START_BUG> if ( typePattern . matchesExactly ( types [ i ] ) ) <END_BUG> return true ; } return false ; } public static ThrowsPattern read ( DataInputStream s , ISourceContext context ) throws IOException { } public void write ( DataOutputStream s ) throws IOException { } }

Fix:
if ( typePattern . matchesStatically ( types [ i ] ) )
Buggy code:
public class MyServiceActivator implements ServiceActivator { private static final String CONTAINER_NAME = "server" ; private static final String CACHE_NAME = "default" ; public static final String PREFERRED_NODE = ClusteringTestConstants . NODE_2 ; @ Override public void activate ( ServiceActivatorContext context ) { } private static void install ( ServiceName name , int quorum , ServiceActivatorContext context ) { InjectedValue < ServerEnvironment > env = new InjectedValue ( ) ; MyService service = new MyService ( env ) ; ServiceController < ? > factoryService = context . getServiceRegistry ( ) . getRequiredService ( SERVICE_NAME . append ( MyServiceActivator . CONTAINER_NAME , MyServiceActivator . CACHE_NAME ) ) ; SingletonServiceBuilderFactory factory = ( ( SingletonServiceBuilderFactory ) ( factoryService . getValue ( ) ) ) ; <START_BUG> factory . createSingletonServiceBuilder ( name , service ) . electionPolicy ( new org . wildfly . clustering . singleton . election . PreferredSingletonElectionPolicy ( new org . wildfly . clustering . singleton . election . SimpleSingletonElectionPolicy ( ) , new org . wildfly . clustering . singleton . election . NamePreference ( ( ( MyServiceActivator . PREFERRED_NODE ) + "//ee" ) ) ) ) . requireQuorum ( quorum ) . build ( context . getServiceTarget ( ) ) . addDependency ( ServerEnvironmentService . SERVICE_NAME , ServerEnvironment . class , env ) . setInitialMode ( ServiceController . Mode . ACTIVE ) . install ( ) ; <END_BUG> } }

Fix:
factory . createSingletonServiceBuilder ( name , service ) . electionPolicy ( new org . wildfly . clustering . singleton . election . PreferredSingletonElectionPolicy ( new org . wildfly . clustering . singleton . election . SimpleSingletonElectionPolicy ( ) , new org . wildfly . clustering . singleton . election . NamePreference ( MyServiceActivator . PREFERRED_NODE ) ) ) . requireQuorum ( quorum ) . build ( context . getServiceTarget ( ) ) . addDependency ( ServerEnvironmentService . SERVICE_NAME , ServerEnvironment . class , env ) . setInitialMode ( ServiceController . Mode . ACTIVE ) . install ( ) ;
Buggy code:
public class UpdateCollector { private static final Logger LOG = LogManager . getLogger ( UpdateCollector . class ) ; private static final Map < Long , UpdateCollector . CollectedActions > queuesByThread = new ConcurrentHashMap < > ( ) ; private static UpdateCollector . Executor immediateExecutor = new UpdateCollector . ImmediateExecutor ( ) ; private static UpdateCollector . Executor defaultExecutor = new UpdateCollector . ImmediateExecutor ( ) ; public static void setGlobal ( UpdateCollector . Executor executor ) { <START_BUG> UpdateCollector . immediateExecutor = executor ; <END_BUG> } public static void collectUpdate ( Action1 < Persistence > update ) { } public static void collectUpdate ( Action1 < Persistence > update , int priority ) { } public static void onCollected ( Action0 action ) { } public static void postUpdateAtomic ( Action0 action ) { } private static UpdateCollector . CollectedActions getOrCreateRunningCollection ( ) { } private static UpdateCollector . CollectedActions getAndRemoveCollected ( ) { } public static void scheduleUpdates ( ) { } public static void executeNow ( ) { } interface Executor { abstract void enqueue ( UpdateCollector . CollectedActions actions ) { } default void execute ( UpdateCollector . CollectedActions actions ) { } } static class ImmediateExecutor implements UpdateCollector . Executor { public void enqueue ( UpdateCollector . CollectedActions actions ) { } } static class IntervalExecutor implements UpdateCollector . Executor { private final Queue < UpdateCollector . CollectedActions > queue = new LinkedList < > ( ) ; public IntervalExecutor ( long delay , TimeUnit unit ) { } @ Override public synchronized void enqueue ( UpdateCollector . CollectedActions actions ) { } public synchronized void executeAll ( ) { } } public static class CollectedActions { public final Queuing < Action1 < Persistence > > updates = new Queuing ( ) ; public final Queue < Action0 > onCollected = new LinkedList < > ( ) ; public final Queue < Action0 > postUpdateAtomic = new LinkedList < > ( ) ; public final PriorityQueue < Pair < Action0 , Integer > > p = new PriorityQueue ( new Comparator < Pair < Action0 , Integer > > ( ) { @ Override public int compare ( Pair < Action0 , Integer > arg0 , Pair < Action0 , Integer > arg1 ) { } } ) ; } }

Fix:
UpdateCollector . defaultExecutor = executor ;
Buggy code:
public class ChickScript implements EntityScript { PhysicsModule physicsModule ; int flapTime ; int timer = 0 ; @ Override public void onSpawn ( Level level , Entity self ) { } @ Override public void onUpdate ( Level level , Entity self ) { if ( ( -- ( timer ) ) < 0 ) { timer = ( ( int ) ( ( flapTime ) * ( Math . random ( ) ) ) ) ; <START_BUG> physicsModule . addVelocity ( new Vector2 ( ( ( - 3 ) + ( ( int ) ( ( Math . random ( ) ) * 6 ) ) ) , ( - ( 1 + ( ( int ) ( ( Math . random ( ) ) * 5 ) ) ) ) ) ) ; <END_BUG> self . sprite . nextFrame ( ) ; } Vector2 delta = physicsModule . onUpdate ( ) ; self . pos = self . pos . add ( delta ) ; boolean onGround = ( ScriptUtils . moveOut ( self , false , level . solids ) . mag ( ) ) != 0 ; if ( onGround ) physicsModule . setgDrag ( 0.95F ) ; else physicsModule . setgDrag ( 1.0F ) ; if ( ( Math . abs ( delta . x ) ) < 1 ) self . sprite . setCycle ( 0 ) ; else if ( ( delta . x ) < 0 ) self . sprite . setCycle ( 1 ) ; else self . sprite . setCycle ( 2 ) ; } @ Override public void onDeath ( Level level , Entity self , boolean isRoomExit ) { } }

Fix:
physicsModule . addVelocity ( new Vector2 ( ( ( - 2 ) + ( ( int ) ( ( Math . random ( ) ) * 6 ) ) ) , ( - ( 1 + ( ( int ) ( ( Math . random ( ) ) * 5 ) ) ) ) ) ) ;
Buggy code:
public class RangeAssert < T extends Comparable < T > > extends AbstractAssert < RangeAssert < T > , Range < T > > { @ VisibleForTesting Failures failures = Failures . instance ( ) ; protected RangeAssert ( final Range < T > actual ) { } public RangeAssert < T > contains ( @ SuppressWarnings ( "unchecked" ) final T ... values ) { } public RangeAssert < T > doesNotContain ( @ SuppressWarnings ( "unchecked" ) final T ... values ) { } public RangeAssert < T > hasClosedLowerBound ( ) throws AssertionError { } public RangeAssert < T > hasClosedUpperBound ( ) throws AssertionError { } public RangeAssert < T > hasLowerEndpointEqualTo ( final T value ) throws AssertionError { } public RangeAssert < T > hasOpenedLowerBound ( ) throws AssertionError { } public RangeAssert < T > hasOpenedUpperBound ( ) throws AssertionError { } public RangeAssert < T > hasUpperEndpointEqualTo ( final T value ) throws AssertionError { Objects . instance ( ) . assertNotNull ( info , actual ) ; if ( ! ( actual . upperEndpoint ( ) . equals ( value ) ) ) { <START_BUG> throw failures . failure ( info , shouldHaveEqualUpperEndpoint ( actual , value , actual . lowerEndpoint ( ) ) ) ; <END_BUG> } return this ; } public RangeAssert < T > isEmpty ( ) throws AssertionError { } public RangeAssert < T > isNotEmpty ( ) throws AssertionError { } }

Fix:
throw failures . failure ( info , shouldHaveEqualUpperEndpoint ( actual , value ) ) ;
Buggy code:
public class ClusterPassivationStoreAdd extends PassivationStoreAdd { public ClusterPassivationStoreAdd ( AttributeDefinition ... attributes ) { } @ Override protected BackingCacheEntryStoreSourceService < ? , ? , ? , ? > createService ( ModelNode model ) { String name = model . require ( NAME ) . asString ( ) ; ClusteredBackingCacheEntryStoreSourceService < ? , ? , ? > service = new ClusteredBackingCacheEntryStoreSourceService < java . io . Serializable , org . jboss . as . ejb3 . cache . Cacheable < java . io . Serializable > , java . io . Serializable > ( name ) ; ClusteredBackingCacheEntryStoreConfig config = service . getValue ( ) ; if ( model . hasDefined ( CACHE_CONTAINER ) ) { config . setCacheContainer ( model . get ( CACHE_CONTAINER ) . asString ( ) ) ; } if ( model . hasDefined ( BEAN_CACHE ) ) { config . setBeanCache ( model . get ( BEAN_CACHE ) . asString ( ) ) ; } if ( model . hasDefined ( CLIENT_MAPPINGS_CACHE ) ) { <START_BUG> config . setBeanCache ( model . get ( CLIENT_MAPPINGS_CACHE ) . asString ( ) ) ; <END_BUG> } if ( model . hasDefined ( PASSIVATE_EVENTS_ON_REPLICATE ) ) { config . setPassivateEventsOnReplicate ( model . get ( PASSIVATE_EVENTS_ON_REPLICATE ) . asBoolean ( ) ) ; } return service ; } }

Fix:
config . setClientMappingCache ( model . get ( CLIENT_MAPPINGS_CACHE ) . asString ( ) ) ;
Buggy code:
public class MassComponent extends MassObject { private static final Translator trans = Application . getTranslator ( ) ; private double mass = 0 ; public static enum MassComponentType { MASSCOMPONENT ( Application . getTranslator ( ) . get ( "MassComponent.MassComponent" ) ) , ALTIMETER ( Application . getTranslator ( ) . get ( "MassComponent.Altimeter" ) ) , FLIGHTCOMPUTER ( Application . getTranslator ( ) . get ( "MassComponent.FlightComputer" ) ) , DEPLOYMENTCHARGE ( Application . getTranslator ( ) . get ( "MassComponent.DeploymentCharge" ) ) , TRACKER ( Application . getTranslator ( ) . get ( "MassComponent.Tracker" ) ) , PAYLOAD ( Application . getTranslator ( ) . get ( "MassComponent.Payload" ) ) , RECOVERYHARDWARE ( Application . getTranslator ( ) . get ( "MassComponent.RecoveryHardware" ) ) , BATTERY ( Application . getTranslator ( ) . get ( "MassComponent.Battery" ) ) ; private String title ; MassComponentType ( String title ) { } @ Override public String toString ( ) { } } private MassComponent . MassComponentType massComponentType = MassComponent . MassComponentType . MASSCOMPONENT ; public MassComponent ( ) { } public MassComponent ( double length , double radius , double mass ) { } @ Override public double getComponentMass ( ) { } public void setComponentMass ( double mass ) { } public double getDensity ( ) { } public void setDensity ( double density ) { } private double getVolume ( ) { } @ Override public String getComponentName ( ) { } public final MassComponent . MassComponentType getMassComponentType ( ) { } public void setMassComponentType ( MassComponent . MassComponentType compType ) { mutex . verify ( ) ; if ( ( this . massComponentType ) == compType ) { return ; } checkState ( ) ; this . massComponentType = compType ; <START_BUG> fireComponentChangeEvent ( BOTH_CHANGE ) ; <END_BUG> } @ Override public boolean allowsChildren ( ) { } @ Override public boolean isCompatible ( Class < ? extends RocketComponent > type ) { } }

Fix:
fireComponentChangeEvent ( NONFUNCTIONAL_CHANGE ) ;
Buggy code:
public class EJB3SubsystemDefaultPoolWriteHandler extends AbstractWriteAttributeHandler < Void > { public static final EJB3SubsystemDefaultPoolWriteHandler MDB_POOL = new EJB3SubsystemDefaultPoolWriteHandler ( PoolConfigService . DEFAULT_MDB_POOL_CONFIG_SERVICE_NAME , EJB3SubsystemRootResourceDefinition . DEFAULT_MDB_INSTANCE_POOL ) ; public static final EJB3SubsystemDefaultPoolWriteHandler SLSB_POOL = new EJB3SubsystemDefaultPoolWriteHandler ( PoolConfigService . DEFAULT_SLSB_POOL_CONFIG_SERVICE_NAME , EJB3SubsystemRootResourceDefinition . DEFAULT_SLSB_INSTANCE_POOL ) ; private final ServiceName poolConfigServiceName ; private final AttributeDefinition poolAttribute ; public EJB3SubsystemDefaultPoolWriteHandler ( ServiceName poolConfigServiceName , AttributeDefinition poolAttribute ) { } @ Override protected void validateResolvedValue ( String attributeName , ModelNode value ) throws OperationFailedException { } @ Override protected boolean applyUpdateToRuntime ( OperationContext context , ModelNode operation , String attributeName , ModelNode resolvedValue , ModelNode currentValue , HandbackHolder < Void > handbackHolder ) throws OperationFailedException { } @ Override protected void revertUpdateToRuntime ( OperationContext context , ModelNode operation , String attributeName , ModelNode valueToRestore , ModelNode valueToRevert , Void handback ) throws OperationFailedException { } void updatePoolService ( final OperationContext context , final ModelNode model , List < ServiceController < ? > > newControllers ) throws OperationFailedException { <START_BUG> final ModelNode poolName = poolAttribute . validateResolvedOperation ( model ) ; <END_BUG> final ServiceRegistry serviceRegistry = context . getServiceRegistry ( true ) ; ServiceController existingDefaultPoolConfigService = serviceRegistry . getService ( poolConfigServiceName ) ; if ( existingDefaultPoolConfigService != null ) { context . removeService ( existingDefaultPoolConfigService ) ; } if ( poolName . isDefined ( ) ) { final ValueInjectionService < PoolConfig > newDefaultPoolConfigService = new ValueInjectionService < PoolConfig > ( ) ; ServiceController < ? > newController = context . getServiceTarget ( ) . addService ( poolConfigServiceName , newDefaultPoolConfigService ) . addDependency ( EJB_POOL_CONFIG_BASE_SERVICE_NAME . append ( poolName . asString ( ) ) , PoolConfig . class , newDefaultPoolConfigService . getInjector ( ) ) . install ( ) ; if ( newControllers != null ) { newControllers . add ( newController ) ; } } } }

Fix:
final ModelNode poolName = poolAttribute . resolveModelAttribute ( context , model ) ;
Buggy code:
public class Ear extends Jar { private static final FileUtils FILE_UTILS = FileUtils . getFileUtils ( ) ; private File deploymentDescriptor ; private boolean descriptorAdded ; private static final String XML_DESCRIPTOR_PATH = "META-INF//application.xml" ; public Ear ( ) { } public void setEarfile ( File earFile ) { } public void setAppxml ( File descr ) { } public void addArchives ( ZipFileSet fs ) { } protected void initZipOutputStream ( ZipOutputStream zOut ) throws IOException , BuildException { } protected void zipFile ( File file , ZipOutputStream zOut , String vPath , int mode ) throws IOException { String vPathLowerCase = vPath . toLowerCase ( Locale . ENGLISH ) ; if ( Ear . XML_DESCRIPTOR_PATH . equals ( vPathLowerCase ) ) { if ( ( ( ( deploymentDescriptor ) != null ) || ( ! ( Ear . FILE_UTILS . fileNameEquals ( deploymentDescriptor , file ) ) ) ) || ( descriptorAdded ) ) { <START_BUG> log ( ( ( ( ( ( ( ( "Warning:<seq2seq4repair_space>selected<seq2seq4repair_space>" + ( archiveType ) ) + "<seq2seq4repair_space>files<seq2seq4repair_space>include<seq2seq4repair_space>a<seq2seq4repair_space>" ) + ( Ear . XML_DESCRIPTOR_PATH ) ) + "<seq2seq4repair_space>which<seq2seq4repair_space>will" ) + "<seq2seq4repair_space>be<seq2seq4repair_space>ignored<seq2seq4repair_space>(please<seq2seq4repair_space>use<seq2seq4repair_space>appxml<seq2seq4repair_space>attribute<seq2seq4repair_space>to<seq2seq4repair_space>" ) + ( archiveType ) ) + "<seq2seq4repair_space>task)" ) , MSG_WARN ) ; <END_BUG> } else { super . zipFile ( file , zOut , vPath , mode ) ; descriptorAdded = true ; } } else { super . zipFile ( file , zOut , vPath , mode ) ; } } protected void cleanUp ( ) { } }

Fix:
logOnFirstPass ( ( ( ( ( ( ( ( "Warning:<seq2seq4repair_space>selected<seq2seq4repair_space>" + ( archiveType ) ) + "<seq2seq4repair_space>files<seq2seq4repair_space>include<seq2seq4repair_space>a<seq2seq4repair_space>" ) + ( Ear . XML_DESCRIPTOR_PATH ) ) + "<seq2seq4repair_space>which<seq2seq4repair_space>will" ) + "<seq2seq4repair_space>be<seq2seq4repair_space>ignored<seq2seq4repair_space>(please<seq2seq4repair_space>use<seq2seq4repair_space>appxml<seq2seq4repair_space>attribute<seq2seq4repair_space>to<seq2seq4repair_space>" ) + ( archiveType ) ) + "<seq2seq4repair_space>task)" ) , MSG_WARN ) ;
Buggy code:
public final class Formatter { private String loadedPrefix ; private final YAMLConfigurationFile formatsFile ; public Formatter ( YAMLConfigurationFile formatsFile ) { } public Formatter . FormatBuilder begin ( String path ) { } public boolean has ( String path ) { } public Formatter . FormatBuilder withValue ( String value ) { } public final class FormatBuilder { private final String formatString ; private final Map < String , String > modifiers = new HashMap < String , String > ( ) ; private boolean prefix = true ; private boolean coloredInputs = true ; private FormatBuilder ( String formatString ) { } public Formatter . FormatBuilder withModifier ( String key , Object value ) { } public Formatter . FormatBuilder withPrefix ( boolean p ) { } public Formatter . FormatBuilder withColoredInputs ( boolean c ) { } public String get ( ) { if ( ( formatString ) == null ) return "Not<seq2seq4repair_space>found!" ; String s = ChatColor . translateAlternateColorCodes ( '&' , formatString ) ; for ( Map . Entry < String , String > stringStringEntry : modifiers . entrySet ( ) ) { String value = stringStringEntry . getValue ( ) ; if ( coloredInputs ) value = ChatColor . translateAlternateColorCodes ( '&' , value ) ; <START_BUG> s = s . replaceAll ( String . format ( "\\{\\{%s\\}\\}" , stringStringEntry . getKey ( ) ) , value ) . replaceAll ( String . format ( "<%s>" , stringStringEntry . getKey ( ) ) , stringStringEntry . getValue ( ) ) ; <END_BUG> } if ( ( prefix ) && ( ( loadedPrefix ) != null ) ) return ( loadedPrefix ) + s ; return s ; } } }

Fix:
s = s . replaceAll ( String . format ( "\\{\\{%s\\}\\}" , stringStringEntry . getKey ( ) ) , value ) . replaceAll ( ( ( "<" + ( stringStringEntry . getKey ( ) ) ) + ">" ) , stringStringEntry . getValue ( ) ) ;
Buggy code:
public class JSLPDiscoveryContainer extends AbstractDiscoveryContainerAdapter implements IDiscoveryService { public static final String NAME = "ecf.discovery.jslp" ; public static long REDISCOVER = Long . parseLong ( System . getProperty ( "net.slp.rediscover" , new Long ( ( 60L * 1000L ) ) . toString ( ) ) ) ; private volatile JSLPDiscoveryJob discoveryJob ; private ID targetID ; public JSLPDiscoveryContainer ( ) throws IDCreateException { } public void connect ( ID aTargetID , IConnectContext connectContext ) throws ContainerConnectException { <START_BUG> if ( ( getConfig ( ) ) == null ) { <END_BUG> throw new ContainerConnectException ( Messages . JSLPDiscoveryContainer_0 ) ; } targetID = ( aTargetID == null ) ? getConfig ( ) . getID ( ) : aTargetID ; fireContainerEvent ( new ContainerConnectingEvent ( this . getID ( ) , aTargetID , connectContext ) ) ; fireContainerEvent ( new ContainerConnectedEvent ( this . getID ( ) , aTargetID ) ) ; } public void disconnect ( ) { } public void fireServiceDiscovered ( IServiceInfo iinfo ) { } public void fireServiceTypeDiscovered ( IServiceTypeID serviceTypeID ) { } public void fireServiceUndiscovered ( IServiceInfo iinfo ) { } public ID getConnectedID ( ) { } public IServiceInfo getServiceInfo ( IServiceID service ) { } public IServiceTypeID [ ] getServiceTypes ( ) { } public IServiceInfo [ ] getServices ( ) { } public IServiceInfo [ ] getServices ( IServiceTypeID type ) { } public void registerService ( IServiceInfo aServiceInfo ) throws ECFException { } public void unregisterService ( IServiceInfo aServiceInfo ) throws ECFException { } private IServiceInfo [ ] convertToIServiceInfo ( Map serviceURLs ) { } private IServiceInfo [ ] convertToIServiceInfo ( Map serviceURLs , String [ ] scopes ) { } public void addServiceListener ( IServiceListener listener ) { } public void addServiceListener ( IServiceTypeID type , IServiceListener listener ) { } public void addServiceTypeListener ( IServiceTypeListener listener ) { } private synchronized void instantiateDiscoveryJob ( ) { } }

Fix:
if ( ( ( targetID ) != null ) || ( ( getConfig ( ) ) == null ) ) {
Buggy code:
public class MemeDatasource { private Context mContext ; private MemeSQLiteHelper mMemeSqlLiteHelper ; public MemeDatasource ( Context context ) { } private SQLiteDatabase open ( ) { } private void close ( SQLiteDatabase database ) { } public ArrayList < Meme > read ( ) { } public ArrayList < Meme > readMemes ( ) { } public void addMemeAnnotations ( ArrayList < Meme > memes ) { SQLiteDatabase database = open ( ) ; for ( Meme meme : memes ) { ArrayList < MemeAnnotation > annotations = new ArrayList < MemeAnnotation > ( ) ; <START_BUG> Cursor cursor = database . rawQuery ( ( ( ( "SELECT<seq2seq4repair_space>*<seq2seq4repair_space>FROM<seq2seq4repair_space>" + ( MemeSQLiteHelper . ANNOTATIONS_TABLE ) ) + "<seq2seq4repair_space>WHERE<seq2seq4repair_space>MEME<seq2seq4repair_space>ID<seq2seq4repair_space>=<seq2seq4repair_space>" ) + ( meme . getId ( ) ) ) , null ) ; <END_BUG> if ( cursor . moveToFirst ( ) ) { do { MemeAnnotation annotation = new MemeAnnotation ( getIntFromColumnName ( cursor , _ID ) , getStringFromColumnName ( cursor , COLUMN_ANNOTATION_COLOR ) , getStringFromColumnName ( cursor , COLUMN_ANNOTATION_TITLE ) , getIntFromColumnName ( cursor , COLUMN_ANNOTATION_X ) , getIntFromColumnName ( cursor , COLUMN_ANNOTATION_Y ) ) ; annotations . add ( annotation ) ; } while ( cursor . moveToNext ( ) ) ; } meme . setAnnotations ( annotations ) ; cursor . close ( ) ; } database . close ( ) ; } private int getIntFromColumnName ( Cursor cursor , String columnName ) { } private String getStringFromColumnName ( Cursor cursor , String columnName ) { } public void create ( Meme meme ) { } }

Fix:
Cursor cursor = database . rawQuery ( ( ( ( "SELECT<seq2seq4repair_space>*<seq2seq4repair_space>FROM<seq2seq4repair_space>" + ( MemeSQLiteHelper . ANNOTATIONS_TABLE ) ) + "<seq2seq4repair_space>WHERE<seq2seq4repair_space>MEME_ID<seq2seq4repair_space>=<seq2seq4repair_space>" ) + ( meme . getId ( ) ) ) , null ) ;
Buggy code:
public class GUI_Ausgabe extends JFrame { private static final long serialVersionUID = 1L ; private JPanel contentPane ; static JTable table1 ; static JLabel lblPreis ; static JCheckBox chckbxSpeichern ; static JLabel lblEndsumme ; public static void FensterErstellen ( ) { } public GUI_Ausgabe ( ) { } public void auflisten ( ) { } public void dokumentspeichern ( ) { File rechnung = new File ( ( ( FileSystemView . getFileSystemView ( ) . getHomeDirectory ( ) . getAbsolutePath ( ) ) + "\\rechnung.txt" ) ) ; if ( ! ( rechnung . exists ( ) ) ) { try { rechnung . createNewFile ( ) ; } catch ( IOException e ) { e . printStackTrace ( ) ; } } try { FileWriter fw = new FileWriter ( rechnung ) ; fw . write ( "Name\t\tStückzahl\t\tPreis" ) ; fw . write ( System . lineSeparator ( ) ) ; fw . write ( "---------------------------------------------------------------" ) ; fw . write ( System . lineSeparator ( ) ) ; for ( int i = 0 ; i < ( GUI_Ausgabe . table1 . getRowCount ( ) ) ; i ++ ) { <START_BUG> fw . write ( ( ( String ) ( ( ( ( ( GUI_Ausgabe . table1 . getValueAt ( i , 0 ) ) + "\t\t" ) + ( GUI_Ausgabe . table1 . getValueAt ( i , 1 ) ) ) + "\t\t\t" ) + ( GUI_Ausgabe . table1 . getValueAt ( i , 2 ) ) ) ) ) ; <END_BUG> fw . write ( System . lineSeparator ( ) ) ; } fw . write ( "---------------------------------------------------------------" ) ; fw . write ( System . lineSeparator ( ) ) ; fw . write ( ( ( ( GUI_Ausgabe . lblPreis . getText ( ) ) + "\t\t\t" ) + ( GUI_Ausgabe . lblEndsumme . getText ( ) ) ) ) ; fw . close ( ) ; } catch ( IOException e ) { e . printStackTrace ( ) ; } } }

Fix:
fw . write ( ( ( String ) ( ( ( ( ( GUI_Ausgabe . table1 . getValueAt ( i , 0 ) ) + "\t\r" ) + ( GUI_Ausgabe . table1 . getValueAt ( i , 1 ) ) ) + "\t\t" ) + ( GUI_Ausgabe . table1 . getValueAt ( i , 2 ) ) ) ) ) ;
Buggy code:
public class FitbitApiAuthExampleServlet extends HttpServlet { public static final String OAUTH_TOKEN = "oauth_token" ; public static final String OAUTH_VERIFIER = "oauth_verifier" ; private FitbitAPIEntityCache entityCache = new FitbitApiEntityCacheMapImpl ( ) ; private FitbitApiCredentialsCache credentialsCache = new FitbitApiCredentialsCacheMapImpl ( ) ; private FitbitApiSubscriptionStorage subscriptionStore = new FitbitApiSubscriptionStorageInMemoryImpl ( ) ; private String apiBaseUrl ; private String fitbitSiteBaseUrl ; private String exampleBaseUrl ; private String clientConsumerKey ; private String clientSecret ; public void init ( ServletConfig config ) throws ServletException { super . init ( config ) ; try { Properties properties = new Properties ( ) ; <START_BUG> properties . load ( getClass ( ) . getClassLoader ( ) . getResourceAsStream ( "config.properties" ) ) ; <END_BUG> apiBaseUrl = properties . getProperty ( "apiBaseUrl" ) ; fitbitSiteBaseUrl = properties . getProperty ( "fitbitSiteBaseUrl" ) ; exampleBaseUrl = properties . getProperty ( "exampleBaseUrl" ) . replace ( "//app" , "" ) ; clientConsumerKey = properties . getProperty ( "clientConsumerKey" ) ; clientSecret = properties . getProperty ( "clientSecret" ) ; } catch ( IOException e ) { throw new ServletException ( "Exception<seq2seq4repair_space>during<seq2seq4repair_space>loading<seq2seq4repair_space>properties" , e ) ; } } protected void doGet ( HttpServletRequest request , HttpServletResponse response ) throws IOException , ServletException { } }

Fix:
properties . load ( getClass ( ) . getClassLoader ( ) . getResourceAsStream ( "//config.properties" ) ) ;
Buggy code:
public class FXMLOptionController implements Serializable , Initializable { @ FXML private RadioButton noobDifficulty ; @ FXML private RadioButton normalDifficulty ; @ FXML private RadioButton asianDifficulty ; @ FXML private RadioButton lowTurnLimit ; @ FXML private RadioButton mediumTurnLimit ; @ FXML private RadioButton highTurnLimit ; @ FXML private RadioButton musicOn ; @ FXML private RadioButton musicOff ; @ FXML private RadioButton musicPack1 ; @ FXML private RadioButton musicPack2 ; @ FXML private RadioButton musicPack3 ; private String buttonText ; OptionObject objectSave = new OptionObject ( ) ; @ Override public void initialize ( URL url , ResourceBundle rb ) { } @ FXML private void optionButtonClick ( ActionEvent event ) { } private void submitOption ( ) { } private void writeOptionSettingToFile ( ) { <START_BUG> File file = new File ( ( ( ".//SaveFiles//" + ( DataStorage . getInstance ( ) . getNewActiveUser ( ) ) ) + ".txt" ) ) ; <END_BUG> try ( ObjectOutputStream oOut = new ObjectOutputStream ( new FileOutputStream ( file ) ) ) { oOut . writeObject ( objectSave ) ; oOut . close ( ) ; System . out . println ( "Filsparning<seq2seq4repair_space>lyckades" ) ; } catch ( Exception ex ) { System . out . println ( "Informationen<seq2seq4repair_space>kunde<seq2seq4repair_space>inte<seq2seq4repair_space>sparas<seq2seq4repair_space>till<seq2seq4repair_space>fil!" ) ; } } }

Fix:
File file = new File ( ( ( ".//AccountSettings//" + ( DataStorage . getInstance ( ) . getNewActiveUser ( ) ) ) + ".txt" ) ) ;
Buggy code:
public class PanelTest extends WicketTestCase { public PanelTest ( String name ) { } public void testRenderHomePage_1 ( ) throws Exception { boolean hit = false ; try { executeTest ( PanelPage_1 . class , "Dummy.html" ) ; } catch ( MarkupException mex ) { hit = true ; assertNotNull ( mex . getMarkupStream ( ) ) ; <START_BUG> assertTrue ( ( ( mex . getMessage ( ) . indexOf ( "did<seq2seq4repair_space>not<seq2seq4repair_space>have<seq2seq4repair_space>a<seq2seq4repair_space>close<seq2seq4repair_space>tag" ) ) != ( - 1 ) ) ) ; <END_BUG> assertTrue ( ( ( mex . getMessage ( ) . indexOf ( "SimplePanel_1.html" ) ) != ( - 1 ) ) ) ; } assertTrue ( "Did<seq2seq4repair_space>expect<seq2seq4repair_space>a<seq2seq4repair_space>MarkupException" , hit ) ; } public void testRenderHomePage_2 ( ) throws Exception { } public void testPanel3 ( ) throws Exception { } public void testInlinePanel ( ) throws Exception { } public void testInlinePanel_2 ( ) throws Exception { } public void testInlinePanel_3 ( ) throws Exception { } public void testInlinePanel_4 ( ) throws Exception { } public void testInlinePanel_5 ( ) throws Exception { } public void testPanelWithAttributeModifier ( ) throws Exception { } public void testInlinePanel_7 ( ) throws Exception { } public void testInlinePanel_8 ( ) throws Exception { } }

Fix:
assertTrue ( ( ( mex . getMessage ( ) . indexOf ( "does<seq2seq4repair_space>not<seq2seq4repair_space>have<seq2seq4repair_space>a<seq2seq4repair_space>close<seq2seq4repair_space>tag" ) ) != ( - 1 ) ) ) ;
Buggy code:
public class CheckBoxMultipleChoice extends ListMultipleChoice { private static final long serialVersionUID = 1L ; private class SuffixChange extends Change { private static final long serialVersionUID = 1L ; final String prevSuffix ; SuffixChange ( String prevSuffix ) { } public void undo ( ) { } public String toString ( ) { } } private class PrefixChange extends Change { private static final long serialVersionUID = 1L ; private final String prevPrefix ; PrefixChange ( String prevSuffix ) { } public void undo ( ) { } public String toString ( ) { } } private String prefix = "" ; private String suffix = "<br//>\n" ; public CheckBoxMultipleChoice ( final String id ) { } public CheckBoxMultipleChoice ( final String id , final List choices ) { } public CheckBoxMultipleChoice ( final String id , final List choices , final IChoiceRenderer renderer ) { } public CheckBoxMultipleChoice ( final String id , IModel model , final List choices ) { } public CheckBoxMultipleChoice ( final String id , IModel model , final List choices , final IChoiceRenderer renderer ) { } public CheckBoxMultipleChoice ( String id , IModel choices ) { } public CheckBoxMultipleChoice ( String id , IModel model , IModel choices ) { } public CheckBoxMultipleChoice ( String id , IModel choices , IChoiceRenderer renderer ) { } public CheckBoxMultipleChoice ( String id , IModel model , IModel choices , IChoiceRenderer renderer ) { } public String getPrefix ( ) { } public final CheckBoxMultipleChoice setPrefix ( final String prefix ) { } public String getSuffix ( ) { } public final CheckBoxMultipleChoice setSuffix ( final String suffix ) { } protected final void onComponentTagBody ( final MarkupStream markupStream , final ComponentTag openTag ) { final StringBuffer buffer = new StringBuffer ( ) ; final List choices = getChoices ( ) ; for ( int index = 0 ; index < ( choices . size ( ) ) ; index ++ ) { final Object choice = choices . get ( index ) ; <START_BUG> final String label = getChoiceRenderer ( ) . getDisplayValue ( choice ) ; <END_BUG> if ( label != null ) { buffer . append ( getPrefix ( ) ) ; String id = getChoiceRenderer ( ) . getIdValue ( choice , index ) ; final String idAttr = ( ( getInputName ( ) ) + "_" ) + id ; buffer . append ( ( ( ( ( ( ( ( ( ( "<input<seq2seq4repair_space>name=\"" + ( getInputName ( ) ) ) + "\"" ) + "<seq2seq4repair_space>type=\"checkbox\"" ) + ( isSelected ( choice , index ) ? "<seq2seq4repair_space>checked=\"checked\"" : "" ) ) + "<seq2seq4repair_space>value=\"" ) + id ) + "\"<seq2seq4repair_space>id=\"" ) + idAttr ) + "\"//>" ) ) ; String display = getLocalizer ( ) . getString ( label , this , label ) ; String escaped = Strings . escapeMarkup ( display , false , true ) ; buffer . append ( ( ( "<label<seq2seq4repair_space>for=\"" + idAttr ) + "\">" ) ) . append ( escaped ) . append ( "<//label>" ) ; buffer . append ( getSuffix ( ) ) ; } } replaceComponentTagBody ( markupStream , openTag , buffer . toString ( ) ) ; } }

Fix:
final String label = ( ( String ) ( getConverter ( ) . convert ( getChoiceRenderer ( ) . getDisplayValue ( choice ) , String . class ) ) ) ;
Buggy code:
public abstract class WilmaTestAssertDecorator extends WilmaTestLogDecorator { private final XMLAssert xmlAssert ; public WilmaTestAssertDecorator ( ) { } public void assertExpectedResultMessage ( final String response ) { String expectedResponseMessage = getExpectedResponseMessage ( ) ; if ( expectedResponseMessage == null ) { naTestCase ( "Assert<seq2seq4repair_space>(assertExpectedResultMessage)<seq2seq4repair_space>called<seq2seq4repair_space>with<seq2seq4repair_space>unknown<seq2seq4repair_space>expected<seq2seq4repair_space>result<seq2seq4repair_space>message." ) ; } String actual = response . replace ( "\n\t" , "" ) . replace ( "\r\n" , "" ) . replace ( "\n" , "" ) . replace ( "\r" , "" ) . replace ( "<seq2seq4repair_space>" , "" ) ; String expected = expectedResponseMessage . replace ( "\n\t" , "" ) . replace ( "\r\n" , "" ) . replace ( "\n" , "" ) . replace ( "\r" , "" ) . replace ( "<seq2seq4repair_space>" , "" ) ; String errorMessage = "The<seq2seq4repair_space>expected<seq2seq4repair_space>and<seq2seq4repair_space>the<seq2seq4repair_space>received<seq2seq4repair_space>messages<seq2seq4repair_space>are<seq2seq4repair_space>not<seq2seq4repair_space>equal." ; <START_BUG> assertEquals ( errorMessage , expected , actual ) ; <END_BUG> } private String whitespaceFree ( final String string ) { } protected void assertJsonContent ( final String actual ) { } protected void checkXml ( final String actual ) throws Exception { } protected void checkResponseCode ( final int expected ) { } protected void checkResponseContentType ( final String responseContentType ) { } protected void checkResponseDialogDescriptor ( final String dialogDescriptor ) { } }

Fix:
assertTrue ( errorMessage , actual . startsWith ( expected ) ) ;
Buggy code:
public class SortingOptionsPlugin extends AbstractFolderOptionsPlugin { public SortingOptionsPlugin ( MailFrameMediator mediator ) { } public void loadOptionsFromXml ( IMailbox folder ) { XmlElement sorting = getConfigNode ( folder ) ; IDefaultItem item = new org . columba . core . config . DefaultItem ( sorting ) ; String column = item . get ( "column" ) ; if ( column == null ) { column = "Date" ; } <START_BUG> boolean order = item . getBoolean ( "order" , true ) ; <END_BUG> TableController tableController = ( ( TableController ) ( ( ( org . columba . mail . gui . frame . TableViewOwner ) ( getMediator ( ) ) ) . getTableController ( ) ) ) ; tableController . setSortingColumn ( column ) ; tableController . setSortingOrder ( order ) ; ( ( org . columba . mail . gui . table . SortingStateObservable ) ( tableController . getSortingStateObservable ( ) ) ) . setSortingState ( column , order ) ; } public void saveOptionsToXml ( IMailbox folder ) { } public XmlElement createDefaultElement ( boolean global ) { } }

Fix:
boolean order = item . getBooleanWithDefault ( "order" , true ) ;
Buggy code:
public class TrailScene extends Scene { public static final SceneID ID = SceneID . TRAIL ; private static final int CLICK_WAIT_TIME = 1000 ; private static final int STEP_COUNT_TRIGGER = 2 ; private int clickCounter ; private int timeElapsed ; private boolean paused ; private ParallaxSprite ground ; private ArrayList < ParallaxSprite > trees ; private Party party ; private RandomEncounterTable randomEncounterTable ; private HUD hud ; public TrailScene ( Party party , RandomEncounterTable randomEncounterTable ) { } @ Override public void init ( GameContainer container , StateBasedGame game ) throws SlickException { } @ Override public void update ( GameContainer container , StateBasedGame game , int delta ) throws SlickException { } @ Override public int getID ( ) { } private class HUDListener implements ComponentListener { @ Override public void componentActivated ( AbstractComponent component ) { <START_BUG> GameDirector . sharedSceneListener ( ) . requestScene ( PARTYINVENTORY , TrailScene . this , false ) ; <END_BUG> } } }

Fix:
GameDirector . sharedSceneListener ( ) . requestScene ( CAMP , TrailScene . this , false ) ;