nus-yam/ex-repair huggingface dataset:
Buggy code:
public class CategoriesReportActivity extends BaseFragmentActivity { public static final String REPORT_FILTERS = "CategoriesReportActivity:Filter" ; public static final String REPORT_TITLE = "CategoriesReportActivity:Title" ; private static CurrencyUtils currencyUtils ; public boolean mIsDualPanel = false ; public String mFilter = "" ; @ Override protected void onCreate ( Bundle savedInstanceState ) { } private static class CategoriesReportAdapter extends CursorAdapter { private LayoutInflater mInflater ; @ SuppressWarnings ( "deprecation" ) public CategoriesReportAdapter ( Context context , Cursor c ) { } @ Override public void bindView ( View view , Context context , Cursor cursor ) { } @ Override public View newView ( Context context , Cursor cursor , ViewGroup root ) { } } public static class CategoriesReportFragment extends BaseReportFragment { private static final int GROUP_ID_CATEGORY = 65535 ; private LinearLayout mHeaderListView ; private LinearLayout mFooterListView ; @ Override public void onActivityCreated ( Bundle savedInstanceState ) { } @ Override public void onCreateOptionsMenu ( Menu menu , MenuInflater inflater ) { super . onCreateOptionsMenu ( menu , inflater ) ; <START_BUG> Core core = new Core ( getActivity ( ) . getApplicationContext ( ) ) ; <END_BUG> MenuItem itemOption = menu . findItem ( menu_option1 ) ; if ( itemOption != null ) { itemOption . setVisible ( true ) ; itemOption . setShowAsAction ( SHOW_AS_ACTION_IF_ROOM ) ; itemOption . setIcon ( getActivity ( ) . getResources ( ) . getDrawable ( core . resolveIdAttribute ( ic_action_list ) ) ) ; itemOption . setTitle ( categories ) ; SubMenu subMenu = itemOption . getSubMenu ( ) ; if ( subMenu != null ) { MoneyManagerOpenHelper helper = MoneyManagerOpenHelper . getInstance ( getActivity ( ) . getApplicationContext ( ) ) ; SQLiteDatabase database = helper . getReadableDatabase ( ) ; TableCategory category = new TableCategory ( ) ; Cursor cursor = database . query ( category . getSource ( ) , new String [ ] { TableCategory . CATEGID , TableCategory . CATEGNAME } , null , null , null , null , CATEGNAME ) ; if ( ( cursor != null ) && ( cursor . moveToFirst ( ) ) ) { int order = 0 ; while ( ! ( cursor . isAfterLast ( ) ) ) { subMenu . add ( CategoriesReportActivity . CategoriesReportFragment . GROUP_ID_CATEGORY , ( - ( cursor . getInt ( cursor . getColumnIndex ( CATEGID ) ) ) ) , ( order ++ ) , cursor . getString ( cursor . getColumnIndex ( CATEGNAME ) ) ) ; cursor . moveToNext ( ) ; } } } } MenuItem itemChart = menu . findItem ( menu_chart ) ; if ( itemChart != null ) { itemChart . setVisible ( ( ! ( ( ( CategoriesReportActivity ) ( getActivity ( ) ) ) . mIsDualPanel ) ) ) ; itemChart . setIcon ( core . resolveIdAttribute ( ic_action_pie_chart ) ) ; } } @ Override public void onLoadFinished ( Loader < Cursor > loader , Cursor data ) { } @ Override public boolean onOptionsItemSelected ( MenuItem item ) { } @ SuppressWarnings ( "deprecation" ) @ Override protected String prepareQuery ( String whereClause ) { } public void showChart ( ) { } @ Override public String getSubTitle ( ) { } } }

Fix:
Core core = new Core ( getActivity ( ) ) ;
Buggy code:
public class NavigationAdapter extends BaseAdapter { private Context mContext ; private LayoutInflater mInflater ; private String [ ] mStrs ; private int [ ] mIcons ; public NavigationAdapter ( Context context , int strs , int icons ) { } @ Override public int getCount ( ) { } @ Override public Object getItem ( int i ) { } @ Override public long getItemId ( int i ) { } @ Override public View getView ( int position , View convertView , ViewGroup parent ) { if ( position >= ( getCount ( ) ) ) { return null ; } else { String str = mStrs [ position ] ; View v = convertView ; if ( str . equals ( "-" ) ) { v = mInflater . inflate ( drawer_divider , parent , false ) ; v . setTag ( 1 ) ; return v ; } else { <START_BUG> if ( ( v == null ) || ( ( Integer . valueOf ( v . getTag ( ) ) ) == 1 ) ) { <END_BUG> v = mInflater . inflate ( drawer_item , parent , false ) ; v . setTag ( 0 ) ; } ImageView iv = Utility . findViewById ( v , drawer_icon ) ; TextView tv = Utility . findViewById ( v , drawer_text ) ; if ( ( iv != null ) && ( tv != null ) ) { iv . setImageDrawable ( mContext . getResources ( ) . getDrawable ( mIcons [ position ] ) ) ; tv . setText ( str ) ; tv . getPaint ( ) . setFakeBoldText ( true ) ; } return v ; } } } }

Fix:
if ( ( v == null ) || ( ( ( Integer ) ( v . getTag ( ) ) ) == 1 ) ) {
Buggy code:
public class CompilationUnitVisitor extends Compiler { public CompilationUnitVisitor ( INameEnvironment environment , IErrorHandlingPolicy policy , Map settings , ICompilerRequestor requestor , IProblemFactory problemFactory ) { } public void accept ( ISourceType [ ] sourceTypes , PackageBinding packageBinding ) { <START_BUG> CompilationResult result = new CompilationResult ( sourceTypes [ 0 ] . getFileName ( ) , 1 , 1 ) ; <END_BUG> CompilationUnitDeclaration unit = SourceTypeConverter . buildCompilationUnit ( sourceTypes , true , true , lookupEnvironment . problemReporter , result ) ; if ( unit != null ) { this . lookupEnvironment . buildTypeBindings ( unit ) ; this . lookupEnvironment . completeTypeBindings ( unit , true ) ; } } protected static IErrorHandlingPolicy getHandlingPolicy ( ) { } protected static INameEnvironment getNameEnvironment ( ICompilationUnit sourceUnit ) throws JavaModelException { } protected static ICompilerRequestor getRequestor ( ) { } public static void visit ( ICompilationUnit unitElement , IAbstractSyntaxTreeVisitor visitor ) throws JavaModelException { } protected static IProblemFactory getProblemFactory ( final IAbstractSyntaxTreeVisitor visitor ) { } }

Fix:
CompilationResult result = new CompilationResult ( sourceTypes [ 0 ] . getFileName ( ) , 1 , 1 , this . options . maxProblemsPerUnit ) ;
Buggy code:
public class SieveOfEratosthenes extends PrimeGenerator { private boolean [ ] sieve ; private List < Integer > primes ; public SieveOfEratosthenes ( int depth , boolean init ) { } @ Override public void generate ( ) { } @ Override public boolean isPrime ( int n ) { } @ Override public int getNthPrime ( int n ) { <START_BUG> return getPrimes ( ) . get ( 0 ) ; <END_BUG> } @ Override public List < Integer > getPrimes ( ) { } }

Fix:
return getPrimes ( ) . get ( n ) ;
Buggy code:
public interface Bootstrap { AsyncFuture < ServiceContainer > bootstrap ( Bootstrap . Configuration configuration , List < ServiceActivator > extraServices ) { } AsyncFuture < ServiceContainer > startup ( Bootstrap . Configuration configuration , List < ServiceActivator > extraServices ) { } final class Configuration { private ServerEnvironment serverEnvironment ; private ModuleLoader moduleLoader = Module . getBootModuleLoader ( ) ; private ExtensibleConfigurationPersister configurationPersister ; private long startTime = Module . getStartTime ( ) ; public void setPortOffset ( final int portOffset ) { } public ServerEnvironment getServerEnvironment ( ) { } public synchronized void setServerEnvironment ( final ServerEnvironment serverEnvironment ) { } public ModuleLoader getModuleLoader ( ) { } public void setModuleLoader ( final ModuleLoader moduleLoader ) { } public synchronized ExtensibleConfigurationPersister getConfigurationPersister ( ) { if ( ( configurationPersister ) == null ) { if ( ( serverEnvironment ) == null ) { configurationPersister = new NullConfigurationPersister ( new StandaloneXml ( moduleLoader ) ) ; } else { QName rootElement = new QName ( CURRENT . getUriString ( ) , "server" ) ; StandaloneXml parser = new StandaloneXml ( Module . getBootModuleLoader ( ) ) ; <START_BUG> configurationPersister = new org . jboss . as . controller . persistence . BackupXmlConfigurationPersister ( new File ( serverEnvironment . getServerConfigurationDir ( ) , "standalone.xml" ) , rootElement , parser , parser ) ; <END_BUG> } } return configurationPersister ; } public synchronized void setConfigurationPersister ( final ExtensibleConfigurationPersister configurationPersister ) { } public long getStartTime ( ) { } public void setStartTime ( final long startTime ) { } } final class Factory { private Factory ( ) { } public static Bootstrap newInstance ( ) { } } }

Fix:
configurationPersister = new org . jboss . as . controller . persistence . BackupXmlConfigurationPersister ( serverEnvironment . getServerConfigurationFile ( ) , rootElement , parser , parser ) ;
Buggy code:
public class MigrationDBCreator extends DatabaseCreator { private static final Log log = LogFactory . getLog ( MigrationDBCreator . class ) ; private DataSource dataSource ; private String delimiter = ";" ; private Connection connection = null ; Statement statement ; public MigrationDBCreator ( DataSource dataSource ) { } @ Override protected String getDbScriptLocation ( String databaseType ) { } @ Override public void createRegistryDatabase ( ) throws SQLException , APIMigrationException { } private void executeSQLScript ( ) throws Exception { String databaseType = DatabaseCreator . getDatabaseType ( this . connection ) ; boolean keepFormat = false ; if ( DB_TYPE_ORACLE . equals ( databaseType ) ) { delimiter = "//" ; } else if ( DB_TYPE_DB2 . equals ( databaseType ) ) { delimiter = "//" ; } else if ( DB_TYPE_OPENEDGE . equals ( databaseType ) ) { delimiter = "//" ; keepFormat = true ; } String dbscriptName = getDbScriptLocation ( databaseType ) ; StringBuffer sql = new StringBuffer ( ) ; BufferedReader reader = null ; try { InputStream is = new FileInputStream ( dbscriptName ) ; <START_BUG> reader = new BufferedReader ( new InputStreamReader ( is ) ) ; <END_BUG> String line ; while ( ( line = reader . readLine ( ) ) != null ) { line = line . trim ( ) ; if ( ! keepFormat ) { if ( line . startsWith ( "////" ) ) { continue ; } if ( line . startsWith ( "--" ) ) { continue ; } StringTokenizer st = new StringTokenizer ( line ) ; if ( st . hasMoreTokens ( ) ) { String token = st . nextToken ( ) ; if ( "REM" . equalsIgnoreCase ( token ) ) { continue ; } } } sql . append ( ( keepFormat ? "\n" : "<seq2seq4repair_space>" ) ) . append ( line ) ; if ( ( ! keepFormat ) && ( ( line . indexOf ( "--" ) ) >= 0 ) ) { sql . append ( "\n" ) ; } if ( checkStringBufferEndsWith ( sql , delimiter ) ) { executeSQL ( sql . substring ( 0 , ( ( sql . length ( ) ) - ( delimiter . length ( ) ) ) ) ) ; sql . replace ( 0 , sql . length ( ) , "" ) ; } } if ( ( sql . length ( ) ) > 0 ) { executeSQL ( sql . toString ( ) ) ; } } catch ( IOException e ) { MigrationDBCreator . log . error ( "Error<seq2seq4repair_space>occurred<seq2seq4repair_space>while<seq2seq4repair_space>executing<seq2seq4repair_space>SQL<seq2seq4repair_space>script<seq2seq4repair_space>for<seq2seq4repair_space>creating<seq2seq4repair_space>registry<seq2seq4repair_space>database" , e ) ; throw new APIMigrationException ( "Error<seq2seq4repair_space>occurred<seq2seq4repair_space>while<seq2seq4repair_space>executing<seq2seq4repair_space>SQL<seq2seq4repair_space>script<seq2seq4repair_space>for<seq2seq4repair_space>creating<seq2seq4repair_space>registry<seq2seq4repair_space>database" , e ) ; } finally { if ( reader != null ) { reader . close ( ) ; } } } private void executeSQL ( String sql ) throws APIMigrationException { } }

Fix:
reader = new BufferedReader ( new InputStreamReader ( is , "UTF8" ) ) ;
Buggy code:
public abstract class Downsampler implements BitmapDecoder < InputStream > { private static final String TAG = "Downsampler" ; private static final Set < ImageHeaderParser . ImageType > TYPES_THAT_USE_POOL = EnumSet . of ( JPEG , PNG_A , PNG ) ; private static final Queue < BitmapFactory . Options > OPTIONS_QUEUE = Util . createQueue ( 0 ) ; public static final Downsampler AT_LEAST = new Downsampler ( ) { @ Override protected int getSampleSize ( int inWidth , int inHeight , int outWidth , int outHeight ) { } @ Override public String getId ( ) { } } ; public static final Downsampler AT_MOST = new Downsampler ( ) { @ Override protected int getSampleSize ( int inWidth , int inHeight , int outWidth , int outHeight ) { } @ Override public String getId ( ) { } } ; public static final Downsampler NONE = new Downsampler ( ) { @ Override protected int getSampleSize ( int inWidth , int inHeight , int outWidth , int outHeight ) { } @ Override public String getId ( ) { } } ; private static final int MARK_POSITION = ( 5 * 1024 ) * 1024 ; @ SuppressWarnings ( "resource" ) @ Override public Bitmap decode ( InputStream is , BitmapPool pool , int outWidth , int outHeight , DecodeFormat decodeFormat ) { } private int getRoundedSampleSize ( int degreesToRotate , int inWidth , int inHeight , int outWidth , int outHeight ) { int targetHeight = ( outHeight == ( Target . SIZE_ORIGINAL ) ) ? inHeight : outHeight ; int targetWidth = ( outWidth == ( Target . SIZE_ORIGINAL ) ) ? inWidth : outWidth ; final int exactSampleSize ; if ( ( degreesToRotate == 90 ) || ( degreesToRotate == 270 ) ) { exactSampleSize = getSampleSize ( inHeight , inWidth , targetWidth , targetHeight ) ; } else { exactSampleSize = getSampleSize ( inWidth , inHeight , targetWidth , targetHeight ) ; } <START_BUG> final int powerOfTwoSampleSize = ( exactSampleSize == 0 ) ? 0 : Integer . highestOneBit ( ( exactSampleSize - 1 ) ) ; <END_BUG> return Math . max ( 1 , powerOfTwoSampleSize ) ; } private Bitmap downsampleWithSize ( ExceptionCatchingInputStream is , BitmapFactory . Options options , BitmapPool pool , int inWidth , int inHeight , int sampleSize , DecodeFormat decodeFormat ) { } private static boolean shouldUsePool ( InputStream is ) { } private static Config getConfig ( InputStream is , DecodeFormat format ) { } protected abstract int getSampleSize ( int inWidth , int inHeight , int outWidth , int outHeight ) { } public int [ ] getDimensions ( ExceptionCatchingInputStream is , BitmapFactory . Options options ) { } private static Bitmap decodeStream ( ExceptionCatchingInputStream is , BitmapFactory . Options options ) { } @ TargetApi ( VERSION_CODES . HONEYCOMB ) private static void setInBitmap ( BitmapFactory . Options options , Bitmap recycled ) { } @ TargetApi ( VERSION_CODES . HONEYCOMB ) private static synchronized Options getDefaultOptions ( ) { } private static void releaseOptions ( BitmapFactory . Options decodeBitmapOptions ) { } @ TargetApi ( VERSION_CODES . HONEYCOMB ) private static void resetOptions ( BitmapFactory . Options decodeBitmapOptions ) { } }

Fix:
final int powerOfTwoSampleSize = ( exactSampleSize == 0 ) ? 0 : Integer . highestOneBit ( exactSampleSize ) ;
Buggy code:
public class TestBasics extends LuceneTestCase { private IndexSearcher searcher ; public void setUp ( ) throws Exception { super . setUp ( ) ; RAMDirectory directory = new RAMDirectory ( ) ; IndexWriter writer = new IndexWriter ( directory , new SimpleAnalyzer ( ) , true , MaxFieldLength . LIMITED ) ; for ( int i = 0 ; i < 1000 ; i ++ ) { Document doc = new Document ( ) ; doc . add ( new org . apache . lucene . document . Field ( "field" , English . intToEnglish ( i ) , Store . YES , Index . ANALYZED ) ) ; writer . addDocument ( doc ) ; } writer . close ( ) ; <START_BUG> searcher = new IndexSearcher ( directory ) ; <END_BUG> } public void testTerm ( ) throws Exception { } public void testTerm2 ( ) throws Exception { } public void testPhrase ( ) throws Exception { } public void testPhrase2 ( ) throws Exception { } public void testBoolean ( ) throws Exception { } public void testBoolean2 ( ) throws Exception { } public void testSpanNearExact ( ) throws Exception { } public void testSpanNearUnordered ( ) throws Exception { } public void testSpanNearOrdered ( ) throws Exception { } public void testSpanNot ( ) throws Exception { } public void testSpanWithMultipleNotSingle ( ) throws Exception { } public void testSpanWithMultipleNotMany ( ) throws Exception { } public void testNpeInSpanNearWithSpanNot ( ) throws Exception { } public void testNpeInSpanNearInSpanFirstInSpanNot ( ) throws Exception { } public void testSpanFirst ( ) throws Exception { } public void testSpanOr ( ) throws Exception { } public void testSpanExactNested ( ) throws Exception { } public void testSpanNearOr ( ) throws Exception { } public void testSpanComplex1 ( ) throws Exception { } public void testSpansSkipTo ( ) throws Exception { } private boolean skipToAccoringToJavaDocs ( Spans s , int target ) throws Exception { } private void checkHits ( Query query , int [ ] results ) throws IOException { } }

Fix:
searcher = new IndexSearcher ( directory , true ) ;
Buggy code:
public interface IndentAction { public int calculateIndent ( JEditBuffer buffer , int line , int oldIndent , int newIndent ) { } public boolean keepChecking ( ) ; public class Collapse implements IndentAction { public int calculateIndent ( JEditBuffer buffer , int line , int oldIndent , int newIndent ) { } public boolean keepChecking ( ) { return true ; } public boolean equals ( Object o ) { } } public class Reset implements IndentAction { public int calculateIndent ( JEditBuffer buffer , int line , int oldIndent , int newIndent ) { } public boolean keepChecking ( ) { return true ; } } public class Increase implements IndentAction { private int amount ; public Increase ( ) { } public Increase ( int amount ) { } public int calculateIndent ( JEditBuffer buffer , int line , int oldIndent , int newIndent ) { } public boolean keepChecking ( ) { return true ; } public boolean equals ( Object o ) { } } public class Decrease implements IndentAction { public int calculateIndent ( JEditBuffer buffer , int line , int oldIndent , int newIndent ) { } public boolean keepChecking ( ) { return true ; } } public class AlignBracket implements IndentAction { private int line ; private int offset ; private int openBracketLine ; private int openBracketColumn ; private String openBracketLineText ; private int extraIndent ; public AlignBracket ( JEditBuffer buffer , int line , int offset ) { } public int getExtraIndent ( ) { } public void setExtraIndent ( int extraIndent ) { } public int getOpenBracketColumn ( ) { } public String getOpenBracketLine ( ) { } public int calculateIndent ( JEditBuffer buffer , int line , int oldIndent , int newIndent ) { } public boolean keepChecking ( ) { return false ; } } public class AlignOffset implements IndentAction { private int offset ; public AlignOffset ( int offset ) { } public int calculateIndent ( JEditBuffer buffer , int line , int oldIndent , int newIndent ) { } public boolean keepChecking ( ) { return false ; } } public class AlignParameter implements IndentAction { private int openParensColumn ; private String openParensLineText ; public AlignParameter ( int openParensColumn , String openParensLineText ) { } public int calculateIndent ( JEditBuffer buffer , int line , int oldIndent , int newIndent ) { } public boolean keepChecking ( ) { <START_BUG> return true ; <END_BUG> } } }

Fix:
return false ;
Buggy code:
abstract class Session { final MsnClient client ; ArrayList listeners ; private final byte [ ] buffer = new byte [ 1024 ] ; private Socket socket ; private InputStream is ; private OutputStream os ; private long transactionID = 0 ; private Session . IdleThread idleThread ; private boolean closed = false ; Session ( MsnClient client ) { } Session ( String host , MsnClient client ) throws IOException { } Session ( String ip , int port , MsnClient client ) throws IOException { } final void openSocket ( String host ) throws IOException { } final void openSocket ( String ip , int port ) throws IOException { } final InputStream getInputStream ( ) { } String read ( ) throws IOException { } private final void write ( String input , boolean newline ) throws IOException { } final void write ( String input ) throws IOException { } final void write ( String command , String parameters , boolean newline ) throws IOException { } final void write ( String command , String parameters ) throws IOException { } void close ( ) { <START_BUG> closed = false ; <END_BUG> if ( ( idleThread ) != null ) { idleThread . interrupt ( ) ; idleThread = null ; } if ( ( socket ) != null ) { try { socket . close ( ) ; } catch ( Exception e ) { } socket = null ; } if ( ( is ) != null ) { try { is . close ( ) ; } catch ( Exception e ) { } is = null ; } if ( ( os ) != null ) { try { os . close ( ) ; } catch ( Exception e ) { } os = null ; } } protected void finalize ( ) throws Throwable { } final void idle ( ) { } final boolean isClosed ( ) { } private class IdleThread extends Thread { public void run ( ) { } } }

Fix:
closed = true ;
Buggy code:
public class Information { private String format ; private String appid ; private String uid ; private String locale ; private String os_version ; private String timestamp ; private String hashkey ; private String google_ad_id ; private boolean google_ad_id_limited_tracking_enabled ; public boolean isGoogle_ad_id_limited_tracking_enabled ( ) { } public void setGoogle_ad_id_limited_tracking_enabled ( boolean google_ad_id_limited_tracking_enabled ) { } public String getGoogle_ad_id ( ) { } public void setGoogle_ad_id ( String google_ad_id ) { } public String getHashkey ( ) { } public String getParams ( ) { } public String getTimestamp ( ) { } public void setTimestamp ( String timestamp ) { } public void setOs_version ( String os_version ) { } public String getLocale ( ) { } public void setLocale ( String locale ) { } public String getUid ( ) { } public void setUid ( String uid ) { } public String getFormat ( ) { } public void setFormat ( String format ) { } public String getAppid ( ) { } public void setAppid ( String appid ) { } public static boolean isValidFormat ( String format ) { } public static boolean isValidAppid ( String appid ) { } public static boolean isValidUid ( String uid ) { } public static boolean isValidLocale ( String locale ) { <START_BUG> if ( ( locale == null ) || ( locale . isEmpty ( ) ) ) <END_BUG> return false ; return true ; } public static boolean isValidOs_version ( String os_version ) { } public static boolean isValidTimestamp ( String timestamp ) { } public static boolean isValidGoogle_ad_id ( String google_ad_id ) { } public String getOs_version ( ) { } }

Fix:
if ( ( ( locale == null ) || ( locale . isEmpty ( ) ) ) || ( ( locale . length ( ) ) > 2 ) )
Buggy code:
public abstract class AbstractLayouter implements Layouter { protected GraphEditView view ; protected GraphEditModel model ; protected LinkStrategy strategy ; protected Graphics g ; protected LayoutProperties layoutProperties = LayoutProperties . getInstance ( ) ; protected int xOffset = 0 ; protected int yOffset = 0 ; protected List < GraphElement > elementsToLayout ; public AbstractLayouter ( GraphEditView view ) { } public AbstractLayouter ( GraphEditView view , List < GraphElement > elementsToLayout ) { } public AbstractLayouter ( GraphEditView view , Graphics g ) { } protected final int xConnOffset = 0 ; protected final int yConnOffset = 20 ; protected final int yNodeOffset = 0 ; protected final int xNodeOffset = 75 ; protected void setPosition ( LinkStrategy strategy , GraphEditView view , LinkableElement graphElement , int xPosition , int yPosition ) { } public void setConnectorLocations ( LinkableElement graphElement , int xPosition , int yPosition ) { } public void setConnectorLocations ( LinkableElement graphElement ) { int xPosition = ( ( int ) ( ( ( Point2D ) ( graphElement . getProperty ( POSITION ) ) ) . getX ( ) ) ) ; <START_BUG> int yPosition = ( ( int ) ( ( ( Point2D ) ( graphElement . getProperty ( POSITION ) ) ) . getX ( ) ) ) ; <END_BUG> setConnectorLocations ( graphElement , xPosition , yPosition ) ; } protected boolean recursiveLink ( LinkableElement graphElement , Link link ) { } }

Fix:
int yPosition = ( ( int ) ( ( ( Point2D ) ( graphElement . getProperty ( POSITION ) ) ) . getY ( ) ) ) ;
Buggy code:
public class ExampleMarkerField extends MarkerField { public ExampleMarkerField ( ) { } @ Override public String getValue ( MarkerItem item ) { } private String getFixablePrefix ( MarkerItem item ) { <START_BUG> if ( ! ( item . isConcrete ( ) ) ) <END_BUG> return null ; IMarker marker = item . getMarker ( ) ; if ( marker != null ) { if ( IDE . getMarkerHelpRegistry ( ) . hasResolutions ( marker ) ) { return "[Fixable]<seq2seq4repair_space>" ; } } return null ; } @ Override public String getColumnHeaderText ( ) { } @ Override public int getDefaultColumnWidth ( Control control ) { } private Image getImage ( MarkerItem item ) { } @ Override public void update ( ViewerCell cell ) { } }

Fix:
if ( ( item . getMarker ( ) ) == null )
Buggy code:
public class QueryWrapperFilter extends Filter { private Query query ; public QueryWrapperFilter ( Query query ) { } @ Override public DocIdSet getDocIdSet ( final IndexReader reader ) throws IOException { <START_BUG> final Weight weight = query . weight ( new IndexSearcher ( reader ) ) ; <END_BUG> return new DocIdSet ( ) { @ Override public DocIdSetIterator iterator ( ) throws IOException { return weight . scorer ( reader , true , false ) ; } @ Override public boolean isCacheable ( ) { return false ; } } ; } @ Override public String toString ( ) { } @ Override public boolean equals ( Object o ) { } @ Override public int hashCode ( ) { } }

Fix:
final Weight weight = new IndexSearcher ( reader ) . createNormalizedWeight ( query ) ;
Buggy code:
public class SetClasspathOperation extends JavaModelOperation { IClasspathEntry [ ] oldExpandedPath ; IClasspathEntry [ ] newRawPath ; boolean canChangeResource ; public SetClasspathOperation ( IJavaProject project , IClasspathEntry [ ] oldExpandedPath , IClasspathEntry [ ] newRawPath , boolean canChangeResource ) { } protected void addDeltas ( IPackageFragmentRoot [ ] roots , int flag , JavaElementDelta delta ) { } protected int classpathContains ( IClasspathEntry [ ] list , IClasspathEntry entry ) { } protected void executeOperation ( ) throws JavaModelException { } protected void generateClasspathChangeDeltas ( IClasspathEntry [ ] oldResolvedPath , IClasspathEntry [ ] newResolvedPath , JavaModelManager manager , JavaProject project ) { } public IJavaModelStatus verify ( ) { } protected void updateAffectedProjects ( IPath prerequisiteProjectPath ) { try { IJavaModel model = JavaModelManager . getJavaModelManager ( ) . getJavaModel ( ) ; IJavaProject [ ] projects = model . getJavaProjects ( ) ; for ( int i = 0 , projectCount = projects . length ; i < projectCount ; i ++ ) { try { JavaProject project = ( ( JavaProject ) ( projects [ i ] ) ) ; <START_BUG> IClasspathEntry [ ] classpath = project . getRawClasspath ( ) ; <END_BUG> for ( int j = 0 , entryCount = classpath . length ; j < entryCount ; j ++ ) { IClasspathEntry entry = classpath [ j ] ; if ( ( ( entry . getEntryKind ( ) ) == ( IClasspathEntry . CPE_PROJECT ) ) && ( entry . getPath ( ) . equals ( prerequisiteProjectPath ) ) ) { project . updateClassPath ( this . fMonitor , this . canChangeResource ) ; break ; } } } catch ( JavaModelException e ) { } } } catch ( JavaModelException e ) { } } protected void updateProjectReferences ( String [ ] oldRequired , String [ ] newRequired ) { } }

Fix:
IClasspathEntry [ ] classpath = project . getResolvedClasspath ( true ) ;
Buggy code:
public class AnalyzeFolderCommand extends FolderCommand { Folder srcFolder ; public AnalyzeFolderCommand ( DefaultCommandReference [ ] references ) { } public AnalyzeFolderCommand ( AbstractFrameController frame , DefaultCommandReference [ ] references ) { } public void execute ( Worker worker ) throws Exception { FolderCommandReference [ ] r = ( ( FolderCommandReference [ ] ) ( getReferences ( ) ) ) ; FolderCommandAdapter adapter = new FolderCommandAdapter ( r ) ; srcFolder = ( ( Folder ) ( adapter . getSourceFolderReferences ( ) [ 0 ] . getFolder ( ) ) ) ; worker . setDisplayText ( ( ( "Applying<seq2seq4repair_space>analyzer<seq2seq4repair_space>to" + ( srcFolder . getName ( ) ) ) + "..." ) ) ; <START_BUG> Object [ ] uids = srcFolder . getUids ( worker ) ; <END_BUG> for ( int i = 0 ; i < ( uids . length ) ; i ++ ) { AnalyzeMessageCommand . addHeader ( srcFolder , uids [ i ] , worker ) ; } } }

Fix:
Object [ ] uids = srcFolder . getUids ( ) ;
Buggy code:
public class DBUpdate { private DBCommandHandler dbComHand = new DBCommandHandler ( ) ; public boolean insertUser ( String userId , String password , String email , String realName , String bio , int secretQuestion , String secretAnswer , String userType ) { } private boolean insertArticle ( int articleId , String url , int authorId , int providerId , String title , Date addDate , String category ) { } private boolean insertRating ( boolean loggedIn , int ratingId , String userId , int articleId , int ratingValue , String ratingText , Date ratingDate ) { } private boolean insertProvider ( int providerId , String providerName ) { } private boolean deleteAccount ( String userId ) { } private boolean deleteContent ( int articleId ) { } private boolean updateUser ( String userId , String password , String email , String realName , String bio , int secretQuestion , String secretAnswer ) { <START_BUG> String command = ( ( ( ( ( ( ( ( ( ( ( ( ( "UPDATE<seq2seq4repair_space>TABLE<seq2seq4repair_space>users<seq2seq4repair_space>SET<seq2seq4repair_space>userPassword<seq2seq4repair_space>=<seq2seq4repair_space>" + password ) + ",<seq2seq4repair_space>userEmail<seq2seq4repair_space>=<seq2seq4repair_space>" ) + email ) + ",<seq2seq4repair_space>userRealName<seq2seq4repair_space>=<seq2seq4repair_space>" ) + realName ) + ",<seq2seq4repair_space>userBio<seq2seq4repair_space>=<seq2seq4repair_space>" ) + bio ) + ",<seq2seq4repair_space>userRecoveryQuestionID" ) + secretQuestion ) + ",<seq2seq4repair_space>userRecoveryAnswer<seq2seq4repair_space>=<seq2seq4repair_space>" ) + secretAnswer ) + "WHERE<seq2seq4repair_space>userID<seq2seq4repair_space>=<seq2seq4repair_space>" ) + ( userid ) ) + ";" ; <END_BUG> try { int resultCount = dbComHand . doCommand ( command ) ; dbComHand . close ( ) ; return resultCount > 0 ; } catch ( SQLException ex ) { ex . printStackTrace ( ) ; return false ; } } private boolean updateCategory ( int articleId , String category ) { } }

Fix:
String command = ( ( ( ( ( ( ( ( ( ( ( ( ( "UPDATE<seq2seq4repair_space>TABLE<seq2seq4repair_space>users<seq2seq4repair_space>SET<seq2seq4repair_space>userPassword<seq2seq4repair_space>=<seq2seq4repair_space>" + password ) + ",<seq2seq4repair_space>userEmail<seq2seq4repair_space>=<seq2seq4repair_space>" ) + email ) + ",<seq2seq4repair_space>userRealName<seq2seq4repair_space>=<seq2seq4repair_space>" ) + realName ) + ",<seq2seq4repair_space>userBio<seq2seq4repair_space>=<seq2seq4repair_space>" ) + bio ) + ",<seq2seq4repair_space>userRecoveryQuestionID" ) + secretQuestion ) + ",<seq2seq4repair_space>userRecoveryAnswer<seq2seq4repair_space>=<seq2seq4repair_space>" ) + secretAnswer ) + "WHERE<seq2seq4repair_space>userID<seq2seq4repair_space>=<seq2seq4repair_space>" ) + userId ) + ";" ;
Buggy code:
public class Matrix { private double [ ] _data ; private final int _nbRows ; private final int _nbColumns ; public Matrix ( double [ ] backend , int p_nbRows , int p_nbColumns ) { } public static boolean compare ( double [ ] a , double [ ] b , double eps ) { } public static boolean compareArray ( double [ ] [ ] a , double [ ] [ ] b , double eps ) { } public double [ ] data ( ) { } public double [ ] exportRowMatrix ( ) { } public Matrix importRowMatrix ( double [ ] rowdata , int rows , int columns ) { } public void setData ( double [ ] data ) { } public int rows ( ) { } public int columns ( ) { } public double get ( int rowIndex , int columnIndex ) { } public double set ( int rowIndex , int columnIndex , double value ) { } public double add ( int rowIndex , int columnIndex , double value ) { } public void setAll ( double value ) { } public double getAtIndex ( int index ) { } public double setAtIndex ( int index , double value ) { } public double addAtIndex ( int index , double value ) { } public Matrix clone ( ) { } private static MatrixEngine _defaultEngine = new BlasMatrixEngine ( ) ; public static MatrixEngine defaultEngine ( ) { } public static Matrix multiply ( Matrix matA , Matrix matB ) { <START_BUG> return Matrix . defaultEngine ( ) . multiplyTransposeAlphaBeta ( NOTRANSPOSE , 1.0 , matA , NOTRANSPOSE , 0.0 , matB ) ; <END_BUG> } public static Matrix multiplyTransposeAlphaBeta ( TransposeType transA , double alpha , Matrix matA , TransposeType transB , double beta , Matrix matB ) { } public static Matrix invert ( Matrix mat , boolean invertInPlace ) { } public static Matrix pinv ( Matrix mat , boolean invertInPlace ) { } public static int leadingDimension ( Matrix matA ) { } public static Matrix random ( int rows , int columns , double min , double max ) { } public static void scale ( double alpha , Matrix matA ) { } public static Matrix transpose ( Matrix matA ) { } private static void transposeSquare ( Matrix matA , Matrix result ) { } private static void transposeStandard ( Matrix matA , Matrix result ) { } private static void transposeBlock ( Matrix matA , Matrix result ) { } public double [ ] saveToState ( ) { } public static Matrix loadFromState ( Object o ) { } public static Matrix createIdentity ( int rows , int columns ) { } public static double compareMatrix ( Matrix matA , Matrix matB ) { } public static Matrix fromPartialPivots ( int [ ] pivots , boolean transposed ) { } public static boolean testDimensionsAB ( TransposeType transA , TransposeType transB , Matrix matA , Matrix matB ) { } public static Matrix identity ( int rows , int columns ) { } }

Fix:
return Matrix . defaultEngine ( ) . multiplyTransposeAlphaBeta ( NOTRANSPOSE , 1.0 , matA , NOTRANSPOSE , 1.0 , matB ) ;
Buggy code:
@ SuppressWarnings ( "restriction" ) public class APTCompileProblemMarkerResolutionGenerator implements IMarkerResolutionGenerator2 { private static final IMarkerResolution [ ] NO_RESOLUTIONS = new IMarkerResolution [ 0 ] ; public boolean hasResolutions ( IMarker marker ) { } @ SuppressWarnings ( "unchecked" ) public IMarkerResolution [ ] getResolutions ( IMarker marker ) { } private IProblemLocation createProblemLocation ( IMarker marker ) { } private ICompilationUnit getCompilationUnit ( IMarker marker ) { IResource resource = marker . getResource ( ) ; if ( ( resource instanceof IFile ) && ( resource . isAccessible ( ) ) ) { IJavaElement javaElement = JavaCore . create ( ( ( IFile ) ( resource ) ) ) ; <START_BUG> if ( javaElement instanceof ICompilationUnit ) { <END_BUG> return ( ( ICompilationUnit ) ( javaElement ) ) ; } } return null ; } }

Fix:
if ( ( javaElement != null ) && ( javaElement instanceof ICompilationUnit ) ) {
Buggy code:
public class EmptySpaceMenuController { protected static final String TAG = "EmptySpaceMenuController" ; static ContactListController contactListController ; private static Context context ; public EmptySpaceMenuController ( Context context ) { } public static void showFreeSpaceMenu ( ) { if ( ( EmptySpaceMenuController . context ) == null ) Log . v ( "Empty<seq2seq4repair_space>Space<seq2seq4repair_space>Menu" , "NULL" ) ; AlertDialog . Builder builder = new AlertDialog . Builder ( EmptySpaceMenuController . context ) ; builder . setItems ( emptyspaceMenu , new DialogInterface . OnClickListener ( ) { public void onClick ( DialogInterface dialog , int item ) { if ( Values . emptyspaceMenu [ item ] . equals ( "Add<seq2seq4repair_space>Users" ) ) { Log . v ( EmptySpaceMenuController . TAG , "pressed<seq2seq4repair_space>Add<seq2seq4repair_space>Users" ) ; ContactListController . showBuddyList ( ) ; } else if ( Values . emptyspaceMenu [ item ] . equals ( "Delete<seq2seq4repair_space>Users" ) ) { Log . v ( EmptySpaceMenuController . TAG , "pressed<seq2seq4repair_space>Delete<seq2seq4repair_space>Users" ) ; ParticipantView . deleteParticipants ( ) ; } else <START_BUG> if ( Values . emptyspaceMenu [ item ] . equals ( "Leave<seq2seq4repair_space>Chat" ) ) { <END_BUG> Log . v ( EmptySpaceMenuController . TAG , "pressed<seq2seq4repair_space>Leave<seq2seq4repair_space>Chat" ) ; if ( user_primary . equals ( screen . getSpace ( ) . getOwner ( ) ) ) { ParticipantView . leaveOrDestroy ( ) ; } else { screen . getSpace ( ) . getParticipantController ( ) . leaveSpace ( screen . getSpace ( ) . equals ( Space . getMainSpace ( ) ) ) ; } } else if ( Values . emptyspaceMenu [ item ] . equals ( "Cancel" ) ) { Log . v ( EmptySpaceMenuController . TAG , "pressed<seq2seq4repair_space>Cancel" ) ; } } } ) ; builder . setTitle ( "Empty<seq2seq4repair_space>Space<seq2seq4repair_space>Menu" ) . create ( ) ; AlertDialog alert = builder . create ( ) ; alert . show ( ) ; } }

Fix:
if ( Values . emptyspaceMenu [ item ] . equals ( "Leave<seq2seq4repair_space>Conference" ) ) {
Buggy code:
public class ArcX4 implements Classifier , Parameterized { private Classifier weakLearner ; private int iterations ; private double coef = 1 ; private double expo = 4 ; private CategoricalData predicing ; private Classifier [ ] hypoths ; public ArcX4 ( Classifier weakLearner , int iterations ) { } public void setWeakLearner ( Classifier weakLearner ) { } public Classifier getWeakLearner ( ) { } public void setIterations ( int iterations ) { } public int getIterations ( ) { } public void setCoefficient ( double coef ) { } public double getCoefficient ( ) { } public void setExponent ( double expo ) { } public double getExponent ( ) { } @ Override public CategoricalResults classify ( DataPoint data ) { } private class Tester implements Runnable { final ClassificationDataSet cds ; final int [ ] errors ; final int start ; final int end ; final Classifier hypoth ; final CountDownLatch latch ; public Tester ( ClassificationDataSet cds , int [ ] errors , int start , int end , Classifier hypoth , CountDownLatch latch ) { } @ Override public void run ( ) { } } @ Override public void trainC ( ClassificationDataSet dataSet , ExecutorService threadPool ) { } @ Override public void trainC ( ClassificationDataSet dataSet ) { <START_BUG> trainC ( dataSet , null ) ; <END_BUG> } @ Override public boolean supportsWeightedData ( ) { } @ Override public ArcX4 clone ( ) { } @ Override public List < Parameter > getParameters ( ) { } @ Override public Parameter getParameter ( String paramName ) { } }

Fix:
trainC ( dataSet , new FakeExecutor ( ) ) ;
Buggy code:
public class WebValveParamAdd implements OperationStepHandler { static final WebValveParamAdd INSTANCE = new WebValveParamAdd ( ) ; @ Override public void execute ( OperationContext context , ModelNode operation ) throws OperationFailedException { final ModelNode mimetypes = context . readResourceForUpdate ( EMPTY_ADDRESS ) . getModel ( ) . get ( Constants . PARAM ) ; if ( ( operation . hasDefined ( "param-name" ) ) && ( operation . hasDefined ( "param-value" ) ) ) { mimetypes . get ( operation . get ( "param-name" ) . asString ( ) ) . set ( operation . get ( "param-value" ) . asString ( ) ) ; } else { <START_BUG> throw new OperationFailedException ( WebMessages . MESSAGES . paramNameAndParamValueRequiredForAddParam ( ) ) ; <END_BUG> } if ( ( ! ( context . isBooting ( ) ) ) && ( context . isNormalServer ( ) ) ) { context . addStep ( new OperationStepHandler ( ) { @ Override public void execute ( OperationContext context , ModelNode operation ) throws OperationFailedException { context . reloadRequired ( ) ; context . completeStep ( new OperationContext . RollbackHandler ( ) { @ Override public void handleRollback ( OperationContext context , ModelNode operation ) { context . revertReloadRequired ( ) ; } } ) ; } } , RUNTIME ) ; } context . stepCompleted ( ) ; } }

Fix:
throw new OperationFailedException ( new ModelNode ( ) . set ( WebMessages . MESSAGES . paramNameAndParamValueRequiredForAddParam ( ) ) ) ;
Buggy code:
public abstract class AbstractContinuousDistribution extends AbstractDistribution implements Serializable , ContinuousDistribution { private static final long serialVersionUID = - 38038050983108802L ; protected AbstractContinuousDistribution ( ) { } public double inverseCumulativeProbability ( final double p ) throws MathException { if ( ( p < 0.0 ) || ( p > 1.0 ) ) { throw new IllegalArgumentException ( "p<seq2seq4repair_space>must<seq2seq4repair_space>be<seq2seq4repair_space>between<seq2seq4repair_space>0.0<seq2seq4repair_space>and<seq2seq4repair_space>1.0,<seq2seq4repair_space>inclusive." ) ; } UnivariateRealFunction rootFindingFunction = new UnivariateRealFunction ( ) { public double value ( double x ) throws FunctionEvaluationException { try { return ( cumulativeProbability ( x ) ) - p ; } catch ( MathException ex ) { <START_BUG> throw new FunctionEvaluationException ( x , ex . getPattern ( ) , ex . getArguments ( ) , ex ) ; <END_BUG> } } } ; double lowerBound = getDomainLowerBound ( p ) ; double upperBound = getDomainUpperBound ( p ) ; double [ ] bracket = null ; try { bracket = UnivariateRealSolverUtils . bracket ( rootFindingFunction , getInitialDomain ( p ) , lowerBound , upperBound ) ; } catch ( ConvergenceException ex ) { if ( ( Math . abs ( rootFindingFunction . value ( lowerBound ) ) ) < 1.0E-6 ) { return lowerBound ; } if ( ( Math . abs ( rootFindingFunction . value ( upperBound ) ) ) < 1.0E-6 ) { return upperBound ; } throw new MathException ( ex ) ; } double root = UnivariateRealSolverUtils . solve ( rootFindingFunction , bracket [ 0 ] , bracket [ 1 ] ) ; return root ; } protected abstract double getInitialDomain ( double p ) { } protected abstract double getDomainLowerBound ( double p ) { } protected abstract double getDomainUpperBound ( double p ) { } }

Fix:
throw new FunctionEvaluationException ( ex , x , ex . getPattern ( ) , ex . getArguments ( ) ) ;
Buggy code:
class DbColumn { private String name ; private String type ; private String additional ; public DbColumn ( String name , String type , String additional ) { } public DbColumn ( OrmField field ) throws NotFindPrimaryKeyField , NotFindTableAnnotation , WrongRightJoinReference { } static String getColumnName ( OrmField field ) { } static String getColumnType ( OrmField field ) { Class type = field . getType ( ) ; if ( ( type . isArray ( ) ) && ( type . getComponentType ( ) . isPrimitive ( ) ) ) return "TEXT" ; String fieldType = type . getSimpleName ( ) . toUpperCase ( ) ; if ( ( ( ( ( fieldType . equals ( "INT" ) ) || ( fieldType . equals ( "LONG" ) ) ) || ( fieldType . equals ( "DATE" ) ) ) || ( fieldType . equals ( "BOOLEAN" ) ) ) || ( DbColumn . isReferenceField ( field ) ) ) return "INTEGER" ; <START_BUG> if ( ( fieldType . equals ( "STRING" ) ) || ( fieldType . equals ( "DOCUMENT" ) ) ) <END_BUG> return "TEXT" ; if ( fieldType . equals ( "DOUBLE" ) ) return "REAL" ; if ( fieldType . equals ( "DRAWABLE" ) ) return "BLOB" ; return "" ; } static boolean isReferenceField ( OrmField field ) { } static String getColumnAdditional ( OrmField field ) throws NotFindPrimaryKeyField , NotFindTableAnnotation , WrongRightJoinReference { } public String getName ( ) { } public String getType ( ) { } public String getAdditional ( ) { } @ Override public String toString ( ) { } }

Fix:
if ( ( ( fieldType . equals ( "STRING" ) ) || ( fieldType . equals ( "DOCUMENT" ) ) ) || ( fieldType . equals ( "LIST" ) ) )
Buggy code:
public class HomeFragment extends ScoutingFragment { final SubmitFragment submit ; final GlobalData loggedIn ; final RecyclingActivity act = ( ( RecyclingActivity ) ( this . getActivity ( ) ) ) ; public HomeFragment ( SubmitFragment frag , GlobalData l ) { } @ Override public void readyLayout ( ) { Schedule schedule = Schedule . load ( "sched.txt" ) ; String contents = DieggnosticsIO . getFileContents ( "settings.txt" ) ; String [ ] settings = contents . split ( "," ) ; int robotIndex = Integer . parseInt ( settings [ 0 ] . replaceAll ( "\\s" , "" ) ) ; int matchIndex = Integer . parseInt ( settings [ 1 ] . replaceAll ( "\\s" , "" ) ) ; RecyclingActivity . robot = ( ( ( ( ( "Robot<seq2seq4repair_space>" + ( schedule . schedule . get ( ( matchIndex + 1 ) ) [ robotIndex ] ) ) + "<seq2seq4repair_space>:<seq2seq4repair_space>Match<seq2seq4repair_space>" ) + matchIndex ) + 1 ) + "<seq2seq4repair_space>:<seq2seq4repair_space>" ) + ( robotIndex < 3 ? "RED" : "BLUE" ) ; schema . teamNumber = schedule . schedule . get ( ( matchIndex + 1 ) ) [ robotIndex ] ; this . < TextView > getAsView ( robot_number_login ) . setText ( robot ) ; final Button buttonLogin = this . < Button > getAsView ( button_login ) ; final EditText textLogin = this . < EditText > getAsView ( login_number ) ; <START_BUG> final TextView loginName = this . < TextView > getAsView ( login_name ) ; <END_BUG> textLogin . setText ( "" ) ; buttonLogin . setOnClickListener ( new OnClickListener ( ) { @ Override public void onClick ( View v ) { final RecyclingActivity activity = ( ( RecyclingActivity ) ( HomeFragment . this . getActivity ( ) ) ) ; String id = textLogin . getText ( ) . toString ( ) ; String name = activity . properties . getProperty ( id ) ; schema . loginName = name ; loggedIn . loggedIn = true ; ( ( RecyclingActivity ) ( getActivity ( ) ) ) . loggedIn = true ; FragmentBasket [ ] fb = activity . getPages ( ) ; for ( FragmentBasket basket : fb ) { if ( basket . name . equals ( "Autonomous" ) ) { activity . itemSelected ( basket ) ; break ; } } } } ) ; textLogin . addTextChangedListener ( new TextWatcher ( ) { @ Override public void beforeTextChanged ( CharSequence s , int start , int count , int after ) { } @ Override public void onTextChanged ( CharSequence s , int start , int before , int count ) { } @ Override public void afterTextChanged ( Editable s ) { final RecyclingActivity activity = ( ( RecyclingActivity ) ( HomeFragment . this . getActivity ( ) ) ) ; String id = s . toString ( ) ; loginName . setText ( activity . properties . getProperty ( id ) ) ; } } ) ; } }

Fix:
final TextView loginName = this . < TextView > getAsView ( login_namee ) ;
Buggy code:
public class TestCascadingOneManyWithForeignKey extends TestCase { private OpenJPAEntityManagerFactory emf ; public void setUp ( ) { String types = ( ( CascadingOneManyParent . class . getName ( ) ) + ";" ) + ( CascadingOneManyChild . class . getName ( ) ) ; <START_BUG> Map props = new HashMap ( ) ; <END_BUG> props . put ( "openjpa.MetaDataFactory" , ( ( "jpa(Types=" + types ) + ")" ) ) ; emf = ( ( OpenJPAEntityManagerFactory ) ( Persistence . createEntityManagerFactory ( "test" , props ) ) ) ; } public void tearDown ( ) { } public void testPersist ( ) { } public void testDelete ( ) { } private void assertRemoved ( EntityManager em , long id ) { } public void testForeignKey ( ) { } public static void main ( String [ ] args ) { } }

Fix:
Map props = new HashMap ( System . getProperties ( ) ) ;
Buggy code:
public class UploadSearchParams extends SearchParams { private Image image ; private String imageUrl ; private Map < String , String > attributes ; private String detection ; public UploadSearchParams ( ) { } public UploadSearchParams ( String imageUrl ) { } public UploadSearchParams ( Image image ) { } public UploadSearchParams setImage ( Image image ) { } public UploadSearchParams setImageUrl ( String imageUrl ) { } public UploadSearchParams setDetection ( String detection ) { } public UploadSearchParams setAttributes ( Map < String , String > attributes ) { } public Image getImage ( ) { } public String getImageUrl ( ) { } public String getDetection ( ) { } @ Override public Map < String , List < String > > toMap ( ) { Map < String , List < String > > map = super . toMap ( ) ; <START_BUG> if ( ( image . getBox ( ) ) != null ) { <END_BUG> if ( ( ( ( ( image . getBox ( ) . getX1 ( ) ) != null ) && ( ( image . getBox ( ) . getX2 ( ) ) != null ) ) && ( ( image . getBox ( ) . getY1 ( ) ) != null ) ) && ( ( image . getBox ( ) . getY2 ( ) ) != null ) ) { putStringInMap ( map , "box" , ( ( ( ( ( ( ( image . getBox ( ) . getX1 ( ) ) + "," ) + ( image . getBox ( ) . getY1 ( ) ) ) + "," ) + ( image . getBox ( ) . getX2 ( ) ) ) + "," ) + ( image . getBox ( ) . getY2 ( ) ) ) ) ; Log . d ( "Upload<seq2seq4repair_space>params" , ( ( ( ( ( ( ( "box<seq2seq4repair_space>size:<seq2seq4repair_space>" + ( image . getBox ( ) . getX1 ( ) ) ) + ",<seq2seq4repair_space>" ) + ( image . getBox ( ) . getY1 ( ) ) ) + ",<seq2seq4repair_space>" ) + ( image . getBox ( ) . getX2 ( ) ) ) + ",<seq2seq4repair_space>" ) + ( image . getBox ( ) . getY2 ( ) ) ) ) ; } } if ( ( imageUrl ) != null ) { putStringInMap ( map , "im_url" , imageUrl ) ; } if ( ( detection ) != null ) { putStringInMap ( map , "detection" , detection ) ; } if ( ( ( attributes ) != null ) && ( ! ( attributes . isEmpty ( ) ) ) ) { for ( String key : attributes . keySet ( ) ) { String keyName = ( "detection_attribute[" + key ) + "]" ; String value = attributes . get ( key ) ; putStringInMap ( map , keyName , value ) ; } } return map ; } private void putStringInMap ( Map < String , List < String > > map , String key , String value ) { } }

Fix:
if ( ( ( image ) != null ) && ( ( image . getBox ( ) ) != null ) ) {