nus-yam/ex-repair huggingface dataset:
Buggy code:
class NewLocalDomainConnectionService implements NewDomainControllerConnection , Service < NewDomainControllerConnection > { final InjectedValue < NewDomainController > domainController = new InjectedValue < NewDomainController > ( ) ; private String name ; @ Override public synchronized ModelNode register ( final NewHostController hostController ) { assert hostController != null : "null<seq2seq4repair_space>HC" ; final NewDomainController domainController = this . domainController . getValue ( ) ; this . name = hostController . getName ( ) ; final NewHostControllerClient client = new NewLocalDomainConnectionService . NewLocalHostControllerClient ( hostController ) ; domainController . addClient ( client ) ; <START_BUG> return domainController . getModel ( ) ; <END_BUG> } @ Override public ModelNode getProfileOperations ( String profileName ) { } @ Override public synchronized void unregister ( ) { } @ Override public synchronized FileRepository getRemoteFileRepository ( ) { } @ Override public synchronized void start ( StartContext context ) throws StartException { } @ Override public synchronized void stop ( StopContext context ) { } @ Override public synchronized NewDomainControllerConnection getValue ( ) throws IllegalArgumentException , IllegalStateException { } InjectedValue < NewDomainController > getDomainController ( ) { } static class NewLocalHostControllerClient implements NewHostControllerClient { private final NewHostController controller ; NewLocalHostControllerClient ( final NewHostController controller ) { } @ Override public Cancellable execute ( ModelNode operation , ResultHandler handler ) { } @ Override public ModelNode execute ( ModelNode operation ) throws CancellationException , OperationFailedException { } @ Override public String getId ( ) { } @ Override public boolean isActive ( ) { } } }

Fix:
return domainController . getDomainModel ( ) ;
Buggy code:
public class SecurityRealmChildRemoveHandler extends SecurityRealmParentRestartHandler { private final boolean validateAuthentication ; private final boolean validateRbac ; public SecurityRealmChildRemoveHandler ( boolean validateAuthentication , boolean validateRbac ) { } @ Override protected void updateModel ( OperationContext context , ModelNode operation ) throws OperationFailedException { context . removeResource ( EMPTY_ADDRESS ) ; if ( ( validateAuthentication ) && ( ! ( context . isBooting ( ) ) ) ) { ModelNode validationOp = AuthenticationValidatingHandler . createOperation ( operation ) ; context . addStep ( validationOp , INSTANCE , MODEL ) ; } if ( validateRbac ) { <START_BUG> RbacSanityCheckOperation . registerOperation ( context ) ; <END_BUG> } } }

Fix:
RbacSanityCheckOperation . addOperation ( context ) ;
Buggy code:
public class Tstamp extends Task { private Vector customFormats = new Vector ( ) ; private String prefix = "" ; public void setPrefix ( String prefix ) { } public void execute ( ) throws BuildException { } public Tstamp . CustomFormat createFormat ( ) { } private void setProperty ( String name , String value ) { } public class CustomFormat { private TimeZone timeZone ; private String propertyName ; private String pattern ; private String language ; private String country ; private String variant ; private int offset = 0 ; private int field = Calendar . DATE ; public CustomFormat ( ) { } public void setProperty ( String propertyName ) { } public void setPattern ( String pattern ) { } public void setLocale ( String locale ) { } public void setTimezone ( String id ) { } public void setOffset ( int offset ) { } public void setUnit ( String unit ) { } public void setUnit ( Tstamp . Unit unit ) { } public void execute ( Project project , Date date , Location location ) { } } public static class Unit extends EnumeratedAttribute { private static final String MILLISECOND = "millisecond" ; private static final String SECOND = "second" ; private static final String MINUTE = "minute" ; private static final String HOUR = "hour" ; private static final String DAY = "day" ; private static final String WEEK = "week" ; private static final String MONTH = "month" ; private static final String YEAR = "year" ; private static final String [ ] UNITS = new String [ ] { Tstamp . Unit . MILLISECOND , Tstamp . Unit . SECOND , Tstamp . Unit . MINUTE , Tstamp . Unit . HOUR , Tstamp . Unit . DAY , Tstamp . Unit . WEEK , Tstamp . Unit . MONTH , Tstamp . Unit . YEAR } ; private Map calendarFields = new HashMap ( ) ; public Unit ( ) { } public int getCalendarField ( ) { <START_BUG> String key = getValue ( ) . toLowerCase ( ) ; <END_BUG> Integer i = ( ( Integer ) ( calendarFields . get ( key ) ) ) ; return i . intValue ( ) ; } public String [ ] getValues ( ) { } } }

Fix:
String key = getValue ( ) . toLowerCase ( Locale . ENGLISH ) ;
Buggy code:
public class XpandComponent extends AbstractExpressionsUsingWorkflowComponent { private String _genPath = null ; private String _srcPath = null ; private String _expand = null ; private String _fileEncoding = null ; private boolean _automaticHyphens = false ; private Output _output = null ; private final List < Outlet > _outlets = new ArrayList < Outlet > ( ) ; private List < PostProcessor > _postprocessors = new ArrayList < PostProcessor > ( ) ; private List < Outlet > _initializedOutlets = new ArrayList < Outlet > ( ) ; private String _ignoreList ; private boolean _defaultExcludes ; private boolean _useBase64 ; public XpandComponent ( ) { } public List < PostProcessor > getBeautifier ( ) { } public void addBeautifier ( PostProcessor beautifier ) { } public List < PostProcessor > getPostprocessors ( ) { } public void addPostprocessor ( PostProcessor postprocessor ) { } public void setAutomaticHyphens ( boolean automaticHyphens ) { } @ Override public String getLogMessage ( ) { } public void setFileEncoding ( final String fileEncoding ) { } public String getFileEncoding ( ) { } public void setExpand ( String invoke ) { } @ Deprecated public void setGenPath ( final String genPath ) { } @ Deprecated public void setSrcPath ( final String srcPath ) { } public void setIgnoreList ( String ignoreList ) { } public void setDefaultExcludes ( boolean defaultExcludes ) { } public void setUseBase64 ( boolean useBase64 ) { } private String fixPath ( final String p ) { } @ Override protected void invokeInternal2 ( WorkflowContext wfContext , ProgressMonitor monitor , Issues issues ) { XpandExecutionContextImpl executionContext = new XpandExecutionContextImpl ( getOutput ( ) , null , getGlobalVars ( wfContext ) , null , getNullEvaluationHandler ( ) ) ; if ( ( _fileEncoding ) != null ) <START_BUG> executionContext . setFileEncoding ( _fileEncoding ) ; <END_BUG> final String code = ( ( ( XpandTokens . LT ) + "EXPAND<seq2seq4repair_space>" ) + ( _expand ) ) + ( XpandTokens . RT ) ; final String filename = new String ( _expand . substring ( 0 , _expand . lastIndexOf ( NS_DELIM ) ) ) ; XpandBackendFacade bf = XpandBackendFacade . createForFile ( filename , _fileEncoding , metaModels , _outlets ) ; final Map < String , Object > variables = new HashMap < String , Object > ( ) ; for ( String name : wfContext . getSlotNames ( ) ) variables . put ( name , wfContext . get ( name ) ) ; XpandProtectedRegionResolver resolver = new XpandProtectedRegionResolver ( _ignoreList , _defaultExcludes , getInitializedOutlets ( ) , _fileEncoding , _useBase64 ) ; bf . executeStatement ( code , variables , _advice , resolver ) ; } public void addOutlet ( Outlet outlet ) { } public void setOutput ( Output output ) { } private Output getOutput ( ) { } private List < Outlet > getInitializedOutlets ( ) { } private ExpandStatement getStatement ( ) { } @ Override public void checkConfigurationInternal ( final Issues issues ) { } }

Fix:
executionContext . getResourceManager ( ) . setFileEncoding ( _fileEncoding ) ;
Buggy code:
public class RequestInfo { private static final Log LOG = new Log ( ) ; private static ThreadLocal < RequestInfo > instance = new ThreadLocal < RequestInfo > ( ) { @ Override protected RequestInfo initialValue ( ) { } } ; public static RequestInfo get ( ) { } public static void clear ( String url ) { } public static void clear ( ) { } private Long blocked ; private Long dns ; private Long connect ; private Long ssl ; private Long send ; private Long wait ; private Long receive ; private String resolvedAddress ; private Date start ; private Date end ; private String url ; private Long ping ( Date start , Date end ) { } public Long getBlocked ( ) { } public Long getDns ( ) { } public Long getConnect ( ) { } public Long getSsl ( ) { } public Long getSend ( ) { } public Long getWait ( ) { } public Long getReceive ( ) { } public String getResolvedAddress ( ) { } public void blocked ( Date start , Date end ) { } public void dns ( Date start , Date end , String resolvedAddress ) { } public void connect ( Date start , Date end ) { } public void ssl ( Date start , Date end ) { } public void send ( Date start , Date end ) { } public void wait ( Date start , Date end ) { } public void finish ( ) { } private long norm ( Long val ) { } public Date getStart ( ) { } public Date getEnd ( ) { } public long getTotalTime ( ) { } @ Override public String toString ( ) { } public HarTimings getTimings ( ) { long send = 0 ; if ( ( this . send ) != null ) { send = this . send ; } long wait = 0 ; if ( ( this . wait ) != null ) { wait = this . wait ; } long receive = 0 ; if ( ( this . receive ) != null ) { receive = this . receive ; } long blocked = 0 ; if ( ( this . blocked ) != null ) { blocked = this . blocked ; } long dns = 0 ; if ( ( this . dns ) != null ) { dns = this . dns ; } long connect = 0 ; if ( ( this . connect ) != null ) { <START_BUG> receive = this . connect ; <END_BUG> } return new HarTimings ( blocked , dns , connect , send , wait , receive ) ; } }

Fix:
connect = this . connect ;
Buggy code:
@ Controller @ RequestMapping ( "//candidate" ) public class CandidateController extends AbstractBaseController { @ Autowired private UserService userService ; @ Autowired private MailService mailService ; @ Autowired private WithdrawRequestService withdrawRequestService ; @ Autowired private GDELogoutSuccessHandler logoutHandler ; @ RequestMapping ( "//success" ) public ModelAndView candidateDataSuccess ( final HttpServletRequest request , final HttpServletResponse response , final Locale locale ) { } @ RequestMapping ( "//review" ) public ModelAndView candidateDataReview ( final HttpServletRequest request , final HttpServletResponse response , final Locale locale ) { } @ RequestMapping ( "//withdraw" ) public void withdrawApllicatipon ( final HttpServletRequest request , final HttpServletResponse response , final Locale locale ) { } private MailMetaData getMailMetaDataForWithdrawApplicationMail ( final Locale locale , final String contextpath ) { List < String > toList = new ArrayList < String > ( ) ; <START_BUG> toList . add ( ADMIN_EMAIL_ADDRESS ) ; <END_BUG> MailMetaData mailMetaData = new MailMetaData ( ) ; mailMetaData . setToAddresses ( toList ) ; mailMetaData . setSubject ( getMessageSource ( ) . getMessage ( "withdraw.application.mail.subject" , null , locale ) ) ; mailMetaData . setFromName ( getMessageSource ( ) . getMessage ( "gde.sender.name" , null , locale ) ) ; mailMetaData . setTemplateName ( GDEStringUtils . concat ( locale , WITHDRAW_APPLICATION_TEMPLATE ) ) ; mailMetaData . setContextPath ( contextpath ) ; mailMetaData . setReplyTo ( SUPPORT_CONTACT_EMAIL ) ; mailMetaData . setFromAddress ( SUPPORT_CONTACT_EMAIL ) ; return mailMetaData ; } private void sentWithdrawMail ( final MailMetaData mailMetaData , final String reason , final Locale locale , final GdeUser user ) { } @ RequestMapping ( "//withdrawmessage" ) public ModelAndView withdrawMesssagePage ( HttpServletRequest request , HttpServletResponse response ) { } No newline ; at end ; of file ; }

Fix:
toList . add ( getMessageSource ( ) . getMessage ( "support.email.address" , null , Locale . ENGLISH ) ) ;
Buggy code:
public abstract class AbstractControllerService implements Service < ModelController > { public static final String BOOT_STACK_SIZE_PROPERTY = "jboss.boot.thread.stack.size" ; public static final int DEFAULT_BOOT_STACK_SIZE = ( 2 * 1024 ) * 1024 ; private static int getBootStackSize ( ) { } private final ProcessType processType ; private final RunningModeControl runningModeControl ; private final DescriptionProvider rootDescriptionProvider ; private final ControlledProcessState processState ; private final OperationStepHandler prepareStep ; private final InjectedValue < ExecutorService > injectedExecutorService = new InjectedValue < ExecutorService > ( ) ; private final ExpressionResolver expressionResolver ; private volatile ModelControllerImpl controller ; private ConfigurationPersister configurationPersister ; protected AbstractControllerService ( final ProcessType processType , final RunningModeControl runningModeControl , final ConfigurationPersister configurationPersister , final ControlledProcessState processState , final DescriptionProvider rootDescriptionProvider , final OperationStepHandler prepareStep , final ExpressionResolver expressionResolver ) { } public void start ( final StartContext context ) throws StartException { } protected void boot ( final BootContext context ) throws ConfigurationPersistenceException { } protected boolean boot ( List < ModelNode > bootOperations , boolean rollbackOnRuntimeFailure ) throws ConfigurationPersistenceException { <START_BUG> return controller . boot ( bootOperations , logging , COMMIT , false ) ; <END_BUG> } protected void finishBoot ( ) throws ConfigurationPersistenceException { } public void stop ( final StopContext context ) { } public ModelController getValue ( ) throws IllegalArgumentException , IllegalStateException { } public InjectedValue < ExecutorService > getExecutorServiceInjector ( ) { } protected void setConfigurationPersister ( final ConfigurationPersister persister ) { } protected abstract void initModel ( Resource rootResource , ManagementResourceRegistration rootRegistration ) { } }

Fix:
return controller . boot ( bootOperations , logging , COMMIT , rollbackOnRuntimeFailure ) ;
Buggy code:
public class PairOutputs < A , B > extends Outputs < PairOutputs . Pair < A , B > > { private final PairOutputs . Pair < A , B > NO_OUTPUT ; private final Outputs < A > outputs1 ; private final Outputs < B > outputs2 ; public static class Pair < A , B > { public final A output1 ; public final B output2 ; public Pair ( A output1 , B output2 ) { } @ Override <START_BUG> @ SuppressWarnings ( "unchecked" ) <END_BUG> public boolean equals ( Object other ) { if ( other == ( this ) ) { return true ; } else if ( other instanceof PairOutputs . Pair ) { PairOutputs . Pair pair = ( ( PairOutputs . Pair ) ( other ) ) ; return ( output1 . equals ( pair . output1 ) ) && ( output2 . equals ( pair . output2 ) ) ; } else { return false ; } } @ Override public int hashCode ( ) { } } public PairOutputs ( Outputs < A > outputs1 , Outputs < B > outputs2 ) { } public PairOutputs . Pair < A , B > get ( A output1 , B output2 ) { } @ Override public PairOutputs . Pair < A , B > common ( PairOutputs . Pair < A , B > pair1 , PairOutputs . Pair < A , B > pair2 ) { } @ Override public PairOutputs . Pair < A , B > subtract ( PairOutputs . Pair < A , B > output , PairOutputs . Pair < A , B > inc ) { } @ Override public PairOutputs . Pair < A , B > add ( PairOutputs . Pair < A , B > prefix , PairOutputs . Pair < A , B > output ) { } @ Override public void write ( PairOutputs . Pair < A , B > output , DataOutput writer ) throws IOException { } @ Override public PairOutputs . Pair < A , B > read ( DataInput in ) throws IOException { } @ Override public PairOutputs . Pair < A , B > getNoOutput ( ) { } @ Override public String outputToString ( PairOutputs . Pair < A , B > output ) { } }

Fix:
@ SuppressWarnings ( "rawtypes" )
Buggy code:
} <START_BUG> final LineFileDocs docs = new LineFileDocs ( true ) ; <END_BUG>

Fix:
final LineFileDocs docs = new LineFileDocs ( random ) ;
Buggy code:
public class SendAction extends FrameAction { public SendAction ( AbstractFrameController frameController ) { } public void actionPerformed ( ActionEvent evt ) { <START_BUG> final ComposerController composerController = ( ( ComposerController ) ( getFrameController ( ) ) ) ; <END_BUG> if ( composerController . checkState ( ) ) return ; OutboxFolder outboxFolder = ( ( OutboxFolder ) ( treeModel . getFolder ( 103 ) ) ) ; ComposerCommandReference [ ] r = new ComposerCommandReference [ 1 ] ; r [ 0 ] = new ComposerCommandReference ( composerController , outboxFolder ) ; SendMessageCommand c = new SendMessageCommand ( r ) ; processor . addOp ( c ) ; } }

Fix:
final ComposerController composerController = ( ( ComposerController ) ( getFrameMediator ( ) ) ) ;
Buggy code:
public class CastExpression extends Expression { public Expression expression ; public Expression type ; public CastExpression ( Expression expression , Expression type ) { } public FlowInfo analyseCode ( BlockScope currentScope , FlowContext flowContext , FlowInfo flowInfo ) { } public final boolean checkCastTypesCompatibility ( BlockScope scope , TypeBinding castType , TypeBinding expressionType ) { } public static void checkNeedForArgumentCasts ( BlockScope scope , Expression receiver , ReferenceBinding receiverType , MethodBinding binding , Expression [ ] arguments , TypeBinding [ ] argumentTypes , final InvocationSite invocationSite ) { } public static void checkNeedForArgumentCasts ( BlockScope scope , int operator , int operatorSignature , Expression left , int leftTypeId , boolean leftIsCast , Expression right , int rightTypeId , boolean rightIsCast ) { } private static void checkAlternateBinding ( BlockScope scope , Expression receiver , ReferenceBinding receiverType , MethodBinding binding , Expression [ ] arguments , TypeBinding [ ] originalArgumentTypes , TypeBinding [ ] alternateArgumentTypes , final InvocationSite invocationSite ) { } public void generateCode ( BlockScope currentScope , CodeStream codeStream , boolean valueRequired ) { } public Expression innermostCastedExpression ( ) { } public StringBuffer printExpression ( int indent , StringBuffer output ) { } public TypeBinding resolveType ( BlockScope scope ) { constant = Constant . NotAConstant ; implicitConversion = TypeIds . T_undefined ; if ( ( ( type ) instanceof TypeReference ) || ( ( ( type ) instanceof NameReference ) && ( ( ( ( type . bits ) & ( AstNode . ParenthesizedMASK ) ) > > ( AstNode . ParenthesizedSHIFT ) ) == 0 ) ) ) { this . resolvedType = type . resolveType ( scope ) ; TypeBinding expressionType = expression . resolveType ( scope ) ; if ( ( ( this . resolvedType ) != null ) && ( expressionType != null ) ) { boolean necessary = checkCastTypesCompatibility ( scope , this . resolvedType , expressionType ) ; <START_BUG> if ( ! necessary ) { <END_BUG> this . bits |= UnnecessaryCastMask ; if ( ( ( this . bits ) & ( IgnoreNeedForCastCheckMASK ) ) == 0 ) { scope . problemReporter ( ) . unnecessaryCast ( this ) ; } } } return this . resolvedType ; } else { TypeBinding expressionType = expression . resolveType ( scope ) ; if ( expressionType == null ) return null ; scope . problemReporter ( ) . invalidTypeReference ( type ) ; return null ; } } public void traverse ( IAbstractSyntaxTreeVisitor visitor , BlockScope blockScope ) { } }

Fix:
if ( ( ! necessary ) && ( ( this . expression . resolvedType ) != null ) ) {
Buggy code:
public class MappingJackson2XmlHttpMessageConverterTests { private final MappingJackson2XmlHttpMessageConverter converter = new MappingJackson2XmlHttpMessageConverter ( ) ; @ Test public void canRead ( ) { } @ Test public void canWrite ( ) { } @ Test public void read ( ) throws IOException { } @ Test public void write ( ) throws IOException { } @ Test ( expected = HttpMessageNotReadableException . class ) public void readInvalidXml ( ) throws IOException { } @ Test public void readValidXmlWithUnknownProperty ( ) throws IOException { } @ Test public void jsonView ( ) throws Exception { MockHttpOutputMessage outputMessage = new MockHttpOutputMessage ( ) ; MappingJackson2XmlHttpMessageConverterTests . JacksonViewBean bean = new MappingJackson2XmlHttpMessageConverterTests . JacksonViewBean ( ) ; bean . setWithView1 ( "with" ) ; bean . setWithView2 ( "with" ) ; bean . setWithoutView ( "without" ) ; MappingJacksonValue jacksonValue = new MappingJacksonValue ( bean ) ; jacksonValue . setSerializationView ( MappingJackson2XmlHttpMessageConverterTests . MyJacksonView1 . class ) ; this . writeInternal ( jacksonValue , outputMessage ) ; String result = outputMessage . getBodyAsString ( Charset . forName ( "UTF-8" ) ) ; assertThat ( result , containsString ( "<withView1>with<//withView1>" ) ) ; assertThat ( result , not ( containsString ( "<withView2>with<//withView2>" ) ) ) ; <START_BUG> assertThat ( result , containsString ( "<withoutView>without<//withoutView>" ) ) ; <END_BUG> } @ Test public void customXmlMapper ( ) { } private void writeInternal ( Object object , HttpOutputMessage outputMessage ) throws IllegalAccessException , NoSuchMethodException , InvocationTargetException { } public static class MyBean { private String string ; private int number ; private float fraction ; private String [ ] array ; private boolean bool ; private byte [ ] bytes ; public byte [ ] getBytes ( ) { } public void setBytes ( byte [ ] bytes ) { } public boolean isBool ( ) { } public void setBool ( boolean bool ) { } public String getString ( ) { } public void setString ( String string ) { } public int getNumber ( ) { } public void setNumber ( int number ) { } public float getFraction ( ) { } public void setFraction ( float fraction ) { } public String [ ] getArray ( ) { } public void setArray ( String [ ] array ) { } } private interface MyJacksonView1 { } private interface MyJacksonView2 { } private static class JacksonViewBean { @ JsonView ( MappingJackson2XmlHttpMessageConverterTests . MyJacksonView1 . class ) private String withView1 ; @ JsonView ( MappingJackson2XmlHttpMessageConverterTests . MyJacksonView2 . class ) private String withView2 ; private String withoutView ; public String getWithView1 ( ) { } public void setWithView1 ( String withView1 ) { } public String getWithView2 ( ) { } public void setWithView2 ( String withView2 ) { } public String getWithoutView ( ) { } public void setWithoutView ( String withoutView ) { } } private static class MyXmlMapper extends XmlMapper { } }

Fix:
assertThat ( result , not ( containsString ( "<withoutView>without<//withoutView>" ) ) ) ;
Buggy code:
public class MainActivity extends Activity implements BrandsFragment . OnButtonClickListener , EditFragment . OnEditListener , ModelsFragment . OnButtonClickListener { private static final String BRANDS_MODE = "brands_mode" ; private static final String MODELS_MODE = "models_mode" ; private static final String ENGINES_MODE = "engines_mode" ; private String mode = MainActivity . ENGINES_MODE ; FragmentTransaction fragTrans ; BrandsFragment brandsFragment ; ModelsFragment modelsFragment ; ItemsListFragment listFragment ; EditFragment editFragment ; DB dataBase ; ArrayList < Item > currentItemsList ; @ Override protected void onCreate ( Bundle savedInstanceState ) { } @ Override public void onBackPressed ( ) { } void setListMode ( String mode ) { } void initItemsList ( List list ) { } @ Override public void onEdit ( View v , String name ) { } private void deleteItem ( int id ) { } private void addItem ( String name ) { DB db = new DB ( getApplicationContext ( ) ) ; db . open ( ) ; switch ( mode ) { case MainActivity . BRANDS_MODE : db . addBrand ( name ) ; brandsFragment . init ( ) ; break ; case MainActivity . MODELS_MODE : int start = modelsFragment . getEditTextStart ( ) ; int end = modelsFragment . getEditTextEnd ( ) ; if ( ( ( start < 1900 ) && ( start > ( Utils . getCurrentYear ( ) ) ) ) || ( ( end < 1900 ) && ( end > ( Utils . getCurrentYear ( ) ) ) ) ) break ; int brandId = brandsFragment . getSelectedItemId ( ) ; if ( brandId == ( - 1 ) ) { Toast . makeText ( this , "Create<seq2seq4repair_space>a<seq2seq4repair_space>brand<seq2seq4repair_space>first!" , LENGTH_SHORT ) . show ( ) ; } else { db . addModel ( brandsFragment . getSelectedItemId ( ) , name , start , end ) ; <START_BUG> modelsFragment . init ( ) ; <END_BUG> } break ; case MainActivity . ENGINES_MODE : int modelId = modelsFragment . getSelectedItemId ( ) ; if ( modelId == ( - 1 ) ) { Toast . makeText ( this , "Create<seq2seq4repair_space>a<seq2seq4repair_space>model<seq2seq4repair_space>first!" , LENGTH_SHORT ) . show ( ) ; } else { db . addEngine ( modelId , name ) ; } break ; } setListMode ( mode ) ; db . close ( ) ; } private void updateItem ( int id , String name ) { } @ Override public void onButtonClick ( View v ) { } @ Override public void onModelsSpinnerClick ( int modelId ) { } @ Override public void onBrandSpinnerSelect ( int brandId ) { } public class ActionDialog extends AlertDialog { Context context ; protected ActionDialog ( Context context , final View v , final String name ) { } } }

Fix:
modelsFragment . init ( brandId ) ;
Buggy code:
public class HTMLStripCharFilterTest extends LuceneTestCase { @ Override public void setUp ( ) throws Exception { } @ Override public void tearDown ( ) throws Exception { } public void test ( ) throws IOException { } public void testHTML ( ) throws Exception { } public void testGamma ( ) throws Exception { } public void testEntities ( ) throws Exception { } public void testMoreEntities ( ) throws Exception { } public void testReserved ( ) throws Exception { } public void testMalformedHTML ( ) throws Exception { } public void testBufferOverflow ( ) throws Exception { StringBuilder testBuilder = new StringBuilder ( ( ( HTMLStripCharFilter . DEFAULT_READ_AHEAD ) + 50 ) ) ; <START_BUG> testBuilder . append ( "ah<?><seq2seq4repair_space>" ) ; <END_BUG> appendChars ( testBuilder , ( ( HTMLStripCharFilter . DEFAULT_READ_AHEAD ) + 500 ) ) ; processBuffer ( testBuilder . toString ( ) , "Failed<seq2seq4repair_space>on<seq2seq4repair_space>pseudo<seq2seq4repair_space>proc.<seq2seq4repair_space>instr." ) ; testBuilder . setLength ( 0 ) ; testBuilder . append ( "<!--" ) ; appendChars ( testBuilder , ( ( 3 * ( HTMLStripCharFilter . DEFAULT_READ_AHEAD ) ) + 500 ) ) ; testBuilder . append ( "-->foo" ) ; processBuffer ( testBuilder . toString ( ) , "Failed<seq2seq4repair_space>w//<seq2seq4repair_space>comment" ) ; testBuilder . setLength ( 0 ) ; testBuilder . append ( "<?" ) ; appendChars ( testBuilder , ( ( HTMLStripCharFilter . DEFAULT_READ_AHEAD ) + 500 ) ) ; testBuilder . append ( "?>" ) ; processBuffer ( testBuilder . toString ( ) , "Failed<seq2seq4repair_space>with<seq2seq4repair_space>proc.<seq2seq4repair_space>instr." ) ; testBuilder . setLength ( 0 ) ; testBuilder . append ( "<b<seq2seq4repair_space>" ) ; appendChars ( testBuilder , ( ( HTMLStripCharFilter . DEFAULT_READ_AHEAD ) + 500 ) ) ; testBuilder . append ( "//>" ) ; processBuffer ( testBuilder . toString ( ) , "Failed<seq2seq4repair_space>on<seq2seq4repair_space>tag" ) ; } private void appendChars ( StringBuilder testBuilder , int numChars ) { } private void processBuffer ( String test , String assertMsg ) throws IOException { } public void testComment ( ) throws Exception { } public void doTestOffsets ( String in ) throws Exception { } public void testOffsets ( ) throws Exception { } }

Fix:
testBuilder . append ( "ah<?><seq2seq4repair_space>??????" ) ;
Buggy code:
public class OpenAttachmentCommand extends SaveAttachmentCommand { private static final Logger LOG = Logger . getLogger ( "org.columba.mail.gui.attachment.command" ) ; private File tempFile ; private boolean inline = false ; private TempFolder tempFolder ; private Object tempMessageUid ; private MimeHeader header ; public OpenAttachmentCommand ( DefaultCommandReference [ ] references ) { } public void updateGUI ( ) throws Exception { if ( ( header . getMimeType ( ) . getType ( ) . toLowerCase ( ) . indexOf ( "message" ) ) != ( - 1 ) ) { MessageFrameController c = new MessageFrameController ( ) ; FolderCommandReference [ ] r = new FolderCommandReference [ 1 ] ; Object [ ] uidList = new Object [ 1 ] ; uidList [ 0 ] = tempMessageUid ; r [ 0 ] = new FolderCommandReference ( tempFolder , uidList ) ; c . setTreeSelection ( r ) ; c . setTableSelection ( r ) ; processor . addOp ( new org . columba . mail . gui . message . command . ViewMessageCommand ( c , r ) ) ; } else { MimeTypeViewer viewer = new MimeTypeViewer ( ) ; <START_BUG> viewer . open ( header , tempFile ) ; <END_BUG> } } public void execute ( WorkerStatusController worker ) throws Exception { } protected File getDestinationFile ( MimeHeader header ) { } }

Fix:
viewer . open ( header , tempFile , false ) ;
Buggy code:
public class StaffChatCommand implements CommandExecutor { public boolean onCommand ( CommandSender sender , Command command , String string , String [ ] args ) { if ( ! ( betterChat . getConfig ( ) . getBoolean ( "Settings.Staff<seq2seq4repair_space>Chat<seq2seq4repair_space>Enabled" ) ) ) { sender . sendMessage ( ( ( ChatColor . RED ) + "Staff<seq2seq4repair_space>chat<seq2seq4repair_space>is<seq2seq4repair_space>disabled" ) ) ; return false ; } if ( ! ( sender instanceof Player ) ) { sender . sendMessage ( ( ( ChatColor . RED ) + "This<seq2seq4repair_space>command<seq2seq4repair_space>currently<seq2seq4repair_space>only<seq2seq4repair_space>works<seq2seq4repair_space>for<seq2seq4repair_space>players" ) ) ; return false ; } Player player = ( ( Player ) ( sender ) ) ; if ( ! ( player . hasPermission ( "betterchat.staff" ) ) ) { sender . sendMessage ( ( ( ChatColor . RED ) + "You<seq2seq4repair_space>do<seq2seq4repair_space>not<seq2seq4repair_space>have<seq2seq4repair_space>permission<seq2seq4repair_space>to<seq2seq4repair_space>run<seq2seq4repair_space>this<seq2seq4repair_space>command" ) ) ; return false ; } if ( ( args . length ) == 0 ) { sender . sendMessage ( ( ( ChatColor . RED ) + "Correct<seq2seq4repair_space>usage:<seq2seq4repair_space>//staffchat<seq2seq4repair_space><message>" ) ) ; return false ; } StringBuilder stringBuilder = new StringBuilder ( ) ; for ( String value : args ) { stringBuilder . append ( value ) . append ( "<seq2seq4repair_space>" ) ; } String message = stringBuilder . toString ( ) ; if ( betterChat . getConfig ( ) . getBoolean ( "Settings.Enable<seq2seq4repair_space>Chat<seq2seq4repair_space>Color" ) ) { message = ChatColor . translateAlternateColorCodes ( '&' , message ) ; } String prefix = ChatColor . translateAlternateColorCodes ( '&' , betterChat . getConfig ( ) . getString ( "Settings.Staff<seq2seq4repair_space>Chat<seq2seq4repair_space>Prefix" ) ) ; for ( Player player1 : Bukkit . getOnlinePlayers ( ) ) { if ( player1 . hasPermission ( "betterchat.staff" ) ) { <START_BUG> player1 . sendMessage ( ( ( ( ( ( ( prefix + "<seq2seq4repair_space>" ) + ( ChatColor . GOLD ) ) + ( player . getDisplayName ( ) ) ) + "<seq2seq4repair_space>" ) + ( ChatColor . RESET ) ) + message ) ) ; <END_BUG> } } return false ; } }

Fix:
player1 . sendMessage ( ( ( ( ( ( ( prefix + "<seq2seq4repair_space>" ) + ( ChatColor . GOLD ) ) + ( player . getDisplayName ( ) ) ) + ( ChatColor . RESET ) ) + ":<seq2seq4repair_space>" ) + message ) ) ;
Buggy code:
public class Dungeon { private CatConfig cnf = null ; private World world ; private final ArrayList < CatLevel > levels = new ArrayList < CatLevel > ( ) ; private String name ; private String builder ; private CatMat major ; private CatMat minor ; private static Map < String , PrePlanned > hut_list = null ; private Boolean built = false ; public void setBuilt ( Boolean built ) { } public Dungeon ( String name , CatConfig cnf , World world ) { } public Dungeon ( String name , CatConfig cnf , World world , CatMat major , CatMat minor ) { } public void add ( CatLevel l ) { } @ Override public String toString ( ) { } public void show ( ) { } public CatMat getMajor ( ) { } public void setMajor ( CatMat major ) { } public CatMat getMinor ( ) { } public void setMinor ( CatMat minor ) { } public String getName ( ) { } public Boolean isOk ( ) { } public void guessMajor ( ) { } public void debugMajor ( ) { } public ArrayList < String > summary ( ) { } public Boolean overlaps ( CatCuboid that ) { } public Boolean isProtected ( Block blk ) { } public Boolean isSuspened ( Block blk ) { } public Boolean isInRaw ( Block blk ) { } public void setBuilder ( String builder ) { } public String getBuilder ( ) { } public void prospect ( Player p , int x , int y , int z , Direction dir , int maxLevels ) { } public void render ( BlockChangeHandler handler ) { } public void delete ( BlockChangeHandler handler ) { } public void reset ( ) { } public void suspend ( EbeanServer db ) { } public void enable ( EbeanServer db ) { for ( CatLevel l : levels ) { <START_BUG> l . suspend ( major ) ; <END_BUG> } if ( db != null ) { List < dbLevel > list = db . find ( dbLevel . class ) . where ( ) . ieq ( "dname" , name ) . findList ( ) ; if ( ( list != null ) && ( ! ( list . isEmpty ( ) ) ) ) { for ( dbLevel cube : list ) { cube . setEnable ( true ) ; db . save ( cube ) ; } } } } public void remove ( EbeanServer db ) { } private Location getSafePlace ( Block blk ) { } public CatLevel getLowest ( CatCuboid . Type type ) { } public Location getTopLocation ( ) { } public Location getBotLocation ( ) { } public Boolean teleportToTop ( Player player ) { } public Boolean teleportToBot ( Player player ) { } public void teleport ( Player p , Location loc ) { } public void saveDB ( EbeanServer db ) { } public Boolean isBuilt ( ) { } public Boolean isNatural ( ) { } public Boolean isInhabited ( ) { } public void allPlayersToTop ( ) { } public void allPlayersToTopProt ( ) { } public void registerCubes ( MultiWorldProtect prot ) { } public void unregisterCubes ( MultiWorldProtect prot ) { } private static void setup_huts ( ) { } public PrePlanned getHut ( String name ) { } }

Fix:
l . enable ( major ) ;
Buggy code:
public class InfinispanSessionManagerFactoryBuilder implements SessionManagerFactoryBuilder { public static final String DEFAULT_CACHE_CONTAINER = "web" ; @ Override public ServiceBuilder < SessionManagerFactory > buildDeploymentDependency ( ServiceTarget target , ServiceName name , SessionManagerConfiguration config ) { ServiceName templateCacheServiceName = InfinispanSessionManagerFactoryBuilder . getCacheServiceName ( config . getCacheName ( ) ) ; String templateCacheName = templateCacheServiceName . getSimpleName ( ) ; ServiceName containerServiceName = templateCacheServiceName . getParent ( ) ; String containerName = containerServiceName . getSimpleName ( ) ; String cacheName = config . getDeploymentName ( ) ; ServiceName cacheConfigurationServiceName = CacheConfigurationService . getServiceName ( containerName , cacheName ) ; ServiceName cacheServiceName = CacheService . getServiceName ( containerName , cacheName ) ; SessionCacheConfigurationService . build ( target , containerName , cacheName , templateCacheName ) . setInitialMode ( ON_DEMAND ) . install ( ) ; final InjectedValue < EmbeddedCacheManager > cacheContainer = new InjectedValue ( ) ; CacheService . Dependencies dependencies = new CacheService . Dependencies ( ) { @ Override public EmbeddedCacheManager getCacheContainer ( ) { return cacheContainer . getValue ( ) ; } @ Override public XAResourceRecoveryRegistry getRecoveryRegistry ( ) { return null ; } } ; <START_BUG> AsynchronousService . addService ( target , cacheServiceName , new CacheService ( cacheName , dependencies ) ) . addAliases ( RouteLocatorService . getCacheServiceAlias ( cacheName ) ) . addDependency ( cacheConfigurationServiceName ) . addDependency ( containerServiceName , EmbeddedCacheManager . class , cacheContainer ) . addDependency ( GlobalComponentRegistryService . getServiceName ( containerName ) ) . setInitialMode ( ON_DEMAND ) . install ( ) ; <END_BUG> return InfinispanSessionManagerFactory . build ( target , name , containerName , cacheName , config ) ; } private static ServiceName getCacheServiceName ( String cacheName ) { } }

Fix:
AsynchronousService . addService ( target , cacheServiceName , new CacheService ( cacheName , dependencies ) ) . addAliases ( InfinispanRouteLocatorService . getCacheServiceAlias ( cacheName ) ) . addDependency ( cacheConfigurationServiceName ) . addDependency ( containerServiceName , EmbeddedCacheManager . class , cacheContainer ) . addDependency ( GlobalComponentRegistryService . getServiceName ( containerName ) ) . setInitialMode ( ON_DEMAND ) . install ( ) ;
Buggy code:
public class HttpListenerAdd extends AbstractListenerAdd { HttpListenerAdd ( AbstractListenerResourceDefinition definition ) { } protected ServiceName constructServiceName ( final String name ) { <START_BUG> return HTTP_LISTENER . append ( name ) ; <END_BUG> } @ Override AbstractListenerService < ? extends AbstractListenerService > createService ( String name , OperationContext context , ModelNode model ) throws OperationFailedException { } @ Override void configureAdditionalDependencies ( OperationContext context , ServiceBuilder < ? extends AbstractListenerService > serviceBuilder , ModelNode model , AbstractListenerService service ) throws OperationFailedException { } }

Fix:
return LISTENER . append ( name ) ;
Buggy code:
public class SoapSampler extends HTTPSampler2 implements Interruptible { private static final Logger log = LoggingManager . getLoggerForClass ( ) ; public static final String XML_DATA = "HTTPSamper.xml_data" ; public static final String URL_DATA = "SoapSampler.URL_DATA" ; public static final String SOAP_ACTION = "SoapSampler.SOAP_ACTION" ; public static final String SEND_SOAP_ACTION = "SoapSampler.SEND_SOAP_ACTION" ; public static final String XML_DATA_FILE = "SoapSampler.xml_data_file" ; private static final String DOUBLE_QUOTE = "\"" ; private static final String SOAPACTION = "SOAPAction" ; private static final String ENCODING = "utf-8" ; private static final String DEFAULT_CONTENT_TYPE = "text//xml" ; public void setXmlData ( String data ) { } public String getXmlData ( ) { } public void setXmlFile ( String filename ) { } public String getXmlFile ( ) { } public String getURLData ( ) { } public void setURLData ( String url ) { } public String getSOAPAction ( ) { } public String getSOAPActionQuoted ( ) { } public void setSOAPAction ( String action ) { } public boolean getSendSOAPAction ( ) { } public void setSendSOAPAction ( boolean action ) { } protected int setPostHeaders ( PostMethod post ) { int length = 0 ; if ( ( getHeaderManager ( ) ) != null ) { HeaderManager mngr = getHeaderManager ( ) ; int headerSize = mngr . size ( ) ; for ( int idx = 0 ; idx < headerSize ; idx ++ ) { Header hd = mngr . getHeader ( idx ) ; if ( HEADER_CONTENT_LENGTH . equalsIgnoreCase ( hd . getName ( ) ) ) { length = Integer . parseInt ( hd . getValue ( ) ) ; } } } else { <START_BUG> post . addParameter ( HEADER_CONTENT_TYPE , SoapSampler . DEFAULT_CONTENT_TYPE ) ; <END_BUG> } if ( getSendSOAPAction ( ) ) { post . setRequestHeader ( SoapSampler . SOAPACTION , getSOAPActionQuoted ( ) ) ; } return length ; } private String sendPostData ( PostMethod post , final int length ) { } @ Override protected HTTPSampleResult sample ( URL url , String method , boolean areFollowingRedirect , int frameDepth ) { } @ Override public URL getUrl ( ) throws MalformedURLException { } }

Fix:
post . setRequestHeader ( HEADER_CONTENT_TYPE , SoapSampler . DEFAULT_CONTENT_TYPE ) ;
Buggy code:
public class Fighter implements Comparable < Fighter > { public final String name ; public final int strength ; public final int dexterity ; public final int stamina ; public final int melee ; public final int wits ; public final int awareness ; public final Weapon weapon ; public final Armor armor ; public final Strategy strategy ; public int health ; public int initaitve ; public int crashCount ; public int onslaught ; public Fighter ( String name , int strength , int dexterity , int stamina , int melee , int wits , int awareness , Weapon weapon , Armor armor , Strategy strategy ) { } public void reset ( ) { } public int joinBattle ( Stunt stunt ) { } public Attack attackAgainst ( Fighter target ) { } public boolean loseInitative ( int damage ) { } public int witheringAttack ( Stunt stunt ) { } public int witheringDamage ( ) { } public int witheringSoak ( ) { } public int decisiveAttack ( Stunt stunt ) { } public int decisiveDamage ( ) { } public int defense ( Stunt stunt ) { } public void resetToBaseInitiative ( ) { <START_BUG> this . initaitve = Math . max ( initaitve , 3 ) ; <END_BUG> } public int woundPenalty ( ) { } @ Override public String toString ( ) { } @ Override public boolean equals ( Object obj ) { } @ Override public int hashCode ( ) { } @ Override public int compareTo ( Fighter f ) { } public boolean loseHealth ( int damage ) { } public boolean isCrashed ( ) { } public String status ( ) { } }

Fix:
this . initaitve = Math . min ( Math . max ( initaitve , 3 ) , 3 ) ;
Buggy code:
public class LoadTask implements Runnable , LongTask { private File file ; private GephiReader gephiReader ; private boolean cancel = false ; private ProgressTicket progressTicket ; public LoadTask ( File file ) { } public void run ( ) { try { Progress . start ( progressTicket ) ; Progress . setDisplayName ( progressTicket , NbBundle . getMessage ( LoadTask . class , "LoadTask.name" ) ) ; FileObject fileObject = FileUtil . toFileObject ( file ) ; if ( FileUtil . isArchiveFile ( fileObject ) ) { fileObject = FileUtil . getArchiveRoot ( fileObject ) . getChildren ( ) [ 0 ] ; } XMLInputFactory inputFactory = XMLInputFactory . newInstance ( ) ; if ( inputFactory . isPropertySupported ( "javax.xml.stream.isValidating" ) ) { inputFactory . setProperty ( "javax.xml.stream.isValidating" , Boolean . FALSE ) ; } inputFactory . setXMLReporter ( new XMLReporter ( ) { @ Override public void report ( String message , String errorType , Object relatedInformation , Location location ) throws XMLStreamException { System . out . println ( ( ( ( "Error:" + errorType ) + ",<seq2seq4repair_space>message<seq2seq4repair_space>:<seq2seq4repair_space>" ) + message ) ) ; } } ) ; <START_BUG> InputStreamReader isReader = new InputStreamReader ( fileObject . getInputStream ( ) ) ; <END_BUG> LoadTask . Xml10FilterReader filterReader = new LoadTask . Xml10FilterReader ( isReader ) ; XMLStreamReader reader = inputFactory . createXMLStreamReader ( filterReader ) ; if ( ! ( cancel ) ) { Project project = new ProjectImpl ( ) ; project . getLookup ( ) . lookup ( ProjectInformationImpl . class ) . setFile ( file ) ; gephiReader = new GephiReader ( ) ; project = gephiReader . readAll ( reader , project ) ; if ( ! ( cancel ) ) { ProjectControllerImpl pc = Lookup . getDefault ( ) . lookup ( ProjectControllerImpl . class ) ; pc . openProject ( project ) ; } } Progress . finish ( progressTicket ) ; } catch ( Exception ex ) { ex . printStackTrace ( ) ; if ( ex instanceof GephiFormatException ) { throw ( ( GephiFormatException ) ( ex ) ) ; } throw new GephiFormatException ( GephiReader . class , ex ) ; } } public boolean cancel ( ) { } public void setProgressTicket ( ProgressTicket progressTicket ) { } public class Xml10FilterReader extends FilterReader { public Xml10FilterReader ( Reader in ) { } @ Override public int read ( char [ ] cbuf , int off , int len ) throws IOException { } } }

Fix:
InputStreamReader isReader = new InputStreamReader ( fileObject . getInputStream ( ) , "UTF-8" ) ;
Buggy code:
public class RiskBasedThresholdPopulationUniques extends RiskBasedPrivacyCriterion { private static final long serialVersionUID = 618039085843721351L ; private static final int DEFAULT_MAX_ITERATIONS = 1000 ; private static final double DEFAULT_ACCURACY = 1.0E-5 ; private StatisticalPopulationModel statisticalModel ; private ARXPopulationModel populationModel ; public RiskBasedThresholdPopulationUniques ( double riskThreshold , ARXPopulationModel populationModel ) { } public RiskBasedThresholdPopulationUniques ( double riskThreshold , ARXPopulationModel populationModel , double accuracy , int maxIterations ) { } public RiskBasedThresholdPopulationUniques ( double riskThreshold , StatisticalPopulationModel statisticalModel , ARXPopulationModel populationModel ) { } public RiskBasedThresholdPopulationUniques ( double riskThreshold , StatisticalPopulationModel statisticalModel , ARXPopulationModel populationModel , double accuracy , int maxIterations ) { } public ARXPopulationModel getPopulationModel ( ) { } public StatisticalPopulationModel getStatisticalModel ( ) { } @ Override public String toString ( ) { } protected boolean isFulfilled ( HashGroupifyDistribution distribution ) { RiskModelPopulationBasedUniquenessRisk riskModel = new RiskModelPopulationBasedUniquenessRisk ( this . populationModel , distribution . getEquivalenceClasses ( ) , distribution . getNumberOfTuples ( ) ) ; double populationUniques = riskModel . getFractionOfUniqueTuples ( this . statisticalModel ) ; <START_BUG> if ( ( populationUniques > 0.0 ) && ( populationUniques < ( getRiskThreshold ( ) ) ) ) { <END_BUG> return true ; } else if ( ( populationUniques == 0.0 ) && ( ( distribution . getFractionOfTuplesInClassesOfSize ( 1 ) ) == 0.0 ) ) { return true ; } else { return false ; } } No newline ; at end ; of file ; }

Fix:
if ( ( populationUniques > 0.0 ) && ( populationUniques <= ( getRiskThreshold ( ) ) ) ) {
Buggy code:
public class NestedTypeBinding extends SourceTypeBinding { public SourceTypeBinding enclosingType ; public SyntheticArgumentBinding [ ] enclosingInstances ; public SyntheticArgumentBinding [ ] outerLocalVariables ; public int enclosingInstancesSlotSize ; public int outerLocalVariablesSlotSize ; public NestedTypeBinding ( char [ ] [ ] typeName , ClassScope scope , SourceTypeBinding enclosingType ) { } public SyntheticArgumentBinding addSyntheticArgument ( LocalVariableBinding actualOuterLocalVariable ) { } public SyntheticArgumentBinding addSyntheticArgument ( ReferenceBinding targetEnclosingType ) { } public SyntheticArgumentBinding addSyntheticArgumentAndField ( LocalVariableBinding actualOuterLocalVariable ) { } public SyntheticArgumentBinding addSyntheticArgumentAndField ( ReferenceBinding targetEnclosingType ) { } public final void computeSyntheticArgumentSlotSizes ( ) { } public ReferenceBinding enclosingType ( ) { } public SyntheticArgumentBinding getSyntheticArgument ( LocalVariableBinding actualOuterLocalVariable ) { } public SyntheticArgumentBinding [ ] syntheticEnclosingInstances ( ) { } public ReferenceBinding [ ] syntheticEnclosingInstanceTypes ( ) { } public SyntheticArgumentBinding [ ] syntheticOuterLocalVariables ( ) { } public void updateInnerEmulationDependents ( ) { } public SyntheticArgumentBinding getSyntheticArgument ( ReferenceBinding targetEnclosingType , boolean onlyExactMatch ) { if ( ( enclosingInstances ) == null ) return null ; for ( int i = enclosingInstances . length ; ( -- i ) >= 0 ; ) if ( ( enclosingInstances [ i ] . type ) == targetEnclosingType ) if ( ( enclosingInstances [ i ] . actualOuterLocalVariable ) == null ) return enclosingInstances [ i ] ; if ( ! onlyExactMatch ) { for ( int i = enclosingInstances . length ; ( -- i ) >= 0 ; ) if ( ( enclosingInstances [ i ] . actualOuterLocalVariable ) == null ) <START_BUG> if ( ( enclosingInstances [ i ] . type . findSuperTypeWithSameErasure ( targetEnclosingType ) ) != null ) <END_BUG> return enclosingInstances [ i ] ; } return null ; } }

Fix:
if ( ( enclosingInstances [ i ] . type . findSuperTypeOriginatingFrom ( targetEnclosingType ) ) != null )