nus-yam/ex-repair huggingface dataset:
Buggy code:
public class QueryParserHelper { public static void reduceMetaComplexEvent ( MetaComplexEvent metaComplexEvent ) { } private static synchronized void reduceStreamAttributes ( MetaStreamEvent metaStreamEvent ) { } public static void updateVariablePosition ( MetaComplexEvent metaComplexEvent , List < VariableExpressionExecutor > variableExpressionExecutorList ) { } public static void initStreamRuntime ( StreamRuntime runtime , MetaComplexEvent metaComplexEvent ) { if ( runtime instanceof GpuStreamRuntime ) { QueryParserHelper . initGpuStreamRuntime ( ( ( GpuStreamRuntime ) ( runtime ) ) , 0 , metaComplexEvent , null ) ; } else if ( runtime instanceof GpuJoinStreamRuntime ) { <START_BUG> } <END_BUG> if ( runtime instanceof SingleStreamRuntime ) { QueryParserHelper . initSingleStreamRuntime ( ( ( SingleStreamRuntime ) ( runtime ) ) , 0 , metaComplexEvent , null ) ; } else { MetaStateEvent metaStateEvent = ( ( MetaStateEvent ) ( metaComplexEvent ) ) ; StateEventPool stateEventPool = new StateEventPool ( metaStateEvent , 5 ) ; MetaStreamEvent [ ] metaStreamEvents = metaStateEvent . getMetaStreamEvents ( ) ; for ( int i = 0 , metaStreamEventsLength = metaStreamEvents . length ; i < metaStreamEventsLength ; i ++ ) { QueryParserHelper . initSingleStreamRuntime ( runtime . getSingleStreamRuntimes ( ) . get ( i ) , i , metaStateEvent , stateEventPool ) ; } } } private static void initSingleStreamRuntime ( SingleStreamRuntime singleStreamRuntime , int streamEventChainIndex , MetaComplexEvent metaComplexEvent , StateEventPool stateEventPool ) { } private static void initGpuStreamRuntime ( GpuStreamRuntime gpuStreamRuntime , int streamEventChainIndex , MetaComplexEvent metaComplexEvent , StateEventPool stateEventPool ) { } }

Fix:
} else
Buggy code:
final class TransactionsSubsystemElement extends AbstractSubsystemElement < TransactionsSubsystemElement > { private static final long serialVersionUID = 4097067542390229861L ; private final RecoveryEnvironmentElement recoveryEnvironmentElement = new RecoveryEnvironmentElement ( ) ; private final CoreEnvironmentElement coreEnvironmentElement = new CoreEnvironmentElement ( ) ; private final CoordinatorEnvironmentElement coordinatorEnvironmentElement = new CoordinatorEnvironmentElement ( ) ; private final ObjectStoreEnvironmentElement objectStoreEnvironmentElement = new ObjectStoreEnvironmentElement ( ) ; public TransactionsSubsystemElement ( ) { } @ Override protected Class < TransactionsSubsystemElement > getElementClass ( ) { } @ Override public void writeContent ( final XMLExtendedStreamWriter streamWriter ) throws XMLStreamException { streamWriter . writeStartElement ( RECOVERY_ENVIRONMENT . getLocalName ( ) ) ; recoveryEnvironmentElement . writeContent ( streamWriter ) ; streamWriter . writeStartElement ( CORE_ENVIRONMENT . getLocalName ( ) ) ; coreEnvironmentElement . writeContent ( streamWriter ) ; <START_BUG> streamWriter . writeStartElement ( OBJECT_STORE . getLocalName ( ) ) ; <END_BUG> objectStoreEnvironmentElement . writeContent ( streamWriter ) ; streamWriter . writeEndElement ( ) ; } public RecoveryEnvironmentElement getRecoveryEnvironmentElement ( ) { } public CoreEnvironmentElement getCoreEnvironmentElement ( ) { } public CoordinatorEnvironmentElement getCoordinatorEnvironmentElement ( ) { } public void setCoordinatorEnableStatistics ( final boolean enable ) { } public void setCoordinatorDefaultTimeout ( final int timeout ) { } public ObjectStoreEnvironmentElement getObjectStoreEnvironmentElement ( ) { } @ Override protected void getUpdates ( List < ? super AbstractSubsystemUpdate < TransactionsSubsystemElement , ? > > list ) { } @ Override protected boolean isEmpty ( ) { } @ Override protected TransactionSubsystemAdd getAdd ( ) { } @ Override protected < P > void applyRemove ( final UpdateContext updateContext , final UpdateResultHandler < ? super Void , P > resultHandler , final P param ) { } }

Fix:
streamWriter . writeEmptyElement ( OBJECT_STORE . getLocalName ( ) ) ;
Buggy code:
public class MARCHA4_clmathuriya { static int testCount ; static BufferedOutputStream out ; static int modValue = 1000000000 ; static byte [ ] spaceb ; static byte [ ] eolb ; public class Big { long a ; long b ; long c ; public Big ( long x , long y , long z ) { } } public static MARCHA4_clmathuriya . Big multiply ( MARCHA4_clmathuriya . Big p , MARCHA4_clmathuriya . Big q ) { } static MARCHA4_clmathuriya main ; public static void main ( String [ ] args ) throws Exception { } public static long execute ( ) throws Exception { long startTime = System . nanoTime ( ) ; MARCHA4_clmathuriya . main = new MARCHA4_clmathuriya ( ) ; <START_BUG> FileInputStream fileIn = new FileInputStream ( new File ( "D:\\Google<seq2seq4repair_space>Drive\\Books\\My<seq2seq4repair_space>code<seq2seq4repair_space>musings\\Codechef\\MARCHA4-random-input.txt" ) ) ; <END_BUG> InputStreamReader fileInStream = new InputStreamReader ( fileIn ) ; BufferedReader br = new BufferedReader ( fileInStream ) ; MARCHA4_clmathuriya . out = new BufferedOutputStream ( System . out ) ; MARCHA4_clmathuriya . spaceb = "<seq2seq4repair_space>" . getBytes ( ) ; String eol = System . getProperty ( "line.separator" ) ; MARCHA4_clmathuriya . eolb = eol . getBytes ( ) ; try { String str = br . readLine ( ) ; MARCHA4_clmathuriya . testCount = Integer . parseInt ( str ) ; for ( int i = 0 ; i < ( MARCHA4_clmathuriya . testCount ) ; i ++ ) { str = br . readLine ( ) ; int spaceIndex = str . indexOf ( new String ( "<seq2seq4repair_space>" ) ) ; String str1 = str . substring ( 0 , spaceIndex ) ; str = str . substring ( ( spaceIndex + 1 ) , str . length ( ) ) ; int a = Integer . parseInt ( str1 ) ; int b = Integer . parseInt ( str ) ; MARCHA4_clmathuriya . outputFirstK ( a , b ) ; MARCHA4_clmathuriya . outputLastK ( a , b ) ; } MARCHA4_clmathuriya . out . flush ( ) ; } catch ( IOException ioe ) { ioe . printStackTrace ( ) ; } long end = System . nanoTime ( ) ; return end - startTime ; } public static void outputFirstK ( int n , int k ) throws Exception { } public static MARCHA4_clmathuriya . Big getPow ( int n ) { } public static void outputLastK ( int n , int k ) throws Exception { } public static long getPow ( long a , long b , long sp ) { } }

Fix:
FileInputStream fileIn = new FileInputStream ( new File ( "D:\\Google<seq2seq4repair_space>Drive\\Books\\My<seq2seq4repair_space>code<seq2seq4repair_space>musings\\Codechef\\MARCHA4\\MARCHA4-random-input.txt" ) ) ;
Buggy code:
public class App2Test1 { private static final Log log = LogFactory . getLog ( App2Test1 . class ) ; public static void main ( String [ ] args ) throws Exception { <START_BUG> List < String > gets = Arrays . asList ( new String [ ] { "//app2?wicket:bookmarkablePage=one:org.apache.wicket.threadtest.apps.app2.Home" } ) ; <END_BUG> SimpleGetCommand getCmd = new SimpleGetCommand ( gets , 5 ) ; Tester tester = new Tester ( getCmd , 50 , false ) ; tester . run ( ) ; } }

Fix:
List < String > gets = Arrays . asList ( new String [ ] { "//app2//wicket//bookmarkable//org.apache.wicket.threadtest.apps.app2.Home" } ) ;
Buggy code:
public class ParserEventoEstablecimiento { public ParserEventoEstablecimiento ( ) { } public ArrayList < EventoEstablecimiento > parserEventoEstablecimiento ( JSONObject object ) { ArrayList < EventoEstablecimiento > arrayList = new ArrayList < EventoEstablecimiento > ( ) ; try { JSONArray jsonArray = object . getJSONArray ( "Value" ) ; JSONObject jsonObj = null ; for ( int i = 0 ; i < ( jsonArray . length ( ) ) ; i ++ ) { jsonObj = jsonArray . getJSONObject ( i ) ; int modalidadCredito = jsonObj . getInt ( "CliIModalidadCreditoId" ) ; int diasCredito = 0 ; switch ( modalidadCredito ) { case 1 : diasCredito = 3 ; break ; case 2 : diasCredito = 7 ; break ; case 3 : diasCredito = 15 ; break ; case 4 : <START_BUG> diasCredito = 30 ; <END_BUG> break ; case 5 : diasCredito = 0 ; break ; default : diasCredito = 0 ; break ; } arrayList . add ( new EventoEstablecimiento ( jsonObj . getInt ( "EveeIEstablecimientoId" ) , jsonObj . getInt ( "EstICatEstablecimientoId" ) , jsonObj . getInt ( "TdiTipoDocIdentidadId" ) , jsonObj . getInt ( "EveeIAtencionEstablecimientoId" ) , jsonObj . getString ( "EstVDescripcion" ) , jsonObj . getString ( "PerVNombres" ) , jsonObj . getString ( "CliVDocidentidad" ) , jsonObj . getInt ( "EstIOrden" ) , jsonObj . getInt ( "SurtidoStockAnterior" ) , jsonObj . getInt ( "SurtidoVentaAnterior" ) , jsonObj . getDouble ( "MocrIDescripcion" ) , diasCredito , 0 , null , jsonObj . getInt ( "LiqIAgenteVentaId" ) , Constants . _IMPORTADO ) ) ; } } catch ( JSONException e ) { Log . d ( "JSONParser<seq2seq4repair_space>=><seq2seq4repair_space>parseEventoEstablecimiento" , e . getMessage ( ) ) ; } return arrayList ; } }

Fix:
diasCredito = 31 ;
Buggy code:
public class LTWWorld extends BcelWorld implements IReflectionWorld { private AnnotationFinder annotationFinder ; private ClassLoader loader ; protected static final Class concurrentMapClass = LTWWorld . makeConcurrentMapClass ( ) ; protected static Map bootstrapTypes = LTWWorld . makeConcurrentMap ( ) ; public LTWWorld ( ClassLoader loader , IMessageHandler handler , ICrossReferenceHandler xrefHandler ) { } public ClassLoader getClassLoader ( ) { } protected ReferenceTypeDelegate resolveDelegate ( ReferenceType ty ) { } protected ReferenceTypeDelegate resolveIfBootstrapDelegate ( ReferenceType ty ) { String name = ty . getName ( ) ; Reference bootRef = ( ( Reference ) ( LTWWorld . bootstrapTypes . get ( name ) ) ) ; if ( bootRef != null ) { ReferenceTypeDelegate rtd = ( ( ReferenceTypeDelegate ) ( bootRef . get ( ) ) ) ; if ( rtd != null ) { return rtd ; } } char fc = name . charAt ( 0 ) ; if ( ( ( ( fc == 'j' ) || ( fc == 'c' ) ) || ( fc == 'o' ) ) || ( fc == 's' ) ) { if ( ( ( ( ( name . startsWith ( "java" ) ) || ( name . startsWith ( "com.sun." ) ) ) || ( name . startsWith ( "org.w3c" ) ) ) || ( name . startsWith ( "sun." ) ) ) || ( name . startsWith ( "org.omg" ) ) ) { <START_BUG> ReferenceTypeDelegate bootstrapLoaderDelegate = resolveReflectionTypeDelegate ( ty , null ) ; <END_BUG> if ( bootstrapLoaderDelegate != null ) { LTWWorld . bootstrapTypes . put ( ty . getName ( ) , new WeakReference ( bootstrapLoaderDelegate ) ) ; } return bootstrapLoaderDelegate ; } } return null ; } private ReferenceTypeDelegate resolveReflectionTypeDelegate ( ReferenceType ty , ClassLoader resolutionLoader ) { } public void loadedClass ( Class clazz ) { } private static final long serialVersionUID = 1 ; public AnnotationFinder getAnnotationFinder ( ) { } public ResolvedType resolve ( Class aClass ) { } private static Map makeConcurrentMap ( ) { } private static Class makeConcurrentMapClass ( ) { } public boolean isRunMinimalMemory ( ) { } }

Fix:
ReferenceTypeDelegate bootstrapLoaderDelegate = resolveReflectionTypeDelegate ( ty , loader ) ;
Buggy code:
public class UndertowSubsystemTestCase extends AbstractSubsystemBaseTest { public UndertowSubsystemTestCase ( ) { } @ Override protected String getSubsystemXml ( ) throws IOException { <START_BUG> return readResource ( "undertow-2.0.xml" ) ; <END_BUG> } @ Test public void testRuntime ( ) throws Exception { } @ Override protected AdditionalInitialization createAdditionalInitialization ( ) { } private static class RuntimeInitialization extends AdditionalInitialization { protected ControllerInitializer createControllerInitializer ( ) { } @ Override protected void addExtraServices ( ServiceTarget target ) { } } }

Fix:
return readResource ( "undertow-1.1.xml" ) ;
Buggy code:
public class ResolveExpressionOnDomainHandler implements OperationStepHandler , DescriptionProvider { public static final String OPERATION_NAME = "resolve-expression-on-domain" ; public static final ResolveExpressionOnDomainHandler INSTANCE = new ResolveExpressionOnDomainHandler ( ) ; private ResolveExpressionOnDomainHandler ( ) { } @ Override public void execute ( OperationContext context , ModelNode operation ) throws OperationFailedException { EXPRESSION . validateOperation ( operation ) ; <START_BUG> context . completeStep ( NOOP_ROLLBACK_HANDLER ) ; <END_BUG> } @ Override public ModelNode getModelDescription ( Locale locale ) { } }

Fix:
context . stepCompleted ( ) ;
Buggy code:
public class JMeterThread implements Serializable , Runnable { private static transient Logger log = Hierarchy . getDefaultHierarchy ( ) . getLoggerFor ( "jmeter.engine" ) ; static Map samplers = new HashMap ( ) ; int initialDelay = 0 ; Controller controller ; private boolean running ; HashTree testTree ; TestCompiler compiler ; JMeterThreadMonitor monitor ; String threadName ; JMeterContext threadContext ; JMeterVariables threadVars ; Collection threadListeners ; ListenerNotifier notifier ; public JMeterThread ( ) { } public JMeterThread ( HashTree test , JMeterThreadMonitor monitor , ListenerNotifier note ) { } public void setInitialContext ( JMeterContext context ) { } public void setThreadName ( String threadName ) { } public void run ( ) { } public String getThreadName ( ) { } public void stop ( ) { } private void checkAssertions ( List assertions , SampleResult result ) { } private void runPostProcessors ( List extractors ) { } private void runPreProcessors ( List preProcessors ) { } private void delay ( List timers ) { } private void initializeThreadListeners ( ) { } private void notifyThreadListeners ( ) { } private void notifyListeners ( List listeners , SampleResult result ) { SampleEvent event = new SampleEvent ( result , ( ( String ) ( controller . getProperty ( NAME ) ) ) ) ; compiler . sampleOccurred ( event ) ; <START_BUG> notifier . addLast ( event , listeners ) ; <END_BUG> } public void setInitialDelay ( int delay ) { } private void rampUpDelay ( ) { } }

Fix:
notifier . notifyListeners ( event , listeners ) ;
Buggy code:
@ SuppressWarnings ( "serial" ) public class TraceInterceptor extends CustomizableTraceInterceptor { protected void writeToLog ( Log logger , String message , Throwable ex ) { if ( ex != null ) { logger . error ( ex ) ; } else if ( message . contains ( "ENTER" ) ) { <START_BUG> logger . info ( message ) ; <END_BUG> } else if ( message . contains ( "EXIT" ) ) { logger . debug ( message ) ; } } protected boolean isInterceptorEnabled ( MethodInvocation invocation , Log logger ) { } No newline ; at end ; of file ; }

Fix:
logger . debug ( message ) ;
Buggy code:
public class Commandessentials extends EssentialsCommand { public Commandessentials ( ) { } private transient int taskid ; private final transient Map < Player , Block > noteBlocks = new HashMap < Player , Block > ( ) ; @ Override public void run ( final Server server , final CommandSender sender , final String commandLabel , final String [ ] args ) throws Exception { } private void run_disabled ( final Server server , final CommandSender sender , final String commandLabel , final String [ ] args ) throws Exception { sender . sendMessage ( ( "Essentials<seq2seq4repair_space>" + ( ess . getDescription ( ) . getVersion ( ) ) ) ) ; sender . sendMessage ( "//<command><seq2seq4repair_space><reload//debug>" ) ; <START_BUG> sender . sendMessage ( "Essentials<seq2seq4repair_space>blocked<seq2seq4repair_space>the<seq2seq4repair_space>following<seq2seq4repair_space>commands,<seq2seq4repair_space>due<seq2seq4repair_space>to<seq2seq4repair_space>command<seq2seq4repair_space>conflicts:" ) ; <END_BUG> final StringBuilder disabledCommands = new StringBuilder ( ) ; for ( Map . Entry < String , String > entry : ess . getAlternativeCommandsHandler ( ) . disabledCommands ( ) . entrySet ( ) ) { if ( ( disabledCommands . length ( ) ) > 0 ) { disabledCommands . append ( ",<seq2seq4repair_space>" ) ; } disabledCommands . append ( entry . getKey ( ) ) . append ( "<seq2seq4repair_space>=><seq2seq4repair_space>" ) . append ( entry . getValue ( ) ) ; } sender . sendMessage ( disabledCommands . toString ( ) ) ; } private void run_debug ( final Server server , final CommandSender sender , final String commandLabel , final String [ ] args ) throws Exception { } private void run_reload ( final Server server , final CommandSender sender , final String commandLabel , final String [ ] args ) throws Exception { } private void run_nya ( final Server server , final CommandSender sender , final String commandLabel , final String [ ] args ) throws Exception { } private void stopTune ( ) { } }

Fix:
sender . sendMessage ( I18n . _ ( "blockList" ) ) ;
Buggy code:
public class HighFreqTerms { public static final int DEFAULTnumTerms = 100 ; public static int numTerms = HighFreqTerms . DEFAULTnumTerms ; public static void main ( String [ ] args ) throws Exception { } private static void usage ( ) { } public static TermStats [ ] getHighFreqTerms ( IndexReader reader , int numTerms , String field ) throws Exception { } public static TermStats [ ] sortByTotalTermFreq ( IndexReader reader , TermStats [ ] terms ) throws Exception { } public static long getTotalTermFreq ( IndexReader reader , final String field , final BytesRef termText ) throws Exception { long totalTF = 0L ; <START_BUG> for ( final AtomicReaderContext ctx : reader . getTopReaderContext ( ) . leaves ( ) ) { <END_BUG> AtomicReader r = ctx . reader ( ) ; Bits liveDocs = r . getLiveDocs ( ) ; if ( liveDocs == null ) { final long totTF = r . totalTermFreq ( field , termText ) ; if ( totTF != ( - 1 ) ) { totalTF += totTF ; continue ; } } DocsEnum de = r . termDocsEnum ( liveDocs , field , termText ) ; if ( de != null ) { while ( ( de . nextDoc ( ) ) != ( DocIdSetIterator . NO_MORE_DOCS ) ) totalTF += de . freq ( ) ; } } return totalTF ; } }

Fix:
for ( final AtomicReaderContext ctx : reader . leaves ( ) ) {
Buggy code:
public class Krb5ConfServerSetupTask implements ServerSetupTask { private static Logger LOGGER = Logger . getLogger ( Krb5ConfServerSetupTask . class ) ; private static final File WORK_DIR = new File ( "SPNEGO-workdir" ) ; private static final String KRB5_CONF = "krb5.conf" ; private static final File KRB5_CONF_FILE = new File ( Krb5ConfServerSetupTask . WORK_DIR , Krb5ConfServerSetupTask . KRB5_CONF ) ; public static final File HTTP_KEYTAB_FILE = new File ( Krb5ConfServerSetupTask . WORK_DIR , "http.keytab" ) ; public static final File HNELSON_KEYTAB_FILE = new File ( Krb5ConfServerSetupTask . WORK_DIR , "hnelson.keytab" ) ; public static final File JDUKE_KEYTAB_FILE = new File ( Krb5ConfServerSetupTask . WORK_DIR , "jduke.keytab" ) ; private String origKrb5Conf ; private String origKrbDebug ; public void setup ( ManagementClient managementClient , String containerId ) throws Exception { } public void tearDown ( ManagementClient managementClient , String containerId ) throws Exception { } public static final String getKrb5ConfFullPath ( ) { } public static final String getKeyTabFullPath ( ) { } private void createKeytab ( final String principalName , final String passPhrase , final File keytabFile ) throws IOException { Krb5ConfServerSetupTask . LOGGER . info ( ( "Principal<seq2seq4repair_space>name:<seq2seq4repair_space>" + principalName ) ) ; final KerberosTime timeStamp = new KerberosTime ( ) ; DataOutputStream dos = null ; try { dos = new DataOutputStream ( new FileOutputStream ( keytabFile ) ) ; <START_BUG> dos . write ( VERSION_0X502_BYTES ) ; <END_BUG> for ( Map . Entry < EncryptionType , EncryptionKey > keyEntry : KerberosKeyFactory . getKerberosKeys ( principalName , passPhrase ) . entrySet ( ) ) { final EncryptionKey key = keyEntry . getValue ( ) ; final byte keyVersion = ( ( byte ) ( key . getKeyVersion ( ) ) ) ; final ByteArrayOutputStream baos = new ByteArrayOutputStream ( ) ; DataOutputStream entryDos = new DataOutputStream ( baos ) ; String [ ] spnSplit = principalName . split ( "@" ) ; String nameComponent = spnSplit [ 0 ] ; String realm = spnSplit [ 1 ] ; String [ ] nameComponents = nameComponent . split ( "//" ) ; try { entryDos . writeShort ( ( ( short ) ( nameComponents . length ) ) ) ; entryDos . writeUTF ( realm ) ; for ( String component : nameComponents ) { entryDos . writeUTF ( component ) ; } entryDos . writeInt ( 1 ) ; entryDos . writeInt ( ( ( int ) ( ( timeStamp . getTime ( ) ) // 1000 ) ) ) ; entryDos . write ( keyVersion ) ; entryDos . writeShort ( ( ( short ) ( key . getKeyType ( ) . getValue ( ) ) ) ) ; byte [ ] data = key . getKeyValue ( ) ; entryDos . writeShort ( ( ( short ) ( data . length ) ) ) ; entryDos . write ( data ) ; } finally { IOUtils . closeQuietly ( entryDos ) ; } final byte [ ] entryBytes = baos . toByteArray ( ) ; dos . writeInt ( entryBytes . length ) ; dos . write ( entryBytes ) ; } } finally { IOUtils . closeQuietly ( dos ) ; } } }

Fix:
dos . write ( VERSION_52 ) ;
Buggy code:
public class StorageLoadBalancer implements IEndpointStateChangeSubscriber { class LoadBalancer implements Runnable { LoadBalancer ( ) { } public void run ( ) { } } class MoveMessageVerbHandler implements IVerbHandler { public void doVerb ( Message message ) { <START_BUG> Message reply = message . getReply ( FBUtilities . getLocalAddress ( ) , new byte [ ] { ( ( byte ) ( isMoveable_ . get ( ) ? 1 : 0 ) ) } ) ; <END_BUG> MessagingService . instance . sendOneWay ( reply , message . getFrom ( ) ) ; if ( isMoveable_ . get ( ) ) { isMoveable_ . set ( false ) ; } } } private static final int BROADCAST_INTERVAL = 60 * 1000 ; public static final StorageLoadBalancer instance = new StorageLoadBalancer ( ) ; private static final Logger logger_ = LoggerFactory . getLogger ( StorageLoadBalancer . class ) ; private static final int delay_ = 5 ; private static final double TOPHEAVY_RATIO = 1.5 ; private AtomicBoolean isMoveable_ = new AtomicBoolean ( false ) ; private Map < InetAddress , Double > loadInfo_ = new HashMap < InetAddress , Double > ( ) ; private Map < InetAddress , Double > loadInfo2_ = new HashMap < InetAddress , Double > ( ) ; private StorageLoadBalancer ( ) { } public void onChange ( InetAddress endpoint , ApplicationState state , VersionedValue value ) { } public void onJoin ( InetAddress endpoint , EndpointState epState ) { } public void onAlive ( InetAddress endpoint , EndpointState state ) { } public void onDead ( InetAddress endpoint , EndpointState state ) { } public void onRemove ( InetAddress endpoint ) { } private double localLoad ( ) { } private double averageSystemLoad ( ) { } private boolean isHeavyNode ( ) { } private boolean isMoveable ( InetAddress target ) { } private boolean isANeighbour ( InetAddress neighbour ) { } private InetAddress findARandomLightNode ( ) { } public Map < InetAddress , Double > getLoadInfo ( ) { } public void startBroadcasting ( ) { } public void waitForLoadInfo ( ) { } }

Fix:
Message reply = message . getInternalReply ( new byte [ ] { ( ( byte ) ( isMoveable_ . get ( ) ? 1 : 0 ) ) } ) ;
Buggy code:
public abstract class ForwardingEjbClientConfiguration implements EJBClientConfiguration { private final EJBClientConfiguration delegate ; protected ForwardingEjbClientConfiguration ( final EJBClientConfiguration delegate ) { } @ Override public String getEndpointName ( ) { } @ Override public OptionMap getEndpointCreationOptions ( ) { } @ Override public OptionMap getRemoteConnectionProviderCreationOptions ( ) { } @ Override public CallbackHandler getCallbackHandler ( ) { } @ Override public Iterator < RemotingConnectionConfiguration > getConnectionConfigurations ( ) { } @ Override public Iterator < ClusterConfiguration > getClusterConfigurations ( ) { } @ Override public ClusterConfiguration getClusterConfiguration ( final String clusterName ) { } @ Override public long getInvocationTimeout ( ) { <START_BUG> return 0 ; <END_BUG> } }

Fix:
return delegate . getInvocationTimeout ( ) ;
Buggy code:
public class IncrementalStateManager { public static boolean recordIncrementalStates = false ; public static boolean debugIncrementalStates = false ; private static Hashtable incrementalStates = new Hashtable ( ) ; public static void recordSuccessfulBuild ( String buildConfig , AjState state ) { } public static boolean removeIncrementalStateInformationFor ( String buildConfig ) { } public static void clearIncrementalStates ( ) { } public static Set getConfigFilesKnown ( ) { } public static AjState retrieveStateFor ( String configFile ) { } public static AjState findStateManagingOutputLocation ( File location ) { Collection allStates = IncrementalStateManager . incrementalStates . values ( ) ; if ( IncrementalStateManager . debugIncrementalStates ) System . err . println ( ( ( ( ( "><seq2seq4repair_space>findStateManagingOutputLocation(" + location ) + ")<seq2seq4repair_space>has<seq2seq4repair_space>" ) + ( allStates . size ( ) ) ) + "<seq2seq4repair_space>states<seq2seq4repair_space>to<seq2seq4repair_space>look<seq2seq4repair_space>through" ) ) ; for ( Iterator iter = allStates . iterator ( ) ; iter . hasNext ( ) ; ) { AjState element = ( ( AjState ) ( iter . next ( ) ) ) ; <START_BUG> AjBuildConfig ajbc = element . buildConfig ; <END_BUG> if ( ajbc == null ) { if ( IncrementalStateManager . debugIncrementalStates ) System . err . println ( ( "<seq2seq4repair_space>No<seq2seq4repair_space>build<seq2seq4repair_space>configuration<seq2seq4repair_space>for<seq2seq4repair_space>state<seq2seq4repair_space>" + element ) ) ; continue ; } File outputDir = ajbc . getOutputDir ( ) ; if ( outputDir == null ) { if ( IncrementalStateManager . debugIncrementalStates ) System . err . println ( ( ( "<seq2seq4repair_space>output<seq2seq4repair_space>directory<seq2seq4repair_space>for<seq2seq4repair_space>" + ajbc ) + "<seq2seq4repair_space>is<seq2seq4repair_space>null" ) ) ; continue ; } if ( outputDir . equals ( location ) ) { if ( IncrementalStateManager . debugIncrementalStates ) System . err . println ( ( ( ( "<<seq2seq4repair_space>findStateManagingOutputLocation(" + location ) + ")<seq2seq4repair_space>returning<seq2seq4repair_space>" ) + element ) ) ; return element ; } } if ( IncrementalStateManager . debugIncrementalStates ) System . err . println ( ( ( "<<seq2seq4repair_space>findStateManagingOutputLocation(" + location ) + ")<seq2seq4repair_space>returning<seq2seq4repair_space>null" ) ) ; return null ; } }

Fix:
AjBuildConfig ajbc = element . getBuildConfig ( ) ;
Buggy code:
public abstract class BuildConfigurationTestBase { static final String masterAddress = System . getProperty ( "jboss.test.host.master.address" , "127.0.0.1" ) ; static final File JBOSS_HOME = new File ( System . getProperty ( "jboss.home" ) ) ; static final File BUILD_DIR = new File ( BuildConfigurationTestBase . JBOSS_HOME , "domain//configuration//" ) ; @ Test public void test ( ) throws Exception { } protected abstract String getDomainConfigFile ( ) { } protected abstract String getHostConfigFile ( ) { } static JBossAsManagedConfiguration createConfiguration ( final String domainXmlName , final String hostXmlName , final String testConfiguration ) { final File output = new File ( ( ( ( ( "target" + ( File . separator ) ) + "domains" ) + ( File . separator ) ) + testConfiguration ) ) ; final JBossAsManagedConfiguration configuration = new JBossAsManagedConfiguration ( ) ; configuration . setHostControllerManagementAddress ( BuildConfigurationTestBase . masterAddress ) ; configuration . setHostCommandLineProperties ( ( "-Djboss.test.host.master.address=" + ( BuildConfigurationTestBase . masterAddress ) ) ) ; configuration . setDomainConfigFile ( new File ( BuildConfigurationTestBase . BUILD_DIR , domainXmlName ) . getAbsolutePath ( ) ) ; configuration . setHostConfigFile ( new File ( BuildConfigurationTestBase . BUILD_DIR , hostXmlName ) . getAbsolutePath ( ) ) ; <START_BUG> configuration . setHostName ( "local" ) ; <END_BUG> new File ( output , "configuration" ) . mkdirs ( ) ; configuration . setDomainDirectory ( output . getAbsolutePath ( ) ) ; System . out . println ( configuration . getDomainConfigFile ( ) ) ; System . out . println ( configuration . getHostConfigFile ( ) ) ; return configuration ; } }

Fix:
configuration . setHostName ( "master" ) ;
Buggy code:
public final class AutoComponentResolver implements IComponentResolver { private static final long serialVersionUID = 1L ; <START_BUG> private final Map < Component , Object > nestedComponents = new HashMap < Component , Object > ( ) ; <END_BUG> public final boolean resolve ( final MarkupContainer container , final MarkupStream markupStream , final ComponentTag tag ) { if ( tag instanceof WicketTag ) { final WicketTag wicketTag = ( ( WicketTag ) ( tag ) ) ; if ( wicketTag . isComponentTag ( ) ) { final Component component = createComponent ( container , wicketTag ) ; if ( component != null ) { nestedComponents . put ( component , null ) ; try { container . autoAdd ( component ) ; } finally { nestedComponents . remove ( component ) ; } return true ; } } } if ( ( ( tag . getId ( ) ) != null ) && ( nestedComponents . containsKey ( container ) ) ) { MarkupContainer parent = container . getParent ( ) ; while ( ( parent != null ) && ( nestedComponents . containsKey ( parent ) ) ) { parent = parent . getParent ( ) ; } if ( parent != null ) { final Component component = parent . get ( tag . getId ( ) ) ; if ( component != null ) { component . render ( markupStream ) ; return true ; } } } return false ; } private final Component createComponent ( final MarkupContainer container , final WicketTag tag ) { } }

Fix:
private final Map nestedComponents = new HashMap ( ) ;
Buggy code:
public class CommentBalloonBuilder { @ Inject private JBPopupFactory jbPopupFactory ; public JBPopup getNewCommentBalloon ( final CommentForm balloonContent , @ NotNull final String title ) { final ComponentPopupBuilder builder = jbPopupFactory . createComponentPopupBuilder ( balloonContent , balloonContent ) ; <START_BUG> builder . setAdText ( "Hit<seq2seq4repair_space>Ctrl+Enter<seq2seq4repair_space>to<seq2seq4repair_space>add<seq2seq4repair_space>comment.<seq2seq4repair_space>It<seq2seq4repair_space>will<seq2seq4repair_space>be<seq2seq4repair_space>saved<seq2seq4repair_space>once<seq2seq4repair_space>you<seq2seq4repair_space>post<seq2seq4repair_space>your<seq2seq4repair_space>review." ) ; <END_BUG> builder . setTitle ( title ) ; builder . setResizable ( true ) ; builder . setMovable ( true ) ; builder . setRequestFocus ( true ) ; builder . setCancelOnClickOutside ( false ) ; builder . setCancelOnWindowDeactivation ( false ) ; return builder . createPopup ( ) ; } }

Fix:
builder . setAdText ( "Hit<seq2seq4repair_space>Ctrl+Enter<seq2seq4repair_space>to<seq2seq4repair_space>create<seq2seq4repair_space>comment.<seq2seq4repair_space>It<seq2seq4repair_space>will<seq2seq4repair_space>be<seq2seq4repair_space>published<seq2seq4repair_space>once<seq2seq4repair_space>you<seq2seq4repair_space>post<seq2seq4repair_space>your<seq2seq4repair_space>review." ) ;
Buggy code:
public class SaveExitPdfAction implements WindowListener { private static final Logger log = LoggerFactory . getLogger ( SaveExitPdfAction . class ) ; private SwingController controller ; private DocSyncFile file ; private IFileList fileList ; public SaveExitPdfAction ( DocSyncFile file , IFileList fileList , SwingController controller ) { } @ Override public void windowActivated ( WindowEvent e ) { } @ Override public void windowClosed ( WindowEvent e ) { } @ Override public void windowClosing ( WindowEvent e ) { int pageNr = controller . getCurrentPageNumber ( ) ; <START_BUG> IMetadata metadata = new Metadata ( ) ; <END_BUG> PDFMetadata . setPageNumber ( metadata , pageNr ) ; fileList . updateFile ( file , metadata ) ; SaveExitPdfAction . log . info ( ( ( ( ( "Saving<seq2seq4repair_space>" + ( file ) ) + "<seq2seq4repair_space>on<seq2seq4repair_space>page<seq2seq4repair_space>" ) + pageNr ) + "<seq2seq4repair_space>and<seq2seq4repair_space>Exiting..." ) ) ; } @ Override public void windowDeactivated ( WindowEvent e ) { } @ Override public void windowDeiconified ( WindowEvent e ) { } @ Override public void windowIconified ( WindowEvent e ) { } @ Override public void windowOpened ( WindowEvent e ) { } }

Fix:
IMetadata metadata = file . getMeta ( ) ;
Buggy code:
abstract class AbstractSecurityMetaDataAccessorEJB implements SecurityMetaDataAccessorEJB { public String getSecurityDomain ( final Deployment dep ) { String securityDomain = null ; for ( final EJBEndpoint ejbEndpoint : getEjbEndpoints ( dep ) ) { String nextSecurityDomain = ejbEndpoint . getSecurityDomain ( ) ; <START_BUG> if ( ( nextSecurityDomain == null ) || ( nextSecurityDomain . isEmpty ( ) ) ) { <END_BUG> nextSecurityDomain = null ; } securityDomain = getDomain ( securityDomain , nextSecurityDomain ) ; } if ( securityDomain == null ) { final DeploymentUnit unit = WSHelper . getRequiredAttachment ( dep , DeploymentUnit . class ) ; if ( ( unit . getParent ( ) ) != null ) { final EarMetaData jbossAppMD = unit . getParent ( ) . getAttachment ( EAR_METADATA ) ; return jbossAppMD instanceof JBossAppMetaData ? ( ( JBossAppMetaData ) ( jbossAppMD ) ) . getSecurityDomain ( ) : null ; } } return securityDomain ; } public SecurityRolesMetaData getSecurityRoles ( final Deployment dep ) { } protected abstract List < EJBEndpoint > getEjbEndpoints ( final Deployment dep ) { } public String getAuthMethod ( final Endpoint endpoint ) { } public boolean isSecureWsdlAccess ( final Endpoint endpoint ) { } public String getTransportGuarantee ( final Endpoint endpoint ) { } private EJBSecurityMetaData getEjbSecurityMetaData ( final Endpoint endpoint ) { } private String getDomain ( final String oldSecurityDomain , final String nextSecurityDomain ) { } private void ensureSameDomains ( final String oldSecurityDomain , final String newSecurityDomain ) { } }

Fix:
if ( nextSecurityDomain . isEmpty ( ) ) {
Buggy code:
public class PartSite implements IWorkbenchPartSite { private IWorkbenchPart part ; private IWorkbenchPage page ; private PartPane pane ; private IConfigurationElement configElement ; private String extensionID ; private String pluginID ; private String extensionName ; private ISelectionProvider selectionProvider ; private SubActionBars actionBars ; private KeyBindingService keyBindingService ; private ArrayList menuExtenders ; private IActionService handlerService ; public PartSite ( IWorkbenchPart part , IWorkbenchPage page ) { } private IActionService actionService ; public IActionService getActionService ( ) { } private IContextActivationService contextActivationService ; public IContextActivationService getContextActivationService ( ) { } public void dispose ( ) { } public IActionBars getActionBars ( ) { } public IConfigurationElement getConfigurationElement ( ) { } public String getId ( ) { } public IWorkbenchPage getPage ( ) { } public PartPane getPane ( ) { } public IWorkbenchPart getPart ( ) { } public String getPluginId ( ) { } public String getRegisteredName ( ) { } public ISelectionProvider getSelectionProvider ( ) { } public Shell getShell ( ) { } public IWorkbenchWindow getWorkbenchWindow ( ) { } public void registerContextMenu ( String menuID , MenuManager menuMgr , ISelectionProvider selProvider ) { } public void registerContextMenu ( MenuManager menuMgr , ISelectionProvider selProvider ) { } public String [ ] getContextMenuIds ( ) { } public void setActionBars ( SubActionBars bars ) { } public void setConfigurationElement ( IConfigurationElement configElement ) { } public void setPane ( PartPane pane ) { } public void setPart ( IWorkbenchPart newPart ) { } public void setSelectionProvider ( ISelectionProvider provider ) { } public IKeyBindingService getKeyBindingService ( ) { } protected String getInitialScopeId ( ) { <START_BUG> return IWorkbenchConstants . DEFAULT_ACCELERATOR_SCOPE_ID ; <END_BUG> } }

Fix:
return null ;
Buggy code:
public class InstanceMethodCall implements Call { @ Override public void invoke ( Stack stack ) { try { String methodName = ( ( Symbol ) ( stack . pop ( ) . object ) ) . symbol ; Object instance = stack . pop ( ) . object ; StackEffect stackEffect = ( ( StackEffect ) ( stack . pop ( ) . object ) ) ; Method method = getMethod ( instance . getClass ( ) . getName ( ) , methodName , stackEffect ) ; Class [ ] parameterTypes = method . getParameterTypes ( ) ; Object [ ] args = new Object [ parameterTypes . length ] ; for ( int i = ( parameterTypes . length ) - 1 ; i >= 0 ; i -- ) { <START_BUG> args [ i ] = stack . pop ( ) ; <END_BUG> } System . out . println ( "about<seq2seq4repair_space>to<seq2seq4repair_space>call<seq2seq4repair_space>instance<seq2seq4repair_space>method" ) ; Object result = method . invoke ( instance , args ) ; stack . push ( new JavaType ( method . getReturnType ( ) ) , result ) ; } catch ( IllegalAccessException e ) { throw new RuntimeException ( "Unable<seq2seq4repair_space>to<seq2seq4repair_space>invoke<seq2seq4repair_space>an<seq2seq4repair_space>instance<seq2seq4repair_space>method." , e ) ; } catch ( InvocationTargetException e ) { throw new RuntimeException ( "Unable<seq2seq4repair_space>to<seq2seq4repair_space>invoke<seq2seq4repair_space>an<seq2seq4repair_space>instance<seq2seq4repair_space>method." , e ) ; } } private Method getMethod ( String className , String methodName , StackEffect stackEffect ) { } @ Override public StackEffect getStackEffect ( TypeStack typeStack ) { } }

Fix:
args [ i ] = stack . pop ( ) . object ;
Buggy code:
public class DanceWithDragonsConstructor extends MatrixConstructor { public static final String CHARACTER_FILE_NAME = "src//main//resources//data//characters//dwd-list-no-dup.txt" ; public static final String TEXT_FILE_NAME = "src//main//resources//text//dancewithdragons.txt" ; public static final int BOOK_NUMBER = 5 ; public static void main ( String [ ] args ) { int fileNum = 1 ; String fileDesc = "no-dup" ; DanceWithDragonsConstructor dwdConstructor = new DanceWithDragonsConstructor ( 15 , 4 ) ; <START_BUG> dwdConstructor . constructMatrix ( LOG_FILE_MATRIX ) ; <END_BUG> dwdConstructor . writeFiles ( fileNum , fileDesc , LOG_FOLDER , false ) ; } public DanceWithDragonsConstructor ( int radius , int noise ) { } }

Fix:
dwdConstructor . constructMatrix ( LOG_FILE_NAME ) ;
Buggy code:
public class IncrementalFacadeTest extends AbstractIncrementalTest { @ Override public String getWorkflowFileName ( ) { <START_BUG> return "resources//workflow//incrementalfacade.mwe" ; <END_BUG> } @ Override public boolean writesDiff ( ) { } }

Fix:
return "//workflow//incrementalfacade.mwe" ;
Buggy code:
public class Variable { private int clusterId ; public int getClusterId ( ) { } private int varId ; private boolean isTrue = false ; public boolean getIsTrue ( ) { } public void randomFlip ( ) { Random rand = new Random ( ) ; <START_BUG> val = rand . nextBoolean ( ) ; <END_BUG> } public String toString ( ) { } public Variable ( int clusterId , int varId ) { } }

Fix:
isTrue = rand . nextBoolean ( ) ;
Buggy code:
public class SimpleFragListBuilderTest extends AbstractTestCase { public void testNullFieldFragList ( ) throws Exception { } public void testTooSmallFragSize ( ) throws Exception { } public void testSmallerFragSizeThanTermQuery ( ) throws Exception { } public void testSmallerFragSizeThanPhraseQuery ( ) throws Exception { } public void test1TermIndex ( ) throws Exception { } public void test2TermsIndex1Frag ( ) throws Exception { } public void test2TermsIndex2Frags ( ) throws Exception { } public void test2TermsQuery ( ) throws Exception { } public void testPhraseQuery ( ) throws Exception { } public void testPhraseQuerySlop ( ) throws Exception { } private FieldPhraseList fpl ( String queryValue , String indexValue ) throws Exception { } public void test1PhraseShortMV ( ) throws Exception { makeIndexShortMV ( ) ; FieldQuery fq = new FieldQuery ( tq ( "d" ) , true , true ) ; FieldTermStack stack = new FieldTermStack ( reader , 0 , F , fq ) ; FieldPhraseList fpl = new FieldPhraseList ( stack , fq ) ; SimpleFragListBuilder sflb = new SimpleFragListBuilder ( ) ; FieldFragList ffl = sflb . createFieldFragList ( fpl , 100 ) ; assertEquals ( 1 , ffl . fragInfos . size ( ) ) ; <START_BUG> assertEquals ( "subInfos=(d((6,7)))//1.0(0,100)" , ffl . fragInfos . get ( 0 ) . toString ( ) ) ; <END_BUG> } public void test1PhraseLongMV ( ) throws Exception { } public void test1PhraseLongMVB ( ) throws Exception { } }

Fix:
assertEquals ( "subInfos=(d((9,10)))//1.0(3,103)" , ffl . fragInfos . get ( 0 ) . toString ( ) ) ;
Buggy code:
public class MyServiceActivator implements ServiceActivator { private static final String CONTAINER_NAME = "server" ; private static final String CACHE_NAME = "default" ; public static final String PREFERRED_NODE = ClusteringTestConstants . NODE_2 ; @ Override public void activate ( ServiceActivatorContext context ) { } private static void install ( ServiceName name , int quorum , ServiceActivatorContext context ) { InjectedValue < ServerEnvironment > env = new InjectedValue ( ) ; MyService service = new MyService ( env ) ; ServiceController < ? > factoryService = context . getServiceRegistry ( ) . getRequiredService ( SERVICE_NAME . append ( MyServiceActivator . CONTAINER_NAME , MyServiceActivator . CACHE_NAME ) ) ; SingletonServiceBuilderFactory factory = ( ( SingletonServiceBuilderFactory ) ( factoryService . getValue ( ) ) ) ; <START_BUG> factory . createSingletonServiceBuilder ( name , service ) . electionPolicy ( new org . wildfly . clustering . singleton . election . PreferredSingletonElectionPolicy ( new org . wildfly . clustering . singleton . election . SimpleSingletonElectionPolicy ( ) , new org . wildfly . clustering . singleton . election . NamePreference ( ( ( ( MyServiceActivator . PREFERRED_NODE ) + "//" ) + ( MyServiceActivator . CONTAINER_NAME ) ) ) ) ) . requireQuorum ( quorum ) . build ( context . getServiceTarget ( ) ) . addDependency ( ServerEnvironmentService . SERVICE_NAME , ServerEnvironment . class , env ) . setInitialMode ( ServiceController . Mode . ACTIVE ) . install ( ) ; <END_BUG> } }

Fix:
factory . createSingletonServiceBuilder ( name , service ) . electionPolicy ( new org . wildfly . clustering . singleton . election . PreferredSingletonElectionPolicy ( new org . wildfly . clustering . singleton . election . SimpleSingletonElectionPolicy ( ) , new org . wildfly . clustering . singleton . election . NamePreference ( ( ( MyServiceActivator . PREFERRED_NODE ) + "//ee" ) ) ) ) . requireQuorum ( quorum ) . build ( context . getServiceTarget ( ) ) . addDependency ( ServerEnvironmentService . SERVICE_NAME , ServerEnvironment . class , env ) . setInitialMode ( ServiceController . Mode . ACTIVE ) . install ( ) ;
Buggy code:
public class OperatorNot extends SpelNodeImpl { public OperatorNot ( int pos , SpelNodeImpl operand ) { } @ Override public BooleanTypedValue getValueInternal ( ExpressionState state ) throws EvaluationException { try { TypedValue typedValue = children [ 0 ] . getValueInternal ( state ) ; <START_BUG> if ( NULL_TYPED_VALUE . equals ( typedValue ) ) { <END_BUG> throw new SpelEvaluationException ( SpelMessage . TYPE_CONVERSION_ERROR , "null" , "boolean" ) ; } boolean value = ( ( Boolean ) ( state . convertValue ( typedValue , TypeDescriptor . valueOf ( Boolean . class ) ) ) ) ; return BooleanTypedValue . forValue ( ( ! value ) ) ; } catch ( SpelEvaluationException see ) { see . setPosition ( getChild ( 0 ) . getStartPosition ( ) ) ; throw see ; } } @ Override public String toStringAST ( ) { } }

Fix:
if ( NULL . equals ( typedValue ) ) {
Buggy code:
public class TableItem extends Item { Table parent ; String [ ] strings ; Image [ ] images ; boolean checked ; boolean grayed ; boolean cached ; Color foreground ; Color background ; Color [ ] cellForeground ; Color [ ] cellBackground ; Font font ; Font [ ] cellFont ; int width = - 1 ; public TableItem ( Table parent , int style ) { } public TableItem ( Table parent , int style , int index ) { } TableItem ( Table parent , int style , int index , boolean create ) { } static Table checkNull ( Table control ) { } int calculateWidth ( int index , GC gc ) { } protected void checkSubclass ( ) { } void clear ( ) { } public Color getBackground ( ) { } public Color getBackground ( int index ) { } public Rectangle getBounds ( int index ) { } public boolean getChecked ( ) { } public Font getFont ( ) { } public Font getFont ( int index ) { } public Color getForeground ( ) { } public Color getForeground ( int index ) { } public boolean getGrayed ( ) { } public Image getImage ( int index ) { } public Rectangle getImageBounds ( int index ) { } public int getImageIndent ( ) { } public Table getParent ( ) { } public String getText ( int index ) { } void redraw ( int propertyID ) { } void releaseChild ( ) { } void releaseWidget ( ) { } public void setBackground ( Color color ) { } public void setBackground ( int index , Color color ) { } public void setChecked ( boolean checked ) { } public void setFont ( Font font ) { } public void setFont ( int index , Font font ) { } public void setForeground ( Color color ) { } public void setForeground ( int index , Color color ) { } public void setGrayed ( boolean grayed ) { } public void setImage ( Image [ ] images ) { } public void setImage ( int index , Image image ) { checkWidget ( ) ; if ( ( image != null ) && ( image . isDisposed ( ) ) ) { error ( ERROR_INVALID_ARGUMENT ) ; } int itemIndex = parent . indexOf ( this ) ; if ( itemIndex == ( - 1 ) ) return ; <START_BUG> if ( ( ! ( parent . itemHeight ) ) && ( image != null ) ) { <END_BUG> parent . setItemHeight ( image ) ; } if ( index == 0 ) { if ( ( image != null ) && ( ( image . type ) == ( SWT . ICON ) ) ) { if ( image . equals ( this . image ) ) return ; } width = - 1 ; super . setImage ( image ) ; } int count = Math . max ( 1 , parent . columnCount ) ; if ( ( 0 <= index ) && ( index < count ) ) { if ( ( images ) == null ) images = new Image [ count ] ; if ( ( image != null ) && ( ( image . type ) == ( SWT . ICON ) ) ) { if ( image . equals ( images [ index ] ) ) return ; } images [ index ] = image ; } if ( index == 0 ) parent . setScrollWidth ( this ) ; redraw ( kDataBrowserNoItem ) ; } public void setImage ( Image image ) { } public void setImageIndent ( int indent ) { } public void setText ( String [ ] strings ) { } public void setText ( int index , String string ) { } public void setText ( String string ) { } }

Fix:
if ( ( ( parent . imageBounds ) == null ) && ( image != null ) ) {
Buggy code:
public class RegisterDataType extends AbstractTypeDefinition { protected void registerResource ( final String name , final String className , final File file ) throws TaskException { if ( null == className ) { try { <START_BUG> getDeployer ( ) . deployDataType ( name , file ) ; <END_BUG> } catch ( final DeploymentException de ) { throw new TaskException ( ( ( ( "Failed<seq2seq4repair_space>deploying<seq2seq4repair_space>" + name ) + "<seq2seq4repair_space>from<seq2seq4repair_space>" ) + file ) , de ) ; } } else { try { final URL url = file . toURL ( ) ; final DefaultTypeFactory factory = new DefaultTypeFactory ( new URL [ ] { url } ) ; factory . addNameClassMapping ( name , className ) ; getTypeManager ( ) . registerType ( ROLE , name , factory ) ; } catch ( final Exception e ) { throw new TaskException ( ( ( ( "Failed<seq2seq4repair_space>registering<seq2seq4repair_space>" + name ) + "<seq2seq4repair_space>from<seq2seq4repair_space>" ) + file ) , e ) ; } } } }

Fix:
getDeployer ( ) . deployType ( ROLE , name , file ) ;
Buggy code:
public class ExtensionEvaluationTest extends TestCase { private ExecutionContextImpl ec ; @ Override protected void setUp ( ) throws Exception { } private ExtensionFile parse ( final String expression ) { } public void testVoidInSignature ( ) throws Exception { final ExtensionFile file = parse ( ( "foo(String<seq2seq4repair_space>str)<seq2seq4repair_space>:<seq2seq4repair_space>'String';" + ( "foo(Integer<seq2seq4repair_space>int)<seq2seq4repair_space>:<seq2seq4repair_space>'Int';" + "foo(Void<seq2seq4repair_space>void)<seq2seq4repair_space>:<seq2seq4repair_space>'void';" ) ) ) ; ec = ( ( ExecutionContextImpl ) ( ec . cloneWithResource ( file ) ) ) ; <START_BUG> XtendFacade facade = new XtendFacade ( ec ) ; <END_BUG> assertEquals ( "String" , facade . call ( "foo" , "String" ) ) ; assertEquals ( "Int" , facade . call ( "foo" , new Long ( 42 ) ) ) ; assertEquals ( "void" , facade . call ( "foo" , ( ( Object ) ( null ) ) ) ) ; } public final void testWithEverything ( ) { } public final void testJavaExtension2 ( ) { } public final void testPolymorphism ( ) { } public final void testRecursion ( ) { } public final void testMemberPosition ( ) { } public final void testCachedExtension ( ) { } private static int magic = 0 ; public static final String testMethod ( final String s ) { } public final void testCreateExtension ( ) { } public final void testCreateExtension1 ( ) { } public final void testAmbigous ( ) { } public final void testBug134626 ( ) { } public static String methodForBug134626 ( ) { } public void testAdvices ( ) throws Exception { } private Object call ( ExecutionContextImpl ctx , String string , Object ... params ) { } }

Fix:
XtendFacade facade = XtendFacade . create ( ec ) ;