nus-yam/ex-repair huggingface dataset:
Buggy code:
public class DynamicStubFactoryFactory extends StubFactoryFactoryDynamicBase { @ Override public PresentationManager . StubFactory makeDynamicStubFactory ( final PresentationManager pm , final PresentationManager . ClassData classData , final ClassLoader classLoader ) { } public static Class < ? > makeStubClass ( final Class < ? > myClass ) { final String stubClassName = myClass + "_Stub" ; ClassLoader cl = SecurityActions . getContextClassLoader ( ) ; if ( cl == null ) { cl = myClass . getClassLoader ( ) ; } if ( cl == null ) { throw MESSAGES . couldNotFindClassLoaderForStub ( stubClassName ) ; } Class < ? > theClass ; try { theClass = cl . loadClass ( stubClassName ) ; } catch ( ClassNotFoundException e ) { try { final ClassFile clazz = IIOPStubCompiler . compile ( myClass , stubClassName ) ; <START_BUG> theClass = clazz . define ( cl ) ; <END_BUG> } catch ( RuntimeException ex ) { try { theClass = cl . loadClass ( stubClassName ) ; } catch ( ClassNotFoundException e1 ) { EJB3_LOGGER . dynamicStubCreationFailed ( stubClassName , ex ) ; throw ex ; } } } return theClass ; } private static final class StubFactory extends StubFactoryBase { private final Class < ? > clazz ; protected StubFactory ( PresentationManager . ClassData classData , final Class < ? > clazz ) { } @ Override public org . omg . CORBA . Object makeStub ( ) { } } }

Fix:
theClass = clazz . define ( cl , myClass . getProtectionDomain ( ) ) ;
Buggy code:
public class TestEmbeddableSuperclass extends SingleEMFTestCase { public void setUp ( ) { } public void testSuperclassEmbeddedOnly ( ) { } public void testSubclassMappingDefaultsAndOverrides ( ) { } public void testSubclassDiscriminatorMapping ( ) { } public void testVersionOverrideMapping ( ) { } public void testRelationMappings ( ) { JDBCConfiguration conf = ( ( JDBCConfiguration ) ( emf . getConfiguration ( ) ) ) ; ClassMapping cls = conf . getMappingRepositoryInstance ( ) . getMapping ( EmbeddableSuperSub . class , null , true ) ; FieldMapping fm = cls . getFieldMapping ( "sub" ) ; assertTrue ( ( ( fm . getStrategy ( ) ) instanceof RelationFieldStrategy ) ) ; fm = cls . getFieldMapping ( "sup" ) ; <START_BUG> assertTrue ( ( ( fm . getStrategy ( ) ) instanceof EmbedFieldStrategy ) ) ; <END_BUG> } public void testPersistAndFind ( ) { } }

Fix:
assertEquals ( RelationFieldStrategy . class , fm . getStrategy ( ) . getClass ( ) ) ;
Buggy code:
public class Main { public static MainClassLoader mainClassLoader ; public static void main ( String [ ] args ) throws Exception { } public static void restart ( String [ ] args ) throws Exception { } private static void start ( String [ ] args ) throws Exception { <START_BUG> Main . mainClassLoader = new MainClassLoader ( Thread . currentThread ( ) . getContextClassLoader ( ) ) ; <END_BUG> Thread . currentThread ( ) . setContextClassLoader ( Main . mainClassLoader ) ; Bootstrap startup = new Bootstrap ( ) ; startup . run ( args ) ; } }

Fix:
Main . mainClassLoader = new MainClassLoader ( Main . class . getClassLoader ( ) ) ;
Buggy code:
public class UnboundedQueueThreadPoolService implements Service < ManagedJBossThreadPoolExecutorService > { private final InjectedValue < ThreadFactory > threadFactoryValue = new InjectedValue < ThreadFactory > ( ) ; private ManagedJBossThreadPoolExecutorService executor ; private int maxThreads ; private TimeSpec keepAlive ; public UnboundedQueueThreadPoolService ( int maxThreads , TimeSpec keepAlive ) { } public synchronized void start ( final StartContext context ) throws StartException { } public synchronized void stop ( final StopContext context ) { } public synchronized ManagedJBossThreadPoolExecutorService getValue ( ) throws IllegalStateException { final ManagedJBossThreadPoolExecutorService value = this . executor ; if ( value == null ) { <START_BUG> throw MESSAGES . unboundedQueueThreadPoolExecutorUninitialized ( ) ; <END_BUG> } return value ; } public Injector < ThreadFactory > getThreadFactoryInjector ( ) { } public synchronized void setMaxThreads ( final int maxThreads ) { } public synchronized void setKeepAlive ( final TimeSpec keepAlive ) { } public int getActiveCount ( ) { } public long getCompletedTaskCount ( ) { } public int getCurrentThreadCount ( ) { } public int getLargestPoolSize ( ) { } public int getLargestThreadCount ( ) { } public int getRejectedCount ( ) { } public long getTaskCount ( ) { } public int getQueueSize ( ) { } TimeUnit getKeepAliveUnit ( ) { } }

Fix:
throw ROOT_LOGGER . unboundedQueueThreadPoolExecutorUninitialized ( ) ;
Buggy code:
public class BootstrapContextAdd extends AbstractAddStepHandler { public static final BootstrapContextAdd INSTANCE = new BootstrapContextAdd ( ) ; @ Override protected void populateModel ( final ModelNode operation , final ModelNode model ) throws OperationFailedException { } @ Override protected void performRuntime ( final OperationContext context , final ModelNode operation , final ModelNode model ) throws OperationFailedException { String name = NAME . getAttribute ( ) . resolveModelAttribute ( context , model ) . asString ( ) ; String workmanager = WORKMANAGER . getAttribute ( ) . resolveModelAttribute ( context , model ) . asString ( ) ; boolean usingDefaultWm = false ; if ( Constants . DEFAULT_NAME . equals ( workmanager ) ) { usingDefaultWm = true ; } ServiceTarget serviceTarget = context . getServiceTarget ( ) ; CloneableBootstrapContext ctx = new NamedBootstrapContext ( name ) ; final BootStrapContextService bootCtxService = new BootStrapContextService ( ctx , name , usingDefaultWm ) ; <START_BUG> serviceTarget . addService ( BOOTSTRAP_CONTEXT_SERVICE . append ( name ) , bootCtxService ) . addDependency ( REQUIRED , WORKMANAGER_SERVICE . append ( workmanager ) , WorkManager . class , bootCtxService . getWorkManagerValueInjector ( ) ) . addDependency ( JBOSS_TXN_XA_TERMINATOR , JBossXATerminator . class , bootCtxService . getXaTerminatorInjector ( ) ) . addDependency ( JBOSS_TXN_ARJUNA_TRANSACTION_MANAGER , TransactionManagerService . class , bootCtxService . getTxManagerInjector ( ) ) . addDependency ( CONNECTOR_CONFIG_SERVICE , JcaSubsystemConfiguration . class , bootCtxService . getJcaConfigInjector ( ) ) . setInitialMode ( ACTIVE ) . install ( ) ; <END_BUG> } }

Fix:
serviceTarget . addService ( BOOTSTRAP_CONTEXT_SERVICE . append ( name ) , bootCtxService ) . addDependency ( OPTIONAL , WORKMANAGER_SERVICE . append ( workmanager ) , WorkManager . class , bootCtxService . getWorkManagerValueInjector ( ) ) . addDependency ( JBOSS_TXN_XA_TERMINATOR , JBossXATerminator . class , bootCtxService . getXaTerminatorInjector ( ) ) . addDependency ( JBOSS_TXN_ARJUNA_TRANSACTION_MANAGER , TransactionManagerService . class , bootCtxService . getTxManagerInjector ( ) ) . addDependency ( CONNECTOR_CONFIG_SERVICE , JcaSubsystemConfiguration . class , bootCtxService . getJcaConfigInjector ( ) ) . setInitialMode ( ACTIVE ) . install ( ) ;
Buggy code:
public class ResolvedSourceMethod extends SourceMethod { private String uniqueKey ; public ResolvedSourceMethod ( JavaElement parent , String name , String [ ] parameterTypes , String uniqueKey ) { } public String getKey ( ) { } public boolean isResolved ( ) { } protected void toStringInfo ( int tab , StringBuffer buffer , Object info , boolean showResolvedInfo ) { super . toStringInfo ( tab , buffer , info , showResolvedInfo ) ; if ( showResolvedInfo ) { buffer . append ( "<seq2seq4repair_space>{key=" ) ; <START_BUG> buffer . append ( this . uniqueKey ) ; <END_BUG> buffer . append ( "}" ) ; } } public JavaElement unresolved ( ) { } }

Fix:
buffer . append ( this . getKey ( ) ) ;
Buggy code:
public class Manager extends JavaPlugin { public static final Logger log = Logger . getLogger ( "Minecraft" ) ; public static final String pre = "[IPM]<seq2seq4repair_space>" ; private static boolean loaded ; private boolean updated = false ; private ArrayList < IPMPluginInfo > pluginInfos = new ArrayList < IPMPluginInfo > ( ) ; private HashMap < String , API > apis = new HashMap < String , API > ( ) ; private Config config = new Config ( ) ; public HashMap < String , API > getApis ( ) { } public ArrayList < IPMPluginInfo > getPluginInfos ( ) { } public Config getIPMConfig ( ) { } @ Override public void onDisable ( ) { } @ Override public void onEnable ( ) { } public static boolean isLoaded ( ) { } private boolean checkUpdate ( ) { } private boolean update ( Version newV ) { } private void loadPluginXML ( ) { } private void createDescriptions ( ) { } private void loadPlugins ( ArrayList < Plugin > plugs ) { } private void loadPlugin ( ArrayList < Plugin > plugs , ArrayList < Plugin > queuePlugins , Plugin plugin ) { } private Plugin getBukkitPluginByPluginName ( List < Plugin > plugs , String name ) { } private boolean downloadPlugin ( String name ) { File pluginFolder = new File ( ( ( getDataFolder ( ) . getAbsolutePath ( ) ) + "//plugins" ) ) ; if ( ! ( pluginFolder . exists ( ) ) ) { pluginFolder . mkdirs ( ) ; } IPMPluginInfo info = getPluginInfoByPluginName ( name ) ; String uri = info . getUri ( ) ; <START_BUG> if ( uri . endsWith ( ".jar" ) ) { <END_BUG> uri += ( "//" + ( info . getVersion ( ) . toString ( ) ) ) + ".jar" ; } Manager . log . info ( ( ( ( Manager . pre ) + "Downloading:<seq2seq4repair_space>" ) + uri ) ) ; try { FileOutputStream fos = new FileOutputStream ( new File ( pluginFolder , ( name + ".jar" ) ) ) ; InputStream is = new URI ( uri ) . toURL ( ) . openStream ( ) ; int t = is . read ( ) ; while ( t != ( - 1 ) ) { fos . write ( t ) ; t = is . read ( ) ; } fos . close ( ) ; is . close ( ) ; config . setVersion ( info . getName ( ) , info . getVersion ( ) . toString ( ) ) ; config . saveVersions ( ) ; getConfiguration ( ) . setProperty ( ( ( info . getName ( ) ) + ".version.installed" ) , info . getVersion ( ) . toString ( ) ) ; getConfiguration ( ) . save ( ) ; return true ; } catch ( Exception e ) { Manager . log . info ( e . toString ( ) ) ; return false ; } } public boolean queueDownloadPlugin ( String name ) { } public IPMPluginInfo getPluginInfoByPluginName ( String name ) { } No newline ; at end ; of file ; }

Fix:
if ( ! ( uri . endsWith ( ".jar" ) ) ) {
Buggy code:
public class CollectionsHandler extends RequestHandlerBase { protected static Logger log = LoggerFactory . getLogger ( CollectionsHandler . class ) ; protected final CoreContainer coreContainer ; public CollectionsHandler ( ) { } public CollectionsHandler ( final CoreContainer coreContainer ) { } @ Override public final void init ( NamedList args ) { } public CoreContainer getCoreContainer ( ) { } @ Override public void handleRequestBody ( SolrQueryRequest req , SolrQueryResponse rsp ) throws Exception { } public static long DEFAULT_ZK_TIMEOUT = 60 * 1000 ; private void handleResponse ( String operation , ZkNodeProps m , SolrQueryResponse rsp ) throws InterruptedException , KeeperException { } private void handleResponse ( String operation , ZkNodeProps m , SolrQueryResponse rsp , long timeout ) throws InterruptedException , KeeperException { } private void handleReloadAction ( SolrQueryRequest req , SolrQueryResponse rsp ) throws InterruptedException , KeeperException { } private void handleSyncShardAction ( SolrQueryRequest req , SolrQueryResponse rsp ) throws IOException , InterruptedException , SolrServerException , KeeperException { } private void handleCreateAliasAction ( SolrQueryRequest req , SolrQueryResponse rsp ) throws Exception { } private void handleDeleteAliasAction ( SolrQueryRequest req , SolrQueryResponse rsp ) throws Exception { CollectionsHandler . log . info ( ( "Delete<seq2seq4repair_space>alias<seq2seq4repair_space>action<seq2seq4repair_space>:<seq2seq4repair_space>" + ( req . getParamString ( ) ) ) ) ; String name = req . getParams ( ) . required ( ) . get ( "name" ) ; ZkNodeProps m = new ZkNodeProps ( Overseer . QUEUE_OPERATION , OverseerCollectionProcessor . DELETEALIAS , "name" , name ) ; <START_BUG> handleResponse ( CREATEALIAS , m , rsp ) ; <END_BUG> } private void handleDeleteAction ( SolrQueryRequest req , SolrQueryResponse rsp ) throws InterruptedException , KeeperException { } private void handleCreateAction ( SolrQueryRequest req , SolrQueryResponse rsp ) throws InterruptedException , KeeperException { } private void handleCreateShard ( SolrQueryRequest req , SolrQueryResponse rsp ) throws InterruptedException , KeeperException { } private static void copyIfNotNull ( SolrParams params , Map < String , Object > props , String ... keys ) { } private void handleDeleteShardAction ( SolrQueryRequest req , SolrQueryResponse rsp ) throws InterruptedException , KeeperException { } private void handleSplitShardAction ( SolrQueryRequest req , SolrQueryResponse rsp ) throws InterruptedException , KeeperException { } public static ModifiableSolrParams params ( String ... params ) { } @ Override public String getDescription ( ) { } @ Override public String getSource ( ) { } }

Fix:
handleResponse ( DELETEALIAS , m , rsp ) ;
Buggy code:
public class DiskMultipartRequestHandler implements MultipartRequestHandler { protected ActionServlet servlet ; protected ActionMapping mapping ; protected Hashtable fileElements ; protected Hashtable textElements ; protected Hashtable allElements ; public void handleRequest ( HttpServletRequest request ) throws ServletException { MultipartIterator iterator = new MultipartIterator ( request , servlet . getBufferSize ( ) , getMaxSizeFromServlet ( ) ) ; MultipartElement element ; textElements = new Hashtable ( ) ; fileElements = new Hashtable ( ) ; allElements = new Hashtable ( ) ; while ( ( element = iterator . getNextElement ( ) ) != null ) { <START_BUG> if ( ( element . getContentType ( ) ) == null ) { <END_BUG> String textData ; try { textData = new String ( element . getData ( ) , "ISO-8859-1" ) ; } catch ( UnsupportedEncodingException uee ) { textData = new String ( element . getData ( ) ) ; } textElements . put ( element . getName ( ) , textData ) ; allElements . put ( element . getName ( ) , textData ) ; } else { try { DiskFile theFile = writeFile ( element ) ; fileElements . put ( element . getName ( ) , theFile ) ; allElements . put ( element . getName ( ) , theFile ) ; } catch ( IOException ioe ) { throw new ServletException ( ( ( "DiskMultipartRequestHandler." + "handleRequest(),<seq2seq4repair_space>IOException:<seq2seq4repair_space>" ) + ( ioe . getMessage ( ) ) ) ) ; } } } } protected DiskFile writeFile ( MultipartElement element ) throws IOException , ServletException { } public Hashtable getAllElements ( ) { } public Hashtable getTextElements ( ) { } public Hashtable getFileElements ( ) { } public void rollback ( ) { } public void finish ( ) { } public void setServlet ( ActionServlet servlet ) { } public void setMapping ( ActionMapping mapping ) { } public ActionServlet getServlet ( ) { } public ActionMapping getMapping ( ) { } protected long getMaxSizeFromServlet ( ) throws ServletException { } }

Fix:
if ( ( ( element . getFileName ( ) ) == null ) && ( ( element . getContentType ( ) ) == null ) ) {
Buggy code:
public class GroupDetailsFragment extends Fragment { @ Override public View onCreateView ( LayoutInflater inflater , ViewGroup container , Bundle savedInstanceState ) { } private View view ; private final void setListeners ( ) { } public final void onLoaded ( ) { } private ListView _usersListView ; private GridView _gridView ; private TextView _groupCreatorView ; private ButtonFloat _btnAddUser ; private ProgressBarIndeterminate _progressBar ; private Activity _activity ; private App _app ; private WebService _webService ; private Gson _gson ; private GroupJsonBinding _group ; private ArrayList < FriendJsonBinding > _friends ; private ArrayList < String > _friendsUserNames ; private ArrayList < GroupUserJsonBinding > _groupUsers ; private GroupDetailsFragment _fragment ; private GroupDetailsFragment . LoaderTask _loaderTask ; private GroupDetailsFragment . FriendsLoaderTask _friendsLoaderTask ; private Intent _intent ; private SnackBar _successDialog ; private Map < String , FriendJsonBinding > _usersByUsernamesMap ; private class LoaderTask extends AsyncTask < Void , Void , Void > { @ Override protected void onPreExecute ( ) { } @ Override protected Void doInBackground ( Void ... params ) { } @ Override protected void onPostExecute ( Void aVoid ) { } } private class FriendsLoaderTask extends AsyncTask < Void , Void , Void > { @ Override protected void onPreExecute ( ) { } @ Override protected Void doInBackground ( Void ... params ) { } @ Override protected void onPostExecute ( Void aVoid ) { } } private class AddUserToGroupTask extends AsyncTask < String , Void , Boolean > { @ Override protected void onPreExecute ( ) { } @ Override protected Boolean doInBackground ( String ... params ) { } @ Override protected void onPostExecute ( Boolean result ) { super . onPostExecute ( result ) ; if ( result . equals ( Boolean . TRUE ) ) { _loaderTask = new GroupDetailsFragment . LoaderTask ( ) ; _loaderTask . execute ( ) ; <START_BUG> _successDialog = new SnackBar ( _activity , "You<seq2seq4repair_space>have<seq2seq4repair_space>add<seq2seq4repair_space>user<seq2seq4repair_space>to<seq2seq4repair_space>group!" , "OK" , new View . OnClickListener ( ) { <END_BUG> @ Override public void onClick ( View v ) { _successDialog . dismiss ( ) ; } } ) ; _successDialog . show ( ) ; } else { _successDialog = new SnackBar ( _activity , "An<seq2seq4repair_space>error<seq2seq4repair_space>has<seq2seq4repair_space>occured!" , "OK" , new View . OnClickListener ( ) { @ Override public void onClick ( View v ) { _successDialog . dismiss ( ) ; } } ) ; _successDialog . show ( ) ; } _progressBar . setVisibility ( INVISIBLE ) ; } } }

Fix:
_successDialog = new SnackBar ( _activity , "You<seq2seq4repair_space>have<seq2seq4repair_space>added<seq2seq4repair_space>user<seq2seq4repair_space>to<seq2seq4repair_space>group!" , "OK" , new View . OnClickListener ( ) {
Buggy code:
public class PluginManagerDialog extends JDialog implements ActionListener , TreeSelectionListener { private static final String RESOURCE_PATH = "org.columba.core.i18n.dialog" ; JButton installButton ; JButton removeButton ; JButton optionsButton ; JButton infoButton ; JButton helpButton ; JButton closeButton ; PluginTree table ; ConfigPluginHandler configHandler ; protected PluginNode selectedNode ; public PluginManagerDialog ( ) { } protected void initComponents ( ) { } public void actionPerformed ( ActionEvent e ) { } public void valueChanged ( TreeSelectionEvent arg0 ) { selectedNode = ( ( PluginNode ) ( arg0 . getPath ( ) . getLastPathComponent ( ) ) ) ; if ( ( selectedNode ) == null ) return ; boolean isCategoryFolder = selectedNode . isCategory ( ) ; if ( isCategoryFolder ) { removeButton . setEnabled ( false ) ; infoButton . setEnabled ( false ) ; optionsButton . setEnabled ( false ) ; } else { removeButton . setEnabled ( true ) ; <START_BUG> infoButton . setEnabled ( true ) ; <END_BUG> if ( ( selectedNode ) == null ) return ; if ( configHandler . exists ( selectedNode . getId ( ) ) ) optionsButton . setEnabled ( true ) ; else optionsButton . setEnabled ( false ) ; } } public PluginNode getSelectedNode ( ) { } protected void installPlugin ( File file ) { } }

Fix:
infoButton . setEnabled ( selectedNode . hasInfo ( ) ) ;
Buggy code:
class PromptService { XPCOMObject supports ; XPCOMObject promptService ; int refCount = 0 ; public PromptService ( ) { } int AddRef ( ) { } void createCOMInterfaces ( ) { } void disposeCOMInterfaces ( ) { } int getAddress ( ) { } int QueryInterface ( int riid , int ppvObject ) { } int Release ( ) { } Browser getBrowser ( int aDOMWindow ) { } String getLabel ( int buttonFlag , int index , int buttonTitle ) { } public int Alert ( int parent , int dialogTitle , int text ) { Browser browser = getBrowser ( parent ) ; int length = XPCOM . strlen_PRUnichar ( dialogTitle ) ; char [ ] dest = new char [ length ] ; XPCOM . memmove ( dest , dialogTitle , ( length * 2 ) ) ; String titleLabel = new String ( dest ) ; length = XPCOM . strlen_PRUnichar ( text ) ; dest = new char [ length ] ; XPCOM . memmove ( dest , text , ( length * 2 ) ) ; String textLabel = new String ( dest ) ; <START_BUG> MessageBox messageBox = new MessageBox ( browser . getShell ( ) , SWT . OK ) ; <END_BUG> messageBox . setText ( titleLabel ) ; messageBox . setMessage ( textLabel ) ; messageBox . open ( ) ; return XPCOM . NS_OK ; } public int AlertCheck ( int parent , int dialogTitle , int text , int checkMsg , int checkValue ) { } public int Confirm ( int parent , int dialogTitle , int text , int _retval ) { } public int ConfirmCheck ( int parent , int dialogTitle , int text , int checkMsg , int checkValue , int _retval ) { } public int ConfirmEx ( int parent , int dialogTitle , int text , int buttonFlags , int button0Title , int button1Title , int button2Title , int checkMsg , int checkValue , int _retval ) { } public int Prompt ( int parent , int dialogTitle , int text , int value , int checkMsg , int checkValue , int _retval ) { } public int PromptUsernameAndPassword ( int parent , int dialogTitle , int text , int username , int password , int checkMsg , int checkValue , int _retval ) { } public int PromptPassword ( int parent , int dialogTitle , int text , int password , int checkMsg , int checkValue , int _retval ) { } public int Select ( int parent , int dialogTitle , int text , int count , int selectList , int outSelection , int _retval ) { } }

Fix:
MessageBox messageBox = new MessageBox ( browser . getShell ( ) , ( ( SWT . OK ) | ( SWT . ICON_WARNING ) ) ) ;
Buggy code:
public class DiscoveryStartup { public static final String DISCOVERY_CONTAINER = "ecf.discovery.jmdns" ; public static final String PROP_PROTOCOL_NAME = "protocol" ; public static final String PROP_CONTAINER_TYPE_NAME = "containertype" ; public static final String PROP_CONTAINER_TYPE_VALUE = CollabClient . GENERIC_CONTAINER_CLIENT_NAME ; public static final String PROP_PW_REQ_NAME = "pwrequired" ; public static final String PROP_PW_REQ_VALUE = "false" ; public static final String PROP_DEF_USER_NAME = "defaultuser" ; public static final String PROP_DEF_USER_VALUE = "guest" ; public static final String PROP_PATH_NAME = "path" ; public static final int SVC_DEF_WEIGHT = 0 ; public static final int SVC_DEF_PRIORITY = 0 ; static IDiscoveryContainer discovery = null ; static IContainer container = null ; public DiscoveryStartup ( ) throws Exception { } protected IDiscoveryContainer getDiscoveryContainer ( ) { } protected IContainer getContainer ( ) { } public void dispose ( ) { } protected boolean isActive ( ) { } protected void setupDiscovery ( ) throws Exception { } protected void connectToServiceFromInfo ( IServiceInfo svcInfo ) { IServiceProperties props = svcInfo . getServiceProperties ( ) ; String type = ( ( String ) ( props . getPropertyString ( DiscoveryStartup . PROP_CONTAINER_TYPE_NAME ) ) ) ; if ( ( type == null ) || ( type . equals ( "" ) ) ) { type = CollabClient . GENERIC_CONTAINER_CLIENT_NAME ; } String username = System . getProperty ( "user.name" ) ; String targetString = null ; IResource workspace = null ; try { targetString = svcInfo . getServiceURI ( ) . toString ( ) ; workspace = CollabClient . getWorkspace ( ) ; } catch ( Exception e ) { ClientPlugin . log ( ( "Exception<seq2seq4repair_space>connecting<seq2seq4repair_space>to<seq2seq4repair_space>service<seq2seq4repair_space>with<seq2seq4repair_space>info<seq2seq4repair_space>" + svcInfo ) , e ) ; return ; } <START_BUG> URIClientConnectAction action = new URIClientConnectAction ( type , targetString , username , null , workspace ) ; <END_BUG> action . run ( null ) ; } public static void registerService ( URI uri ) { } public static void unregisterServer ( ISharedObjectContainer container ) { } public static void registerServiceTypes ( ) { } }

Fix:
URIClientConnectAction action = new URIClientConnectAction ( type , targetString , username , null , workspace , false ) ;
Buggy code:
public class Calcul { static final int MIN = 1 ; static final int MAX = 15 ; int chiffre1 ; int chiffre2 ; public Calcul ( ) { } public Calcul ( int max ) { } public String getCalcul ( String mode ) { } public Integer getResultat ( String mode ) { } public static int myRandom ( ) { } public static ArrayList < Calcul > generateList ( int size ) { } public int myRandom2 ( int max ) { } public static ArrayList < Calcul > generateList2 ( int size , int max ) { ArrayList < Calcul > liste = new ArrayList < Calcul > ( size ) ; for ( int i = 0 ; i < size ; i ++ ) { Calcul test = new Calcul ( max ) ; while ( ( test . getResultat ( "-" ) ) <= 0 ) { <START_BUG> test = new Calcul ( ) ; <END_BUG> } liste . add ( test ) ; } return liste ; } No newline ; at end ; of file ; }

Fix:
test = new Calcul ( max ) ;
Buggy code:
public class FieldReaderDataSource extends DataSource < Reader > { private static final Logger LOG = LoggerFactory . getLogger ( FieldReaderDataSource . class ) ; protected VariableResolver vr ; protected String dataField ; private String encoding ; private EntityProcessorWrapper entityProcessor ; @ Override public void init ( Context context , Properties initProps ) { } @ Override public Reader getData ( String query ) { } static Reader readCharStream ( Clob clob ) { } private Reader getReader ( Blob blob ) throws UnsupportedEncodingException , SQLException { if ( ( encoding ) == null ) { <START_BUG> return new InputStreamReader ( blob . getBinaryStream ( ) ) ; <END_BUG> } else { return new InputStreamReader ( blob . getBinaryStream ( ) , encoding ) ; } } @ Override public void close ( ) { } }

Fix:
return new InputStreamReader ( blob . getBinaryStream ( ) , "UTF-8" ) ;
Buggy code:
public class InjectCodeClassInstrumenter extends AbstractFindTouchPointsClassInstrumenter { private final InjectCodeTouchPointListener touchPointListener ; private final ClassMap classMap ; private final CodeProvider codeProvider ; private boolean wasStaticInitMethodVisited = false ; private final Set < String > ignoredMethods ; public InjectCodeClassInstrumenter ( ClassVisitor cv , Collection < Pattern > ignoreRegexes , boolean threadsafeRigorous , ClassMap classMap , Map < Integer , Map < Integer , Integer > > duplicatedLinesMap , Set < String > ignoredMethods ) { } @ Override public void visit ( int version , int access , String name , String signature , String supertype , String [ ] interfaces ) { } @ Override public MethodVisitor visitMethod ( int access , String name , String desc , String signature , String [ ] exceptions ) { MethodVisitor mv = super . visitMethod ( access , name , desc , signature , exceptions ) ; if ( ignoredMethods . contains ( ( name + desc ) ) ) { return mv ; } <START_BUG> if ( ( access & ( Opcodes . ACC_STATIC ) ) != 0 ) { <END_BUG> mv = new InjectCodeClassInstrumenter . GenerateCallCoberturaInitMethodVisitor ( mv , classMap . getClassName ( ) ) ; if ( "<clinit>" . equals ( name ) ) { wasStaticInitMethodVisited = true ; } } FindTouchPointsMethodAdapter instrumenter = new FindTouchPointsMethodAdapter ( mv , classMap . getClassName ( ) , name , desc , eventIdGenerator , duplicatedLinesMap , lineIdGenerator ) ; instrumenter . setTouchPointListener ( touchPointListener ) ; instrumenter . setIgnoreRegexp ( getIgnoreRegexp ( ) ) ; LocalVariablesSorter sorter = new LocalVariablesSorter ( access , desc , instrumenter ) ; int variable = sorter . newLocal ( INT_TYPE ) ; touchPointListener . setLastJumpIdVariableIndex ( variable ) ; return sorter ; } private class GenerateCallCoberturaInitMethodVisitor extends MethodVisitor { private String className ; public GenerateCallCoberturaInitMethodVisitor ( MethodVisitor arg0 , String className ) { } @ Override public void visitCode ( ) { } } @ Override public void visitEnd ( ) { } }

Fix:
if ( ( ( access & ( Opcodes . ACC_STATIC ) ) != 0 ) || ( "<init>" . equals ( name ) ) ) {
Buggy code:
public class QuadrantSolver extends JFrame { public QuadrantSolver ( ) { } public void createAndDisplayGUI ( int n ) { } public static void main ( String [ ] args ) { if ( ( args . length ) != 1 ) { System . out . println ( "ERROR:<seq2seq4repair_space>n<seq2seq4repair_space>was<seq2seq4repair_space>not<seq2seq4repair_space>specified<seq2seq4repair_space>or<seq2seq4repair_space>too<seq2seq4repair_space>many<seq2seq4repair_space>args<seq2seq4repair_space>given." ) ; <START_BUG> System . out . println ( "Correct<seq2seq4repair_space>usage:<seq2seq4repair_space>java<seq2seq4repair_space>WindowGUI<seq2seq4repair_space>n" ) ; <END_BUG> System . exit ( 0 ) ; } final int n = Integer . parseInt ( args [ 0 ] ) ; SwingUtilities . invokeLater ( new Runnable ( ) { public void run ( ) { new QuadrantSolver ( ) . createAndDisplayGUI ( n ) ; } } ) ; } }

Fix:
System . out . println ( "Correct<seq2seq4repair_space>usage:<seq2seq4repair_space>java<seq2seq4repair_space>QuadrantSolver<seq2seq4repair_space>n" ) ;
Buggy code:
@ Data public abstract class BucketAggregation < IN extends TimeData , OUT extends TimeData , T extends Bucket < IN > > implements Aggregation { private static final Map < String , String > EMPTY = ImmutableMap . of ( ) ; @ Data private final class Session implements Aggregation . Session { private long sampleSize = 0 ; private long outOfBounds = 0 ; private long uselessScan = 0 ; private final List < T > buckets ; private final long offset ; private final long size ; private final long extent ; @ SuppressWarnings ( "unchecked" ) @ Override public void update ( Group update ) { } @ Override public Result result ( ) { } @ Override public Class < ? > output ( ) { <START_BUG> return output ( ) ; <END_BUG> } } private final Sampling sampling ; private final Class < IN > in ; private final Class < OUT > out ; @ Override public long estimate ( DateRange original ) { } @ Override public Aggregation . Session session ( Class < ? > out , DateRange original ) { } @ Override public List < TraverseState > traverse ( List < TraverseState > states ) { } @ Override public Sampling sampling ( ) { } public Class < ? > input ( ) { } public Class < ? > output ( ) { return out ; } private List < T > buildBuckets ( final DateRange range , long size ) { } protected abstract T buildBucket ( long timestamp ) { } protected abstract OUT build ( T bucket ) { } No newline ; at end ; of file ; }

Fix:
return out ;
Buggy code:
public class ApplicationAccessWLS { private static final Logger LOGGER = Logger . getLogger ( ApplicationAccessWLS . class . getName ( ) ) ; private static final String CIC_MANAGER_CLASS_NAME = "weblogic.invocation.ComponentInvocationContextManager" ; private static final String CIC_CLASS_NAME = "weblogic.invocation.ComponentInvocationContext" ; private final Map < ClassLoader , String > appNames = Collections . synchronizedMap ( new WeakHashMap < ClassLoader , String > ( ) ) ; private Object applicationAccessInstance ; private Method getApplicationNameMethod ; private Method getApplicationVersionMethod ; private Object cicManagerInstance ; private Method getCurrentCicMethod ; private Method getApplicationIdMethod ; public ApplicationAccessWLS ( ) { } public String getApplicationName ( ClassLoader classLoader ) { } private String getApplicationNameInternal ( ClassLoader classLoader ) { } protected boolean initUsingCic ( ) { <START_BUG> if ( ( ApplicationAccessWLS . class . getClassLoader ( ) . getResource ( ApplicationAccessWLS . CIC_MANAGER_CLASS_NAME ) ) == null ) { <END_BUG> return false ; } try { final Class cicManagerClass = PrivilegedAccessHelper . getClassForName ( ApplicationAccessWLS . CIC_MANAGER_CLASS_NAME ) ; final Method getInstance = PrivilegedAccessHelper . getDeclaredMethod ( cicManagerClass , "getInstance" , new Class [ ] { } ) ; cicManagerInstance = PrivilegedAccessHelper . invokeMethod ( getInstance , cicManagerClass ) ; getCurrentCicMethod = PrivilegedAccessHelper . getMethod ( cicManagerClass , "getCurrentComponentInvocationContext" , new Class [ ] { } , true ) ; final Class cicClass = PrivilegedAccessHelper . getClassForName ( ApplicationAccessWLS . CIC_CLASS_NAME ) ; getApplicationIdMethod = PrivilegedAccessHelper . getDeclaredMethod ( cicClass , "getApplicationId" , new Class [ ] { } ) ; return true ; } catch ( ClassNotFoundException | NoSuchMethodException | InvocationTargetException | IllegalAccessException e ) { ApplicationAccessWLS . LOGGER . log ( Level . FINE , "Error<seq2seq4repair_space>initializing<seq2seq4repair_space>ApplicationAccessWLS<seq2seq4repair_space>using<seq2seq4repair_space>ComponentInvocationContext." , e ) ; return false ; } } protected boolean initUsingApplicationAccess ( ) { } private String getAppNameUsingCic ( ) throws IllegalAccessException , InvocationTargetException { } private String getAppNameUsingApplicationAccess ( ClassLoader classLoader ) throws IllegalAccessException , InvocationTargetException { } }

Fix:
if ( ( ApplicationAccessWLS . class . getClassLoader ( ) . getResource ( ( "META-INF//services//" + ( ApplicationAccessWLS . CIC_MANAGER_CLASS_NAME ) ) ) ) == null ) {
Buggy code:
public class FragmentHeaderActivity extends FragmentActivity { protected Button bAdd ; private static final int ACTIVITY_CREATE = 50 ; private static final int ACTIVITY_REGISTER = 60 ; private static final int DIALOG_LOGIN = 200 ; protected static final String LOGGED_IN_KEY = "loggedIn" ; protected static final String USER_PASS_KEY = "userpass" ; public void initializeHeader ( ) { <START_BUG> bAdd = ( ( Button ) ( findViewById ( R . id . bAdd ) ) ) ; <END_BUG> bAdd . setOnClickListener ( new View . OnClickListener ( ) { public void onClick ( View v ) { Intent i = new Intent ( FragmentHeaderActivity . this , AddName . class ) ; startActivityForResult ( i , FragmentHeaderActivity . ACTIVITY_CREATE ) ; } } ) ; } @ Override protected Dialog onCreateDialog ( int id ) { } @ Override protected void onSaveInstanceState ( Bundle outState ) { } @ Override public boolean onCreateOptionsMenu ( Menu menu ) { } @ Override public boolean onPrepareOptionsMenu ( Menu menu ) { } @ Override public boolean onOptionsItemSelected ( MenuItem item ) { } private void logout ( ) { } private void register ( ) { } }

Fix:
bAdd = ( ( Button ) ( findViewById ( vHeader ) ) ) ;
Buggy code:
public class givenCoordinateHandler { public Coordinate doAppropriateConversion ( Coordinate givenCoordinate , String resultCoordinateType ) { Converter c = givenCoordinate . getConverter ( ) ; <START_BUG> if ( resultCoordinateType . equals ( "Geo" ) ) { <END_BUG> DMS resultDMS = ( ( DMS ) ( c . convertToDMS ( givenCoordinate ) ) ) ; System . out . println ( ( ( ( "Converted<seq2seq4repair_space>to<seq2seq4repair_space>dms,<seq2seq4repair_space>result:<seq2seq4repair_space>" + ( resultDMS . getXYPair ( ) . getLeftValue ( ) ) ) + "," ) + ( resultDMS . getXYPair ( ) . getRightValue ( ) ) ) ) ; return resultDMS ; } else if ( resultCoordinateType . equals ( "Decimal" ) ) { Decimal resultDecimal = ( ( Decimal ) ( c . convertToDecimal ( givenCoordinate ) ) ) ; return resultDecimal ; } else { RDH resultRDH = ( ( RDH ) ( c . convertToRDH ( givenCoordinate ) ) ) ; return resultRDH ; } } }

Fix:
if ( resultCoordinateType . equals ( "DMS" ) ) {
Buggy code:
public class ModelAndViewMethodReturnValueHandlerTests { private ModelAndViewMethodReturnValueHandler handler ; private ModelAndViewContainer mavContainer ; private ServletWebRequest webRequest ; @ Before public void setUp ( ) { } @ Test public void supportsReturnType ( ) throws Exception { } @ Test public void handleReturnValueViewName ( ) throws Exception { } @ Test public void handleReturnValueView ( ) throws Exception { } @ Test public void handleReturnValueNull ( ) throws Exception { handler . handleReturnValue ( null , getReturnValueParam ( "modelAndView" ) , mavContainer , webRequest ) ; <START_BUG> assertFalse ( mavContainer . isResolveView ( ) ) ; <END_BUG> } private MethodParameter getReturnValueParam ( String methodName ) throws Exception { } ModelAndView modelAndView ( ) { } String viewName ( ) { } }

Fix:
assertTrue ( mavContainer . isRequestHandled ( ) ) ;
Buggy code:
public class ZoieSegmentReader < R extends IndexReader > extends ZoieIndexReader < R > { public static final String termVal = "_UID" ; public static final Term UID_TERM = new Term ( AbstractZoieIndexable . DOCUMENT_ID_PAYLOAD_FIELD , ZoieSegmentReader . termVal ) ; private R _decoratedReader ; private long [ ] _uidArray ; private IntRBTreeSet _delDocIdSet = new IntRBTreeSet ( ) ; private int [ ] _currentDelDocIds ; static final class UIDTokenStream extends TokenStream { private boolean returnToken = false ; private PayloadAttribute payloadAttr ; private CharTermAttribute termAttr ; UIDTokenStream ( long uid ) { } @ Override public final boolean incrementToken ( ) throws IOException { } } public static void fillDocumentID ( Document doc , long id ) { } public ZoieSegmentReader ( IndexReader in , IndexReaderDecorator < R > decorator ) throws IOException { } ZoieSegmentReader ( ZoieSegmentReader < R > copyFrom , IndexReader innerReader , boolean withDeletes ) throws IOException { } ZoieSegmentReader ( ZoieSegmentReader < R > copyFrom , IndexReader innerReader ) throws IOException { } @ Override public void markDeletes ( LongSet delDocs , LongSet deletedUIDs ) { } @ Override public void commitDeletes ( ) { } public void setDelDocIds ( ) { } public R getDecoratedReader ( ) { } @ Override public List < R > getDecoratedReaders ( ) { } @ Override public byte [ ] getStoredValue ( long uid ) throws IOException { } private void init ( IndexReader reader ) throws IOException { } public static long bytesToLong ( byte [ ] bytes ) { } @ Override public long getUID ( int docid ) { } public long [ ] getUIDArray ( ) { } @ Override protected boolean hasIndexDeletions ( ) { } @ Override public boolean isDeleted ( int docid ) { } @ Override public TermDocs termDocs ( Term term ) throws IOException { } @ Override public TermDocs termDocs ( ) throws IOException { } @ Override public TermPositions termPositions ( Term term ) throws IOException { } @ Override public TermPositions termPositions ( ) throws IOException { } @ Override public ZoieIndexReader < R > [ ] getSequentialSubReaders ( ) { } public String getSegmentName ( ) { } @ Override protected void doClose ( ) throws IOException { } @ Override public void decRef ( ) throws IOException { } @ Override public int numDocs ( ) { if ( ( _currentDelDocIds ) != null ) { <START_BUG> return ( super . numDocs ( ) ) - ( _currentDelDocIds . length ) ; <END_BUG> } else { return super . numDocs ( ) ; } } @ Override public ZoieSegmentReader < R > copy ( ) throws IOException { } }

Fix:
return ( super . maxDoc ( ) ) - ( _currentDelDocIds . length ) ;
Buggy code:
public class DeferredProcessingInstructionImpl extends ProcessingInstructionImpl implements DeferredNode { static final long serialVersionUID = - 4643577954293565388L ; protected transient int fNodeIndex ; DeferredProcessingInstructionImpl ( DeferredDocumentImpl ownerDocument , int nodeIndex ) { } public int getNodeIndex ( ) { } protected void synchronizeData ( ) { syncData = false ; DeferredDocumentImpl ownerDocument = ( ( DeferredDocumentImpl ) ( this . ownerDocument ) ) ; target = ownerDocument . getNodeNameString ( fNodeIndex ) ; <START_BUG> value = ownerDocument . getNodeValueString ( fNodeIndex ) ; <END_BUG> } }

Fix:
data = ownerDocument . getNodeValueString ( fNodeIndex ) ;
Buggy code:
public class TimeDV extends AbstractDateTimeDV { public Object getActualValue ( String content , ValidationContext context ) throws InvalidDatatypeValueException { } protected DateTimeData parse ( String str ) throws SchemaDateTimeException { <START_BUG> DateTimeData date = new DateTimeData ( this ) ; <END_BUG> int len = str . length ( ) ; date . year = YEAR ; date . month = MONTH ; date . day = 15 ; getTime ( str , 0 , len , date ) ; validateDateTime ( date ) ; if ( ( date . utc ) != 0 ) { normalize ( date ) ; } date . position = 2 ; return date ; } protected String dateToString ( DateTimeData date ) { } protected short compareOrder2 ( DateTimeData date1 , DateTimeData date2 ) { } }

Fix:
DateTimeData date = new DateTimeData ( str , this ) ;
Buggy code:
public class JavaSearchPattern extends SearchPattern { boolean isCaseSensitive ; int matchMode ; char [ ] [ ] typeSignatures ; char [ ] [ ] [ ] typeArguments ; protected JavaSearchPattern ( int patternKind , int matchRule ) { } public SearchPattern getBlankPattern ( ) { } int getMatchMode ( ) { } boolean isCaseSensitive ( ) { } public boolean isParameterized ( ) { } void computeSignature ( String signature ) { <START_BUG> char [ ] source = signature . replace ( '//' , '.' ) . toCharArray ( ) ; <END_BUG> char [ ] [ ] signatures = new char [ 10 ] [ ] ; int signaturesCount = 0 ; int [ ] lengthes = new int [ 10 ] ; int typeArgsCount = 0 ; int paramOpening = 0 ; boolean parameterized = false ; for ( int idx = 0 , ln = source . length ; idx < ln ; idx ++ ) { switch ( source [ idx ] ) { case '>' : paramOpening -- ; if ( paramOpening == 0 ) { if ( signaturesCount == ( lengthes . length ) ) { System . arraycopy ( signatures , 0 , ( signatures = new char [ signaturesCount + 10 ] [ ] ) , 0 , signaturesCount ) ; System . arraycopy ( lengthes , 0 , ( lengthes = new int [ signaturesCount + 10 ] ) , 0 , signaturesCount ) ; } lengthes [ signaturesCount ] = typeArgsCount ; typeArgsCount = 0 ; } break ; case '<' : paramOpening ++ ; if ( paramOpening == 1 ) { typeArgsCount = 0 ; parameterized = true ; } break ; case '*' : case ';' : if ( paramOpening == 1 ) typeArgsCount ++ ; break ; case '.' : if ( paramOpening == 0 ) { if ( signaturesCount == ( lengthes . length ) ) { System . arraycopy ( signatures , 0 , ( signatures = new char [ signaturesCount + 10 ] [ ] ) , 0 , signaturesCount ) ; System . arraycopy ( lengthes , 0 , ( lengthes = new int [ signaturesCount + 10 ] ) , 0 , signaturesCount ) ; } signatures [ signaturesCount ] = new char [ idx + 1 ] ; System . arraycopy ( source , 0 , signatures [ signaturesCount ] , 0 , idx ) ; signatures [ signaturesCount ] [ idx ] = Signature . C_SEMICOLON ; signaturesCount ++ ; } break ; } } this . typeSignatures = new char [ signaturesCount + 1 ] [ ] ; if ( parameterized ) this . typeArguments = new char [ signaturesCount + 1 ] [ ] [ ] ; this . typeSignatures [ 0 ] = source ; if ( parameterized ) { this . typeArguments [ 0 ] = Signature . getTypeArguments ( source ) ; if ( ( lengthes [ signaturesCount ] ) != ( this . typeArguments [ 0 ] . length ) ) { } } for ( int i = 1 , j = signaturesCount - 1 ; i <= signaturesCount ; i ++ , j -- ) { this . typeSignatures [ i ] = signatures [ j ] ; if ( parameterized ) { this . typeArguments [ i ] = Signature . getTypeArguments ( signatures [ j ] ) ; if ( ( lengthes [ j ] ) != ( this . typeArguments [ i ] . length ) ) { } } } } public boolean matchesName ( char [ ] pattern , char [ ] name ) { } protected StringBuffer print ( StringBuffer output ) { } public final String toString ( ) { } }

Fix:
char [ ] source = signature . replace ( '//' , '.' ) . replace ( '$' , '.' ) . toCharArray ( ) ;
Buggy code:
@ Component ( "stormpathAccountDao" ) public class StormpathAccountDao implements AccountDao { private static Logger logger = LoggerFactory . getLogger ( StormpathAccountDao . class ) ; private Application application ; private Client client ; private StudyService studyService ; private SortedMap < Integer , Encryptor > encryptors = Maps . newTreeMap ( ) ; @ Resource ( name = "stormpathApplication" ) public void setStormpathApplication ( Application application ) { } @ Resource ( name = "stormpathClient" ) public void setStormpathClient ( Client client ) { } @ Autowired public void setStudyService ( StudyService studyService ) { } @ Resource ( name = "encryptorList" ) public void setEncryptors ( List < Encryptor > list ) { } @ Override public Iterator < Account > getAllAccounts ( ) { } @ Override public Iterator < Account > getStudyAccounts ( Study study ) { } @ Override public Account verifyEmail ( StudyIdentifier study , EmailVerification verification ) { } @ Override public void resendEmailVerificationToken ( StudyIdentifier studyIdentifier , Email email ) { } @ Override public void requestResetPassword ( Study study , Email email ) { } @ Override public void resetPassword ( PasswordReset passwordReset ) { } @ Override public Account authenticate ( Study study , SignIn signIn ) { } @ Override public Account getAccount ( Study study , String email ) { Preconditions . checkNotNull ( study ) ; Preconditions . checkArgument ( StringUtils . isNotBlank ( email ) ) ; Directory directory = client . getResource ( study . getStormpathHref ( ) , Directory . class ) ; <START_BUG> AccountList accounts = directory . getAccounts ( Accounts . where ( Accounts . email ( ) . eqIgnoreCase ( email ) ) . withGroups ( ) . withGroupMemberships ( ) ) ; <END_BUG> if ( accounts . iterator ( ) . hasNext ( ) ) { com . stormpath . sdk . account . Account acct = accounts . iterator ( ) . next ( ) ; return new StormpathAccount ( study . getStudyIdentifier ( ) , acct , encryptors ) ; } return null ; } @ Override public void signUp ( Study study , SignUp signUp , boolean sendEmail ) { } @ Override public void updateAccount ( Study study , Account account ) { } @ Override public void deleteAccount ( Study study , String email ) { } private void rethrowResourceException ( ResourceException e , Account account ) { } private void updateGroups ( Directory directory , Account account ) { } }

Fix:
AccountList accounts = directory . getAccounts ( Accounts . where ( Accounts . email ( ) . eqIgnoreCase ( email ) ) . withCustomData ( ) . withGroups ( ) . withGroupMemberships ( ) ) ;
Buggy code:
public class RosterSharedObject extends AbstractSharedObject { CollabRosterView view ; public RosterSharedObject ( CollabRosterView view ) { } public void sendMessageTo ( ID targetID , String message ) { } protected Event handleSharedObjectMsgEvent ( ISharedObjectMessageEvent event ) { } protected void handleMessage ( String message ) { <START_BUG> System . out . println ( ( "GOT<seq2seq4repair_space>MESSAGE:<seq2seq4repair_space>" + message ) ) ; <END_BUG> } }

Fix:
System . out . println ( ( ( "RosterSharedObject.handleMessage(" + message ) + ")" ) ) ;
Buggy code:
public class BayesTfIdfReducer extends MapReduceBase implements Reducer < StringTuple , DoubleWritable , StringTuple , DoubleWritable > { private static final Logger log = LoggerFactory . getLogger ( BayesTfIdfReducer . class ) ; private HTable table ; private boolean useHbase ; @ Override public void reduce ( StringTuple key , Iterator < DoubleWritable > values , OutputCollector < StringTuple , DoubleWritable > output , Reporter reporter ) throws IOException { } @ Override public void configure ( JobConf job ) { try { <START_BUG> Parameters params = Parameters . fromString ( job . get ( "bayes.parameters" , "" ) ) ; <END_BUG> if ( params . get ( "dataSource" ) . equals ( "hbase" ) ) { useHbase = true ; } else { return ; } HBaseConfiguration hBconf = new HBaseConfiguration ( job ) ; table = new HTable ( hBconf , job . get ( "output.table" ) ) ; } catch ( IOException e ) { BayesTfIdfReducer . log . error ( "Unexpected<seq2seq4repair_space>error<seq2seq4repair_space>during<seq2seq4repair_space>configuration" , e ) ; } } @ Override public void close ( ) throws IOException { } }

Fix:
Parameters params = new Parameters ( job . get ( "bayes.parameters" , "" ) ) ;
Buggy code:
public abstract class IdentityConstraint { public static final short UNIQUE = 0 ; public static final short KEY = 1 ; public static final short KEYREF = 2 ; protected short type ; protected String fIdentityConstraintName ; protected String fElementName ; protected Selector fSelector ; protected int fFieldCount ; protected Field [ ] fFields ; protected IdentityConstraint ( String identityConstraintName , String elemName ) { } public short getType ( ) { } public String getIdentityConstraintName ( ) { } public void setSelector ( Selector selector ) { } public Selector getSelector ( ) { } public void addField ( Field field ) { } public int getFieldCount ( ) { } public Field getFieldAt ( int index ) { } public String getElementName ( ) { } public String toString ( ) { } public boolean equals ( IdentityConstraint id ) { } static final Field [ ] resize ( Field [ ] oldArray , int newSize ) { Field [ ] newArray = new Field [ newSize ] ; <START_BUG> System . arraycopy ( oldArray , 0 , newArray , 0 , newSize ) ; <END_BUG> return newArray ; } }

Fix:
System . arraycopy ( oldArray , 0 , newArray , 0 , oldArray . length ) ;