nus-yam/ex-repair huggingface dataset:
Buggy code:
public class Java8ForLoopTest { static NullOutputStream nout = new NullOutputStream ( ) ; static long start = 0 ; static long end = 0 ; static long elapsed = 0 ; static double e = 0.0 ; static double [ ] t = new double [ 100 ] ; static DescriptiveStatistics d = new DescriptiveStatistics ( ) ; static double min = 0 ; static double max = 0 ; static double mean = 0 ; static double stddev = 0 ; public static void runtest ( Boolean x ) { } public static void main ( String [ ] args ) { boolean p = false ; if ( ( args . length ) > 0 ) { p = true ; } System . out . println ( "Java8<seq2seq4repair_space>For<seq2seq4repair_space>Loop<seq2seq4repair_space>Test" ) ; <START_BUG> for ( int j = 0 ; j < 100 ; j ++ ) { <END_BUG> Java8ForLoopTest . runtest ( false ) ; } for ( int j = 0 ; j < 100 ; j ++ ) { Java8ForLoopTest . runtest ( p ) ; Java8ForLoopTest . t [ j ] = Java8ForLoopTest . e ; } for ( int j = 0 ; j < 100 ; j ++ ) { Java8ForLoopTest . d . addValue ( Java8ForLoopTest . t [ j ] ) ; } Java8ForLoopTest . min = Java8ForLoopTest . d . getMin ( ) ; Java8ForLoopTest . max = Java8ForLoopTest . d . getMax ( ) ; Java8ForLoopTest . mean = Java8ForLoopTest . d . getMean ( ) ; Java8ForLoopTest . stddev = Java8ForLoopTest . d . getStandardDeviation ( ) ; System . out . println ( ) ; System . out . printf ( "min<seq2seq4repair_space>=<seq2seq4repair_space>%.2f<seq2seq4repair_space>ns\n" , Java8ForLoopTest . min ) ; System . out . printf ( "max<seq2seq4repair_space>=<seq2seq4repair_space>%.2f<seq2seq4repair_space>ns\n" , Java8ForLoopTest . max ) ; System . out . printf ( "mean<seq2seq4repair_space>=<seq2seq4repair_space>%.2f<seq2seq4repair_space>ns\n" , Java8ForLoopTest . mean ) ; System . out . printf ( "stddev<seq2seq4repair_space>=<seq2seq4repair_space>%.2f<seq2seq4repair_space>ns\n" , Java8ForLoopTest . stddev ) ; } }

Fix:
for ( int j = 0 ; j < 3 ; j ++ ) {
Buggy code:
class Main { public static void main ( String [ ] args ) { boolean exit = false ; Scanner s = new Scanner ( System . in ) ; Decoder dec = new Decoder ( ) ; String query ; System . out . println ( "Type<seq2seq4repair_space>'exit'<seq2seq4repair_space>or<seq2seq4repair_space>'quit'<seq2seq4repair_space>to<seq2seq4repair_space>terminate<seq2seq4repair_space>the<seq2seq4repair_space>program." ) ; while ( ! exit ) { <START_BUG> System . out . print ( "><seq2seq4repair_space>" ) ; <END_BUG> query = s . nextLine ( ) ; if ( ( query . equalsIgnoreCase ( "exit" ) ) || ( query . equalsIgnoreCase ( "quit" ) ) ) { exit = true ; } else dec . answer ( query , true ) ; } s . close ( ) ; } }

Fix:
System . out . print ( "\n><seq2seq4repair_space>" ) ;
Buggy code:
public class DefaultCMSetter extends BaseInterceptor { public DefaultCMSetter ( ) { } public void engineInit ( ContextManager cm ) throws TomcatException { } public void addContext ( ContextManager cm , Context ctx ) throws TomcatException { } public void contextInit ( Context ctx ) throws TomcatException { } private void initURLs ( Context context ) { ServletLoader loader = context . getServletLoader ( ) ; if ( loader == null ) return ; String base = context . getDocBase ( ) ; File dir = new File ( ( base + "//WEB-INF//classes" ) ) ; dir = getAbsolute ( dir , context ) ; if ( dir . exists ( ) ) { loader . addRepository ( dir ) ; } File f = new File ( ( base + "//WEB-INF//lib" ) ) ; f = getAbsolute ( f , context ) ; Vector jars = new Vector ( ) ; getJars ( jars , f ) ; for ( int i = 0 ; i < ( jars . size ( ) ) ; ++ i ) { String jarfile = ( ( String ) ( jars . elementAt ( i ) ) ) ; <START_BUG> loader . addRepository ( new File ( ( ( base + "//WEB-INF//lib//" ) + jarfile ) ) ) ; <END_BUG> } } private void getJars ( Vector v , File f ) { } private File getAbsolute ( File f , Context c ) { } private void setWorkDir ( Context ctx ) { } private void setEngineHeader ( Context ctx ) { } }

Fix:
loader . addRepository ( new File ( f , jarfile ) ) ;
Buggy code:
@ Repository public class JdbcActivityDao implements ActivityDao { @ Override public List < Activity > findLatestActivities ( int n ) { } @ Override public List < Activity > findLatestActivitiesByUserId ( long userId , int n ) { } private Activity makeActivity ( ) { Builder builder = new Builder ( ) ; <START_BUG> long userId = ( ( long ) ( ( Math . random ( ) ) * 10 ) ) ; <END_BUG> long discussionId = ( ( long ) ( ( Math . random ( ) ) * 1000 ) ) ; ActivityType type = ( ( Math . random ( ) ) < 0.5 ) ? ActivityType . CREATE_DISCUSSION : ( Math . random ( ) ) < 0.5 ? ActivityType . SOLVE_DISCUSSION : ActivityType . CLOSE_DISCUSSION ; return builder . id ( 1 ) . activityType ( type ) . userId ( userId ) . createdTime ( new Timestamp ( ( ( System . currentTimeMillis ( ) ) + ( ( long ) ( ( Math . random ( ) ) * 1000 ) ) ) ) ) . targetDiscussionId ( discussionId ) . build ( ) ; } }

Fix:
long userId = ( ( long ) ( ( Math . random ( ) ) * 3 ) ) ;
Buggy code:
@ Immutable public class EgKey implements Comparable < EgKey > { private final TenantId tenantId ; private final EndpointGroupId egId ; @ Override public int hashCode ( ) { } @ Override public boolean equals ( Object obj ) { } public EgKey ( TenantId tenantId , EndpointGroupId egId ) { } @ Override public int compareTo ( EgKey o ) { String tid = null ; if ( ( tenantId ) != null ) tid = tenantId . getValue ( ) ; String otid = null ; if ( ( o . tenantId ) != null ) otid = o . tenantId . getValue ( ) ; String egid = null ; if ( ( egId ) != null ) <START_BUG> tid = egId . getValue ( ) ; <END_BUG> String oegid = null ; if ( ( o . egId ) != null ) oegid = o . egId . getValue ( ) ; return ComparisonChain . start ( ) . compare ( tid , otid , Ordering . natural ( ) . nullsLast ( ) ) . compare ( egid , oegid , Ordering . natural ( ) . nullsLast ( ) ) . result ( ) ; } @ Override public String toString ( ) { } public TenantId getTenantId ( ) { } public EndpointGroupId getEgId ( ) { } No newline ; at end ; of file ; }

Fix:
egid = egId . getValue ( ) ;
Buggy code:
public class ReflectiveMethodInvocation implements Cloneable , ProxyMethodInvocation { protected final Object proxy ; protected final Object target ; protected final Method method ; protected Object [ ] arguments ; private final Class targetClass ; private Map userAttributes ; protected final List interceptorsAndDynamicMethodMatchers ; private int currentInterceptorIndex = - 1 ; protected ReflectiveMethodInvocation ( Object proxy , Object target , Method method , Object [ ] arguments , Class targetClass , List interceptorsAndDynamicMethodMatchers ) { } public final Object getProxy ( ) { } public final Object getThis ( ) { } public final AccessibleObject getStaticPart ( ) { } public final Method getMethod ( ) { } public final Object [ ] getArguments ( ) { } public void setArguments ( Object [ ] arguments ) { } public Object proceed ( ) throws Throwable { } protected Object invokeJoinpoint ( ) throws Throwable { } public MethodInvocation invocableClone ( ) { } public MethodInvocation invocableClone ( Object [ ] arguments ) { } public void setUserAttribute ( String key , Object value ) { } public Object getUserAttribute ( String key ) { } public Map getUserAttributes ( ) { } @ Override public String toString ( ) { <START_BUG> StringBuffer sb = new StringBuffer ( "ReflectiveMethodInvocation:<seq2seq4repair_space>" ) ; <END_BUG> sb . append ( this . method ) . append ( ";<seq2seq4repair_space>" ) ; if ( ( this . target ) == null ) { sb . append ( "target<seq2seq4repair_space>is<seq2seq4repair_space>null" ) ; } else { sb . append ( "target<seq2seq4repair_space>is<seq2seq4repair_space>of<seq2seq4repair_space>class<seq2seq4repair_space>[" ) . append ( this . target . getClass ( ) . getName ( ) ) . append ( ']' ) ; } return sb . toString ( ) ; } }

Fix:
StringBuilder sb = new StringBuilder ( "ReflectiveMethodInvocation:<seq2seq4repair_space>" ) ;
Buggy code:
public class JavaSearchScope extends AbstractSearchScope { private ArrayList elements ; private ArrayList projectPaths = new ArrayList ( ) ; private int [ ] projectIndexes ; private String [ ] containerPaths ; private String [ ] relativePaths ; private boolean [ ] isPkgPath ; protected AccessRuleSet [ ] pathRestrictions ; private int pathsCount ; private int threshold ; private IPath [ ] enclosingProjectsAndJars ; public static final AccessRuleSet NOT_ENCLOSED = new AccessRuleSet ( null , null ) ; public JavaSearchScope ( ) { } private JavaSearchScope ( int size ) { } private void addEnclosingProjectOrJar ( IPath path ) { } public void add ( JavaProject project , int includeMask , HashSet visitedProject ) throws JavaModelException { } void add ( JavaProject javaProject , IPath pathToAdd , int includeMask , HashSet visitedProjects , IClasspathEntry referringEntry ) throws JavaModelException { } public void add ( IJavaElement element ) throws JavaModelException { } private void add ( String projectPath , String relativePath , String containerPath , boolean isPackage , AccessRuleSet access ) { } public boolean encloses ( String resourcePathString ) { } private int indexOf ( String fullPath ) { } private int indexOf ( String containerPath , String relativePath ) { } private boolean encloses ( String enclosingPath , String path , int index ) { } public boolean encloses ( IJavaElement element ) { } public IPath [ ] enclosingProjectsAndJars ( ) { } private IPath getPath ( IJavaElement element , boolean relativeToRoot ) { } public AccessRuleSet getAccessRuleSet ( String relativePath , String containerPath ) { } protected void initialize ( int size ) { } private String normalize ( String path ) { } public void processDelta ( IJavaElementDelta delta ) { } public IPackageFragmentRoot packageFragmentRoot ( String resourcePathString ) { } private void rehash ( ) { JavaSearchScope newScope = new JavaSearchScope ( ( ( this . pathsCount ) * 2 ) ) ; newScope . projectPaths . ensureCapacity ( this . projectPaths . size ( ) ) ; String currentPath ; <START_BUG> for ( int i = this . relativePaths . length ; ( -- i ) >= 0 ; ) <END_BUG> if ( ( currentPath = this . relativePaths [ i ] ) != null ) { int idx = this . projectIndexes [ i ] ; String projectPath = ( idx == ( - 1 ) ) ? null : ( ( String ) ( this . projectPaths . get ( idx ) ) ) ; newScope . add ( projectPath , currentPath , this . containerPaths [ i ] , this . isPkgPath [ i ] , ( ( this . pathRestrictions ) == null ? null : this . pathRestrictions [ i ] ) ) ; } this . relativePaths = newScope . relativePaths ; this . containerPaths = newScope . containerPaths ; this . projectPaths = newScope . projectPaths ; this . projectIndexes = newScope . projectIndexes ; this . isPkgPath = newScope . isPkgPath ; this . pathRestrictions = newScope . pathRestrictions ; this . threshold = newScope . threshold ; } public String toString ( ) { } }

Fix:
for ( int i = 0 , length = this . relativePaths . length ; i < length ; i ++ )
Buggy code:
public class ProductDerivations { private static final Localizer _loc = Localizer . forPackage ( ProductDerivations . class ) ; private static final ProductDerivation [ ] _derivations ; private static final String [ ] _derivationNames ; private static final Throwable [ ] _derivationErrors ; private static String [ ] _prefixes ; public static ProductDerivation [ ] getProductDerivations ( ) { } public static String [ ] getConfigurationPrefixes ( ) { } static void setConfigurationPrefixes ( String [ ] prefixes ) { } public static String getConfigurationKey ( String partialKey , Map map ) { } public static void beforeConfigurationConstruct ( ConfigurationProvider cp ) { } public static void beforeConfigurationLoad ( Configuration conf ) { } public static void afterSpecificationSet ( Configuration conf ) { } public static void beforeClose ( Configuration conf ) { } public static ConfigurationProvider load ( String resource , String anchor , ClassLoader loader ) { } public static ConfigurationProvider load ( File file , String anchor , ClassLoader loader ) { } public static ConfigurationProvider loadDefaults ( ClassLoader loader ) { } public static ConfigurationProvider loadGlobals ( ClassLoader loader ) { } private static ConfigurationProvider load ( ClassLoader loader , boolean globals ) { } private static void reportErrors ( StringBuilder errs , String resource , Throwable nested ) { } public static List < String > getFullyQualifiedAnchorsInPropertiesLocation ( final String propertiesLocation ) { } private static void addAll ( Collection collection , String base , Collection newMembers ) { } public static Set < String > getSupportedQueryHints ( ) { Set < String > result = new TreeSet < String > ( ) ; for ( int i = ( ProductDerivations . _derivations . length ) - 1 ; i >= 0 ; i -- ) { Set < String > members = ProductDerivations . _derivations [ i ] . getSupportedQueryHints ( ) ; <START_BUG> if ( ( members != null ) || ( ! ( members . isEmpty ( ) ) ) ) <END_BUG> result . addAll ( members ) ; } return result ; } private static class ProductDerivationComparator implements Comparator < ProductDerivation > { public int compare ( ProductDerivation o1 , ProductDerivation o2 ) { } } public static void main ( String [ ] args ) { } private static String derivationErrorsToString ( ) { } }

Fix:
if ( ( members != null ) && ( ! ( members . isEmpty ( ) ) ) )
Buggy code:
public class StudentSubmissionView extends JFrame { private static final String NAME_OF_PAGE = "Student<seq2seq4repair_space>Submission" ; private static final MainView home = new MainView ( ) ; private String userID ; public void studentSubmissionStart ( String id ) { } @ SuppressWarnings ( "unchecked" ) private void initComponents ( ) { } private void hideErrorFields ( ) { } private boolean errCheck ( ) { } private void Student_SubmitActionPerformed ( ActionEvent evt ) { } private void Reset_StudentSubmissionFields ( ) { } private void BrowseMouseClicked ( MouseEvent evt ) { } private void jMenuItem1ActionPerformed ( ActionEvent evt ) { } private void BrowseActionPerformed ( ActionEvent evt ) { } private void printerBoxActionPerformed ( ActionEvent evt ) { } private void classBoxActionPerformed ( ActionEvent evt ) { } private void fileLocationActionPerformed ( ActionEvent evt ) { } private void jButton1ActionPerformed ( ActionEvent evt ) { dispose ( ) ; <START_BUG> StudentSubmissionView . home . resetAdminMode ( ) ; <END_BUG> } private void projNameActionPerformed ( ActionEvent evt ) { } private void idOfUserActionPerformed ( ActionEvent evt ) { } private JButton Browse ; private JButton Student_Submit ; private JComboBox classBox ; private JMenu editMenu ; private JLabel error_NoClassSelected ; private JLabel error_NoFileLocationSelected ; private JLabel error_NoPrinterSelected ; private JTextField fileLocation ; private JTextField idOfUser ; private JButton jButton1 ; private JLabel jLabel1 ; private JLabel jLabel1_FileLocation ; private JLabel jLabel5_ProjName ; private JLabel jLabel6_Class ; private JLabel jLabel7_Printer ; private JLabel jLabel8_StudentSubmission ; private JLabel jLabel9 ; private JMenuBar jMenuBar1 ; private JMenuItem jMenuItem1 ; private JScrollPane jScrollPane1 ; private JSeparator jSeparator1 ; private JTextArea jTextArea1 ; private JComboBox printerBox ; private JTextField projName ; }

Fix:
StudentSubmissionView . home . setVisible ( true ) ;
Buggy code:
public class TestAtomCache { public static final String lineSplit = System . getProperty ( "file.separator" ) ; private AtomCache cache ; @ Before public void setUp ( ) { cache = new AtomCache ( ) ; String [ ] uncacheIDs = new String [ ] { "1cmw" , "1hhb" , "4hhb" } ; List < LocalPDBDirectory > readers = new ArrayList < LocalPDBDirectory > ( ) ; readers . add ( new org . biojava . bio . structure . io . MMCIFFileReader ( cache . getPath ( ) ) ) ; <START_BUG> readers . add ( new org . biojava . bio . structure . io . PDBFileReader ( cache . getCachePath ( ) ) ) ; <END_BUG> for ( LocalPDBDirectory reader : readers ) { reader . setFetchBehavior ( cache . getFetchBehavior ( ) ) ; reader . setObsoleteBehavior ( cache . getObsoleteBehavior ( ) ) ; for ( String pdbId : uncacheIDs ) { reader . deleteStructure ( pdbId ) ; } } } @ Test public void testAtomCacheNameParsing ( ) throws IOException , StructureException { } @ Test public void testObsoleteId ( ) throws StructureException { } @ Test public void testFetchCurrent1CMW ( ) throws IOException , StructureException { } @ Test public void testFetchCurrent1HHB ( ) throws IOException , StructureException { } @ Test public void testFetchObsolete ( ) throws IOException , StructureException { } }

Fix:
readers . add ( new org . biojava . bio . structure . io . PDBFileReader ( cache . getPath ( ) ) ) ;
Buggy code:
public class Log { public static final boolean COLLAPSE_LEAF_TASKS = true ; public static final boolean BORING_DONE_MESSAGES = false ; public static final int NONE = 0 ; public static final int CORE = 1 << 0 ; public static final int PARSE = 1 << 1 ; public static final int TRANSFORM = 1 << 2 ; public static final int IMPORT = 1 << 3 ; public static final int BASELANG = 1 << 4 ; public static final int CACHING = 1 << 5 ; public static final int DETAIL = 1 << 6 ; public static final int ALWAYS = ( ( ( ( ( ( Log . CORE ) | ( Log . PARSE ) ) | ( Log . TRANSFORM ) ) | ( Log . IMPORT ) ) | ( Log . BASELANG ) ) | ( Log . CACHING ) ) | ( Log . DETAIL ) ; public static final Log log = new Log ( ) ; private Stack < String > tasks = new Stack < String > ( ) ; private Stack < Long > timings = new Stack < Long > ( ) ; private Stack < Boolean > lightweight = new Stack < Boolean > ( ) ; private int silent = - 1 ; private int loglevel = Log . CORE ; public static PrintStream out = System . out ; public static PrintStream err = System . err ; public synchronized void beginTask ( String shortText , String longText , boolean inline , int tasklevel ) { } public void beginTask ( String shortText , String longText , int level ) { } public void beginTask ( String text , int level ) { } public synchronized void endTask ( String error , boolean doneMessage ) { } public void endTask ( ) { } public void endTask ( String error ) { } public void endTask ( boolean success ) { <START_BUG> endTask ( success , "successful" , "failed" ) ; <END_BUG> } public void endTask ( boolean success , String good , String bad ) { } public void log ( Object o , int msglevel ) { } public synchronized void log ( String text , int msglevel ) { } public synchronized void logErr ( String text , int msglevel ) { } public synchronized void logErr ( String text , Exception e , int msglevel ) { } private void noLongerLeaf ( ) { } public void beginExecution ( String prefix , int level , String ... cmds ) { } public String commandLineAsString ( String [ ] cmds ) { } public void logCommandLine ( String [ ] cmds , int level ) { } public void beginInlineTask ( String text , int level ) { } private void indent ( ) { } public void endExecution ( int exitValue ) { } public void endExecution ( int exitValue , String [ ] errMsg ) { } public void beginSilent ( ) { } public void endSilent ( ) { } public void setLoggingLevel ( int level ) { } public int getLoggingLevel ( ) { } }

Fix:
endTask ( success , "succeeded" , "failed" ) ;
Buggy code:
public class KafkaMetadataUtil { public static final String PRODUCER_PROP_PARTITIONER = "partitioner.class" ; public static final String PRODUCER_PROP_BROKERLIST = "metadata.broker.list" ; private static Logger logger = LoggerFactory . getLogger ( KafkaMetadataUtil . class ) ; private static final String mdClientId = "Kafka_Metadata_Lookup_Client" ; private static final int timeout = 10000 ; private static final int bufferSize = 128 * 1024 ; public static List < PartitionMetadata > getPartitionsForTopic ( Set < String > brokerList , String topic ) { } public static Map < String , List < PartitionMetadata > > getPartitionsForTopic ( SetMultimap < String , String > brokers , final String topic ) { } public static Set < String > getBrokers ( Set < String > zkHost ) { } public static PartitionMetadata getPartitionForTopic ( Set < String > brokerList , String topic , int partition ) { } public static TopicMetadata getTopicMetadata ( Set < String > brokerSet , String topic ) { SimpleConsumer mdConsumer = null ; if ( ( ( brokerSet == null ) || ( brokerSet == null ) ) || ( ( brokerSet . size ( ) ) == 0 ) ) { return null ; } try { for ( Iterator < String > iterator = brokerSet . iterator ( ) ; iterator . hasNext ( ) ; ) { String broker = iterator . next ( ) ; KafkaMetadataUtil . logger . debug ( "Try<seq2seq4repair_space>to<seq2seq4repair_space>get<seq2seq4repair_space>Metadata<seq2seq4repair_space>for<seq2seq4repair_space>topic<seq2seq4repair_space>{}<seq2seq4repair_space>broker<seq2seq4repair_space>{}" , topic , broker ) ; try { mdConsumer = new SimpleConsumer ( broker . split ( ":" ) [ 0 ] , Integer . parseInt ( broker . split ( ":" ) [ 1 ] ) , KafkaMetadataUtil . timeout , KafkaMetadataUtil . bufferSize , KafkaMetadataUtil . mdClientId ) ; List < String > topics = new ArrayList < String > ( 1 ) ; topics . add ( topic ) ; TopicMetadataRequest req = new TopicMetadataRequest ( topics ) ; TopicMetadataResponse resp = mdConsumer . send ( req ) ; List < TopicMetadata > metaData = resp . topicsMetadata ( ) ; for ( TopicMetadata item : metaData ) { return item ; } } catch ( NumberFormatException e ) { throw new IllegalArgumentException ( "Wrong<seq2seq4repair_space>format<seq2seq4repair_space>for<seq2seq4repair_space>broker<seq2seq4repair_space>url,<seq2seq4repair_space>should<seq2seq4repair_space>be<seq2seq4repair_space>\"broker1:port1\"" ) ; } catch ( Exception e ) { <START_BUG> KafkaMetadataUtil . logger . error ( "Highly<seq2seq4repair_space>possible<seq2seq4repair_space>some<seq2seq4repair_space>broker(s)<seq2seq4repair_space>for<seq2seq4repair_space>topic<seq2seq4repair_space>{}<seq2seq4repair_space>are<seq2seq4repair_space>dead" , topic , e ) ; <END_BUG> } } return null ; } finally { if ( mdConsumer != null ) { mdConsumer . close ( ) ; } } } public static long getLastOffset ( SimpleConsumer consumer , String topic , int partition , long whichTime , String clientName ) { } }

Fix:
KafkaMetadataUtil . logger . warn ( "Broker<seq2seq4repair_space>{}<seq2seq4repair_space>is<seq2seq4repair_space>unavailable<seq2seq4repair_space>or<seq2seq4repair_space>in<seq2seq4repair_space>bad<seq2seq4repair_space>state!" , broker ) ;
Buggy code:
abstract class OpenGLTab { private GLCanvas glCanvas ; private Composite tabFolderPage ; private boolean stencilSupport ; private static final int DEFAULT_SLEEP_LENGTH = 100 ; abstract void createControls ( Composite composite ) { } Composite createTabFolderPage ( TabFolder tabFolder ) { tabFolderPage = new Composite ( tabFolder , SWT . NONE ) ; tabFolderPage . setLayout ( new GridLayout ( 2 , false ) ) ; GridData gridData = new GridData ( ) ; gridData . heightHint = 400 ; gridData . widthHint = 400 ; gridData . verticalAlignment = GridData . BEGINNING ; <START_BUG> GLFormatData data = new GLFormatData ( ) ; <END_BUG> data . doubleBuffer = true ; data . stencilSize = 8 ; glCanvas = new GLCanvas ( tabFolderPage , SWT . NONE , data ) ; glCanvas . setLayout ( new GridLayout ( ) ) ; glCanvas . setLayoutData ( gridData ) ; glCanvas . setSize ( 400 , 400 ) ; gridData = new GridData ( ) ; gridData . verticalAlignment = GridData . BEGINNING ; Composite controlComposite = new Composite ( tabFolderPage , SWT . NONE ) ; controlComposite . setLayout ( new GridLayout ( ) ) ; controlComposite . setLayoutData ( gridData ) ; setCurrent ( ) ; setupViewingArea ( ) ; int [ ] param = new int [ 1 ] ; GL . glGetIntegerv ( GL_STENCIL_BITS , param ) ; stencilSupport = ( param [ 0 ] ) != 0 ; init ( ) ; if ( ( ! ( isStencilSupportNeeded ( ) ) ) || ( hasStencilSupport ( ) ) ) { createControls ( controlComposite ) ; } else { Label label = new Label ( controlComposite , SWT . NONE ) ; label . setText ( "This<seq2seq4repair_space>tab<seq2seq4repair_space>requires<seq2seq4repair_space>native<seq2seq4repair_space>stencil<seq2seq4repair_space>support." ) ; } return tabFolderPage ; } void dispose ( ) { } GLCanvas getGlCanvas ( ) { } int getSleepLength ( ) { } abstract String getTabText ( ) { } boolean hasStencilSupport ( ) { } abstract void init ( ) { } static void loadTexture ( GLCanvas context , String fileName , int index , int [ ] texture ) { } void render ( ) { } abstract void renderScene ( ) { } boolean isStencilSupportNeeded ( ) { } void setCurrent ( ) { } void setupViewingArea ( ) { } void swap ( ) { } }

Fix:
GLData data = new GLData ( ) ;
Buggy code:
class SourceField extends Member implements IField { protected SourceField ( JavaElement parent , String name ) { } public boolean equals ( Object o ) { } protected boolean equalsDOMNode ( IDOMNode node ) { } public Object getConstant ( ) throws JavaModelException { } public int getElementType ( ) { } protected char getHandleMementoDelimiter ( ) { } public IJavaElement getPrimaryElement ( boolean checkOwner ) { if ( checkOwner ) { CompilationUnit cu = ( ( CompilationUnit ) ( getAncestor ( IJavaElement . COMPILATION_UNIT ) ) ) ; <START_BUG> if ( ( cu . owner ) == ( DefaultWorkingCopyOwner . PRIMARY ) ) <END_BUG> return this ; } IJavaElement parent = fParent . getPrimaryElement ( false ) ; return ( ( IType ) ( parent ) ) . getField ( fName ) ; } public String getTypeSignature ( ) throws JavaModelException { } protected void toStringInfo ( int tab , StringBuffer buffer , Object info ) { } }

Fix:
if ( cu . isPrimary ( ) )
Buggy code:
public class BeanListUnivariateImpl extends ListUnivariateImpl implements Serializable { static final long serialVersionUID = - 6428201899045406285L ; private String propertyName ; public BeanListUnivariateImpl ( ) { } public BeanListUnivariateImpl ( List list ) { } public BeanListUnivariateImpl ( List list , String propertyName ) { } public String getPropertyName ( ) { } public void setPropertyName ( String propertyName ) { } public void addValue ( double v ) { DynaProperty [ ] props = new DynaProperty [ ] { new DynaProperty ( propertyName , Double . class ) } ; BasicDynaClass dynaClass = new BasicDynaClass ( null , null , props ) ; DynaBean dynaBean = null ; try { dynaBean = dynaClass . newInstance ( ) ; } catch ( Exception ex ) { throw new RuntimeException ( ex ) ; } <START_BUG> dynaBean . set ( propertyName , new Double ( v ) ) ; <END_BUG> addObject ( dynaBean ) ; } public void addObject ( Object bean ) { } }

Fix:
dynaBean . set ( propertyName , Double . valueOf ( v ) ) ;
Buggy code:
public class DefaultActionBarPresentationFactory implements IActionBarPresentationFactory { public ICoolBarManager2 createCoolBarManager ( ) { } public Control createCoolBarControl ( ICoolBarManager2 coolBarManager , Composite parent ) { } public IToolBarManager2 createToolBarManager ( ) { <START_BUG> return new org . eclipse . jface . internal . provisional . action . ToolBarManager2 ( ( ( ( SWT . FLAT ) | ( SWT . RIGHT ) ) | ( SWT . WRAP ) ) ) ; <END_BUG> } public Control createToolBarControl ( IToolBarManager2 toolBarManager , Composite parent ) { } public IToolBarManager2 createViewToolBarManager ( ) { } public Control createViewToolBarControl ( IToolBarManager2 toolBarManager , Composite parent ) { } public IToolBarContributionItem createToolBarContributionItem ( IToolBarManager toolBarManager , String id ) { } }

Fix:
return new org . eclipse . jface . internal . provisional . action . ToolBarManager2 ( ( ( SWT . FLAT ) | ( SWT . RIGHT ) ) ) ;
Buggy code:
public class YaasLogController { private static final String VERBOSE = "verbose" ; private static final String DEBUG = "debug" ; private static final String INFO = "info" ; private static final String ERROR = "error" ; @ FXML private TableView < LogEntry > yaasLogEntryTable ; @ FXML private TableColumn < LogEntry , String > messageColumn ; @ FXML private TableColumn < LogEntry , String > levelColumn ; @ FXML private TableColumn < LogEntry , String > timeColumn ; @ FXML private ComboBox < String > levelCombobox ; @ FXML private TextField inputFilter ; @ FXML private Button btnClear ; private static final Logger logger = LoggerFactory . getLogger ( YaasLogController . class ) ; private ObservableList < LogEntry > logEntries = FXCollections . observableArrayList ( ) ; private String fileName ; private static YaasLogController instance ; public YaasLogController ( ) { } public static YaasLogController getInstance ( ) { } @ FXML private void initialize ( ) { } public void log ( OSCMessage m ) { } public void log ( OSCMessageFromTask m ) { LogEntry logEntry = new LogEntry ( ) ; logEntry . setLevel ( YaasLogController . DEBUG ) ; if ( m . getName ( ) . endsWith ( YaasLogController . VERBOSE ) ) { logEntry . setLevel ( YaasLogController . VERBOSE ) ; } else if ( m . getName ( ) . endsWith ( YaasLogController . INFO ) ) { logEntry . setLevel ( YaasLogController . INFO ) ; } else if ( m . getName ( ) . endsWith ( YaasLogController . ERROR ) ) { logEntry . setLevel ( YaasLogController . ERROR ) ; } <START_BUG> logEntry . setMessage ( m . getArgs ( ) ) ; <END_BUG> logEntries . add ( logEntry ) ; } public void verbose ( String m ) { } public void log ( String m ) { } public void debug ( String m ) { } public void error ( String m ) { } public void log ( String level , String m ) { } public void setErrorFile ( String fileName ) { } Task < Void > errorLogChangeListener = new Task < Void > ( ) { @ Override protected Void call ( ) throws Exception { } } ; public void setOscServer ( LightHouseOSCServer oscServer ) { } @ Override public void finalize ( ) throws Exception { } }

Fix:
logEntry . setMessage ( m . getArgList ( ) . get ( ( ( m . getArgList ( ) . size ( ) ) - 1 ) ) ) ;
Buggy code:
public class ListFactoryBean extends AbstractFactoryBean { private List sourceList ; private Class targetListClass ; public void setSourceList ( List sourceList ) { } public void setTargetListClass ( Class targetListClass ) { } @ Override public Class getObjectType ( ) { } @ Override protected Object createInstance ( ) { if ( ( this . sourceList ) == null ) { throw new IllegalArgumentException ( "'sourceList'<seq2seq4repair_space>is<seq2seq4repair_space>required" ) ; } List result = null ; if ( ( this . targetListClass ) != null ) { result = ( ( List ) ( BeanUtils . instantiateClass ( this . targetListClass ) ) ) ; } else { result = new ArrayList ( this . sourceList . size ( ) ) ; } Class valueType = null ; <START_BUG> if ( ( ( this . targetListClass ) != null ) && ( JdkVersion . isAtLeastJava15 ( ) ) ) { <END_BUG> valueType = GenericCollectionTypeResolver . getCollectionType ( this . targetListClass ) ; } if ( valueType != null ) { TypeConverter converter = getBeanTypeConverter ( ) ; for ( Iterator it = this . sourceList . iterator ( ) ; it . hasNext ( ) ; ) { result . add ( converter . convertIfNecessary ( it . next ( ) , valueType ) ) ; } } else { result . addAll ( this . sourceList ) ; } return result ; } }

Fix:
if ( ( this . targetListClass ) != null ) {
Buggy code:
public class TestSurrogates extends LuceneTestCase { @ BeforeClass public static void beforeClass ( ) { } private static String makeDifficultRandomUnicodeString ( Random r ) { } private String toHexString ( Term t ) { } private String getRandomString ( Random r ) { } private static class SortTermAsUTF16Comparator implements Comparator < Term > { private static final Comparator < BytesRef > legacyComparator = BytesRef . getUTF8SortedAsUTF16Comparator ( ) ; public int compare ( Term term1 , Term term2 ) { } } private static final TestSurrogates . SortTermAsUTF16Comparator termAsUTF16Comparator = new TestSurrogates . SortTermAsUTF16Comparator ( ) ; private void doTestStraightEnum ( List < Term > fieldTerms , IndexReader reader , int uniqueTermCount ) throws IOException { } private void doTestSeekExists ( Random r , List < Term > fieldTerms , IndexReader reader ) throws IOException { } private void doTestSeekDoesNotExist ( Random r , int numField , List < Term > fieldTerms , Term [ ] fieldTermsArray , IndexReader reader ) throws IOException { } @ Test public void testSurrogatesOrder ( ) throws Exception { Directory dir = newDirectory ( ) ; RandomIndexWriter w = new RandomIndexWriter ( random ( ) , dir , newIndexWriterConfig ( TEST_VERSION_CURRENT , new MockAnalyzer ( random ( ) ) ) . setCodec ( new PreFlexRWCodec ( ) ) ) ; final int numField = _TestUtil . nextInt ( random ( ) , 2 , 5 ) ; int uniqueTermCount = 0 ; int tc = 0 ; List < Term > fieldTerms = new ArrayList < Term > ( ) ; for ( int f = 0 ; f < numField ; f ++ ) { String field = "f" + f ; final int numTerms = atLeast ( 200 ) ; final Set < String > uniqueTerms = new HashSet < String > ( ) ; for ( int i = 0 ; i < numTerms ; i ++ ) { String term = ( ( getRandomString ( random ( ) ) ) + "_<seq2seq4repair_space>" ) + ( tc ++ ) ; uniqueTerms . add ( term ) ; fieldTerms . add ( new Term ( field , term ) ) ; Document doc = new Document ( ) ; <START_BUG> doc . add ( newField ( field , term , TYPE_UNSTORED ) ) ; <END_BUG> w . addDocument ( doc ) ; } uniqueTermCount += uniqueTerms . size ( ) ; } IndexReader reader = w . getReader ( ) ; if ( VERBOSE ) { Collections . sort ( fieldTerms , TestSurrogates . termAsUTF16Comparator ) ; System . out . println ( "\nTEST:<seq2seq4repair_space>UTF16<seq2seq4repair_space>order" ) ; for ( Term t : fieldTerms ) { System . out . println ( ( "<seq2seq4repair_space>" + ( toHexString ( t ) ) ) ) ; } } Collections . sort ( fieldTerms ) ; if ( VERBOSE ) { System . out . println ( "\nTEST:<seq2seq4repair_space>codepoint<seq2seq4repair_space>order" ) ; for ( Term t : fieldTerms ) { System . out . println ( ( "<seq2seq4repair_space>" + ( toHexString ( t ) ) ) ) ; } } Term [ ] fieldTermsArray = fieldTerms . toArray ( new Term [ fieldTerms . size ( ) ] ) ; doTestStraightEnum ( fieldTerms , reader , uniqueTermCount ) ; doTestSeekExists ( random ( ) , fieldTerms , reader ) ; doTestSeekDoesNotExist ( random ( ) , numField , fieldTerms , fieldTermsArray , reader ) ; reader . close ( ) ; w . close ( ) ; dir . close ( ) ; } }

Fix:
doc . add ( newStringField ( field , term , NO ) ) ;
Buggy code:
public class EeWriteAttributeHandler extends AbstractWriteAttributeHandler < Void > { private final DefaultEarSubDeploymentsIsolationProcessor isolationProcessor ; private final GlobalModuleDependencyProcessor moduleDependencyProcessor ; private final DescriptorPropertyReplacementProcessor specDescriptorPropertyReplacementProcessor ; private final DescriptorPropertyReplacementProcessor jbossDescriptorPropertyReplacementProcessor ; private final AnnotationPropertyReplacementProcessor annotationPropertyReplacementProcessor ; public EeWriteAttributeHandler ( final DefaultEarSubDeploymentsIsolationProcessor isolationProcessor , final GlobalModuleDependencyProcessor moduleDependencyProcessor , final DescriptorPropertyReplacementProcessor specDescriptorPropertyReplacementProcessor , final DescriptorPropertyReplacementProcessor jbossDescriptorPropertyReplacementProcessor , final AnnotationPropertyReplacementProcessor annotationPropertyReplacementProcessor ) { } public void registerAttributes ( final ManagementResourceRegistration registry ) { } @ Override protected boolean applyUpdateToRuntime ( OperationContext context , ModelNode operation , String attributeName , ModelNode newValue , ModelNode currentValue , HandbackHolder < Void > handbackHolder ) throws OperationFailedException { } @ Override protected void revertUpdateToRuntime ( OperationContext context , ModelNode operation , String attributeName , ModelNode valueToRestore , ModelNode valueToRevert , Void handback ) throws OperationFailedException { } private void applyUpdateToDeploymentUnitProcessor ( final OperationContext context , ModelNode newValue , String attributeName ) throws OperationFailedException { if ( INSTANCE . getName ( ) . equals ( attributeName ) ) { moduleDependencyProcessor . setGlobalModules ( GlobalModulesDefinition . createModuleList ( context , newValue ) ) ; } else if ( EAR_SUBDEPLOYMENTS_ISOLATED . getName ( ) . equals ( attributeName ) ) { boolean isolate = newValue . asBoolean ( ) ; isolationProcessor . setEarSubDeploymentsIsolated ( isolate ) ; } else if ( SPEC_DESCRIPTOR_PROPERTY_REPLACEMENT . getName ( ) . equals ( attributeName ) ) { boolean enabled = newValue . asBoolean ( ) ; specDescriptorPropertyReplacementProcessor . setDescriptorPropertyReplacement ( enabled ) ; } else if ( JBOSS_DESCRIPTOR_PROPERTY_REPLACEMENT . getName ( ) . equals ( attributeName ) ) { boolean enabled = newValue . asBoolean ( ) ; jbossDescriptorPropertyReplacementProcessor . setDescriptorPropertyReplacement ( enabled ) ; } else <START_BUG> if ( EJB_ANNOTATION_PROPERTY_REPLACEMENT . getName ( ) . equals ( attributeName ) ) { <END_BUG> boolean enabled = newValue . asBoolean ( ) ; annotationPropertyReplacementProcessor . setDescriptorPropertyReplacement ( enabled ) ; } } }

Fix:
if ( ANNOTATION_PROPERTY_REPLACEMENT . getName ( ) . equals ( attributeName ) ) {
Buggy code:
public class StepsActivity extends FragmentActivityBase { public static final String KEY_COUNT_CURRENT_FRAGMENT = "key_count" ; public static final String KEY_INDEX_CURRENT_FRAGMENT = "key_current" ; @ Bind ( id . toolbar ) Toolbar mToolbar ; @ Bind ( id . viewpager ) ViewPager mViewPager ; @ Bind ( id . tabs ) TabLayout mTabLayout ; @ Bind ( id . load_progressbar ) ProgressBar mProgressBar ; @ BindString ( string . not_available_lesson ) String notAvailable ; StepFragmentAdapter mStepAdapter ; private List < Step > mStepList ; private Unit mUnit ; private Lesson mLesson ; private boolean isLoaded ; private volatile boolean isAssignmentsUpdated = false ; private volatile boolean isProgressUpdated = false ; private ToDbStepTask saveStepsTask ; private FromDbStepTask getFromDbStepsTask ; private int mCount ; private int mCurrent ; @ Override protected void onCreate ( Bundle savedInstanceState ) { } private void checkOptionsMenu ( int position ) { } private void pushState ( int position ) { } private void updateSteps ( ) { } @ Subscribe public void onFromDbStepEvent ( FromDbStepEvent e ) { } @ Subscribe public void onSuccessLoad ( SuccessLoadStepEvent e ) { } @ Subscribe public void onUpdateStepsState ( final UpdateStepsState e ) { } @ Subscribe public void onUpdateOneStep ( UpdateStepEvent e ) { long stepId = e . getStepId ( ) ; Step step = null ; if ( ( mStepList ) != null ) { for ( Step item : mStepList ) { if ( ( item . getId ( ) ) == stepId ) { step = item ; break ; } } } if ( step != null ) { step . setIs_custom_passed ( true ) ; int pos = mViewPager . getCurrentItem ( ) ; <START_BUG> for ( int i = 0 ; i < ( mStepAdapter . getCount ( ) ) ; i ++ ) { <END_BUG> TabLayout . Tab tab = mTabLayout . getTabAt ( i ) ; tab . setIcon ( mStepAdapter . getTabDrawable ( i ) ) ; } } } private void showSteps ( List < Step > steps ) { } @ Subscribe public void onFailLoad ( FailLoadStepEvent e ) { } private void updateTabs ( ) { } @ Override protected void onSaveInstanceState ( Bundle outState ) { } @ Override public boolean onOptionsItemSelected ( MenuItem item ) { } @ Override public void finish ( ) { } @ Override protected void onStart ( ) { } @ Override protected void onStop ( ) { } private String qualityForView ; @ Subscribe public void onQualityDetermined ( VideoQualityEvent e ) { } @ Override public boolean onCreateOptionsMenu ( Menu menu ) { } }

Fix:
for ( int i = 0 ; i < ( mTabLayout . getTabCount ( ) ) ; i ++ ) {
Buggy code:
public class MiniMapAddon extends JavaAddon { File texture = new File ( "addons//texture.png" ) ; MiniMapWidget widget ; public boolean isEnabled = false ; MiniMapLabel label ; public void loadOverlay ( ) { try { <START_BUG> File jarFile = new File ( MiniMap . class . getProtectionDomain ( ) . getCodeSource ( ) . getLocation ( ) . getPath ( ) ) ; <END_BUG> JarFile jar = new JarFile ( jarFile ) ; ZipEntry ze = jar . getEntry ( "roundmap.png" ) ; InputStream is = jar . getInputStream ( ze ) ; BufferedImage bmg = ImageIO . read ( is ) ; is . close ( ) ; jar . close ( ) ; ByteBuffer buff = TextureUtils . convertImageData ( bmg , 512 ) ; TextureUtils . getInstance ( "overlay" ) . initialUpload ( buff , 512 ) ; buff . clear ( ) ; } catch ( Exception e ) { e . printStackTrace ( ) ; } } @ Override public void onDisable ( ) { } @ Override public void onEnable ( ) { } public MiniMapWidget getWidget ( ) { } }

Fix:
File jarFile = new File ( MiniMap . class . getProtectionDomain ( ) . getCodeSource ( ) . getLocation ( ) . toURI ( ) . getPath ( ) ) ;
Buggy code:
public class GreekAnalyzerTest extends BaseTokenStreamTestCase { public void testAnalyzer ( ) throws Exception { } public void testReusableTokenStream ( ) throws Exception { } public void testRandomStrings ( ) throws Exception { <START_BUG> checkRandomData ( random ( ) , new GreekAnalyzer ( TEST_VERSION_CURRENT ) , ( 10000 * ( RANDOM_MULTIPLIER ) ) ) ; <END_BUG> } }

Fix:
checkRandomData ( random ( ) , new GreekAnalyzer ( TEST_VERSION_CURRENT ) , ( 1000 * ( RANDOM_MULTIPLIER ) ) ) ;
Buggy code:
public class Snippet188 { public static void main ( String [ ] args ) { Display display = new Display ( ) ; Shell shell = new Shell ( display ) ; shell . setLayout ( new GridLayout ( ) ) ; final ScrolledComposite sc = new ScrolledComposite ( shell , ( ( ( SWT . BORDER ) | ( SWT . H_SCROLL ) ) | ( SWT . V_SCROLL ) ) ) ; sc . setLayoutData ( new GridData ( SWT . FILL , SWT . FILL , true , true , 1 , 1 ) ) ; Composite c = new Composite ( sc , SWT . NONE ) ; c . setLayout ( new GridLayout ( 10 , true ) ) ; for ( int i = 0 ; i < 300 ; i ++ ) { Button b = new Button ( c , SWT . PUSH ) ; b . setText ( ( "Button<seq2seq4repair_space>" + i ) ) ; } sc . setContent ( c ) ; sc . setExpandHorizontal ( true ) ; sc . setExpandVertical ( true ) ; <START_BUG> sc . setMinSize ( DEFAULT , DEFAULT ) ; <END_BUG> sc . setShowFocusedControl ( true ) ; shell . setSize ( 300 , 500 ) ; shell . open ( ) ; while ( ! ( shell . isDisposed ( ) ) ) { if ( ! ( display . readAndDispatch ( ) ) ) display . sleep ( ) ; } display . dispose ( ) ; } }

Fix:
sc . setMinSize ( c . computeSize ( DEFAULT , DEFAULT ) ) ;
Buggy code:
public class SerialChainFilter extends Filter { private static final long serialVersionUID = 1L ; private Filter [ ] chain ; public static final int SERIALAND = 1 ; public static final int SERIALOR = 2 ; public static final int AND = 3 ; public static final int OR = 4 ; public static final int DEFAULT = SerialChainFilter . SERIALOR ; private int [ ] actionType ; public SerialChainFilter ( Filter [ ] chain ) { } public SerialChainFilter ( Filter [ ] chain , int [ ] actionType ) { } @ Override public BitSet bits ( IndexReader reader ) throws IOException { } @ Override public DocIdSet getDocIdSet ( IndexReader reader ) throws IOException , CorruptIndexException { BitSet bits = new BitSet ( reader . maxDoc ( ) ) ; int chainSize = chain . length ; int actionSize = actionType . length ; int i = 0 ; if ( ( actionType [ i ] ) == ( SerialChainFilter . AND ) ) { try { bits = ( ( BitSet ) ( ( ( DocIdBitSet ) ( chain [ i ] . getDocIdSet ( reader ) ) ) . getBitSet ( ) . clone ( ) ) ) ; } catch ( IOException e ) { e . printStackTrace ( ) ; } ++ i ; } for ( ; i < chainSize ; i ++ ) { int action = ( i < actionSize ) ? actionType [ i ] : SerialChainFilter . DEFAULT ; switch ( action ) { case SerialChainFilter . SERIALAND : try { bits . and ( ( ( ISerialChainFilter ) ( chain [ i ] ) ) . bits ( reader , bits ) ) ; } catch ( CorruptIndexException e ) { e . printStackTrace ( ) ; } catch ( IOException e ) { e . printStackTrace ( ) ; } catch ( Exception e ) { e . printStackTrace ( ) ; } break ; case SerialChainFilter . SERIALOR : try { bits . or ( ( ( ISerialChainFilter ) ( chain [ i ] ) ) . bits ( reader , bits ) ) ; } catch ( Exception e ) { e . printStackTrace ( ) ; } break ; case SerialChainFilter . AND : <START_BUG> bits . and ( ( ( DocIdBitSet ) ( chain [ i ] . getDocIdSet ( reader ) ) ) . getBitSet ( ) ) ; <END_BUG> break ; case SerialChainFilter . OR : bits . or ( ( ( DocIdBitSet ) ( chain [ i ] . getDocIdSet ( reader ) ) ) . getBitSet ( ) ) ; break ; } } return new DocIdBitSet ( bits ) ; } Filter [ ] getChain ( ) { } int [ ] getActionType ( ) { } @ Override public boolean equals ( Object o ) { } @ Override public int hashCode ( ) { } @ Override public String toString ( ) { } }

Fix:
bits . and ( chain [ i ] . bits ( reader ) ) ;
Buggy code:
public class PostgreSQLDriver extends AbstractRdbmsDriver { private static final Logger LOGGER = LoggerFactory . getLogger ( PostgreSQLDriver . class ) ; public PostgreSQLDriver ( String host , String dbName , String user , String password ) throws AtomSetException { } private static Connection openConnection ( String host , String dbName , String user , String password ) throws AtomSetException { } @ Override public String getInsertOrIgnoreStatement ( String tableName , Map < String , Object > data ) { StringBuilder fields = new StringBuilder ( "(" ) ; StringBuilder values = new StringBuilder ( "" ) ; boolean first = true ; for ( Map . Entry < String , Object > e : data . entrySet ( ) ) { if ( ! first ) { fields . append ( ",<seq2seq4repair_space>" ) ; values . append ( ",<seq2seq4repair_space>" ) ; } fields . append ( e . getKey ( ) ) ; values . append ( '\'' ) . append ( e . getValue ( ) ) . append ( '\'' ) ; first = false ; } fields . append ( ")<seq2seq4repair_space>" ) ; StringBuilder query = new StringBuilder ( ) ; query . append ( "INSERT<seq2seq4repair_space>INTO<seq2seq4repair_space>" ) ; query . append ( tableName ) ; query . append ( fields ) ; query . append ( "<seq2seq4repair_space>SELECT<seq2seq4repair_space>" ) ; query . append ( values ) ; query . append ( "<seq2seq4repair_space>FROM<seq2seq4repair_space>(SELECT<seq2seq4repair_space>0)<seq2seq4repair_space>AS<seq2seq4repair_space>t<seq2seq4repair_space>WHERE<seq2seq4repair_space>NOT<seq2seq4repair_space>EXISTS<seq2seq4repair_space>(SELECT<seq2seq4repair_space>1<seq2seq4repair_space>FROM<seq2seq4repair_space>" ) ; query . append ( tableName ) ; query . append ( "<seq2seq4repair_space>WHERE<seq2seq4repair_space>" ) ; int i = 0 ; for ( Map . Entry < String , Object > e : data . entrySet ( ) ) { <START_BUG> if ( i > 0 ) { <END_BUG> query . append ( "<seq2seq4repair_space>and<seq2seq4repair_space>" ) ; } query . append ( e . getKey ( ) ) . append ( "<seq2seq4repair_space>=<seq2seq4repair_space>" ) ; query . append ( '\'' ) . append ( e . getValue ( ) ) . append ( '\'' ) ; } query . append ( ");<seq2seq4repair_space>" ) ; return query . toString ( ) ; } @ Override public String getInsertOrIgnoreStatement ( String tableName , String selectQuery ) { } }

Fix:
if ( ( ++ i ) > 1 ) {
Buggy code:
public final class NullProperty extends AbstractProperty { private static final long serialVersionUID = 240L ; private JMeterProperty tempValue ; public NullProperty ( String name ) { } public NullProperty ( ) { } public String getStringValue ( ) { } public void setObjectValue ( Object v ) { } public Object getObjectValue ( ) { } @ Override public boolean isRunningVersion ( ) { } public boolean isTemporary ( TestElement owner ) { } @ Override public void mergeIn ( JMeterProperty prop ) { } @ Override <START_BUG> public final Object clone ( ) { <END_BUG> return this ; } @ Override public boolean getBooleanValue ( ) { } @ Override public double getDoubleValue ( ) { } @ Override public float getFloatValue ( ) { } @ Override public int getIntValue ( ) { } @ Override public long getLongValue ( ) { } public void recoverRunningVersion ( TestElement owner ) { } }

Fix:
public final NullProperty clone ( ) {
Buggy code:
public class Asset { private Activity activity ; protected final String STORAGE_FOLDER ; public Asset ( Activity activity , String storageFolder ) { } public JSONObject parseURIs ( JSONObject notification ) { } public Uri getURIfromPath ( String path ) { if ( path . startsWith ( "res:" ) ) { return getUriForResourcePath ( path ) ; } else if ( path . startsWith ( "file://////" ) ) { return getUriForAbsolutePath ( path ) ; } else if ( path . startsWith ( "file:////" ) ) { return getUriForAssetPath ( path ) ; } else if ( path . startsWith ( "http" ) ) { return getUriForHTTP ( path ) ; } <START_BUG> return Uri . parse ( path ) ; <END_BUG> } private Uri getUriForAbsolutePath ( String path ) { } private Uri getUriForAssetPath ( String path ) { } private Uri getUriForResourcePath ( String path ) { } private Uri getUriForHTTP ( String path ) { } private void copyFile ( InputStream in , OutputStream out ) throws IOException { } private int getResId ( String resPath ) { } private String getPackageName ( ) { } }

Fix:
return Uri . EMPTY ;