nus-yam/ex-repair huggingface dataset:
Buggy code:
public class DBpediaWNTypes extends CachedJenaLookup { private static final Log logger = LogFactory . getLog ( DBpediaWNTypes . class ) ; public List < String > query ( String title , Logger logger ) { } public List < String > queryTitleForm ( String title , Logger logger ) { title = ( Character . toUpperCase ( title . charAt ( 0 ) ) ) + ( title . substring ( 1 ) ) ; title = title . replaceAll ( "\"" , "" ) . replaceAll ( "\\\\" , "" ) . replaceAll ( "\n" , "<seq2seq4repair_space>" ) ; String rawQueryStr = ( ( ( ( ( ( ( ( ( ( ( "{\n" + "<seq2seq4repair_space>?res<seq2seq4repair_space>rdfs:label<seq2seq4repair_space>\"" ) + title ) + "\"@en.\n" ) + "}<seq2seq4repair_space>UNION<seq2seq4repair_space>{\n" ) + "<seq2seq4repair_space>?redir<seq2seq4repair_space>dbo:wikiPageRedirects<seq2seq4repair_space>?res<seq2seq4repair_space>.\n" ) + "<seq2seq4repair_space>?redir<seq2seq4repair_space>rdfs:label<seq2seq4repair_space>\"" ) + title ) + "\"@en<seq2seq4repair_space>.\n" ) + "}\n" ) + "?res<seq2seq4repair_space>dbpedia2:wordnet_type<seq2seq4repair_space>?type<seq2seq4repair_space>.\n" ) + "FILTER<seq2seq4repair_space>(<seq2seq4repair_space>!regex(str(?res),<seq2seq4repair_space>\'^http:////dbpedia.org//resource//[^_]*:\',<seq2seq4repair_space>\'i\')<seq2seq4repair_space>)\n" ) + "" ; List < Literal [ ] > rawResults = rawQuery ( rawQueryStr , new String [ ] { "type" } ) ; List < String > results = new LinkedList < String > ( ) ; for ( Literal [ ] rawResult : rawResults ) { int senseIdx = Integer . parseInt ( rawResult [ 0 ] . getString ( ) . replaceAll ( "^.*-([^-]*)$" , "$1" ) ) ; String typeLabel = rawResult [ 0 ] . getString ( ) . replaceAll ( "^synset-([^-]*)-.*$" , "$1" ) . replaceAll ( "_" , "<seq2seq4repair_space>" ) ; try { IndexWord w = JWordnet . getDictionary ( ) . lookupIndexWord ( NOUN , typeLabel ) ; <START_BUG> Synset s = w . getSenses ( ) [ senseIdx ] ; <END_BUG> long synset = s . getOffset ( ) ; results . add ( ( ( typeLabel + "//" ) + ( Long . toString ( synset ) ) ) ) ; } catch ( Exception e ) { logger . debug ( "DBpedia<seq2seq4repair_space>{}<seq2seq4repair_space>wntype<seq2seq4repair_space>[[{}]]<seq2seq4repair_space>exception:<seq2seq4repair_space>{}" , title , typeLabel , e ) ; } } return results ; } }

Fix:
Synset s = w . getSenses ( ) [ ( senseIdx - 1 ) ] ;
Buggy code:
public class PatchXmlUnitTestCase { @ Test public void testParseCP ( ) throws Exception { final InputStream is = PatchXmlUnitTestCase . getResource ( "patch-01-CP.xml" ) ; final Patch patch = PatchXml . parse ( is ) ; assertNotNull ( patch ) ; assertNotNull ( patch . getPatchId ( ) ) ; assertNotNull ( patch . getDescription ( ) ) ; assertNotNull ( patch . getPatchType ( ) ) ; <START_BUG> assertEquals ( CUMULATIVE , patch . getPatchType ( ) ) ; <END_BUG> assertNotNull ( patch . getResultingVersion ( ) ) ; assertNotNull ( patch . getAppliesTo ( ) . get ( 0 ) ) ; } @ Test public void testParseOneOff ( ) throws Exception { } @ Test public void testMarshallCP ( ) throws Exception { } @ Test public void testMarshallOneOff ( ) throws Exception { } private void doMarshall ( String fileName ) throws Exception { } static InputStream getResource ( String name ) throws IOException { } private String toString ( String fileName ) throws Exception { } }

Fix:
assertEquals ( UPGRADE , patch . getPatchType ( ) ) ;
Buggy code:
public abstract class EasyMysqlStreamBuilder implements EasyMysqlStreamInterface { private final StringBuilder stream ; public EasyMysqlStreamBuilder ( ) { } public EasyMysqlStreamBuilder insertInto ( final String tableName , final EasyMysqlProperty ... properties ) { <START_BUG> stream . append ( ( ( "INSERT<seq2seq4repair_space>INTO<seq2seq4repair_space>" + tableName ) + "" ) ) ; <END_BUG> for ( EasyMysqlProperty property : properties ) { if ( Objects . nonNull ( property ) ) { stream . append ( ( ( property . getKey ( ) ) + ",<seq2seq4repair_space>" ) ) ; } } stream . setLength ( stream . lastIndexOf ( ",<seq2seq4repair_space>" ) ) ; stream . append ( ")<seq2seq4repair_space>VALUES<seq2seq4repair_space>(" ) ; for ( EasyMysqlProperty property : properties ) { if ( Objects . nonNull ( property ) ) { stream . append ( ( ( "'" + ( property . getValue ( ) ) ) + "',<seq2seq4repair_space>" ) ) ; } } stream . setLength ( stream . lastIndexOf ( ",<seq2seq4repair_space>" ) ) ; stream . append ( ");" ) ; return this ; } public EasyMysqlStreamBuilder update ( final String tableName , final EasyMysqlProperty property ) { } public EasyMysqlStreamBuilder selectFrom ( final String tableName ) { } public EasyMysqlStreamBuilder where ( final EasyMysqlProperty ... properties ) { } public EasyMysqlStreamBuilder and ( final EasyMysqlProperty ... properties ) { } public EasyMysqlStreamBuilder clear ( ) { } public StringBuilder getStream ( ) { } No newline ; at end ; of file ; }

Fix:
stream . append ( ( ( "INSERT<seq2seq4repair_space>INTO<seq2seq4repair_space>" + tableName ) + "<seq2seq4repair_space>(" ) ) ;
Buggy code:
public class SharedObjectActivatedEvent implements ISharedObjectActivatedEvent { private final ID activatedID ; private final ID [ ] groupMemberIDs ; private final ID localContainerID ; public SharedObjectActivatedEvent ( ID container , ID act , ID [ ] others ) { } public ID getActivatedID ( ) { } public ID getLocalContainerID ( ) { } public ID [ ] getGroupMemberIDs ( ) { <START_BUG> return groupMemberIDs ; <END_BUG> } public String toString ( ) { } }

Fix:
return ( groupMemberIDs ) == null ? new ID [ 0 ] : groupMemberIDs ;
Buggy code:
public class LightBlock { public LightBlock ( int NUMBER_OF_LIGHTS_IN ) { } int NUMBER_OF_LIGHTS ; public Vector4f ambientIntensity ; public float lightAttenuation ; public float maxIntensity ; public float gamma ; public float padding ; public PerLight [ ] lights ; public static int size ( int numberOfLights ) { } public float [ ] toFloat ( ) { } int programNumber ; int ambientIntensityUnif ; int lightAttenuationUnif ; int maxIntensityUnif ; int [ ] cameraSpaceLightPosUnif ; int [ ] lightIntensityUnif ; int gammaUnif ; int numberOfLightsUnif ; public void setUniforms ( int program ) { } public void update ( LightBlock lightblock ) { } public void updateInternal ( ) { GLES20 . glUseProgram ( programNumber ) ; GLES20 . glUniform4fv ( ambientIntensityUnif , 1 , ambientIntensity . toArray ( ) , 0 ) ; GLES20 . glUniform1f ( lightAttenuationUnif , lightAttenuation ) ; GLES20 . glUniform1f ( maxIntensityUnif , maxIntensity ) ; if ( ( gammaUnif ) != ( - 1 ) ) GLES20 . glUniform1f ( gammaUnif , gamma ) ; for ( int i = 0 ; i < ( NUMBER_OF_LIGHTS ) ; i ++ ) { GLES20 . glUniform4fv ( cameraSpaceLightPosUnif [ i ] , 1 , lights [ i ] . cameraSpaceLightPos . toArray ( ) , 0 ) ; GLES20 . glUniform4fv ( lightIntensityUnif [ i ] , 1 , lights [ i ] . lightIntensity . toArray ( ) , 0 ) ; } if ( ( numberOfLightsUnif ) != ( - 1 ) ) <START_BUG> GLES20 . glUniform1f ( numberOfLightsUnif , NUMBER_OF_LIGHTS ) ; <END_BUG> GLES20 . glUseProgram ( programNumber ) ; } }

Fix:
GLES20 . glUniform1i ( numberOfLightsUnif , NUMBER_OF_LIGHTS ) ;
Buggy code:
@ Component public class StatusFacade { public String getStatusByRegion ( RegionEnum region ) throws BadRequestException , EntityNotFoundException , InternalServerException , RateLimitExceededException , UnauthorizedException { <START_BUG> String url = ( APIConstants . SHARD_STATUS ) + ( region . getRegion ( ) ) ; <END_BUG> String response = GenericRestFacade . getInstance ( ) . executeCall ( "Status" , url ) ; JSONObject body = new JSONObject ( response ) ; JSONObject services = body . getJSONArray ( "services" ) . getJSONObject ( 0 ) ; String status = services . getString ( "status" ) ; return status ; } }

Fix:
String url = ( APIConstants . SHARD_STATUS ) + ( region . getRegionLow ( ) ) ;
Buggy code:
public class StandardComponentsTests { @ Test public void testStandardEvaluationContext ( ) { } @ Test public void testStandardOperatorOverloader ( ) throws EvaluationException { } @ Test public void testStandardTypeLocator ( ) { } @ Test public void testStandardTypeConverter ( ) throws EvaluationException { TypeConverter tc = new StandardTypeConverter ( ) ; <START_BUG> tc . convertValue ( 3 , TypeDescriptor . valueOf ( Double . class ) ) ; <END_BUG> } }

Fix:
tc . convertValue ( 3 , TypeDescriptor . forObject ( 3 ) , TypeDescriptor . valueOf ( Double . class ) ) ;
Buggy code:
public class ExtendedMessageFormat extends MessageFormat { private static final long serialVersionUID = - 2362048321261811743L ; private static final int HASH_SEED = 31 ; private static final String DUMMY_PATTERN = "" ; private static final String ESCAPED_QUOTE = "''" ; private static final char START_FMT = ',' ; private static final char END_FE = '}' ; private static final char START_FE = '{' ; private static final char QUOTE = '\'' ; private String toPattern ; private final Map < String , ? extends FormatFactory > registry ; public ExtendedMessageFormat ( String pattern ) { } public ExtendedMessageFormat ( String pattern , Locale locale ) { } public ExtendedMessageFormat ( String pattern , Map < String , ? extends FormatFactory > registry ) { } public ExtendedMessageFormat ( String pattern , Locale locale , Map < String , ? extends FormatFactory > registry ) { } @ Override public String toPattern ( ) { } @ Override public final void applyPattern ( String pattern ) { } @ Override public void setFormat ( int formatElementIndex , Format newFormat ) { } @ Override public void setFormatByArgumentIndex ( int argumentIndex , Format newFormat ) { } @ Override public void setFormats ( Format [ ] newFormats ) { } @ Override public void setFormatsByArgumentIndex ( Format [ ] newFormats ) { } @ Override public boolean equals ( Object obj ) { } @ Override public int hashCode ( ) { } private Format getFormat ( String desc ) { } private int readArgumentIndex ( String pattern , ParsePosition pos ) { } private String parseFormatDescription ( String pattern , ParsePosition pos ) { } private String insertFormats ( String pattern , ArrayList < String > customPatterns ) { } private void seekNonWs ( String pattern , ParsePosition pos ) { } private ParsePosition next ( ParsePosition pos ) { } private StringBuilder appendQuotedString ( String pattern , ParsePosition pos , StringBuilder appendTo , boolean escapingOn ) { } private void getQuotedString ( String pattern , ParsePosition pos , boolean escapingOn ) { } private boolean containsElements ( Collection < ? > coll ) { <START_BUG> if ( ( coll == null ) || ( ( coll . size ( ) ) == 0 ) ) { <END_BUG> return false ; } for ( Object name : coll ) { if ( name != null ) { return true ; } } return false ; } }

Fix:
if ( ( coll == null ) || ( coll . isEmpty ( ) ) ) {
Buggy code:
public class AddSchemaLocationHandler implements ModelUpdateOperationHandler , DescriptionProvider { public static final String OPERATION_NAME = "add-schema-location" ; public static final AddSchemaLocationHandler INSTANCE = new AddSchemaLocationHandler ( ) ; public static ModelNode getAddSchemaLocationOperation ( ModelNode address , ModelNode schemaLocation ) { } private final ParameterValidator typeValidator = new org . jboss . as . controller . operations . validation . ModelTypeValidator ( ModelType . PROPERTY ) ; private AddSchemaLocationHandler ( ) { } @ Override public Cancellable execute ( NewOperationContext context , ModelNode operation , ResultHandler resultHandler ) { } @ Override public ModelNode getModelDescription ( Locale locale ) { } private String validate ( ModelNode param , ModelNode locations ) { String failure = typeValidator . validateParameter ( SCHEMA_LOCATION , param ) ; String uri = param . asProperty ( ) . getName ( ) ; <START_BUG> if ( ( failure == null ) && ( ! ( locations . isDefined ( ) ) ) ) { <END_BUG> for ( ModelNode node : locations . asList ( ) ) { if ( uri . equals ( node . asProperty ( ) . getName ( ) ) ) { failure = ( ( "Schema<seq2seq4repair_space>with<seq2seq4repair_space>URI<seq2seq4repair_space>" + uri ) + "<seq2seq4repair_space>already<seq2seq4repair_space>registered<seq2seq4repair_space>with<seq2seq4repair_space>location<seq2seq4repair_space>" ) + ( node . asProperty ( ) . getValue ( ) . asString ( ) ) ; } } } return failure ; } }

Fix:
if ( ( failure == null ) && ( locations . isDefined ( ) ) ) {
Buggy code:
public final class ImmutableDistanceImpl implements Distance { private final int mId ; private final Trip mTrip ; private final String mLocation ; private final BigDecimal mDistance ; private final Date mDate ; private final TimeZone mTimezone ; private final BigDecimal mRate ; private final Price mPrice ; private final String mComment ; public ImmutableDistanceImpl ( int id , Trip trip , String location , BigDecimal distance , BigDecimal rate , WBCurrency currency , Date date , TimeZone timeZone , String comment ) { } protected ImmutableDistanceImpl ( Parcel in ) { } @ Override public int getId ( ) { } @ Override @ NonNull public Trip getTrip ( ) { } @ Override public String getLocation ( ) { } @ Override public BigDecimal getDistance ( ) { } @ Override public String getDecimalFormattedDistance ( ) { } @ Override public Date getDate ( ) { } @ Override public String getFormattedDate ( Context context , String separator ) { } @ Override public TimeZone getTimeZone ( ) { } @ Override public BigDecimal getRate ( ) { } @ Override public String getDecimalFormattedRate ( ) { } @ Override public String getCurrencyFormattedRate ( ) { } @ NonNull @ Override public Price getPrice ( ) { <START_BUG> return null ; <END_BUG> } @ Override public String getComment ( ) { } @ Override public int describeContents ( ) { } @ Override public void writeToParcel ( Parcel dest , int flags ) { } public static final Creator < ImmutableDistanceImpl > CREATOR = new Creator < ImmutableDistanceImpl > ( ) { @ Override public ImmutableDistanceImpl createFromParcel ( Parcel in ) { } @ Override public ImmutableDistanceImpl [ ] newArray ( int size ) { } } ; @ Override public String toString ( ) { } @ Override public int hashCode ( ) { } @ Override public boolean equals ( Object obj ) { } }

Fix:
return mPrice ;
Buggy code:
public class FastEddie { private Random rand ; private int ace ; public FastEddie ( ) { } public void deal ( ) { <START_BUG> ace = rand . nextInt ( 3 ) ; <END_BUG> } public boolean userGuess ( int guess ) { } public int getAce ( ) { } }

Fix:
ace = ( rand . nextInt ( 3 ) ) + 1 ;
Buggy code:
public class DrishtiSolo extends Solo { public DrishtiSolo ( Instrumentation instrumentation , Activity activity ) { } public DrishtiSolo assertCanLogin ( String userName , String password ) { } public DrishtiSolo assertCannotLogin ( String userName , String password ) { } public void logout ( ) { sendKey ( MENU ) ; <START_BUG> clickOnActionBarItem ( 3 ) ; <END_BUG> waitForActivity ( LoginActivity . class . getSimpleName ( ) ) ; } }

Fix:
clickOnActionBarItem ( 2 ) ;
Buggy code:
@ Stateless @ Remote ( TopologyChangeListener . class ) @ Listener ( sync = false ) public class TopologyChangeListenerBean implements TopologyChangeListener { public static final long TIMEOUT = 15000 ; @ Override public void establishTopology ( String containerName , String cacheName , String ... nodes ) throws InterruptedException { Set < String > expectedMembers = new TreeSet < > ( ) ; if ( nodes != null ) { for ( String name : nodes ) { <START_BUG> expectedMembers . add ( ( name + "//ee" ) ) ; <END_BUG> } } ServiceRegistry registry = CurrentServiceContainer . getServiceContainer ( ) ; ServiceName name = JBOSS . append ( "infinispan" , containerName , cacheName ) ; Cache < ? , ? > cache = ServiceContainerHelper . findValue ( registry , name ) ; if ( cache == null ) { throw new IllegalStateException ( String . format ( "Failed<seq2seq4repair_space>to<seq2seq4repair_space>locate<seq2seq4repair_space>%s" , name ) ) ; } cache . addListener ( this ) ; try { long start = System . currentTimeMillis ( ) ; long now = start ; long timeout = start + ( TopologyChangeListenerBean . TIMEOUT ) ; synchronized ( this ) { Set < String > members = TopologyChangeListenerBean . getMembers ( cache ) ; while ( ! ( expectedMembers . equals ( members ) ) ) { System . out . println ( String . format ( "%s<seq2seq4repair_space>!=<seq2seq4repair_space>%s,<seq2seq4repair_space>waiting<seq2seq4repair_space>for<seq2seq4repair_space>a<seq2seq4repair_space>topology<seq2seq4repair_space>change<seq2seq4repair_space>event..." , expectedMembers , members ) ) ; this . wait ( ( timeout - now ) ) ; now = System . currentTimeMillis ( ) ; if ( now >= timeout ) { throw new InterruptedException ( String . format ( "Cache<seq2seq4repair_space>%s//%s<seq2seq4repair_space>failed<seq2seq4repair_space>to<seq2seq4repair_space>establish<seq2seq4repair_space>view<seq2seq4repair_space>%s<seq2seq4repair_space>within<seq2seq4repair_space>%d<seq2seq4repair_space>ms.<seq2seq4repair_space>Current<seq2seq4repair_space>view<seq2seq4repair_space>is:<seq2seq4repair_space>%s" , containerName , cacheName , expectedMembers , TopologyChangeListenerBean . TIMEOUT , members ) ) ; } members = TopologyChangeListenerBean . getMembers ( cache ) ; } System . out . println ( String . format ( "Cache<seq2seq4repair_space>%s//%s<seq2seq4repair_space>successfully<seq2seq4repair_space>established<seq2seq4repair_space>view<seq2seq4repair_space>%s<seq2seq4repair_space>within<seq2seq4repair_space>%d<seq2seq4repair_space>ms." , containerName , cacheName , expectedMembers , ( now - start ) ) ) ; } } finally { cache . removeListener ( this ) ; } } private static Set < String > getMembers ( Cache < ? , ? > cache ) { } @ TopologyChanged public void topologyChanged ( TopologyChangedEvent < ? , ? > event ) { } }

Fix:
expectedMembers . add ( ( ( name + "//" ) + containerName ) ) ;
Buggy code:
public class LocaleUtilsTest extends TestCase { private static final Locale LOCALE_EN = new Locale ( "en" , "" ) ; private static final Locale LOCALE_EN_US = new Locale ( "en" , "US" ) ; private static final Locale LOCALE_EN_US_ZZZZ = new Locale ( "en" , "US" , "ZZZZ" ) ; private static final Locale LOCALE_FR = new Locale ( "fr" , "" ) ; private static final Locale LOCALE_FR_CA = new Locale ( "fr" , "CA" ) ; private static final Locale LOCALE_QQ = new Locale ( "qq" , "" ) ; private static final Locale LOCALE_QQ_ZZ = new Locale ( "qq" , "ZZ" ) ; public LocaleUtilsTest ( String name ) { } public static void main ( String [ ] args ) { } public static Test suite ( ) { TestSuite suite = new TestSuite ( LocaleUtilsTest . class ) ; <START_BUG> suite . setName ( "LocaleUtilsTest<seq2seq4repair_space>Tests" ) ; <END_BUG> return suite ; } public void setUp ( ) throws Exception { } public void testConstructor ( ) { } private void assertValidToLocale ( String language ) { } private void assertValidToLocale ( String localeString , String language , String country ) { } private void assertValidToLocale ( String localeString , String language , String country , String variant ) { } public void testToLocale_1Part ( ) { } public void testToLocale_2Part ( ) { } public void testToLocale_3Part ( ) { } private void assertLocaleLookupList ( Locale locale , Locale defaultLocale , Locale [ ] expected ) { } public void testLocaleLookupList_Locale ( ) { } public void testLocaleLookupList_LocaleLocale ( ) { } public void testAvailableLocaleList ( ) { } public void testAvailableLocaleSet ( ) { } public void testIsAvailableLocale ( ) { } private void assertLanguageByCountry ( String country , String [ ] languages ) { } public void testLanguagesByCountry ( ) { } private void assertCountriesByLanguage ( String language , String [ ] countries ) { } public void testCountriesByLanguage ( ) { } private static void assertUnmodifiableCollection ( Collection coll ) { } public void testLang328 ( ) { } }

Fix:
suite . setName ( "LocaleUtils<seq2seq4repair_space>Tests" ) ;
Buggy code:
public abstract class AbstractHttpSendingTransportHandler implements SockJsSessionFactory < SockJsSessionSupport > , ConfigurableTransportHandler { protected final Log logger = LogFactory . getLog ( this . getClass ( ) ) ; private SockJsConfiguration sockJsConfig ; @ Override public void setSockJsConfiguration ( SockJsConfiguration sockJsConfig ) { } @ Override public void registerSockJsHandlers ( Collection < SockJsHandler > sockJsHandlers ) { } public SockJsConfiguration getSockJsConfig ( ) { } @ Override public final void handleRequest ( ServerHttpRequest request , ServerHttpResponse response , SockJsHandler sockJsHandler , SockJsSessionSupport session ) throws Exception { } protected void handleRequestInternal ( ServerHttpRequest request , ServerHttpResponse response , AbstractHttpServerSockJsSession httpServerSession ) throws IOException , Exception { } protected void handleNewSession ( ServerHttpRequest request , ServerHttpResponse response , AbstractHttpServerSockJsSession session ) throws Exception { logger . debug ( ( ( "Opening<seq2seq4repair_space>" + ( getTransportType ( ) ) ) + "<seq2seq4repair_space>connection" ) ) ; session . setFrameFormat ( getFrameFormat ( request ) ) ; session . writeFrame ( response , SockJsFrame . openFrame ( ) ) ; <START_BUG> session . connectionInitialized ( ) ; <END_BUG> } protected abstract MediaType getContentType ( ) { } protected abstract FrameFormat getFrameFormat ( ServerHttpRequest request ) { } }

Fix:
session . delegateConnectionEstablished ( ) ;
Buggy code:
public class Roentgen extends SimProcess { private Process myModel ; public Roentgen ( Model owner , String name , boolean showInTrace ) { } public void lifeCycle ( ) { while ( true ) { if ( myModel . roentgenQueue . isEmpty ( ) ) { myModel . untaetigeRoentgenQueue . insert ( this ) ; passivate ( ) ; } else { Patient naechsterPatient = myModel . roentgenQueue . first ( ) ; myModel . roentgenQueue . remove ( naechsterPatient ) ; <START_BUG> hold ( new TimeSpan ( myModel . getBehandlungszeitK ( ) , TimeUnit . MINUTES ) ) ; <END_BUG> naechsterPatient . activate ( new TimeSpan ( 0.0 ) ) ; } } } }

Fix:
hold ( new TimeSpan ( myModel . getRoentgenZeit ( ) , TimeUnit . MINUTES ) ) ;
Buggy code:
public class ResourceUrlProvider implements ApplicationListener < ContextRefreshedEvent > { protected final Log logger = LogFactory . getLog ( getClass ( ) ) ; private UrlPathHelper pathHelper = new UrlPathHelper ( ) ; private PathMatcher pathMatcher = new AntPathMatcher ( ) ; private final Map < String , ResourceHttpRequestHandler > handlerMap = new HashMap < String , ResourceHttpRequestHandler > ( ) ; private boolean autodetect = true ; public void setUrlPathHelper ( UrlPathHelper pathHelper ) { } public UrlPathHelper getPathHelper ( ) { } public void setPathMatcher ( PathMatcher pathMatcher ) { } public PathMatcher getPathMatcher ( ) { } public void setHandlerMap ( Map < String , ResourceHttpRequestHandler > handlerMap ) { } public Map < String , ResourceHttpRequestHandler > getHandlerMap ( ) { } public boolean isAutodetect ( ) { } @ Override public void onApplicationEvent ( ContextRefreshedEvent event ) { } protected void detectResourceHandlers ( ApplicationContext appContext ) { } public final String getForRequestUrl ( HttpServletRequest request , String requestUrl ) { if ( logger . isTraceEnabled ( ) ) { logger . trace ( ( "Getting<seq2seq4repair_space>resource<seq2seq4repair_space>URL<seq2seq4repair_space>for<seq2seq4repair_space>requestURL=" + requestUrl ) ) ; } String pathWithinMapping = ( ( String ) ( request . getAttribute ( PATH_WITHIN_HANDLER_MAPPING_ATTRIBUTE ) ) ) ; if ( pathWithinMapping == null ) { logger . trace ( "Request<seq2seq4repair_space>attribute<seq2seq4repair_space>with<seq2seq4repair_space>lookup<seq2seq4repair_space>path<seq2seq4repair_space>not<seq2seq4repair_space>found,<seq2seq4repair_space>calculating<seq2seq4repair_space>instead." ) ; pathWithinMapping = getPathHelper ( ) . getLookupPathForRequest ( request ) ; } int index = getPathHelper ( ) . getRequestUri ( request ) . indexOf ( pathWithinMapping ) ; <START_BUG> Assert . state ( ( ( index > 0 ) && ( index < ( requestUrl . length ( ) ) ) ) , ( "Failed<seq2seq4repair_space>to<seq2seq4repair_space>determine<seq2seq4repair_space>lookup<seq2seq4repair_space>path:<seq2seq4repair_space>" + requestUrl ) ) ; <END_BUG> String prefix = requestUrl . substring ( 0 , index ) ; String lookupPath = requestUrl . substring ( index ) ; String resolvedPath = getForLookupPath ( lookupPath ) ; return resolvedPath != null ? prefix + resolvedPath : null ; } public final String getForLookupPath ( String lookupPath ) { } }

Fix:
Assert . state ( ( index != ( - 1 ) ) , ( "Failed<seq2seq4repair_space>to<seq2seq4repair_space>determine<seq2seq4repair_space>lookup<seq2seq4repair_space>path:<seq2seq4repair_space>" + requestUrl ) ) ;
Buggy code:
public class Reader { public String fileName ; public InputStream myStream ; ArrayList < ExperimentJob > sims ; public void dispose ( ) { } public Reader ( String file ) throws FileNotFoundException { } public Reader ( InputStream inp ) { } public Collection < ExperimentJob > getSimulation ( ) { } private Parameter readParameter ( Element e ) { } private Output readOutput ( Element e ) { } private void readParameter ( ExperimentJob s , Element docEle ) { } private void readOutput ( ExperimentJob s , Element docEle ) { } private ExperimentJob readSimulation ( Element e ) { String expId = e . getAttribute ( EXPERIMENT_ID_TAG ) ; String finalStep = e . getAttribute ( FINAL_STEP_TAG ) ; int max = Integer . valueOf ( e . getAttribute ( FINAL_STEP_TAG ) ) ; String sourcePath = e . getAttribute ( SOURCE_PATH_TAG ) ; String experimentName = e . getAttribute ( EXPERIMENT_NAME_TAG ) ; String seed = e . getAttribute ( SEED_TAG ) ; long selectedSeed = ( ( seed == null ) || ( ( seed . length ( ) ) == 0 ) ) ? 0L : Long . valueOf ( seed ) . longValue ( ) ; if ( ( sourcePath . charAt ( 0 ) ) != '//' ) { String pr ; if ( ( fileName ) != null ) { String prt ; File ff = new File ( fileName ) ; prt = ff . getPath ( ) ; pr = prt . substring ( 0 , ( ( int ) ( ( prt . length ( ) ) - ( ff . getName ( ) . length ( ) ) ) ) ) ; pr = pr + "//" ; } else pr = new File ( "." ) . getAbsolutePath ( ) ; pr = pr . substring ( 0 , ( ( pr . length ( ) ) - 1 ) ) ; sourcePath = pr + sourcePath ; } <START_BUG> ExperimentJob res = new ExperimentJob ( expId , sourcePath , experimentName , max , selectedSeed ) ; <END_BUG> this . readParameter ( res , e ) ; this . readOutput ( res , e ) ; return res ; } private ArrayList < ExperimentJob > readSimulation ( Document dom ) { } public void parseXmlFile ( ) { } }

Fix:
ExperimentJob res = new ExperimentJob ( sourcePath , expId , experimentName , max , selectedSeed ) ;
Buggy code:
public class ComponentManager implements IComponentPlugin { private static ComponentManager instance = new ComponentManager ( ) ; private IExtensionHandler extensionHandler ; private ComponentManager ( ) { } public static ComponentManager getInstance ( ) { } private IExtensionHandler getExtensionHandler ( ) { if ( ( extensionHandler ) == null ) { try { IPluginManager pm = null ; try { pm = ( ( IPluginManager ) ( ServiceRegistry . getInstance ( ) . getService ( IPluginManager . class ) ) ) ; } catch ( ServiceNotFoundException e ) { e . printStackTrace ( ) ; } <START_BUG> extensionHandler = pm . getHandler ( ORG_COLUMBA_CORE_COMPONENT ) ; <END_BUG> } catch ( PluginHandlerNotFoundException e ) { e . printStackTrace ( ) ; } } return extensionHandler ; } public IComponentPlugin getPlugin ( String id ) { } public void init ( ) { } public void postStartup ( ) { } public void registerCommandLineArguments ( ) { } public void handleCommandLineParameters ( CommandLine commandLine ) { } private void initDefaultPlugins ( ) { } }

Fix:
extensionHandler = pm . getExtensionHandler ( ORG_COLUMBA_CORE_COMPONENT ) ;
Buggy code:
public class EmailAddress extends ComplexProperty implements ISearchStringProvider { protected static final String SmtpRoutingType = "SMTP" ; private String name ; private String address ; private String routingType ; private MailboxType mailboxType ; private ItemId id ; public EmailAddress ( ) { } public EmailAddress ( String smtpAddress ) { } public EmailAddress ( String name , String smtpAddress ) { } public EmailAddress ( String name , String address , String routingType ) { } protected EmailAddress ( String name , String address , String routingType , MailboxType mailboxType ) { } protected EmailAddress ( String name , String address , String routingType , MailboxType mailboxType , ItemId id ) { } protected EmailAddress ( EmailAddress mailbox ) throws Exception { } public String getName ( ) { } public void setName ( String name ) { } public String getAddress ( ) { } public void setAddress ( String address ) { } public String getRoutingType ( ) { } public void setRoutingType ( String routingType ) { } public MailboxType getMailboxType ( ) { } public void setMailboxType ( MailboxType mailboxType ) { } public ItemId getId ( ) { } public void setId ( ItemId id ) { } public static EmailAddress getEmailAddressFromString ( String smtpAddress ) { } protected boolean tryReadElementFromXml ( EwsServiceXmlReader reader ) throws Exception { } @ Override protected void writeElementsToXml ( EwsServiceXmlWriter writer ) throws Exception { } @ Override public String getSearchString ( ) { } @ Override public String toString ( ) { String addressPart ; if ( ( null == ( this . getAddress ( ) ) ) || ( this . getAddress ( ) . isEmpty ( ) ) ) { return "" ; } if ( ( null != ( this . getRoutingType ( ) ) ) && ( this . getRoutingType ( ) . isEmpty ( ) ) ) { addressPart = ( ( this . getRoutingType ( ) ) + ":" ) + ( this . getAddress ( ) ) ; } else { addressPart = this . getAddress ( ) ; } <START_BUG> if ( ( null != ( this . getName ( ) ) ) && ( this . getName ( ) . isEmpty ( ) ) ) { <END_BUG> return ( ( ( this . getName ( ) ) + "<seq2seq4repair_space><" ) + addressPart ) + ">" ; } else { return addressPart ; } } protected String getSmtpRoutingType ( ) { } }

Fix:
if ( ( null != ( this . getName ( ) ) ) && ( ! ( this . getName ( ) . isEmpty ( ) ) ) ) {
Buggy code:
public class AskTemperatureIntentHandler extends IntentHandler { protected static final Logger LOG = LoggerFactory . getLogger ( AskTemperatureIntentHandler . class ) ; private static final String TEMPERATURE = "AskTemperature" ; private static final String ITEM_NAME = "temperature" ; public AskTemperatureIntentHandler ( OpenHabClient openHabClient , ItemDao itemDao ) { } @ Override public SpeechletResponse handleIntentInternal ( Intent intent ) { final Slot location = intent . getSlot ( SLOT_LOCATION ) ; final Item item = itemDao . findItem ( location . getValue ( ) , AskTemperatureIntentHandler . ITEM_NAME , NUMBER ) ; if ( item != null ) { final String tempStr = openHabClient . getState ( item . getOpenHabItem ( ) ) ; double temp = 0 ; try { temp = Double . parseDouble ( tempStr ) ; } catch ( NumberFormatException nfe ) { AskTemperatureIntentHandler . LOG . error ( "Value<seq2seq4repair_space>{}<seq2seq4repair_space>could<seq2seq4repair_space>not<seq2seq4repair_space>be<seq2seq4repair_space>pasrsed<seq2seq4repair_space>to<seq2seq4repair_space>double." , tempStr ) ; return errorResponse ( String . format ( "I<seq2seq4repair_space>could<seq2seq4repair_space>not<seq2seq4repair_space>get<seq2seq4repair_space>the<seq2seq4repair_space>temperature<seq2seq4repair_space>value<seq2seq4repair_space>for<seq2seq4repair_space>%s" , location . getValue ( ) ) ) ; } <START_BUG> return buildSpeechletResponse ( String . format ( "The<seq2seq4repair_space>%s<seq2seq4repair_space>temperature<seq2seq4repair_space>is<seq2seq4repair_space>%.1d<seq2seq4repair_space>degrees." , location . getValue ( ) , temp ) , true ) ; <END_BUG> } else { return errorResponse ( String . format ( "There<seq2seq4repair_space>is<seq2seq4repair_space>no<seq2seq4repair_space>item<seq2seq4repair_space>configured<seq2seq4repair_space>for<seq2seq4repair_space>the<seq2seq4repair_space>location<seq2seq4repair_space>%s." , location . getValue ( ) ) ) ; } } @ Override public String getIntentName ( ) { } @ Override protected Logger getLogger ( ) { } @ Override protected List < String > getSlotNames ( ) { } }

Fix:
return buildSpeechletResponse ( String . format ( "The<seq2seq4repair_space>%s<seq2seq4repair_space>temperature<seq2seq4repair_space>is<seq2seq4repair_space>%.1f<seq2seq4repair_space>degrees." , location . getValue ( ) , temp ) , true ) ;
Buggy code:
public final class InputStreamLengthPrefixedMessageReader extends LengthPrefixedMessageReader { public static final int DEFAULT_SIZE = 1024 ; private final byte [ ] byteArray ; private final InputStream inputStream ; public InputStreamLengthPrefixedMessageReader ( final InputStream inputStream ) { } public InputStreamLengthPrefixedMessageReader ( final InputStream inputStream , final int size ) { } @ Override protected int fillBuffer ( final ByteBuffer buffer ) throws IOException { final int readCount = this . inputStream . read ( this . byteArray ) ; if ( readCount > 0 ) { <START_BUG> buffer . put ( this . byteArray ) ; <END_BUG> } return readCount ; } }

Fix:
buffer . put ( this . byteArray , 0 , readCount ) ;
Buggy code:
public class Input extends Task { private String validargs = null ; private String exitargs = null ; private String exitmessage = "Build<seq2seq4repair_space>abborted." ; private String message = "" ; private String addproperty = null ; private String input = null ; public void setValidargs ( String validargs ) { } public void setAddproperty ( String addproperty ) { } public void setExitargs ( String exitargs ) { } public void setExitmessage ( String exitmessage ) { } public void setMessage ( String message ) { } public void setTestinput ( String testinput ) { } public Input ( ) { } public void execute ( ) throws BuildException { } public void addText ( String msg ) { <START_BUG> message += ProjectHelper . replaceProperties ( project , msg , project . getProperties ( ) ) ; <END_BUG> } }

Fix:
message += ProjectHelper . replaceProperties ( project , msg ) ;
Buggy code:
public class ServerRemoveHandler extends AbstractRemoveStepHandler { public static final String OPERATION_NAME = REMOVE ; public static final ServerRemoveHandler INSTANCE = new ServerRemoveHandler ( ) ; protected ServerRemoveHandler ( ) { } @ Override protected void performRemove ( OperationContext context , ModelNode operation , ModelNode model ) throws OperationFailedException { super . performRemove ( context , operation , model ) ; final PathAddress address = PathAddress . pathAddress ( operation . require ( OP_ADDR ) ) ; final String serverName = address . getLastElement ( ) . getValue ( ) ; final PathAddress running = address . subAddress ( 0 , 1 ) . append ( PathElement . pathElement ( RUNNING_SERVER , serverName ) ) ; final ModelNode runningServerRemove = new ModelNode ( ) ; runningServerRemove . get ( OP ) . set ( REMOVE ) ; runningServerRemove . get ( OP_ADDR ) . set ( running . toModelNode ( ) ) ; context . addStep ( runningServerRemove , new OperationStepHandler ( ) { @ Override public void execute ( final OperationContext context , final ModelNode operation ) throws OperationFailedException { context . removeResource ( EMPTY_ADDRESS ) ; context . stepCompleted ( ) ; } <START_BUG> } , IMMEDIATE ) ; <END_BUG> final ModelNode verifyOp = new ModelNode ( ) ; verifyOp . get ( OP ) . set ( "verify-running-server" ) ; verifyOp . get ( OP_ADDR ) . add ( HOST , address . getElement ( 0 ) . getValue ( ) ) ; context . addStep ( verifyOp , new OperationStepHandler ( ) { @ Override public void execute ( final OperationContext context , final ModelNode operation ) throws OperationFailedException { final PathAddress serverAddress = EMPTY_ADDRESS . append ( PathElement . pathElement ( SERVER , serverName ) ) ; final ProxyController controller = context . getResourceRegistration ( ) . getProxyController ( serverAddress ) ; if ( controller != null ) { context . getFailureDescription ( ) . set ( HostControllerMessages . MESSAGES . serverStillRunning ( serverName ) ) ; } context . stepCompleted ( ) ; } } , RUNTIME ) ; } protected boolean requiresRuntime ( OperationContext context ) { } }

Fix:
} , MODEL , true ) ;
Buggy code:
public class ModClusterDisableContext implements OperationStepHandler { static final ModClusterDisableContext INSTANCE = new ModClusterDisableContext ( ) ; static OperationDefinition getDefinition ( ResourceDescriptionResolver descriptionResolver ) { } @ Override public void execute ( OperationContext context , ModelNode operation ) throws OperationFailedException { if ( ( context . isNormalServer ( ) ) && ( ( context . getServiceRegistry ( false ) . getService ( SERVICE_NAME ) ) != null ) ) { context . addStep ( new OperationStepHandler ( ) { @ Override public void execute ( OperationContext context , ModelNode operation ) throws OperationFailedException { ServiceController < ? > controller = context . getServiceRegistry ( false ) . getService ( SERVICE_NAME ) ; final ModClusterServiceMBean service = ( ( ModClusterServiceMBean ) ( controller . getValue ( ) ) ) ; ModClusterLogger . ROOT_LOGGER . debugf ( "disable-context:<seq2seq4repair_space>%s" , operation ) ; final String webHost = ModClusterSubsystemResourceDefinition . VIRTUAL_HOST . resolveModelAttribute ( context , operation ) . asString ( ) ; final String webContext = ModClusterSubsystemResourceDefinition . CONTEXT . resolveModelAttribute ( context , operation ) . asString ( ) ; try { service . disableContext ( webHost , webContext ) ; } catch ( IllegalArgumentException e ) { <START_BUG> throw new OperationFailedException ( new ModelNode ( ) . set ( ROOT_LOGGER . contextOrHostNotFound ( webHost , webContext ) ) ) ; <END_BUG> } context . completeStep ( new OperationContext . RollbackHandler ( ) { @ Override public void handleRollback ( OperationContext context , ModelNode operation ) { service . enableContext ( webHost , webContext ) ; } } ) ; } } , RUNTIME ) ; } context . stepCompleted ( ) ; } }

Fix:
throw new OperationFailedException ( new ModelNode ( ) . set ( ROOT_LOGGER . ContextOrHostNotFound ( webHost , webContext ) ) ) ;
Buggy code:
public class NewArquillianExtension implements NewExtension { public static final String NAMESPACE = "urn:jboss:domain:arquillian:1.0" ; public static final String SUBSYSTEM_NAME = "arquillian" ; static final NewArquillianExtension . ArquillianSubsystemParser parser = new NewArquillianExtension . ArquillianSubsystemParser ( ) ; public void initialize ( NewExtensionContext context ) { } public void initializeParsers ( ExtensionParsingContext context ) { } static class ArquillianSubsystemParser implements XMLStreamConstants , XMLElementReader < List < ModelNode > > , XMLElementWriter < ModelNode > { public void writeContent ( XMLExtendedStreamWriter writer , ModelNode node ) throws XMLStreamException { } public void readElement ( XMLExtendedStreamReader reader , List < ModelNode > list ) throws XMLStreamException { ParseUtils . requireNoAttributes ( reader ) ; ParseUtils . requireNoContent ( reader ) ; final ModelNode subsystem = new ModelNode ( ) ; subsystem . get ( OP ) . set ( ADD ) ; <START_BUG> subsystem . get ( OP_ADDR ) . set ( SUBSYSTEM , NewArquillianExtension . SUBSYSTEM_NAME ) ; <END_BUG> } } }

Fix:
subsystem . get ( OP_ADDR ) . add ( SUBSYSTEM , NewArquillianExtension . SUBSYSTEM_NAME ) ;
Buggy code:
public abstract class InternalDriver implements ModuleControl { private static final Object syncMe = new Object ( ) ; private static InternalDriver activeDriver ; protected boolean active ; private ContextService contextServiceFactory ; private AuthenticationService authenticationService ; public static final InternalDriver activeDriver ( ) { } public InternalDriver ( ) { } public void boot ( boolean create , Properties properties ) throws StandardException { } public void stop ( ) { } public boolean acceptsURL ( String url ) { } public Connection connect ( String url , Properties info ) throws SQLException { } public int getMajorVersion ( ) { } public int getMinorVersion ( ) { } public boolean jdbcCompliant ( ) { <START_BUG> return false ; <END_BUG> } protected FormatableProperties getAttributes ( String url , Properties info ) throws SQLException { } private static void checkBoolean ( Properties set , String attribute ) throws SQLException { } private static void checkEnumeration ( Properties set , String attribute , String [ ] choices ) throws SQLException { } public static String getDatabaseName ( String url , Properties info ) { } public final ContextService getContextServiceFactory ( ) { } public AuthenticationService getAuthenticationService ( ) { } protected abstract EmbedConnection getNewEmbedConnection ( String url , Properties info ) throws SQLException { } private ConnectionContext getConnectionContext ( ) { } private ContextManager getCurrentContextManager ( ) { } public boolean isActive ( ) { } public abstract Connection getNewNestedConnection ( EmbedConnection conn ) { } public Statement newEmbedStatement ( EmbedConnection conn , boolean forMetaData , int resultSetType , int resultSetConcurrency , int resultSetHoldability ) { } public abstract PreparedStatement newEmbedPreparedStatement ( EmbedConnection conn , String stmt , boolean forMetaData , int resultSetType , int resultSetConcurrency , int resultSetHoldability , int autoGeneratedKeys , int [ ] columnIndexes , String [ ] columnNames ) throws SQLException { } public abstract CallableStatement newEmbedCallableStatement ( EmbedConnection conn , String stmt , int resultSetType , int resultSetConcurrency , int resultSetHoldability ) throws SQLException { } public DatabaseMetaData newEmbedDatabaseMetaData ( EmbedConnection conn , String dbname ) throws SQLException { } public abstract EmbedResultSet newEmbedResultSet ( EmbedConnection conn , ResultSet results , boolean forMetaData , EmbedStatement statement , boolean isAtomic ) throws SQLException { } }

Fix:
return true ;
Buggy code:
@ SuppressWarnings ( "serial" ) @ Authors ( "Nikolche<seq2seq4repair_space>Mihajlovski" ) @ Since ( "2.0.0" ) public class DbItems < T > extends BeanListItems < T > { private final Predicate < T > match ; private final Comparator < T > orderBy ; public DbItems ( Class < T > type , Predicate < T > match , Comparator < T > orderBy ) { } @ Override public void add ( Item item ) { } @ Override public void insert ( int index , Item item ) { } @ Override public Item get ( int index ) { } @ Override protected List < Item > data ( ) { <START_BUG> List < T > all = DB . find ( null , match , orderBy ) ; <END_BUG> List < Item > records = U . list ( ) ; for ( T t : all ) { records . add ( Models . item ( t ) ) ; } return records ; } @ Override public void remove ( int index ) { } @ Override public void set ( int index , Item item ) { } @ Override public Items orderedBy ( String sortOrder ) { } }

Fix:
List < T > all = DB . find ( beanType , match , orderBy ) ;
Buggy code:
public class SegregationAgent implements Agent { private static int TOLERANCE = 30 ; private Environment < SegregationAgent > environment ; private Color color ; public SegregationAgent ( Environment < SegregationAgent > environment , Color color ) { } public float getSatisfaction ( ) { final Map < Coordinate , SegregationAgent > neighbors = environment . getAllNeighbors ( this ) ; int compatibility = 0 ; for ( SegregationAgent agent : neighbors . values ( ) ) { if ( ( agent != null ) && ( agent . color . equals ( color ) ) ) { compatibility ++ ; } } <START_BUG> compatibility = ( compatibility * 100 ) // 8 ; <END_BUG> return compatibility ; } public static void setTOLERANCE ( int tolerance ) { } @ Override public void doIt ( ) { } private boolean needToMove ( ) { } @ Override public Color getColor ( ) { } }

Fix:
compatibility = ( compatibility * 100 ) // ( neighbors . size ( ) ) ;
Buggy code:
public class AddPageActivity extends AppCompatActivity { static final String TAG = "AddPageActivity" ; ImageView mDialogAddPageIv ; EditText contentEt ; Button submitBtn ; private Uri mCropImagedUri ; static final int REQ_CODE_PICK_PICTURE = 1 ; static final int REQ_CODE_TAKE_PHOTO = 2 ; static final int REQ_CODE_CROP = 3 ; private static final int PROFILE_IMAGE_ASPECT_X = 4 ; private static final int PROFILE_IMAGE_ASPECT_Y = 3 ; private int PROFILE_IMAGE_OUTPUT_X ; private int PROFILE_IMAGE_OUTPUT_Y ; @ Override protected void onCreate ( Bundle savedInstanceState ) { } @ Override public boolean onCreateOptionsMenu ( Menu menu ) { } @ Override public boolean onOptionsItemSelected ( MenuItem item ) { } @ Override public void onBackPressed ( ) { } private void ShowExitEditorDialog ( ) { } private void ShowChangeImageActionDialog ( ) { String [ ] dialogItems = new String [ ] { getResources ( ) . getString ( capture_image ) , getResources ( ) . getString ( select_image ) } ; ExtDialog . Builder dialogBuilder = new ExtDialog . Builder ( this ) ; ExtDialog dialog = dialogBuilder . ListItems ( dialogItems ) . ListItemsCallback ( new ExtDialog . ListCallback ( ) { @ Override public void OnSelection ( ExtDialog dialog , View itemView , int which , CharSequence text ) { if ( which == 0 ) { dispatchTakePictureIntent ( ) ; } else if ( which == 1 ) { dispatchPickIntent ( ) ; } } <START_BUG> } ) . SetTitle ( getResources ( ) . getString ( change_image_action ) ) . BackgroundColor ( getResources ( ) . getColor ( mustard_op70 ) ) . ListItemColor ( getResources ( ) . getColor ( white_op100 ) ) . TitleColor ( getResources ( ) . getColor ( white_op100 ) ) . Build ( ) ; <END_BUG> dialog . show ( ) ; } @ Override protected void onActivityResult ( int requestCode , int resultCode , Intent data ) { } private void dispatchPickIntent ( ) { } private void dispatchTakePictureIntent ( ) { } private void dispatchCropIntent ( Uri imageCaptureUri ) { } private File createNewFile ( String prefix ) { } }

Fix:
} ) . SetTitle ( getResources ( ) . getString ( change_image_action ) ) . ListItemColor ( getResources ( ) . getColor ( white_op100 ) ) . TitleColor ( getResources ( ) . getColor ( white_op100 ) ) . Build ( ) ;
Buggy code:
public class Session extends Application { DeviceUtil util = new DeviceUtil ( ) ; public int gps_count = 0 ; public int throughput_count = 0 ; public Session ( ) { } public ArrayList < Screen > screenBuffer = new ArrayList < Screen > ( ) ; public void AddScreen ( boolean isOn ) { } public void incrementGPS ( ) { } public void decrementGPS ( ) { } public void incrementThroughput ( ) { } public void decrementThroughput ( ) { ( throughput_count ) -- ; <START_BUG> throughput_count %= 48 ; <END_BUG> } public boolean doGPS ( ) { } public boolean doThroughput ( ) { } No newline ; at end ; of file ; }

Fix:
throughput_count %= Values . THROUGHPUT_FREQ ;
Buggy code:
public class PhoneAccountSettingsActivity extends PreferenceActivity { @ Override protected void onCreate ( Bundle icicle ) { super . onCreate ( icicle ) ; <START_BUG> getActionBar ( ) . setTitle ( phone_account_settings ) ; <END_BUG> getFragmentManager ( ) . beginTransaction ( ) . replace ( content , new PhoneAccountSettingsFragment ( ) ) . commit ( ) ; } @ Override public boolean onOptionsItemSelected ( MenuItem item ) { } }

Fix:
getActionBar ( ) . setTitle ( phone_accounts ) ;
Buggy code:
public class FloorQueue { private int personCount ; Queue < Person > queue ; public FloorQueue ( ) { } public void enqueue ( Person person ) { } public Person dequeue ( ) { } public int getPersonCount ( ) { } public void setPersonCount ( int personCount ) { } public int getSize ( ) { } public void clear ( ) { } public boolean isEmpty ( ) { <START_BUG> return this . queue . isEmpty ( ) ; <END_BUG> } public Person peek ( ) { } No newline ; at end ; of file ; }

Fix:
return queue . isEmpty ( ) ;