nus-yam/ex-repair huggingface dataset:
Buggy code:
public class PatternSet extends DataType implements Cloneable { private Vector includeList = new Vector ( ) ; private Vector excludeList = new Vector ( ) ; private Vector includesFileList = new Vector ( ) ; private Vector excludesFileList = new Vector ( ) ; public class NameEntry { private String name ; private String ifCond ; private String unlessCond ; public void setName ( String name ) { } public void setIf ( String cond ) { } public void setUnless ( String cond ) { } public String getName ( ) { } public String evalName ( Project p ) { } private boolean valid ( Project p ) { } public String toString ( ) { } } public PatternSet ( ) { } public void setRefid ( Reference r ) throws BuildException { } public void addConfiguredPatternset ( PatternSet p ) { } public PatternSet . NameEntry createInclude ( ) { } public PatternSet . NameEntry createIncludesFile ( ) { } public PatternSet . NameEntry createExclude ( ) { } public PatternSet . NameEntry createExcludesFile ( ) { } public void setIncludes ( String includes ) { } public void setExcludes ( String excludes ) { } private PatternSet . NameEntry addPatternToList ( Vector list ) { } public void setIncludesfile ( File includesFile ) throws BuildException { } public void setExcludesfile ( File excludesFile ) throws BuildException { } private void readPatterns ( File patternfile , Vector patternlist , Project p ) throws BuildException { BufferedReader patternReader = null ; try { patternReader = new BufferedReader ( new FileReader ( patternfile ) ) ; String line = patternReader . readLine ( ) ; while ( line != null ) { if ( ( line . length ( ) ) > 0 ) { line = p . replaceProperties ( line ) ; addPatternToList ( patternlist ) . setName ( line ) ; } line = patternReader . readLine ( ) ; } } catch ( IOException ioe ) { <START_BUG> String msg = "An<seq2seq4repair_space>error<seq2seq4repair_space>occured<seq2seq4repair_space>while<seq2seq4repair_space>reading<seq2seq4repair_space>from<seq2seq4repair_space>pattern<seq2seq4repair_space>file:<seq2seq4repair_space>" + patternfile ; <END_BUG> throw new BuildException ( msg , ioe ) ; } finally { if ( null != patternReader ) { try { patternReader . close ( ) ; } catch ( IOException ioe ) { } } } } public void append ( PatternSet other , Project p ) { } public String [ ] getIncludePatterns ( Project p ) { } public String [ ] getExcludePatterns ( Project p ) { } boolean hasPatterns ( Project p ) { } private PatternSet getRef ( Project p ) { } private String [ ] makeArray ( Vector list , Project p ) { } private void readFiles ( Project p ) { } public String toString ( ) { } public Object clone ( ) { } }

Fix:
String msg = "An<seq2seq4repair_space>error<seq2seq4repair_space>occurred<seq2seq4repair_space>while<seq2seq4repair_space>reading<seq2seq4repair_space>from<seq2seq4repair_space>pattern<seq2seq4repair_space>file:<seq2seq4repair_space>" + patternfile ;
Buggy code:
public class NamespaceSupport implements NamespaceContext { protected String [ ] fNamespace = new String [ 16 * 2 ] ; protected int fNamespaceSize ; protected int [ ] fContext = new int [ 8 ] ; protected int fCurrentContext ; protected String fXmlSymbol ; protected String fXmlnsSymbol ; public NamespaceSupport ( ) { } public NamespaceSupport ( NamespaceContext context ) { } public void reset ( SymbolTable symbolTable ) { fXmlSymbol = symbolTable . addSymbol ( "xml" ) ; fXmlnsSymbol = symbolTable . addSymbol ( "xmlns" ) ; fNamespaceSize = 0 ; fCurrentContext = 0 ; fContext [ fCurrentContext ] = fNamespaceSize ; fNamespace [ ( ( fNamespaceSize ) ++ ) ] = fXmlSymbol ; <START_BUG> fNamespace [ ( ( fNamespaceSize ) ++ ) ] = symbolTable . addSymbol ( XMLNS ) ; <END_BUG> ++ ( fCurrentContext ) ; } public void pushContext ( ) { } public void popContext ( ) { } public boolean declarePrefix ( String prefix , String uri ) { } public String getURI ( String prefix ) { } public int getDeclaredPrefixCount ( ) { } public String getDeclaredPrefixAt ( int index ) { } public NamespaceContext getParentContext ( ) { } final class Context implements NamespaceContext { private int fCurrentContext ; public Context ( int currentContext ) { } public void setCurrentContext ( int currentContext ) { } public String getURI ( String prefix ) { } public int getDeclaredPrefixCount ( ) { } public String getDeclaredPrefixAt ( int index ) { } public NamespaceContext getParentContext ( ) { } } }

Fix:
fNamespace [ ( ( fNamespaceSize ) ++ ) ] = symbolTable . addSymbol ( XML_URI ) ;
Buggy code:
public class ServerDeploymentRepositoryEnable extends AbstractServerModelUpdate < Void > { private static final long serialVersionUID = 5959855923764647668L ; private final String name ; public ServerDeploymentRepositoryEnable ( String name ) { } protected void applyUpdate ( ServerModel element ) throws UpdateFailedException { } public AbstractServerModelUpdate < ? > getCompensatingUpdate ( ServerModel original ) { } public < P > void applyUpdate ( UpdateContext context , UpdateResultHandler < ? super Void , P > resultHandler , P param ) { <START_BUG> final ServiceController < ? > controller = context . getServiceContainer ( ) . getService ( DeploymentScannerService . getServiceName ( name ) ) ; <END_BUG> if ( controller == null ) { resultHandler . handleFailure ( notConfigured ( ) , param ) ; } else { try { final DeploymentScanner scanner = ( ( DeploymentScanner ) ( controller . getValue ( ) ) ) ; scanner . startScanner ( ) ; resultHandler . handleSuccess ( null , param ) ; } catch ( Throwable t ) { resultHandler . handleFailure ( t , param ) ; } } } private UpdateFailedException notConfigured ( ) { } }

Fix:
final ServiceController < ? > controller = context . getServiceRegistry ( ) . getService ( DeploymentScannerService . getServiceName ( name ) ) ;
Buggy code:
@ Configuration @ EnableAutoConfiguration @ ComponentScan public class AerospikeRESTfulService { <START_BUG> @ Bean <END_BUG> public AerospikeClient asClient ( ) throws AerospikeException { Properties as = System . getProperties ( ) ; return new AerospikeClient ( as . getProperty ( "seedHost" ) , Integer . parseInt ( as . getProperty ( "port" ) ) ) ; } @ Bean public MultipartConfigElement multipartConfigElement ( ) { } public static void main ( String [ ] args ) throws ParseException { } }

Fix:
@ Bean ( destroyMethod = "close" )
Buggy code:
public class Veto { private static final String MESSAGE_COMMAND_PROMPT = "Command:<seq2seq4repair_space>" ; public static void main ( String [ ] args ) { Scanner scanner = new Scanner ( System . in ) ; <START_BUG> Controller controller = new Controller ( args ) ; <END_BUG> Veto . showLine ( controller . getWelcomeMessage ( ) ) ; while ( ! ( controller . isTimeToExit ( ) ) ) { Veto . show ( Veto . MESSAGE_COMMAND_PROMPT ) ; String userInput = scanner . nextLine ( ) ; String feedback = controller . executeCommand ( userInput ) ; Veto . showLine ( feedback ) ; } scanner . close ( ) ; } public static void show ( String text ) { } private static void showLine ( String text ) { } }

Fix:
Controller controller = new Controller ( ) ;
Buggy code:
public class GeoCatcherMain extends ActionBarActivity { @ Override protected void onCreate ( Bundle savedInstanceState ) { super . onCreate ( savedInstanceState ) ; setContentView ( activity_geo_catcher_main ) ; Button myHuntsButton = ( ( Button ) ( findViewById ( myHuntsButton ) ) ) ; myHuntsButton . setOnClickListener ( new View . OnClickListener ( ) { @ Override public void onClick ( View v ) { Intent launchMyHuntsIntent = new Intent ( getApplicationContext ( ) , MyHuntsActivity . class ) ; startActivity ( launchMyHuntsIntent ) ; } } ) ; Button myCreateButton = ( ( Button ) ( findViewById ( CreateNewHuntsButton ) ) ) ; <START_BUG> myHuntsButton . setOnClickListener ( new View . OnClickListener ( ) { <END_BUG> @ Override public void onClick ( View v ) { Intent launchCreateEditHuntsIntent = new Intent ( getApplicationContext ( ) , CreateEditHuntsActivity . class ) ; startActivity ( launchCreateEditHuntsIntent ) ; } } ) ; } @ Override public boolean onCreateOptionsMenu ( Menu menu ) { } @ Override public boolean onOptionsItemSelected ( MenuItem item ) { } }

Fix:
myCreateButton . setOnClickListener ( new View . OnClickListener ( ) {
Buggy code:
public class StatisticsTest extends QSkosTestCase { private QSkos qSkosConcepts ; private QSkos qSkosComponents ; @ Before public void setUp ( ) throws IOException , OpenRDFException { } @ Test public void testTripleCount_1 ( ) throws RepositoryException { } @ Test public void testConceptCount_1 ( ) throws OpenRDFException { } @ Test public void testTripleCount_2 ( ) throws RepositoryException { long tripleCount = qSkosComponents . getTripleCount ( ) ; <START_BUG> Assert . assertEquals ( 71 , tripleCount ) ; <END_BUG> } @ Test public void testConceptsCount_2 ( ) throws OpenRDFException { } @ Test public void testAuthoritativeConceptsCount ( ) throws OpenRDFException { } @ Test public void testLexicalRelationsCount ( ) throws OpenRDFException { } }

Fix:
Assert . assertEquals ( 73 , tripleCount ) ;
Buggy code:
public class CmpExtension implements Extension { public static final String SUBSYSTEM_NAME = "cmp" ; private static final String RESOURCE_NAME = ( CmpExtension . class . getPackage ( ) . getName ( ) ) + ".LocalDescriptions" ; private static final int MANAGEMENT_API_MAJOR_VERSION = 1 ; private static final int MANAGEMENT_API_MINOR_VERSION = 0 ; private static final int MANAGEMENT_API_MICRO_VERSION = 0 ; public void initialize ( final ExtensionContext context ) { final SubsystemRegistration subsystem = context . registerSubsystem ( CmpExtension . SUBSYSTEM_NAME , CmpExtension . MANAGEMENT_API_MAJOR_VERSION , CmpExtension . MANAGEMENT_API_MINOR_VERSION , CmpExtension . MANAGEMENT_API_MICRO_VERSION ) ; final ManagementResourceRegistration subsystemRegistration = subsystem . registerSubsystemModel ( INSTANCE ) ; <START_BUG> subsystemRegistration . registerOperationHandler ( DESCRIBE , GenericSubsystemDescribeHandler . INSTANCE , GenericSubsystemDescribeHandler . INSTANCE , false , PRIVATE ) ; <END_BUG> subsystem . registerXMLElementWriter ( CmpSubsystem10Parser . INSTANCE ) ; subsystemRegistration . registerSubModel ( UUIDKeyGeneratorResourceDescription . INSTANCE ) ; subsystemRegistration . registerSubModel ( HiLoKeyGeneratorResourceDescription . INSTANCE ) ; } public void initializeParsers ( final ExtensionParsingContext context ) { } public static ResourceDescriptionResolver getResourceDescriptionResolver ( final String keyPrefix ) { } }

Fix:
subsystemRegistration . registerOperationHandler ( DEFINITION , GenericSubsystemDescribeHandler . INSTANCE ) ;
Buggy code:
public class DisMaxQParser extends QParser { private static String IMPOSSIBLE_FIELD_NAME = "￼￼￼" ; public DisMaxQParser ( String qstr , SolrParams localParams , SolrParams params , SolrQueryRequest req ) { } protected Map < String , Float > queryFields ; protected Query parsedUserQuery ; protected String [ ] boostParams ; protected List < Query > boostQueries ; protected Query altUserQuery ; protected QParser altQParser ; public Query parse ( ) throws ParseException { } protected void addBoostFunctions ( BooleanQuery query , SolrParams solrParams ) throws ParseException { } protected void addBoostQuery ( BooleanQuery query , SolrParams solrParams ) throws ParseException { } protected void addMainQuery ( BooleanQuery query , SolrParams solrParams ) throws ParseException { } protected Query getAlternateUserQuery ( SolrParams solrParams ) throws ParseException { } protected Query getPhraseQuery ( String userQuery , SolrPluginUtils . DisjunctionMaxQueryParser pp ) throws ParseException { } protected Query getUserQuery ( String userQuery , SolrPluginUtils . DisjunctionMaxQueryParser up , SolrParams solrParams ) throws ParseException { } protected DisjunctionMaxQueryParser getParser ( Map < String , Float > fields , String paramName , SolrParams solrParams , float tiebreaker ) { } @ Override public String [ ] getDefaultHighlightFields ( ) { } @ Override public Query getHighlightQuery ( ) throws ParseException { <START_BUG> return parsedUserQuery ; <END_BUG> } public void addDebugInfo ( NamedList < Object > debugInfo ) { } }

Fix:
return ( parsedUserQuery ) == null ? altUserQuery : parsedUserQuery ;
Buggy code:
public class TimedTaskList { private final int TASKLIST_SIZE = 1000 ; private ArrayList < TimedTask > taskArray = new ArrayList < TimedTask > ( TASKLIST_SIZE ) ; private enum SORT_TYPE { NAME , TIMED , WORKLOAD , ID ; } private int numOfDisplayItems = 5 ; private ObservableList < TimedTask > observableTimed = FXCollections . observableArrayList ( ) ; public TimedTaskList ( ) { } public TimedTask get ( int index ) { } public void add ( TimedTask task ) { } public void delete ( int index ) { <START_BUG> taskArray . remove ( index ) ; <END_BUG> } public void delete ( String name ) { } public int size ( ) { } public boolean isEmpty ( ) { } public TimedTaskList . SORT_TYPE getSortType ( String keyword ) { } public void sortBy ( TimedTaskList . SORT_TYPE type ) { } public ObservableList < TimedTask > getObservable ( ) { } private Comparator < TimedTask > taskNameComparator = new Comparator < TimedTask > ( ) { public int compare ( TimedTask t1 , TimedTask t2 ) { } } ; private Comparator < TimedTask > taskTimedComparator = new Comparator < TimedTask > ( ) { public int compare ( TimedTask t1 , TimedTask t2 ) { } } ; private Comparator < TimedTask > taskWorkloadComparator = new Comparator < TimedTask > ( ) { public int compare ( TimedTask t1 , TimedTask t2 ) { } } ; private Comparator < TimedTask > taskIdComparator = new Comparator < TimedTask > ( ) { public int compare ( TimedTask t1 , TimedTask t2 ) { } } ; }

Fix:
taskArray . remove ( ( index - 1 ) ) ;
Buggy code:
public class RemotingSubsystemRootResource extends SimpleResourceDefinition { static final SimpleAttributeDefinition WORKER_READ_THREADS = RemotingSubsystemRootResource . createIntAttribute ( CommonAttributes . WORKER_READ_THREADS , Attribute . WORKER_READ_THREADS , 1 ) ; static final SimpleAttributeDefinition WORKER_TASK_CORE_THREADS = RemotingSubsystemRootResource . createIntAttribute ( CommonAttributes . WORKER_TASK_CORE_THREADS , Attribute . WORKER_TASK_CORE_THREADS , 4 ) ; static final SimpleAttributeDefinition WORKER_TASK_KEEPALIVE = RemotingSubsystemRootResource . createIntAttribute ( CommonAttributes . WORKER_TASK_KEEPALIVE , Attribute . WORKER_TASK_KEEPALIVE , 60 ) ; static final SimpleAttributeDefinition WORKER_TASK_LIMIT = RemotingSubsystemRootResource . createIntAttribute ( CommonAttributes . WORKER_TASK_LIMIT , Attribute . WORKER_TASK_LIMIT , 16384 ) ; static final SimpleAttributeDefinition WORKER_TASK_MAX_THREADS = RemotingSubsystemRootResource . createIntAttribute ( CommonAttributes . WORKER_TASK_MAX_THREADS , Attribute . WORKER_TASK_MAX_THREADS , 16 ) ; static final SimpleAttributeDefinition WORKER_WRITE_THREADS = RemotingSubsystemRootResource . createIntAttribute ( CommonAttributes . WORKER_WRITE_THREADS , Attribute . WORKER_WRITE_THREADS , 1 ) ; private final ProcessType processType ; public RemotingSubsystemRootResource ( final ProcessType processType ) { } @ Override public void registerAttributes ( ManagementResourceRegistration resourceRegistration ) { } private void registerReadWriteIntAttribute ( ManagementResourceRegistration resourceRegistration , AttributeDefinition attr ) { } private static SimpleAttributeDefinition createIntAttribute ( String name , Attribute attribute , int defaultValue ) { <START_BUG> return SimpleAttributeDefinitionBuilder . create ( name , INT , true ) . setDefaultValue ( new ModelNode ( ) . set ( defaultValue ) ) . setXmlName ( attribute . getLocalName ( ) ) . setValidator ( new IntRangeValidator ( 1 ) ) . build ( ) ; <END_BUG> } private static class ThreadWriteAttributeHandler extends RestartParentWriteAttributeHandler { private final ProcessType processType ; ThreadWriteAttributeHandler ( AttributeDefinition definition , ProcessType processType ) { } @ Override protected void recreateParentService ( OperationContext context , PathAddress parentAddress , ModelNode parentModel , ServiceVerificationHandler verificationHandler ) throws OperationFailedException { } @ Override protected ServiceName getParentServiceName ( PathAddress parentAddress ) { } } }

Fix:
return SimpleAttributeDefinitionBuilder . create ( name , INT , true ) . setDefaultValue ( new ModelNode ( ) . set ( defaultValue ) ) . setXmlName ( attribute . getLocalName ( ) ) . setValidator ( new IntRangeValidator ( 1 , true ) ) . build ( ) ;
Buggy code:
final class ConnectorConfigService implements Service < ConnectorSubsystemConfiguration > { private final ConnectorSubsystemConfiguration value ; private static final Logger log = Logger . getLogger ( "org.jboss.as.connector" ) ; public ConnectorConfigService ( ConnectorSubsystemConfiguration value ) { } @ Override public ConnectorSubsystemConfiguration getValue ( ) throws IllegalStateException { } @ Override public void start ( StartContext context ) throws StartException { ConnectorConfigService . log . infof ( "Starting<seq2seq4repair_space>JCA<seq2seq4repair_space>Subsystem<seq2seq4repair_space>(%s)" , FULL_VERSION ) ; <START_BUG> ConnectorConfigService . log . infof ( "config=%s" , value ) ; <END_BUG> } @ Override public void stop ( StopContext context ) { } }

Fix:
ConnectorConfigService . log . tracef ( "config=%s" , value ) ;
Buggy code:
public class TelnetConnection implements FHEMConnection { public static final String TELNET_URL = "TELNET_URL" ; public static final String TELNET_PORT = "TELNET_PORT" ; private static final String DEFAULT_HOST = "" ; private static final int DEFAULT_PORT = 0 ; public static final TelnetConnection INSTANCE = new TelnetConnection ( ) ; private TelnetConnection ( ) { } public String xmllist ( ) { } @ Override public String fileLogData ( String logName , Date fromDate , Date toDate , String columnSpec ) { <START_BUG> SimpleDateFormat dateFormat = new SimpleDateFormat ( "yyyy-MM-dd" ) ; <END_BUG> String command = new StringBuilder ( ) . append ( "get<seq2seq4repair_space>" ) . append ( logName ) . append ( "<seq2seq4repair_space>-<seq2seq4repair_space>-<seq2seq4repair_space>" ) . append ( dateFormat . format ( fromDate ) ) . append ( "<seq2seq4repair_space>" ) . append ( dateFormat . format ( toDate ) ) . append ( "<seq2seq4repair_space>" ) . append ( columnSpec ) . toString ( ) ; return request ( command , ( "#" + columnSpec ) ) ; } public void executeCommand ( String command ) { } private String request ( String command , String delimiter ) { } private String getHost ( ) { } private int getPort ( ) { } }

Fix:
SimpleDateFormat dateFormat = new SimpleDateFormat ( "yyyy-MM-dd_HH:mm" ) ;
Buggy code:
public class Home extends FragmentActivity { public static int IN_FOCUS = SidebarManager . MENU ; public static Home h ; private SharedPreferences sharedPreferences ; private FrameLayout fragmentContainer ; private Fragment fragment ; private ListView sidebarListView ; private RelativeLayout searchListContainer ; private ListView searchListView ; private List < MenuItem > searchedItems ; private String searchString ; private long lastSearchTime = - 1 ; @ Override protected void onCreate ( Bundle savedInstanceState ) { } @ Override protected void onResume ( ) { } @ Override public boolean onOptionsItemSelected ( android . view . MenuItem item ) { } @ Override public void onBackPressed ( ) { } @ Override protected void onActivityResult ( int requestCode , int resultCode , Intent data ) { } private void checkLogin ( ) { } private void initUserProfile ( ) { } private void initButtons ( ) { } private void initSearchListeners ( ) { } public void initSidebar ( ) { } public void showView ( int inFocusID ) { } private void transitionFragment ( ) { } private void transitionFragmentOut ( ) { } private void transitionFragmentIn ( ) { } private void setRecurringAlarm ( ) { Intent alarmReceiver = new Intent ( this , AlarmReceiver . class ) ; PendingIntent syncIntent = PendingIntent . getBroadcast ( getApplicationContext ( ) , 0 , alarmReceiver , FLAG_CANCEL_CURRENT ) ; AlarmManager alarms = ( ( AlarmManager ) ( getSystemService ( ALARM_SERVICE ) ) ) ; <START_BUG> alarms . setInexactRepeating ( RTC_WAKEUP , System . currentTimeMillis ( ) , ( ( 1000 * 60 ) * 10 ) , syncIntent ) ; <END_BUG> } private BaseAdapter sideMenuAdapter = new BaseAdapter ( ) { @ Override public int getCount ( ) { } @ Override public Object getItem ( int position ) { } @ Override public long getItemId ( int position ) { } @ Override public View getView ( int position , View convertView , ViewGroup parent ) { } } ; private BaseAdapter searchMenuAdapter = new BaseAdapter ( ) { @ Override public int getCount ( ) { } @ Override public Object getItem ( int position ) { } @ Override public long getItemId ( int position ) { } @ Override public View getView ( int position , View convertView , ViewGroup parent ) { } } ; private class SearchTask extends AsyncTask < Void , Void , String > { @ Override protected void onPreExecute ( ) { } @ Override protected String doInBackground ( Void ... voids ) { } @ Override protected void onPostExecute ( String result ) { } } }

Fix:
alarms . setInexactRepeating ( RTC_WAKEUP , System . currentTimeMillis ( ) , ( ( 1000 * 60 ) * 20 ) , syncIntent ) ;
Buggy code:
public abstract class AbstractProducer < K , V > implements Producer < K , V > { private Logger logger = LoggerFactory . getLogger ( this . getClass ( ) ) ; protected KafkaProducer < K , V > kafkaProducer ; protected Map < String , Object > producerConfigMap = new HashMap < > ( ) ; public AbstractProducer ( ) { } public AbstractProducer ( Map < String , Object > producerConfigMap ) { } private void initKafkaProducer ( ) { if ( ( producerConfigMap . get ( BATCH_SIZE_CONFIG ) ) == null ) { producerConfigMap . put ( BATCH_SIZE_CONFIG , 16384 ) ; } if ( ( producerConfigMap . get ( BUFFER_MEMORY_CONFIG ) ) == null ) { producerConfigMap . put ( BUFFER_MEMORY_CONFIG , 33554432 ) ; } if ( ( producerConfigMap . get ( ACKS_CONFIG ) ) == null ) { <START_BUG> producerConfigMap . put ( ACKS_CONFIG , 1 ) ; <END_BUG> } if ( ( producerConfigMap . get ( REQUEST_TIMEOUT_MS_CONFIG ) ) == null ) { producerConfigMap . put ( REQUEST_TIMEOUT_MS_CONFIG , 30000 ) ; } if ( ( producerConfigMap . get ( LINGER_MS_CONFIG ) ) == null ) { producerConfigMap . put ( LINGER_MS_CONFIG , 1 ) ; } if ( ( producerConfigMap . get ( RETRIES_CONFIG ) ) == null ) { producerConfigMap . put ( RETRIES_CONFIG , 0 ) ; } if ( ( producerConfigMap . get ( PARTITIONER_CLASS_CONFIG ) ) == null ) { producerConfigMap . put ( PARTITIONER_CLASS_CONFIG , "org.apache.kafka.clients.producer.internals.DefaultPartitioner" ) ; } producerConfigMap . put ( "key.serializer" , StringSerializer . class ) ; producerConfigMap . put ( "value.serializer" , ValueSerializer . class ) ; producerConfigMap . put ( "bootstrap.servers" , KafkaClientConfig . configHolder ( ) . getKafkaServers ( ) ) ; this . kafkaProducer = new KafkaProducer ( producerConfigMap ) ; } @ Override public void flush ( ) { } @ Override public void close ( ) { } @ Override public void close ( long timeout , TimeUnit unit ) { } }

Fix:
producerConfigMap . put ( ACKS_CONFIG , "1" ) ;
Buggy code:
public class GoStateToSubstate implements TreeModelPrereqs { public String toString ( ) { } public Object getRoot ( ) { } public void setRoot ( Object r ) { } public Object getChild ( Object parent , int index ) { } public int getChildCount ( Object parent ) { } public int getIndexOfChild ( Object parent , Object child ) { } public boolean isLeaf ( Object node ) { } public Vector getChildren ( Object parent ) { if ( ! ( parent instanceof CompositeState ) ) return null ; CompositeState cs = ( ( CompositeState ) ( parent ) ) ; Vector subs = cs . getSubstate ( ) ; <START_BUG> if ( ! ( cs . getIsConcurent ( ) ) ) <END_BUG> return subs ; Vector children = new Vector ( ) ; util . Enumeration = subs . elements ( ) ; } public void valueForPathChanged ( TreePath path , Object newValue ) { } public void addTreeModelListener ( TreeModelListener l ) { } public void removeTreeModelListener ( TreeModelListener l ) { } public Vector getPrereqs ( ) { } public Vector getProvidedTypes ( ) { } }

Fix:
if ( ! ( cs . getIsConcurrent ( ) ) )
Buggy code:
public class AnimoResultTraverser extends ResultTraverser { public static AnimoResultTraverser _ = new AnimoResultTraverser ( ) ; protected AnimoResultTraverser ( ) { } @ Override protected void build ( GraphHandler handler , PFlow pf , Relationship r , int level , boolean isOne ) throws IOException { int addedContexts = 0 ; if ( r . isType ( RelationshipTypes . RESULT ) ) { r = AnimoGraph . getDb ( ) . getRelationshipById ( ( ( Long ) ( r . getProperty ( Properties . RID . name ( ) ) ) ) ) ; } Statement s ; if ( ( r . isType ( RelationshipTypes . REF ) ) || ( r . isType ( THE . _ ) ) ) { s = THE . _ ; } else { s = Statements . relationshipType ( r ) ; } if ( ( s instanceof Reference ) || ( s instanceof HAVE ) ) { pf . addContextPoint ( r ) ; addedContexts ++ ; } try { Relationship context = AnimoGraph . getDb ( ) . getRelationshipById ( ( ( Long ) ( r . getProperty ( Properties . CID . name ( ) ) ) ) ) ; pf . addContextPoint ( context ) ; addedContexts ++ ; } catch ( Exception e ) { } if ( s != null ) { if ( ( s instanceof Query ) || ( s instanceof Evaluable ) ) { <START_BUG> result ( handler , new PFlow ( pf ) , r , level , isOne ) ; <END_BUG> } else if ( s instanceof Relation ) { handler . start ( s , r , ( level ++ ) , isOne ) ; handler . end ( s , r , ( -- level ) , isOne ) ; } else { handler . start ( s , r , ( level ++ ) , isOne ) ; node = r . getEndNode ( ) ; It it = new It ( node ) ; int size = ( hasStatement ( node , NAME . _ ) ) ? 1 : 0 ; try { iterate ( handler , pf , it , level , size ) ; } finally { it . remove ( ) ; } handler . end ( s , r , ( -- level ) , isOne ) ; } } while ( addedContexts > 0 ) { pf . popContextPoint ( ) ; addedContexts -- ; } } }

Fix:
result ( handler , pf , r , level , isOne ) ;
Buggy code:
public class Browser1 { public static boolean passed = false ; public static boolean locationChanging = false ; public static boolean locationChanged = false ; public static boolean progressCompleted = false ; public static boolean test1 ( String url ) { } public static boolean test2 ( String url ) { } static boolean runLoopTimer ( final Display display , final Shell shell , final int seconds ) { } public static boolean test ( ) { int fail = 0 ; <START_BUG> String [ ] urls = new String [ ] { "http:////www.eclipse.org" , "http:////www.google.com" , "http:////www.ibm.com" } ; <END_BUG> for ( int i = 0 ; i < ( urls . length ) ; i ++ ) { boolean result = Browser1 . test1 ( urls [ i ] ) ; System . out . print ( ( result ? "." : "E" ) ) ; if ( ! result ) fail ++ ; } for ( int i = 0 ; i < ( urls . length ) ; i ++ ) { boolean result = Browser1 . test2 ( urls [ i ] ) ; System . out . print ( ( result ? "." : "E" ) ) ; if ( ! result ) fail ++ ; } return fail == 0 ; } public static void main ( String [ ] argv ) { } }

Fix:
String [ ] urls = new String [ ] { "http:////www.google.com" } ;
Buggy code:
public class ModClusterDisable implements OperationStepHandler , DescriptionProvider { static final ModClusterDisable INSTANCE = new ModClusterDisable ( ) ; @ Override public ModelNode getModelDescription ( Locale locale ) { } @ Override public void execute ( OperationContext context , ModelNode operation ) throws OperationFailedException { <START_BUG> if ( ( context . getType ( ) ) == ( Type . SERVER ) ) { <END_BUG> context . addStep ( new OperationStepHandler ( ) { @ Override public void execute ( OperationContext context , ModelNode operation ) throws OperationFailedException { ServiceController < ? > controller = context . getServiceRegistry ( false ) . getService ( NAME ) ; ModCluster modcluster = ( ( ModCluster ) ( controller . getValue ( ) ) ) ; modcluster . disable ( ) ; context . completeStep ( ) ; } } , RUNTIME ) ; } context . completeStep ( ) ; } }

Fix:
if ( context . getProcessType ( ) . isServer ( ) ) {
Buggy code:
public class AccountService implements IConnEvent { private static boolean DEBUG = IMPSDev . isDEBUG ( ) ; private static String TAG = AccountService . class . getCanonicalName ( ) ; public boolean isConnected = false ; public boolean isLogined = false ; public static boolean autoAuth = false ; public static String userName ; public static String userPwd ; public AccountService ( ) { } public boolean start ( ) { } public boolean isConnected ( ) { } public boolean isLogined ( ) { } public void login ( String username , String password ) { } public void logout ( ) { <START_BUG> if ( ( isConnected ) && ( isLogined ) ) { <END_BUG> ConnectionService . getChannel ( ) . write ( ChannelBuffers . wrappedBuffer ( MessageFactory . createCStatusNotify ( AccountService . userName , OFFLINE ) . build ( ) ) ) ; } isLogined = false ; } public void register ( User user ) { } @ Override public void onConnected ( ) { } @ Override public void onDisconnected ( ) { } public void onLoginError ( ) { } public void onLoginSuccess ( ) { } }

Fix:
if ( ( ( ( isConnected ) && ( isLogined ) ) && ( ( ConnectionService . getChannel ( ) ) != null ) ) && ( ConnectionService . getChannel ( ) . isConnected ( ) ) ) {
Buggy code:
public abstract class JDBCInsertPKCreateCommand extends JDBCAbstractCreateCommand { protected String existsSQL ; public void init ( JDBCStoreManager manager ) throws DeploymentException { } protected void initExistsSQL ( ) { StringBuffer sql = new StringBuffer ( 300 ) ; <START_BUG> sql . append ( SELECT ) . append ( "COUNT(*)" ) . append ( FROM ) . append ( entity . getTableName ( ) ) . append ( WHERE ) ; <END_BUG> SQLUtil . getWhereClause ( entity . getPrimaryKeyFields ( ) , sql ) ; existsSQL = sql . toString ( ) ; if ( debug ) { log . debug ( ( "Entity<seq2seq4repair_space>Exists<seq2seq4repair_space>SQL:<seq2seq4repair_space>" + ( existsSQL ) ) ) ; } } protected void beforeInsert ( EntityEnterpriseContext ctx ) throws CreateException { } }

Fix:
sql . append ( SELECT ) . append ( "COUNT(*)" ) . append ( FROM ) . append ( entity . getQualifiedTableName ( ) ) . append ( WHERE ) ;
Buggy code:
public abstract class StatementCreatorUtils { private static final Log logger = LogFactory . getLog ( StatementCreatorUtils . class ) ; private static Map < Class , Integer > javaTypeToSqlTypeMap = new HashMap < Class , Integer > ( 32 ) ; public static int javaTypeToSqlParameterType ( Class javaType ) { } public static void setParameterValue ( PreparedStatement ps , int paramIndex , SqlParameter param , Object inValue ) throws SQLException { } public static void setParameterValue ( PreparedStatement ps , int paramIndex , int sqlType , Object inValue ) throws SQLException { } public static void setParameterValue ( PreparedStatement ps , int paramIndex , int sqlType , String typeName , Object inValue ) throws SQLException { } private static void setParameterValueInternal ( PreparedStatement ps , int paramIndex , int sqlType , String typeName , Integer scale , Object inValue ) throws SQLException { } private static void setNull ( PreparedStatement ps , int paramIndex , int sqlType , String typeName ) throws SQLException { if ( sqlType == ( SqlTypeValue . TYPE_UNKNOWN ) ) { boolean useSetObject = false ; sqlType = Types . NULL ; try { DatabaseMetaData dbmd = ps . getConnection ( ) . getMetaData ( ) ; String databaseProductName = dbmd . getDatabaseProductName ( ) ; String jdbcDriverName = dbmd . getDriverName ( ) ; if ( ( databaseProductName . startsWith ( "Informix" ) ) || ( jdbcDriverName . startsWith ( "Microsoft<seq2seq4repair_space>SQL<seq2seq4repair_space>Server" ) ) ) { useSetObject = true ; } else <START_BUG> if ( ( ( ( databaseProductName . startsWith ( "DB2" ) ) || ( jdbcDriverName . startsWith ( "jConnect" ) ) ) || ( jdbcDriverName . startsWith ( "SQLServer" ) ) ) || ( jdbcDriverName . startsWith ( "Apache<seq2seq4repair_space>Derby<seq2seq4repair_space>Embedded" ) ) ) { <END_BUG> sqlType = Types . VARCHAR ; } } catch ( Throwable ex ) { StatementCreatorUtils . logger . debug ( "Could<seq2seq4repair_space>not<seq2seq4repair_space>check<seq2seq4repair_space>database<seq2seq4repair_space>or<seq2seq4repair_space>driver<seq2seq4repair_space>name" , ex ) ; } if ( useSetObject ) { ps . setObject ( paramIndex , null ) ; } else { ps . setNull ( paramIndex , sqlType ) ; } } else if ( typeName != null ) { ps . setNull ( paramIndex , sqlType , typeName ) ; } else { ps . setNull ( paramIndex , sqlType ) ; } } private static void setValue ( PreparedStatement ps , int paramIndex , int sqlType , String typeName , Integer scale , Object inValue ) throws SQLException { } private static boolean isStringValue ( Class inValueType ) { } private static boolean isDateValue ( Class inValueType ) { } public static void cleanupParameters ( Object [ ] paramValues ) { } public static void cleanupParameters ( Collection paramValues ) { } }

Fix:
if ( ( ( ( databaseProductName . startsWith ( "DB2" ) ) || ( jdbcDriverName . startsWith ( "jConnect" ) ) ) || ( jdbcDriverName . startsWith ( "SQLServer" ) ) ) || ( jdbcDriverName . startsWith ( "Apache<seq2seq4repair_space>Derby" ) ) ) {
Buggy code:
public class BigFractionTest extends TestCase { private void assertFraction ( int expectedNumerator , int expectedDenominator , BigFraction actual ) { } private void assertFraction ( long expectedNumerator , long expectedDenominator , BigFraction actual ) { } public void testConstructor ( ) { } public void testGoldenRatio ( ) { } public void testDoubleConstructor ( ) throws ConvergenceException { } public void testDigitLimitConstructor ( ) throws ConvergenceException { } public void testEpsilonLimitConstructor ( ) throws ConvergenceException { } public void testCompareTo ( ) { } public void testDoubleValue ( ) { } public void testFloatValue ( ) { } public void testIntValue ( ) { } public void testLongValue ( ) { } public void testConstructorDouble ( ) { assertFraction ( 1 , 2 , new BigFraction ( 0.5 ) ) ; assertFraction ( 6004799503160661L , 18014398509481984L , new BigFraction ( ( 1.0 // 3.0 ) ) ) ; assertFraction ( 6124895493223875L , 36028797018963968L , new BigFraction ( ( 17.0 // 100.0 ) ) ) ; assertFraction ( 1784551352345559L , 562949953421312L , new BigFraction ( ( 317.0 // 100.0 ) ) ) ; assertFraction ( ( - 1 ) , 2 , new BigFraction ( ( - 0.5 ) ) ) ; assertFraction ( ( - 6004799503160661L ) , 18014398509481984L , new BigFraction ( ( ( - 1.0 ) // 3.0 ) ) ) ; assertFraction ( ( - 6124895493223875L ) , 36028797018963968L , new BigFraction ( ( 17.0 // ( - 100.0 ) ) ) ) ; assertFraction ( ( - 1784551352345559L ) , 562949953421312L , new BigFraction ( ( ( - 317.0 ) // 100.0 ) ) ) ; for ( double v : new double [ ] { Double . NaN , Double . NEGATIVE_INFINITY , Double . POSITIVE_INFINITY } ) { try { new BigFraction ( v ) ; fail ( "expected<seq2seq4repair_space>exception" ) ; } catch ( IllegalArgumentException iae ) { } } assertEquals ( 1L , new BigFraction ( Double . MAX_VALUE ) . getDenominatorAsLong ( ) ) ; <START_BUG> assertEquals ( 1L , new BigFraction ( Double . MIN_NORMAL ) . getNumeratorAsLong ( ) ) ; <END_BUG> assertEquals ( 1L , new BigFraction ( Double . MIN_VALUE ) . getNumeratorAsLong ( ) ) ; } public void testAbs ( ) { } public void testReciprocal ( ) { } public void testNegate ( ) { } public void testAdd ( ) { } public void testDivide ( ) { } public void testMultiply ( ) { } public void testSubtract ( ) { } public void testBigDecimalValue ( ) { } public void testEqualsAndHashCode ( ) { } public void testGetReducedFraction ( ) { } public void testPow ( ) { } }

Fix:
assertEquals ( 1L , new BigFraction ( Double . longBitsToDouble ( 4503599627370496L ) ) . getNumeratorAsLong ( ) ) ;
Buggy code:
class TableModelAssocByProps extends TableModelComposite { public TableModelAssocByProps ( ) { } public void initColumns ( ) { } public Vector rowObjectsFor ( Object t ) { if ( ! ( t instanceof UMLClassDiagram ) ) return new Vector ( ) ; UMLClassDiagram d = ( ( UMLClassDiagram ) ( t ) ) ; <START_BUG> Vector edges = d . getGraphModel ( ) . getEdges ( ) ; <END_BUG> Vector res = new Vector ( ) ; int size = edges . size ( ) ; for ( int i = 0 ; i < size ; i ++ ) { Object edge = edges . elementAt ( i ) ; if ( edge instanceof IAssociation ) res . addElement ( edge ) ; } return res ; } public String toString ( ) { } }

Fix:
Vector edges = d . getEdges ( ) ;
Buggy code:
public class CodeSnippetThisReference extends ThisReference implements InvocationSite , EvaluationConstants { EvaluationContext evaluationContext ; FieldBinding delegateThis ; boolean isImplicit ; public CodeSnippetThisReference ( int s , int sourceEnd , EvaluationContext evaluationContext , boolean isImplicit ) { } protected boolean checkAccess ( MethodScope methodScope ) { } public void generateCode ( BlockScope currentScope , CodeStream codeStream , boolean valueRequired ) { int pc = codeStream . position ; if ( valueRequired ) { codeStream . aload_0 ( ) ; codeStream . getfield ( delegateThis ) ; } <START_BUG> codeStream . recordPositionsFrom ( pc , this ) ; <END_BUG> } public boolean isSuperAccess ( ) { } public boolean isTypeAccess ( ) { } public TypeBinding resolveType ( BlockScope scope ) { } public void setDepth ( int depth ) { } public void setFieldIndex ( int index ) { } public String toStringExpression ( ) { } }

Fix:
codeStream . recordPositionsFrom ( pc , this . sourceStart ) ;
Buggy code:
public class EnumConstantDeclaration extends BodyDeclaration { public static final ChildPropertyDescriptor JAVADOC_PROPERTY = BodyDeclaration . internalJavadocPropertyFactory ( EnumConstantDeclaration . class ) ; public static final ChildListPropertyDescriptor MODIFIERS2_PROPERTY = BodyDeclaration . internalModifiers2PropertyFactory ( EnumConstantDeclaration . class ) ; public static final ChildPropertyDescriptor NAME_PROPERTY = new ChildPropertyDescriptor ( EnumConstantDeclaration . class , "name" , SimpleName . class , ASTNode . MANDATORY , ASTNode . NO_CYCLE_RISK ) ; public static final ChildListPropertyDescriptor ARGUMENTS_PROPERTY = new ChildListPropertyDescriptor ( EnumConstantDeclaration . class , "arguments" , Expression . class , ASTNode . NO_CYCLE_RISK ) ; public static final ChildListPropertyDescriptor BODY_DECLARATIONS_PROPERTY = new ChildListPropertyDescriptor ( EnumConstantDeclaration . class , "bodyDeclarations" , BodyDeclaration . class , ASTNode . CYCLE_RISK ) ; private static final List PROPERTY_DESCRIPTORS ; public static List propertyDescriptors ( int apiLevel ) { } private SimpleName constantName = null ; private ASTNode . NodeList arguments = new ASTNode . NodeList ( EnumConstantDeclaration . ARGUMENTS_PROPERTY ) ; private ASTNode . NodeList bodyDeclarations = new ASTNode . NodeList ( EnumConstantDeclaration . BODY_DECLARATIONS_PROPERTY ) ; EnumConstantDeclaration ( AST ast ) { } final List internalStructuralPropertiesForType ( int apiLevel ) { } final ASTNode internalGetSetChildProperty ( ChildPropertyDescriptor property , boolean get , ASTNode child ) { } final List internalGetChildListProperty ( ChildListPropertyDescriptor property ) { } final ChildPropertyDescriptor internalJavadocProperty ( ) { } final ChildListPropertyDescriptor internalModifiers2Property ( ) { } final SimplePropertyDescriptor internalModifiersProperty ( ) { } final int getNodeType0 ( ) { } ASTNode clone0 ( AST target ) { } final boolean subtreeMatch0 ( ASTMatcher matcher , Object other ) { } void accept0 ( ASTVisitor visitor ) { } public SimpleName getName ( ) { if ( ( this . constantName ) == null ) { <START_BUG> synchronized ( this . ast ) { <END_BUG> if ( ( this . constantName ) == null ) { preLazyInit ( ) ; this . constantName = new SimpleName ( this . ast ) ; postLazyInit ( this . constantName , EnumConstantDeclaration . NAME_PROPERTY ) ; } } } return this . constantName ; } public void setName ( SimpleName constantName ) { } public List arguments ( ) { } public List bodyDeclarations ( ) { } public IVariableBinding resolveVariable ( ) { } void appendDebugString ( StringBuffer buffer ) { } int memSize ( ) { } int treeSize ( ) { } }

Fix:
synchronized ( this ) {
Buggy code:
public class DiagonalMatrixTest extends TestCase { public DiagonalMatrixTest ( String name ) { } public void testConstantDiagonal ( ) { } public void testNoSetOutsideOfDiagonal ( ) { } public void testCopy ( ) { } public void testDuplicate ( ) { } public void testTranspose ( ) { } public void testDeterminant ( ) { } public void testSolve ( ) throws SingularMatrixException { DiagonalMatrix d = new DiagonalMatrix ( 6 ) ; for ( int i = 0 ; i < ( d . getRows ( ) ) ; ++ i ) { d . setElement ( i , i , ( i + 1.0 ) ) ; } GeneralMatrix b = new GeneralMatrix ( 6 , 3 ) ; for ( int i = 0 ; i < ( b . getRows ( ) ) ; ++ i ) { b . setElement ( i , 0 , ( i + 1.0 ) ) ; b . setElement ( i , 1 , ( ( i + 1.0 ) * ( i + 1.0 ) ) ) ; b . setElement ( i , 2 , 0.0 ) ; } Matrix result = d . solve ( b , 1.0E-10 ) ; assertTrue ( ( ( result . getRows ( ) ) == ( b . getRows ( ) ) ) ) ; assertTrue ( ( ( result . getColumns ( ) ) == ( b . getColumns ( ) ) ) ) ; for ( int i = 0 ; i < ( result . getRows ( ) ) ; ++ i ) { assertTrue ( ( ( Math . abs ( ( ( result . getElement ( i , 0 ) ) - 1.0 ) ) ) < 1.0E-10 ) ) ; assertTrue ( ( ( Math . abs ( ( ( result . getElement ( i , 1 ) ) - ( i + 1.0 ) ) ) ) < 1.0E-10 ) ) ; assertTrue ( ( ( Math . abs ( ( ( result . getElement ( i , 2 ) ) - 0.0 ) ) ) < 1.0E-10 ) ) ; } boolean gotIt = false ; try { d . setElement ( 3 , 3 , 0.0 ) ; <START_BUG> result = d . solve ( b , 1.0E-10 ) ; <END_BUG> } catch ( SingularMatrixException e ) { gotIt = true ; } assertTrue ( gotIt ) ; } public void testInverse ( ) throws SingularMatrixException { } public static Test suite ( ) { } public void checkMatrix ( Matrix d , double value ) { } }

Fix:
d . solve ( b , 1.0E-10 ) ;
Buggy code:
public class FileEditor implements ActionListener , PropertyEditor { protected static Logger log = LoggingManager . getLoggerForClass ( ) ; private JPanel panel ; PropertyEditor editor ; public FileEditor ( ) { } public void actionPerformed ( ActionEvent e ) { JFileChooser chooser = FileDialoger . promptToOpenFile ( ) ; File file = chooser . getSelectedFile ( ) ; <START_BUG> setValue ( file ) ; <END_BUG> } public void addPropertyChangeListener ( PropertyChangeListener listener ) { } public String getAsText ( ) { } public Component getCustomEditor ( ) { } public String getJavaInitializationString ( ) { } public String [ ] getTags ( ) { } public Object getValue ( ) { } public boolean isPaintable ( ) { } public void paintValue ( Graphics gfx , Rectangle box ) { } public void removePropertyChangeListener ( PropertyChangeListener listener ) { } public void setAsText ( String text ) throws IllegalArgumentException { } public void setValue ( Object value ) { } public boolean supportsCustomEditor ( ) { } private static class SimpleFileEditor extends PropertyEditorSupport { public String getAsText ( ) { } public void setAsText ( String text ) throws IllegalArgumentException { } public Object getValue ( ) { } public void setValue ( Object file ) { } } }

Fix:
setValue ( file . getPath ( ) ) ;
Buggy code:
public class GpioHelper { public static GpioPinDigitalOutput pin17 ; public static GpioPinDigitalOutput pin18 ; public static GpioPinDigitalOutput pin27 ; public static void start ( ) { } public static void restart ( ) { } public static void shutLED ( int number ) { GpioHelper . pin17 . low ( ) ; if ( number > 1 ) { GpioHelper . pin18 . low ( ) ; } if ( number > 2 ) { GpioHelper . pin27 . low ( ) ; } new Thread ( new Runnable ( ) { @ Override public void run ( ) { try { Thread . sleep ( 2000 ) ; } catch ( InterruptedException ex ) { } finally { GpioHelper . restart ( ) ; } } <START_BUG> } ) . run ( ) ; <END_BUG> } }

Fix:
} ) . start ( ) ;
Buggy code:
public class CommonContainerExtension implements LoadableExtension { @ Override public void register ( ExtensionBuilder builder ) { <START_BUG> builder . service ( ApplicationArchiveProcessor . class , DelegatingApplicationArchiveProcessor . class ) ; <END_BUG> builder . service ( DeploymentExceptionTransformer . class , ExceptionTransformer . class ) ; } }

Fix:
builder . service ( ApplicationArchiveProcessor . class , OSGiApplicationArchiveProcessor . class ) ;
Buggy code:
public class ListChoice extends DropDownChoice { private static int defaultMaxRows = 8 ; private static final long serialVersionUID = 1227773600645861006L ; private int maxRows ; protected static int getDefaultMaxRows ( ) { } protected static void setDefaultMaxRows ( final int defaultMaxRows ) { } public ListChoice ( String name , final Collection values ) { } public ListChoice ( final String name , final Serializable object , final Collection values ) { } public ListChoice ( final String name , final Serializable object , final Collection values , final int maxRows ) { } public ListChoice ( final String name , final Serializable object , final String expression , final Collection values ) { } public ListChoice ( final String name , final Serializable object , final String expression , final Collection values , final int maxRows ) { } public final int getMaxRows ( ) { } public final ListChoice setMaxRows ( int maxRows ) { } protected final void onComponentTag ( final ComponentTag tag ) { super . onComponentTag ( tag ) ; <START_BUG> tag . put ( "size" , Math . min ( maxRows , getValues ( ) . size ( ) ) ) ; <END_BUG> } protected final boolean supportsPersistence ( ) { } }

Fix:
tag . put ( "size" , Math . min ( maxRows , getChoices ( ) . size ( ) ) ) ;
Buggy code:
public class Javadoc extends ASTNode { private String comment = "//**<seq2seq4repair_space>*//" ; Javadoc ( AST ast ) { } public int getNodeType ( ) { } ASTNode clone ( AST target ) { } public boolean subtreeMatch ( ASTMatcher matcher , Object other ) { } void accept0 ( ASTVisitor visitor ) { <START_BUG> boolean visitChildren = visitor . visit ( this ) ; <END_BUG> visitor . endVisit ( this ) ; } public String getComment ( ) { } public void setComment ( String javadocComment ) { } int memSize ( ) { } int treeSize ( ) { } }

Fix:
visitor . visit ( this ) ;
Buggy code:
@ Component public class DefaultVariantStoreService implements VariantStoreService , Initializable { @ Inject private Environment env ; private VariantStore variantStore ; @ Override public void initialize ( ) throws InitializationException { } @ Override public void stop ( ) { } @ Override public Future addIndividual ( String id , boolean isPublic , Path file ) throws VariantStoreException { } @ Override public Future removeIndividual ( String id ) throws VariantStoreException { } @ Override public JSONArray getTopHarmfullVariants ( String id , int n ) { } @ Override public Map < String , JSONArray > getIndividualsWithGene ( String geneSymbol , List < String > variantEffects , Map < String , Double > alleleFrequencies ) { } private JSONObject variantToJSON ( GAVariant rawV ) { JSONObject v = new JSONObject ( ) ; <START_BUG> v . put ( "pos" , rawV . getStart ( ) ) ; <END_BUG> v . put ( "ref" , rawV . getReferenceBases ( ) ) ; v . put ( "score" , Double . parseDouble ( rawV . getInfo ( ) . get ( "EXOMISER_VARIANT_SCORE" ) . get ( 0 ) ) ) ; v . put ( "chr" , rawV . getReferenceName ( ) ) ; v . put ( "effect" , rawV . getInfo ( ) . get ( "GENE_EFFECT" ) . get ( 0 ) ) ; v . put ( "alt" , rawV . getAlternateBases ( ) . get ( 0 ) ) ; v . put ( "geneSymbol" , rawV . getInfo ( ) . get ( "GENE" ) . get ( 0 ) ) ; return v ; } @ Override public Map < String , JSONArray > getIndividualsWithVariant ( String chr , int pos , String ref , String alt ) { } @ Override public List < String > getIndividuals ( ) { } }

Fix:
v . put ( "position" , rawV . getStart ( ) ) ;