nus-yam/ex-repair huggingface dataset:
Buggy code:
public class DomainFinalResultHandler implements OperationStepHandler { private final DomainOperationContext domainOperationContext ; public DomainFinalResultHandler ( DomainOperationContext domainOperationContext ) { } @ Override public void execute ( OperationContext context , ModelNode operation ) throws OperationFailedException { context . completeStep ( ) ; final boolean isDomain = isDomainOperation ( operation ) ; boolean shouldContinue = collectDomainFailure ( context , isDomain ) ; shouldContinue = shouldContinue && ( collectContextFailure ( context , isDomain ) ) ; shouldContinue = shouldContinue && ( collectHostFailures ( context , isDomain ) ) ; if ( shouldContinue ) { ModelNode contextResult = context . getResult ( ) ; contextResult . setEmptyObject ( ) ; <START_BUG> contextResult . get ( DOMAIN_RESULTS ) . set ( getDomainResults ( operation ) ) ; <END_BUG> if ( ( domainOperationContext . getServerResults ( ) . size ( ) ) > 0 ) { populateServerGroupResults ( context , context . getResult ( ) ) ; } } } private boolean collectDomainFailure ( OperationContext context , final boolean isDomain ) { } private boolean collectContextFailure ( OperationContext context , final boolean isDomain ) { } private boolean collectHostFailures ( final OperationContext context , final boolean isDomain ) { } private ModelNode getDomainResults ( final ModelNode operation , final String ... stepLabels ) { } private ModelNode getHostControllerResult ( final ModelNode fullResult , final String ... stepLabels ) { } private void populateServerGroupResults ( final OperationContext context , final ModelNode result ) { } private boolean isDomainOperation ( final ModelNode operation ) { } private static class HostServer implements Comparable < DomainFinalResultHandler . HostServer > { private final String hostName ; private final String serverName ; private final ModelNode result ; private HostServer ( String hostName , String serverName , ModelNode result ) { } public int compareTo ( DomainFinalResultHandler . HostServer hostServer ) { } } private static class ResponseProvider { private final String host ; private final String server ; private final List < ModelNode > children ; private ResponseProvider ( final ModelNode operation , final String localHostName ) { } private String getHost ( ) { } private String getServer ( ) { } private List < ModelNode > getChildren ( ) { } private boolean isLeaf ( ) { } } }

Fix:
contextResult . set ( getDomainResults ( operation ) ) ;
Buggy code:
public class Hand { private ArrayList < Card > hand ; public boolean willPlay ; private int bet ; public boolean madeFromSplit ; public boolean hasSurrendered ; private boolean displayBet ; public Hand ( boolean db ) { } public void Add ( Card c ) { } public Card Pop ( ) { } public String toString ( ) { } public int getValue ( ) { } public ArrayList < Card > getHand ( ) { } public boolean isBlackJack ( ) { } public boolean isHandPlayable ( ) { <START_BUG> return ( BlackJackCardValues . getCombinedValuesOfCardHand ( this . hand ) ) <= 21 ; <END_BUG> } public int getBet ( ) { } public boolean setBet ( int b , int money ) { } }

Fix:
return ( BlackJackCardValues . getCombinedValuesOfCardHand ( hand ) ) <= 21 ;
Buggy code:
public class DatabaseLocator { public static ContactsDatabase getDatabase ( ) { <START_BUG> return ThreadTestApplication . get ( ) . getContactsDB ( ) ; <END_BUG> } }

Fix:
return TestApp1 . get ( ) . getContactsDB ( ) ;
Buggy code:
public class SongDetailFragment extends MumoFragment { public static final String TAG = "SongDetailFragment" ; Song song ; TextView name ; TextView album ; TextView artist ; Button playSong ; @ Override public void onCreate ( Bundle savedInstanceState ) { } @ Override public View onCreateView ( LayoutInflater inflater , ViewGroup container , Bundle savedInstanceState ) { } private void setDetails ( ) { if ( ( song ) != null ) { name . setText ( song . getName ( ) ) ; album . setText ( song . getAlbum ( ) . getName ( ) ) ; if ( ( song . getArtists ( ) . size ( ) ) > 0 ) { String artistText = song . getArtists ( ) . get ( 0 ) . getName ( ) ; for ( int i = 1 ; i < ( song . getArtists ( ) . size ( ) ) ; i ++ ) { artistText += ",<seq2seq4repair_space>" + ( song . getArtists ( ) . get ( i ) . getName ( ) ) ; } artist . setText ( artistText ) ; } else { artist . setText ( "No<seq2seq4repair_space>artists<seq2seq4repair_space>found" ) ; } playSong . setOnClickListener ( new View . OnClickListener ( ) { @ Override public void onClick ( View v ) { mPlayer . play ( song . getUri ( ) ) ; MumoApplication . currentlyPlayedSong = song ; <START_BUG> ( ( MusicControllerFragment ) ( getActivity ( ) . getSupportFragmentManager ( ) . findFragmentByTag ( MusicControllerFragment . TAG ) ) ) . startMusic ( ) ; <END_BUG> } } ) ; } } }

Fix:
( ( MusicControllerFragment ) ( getActivity ( ) . getSupportFragmentManager ( ) . findFragmentById ( R . id . music_controller ) ) ) . startMusic ( ) ;
Buggy code:
public class StringRequestTarget implements IRequestTarget { private final String string ; public StringRequestTarget ( String string ) { } public void respond ( RequestCycle requestCycle ) { } public void cleanUp ( RequestCycle requestCycle ) { } public Object getLock ( RequestCycle requestCycle ) { } public String getString ( ) { } public boolean equals ( Object obj ) { } public int hashCode ( ) { } public String toString ( ) { <START_BUG> return ( ( ( "StringRequestTarget@" + ( hashCode ( ) ) ) + "{" ) + ( string ) ) + "}" ; <END_BUG> } }

Fix:
return ( ( ( "[StringRequestTarget@" + ( hashCode ( ) ) ) + "<seq2seq4repair_space>" ) + ( string ) ) + "]" ;
Buggy code:
public class TetherSettings extends PreferenceActivity { private static final String USB_TETHER_SETTINGS = "usb_tether_settings" ; private static final String ENABLE_WIFI_AP = "enable_wifi_ap" ; private static final String WIFI_AP_SETTINGS = "wifi_ap_settings" ; private static final String TETHERING_HELP = "tethering_help" ; private static final String USB_HELP_MODIFIER = "usb_" ; private static final String WIFI_HELP_MODIFIER = "wifi_" ; private static final String HELP_URL = "file://////android_asset//html//%y%z//tethering_%xhelp.html" ; private static final String HELP_PATH = "html//%y%z//tethering_help.html" ; private static final int DIALOG_TETHER_HELP = 1 ; private WebView mView ; private CheckBoxPreference mUsbTether ; private CheckBoxPreference mEnableWifiAp ; private PreferenceScreen mWifiApSettings ; private WifiApEnabler mWifiApEnabler ; private PreferenceScreen mTetherHelp ; private BroadcastReceiver mTetherChangeReceiver ; private String [ ] mUsbRegexs ; private ArrayList mUsbIfaces ; private String [ ] mWifiRegexs ; @ Override protected void onCreate ( Bundle icicle ) { super . onCreate ( icicle ) ; addPreferencesFromResource ( tether_prefs ) ; mEnableWifiAp = ( ( CheckBoxPreference ) ( findPreference ( TetherSettings . ENABLE_WIFI_AP ) ) ) ; mWifiApSettings = ( ( PreferenceScreen ) ( findPreference ( TetherSettings . WIFI_AP_SETTINGS ) ) ) ; mUsbTether = ( ( CheckBoxPreference ) ( findPreference ( TetherSettings . USB_TETHER_SETTINGS ) ) ) ; mTetherHelp = ( ( PreferenceScreen ) ( findPreference ( TetherSettings . TETHERING_HELP ) ) ) ; ConnectivityManager cm = ( ( ConnectivityManager ) ( getSystemService ( CONNECTIVITY_SERVICE ) ) ) ; mUsbRegexs = cm . getTetherableUsbRegexs ( ) ; <START_BUG> if ( ( mUsbRegexs . length ) == 0 ) { <END_BUG> getPreferenceScreen ( ) . removePreference ( mUsbTether ) ; setTitle ( tether_settings_title_wifi ) ; } mWifiRegexs = cm . getTetherableWifiRegexs ( ) ; if ( ( mWifiRegexs . length ) == 0 ) { getPreferenceScreen ( ) . removePreference ( mEnableWifiAp ) ; getPreferenceScreen ( ) . removePreference ( mWifiApSettings ) ; setTitle ( tether_settings_title_usb ) ; } else if ( ( mUsbRegexs . length ) != 0 ) { setTitle ( tether_settings_title_both ) ; } mWifiApEnabler = new WifiApEnabler ( this , mEnableWifiAp ) ; mView = new WebView ( this ) ; } @ Override protected Dialog onCreateDialog ( int id ) { } private class TetherChangeReceiver extends BroadcastReceiver { public void onReceive ( Context content , Intent intent ) { } } @ Override protected void onResume ( ) { } @ Override protected void onPause ( ) { } private void updateState ( ) { } private void updateState ( Object [ ] available , Object [ ] tethered , Object [ ] errored ) { } @ Override public boolean onPreferenceTreeClick ( PreferenceScreen preferenceScreen , Preference preference ) { } private String findIface ( String [ ] ifaces , String [ ] regexes ) { } }

Fix:
if ( ( ( mUsbRegexs . length ) == 0 ) || ( Utils . isMonkeyRunning ( ) ) ) {
Buggy code:
public class ScheduledTasksJPanel extends JPanel implements ICompanyListener , IDepartmentListener { private static final long serialVersionUID = 1L ; private JList _tasksList ; private boolean _needToUpdate ; private Lock _lockObject ; public ScheduledTasksJPanel ( IGame game ) { } public List < String > getRunningTasks ( ) { } @ Override public void projectAssigned ( String owner , CompanyMemento company , ProjectMemento project , DateTime dateTime ) { } @ Override public void projectFinished ( String owner , CompanyMemento company , ProjectMemento project , DateTime dateTime ) { } @ Override public void companyIsInsolvent ( String owner , CompanyMemento company , ProjectMemento assignedProject , DateTime dateTime ) { } @ Override public void onExecuteWorkingStep ( String owner , final CompanyMemento company , ProjectMemento assignedProject , DateTime dateTime ) { if ( ( ( ( company != null ) && ( ( company . getITDepartment ( ) ) != null ) ) && ( ( company . getITDepartment ( ) . getEmployees ( ) ) != null ) ) && ( ! ( company . getITDepartment ( ) . getEmployees ( ) . isEmpty ( ) ) ) ) { SwingUtilities . invokeLater ( new Runnable ( ) { @ Override public void run ( ) { try { _lockObject . lock ( ) ; if ( _needToUpdate ) { Map < String , EmployeeTaskMemento > scheduledTasks = new TreeMap < String , EmployeeTaskMemento > ( ) ; for ( Map . Entry < String , EmployeeMemento > employeeEntry : company . getITDepartment ( ) . getEmployees ( ) . entrySet ( ) ) { if ( ( employeeEntry . getValue ( ) ) != null ) { for ( Map . Entry < String , EmployeeTaskMemento > taskEntry : employeeEntry . getValue ( ) . getTasks ( ) . entrySet ( ) ) { if ( ! ( scheduledTasks . containsKey ( taskEntry . getValue ( ) . getTaskName ( ) ) ) ) { scheduledTasks . put ( taskEntry . getKey ( ) , taskEntry . getValue ( ) ) ; } } } } List < CheckBoxListEntry > tasks = new LinkedList < CheckBoxListEntry > ( ) ; for ( Map . Entry < String , EmployeeTaskMemento > entry : scheduledTasks . entrySet ( ) ) { <START_BUG> tasks . add ( new CheckBoxListEntry ( entry . getValue ( ) , entry . getKey ( ) ) ) ; <END_BUG> } _tasksList . setListData ( tasks . toArray ( ) ) ; _needToUpdate = false ; } } finally { _lockObject . unlock ( ) ; } } } ) ; } } @ Override public void companyAssigned ( String owner , CompanyMemento company ) { } @ Override public void employeeDischarged ( String director , DepartmentMemento department ) { } @ Override public void employeeHired ( String director , DepartmentMemento department ) { } @ Override public void tasksAssigned ( String director , DepartmentMemento department ) { } @ Override public void tasksAssignFailed ( String director , DepartmentMemento department ) { } @ Override public void departmentAssigned ( String director , DepartmentMemento department ) { } }

Fix:
tasks . add ( new CheckBoxListEntry ( entry . getValue ( ) , entry . getValue ( ) . getTaskName ( ) ) ) ;
Buggy code:
public class ConfigMidiEntry extends ConfigEntry implements Serializable { private static final long serialVersionUID = 8907267743815270553L ; private static final Logger logger = LoggerFactory . getLogger ( ConfigMidiEntry . class ) ; private String controller ; private String command ; private String value1 ; private String value2 ; private String value3 ; public ConfigMidiEntry ( ) { } public ConfigMidiEntry ( String line ) throws ConfigurationException { } private String fixEntry ( String value ) { } public ConfigMidiEntry ( ConfigEntry midiInput ) { } public String getController ( ) { } public void setController ( String controller ) { } public String getCommand ( ) { } public void setCommand ( String command ) { } public String getValue1 ( ) { } public void setValue1 ( String value1 ) { } public String getValue2 ( ) { } public void setValue2 ( String value2 ) { } public String getValue3 ( ) { } public void setValue3 ( String value3 ) { } @ Override public String toString ( ) { StringBuffer sb = new StringBuffer ( ) ; sb . append ( getMidiValue ( ) ) ; sb . append ( "<seq2seq4repair_space>:<seq2seq4repair_space>['" ) ; sb . append ( getController ( ) ) ; sb . append ( "'<seq2seq4repair_space>,<seq2seq4repair_space>'" ) ; sb . append ( getCommand ( ) ) ; sb . append ( "'<seq2seq4repair_space>,<seq2seq4repair_space>[" ) ; if ( StringUtils . isNotEmpty ( getValue1 ( ) ) ) { if ( ! ( StringUtils . isNumeric ( getValue1 ( ) ) ) ) { sb . append ( "'" ) ; } sb . append ( getValue1 ( ) ) ; if ( ! ( StringUtils . isNumeric ( getValue1 ( ) ) ) ) { sb . append ( "'" ) ; } } if ( StringUtils . isNotEmpty ( getValue2 ( ) ) ) { sb . append ( ",<seq2seq4repair_space>" ) ; if ( ! ( StringUtils . isNumeric ( getValue2 ( ) ) ) ) { sb . append ( "'" ) ; } sb . append ( getValue2 ( ) ) ; if ( ! ( StringUtils . isNumeric ( getValue2 ( ) ) ) ) { sb . append ( "'" ) ; } } if ( StringUtils . isNotEmpty ( getValue3 ( ) ) ) { <START_BUG> sb . append ( "',<seq2seq4repair_space>'" ) ; <END_BUG> if ( ! ( StringUtils . isNumeric ( getValue3 ( ) ) ) ) { sb . append ( "'" ) ; } sb . append ( getValue3 ( ) ) ; if ( ! ( StringUtils . isNumeric ( getValue3 ( ) ) ) ) { sb . append ( "'" ) ; } } sb . append ( "]" ) ; if ( StringUtils . isNotEmpty ( getMidiFollowSignal ( ) ) ) { sb . append ( ",<seq2seq4repair_space>[" ) ; sb . append ( getMidiFollowSignal ( ) ) ; sb . append ( "]" ) ; } sb . append ( "]," ) ; return sb . toString ( ) ; } }

Fix:
sb . append ( ",<seq2seq4repair_space>" ) ;
Buggy code:
public class Probability { private double value ; private Probability ( double value ) { } public Probability and ( Probability v2 ) { } @ Override public String toString ( ) { } public static Probability fromPercentage ( double value ) { } public static Probability fromFraction ( double value ) { } public boolean equals ( Object p2 ) { if ( ( this ) == p2 ) return true ; if ( ( p2 == null ) || ( ( getClass ( ) ) != ( p2 . getClass ( ) ) ) ) return false ; Probability probability2 = ( ( Probability ) ( p2 ) ) ; double delta = 1.0E-5 ; <START_BUG> return ( ( value ) < ( probability2 . value ) ? value : probability2 . value ) < delta ; <END_BUG> } }

Fix:
return ( Math . abs ( ( ( value ) - ( probability2 . value ) ) ) ) < delta ;
Buggy code:
public class RegexpMatcherFactory { public RegexpMatcherFactory ( ) { } public RegexpMatcher newRegexpMatcher ( ) throws BuildException { } public RegexpMatcher newRegexpMatcher ( Project p ) throws BuildException { String systemDefault = null ; if ( p == null ) { systemDefault = System . getProperty ( "ant.regexp.regexpimpl" ) ; } else { <START_BUG> systemDefault = ( ( String ) ( p . getProperties ( ) . get ( "ant.regexp.regexpimpl" ) ) ) ; <END_BUG> } if ( systemDefault != null ) { return createInstance ( systemDefault ) ; } try { return createInstance ( "org.apache.tools.ant.util.regexp.Jdk14RegexpMatcher" ) ; } catch ( BuildException be ) { } try { return createInstance ( "org.apache.tools.ant.util.regexp.JakartaOroMatcher" ) ; } catch ( BuildException be ) { } try { return createInstance ( "org.apache.tools.ant.util.regexp.JakartaRegexpMatcher" ) ; } catch ( BuildException be ) { } throw new BuildException ( "No<seq2seq4repair_space>supported<seq2seq4repair_space>regular<seq2seq4repair_space>expression<seq2seq4repair_space>matcher<seq2seq4repair_space>found" ) ; } protected RegexpMatcher createInstance ( String className ) throws BuildException { } }

Fix:
systemDefault = p . getProperty ( "ant.regexp.regexpimpl" ) ;
Buggy code:
public class LoadPreferencesCommand extends AbstractSetPreferencesCommand { private static final String SUCCESS = "Load<seq2seq4repair_space>Preferences<seq2seq4repair_space>File<seq2seq4repair_space>was<seq2seq4repair_space>successful<seq2seq4repair_space>for<seq2seq4repair_space>the<seq2seq4repair_space>'%s'" ; private static final Gson GSON = new Gson ( ) ; private static final Type MAP_STRING_STRING_TYPE = new TypeToken < Map < String , String > > ( ) { } . getType ( ) ; private final ElementType type ; protected LoadPreferencesCommand ( ElementType type , PreferencesClient client , CLIConfig cliConfig ) { } @ Override public void printSuccessMessage ( PrintStream printStream , ElementType type ) { } @ SuppressWarnings ( "unchecked" ) @ Override public void perform ( Arguments arguments , PrintStream printStream ) throws Exception { } @ Override public String getPattern ( ) { <START_BUG> return this . determinePattern ( "load" ) ; <END_BUG> } @ Override public String getDescription ( ) { } }

Fix:
return determinePattern ( "load" ) ;
Buggy code:
public final class LoggingEventFieldResolver { private static final List keywordList = new ArrayList ( ) ; private static final String LOGGER_FIELD = "LOGGER" ; private static final String LEVEL_FIELD = "LEVEL" ; private static final String CLASS_FIELD = "CLASS" ; private static final String FILE_FIELD = "FILE" ; private static final String LINE_FIELD = "LINE" ; private static final String METHOD_FIELD = "METHOD" ; private static final String MSG_FIELD = "MSG" ; private static final String NDC_FIELD = "NDC" ; private static final String EXCEPTION_FIELD = "EXCEPTION" ; private static final String TIMESTAMP_FIELD = "TIMESTAMP" ; private static final String THREAD_FIELD = "THREAD" ; private static final String MDC_FIELD = "MDC." ; private static final String PROP_FIELD = "PROP." ; private static final String EMPTY_STRING = "" ; private static final LoggingEventFieldResolver resolver = new LoggingEventFieldResolver ( ) ; private LoggingEventFieldResolver ( ) { } public static LoggingEventFieldResolver getInstance ( ) { } public List getKeywords ( ) { } public boolean isField ( String fieldName ) { <START_BUG> return LoggingEventFieldResolver . keywordList . contains ( fieldName ) ; <END_BUG> } public Object getValue ( String fieldName , LoggingEvent event ) { } }

Fix:
return ( fieldName != null ) && ( LoggingEventFieldResolver . keywordList . contains ( fieldName . toUpperCase ( ) ) ) ;
Buggy code:
public class JeremieRegistry implements NameService { public int port = 12340 ; public Registry registry = null ; public void start ( ) throws NameServiceException { if ( TraceCarol . isDebugJndiCarol ( ) ) { TraceCarol . debugJndiCarol ( ( "JeremieRegistry.start()<seq2seq4repair_space>on<seq2seq4repair_space>port:" + ( port ) ) ) ; } try { if ( ! ( isStarted ( ) ) ) { if ( ( port ) >= 0 ) { registry = LocateRegistry . createRegistry ( port ) ; Runtime . getRuntime ( ) . addShutdownHook ( new Thread ( ) { public void run ( ) { try { <START_BUG> stop ( ) ; <END_BUG> } catch ( Exception e ) { TraceCarol . error ( "JeremieRegistry<seq2seq4repair_space>ShutdownHook<seq2seq4repair_space>problem" , e ) ; } } } ) ; } else { if ( TraceCarol . isDebugJndiCarol ( ) ) { TraceCarol . debugJndiCarol ( ( ( "Can't<seq2seq4repair_space>start<seq2seq4repair_space>JeremieRegistry,<seq2seq4repair_space>port=" + ( port ) ) + "<seq2seq4repair_space>is<seq2seq4repair_space><<seq2seq4repair_space>0" ) ) ; } } } else { if ( TraceCarol . isDebugJndiCarol ( ) ) { TraceCarol . debugJndiCarol ( ( "JeremieRegistry<seq2seq4repair_space>is<seq2seq4repair_space>already<seq2seq4repair_space>start<seq2seq4repair_space>on<seq2seq4repair_space>port:" + ( port ) ) ) ; } } } catch ( Exception e ) { throw new NameServiceException ( ( "can<seq2seq4repair_space>not<seq2seq4repair_space>start<seq2seq4repair_space>jeremie<seq2seq4repair_space>registry:<seq2seq4repair_space>" + e ) ) ; } } public void stop ( ) throws NameServiceException { } public boolean isStarted ( ) { } public void setPort ( int p ) { } }

Fix:
JeremieRegistry . this . stop ( ) ;
Buggy code:
public class HeaderManager extends ConfigTestElement implements Serializable { private static final long serialVersionUID = 240L ; public static final String HEADERS = "HeaderManager.headers" ; private static final String [ ] COLUMN_RESOURCE_NAMES = new String [ ] { "name" , "value" } ; private static final int COLUMN_COUNT = HeaderManager . COLUMN_RESOURCE_NAMES . length ; private Object SOAPHeader = null ; public HeaderManager ( ) { } @ Override public void clear ( ) { } public CollectionProperty getHeaders ( ) { } public int getColumnCount ( ) { } public String getColumnName ( int column ) { } public Class < ? extends String > getColumnClass ( int column ) { } public Header getHeader ( int row ) { } public void save ( String headFile ) throws IOException { } public void addFile ( String headerFile ) throws IOException { File file = new File ( headerFile ) ; if ( ! ( file . isAbsolute ( ) ) ) { file = new File ( ( ( ( System . getProperty ( "user.dir" ) ) + ( File . separator ) ) + headerFile ) ) ; } if ( ! ( file . canRead ( ) ) ) { throw new IOException ( "The<seq2seq4repair_space>file<seq2seq4repair_space>you<seq2seq4repair_space>specified<seq2seq4repair_space>cannot<seq2seq4repair_space>be<seq2seq4repair_space>read." ) ; } BufferedReader reader = null ; try { reader = new BufferedReader ( new FileReader ( file ) ) ; String line ; while ( ( line = reader . readLine ( ) ) != null ) { try { <START_BUG> if ( ( line . startsWith ( "#" ) ) || ( ( line . trim ( ) . length ( ) ) == 0 ) ) { <END_BUG> continue ; } String [ ] st = JOrphanUtils . split ( line , "\t" , "<seq2seq4repair_space>" ) ; int name = 0 ; int value = 1 ; Header header = new Header ( st [ name ] , st [ value ] ) ; getHeaders ( ) . addItem ( header ) ; } catch ( Exception e ) { throw new IOException ( ( ( ( "Error<seq2seq4repair_space>parsing<seq2seq4repair_space>header<seq2seq4repair_space>line\n\t\'" + line ) + "\'\n\t" ) + e ) ) ; } } } finally { IOUtils . closeQuietly ( reader ) ; } } public void add ( Header h ) { } public void add ( ) { } public void remove ( int index ) { } public int size ( ) { } public Header get ( int i ) { } public void removeHeaderNamed ( String name ) { } public Object getSOAPHeader ( ) { } public void setSOAPHeader ( Object header ) { } public HeaderManager merge ( TestElement element , boolean preferLocalValues ) { } }

Fix:
if ( ( line . startsWith ( "#" ) ) || ( JOrphanUtils . isBlank ( line ) ) ) {
Buggy code:
public class ImportExportTest extends BaseJDBCTestCase { public ImportExportTest ( String name ) { } public static Test suite ( ) { } public static Test baseSuite ( String name ) { } public void testImportFromNonExistantFile ( ) { } public void testNullDataFile ( ) { } public void testEmptyTable ( ) throws SQLException { } public void testEmptyTableWithDelimitedFormat ( ) throws SQLException { } public void testEmptyTableWithFieldCharDelimiters ( ) throws SQLException { } public void testWithDefaultOptions ( ) throws Exception { } public void testWithCodeset ( ) throws Exception { } public void testDelimiterAndCodeset ( ) throws Exception { } public void testSpecialDelimitersAndCodeset ( ) throws Exception { } public void testSpecialDelimitersAndUTF16 ( ) throws Exception { } public void testInvalidEncoding ( ) throws Exception { } public void testEarlyEndOfFile ( ) throws Exception { Connection c = getConnection ( ) ; try { doImportFromFile ( c , "extin//EndOfFile.txt" , "T4" , null , null , null , 0 ) ; } catch ( SQLException e ) { <START_BUG> assertSQLState ( ( JDBC . vmSupportsJDBC4 ( ) ? "38000" : "XIE0E" ) , e ) ; <END_BUG> } } private void doImport ( Connection c , String fromTable , String toTable , String colDel , String charDel , String codeset , int replace ) throws SQLException { } private void doImportFromFile ( Connection c , String fileName , String toTable , String colDel , String charDel , String codeset , int replace ) throws Exception { } private void doImportAndExport ( Connection c , String fromTable , String colDel , String charDel , String codeset ) throws SQLException { } private void doExport ( Connection c , String fromTable , String colDel , String charDel , String codeset ) throws SQLException { } private void doImportAndVerify ( Connection c , String fromTable , String colDel , String charDel , String codeset , int replace ) throws SQLException { } private void resetTables ( ) throws Exception { } }

Fix:
assertSQLState ( ( JDBC . vmSupportsJDBC4 ( ) ? "XIE0R" : "XIE0E" ) , e ) ;
Buggy code:
public class MixedLockManager extends PessimisticLockManager { private static final Localizer _loc = Localizer . forPackage ( MixedLockManager . class ) ; public boolean selectForUpdate ( Select sel , int lockLevel ) { } protected void lockInternal ( OpenJPAStateManager sm , int level , int timeout , Object sdata , boolean postLockVersionCheck ) { } protected void optimisticLockInternal ( OpenJPAStateManager sm , int level , int timeout , Object sdata , boolean postLockVersionCheck ) { super . optimisticLockInternal ( sm , level , timeout , sdata , postLockVersionCheck ) ; if ( postLockVersionCheck ) { if ( level >= ( MixedLockLevels . LOCK_PESSIMISTIC_READ ) ) { ClassMapping mapping = ( ( ClassMapping ) ( sm . getMetaData ( ) ) ) ; try { <START_BUG> if ( ! ( mapping . getVersion ( ) . checkVersion ( sm , this . getStore ( ) , true ) ) ) { <END_BUG> throw new org . apache . openjpa . util . OptimisticException ( MixedLockManager . _loc . get ( "optimistic-violation-lock" ) . getMessage ( ) ) . setFailedObject ( sm . getObjectId ( ) ) ; } } catch ( SQLException se ) { throw SQLExceptions . getStore ( se , sm . getObjectId ( ) , getStore ( ) . getDBDictionary ( ) ) ; } } } } }

Fix:
if ( ! ( mapping . getVersion ( ) . checkVersion ( sm , this . getStore ( ) , false ) ) ) {
Buggy code:
public class BrewingStands { private static final String SAVE_EXTENSION = ".brewingdata" ; private static Map < BlockID , BrewingStandData > brewingStands = new LinkedHashMap < BlockID , BrewingStandData > ( 128 ) ; protected static void init ( ) { } public static void clean ( ) { } public static void cleanChunk ( Chunk chunk , Set < BlockID > added ) { Iterator < Map . Entry < BlockID , BrewingStandData > > iter = BrewingStands . brewingStands . entrySet ( ) . iterator ( ) ; int x = chunk . getX ( ) ; int z = chunk . getZ ( ) ; while ( iter . hasNext ( ) ) { Map . Entry < BlockID , BrewingStandData > entry = iter . next ( ) ; BlockID id = entry . getKey ( ) ; <START_BUG> if ( ( ( ( Math . floor ( ( ( id . getX ( ) ) // 16.0 ) ) ) == x ) && ( ( Math . floor ( ( ( id . getZ ( ) ) // 16 ) ) ) == z ) ) && ( ! ( added . contains ( id ) ) ) ) { <END_BUG> iter . remove ( ) ; } } } public static Map < BlockID , BrewingStandData > getBrewingStands ( ) { } public static boolean exists ( BlockID id ) { } public static void set ( BrewingStand brewingStand ) { } public static void set ( BlockID id , BrewingStand brewingStand ) { } public static void add ( BlockID id ) { } public static void add ( Location location ) { } public static BrewingStandData get ( BlockID id ) { } public static BrewingStandData get ( Location location ) { } public static void remove ( BlockID id ) { } public static void remove ( Location location ) { } public static void load ( ) { } public static void save ( ) { } }

Fix:
if ( ( ( ( Math . floor ( ( ( id . getX ( ) ) // 16.0 ) ) ) == x ) && ( ( Math . floor ( ( ( id . getZ ( ) ) // 16.0 ) ) ) == z ) ) && ( ! ( added . contains ( id ) ) ) ) {
Buggy code:
public interface StateCycleListener < S extends Enum , P extends Payload > { void beforeStateWork ( S state , P payload ) { } void afterStateWork ( S state , P payload ) { } <START_BUG> void errorStateWork ( S state , P payload , Exception error ) ; <END_BUG> }

Fix:
void errorStateWork ( S state , P payload , Throwable error ) ;
Buggy code:
@ RunWith ( Arquillian . class ) @ ServerSetup ( CreateQueueSetupTask . class ) public class JMSMessageDrivenBeanTestCase { @ Deployment public static Archive < ? > deployment ( ) { <START_BUG> final Archive < ? > deployment = ShrinkWrap . create ( JavaArchive . class , "ejb3mdb.jar" ) . addPackage ( ReplyingMDB . class . getPackage ( ) ) . addClass ( CreateQueueSetupTask . class ) ; <END_BUG> return deployment ; } @ Test public void testSendMessage ( ) throws JMSException , NamingException { } }

Fix:
final Archive < ? > deployment = ShrinkWrap . create ( JavaArchive . class , "ejb3mdb.jar" ) . addClasses ( ReplyingMDB . class , JMSMessagingUtil . class ) . addClass ( CreateQueueSetupTask . class ) ;
Buggy code:
public class ParametersProcessor { private HttpServletRequest req ; private Route route ; public ParametersProcessor ( HttpServletRequest req , Route route ) { } private Object getNullOrZero ( Class < ? > clazz ) { } private Object getValue ( Class < ? > clazz , RAFParameter rp , String value ) throws RAFException { } public Object [ ] getParameters ( ) throws RAFException { List < RAFParameter > rafParameters = route . getParameters ( ) ; List < Object > objects = new ArrayList < Object > ( ) ; for ( RAFParameter rafParameter : rafParameters ) { String paramValue = req . getParameter ( rafParameter . getParameterName ( ) ) ; if ( ( paramValue == null ) && ( rafParameter . isMandatory ( ) ) ) { throw new RAFException ( RAFException . ERRCODE_INVALID_PARAMETER_VALUE , String . format ( "Parameter<seq2seq4repair_space>%s<seq2seq4repair_space>is<seq2seq4repair_space>mandatory" , rafParameter . getParameterName ( ) ) ) ; } else if ( paramValue != null ) { objects . add ( getValue ( rafParameter . getClazz ( ) , rafParameter , paramValue ) ) ; } else { <START_BUG> if ( ( rafParameter . getDefaultValue ( ) ) != null ) { <END_BUG> objects . add ( getValue ( rafParameter . getClazz ( ) , rafParameter , rafParameter . getDefaultValue ( ) ) ) ; } else { objects . add ( getNullOrZero ( rafParameter . getClazz ( ) ) ) ; } } } return objects . toArray ( new Object [ 0 ] ) ; } }

Fix:
if ( ! ( rafParameter . getDefaultValue ( ) . equalsIgnoreCase ( DEFAULT_UNASSIGNED_PARAMETER ) ) ) {
Buggy code:
public abstract class TransactionSynchronizationUtils { private static final Log logger = LogFactory . getLog ( TransactionSynchronizationUtils . class ) ; private static final boolean aopAvailable = ClassUtils . isPresent ( "org.springframework.aop.scope.ScopedObject" , TransactionSynchronizationUtils . class . getClassLoader ( ) ) ; public static boolean sameResourceFactory ( ResourceTransactionManager tm , Object resourceFactory ) { } static Object unwrapResourceIfNecessary ( Object resource ) { Assert . notNull ( resource , "Resource<seq2seq4repair_space>must<seq2seq4repair_space>not<seq2seq4repair_space>be<seq2seq4repair_space>null" ) ; Object resourceRef = resource ; if ( resourceRef instanceof InfrastructureProxy ) { resourceRef = ( ( InfrastructureProxy ) ( resourceRef ) ) . getWrappedObject ( ) ; } if ( TransactionSynchronizationUtils . aopAvailable ) { <START_BUG> resourceRef = TransactionSynchronizationUtils . ScopedProxyUnwrapper . unwrapIfNecessary ( resource ) ; <END_BUG> } return resourceRef ; } public static void triggerFlush ( ) { } public static void triggerBeforeCommit ( boolean readOnly ) { } public static void triggerBeforeCompletion ( ) { } public static void triggerAfterCommit ( ) { } public static void invokeAfterCommit ( List < TransactionSynchronization > synchronizations ) { } public static void triggerAfterCompletion ( int completionStatus ) { } public static void invokeAfterCompletion ( List < TransactionSynchronization > synchronizations , int completionStatus ) { } private static class ScopedProxyUnwrapper { public static Object unwrapIfNecessary ( Object resource ) { } } }

Fix:
resourceRef = TransactionSynchronizationUtils . ScopedProxyUnwrapper . unwrapIfNecessary ( resourceRef ) ;
Buggy code:
public class AnonymousMechanism extends AbstractMechanism { @ Override public byte [ ] getInitialResponse ( ) { <START_BUG> return null ; <END_BUG> } @ Override public byte [ ] getChallengeResponse ( byte [ ] challenge ) { } @ Override public int getPriority ( ) { } @ Override public String getName ( ) { } }

Fix:
return EMPTY ;
Buggy code:
public class RouteFactory { private final iHeader headBuilder ; private final iBody bodyBuilder ; public RouteFactory ( iHeader headBuilder , iBody bodyBuilder ) { } public Map < String , iResponse > buildRoutes ( ) throws IOException { Map < String , iResponse > routes = new HashMap < > ( ) ; GetRouter getRouter = new GetRouter ( headBuilder , bodyBuilder ) ; GetFileRouter getFileRouter = new GetFileRouter ( headBuilder ) ; OptionsRouter optionsRouter = new OptionsRouter ( headBuilder , bodyBuilder ) ; PostRouter postRouter = new PostRouter ( headBuilder , bodyBuilder ) ; PutRouter putRouter = new PutRouter ( headBuilder , bodyBuilder ) ; HeadRouter headRouter = new HeadRouter ( headBuilder , bodyBuilder ) ; RedirectRouter redirectRouter = new RedirectRouter ( headBuilder , bodyBuilder ) ; DeleteRouter deleteRouter = new DeleteRouter ( headBuilder , bodyBuilder ) ; routes . put ( "GET" , getRouter ) ; <START_BUG> routes . put ( "GetFileRouter" , getRouter ) ; <END_BUG> routes . put ( "OPTIONS" , optionsRouter ) ; routes . put ( "POST" , postRouter ) ; routes . put ( "PUT" , putRouter ) ; routes . put ( "HEAD" , headRouter ) ; routes . put ( "REDIRECT" , redirectRouter ) ; routes . put ( "DELETE" , deleteRouter ) ; return routes ; } }

Fix:
routes . put ( "GetFileRouter" , getFileRouter ) ;
Buggy code:
public class CompletionOnClassReference extends CompletionOnSingleTypeReference { public CompletionOnClassReference ( char [ ] source , long pos ) { } public StringBuffer printExpression ( int indent , StringBuffer output ) { <START_BUG> return output . append ( "<CompleteOnClass:" ) . append ( token ) . append ( '>' ) ; <END_BUG> } }

Fix:
return output . append ( "<CompleteOnClass:" ) . append ( this . token ) . append ( '>' ) ;
Buggy code:
public class SSTableWriterTest extends CleanupHelper { @ Test public void testRecoverAndOpen ( ) throws IOException , InterruptedException , ExecutionException { RowMutation rm ; rm = new RowMutation ( "Keyspace1" , ByteBufferUtil . bytes ( "k1" ) ) ; rm . add ( new org . apache . cassandra . db . filter . QueryPath ( "Indexed1" , null , ByteBufferUtil . bytes ( "birthdate" ) ) , FBUtilities . toByteBuffer ( 1L ) , 0 ) ; rm . apply ( ) ; ColumnFamily cf = ColumnFamily . create ( "Keyspace1" , "Indexed1" ) ; cf . addColumn ( new Column ( ByteBufferUtil . bytes ( "birthdate" ) , FBUtilities . toByteBuffer ( 1L ) , 0 ) ) ; cf . addColumn ( new Column ( ByteBufferUtil . bytes ( "anydate" ) , FBUtilities . toByteBuffer ( 1L ) , 0 ) ) ; Map < ByteBuffer , ByteBuffer > entries = new HashMap < ByteBuffer , ByteBuffer > ( ) ; DataOutputBuffer buffer = new DataOutputBuffer ( ) ; ColumnFamily . serializer ( ) . serializeWithIndexes ( cf , buffer ) ; entries . put ( ByteBufferUtil . bytes ( "k2" ) , ByteBuffer . wrap ( Arrays . copyOf ( buffer . getData ( ) , buffer . getLength ( ) ) ) ) ; cf . clear ( ) ; cf . addColumn ( new Column ( ByteBufferUtil . bytes ( "anydate" ) , FBUtilities . toByteBuffer ( 1L ) , 0 ) ) ; buffer = new DataOutputBuffer ( ) ; ColumnFamily . serializer ( ) . serializeWithIndexes ( cf , buffer ) ; entries . put ( ByteBufferUtil . bytes ( "k3" ) , ByteBuffer . wrap ( Arrays . copyOf ( buffer . getData ( ) , buffer . getLength ( ) ) ) ) ; <START_BUG> SSTableReader orig = SSTableUtils . writeRawSSTable ( "Keyspace1" , "Indexed1" , entries ) ; <END_BUG> FileUtils . deleteWithConfirm ( orig . descriptor . filenameFor ( PRIMARY_INDEX ) ) ; FileUtils . deleteWithConfirm ( orig . descriptor . filenameFor ( FILTER ) ) ; SSTableReader sstr = instance . submitSSTableBuild ( orig . descriptor ) . get ( ) ; assert sstr != null ; ColumnFamilyStore cfs = Table . open ( "Keyspace1" ) . getColumnFamilyStore ( "Indexed1" ) ; cfs . addSSTable ( sstr ) ; cfs . buildSecondaryIndexes ( cfs . getSSTables ( ) , cfs . getIndexedColumns ( ) ) ; IndexExpression expr = new IndexExpression ( ByteBufferUtil . bytes ( "birthdate" ) , IndexOperator . EQ , FBUtilities . toByteBuffer ( 1L ) ) ; IndexClause clause = new IndexClause ( Arrays . asList ( expr ) , FBUtilities . EMPTY_BYTE_BUFFER , 100 ) ; IFilter filter = new IdentityQueryFilter ( ) ; IPartitioner p = StorageService . getPartitioner ( ) ; Range range = new Range ( p . getMinimumToken ( ) , p . getMinimumToken ( ) ) ; List < Row > rows = cfs . scan ( clause , range , filter ) ; assertEquals ( "IndexExpression<seq2seq4repair_space>should<seq2seq4repair_space>return<seq2seq4repair_space>two<seq2seq4repair_space>rows<seq2seq4repair_space>on<seq2seq4repair_space>recoverAndOpen" , 2 , rows . size ( ) ) ; assertTrue ( "First<seq2seq4repair_space>result<seq2seq4repair_space>should<seq2seq4repair_space>be<seq2seq4repair_space>'k1'" , ByteBufferUtil . bytes ( "k1" ) . equals ( rows . get ( 0 ) . key . key ) ) ; } }

Fix:
SSTableReader orig = SSTableUtils . prepare ( ) . cf ( "Indexed1" ) . writeRaw ( entries ) ;
Buggy code:
public class Graph extends JPanel { private ArrayList < double [ ] > data = new ArrayList < double [ ] > ( ) ; double xMax = 1 ; double yMax = 1 ; double xMin = 0 ; double yMin = 0 ; int graphWidth ; int graphHeight ; double dotRadius = 2 ; int freq = 0 ; int MAX_POINTS = 1000 ; boolean shouldDisplayAllData = false ; public Graph ( double w , double h ) { } public void paintComponent ( Graphics g ) { <START_BUG> Vector origin = new Vector ( ( ( ( 0 - ( xMin ) ) // ( ( xMax ) - ( xMin ) ) ) * ( graphWidth ) ) , ( ( graphHeight ) - ( ( ( 0 - ( yMin ) ) // ( ( yMax ) - ( yMin ) ) ) * ( graphHeight ) ) ) ) ; <END_BUG> g . drawRect ( ( ( int ) ( origin . getX ( ) ) ) , 0 , 2 , graphHeight ) ; g . drawRect ( 0 , ( ( int ) ( origin . getY ( ) ) ) , graphWidth , 2 ) ; if ( ! ( shouldDisplayAllData ) ) { if ( ( data . size ( ) ) < ( MAX_POINTS ) ) { for ( int i = 0 ; i < ( data . size ( ) ) ; i ++ ) { double [ ] point = data . get ( i ) ; g . fillOval ( ( ( int ) ( ( ( ( point [ 0 ] ) - ( xMin ) ) // ( ( xMax ) - ( xMin ) ) ) * ( ( graphWidth ) - ( ( ( ( dotRadius ) * 2 ) * 2 ) * 2 ) ) ) ) , ( ( int ) ( ( graphHeight ) - ( ( ( ( point [ 1 ] ) - ( yMin ) ) // ( ( yMax ) - ( yMin ) ) ) * ( graphHeight ) ) ) ) , ( ( int ) ( ( dotRadius ) * 2 ) ) , ( ( int ) ( ( dotRadius ) * 2 ) ) ) ; } } else { for ( int i = ( data . size ( ) ) - ( MAX_POINTS ) ; i < ( data . size ( ) ) ; i ++ ) { double [ ] point = data . get ( i ) ; g . fillOval ( ( ( int ) ( ( ( ( point [ 0 ] ) - ( xMin ) ) // ( ( xMax ) - ( xMin ) ) ) * ( ( graphWidth ) - ( ( ( ( dotRadius ) * 2 ) * 2 ) * 2 ) ) ) ) , ( ( int ) ( ( graphHeight ) - ( ( ( ( point [ 1 ] ) - ( yMin ) ) // ( ( yMax ) - ( yMin ) ) ) * ( graphHeight ) ) ) ) , ( ( int ) ( ( dotRadius ) * 2 ) ) , ( ( int ) ( ( dotRadius ) * 2 ) ) ) ; } } } else { for ( int i = 0 ; i < ( data . size ( ) ) ; i ++ ) { double [ ] point = data . get ( i ) ; g . fillOval ( ( ( int ) ( ( ( ( point [ 0 ] ) - ( xMin ) ) // ( ( xMax ) - ( xMin ) ) ) * ( graphWidth ) ) ) , ( ( int ) ( ( graphHeight ) - ( ( ( ( point [ 1 ] ) - ( yMin ) ) // ( ( yMax ) - ( yMin ) ) ) * ( graphHeight ) ) ) ) , ( ( int ) ( ( dotRadius ) * 2 ) ) , ( ( int ) ( ( dotRadius ) * 2 ) ) ) ; } } } public void reGraph ( ) { } public void addPoint ( double [ ] toadd ) { } public void updateSize ( ) { } public void setData ( ArrayList < double [ ] > p ) { } public void resetData ( ) { } public void resizeGraph ( int w , int h , boolean b ) { } }

Fix:
Vector origin = new Vector ( ( ( ( 0 - ( xMin ) ) // ( ( xMax ) - ( xMin ) ) ) * ( ( graphWidth ) - ( ( ( ( dotRadius ) * 2 ) * 2 ) * 2 ) ) ) , ( ( graphHeight ) - ( ( ( 0 - ( yMin ) ) // ( ( yMax ) - ( yMin ) ) ) * ( graphHeight ) ) ) ) ;
Buggy code:
public class ScpToMessage extends AbstractSshMessage { private static final int BUFFER_SIZE = 1024 ; private File localFile ; private String remotePath ; private List directoryList ; public ScpToMessage ( boolean verbose , Session session , File aLocalFile , String aRemotePath ) { } public ScpToMessage ( boolean verbose , Session session , List aDirectoryList , String aRemotePath ) { } private ScpToMessage ( boolean verbose , Session session , String aRemotePath ) { } public ScpToMessage ( Session session , File aLocalFile , String aRemotePath ) { } public ScpToMessage ( Session session , List aDirectoryList , String aRemotePath ) { } public void execute ( ) throws JSchException , IOException { } private void doSingleTransfer ( ) throws JSchException , IOException { } private void doMultipleTransfer ( ) throws JSchException , IOException { <START_BUG> Channel channel = openExecChannel ( ( "scp<seq2seq4repair_space>-d<seq2seq4repair_space>-t<seq2seq4repair_space>" + ( remotePath ) ) ) ; <END_BUG> try { OutputStream out = channel . getOutputStream ( ) ; InputStream in = channel . getInputStream ( ) ; channel . connect ( ) ; waitForAck ( in ) ; for ( Iterator i = directoryList . iterator ( ) ; i . hasNext ( ) ; ) { Directory current = ( ( Directory ) ( i . next ( ) ) ) ; sendDirectory ( current , in , out ) ; } } finally { if ( channel != null ) { channel . disconnect ( ) ; } } } private void sendDirectory ( Directory current , InputStream in , OutputStream out ) throws IOException { } private void sendDirectoryToRemote ( Directory directory , InputStream in , OutputStream out ) throws IOException { } private void sendFileToRemote ( File localFile , InputStream in , OutputStream out ) throws IOException { } public File getLocalFile ( ) { } public String getRemotePath ( ) { } }

Fix:
Channel channel = openExecChannel ( ( "scp<seq2seq4repair_space>-r<seq2seq4repair_space>-d<seq2seq4repair_space>-t<seq2seq4repair_space>" + ( remotePath ) ) ) ;
Buggy code:
public class RaXmlDeploymentProcessor implements DeploymentUnitProcessor { private final MetadataRepository mdr ; public RaXmlDeploymentProcessor ( final MetadataRepository mdr ) { } public void deploy ( DeploymentPhaseContext phaseContext ) throws DeploymentUnitProcessingException { final DeploymentUnit deploymentUnit = phaseContext . getDeploymentUnit ( ) ; final ManagementResourceRegistration registration = deploymentUnit . getAttachment ( MUTABLE_REGISTRATION_ATTACHMENT ) ; final ConnectorXmlDescriptor connectorXmlDescriptor = deploymentUnit . getAttachment ( ATTACHMENT_KEY ) ; if ( connectorXmlDescriptor == null ) { return ; } ResourceAdaptersService . ModifiableResourceAdaptors raxmls = null ; final ServiceController < ? > raService = phaseContext . getServiceRegistry ( ) . getService ( RESOURCEADAPTERS_SERVICE ) ; if ( raService != null ) raxmls = ( ( ResourceAdaptersService . ModifiableResourceAdaptors ) ( raService . getValue ( ) ) ) ; ConnectorLogger . ROOT_LOGGER . tracef ( "processing<seq2seq4repair_space>Raxml" ) ; Module module = deploymentUnit . getAttachment ( MODULE ) ; if ( module == null ) throw ConnectorMessages . MESSAGES . failedToGetModuleAttachment ( deploymentUnit ) ; try { final ServiceTarget serviceTarget = phaseContext . getServiceTarget ( ) ; String deploymentUnitPrefix = "" ; if ( ( deploymentUnit . getParent ( ) ) != null ) { deploymentUnitPrefix = ( deploymentUnit . getParent ( ) . getName ( ) ) + "#" ; } final String deploymentUnitName = deploymentUnitPrefix + ( deploymentUnit . getName ( ) ) ; final String deployment ; if ( ( deploymentUnitName . lastIndexOf ( '.' ) ) == ( - 1 ) ) { deployment = deploymentUnitName ; } else { deployment = deploymentUnitName . substring ( 0 , deploymentUnitName . lastIndexOf ( '.' ) ) ; } if ( raxmls != null ) { for ( ResourceAdapter raxml : raxmls . getResourceAdapters ( ) ) { String rarName = raxml . getArchive ( ) ; Integer identifier = null ; if ( rarName . contains ( RA_SERVICE_NAME_SEPARATOR ) ) { rarName = rarName . substring ( 0 , rarName . indexOf ( RA_SERVICE_NAME_SEPARATOR ) ) ; } if ( deploymentUnitName . equals ( rarName ) ) { RaServicesFactory . createDeploymentService ( registration , connectorXmlDescriptor , module , serviceTarget , deploymentUnitName , deployment , raxml ) ; } } } ServiceName serviceName = INACTIVE_RESOURCE_ADAPTER_SERVICE . append ( deploymentUnitName ) ; <START_BUG> InactiveResourceAdapterDeploymentService service = new InactiveResourceAdapterDeploymentService ( connectorXmlDescriptor , module , deployment , deploymentUnitName , registration ) ; <END_BUG> ServiceBuilder builder = serviceTarget . addService ( serviceName , service ) ; builder . setInitialMode ( ACTIVE ) . install ( ) ; } catch ( Throwable t ) { throw new DeploymentUnitProcessingException ( t ) ; } } public void undeploy ( final DeploymentUnit context ) { } }

Fix:
InactiveResourceAdapterDeploymentService service = new InactiveResourceAdapterDeploymentService ( connectorXmlDescriptor , module , deployment , deploymentUnitName , registration , serviceTarget ) ;
Buggy code:
public class MaTempo extends MenuAbstrait { public MaTempo ( String title ) { } protected String [ ] nomOptions ( ) { } protected void lancerOption ( int i ) { switch ( i ) { case 0 : new Didacticiel ( "Didacticiel" ) ; voix . playWav ( "..//ressources//sons//menu//didacticiel_Ulysse.wav" ) ; break ; case 1 : <START_BUG> new Facil ( "Facile" , "+" , 25 ) ; <END_BUG> voix . playWav ( "..//ressources//sons//menu//facile_Ulysse.wav" ) ; break ; case 2 : new Moyen ( "Moyen" , "-" , 10 ) ; voix . playWav ( "..//ressources//sons//menu//moyen_Ulysse.wav" ) ; break ; case 3 : new Difficile ( "Difficile" , "*" , 10 ) ; voix . playWav ( "..//ressources//sons//menu//difficile_Ulysse.wav" ) ; break ; case 4 : new Difficile ( "Expert" , "*" , 20 ) ; voix . playWav ( "..//ressources//sons//menu//expert_Ulysse.wav" ) ; break ; case 5 : voix . playWav ( "..//ressources//sons//menu//quitter_Ulysse.wav" ) ; System . exit ( 0 ) ; default : System . err . println ( "action<seq2seq4repair_space>non<seq2seq4repair_space>d�finie" ) ; } } protected String wavAccueil ( ) { } protected String wavRegleJeu ( ) { } }

Fix:
new Facil ( "Facile" , "+" , 20 ) ;
Buggy code:
public final class ServerExtensionAdd extends AbstractServerModelUpdate < Void > { private static final long serialVersionUID = 3718982114819320314L ; private final String moduleName ; public ServerExtensionAdd ( final String moduleName ) { } protected void applyUpdate ( final ServerModel element ) throws UpdateFailedException { } public < P > void applyUpdate ( final UpdateContext updateContext , final UpdateResultHandler < ? super Void , P > handler , final P param ) { } <START_BUG> public void applyUpdateBootAction ( final UpdateContext updateContext ) { <END_BUG> try { for ( Extension extension : Module . loadServiceFromCurrent ( ModuleIdentifier . fromString ( moduleName ) , Extension . class ) ) { extension . activate ( null ) ; } } catch ( ModuleLoadException e ) { } } public ServerExtensionRemove getCompensatingUpdate ( final ServerModel original ) { } }

Fix:
public void applyUpdateBootAction ( final BootUpdateContext updateContext ) {