nus-yam/ex-repair huggingface dataset:
Buggy code:
@ Component public class UserInternaturValidator implements GDEWebConstants , Validator { @ Autowired private FileValidator fileValidator ; @ Override public boolean supports ( final Class < ? > aClass ) { } @ Override public void validate ( final Object object , final Errors err ) { } public void validateRequiredData ( final UserInternaturDetailDto dto , final Errors err ) { <START_BUG> if ( dto . getInternaturFlag ( ) . isBooleanValue ( ) ) { <END_BUG> ValidationUtils . rejectIfEmptyOrWhitespace ( err , "userInternaturDetailDto.internaturFlag" , "required.field" ) ; ValidationUtils . rejectIfEmptyOrWhitespace ( err , "userInternaturDetailDto.universityId" , "required.field" ) ; if ( ( null != ( dto . getUniversityId ( ) ) ) && ( ( - 1 ) == ( dto . getUniversityId ( ) ) ) ) { ValidationUtils . rejectIfEmptyOrWhitespace ( err , "userInternaturDetailDto.otherUniversity" , "required.field" ) ; } ValidationUtils . rejectIfEmptyOrWhitespace ( err , "userInternaturDetailDto.startDate" , "required.field" ) ; ValidationUtils . rejectIfEmptyOrWhitespace ( err , "userInternaturDetailDto.endDate" , "required.field" ) ; ValidationUtils . rejectIfEmptyOrWhitespace ( err , "userInternaturDetailDto.hospital" , "required.field" ) ; ValidationUtils . rejectIfEmptyOrWhitespace ( err , "userInternaturDetailDto.ward" , "required.field" ) ; ValidationUtils . rejectIfEmptyOrWhitespace ( err , "userInternaturDetailDto.mainAreaId" , "required.field" ) ; if ( ( null != ( dto . getMainAreaId ( ) ) ) && ( ( - 1 ) == ( dto . getMainAreaId ( ) ) ) ) { ValidationUtils . rejectIfEmptyOrWhitespace ( err , "userInternaturDetailDto.otherMainArea" , "required.field" ) ; } if ( ( ( ( null != ( dto . getCertificateInternatur ( ) ) ) && ( ( dto . getCertificateInternatur ( ) . getDocId ( ) ) == 0 ) ) && ( GDEStringUtils . isNullOrEmpty ( dto . getCertificateInternatur ( ) . getFileName ( ) ) ) ) && ( ( ( dto . getCertificateInternatur ( ) . getFile ( ) ) == null ) || ( dto . getCertificateInternatur ( ) . getFile ( ) . isEmpty ( ) ) ) ) { ValidationUtils . rejectIfEmptyOrWhitespace ( err , "userInternaturDetailDto.certificateInternatur.file" , "required.field" ) ; } ValidationUtils . rejectIfEmptyOrWhitespace ( err , "userInternaturDetailDto.validUntil" , "required.field" ) ; validateData ( dto , err ) ; } } public void validateData ( final UserInternaturDetailDto dto , final Errors err ) { } }

Fix:
if ( ( ( dto . getInternaturFlag ( ) ) != null ) && ( dto . getInternaturFlag ( ) . isBooleanValue ( ) ) ) {
Buggy code:
public class TestRegexpRandom2 extends LuceneTestCase { protected IndexSearcher searcher1 ; protected IndexSearcher searcher2 ; private IndexReader reader ; private Directory dir ; protected String fieldName ; @ Override public void setUp ( ) throws Exception { super . setUp ( ) ; dir = newDirectory ( ) ; fieldName = ( random . nextBoolean ( ) ) ? "field" : "" ; RandomIndexWriter writer = new RandomIndexWriter ( random , dir , newIndexWriterConfig ( TEST_VERSION_CURRENT , new org . apache . lucene . analysis . MockAnalyzer ( random , MockTokenizer . KEYWORD , false ) ) . setMaxBufferedDocs ( _TestUtil . nextInt ( random , 50 , 1000 ) ) ) ; Document doc = new Document ( ) ; Field field = newField ( fieldName , "" , TYPE_UNSTORED ) ; doc . add ( field ) ; List < String > terms = new ArrayList < String > ( ) ; int num = atLeast ( 200 ) ; for ( int i = 0 ; i < num ; i ++ ) { String s = _TestUtil . randomUnicodeString ( random ) ; <START_BUG> field . setValue ( s ) ; <END_BUG> terms . add ( s ) ; writer . addDocument ( doc ) ; } if ( VERBOSE ) { Collections . sort ( terms ) ; System . out . println ( "UTF16<seq2seq4repair_space>order:" ) ; for ( String s : terms ) { System . out . println ( ( "<seq2seq4repair_space>" + ( UnicodeUtil . toHexString ( s ) ) ) ) ; } } reader = writer . getReader ( ) ; searcher1 = newSearcher ( reader ) ; searcher2 = newSearcher ( reader ) ; writer . close ( ) ; } @ Override public void tearDown ( ) throws Exception { } private class DumbRegexpQuery extends MultiTermQuery { private final Automaton automaton ; DumbRegexpQuery ( Term term , int flags ) { } @ Override protected TermsEnum getTermsEnum ( Terms terms , AttributeSource atts ) throws IOException { } private class SimpleAutomatonTermsEnum extends FilteredTermsEnum { CharacterRunAutomaton runAutomaton = new CharacterRunAutomaton ( automaton ) ; CharsRef utf16 = new CharsRef ( 10 ) ; private SimpleAutomatonTermsEnum ( TermsEnum tenum ) throws IOException { } @ Override protected AcceptStatus accept ( BytesRef term ) throws IOException { } } @ Override public String toString ( String field ) { } } public void testRegexps ( ) throws Exception { } protected void assertSame ( String regexp ) throws IOException { } }

Fix:
field . setStringValue ( s ) ;
Buggy code:
class Download { XPCOMObject supports ; XPCOMObject download ; XPCOMObject progressDialog ; XPCOMObject webProgressListener ; nsIHelperAppLauncher helperAppLauncher ; int refCount = 0 ; Shell shell ; Label status ; Button cancel ; Download ( ) { } int AddRef ( ) { } void createCOMInterfaces ( ) { } void disposeCOMInterfaces ( ) { } int getAddress ( ) { } int QueryInterface ( int riid , int ppvObject ) { } int Release ( ) { } int Init ( int aSource , int aTarget , int aDisplayName , int aMIMEInfo , int startTime1 , int startTime2 , int aPersist ) { } int GetSource ( int aSource ) { } int GetTarget ( int aTarget ) { } int GetPersist ( int aPersist ) { } int GetPercentComplete ( int aPercentComplete ) { } int GetDisplayName ( int aDisplayName ) { } int SetDisplayName ( int aDisplayName ) { } int GetStartTime ( int aStartTime ) { } int GetMIMEInfo ( int aMIMEInfo ) { } int GetListener ( int aListener ) { } int SetListener ( int aListener ) { } int GetObserver ( int aObserver ) { } int SetObserver ( int aObserver ) { } int Open ( int aParent ) { } int GetCancelDownloadOnClose ( int aCancelDownloadOnClose ) { } int SetCancelDownloadOnClose ( int aCancelDownloadOnClose ) { } int GetDialog ( int aDialog ) { } int SetDialog ( int aDialog ) { } int OnStateChange ( int aWebProgress , int aRequest , int aStateFlags , int aStatus ) { } int OnProgressChange ( int aWebProgress , int aRequest , int aCurSelfProgress , int aMaxSelfProgress , int aCurTotalProgress , int aMaxTotalProgress ) { int currentKBytes = aCurTotalProgress // 1024 ; int totalKBytes = aMaxTotalProgress // 1024 ; <START_BUG> if ( ( ( shell ) != null ) & ( ! ( shell . isDisposed ( ) ) ) ) { <END_BUG> Object [ ] arguments = new Object [ ] { new Integer ( currentKBytes ) , new Integer ( totalKBytes ) } ; String statusMsg = Compatibility . getMessage ( "SWT_Download_Status" , arguments ) ; status . setText ( statusMsg ) ; shell . layout ( true ) ; shell . getDisplay ( ) . update ( ) ; } return XPCOM . NS_OK ; } int OnLocationChange ( int aWebProgress , int aRequest , int aLocation ) { } int OnStatusChange ( int aWebProgress , int aRequest , int aStatus , int aMessage ) { } int OnSecurityChange ( int aWebProgress , int aRequest , int state ) { } }

Fix:
if ( ( ( shell ) != null ) && ( ! ( shell . isDisposed ( ) ) ) ) {
Buggy code:
public class UI { protected static final String TAG = "UI" ; public static GameMode mode ; public static GameMode oldmode ; public static Context context ; public static Game gamestate ; public static AlertDialog windialog ; public static LinearLayout wintextll ; public static World world ; private static long oldseconds ; public static void setup ( Context context , World theworld , FrameBuffer fb , int w , int h ) { } public static void update ( ) { } public static void setMode ( GameMode mode ) { } public static void handleRelease ( int x , int y ) { } public static void handleFirstTouch ( float xpos , float ypos ) { } public static void handleTouching ( float xpos , float ypos ) { } public static void updateMoveCount ( ) { } public static void winGame ( ) { activity . runOnUiThread ( new Runnable ( ) { @ TargetApi ( VERSION_CODES . HONEYCOMB ) @ Override public void run ( ) { AlertDialog . Builder builder = new AlertDialog . Builder ( UI . context ) ; LayoutInflater inflater = ( ( LayoutInflater ) ( UI . context . getSystemService ( LAYOUT_INFLATER_SERVICE ) ) ) ; UI . wintextll = ( ( LinearLayout ) ( inflater . inflate ( R . layout . windialog , null ) ) ) ; builder . setView ( UI . wintextll ) . setPositiveButton ( "New<seq2seq4repair_space>Game" , new DialogInterface . OnClickListener ( ) { public void onClick ( DialogInterface dialog , int id ) { activity . reset ( null ) ; } } ) ; UI . windialog = builder . create ( ) ; TextView movestext = ( ( TextView ) ( UI . wintextll . findViewById ( wintext2 ) ) ) ; movestext . setText ( ( "#<seq2seq4repair_space>of<seq2seq4repair_space>moves:<seq2seq4repair_space>" + ( Game . movecount ) ) ) ; TextView timertext = ( ( TextView ) ( UI . wintextll . findViewById ( wintext3 ) ) ) ; int seconds = ( ( int ) ( ( Game . currenttime ) // 1000 ) ) ; int minutes = seconds // 60 ; seconds = seconds % 60 ; <START_BUG> timertext . setText ( String . format ( "%d:%02d" , minutes , seconds ) ) ; <END_BUG> UI . wintextll . setAlpha ( 0 ) ; UI . windialog . show ( ) ; } } ) ; } @ TargetApi ( VERSION_CODES . HONEYCOMB ) public static void winGameUpdate ( ) { } }

Fix:
timertext . setText ( String . format ( "Time<seq2seq4repair_space>finished<seq2seq4repair_space>in:<seq2seq4repair_space>%d:%02d" , minutes , seconds ) ) ;
Buggy code:
public class Snippet63 { public static void main ( String [ ] args ) { Display display = new Display ( ) ; Shell shell = new Shell ( display ) ; shell . pack ( ) ; shell . open ( ) ; final boolean [ ] result = new boolean [ 1 ] ; final Shell dialog = new Shell ( shell , ( ( SWT . DIALOG_TRIM ) | ( SWT . APPLICATION_MODAL ) ) ) ; dialog . setLayout ( new RowLayout ( ) ) ; final Button ok = new Button ( dialog , SWT . PUSH ) ; <START_BUG> ok . setText ( "Ok" ) ; <END_BUG> Button cancel = new Button ( dialog , SWT . PUSH ) ; cancel . setText ( "Cancel" ) ; Listener listener = new Listener ( ) { public void handleEvent ( Event event ) { result [ 0 ] = ( event . widget ) == ok ; dialog . close ( ) ; } } ; ok . addListener ( Selection , listener ) ; cancel . addListener ( Selection , listener ) ; dialog . pack ( ) ; dialog . open ( ) ; System . out . println ( "Prompt<seq2seq4repair_space>..." ) ; while ( ! ( dialog . isDisposed ( ) ) ) { if ( ! ( display . readAndDispatch ( ) ) ) display . sleep ( ) ; } System . out . println ( ( "Result:<seq2seq4repair_space>" + ( result [ 0 ] ) ) ) ; while ( ! ( shell . isDisposed ( ) ) ) { if ( ! ( display . readAndDispatch ( ) ) ) display . sleep ( ) ; } display . dispose ( ) ; } }

Fix:
ok . setText ( "OK" ) ;
Buggy code:
public class CreateBook extends WebPage { private static final long serialVersionUID = 1L ; private Book book = new Book ( null , null ) ; public CreateBook ( ) { } public class CreateForm extends Form { private static final long serialVersionUID = 1L ; public CreateForm ( String id ) { } public void onSubmit ( ) { try { Page page = new SuccessPage ( ) ; page . info ( getString ( "book.save.success" , new wicket . model . Model ( book ) ) ) ; setResponsePage ( page ) ; } finally { <START_BUG> getPage ( ) . getPageMap ( ) . remove ( getPage ( ) ) ; <END_BUG> } } } }

Fix:
getPage ( ) . getPageMap ( ) . removePage ( getPage ( ) ) ;
Buggy code:
public class JspCompilerAdapterFactory { private JspCompilerAdapterFactory ( ) { } public static JspCompilerAdapter getCompiler ( String compilerType , Task task ) throws BuildException { <START_BUG> return JspCompilerAdapterFactory . getCompiler ( compilerType , task , new AntClassLoader ( task . getProject ( ) , null ) ) ; <END_BUG> } public static JspCompilerAdapter getCompiler ( String compilerType , Task task , AntClassLoader loader ) throws BuildException { } private static JspCompilerAdapter resolveClassName ( String className , AntClassLoader classloader ) throws BuildException { } }

Fix:
return JspCompilerAdapterFactory . getCompiler ( compilerType , task , task . getProject ( ) . createClassLoader ( null ) ) ;
Buggy code:
public final class ComponentWicketTag extends ComponentTag { public ComponentWicketTag ( final XmlTag tag ) { } public final String getNameAttribute ( ) { } public final boolean isComponentTag ( ) { } public final boolean isLinkTag ( ) { } public final boolean isParamTag ( ) { } public final boolean isRemoveTag ( ) { } public ComponentTag mutable ( ) { if ( xmlTag . isMutable ( ) ) { return this ; } else { final ComponentWicketTag tag = new ComponentWicketTag ( xmlTag . mutable ( ) ) ; <START_BUG> tag . setComponentName ( getComponentName ( ) ) ; <END_BUG> return tag ; } } }

Fix:
tag . setComponentId ( getComponentId ( ) ) ;
Buggy code:
public class TestPortugueseAnalyzer extends BaseTokenStreamTestCase { public void testResourcesAvailable ( ) { } public void testBasics ( ) throws IOException { } public void testExclude ( ) throws IOException { } public void testRandomStrings ( ) throws Exception { <START_BUG> checkRandomData ( random ( ) , new PortugueseAnalyzer ( TEST_VERSION_CURRENT ) , ( 10000 * ( RANDOM_MULTIPLIER ) ) ) ; <END_BUG> } }

Fix:
checkRandomData ( random ( ) , new PortugueseAnalyzer ( TEST_VERSION_CURRENT ) , ( 1000 * ( RANDOM_MULTIPLIER ) ) ) ;
Buggy code:
public class Div extends Instruction { public void execute ( MicroController micro ) { BigDecimal regAValue = new BigDecimal ( micro . getRegister ( "A" ) . getValue ( ) ) ; BigDecimal regBValue = new BigDecimal ( micro . getRegister ( "B" ) . getValue ( ) ) ; Integer result ; try { <START_BUG> result = regBValue . divide ( regAValue , RoundingMode . DOWN ) . intValue ( ) ; <END_BUG> micro . setRegister ( "A" , 0 ) ; micro . setRegister ( "B" , result ) ; super . execute ( micro ) ; } catch ( ArithmeticException launchedExep ) { if ( launchedExep . getMessage ( ) . matches ( "//<seq2seq4repair_space>by<seq2seq4repair_space>zero" ) ) throw new IllegalValueException ( "Zero<seq2seq4repair_space>Division" ) ; throw launchedExep ; } } }

Fix:
result = regAValue . divide ( regBValue , RoundingMode . DOWN ) . intValue ( ) ;
Buggy code:
public class FirstStartStep2Fragment extends Fragment implements GoogleApiClient . ConnectionCallbacks , GoogleApiClient . OnConnectionFailedListener { private static String LOG_TAG = "GDG-FirstStartStep2Fragment" ; private static final int STATE_DEFAULT = 0 ; private static final int STATE_SIGN_IN = 1 ; private static final int STATE_IN_PROGRESS = 2 ; private static final int RC_SIGN_IN = 0 ; private static final int DIALOG_PLAY_SERVICES_ERROR = 0 ; private static final String SAVED_PROGRESS = "sign_in_progress" ; private GoogleApiClient mGoogleApiClient ; private int mSignInProgress ; private PendingIntent mSignInIntent ; private int mSignInError ; @ InjectView ( id . googleSignin ) Button mSignInButton ; @ InjectView ( id . skipSignin ) Button mSkipSignin ; @ Override public void onCreate ( Bundle savedInstanceState ) { } @ Override public void onActivityCreated ( Bundle savedInstanceState ) { } @ Override public void onStart ( ) { } @ Override public View onCreateView ( LayoutInflater inflater , ViewGroup container , Bundle savedInstanceState ) { <START_BUG> View v = inflater . inflate ( fragment_welcome_step2 , null ) ; <END_BUG> ButterKnife . inject ( this , v ) ; return v ; } @ Override public void onViewCreated ( View view , Bundle savedInstanceState ) { } @ Override public void onStop ( ) { } @ Override public void onSaveInstanceState ( Bundle outState ) { } @ Override public void onConnected ( Bundle bundle ) { } @ Override public void onConnectionSuspended ( int i ) { } @ Override public void onConnectionFailed ( ConnectionResult result ) { } @ Override public void onActivityResult ( int requestCode , int resultCode , Intent data ) { } private void resolveSignInError ( ) { } public interface Step2Listener { void onSignedIn ( GoogleApiClient client , String accountName ) { } void onSkippedSignIn ( ) { } } }

Fix:
View v = inflater . inflate ( fragment_welcome_step2 , container , false ) ;
Buggy code:
public class TimeFinder { TimeFinder ( ) { } public Calendar chooseTime ( ) { Calendar time = Calendar . getInstance ( ) ; <START_BUG> time . set ( time . get ( Calendar . YEAR ) , ( 1 + ( time . get ( Calendar . MONTH ) ) ) , time . get ( Calendar . DATE ) , 19 , 0 , 0 ) ; <END_BUG> return time ; } }

Fix:
time . set ( time . get ( Calendar . YEAR ) , time . get ( Calendar . MONTH ) , time . get ( Calendar . DATE ) , 19 , 0 , 0 ) ;
Buggy code:
public class ServerStartup { static TCPServerSOContainerGroup [ ] serverGroups = null ; static final String SERVER_FILE_NAME = "ServerStartup.xml" ; static List servers = new ArrayList ( ) ; public ServerStartup ( ) { } public void dispose ( ) { } protected synchronized void destroyServers ( ) { } protected synchronized void createServers ( InputStream ins ) throws Exception { ServerConfigParser scp = new ServerConfigParser ( ) ; List connectors = scp . load ( ins ) ; if ( connectors != null ) { ServerStartup . serverGroups = new TCPServerSOContainerGroup [ connectors . size ( ) ] ; int j = 0 ; for ( Iterator i = connectors . iterator ( ) ; i . hasNext ( ) ; ) { Connector connect = ( ( Connector ) ( i . next ( ) ) ) ; ServerStartup . serverGroups [ j ] = makeServerGroup ( connect . getHostname ( ) , connect . getPort ( ) ) ; List groups = connect . getGroups ( ) ; for ( Iterator g = groups . iterator ( ) ; g . hasNext ( ) ; ) { NamedGroup group = ( ( NamedGroup ) ( g . next ( ) ) ) ; TCPServerSOContainer cont = makeServerContainer ( group . getIDForGroup ( ) , ServerStartup . serverGroups [ j ] , group . getName ( ) , connect . getTimeout ( ) ) ; DiscoveryStartup . registerServer ( cont . getConfig ( ) . getID ( ) ) ; ServerStartup . servers . add ( cont ) ; <START_BUG> ClientPlugin . log ( ( "ECF<seq2seq4repair_space>group<seq2seq4repair_space>created:<seq2seq4repair_space>" + ( cont . getConfig ( ) . getID ( ) . getName ( ) ) ) ) ; <END_BUG> } ServerStartup . serverGroups [ j ] . putOnTheAir ( ) ; j ++ ; } } } protected TCPServerSOContainerGroup makeServerGroup ( String name , int port ) { } protected TCPServerSOContainer makeServerContainer ( String id , TCPServerSOContainerGroup group , String path , int keepAlive ) throws IDInstantiationException { } }

Fix:
ClientPlugin . log ( ( "ECF<seq2seq4repair_space>group<seq2seq4repair_space>server<seq2seq4repair_space>created:<seq2seq4repair_space>" + ( cont . getConfig ( ) . getID ( ) . getName ( ) ) ) ) ;
Buggy code:
public class AutoSetup extends BaseInterceptor { int debug = 0 ; public AutoSetup ( ) { } public void engineInit ( ContextManager cm ) throws TomcatException { String home = cm . getHome ( ) ; File webappD = new File ( ( home + "//webapps" ) ) ; if ( ( ! ( webappD . exists ( ) ) ) || ( ! ( webappD . isDirectory ( ) ) ) ) { System . out . println ( ( "No<seq2seq4repair_space>webapps//<seq2seq4repair_space>directory<seq2seq4repair_space>" + webappD ) ) ; return ; } String [ ] list = webappD . list ( ) ; if ( ( list . length ) == 0 ) { System . out . println ( "No<seq2seq4repair_space>apps<seq2seq4repair_space>in<seq2seq4repair_space>webapps//<seq2seq4repair_space>" ) ; } for ( int i = 0 ; i < ( list . length ) ; i ++ ) { String name = list [ i ] ; if ( name . endsWith ( ".war" ) ) { String fname = name . substring ( 0 , ( ( name . length ( ) ) - 4 ) ) ; File appDir = new File ( ( ( home + "//webapps//" ) + fname ) ) ; if ( ! ( appDir . exists ( ) ) ) { appDir . mkdirs ( ) ; Expand expand = new Expand ( ) ; expand . setSrc ( ( ( home + "//webapps//" ) + name ) ) ; expand . setDest ( ( ( home + "//webapps//" ) + fname ) ) ; try { expand . execute ( ) ; } catch ( IOException ex ) { ex . printStackTrace ( ) ; } } name = fname ; } String path = "//" + name ; if ( path . equals ( "//ROOT" ) ) path = "" ; if ( ( cm . getContext ( path ) ) == null ) { Context ctx = new Context ( ) ; ctx . setContextManager ( cm ) ; ctx . setPath ( path ) ; File f = new File ( webappD , name ) ; ctx . setDocBase ( f . getAbsolutePath ( ) ) ; <START_BUG> ctx . log ( ( ( "<l:autoLoadContext<seq2seq4repair_space>docBase=\"" + ( ctx . getDocBase ( ) ) ) + "\"<seq2seq4repair_space>//>" ) ) ; <END_BUG> cm . addContext ( ctx ) ; } else { } } } public void setDebug ( int i ) { } }

Fix:
ctx . log ( ( ( "Automatic<seq2seq4repair_space>context<seq2seq4repair_space>load<seq2seq4repair_space>docBase=\"" + ( ctx . getDocBase ( ) ) ) + "\"" ) ) ;
Buggy code:
public class MainActivity extends AppCompatActivity { ListView mLv ; @ Override protected void onCreate ( Bundle savedInstanceState ) { super . onCreate ( savedInstanceState ) ; setContentView ( activity_main ) ; mLv = ( ( ListView ) ( findViewById ( lv ) ) ) ; List < String > list = new ArrayList < String > ( ) ; <START_BUG> list . add ( "下拉松手刷新" ) ; <END_BUG> list . add ( "超过刷新线刷新" ) ; list . add ( "水滴下拉" ) ; list . add ( "头部固定" ) ; list . add ( "内容固定-MaterialStyle" ) ; list . add ( "刷新完成强制返回" ) ; list . add ( "刷新时隐藏头部" ) ; list . add ( "viewPager共存" ) ; list . add ( "自动刷新+ScrollView" ) ; mLv . setAdapter ( new com . dzy . pulltorefresh . adapter . CommenAdapter < String > ( this , list ) { @ Override public View getView ( int position , View convertView , ViewGroup parent ) { ViewHolder holder = ViewHolder . getViewHolder ( position , convertView , parent , list_item_layout , mContext ) ; holder . setTextView ( tvTitile , mDatas . get ( position ) ) ; return holder . getConvertView ( ) ; } } ) ; mLv . setOnItemClickListener ( new AdapterView . OnItemClickListener ( ) { @ Override public void onItemClick ( AdapterView < ? > parent , View view , int position , long id ) { if ( position == 0 ) startActivity ( new Intent ( MainActivity . this , ReleaseActivity . class ) ) ; else if ( position == 1 ) startActivity ( new Intent ( MainActivity . this , PullRefreshActivit . class ) ) ; else if ( position == 2 ) startActivity ( new Intent ( MainActivity . this , DropWaterActivity . class ) ) ; else if ( position == 3 ) startActivity ( new Intent ( MainActivity . this , PinHeaderActivity . class ) ) ; else if ( position == 4 ) startActivity ( new Intent ( MainActivity . this , PinContentActivity . class ) ) ; else if ( position == 5 ) startActivity ( new Intent ( MainActivity . this , ForceTopActivity . class ) ) ; else if ( position == 6 ) startActivity ( new Intent ( MainActivity . this , HideHeaderActivity . class ) ) ; else if ( position == 7 ) startActivity ( new Intent ( MainActivity . this , ViewpagerActivity . class ) ) ; else if ( position == 8 ) startActivity ( new Intent ( MainActivity . this , AutoRefreshActivity . class ) ) ; } } ) ; } }

Fix:
list . add ( "下拉松手刷新+刷新时不可拉动" ) ;
Buggy code:
public class TimeTypeEnum { public static final byte REALTIME = 1 ; public static final byte ONE_MIN = 2 ; public static final byte FIVE_MIN = 3 ; public static final byte TEN_MIN = 4 ; public static final byte HOUR = 5 ; public static final byte DAY = 6 ; private static final IntKeyMap < String > lookup = new IntKeyMap < String > ( ) ; private static final StringIntMap lookname = new StringIntMap ( ) ; private static void add ( String name , byte code ) { } public static String get ( byte code ) { } public static byte get ( String name ) { } public static String getString ( byte code ) { } public static byte getCode ( String name ) { } public static byte getCodeBySec ( int sec ) { } public static int getTime ( byte timeCode ) { switch ( timeCode ) { case TimeTypeEnum . REALTIME : <START_BUG> return 1000 ; <END_BUG> case TimeTypeEnum . ONE_MIN : return 60 * 1000 ; case TimeTypeEnum . FIVE_MIN : return 300 * 1000 ; case TimeTypeEnum . HOUR : return 3600 * 1000 ; case TimeTypeEnum . DAY : return ( 24 * 3600 ) * 1000 ; } return 0 ; } No newline ; at end ; of file ; }

Fix:
return 2000 ;
Buggy code:
public final class LocalShowHistoryHandler implements OperationStepHandler { public static final OperationStepHandler INSTANCE = new LocalShowHistoryHandler ( ) ; @ Override public void execute ( final OperationContext context , final ModelNode operation ) throws OperationFailedException { context . acquireControllerLock ( ) ; final PatchInfoService service = ( ( PatchInfoService ) ( context . getServiceRegistry ( false ) . getRequiredService ( NAME ) . getValue ( ) ) ) ; try { <START_BUG> final PatchInfo info = service . getPatchInfo ( ) ; <END_BUG> final InstalledImage installedImage = service . getStructure ( ) . getInstalledImage ( ) ; ModelNode result = new ModelNode ( ) ; result . setEmptyList ( ) ; String cumulativePatchID = info . getCumulativeID ( ) ; if ( ! ( PatchInfo . BASE . equals ( cumulativePatchID ) ) ) { fillHistory ( result , CUMULATIVE , cumulativePatchID , installedImage . getPatchHistoryDir ( cumulativePatchID ) ) ; } List < String > oneOffPatchIDs = info . getPatchIDs ( ) ; for ( String oneOffPatchID : oneOffPatchIDs ) { File historyDir = installedImage . getPatchHistoryDir ( oneOffPatchID ) ; fillHistory ( result , ONE_OFF , oneOffPatchID , historyDir ) ; } context . getResult ( ) . set ( result ) ; context . stepCompleted ( ) ; } catch ( Throwable t ) { t . printStackTrace ( ) ; throw MESSAGES . failedToShowHistory ( t ) ; } } private void fillHistory ( ModelNode result , PatchType type , String oneOffPatchID , File historyDir ) throws Exception { } }

Fix:
final PatchInfo info = service . getValue ( ) ;
Buggy code:
public class Attachment extends BaseAttachment implements Persistent { public static final NumberKey FILE__PK = new NumberKey ( "1" ) ; public static final NumberKey COMMENT__PK = new NumberKey ( "2" ) ; public static final NumberKey URL__PK = new NumberKey ( "3" ) ; public static final NumberKey MODIFICATION__PK = new NumberKey ( "4" ) ; private FileItem fileItem ; public String getDataAsString ( ) throws Exception { } public void setDataAsString ( String data ) throws Exception { } public FileItem getFile ( ) { } public void setFile ( FileItem v ) { } public void setTextFields ( ScarabUser user , Issue issue , NumberKey typeId ) throws Exception { } public String getFileName ( ) { String filePath = getFilePath ( ) ; <START_BUG> String fileName = filePath . substring ( ( ( filePath . lastIndexOf ( File . separator ) ) + 1 ) , filePath . lastIndexOf ( '_' ) ) ; <END_BUG> return fileName + ( filePath . substring ( filePath . lastIndexOf ( '.' ) ) ) ; } public String getRepositoryDirectory ( String moduleCode ) throws Exception { } }

Fix:
String fileName = filePath . substring ( ( ( filePath . lastIndexOf ( '//' ) ) + 1 ) , filePath . lastIndexOf ( '_' ) ) ;
Buggy code:
class OC4JClassLoaderAdapter { private static final String CL_UTILS = "oracle.classloader.util.ClassLoaderUtilities" ; private static final String PREPROCESS_UTILS = "oracle.classloader.util.ClassPreprocessor" ; private final ClassLoader classLoader ; private final Class < ? > processorClass ; private final Method addTransformer ; private final Method copy ; public OC4JClassLoaderAdapter ( ClassLoader classLoader ) { } public void addTransformer ( ClassFileTransformer transformer ) { Assert . notNull ( transformer , "ClassFileTransformer<seq2seq4repair_space>must<seq2seq4repair_space>not<seq2seq4repair_space>be<seq2seq4repair_space>null" ) ; try { <START_BUG> OC4JClassPreProcessorAdapter adapter = new OC4JClassPreProcessorAdapter ( transformer ) ; <END_BUG> Object adapterInstance = Proxy . newProxyInstance ( this . processorClass . getClassLoader ( ) , new Class [ ] { this . processorClass } , adapter ) ; this . addTransformer . invoke ( null , new Object [ ] { this . classLoader , adapterInstance } ) ; } catch ( InvocationTargetException ex ) { throw new IllegalStateException ( "OC4J<seq2seq4repair_space>addPreprocessor<seq2seq4repair_space>method<seq2seq4repair_space>threw<seq2seq4repair_space>exception" , ex . getCause ( ) ) ; } catch ( Exception ex ) { throw new IllegalStateException ( "Could<seq2seq4repair_space>not<seq2seq4repair_space>invoke<seq2seq4repair_space>OC4J<seq2seq4repair_space>addPreprocessor<seq2seq4repair_space>method" , ex ) ; } } public ClassLoader getClassLoader ( ) { } public ClassLoader getThrowawayClassLoader ( ) { } }

Fix:
OC4JClassPreprocessorAdapter adapter = new OC4JClassPreprocessorAdapter ( transformer ) ;
Buggy code:
public class LongConverter extends AbstractIntegerConverter < Long > { private static final long serialVersionUID = 1L ; public static final IConverter < Long > INSTANCE = new LongConverter ( ) ; <START_BUG> public Long convertToObject ( final String value , Locale locale ) { <END_BUG> final Number number = parse ( value , Long . MIN_VALUE , Long . MAX_VALUE , locale ) ; if ( number == null ) { return null ; } return number . longValue ( ) ; } @ Override protected Class < Long > getTargetType ( ) { } }

Fix:
public Long convertToObject ( final String value , final Locale locale ) {
Buggy code:
public class BeanShellSamplerGui extends AbstractSamplerGui implements ActionListener { public BeanShellSamplerGui ( ) { } public void configure ( TestElement element ) { } public TestElement createTestElement ( ) { } public void modifyTestElement ( TestElement te ) { } public String getStaticLabel ( ) { <START_BUG> return JMeterUtils . getResString ( ( "bsh_sampler_title" + "(BETA<seq2seq4repair_space>CODE)" ) ) ; <END_BUG> } private JTextField filename ; private JPanel createFilenamePanel ( ) { } private void init ( ) { } private JTextArea scriptField ; private JPanel createSqlPanel ( ) { } public void actionPerformed ( ActionEvent e ) { } }

Fix:
return ( JMeterUtils . getResString ( "bsh_sampler_title" ) ) + "<seq2seq4repair_space>(BETA<seq2seq4repair_space>CODE)" ;
Buggy code:
public class Native2AsciiTest extends BuildFileTest { private static final String BUILD_XML = "src//etc//testcases//taskdefs//optional//native2ascii//build.xml" ; public Native2AsciiTest ( String name ) { } public void setUp ( ) { } public void tearDown ( ) { } public void testIso8859_1 ( ) throws IOException { executeTarget ( "testIso8859-1" ) ; File in = getProject ( ) . resolveFile ( "expected//iso8859-1.test" ) ; File out = getProject ( ) . resolveFile ( "output//iso8859-1.test" ) ; <START_BUG> assertTrue ( FileUtils . getFileUtils ( ) . contentEquals ( in , out , false ) ) ; <END_BUG> } }

Fix:
assertTrue ( FileUtils . getFileUtils ( ) . contentEquals ( in , out , true ) ) ;
Buggy code:
public class Turret { private BufferedImage spriteImg ; private int spriteImgWidth ; private int spriteImgHeight ; private int x ; private int y ; private int width ; private int height ; public Turret ( int x , int y ) { } public void LoadContent ( ) { try { <START_BUG> URL spriteImgUrl = this . getClass ( ) . getResource ( "//Hack_NC_Game//resources//images//eyeofsauron.png" ) ; <END_BUG> spriteImg = ImageIO . read ( spriteImgUrl ) ; spriteImgWidth = spriteImg . getWidth ( ) ; spriteImgHeight = spriteImg . getHeight ( ) ; } catch ( IOException ex ) { Logger . getLogger ( Avatar . class . getName ( ) ) . log ( Level . SEVERE , null , ex ) ; } } public void Draw ( Graphics2D g2d ) { } No newline ; at end ; of file ; }

Fix:
URL spriteImgUrl = this . getClass ( ) . getResource ( "//Hack_NC_Game//resources//images//eye.jpg" ) ;
Buggy code:
public class Tip extends Activity { WebView mWebView ; ProgressDialog dialog ; public void onCreate ( Bundle savedInstanceState ) { super . onCreate ( savedInstanceState ) ; setContentView ( tip ) ; dialog = new ProgressDialog ( this ) ; dialog . setProgressStyle ( STYLE_HORIZONTAL ) ; dialog . setCancelable ( false ) ; dialog . show ( ) ; mWebView = ( ( WebView ) ( findViewById ( TipWebView ) ) ) ; mWebView . setVisibility ( INVISIBLE ) ; mWebView . setWebViewClient ( new Tip . webClient ( ) ) ; mWebView . getSettings ( ) . setJavaScriptEnabled ( true ) ; mWebView . setWebChromeClient ( new WebChromeClient ( ) { public void onProgressChanged ( WebView view , int progress ) { dialog . setProgress ( progress ) ; if ( progress == 100 ) { mWebView . setVisibility ( VISIBLE ) ; dialog . dismiss ( ) ; } else { dialog . show ( ) ; } } } ) ; <START_BUG> mWebView . loadUrl ( "http:////ec2-54-64-124-136.ap-northeast-1.compute.amazonaws.com" ) ; <END_BUG> } public boolean onKeyDown ( int keyCode , KeyEvent event ) { } private class webClient extends WebViewClient { public boolean shouldOverrideUrlLoading ( WebView view , String url ) { } } }

Fix:
mWebView . loadUrl ( "http:////ec2-54-64-124-136.ap-northeast-1.compute.amazonaws.com//library" ) ;
Buggy code:
public class QualifiedTypeReference extends TypeReference { public char [ ] [ ] tokens ; public long [ ] sourcePositions ; public QualifiedTypeReference ( char [ ] [ ] sources , long [ ] poss ) { } public TypeReference copyDims ( int dim ) { } protected TypeBinding findNextTypeBinding ( int tokenIndex , Scope scope , PackageBinding packageBinding ) { } protected TypeBinding getTypeBinding ( Scope scope ) { if ( ( this . resolvedType ) != null ) return this . resolvedType ; Binding binding = scope . getPackage ( this . tokens ) ; if ( ( binding != null ) && ( ! ( binding . isValidBinding ( ) ) ) ) return ( ( ReferenceBinding ) ( binding ) ) ; PackageBinding packageBinding = ( binding == null ) ? null : ( ( PackageBinding ) ( binding ) ) ; boolean isClassScope = ( scope . kind ) == ( Scope . CLASS_SCOPE ) ; ReferenceBinding qualifiedType = null ; for ( int i = ( packageBinding == null ) ? 0 : packageBinding . compoundName . length , max = this . tokens . length ; i < max ; i ++ ) { findNextTypeBinding ( i , scope , packageBinding ) ; if ( ! ( this . resolvedType . isValidBinding ( ) ) ) return this . resolvedType ; if ( isClassScope ) if ( ( ( ClassScope ) ( scope ) ) . detectCycle ( this . resolvedType , this , null ) ) return null ; ReferenceBinding currentType = ( ( ReferenceBinding ) ( this . resolvedType ) ) ; if ( currentType . isGenericType ( ) ) { qualifiedType = scope . environment ( ) . createRawType ( currentType , qualifiedType ) ; } else { <START_BUG> qualifiedType = ( ( qualifiedType != null ) && ( ( qualifiedType . isRawType ( ) ) || ( qualifiedType . isParameterizedType ( ) ) ) ) ? scope . createParameterizedType ( currentType , null , qualifiedType ) : currentType ; <END_BUG> } } this . resolvedType = qualifiedType ; return this . resolvedType ; } public char [ ] [ ] getTypeName ( ) { } public StringBuffer printExpression ( int indent , StringBuffer output ) { } public void traverse ( ASTVisitor visitor , BlockScope scope ) { } public void traverse ( ASTVisitor visitor , ClassScope scope ) { } }

Fix:
qualifiedType = ( ( qualifiedType != null ) && ( ( qualifiedType . isRawType ( ) ) || ( qualifiedType . isParameterizedType ( ) ) ) ) ? scope . createParameterizedType ( ( ( ReferenceBinding ) ( currentType . erasure ( ) ) ) , null , qualifiedType ) : currentType ;
Buggy code:
public class NGramFilterFactory extends TokenFilterFactory { private final int maxGramSize ; private final int minGramSize ; public NGramFilterFactory ( Map < String , String > args ) { } @ Override public NGramTokenFilter create ( TokenStream input ) { <START_BUG> return new NGramTokenFilter ( input , minGramSize , maxGramSize ) ; <END_BUG> } }

Fix:
return new NGramTokenFilter ( luceneMatchVersion , input , minGramSize , maxGramSize ) ;
Buggy code:
public class ComponentResolvingPage extends WebPage implements IComponentResolver { private static final long serialVersionUID = 1L ; public boolean onEndRequestWasCalledOnAutoAddedComponent = false ; public ComponentResolvingPage ( ) { } public boolean resolve ( final MarkupContainer container , final MarkupStream markupStream , final ComponentTag tag ) { if ( "test" . equals ( tag . getId ( ) ) ) { Label label = new Label ( this , ( ( Component . AUTO_COMPONENT_PREFIX ) + "test" ) , "TEST" ) { private static final long serialVersionUID = 1L ; @ Override <START_BUG> protected void onEndRequest ( ) { <END_BUG> onEndRequestWasCalledOnAutoAddedComponent = true ; } } ; label . autoAdded ( ) ; return true ; } return false ; } }

Fix:
protected void onAfterRender ( ) {
Buggy code:
public class XMLChar { private static final byte [ ] CHARS = new byte [ 1 << 16 ] ; public static final int MASK_VALID = 1 ; public static final int MASK_SPACE = 2 ; public static final int MASK_NAME_START = 4 ; public static final int MASK_NAME = 8 ; public static final int MASK_PUBID = 16 ; public static final int MASK_CONTENT = 32 ; public static final int MASK_NCNAME_START = 64 ; public static final int MASK_NCNAME = 128 ; public static boolean isSupplemental ( int c ) { } public static int supplemental ( char h , char l ) { } public static char highSurrogate ( int c ) { } public static char lowSurrogate ( int c ) { } public static boolean isHighSurrogate ( int c ) { } public static boolean isLowSurrogate ( int c ) { } public static boolean isValid ( int c ) { } public static boolean isInvalid ( int c ) { } public static boolean isContent ( int c ) { } public static boolean isMarkup ( int c ) { } public static boolean isSpace ( int c ) { <START_BUG> return ( c < 65536 ) && ( ( ( XMLChar . CHARS [ c ] ) & ( XMLChar . MASK_SPACE ) ) != 0 ) ; <END_BUG> } public static boolean isNameStart ( int c ) { } public static boolean isName ( int c ) { } public static boolean isNCNameStart ( int c ) { } public static boolean isNCName ( int c ) { } public static boolean isPubid ( int c ) { } public static boolean isValidName ( String name ) { } public static boolean isValidNCName ( String ncName ) { } public static boolean isValidNmtoken ( String nmtoken ) { } public static boolean isValidIANAEncoding ( String ianaEncoding ) { } public static boolean isValidJavaEncoding ( String javaEncoding ) { } }

Fix:
return ( c <= 32 ) && ( ( ( XMLChar . CHARS [ c ] ) & ( XMLChar . MASK_SPACE ) ) != 0 ) ;
Buggy code:
public class Main extends Activity { TextView dataTextView = null ; TextView hijackTextView = null ; private static int [ ] mSampleRates = new int [ ] { 8000 , 11025 , 22050 , 44100 } ; AudioRecord _aru = null ; AudioReceiver reader = null ; short [ ] buffer = null ; List < Short > data = new ArrayList < Short > ( ) ; public void saveClick ( View v ) { } public void readClick ( View v ) { int shortsRead = 0 ; if ( ( _aru ) != null ) { _aru . startRecording ( ) ; shortsRead = _aru . read ( buffer , 0 , buffer . length ) ; } else { } String text = "" ; if ( ( buffer . length ) > 10 ) for ( int i = 0 ; i < shortsRead ; i ++ ) { <START_BUG> data . add ( 1 ) ; <END_BUG> String num = "" + i ; String val = Short . toString ( buffer [ i ] ) ; text += ( ( "\n" + num ) + ",<seq2seq4repair_space>" ) + val ; } dataTextView . setText ( text ) ; WriteToFile ( text ) ; } public void clearClick ( View v ) { } public void processClick ( View v ) { } private void initialize ( ) { } private double Average ( short [ ] bytes ) { } public void WriteToFile ( String content ) { } private AudioRecord findAudioRecord ( ) { } @ Override protected void onCreate ( Bundle savedInstanceState ) { } @ Override public boolean onCreateOptionsMenu ( Menu menu ) { } @ Override public boolean onOptionsItemSelected ( MenuItem item ) { } }

Fix:
data . add ( buffer [ i ] ) ;
Buggy code:
@ Controller ( "searchResultsController" ) public class SearchResultsController { private static Category log = Category . getInstance ( SearchResultsController . class . getName ( ) ) ; @ Autowired private UserBean userBean ; @ Autowired private SearchBean searchBean ; @ Autowired private HotListBean hotListBean ; @ Autowired private SavedSearchBean savedSearchBean ; @ Autowired private SearchModel searchModel ; @ Autowired private UserModel userModel ; private ArrayList < ? > resultList = null ; private Iterator < ? > resultListItr = null ; private Map < ? , ? > resultListMap = null ; private SearchUtil searchUtil = null ; private CDCUtil cdcUtil = null ; private UserUtil userUtil = null ; private void initSearchUtil ( ) { } private void initCDCUtil ( ) { } private void initUserUtil ( ) { } @ RequestMapping ( "//search-results" ) public String searchResults ( HttpServletRequest request ) { } @ RequestMapping ( "//print-bunch-jobs" ) public String printbunchjobs ( ) { } @ RequestMapping ( "//view-details" ) public String viewDetails ( ) { } @ RequestMapping ( "//details" ) public String details ( ) { } @ RequestMapping ( "//details-jsp" ) public String detailsJsp ( ) { try { if ( ( userUtil ) == null ) initUserUtil ( ) ; if ( ! ( userUtil . checkUserSession ( ) ) ) return userUtil . getLogoutPage ( ) ; } catch ( Exception e ) { SearchResultsController . log . warn ( ( "Exception<seq2seq4repair_space>at<seq2seq4repair_space>detailsJsp<seq2seq4repair_space>:<seq2seq4repair_space>" + e ) ) ; } <START_BUG> return "//online_product//project_detail//details_jsp.jsp" ; <END_BUG> } @ RequestMapping ( "//lm-ajax" ) public String lmajax ( ) { } @ RequestMapping ( "//print-job" ) public String printJob ( ) { } @ RequestMapping ( "//itb" ) public String itb ( HttpServletRequest request ) { } @ RequestMapping ( "//projects-brief-view" ) public String projectsBriefView ( HttpServletRequest request ) { } @ RequestMapping ( "//industry-project-list" ) public String industryProjectList ( HttpServletRequest request ) { } }

Fix:
return "//online_product//project_tracker//pt_details.jsp" ;
Buggy code:
public class CmpEntityBeanRemoveInterceptorFactory implements InterceptorFactory { private final Logger log = Logger . getLogger ( EntityBeanAssociatingInterceptorFactory . class ) ; private final Method ejbRemove ; public CmpEntityBeanRemoveInterceptorFactory ( final Method ejbRemove ) { } public Interceptor create ( final InterceptorFactoryContext context ) { return new AbstractEJBInterceptor ( ) { public Object processInvocation ( final InterceptorContext context ) throws Exception { final CmpEntityBeanComponent component = getComponent ( context , CmpEntityBeanComponent . class ) ; final Object primaryKey = context . getPrivateData ( PRIMARY_KEY_CONTEXT_KEY ) ; if ( primaryKey == null ) { throw new NoSuchEJBException ( "Invocation<seq2seq4repair_space>was<seq2seq4repair_space>not<seq2seq4repair_space>associated<seq2seq4repair_space>with<seq2seq4repair_space>an<seq2seq4repair_space>instance,<seq2seq4repair_space>primary<seq2seq4repair_space>key<seq2seq4repair_space>was<seq2seq4repair_space>null,<seq2seq4repair_space>instance<seq2seq4repair_space>may<seq2seq4repair_space>have<seq2seq4repair_space>been<seq2seq4repair_space>removed" ) ; } final CmpEntityBeanComponentInstance instance = ( ( CmpEntityBeanComponentInstance ) ( component . getCache ( ) . get ( primaryKey ) ) ) ; Method oldMethod = context . getMethod ( ) ; try { context . putPrivateData ( ComponentInstance . class , instance ) ; context . setMethod ( ejbRemove ) ; context . setTarget ( instance . getInstance ( ) ) ; instance . getInterceptor ( ejbRemove ) . processInvocation ( context ) ; } finally { context . setMethod ( oldMethod ) ; context . setTarget ( null ) ; context . putPrivateData ( ComponentInstance . class , null ) ; } <START_BUG> component . getStoreManager ( ) . removeEntity ( instance . getEntityContext ( ) ) ; <END_BUG> instance . setRemoved ( true ) ; return null ; } } ; } }

Fix:
component . getStoreManager ( ) . removeEntity ( instance . getEjbContext ( ) ) ;
Buggy code:
@ FIBPanel ( "Fib//FML//DeclarationActionPanel.fib" ) @ ModelEntity @ ImplementationClass ( DeclarationAction . DeclarationActionImpl . class ) @ XMLElement public interface DeclarationAction < T > extends AbstractAssignationAction < T > { @ PropertyIdentifier ( type = String . class ) public static final String VARIABLE_NAME_KEY = "variableName" ; @ Getter ( DeclarationAction . VARIABLE_NAME_KEY ) <START_BUG> @ XMLAttribute <END_BUG> public String getVariableName ( ) ; @ Setter ( DeclarationAction . VARIABLE_NAME_KEY ) public void setVariableName ( String variableName ) { } public String getDeclarationTypeAsString ( ) { } public String getFullQualifiedDeclarationTypeAsString ( ) { } public static abstract class DeclarationActionImpl < T > extends AbstractAssignationActionImpl < T > implements DeclarationAction < T > { private static final Logger logger = Logger . getLogger ( DeclarationAction . class . getPackage ( ) . getName ( ) ) ; private ControlGraphBindingModel < ? > inferedBindingModel = null ; @ Override public T execute ( FlexoBehaviourAction action ) throws FlexoException { } @ Override public ControlGraphBindingModel < ? > getInferedBindingModel ( ) { } protected ControlGraphBindingModel < ? > makeInferedBindingModel ( ) { } @ Override public String getFMLRepresentation ( FMLRepresentationContext context ) { } @ Override public String getStringRepresentation ( ) { } @ Override public String getDeclarationTypeAsString ( ) { } @ Override public String getFullQualifiedDeclarationTypeAsString ( ) { } } }

Fix:
@ XMLAttribute ( xmlTag = "variable" )
Buggy code:
class RunExecutableListener extends AbstractSolrEventListener { protected String [ ] cmd ; protected File dir ; protected String [ ] envp ; protected boolean wait = true ; public void init ( NamedList args ) { super . init ( args ) ; List cmdlist = new ArrayList ( ) ; cmdlist . add ( args . get ( "exe" ) ) ; List lst = ( ( List ) ( args . get ( "args" ) ) ) ; if ( lst != null ) cmdlist . addAll ( lst ) ; cmd = ( ( String [ ] ) ( cmdlist . toArray ( new String [ cmdlist . size ( ) ] ) ) ) ; lst = ( ( List ) ( args . get ( "env" ) ) ) ; if ( lst != null ) { envp = ( ( String [ ] ) ( lst . toArray ( new String [ lst . size ( ) ] ) ) ) ; } String str = ( ( String ) ( args . get ( "dir" ) ) ) ; if ( ( ( ( str == null ) || ( str . equals ( "" ) ) ) || ( str . equals ( "." ) ) ) || ( str . equals ( ".//" ) ) ) { dir = null ; } else { dir = new File ( str ) ; } <START_BUG> if ( "false" . equals ( args . get ( "wait" ) ) ) <END_BUG> wait = false ; } protected int exec ( String callback ) { } public void postCommit ( ) { } public void newSearcher ( SolrIndexSearcher newSearcher , SolrIndexSearcher currentSearcher ) { } }

Fix:
if ( ( "false" . equals ( args . get ( "wait" ) ) ) || ( Boolean . FALSE . equals ( args . get ( "wait" ) ) ) )
Buggy code:
@ ManagedBean ( "BeanWithSimpleInjected" ) @ Resources ( { @ Resource ( name = "simple" , type = SimpleManagedBean . class , mappedName = "SimpleManagedBean" ) } ) @ Interceptors ( InterceptorBean . class ) public class BeanWithSimpleInjected { private final Logger log = Logger . getLogger ( BeanWithSimpleInjected . class ) ; @ Resource private SimpleManagedBean simple ; @ PostConstruct public void start ( ) { } public String echo ( String msg ) { } @ AroundInvoke public Object intercept ( InvocationContext context ) throws Exception { log . info ( ( "-----><seq2seq4repair_space>Intercepting<seq2seq4repair_space>call<seq2seq4repair_space>to<seq2seq4repair_space>" + ( context . getMethod ( ) ) ) ) ; <START_BUG> return context . proceed ( ) ; <END_BUG> } }

Fix:
return "#BeanWithSimpleInjected#" + ( context . proceed ( ) ) ;
Buggy code:
public class HelloConsumerApplication implements IDistributionConstants , IApplication , ServiceTrackerCustomizer { public static final String CONSUMER_NAME = "org.eclipse.ecf.examples.remoteservices.hello.consumer" ; private BundleContext bundleContext ; private ServiceTracker containerFactoryServiceTracker ; private String containerType = "ecf.r_osgi.peer" ; private final Object appLock = new Object ( ) ; private boolean done = false ; private ServiceTracker helloServiceTracker ; public Object start ( IApplicationContext appContext ) throws Exception { } private void startLocalDiscoveryIfPresent ( ) { } private Filter createRemoteFilter ( ) throws InvalidSyntaxException { } public void stop ( ) { if ( ( helloServiceTracker ) != null ) { helloServiceTracker . close ( ) ; helloServiceTracker = null ; } if ( ( containerFactoryServiceTracker ) != null ) { containerFactoryServiceTracker . close ( ) ; containerFactoryServiceTracker = null ; } this . bundleContext = null ; synchronized ( appLock ) { done = true ; <START_BUG> notifyAll ( ) ; <END_BUG> } } private IContainerFactory getContainerFactory ( ) { } private void processArgs ( IApplicationContext appContext ) { } private void waitForDone ( ) { } public Object addingService ( ServiceReference reference ) { } public void modifiedService ( ServiceReference reference , Object service ) { } public void removedService ( ServiceReference reference , Object service ) { } }

Fix:
appLock . notifyAll ( ) ;