nus-yam/ex-repair huggingface dataset:
Buggy code:
public class Main { public static void main ( String [ ] args ) { Application app ; String os = System . getProperty ( "os.name" ) . toLowerCase ( ) ; if ( os . startsWith ( "mac" ) ) { app = new DefaultOSXApplication ( ) ; } else if ( os . startsWith ( "win" ) ) { app = new DefaultSDIApplication ( ) ; } else { app = new DefaultSDIApplication ( ) ; } System . setProperty ( "apple.laf.useScreenMenuBar" , "true" ) ; System . setProperty ( "com.apple.mrj.application.apple.menu.about.name" , "TerraER" ) ; ResourceBundleUtil labels = ResourceBundleUtil . getLAFBundle ( "org.jhotdraw.app.Labels" ) ; DrawApplicationModel model = new DrawApplicationModel ( ) ; model . setName ( "TerraER" ) ; <START_BUG> model . setVersion ( "2.2" ) ; <END_BUG> model . setCopyright ( labels . getString ( "copyright" ) ) ; model . setProjectClassName ( "org.jhotdraw.samples.draw.TerraProject" ) ; app . setModel ( model ) ; app . launch ( args ) ; } }

Fix:
model . setVersion ( "2.21" ) ;
Buggy code:
public class DataSourceTestCase extends AbstractCliTestBase { private static String [ ] profileNames ; private static final String [ ] [ ] DS_PROPS = new String [ ] [ ] { new String [ ] { "idle-timeout-minutes" , "5" } } ; @ BeforeClass public static void before ( ) throws Exception { } @ AfterClass public static void after ( ) throws Exception { } @ Before public void init ( ) { <START_BUG> DataSourceTestCase . profileNames = serverProfiles . keySet ( ) . toArray ( new String [ ] { } ) ; <END_BUG> } @ Test public void testDataSource ( ) throws Exception { } @ Test public void testXaDataSource ( ) throws Exception { } private void testAddDataSource ( ) throws Exception { } private void testRemoveDataSource ( ) throws Exception { } private void testModifyDataSource ( ) throws Exception { } private void testAddXaDataSource ( ) throws Exception { } private void testModifyXaDataSource ( ) throws Exception { } private void testRemoveXaDataSource ( ) throws Exception { } }

Fix:
DataSourceTestCase . profileNames = serverProfiles . keySet ( ) . toArray ( new String [ serverProfiles . size ( ) ] ) ;
Buggy code:
public class CurveFragment extends Fragment { private LineChartView chart ; private LineChartData data ; private int numberOfLines = 1 ; private int maxNumberOfLines = 1 ; private int numberOfPoints = 120 ; float [ ] randomNumbersTab = new float [ numberOfPoints ] ; private boolean hasAxes = true ; private boolean hasAxesNames = true ; private boolean hasLines = true ; private boolean hasPoints = true ; private ValueShape shape = ValueShape . CIRCLE ; private boolean isFilled = false ; private boolean hasLabels = true ; private boolean isCubic = false ; private boolean hasLabelForSelected = false ; private ReactHighScoreDatabase db ; private IntentFilter mMessageIntentFilter ; private BroadcastReceiver mMessageUpdateReceiver = new BroadcastReceiver ( ) { @ Override public void onReceive ( Context context , Intent intent ) { } } ; @ Override public View onCreateView ( LayoutInflater inflater , ViewGroup container , Bundle savedInstanceState ) { } public void refresh ( ) { List < HighScoreEntry > entries = ReactHighScoreDatabase . getDatabase ( getActivity ( ) ) . getAllEntries ( ) ; List < Integer > rxtime = new ArrayList < Integer > ( ) ; List < Integer > days = new ArrayList < Integer > ( ) ; int i = 1 ; int highscore = 0 ; for ( HighScoreEntry entry : entries ) { int tmp = entry . getScore ( ) ; rxtime . add ( tmp ) ; if ( tmp > highscore ) { highscore = tmp ; } days . add ( ( i ++ ) ) ; } List < Line > lines = new ArrayList < Line > ( ) ; List < PointValue > values = new ArrayList < PointValue > ( ) ; for ( int j = 0 ; j < ( rxtime . size ( ) ) ; ++ j ) { values . add ( new PointValue ( ( j + 1 ) , rxtime . get ( j ) ) ) ; } Line line = new Line ( values ) ; line . setColor ( COLOR_GREEN ) ; line . setShape ( shape ) ; line . setCubic ( isCubic ) ; line . setFilled ( isFilled ) ; line . setHasLabels ( hasLabels ) ; line . setHasLabelsOnlyForSelected ( hasLabelForSelected ) ; line . setHasLines ( hasLines ) ; line . setHasPoints ( hasPoints ) ; lines . add ( line ) ; data = new LineChartData ( lines ) ; if ( hasAxes ) { Axis axisX = new Axis ( ) ; Axis axisY = new Axis ( ) . setHasLines ( true ) ; if ( hasAxesNames ) { axisX . setName ( "" ) ; <START_BUG> axisY . setName ( "React<seq2seq4repair_space>Time" ) ; <END_BUG> } data . setAxisXBottom ( axisX ) ; data . setAxisYLeft ( axisY ) ; } else { data . setAxisXBottom ( null ) ; data . setAxisYLeft ( null ) ; } data . setBaseValue ( Float . NEGATIVE_INFINITY ) ; chart . setLineChartData ( data ) ; chart . setZoomType ( HORIZONTAL ) ; } @ Override public void onResume ( ) { } @ Override public void onPause ( ) { } }

Fix:
axisY . setName ( "Reaction<seq2seq4repair_space>Time<seq2seq4repair_space>(in<seq2seq4repair_space>ms)" ) ;
Buggy code:
public class TestNorms extends LuceneTestCase { final String byteTestField = "normsTestByte" ; class CustomNormEncodingSimilarity extends DefaultSimilarity { @ Override public byte encodeNormValue ( float f ) { } @ Override public float decodeNormValue ( byte b ) { } @ Override public void computeNorm ( FieldInvertState state , Norm norm ) { } } public void testCustomEncoder ( ) throws Exception { Directory dir = newDirectory ( ) ; IndexWriterConfig config = newIndexWriterConfig ( TEST_VERSION_CURRENT , new org . apache . lucene . analysis . MockAnalyzer ( random ) ) ; config . setSimilarity ( new TestNorms . CustomNormEncodingSimilarity ( ) ) ; RandomIndexWriter writer = new RandomIndexWriter ( random , dir , config ) ; Document doc = new Document ( ) ; Field foo = newField ( "foo" , "" , TYPE_UNSTORED ) ; Field bar = newField ( "bar" , "" , TYPE_UNSTORED ) ; doc . add ( foo ) ; doc . add ( bar ) ; for ( int i = 0 ; i < 100 ; i ++ ) { <START_BUG> bar . setValue ( "singleton" ) ; <END_BUG> writer . addDocument ( doc ) ; } IndexReader reader = writer . getReader ( ) ; writer . close ( ) ; byte [ ] fooNorms = ( ( byte [ ] ) ( MultiDocValues . getNormDocValues ( reader , "foo" ) . getSource ( ) . getArray ( ) ) ) ; for ( int i = 0 ; i < ( reader . maxDoc ( ) ) ; i ++ ) assertEquals ( 0 , fooNorms [ i ] ) ; byte [ ] barNorms = ( ( byte [ ] ) ( MultiDocValues . getNormDocValues ( reader , "bar" ) . getSource ( ) . getArray ( ) ) ) ; for ( int i = 0 ; i < ( reader . maxDoc ( ) ) ; i ++ ) assertEquals ( 1 , barNorms [ i ] ) ; reader . close ( ) ; dir . close ( ) ; } public void testMaxByteNorms ( ) throws IOException { } public void testNormsNotPresent ( ) throws IOException { } public void buildIndex ( Directory dir , boolean writeNorms ) throws IOException , CorruptIndexException { } public class MySimProvider extends PerFieldSimilarityWrapper { Similarity delegate = new DefaultSimilarity ( ) ; private boolean writeNorms ; public MySimProvider ( boolean writeNorms ) { } @ Override public float queryNorm ( float sumOfSquaredWeights ) { } @ Override public Similarity get ( String field ) { } @ Override public float coord ( int overlap , int maxOverlap ) { } } public static class ByteEncodingBoostSimilarity extends DefaultSimilarity { private boolean writeNorms ; public ByteEncodingBoostSimilarity ( boolean writeNorms ) { } @ Override public void computeNorm ( FieldInvertState state , Norm norm ) { } } }

Fix:
bar . setStringValue ( "singleton" ) ;
Buggy code:
public class UpdateGeofencesTask extends GcmTaskService { private Realm mRealm ; private GoogleApiClient mApiClient ; @ Inject GeoRentingService mService ; @ Override public void onCreate ( ) { } @ Override public int onRunTask ( TaskParams taskParams ) { Log . i ( "Task" , "Initializing<seq2seq4repair_space>Google" ) ; mApiClient = new GoogleApiClient . Builder ( this ) . addApi ( API ) . build ( ) ; mApiClient . blockingConnect ( ) ; Log . i ( "Task" , "removing<seq2seq4repair_space>old<seq2seq4repair_space>Fences" ) ; mRealm = Realm . getDefaultInstance ( ) ; if ( ! ( removeOldGeofences ( getOldRequestIDs ( ) ) ) ) { mRealm . close ( ) ; return GcmNetworkManager . RESULT_FAILURE ; } removeAllFences ( ) ; List < GeoFence > remoteFences ; try { remoteFences = getRemoteGeoFences ( ) ; } catch ( IOException e ) { e . printStackTrace ( ) ; mRealm . close ( ) ; return GcmNetworkManager . RESULT_FAILURE ; } if ( remoteFences == null ) { mRealm . close ( ) ; return GcmNetworkManager . RESULT_FAILURE ; } Log . i ( "Task" , "Adding<seq2seq4repair_space>new<seq2seq4repair_space>Fences" ) ; List < Fence > fences = new ArrayList < > ( ) ; mRealm . beginTransaction ( ) ; for ( GeoFence remoteFence : remoteFences ) { Fence f = mRealm . createObject ( Fence . class ) ; f . setName ( remoteFence . name ) ; f . setLatitude ( remoteFence . centerLat ) ; f . setLongitude ( remoteFence . centerLon ) ; f . setRadius ( remoteFence . radius ) ; f . setId ( remoteFence . id ) ; fences . add ( f ) ; } List < Geofence > geofences = new ArrayList < > ( ) ; for ( int i = 0 ; i < ( fences . size ( ) ) ; i ++ ) { Fence f = fences . get ( i ) ; geofences . add ( createGeoFence ( f , i ) ) ; f . setGeofenceID ( ( i + "" ) ) ; } mRealm . commitTransaction ( ) ; <START_BUG> if ( ! ( addGeoFences ( geofences ) ) ) { <END_BUG> mRealm . close ( ) ; return GcmNetworkManager . RESULT_FAILURE ; } Log . i ( "Task" , "Done!" ) ; mRealm . close ( ) ; return GcmNetworkManager . RESULT_SUCCESS ; } private List < GeoFence > getRemoteGeoFences ( ) throws IOException { } private boolean addGeoFences ( List < Geofence > fences ) { } private void removeAllFences ( ) { } private boolean removeOldGeofences ( List < String > ids ) { } private List < String > getOldRequestIDs ( ) { } private Geofence createGeoFence ( Fence f , int id ) { } @ Override public void onInitializeTasks ( ) { } public static void initializeTasks ( Context ctx ) { } public static void removeTasks ( Context ctx ) { } }

Fix:
if ( ( ( geofences . size ( ) ) > 0 ) && ( ! ( addGeoFences ( geofences ) ) ) ) {
Buggy code:
public class Input extends Element { private int size ; private String name ; public int arrayId = - 1 ; public Input ( String stringVar , int intVar ) { } public int getSize ( ) { } public String getName ( ) { } public String getText ( ) { } public static void sync ( Stage stageVar ) { JPanel panelVar = getComponentPanel ( "input" ) ; if ( ( stageVar . getInputs ( ) ) == null ) return ; else panelVar . removeAll ( ) ; panelVar . setLayout ( new BoxLayout ( panelVar , BoxLayout . Y_AXIS ) ) ; for ( int i = 0 ; i < ( stageVar . getInputs ( ) . length ) ; i ++ ) { stageVar . getInputs ( ) [ i ] . arrayId = i ; JPanel temp = new JPanel ( ) ; temp . setLayout ( new FlowLayout ( FlowLayout . LEFT ) ) ; temp . add ( new JLabel ( ( ( stageVar . getInputs ( ) [ i ] . getName ( ) ) + ":<seq2seq4repair_space>" ) ) ) ; JTextField jT = new JTextField ( stageVar . getInputs ( ) [ i ] . getSize ( ) ) ; <START_BUG> temp . setMaximumSize ( new Dimension ( ( ( int ) ( panelVar . getWidth ( ) ) ) , ( ( ( int ) ( jT . getPreferredSize ( ) . getHeight ( ) ) ) + 10 ) ) ) ; <END_BUG> temp . add ( jT ) ; panelVar . add ( temp ) ; } panelVar . revalidate ( ) ; panelVar . repaint ( ) ; } }

Fix:
temp . setMaximumSize ( new Dimension ( Integer . MAX_VALUE , ( ( ( int ) ( jT . getPreferredSize ( ) . getHeight ( ) ) ) + 10 ) ) ) ;
Buggy code:
public class ReorderScale implements Feature { @ Override public double value ( Rule r , ArrayWritable mapReduceFeatures ) { <START_BUG> return ( ( int ) ( r . isStartingGlue ( ) ? 1 : 0 ) ) ; <END_BUG> } @ Override public double valueAsciiOovDeletion ( Rule r , ArrayWritable mapReduceFeatures ) { } @ Override public double valueGlue ( Rule r , ArrayWritable mapReduceFeatures ) { } }

Fix:
return 0 ;
Buggy code:
public abstract class AbstractMetamataTask extends AbstractTask { private Path m_classPath ; private Path m_sourcePath ; private File m_metamataHome ; private CommandlineJava m_cmdl = new CommandlineJava ( ) ; private ArrayList m_fileSets = new ArrayList ( ) ; private File m_optionsFile ; private Hashtable m_includedFiles ; public AbstractMetamataTask ( ) { } protected AbstractMetamataTask ( String className ) { } protected static final void addAllArrayList ( ArrayList dest , Iterator files ) { } protected static final File createTmpFile ( ) { } public void setMaxmemory ( String max ) { } public void setMetamatahome ( final File metamataHome ) { } public void addFileSet ( final FileSet fileSet ) { } public Path createClasspath ( ) { } public void addJvmarg ( final Argument argument ) { } public Path createSourcepath ( ) { } public void execute ( ) throws TaskException { } protected void setUp ( ) throws TaskException { } protected final File getMetamataJar ( File home ) { } protected Hashtable getFileMapping ( ) { } protected abstract ArrayList getOptions ( ) throws TaskException { } protected void validate ( ) throws TaskException { if ( ( ( m_metamataHome ) == null ) || ( ! ( m_metamataHome . exists ( ) ) ) ) { throw new TaskException ( "'metamatahome'<seq2seq4repair_space>must<seq2seq4repair_space>point<seq2seq4repair_space>to<seq2seq4repair_space>Metamata<seq2seq4repair_space>home<seq2seq4repair_space>directory." ) ; } <START_BUG> m_metamataHome = resolveFile ( m_metamataHome . getPath ( ) ) ; <END_BUG> File jar = getMetamataJar ( m_metamataHome ) ; if ( ! ( jar . exists ( ) ) ) { throw new TaskException ( ( jar + "<seq2seq4repair_space>does<seq2seq4repair_space>not<seq2seq4repair_space>exist.<seq2seq4repair_space>Check<seq2seq4repair_space>your<seq2seq4repair_space>metamata<seq2seq4repair_space>installation." ) ) ; } } protected void cleanUp ( ) throws TaskException { } protected void execute0 ( ) throws TaskException { } protected void generateOptionsFile ( File tofile , ArrayList options ) throws TaskException { } protected Hashtable scanFileSets ( ) throws TaskException { } protected ArrayList getFileSets ( ) { } protected Hashtable getIncludedFiles ( ) { } protected Path getClassPath ( ) { } protected void setClassPath ( Path classPath ) { } protected Path getSourcePath ( ) { } protected void setSourcePath ( Path sourcePath ) { } }

Fix:
m_metamataHome = getContext ( ) . resolveFile ( m_metamataHome . getPath ( ) ) ;
Buggy code:
public class IIDescManager { private static final Logger logger = LoggerFactory . getLogger ( IIDescManager . class ) ; private static final Serializer < IIDesc > II_DESC_SERIALIZER = new com . kylinolap . common . persistence . JsonSerializer < IIDesc > ( IIDesc . class ) ; private static final ConcurrentHashMap < KylinConfig , IIDescManager > CACHE = new ConcurrentHashMap < KylinConfig , IIDescManager > ( ) ; private KylinConfig config ; private SingleValueCache < String , IIDesc > iiDescMap = new SingleValueCache < String , IIDesc > ( TYPE . METADATA ) ; public static IIDescManager getInstance ( KylinConfig config ) { } public static void clearCache ( ) { } public static synchronized void removeInstance ( KylinConfig config ) { } private IIDescManager ( KylinConfig config ) throws IOException { } public IIDesc getIIDesc ( String name ) { <START_BUG> return iiDescMap . get ( name ) ; <END_BUG> } public IIDesc reloadIIDesc ( String name ) throws IOException { } private IIDesc loadIIDesc ( String path ) throws IOException { } public IIDesc createIIDesc ( IIDesc iiDesc ) throws IOException { } public void removeIIDesc ( IIDesc iiDesc ) throws IOException { } private void reloadAllIIDesc ( ) throws IOException { } public IIDesc updateIIDesc ( IIDesc desc ) throws IOException { } private MetadataManager getMetadataManager ( ) { } private ResourceStore getStore ( ) { } }

Fix:
return iiDescMap . get ( name . toUpperCase ( ) ) ;
Buggy code:
public class PhotoPickerPlusTutorialApp extends PhotoPickerPlusApp { final String APP_ID = "4f3c39ff38ecef0c89000003" ; final String APP_SECRET = "c9a8cb57c52f49384ab6117c4f6483a1a5c5a14c4a50d4cef276a9a13286efc9" ; @ Override public void onCreate ( ) { super . onCreate ( ) ; ALog . setDebugTag ( "PhotoPicker" ) ; ALog . setDebugLevel ( ALL ) ; Chute . init ( this , new AuthConstants ( APP_ID , APP_SECRET ) ) ; Map < AccountType , DisplayType > map = new HashMap < AccountType , DisplayType > ( ) ; map . put ( INSTAGRAM , LIST ) ; <START_BUG> PhotoPickerConfiguration config = new PhotoPickerConfiguration . Builder ( getApplicationContext ( ) ) . isMultiPicker ( true ) . defaultAccountDisplayType ( LIST ) . enableLogout ( true ) . accountList ( FLICKR , DROPBOX , INSTAGRAM , GOOGLE , YOUTUBE ) . localMediaList ( ALL_MEDIA , CAMERA_MEDIA , RECORD_VIDEO , LAST_VIDEO_CAPTURED ) . configUrl ( SERVICES_CONFIG_URL ) . supportImages ( true ) . supportVideos ( true ) . build ( ) ; <END_BUG> PhotoPicker . getInstance ( ) . init ( config ) ; } }

Fix:
PhotoPickerConfiguration config = new PhotoPickerConfiguration . Builder ( getApplicationContext ( ) ) . isMultiPicker ( false ) . defaultAccountDisplayType ( LIST ) . enableLogout ( true ) . accountList ( FLICKR , DROPBOX , INSTAGRAM , GOOGLE , YOUTUBE ) . localMediaList ( ALL_MEDIA , CAMERA_MEDIA , RECORD_VIDEO , LAST_VIDEO_CAPTURED ) . configUrl ( SERVICES_CONFIG_URL ) . supportImages ( true ) . supportVideos ( true ) . build ( ) ;
Buggy code:
public class Main { public static void main ( String [ ] args ) { } private String uploadsPath ; public void CallName ( ) { String root = "C://Warana" ; String classifirePath = "\\\\classifiers\\\\english.muc.7class.distsim.crf.ser.gz" ; HashMap < String , String > paths = new HashMap < > ( ) ; System . out . println ( root ) ; paths . put ( "root" , root ) ; paths . put ( "classifirePath" , classifirePath ) ; paths . put ( "listPath" , "\\gazeteerLists" ) ; Candidate candidate = new Candidate ( ) ; CandidateProfileGeneratorService generatorService = new CandidateProfileGeneratorServiceImpl ( ) ; CVParserService cvParserService = new CVParserServiceImpl ( paths ) ; <START_BUG> File cv = new File ( "C:\\Warana\\Docs\\CVs\\Dulanga<seq2seq4repair_space>Sashika.pdf" ) ; <END_BUG> generatorService . extractCVInformation ( cvParserService , cv ) ; generatorService . generateCandidateProfile ( candidate ) ; OnlineInfoExtractor onlineInfoExtractor = new OnlineInfoExtractor ( candidate ) ; } void Test ( ) { } }

Fix:
File cv = new File ( "C:\\Warana\\Docs\\CVs\\Andun_S_L_Gunawardana_WSO2_SE_CV.pdf" ) ;
Buggy code:
public class RemoveAnnotationFromTypeTest extends AbstractAnnotationTest { @ Override public String getPackageName ( ) { } @ Override public String getClassName ( ) { } @ Override public String getClassContents ( ) { } @ Override public Annotation getAnnotation ( ) { } public void testRemoveAnnotationFromType ( ) { try { assertNotNull ( annotation ) ; assertEquals ( WebService . class . getSimpleName ( ) , AnnotationUtils . getAnnotationName ( annotation ) ) ; assertTrue ( AnnotationUtils . isAnnotationPresent ( source , AnnotationUtils . getAnnotationName ( annotation ) ) ) ; assertNotNull ( source . getImport ( WebService . class . getCanonicalName ( ) ) ) ; textFileChange . addEdit ( AnnotationUtils . createRemoveAnnotationTextEdit ( source . findPrimaryType ( ) , annotation ) ) ; <START_BUG> textFileChange . addEdit ( AnnotationUtils . createRemoveImportTextEdit ( source . findPrimaryType ( ) , WebService . class ) ) ; <END_BUG> assertTrue ( executeChange ( new NullProgressMonitor ( ) , textFileChange ) ) ; assertFalse ( AnnotationUtils . isAnnotationPresent ( source , AnnotationUtils . getAnnotationName ( annotation ) ) ) ; assertFalse ( source . getImport ( WebService . class . getCanonicalName ( ) ) . exists ( ) ) ; } catch ( CoreException ce ) { fail ( ce . getLocalizedMessage ( ) ) ; } } }

Fix:
textFileChange . addEdit ( AnnotationUtils . createRemoveImportTextEdit ( source . findPrimaryType ( ) , WebService . class . getCanonicalName ( ) ) ) ;
Buggy code:
public class Argument extends LocalDeclaration { private static final char [ ] SET = "set" . toCharArray ( ) ; public Argument ( char [ ] name , long posNom , TypeReference tr , int modifiers ) { } public void bind ( MethodScope scope , TypeBinding typeBinding , boolean used ) { } public int getKind ( ) { } public boolean isVarArgs ( ) { } public StringBuffer print ( int indent , StringBuffer output ) { } public StringBuffer printStatement ( int indent , StringBuffer output ) { } public TypeBinding resolveForCatch ( BlockScope scope ) { TypeBinding exceptionType = this . type . resolveType ( scope , true ) ; if ( exceptionType == null ) return null ; <START_BUG> if ( ( exceptionType . isGenericType ( ) ) || ( exceptionType . isParameterizedType ( ) ) ) { <END_BUG> scope . problemReporter ( ) . invalidParameterizedExceptionType ( exceptionType , this ) ; return null ; } if ( exceptionType . isTypeVariable ( ) ) { scope . problemReporter ( ) . invalidTypeVariableAsException ( exceptionType , this ) ; return null ; } TypeBinding throwable = scope . getJavaLangThrowable ( ) ; if ( ! ( exceptionType . isCompatibleWith ( throwable ) ) ) { scope . problemReporter ( ) . typeMismatchError ( exceptionType , throwable , this ) ; return null ; } Binding existingVariable = scope . getBinding ( name , Binding . VARIABLE , this , false ) ; if ( ( existingVariable != null ) && ( existingVariable . isValidBinding ( ) ) ) { if ( ( existingVariable instanceof LocalVariableBinding ) && ( ( this . hiddenVariableDepth ) == 0 ) ) { scope . problemReporter ( ) . redefineArgument ( this ) ; return null ; } scope . problemReporter ( ) . localVariableHiding ( this , existingVariable , false ) ; } this . binding = new LocalVariableBinding ( this , exceptionType , modifiers , false ) ; ASTNode . resolveAnnotations ( scope , this . annotations , this . binding ) ; scope . addLocalVariable ( binding ) ; binding . setConstant ( NotAConstant ) ; return exceptionType ; } public void traverse ( ASTVisitor visitor , BlockScope scope ) { } }

Fix:
if ( ( exceptionType . isGenericType ( ) ) || ( exceptionType . isBoundParameterizedType ( ) ) ) {
Buggy code:
public class StatusMonitor { private static final Logger journal = Logger . getLogger ( StatusMonitor . class . getName ( ) ) ; private Collection < Module > modules ; private int refreshRate ; private boolean active ; private Thread thread ; private Coordinator coord ; public StatusMonitor ( int refreshRate , boolean active , Coordinator coord ) { } private void backgroundAgent ( ) { } public void attachModule ( Connector connector ) { Module module = null ; if ( connector instanceof FlexiantConnector ) { module = new org . cloudml . monitoring . status . modules . FlexiantModule ( ( ( FlexiantConnector ) ( connector ) ) , coord ) ; } else if ( connector instanceof OpenStackConnector ) { module = new org . cloudml . monitoring . status . modules . OpenStackModule ( ( ( OpenStackConnector ) ( connector ) ) , coord ) ; } else if ( connector instanceof JCloudsConnector ) { module = new org . cloudml . monitoring . status . modules . JCloudsModule ( ( ( JCloudsConnector ) ( connector ) ) , coord ) ; } else { System . out . println ( "error" ) ; } if ( module != null ) { synchronized ( modules ) { boolean contains = false ; for ( Module m : modules ) { if ( ( m . getType ( ) ) == ( module . getType ( ) ) ) { contains = true ; } } if ( ! contains ) { modules . add ( module ) ; } } <START_BUG> StatusMonitor . journal . log ( Level . INFO , ( "Module<seq2seq4repair_space>attached:<seq2seq4repair_space>" + ( module . getType ( ) ) ) ) ; <END_BUG> } } public void detachModule ( Module . Type type ) { } public void changeRate ( int refreshRateInSeconds ) { } public void pause ( ) { } public void start ( ) { } public void stop ( ) { } }

Fix:
StatusMonitor . journal . log ( Level . INFO , ( ">><seq2seq4repair_space>Module<seq2seq4repair_space>attached:<seq2seq4repair_space>" + ( module . getType ( ) ) ) ) ;
Buggy code:
public class postfix { public static KeyValuePair [ ] userVars = new KeyValuePair [ 1 ] ; public static int userVarCounter = 0 ; public static void main ( String [ ] args ) { } public static void evaluate ( Scanner input ) { } public static int factorial ( int n ) { } public static int defineVariable ( String inputVar ) { String userTemp ; int userVar ; if ( postfix . alreadyExists ( inputVar ) ) return postfix . getExisting ( inputVar ) ; else { postfix . ensureCapacity ( ) ; while ( true ) { System . out . print ( ( ( "Enter<seq2seq4repair_space>the<seq2seq4repair_space>value<seq2seq4repair_space>of<seq2seq4repair_space>" + inputVar ) + "<seq2seq4repair_space>><seq2seq4repair_space>" ) ) ; Scanner userIn = new Scanner ( System . in ) ; userTemp = userIn . nextLine ( ) ; if ( userTemp . matches ( "\\d+|-\\d+" ) ) { userVar = Integer . parseInt ( userTemp ) ; postfix . userVars [ postfix . userVarCounter ] = new KeyValuePair ( inputVar , userVar ) ; ( postfix . userVarCounter ) ++ ; return userVar ; } else { System . out . println ( "That<seq2seq4repair_space>was<seq2seq4repair_space>not<seq2seq4repair_space>a<seq2seq4repair_space>valad<seq2seq4repair_space>input" ) ; <START_BUG> System . out . println ( "" ) ; <END_BUG> } } } } public static boolean alreadyExists ( String inputVar ) { } public static int getExisting ( String inputVar ) { } public static void ensureCapacity ( ) { } public static final Pattern VARIABLE = Pattern . compile ( "value|[a-z]" ) ; public static final Pattern OPERATOR = Pattern . compile ( "[^\\w^\\s]{1,2}|_|\\^" ) ; }

Fix:
System . out . println ( "Please<seq2seq4repair_space>enter<seq2seq4repair_space>an<seq2seq4repair_space>integer" ) ;
Buggy code:
public abstract class AbstractTextComponent extends FormComponent { public AbstractTextComponent ( String id ) { } AbstractTextComponent ( final String id , final IModel model ) { } public final boolean getConvertEmptyInputStringToNull ( ) { } public boolean isInputNullable ( ) { } public final FormComponent setConvertEmptyInputStringToNull ( boolean flag ) { } protected final boolean supportsPersistence ( ) { } protected Object convertValue ( String value ) throws ConversionException { if ( ( getConvertEmptyInputStringToNull ( ) ) && ( Strings . isEmpty ( value ) ) ) { return null ; } <START_BUG> return value ; <END_BUG> } }

Fix:
return super . convertValue ( value ) ;
Buggy code:
public class ComponentObjectFactory extends ServiceReferenceObjectFactory { @ SuppressWarnings ( "unchecked" ) public Object getObjectInstance ( Object serviceValue , Object obj , Name name , Context nameCtx , Hashtable < ? , ? > environment ) throws Exception { final Component component = ( ( Component ) ( serviceValue ) ) ; <START_BUG> return component . createProxy ( ) ; <END_BUG> } }

Fix:
return component . getInstance ( ) . createLocalClientProxy ( ) ;
Buggy code:
public class TouchMessage { private static ICompactSerializer < TouchMessage > serializer_ ; static ICompactSerializer < TouchMessage > serializer ( ) { } public static Message makeTouchMessage ( TouchMessage touchMessage ) throws IOException { ByteArrayOutputStream bos = new ByteArrayOutputStream ( ) ; DataOutputStream dos = new DataOutputStream ( bos ) ; TouchMessage . serializer ( ) . serialize ( touchMessage , dos ) ; <START_BUG> Message message = new Message ( StorageService . getLocalStorageEndPoint ( ) , StorageService . readStage_ , StorageService . touchVerbHandler_ , new Object [ ] { bos . toByteArray ( ) } ) ; <END_BUG> return message ; } @ XmlElement ( name = "Table" ) private String table_ ; @ XmlElement ( name = "Key" ) private String key_ ; @ XmlElement ( name = "fData" ) private boolean fData_ = true ; private TouchMessage ( ) { } public TouchMessage ( String table , String key ) { } public TouchMessage ( String table , String key , boolean fData ) { } String table ( ) { } String key ( ) { } public boolean isData ( ) { } }

Fix:
Message message = new Message ( StorageService . getLocalStorageEndPoint ( ) , StorageService . readStage_ , StorageService . touchVerbHandler_ , bos . toByteArray ( ) ) ;
Buggy code:
@ RunWith ( Parameterized . class ) public class SubsystemParsingTestCase extends ClusteringSubsystemTest { String xmlFile = null ; int operations = 0 ; public SubsystemParsingTestCase ( String xmlFile , int operations ) { } @ Parameters public static Collection < Object [ ] > data ( ) { } @ Override protected ValidationConfiguration getModelValidationConfiguration ( ) { } @ Test public void testParseSubsystem ( ) throws Exception { } @ Test public void testInstallIntoController ( ) throws Exception { } private void checkLegacyParserStatisticsTrue ( ModelNode subsystem ) { if ( ( ( ( ( xmlFile . endsWith ( "1_0.xml" ) ) || ( xmlFile . endsWith ( "1_1.xml" ) ) ) || ( xmlFile . endsWith ( "1_2.xml" ) ) ) || ( xmlFile . endsWith ( "1_3.xml" ) ) ) || ( xmlFile . endsWith ( "1_4.xml" ) ) ) { <START_BUG> for ( Property containerProp : subsystem . get ( CONTAINER_PATH . getKey ( ) ) . asPropertyList ( ) ) { <END_BUG> Assert . assertTrue ( ( "cache-container=" + ( containerProp . getName ( ) ) ) , containerProp . getValue ( ) . get ( STATISTICS_ENABLED . getName ( ) ) . asBoolean ( ) ) ; for ( String key : containerProp . getValue ( ) . keys ( ) ) { if ( ( key . endsWith ( "-cache" ) ) && ( ! ( key . equals ( "default-cache" ) ) ) ) { ModelNode caches = containerProp . getValue ( ) . get ( key ) ; if ( caches . isDefined ( ) ) { for ( Property cacheProp : caches . asPropertyList ( ) ) { Assert . assertTrue ( ( ( ( ( ( "cache-container=" + ( containerProp . getName ( ) ) ) + "," ) + key ) + "=" ) + ( cacheProp . getName ( ) ) ) , containerProp . getValue ( ) . get ( CacheResourceDefinition . STATISTICS_ENABLED . getName ( ) ) . asBoolean ( ) ) ; } } } } } } } @ Test public void testParseAndMarshalModel ( ) throws Exception { } @ Test public void testDescribeHandler ( ) throws Exception { } }

Fix:
for ( Property containerProp : subsystem . get ( WILDCARD_PATH . getKey ( ) ) . asPropertyList ( ) ) {
Buggy code:
public final class RoleManager implements IRoleManager { private Map activityBindingsByRoleId = new HashMap ( ) ; private Set definedRoleIds = new HashSet ( ) ; private Map roleDefinitionsById = new HashMap ( ) ; private IRoleManagerEvent roleManagerEvent ; private List roleManagerListeners ; private IRoleRegistry roleRegistry ; private Map rolesById = new HashMap ( ) ; public RoleManager ( ) { } public RoleManager ( IRoleRegistry roleRegistry ) { } public void addRoleManagerListener ( IRoleManagerListener roleManagerListener ) { } public IRole getRole ( String roleId ) { } public Set getDefinedRoleIds ( ) { } public void removeRoleManagerListener ( IRoleManagerListener roleManagerListener ) { } private void fireRoleManagerChanged ( ) { if ( ( roleManagerListeners ) != null ) for ( int i = 0 ; i < ( roleManagerListeners . size ( ) ) ; i ++ ) { if ( ( roleManagerEvent ) == null ) <START_BUG> roleManagerEvent = new RoleManagerEvent ( this ) ; <END_BUG> ( ( IRoleManagerListener ) ( roleManagerListeners . get ( i ) ) ) . roleManagerChanged ( roleManagerEvent ) ; } } private void notifyRoles ( Collection roleIds ) { } private void readRegistry ( ) { } private boolean updateRole ( Role role ) { } private Collection updateRoles ( Collection roleIds ) { } }

Fix:
roleManagerEvent = new RoleManagerEvent ( this , false ) ;
Buggy code:
public class JSBodyGenerator implements Generator { @ Override public void generate ( GeneratorContext context , SourceWriter writer , MethodReference methodRef ) throws IOException { ClassReader cls = context . getClassSource ( ) . get ( methodRef . getClassName ( ) ) ; MethodReader method = cls . getMethod ( methodRef . getDescriptor ( ) ) ; AnnotationReader annot = method . getAnnotations ( ) . get ( JSBodyImpl . class . getName ( ) ) ; boolean isStatic = annot . getValue ( "isStatic" ) . getBoolean ( ) ; List < AnnotationValue > paramNames = annot . getValue ( "params" ) . getList ( ) ; int bodyParamCount = method . parameterCount ( ) ; int offset = ( isStatic ) ? 1 : 0 ; writer . append ( "if<seq2seq4repair_space>(!" ) . appendMethodBody ( methodRef ) . append ( ".$native)" ) . ws ( ) . append ( '{' ) . indent ( ) . newLine ( ) ; writer . appendMethodBody ( methodRef ) . append ( ".$native" ) . ws ( ) . append ( '=' ) . ws ( ) . append ( "function(" ) ; int count = ( method . parameterCount ( ) ) + ( isStatic ? 0 : 1 ) ; for ( int i = 0 ; i < count ; ++ i ) { if ( i > 0 ) { writer . append ( ',' ) . ws ( ) ; } writer . append ( '_' ) . append ( context . getParameterName ( ( i + offset ) ) ) ; } writer . append ( ')' ) . ws ( ) . append ( '{' ) . softNewLine ( ) . indent ( ) ; writer . append ( "return<seq2seq4repair_space>(function(" ) ; for ( int i = 0 ; i < bodyParamCount ; ++ i ) { if ( i > 0 ) { writer . append ( ',' ) . ws ( ) ; } String name = paramNames . get ( i ) . getString ( ) ; writer . append ( name ) ; } writer . append ( ')' ) . ws ( ) . append ( '{' ) . softNewLine ( ) . indent ( ) ; writer . append ( annot . getValue ( "script" ) . getString ( ) ) . softNewLine ( ) ; writer . outdent ( ) . append ( "})" ) ; if ( ! isStatic ) { writer . append ( ".call" ) ; } writer . append ( '(' ) ; for ( int i = 0 ; i < count ; ++ i ) { if ( i > 0 ) { writer . append ( ',' ) . ws ( ) ; } writer . append ( '_' ) . append ( context . getParameterName ( ( i + offset ) ) ) ; } writer . append ( ");" ) . softNewLine ( ) ; writer . outdent ( ) . append ( "};" ) . softNewLine ( ) ; writer . appendMethodBody ( methodRef ) . ws ( ) . append ( '=' ) . ws ( ) . appendMethodBody ( methodRef ) . append ( ".$native;" ) . softNewLine ( ) ; writer . outdent ( ) . append ( "}" ) . softNewLine ( ) ; <START_BUG> writer . appendMethodBody ( methodRef ) . append ( '(' ) ; <END_BUG> for ( int i = 0 ; i < count ; ++ i ) { if ( i > 0 ) { writer . append ( ',' ) . ws ( ) ; } writer . append ( context . getParameterName ( ( i + offset ) ) ) ; } writer . append ( ");" ) . softNewLine ( ) ; } }

Fix:
writer . append ( "return<seq2seq4repair_space>" ) . appendMethodBody ( methodRef ) . append ( '(' ) ;
Buggy code:
public abstract class EditableCellPanel < M , I , P > extends Panel { private static final long serialVersionUID = 1L ; private final AbstractColumn < M , I > column ; public EditableCellPanel ( String id , AbstractColumn < M , I > column , IModel < I > rowModel ) { } public AbstractColumn < M , I > getColumn ( ) { } @ Override protected void onBeforeRender ( ) { super . onBeforeRender ( ) ; AjaxRequestTarget target = AjaxRequestTarget . get ( ) ; Component textField = EditableCellPanel . get ( "textfield" ) ; <START_BUG> if ( ( target != null ) && ( EditableCellPanel . isFocusComponent ( ) ) ) { <END_BUG> target . focusComponent ( textField ) ; } } protected boolean isFocusTextField ( ) { } protected IModel < I > getDefaultRowModel ( ) { } @ Override public boolean isVisible ( ) { } protected abstract FormComponent < P > getEditComponent ( ) { } No newline ; at end ; of file ; }

Fix:
if ( ( target != null ) && ( isFocusTextField ( ) ) ) {
Buggy code:
public class ActionNewSignalEvent extends ActionNewEvent { public static ActionNewSignalEvent SINGLETON = new ActionNewSignalEvent ( ) ; protected ActionNewSignalEvent ( ) { } protected Object createEvent ( ) { <START_BUG> return StateMachinesFactory . getFactory ( ) . createSignalEvent ( ) ; <END_BUG> } }

Fix:
return StateMachinesFactory . getFactory ( ) . buildSignalEvent ( ) ;
Buggy code:
public class JasperMangler implements Mangler { public JasperMangler ( String workDir , String docBase , String jspFile ) { } public String getClassName ( ) { } public String getJavaFileName ( ) { } public String getPackageName ( ) { } public String getClassFileName ( ) { } public String getJspFile ( ) { } public String getClassDir ( ) { } public String getServletClassName ( ) { } public int getVersion ( ) { } public String getBaseClassName ( ) { } public String getPackageDir ( ) { } public String getJspFilePath ( ) { if ( ( jspFilePath ) == null ) <START_BUG> jspFilePath = FileUtil . safePath ( docBase , jspFile ) ; <END_BUG> return jspFilePath ; } private String fixInvalidChars ( String className ) { } private static final String mangleChar ( char ch ) { } private void init ( ) { } private void updateVersionPaths ( ) { } public void nextVersion ( ) { } private String jspFile ; private String jspFilePath = null ; private int version ; private String workDir ; private String docBase ; private String pkgDir ; private String baseClassN ; private String classDir ; private String javaFileName ; private String classFileName ; }

Fix:
jspFilePath = FileUtil . safePath ( docBase , jspFile , false ) ;
Buggy code:
@ Stateless public class ApplicationDAO extends GenericDAO < Application , Long > implements ApplicationDAOLocal { @ PersistenceContext EntityManager em ; @ EJB private ApiKeyDAOLocal apikeyDAO ; @ Override public void assignApplicationToAccount ( Application app , Account acc ) { } @ Override public long numberOfApplicationsManaged ( ) { } @ Override public void assignApplicationToEndUser ( Application application , EndUser endUser ) { } @ Override public List < Application > applicationsOfAnAccountWithEndUsersNumber ( Account account ) { } @ Override public long nbEndUsersOfApplication ( Application application ) { } @ Override public void enableApplication ( Application app ) throws GamificationDomainEntityNotFoundException { } @ Override public void disableApplication ( Application app ) throws GamificationDomainEntityNotFoundException { } @ Override public List < EndUser > findEndUsersAndPaginate ( Application app , int index , int limit ) throws GamificationDomainEntityNotFoundException { <START_BUG> return em . createNamedQuery ( "Application.findEndUsers" ) . setParameter ( "idApplication" , app . getId ( ) ) . setFirstResult ( index ) . setMaxResults ( limit ) . getResultList ( ) ; <END_BUG> } No newline ; at end ; of file ; }

Fix:
return em . createNamedQuery ( "Application.findEndUsers" ) . setParameter ( "idApplication" , app . getId ( ) ) . setFirstResult ( ( index * limit ) ) . setMaxResults ( limit ) . getResultList ( ) ;
Buggy code:
public class ChatWindow extends ApplicationWindow implements IMessageViewer { protected static final String ICONS_PERSON_GIF = "icons//person.gif" ; private static final long FLASH_INTERVAL = 600 ; private String initText ; private TextChatComposite chat ; private Image image ; private Image blank ; private boolean flashing ; private String titleBarText ; protected ViewPart view ; protected IUser localUser ; protected IUser remoteUser ; protected boolean disposed = false ; protected Thread flashThread = null ; protected IUser getLocalUser ( ) { } protected IUser getRemoteUser ( ) { } private final Runnable flipImage = new Runnable ( ) { public void run ( ) { } } ; private final Runnable showImageRunnable = new Runnable ( ) { public void run ( ) { } } ; private ChatWindow . Flash flash ; private class Flash implements Runnable { private final Display display ; public Flash ( Display display ) { } public void run ( ) { } } public ChatWindow ( ViewPart view , String titleBarText , String initOutputText , IUser localUser , IUser remoteUser ) { } public void setStatus ( final String status ) { } protected String getShellName ( ) { } protected void configureShell ( final Shell newShell ) { } protected Control createContents ( Composite parent ) { } public void setLocalUser ( IUser localUser ) { } public void setRemoteUser ( IUser remoteUser ) { } protected TextChatComposite getTextChatComposite ( ) { } private boolean hasFocus = false ; private int openResult = 0 ; public int open ( ) { } public void create ( ) { } public boolean hasFocus ( ) { } private boolean hasFocus ( Composite composite ) { } public void flash ( ) { } private void stopFlashing ( ) { } public void setDisposed ( final String message ) { } public void openAndFlash ( ) { } protected void handleShellCloseEvent ( ) { if ( ! ( getShell ( ) . isDisposed ( ) ) ) { <START_BUG> if ( ! ( disposed ) ) { <END_BUG> chat . dispose ( ) ; chat = null ; getShell ( ) . dispose ( ) ; } else { getShell ( ) . setVisible ( false ) ; } } } public void showMessage ( final ID fromID , ID toID , Type type , String subject , final String message ) { } }

Fix:
if ( disposed ) {
Buggy code:
public class DatabaseTest extends ApplicationTestCase < Application > { private DBAccessHelper db = null ; public DatabaseTest ( ) { } protected void setUp ( ) throws Exception { } public void testDBAccesHelperObject ( ) { } public void testCountTracks ( ) { } public void testOrderOfGetTracksMethod ( ) { } public void testCountOfActivitiesOfTrack ( ) { } public void testTypeOfActivityOfTrack ( ) { Activity a = db . getTracks ( ) . get ( 0 ) . getActivities ( ) . get ( 0 ) ; <START_BUG> assertEquals ( RUNNING . toString ( ) , a . getType ( ) . toString ( ) ) ; <END_BUG> } public void testCountOfCoordinatesOfActivity ( ) { } public void testGetUnknownActivity ( ) { } public void testGetUnknownCoordinate ( ) { } public void testClosestCoordinate ( ) { } public void testInsertTrack ( ) { } public void testInsertTrackWhichAlreadyExists ( ) { } public void testInsertActivityWithNoTrack ( ) { } public void testInsertActivityWithErrorInCoordinate ( ) { } public void testInsertActivity ( ) { } public void testUpdateTrack ( ) { } public void testDeleteActivity ( ) { } public void testDeleteTrack ( ) { } No newline ; at end ; of file ; }

Fix:
assertEquals ( CYCLING . toString ( ) , a . getType ( ) . toString ( ) ) ;
Buggy code:
public abstract class AbstractEvaluationHandler extends AbstractEnabledHandler { private static final String PROP_ENABLED = "enabled" ; private IEvaluationService evaluationService ; private IPropertyChangeListener enablementListener ; private IEvaluationReference enablementRef ; protected IEvaluationService getEvaluationService ( ) { } protected void registerEnablement ( ) { <START_BUG> enablementRef = getEvaluationService ( ) . addEvaluationListener ( getEnabledWhenExpression ( ) , getEnablementListener ( ) , AbstractEvaluationHandler . PROP_ENABLED ) ; <END_BUG> } protected abstract Expression getEnabledWhenExpression ( ) { } private IPropertyChangeListener getEnablementListener ( ) { } public void dispose ( ) { } }

Fix:
enablementRef = getEvaluationService ( ) . addEvaluationListener ( getEnabledWhenExpression ( ) , getEnablementListener ( ) , AbstractEvaluationHandler . PROP_ENABLED , null ) ;
Buggy code:
public final class JSONBoardImport { private static JSONParser parser = new JSONParser ( ) ; private static RiskBoard board = new RiskBoard ( ) ; private static Map < String , List < String > > storedConnections = new HashMap < String , List < String > > ( ) ; private JSONBoardImport ( String fileName ) { } public static RiskBoard newBoard ( String fileName ) { <START_BUG> return JSONBoardImport . createBoard ( fileName , TRUE ) ; <END_BUG> } private static RiskBoard createBoard ( String fileName , boolean newBoard ) { } private static void parseTerritory ( JSONObject ter ) { } public static void saveGame ( RiskBoard board , String fileName ) { } public static RiskBoard loadGame ( String fileName ) { } }

Fix:
return JSONBoardImport . createBoard ( fileName , true ) ;
Buggy code:
public class Argument extends LocalDeclaration { public Argument ( char [ ] name , long posNom , TypeReference tr , int modifiers ) { } public void bind ( MethodScope scope , TypeBinding typeBinding , boolean used ) { if ( ( this . type ) != null ) this . type . binding = typeBinding ; int modifierFlag = this . modifiers ; if ( ( this . binding = scope . duplicateName ( this . name ) ) != null ) { scope . problemReporter ( ) . redefineArgument ( this ) ; } else { scope . addLocalVariable ( ( this . binding = new LocalVariableBinding ( this , typeBinding , modifierFlag , true ) ) ) ; if ( ( typeBinding != null ) && ( isTypeUseDeprecated ( typeBinding , scope ) ) ) scope . problemReporter ( ) . deprecatedType ( typeBinding , this . type ) ; this . binding . declaration = this ; <START_BUG> this . binding . used = used ; <END_BUG> } } public TypeBinding resolveForCatch ( BlockScope scope ) { } public String toString ( int tab ) { } public void traverse ( IAbstractSyntaxTreeVisitor visitor , BlockScope scope ) { } }

Fix:
this . binding . useFlag = ( used ) ? LocalVariableBinding . USED : LocalVariableBinding . UNUSED ;
Buggy code:
public class SSQDepart implements Event < SingleServerQueue > { @ Override public final void invoke ( SingleServerQueue simulation ) { double time = simulation . getTime ( ) ; simulation . setLength ( ( ( simulation . getLength ( ) ) - 1 ) ) ; <START_BUG> System . out . println ( ( ( ( "Departure<seq2seq4repair_space>at:<seq2seq4repair_space>" + time ) + ",<seq2seq4repair_space>new<seq2seq4repair_space>population<seq2seq4repair_space>=<seq2seq4repair_space>" ) + ( simulation . getLength ( ) ) ) ) ; <END_BUG> if ( ( simulation . getLength ( ) ) > 0 ) { simulation . schedule ( new SSQDepart ( ) , ( time + ( SingleServerQueue . SERVICETIME ) ) ) ; } } }

Fix:
System . out . println ( ( ( ( "Departure<seq2seq4repair_space>at<seq2seq4repair_space>" + time ) + ",<seq2seq4repair_space>new<seq2seq4repair_space>population<seq2seq4repair_space>=<seq2seq4repair_space>" ) + ( simulation . getLength ( ) ) ) ) ;
Buggy code:
public abstract class Connector implements IConnector { private String className = "" ; private String connString = "" ; private String errorMessage = "" ; private int errorCode = 0 ; private List < String > columns = new ArrayList < String > ( ) ; private ObservableList < Row > rows = FXCollections . observableArrayList ( ) ; private Properties properties = new Properties ( ) ; @ Override public String getClassName ( ) { } @ Override public void setClassName ( String className ) { } @ Override public String getConnString ( ) { } @ Override public void setConnString ( String connString ) { } @ Override public List < String > getColumns ( ) { } @ Override public ObservableList < Row > getRows ( ) { } @ Override public String getErrorMessage ( ) { } @ Override public int getErrorCode ( ) { } @ Override public void setProperties ( Properties properties ) { } @ Override public boolean executeQuery ( String query ) { columns . clear ( ) ; rows . clear ( ) ; try ( Connection conn = DriverManager . getConnection ( getConnString ( ) , properties ) ; Statement stmt = conn . createStatement ( ) ; ResultSet rs = stmt . executeQuery ( query ) ) { ResultSetMetaData rmd = rs . getMetaData ( ) ; int size = rmd . getColumnCount ( ) ; for ( int i = 0 ; i < size ; i ++ ) <START_BUG> getColumns ( ) . add ( rmd . getColumnLabel ( ( i + 1 ) ) ) ; <END_BUG> while ( rs . next ( ) ) { Row row = new Row ( ) ; for ( int i = 0 ; i < size ; i ++ ) row . setData ( i , rs . getString ( ( i + 1 ) ) ) ; rows . add ( row ) ; } } catch ( SQLException e ) { errorMessage = e . getMessage ( ) ; errorCode = e . getErrorCode ( ) ; return false ; } return true ; } }

Fix:
columns . add ( rmd . getColumnLabel ( ( i + 1 ) ) ) ;