nus-yam/ex-repair huggingface dataset:
Buggy code:
public class Main { private static ColumbaLoader columbaLoader ; public static void loadInVMInstance ( String [ ] arguments ) { } public static void main ( String [ ] arg ) { final String [ ] args = arg ; ColumbaCmdLineArgumentParser cmdLineParser = new ColumbaCmdLineArgumentParser ( ) ; try { cmdLineParser . parse ( args ) ; } catch ( CmdLineArgumentParser e ) { System . err . println ( e . getMessage ( ) ) ; ColumbaCmdLineArgumentParser . printUsage ( ) ; System . exit ( 2 ) ; } catch ( CmdLineArgumentParser e ) { System . err . println ( e . getMessage ( ) ) ; ColumbaCmdLineArgumentParser . printUsage ( ) ; System . exit ( 2 ) ; } CmdLineArgumentParser [ ] allOptions = new CmdLineArgumentParser . Option [ ] { ColumbaCmdLineArgumentParser . DEBUG , ColumbaCmdLineArgumentParser . COMPOSER , ColumbaCmdLineArgumentParser . RCPT , ColumbaCmdLineArgumentParser . MESSAGE , ColumbaCmdLineArgumentParser . PATH } ; Object path = cmdLineParser . getOptionValue ( PATH ) ; Object d = cmdLineParser . getOptionValue ( DEBUG ) ; if ( d != null ) <START_BUG> MainInterface . DEBUG = Boolean . TRUE ; <END_BUG> if ( path != null ) { new ConfigPath ( ( ( String ) ( path ) ) ) ; } else { new ConfigPath ( ) ; } Main . loadInVMInstance ( arg ) ; final StartUpFrame frame = new StartUpFrame ( ) ; frame . setVisible ( true ) ; new ColumbaLogger ( ) ; new Config ( ) ; AddressbookMain addressbook = new AddressbookMain ( ) ; addressbook . initConfiguration ( ) ; MailMain mail = new MailMain ( ) ; mail . initConfiguration ( ) ; Config . init ( ) ; new TempFileStore ( ) ; ThemeSwitcher . setTheme ( ) ; Main . doGuiInits ( ) ; MainInterface . clipboardManager = new ClipboardManager ( ) ; new ImageLoader ( ) ; MainInterface . charsetManager = new CharsetManager ( ) ; MainInterface . processor = new DefaultProcessor ( ) ; processor . start ( ) ; MainInterface . pluginManager = new PluginManager ( ) ; pluginManager . registerHandler ( new InterpreterHandler ( ) ) ; pluginManager . registerHandler ( new ActionPluginHandler ( ) ) ; pluginManager . registerHandler ( new MenuPluginHandler ( "org.columba.core.menu" ) ) ; pluginManager . registerHandler ( new FramePluginHandler ( ) ) ; MainInterface . shutdownManager = new ShutdownManager ( ) ; shutdownManager . register ( new SaveConfigPlugin ( ) ) ; addressbook . initPlugins ( ) ; mail . initPlugins ( ) ; pluginManager . initPlugins ( ) ; frame . advance ( ) ; addressbook . initGui ( ) ; frame . advance ( ) ; mail . initGui ( ) ; new FrameModel ( ) ; if ( ( MailConfig . getAccountList ( ) . count ( ) ) == 0 ) { try { new AccountWizard ( false ) ; } catch ( Exception ex ) { ex . printStackTrace ( ) ; } } new CmdLineArgumentHandler ( args ) ; frame . setVisible ( false ) ; } private static void doGuiInits ( ) { } }

Fix:
MainInterface . DEBUG = true ;
Buggy code:
public class HTTPArgument extends Argument implements Serializable { private static final Logger log = LoggingManager . getLoggerForClass ( ) ; private static final String ALWAYS_ENCODE = "HTTPArgument.always_encode" ; private static final String USE_EQUALS = "HTTPArgument.use_equals" ; private static final EncoderCache cache = new EncoderCache ( 1000 ) ; public HTTPArgument ( String name , String value , String metadata ) { } public void setUseEquals ( boolean ue ) { } public boolean isUseEquals ( ) { } public void setAlwaysEncoded ( boolean ae ) { } public boolean isAlwaysEncoded ( ) { } public HTTPArgument ( String name , String value ) { } public HTTPArgument ( String name , String value , boolean alreadyEncoded ) { } public HTTPArgument ( String name , String value , boolean alreadyEncoded , String contentEncoding ) { } public HTTPArgument ( String name , String value , String metaData , boolean alreadyEncoded ) { } public HTTPArgument ( String name , String value , String metaData , boolean alreadyEncoded , String contentEncoding ) { } public HTTPArgument ( Argument arg ) { } public HTTPArgument ( ) { } @ Override public void setName ( String newName ) { } public String getEncodedValue ( ) { } public String getEncodedValue ( String contentEncoding ) throws UnsupportedEncodingException { } public String getEncodedName ( ) { } public static void convertArgumentsToHTTP ( Arguments args ) { <START_BUG> List newArguments = new LinkedList ( ) ; <END_BUG> PropertyIterator iter = args . getArguments ( ) . iterator ( ) ; while ( iter . hasNext ( ) ) { Argument arg = ( ( Argument ) ( iter . next ( ) . getObjectValue ( ) ) ) ; if ( ! ( arg instanceof HTTPArgument ) ) { newArguments . add ( new HTTPArgument ( arg ) ) ; } else { newArguments . add ( arg ) ; } } args . removeAllArguments ( ) ; args . setArguments ( newArguments ) ; } }

Fix:
List < Argument > newArguments = new LinkedList < Argument > ( ) ;
Buggy code:
public class JenaConnector { static Logger logger = Logger . getLogger ( "JenaConnector" ) ; public JenaConnector ( ) { } public ResultSet executeQuery ( String SPARQL , String endpoint ) { Query query = QueryFactory . create ( SPARQL ) ; <START_BUG> JenaConnector . logger . info ( ( ( "Query<seq2seq4repair_space>fired<seq2seq4repair_space>-><seq2seq4repair_space>\n\n" + SPARQL ) + "\n\n" ) ) ; <END_BUG> QueryExecution qexec = QueryExecutionFactory . sparqlService ( endpoint , query ) ; ResultSet results = qexec . execSelect ( ) ; return results ; } No newline ; at end ; of file ; }

Fix:
JenaConnector . logger . info ( ( ( ( ( "SPARQL<seq2seq4repair_space>Query<seq2seq4repair_space>fired<seq2seq4repair_space>at<seq2seq4repair_space>the<seq2seq4repair_space>endpoint<seq2seq4repair_space>[" + endpoint ) + "]:<seq2seq4repair_space>\n\n" ) + SPARQL ) + "\n\n" ) ) ;
Buggy code:
public class RepeatAcceptor extends Acceptor { private final Acceptor baseAcceptor ; public RepeatAcceptor ( Acceptor baseAcceptor ) { } @ Override public int accept ( Context context , int offset ) { int length = 0 ; int result = FAILURE ; <START_BUG> while ( ( ( context . size ( ) ) > 0 ) && ( ( result = baseAcceptor . accept ( context , length ) ) != ( FAILURE ) ) ) <END_BUG> length += result ; return length ; } }

Fix:
while ( ( ( context . size ( ) ) > length ) && ( ( result = baseAcceptor . accept ( context , ( offset + length ) ) ) != ( FAILURE ) ) )
Buggy code:
public class AlertSystem implements Runnable { private Queue < Message > messageQueue = null ; private boolean stopped = false ; public AlertSystem ( Queue < Message > messageQueue ) { } @ Override public void run ( ) { } private void handleMessage ( Message msg ) { } private void triggerAlert ( Message msg ) { msg . evaluateAlphaString ( ) ; if ( msg . hasCoordinates ( ) ) { System . out . println ( "##<seq2seq4repair_space>alert<seq2seq4repair_space>was<seq2seq4repair_space>triggered" ) ; HtmlBuilder htmlBuilder = new HtmlBuilder ( msg ) ; String fileName = htmlBuilder . writeTemplate ( "html//alerts//" ) ; try { String osName = System . getProperty ( "os.name" ) ; <START_BUG> if ( osName . endsWith ( "Windows" ) ) { <END_BUG> Runtime . getRuntime ( ) . exec ( ( "script//alert.bat<seq2seq4repair_space>" + fileName ) ) ; } else { Runtime . getRuntime ( ) . exec ( ( "sh<seq2seq4repair_space>script//alert.sh<seq2seq4repair_space>" + fileName ) ) ; } } catch ( IOException e ) { e . printStackTrace ( ) ; } } else { System . out . println ( "##<seq2seq4repair_space>alert<seq2seq4repair_space>was<seq2seq4repair_space>triggered,<seq2seq4repair_space>but<seq2seq4repair_space>no<seq2seq4repair_space>geo<seq2seq4repair_space>coordinates<seq2seq4repair_space>are<seq2seq4repair_space>given" ) ; } } private void resetWatchdog ( ) { } public synchronized void stop ( ) { } public static void main ( String [ ] args ) { } No newline ; at end ; of file ; }

Fix:
if ( osName . equals ( "Windows" ) ) {
Buggy code:
public class PostfixExpression extends CompoundAssignment { public PostfixExpression ( Expression l , Expression e , int op , int pos ) { } public void generateCode ( BlockScope currentScope , CodeStream codeStream , boolean valueRequired ) { int pc = codeStream . position ; <START_BUG> lhs . generatePostIncrement ( currentScope , codeStream , this , valueRequired ) ; <END_BUG> if ( valueRequired ) { codeStream . generateImplicitConversion ( implicitConversion ) ; } codeStream . recordPositionsFrom ( pc , this . sourceStart ) ; } public String operatorToString ( ) { } public boolean restrainUsageToNumericTypes ( ) { } public String toStringExpressionNoParenthesis ( ) { } public void traverse ( IAbstractSyntaxTreeVisitor visitor , BlockScope scope ) { } }

Fix:
( ( Reference ) ( lhs ) ) . generatePostIncrement ( currentScope , codeStream , this , valueRequired ) ;
Buggy code:
public class FineSessionFactory < L > implements SessionFactory < FineSessionCacheEntry < L > , L > { private final Cache < String , FineSessionCacheEntry < L > > sessionCache ; private final Cache < SessionAttributeCacheKey , MarshalledValue < Object , MarshallingContext > > attributeCache ; private final CacheInvoker invoker ; private final SessionContext context ; private final SessionAttributeMarshaller < Object , MarshalledValue < Object , MarshallingContext > > marshaller ; private final LocalContextFactory < L > localContextFactory ; public FineSessionFactory ( Cache < String , FineSessionCacheEntry < L > > sessionCache , Cache < SessionAttributeCacheKey , MarshalledValue < Object , MarshallingContext > > attributeCache , CacheInvoker invoker , SessionContext context , SessionAttributeMarshaller < Object , MarshalledValue < Object , MarshallingContext > > marshaller , LocalContextFactory < L > localContextFactory ) { } @ Override public Session < L > createSession ( String id , FineSessionCacheEntry < L > entry ) { } @ Override public ImmutableSession createImmutableSession ( String id , FineSessionCacheEntry < L > entry ) { } @ Override public FineSessionCacheEntry < L > findValue ( String id ) { } @ Override public FineSessionCacheEntry < L > createValue ( String id ) { } @ Override public void remove ( final String id ) { final FineSessionCacheEntry < L > entry = this . invoker . invoke ( this . sessionCache , new RemoveOperation < String , FineSessionCacheEntry < L > > ( id ) ) ; Operation < SessionAttributeCacheKey , MarshalledValue < Object , MarshallingContext > , Void > attributeOperation = new Operation < SessionAttributeCacheKey , MarshalledValue < Object , MarshallingContext > , Void > ( ) { @ Override public Void invoke ( Cache < SessionAttributeCacheKey , MarshalledValue < Object , MarshallingContext > > cache ) { for ( String attribute : entry . getAttributes ( ) ) { cache . remove ( new SessionAttributeCacheKey ( id , attribute ) ) ; } return null ; } } ; <START_BUG> this . invoker . invoke ( this . attributeCache , attributeOperation , IGNORE_RETURN_VALUES , SKIP_LOCKING ) ; <END_BUG> } @ Override public void evict ( final String id ) { } }

Fix:
this . invoker . invoke ( this . attributeCache , attributeOperation , IGNORE_RETURN_VALUES ) ;
Buggy code:
@ Service public class UserITDefaultDetailServiceImpl implements UserITDefaultDetailService { @ Autowired private UserITDefaultDetailDao userITDefaultDetailDao ; @ Autowired private BaseService baseService ; @ Override @ Transactional ( readOnly = true , propagation = Propagation . REQUIRES_NEW ) public UserITDefaultDetailDto getITDefaultDetailDto ( final GdeUser user ) { } @ Override <START_BUG> @ Transactional ( readOnly = false , propagation = Propagation . REQUIRES_NEW , rollbackFor = Exception . class ) <END_BUG> public void saveITDefaultDetail ( final UserITDefaultDetailDto dto , final GdeUser user ) { try { UserITDefaultDetail userITDefaultDetail = new UserITDefaultDetail ( ) ; userITDefaultDetail . populateDetailFromDto ( dto , user ) ; userITDefaultDetail = userITDefaultDetailDao . saveOrMerge ( userITDefaultDetail ) ; dto . setObjId ( userITDefaultDetail . getId ( ) ) ; } catch ( Exception e ) { throw new GDEException ( e ) ; } } }

Fix:
@ Transactional ( readOnly = false , propagation = Propagation . REQUIRED , rollbackFor = Exception . class )
Buggy code:
public abstract class AbstractAnnotationTest extends TestCase { protected TestJavaProject testJavaProject ; protected ICompilationUnit source ; protected CompilationUnit compilationUnit ; protected AST ast ; protected ASTRewrite rewriter ; protected Annotation annotation ; protected TextFileChange textFileChange ; @ Override protected void setUp ( ) throws Exception { testJavaProject = new TestJavaProject ( "JavaProject" ) ; testJavaProject . setAutoBuilding ( isAutoBuildingEnabled ( ) ) ; testJavaProject . enableAnnotationProcessing ( isAnnotationProcessingEnabled ( ) ) ; source = testJavaProject . createCompilationUnit ( getPackageName ( ) , getClassName ( ) , getClassContents ( ) ) ; <START_BUG> compilationUnit = AnnotationUtils . getASTParser ( source ) ; <END_BUG> ast = compilationUnit . getAST ( ) ; rewriter = ASTRewrite . create ( ast ) ; annotation = getAnnotation ( ) ; textFileChange = AnnotationUtils . createTextFileChange ( "AC" , ( ( IFile ) ( source . getResource ( ) ) ) ) ; } protected boolean isAutoBuildingEnabled ( ) { } protected boolean isAnnotationProcessingEnabled ( ) { } protected abstract String getPackageName ( ) { } protected abstract String getClassName ( ) { } protected abstract String getClassContents ( ) { } protected abstract Annotation getAnnotation ( ) { } protected boolean executeChange ( IProgressMonitor monitor , Change change ) { } @ Override protected void tearDown ( ) throws Exception { } }

Fix:
compilationUnit = AnnotationUtils . getASTParser ( source , false ) ;
Buggy code:
public class Annotation { public final AnnotationImpl anno ; public Annotation ( AnnotationImpl anno ) { } public long getStartOffset ( ) { } public long getEndOffset ( ) { } public String getFeatureOrDefault ( String feature , String defaultValue ) { } public String getFeature ( String string ) { } public boolean overlaps ( Annotation that ) { } public boolean after ( Annotation that ) { } public boolean before ( Annotation that ) { } public boolean contains ( Annotation that ) { } public boolean within ( Annotation that ) { } public AnnotationImpl getAnno ( ) { } @ Override public String toString ( ) { } @ Override public int hashCode ( ) { <START_BUG> return super . hashCode ( ) ; <END_BUG> } @ Override public boolean equals ( Object obj ) { } No newline ; at end ; of file ; }

Fix:
return anno . hashCode ( ) ;
Buggy code:
public class JacORBExtension implements Extension { private static final JacORBSubsystemParser PARSER = JacORBSubsystemParser . INSTANCE ; public static final String SUBSYSTEM_NAME = "jacorb" ; private static final String RESOURCE_NAME = ( JacORBExtension . class . getPackage ( ) . getName ( ) ) + ".LocalDescriptions" ; private static final int MANAGEMENT_API_MAJOR_VERSION = 1 ; private static final int MANAGEMENT_API_MINOR_VERSION = 1 ; private static final int MANAGEMENT_API_MICRO_VERSION = 0 ; static ResourceDescriptionResolver getResourceDescriptionResolver ( final String keyPrefix ) { } @ Override public void initialize ( ExtensionContext context ) { final SubsystemRegistration subsystem = context . registerSubsystem ( JacORBExtension . SUBSYSTEM_NAME , JacORBExtension . MANAGEMENT_API_MAJOR_VERSION , JacORBExtension . MANAGEMENT_API_MINOR_VERSION , JacORBExtension . MANAGEMENT_API_MICRO_VERSION ) ; final ManagementResourceRegistration subsystemRegistration = subsystem . registerSubsystemModel ( INSTANCE ) ; <START_BUG> subsystemRegistration . registerOperationHandler ( DESCRIBE , GenericSubsystemDescribeHandler . INSTANCE , GenericSubsystemDescribeHandler . INSTANCE , false , PRIVATE ) ; <END_BUG> subsystem . registerXMLElementWriter ( JacORBExtension . PARSER ) ; } @ Override public void initializeParsers ( ExtensionParsingContext context ) { } }

Fix:
subsystemRegistration . registerOperationHandler ( DEFINITION , GenericSubsystemDescribeHandler . INSTANCE ) ;
Buggy code:
public class OpenSslIT { @ BeforeClass @ AfterClass public static void clean ( ) { } @ Before public void checkPlatform ( ) { } @ Test public void completeTest ( ) throws IOException , InterruptedException , KeyManagementException , KeyStoreException , NoSuchAlgorithmException , CertificateException { } private void generateCsr ( ) throws IOException , InterruptedException { <START_BUG> final Process process = new ProcessBuilder ( "openssl" , "req" , "-nodes" , "-newkey" , "rsa:2048" , "-keyout" , "private.key" , "-out" , "CSR.csr" , "-subj" , "'//CN=localhost'" ) . redirectError ( ProcessBuilder . Redirect . INHERIT ) . redirectOutput ( ProcessBuilder . Redirect . INHERIT ) . start ( ) ; <END_BUG> process . waitFor ( ) ; } }

Fix:
final Process process = new ProcessBuilder ( "openssl" , "req" , "-nodes" , "-newkey" , "rsa:2048" , "-keyout" , "private.key" , "-out" , "CSR.csr" , "-subj" , "//CN=localhost" ) . redirectError ( ProcessBuilder . Redirect . INHERIT ) . redirectOutput ( ProcessBuilder . Redirect . INHERIT ) . start ( ) ;
Buggy code:
public class URLBrowseTest extends AbstractBrowseTestCase { public URL [ ] testURLs = null ; protected void setUp ( ) throws Exception { } protected void tearDown ( ) throws Exception { } public void testBrowseURLs ( ) throws Exception { for ( int i = 0 ; i < ( testURLs . length ) ; i ++ ) { testBrowse ( testURLs [ i ] ) ; <START_BUG> Thread . sleep ( 1000 ) ; <END_BUG> } } }

Fix:
Thread . sleep ( 3000 ) ;
Buggy code:
public class SocketLock { String host ; int port ; Socket socket ; DataInputStream in ; DataOutputStream out ; int replyTimeout = 10000 ; public SocketLock ( String host , int port ) throws IOException { } public void terminate ( ) throws IOException { } public synchronized int sendCmd ( int cmd , int p1 , int p2 ) throws IOException { } public synchronized int sendCmd ( int cmd , int p1 , int p2 , int p3 , byte [ ] ext ) throws IOException { int resp ; int a ; int w ; ByteBuffer bb = ByteBuffer . allocate ( ( 16 + ( ext . length ) ) ) ; bb . putInt ( Integer . reverseBytes ( cmd ) ) ; bb . putInt ( Integer . reverseBytes ( p1 ) ) ; bb . putInt ( Integer . reverseBytes ( p2 ) ) ; bb . putInt ( Integer . reverseBytes ( p3 ) ) ; if ( ( ext . length ) > 0 ) bb . put ( ext ) ; out . write ( bb . array ( ) ) ; out . flush ( ) ; w = replyTimeout ; a = in . available ( ) ; while ( ( w > 0 ) && ( a < 16 ) ) { w -= 10 ; try { <START_BUG> wait ( 10 ) ; <END_BUG> } catch ( InterruptedException e ) { } a = in . available ( ) ; } if ( ( in . available ( ) ) < 16 ) throw new IOException ( ( ( "Timeout:<seq2seq4repair_space>No<seq2seq4repair_space>response<seq2seq4repair_space>from<seq2seq4repair_space>RPi<seq2seq4repair_space>withing<seq2seq4repair_space>" + ( replyTimeout ) ) + "<seq2seq4repair_space>ms." ) ) ; resp = Integer . reverseBytes ( in . readInt ( ) ) ; resp = Integer . reverseBytes ( in . readInt ( ) ) ; resp = Integer . reverseBytes ( in . readInt ( ) ) ; resp = Integer . reverseBytes ( in . readInt ( ) ) ; return resp ; } public void readBytes ( byte [ ] data ) throws IOException { } }

Fix:
Thread . sleep ( 10 ) ;
Buggy code:
public class BAPluginListener implements Listener { @ EventHandler public void onPluginEnable ( PluginEnableEvent event ) { if ( event . getPlugin ( ) . getName ( ) . equalsIgnoreCase ( "BattleTracker" ) ) loadBattleTracker ( ) ; else if ( event . getPlugin ( ) . getName ( ) . equalsIgnoreCase ( "CombatTag" ) ) loadCombatTag ( ) ; else if ( event . getPlugin ( ) . getName ( ) . equalsIgnoreCase ( "DisguiseCraft" ) ) loadDisguiseCraft ( ) ; else if ( event . getPlugin ( ) . getName ( ) . equalsIgnoreCase ( "Essentials" ) ) loadEssentials ( ) ; else if ( event . getPlugin ( ) . getName ( ) . equalsIgnoreCase ( "Factions" ) ) loadFactions ( ) ; else if ( event . getPlugin ( ) . getName ( ) . equalsIgnoreCase ( "Herochat" ) ) loadHeroChat ( ) ; else if ( event . getPlugin ( ) . getName ( ) . equalsIgnoreCase ( "Heroes" ) ) loadHeroes ( ) ; else if ( event . getPlugin ( ) . getName ( ) . equalsIgnoreCase ( "LibsDisguises" ) ) loadLibsDisguise ( ) ; else <START_BUG> if ( event . getPlugin ( ) . getName ( ) . equalsIgnoreCase ( "MobArena" ) ) <END_BUG> loadMcMMO ( ) ; else if ( event . getPlugin ( ) . getName ( ) . equalsIgnoreCase ( "MobArena" ) ) loadMobArena ( ) ; else if ( event . getPlugin ( ) . getName ( ) . equalsIgnoreCase ( "MultiInv" ) ) loadMultiInv ( ) ; else if ( event . getPlugin ( ) . getName ( ) . equalsIgnoreCase ( "Multiverse-Core" ) ) loadMultiverseCore ( ) ; else if ( event . getPlugin ( ) . getName ( ) . equalsIgnoreCase ( "Multiverse-Inventories" ) ) loadMultiverseInventory ( ) ; else if ( event . getPlugin ( ) . getName ( ) . equalsIgnoreCase ( "PylamoRestorationSystem" ) ) loadPylamoRestoration ( ) ; else if ( event . getPlugin ( ) . getName ( ) . equalsIgnoreCase ( "TagAPI" ) ) loadTagAPI ( ) ; else if ( event . getPlugin ( ) . getName ( ) . equalsIgnoreCase ( "WorldEdit" ) ) loadWorldEdit ( ) ; else if ( event . getPlugin ( ) . getName ( ) . equalsIgnoreCase ( "WorldGuard" ) ) loadWorldGuard ( ) ; else if ( event . getPlugin ( ) . getName ( ) . equalsIgnoreCase ( "VanishNoPacket" ) ) loadVanishNoPacket ( ) ; else if ( event . getPlugin ( ) . getName ( ) . equalsIgnoreCase ( "Vault" ) ) loadVault ( ) ; else loadOthers ( ) ; } public void loadAll ( ) { } public void loadBattleTracker ( ) { } public void loadCombatTag ( ) { } public void loadDisguiseCraft ( ) { } public void loadEssentials ( ) { } public void loadFactions ( ) { } public void loadHeroChat ( ) { } public void loadHeroes ( ) { } public void loadLibsDisguise ( ) { } public void loadMcMMO ( ) { } public void loadMobArena ( ) { } public void loadMultiInv ( ) { } public void loadMultiverseCore ( ) { } public void loadMultiverseInventory ( ) { } public void loadPylamoRestoration ( ) { } public void loadWorldEdit ( ) { } public void loadWorldGuard ( ) { } public void loadTagAPI ( ) { } public void loadVanishNoPacket ( ) { } public void loadVault ( ) { } private void loadOthers ( ) { } }

Fix:
if ( event . getPlugin ( ) . getName ( ) . equalsIgnoreCase ( "mcMMO" ) )
Buggy code:
public class BaseTestCase2 extends TestCase { private static TurbineConfig tc = null ; private static Module module = null ; private static IssueType defaultIssueType = null ; protected static int nbrDfltModules = 7 ; protected static int nbrDfltIssueTypes = 5 ; private ScarabUser user0 = null ; private ScarabUser user1 = null ; private ScarabUser user2 = null ; private Issue issue0 = null ; private Attribute platformAttribute = null ; private Attribute assignAttribute = null ; private Attribute ccAttribute = null ; private static boolean initialized = false ; public BaseTestCase2 ( ) { } public BaseTestCase2 ( String name ) throws Exception { } protected void setUp ( ) throws Exception { } protected void tearDown ( ) throws Exception { } private void initScarab ( ) throws Exception { } private void initTurbine ( ) throws Exception { <START_BUG> File directoryFile = new File ( ".//src//test" ) ; <END_BUG> String directory = directoryFile . getAbsolutePath ( ) ; BaseTestCase2 . tc = new TurbineConfig ( directory , "TestTurbineResources.properties" ) ; BaseTestCase2 . tc . init ( ) ; } protected ScarabUser getUser1 ( ) throws Exception { } protected Issue getIssue0 ( ) throws Exception { } protected Attribute getPlatformAttribute ( ) throws Exception { } protected ActivitySet getEditActivitySet ( ) throws Exception { } }

Fix:
File directoryFile = new File ( "src//test" ) ;
Buggy code:
class RemoveFolderFromIndex extends IndexRequest { IPath folderPath ; char [ ] [ ] exclusionPatterns ; IProject project ; public RemoveFolderFromIndex ( IPath folderPath , char [ ] [ ] exclusionPatterns , IProject project , IndexManager manager ) { } public boolean execute ( IProgressMonitor progressMonitor ) { if ( ( this . isCancelled ) || ( ( progressMonitor != null ) && ( progressMonitor . isCanceled ( ) ) ) ) return true ; Index index = manager . getIndex ( this . containerPath , true , false ) ; if ( index == null ) return true ; <START_BUG> ReadWriteMonitor monitor = manager . getMonitorFor ( index ) ; <END_BUG> if ( monitor == null ) return true ; try { monitor . enterRead ( ) ; String [ ] paths = index . queryDocumentNames ( this . folderPath . toString ( ) ) ; for ( int i = 0 , max = ( paths == null ) ? 0 : paths . length ; i < max ; i ++ ) { String documentPath = paths [ i ] ; if ( ( ( this . exclusionPatterns ) == null ) || ( ! ( Util . isExcluded ( new Path ( documentPath ) , this . exclusionPatterns ) ) ) ) { manager . remove ( documentPath , this . containerPath ) ; } } } catch ( IOException e ) { if ( JobManager . VERBOSE ) { JobManager . verbose ( ( ( "-><seq2seq4repair_space>failed<seq2seq4repair_space>to<seq2seq4repair_space>remove<seq2seq4repair_space>" + ( this . folderPath ) ) + "<seq2seq4repair_space>from<seq2seq4repair_space>index<seq2seq4repair_space>because<seq2seq4repair_space>of<seq2seq4repair_space>the<seq2seq4repair_space>following<seq2seq4repair_space>exception:" ) ) ; e . printStackTrace ( ) ; } return false ; } finally { monitor . exitRead ( ) ; } return true ; } public String toString ( ) { } }

Fix:
ReadWriteMonitor monitor = index . monitor ;
Buggy code:
public class XMLAssertion extends AbstractTestElement implements Serializable , Assertion { private static final Logger log = LoggingManager . getLoggerForClass ( ) ; private static ThreadLocal myBuilder = new ThreadLocal ( ) { protected Object initialValue ( ) { } } ; public AssertionResult getResult ( SampleResult response ) { <START_BUG> AssertionResult result = new AssertionResult ( ) ; <END_BUG> byte [ ] responseData = response . getResponseData ( ) ; if ( ( responseData . length ) == 0 ) { return result . setResultForNull ( ) ; } result . setFailure ( false ) ; String resultData = new String ( getResultBody ( responseData ) ) ; SAXBuilder builder = ( ( SAXBuilder ) ( XMLAssertion . myBuilder . get ( ) ) ) ; try { builder . build ( new StringReader ( resultData ) ) ; } catch ( JDOMException e ) { XMLAssertion . log . debug ( "Cannot<seq2seq4repair_space>parse<seq2seq4repair_space>result<seq2seq4repair_space>content" , e ) ; result . setFailure ( true ) ; result . setFailureMessage ( e . getMessage ( ) ) ; } catch ( IOException e ) { XMLAssertion . log . error ( "Cannot<seq2seq4repair_space>read<seq2seq4repair_space>result<seq2seq4repair_space>content" , e ) ; result . setError ( true ) ; result . setFailureMessage ( e . getMessage ( ) ) ; } return result ; } private byte [ ] getResultBody ( byte [ ] resultData ) { } private byte [ ] getByteArraySlice ( byte [ ] array , int begin , int end ) { } }

Fix:
AssertionResult result = new AssertionResult ( getName ( ) ) ;
Buggy code:
public class RemoteChannelPairSetup implements RemotingChannelPairSetup { static final String ENDPOINT_NAME = "endpoint" ; static final String URI_SCHEME = "test123" ; static final String TEST_CHANNEL = "Test-Channel" ; static final int PORT = 32123 ; ChannelServer channelServer ; protected ExecutorService executorService ; protected ManagementChannel serverChannel ; protected ManagementChannel clientChannel ; final CountDownLatch clientConnectedLatch = new CountDownLatch ( 1 ) ; public ManagementChannel getServerChannel ( ) { } public ManagementChannel getClientChannel ( ) { } public ExecutorService getExecutorService ( ) { } public void setupRemoting ( ) throws IOException { } public void startChannels ( ) throws IOException , URISyntaxException { ProtocolChannelClient . Configuration < ManagementChannel > configuration = new ProtocolChannelClient . Configuration < ManagementChannel > ( ) ; configuration . setEndpointName ( RemoteChannelPairSetup . ENDPOINT_NAME ) ; configuration . setUriScheme ( RemoteChannelPairSetup . URI_SCHEME ) ; configuration . setUri ( new URI ( ( ( ( ( "" + ( RemoteChannelPairSetup . URI_SCHEME ) ) + ":////127.0.0.1:" ) + ( RemoteChannelPairSetup . PORT ) ) + "" ) ) ) ; configuration . setExecutor ( executorService ) ; configuration . setChannelFactory ( new ManagementChannelFactory ( ) ) ; ProtocolChannelClient < ManagementChannel > client = ProtocolChannelClient . create ( configuration ) ; <START_BUG> client . connect ( ) ; <END_BUG> clientChannel = client . openChannel ( RemoteChannelPairSetup . TEST_CHANNEL ) ; try { clientConnectedLatch . await ( ) ; } catch ( InterruptedException e ) { throw new RuntimeException ( e ) ; } } public void stopChannels ( ) { } public void shutdownRemoting ( ) throws IOException , InterruptedException { } }

Fix:
client . connect ( null ) ;
Buggy code:
public class GoogleMapActivity extends Activity implements View . OnClickListener , ClusterManager . OnClusterClickListener , ClusterManager . OnClusterItemClickListener { public static final String LATITUDE = "Latitude" ; public static final String LONGITUDE = "Longitude" ; public static final String ADDRESS = "address" ; public static final String MEMORY_ID = "memoryID" ; public static final String USER_ID = "userID" ; private static final int ADD_NEW_MEMORY = 1 ; private static final int SCAN_INTERVAL_INITIAL = 1000 ; private static final int SCAN_INTERVAL = 1000 * 20 ; private static boolean updateMarkers = true ; private boolean isUpdateMarkers = true ; private boolean isFirstInitial = true ; private GoogleMap googleMap ; private ParseGeoPoint parseGeoPoint ; private String address ; private LinearLayout progressBarLayout ; private Handler handler = new Handler ( ) ; private LocationUpdateUtil locationUpdateUtil ; private final Map < BubblePinClusterItem , String > clusterItems = new HashMap < > ( ) ; private ClusterManager < BubblePinClusterItem > clusterManager ; String currentUserID = ParseUser . getCurrentUser ( ) . getObjectId ( ) ; public static void refreshUpdateMarkers ( ) { } @ Override protected void onCreate ( Bundle savedInstanceState ) { } private void initialUI ( ) { } @ Override protected void onStart ( ) { } @ Override protected void onResume ( ) { } @ Override protected void onPause ( ) { } @ Override protected void onStop ( ) { } @ Override protected void onDestroy ( ) { } @ Override public void onClick ( View v ) { } @ Override public void onActivityResult ( int requestCode , int resultCode , Intent data ) { } private void createMap ( ) { } private void initMarks ( ) { } private void getAllMemoriesFromUser ( ) { } private void getAllPublicMemoriesFromUser ( ) { } private void addMemoryIntoCluster ( List < ParseObject > parseObjects ) { } private boolean isValidGooglePlayService ( ) { } private void getMemoryBriefInfo ( final String objectId ) { } private void createNewDialog ( final String objectId , String title , String message , final String userId ) { } Runnable scanLocation ; @ Override public boolean onClusterItemClick ( ClusterItem clusterItem ) { } @ Override public boolean onClusterClick ( Cluster cluster ) { } private void showToast ( String msg ) { } <START_BUG> public void showProgress ( final boolean show ) { <END_BUG> progressBarLayout . setVisibility ( ( show ? View . VISIBLE : View . GONE ) ) ; } private void signUpSuccess ( ) { } No newline ; at end ; of file ; }

Fix:
public void showProgress ( boolean show ) {
Buggy code:
@ Component public class TRConceptLocator implements ConceptLocator { private TerminologyServer terminologyServer ; private static Logger logger = Logger . getLogger ( TRConceptLocator . class ) ; @ Autowired public TRConceptLocator ( TerminologyServer terminologyServer ) { } @ Override public ValueSetDefineConceptComponent locate ( String system , final String code ) { } @ Override <START_BUG> @ Cacheable ( value = "shrCache" , unless = "#result<seq2seq4repair_space>==<seq2seq4repair_space>null" ) <END_BUG> public ValidationResult validate ( String system , String code , String display ) { if ( ( locate ( system , code ) ) == null ) { return new ValidationResult ( IssueSeverity . error , display ) ; } return null ; } @ Override public boolean verifiesSystem ( String system ) { } @ Override public List < ValueSetExpansionContainsComponent > expand ( ValueSet . ConceptSetComponent inc ) throws Exception { } }

Fix:
@ Cacheable ( value = "shrCache" , unless = "#result<seq2seq4repair_space>!=<seq2seq4repair_space>null" )
Buggy code:
public class TermsFilter extends Filter { private final Set < Term > terms = new TreeSet < Term > ( ) ; public void addTerm ( Term term ) { } @ Override public DocIdSet getDocIdSet ( AtomicReaderContext context , Bits acceptDocs ) throws IOException { AtomicReader reader = context . reader ( ) ; FixedBitSet result = new FixedBitSet ( reader . maxDoc ( ) ) ; Fields fields = reader . fields ( ) ; if ( fields == null ) { return result ; } BytesRef br = new BytesRef ( ) ; String lastField = null ; Terms termsC ; TermsEnum termsEnum = null ; DocsEnum docs = null ; for ( Term term : terms ) { if ( ! ( term . field ( ) . equals ( lastField ) ) ) { termsC = fields . terms ( term . field ( ) ) ; if ( termsC == null ) { return result ; } termsEnum = termsC . iterator ( null ) ; lastField = term . field ( ) ; } if ( ( terms ) != null ) { br . copyBytes ( term . bytes ( ) ) ; assert termsEnum != null ; if ( ( termsEnum . seekCeil ( br ) ) == ( SeekStatus . FOUND ) ) { <START_BUG> docs = termsEnum . docs ( acceptDocs , docs , 0 ) ; <END_BUG> while ( ( docs . nextDoc ( ) ) != ( DocIdSetIterator . NO_MORE_DOCS ) ) { result . set ( docs . docID ( ) ) ; } } } } return result ; } @ Override public boolean equals ( Object obj ) { } @ Override public int hashCode ( ) { } }

Fix:
docs = termsEnum . docs ( acceptDocs , docs , false ) ;
Buggy code:
public class ExportFeature extends AbstractExtension { public static final String EXPORT_FEATURE_NAME = "export" ; private HtmlTable table ; @ Override public String getExtensionName ( ) { } @ Override public void setup ( HtmlTable table ) { } private String getOnclick ( ExportConf exportConf ) { String oTableId = "oTable_" + ( table . getId ( ) ) ; StringBuilder params = new StringBuilder ( ) ; StringBuilder exportFuncName = new StringBuilder ( "ddl_dt_launch_export_" ) ; exportFuncName . append ( table . getId ( ) ) ; exportFuncName . append ( "_" ) ; exportFuncName . append ( exportConf . getFormat ( ) ) ; StringBuilder exportFunc = new StringBuilder ( "function<seq2seq4repair_space>" ) ; exportFunc . append ( exportFuncName . toString ( ) ) ; exportFunc . append ( "(){" ) ; params . append ( oTableId ) . append ( ".ajax.params()" ) ; if ( exportConf . getMethod ( ) . equals ( GET ) ) { exportFunc . append ( "window.location=\"" ) . append ( exportConf . getUrl ( ) ) ; if ( exportConf . getUrl ( ) . contains ( "?" ) ) { exportFunc . append ( "&" ) ; } else { exportFunc . append ( "?" ) ; } exportFunc . append ( "\"<seq2seq4repair_space>+<seq2seq4repair_space>decodeURIComponent($.param(" ) . append ( params . toString ( ) ) . append ( ")).replace(//\\+//g,\'<seq2seq4repair_space>\');" ) ; } else { <START_BUG> exportFunc . append ( "$.download('" ) . append ( exportConf . getUrl ( ) ) . append ( "',<seq2seq4repair_space>decodeURIComponent($.param(" ) . append ( params . toString ( ) ) . append ( ")).replace(//\\+//g,\'<seq2seq4repair_space>\'),\'" ) . append ( exportConf . getMethod ( ) ) . append ( "'));" ) ; <END_BUG> } exportFunc . append ( "}" ) ; appendToBeforeAll ( exportFunc . toString ( ) ) ; return exportFuncName . append ( "();" ) . toString ( ) ; } No newline ; at end ; of file ; }

Fix:
exportFunc . append ( "$.download('" ) . append ( exportConf . getUrl ( ) ) . append ( "',<seq2seq4repair_space>decodeURIComponent($.param(" ) . append ( params . toString ( ) ) . append ( ")).replace(//\\+//g,\'<seq2seq4repair_space>\'),\'" ) . append ( exportConf . getMethod ( ) ) . append ( "');" ) ;
Buggy code:
public class Parser { public static final Logger LOGGER = LoggerFactory . getLogger ( Parser . class ) ; Producer < String , String > producer ; private static Map < String , Future < Response > > futureResponseMap ; int counterConsume = 0 ; int counterProduce = 0 ; Properties prop ; JsonParser parser = new JsonParser ( ) ; Gson gson = new GsonBuilder ( ) . create ( ) ; public Parser ( String configDir ) { } public void consume ( KafkaStream < byte [ ] , byte [ ] > stream ) { } public static String getDomainName ( String url ) { } public void process ( JsonObject data ) { <START_BUG> String htmlContent = data . get ( "data" ) . getAsString ( ) ; <END_BUG> if ( htmlContent == null ) return ; List < JsonObject > tweetsMetaList = parseTwitter ( htmlContent ) ; for ( JsonObject tweetMeta : tweetsMetaList ) { JsonArray tinyUrls = tweetMeta . getAsJsonArray ( "tiny_urls" ) ; for ( JsonElement tinyUrlElem : tinyUrls ) { String tinyUrl = tinyUrlElem . getAsString ( ) ; Parser . LOGGER . info ( "tiny<seq2seq4repair_space>url:<seq2seq4repair_space>{}" , tinyUrl ) ; Parser . futureResponseMap . put ( tinyUrl , ExtendUrlService . asyncExtendUrl ( tinyUrl ) ) ; } } for ( JsonObject tweetMeta : tweetsMetaList ) { JsonArray tinyUrls = tweetMeta . getAsJsonArray ( "tiny_urls" ) ; for ( JsonElement tinyUrlElem : tinyUrls ) { String tinyUrl = tinyUrlElem . getAsString ( ) ; try { String longUrl = Parser . futureResponseMap . get ( tinyUrl ) . get ( ) . getUri ( ) . toUrl ( ) ; if ( StringUtils . isEmpty ( longUrl ) ) { continue ; } JsonObject outputObj = new JsonObject ( ) ; outputObj . addProperty ( "url" , longUrl ) ; outputObj . add ( "tweet_meta" , tweetMeta ) ; outputObj . addProperty ( "domain" , Parser . getDomainName ( longUrl ) ) ; if ( data . has ( "ts_fetch" ) ) { tweetMeta . addProperty ( "ts_fetch" , data . get ( "ts_fetch" ) . getAsString ( ) ) ; } produce ( outputObj , prop . getProperty ( "kafka.links" ) ) ; } catch ( InterruptedException e ) { e . printStackTrace ( ) ; } catch ( ExecutionException e ) { e . printStackTrace ( ) ; } } } Parser . futureResponseMap . clear ( ) ; } private List < JsonObject > parseTwitter ( String htmlContent ) { } public void produce ( JsonObject data , String topic ) { } public static void main ( String [ ] args ) { } }

Fix:
String htmlContent = data . get ( "content" ) . getAsString ( ) ;
Buggy code:
public class DefaultHornetQProviderJMSOperations implements JMSOperations { private final ManagementClient client ; private static final Logger logger = Logger . getLogger ( DefaultHornetQProviderJMSOperations . class ) ; public DefaultHornetQProviderJMSOperations ( ManagementClient client ) { } @ Override public void createJmsQueue ( String queueName , String jndiName ) { } @ Override public void createJmsTopic ( String topicName , String jndiName ) { } @ Override public void removeJmsQueue ( String queueName ) { } @ Override public void removeJmsTopic ( String topicName ) { } @ Override public void close ( ) { } private ModelControllerClient getModelControllerClient ( ) { } private void createJmsDestination ( final String destinationType , final String destinationName , final String jndiName ) { } private void removeJmsDestination ( final String destinationType , final String destinationName ) { } private void applyUpdate ( final ModelNode update ) throws IOException , JMSOperationsException { } @ Override public void setSystemProperties ( String destination , String resourceAdapter ) { } @ Override public void removeSystemProperties ( ) { final ModelNode removeDestinationOp = new ModelNode ( ) ; removeDestinationOp . get ( OP ) . set ( "remove" ) ; removeDestinationOp . get ( OP_ADDR ) . add ( "system-property" , "destination" ) ; final ModelNode removeResourceAdapterOp = new ModelNode ( ) ; removeResourceAdapterOp . get ( OP ) . set ( "remove" ) ; removeResourceAdapterOp . get ( OP_ADDR ) . add ( "system-property" , "resource.adapter" ) ; final ModelNode disableSubstitutionOp = new ModelNode ( ) ; disableSubstitutionOp . get ( OP_ADDR ) . set ( SUBSYSTEM , "ee" ) ; disableSubstitutionOp . get ( OP ) . set ( WRITE_ATTRIBUTE_OPERATION ) ; <START_BUG> disableSubstitutionOp . get ( NAME ) . set ( "ejb-annotation-property-replacement" ) ; <END_BUG> disableSubstitutionOp . get ( VALUE ) . set ( false ) ; try { applyUpdate ( removeDestinationOp ) ; applyUpdate ( removeResourceAdapterOp ) ; applyUpdate ( disableSubstitutionOp ) ; } catch ( Exception e ) { throw new RuntimeException ( e ) ; } } }

Fix:
disableSubstitutionOp . get ( NAME ) . set ( "ejb-annotationr-property-replacement" ) ;
Buggy code:
public class StructureModelRegressionTest extends AjdeTestCase { public StructureModelRegressionTest ( String name ) { } public static void main ( String [ ] args ) { } public static TestSuite suite ( ) { } public void test ( ) { <START_BUG> String testLstFile = ( AjdeTests . TESTDATA_PATH ) + "//StructureModelRegressionTest//example.lst" ; <END_BUG> File f = new File ( testLstFile ) ; assertTrue ( testLstFile , f . canRead ( ) ) ; } public boolean verifyAgainstSavedModel ( String lstFile ) { } private boolean IProgramElementsEqual ( IProgramElement s1 , IProgramElement s2 ) { } private IHierarchy getModelForFile ( String lstFile ) { } protected void setUp ( ) throws Exception { } public void testModelExists ( ) { } protected void tearDown ( ) throws Exception { } }

Fix:
String testLstFile = AjdeTests . testDataPath ( "StructureModelRegressionTest//example.lst" ) ;
Buggy code:
public class ViewHeaderListCommand extends SelectiveGuiUpdateCommand { private HeaderList headerList ; private Folder folder ; public ViewHeaderListCommand ( FrameController frame , DefaultCommandReference [ ] references ) { } public void updateGUI ( ) throws Exception { <START_BUG> ( ( HeaderTableSelectionHandler ) ( frameController . getSelectionManager ( ) . getHandler ( "mail.headertable" ) ) ) . setFolder ( folder ) ; <END_BUG> ( ( MailFrameController ) ( frameController ) ) . tableController . getHeaderTableModel ( ) . setHeaderList ( headerList ) ; TableChangedEvent ev = new TableChangedEvent ( TableChangedEvent . UPDATE , folder ) ; frameModel . tableChanged ( ev ) ; ( ( MailFrameController ) ( frameController ) ) . tableController . getView ( ) . scrollRectToVisible ( new Rectangle ( 0 , 0 , 0 , 0 ) ) ; boolean enableThreadedView = folder . getFolderItem ( ) . getBoolean ( "property" , "enable_threaded_view" , false ) ; ( ( MailFrameController ) ( frameController ) ) . tableController . getView ( ) . clearSelection ( ) ; treeModel . nodeChanged ( folder ) ; } public void execute ( Worker worker ) throws Exception { } }

Fix:
( ( HeaderTableSelectionHandler ) ( frameController . getSelectionManager ( ) . getHandler ( "mail.table" ) ) ) . setFolder ( folder ) ;
Buggy code:
public class ToolFactory { public static ICodeFormatter createCodeFormatter ( ) { } public static ICodeFormatter createDefaultCodeFormatter ( Map options ) { } public static IClassFileDisassembler createDefaultClassFileDisassembler ( ) { } public static ClassFileBytesDisassembler createDefaultClassFileBytesDisassembler ( ) { } public static IClassFileReader createDefaultClassFileReader ( String fileName , int decodingFlag ) { } public static IClassFileReader createDefaultClassFileReader ( IClassFile classfile , int decodingFlag ) { } public static IClassFileReader createDefaultClassFileReader ( String zipFileName , String zipEntryName , int decodingFlag ) { } public static IScanner createScanner ( boolean tokenizeComments , boolean tokenizeWhiteSpace , boolean assertMode , boolean recordLineSeparator ) { <START_BUG> PublicScanner scanner = new PublicScanner ( tokenizeComments , tokenizeWhiteSpace , false , assertMode , null , null ) ; <END_BUG> scanner . recordLineSeparator = recordLineSeparator ; return scanner ; } public static IScanner createScanner ( boolean tokenizeComments , boolean tokenizeWhiteSpace , boolean recordLineSeparator , String sourceLevel ) { } }

Fix:
PublicScanner scanner = new PublicScanner ( tokenizeComments , tokenizeWhiteSpace , false , JDK1_3 , null , null ) ;
Buggy code:
public class WeldEjbServices implements EjbServices { private final ServiceRegistry serviceRegistry ; private volatile Map < String , InterceptorBindings > bindings = Collections . emptyMap ( ) ; public WeldEjbServices ( ServiceRegistry serviceRegistry ) { } @ Override public synchronized void registerInterceptors ( EjbDescriptor < ? > ejbDescriptor , InterceptorBindings interceptorBindings ) { } @ Override public SessionObjectReference resolveEjb ( EjbDescriptor < ? > ejbDescriptor ) { if ( ejbDescriptor . isStateful ( ) ) { <START_BUG> return new org . jboss . as . weld . deployment . StatefulSessionObjectReferenceImpl ( ( ( EjbDescriptorImpl < ? > ) ( ejbDescriptor ) ) , serviceRegistry ) ; <END_BUG> } else { return new org . jboss . as . weld . deployment . SessionObjectReferenceImpl ( ( ( EjbDescriptorImpl < ? > ) ( ejbDescriptor ) ) , serviceRegistry ) ; } } @ Override public void cleanup ( ) { } public InterceptorBindings getBindings ( String ejbName ) { } }

Fix:
return new StatefulSessionObjectReferenceImpl ( ( ( EjbDescriptorImpl < ? > ) ( ejbDescriptor ) ) ) ;
Buggy code:
public class SimpleRecyclerView extends FrameLayout { PlaceHoderHeaderLayout placeHoderHeaderLayout ; public SimpleRecyclerView ( Context context ) { } public PlaceHoderHeaderLayout getPlaceHoderHeaderLayout ( ) { } public void initRecyclerView ( View view ) { } private List < String > createItemList ( ) { List < String > list = new ArrayList < > ( ) ; <START_BUG> for ( int i = 0 ; i < 100 ; i ++ ) { <END_BUG> list . add ( ( "" + i ) ) ; } return list ; } public class RecyclerAdapter extends RecyclerWithHeaderAdapter { private List < String > mItemList ; public RecyclerAdapter ( ) { } public void addItems ( List < String > list ) { } @ Override public ViewHolder oncreateViewHolder ( ViewGroup viewGroup , int viewType ) { } @ Override public void onbindViewHolder ( RecyclerView . ViewHolder viewHolder , int position ) { } @ Override public int getitemCount ( ) { } private class RecyclerItemViewHolder extends RecyclerView . ViewHolder { private final TextView tvTitle ; private final ImageView ivIcon ; public RecyclerItemViewHolder ( View itemView ) { } } } }

Fix:
for ( int i = 0 ; i < 6 ; i ++ ) {
Buggy code:
public class NormalizedSpectralClustering implements Clustering { public Assignments cluster ( Matrix m , int k , Properties props ) { double [ ] degrees = new double [ m . rows ( ) ] ; for ( int r = 0 ; r < ( m . rows ( ) ) ; ++ r ) { double degree = 0 ; for ( int c = 0 ; c < ( m . columns ( ) ) ; ++ c ) degree += m . get ( r , c ) ; degrees [ r ] = degree ; } for ( int r = 0 ; r < ( m . rows ( ) ) ; ++ r ) degrees [ r ] = Math . pow ( degrees [ r ] , ( - 0.5 ) ) ; RealMatrix L = new org . apache . commons . math . linear . Array2DRowRealMatrix ( m . rows ( ) , m . columns ( ) ) ; for ( int r = 0 ; r < ( m . rows ( ) ) ; ++ r ) for ( int c = 0 ; c < ( m . columns ( ) ) ; ++ c ) L . setEntry ( r , c , ( ( r == c ? 1 : 0 ) - ( ( ( degrees [ r ] ) * ( m . get ( r , c ) ) ) * ( degrees [ c ] ) ) ) ) ; EigenDecomposition eigenDecomp = new org . apache . commons . math . linear . EigenDecompositionImpl ( L , 0 ) ; Matrix spectral = new edu . ucla . sspace . matrix . ArrayMatrix ( m . rows ( ) , k ) ; double [ ] rowNorms = new double [ m . rows ( ) ] ; for ( int c = 0 ; c < k ; ++ c ) { RealVector eigenVec = eigenDecomp . getEigenvector ( c ) ; for ( int r = 0 ; r < ( m . rows ( ) ) ; ++ r ) { double value = eigenVec . getEntry ( r ) ; rowNorms [ r ] += Math . pow ( value , 2 ) ; spectral . set ( r , c , value ) ; } } for ( int r = 0 ; r < ( spectral . rows ( ) ) ; ++ r ) { double norm = Math . sqrt ( rowNorms [ r ] ) ; for ( int c = 0 ; c < ( spectral . columns ( ) ) ; ++ c ) spectral . set ( r , c , ( ( spectral . get ( r , c ) ) // norm ) ) ; } <START_BUG> return DirectClustering . cluster ( spectral , k , 10 ) ; <END_BUG> } public Assignments cluster ( Matrix m , Properties props ) { } }

Fix:
return DirectClustering . cluster ( spectral , k , 20 ) ;
Buggy code:
public class ScopedComponentResolverTest extends WicketTestCase { private static Log log = LogFactory . getLog ( ScopedComponentResolverTest . class ) ; public ScopedComponentResolverTest ( String name ) { } protected void setUp ( ) throws Exception { super . setUp ( ) ; <START_BUG> application . getComponentResolvers ( ) . add ( new ScopedComponentResolver ( ) ) ; <END_BUG> } public void testRenderHomePage ( ) throws Exception { } }

Fix:
application . getRequestCycleSettings ( ) . getComponentResolvers ( ) . add ( new ScopedComponentResolver ( ) ) ;