nus-yam/ex-repair huggingface dataset:
Buggy code:
public class ExecutablePublicKeyMessage extends ExecutableMessage { private static final Logger LOGGER = Logger . getLogger ( ExecutablePublicKeyMessage . class . getName ( ) ) ; private final Connection connection ; @ SuppressWarnings ( "WeakerAccess" ) public ExecutablePublicKeyMessage ( Connection connection , Message message ) { } @ Override public void runDelayed ( ) { } @ Override public void runImmediate ( ) { byte [ ] keyBytes = ( ( byte [ ] ) ( getMessage ( ) . getArgument ( "publicKey" ) ) ) ; try { PublicKey suppliedKey = KeyFactory . getInstance ( "RSA" ) . generatePublic ( new X509EncodedKeySpec ( keyBytes ) ) ; if ( isKeyValid ( suppliedKey ) ) { <START_BUG> connection . getMessageIO ( ) . out . setPublicKey ( suppliedKey ) ; <END_BUG> } } catch ( InvalidKeySpecException | NoSuchAlgorithmException e ) { ExecutablePublicKeyMessage . LOGGER . log ( Level . INFO , "Unable<seq2seq4repair_space>to<seq2seq4repair_space>instantiate<seq2seq4repair_space>public<seq2seq4repair_space>key;<seq2seq4repair_space>messages<seq2seq4repair_space>will<seq2seq4repair_space>not<seq2seq4repair_space>be<seq2seq4repair_space>encrypted!" , e ) ; } } private boolean isKeyValid ( Key suppliedKey ) { } }

Fix:
connection . getMessageIO ( ) . getOut ( ) . setPublicKey ( suppliedKey ) ;
Buggy code:
public class TestLRS extends SingleEMFTestCase { private long id ; public void setUp ( ) { <START_BUG> setUp ( LRSEntity . class , BasicEntity . class ) ; <END_BUG> EntityManager em = emf . createEntityManager ( ) ; em . getTransaction ( ) . begin ( ) ; LRSEntity lrs = new LRSEntity ( ) ; lrs . setName ( "lrs" ) ; for ( int i = 1 ; i <= 3 ; i ++ ) { BasicEntity basic = new BasicEntity ( ) ; basic . setName ( ( "basic" + i ) ) ; em . persist ( basic ) ; lrs . getLRSList ( ) . add ( basic ) ; } em . persist ( lrs ) ; em . getTransaction ( ) . commit ( ) ; id = lrs . getId ( ) ; em . close ( ) ; } public void testEMClear ( ) { } public void testEMClose ( ) { } public void testDetachCopy ( ) { } private void assertLRS ( LRSEntity lrs , String name ) { } private void assertMerge ( LRSEntity lrs ) { } public static void main ( String [ ] args ) { } }

Fix:
setUp ( LRSEntity . class , BasicEntity . class , CLEAR_TABLES ) ;
Buggy code:
public class TestAttachWithNoChanges extends TestCase { private EntityManagerFactory emf ; public void setUp ( ) { String types = ( ( DetachmentOneManyParent . class . getName ( ) ) + ";" ) + ( DetachmentOneManyChild . class . getName ( ) ) ; <START_BUG> Map props = new HashMap ( ) ; <END_BUG> props . put ( "openjpa.MetaDataFactory" , ( ( "jpa(Types=" + types ) + ")" ) ) ; emf = Persistence . createEntityManagerFactory ( "test" , props ) ; } public void tearDown ( ) { } public void testAttachWithNoChangesChecksVersion ( ) { } public static void main ( String [ ] args ) { } }

Fix:
Map props = new HashMap ( System . getProperties ( ) ) ;
Buggy code:
public class RequestParameters implements Serializable { private static final long serialVersionUID = 1L ; private String componentPath ; private String pageMapName ; private int versionNumber ; private String interfaceName ; private String behaviorId ; private String componentId ; private String bookmarkablePageClass ; private String bookmarkableFormName ; private Map < String , ? extends Object > parameters ; private String resourceKey ; private String path ; public RequestParameters ( ) { } public String getBookmarkablePageClass ( ) { } public void setBookmarkablePageClass ( String bookmarkablePageClass ) { } public String getComponentId ( ) { } public void setComponentId ( String componentId ) { } public String getComponentPath ( ) { } public void setComponentPath ( String componentPath ) { } public RequestListenerInterface getInterface ( ) { } public String getInterfaceName ( ) { } public void setInterfaceName ( String interfaceName ) { } public String getPageMapName ( ) { } public void setPageMapName ( String pageMapName ) { } public Map < String , ? extends Object > getParameters ( ) { } public void setParameters ( Map < String , ? extends Object > parameters ) { } public String getResourceKey ( ) { } public void setResourceKey ( String resourceKey ) { } public int getVersionNumber ( ) { } public void setVersionNumber ( int versionNumber ) { } public String getPath ( ) { } public void setPath ( String pathInfo ) { } public String getBehaviorId ( ) { } public void setBehaviorId ( String behaviorId ) { } @ Override public String toString ( ) { <START_BUG> StringBuffer b = new StringBuffer ( "[RequestParameters<seq2seq4repair_space>" ) ; <END_BUG> if ( ( getComponentPath ( ) ) != null ) { b . append ( "<seq2seq4repair_space>componentPath=" ) . append ( getComponentPath ( ) ) ; b . append ( "<seq2seq4repair_space>pageMapName=" ) . append ( getPageMapName ( ) ) ; b . append ( "<seq2seq4repair_space>versionNumber=" ) . append ( getVersionNumber ( ) ) ; b . append ( "<seq2seq4repair_space>interfaceName=" ) . append ( getInterfaceName ( ) ) ; b . append ( "<seq2seq4repair_space>componentId=" ) . append ( getComponentId ( ) ) ; b . append ( "<seq2seq4repair_space>behaviorId=" ) . append ( getBehaviorId ( ) ) ; } if ( ( getBookmarkablePageClass ( ) ) != null ) { b . append ( "<seq2seq4repair_space>bookmarkablePageClass=" ) . append ( getBookmarkablePageClass ( ) ) ; } if ( ( getParameters ( ) ) != null ) { b . append ( "<seq2seq4repair_space>parameters=" ) . append ( getParameters ( ) ) ; } if ( ( getResourceKey ( ) ) != null ) { b . append ( "<seq2seq4repair_space>resourceKey=" ) . append ( getResourceKey ( ) ) ; } b . append ( "]" ) ; return b . toString ( ) ; } public String getBookmarkableFormName ( ) { } public void setBookmarkableFormName ( String bookmarkableFormName ) { } }

Fix:
StringBuilder b = new StringBuilder ( "[RequestParameters<seq2seq4repair_space>" ) ;
Buggy code:
public interface DifferentiableMultivariateFunction extends MultivariateFunction { MultivariateFunction partialDerivative ( int k ) { } <START_BUG> MultivariateVectorialFunction gradient ( ) ; <END_BUG> }

Fix:
MultivariateVectorFunction gradient ( ) ;
Buggy code:
public class WWinActionBars implements IActionBars { private WorkbenchWindow window ; public WWinActionBars ( WorkbenchWindow window ) { } public void clearGlobalActionHandlers ( ) { } public IAction getGlobalActionHandler ( String actionID ) { } public IMenuManager getMenuManager ( ) { } public IStatusLineManager getStatusLineManager ( ) { } public IToolBarManager getToolBarManager ( ) { <START_BUG> return window . getToolsManager ( ) ; <END_BUG> } public void setGlobalActionHandler ( String actionID , IAction handler ) { } public void updateActionBars ( ) { } }

Fix:
return window . getCoolBarManager ( ) ;
Buggy code:
public final class TestClusterEvaluator extends MahoutTestCase { private static final double [ ] [ ] REFERENCE = new double [ ] [ ] { new double [ ] { 1 , 1 } , new double [ ] { 2 , 1 } , new double [ ] { 1 , 2 } , new double [ ] { 2 , 2 } , new double [ ] { 3 , 3 } , new double [ ] { 4 , 4 } , new double [ ] { 5 , 4 } , new double [ ] { 4 , 5 } , new double [ ] { 5 , 5 } } ; private List < VectorWritable > referenceData = Lists . newArrayList ( ) ; private final List < VectorWritable > sampleData = Lists . newArrayList ( ) ; private Map < Integer , List < VectorWritable > > representativePoints ; private List < Cluster > clusters ; private static final Logger log = LoggerFactory . getLogger ( TestClusterEvaluator . class ) ; private Configuration conf ; private FileSystem fs ; private Path testdata ; private Path output ; @ Override @ Before public void setUp ( ) throws Exception { } private void generateSamples ( int num , double mx , double my , double sd ) { } private void generateSamples ( ) { } private void printRepPoints ( int numIterations ) { } private void initData ( double dC , double dP , DistanceMeasure measure ) { } @ Test public void testRepresentativePoints ( ) throws Exception { } @ Test public void testCluster0 ( ) throws IOException { } @ Test public void testCluster1 ( ) throws IOException { } @ Test public void testCluster2 ( ) throws IOException { } @ Test public void testEmptyCluster ( ) throws IOException { } @ Test public void testSingleValueCluster ( ) throws IOException { } @ Test public void testAllSameValueCluster ( ) throws IOException { } @ Test public void testCanopy ( ) throws Exception { } @ Test public void testKmeans ( ) throws Exception { } @ Test public void testFuzzyKmeans ( ) throws Exception { } @ Test public void testMeanShift ( ) throws Exception { ClusteringTestUtils . writePointsToFile ( sampleData , new Path ( testdata , "file1" ) , fs , conf ) ; DistanceMeasure measure = new EuclideanDistanceMeasure ( ) ; IKernelProfile kernelProfile = new TriangularKernelProfile ( ) ; Configuration conf = new Configuration ( ) ; MeanShiftCanopyDriver . run ( conf , testdata , output , measure , kernelProfile , 2.1 , 1.0 , 0.001 , 10 , false , true , true ) ; int numIterations = 10 ; <START_BUG> Path clustersIn = new Path ( output , "clusters-7-final" ) ; <END_BUG> RepresentativePointsDriver . run ( conf , clustersIn , new Path ( output , "clusteredPoints" ) , output , measure , numIterations , true ) ; ClusterEvaluator evaluator = new ClusterEvaluator ( conf , clustersIn ) ; System . out . println ( ( "Intra-cluster<seq2seq4repair_space>density<seq2seq4repair_space>=<seq2seq4repair_space>" + ( evaluator . intraClusterDensity ( ) ) ) ) ; System . out . println ( ( "Inter-cluster<seq2seq4repair_space>density<seq2seq4repair_space>=<seq2seq4repair_space>" + ( evaluator . interClusterDensity ( ) ) ) ) ; } @ Test public void testDirichlet ( ) throws Exception { } }

Fix:
Path clustersIn = new Path ( output , "clusters-8-final" ) ;
Buggy code:
public class ByteKeyAnalyzer extends AbstractKeyAnalyzer < Byte > { private static final long serialVersionUID = 3395803342983289829L ; public static final ByteKeyAnalyzer INSTANCE = new ByteKeyAnalyzer ( ) ; public static final int LENGTH = Byte . SIZE ; private static final int MSB = 128 ; private static int mask ( final int bit ) { } public int bitsPerElement ( ) { } public int lengthInBits ( final Byte key ) { } public boolean isBitSet ( final Byte key , final int bitIndex , final int lengthInBits ) { <START_BUG> return ( key & ( ByteKeyAnalyzer . mask ( bitIndex ) ) ) != 0 ; <END_BUG> } public int bitIndex ( final Byte key , final int offsetInBits , final int lengthInBits , final Byte other , final int otherOffsetInBits , final int otherLengthInBits ) { } public boolean isPrefix ( final Byte prefix , final int offsetInBits , final int lengthInBits , final Byte key ) { } }

Fix:
return ( ( key . intValue ( ) ) & ( ByteKeyAnalyzer . mask ( bitIndex ) ) ) != 0 ;
Buggy code:
public class TarInputStream extends FilterInputStream { private TarBuffer m_buffer ; private TarArchiveEntry m_currEntry ; private boolean m_debug ; private int m_entryOffset ; private int m_entrySize ; private boolean m_hasHitEOF ; private byte [ ] m_oneBuf ; private byte [ ] m_readBuf ; public TarInputStream ( final InputStream input ) { } public TarInputStream ( final InputStream input , final int blockSize ) { } public TarInputStream ( final InputStream input , final int blockSize , final int recordSize ) { } public void setDebug ( final boolean debug ) { } public TarArchiveEntry getNextEntry ( ) throws IOException { } public int getRecordSize ( ) { } public int available ( ) throws IOException { } public void close ( ) throws IOException { } public void copyEntryContents ( final OutputStream output ) throws IOException { } public void mark ( int markLimit ) { } public boolean markSupported ( ) { } public int read ( ) throws IOException { final int num = read ( m_oneBuf , 0 , 1 ) ; if ( num == ( - 1 ) ) { return num ; } else { <START_BUG> return ( ( int ) ( m_oneBuf [ 0 ] ) ) ; <END_BUG> } } public int read ( final byte [ ] buffer ) throws IOException { } public int read ( final byte [ ] buffer , final int offset , final int count ) throws IOException { } public void reset ( ) { } public void skip ( final int numToSkip ) throws IOException { } protected void debug ( final String message ) { } }

Fix:
return ( ( int ) ( m_oneBuf [ 0 ] ) ) & 255 ;
Buggy code:
public class CacheWrapper { private Composite proxy ; private SizeCache cache = new SizeCache ( ) ; private Rectangle lastBounds = new Rectangle ( 0 , 0 , 0 , 0 ) ; private class WrapperLayout extends Layout implements ICachingLayout { protected Point computeSize ( Composite composite , int wHint , int hHint , boolean flushCache ) { } protected void layout ( Composite composite , boolean flushCache ) { } public void flush ( Control dirtyControl ) { <START_BUG> flushCache ( ) ; <END_BUG> } } public CacheWrapper ( Composite parent ) { } public void flushCache ( ) { } public Composite getControl ( ) { } public void dispose ( ) { } }

Fix:
CacheWrapper . this . flushCache ( ) ;
Buggy code:
public class MDMOperations implements org . wso2 . carbon . appmgt . mobile . mdm . MDMOperations { private static final Log log = LogFactory . getLog ( MDMOperations . class ) ; @ Override public void performAction ( User currentUser , String action , App app , int tenantId , String type , String [ ] params , HashMap < String , String > configProperties ) { } @ Override public JSONArray getDevices ( User currentUser , int tenantId , String type , String [ ] params , String platform , String platformVersion , boolean isSampleDevicesEnabled , HashMap < String , String > configProperties ) { } private String getAPIToken ( String tokenApiURL , String clientKey , String clientSecret , boolean generateNewKey ) { } private boolean executeMethod ( String tokenApiURL , String clientKey , String clientSecret , HttpClient httpClient , HttpMethodBase httpMethod ) { String authKey = getAPIToken ( tokenApiURL , clientKey , clientSecret , false ) ; try { int statusCode = UNAUTHORIZED . getStatusCode ( ) ; int tries = 0 ; while ( statusCode != ( OK . getStatusCode ( ) ) ) { <START_BUG> httpMethod . setRequestHeader ( "Authorization" , ( "TOKEN<seq2seq4repair_space>:" + authKey ) ) ; <END_BUG> statusCode = httpClient . executeMethod ( httpMethod ) ; if ( statusCode == ( UNAUTHORIZED . getStatusCode ( ) ) ) { if ( ( ++ tries ) > 3 ) { MDMOperations . log . error ( "API<seq2seq4repair_space>Call<seq2seq4repair_space>failed<seq2seq4repair_space>for<seq2seq4repair_space>the<seq2seq4repair_space>3rd<seq2seq4repair_space>time:<seq2seq4repair_space>Unauthorized<seq2seq4repair_space>Access<seq2seq4repair_space>Aborting..." ) ; return false ; } authKey = getAPIToken ( tokenApiURL , clientKey , clientSecret , true ) ; } } return true ; } catch ( IOException e ) { MDMOperations . log . error ( "No<seq2seq4repair_space>OK<seq2seq4repair_space>response<seq2seq4repair_space>received<seq2seq4repair_space>form<seq2seq4repair_space>the<seq2seq4repair_space>API" ) ; MDMOperations . log . debug ( ( "Error:" + e ) ) ; return false ; } } }

Fix:
httpMethod . setRequestHeader ( "Authorization" , ( "Bearer<seq2seq4repair_space>" + authKey ) ) ;
Buggy code:
public class PacketFluidUpdate extends PacketCoordinates { public static int FLUID_ID_BIT = 0 ; public static int FLUID_AMOUNT_BIT = 1 ; public static int FLUID_DATA_NUM = 2 ; public FluidStack [ ] renderCache = new FluidStack [ ForgeDirection . values ( ) . length ] ; public int [ ] colorRenderCache = new int [ ForgeDirection . values ( ) . length ] ; public BitSet delta ; public PacketFluidUpdate ( int xCoord , int yCoord , int zCoord ) { } public PacketFluidUpdate ( int xCoord , int yCoord , int zCoord , boolean chunkPacket ) { } public PacketFluidUpdate ( ) { } @ Override public void readData ( ByteBuf data ) { } @ Override public void writeData ( ByteBuf data ) { super . writeData ( data ) ; <START_BUG> byte [ ] dBytes = BitSetUtils . toByteArray ( delta ) ; <END_BUG> data . writeBytes ( dBytes ) ; for ( ForgeDirection dir : ForgeDirection . values ( ) ) { FluidStack liquid = renderCache [ dir . ordinal ( ) ] ; if ( delta . get ( ( ( ( dir . ordinal ( ) ) * ( PacketFluidUpdate . FLUID_DATA_NUM ) ) + ( PacketFluidUpdate . FLUID_ID_BIT ) ) ) ) { if ( liquid != null ) { data . writeShort ( liquid . fluidID ) ; data . writeInt ( colorRenderCache [ dir . ordinal ( ) ] ) ; } else { data . writeShort ( 0 ) ; data . writeInt ( 16777215 ) ; } } if ( delta . get ( ( ( ( dir . ordinal ( ) ) * ( PacketFluidUpdate . FLUID_DATA_NUM ) ) + ( PacketFluidUpdate . FLUID_AMOUNT_BIT ) ) ) ) { if ( liquid != null ) { data . writeInt ( liquid . amount ) ; } else { data . writeInt ( 0 ) ; } } } } @ Override public int getID ( ) { } }

Fix:
byte [ ] dBytes = BitSetUtils . toByteArray ( delta , 2 ) ;
Buggy code:
public class DateField { private DateField ( ) { } private static int DATE_LEN = Long . toString ( ( ( ( ( ( 1000L * 365 ) * 24 ) * 60 ) * 60 ) * 1000 ) , Character . MAX_RADIX ) . length ( ) ; public static String MIN_DATE_STRING ( ) { } public static String MAX_DATE_STRING ( ) { } public static String dateToString ( Date date ) { } public static String timeToString ( long time ) { if ( time < 0 ) throw new RuntimeException ( "time<seq2seq4repair_space>too<seq2seq4repair_space>early" ) ; String s = Long . toString ( time , Character . MAX_RADIX ) ; if ( ( s . length ( ) ) > ( DateField . DATE_LEN ) ) throw new RuntimeException ( "time<seq2seq4repair_space>too<seq2seq4repair_space>late" ) ; if ( ( s . length ( ) ) < ( DateField . DATE_LEN ) ) { StringBuffer sb = new StringBuffer ( s ) ; while ( ( sb . length ( ) ) < ( DateField . DATE_LEN ) ) <START_BUG> sb . insert ( 0 , '<seq2seq4repair_space>' ) ; <END_BUG> s = sb . toString ( ) ; } return s ; } public static long stringToTime ( String s ) { } public static Date stringToDate ( String s ) { } }

Fix:
sb . insert ( 0 , 0 ) ;
Buggy code:
public class SynchronizedStatement extends Statement { public Expression expression ; public Block block ; public BlockScope scope ; boolean blockExit ; public LocalVariableBinding synchroVariable ; static final char [ ] SecretLocalDeclarationName = "<seq2seq4repair_space>syncValue" . toCharArray ( ) ; public SynchronizedStatement ( Expression expression , Block statement , int s , int e ) { } public FlowInfo analyseCode ( BlockScope currentScope , FlowContext flowContext , FlowInfo flowInfo ) { <START_BUG> synchroVariable . used = true ; <END_BUG> flowInfo = block . analyseCode ( scope , new InsideSubRoutineFlowContext ( flowContext , this ) , expression . analyseCode ( scope , flowContext , flowInfo ) ) ; if ( ( flowInfo == ( DeadEnd ) ) || ( flowInfo . isFakeReachable ( ) ) ) { blockExit = true ; } return flowInfo ; } public void generateCode ( BlockScope currentScope , CodeStream codeStream ) { } public void resolve ( BlockScope upperScope ) { } public String toString ( int tab ) { } public void traverse ( IAbstractSyntaxTreeVisitor visitor , BlockScope blockScope ) { } }

Fix:
synchroVariable . useFlag = LocalVariableBinding . USED ;
Buggy code:
@ Service public class ProductServiceImpl implements ProductService { private static final Logger logger = LoggerFactory . getLogger ( ProductServiceImpl . class ) ; @ Autowired ImageService imageService ; @ Autowired private ProductRepository productRepository ; @ Autowired private ReferenceService referenceServive ; @ Autowired private SupplierService supplierService ; @ Override public Product buildProductFromReference ( Reference reference ) { } @ Override public Page < Product > findAll ( Pageable pageable ) { } @ Override public Product findByEan13AndSupplier ( String ean13 , Supplier supplier ) { } @ Override public Product findOne ( int id ) { } private void calculateImageEncryptedKey ( Product product ) { } @ PostConstruct protected void init ( ) throws InterruptedException { <START_BUG> Thread . sleep ( 2000 ) ; <END_BUG> this . generateProductsFromImportedReferences ( ) ; } @ Override public Product generateProductIfNotFound ( String ean13 , String supplierEan13 ) { } private void generateProductsFromImportedReferences ( ) { } @ Override public Product save ( Product product ) { } @ Override public Page < Product > search ( String query , Pageable pageable ) { } No newline ; at end ; of file ; }

Fix:
Thread . sleep ( 5000 ) ;
Buggy code:
class FieldDescriptor extends AbstractDescriptor { private final Field field ; private final int nestingLevel ; private Map < Integer , Integer > typeIndexesPerLevel ; public FieldDescriptor ( Field field ) { } private FieldDescriptor ( Class < ? > type , Field field , int nestingLevel , int typeIndex , Map < Integer , Integer > typeIndexesPerLevel ) { } @ Override public Annotation [ ] getAnnotations ( ) { <START_BUG> return TypeDescriptor . nullSafeAnnotations ( field . getAnnotations ( ) ) ; <END_BUG> } @ Override protected Class < ? > resolveCollectionElementType ( ) { } @ Override protected Class < ? > resolveMapKeyType ( ) { } @ Override protected Class < ? > resolveMapValueType ( ) { } @ Override protected AbstractDescriptor nested ( Class < ? > type , int typeIndex ) { } }

Fix:
return TypeDescriptor . nullSafeAnnotations ( this . field . getAnnotations ( ) ) ;
Buggy code:
public interface HyperlinkService { public long save ( Hyperlink hyperlink ) throws DataAccessException { } public void update ( Hyperlink hyperlink ) throws DataAccessException { } public boolean deleteById ( long id ) throws DataAccessException { } public void addMetaTag ( MetaTag tag ) throws DataAccessException { } public MetaTag getMetaTagById ( long id ) throws DataAccessException { } public boolean deleteMetaTag ( long id ) throws DataAccessException { } public void addComment ( Comment comment ) throws DataAccessException { } public Comment getCommentById ( long id ) throws DataAccessException { } public boolean editComment ( Comment comment ) throws DataAccessException { } public boolean deleteComment ( long id ) throws DataAccessException { } public Hyperlink getById ( long id ) throws DataAccessException { } <START_BUG> public List < Hyperlink > getAllWithTag ( MetaTag tag , String order ) throws DataAccessException ; <END_BUG> public List < Hyperlink > getAllWithLink ( String link , String order ) throws DataAccessException { } public List < Hyperlink > getAll ( String order ) throws DataAccessException { } No newline ; at end ; of file ; }

Fix:
public List < Hyperlink > getAllWithTag ( String tag , String order ) throws DataAccessException ;
Buggy code:
public class CloudFoundryConnector implements PaaSConnector { private CloudFoundryClient connectedClient ; private static final int DEFAULT_MEMORY = 512 ; private static final Logger journal = Logger . getLogger ( CloudFoundryConnector . class . getName ( ) ) ; private String defaultDomainName ; public CloudFoundryConnector ( String APIEndPoint , String login , String passwd , String organization , String space ) { } public void logOut ( ) { } public CloudFoundryClient getConnectedClient ( ) { } private String computeAppUrl ( String appName , String domainName ) { <START_BUG> return ( appName + "." ) + ( domainName . equals ( "" ) ? defaultDomainName : domainName ) ; <END_BUG> } @ Override public void createEnvironmentWithWar ( String applicationName , String domainName , String envName , String stackName , String warFile , String versionLabel ) { } public void bindService ( String appName , String serviceName ) { } private Boolean checkIfServiceExist ( String serviceName ) { } private Boolean checkIfApplicationExist ( String appName ) { } private Boolean checkIfPlanExist ( String planName , String serviceLabel ) { } private String findFreePlan ( String serviceLabel ) { } public void updateApplicationDisk ( String appName , int size ) { } public void updateApplicationMemory ( String appName , int size ) { } public CloudServiceOffering findCloudServiceOffering ( String label ) { } @ Override public void createDBInstance ( String engine , String version , String dbInstanceIdentifier , String dbName , String username , String password , Integer allocatedSize , String dbInstanceClass , String securityGroup ) { } @ Override public String getDBEndPoint ( String dbInstanceId , int timeout ) { } @ Override public void uploadWar ( String warFile , String versionLabel , String applicationName , String envName , int timeout ) { } @ Override public String createQueue ( String name ) { } @ Override public void deleteQueue ( String name ) { } @ Override public List < String > listQueues ( ) { } @ Override public void restoreDB ( String host , String port , String dbUser , String dbPass , String dbName , String local_file ) { } @ Override public void configAppParameters ( String applicationName , Map < String , String > params ) { } }

Fix:
return ( appName + "." ) + ( ( domainName . equals ( "" ) ) || ( domainName . equals ( appName ) ) ? defaultDomainName : domainName ) ;
Buggy code:
public class Jar extends Zip { private File manifestFile ; private Manifest manifest ; private Manifest execManifest ; private boolean buildFileManifest = false ; public Jar ( ) { } public void setJarfile ( File jarFile ) { log ( "DEPRECATED<seq2seq4repair_space>-<seq2seq4repair_space>The<seq2seq4repair_space>jarfile<seq2seq4repair_space>attribute<seq2seq4repair_space>is<seq2seq4repair_space>deprecated.<seq2seq4repair_space>Use<seq2seq4repair_space>file<seq2seq4repair_space>attribute<seq2seq4repair_space>instead." ) ; <START_BUG> super . setFile ( jarFile ) ; <END_BUG> } public void addConfiguredManifest ( Manifest newManifest ) throws ManifestException { } public void setManifest ( File manifestFile ) { } public void addMetainf ( ZipFileSet fs ) { } protected void initZipOutputStream ( ZipOutputStream zOut ) throws IOException , BuildException { } private Manifest getDefaultManifest ( ) { } protected void finalizeZipOutputStream ( ZipOutputStream zOut ) throws IOException , BuildException { } private void zipManifestEntry ( InputStream is ) throws IOException { } protected void zipFile ( File file , ZipOutputStream zOut , String vPath ) throws IOException { } protected void zipFile ( InputStream is , ZipOutputStream zOut , String vPath , long lastModified ) throws IOException { } protected boolean isUpToDate ( FileScanner [ ] scanners , File zipFile ) throws BuildException { } protected boolean createEmptyZip ( File zipFile ) { } protected void cleanUp ( ) { } }

Fix:
setFile ( jarFile ) ;
Buggy code:
public class QRSolver implements DecompositionSolver { private static final long serialVersionUID = - 579465076068393818L ; private final QRDecomposition decomposition ; public QRSolver ( final QRDecomposition decomposition ) { } public double [ ] solve ( final double [ ] b ) throws IllegalArgumentException , InvalidMatrixException { } public RealVector solve ( final RealVector b ) throws IllegalArgumentException , InvalidMatrixException { } public RealMatrix solve ( final RealMatrix b ) throws IllegalArgumentException , InvalidMatrixException { if ( ( decomposition . getR ( ) . getRowDimension ( ) ) != ( b . getRowDimension ( ) ) ) { throw new IllegalArgumentException ( "Incorrect<seq2seq4repair_space>row<seq2seq4repair_space>dimension" ) ; } if ( ! ( isNonSingular ( ) ) ) { throw new SingularMatrixException ( ) ; } final RealMatrix y = decomposition . getQT ( ) . multiply ( b ) ; final RealMatrix r = decomposition . getR ( ) ; final double [ ] [ ] xData = new double [ r . getColumnDimension ( ) ] [ b . getColumnDimension ( ) ] ; for ( int i = 0 ; i < ( r . getRowDimension ( ) ) ; ++ i ) { final double [ ] xi = xData [ i ] ; for ( int k = 0 ; k < ( xi . length ) ; ++ k ) { xi [ k ] = y . getEntry ( i , k ) ; } } for ( int i = ( r . getRowDimension ( ) ) - 1 ; i >= 0 ; -- i ) { final double rii = r . getEntry ( i , i ) ; final double [ ] xi = xData [ i ] ; for ( int k = 0 ; k < ( xi . length ) ; ++ k ) { xi [ k ] //= rii ; final double lastX = xi [ k ] ; for ( int j = i - 1 ; j >= 0 ; -- j ) { xData [ j ] [ k ] -= lastX * ( r . getEntry ( j , i ) ) ; } } } <START_BUG> return new RealMatrixImpl ( xData , false ) ; <END_BUG> } public boolean isNonSingular ( ) { } public RealMatrix getInverse ( ) throws InvalidMatrixException { } }

Fix:
return MatrixUtils . createRealMatrix ( xData ) ;
Buggy code:
public class HelloApplication implements IApplication { boolean done = false ; Object appLock = new Object ( ) ; public Object start ( IApplicationContext context ) throws Exception { } public void stop ( ) { synchronized ( appLock ) { done = true ; <START_BUG> notifyAll ( ) ; <END_BUG> } } }

Fix:
appLock . notifyAll ( ) ;
Buggy code:
public class Ausprobieren { public static void main ( String [ ] args ) throws IOException , ParserConfigurationException , SAXException { Retrieval jRetrieval = new Retrieval ( ) ; <START_BUG> String scenarioXML = jRetrieval . getHTMLwithAuth ( "http:////localhost:1205//" , "http:////localhost:1205//models//494340875.pm" ) ; <END_BUG> InputSource is = new InputSource ( ) ; is . setCharacterStream ( new StringReader ( scenarioXML ) ) ; DocumentBuilder db = DocumentBuilderFactory . newInstance ( ) . newDocumentBuilder ( ) ; Document doc = db . parse ( is ) ; Scenario scen = new Scenario ( ) ; scen . initializeInstanceFromXML ( doc . getDocumentElement ( ) ) ; scen . save ( ) ; } }

Fix:
String scenarioXML = jRetrieval . getHTMLwithAuth ( "http:////localhost:1205//" , "http:////localhost:1205//models//2003613382.pm" ) ;
Buggy code:
class PojoSubsystemAdd extends AbstractBoottimeAddStepHandler { static final PojoSubsystemAdd INSTANCE = new PojoSubsystemAdd ( ) ; protected void populateModel ( ModelNode operation , ModelNode model ) { } protected void performBoottime ( OperationContext context , ModelNode operation , ModelNode model , ServiceVerificationHandler verificationHandler , List < ServiceController < ? > > newControllers ) { context . addStep ( new AbstractDeploymentChainStep ( ) { public void execute ( DeploymentProcessorTarget processorTarget ) { processorTarget . addDeploymentProcessor ( PARSE , PARSE_POJO_DEPLOYMENT , new KernelDeploymentParsingProcessor ( ) ) ; <START_BUG> processorTarget . addDeploymentProcessor ( POST_MODULE , POST_MODULE_POJO , new KernelDeploymentModuleProcessor ( ) ) ; <END_BUG> processorTarget . addDeploymentProcessor ( INSTALL , INSTALL_POJO_DEPLOYMENT , new ParsedKernelDeploymentProcessor ( ) ) ; } } , RUNTIME ) ; } protected boolean requiresRuntimeVerification ( ) { } }

Fix:
processorTarget . addDeploymentProcessor ( DEPENDENCIES , POST_MODULE_POJO , new KernelDeploymentModuleProcessor ( ) ) ;
Buggy code:
@ SuppressWarnings ( "restriction" ) final class ProjectAnalyzer extends Job { private final IJavaProject project ; private ResourceSet rs ; private Map < IStorage , Resource > mapping ; private Map < String , EPackage > packages ; public ProjectAnalyzer ( final IJavaProject project ) { } @ Override protected IStatus run ( final IProgressMonitor monitor ) { if ( EmfToolsPlugin . trace ) { System . out . println ( ( ( Messages . ProjectAnalyzer_1 ) + ( project . getProject ( ) . getProject ( ) . getName ( ) ) ) ) ; } rs = ConverterUtil . createResourceSet ( ) ; mapping = new HashMap < IStorage , Resource > ( ) ; packages = new HashMap < String , EPackage > ( ) ; loadMetamodelsForProject ( project , rs , monitor ) ; packages . put ( eNS_URI , eINSTANCE ) ; EPackage . Registry registry = new org . eclipse . emf . ecore . impl . EPackageRegistryImpl ( rs . getPackageRegistry ( ) ) ; registry . putAll ( packages ) ; rs . setPackageRegistry ( registry ) ; if ( ( Activator . getExtXptModelManager ( ) . findProject ( project . getProject ( ) ) ) != null ) { <START_BUG> new BuildJob ( project . getProject ( ) ) . schedule ( ) ; <END_BUG> } return Status . OK_STATUS ; } private void loadMetamodelsForProject ( final IJavaProject javaProject , final ResourceSet rs , final IProgressMonitor monitor ) { } private void loadModelFromStorage ( final ResourceSet rs , final IStorage storage ) { } private void registerEPackages ( final ResourceSet rs , final Resource r , boolean overwrite ) { } private void registerPackage ( final EPackage pack , ResourceSet rs , boolean overwrite ) { } public Map < String , EPackage > getNamedEPackageMap ( ) { } }

Fix:
new BuildJob ( project . getProject ( ) , null ) . schedule ( ) ;
Buggy code:
public class MapsActivity extends AppCompatActivity implements GoogleApiClient . ConnectionCallbacks , GoogleApiClient . OnConnectionFailedListener , LocationListener , GoogleMap . OnInfoWindowClickListener , GoogleMap . OnMarkerClickListener , GoogleMap . OnMyLocationButtonClickListener , OnMapReadyCallback { private static final String TAG = "MapsActivity" ; private static final int PERMISSION_RQ_CODE = 1 ; private static final String SCREEN_NAME = "map_activity" ; private static final int ZOOM_IN_BY_ON_CLUSTER_CLICK = 1 ; private GoogleMap mMap ; private ClusterManager < Station > mClusterManager ; private Tracker mTracker ; private SupportMapFragment mapFragment ; private Endpoints api ; private FavoritesModel favoritesModel ; private GoogleApiClient mGoogleApiClient ; private StationClusterRenderer clusterRenderer ; private FavoritesModel model ; private Location mLastLocation ; @ Override protected void onCreate ( Bundle savedInstanceState ) { } @ Override public void onMapReady ( GoogleMap map ) { } @ Override public boolean onCreateOptionsMenu ( Menu menu ) { } @ Override public boolean onOptionsItemSelected ( MenuItem item ) { } @ Override protected void onResume ( ) { } private void fetchData ( ) { } @ Override public void onInfoWindowClick ( Marker m ) { } public boolean isMarkerFavorite ( Marker marker ) { } @ Override public boolean onMarkerClick ( Marker marker ) { } public boolean isMarkerCluster ( Marker m ) { } @ Override public boolean onMyLocationButtonClick ( ) { } @ Override public void onLocationChanged ( Location location ) { } @ Override public void onConnectionSuspended ( int i ) { } @ Override public void onConnected ( Bundle bundle ) { } @ Override public void onConnectionFailed ( ConnectionResult connectionResult ) { } @ Override public void onRequestPermissionsResult ( int requestCode , String [ ] permissions , int [ ] grantResults ) { } @ Override protected void onPause ( ) { super . onPause ( ) ; <START_BUG> if ( ( mGoogleApiClient ) != null ) { <END_BUG> FusedLocationApi . removeLocationUpdates ( mGoogleApiClient , this ) ; } } }

Fix:
if ( ( ( mGoogleApiClient ) != null ) && ( mGoogleApiClient . isConnected ( ) ) ) {
Buggy code:
public class TestMockAnalyzer extends BaseTokenStreamTestCase { public void testWhitespace ( ) throws Exception { } public void testSimple ( ) throws Exception { } public void testKeyword ( ) throws Exception { } public void testStop ( ) throws Exception { } public void testKeep ( ) throws Exception { } public void testLength ( ) throws Exception { } public void testLUCENE_3042 ( ) throws Exception { String testString = "t" ; Analyzer analyzer = new MockAnalyzer ( random ( ) ) ; <START_BUG> TokenStream stream = analyzer . tokenStream ( "dummy" , new StringReader ( testString ) ) ; <END_BUG> stream . reset ( ) ; while ( stream . incrementToken ( ) ) { } stream . end ( ) ; stream . close ( ) ; assertAnalyzesToReuse ( analyzer , testString , new String [ ] { "t" } ) ; } public void testRandomStrings ( ) throws Exception { } public void testForwardOffsets ( ) throws Exception { } }

Fix:
TokenStream stream = analyzer . tokenStream ( "dummy" , testString ) ;
Buggy code:
public class Snippet139 { static ImageData rotate ( ImageData srcData , int direction ) { int bytesPerPixel = ( srcData . bytesPerLine ) // ( srcData . width ) ; int destBytesPerLine = ( direction == ( SWT . DOWN ) ) ? ( srcData . width ) * bytesPerPixel : ( srcData . height ) * bytesPerPixel ; <START_BUG> byte [ ] newData = new byte [ srcData . data . length ] ; <END_BUG> int width = 0 ; int height = 0 ; for ( int srcY = 0 ; srcY < ( srcData . height ) ; srcY ++ ) { for ( int srcX = 0 ; srcX < ( srcData . width ) ; srcX ++ ) { int destX = 0 ; int destY = 0 ; int destIndex = 0 ; int srcIndex = 0 ; switch ( direction ) { case SWT . LEFT : destX = srcY ; destY = ( ( srcData . width ) - srcX ) - 1 ; width = srcData . height ; height = srcData . width ; break ; case SWT . RIGHT : destX = ( ( srcData . height ) - srcY ) - 1 ; destY = srcX ; width = srcData . height ; height = srcData . width ; break ; case SWT . DOWN : destX = ( ( srcData . width ) - srcX ) - 1 ; destY = ( ( srcData . height ) - srcY ) - 1 ; width = srcData . width ; height = srcData . height ; break ; } destIndex = ( destY * destBytesPerLine ) + ( destX * bytesPerPixel ) ; srcIndex = ( srcY * ( srcData . bytesPerLine ) ) + ( srcX * bytesPerPixel ) ; System . arraycopy ( srcData . data , srcIndex , newData , destIndex , bytesPerPixel ) ; } } return new ImageData ( width , height , srcData . depth , srcData . palette , destBytesPerLine , newData ) ; } static ImageData flip ( ImageData srcData , boolean vertical ) { } public static void main ( String [ ] args ) { } }

Fix:
byte [ ] newData = new byte [ direction == ( SWT . DOWN ) ? ( srcData . height ) * destBytesPerLine : ( srcData . width ) * destBytesPerLine ] ;
Buggy code:
public class OrdFieldSource extends ValueSource { protected String field ; public OrdFieldSource ( String field ) { } @ Override public String description ( ) { } @ Override public DocValues getValues ( Map context , AtomicReaderContext readerContext ) throws IOException { } @ Override public boolean equals ( Object o ) { <START_BUG> return ( ( o . getClass ( ) ) == ( OrdFieldSource . class ) ) && ( this . field . equals ( ( ( OrdFieldSource ) ( o ) ) . field ) ) ; <END_BUG> } private static final int hcode = OrdFieldSource . class . hashCode ( ) ; @ Override public int hashCode ( ) { } }

Fix:
return ( ( o != null ) && ( ( o . getClass ( ) ) == ( OrdFieldSource . class ) ) ) && ( this . field . equals ( ( ( OrdFieldSource ) ( o ) ) . field ) ) ;
Buggy code:
public class XMLLayout extends Layout { private final int DEFAULT_SIZE = 256 ; private final int UPPER_LIMIT = 2048 ; private StringBuffer buf = new StringBuffer ( DEFAULT_SIZE ) ; private boolean locationInfo = false ; public static final String LOCATION_INFO_OPTION = "LocationInfo" ; public void activateOptions ( ) { } public String format ( LoggingEvent event ) { if ( ( buf . capacity ( ) ) > ( UPPER_LIMIT ) ) { buf = new StringBuffer ( DEFAULT_SIZE ) ; } else { buf . setLength ( 0 ) ; } buf . append ( "<log4j:event<seq2seq4repair_space>category=\"" ) ; buf . append ( event . categoryName ) ; buf . append ( "\"<seq2seq4repair_space>timestamp=\"" ) ; buf . append ( event . timeStamp ) ; buf . append ( "\"<seq2seq4repair_space>priority=\"" ) ; buf . append ( event . priority ) ; buf . append ( "\"<seq2seq4repair_space>thread=\"" ) ; buf . append ( event . getThreadName ( ) ) ; buf . append ( "\">\r\n" ) ; buf . append ( "<log4j:message>" ) ; <START_BUG> buf . append ( event . message ) ; <END_BUG> buf . append ( "<//log4j:message>\r\n" ) ; String ndc = event . getNDC ( ) ; if ( ndc != null ) { buf . append ( "<log4j:NDC>" ) ; buf . append ( ndc ) ; buf . append ( "<//log4j:NDC>\r\n" ) ; } String t = event . getThrowableInformation ( ) ; if ( t != null ) { buf . append ( "<log4j:throwable>" ) ; buf . append ( t ) ; buf . append ( "<//log4j:throwable>\r\n" ) ; } if ( locationInfo ) { LocationInfo locationInfo = event . getLocationInformation ( ) ; buf . append ( "<log4j:locationInfo<seq2seq4repair_space>class=\"" ) ; buf . append ( locationInfo . getClassName ( ) ) ; buf . append ( "\"<seq2seq4repair_space>method=\"" ) ; buf . append ( locationInfo . getMethodName ( ) ) ; buf . append ( "\"<seq2seq4repair_space>file=\"" ) ; buf . append ( locationInfo . getFileName ( ) ) ; buf . append ( "\"<seq2seq4repair_space>line=\"" ) ; buf . append ( locationInfo . getLineNumber ( ) ) ; buf . append ( "\"//>\r\n" ) ; } buf . append ( "<//log4j:event>\r\n\r\n" ) ; return buf . toString ( ) ; } public String [ ] getOptionStrings ( ) { } public boolean ignoresThrowable ( ) { } public void setOption ( String key , String value ) { } }

Fix:
buf . append ( event . getRenderedMessage ( ) ) ;
Buggy code:
public class BitFieldTest { private static final BitField bf_multi = new BitField ( 16256 ) ; private static final BitField bf_single = new BitField ( 16384 ) ; private static final BitField bf_zero = new BitField ( 0 ) ; @ Test public void testGetValue ( ) { } @ Test public void testGetShortValue ( ) { } @ Test public void testGetRawValue ( ) { } @ Test public void testGetShortRawValue ( ) { } @ Test public void testIsSet ( ) { } @ Test public void testIsAllSet ( ) { } @ Test public void testSetValue ( ) { } @ Test public void testSetShortValue ( ) { } @ Test public void testByte ( ) { assertEquals ( 0 , new BitField ( 0 ) . setByteBoolean ( ( ( byte ) ( 0 ) ) , true ) ) ; assertEquals ( 1 , new BitField ( 1 ) . setByteBoolean ( ( ( byte ) ( 0 ) ) , true ) ) ; assertEquals ( 2 , new BitField ( 2 ) . setByteBoolean ( ( ( byte ) ( 0 ) ) , true ) ) ; assertEquals ( 4 , new BitField ( 4 ) . setByteBoolean ( ( ( byte ) ( 0 ) ) , true ) ) ; assertEquals ( 8 , new BitField ( 8 ) . setByteBoolean ( ( ( byte ) ( 0 ) ) , true ) ) ; assertEquals ( 16 , new BitField ( 16 ) . setByteBoolean ( ( ( byte ) ( 0 ) ) , true ) ) ; assertEquals ( 32 , new BitField ( 32 ) . setByteBoolean ( ( ( byte ) ( 0 ) ) , true ) ) ; assertEquals ( 64 , new BitField ( 64 ) . setByteBoolean ( ( ( byte ) ( 0 ) ) , true ) ) ; assertEquals ( ( - 128 ) , new BitField ( 128 ) . setByteBoolean ( ( ( byte ) ( 0 ) ) , true ) ) ; assertEquals ( 1 , new BitField ( 0 ) . setByteBoolean ( ( ( byte ) ( 1 ) ) , false ) ) ; assertEquals ( 0 , new BitField ( 1 ) . setByteBoolean ( ( ( byte ) ( 1 ) ) , false ) ) ; assertEquals ( 0 , new BitField ( 2 ) . setByteBoolean ( ( ( byte ) ( 2 ) ) , false ) ) ; assertEquals ( 0 , new BitField ( 4 ) . setByteBoolean ( ( ( byte ) ( 4 ) ) , false ) ) ; assertEquals ( 0 , new BitField ( 8 ) . setByteBoolean ( ( ( byte ) ( 8 ) ) , false ) ) ; assertEquals ( 0 , new BitField ( 16 ) . setByteBoolean ( ( ( byte ) ( 16 ) ) , false ) ) ; assertEquals ( 0 , new BitField ( 32 ) . setByteBoolean ( ( ( byte ) ( 32 ) ) , false ) ) ; assertEquals ( 0 , new BitField ( 64 ) . setByteBoolean ( ( ( byte ) ( 64 ) ) , false ) ) ; assertEquals ( 0 , new BitField ( 128 ) . setByteBoolean ( ( ( byte ) ( 128 ) ) , false ) ) ; assertEquals ( ( - 2 ) , new BitField ( 1 ) . setByteBoolean ( ( ( byte ) ( 255 ) ) , false ) ) ; <START_BUG> byte clearedBit = new BitField ( 64 ) . setByteBoolean ( ( ( byte ) ( - 63 ) ) , false ) ; <END_BUG> assertFalse ( new BitField ( 64 ) . isSet ( clearedBit ) ) ; } @ Test public void testClear ( ) { } @ Test public void testClearShort ( ) { } @ Test public void testSet ( ) { } @ Test public void testSetShort ( ) { } @ Test public void testSetBoolean ( ) { } @ Test public void testSetShortBoolean ( ) { } }

Fix:
final byte clearedBit = new BitField ( 64 ) . setByteBoolean ( ( ( byte ) ( - 63 ) ) , false ) ;
Buggy code:
public interface IApplet { <START_BUG> void init ( Container container , IAppletServer server , Object model ) ; <END_BUG> Object getModel ( ) { } }

Fix:
void init ( IAppletServer server , Container container , Object model ) ;
Buggy code:
@ Path ( "ical" ) public interface ICalApi { @ GET @ Path ( "//all" ) @ Consumes ( MediaType . APPLICATION_FORM_URLENCODED ) @ Produces ( MediaType . APPLICATION_JSON ) List < ICal > findAll ( ) { } @ GET @ Consumes ( MediaType . APPLICATION_FORM_URLENCODED ) @ Produces ( MediaType . APPLICATION_JSON ) List < ICal > find ( @ QueryParam ( "offset" ) int offset , @ QueryParam ( "limit" ) int limit ) { } @ GET @ Path ( "//{id}" ) @ Consumes ( MediaType . APPLICATION_FORM_URLENCODED ) @ Produces ( MediaType . APPLICATION_JSON ) ICal findById ( @ PathParam ( "id" ) long id ) { } @ GET @ Path ( "//timestamp" ) @ Consumes ( MediaType . APPLICATION_FORM_URLENCODED ) @ Produces ( MediaType . APPLICATION_JSON ) <START_BUG> long lastUpdate ( ) ; <END_BUG> }

Fix:
Long lastUpdate ( ) ;
Buggy code:
public class AntXMLContext { private Project project ; private File buildFile ; private Vector targetVector = new Vector ( ) ; private File buildFileParent ; private String currentProjectName ; private Locator locator ; private Target implicitTarget = new Target ( ) ; private Target currentTarget = null ; private Vector wStack = new Vector ( ) ; private boolean ignoreProjectTag = false ; private Map prefixMapping = new HashMap ( ) ; private Map currentTargets = null ; public AntXMLContext ( Project project ) { } public void setBuildFile ( File buildFile ) { } public File getBuildFile ( ) { } public File getBuildFileParent ( ) { } public Project getProject ( ) { } public String getCurrentProjectName ( ) { } public void setCurrentProjectName ( String name ) { } public RuntimeConfigurable currentWrapper ( ) { } public RuntimeConfigurable parentWrapper ( ) { } public void pushWrapper ( RuntimeConfigurable wrapper ) { } public void popWrapper ( ) { } public Vector getWrapperStack ( ) { } public void addTarget ( Target target ) { } public Target getCurrentTarget ( ) { } public Target getImplicitTarget ( ) { } public void setCurrentTarget ( Target target ) { } public void setImplicitTarget ( Target target ) { } public Vector getTargets ( ) { } public void configureId ( Object element , Attributes attr ) { String id = attr . getValue ( "id" ) ; if ( id != null ) { <START_BUG> project . addReference ( id , element ) ; <END_BUG> } } public Locator getLocator ( ) { } public void setLocator ( Locator locator ) { } public boolean isIgnoringProjectTag ( ) { } public void setIgnoreProjectTag ( boolean flag ) { } public void startPrefixMapping ( String prefix , String uri ) { } public void endPrefixMapping ( String prefix ) { } public String getPrefixMapping ( String prefix ) { } public Map getCurrentTargets ( ) { } public void setCurrentTargets ( Map currentTargets ) { } }

Fix:
project . addIdReference ( id , element ) ;
Buggy code:
public abstract class BaseDnsActivity extends Activity { protected Handler handler = new Handler ( ) ; public void clickHandler ( View v ) { Intent intent = new Intent ( ) ; if ( ( v . getId ( ) ) == ( id . program_button ) ) { intent . setFlags ( ( ( Intent . FLAG_ACTIVITY_REORDER_TO_FRONT ) | ( Intent . FLAG_ACTIVITY_SINGLE_TOP ) ) ) ; <START_BUG> intent . setClass ( this , ProgramListActivity . class ) ; <END_BUG> startActivity ( intent ) ; } else if ( ( v . getId ( ) ) == ( id . bli_med_button ) ) { intent . setFlags ( ( ( Intent . FLAG_ACTIVITY_NO_HISTORY ) | ( Intent . FLAG_ACTIVITY_SINGLE_TOP ) ) ) ; intent . setClass ( this , JoinUsActivity . class ) ; startActivity ( intent ) ; } else if ( ( v . getId ( ) ) == ( id . header ) ) { intent . setFlags ( ( ( Intent . FLAG_ACTIVITY_CLEAR_TOP ) | ( Intent . FLAG_ACTIVITY_SINGLE_TOP ) ) ) ; intent . setClass ( this , DnsActivity . class ) ; startActivity ( intent ) ; } } public void doNothing ( View v ) { } }

Fix:
intent . setClass ( this , EventListActivity . class ) ;
Buggy code:
public interface DeploymentMountProvider { ServiceName SERVICE_NAME = JBOSS . append ( "deployment-mount-provider" ) ; Closeable mountDeploymentContent ( VirtualFile deploymentContents , VirtualFile mountPoint , MountType mountType ) throws IOException { } static class Factory { public static void addService ( final ServiceTarget serviceTarget ) { } private static class ServerDeploymentRepositoryImpl implements DeploymentMountProvider , Service < DeploymentMountProvider > { private volatile TempFileProvider tempFileProvider ; private ServerDeploymentRepositoryImpl ( ) { } @ Override public Closeable mountDeploymentContent ( final VirtualFile contents , VirtualFile mountPoint , MountType type ) throws IOException { } @ Override public void start ( StartContext context ) throws StartException { try { <START_BUG> final JBossThreadFactory threadFactory = new JBossThreadFactory ( new ThreadGroup ( "ServerDeploymentRepository-temp-threads" ) , true , null , "%G<seq2seq4repair_space>-<seq2seq4repair_space>%t" , null , null , AccessController . doPrivileged ( GetAccessControlContextAction . getInstance ( ) ) ) ; <END_BUG> tempFileProvider = TempFileProvider . create ( "temp" , Executors . newScheduledThreadPool ( 2 , threadFactory ) , true ) ; } catch ( IOException e ) { throw MESSAGES . failedCreatingTempProvider ( ) ; } ROOT_LOGGER . debugf ( "%s<seq2seq4repair_space>started" , DeploymentMountProvider . class . getSimpleName ( ) ) ; } @ Override public void stop ( StopContext context ) { } @ Override public DeploymentMountProvider getValue ( ) throws IllegalStateException { } } } }

Fix:
final JBossThreadFactory threadFactory = new JBossThreadFactory ( new ThreadGroup ( "ServerDeploymentRepository-temp-threads" ) , Boolean . FALSE , null , "%G<seq2seq4repair_space>-<seq2seq4repair_space>%t" , null , null , AccessController . doPrivileged ( GetAccessControlContextAction . getInstance ( ) ) ) ;