nus-yam/ex-repair huggingface dataset:
Buggy code:
public class HelloHostApplication implements IDistributionConstants , IApplication { private static final String DEFAULT_CONTAINER_TYPE = "ecf.r_osgi.peer" ; public static final String DEFAULT_CONTAINER_ID = "r-osgi:////localhost:9278" ; private BundleContext bundleContext ; private String containerType = HelloHostApplication . DEFAULT_CONTAINER_TYPE ; private String containerId = HelloHostApplication . DEFAULT_CONTAINER_ID ; private final Object appLock = new Object ( ) ; private boolean done = false ; private ServiceRegistration helloRegistration ; public Object start ( IApplicationContext appContext ) throws Exception { } public void stop ( ) { if ( ( helloRegistration ) != null ) { helloRegistration . unregister ( ) ; helloRegistration = null ; } bundleContext = null ; synchronized ( appLock ) { done = true ; <START_BUG> notifyAll ( ) ; <END_BUG> } } private void processArgs ( IApplicationContext appContext ) { } private void waitForDone ( ) { } }

Fix:
appLock . notifyAll ( ) ;
Buggy code:
public class TextAreaEditor extends PropertyEditorSupport implements FocusListener , PropertyChangeListener { private RSyntaxTextArea textUI ; private RTextScrollPane scroller ; private Properties languageProperties ; @ Override public void focusGained ( FocusEvent e ) { } @ Override public void focusLost ( FocusEvent e ) { } private final void init ( ) { } public TextAreaEditor ( ) { } public TextAreaEditor ( Object source ) { } @ Override public String getAsText ( ) { } @ Override public Component getCustomEditor ( ) { } @ Override public void setAsText ( String text ) throws IllegalArgumentException { } @ Override public void setValue ( Object value ) { } @ Override public Object getValue ( ) { } @ Override public boolean supportsCustomEditor ( ) { } @ Override public void propertyChange ( PropertyChangeEvent evt ) { Object source = evt . getSource ( ) ; <START_BUG> if ( ( source instanceof ComboStringEditor ) && ( source != null ) ) { <END_BUG> ComboStringEditor cse = ( ( ComboStringEditor ) ( source ) ) ; String lang = cse . getAsText ( ) . toLowerCase ( ) ; if ( languageProperties . containsKey ( lang ) ) { textUI . setSyntaxEditingStyle ( languageProperties . getProperty ( lang ) ) ; } else { textUI . setSyntaxEditingStyle ( SYNTAX_STYLE_NONE ) ; } } } }

Fix:
if ( source instanceof ComboStringEditor ) {
Buggy code:
public class CSVIngestUtils { public enum MonthsJanToDec { JAN , FEB , MAR , APR , MAY , JUN , JUL , AUG , SEP , OCT , NOV , DEC ; } public static Integer getDecad ( String month , Integer decadInMonth ) throws CSVProcessException { } public static Integer getDecad ( DecMonth month , Integer decadInMonth ) throws CSVProcessException { } public static Integer getDecadJanDec ( String month , Integer decadInMonth ) throws CSVProcessException { } public static DecMonth getDecMonth ( String month ) throws CSVProcessException { } public static Double getDoubleValue ( String doubleString , boolean emptyFieldsAsZero ) throws CSVProcessException { } public static Integer getIntegerValue ( String integerString , boolean emptyFieldsAsZero ) throws CSVProcessException { } public static Double parseDouble ( String numberToParse ) throws ParseException { char separator = '.' ; <START_BUG> if ( ( numberToParse . split ( "," ) . length ) > 0 ) { <END_BUG> separator = ',' ; } DecimalFormatSymbols symbols = new DecimalFormatSymbols ( ) ; symbols . setDecimalSeparator ( separator ) ; DecimalFormat format = new DecimalFormat ( "#.#" ) ; format . setMinimumFractionDigits ( 0 ) ; format . setDecimalFormatSymbols ( symbols ) ; return format . parse ( numberToParse ) . doubleValue ( ) ; } public static Object parse ( String origin , CSVPropertyType type , boolean emptyFieldsAsZero ) throws Exception { } }

Fix:
if ( ( numberToParse . split ( "," ) . length ) > 1 ) {
Buggy code:
public class StatisticalSampleResult extends SampleResult implements Serializable { private static final long serialVersionUID = 24L ; private int errorCount ; public StatisticalSampleResult ( ) { } @ Deprecated public StatisticalSampleResult ( long stamp , long elapsed ) { } public StatisticalSampleResult ( SampleResult res ) { } public void add ( SampleResult res ) { } @ Override public long getTime ( ) { } @ Override public long getTimeStamp ( ) { } @ Override public int getErrorCount ( ) { } @ Override public void setErrorCount ( int e ) { } public static String getKey ( SampleEvent event ) { <START_BUG> StringBuffer sb = new StringBuffer ( 80 ) ; <END_BUG> sb . append ( event . getResult ( ) . getSampleLabel ( ) ) . append ( "-" ) . append ( event . getThreadGroup ( ) ) ; return sb . toString ( ) ; } }

Fix:
StringBuilder sb = new StringBuilder ( 80 ) ;
Buggy code:
public class SourceDbBenchmarkTest { public static final Logger LOGGER = LoggerFactory . getLogger ( "benchmarkSourceDbScrolling" ) ; public static final int NUMBER_OF_FILES = 1000 ; public static final int NUMBER_OF_LINES = 3220 ; public static final String PROJECT_UUID = Uuids . create ( ) ; @ Rule public DbTester dbTester = new DbTester ( ) ; @ Rule public Benchmark benchmark = new Benchmark ( ) ; @ Test public void benchmark ( ) throws Exception { } private void scrollRows ( ) throws SQLException { SourceDbBenchmarkTest . LOGGER . info ( "Scroll<seq2seq4repair_space>table<seq2seq4repair_space>FILE_SOURCES" ) ; DbClient dbClient = new DbClient ( dbTester . database ( ) , dbTester . myBatis ( ) ) ; Connection connection = dbTester . openConnection ( ) ; AtomicLong counter = new AtomicLong ( ) ; ProgressTask progress = new ProgressTask ( SourceDbBenchmarkTest . LOGGER , "source<seq2seq4repair_space>file" , counter ) ; Timer timer = new Timer ( "SourceDbScroll" ) ; timer . schedule ( progress , PERIOD_MS , PERIOD_MS ) ; try { long start = System . currentTimeMillis ( ) ; SourceLineResultSetIterator it = SourceLineResultSetIterator . create ( dbClient , connection , 0L ) ; while ( it . hasNext ( ) ) { SourceLineResultSetIterator . SourceFile row = it . next ( ) ; assertThat ( row . getLines ( ) . size ( ) ) . isEqualTo ( SourceDbBenchmarkTest . NUMBER_OF_LINES ) ; assertThat ( row . getFileUuid ( ) ) . isNotEmpty ( ) ; counter . incrementAndGet ( ) ; } long end = System . currentTimeMillis ( ) ; long period = end - start ; long throughputPerSecond = ( 1000L * ( counter . get ( ) ) ) // period ; SourceDbBenchmarkTest . LOGGER . info ( String . format ( "%d<seq2seq4repair_space>FILE_SOURCES<seq2seq4repair_space>rows<seq2seq4repair_space>scrolled<seq2seq4repair_space>in<seq2seq4repair_space>%d<seq2seq4repair_space>ms<seq2seq4repair_space>(%d<seq2seq4repair_space>rows//second)" , counter . get ( ) , period , throughputPerSecond ) ) ; <START_BUG> benchmark . expectAround ( "Throughput<seq2seq4repair_space>to<seq2seq4repair_space>scroll<seq2seq4repair_space>FILE_SOURCES" , throughputPerSecond , 120 , 0.04 ) ; <END_BUG> } finally { DbUtils . closeQuietly ( connection ) ; timer . cancel ( ) ; } } private void prepareTable ( ) throws IOException { } private FileSourceDto generateDto ( ) throws IOException { } private byte [ ] generateData ( ) throws IOException { } }

Fix:
benchmark . expectAround ( "Throughput<seq2seq4repair_space>to<seq2seq4repair_space>scroll<seq2seq4repair_space>FILE_SOURCES" , throughputPerSecond , 120 , 0.08 ) ;
Buggy code:
public class MediaPlayerHandler { MediaPlayer mp ; boolean running = false ; boolean prepared = false ; String current_path ; String current_title ; String current_album ; String current_artist ; public MediaPlayerHandler ( ) { } public void initialize ( String filePath ) { } public void initialize ( ) { stopPlayback ( ) ; mp = new MediaPlayer ( ) ; File song = new File ( current_path ) ; AudioFile f ; try { <START_BUG> f = AudioFileIO . read ( song ) ; <END_BUG> Tag tag = f . getTag ( ) ; current_artist = tag . getFirstArtist ( ) ; current_album = tag . getFirstAlbum ( ) ; current_title = tag . getFirstTitle ( ) ; mp . reset ( ) ; mp . setAudioStreamType ( STREAM_MUSIC ) ; mp . setDataSource ( current_path ) ; mp . prepareAsync ( ) ; mp . setOnPreparedListener ( new MediaPlayer . OnPreparedListener ( ) { public void onPrepared ( MediaPlayer arg0 ) { prepared = true ; } } ) ; mp . setOnCompletionListener ( new MediaPlayer . OnCompletionListener ( ) { public void onCompletion ( MediaPlayer arg0 ) { mp . stop ( ) ; prepared = false ; mp . release ( ) ; } } ) ; } catch ( Exception e ) { } } public void startPlayback ( ) { } public void stopPlayback ( ) { } public void pausePlayback ( ) { } public boolean isPlaying ( ) { } public void seekPlayback ( int seekto ) { } public int getCurrentPosition ( ) { } public int getDuration ( ) { } }

Fix:
f = LibraryOperations . readAudioFileReadOnly ( song ) ;
Buggy code:
public class MethodInfo extends ClassFileStruct implements Comparable , AttributeNamesConstants , IBinaryMethod { private static final char [ ] [ ] noException = CharOperation . NO_CHAR_CHAR ; private int accessFlags ; private int attributeBytes ; private int [ ] constantPoolOffsets ; private char [ ] descriptor ; private char [ ] [ ] exceptionNames ; private char [ ] name ; private char [ ] signature ; private int signatureUtf8Offset ; private long tagBits ; public MethodInfo ( byte [ ] classFileBytes , int [ ] offsets , int offset ) { } public int compareTo ( Object o ) { } private int decodeAnnotation ( int offset ) { } private int decodeElementValue ( int offset ) { int readOffset = offset ; int tag = u1At ( readOffset ) ; readOffset ++ ; switch ( tag ) { case 'B' : case 'C' : case 'D' : case 'F' : case 'I' : case 'J' : case 'S' : case 'Z' : case 's' : readOffset += 2 ; break ; case 'e' : readOffset += 4 ; break ; case 'c' : readOffset += 2 ; break ; case '@' : <START_BUG> readOffset += decodeAnnotation ( readOffset ) ; <END_BUG> break ; case '[' : int numberOfValues = u2At ( readOffset ) ; readOffset += 2 ; for ( int i = 0 ; i < numberOfValues ; i ++ ) { readOffset = decodeElementValue ( readOffset ) ; } break ; } return readOffset ; } private void decodeStandardAnnotations ( int offset ) { } public char [ ] [ ] getArgumentNames ( ) { } public char [ ] [ ] getExceptionTypeNames ( ) { } public char [ ] getGenericSignature ( ) { } public char [ ] getMethodDescriptor ( ) { } public int getModifiers ( ) { } public char [ ] getSelector ( ) { } public long getTagBits ( ) { } void initialize ( ) { } public boolean isClinit ( ) { } public boolean isConstructor ( ) { } public boolean isSynthetic ( ) { } private void readExceptionAttributes ( ) { } private void readModifierRelatedAttributes ( ) { } protected void reset ( ) { } public int sizeInBytes ( ) { } public String toString ( ) { } }

Fix:
readOffset = decodeAnnotation ( readOffset ) ;
Buggy code:
public class GuiMarket extends GuiContainer { private static final ResourceLocation gui = new ResourceLocation ( "harvestcraft:textures//gui//market.png" ) ; private GuiButton left ; private GuiButton right ; private GuiButton button_buy ; private int itemNum ; private ItemStack buySlot ; private TileEntityMarket tileEntityMarket ; private EntityPlayer player ; public GuiMarket ( InventoryPlayer inventoryplayer , TileEntityMarket tileEntityMarket ) { } @ Override public void initGui ( ) { } @ Override protected void actionPerformed ( GuiButton guibutton ) { if ( ! ( guibutton . enabled ) ) { return ; } if ( ( guibutton . id ) == 0 ) { ( itemNum ) -- ; if ( ( itemNum ) < 0 ) { itemNum = ( MarketItems . getSize ( ) ) - 1 ; } this . tileEntityMarket . setBrowsingInfo ( itemNum ) ; } if ( ( guibutton . id ) == 1 ) { ( itemNum ) ++ ; if ( ( itemNum ) > ( ( MarketItems . getSize ( ) ) - 1 ) ) { itemNum = 0 ; } this . tileEntityMarket . setBrowsingInfo ( itemNum ) ; } if ( ( guibutton . id ) == 2 ) { this . buySlot = this . tileEntityMarket . getStackInSlot ( 0 ) ; if ( ( buySlot ) != null ) { MarketData data = MarketItems . getData ( itemNum ) ; if ( ( buySlot . getItem ( ) ) == ( data . getCurrency ( ) . getItem ( ) ) ) { <START_BUG> if ( ( buySlot . getItemDamage ( ) ) == ( data . getItem ( ) . getItemDamage ( ) ) ) { <END_BUG> int price = data . getPrice ( ) ; if ( ( buySlot . stackSize ) == price ) { INSTANCE . sendToServer ( new MessageMarketBuy ( this . itemNum , this . tileEntityMarket . xCoord , this . tileEntityMarket . yCoord , this . tileEntityMarket . zCoord , true ) ) ; } else if ( ( ( buySlot . stackSize ) > price ) && ( ( buySlot . stackSize ) > 1 ) ) { INSTANCE . sendToServer ( new MessageMarketBuy ( this . itemNum , this . tileEntityMarket . xCoord , this . tileEntityMarket . yCoord , this . tileEntityMarket . zCoord , false ) ) ; } if ( ( ( buySlot . stackSize ) == 0 ) && ( price == 1 ) ) { INSTANCE . sendToServer ( new MessageMarketBuy ( this . itemNum , this . tileEntityMarket . xCoord , this . tileEntityMarket . yCoord , this . tileEntityMarket . zCoord , true ) ) ; } } } } } } @ Override public void onGuiClosed ( ) { } protected void drawGuiContainerForegroundLayer ( int par1 , int par2 ) { } public void drawScreen ( int par1 , int par2 , float par3 ) { } protected void drawGuiContainerBackgroundLayer ( float f , int i , int j ) { } No newline ; at end ; of file ; }

Fix:
if ( ( buySlot . getItemDamage ( ) ) == ( data . getCurrency ( ) . getItemDamage ( ) ) ) {
Buggy code:
public final class StoredList extends AbstractList { private static final int TEMPORARY_LIST_ID = 0 ; public static final StoredList TEMPORARY_LIST = new StoredList ( StoredList . TEMPORARY_LIST_ID , "<temporary>" , 0 ) ; public static final int STANDARD_LIST_ID = 1 ; private final int count ; public StoredList ( final int id , final String title , final int count ) { } @ Override public String getTitleAndCount ( ) { } @ Override public int hashCode ( ) { } @ Override public boolean equals ( final Object obj ) { } public static class UserInterface { private final WeakReference < Activity > activityRef ; private final CgeoApplication app ; private final Resources res ; public UserInterface ( @ NonNull final Activity activity ) { } public void promptForListSelection ( final int titleId , @ NonNull final Action1 < Integer > runAfterwards , final boolean onlyConcreteLists , final int exceptListId ) { } public void promptForListSelection ( final int titleId , @ NonNull final Action1 < Integer > runAfterwards , final boolean onlyConcreteLists , final int exceptListId , @ NonNull final ListNameMemento listNameMemento ) { } public static List < AbstractList > getMenuLists ( final boolean onlyConcreteLists , final int exceptListId ) { final List < AbstractList > lists = new ArrayList < > ( ) ; lists . addAll ( StoredList . UserInterface . getSortedLists ( ) ) ; <START_BUG> if ( exceptListId > ( StoredList . TEMPORARY_LIST . id ) ) { <END_BUG> final StoredList exceptList = DataStore . getList ( exceptListId ) ; lists . remove ( exceptList ) ; } if ( ! onlyConcreteLists ) { if ( exceptListId != ( ALL_LIST . id ) ) { lists . add ( ALL_LIST ) ; } if ( exceptListId != ( HISTORY_LIST . id ) ) { lists . add ( HISTORY_LIST ) ; } } if ( exceptListId != ( NEW_LIST . id ) ) { lists . add ( NEW_LIST ) ; } return lists ; } @ NonNull private static List < StoredList > getSortedLists ( ) { } public void promptForListCreation ( @ NonNull final Action1 < Integer > runAfterwards , final String newListName ) { } private void handleListNameInput ( final String defaultValue , final int dialogTitle , final int buttonTitle , final Action1 < String > runnable ) { } public void promptForListRename ( final int listId , @ NonNull final Runnable runAfterRename ) { } } @ Override public String getTitle ( ) { } @ Override public int getNumberOfCaches ( ) { } public static int getConcreteList ( final int listId ) { } @ Override public boolean isConcrete ( ) { } }

Fix:
if ( ( exceptListId == ( StoredList . STANDARD_LIST_ID ) ) || ( exceptListId >= ( DataStore . customListIdOffset ) ) ) {
Buggy code:
public class StartService { private static final Logger LOG = LoggerFactory . getLogger ( StartService . class ) ; private static final String SERVICE_NAME = "Recommendation<seq2seq4repair_space>Service" ; private static final int DEFAULT_EXECUTOR_THREAD_POOL_SIZE = 2 ; private static final int SERVER_PORT = 9009 ; private static final DataSource dataSource = new CqEngineDataSource ( ) ; public static void main ( String [ ] args ) { StartService . LOG . info ( "Starting<seq2seq4repair_space>Application" ) ; String filePath = "//home//vishnu//projects//ml-sample//ml-sample//src//main//resources//dataSource//arduino.stackexchange.com//Posts.xml" ; <START_BUG> LoadFile . processFile ( filePath , StartService . dataSource ) ; <END_BUG> StartService . LOG . info ( ( "<seq2seq4repair_space>posts<seq2seq4repair_space>for<seq2seq4repair_space>arduino<seq2seq4repair_space>" + ( StartService . dataSource . getPostsForTag ( "arduino" ) . size ( ) ) ) ) ; RestExpress server = null ; try { server = StartService . initializeServer ( args ) ; StartService . LOG . info ( "Awaiting<seq2seq4repair_space>Server<seq2seq4repair_space>Shutdown<seq2seq4repair_space>......." ) ; server . awaitShutdown ( ) ; StartService . LOG . info ( "Server<seq2seq4repair_space>Is<seq2seq4repair_space>Shutting<seq2seq4repair_space>Down<seq2seq4repair_space>......." ) ; } catch ( IOException e ) { StartService . LOG . info ( e . getMessage ( ) ) ; } } public static RestExpress initializeServer ( String [ ] args ) throws IOException { } }

Fix:
LoadFile . processPostsFile ( filePath , StartService . dataSource ) ;
Buggy code:
public class BindingGroupAddHandler extends AbstractSocketBindingGroupAddHandler { public static ModelNode getOperation ( ModelNode address , ModelNode model ) { } public static final BindingGroupAddHandler INSTANCE = new BindingGroupAddHandler ( ) ; private BindingGroupAddHandler ( ) { } @ Override protected void populateModel ( ModelNode operation , ModelNode model ) throws OperationFailedException { } @ Override protected void performRuntime ( OperationContext context , ModelNode operation , ModelNode model , ServiceVerificationHandler verificationHandler , List < ServiceController < ? > > newControllers ) throws OperationFailedException { int portOffset = PORT_OFFSET . resolveModelAttribute ( context , model ) . asInt ( ) ; String defaultInterface = DEFAULT_INTERFACE . resolveModelAttribute ( context , model ) . asString ( ) ; SocketBindingManagerService service = new SocketBindingManagerService ( portOffset ) ; final ServiceTarget serviceTarget = context . getServiceTarget ( ) ; <START_BUG> newControllers . add ( serviceTarget . addService ( SOCKET_BINDING_MANAGER , service ) . setInitialMode ( ON_DEMAND ) . addDependency ( JBOSS_NETWORK_INTERFACE . append ( defaultInterface ) , NetworkInterfaceBinding . class , service . getDefaultInterfaceBinding ( ) ) . addListener ( verificationHandler ) . install ( ) ) ; <END_BUG> } }

Fix:
newControllers . add ( serviceTarget . addService ( SOCKET_BINDING_MANAGER , service ) . setInitialMode ( ON_DEMAND ) . addDependency ( JBOSS_NETWORK_INTERFACE . append ( defaultInterface ) , NetworkInterfaceBinding . class , service . getDefaultInterfaceBindingInjector ( ) ) . addListener ( verificationHandler ) . install ( ) ) ;
Buggy code:
public class UnsuccessfulWithDataPointFields { @ RunWith ( Theories . class ) public static class HasATheory { public static int ONE = 1 ; @ Theory public void everythingIsZero ( int x ) { } } @ Test public void theoryClassMethodsShowUp ( ) throws Exception { } @ Test public void theoryAnnotationsAreRetained ( ) throws Exception { } @ Test public void canRunTheories ( ) throws Exception { } @ RunWith ( Theories . class ) public static class DoesntUseParams { public static int ONE = 1 ; @ Theory public void everythingIsZero ( int x , int y ) { } } @ Test public void reportBadParams ( ) throws Exception { <START_BUG> Assert . assertThat ( testResult ( UnsuccessfulWithDataPointFields . DoesntUseParams . class ) , hasSingleFailureContaining ( "everythingIsZero(1,<seq2seq4repair_space>1)" ) ) ; <END_BUG> } @ RunWith ( Theories . class ) public static class NullsOK { public static String NULL = null ; public static String A = "A" ; @ Theory public void everythingIsA ( String a ) { } } @ Test public void nullsUsedUnlessProhibited ( ) throws Exception { } @ RunWith ( Theories . class ) public static class DataPointsMustBeStatic { @ DataPoint int THREE = 3 ; @ DataPoint int FOUR = 3 ; @ Theory public void numbers ( int x ) { } } @ Test public void dataPointsMustBeStatic ( ) { } }

Fix:
Assert . assertThat ( testResult ( UnsuccessfulWithDataPointFields . DoesntUseParams . class ) , hasSingleFailureContaining ( "everythingIsZero(ONE,<seq2seq4repair_space>ONE)" ) ) ;
Buggy code:
public class RomTree extends JTree implements MouseListener { private static final long serialVersionUID = 1630446543383498886L ; public RomTree ( DefaultMutableTreeNode input ) { } public ECUEditor getEditor ( ) { } @ Override public void mouseClicked ( MouseEvent e ) { try { <START_BUG> Object selectedRow = getLastSelectedPathComponent ( ) ; <END_BUG> if ( selectedRow == null ) { return ; } if ( ( ( e . getClickCount ( ) ) >= ( SettingsManager . getSettings ( ) . getTableClickCount ( ) ) ) && ( selectedRow instanceof TableTreeNode ) ) { showTable ( selectedRow ) ; } setLastSelectedRom ( selectedRow ) ; } catch ( NullPointerException ex ) { } } private void showTable ( Object selectedRow ) { } private void setLastSelectedRom ( Object selectedNode ) { } private Rom getRomNode ( Object currentNode ) { } @ Override public void mousePressed ( MouseEvent e ) { } @ Override public void mouseReleased ( MouseEvent e ) { } @ Override public void mouseEntered ( MouseEvent e ) { } @ Override public void mouseExited ( MouseEvent e ) { } No newline ; at end ; of file ; }

Fix:
Object selectedRow = getPathForLocation ( e . getX ( ) , e . getY ( ) ) . getLastPathComponent ( ) ;
Buggy code:
public enum State { LABYRINTH ( ) { @ Override protected List < BaseBehaviour > getBehaviourList ( BehaviourController controller ) { } } , LINEFOLLOW ( ) { @ Override protected List < BaseBehaviour > getBehaviourList ( BehaviourController controller ) { } } , CHRISTMASTREE ( ) { @ Override protected List < BaseBehaviour > getBehaviourList ( BehaviourController controller ) { } } ; private final BehaviourController controller ; private final Arbitrator arbitrator ; private State ( ) { } protected Config getConfig ( ) { } protected List < BaseBehaviour > toList ( BaseBehaviour ... behaviours ) { } protected abstract List < BaseBehaviour > getBehaviourList ( BehaviourController controller ) { } public void start ( ) { } public void startOnly ( ) { } private void startNextState ( ) { } private State nextState ( ) { } public static String [ ] getMenuItems ( ) { State [ ] states = State . values ( ) ; String [ ] menuItems = new String [ ( states . length ) + 1 ] ; for ( int i = 0 ; i < ( states . length ) ; i ++ ) { <START_BUG> menuItems [ i ] = states . toString ( ) ; <END_BUG> } menuItems [ states . length ] = "EXIT" ; return menuItems ; } }

Fix:
menuItems [ i ] = states [ i ] . toString ( ) ;
Buggy code:
public class GitHubImporterProvider implements ITransientMetricProvider { public static final String IDENTIFIER = "org.ossmeter.metricprovider.trans.githubimporter" ; protected OssmeterLogger logger ; protected MetricProviderContext context ; public GitHubImporterProvider ( ) { } protected List < IMetricProvider > uses ; @ Override public String getIdentifier ( ) { } @ Override public String getShortIdentifier ( ) { } @ Override public String getFriendlyName ( ) { } @ Override public String getSummaryInformation ( ) { } @ Override public boolean appliesTo ( Project project ) { } @ Override public void setUses ( List < IMetricProvider > uses ) { } @ Override public List < String > getIdentifiersOfUses ( ) { } @ Override public void setMetricProviderContext ( MetricProviderContext context ) { } @ Override public PongoDB adapt ( DB db ) { } @ Override public void measure ( Project project , ProjectDelta delta , PongoDB db ) { GitHubRepository ep = null ; GitHubImporter epi = new GitHubImporter ( ) ; Platform platform = Platform . getInstance ( ) ; try { <START_BUG> ep = epi . importRepository ( ( ( GitHubRepository ) ( project ) ) . getFull_name ( ) , platform ) ; <END_BUG> if ( ep == null ) { if ( ( project . getExecutionInformation ( ) ) == null ) project . setExecutionInformation ( new ProjectExecutionInformation ( ) ) ; project . getExecutionInformation ( ) . setInErrorState ( false ) ; } } catch ( WrongUrlException e ) { if ( ( project . getExecutionInformation ( ) ) == null ) project . setExecutionInformation ( new ProjectExecutionInformation ( ) ) ; project . getExecutionInformation ( ) . setInErrorState ( true ) ; } } }

Fix:
ep = epi . importProject ( ( ( GitHubRepository ) ( project ) ) . getFull_name ( ) , platform ) ;
Buggy code:
public class Canvas extends Composite { Caret caret ; Canvas ( ) { } public Canvas ( Composite parent , int style ) { } public Caret getCaret ( ) { } Point getIMCaretPos ( ) { } int gtk_expose_event ( int widget , int event ) { } int gtk_focus_in_event ( int widget , int event ) { } int gtk_focus_out_event ( int widget , int event ) { } void redrawWidget ( int x , int y , int width , int height , boolean all ) { } void releaseCildren ( boolean destroy ) { if ( ( caret ) != null ) { <START_BUG> caret . releaseChildren ( false ) ; <END_BUG> caret = null ; } super . releaseChildren ( destroy ) ; } public void scroll ( int destX , int destY , int x , int y , int width , int height , boolean all ) { } int setBounds ( int x , int y , int width , int height , boolean move , boolean resize ) { } public void setCaret ( Caret caret ) { } public void setFont ( Font font ) { } void updateCaret ( ) { } }

Fix:
caret . release ( false ) ;
Buggy code:
public class MenuButton extends TextBox { private static boolean wasPressed ; Interaction interaction ; public MenuButton ( Font font , String text , int xPos , int yPos , int width , int height , Interaction interaction ) { } @ Override public void render ( ) { updateBounds ( ) ; if ( ( ! ( MenuButton . wasPressed ) ) && ( isMouseDownInside ( ) ) ) { interaction . interact ( ) ; MenuButton . wasPressed = true ; } if ( ! ( isMouseDown ( ) ) ) MenuButton . wasPressed = false ; context . fill ( ( isHovered ( ) ? 50 : 150 ) , 200 ) ; <START_BUG> context . rect ( xPos , yPos , width , height , 7 ) ; <END_BUG> super . render ( ) ; } }

Fix:
context . rect ( ( ( int ) ( xPos ) ) , ( ( int ) ( yPos ) ) , ( ( int ) ( width ) ) , ( ( int ) ( height ) ) , 7 ) ;
Buggy code:
public class ModelReferenceAdapter extends DefaultBlockAdapter { @ Override public Block getBlock ( Importer traverser ) { } @ Override public void process ( Importer traverser , SimulinkReference parentSimRef , Block blockToProcess ) { } private SimulinkModel traverseReferencedModel ( final Importer traverser , String modelReferenceFQN , MatlabCommandFactory commandFactory , ImportMode importMode ) throws SimulinkApiException { String referencedModelName ; ModelObject referencedModel ; SimulinkModel actualReferredModel ; MatlabCommand getReferencedModelName = commandFactory . getParam ( ) . addParam ( modelReferenceFQN ) . addParam ( "ModelName" ) ; referencedModelName = MatlabString . getMatlabStringData ( getReferencedModelName . execute ( ) ) ; referencedModelName = handleSpecialCharacters ( referencedModelName ) ; Map < String , SimulinkModel > modelRegistry = traverser . getReferencedModels ( ) ; if ( ( modelRegistry . get ( referencedModelName ) ) != null ) { return modelRegistry . get ( referencedModelName ) ; } referencedModel = new ModelObject ( referencedModelName , commandFactory . getCommandEvaluator ( ) ) ; Importer referencedModelTraverser = new Importer ( referencedModel ) ; <START_BUG> referencedModelTraverser . addFilters ( traverser . getFilters ( ) ) ; <END_BUG> referencedModelTraverser . getReferencedModels ( ) . putAll ( modelRegistry ) ; referencedModelTraverser . traverseAndCreateEMFModel ( importMode ) ; actualReferredModel = referencedModelTraverser . getSimulinkModel ( ) ; modelRegistry . putAll ( referencedModelTraverser . getReferencedModels ( ) ) ; modelRegistry . put ( actualReferredModel . getSimulinkRef ( ) . getFQN ( ) , actualReferredModel ) ; return actualReferredModel ; } private String handleSpecialCharacters ( String referencedModelName ) { } }

Fix:
referencedModelTraverser . registerFilters ( traverser . getFilters ( ) ) ;
Buggy code:
public class PackageTest extends TestCase { private static PropertyResourceBundle defaultPRB ; private PropertyResourceBundle getRAS ( String res ) throws Exception { } private static Object [ ] DUMMY_PARAMS = new Object [ ] { "1" , "2" , "3" , "4" , "5" , "6" , "7" , "8" , "9" } ; private int readRF ( String res , List l ) throws Exception { } private static String getResName ( String lang ) { } private void check ( String resname ) throws Exception { } private void check ( String resname , boolean checkUnexpected ) throws Exception { ArrayList alf = new ArrayList ( 500 ) ; String res = PackageTest . getResName ( resname ) ; subTestFailures += readRF ( res , alf ) ; Collections . sort ( alf ) ; String last = "" ; for ( int i = 0 ; i < ( alf . size ( ) ) ; i ++ ) { String curr = ( ( String ) ( alf . get ( i ) ) ) ; if ( curr . equals ( last ) ) { ( subTestFailures ) ++ ; System . out . println ( ( ( ( "\nDuplicate<seq2seq4repair_space>key<seq2seq4repair_space>=" + curr ) + "<seq2seq4repair_space>in<seq2seq4repair_space>" ) + res ) ) ; } last = curr ; } if ( ( resname . length ( ) ) == 0 ) { PackageTest . defaultPRB = getRAS ( res ) ; } else if ( checkUnexpected ) { PropertyResourceBundle prb = getRAS ( res ) ; Enumeration enumr = prb . getKeys ( ) ; while ( enumr . hasMoreElements ( ) ) { String key = null ; try { key = ( ( String ) ( enumr . nextElement ( ) ) ) ; String val = PackageTest . defaultPRB . getString ( key ) ; <START_BUG> if ( val . equals ( prb . getString ( key ) ) ) { <END_BUG> System . out . println ( ( ( ( "Possible<seq2seq4repair_space>duplicate<seq2seq4repair_space>value<seq2seq4repair_space>for<seq2seq4repair_space>" + key ) + "<seq2seq4repair_space>in<seq2seq4repair_space>" ) + res ) ) ; ( subTestFailures ) ++ ; } } catch ( MissingResourceException e ) { ( subTestFailures ) ++ ; System . out . println ( ( ( ( "Locale:<seq2seq4repair_space>" + resname ) + "<seq2seq4repair_space>has<seq2seq4repair_space>unexpected<seq2seq4repair_space>key:<seq2seq4repair_space>" ) + key ) ) ; } } } if ( ( subTestFailures ) > 0 ) { fail ( "One<seq2seq4repair_space>or<seq2seq4repair_space>more<seq2seq4repair_space>subtests<seq2seq4repair_space>failed" ) ; } } public static Test suite ( ) { } private int subTestFailures ; public PackageTest ( String string ) { } public void atestDE ( ) throws Exception { } public void atestJA ( ) throws Exception { } public void atestzh_CN ( ) throws Exception { } public void atestzh_TW ( ) throws Exception { } public void atestNO ( ) throws Exception { } public void atestFR ( ) throws Exception { } public void atestES ( ) throws Exception { } public void atestDefault ( ) throws Exception { } }

Fix:
if ( ( ! ( resname . equalsIgnoreCase ( "de" ) ) ) && ( val . equals ( prb . getString ( key ) ) ) ) {
Buggy code:
public class RandomizedQueue < Item > implements Iterable < Item > { private Item [ ] array ; private int size ; @ SuppressWarnings ( "unchecked" ) public RandomizedQueue ( ) { } public boolean isEmpty ( ) { } public int size ( ) { } public void enqueue ( Item item ) { } public Item dequeue ( ) { } public Item sample ( ) { } public Iterator < Item > iterator ( ) { } @ SuppressWarnings ( "unchecked" ) private void resize ( int capacity ) { assert capacity >= ( this . size ) ; Item [ ] aux = ( ( Item [ ] ) ( new Object [ capacity ] ) ) ; for ( int i = 0 ; i < ( this . size ) ; i ++ ) { <START_BUG> aux [ i ] = this . array [ 1 ] ; <END_BUG> } this . array = aux ; } public static void main ( String [ ] args ) { } private class ArrayIterator implements Iterator < Item > { private int current = 0 ; public void remove ( ) { } @ Override public boolean hasNext ( ) { } @ Override public Item next ( ) { } } No newline ; at end ; of file ; }

Fix:
aux [ i ] = this . array [ i ] ;
Buggy code:
public class FileBasedSpellChecker extends AbstractLuceneSpellChecker { private static final Logger log = Logger . getLogger ( FileBasedSpellChecker . class . getName ( ) ) ; public static final String FIELD_TYPE = "fieldType" ; public static final String SOURCE_FILE_CHAR_ENCODING = "characterEncoding" ; private String fieldTypeName ; private String characterEncoding ; public static final String WORD_FIELD_NAME = "word" ; public String init ( NamedList config , SolrResourceLoader loader ) { } public void build ( SolrCore core ) { } @ Override protected IndexReader determineReader ( IndexReader reader ) { } @ SuppressWarnings ( "unchecked" ) private void loadExternalFileDictionary ( IndexSchema schema , SolrResourceLoader loader ) { IndexSearcher searcher = null ; try { if ( ( ( fieldTypeName ) != null ) && ( ( schema . getFieldTypeNoEx ( fieldTypeName ) ) != null ) ) { FieldType fieldType = schema . getFieldTypes ( ) . get ( fieldTypeName ) ; RAMDirectory ramDir = new RAMDirectory ( ) ; IndexWriter writer = new IndexWriter ( ramDir , fieldType . getAnalyzer ( ) , true , MaxFieldLength . UNLIMITED ) ; writer . setMergeFactor ( 300 ) ; writer . setMaxBufferedDocs ( 150 ) ; List < String > lines = loader . getLines ( sourceLocation , characterEncoding ) ; for ( String s : lines ) { Document d = new Document ( ) ; d . add ( new org . apache . lucene . document . Field ( FileBasedSpellChecker . WORD_FIELD_NAME , s , Store . NO , Index . TOKENIZED ) ) ; writer . addDocument ( d ) ; } writer . optimize ( ) ; writer . close ( ) ; dictionary = new org . apache . solr . util . HighFrequencyDictionary ( IndexReader . open ( ramDir ) , FileBasedSpellChecker . WORD_FIELD_NAME , 0.0F ) ; analyzer = fieldType . getQueryAnalyzer ( ) ; } else { <START_BUG> FileBasedSpellChecker . log . warning ( ( ( ( "No<seq2seq4repair_space>fieldType:<seq2seq4repair_space>" + ( fieldTypeName ) ) + "<seq2seq4repair_space>found<seq2seq4repair_space>for<seq2seq4repair_space>dictionary:<seq2seq4repair_space>" ) + ( name ) ) ) ; <END_BUG> analyzer = new WhitespaceAnalyzer ( ) ; if ( ( characterEncoding ) == null ) { dictionary = new PlainTextDictionary ( loader . openResource ( sourceLocation ) ) ; } else { dictionary = new PlainTextDictionary ( new InputStreamReader ( loader . openResource ( sourceLocation ) , characterEncoding ) ) ; } } } catch ( IOException e ) { FileBasedSpellChecker . log . log ( Level . SEVERE , "Unable<seq2seq4repair_space>to<seq2seq4repair_space>load<seq2seq4repair_space>spellings" , e ) ; } finally { try { if ( searcher != null ) searcher . close ( ) ; } catch ( IOException e ) { } } } }

Fix:
FileBasedSpellChecker . log . warning ( ( ( ( ( "No<seq2seq4repair_space>fieldType:<seq2seq4repair_space>" + ( fieldTypeName ) ) + "<seq2seq4repair_space>found<seq2seq4repair_space>for<seq2seq4repair_space>dictionary:<seq2seq4repair_space>" ) + ( name ) ) + ".<seq2seq4repair_space>Using<seq2seq4repair_space>WhitespaceAnalzyer." ) ) ;
Buggy code:
public class FetchSubFolderListCommand extends FolderCommand { FolderTreeNode treeNode ; public FetchSubFolderListCommand ( DefaultCommandReference [ ] references ) { } public void updateGUI ( ) throws Exception { } public void execute ( Worker worker ) throws Exception { log . debug ( ( "reference=" + ( getReferences ( UNDOABLE_OPERATION ) ) ) ) ; FolderCommandReference [ ] r = ( ( FolderCommandReference [ ] ) ( getReferences ( FIRST_EXECUTION ) ) ) ; if ( r == null ) return ; treeNode = ( ( FolderTreeNode ) ( r [ 0 ] . getFolder ( ) ) ) ; if ( ( treeNode ) instanceof IMAPRootFolder ) <START_BUG> treeNode . createChildren ( worker ) ; <END_BUG> } public void undo ( Worker worker ) throws Exception { } public void redo ( Worker worker ) throws Exception { } }

Fix:
treeNode . createChildren ( ) ;
Buggy code:
public class EmptyTagXMLStreamWriterTest extends TestSupport { private final XMLInputFactory xmlInputFactory = XMLInputFactory . newFactory ( ) ; private final XMLOutputFactory xmlOutputFactory = XMLOutputFactory . newFactory ( ) ; @ Test ( dataProvider = "files" ) public void testEmptyTag ( String inputResource , String expectedResource ) throws Exception { final File actualFile = File . createTempFile ( "test1." , "xml" ) ; final String input = this . readResource ( inputResource ) ; this . consolidateTags ( input , actualFile ) ; final String actual = this . readResource ( actualFile ) ; final String expected = this . readResource ( expectedResource ) ; <START_BUG> Assert . assertEquals ( actual . trim ( ) . replaceAll ( "(?s)\\r\\n?" , "\\n" ) , expected . trim ( ) ) ; <END_BUG> actualFile . delete ( ) ; } private void consolidateTags ( String input , File outputFile ) throws Exception { } @ DataProvider ( name = "files" ) public Object [ ] [ ] generateFiles ( ) { } }

Fix:
Assert . assertEquals ( actual . trim ( ) . replaceAll ( "(?s)\\r\\n?" , "\n" ) , expected . trim ( ) ) ;
Buggy code:
public class HdfFileFactoryTester { File dataFile = null ; @ Test public void checkFileOperations ( ) { String separator = System . getProperty ( "file.separator" ) ; String testFileName = "test1.h5" ; H5File h5File ; int fileHandle = - 1 ; int newFileHandle = - 1 ; <START_BUG> String userDir = ( ( ( ( System . getProperty ( "user.home" ) ) + separator ) + "ICETests" ) + separator ) + "ioData" ; <END_BUG> assertNull ( HdfFileFactory . createH5File ( null ) ) ; File dataFile = new File ( ( ( userDir + separator ) + testFileName ) ) ; System . out . println ( dataFile . getAbsolutePath ( ) ) ; h5File = HdfFileFactory . createH5File ( dataFile . toURI ( ) ) ; assertNotNull ( h5File ) ; assertTrue ( h5File . exists ( ) ) ; assertTrue ( h5File . canWrite ( ) ) ; assertTrue ( h5File . canRead ( ) ) ; try { fileHandle = h5File . open ( ) ; assertTrue ( ( fileHandle >= 0 ) ) ; h5File . createGroup ( "Bob" , ( ( H5Group ) ( ( ( DefaultMutableTreeNode ) ( h5File . getRootNode ( ) ) ) . getUserObject ( ) ) ) ) ; h5File . close ( ) ; h5File = HdfFileFactory . createH5File ( dataFile . toURI ( ) ) ; fileHandle = h5File . open ( ) ; assertTrue ( ( fileHandle >= 0 ) ) ; H5Group group = ( ( H5Group ) ( ( ( DefaultMutableTreeNode ) ( h5File . getRootNode ( ) ) ) . getUserObject ( ) ) ) ; assertEquals ( 0 , group . getMemberList ( ) . size ( ) ) ; h5File . createGroup ( "Bob" , ( ( H5Group ) ( ( ( DefaultMutableTreeNode ) ( h5File . getRootNode ( ) ) ) . getUserObject ( ) ) ) ) ; HdfFileFactory . closeH5File ( h5File ) ; h5File = HdfFileFactory . openH5File ( dataFile . toURI ( ) ) ; assertNotNull ( h5File ) ; assertTrue ( h5File . exists ( ) ) ; h5File . close ( ) ; dataFile . delete ( ) ; assertNull ( HdfFileFactory . openH5File ( dataFile . toURI ( ) ) ) ; } catch ( Exception e ) { e . printStackTrace ( ) ; fail ( ) ; } if ( dataFile . exists ( ) ) { dataFile . delete ( ) ; } } No newline ; at end ; of file ; }

Fix:
String userDir = ( ( System . getProperty ( "user.home" ) ) + separator ) + "ICETests" ;
Buggy code:
public class ZipOutputStream extends DeflaterOutputStream { private ZipEntry entry ; private String comment = "" ; private int level = Deflater . DEFAULT_COMPRESSION ; private boolean hasCompressionLevelChanged = false ; private int method = ZipOutputStream . DEFLATED ; private Vector entries = new Vector ( ) ; private CRC32 crc = new CRC32 ( ) ; private long written = 0 ; private long dataStart = 0 ; private ZipLong cdOffset = new ZipLong ( 0 ) ; private ZipLong cdLength = new ZipLong ( 0 ) ; private static final byte [ ] ZERO = new byte [ ] { 0 , 0 } ; private static final byte [ ] LZERO = new byte [ ] { 0 , 0 , 0 , 0 } ; private Hashtable offsets = new Hashtable ( ) ; private String encoding = null ; public static final int DEFLATED = ZipEntry . DEFLATED ; public static final int STORED = ZipEntry . STORED ; public ZipOutputStream ( OutputStream out ) { } public void setEncoding ( String encoding ) { } public String getEncoding ( ) { } public void finish ( ) throws IOException { } public void closeEntry ( ) throws IOException { } public void putNextEntry ( ZipEntry ze ) throws IOException { } public void setComment ( String comment ) { } public void setLevel ( int level ) { } public void setMethod ( int method ) { } public void write ( byte [ ] b , int offset , int length ) throws IOException { } protected static final ZipLong LFH_SIG = new ZipLong ( 67324752L ) ; protected static final ZipLong DD_SIG = new ZipLong ( 134695760L ) ; protected static final ZipLong CFH_SIG = new ZipLong ( 33639248L ) ; protected static final ZipLong EOCD_SIG = new ZipLong ( 101010256L ) ; protected void writeLocalFileHeader ( ZipEntry ze ) throws IOException { } protected void writeDataDescriptor ( ZipEntry ze ) throws IOException { } protected void writeCentralFileHeader ( ZipEntry ze ) throws IOException { } protected void writeCentralDirectoryEnd ( ) throws IOException { } private static final ZipLong DOS_TIME_MIN = new ZipLong ( 8448L ) ; protected static ZipLong toDosTime ( Date time ) { int year = ( time . getYear ( ) ) + 1900 ; int month = ( time . getMonth ( ) ) + 1 ; if ( year < 1980 ) { return ZipOutputStream . DOS_TIME_MIN ; } <START_BUG> long value = ( ( ( ( ( ( year - 1980 ) << 25 ) | ( month << 21 ) ) | ( ( time . getDate ( ) ) << 16 ) ) | ( ( time . getHours ( ) ) << 11 ) ) | ( ( time . getMinutes ( ) ) << 5 ) ) | ( ( time . getSeconds ( ) ) > > 1 ) ; <END_BUG> byte [ ] result = new byte [ 4 ] ; result [ 0 ] = ( ( byte ) ( value & 255 ) ) ; result [ 1 ] = ( ( byte ) ( ( value & 65280 ) > > 8 ) ) ; result [ 2 ] = ( ( byte ) ( ( value & 16711680 ) > > 16 ) ) ; result [ 3 ] = ( ( byte ) ( ( value & 4278190080L ) > > 24 ) ) ; return new ZipLong ( result ) ; } protected byte [ ] getBytes ( String name ) throws ZipException { } }

Fix:
long value = ( ( ( ( ( ( year - 1980 ) << 25 ) | ( month << 21 ) ) | ( ( time . getDate ( ) ) << 16 ) ) | ( ( time . getHours ( ) ) << 11 ) ) | ( ( time . getMinutes ( ) ) << 5 ) ) | ( ( ( time . getSeconds ( ) ) + 2 ) > > 1 ) ;
Buggy code:
public class FloatProperty extends NumberProperty { private static final long serialVersionUID = 240L ; private float value ; private float savedValue ; public FloatProperty ( String name , float value ) { } public FloatProperty ( ) { } @ Override public void setRunningVersion ( boolean runningVersion ) { } public void recoverRunningVersion ( TestElement owner ) { } public void setValue ( float value ) { } @ Override protected void setNumberValue ( Number n ) { } @ Override protected void setNumberValue ( String n ) throws NumberFormatException { } public String getStringValue ( ) { } public Object getObjectValue ( ) { <START_BUG> return new Float ( value ) ; <END_BUG> } @ Override public FloatProperty clone ( ) { } @ Override public boolean getBooleanValue ( ) { } @ Override public double getDoubleValue ( ) { } @ Override public float getFloatValue ( ) { } @ Override public int getIntValue ( ) { } @ Override public long getLongValue ( ) { } }

Fix:
return Float . valueOf ( value ) ;
Buggy code:
@ SuppressWarnings ( "unused" ) public class FeatureManagementLifecycleListener implements LifecycleListener { private static final String API_CONFIG_DEFAULT_VERSION = "1.0.0" ; private static final String PARAM_MANAGED_API_ENABLED = "managed-api-enabled" ; private static final Log log = LogFactory . getLog ( FeatureManagementLifecycleListener . class ) ; private static final String UNLIMITED = "Unlimited" ; @ Override public void lifecycleEvent ( LifecycleEvent lifecycleEvent ) { if ( AFTER_START_EVENT . equals ( lifecycleEvent . getType ( ) ) ) { StandardContext context = ( ( StandardContext ) ( lifecycleEvent . getLifecycle ( ) ) ) ; ServletContext servletContext = context . getServletContext ( ) ; String param = servletContext . getInitParameter ( FeatureManagementLifecycleListener . PARAM_MANAGED_API_ENABLED ) ; boolean isManagedApi = ( ( param != null ) && ( ! ( param . isEmpty ( ) ) ) ) && ( Boolean . parseBoolean ( param ) ) ; if ( isManagedApi ) { try { AnnotationUtil annotationUtil = new AnnotationUtil ( context ) ; Set < String > annotatedAPIClasses = annotationUtil . scanStandardContext ( DeviceType . class . getName ( ) ) ; Map < String , List < Feature > > features = annotationUtil . extractFeatures ( annotatedAPIClasses ) ; <START_BUG> if ( features != null ) { <END_BUG> GenericFeatureManager . getInstance ( ) . addFeatures ( features ) ; } } catch ( IOException e ) { FeatureManagementLifecycleListener . log . error ( "Error<seq2seq4repair_space>enconterd<seq2seq4repair_space>while<seq2seq4repair_space>discovering<seq2seq4repair_space>annotated<seq2seq4repair_space>classes." , e ) ; } catch ( ClassNotFoundException e ) { FeatureManagementLifecycleListener . log . error ( "Error<seq2seq4repair_space>while<seq2seq4repair_space>scanning<seq2seq4repair_space>class<seq2seq4repair_space>for<seq2seq4repair_space>annotations." , e ) ; } catch ( DeviceManagementException e ) { FeatureManagementLifecycleListener . log . error ( "Error<seq2seq4repair_space>encountered<seq2seq4repair_space>while<seq2seq4repair_space>persisting<seq2seq4repair_space>device<seq2seq4repair_space>features." , e ) ; } } } } }

Fix:
if ( ( features != null ) && ( ! ( features . isEmpty ( ) ) ) ) {
Buggy code:
public class IDMSubsystemAdd extends AbstractAddStepHandler { public static final IDMSubsystemAdd INSTANCE = new IDMSubsystemAdd ( ) ; @ Override protected void performRuntime ( OperationContext context , ModelNode operation , ModelNode model , ServiceVerificationHandler verificationHandler , List < ServiceController < ? > > newControllers ) throws OperationFailedException { <START_BUG> ROOT_LOGGER . activatingSubsystem ( ) ; <END_BUG> } }

Fix:
ROOT_LOGGER . activatingSubsystem ( "Identity<seq2seq4repair_space>Management" ) ;
Buggy code:
public class CancelationSummaryActivity extends BaseActivity implements View . OnClickListener { private LinearLayout llCancel ; private TextView tvPatientName ; private TextView tvDateTime ; private TextView tvDoctorName ; private TextView tvHeading ; private TextView tvHeading2 ; private Button btnOk ; private String PatientName ; private String DoctorName ; private String chosenTime ; @ Override public void initializeControls ( ) { } @ Override public void bindControls ( ) { tvLogin . setEnabled ( false ) ; Intent i = getIntent ( ) ; if ( ( ( i . hasExtra ( "PatientName" ) ) && ( i . hasExtra ( "chosenTime" ) ) ) && ( i . hasExtra ( "DoctorName" ) ) ) { PatientName = i . getStringExtra ( "PatientName" ) ; DoctorName = i . getStringExtra ( "DoctorName" ) ; chosenTime = i . getStringExtra ( "chosenTime" ) ; } else { finish ( ) ; return ; } <START_BUG> tvDoctorName . setText ( DoctorName ) ; <END_BUG> tvPatientName . setText ( PatientName ) ; tvDateTime . setText ( chosenTime ) ; } @ Override public void onClick ( View v ) { } }

Fix:
tvDoctorName . setText ( ( "Dr." + ( DoctorName ) ) ) ;
Buggy code:
@ DPU . AsLoader public class RelationalToSql extends AbstractDpu < RelationalToSqlConfig_V1 > { private static final Logger LOG = LoggerFactory . getLogger ( RelationalToSql . class ) ; @ AsInput ( name = "input" ) public RelationalDataUnit inTablesData ; @ Init ( param = "eu.unifiedviews.plugins.loader.relationaltosql.RelationalToSqlConfig__V1" ) public ConfigurationUpdate _ConfigurationUpdate ; public RelationalToSql ( ) { } @ Override protected void innerExecute ( ) throws DPUException { } private void insertDataFromSourceToTarget ( PreparedStatement insertStmnt , List < ColumnDefinition > columns , String sourceTableName ) throws Exception { } private String createTargetTableName ( int index ) { } private final void createTable ( Connection conn , String targetTableName , List < ColumnDefinition > sourceColumns ) throws SQLException { } private List < ColumnDefinition > getColumnDefinitionsForSourceTable ( String sourceTableName ) throws Exception { } private boolean checkTablesConsistent ( Connection conn , String targetTableName , List < ColumnDefinition > sourceColumns ) throws Exception { } private final void truncateTable ( Connection conn ) throws SQLException { } private final void dropTable ( Connection conn , String tableName ) throws SQLException { } private boolean checkTableExists ( Connection conn , String targetTableName ) throws SQLException { boolean bTableExists = false ; DatabaseMetaData dbm = null ; ResultSet tables = null ; try { dbm = conn . getMetaData ( ) ; <START_BUG> tables = dbm . getTables ( null , null , targetTableName , null ) ; <END_BUG> if ( tables . next ( ) ) { bTableExists = true ; } } finally { RelationalToSqlHelper . tryCloseResultSet ( tables ) ; } return bTableExists ; } }

Fix:
tables = dbm . getTables ( null , null , targetTableName . toLowerCase ( ) , null ) ;