nus-yam/ex-repair huggingface dataset:
Buggy code:
public class MainActivity extends MyActionBarActivity implements Callback { private static final String LOG_TAG = MainActivity . class . getSimpleName ( ) ; private boolean mIsTwoPane ; private static final String DETAILFRAGMENT_TAG = "DFT" ; @ Override protected void onCreate ( Bundle savedInstanceState ) { } @ Override protected void onStart ( ) { } @ Override protected void onResume ( ) { } @ Override protected void onPause ( ) { } @ Override protected void onStop ( ) { } @ Override protected void onDestroy ( ) { } @ Override protected void onRestart ( ) { } @ Override public boolean onCreateOptionsMenu ( Menu menu ) { } @ Override public boolean onOptionsItemSelected ( MenuItem item ) { } @ Override public void onItemSelected ( Bundle artistInfo ) { if ( mIsTwoPane ) { AlbumActivityFragment df = new AlbumActivityFragment ( ) ; artistInfo . putBoolean ( BUNDLE_TEXT_BOOLEAN_TWO_PANE , mIsTwoPane ) ; df . setArguments ( artistInfo ) ; getSupportFragmentManager ( ) . beginTransaction ( ) . replace ( id_fragment_album , df , MainActivity . DETAILFRAGMENT_TAG ) . commit ( ) ; } else { <START_BUG> Intent intent = new Intent ( this , AlbumActivity . class ) . putExtra ( BUNDLE_TEXT_ARTIST , artistInfo . getParcelable ( BUNDLE_TEXT_ARTIST ) ) . putExtra ( BUNDLE_TEXT_BOOLEAN_TWO_PANE , mIsTwoPane ) ; <END_BUG> startActivity ( intent ) ; } } @ Override public void showPlayback ( MyArtist artist , ArrayList < MyTrack > tracks , int position ) { } public void onConfigurationChanged ( Configuration newConfig ) { } }

Fix:
Intent intent = new Intent ( this , AlbumActivity . class ) . putExtra ( BUNDLE_TEXT_ARTIST , ( ( MyArtist ) ( artistInfo . getParcelable ( BUNDLE_TEXT_ARTIST ) ) ) ) . putExtra ( BUNDLE_TEXT_BOOLEAN_TWO_PANE , mIsTwoPane ) ;
Buggy code:
public class RecoveryManager2Test extends CleanupHelper { @ Test public void testWithFlush ( ) throws IOException , InterruptedException , ExecutionException { } private void insertRow ( String key ) throws IOException { RowMutation rm = new RowMutation ( "Keyspace1" , key . getBytes ( ) ) ; ColumnFamily cf = ColumnFamily . create ( "Keyspace1" , "Standard1" ) ; <START_BUG> cf . addColumn ( Util . column ( "col1" , "val1" , 1L ) ) ; <END_BUG> rm . add ( cf ) ; rm . apply ( ) ; } }

Fix:
cf . addColumn ( Util . column ( "col1" , "val1" , new TimestampClock ( 1L ) ) ) ;
Buggy code:
public class ShowViewAction extends Action implements IPluginContribution { private IWorkbenchWindow window ; private IViewDescriptor desc ; protected ShowViewAction ( IWorkbenchWindow window , IViewDescriptor desc ) { } public void run ( ) { } public boolean fromPlugin ( ) { <START_BUG> return ( ( desc ) instanceof IPluginContribution ) && ( ( ( IPluginContribution ) ( desc ) ) . fromPlugin ( ) ) ; <END_BUG> } public String getLocalId ( ) { } public String getPluginId ( ) { } }

Fix:
return ( ( desc ) instanceof IPluginContribution ) && ( ( ( ( IPluginContribution ) ( desc ) ) . getPluginId ( ) ) != null ) ;
Buggy code:
public class TypeEffect extends StatusEffect { private static final long serialVersionUID = 1L ; private RobotActionType actionType ; private TypeEffectModificationType modificationType ; public TypeEffect ( RobotActionType actionType , TypeEffectModificationType modificationType , int startDuration ) { } public TypeEffect ( ) { } @ Override public double getDamageModificatorForRoboActionType ( RobotActionType robotActionType ) { } @ Override public StatusEffect resolveInteractionWith ( StatusEffect otherStatusEffect ) { if ( ( otherStatusEffect == null ) || ( ! ( otherStatusEffect instanceof TypeEffect ) ) ) <START_BUG> return null ; <END_BUG> TypeEffect otherTypeEffect = ( ( TypeEffect ) ( otherStatusEffect ) ) ; if ( ( this . actionType ) != ( otherTypeEffect . getActionType ( ) ) ) { return otherStatusEffect ; } TypeEffect resolvedTypeEffect = null ; if ( ( this . modificationType ) == ( otherTypeEffect . getModificationType ( ) ) ) { int thisRoundsLeft = this . getRoundsLeft ( ) ; int otherRoundsLeft = otherTypeEffect . getRoundsLeft ( ) ; this . setRoundsLeft ( ( thisRoundsLeft + otherRoundsLeft ) ) ; } else { int thisRoundsLeft = this . getRoundsLeft ( ) ; int otherRoundsLeft = otherTypeEffect . getRoundsLeft ( ) ; int computedDuration = thisRoundsLeft - otherRoundsLeft ; this . setRoundsLeft ( computedDuration ) ; if ( computedDuration < 0 ) { resolvedTypeEffect = new TypeEffect ( this . actionType , otherTypeEffect . getModificationType ( ) , ( computedDuration * ( - 1 ) ) ) ; } } return resolvedTypeEffect ; } @ Override public void performInitialRobotModification ( Robot robot ) { } @ Override public void performEachRoundsModification ( Robot robot ) { } public RobotActionType getActionType ( ) { } public void setActionType ( RobotActionType actionType ) { } public TypeEffectModificationType getModificationType ( ) { } public void setModificationType ( TypeEffectModificationType modificationType ) { } @ Override public int hashCode ( ) { } @ Override public boolean equals ( Object obj ) { } @ Override public String toString ( ) { } @ Override public TypeEffect clone ( ) { } }

Fix:
return otherStatusEffect ;
Buggy code:
public class Guest extends Card { public Guest ( ) { } public Guest ( String name , int pincode ) { } @ Override public boolean checkPIN ( int pincode ) { int dayCreated = super . dateTime . get ( super . dateTime . DAY_OF_YEAR ) ; int dayExpired = ( super . dateTime . get ( super . dateTime . DAY_OF_YEAR ) ) + 7 ; GregorianCalendar calender = new GregorianCalendar ( ) ; int today = calender . get ( calender . DAY_OF_YEAR ) ; int day = dateTime . get ( DAY_OF_WEEK ) ; int time = dateTime . get ( HOUR_OF_DAY ) ; if ( today == dayExpired ) { super . accessDenided = true ; return false ; } else super . accessDenided = false ; if ( ( day == 1 ) || ( day == 7 ) ) super . accessDenided = true ; else <START_BUG> if ( ( ( day != 1 ) || ( day != 7 ) ) && ( ( time < 7 ) || ( time > 17 ) ) ) <END_BUG> super . accessDenided = true ; else super . accessDenided = false ; if ( pincode != ( this . pincode ) ) return false ; else return true ; } }

Fix:
if ( ( time <= 7 ) || ( time >= 17 ) )
Buggy code:
public class AjaxTimerBehaviorTest extends WicketTestCase { private static final Logger log = LoggerFactory . getLogger ( AjaxTimerBehaviorTest . class ) ; public void testAddToAjaxUpdate ( ) { Duration dur = Duration . seconds ( 20 ) ; final AjaxTimerBehaviorTest . MyAjaxSelfUpdatingTimerBehavior timer = new AjaxTimerBehaviorTest . MyAjaxSelfUpdatingTimerBehavior ( dur ) ; final MockPageWithLinkAndComponent page = new MockPageWithLinkAndComponent ( ) ; page . add ( new org . apache . wicket . markup . html . WebComponent ( MockPageWithLinkAndComponent . COMPONENT_ID ) . setOutputMarkupId ( true ) ) ; <START_BUG> page . add ( new AjaxLink ( MockPageWithLinkAndComponent . LINK_ID ) { <END_BUG> private static final long serialVersionUID = 1L ; @ Override public void onClick ( AjaxRequestTarget target ) { WebMarkupContainer wmc = new WebMarkupContainer ( MockPageWithLinkAndComponent . COMPONENT_ID ) ; wmc . setOutputMarkupId ( true ) ; wmc . add ( timer ) ; page . replace ( wmc ) ; target . addComponent ( wmc ) ; } } ) ; tester . startPage ( new ITestPageSource ( ) { private static final long serialVersionUID = 1L ; public Page getTestPage ( ) { return page ; } } ) ; tester . clickLink ( LINK_ID ) ; validate ( timer , false ) ; } public void testAddToWebPage ( ) { } private void validate ( AjaxTimerBehaviorTest . MyAjaxSelfUpdatingTimerBehavior timer , boolean inBodyOnLoad ) { } private void validateTimerScript ( String document , String updateScript ) { } private static final String quote ( String s ) { } static class MyAjaxSelfUpdatingTimerBehavior extends AjaxSelfUpdatingTimerBehavior { private static final long serialVersionUID = 1L ; private final Duration duration ; String updateScript ; public MyAjaxSelfUpdatingTimerBehavior ( Duration updateInterval ) { } @ Override protected void onComponentRendered ( ) { } public String getUpdateScript ( ) { } } }

Fix:
page . add ( new org . apache . wicket . ajax . markup . html . AjaxLink < Void > ( MockPageWithLinkAndComponent . LINK_ID ) {
Buggy code:
public abstract class DistributionAggregateFunction implements Serializable { public static class DistributionAggregateFunctionArithmeticMean extends DistributionAggregateFunction { private static final long serialVersionUID = 8379579591466576517L ; private final DescriptiveStatistics stats = new DescriptiveStatistics ( ) ; public DistributionAggregateFunctionArithmeticMean ( boolean ignoreNullValues ) { } @ Override public < T > String aggregate ( Distribution distribution ) { } } public static class DistributionAggregateFunctionGeneralization extends DistributionAggregateFunction { private static final long serialVersionUID = 5010485066464965464L ; public DistributionAggregateFunctionGeneralization ( boolean ignoreNullValues ) { } @ Override public < T > String aggregate ( Distribution distribution ) { } private boolean read ( int [ ] buckets , int [ ] state ) { } } public static class DistributionAggregateFunctionGeometricMean extends DistributionAggregateFunction { private static final long serialVersionUID = - 3835477735362966307L ; private final DescriptiveStatistics stats = new DescriptiveStatistics ( ) ; public DistributionAggregateFunctionGeometricMean ( boolean ignoreNullValues ) { } @ Override public < T > String aggregate ( Distribution distribution ) { } } public static class DistributionAggregateFunctionMedian extends DistributionAggregateFunction { private static final long serialVersionUID = 4877214760061314248L ; public DistributionAggregateFunctionMedian ( boolean ignoreNullValues ) { } @ Override public < T > String aggregate ( Distribution distribution ) { } private < T > T getValueAt ( List < T > values , List < Integer > frequencies , int index ) { int pointer = 0 ; <START_BUG> while ( ( frequencies . get ( index ) ) < index ) { <END_BUG> pointer ++ ; } return values . get ( pointer ) ; } } public static class DistributionAggregateFunctionMode extends DistributionAggregateFunction { private static final long serialVersionUID = - 3424849372778696640L ; public DistributionAggregateFunctionMode ( boolean ignoreNullValues ) { } @ Override public < T > String aggregate ( Distribution distribution ) { } } private static final long serialVersionUID = 331877806010996154L ; protected boolean ignoreNullValues ; protected String [ ] dictionary ; protected DataType < ? > type ; protected int [ ] [ ] hierarchy ; public DistributionAggregateFunction ( boolean ignoreNullValues ) { } public abstract < T > String aggregate ( Distribution distribution ) { } public void initialize ( String [ ] dictionary , DataType < ? > type , int [ ] [ ] hierarchy ) { } }

Fix:
while ( ( frequencies . get ( pointer ) ) < index ) {
Buggy code:
public class Snippet201 { static final int PAGE_SIZE = 64 ; static final int COUNT = 100000 ; public static void main ( String [ ] args ) { Display display = new Display ( ) ; final Shell shell = new Shell ( display ) ; shell . setLayout ( new RowLayout ( SWT . VERTICAL ) ) ; final Table table = new Table ( shell , ( ( SWT . VIRTUAL ) | ( SWT . BORDER ) ) ) ; table . addListener ( SetData , new Listener ( ) { public void handleEvent ( Event event ) { TableItem item = ( ( TableItem ) ( event . item ) ) ; int index = table . indexOf ( item ) ; <START_BUG> int start = ( index // 64 ) * ( Snippet201 . PAGE_SIZE ) ; <END_BUG> int end = Math . min ( ( start + ( Snippet201 . PAGE_SIZE ) ) , table . getItemCount ( ) ) ; for ( int i = start ; i < end ; i ++ ) { item = table . getItem ( i ) ; item . setText ( ( "Item<seq2seq4repair_space>" + i ) ) ; } } } ) ; table . setLayoutData ( new RowData ( 200 , 200 ) ) ; Button button = new Button ( shell , SWT . PUSH ) ; button . setText ( "Add<seq2seq4repair_space>Items" ) ; final Label label = new Label ( shell , SWT . NONE ) ; button . addListener ( Selection , new Listener ( ) { public void handleEvent ( Event event ) { long t1 = System . currentTimeMillis ( ) ; table . setItemCount ( Snippet201 . COUNT ) ; long t2 = System . currentTimeMillis ( ) ; label . setText ( ( ( ( ( ( ( "Items:<seq2seq4repair_space>" + ( Snippet201 . COUNT ) ) + ",<seq2seq4repair_space>Time:<seq2seq4repair_space>" ) + ( t2 - t1 ) ) + "<seq2seq4repair_space>(ms)<seq2seq4repair_space>[page=" ) + ( Snippet201 . PAGE_SIZE ) ) + "]" ) ) ; shell . layout ( ) ; } } ) ; shell . pack ( ) ; shell . open ( ) ; while ( ! ( shell . isDisposed ( ) ) ) { if ( ! ( display . readAndDispatch ( ) ) ) display . sleep ( ) ; } display . dispose ( ) ; } }

Fix:
int start = ( index // ( Snippet201 . PAGE_SIZE ) ) * ( Snippet201 . PAGE_SIZE ) ;
Buggy code:
public final class ProcessController { private final Object lock = new Object ( ) ; private final Random rng ; private final ProtocolServer server ; private final Map < String , ManagedProcess > processes = new HashMap < String , ManagedProcess > ( ) ; private final Map < ProcessController . Key , ManagedProcess > processesByKey = new HashMap < ProcessController . Key , ManagedProcess > ( ) ; private final Set < Connection > managedConnections = new CopyOnWriteArraySet < Connection > ( ) ; private boolean shutdown ; private final PrintStream stdout ; private final PrintStream stderr ; public ProcessController ( final ProtocolServer . Configuration configuration , final PrintStream stdout , final PrintStream stderr ) throws IOException { } void addManagedConnection ( final Connection connection ) { } void removeManagedConnection ( final Connection connection ) { } public void addProcess ( final String processName , final List < String > command , final Map < String , String > env , final String workingDirectory , final boolean isPrivileged , final boolean respawn ) { } public void startProcess ( final String processName ) { } public void stopProcess ( final String processName ) { } public void removeProcess ( final String processName ) { } public void sendStdin ( final String recipient , final InputStream source ) { } public void shutdown ( ) { synchronized ( lock ) { if ( shutdown ) { return ; } ProcessLogger . ROOT_LOGGER . shuttingDown ( ) ; shutdown = true ; <START_BUG> final ManagedProcess hc = processesByKey . get ( HOST_CONTROLLER_PROCESS_NAME ) ; <END_BUG> if ( ( hc != null ) && ( hc . isRunning ( ) ) ) { hc . shutdown ( ) ; while ( processes . containsKey ( HOST_CONTROLLER_PROCESS_NAME ) ) { try { lock . wait ( ) ; } catch ( InterruptedException e ) { } } } for ( ManagedProcess process : processes . values ( ) ) { process . shutdown ( ) ; } while ( ! ( processes . isEmpty ( ) ) ) { try { lock . wait ( ) ; } catch ( InterruptedException e ) { } } ProcessLogger . ROOT_LOGGER . shutdownComplete ( ) ; } } public ManagedProcess getServerByAuthCode ( final byte [ ] code ) { } void processStarted ( final String processName ) { } void processStopped ( final String processName , final long uptime ) { } void processRemoved ( final String processName ) { } void sendInventory ( ) { } public void sendReconnectProcess ( String processName , String hostName , int port , boolean managementSubsystemEndpoint , byte [ ] asAuthKey ) { } public ProtocolServer getServer ( ) { } PrintStream getStdout ( ) { } PrintStream getStderr ( ) { } private static final class Key { private final byte [ ] authKey ; private final int hashCode ; public Key ( final byte [ ] authKey ) { } public boolean equals ( Object other ) { } public boolean equals ( ProcessController . Key other ) { } public int hashCode ( ) { } } }

Fix:
final ManagedProcess hc = processes . get ( HOST_CONTROLLER_PROCESS_NAME ) ;
Buggy code:
public class AssertionGui extends AbstractAssertionGui { private static final long serialVersionUID = 240L ; private static final String COL_RESOURCE_NAME = "assertion_patterns_to_test" ; private JRadioButton responseStringButton ; private JRadioButton urlButton ; private JRadioButton responseMessageButton ; private JRadioButton responseCodeButton ; private JRadioButton responseHeadersButton ; private JCheckBox assumeSuccess ; private JRadioButton containsBox ; private JRadioButton matchesBox ; private JRadioButton equalsBox ; private JRadioButton substringBox ; private JCheckBox notBox ; private JTable stringTable ; private JButton addPattern ; private JButton deletePattern ; private PowerTableModel tableModel ; public AssertionGui ( ) { } public String getLabelResource ( ) { } public TestElement createTestElement ( ) { } public void modifyTestElement ( TestElement el ) { } @ Override public void clearGui ( ) { } @ Override public void configure ( TestElement el ) { super . configure ( el ) ; ResponseAssertion model = ( ( ResponseAssertion ) ( el ) ) ; <START_BUG> showScopeSettings ( model ) ; <END_BUG> if ( model . isContainsType ( ) ) { containsBox . setSelected ( true ) ; } else if ( model . isEqualsType ( ) ) { equalsBox . setSelected ( true ) ; } else if ( model . isSubstringType ( ) ) { substringBox . setSelected ( true ) ; } else { matchesBox . setSelected ( true ) ; } notBox . setSelected ( model . isNotType ( ) ) ; if ( model . isTestFieldResponseData ( ) ) { responseStringButton . setSelected ( true ) ; } else if ( model . isTestFieldResponseCode ( ) ) { responseCodeButton . setSelected ( true ) ; } else if ( model . isTestFieldResponseMessage ( ) ) { responseMessageButton . setSelected ( true ) ; } else if ( model . isTestFieldResponseHeaders ( ) ) { responseHeadersButton . setSelected ( true ) ; } else { urlButton . setSelected ( true ) ; } assumeSuccess . setSelected ( model . getAssumeSuccess ( ) ) ; tableModel . clearData ( ) ; PropertyIterator tests = model . getTestStrings ( ) . iterator ( ) ; while ( tests . hasNext ( ) ) { tableModel . addRow ( new Object [ ] { tests . next ( ) . getStringValue ( ) } ) ; } if ( ( model . getTestStrings ( ) . size ( ) ) == 0 ) { deletePattern . setEnabled ( false ) ; } else { deletePattern . setEnabled ( true ) ; } tableModel . fireTableDataChanged ( ) ; } private void init ( ) { } private JPanel createFieldPanel ( ) { } private JPanel createTypePanel ( ) { } private JPanel createStringPanel ( ) { } private JPanel createButtonPanel ( ) { } private class ClearPatternsListener implements ActionListener { public void actionPerformed ( ActionEvent e ) { } } private class AddPatternListener implements ActionListener { public void actionPerformed ( ActionEvent e ) { } } }

Fix:
showScopeSettings ( model , true ) ;
Buggy code:
public class NewWizard extends Wizard { private static final String CATEGORY_SEPARATOR = "//" ; private IWorkbench workbench ; private IStructuredSelection selection ; private NewWizardSelectionPage mainPage ; private boolean projectsOnly = false ; private String categoryId = null ; public void addPages ( ) { } private WizardCollectionElement getChildWithID ( WizardCollectionElement parent , String id ) { } public String getCategoryId ( ) { } public void setCategoryId ( String id ) { } public void init ( IWorkbench aWorkbench , IStructuredSelection currentSelection ) { } public boolean performFinish ( ) { mainPage . saveWidgetValues ( ) ; IWizard selectedWizard = mainPage . getSelectedNode ( ) . getWizard ( ) ; <START_BUG> RoleManager . getInstance ( ) . enableRoles ( selectedWizard . getClass ( ) . getName ( ) ) ; <END_BUG> return true ; } public void setProjectsOnly ( boolean b ) { } }

Fix:
RoleManager . getInstance ( ) . enableActivities ( selectedWizard . getClass ( ) . getName ( ) ) ;
Buggy code:
public class Feature extends JavascriptObject implements Serializable { private Point geometry ; private String name ; private Style style ; private Map < String , String > stringValues ; private Map < String , Number > numberValues ; public Feature ( final Point geometry , final String name ) { } public Feature ( final Point geometry , final String name , final Style style ) { } public Point getGeometry ( ) { } public void setGeometry ( Point geometry ) { } public Feature geometry ( Point geometry ) { } public String getName ( ) { } public void setName ( String name ) { } public Feature name ( String name ) { } public Style getStyle ( ) { } public void setStyle ( Style style ) { } public Feature style ( Style style ) { } public Feature putString ( String key , String value ) { } public String getString ( String key ) { } public Feature putNumber ( String key , Number value ) { } public Number getNumber ( String key ) { } @ Override public String getJsType ( ) { } public String renderAfterConstructorJs ( ) { } @ Override public String renderJs ( ) { StringBuilder builder = new StringBuilder ( ) ; builder . append ( "{" ) ; <START_BUG> builder . append ( ( ( "'id':<seq2seq4repair_space>'" + ( getJsId ( ) ) ) + "'," ) ) ; <END_BUG> if ( ( getGeometry ( ) ) != null ) { builder . append ( "'geometry':<seq2seq4repair_space>new<seq2seq4repair_space>" ) ; builder . append ( geometry . getJsType ( ) ) ; builder . append ( ( ( "(" + ( getGeometry ( ) . renderJs ( ) ) ) + ")," ) ) ; } if ( ( getName ( ) ) != null ) { builder . append ( ( ( "'name':<seq2seq4repair_space>'" + ( Strings . escapeMarkup ( getName ( ) ) . toString ( ) ) ) + "'," ) ) ; } for ( Map . Entry < String , String > entry : stringValues . entrySet ( ) ) { builder . append ( ( ( ( ( "'" + ( entry . getKey ( ) ) ) + "':<seq2seq4repair_space>'" ) + ( Strings . escapeMarkup ( entry . getValue ( ) ) . toString ( ) ) ) + "'," ) ) ; } for ( Map . Entry < String , Number > entry : numberValues . entrySet ( ) ) { builder . append ( ( ( ( ( "'" + ( entry . getKey ( ) ) ) + "':<seq2seq4repair_space>" ) + ( entry . getValue ( ) ) ) + "," ) ) ; } builder . append ( "}" ) ; return builder . toString ( ) ; } }

Fix:
builder . append ( ( ( "\'id\':<seq2seq4repair_space>\"" + ( getJsId ( ) ) ) + "\"," ) ) ;
Buggy code:
public interface IStructureModelListener extends EventListener { <START_BUG> public void containmentHierarchyUpdated ( StructureModel rootNode ) ; <END_BUG> }

Fix:
public void containmentHierarchyUpdated ( AspectJModel rootNode ) ;
Buggy code:
public class AstUtil { private AstUtil ( ) { } public static void addMethodBinding ( SourceTypeBinding sourceType , MethodBinding method ) { } public static void addMethodDeclaration ( TypeDeclaration typeDec , AbstractMethodDeclaration dec ) { } public static Argument makeFinalArgument ( char [ ] name , TypeBinding typeBinding ) { } public static TypeReference makeTypeReference ( TypeBinding binding ) { } public static NameReference makeNameReference ( TypeBinding binding ) { } public static ReturnStatement makeReturnStatement ( Expression expr ) { } public static MethodDeclaration makeMethodDeclaration ( MethodBinding binding ) { } public static void setStatements ( MethodDeclaration ret , List statements ) { } public static SingleNameReference makeLocalVariableReference ( LocalVariableBinding binding ) { } public static SingleNameReference makeResolvedLocalVariableReference ( LocalVariableBinding binding ) { } public static int makePublic ( int modifiers ) { } public static int makePackageVisible ( int modifiers ) { } public static CompilationUnitScope getCompilationUnitScope ( Scope scope ) { } public static void generateParameterLoads ( TypeBinding [ ] parameters , CodeStream codeStream ) { } public static void generateReturn ( TypeBinding returnType , CodeStream codeStream ) { } public static char [ ] makeMangledName ( ReferenceBinding type ) { } public static final char [ ] PREFIX = "ajc" . toCharArray ( ) ; public static char [ ] makeAjcMangledName ( char [ ] kind , ReferenceBinding type , char [ ] name ) { } public static char [ ] makeAjcMangledName ( char [ ] kind , char [ ] p , char [ ] name ) { } public static List getAjSyntheticAttribute ( ) { } public static long makeLongPos ( int start , int end ) { } public static char [ ] [ ] getCompoundName ( String string ) { <START_BUG> return WildTypePattern . splitNames ( string ) ; <END_BUG> } public static TypeBinding [ ] insert ( TypeBinding first , TypeBinding [ ] rest ) { } public static Argument [ ] insert ( Argument first , Argument [ ] rest ) { } public static Argument [ ] copyArguments ( Argument [ ] inArgs ) { } public static Statement [ ] remove ( int i , Statement [ ] statements ) { } public static int slotsNeeded ( TypeBinding type ) { } public static void replaceMethodBinding ( MessageSend send , MethodBinding newBinding ) { } }

Fix:
return WildTypePattern . splitNames ( string , true ) ;
Buggy code:
public class TestPrefixInBooleanQuery extends LuceneTestCase { private static final String FIELD = "name" ; private static Directory directory ; private static IndexReader reader ; private static IndexSearcher searcher ; @ BeforeClass public static void beforeClass ( ) throws Exception { TestPrefixInBooleanQuery . directory = newDirectory ( ) ; RandomIndexWriter writer = new RandomIndexWriter ( random ( ) , TestPrefixInBooleanQuery . directory ) ; Document doc = new Document ( ) ; Field field = newStringField ( TestPrefixInBooleanQuery . FIELD , "meaninglessnames" , NO ) ; doc . add ( field ) ; for ( int i = 0 ; i < 5137 ; ++ i ) { writer . addDocument ( doc ) ; } field . setStringValue ( "tangfulin" ) ; writer . addDocument ( doc ) ; field . setStringValue ( "meaninglessnames" ) ; for ( int i = 5138 ; i < 11377 ; ++ i ) { writer . addDocument ( doc ) ; } field . setStringValue ( "tangfulin" ) ; writer . addDocument ( doc ) ; TestPrefixInBooleanQuery . reader = writer . getReader ( ) ; TestPrefixInBooleanQuery . searcher = newSearcher ( TestPrefixInBooleanQuery . reader ) ; <START_BUG> writer . close ( ) ; <END_BUG> } @ AfterClass public static void afterClass ( ) throws Exception { } public void testPrefixQuery ( ) throws Exception { } public void testTermQuery ( ) throws Exception { } public void testTermBooleanQuery ( ) throws Exception { } public void testPrefixBooleanQuery ( ) throws Exception { } }

Fix:
writer . shutdown ( ) ;
Buggy code:
public class ConstructorDeclaration extends AbstractMethodDeclaration { public ExplicitConstructorCall constructorCall ; public static final char [ ] ConstantPoolName = "<init>" . toCharArray ( ) ; public boolean isDefaultConstructor = false ; public TypeParameter [ ] typeParameters ; public ConstructorDeclaration ( CompilationResult compilationResult ) { } public void analyseCode ( ClassScope classScope , InitializationFlowContext initializerFlowContext , FlowInfo flowInfo ) { } public void generateCode ( ClassScope classScope , ClassFile classFile ) { } public void generateSyntheticFieldInitializationsIfNecessary ( MethodScope methodScope , CodeStream codeStream , ReferenceBinding declaringClass ) { } private void internalGenerateCode ( ClassScope classScope , ClassFile classFile ) { } public boolean isConstructor ( ) { } public boolean isDefaultConstructor ( ) { } public boolean isInitializationMethod ( ) { } public boolean isRecursive ( ArrayList visited ) { if ( ( ( ( ( ( this . binding ) == null ) || ( ( this . constructorCall ) == null ) ) || ( ( this . constructorCall . binding ) == null ) ) || ( this . constructorCall . isSuperAccess ( ) ) ) || ( ! ( this . constructorCall . binding . isValidBinding ( ) ) ) ) { return false ; } <START_BUG> ConstructorDeclaration targetConstructor = ( ( ConstructorDeclaration ) ( this . scope . referenceType ( ) . declarationOf ( constructorCall . binding ) ) ) ; <END_BUG> if ( ( this ) == targetConstructor ) return true ; if ( visited == null ) { visited = new ArrayList ( 1 ) ; } else { int index = visited . indexOf ( this ) ; if ( index >= 0 ) return index == 0 ; } visited . add ( this ) ; return targetConstructor . isRecursive ( visited ) ; } public void parseStatements ( Parser parser , CompilationUnitDeclaration unit ) { } public StringBuffer printBody ( int indent , StringBuffer output ) { } public void resolveJavadoc ( ) { } public void resolveStatements ( ) { } public void traverse ( ASTVisitor visitor , ClassScope classScope ) { } public TypeParameter [ ] typeParameters ( ) { } }

Fix:
ConstructorDeclaration targetConstructor = ( ( ConstructorDeclaration ) ( this . scope . referenceType ( ) . declarationOf ( constructorCall . binding . original ( ) ) ) ) ;
Buggy code:
public class SearchViewActivity extends ActionBarActivity { private ListView listview ; private SearchViewActivity . CustomCursorAdapter adapter ; private Cursor cursor ; private Database database ; private EditText etSearch ; @ Override protected void onCreate ( Bundle savedInstanceState ) { super . onCreate ( savedInstanceState ) ; setContentView ( activity_search_view ) ; database = new Database ( this ) ; etSearch = ( ( EditText ) ( findViewById ( et_search ) ) ) ; etSearch . addTextChangedListener ( new TextWatcher ( ) { @ Override public void beforeTextChanged ( CharSequence s , int start , int count , int after ) { } @ Override public void onTextChanged ( CharSequence s , int start , int before , int count ) { if ( ! ( s . toString ( ) . equals ( "" ) ) ) { cursor = database . getAllDiseasesDependOnName ( s . toString ( ) ) ; } else { cursor = database . getAllDiseases ( ) ; } adapter . changeCursor ( cursor ) ; adapter . notifyDataSetChanged ( ) ; Toast . makeText ( SearchViewActivity . this , s . toString ( ) , LENGTH_SHORT ) . show ( ) ; } @ Override public void afterTextChanged ( Editable s ) { } } ) ; listview = ( ( ListView ) ( findViewById ( lvSearch ) ) ) ; cursor = database . getAllDiseases ( ) ; startManagingCursor ( cursor ) ; adapter = new SearchViewActivity . CustomCursorAdapter ( this , cursor ) ; listview . setAdapter ( adapter ) ; listview . setOnItemClickListener ( new AdapterView . OnItemClickListener ( ) { @ Override public void onItemClick ( AdapterView < ? > parent , View view , int position , long id ) { cursor . moveToPosition ( position ) ; stopManagingCursor ( cursor ) ; String nameOfDisease = cursor . getString ( 1 ) ; <START_BUG> Intent i = new Intent ( SearchViewActivity . this , DiseaseActivity2 . class ) ; <END_BUG> i . putExtra ( "name" , nameOfDisease ) ; startActivity ( i ) ; } } ) ; } @ Override public boolean onCreateOptionsMenu ( Menu menu ) { } @ Override public boolean onOptionsItemSelected ( MenuItem item ) { } private class CustomCursorAdapter extends CursorAdapter { Context context ; Cursor cursor ; public CustomCursorAdapter ( Context context , Cursor c ) { } @ Override public View newView ( Context context , Cursor cursor , ViewGroup parent ) { } @ Override public void bindView ( View view , Context context , Cursor cursor ) { } class Holder { TextView tvName ; } } }

Fix:
Intent i = new Intent ( SearchViewActivity . this , DiseaseActivity . class ) ;
Buggy code:
public class PackageResource extends WebResource { private static final long serialVersionUID = 1L ; private static Map resourceMap = new HashMap ( ) ; public final String absolutePath ; private Locale locale ; final String style ; final Class scope ; public static void bind ( Application application , Class scope , String name , Locale locale , String style ) { } public static void bind ( Application application , Class scope , String name ) { } public static PackageResource get ( final Class scope , final String path ) { } public static PackageResource get ( final Class scope , final String path , final Locale locale , final String style ) { } private PackageResource ( final Class scope , final String path , final Locale locale , final String style ) { } public IResourceStream getResourceStream ( ) { <START_BUG> IResourceStream resourceStream = Application . get ( ) . getResourceSettings ( ) . getResourceStreamLocator ( ) . locate ( scope . getClassLoader ( ) , absolutePath , style , locale , null ) ; <END_BUG> if ( resourceStream == null ) { throw new WicketRuntimeException ( ( ( ( ( ( ( "Unable<seq2seq4repair_space>to<seq2seq4repair_space>find<seq2seq4repair_space>package<seq2seq4repair_space>resource<seq2seq4repair_space>[path<seq2seq4repair_space>=<seq2seq4repair_space>" + ( absolutePath ) ) + ",<seq2seq4repair_space>style<seq2seq4repair_space>=<seq2seq4repair_space>" ) + ( style ) ) + ",<seq2seq4repair_space>locale<seq2seq4repair_space>=<seq2seq4repair_space>" ) + ( locale ) ) + "]" ) ) ; } this . locale = resourceStream . getLocale ( ) ; return resourceStream ; } public Locale getLocale ( ) { } public String getAbsolutePath ( ) { } }

Fix:
IResourceStream resourceStream = Application . get ( ) . getResourceSettings ( ) . getResourceStreamLocator ( ) . locate ( scope , absolutePath , style , locale , null ) ;
Buggy code:
public class JSONClient { public static JSONClient getInstance ( String hostURL ) { } public static JSONClient getInstance ( String hostURL , JSONConnectionType connectionType ) { } String fHostUrl ; JSONConnectionType fRequestType = JSONConnectionType . GET ; private JSONClient ( String hostURL ) { } private JSONClient ( String hostURL , JSONConnectionType connectionType ) { } public JSONObject get ( ) throws JSONException { } public JSONObject get ( Map < String , String > parameters ) throws JSONException { } private String getViaGET ( Map < String , String > parameters ) { String results = null ; HttpClient httpclient = new DefaultHttpClient ( ) ; List < NameValuePair > nameValuePairs = buildNameValuePairs ( parameters ) ; String paramString = URLEncodedUtils . format ( nameValuePairs , "utf-8" ) ; <START_BUG> String queryURL = ( ( fRequestType ) + "?" ) + paramString ; <END_BUG> HttpGet httpget = new HttpGet ( queryURL ) ; try { httpget . setHeader ( "Accept" , "application//json" ) ; HttpResponse response = httpclient . execute ( httpget ) ; int status = response . getStatusLine ( ) . getStatusCode ( ) ; if ( status != 200 ) { Log . e ( "HTTP<seq2seq4repair_space>Error" , ( "Bad<seq2seq4repair_space>HTTP<seq2seq4repair_space>response<seq2seq4repair_space>code:<seq2seq4repair_space>" + status ) ) ; } else { results = readResponse ( response ) ; } } catch ( Exception e ) { Log . e ( "Network<seq2seq4repair_space>Error" , "A<seq2seq4repair_space>network<seq2seq4repair_space>error<seq2seq4repair_space>occurred" , e ) ; } return results ; } private String getViaPOST ( Map < String , String > parameters ) { } private List < NameValuePair > buildNameValuePairs ( Map < String , String > parameters ) { } private String readResponse ( HttpResponse response ) throws IOException , IllegalStateException { } }

Fix:
String queryURL = ( ( fHostUrl ) + "?" ) + paramString ;
Buggy code:
public class MultiplyHandler extends AbstractOperationHandler { public MultiplyHandler ( Operation operation ) { } @ Override public void handleRequest ( Operation operation ) { if ( ( ( operation . getAddendum ( ) ) != null ) && ( ( operation . getAddendum ( ) . doubleValue ( ) ) > 0 ) ) { <START_BUG> if ( ( operation . getBase ( ) . doubleValue ( ) ) > 0 ) { <END_BUG> operation . setResult ( ( ( operation . getAddendum ( ) . doubleValue ( ) ) * ( operation . getBase ( ) . doubleValue ( ) ) ) ) ; } } nextStep ( operation ) ; } }

Fix:
if ( ( ( operation . getBase ( ) ) != null ) && ( ( operation . getBase ( ) . doubleValue ( ) ) > 0 ) ) {
Buggy code:
public class AvgDraftPosUploader { private SQLConnection connection ; private LocalDate statsDate ; public static void main ( String ... args ) throws IOException , URISyntaxException , SQLException { <START_BUG> LocalDate statsDate = new LocalDate ( 2016 , 3 , 24 ) ; <END_BUG> SQLConnection connection = new MySQLConnectionFactory ( ) . createConnection ( ) ; AvgDraftPosUploader avgDraftPosUploader = new AvgDraftPosUploader ( connection , statsDate ) ; avgDraftPosUploader . updateDatabase ( ) ; } public AvgDraftPosUploader ( SQLConnection connection , LocalDate statsDate ) { } public void updateDatabase ( ) throws IOException , SQLException { } }

Fix:
LocalDate statsDate = DraftPrepRunner . statsDate ;
Buggy code:
public final class IntRangeTest extends AbstractRangeTest { public IntRangeTest ( String name ) { } public static Test suite ( ) { } @ Override public void setUp ( ) { } @ Override protected Range createRange ( Integer integer1 , Integer integer2 ) { } @ Override protected Range createRange ( Integer integer ) { } public void testConstructor1a ( ) { } public void testConstructor1b ( ) { IntRange nr = new IntRange ( five ) ; assertSame ( five , nr . getMinimumNumber ( ) ) ; assertSame ( five , nr . getMaximumNumber ( ) ) ; <START_BUG> Range r = new IntRange ( nonComparableNumber ) ; <END_BUG> try { new IntRange ( null ) ; fail ( ) ; } catch ( IllegalArgumentException ex ) { } } public void testConstructor2a ( ) { } public void testConstructor2b ( ) { } public void testContainsNumber ( ) { } public void testContainsIntegerBig ( ) { } public void testToArray ( ) { } }

Fix:
new IntRange ( nonComparableNumber ) ;
Buggy code:
public class lookup { public static void printAnswer ( String name , Lookup lookup ) { } public static void main ( String [ ] args ) throws Exception { int type = Type . A ; int start = 0 ; if ( ( ( args . length ) > 2 ) && ( args [ 0 ] . equals ( "-t" ) ) ) { type = Type . value ( args [ 1 ] ) ; if ( type < 0 ) throw new IllegalArgumentException ( "invalid<seq2seq4repair_space>type" ) ; start = 2 ; } for ( int i = start ; i < ( args . length ) ; i ++ ) { <START_BUG> Lookup l = new Lookup ( args [ i ] , ( ( short ) ( type ) ) ) ; <END_BUG> l . run ( ) ; lookup . printAnswer ( args [ i ] , l ) ; } } }

Fix:
Lookup l = new Lookup ( args [ i ] , type ) ;
Buggy code:
public final class ContextAndHandlerManager implements IContextResolver , Listener { private final ICommandManagerListener commandManagerListener = new ICommandManagerListener ( ) { public final void commandManagerChanged ( final ICommandManagerEvent commandManagerEvent ) { } } ; private final IContextManagerListener contextManagerListener = new IContextManagerListener ( ) { public final void contextManagerChanged ( final IContextManagerEvent contextManagerEvent ) { } } ; private final StatusLineContributionItem statusLineContributionItem = new StatusLineContributionItem ( "ModeContributionItem" ) ; private final Workbench workbench ; public ContextAndHandlerManager ( final IWorkbench workbench ) { } private final void clear ( ) { } public final void deregisterWindow ( final WorkbenchWindow window ) { } private final boolean dispatchEvent ( final Event event ) { } public static final KeyStroke generateStroke ( final Event event ) { int key = event . character ; if ( key == 0 ) { key = event . keyCode ; } else { if ( ( 0 <= key ) && ( key <= 31 ) ) { if ( ( ( event . stateMask ) & ( SWT . CTRL ) ) != 0 ) { key += 64 ; } } else { if ( ( 'a' <= key ) && ( key <= 'z' ) ) { key -= 'a' - 'A' ; } } } final int modifiers = ( event . stateMask ) & ( SWT . MODIFIER_MASK ) ; <START_BUG> return KeySupport . convertFromSWT ( ( modifiers + key ) ) ; <END_BUG> } public final void handleEvent ( final Event event ) { } public final boolean inContext ( final String commandId ) { } public final void registerWindow ( final WorkbenchWindow window ) { } public final void update ( ) { } }

Fix:
return KeySupport . convertAcceleratorToKeyStroke ( ( modifiers + key ) ) ;
Buggy code:
public class TraXLiaison implements ErrorListener , XSLTLiaison3 , XSLTLoggerAware { private static final FileUtils FILE_UTILS = FileUtils . getFileUtils ( ) ; private Project project ; private String factoryName = null ; private TransformerFactory tfactory = null ; private Resource stylesheet ; private XSLTLogger logger ; private EntityResolver entityResolver ; private Transformer transformer ; private Templates templates ; private long templatesModTime ; private URIResolver uriResolver ; private Vector outputProperties = new Vector ( ) ; private Hashtable params = new Hashtable ( ) ; private Vector attributes = new Vector ( ) ; private boolean suppressWarnings = false ; private TraceConfiguration traceConfiguration = null ; public TraXLiaison ( ) throws Exception { } public void setStylesheet ( File stylesheet ) throws Exception { } public void setStylesheet ( Resource stylesheet ) throws Exception { } public void transform ( File infile , File outfile ) throws Exception { } private Source getSource ( InputStream is , File infile ) throws ParserConfigurationException , SAXException { } private Source getSource ( InputStream is , Resource resource ) throws ParserConfigurationException , SAXException { } private String resourceToURI ( Resource resource ) { } private void readTemplates ( ) throws IOException , ParserConfigurationException , TransformerConfigurationException , SAXException { } private void createTransformer ( ) throws Exception { } private void setTransformationParameters ( ) { } private TransformerFactory getFactory ( ) throws BuildException { } public void setFactory ( String name ) { } public void setAttribute ( String name , Object value ) { } public void setOutputProperty ( String name , String value ) { } public void setEntityResolver ( EntityResolver aResolver ) { } public void setURIResolver ( URIResolver aResolver ) { } public void addParam ( String name , String value ) { } public void setLogger ( XSLTLogger l ) { } public void error ( TransformerException e ) { } public void fatalError ( TransformerException e ) { logError ( e , "Fatal<seq2seq4repair_space>Error" ) ; <START_BUG> throw new BuildException ( ( "Fatal<seq2seq4repair_space>error<seq2seq4repair_space>during<seq2seq4repair_space>transformation<seq2seq4repair_space>using<seq2seq4repair_space>" + ( stylesheet ) ) , e ) ; <END_BUG> } public void warning ( TransformerException e ) { } private void logError ( TransformerException e , String type ) { } protected String getSystemId ( File file ) { } public void configure ( XSLTProcess xsltTask ) { } }

Fix:
throw new BuildException ( ( ( ( "Fatal<seq2seq4repair_space>error<seq2seq4repair_space>during<seq2seq4repair_space>transformation<seq2seq4repair_space>using<seq2seq4repair_space>" + ( stylesheet ) ) + ":<seq2seq4repair_space>" ) + ( e . getMessageAndLocation ( ) ) ) , e ) ;
Buggy code:
public interface ServerController { ServiceName SERVICE_NAME = JBOSS . append ( "as" , "server" , "controller" ) ; ServerModel getServerModel ( ) { } <START_BUG> List < UpdateResultHandlerResponse < ? > > applyUpdates ( List < AbstractServerModelUpdate < ? > > updates , boolean rollbackOnFailure , boolean applyToRuntime ) ; <END_BUG> < R , P > void update ( AbstractServerModelUpdate < R > update , UpdateResultHandler < R , P > resultHandler , P param ) { } void shutdown ( ) { } }

Fix:
List < UpdateResultHandlerResponse < ? > > applyUpdates ( List < AbstractServerModelUpdate < ? > > updates , boolean rollbackOnFailure , boolean modelOnly ) ;
Buggy code:
public class Combinations implements Iterable < int [ ] > { private final int n ; private final int k ; private final Combinations . IterationOrder iterationOrder ; private static enum IterationOrder { LEXICOGRAPHIC ; } public Combinations ( int n , int k ) { } private Combinations ( int n , int k , Combinations . IterationOrder iterationOrder ) { } public int getN ( ) { } public int getK ( ) { } public Iterator < int [ ] > iterator ( ) { } public Comparator < int [ ] > comparator ( ) { } private static class LexicographicIterator implements Iterator < int [ ] > { private final int k ; private final int [ ] c ; private boolean more = true ; private int j ; public LexicographicIterator ( int n , int k ) { } public boolean hasNext ( ) { } public int [ ] next ( ) { if ( ! ( more ) ) { throw new NoSuchElementException ( ) ; } final int [ ] ret = new int [ k ] ; System . arraycopy ( c , 1 , ret , 0 , k ) ; int x = 0 ; if ( ( j ) > 0 ) { x = j ; c [ j ] = x ; ( j ) -- ; return ret ; } if ( ( ( c [ 1 ] ) + 1 ) < ( c [ 2 ] ) ) { <START_BUG> c [ 1 ] = ( c [ 1 ] ) + 1 ; <END_BUG> return ret ; } else { j = 2 ; } boolean stepDone = false ; while ( ! stepDone ) { c [ ( ( j ) - 1 ) ] = ( j ) - 2 ; x = ( c [ j ] ) + 1 ; if ( x == ( c [ ( ( j ) + 1 ) ] ) ) { ( j ) ++ ; } else { stepDone = true ; } } if ( ( j ) > ( k ) ) { more = false ; return ret ; } c [ j ] = x ; ( j ) -- ; return ret ; } public void remove ( ) { } } private static class SingletonIterator implements Iterator < int [ ] > { private final int [ ] singleton ; private boolean more = true ; public SingletonIterator ( final int [ ] singleton ) { } public boolean hasNext ( ) { } public int [ ] next ( ) { if ( more ) { more = false ; return singleton ; } else { throw new NoSuchElementException ( ) ; } } public void remove ( ) { } } private static class LexicographicComparator implements Serializable , Comparator < int [ ] > { private static final long serialVersionUID = 20130906L ; private final int n ; private final int k ; public LexicographicComparator ( int n , int k ) { } public int compare ( int [ ] c1 , int [ ] c2 ) { } private long lexNorm ( int [ ] c ) { } } }

Fix:
( c [ 1 ] ) ++ ;
Buggy code:
public final class Program { String name ; String command ; String iconPath ; Display display ; boolean gnomeExpectUri ; static final String SHELL_HANDLE_KEY = "org.eclipse.swt.internal.motif.shellHandle" ; static final String [ ] CDE_ICON_EXT = new String [ ] { ".m.pm" , ".l.pm" , ".s.pm" , ".t.pm" } ; static final String [ ] CDE_MASK_EXT = new String [ ] { ".m_m.bm" , ".l_m.bm" , ".s_m.bm" , ".t_m.bm" } ; static final String DESKTOP_DATA = "Program_DESKTOP" ; static final int DESKTOP_UNKNOWN = 0 ; static final int DESKTOP_GNOME = 1 ; static final int DESKTOP_KDE = 2 ; static final int DESKTOP_CDE = 3 ; static final int PREFERRED_ICON_SIZE = 16 ; Program ( ) { } static int getDesktop ( Display display ) { } boolean cde_execute ( String fileName ) { byte [ ] action = Converter . wcsToMbcs ( null , command , true ) ; byte [ ] fileArg = Converter . wcsToMbcs ( null , fileName , true ) ; Integer shell = ( ( Integer ) ( display . getData ( Program . SHELL_HANDLE_KEY ) ) ) ; <START_BUG> int actionID = 0 ; <END_BUG> if ( shell != null ) { int ptr = OS . XtMalloc ( fileArg . length ) ; OS . memmove ( ptr , fileArg , fileArg . length ) ; DtActionArg args = new DtActionArg ( ) ; args . argClass = CDE . DtACTION_FILE ; args . name = ptr ; actionID = CDE . DtActionInvoke ( shell . intValue ( ) , action , args , 1 , null , null , null , 1 , 0 , 0 ) ; OS . XtFree ( ptr ) ; } return actionID != 0 ; } static String cde_getAction ( String dataType ) { } static String cde_getAttribute ( String dataType , String attrName ) { } static Hashtable cde_getDataTypeInfo ( ) { } static String cde_getExtension ( String dataType ) { } ImageData cde_getImageData ( ) { } static Program cde_getProgram ( Display display , String mimeType ) { } static boolean cde_init ( Display display ) { } static String [ ] parseCommand ( String cmd ) { } boolean gnome_execute ( String fileName ) { } ImageData gnome_getImageData ( ) { } static Hashtable gnome_getMimeInfo ( ) { } static Program gnome_getProgram ( Display display , String mimeType ) { } static boolean gnome_init ( ) { } static String kde_convertQStringAndFree ( int qString ) { } static boolean kde_init ( ) { } boolean kde_execute ( String fileName ) { } ImageData kde_getImageData ( ) { } static Hashtable kde_getMimeInfo ( ) { } static Program kde_getProgram ( Display display , String mimeType ) { } public static Program findProgram ( String extension ) { } static Program findProgram ( Display display , String extension ) { } public static String [ ] getExtensions ( ) { } static String [ ] getExtensions ( Display display ) { } public static Program [ ] getPrograms ( ) { } static Program [ ] getPrograms ( Display display ) { } public static boolean launch ( String fileName ) { } static boolean launch ( Display display , String fileName ) { } public boolean equals ( Object other ) { } public boolean execute ( String fileName ) { } public ImageData getImageData ( ) { } public String getName ( ) { } public int hashCode ( ) { } public String toString ( ) { } }

Fix:
long actionID = 0 ;