nus-yam/ex-repair huggingface dataset:
Buggy code:
public class LinkedListVector implements Vector { private LinkedListVector . LinkedList elements ; public LinkedListVector ( ) { } public LinkedListVector ( int length ) { } @ Override public double getElement ( int index ) { } @ Override public void setElement ( int index , double value ) { } @ Override public int getSize ( ) { } @ Override public double getNorm ( ) { try { <START_BUG> return Vectors . scalarMult ( this , this ) ; <END_BUG> } catch ( IncompatibleVectorSizesException e ) { e . printStackTrace ( ) ; } return - 1.0 ; } @ Override public String toString ( ) { } @ Override public boolean equals ( Object obj ) { } @ Override public int hashCode ( ) { } @ Override public Object clone ( ) throws CloneNotSupportedException { } public void add ( double value ) { } public void add ( int index , double value ) { } public double remove ( int index ) { } @ Override public Iterator iterator ( ) { } private class LinkedList implements Serializable { private int size ; private LinkedListVector . LinkedList . Node head ; private LinkedList ( ) { } public void add ( double value ) { } public void add ( int index , double value ) { } public double get ( int index ) { } public double remove ( int index ) { } public void set ( int index , double value ) { } public int size ( ) { } private LinkedListVector . LinkedList . Node getNode ( int index ) { } private class Node implements Serializable { private double value ; private LinkedListVector . LinkedList . Node next ; private LinkedListVector . LinkedList . Node previous ; private Node ( double value ) { } private Node ( double value , LinkedListVector . LinkedList . Node next , LinkedListVector . LinkedList . Node previous ) { } public double getValue ( ) { } public void setValue ( double value ) { } public LinkedListVector . LinkedList . Node getNext ( ) { } public void setNext ( LinkedListVector . LinkedList . Node next ) { } public LinkedListVector . LinkedList . Node getPrevious ( ) { } public void setPrevious ( LinkedListVector . LinkedList . Node previous ) { } } } private class LinkedListVectorIterator implements Iterator { private int index = 0 ; @ Override public boolean hasNext ( ) { } @ Override public Object next ( ) { } @ Override public void remove ( ) { } } public static void main ( String [ ] args ) throws IncompatibleVectorSizesException { } private static String vectorToString ( Vector vector ) { } }

Fix:
return Math . sqrt ( Vectors . scalarMult ( this , this ) ) ;
Buggy code:
public class OperationRequestCompleter implements Completor { private final CommandContext ctx ; public OperationRequestCompleter ( CommandContext ctx ) { } @ SuppressWarnings ( "rawtypes" ) @ Override public int complete ( String buffer , int cursor , List candidates ) { } @ SuppressWarnings ( { "unchecked" , "rawtypes" } ) public int doComplete ( String buffer , List candidates , boolean requireSlashOrDotSlash ) { } private static String formatName ( String name ) { for ( int i = 0 ; i < ( name . length ( ) ) ; ++ i ) { char ch = name . charAt ( i ) ; <START_BUG> if ( ( ch == ':' ) || ( ch == '//' ) ) { <END_BUG> StringBuilder builder = new StringBuilder ( ) ; builder . append ( '"' ) ; for ( int j = 0 ; j < ( name . length ( ) ) ; ++ j ) { ch = name . charAt ( j ) ; if ( ch == '"' ) { builder . append ( '\\' ) ; } builder . append ( ch ) ; } builder . append ( '"' ) ; return builder . toString ( ) ; } } return name ; } }

Fix:
if ( ( ( ch == ':' ) || ( ch == '//' ) ) || ( ch == '=' ) ) {
Buggy code:
public class ReflectionWorld extends World implements IReflectionWorld { private ClassLoader classLoader ; private AnnotationFinder annotationFinder ; private ReflectionWorld ( ) { } public ReflectionWorld ( ClassLoader aClassLoader ) { } public static AnnotationFinder makeAnnotationFinderIfAny ( ClassLoader loader , World world ) { } public ClassLoader getClassLoader ( ) { } public AnnotationFinder getAnnotationFinder ( ) { } public ResolvedType resolve ( Class aClass ) { } public static ResolvedType resolve ( World world , Class aClass ) { String className = aClass . getName ( ) ; if ( aClass . isArray ( ) ) { <START_BUG> return world . resolve ( UnresolvedType . forSignature ( className ) ) ; <END_BUG> } else { return world . resolve ( className ) ; } } protected ReferenceTypeDelegate resolveDelegate ( ReferenceType ty ) { } public Advice createAdviceMunger ( AdviceAttribute attribute , Pointcut pointcut , Member signature ) { } public ConcreteTypeMunger makeCflowStackFieldAdder ( ResolvedMember cflowField ) { } public ConcreteTypeMunger makeCflowCounterFieldAdder ( ResolvedMember cflowField ) { } public ConcreteTypeMunger makePerClauseAspect ( ResolvedType aspect , Kind kind ) { } public ConcreteTypeMunger concreteTypeMunger ( ResolvedTypeMunger munger , ResolvedType aspectType ) { } public static class ReflectionWorldException extends RuntimeException { private static final long serialVersionUID = - 3432261918302793005L ; public ReflectionWorldException ( String message ) { } } private static class ExceptionBasedMessageHandler implements IMessageHandler { public boolean handleMessage ( IMessage message ) throws AbortException { } public boolean isIgnoring ( IMessage . Kind kind ) { } public void dontIgnore ( IMessage . Kind kind ) { } } }

Fix:
return world . resolve ( UnresolvedType . forSignature ( className . replace ( '.' , '//' ) ) ) ;
Buggy code:
public class DeleteResourceElementsOperation extends MultiOperation { protected DeleteResourceElementsOperation ( IJavaElement [ ] elementsToProcess , boolean force ) { } private void deletePackageFragment ( IPackageFragment frag ) throws JavaModelException { IResource res = frag . getResource ( ) ; if ( ( res != null ) && ( ( res . getType ( ) ) == ( IResource . FOLDER ) ) ) { IJavaElement [ ] childrenOfInterest = frag . getChildren ( ) ; if ( ( childrenOfInterest . length ) > 0 ) { IResource [ ] resources = new IResource [ childrenOfInterest . length ] ; for ( int i = 0 ; i < ( childrenOfInterest . length ) ; i ++ ) { <START_BUG> resources [ i ] = childrenOfInterest [ i ] . getResource ( ) ; <END_BUG> } deleteResources ( resources , fForce ) ; } Object [ ] nonJavaResources = frag . getNonJavaResources ( ) ; int actualResourceCount = 0 ; for ( int i = 0 , max = nonJavaResources . length ; i < max ; i ++ ) { if ( ( nonJavaResources [ i ] ) instanceof IResource ) actualResourceCount ++ ; } IResource [ ] actualNonJavaResources = new IResource [ actualResourceCount ] ; for ( int i = 0 , max = nonJavaResources . length , index = 0 ; i < max ; i ++ ) { if ( ( nonJavaResources [ i ] ) instanceof IResource ) actualNonJavaResources [ ( index ++ ) ] = ( ( IResource ) ( nonJavaResources [ i ] ) ) ; } deleteResources ( actualNonJavaResources , fForce ) ; IResource [ ] remainingFiles ; try { remainingFiles = ( ( IFolder ) ( res ) ) . members ( ) ; } catch ( CoreException ce ) { throw new JavaModelException ( ce ) ; } boolean isEmpty = true ; for ( int i = 0 , length = remainingFiles . length ; i < length ; i ++ ) { IResource file = remainingFiles [ i ] ; if ( file instanceof IFile ) { this . deleteResource ( file , ( ( IResource . FORCE ) | ( IResource . KEEP_HISTORY ) ) ) ; } else { isEmpty = false ; } } if ( isEmpty ) { deleteEmptyPackageFragment ( frag , false , frag . getParent ( ) . getResource ( ) ) ; } } } protected String getMainTaskName ( ) { } protected void processElement ( IJavaElement element ) throws JavaModelException { } protected void verify ( IJavaElement element ) throws JavaModelException { } }

Fix:
resources [ i ] = childrenOfInterest [ i ] . getCorrespondingResource ( ) ;
Buggy code:
public class TraXLiaison implements XSLTLiaison { protected static final String FILEURL = "file:" ; private TransformerFactory tfactory = null ; private Templates templates = null ; private Transformer transformer ; public TraXLiaison ( ) throws Exception { } public void setStylesheet ( String fileName ) throws Exception { } public void transform ( String infile , String outfile ) throws Exception { } protected String normalize ( String fileName ) { if ( ( fileName != null ) && ( ! ( fileName . startsWith ( TraXLiaison . FILEURL ) ) ) ) { <START_BUG> return ( TraXLiaison . FILEURL ) + fileName ; <END_BUG> } return fileName ; } public void addParam ( String name , String value ) { } }

Fix:
return ( ( TraXLiaison . FILEURL ) + "//////" ) + fileName ;
Buggy code:
public abstract class AbstractCurveFitter { public double [ ] fit ( Collection < WeightedObservedPoint > points ) { <START_BUG> return getOptimizer ( ) . optimize ( getProblem ( points ) ) . getPoint ( ) ; <END_BUG> } protected LeastSquaresOptimizer getOptimizer ( ) { } protected abstract LeastSquaresProblem getProblem ( Collection < WeightedObservedPoint > points ) { } protected static class TheoreticalValuesFunction { private final ParametricUnivariateFunction f ; private final double [ ] points ; public TheoreticalValuesFunction ( final ParametricUnivariateFunction f , final Collection < WeightedObservedPoint > observations ) { } public MultivariateVectorFunction getModelFunction ( ) { } public MultivariateMatrixFunction getModelFunctionJacobian ( ) { } } }

Fix:
return getOptimizer ( ) . optimize ( getProblem ( points ) ) . getPoint ( ) . toArray ( ) ;
Buggy code:
public class BlobStoredProcedureTest extends BaseJDBCTestCase { final String testStr = "I<seq2seq4repair_space>am<seq2seq4repair_space>a<seq2seq4repair_space>simple<seq2seq4repair_space>derby<seq2seq4repair_space>test<seq2seq4repair_space>case" ; final byte [ ] strBytes = testStr . getBytes ( ) ; final long testStrLength = testStr . length ( ) ; public BlobStoredProcedureTest ( String name ) { } public static Test suite ( ) { } protected void setUp ( ) throws SQLException { } protected void tearDown ( ) throws Exception { } public void testBlobGetBytesSP ( ) throws SQLException { } public void testBlobCreateLocatorSP ( ) throws SQLException { int locator = - 1 ; CallableStatement cs = prepareCall ( "?<seq2seq4repair_space>=<seq2seq4repair_space>CALL<seq2seq4repair_space>SYSIBM.BLOBCREATELOCATOR()" ) ; cs . registerOutParameter ( 1 , Types . INTEGER ) ; cs . executeUpdate ( ) ; locator = cs . getInt ( 1 ) ; <START_BUG> assertEquals ( ( "The<seq2seq4repair_space>locator<seq2seq4repair_space>values<seq2seq4repair_space>returned<seq2seq4repair_space>by<seq2seq4repair_space>" + "SYSIBM.BLOBCREATELOCATOR()<seq2seq4repair_space>are<seq2seq4repair_space>incorrect" ) , 2 , locator ) ; <END_BUG> cs . close ( ) ; } public void testBlobReleaseLocatorSP ( ) throws SQLException { } public void testBlobGetLengthSP ( ) throws SQLException { } public void testBlobGetPositionFromBytesSP ( ) throws Exception { } public void testBlobSetBytes ( ) throws SQLException { } public void testBlobTruncateSP ( ) throws SQLException { } public void testBlobGetPositionFromLocatorSP ( ) throws SQLException { } }

Fix:
assertEquals ( ( "The<seq2seq4repair_space>locator<seq2seq4repair_space>values<seq2seq4repair_space>returned<seq2seq4repair_space>by<seq2seq4repair_space>" + "SYSIBM.BLOBCREATELOCATOR()<seq2seq4repair_space>are<seq2seq4repair_space>incorrect" ) , 4 , locator ) ;
Buggy code:
public class DefaultDeployer extends AbstractLogEnabled implements Serviceable , Deployer { private static final Resources REZ = ResourceManager . getPackageResources ( DefaultDeployer . class ) ; private ConverterRegistry m_converterRegistry ; private TypeManager m_typeManager ; private RoleManager m_roleManager ; private ClassLoaderManager m_classLoaderManager ; private final Map m_classLoaderDeployers = new HashMap ( ) ; public void service ( final ServiceManager serviceManager ) throws ServiceException { } public Deployer createChildDeployer ( final ServiceManager componentManager ) throws ServiceException { } public TypeDeployer createDeployer ( final ClassLoader loader ) throws DeploymentException { } public TypeDeployer createDeployer ( final File file ) throws DeploymentException { try { final ClassLoader classLoader = m_classLoaderManager . createClassLoader ( file ) ; return createDeployment ( classLoader , file . toURL ( ) ) ; <START_BUG> } catch ( Exception e ) { <END_BUG> final String message = DefaultDeployer . REZ . getString ( "deploy-from-file.error" , file ) ; throw new DeploymentException ( message , e ) ; } } private Deployment createDeployment ( final ClassLoader loader , final URL jarUrl ) throws Exception { } public void deployService ( final Deployment deployment , final ServiceDefinition definition ) throws Exception { } public void deployType ( final Deployment deployment , final TypeDefinition typeDef ) throws Exception { } private void handleType ( final Deployment deployment , final String roleName , final String typeName , final String className ) throws Exception { } private void handleConverter ( final Deployment deployment , final String className , final String source , final String destination ) throws Exception { } public void deployRole ( final Deployment deployment , final RoleDefinition roleDef ) throws Exception { } private RoleInfo getRole ( final String roleShorthand ) throws DeploymentException { } }

Fix:
} catch ( final Exception e ) {
Buggy code:
@ SuppressCodecs ( { "SimpleText" , "Memory" , "Direct" , "Compressing" } ) @ TimeoutSuite ( millis = 4 * ( TimeUnits . HOUR ) ) public class Test2BPostings extends LuceneTestCase { @ Nightly public void test ( ) throws Exception { BaseDirectoryWrapper dir = newFSDirectory ( createTempDir ( "2BPostings" ) ) ; if ( dir instanceof MockDirectoryWrapper ) { ( ( MockDirectoryWrapper ) ( dir ) ) . setThrottling ( NEVER ) ; } IndexWriterConfig iwc = new IndexWriterConfig ( TEST_VERSION_CURRENT , new org . apache . lucene . analysis . MockAnalyzer ( random ( ) ) ) . setMaxBufferedDocs ( DISABLE_AUTO_FLUSH ) . setRAMBufferSizeMB ( 256.0 ) . setMergeScheduler ( new ConcurrentMergeScheduler ( ) ) . setMergePolicy ( newLogMergePolicy ( false , 10 ) ) . setOpenMode ( CREATE ) ; IndexWriter w = new IndexWriter ( dir , iwc ) ; MergePolicy mp = w . getConfig ( ) . getMergePolicy ( ) ; if ( mp instanceof LogByteSizeMergePolicy ) { ( ( LogByteSizeMergePolicy ) ( mp ) ) . setMaxMergeMB ( ( ( 1024 * 1024 ) * 1024 ) ) ; } Document doc = new Document ( ) ; FieldType ft = new FieldType ( TextField . TYPE_NOT_STORED ) ; ft . setOmitNorms ( true ) ; ft . setIndexOptions ( DOCS_ONLY ) ; Field field = new Field ( "field" , new Test2BPostings . MyTokenStream ( ) , ft ) ; doc . add ( field ) ; final int numDocs = ( ( Integer . MAX_VALUE ) // 26 ) + 1 ; for ( int i = 0 ; i < numDocs ; i ++ ) { w . addDocument ( doc ) ; if ( ( VERBOSE ) && ( ( i % 100000 ) == 0 ) ) { System . out . println ( ( ( ( i + "<seq2seq4repair_space>of<seq2seq4repair_space>" ) + numDocs ) + "..." ) ) ; } } w . forceMerge ( 1 ) ; <START_BUG> w . close ( ) ; <END_BUG> dir . close ( ) ; } public static final class MyTokenStream extends TokenStream { private final CharTermAttribute termAtt = addAttribute ( CharTermAttribute . class ) ; int index ; @ Override public boolean incrementToken ( ) { } @ Override public void reset ( ) { } } }

Fix:
w . shutdown ( ) ;
Buggy code:
public class MultiReader extends IndexReader { protected IndexReader [ ] subReaders ; private int [ ] starts ; private boolean [ ] decrefOnClose ; private Hashtable normsCache = new Hashtable ( ) ; private int maxDoc = 0 ; private int numDocs = - 1 ; private boolean hasDeletions = false ; public MultiReader ( IndexReader [ ] subReaders ) { } public MultiReader ( IndexReader [ ] subReaders , boolean closeSubReaders ) { } private void initialize ( IndexReader [ ] subReaders , boolean closeSubReaders ) { <START_BUG> this . subReaders = subReaders ; <END_BUG> starts = new int [ ( subReaders . length ) + 1 ] ; decrefOnClose = new boolean [ subReaders . length ] ; for ( int i = 0 ; i < ( subReaders . length ) ; i ++ ) { starts [ i ] = maxDoc ; maxDoc += subReaders [ i ] . maxDoc ( ) ; if ( ! closeSubReaders ) { subReaders [ i ] . incRef ( ) ; decrefOnClose [ i ] = true ; } else { decrefOnClose [ i ] = false ; } if ( subReaders [ i ] . hasDeletions ( ) ) hasDeletions = true ; } starts [ subReaders . length ] = maxDoc ; } public IndexReader reopen ( ) throws IOException , CorruptIndexException { } public TermFreqVector [ ] getTermFreqVectors ( int n ) throws IOException { } public TermFreqVector getTermFreqVector ( int n , String field ) throws IOException { } public void getTermFreqVector ( int docNumber , String field , TermVectorMapper mapper ) throws IOException { } public void getTermFreqVector ( int docNumber , TermVectorMapper mapper ) throws IOException { } public boolean isOptimized ( ) { } public synchronized int numDocs ( ) { } public int maxDoc ( ) { } public Document document ( int n , FieldSelector fieldSelector ) throws IOException , CorruptIndexException { } public boolean isDeleted ( int n ) { } public boolean hasDeletions ( ) { } protected void doDelete ( int n ) throws IOException , CorruptIndexException { } protected void doUndeleteAll ( ) throws IOException , CorruptIndexException { } private int readerIndex ( int n ) { } public boolean hasNorms ( String field ) throws IOException { } private byte [ ] ones ; private byte [ ] fakeNorms ( ) { } public synchronized byte [ ] norms ( String field ) throws IOException { } public synchronized void norms ( String field , byte [ ] result , int offset ) throws IOException { } protected void doSetNorm ( int n , String field , byte value ) throws IOException , CorruptIndexException { } public TermEnum terms ( ) throws IOException { } public TermEnum terms ( Term term ) throws IOException { } public int docFreq ( Term t ) throws IOException { } public TermDocs termDocs ( ) throws IOException { } public TermPositions termPositions ( ) throws IOException { } protected void doCommit ( ) throws IOException { } protected synchronized void doClose ( ) throws IOException { } public Collection getFieldNames ( IndexReader . FieldOption fieldNames ) { } public boolean isCurrent ( ) throws IOException , CorruptIndexException { } public long getVersion ( ) { } IndexReader [ ] getSubReaders ( ) { } }

Fix:
this . subReaders = ( ( IndexReader [ ] ) ( subReaders . clone ( ) ) ) ;
Buggy code:
final class ObjectFactory { private static final String DEFAULT_PROPERTIES_FILENAME = "xerces.properties" ; private static final boolean DEBUG = ObjectFactory . isDebugEnabled ( ) ; private static final int DEFAULT_LINE_LENGTH = 80 ; private static Properties fXercesProperties = null ; private static long fLastModified = - 1 ; static Object createObject ( String factoryId , String fallbackClassName ) throws ObjectFactory . ConfigurationError { } static Object createObject ( String factoryId , String propertiesFilename , String fallbackClassName ) throws ObjectFactory . ConfigurationError { } private static boolean isDebugEnabled ( ) { } private static void debugPrintln ( String msg ) { } static ClassLoader findClassLoader ( ) throws ObjectFactory . ConfigurationError { } static Object newInstance ( String className , ClassLoader cl , boolean doFallback ) throws ObjectFactory . ConfigurationError { } static Class findProviderClass ( String className , ClassLoader cl , boolean doFallback ) throws ClassNotFoundException , ObjectFactory . ConfigurationError { SecurityManager security = System . getSecurityManager ( ) ; if ( security != null ) { <START_BUG> final int lastDot = className . lastIndexOf ( "." ) ; <END_BUG> String packageName = className ; if ( lastDot != ( - 1 ) ) packageName = className . substring ( 0 , lastDot ) ; security . checkPackageAccess ( packageName ) ; } Class providerClass ; if ( cl == null ) { providerClass = Class . forName ( className ) ; } else { try { providerClass = cl . loadClass ( className ) ; } catch ( ClassNotFoundException x ) { if ( doFallback ) { ClassLoader current = ObjectFactory . class . getClassLoader ( ) ; if ( current == null ) { providerClass = Class . forName ( className ) ; } else if ( cl != current ) { cl = current ; providerClass = cl . loadClass ( className ) ; } else { throw x ; } } else { throw x ; } } } return providerClass ; } private static Object findJarServiceProvider ( String factoryId ) throws ObjectFactory . ConfigurationError { } static final class ConfigurationError extends Error { static final long serialVersionUID = 8521878292694272124L ; private Exception exception ; ConfigurationError ( String msg , Exception x ) { } Exception getException ( ) { } } }

Fix:
final int lastDot = className . lastIndexOf ( '.' ) ;
Buggy code:
public class main { public static void main ( String [ ] args ) { String input = "" ; String output = "" ; <START_BUG> input = main . readFile ( "C:\\Users\\Felix\\Desktop\\Gradeadministration\\Gradeadministration\\datenUndSchema\\tx_gradeadministration_grades.sql" ) ; <END_BUG> output = main . prepareCSV ( input ) ; System . out . println ( output ) ; } private static String readFile ( String pfad ) { } private static String prepareCSV ( String input ) { } }

Fix:
input = main . readFile ( "C:\\Users\\Felix\\Desktop\\Gradeadministration\\Gradeadministration\\datenUndSchema\\tx_gradeadministration_subject.sql" ) ;
Buggy code:
public class ActivityAttributeDescriptionRule extends BaseRule { public ActivityAttributeDescriptionRule ( Digester digester , String state ) { } public void body ( String text ) throws Exception { Category cat = Category . getInstance ( DBImport . class ) ; cat . debug ( ( ( ( "(" + ( state ) ) + ")<seq2seq4repair_space>activity<seq2seq4repair_space>attribute<seq2seq4repair_space>description<seq2seq4repair_space>body:<seq2seq4repair_space>" ) + text ) ) ; <START_BUG> super . body ( text ) ; <END_BUG> } }

Fix:
super . digesterPush ( text ) ;
Buggy code:
public class TarUtils { private static final int BYTE_MASK = 255 ; static final ZipEncoding DEFAULT_ENCODING = ZipEncodingHelper . getZipEncoding ( null ) ; static final ZipEncoding FALLBACK_ENCODING = new ZipEncoding ( ) { public boolean canEncode ( String name ) { } public ByteBuffer encode ( String name ) { } public String decode ( byte [ ] buffer ) { } } ; private TarUtils ( ) { } public static long parseOctal ( final byte [ ] buffer , final int offset , final int length ) { } public static long parseOctalOrBinary ( final byte [ ] buffer , final int offset , final int length ) { } private static long parseBinaryLong ( final byte [ ] buffer , final int offset , final int length , final boolean negative ) { } private static long parseBinaryBigInteger ( final byte [ ] buffer , final int offset , final int length , final boolean negative ) { } public static boolean parseBoolean ( final byte [ ] buffer , final int offset ) { } private static String exceptionMessage ( byte [ ] buffer , final int offset , final int length , int current , final byte currentByte ) { } public static String parseName ( byte [ ] buffer , final int offset , final int length ) { } public static String parseName ( byte [ ] buffer , final int offset , final int length , final ZipEncoding encoding ) throws IOException { } public static int formatNameBytes ( String name , byte [ ] buf , final int offset , final int length ) { } public static int formatNameBytes ( String name , byte [ ] buf , final int offset , final int length , final ZipEncoding encoding ) throws IOException { int len = name . length ( ) ; ByteBuffer b = encoding . encode ( name ) ; while ( ( ( b . limit ( ) ) > length ) && ( len > 0 ) ) { b = encoding . encode ( name . substring ( 0 , ( -- len ) ) ) ; } <START_BUG> final int limit = b . limit ( ) ; <END_BUG> System . arraycopy ( b . array ( ) , b . arrayOffset ( ) , buf , offset , limit ) ; for ( int i = limit ; i < length ; ++ i ) { buf [ ( offset + i ) ] = 0 ; } return offset + length ; } public static void formatUnsignedOctalString ( final long value , byte [ ] buffer , final int offset , final int length ) { } public static int formatOctalBytes ( final long value , byte [ ] buf , final int offset , final int length ) { } public static int formatLongOctalBytes ( final long value , byte [ ] buf , final int offset , final int length ) { } public static int formatLongOctalOrBinaryBytes ( final long value , byte [ ] buf , final int offset , final int length ) { } private static void formatLongBinary ( final long value , byte [ ] buf , final int offset , final int length , final boolean negative ) { } private static void formatBigIntegerBinary ( final long value , byte [ ] buf , final int offset , final int length , final boolean negative ) { } public static int formatCheckSumOctalBytes ( final long value , byte [ ] buf , final int offset , final int length ) { } public static long computeCheckSum ( final byte [ ] buf ) { } }

Fix:
final int limit = ( b . limit ( ) ) - ( b . position ( ) ) ;
Buggy code:
public class PageReferenceRequestTarget implements IRequestTarget { private final PageReference reference ; public PageReferenceRequestTarget ( Page page ) { } public PageReferenceRequestTarget ( PageReference pageReference ) { } public final PageReference getPageReference ( ) { } public void respond ( RequestCycle requestCycle ) { Page page = reference . getPage ( ) ; if ( requestCycle . isRedirect ( ) ) { requestCycle . redirectTo ( page ) ; } else { <START_BUG> page . renderPage ( ) ; <END_BUG> } } public void detach ( RequestCycle requestCycle ) { } }

Fix:
page . render ( ) ;
Buggy code:
public abstract class ClearCase extends Task { private String m_ClearToolDir = "" ; private String m_viewPath = null ; public final void setClearToolDir ( String dir ) { <START_BUG> m_ClearToolDir = project . translatePath ( dir ) ; <END_BUG> } protected final String getClearToolCommand ( ) { } public final void setViewPath ( String viewPath ) { } public String getViewPath ( ) { } protected int run ( Commandline cmd ) { } private static final String CLEARTOOL_EXE = "cleartool" ; public static final String COMMAND_UPDATE = "update" ; public static final String COMMAND_CHECKOUT = "checkout" ; public static final String COMMAND_CHECKIN = "checkin" ; public static final String COMMAND_UNCHECKOUT = "uncheckout" ; }

Fix:
m_ClearToolDir = getProject ( ) . translatePath ( dir ) ;
Buggy code:
public class JavaConfigGui extends AbstractConfigGui implements ActionListener { private static transient Logger log = LoggingManager . getLoggerForClass ( ) ; private static final String CLASSNAMECOMBO = "classnamecombo" ; private JComboBox classnameCombo ; private boolean displayName = true ; private ArgumentsPanel argsPanel ; public JavaConfigGui ( ) { } public JavaConfigGui ( boolean displayNameField ) { } public String getStaticLabel ( ) { } protected void init ( ) { } private JPanel createClassnamePanel ( ) { } public void actionPerformed ( ActionEvent evt ) { } private JPanel createParameterPanel ( ) { <START_BUG> argsPanel = new ArgumentsPanel ( ) ; <END_BUG> return argsPanel ; } public void configure ( TestElement config ) { } public TestElement createTestElement ( ) { } public void modifyTestElement ( TestElement config ) { } }

Fix:
argsPanel = new ArgumentsPanel ( JMeterUtils . getResString ( "paramtable" ) ) ;
Buggy code:
public class BindingKeyResolver extends BindingKeyParser { Compiler compiler ; Binding compilerBinding ; char [ ] [ ] compoundName ; int dimension ; LookupEnvironment environment ; ReferenceBinding genericType ; MethodBinding methodBinding ; CompilationUnitDeclaration parsedUnit ; BlockScope scope ; TypeBinding typeBinding ; TypeDeclaration typeDeclaration ; ArrayList types = new ArrayList ( ) ; private BindingKeyResolver ( BindingKeyParser parser , Compiler compiler , LookupEnvironment environment ) { } public BindingKeyResolver ( String key ) { } public BindingKeyResolver ( String key , Compiler compiler , LookupEnvironment environment ) { } public char [ ] [ ] compoundName ( ) { } public void consumeArrayDimension ( char [ ] brakets ) { } public void consumeField ( char [ ] fieldName ) { } public void consumeParameterizedMethod ( ) { } public void consumeLocalType ( char [ ] uniqueKey ) { LocalTypeBinding [ ] localTypeBindings = this . parsedUnit . localTypes ; for ( int i = 0 ; i < ( this . parsedUnit . localTypeCount ) ; i ++ ) <START_BUG> if ( CharOperation . equals ( uniqueKey , localTypeBindings [ i ] . computeUniqueKey ( ) ) ) { <END_BUG> this . typeBinding = localTypeBindings [ i ] ; this . compilerBinding = this . typeBinding ; return ; } } public void consumeLocalVar ( char [ ] varName ) { } public void consumeMethod ( char [ ] selector , char [ ] signature ) { } public void consumeMemberType ( char [ ] simpleTypeName ) { } public void consumePackage ( char [ ] pkgName ) { } public void consumeParameterizedType ( char [ ] simpleTypeName , boolean isRaw ) { } public void consumeParser ( BindingKeyParser parser ) { } public void consumeScope ( int scopeNumber ) { } public void consumeRawType ( ) { } public void consumeSecondaryType ( char [ ] simpleTypeName ) { } public void consumeFullyQualifiedName ( char [ ] fullyQualifiedName ) { } public void consumeTopLevelType ( ) { } public void consumeType ( ) { } public void consumeTypeVariable ( char [ ] typeVariableName ) { } public void consumeWildCard ( int kind , int rank ) { } private TypeBinding getArrayBinding ( int dim , TypeBinding binding ) { } private TypeBinding getBaseTypeBinding ( char [ ] signature ) { } private TypeBinding getBinaryBinding ( ) { } public CompilationUnitDeclaration getCompilationUnitDeclaration ( ) { } public Binding getCompilerBinding ( ) { } private TypeBinding getTypeBinding ( char [ ] simpleTypeName ) { } private TypeBinding [ ] getTypeBindingArguments ( ) { } public void malformedKey ( ) { } public BindingKeyParser newParser ( ) { } public String toString ( ) { } }

Fix:
if ( CharOperation . equals ( uniqueKey , localTypeBindings [ i ] . computeUniqueKey ( false ) ) ) {
Buggy code:
public class ServicioPresupuestoBusiness implements IServicioPresupuestoBusiness { ServicioPresupuestoDAO servicioPresupuestoDAO = new ServicioPresupuestoDAO ( ) ; ServicioGastosBusiness servicioGastosBusiness = new ServicioGastosBusiness ( ) ; public void guardarPresupuesto ( String periodo , String importe ) { } public List < Presupuesto > obtenerPresupuesto ( ) { } String obtenerPresupuestoDiario ( ) { } String obtenerPresupuestoSemanal ( ) { } String obtenerPresupuestoMensual ( ) { } String obtenerPresupuestoAnual ( ) { } public void eliminarPresupuesto ( Long id ) { } public void actualizarPresupuesto ( Presupuesto obj ) { } @ Override public boolean isLimitePresupuestoAlcanzado ( ) { } @ Override public boolean tipoPresupuestoExiste ( String periodo ) { } boolean isNuevaSemana ( ) { Calendar calendar = Calendar . getInstance ( ) ; int semanaActual = calendar . get ( Calendar . WEEK_OF_YEAR ) ; <START_BUG> calendar . add ( Calendar . DAY_OF_YEAR , ( - 1 ) ) ; <END_BUG> int semanaAyer = calendar . get ( Calendar . WEEK_OF_YEAR ) ; return semanaActual != semanaAyer ; } boolean isNuevoMes ( ) { } boolean isNuevoAnio ( ) { } boolean isMismaSemana ( Calendar fechaGasto ) { } boolean isMismoDia ( Calendar fechaGasto ) { } boolean isMismoMes ( Calendar fechaGasto ) { } boolean isMismoAnio ( Calendar fechaGasto ) { } @ Override public boolean isPresupuestoDiarioAlcanzado ( ) { } @ Override public boolean isPresupuestoSemanalAlcanzado ( ) { } @ Override public boolean isPresupuestoMensualAlcanzado ( ) { } @ Override public boolean isPresupuestoAnualAlcanzado ( ) { } private boolean isAlcanzado ( String presupuesto , String total ) { } @ Override public void calcularTotales ( ) { } @ Override public void calcularTotales ( Gasto gasto ) { } @ Override public void descontarTotales ( Gasto gasto ) { } @ Override public String obtenerTotalDiario ( ) { } @ Override public String obtenerTotalSemanal ( ) { } @ Override public String obtenerTotalPredeterminado ( ) { } @ Override public void actualizarTotalPredeterminado ( String predeterminado ) { } @ Override public String obtenerTotalAnual ( ) { } @ Override public String obtenerTotalMensual ( ) { } private String restar ( String total , String importe ) { } private String sumar ( String total , String importe ) { } private Calendar obtenerCalendar ( String fecha ) { } }

Fix:
calendar . add ( Calendar . WEEK_OF_YEAR , ( - 1 ) ) ;
Buggy code:
public class LogStreamHandler extends PumpStreamHandler { public LogStreamHandler ( Task task , int outlevel , int errlevel ) { } public void stop ( ) { super . stop ( ) ; try { getErr ( ) . close ( ) ; getOut ( ) . close ( ) ; } catch ( IOException e ) { <START_BUG> throw new BuildException ( e ) ; <END_BUG> } } }

Fix:
throw new BuildException ( "Error" , e ) ;
Buggy code:
public class Snippet330 { public static void main ( String [ ] args ) { Display display = new Display ( ) ; Shell shell = new Shell ( display ) ; shell . setLayout ( new GridLayout ( 2 , true ) ) ; final Browser browser ; try { browser = new Browser ( shell , SWT . NONE ) ; } catch ( SWTError e ) { System . out . println ( ( "Could<seq2seq4repair_space>not<seq2seq4repair_space>instantiate<seq2seq4repair_space>Browser:<seq2seq4repair_space>" + ( e . getMessage ( ) ) ) ) ; display . dispose ( ) ; return ; } GridData data = new GridData ( GridData . FILL_BOTH ) ; data . horizontalSpan = 2 ; browser . setLayoutData ( data ) ; Button headersButton = new Button ( shell , SWT . PUSH ) ; headersButton . setText ( "Send<seq2seq4repair_space>custom<seq2seq4repair_space>headers" ) ; data = new GridData ( ) ; data . horizontalAlignment = GridData . FILL ; headersButton . setLayoutData ( data ) ; headersButton . addListener ( Selection , new Listener ( ) { public void handleEvent ( Event event ) { <START_BUG> browser . setUrl ( "http:////www.httpviewer.net" , null , new String [ ] { "User-agent:<seq2seq4repair_space>SWT<seq2seq4repair_space>Browser" , "Custom-header:<seq2seq4repair_space>this<seq2seq4repair_space>is<seq2seq4repair_space>just<seq2seq4repair_space>a<seq2seq4repair_space>demo" } ) ; <END_BUG> } } ) ; Button postDataButton = new Button ( shell , SWT . PUSH ) ; postDataButton . setText ( "Send<seq2seq4repair_space>post<seq2seq4repair_space>data" ) ; data = new GridData ( ) ; data . horizontalAlignment = GridData . FILL ; postDataButton . setLayoutData ( data ) ; postDataButton . addListener ( Selection , new Listener ( ) { public void handleEvent ( Event event ) { browser . setUrl ( "https:////bugs.eclipse.org//bugs//buglist.cgi" , "emailassigned_to1=1&bug_severity=enhancement&bug_status=NEW&email1=platform-swt-inbox&emailtype1=substring" , null ) ; } } ) ; shell . setBounds ( 10 , 10 , 600 , 600 ) ; shell . open ( ) ; while ( ! ( shell . isDisposed ( ) ) ) { if ( ! ( display . readAndDispatch ( ) ) ) display . sleep ( ) ; } display . dispose ( ) ; } }

Fix:
browser . setUrl ( "http:////www.ericgiguere.com//tools//http-header-viewer.html" , null , new String [ ] { "User-agent:<seq2seq4repair_space>SWT<seq2seq4repair_space>Browser" , "Custom-header:<seq2seq4repair_space>this<seq2seq4repair_space>is<seq2seq4repair_space>just<seq2seq4repair_space>a<seq2seq4repair_space>demo" } ) ;
Buggy code:
public class Access { public static boolean canAccess ( User user , Case forCase ) { if ( ( forCase . getPatient ( ) . getId ( ) ) == ( user . getId ( ) ) ) { return true ; } <START_BUG> if ( ( ( ( forCase . getPhysician ( ) ) == null ) && ( ( forCase . getStatus ( ) ) == ( CaseStatus . LookingForPhysician ) ) ) && ( user instanceof Physician ) ) { <END_BUG> return true ; } if ( ( ( forCase . getPhysician ( ) ) != null ) && ( ( forCase . getPhysician ( ) . getId ( ) ) == ( user . getId ( ) ) ) ) { return true ; } return false ; } public static boolean canAccess ( User user , Notification notification ) { } }

Fix:
if ( ( ( ( forCase . getPhysician ( ) ) == null ) && ( LookingForPhysician . equals ( forCase . getStatus ( ) ) ) ) && ( user instanceof Physician ) ) {
Buggy code:
public class ViewMessageCommand extends FolderCommand { MimePart bodyPart ; MimePartTree mimePartTree ; HeaderInterface header ; Folder folder ; Object uid ; public ViewMessageCommand ( FrameController frame , DefaultCommandReference [ ] references ) { } private void getData ( Folder srcFolder , Object uid , WorkerStatusController wsc ) throws Exception { } public void updateGUI ( ) throws Exception { ( ( MailFrameController ) ( frameController ) ) . messageController . showMessage ( header , bodyPart , mimePartTree ) ; if ( ( header . getFlags ( ) . getSeen ( ) ) == false ) { <START_BUG> ( ( MailFrameController ) ( frameController ) ) . tableController . getMarkAsReadTimer ( ) . restart ( folder , uid ) ; <END_BUG> } } public void execute ( Worker worker ) throws Exception { } }

Fix:
( ( MailFrameController ) ( frameController ) ) . tableController . getMarkAsReadTimer ( ) . restart ( ( ( FolderCommandReference ) ( getReferences ( ) [ 0 ] ) ) ) ;
Buggy code:
abstract class MemberUtils { private static final int ACCESS_TEST = ( ( Modifier . PUBLIC ) | ( Modifier . PROTECTED ) ) | ( Modifier . PRIVATE ) ; private static final Method IS_SYNTHETIC ; private static final Class [ ] ORDERED_PRIMITIVE_TYPES = new Class [ ] { Byte . TYPE , Short . TYPE , Character . TYPE , Integer . TYPE , Long . TYPE , Float . TYPE , Double . TYPE } ; static void setAccessibleWorkaround ( AccessibleObject o ) { } static boolean isPackageAccess ( int modifiers ) { } static boolean isAccessible ( Member m ) { } static boolean isSynthetic ( Member m ) { if ( ( MemberUtils . IS_SYNTHETIC ) != null ) { try { <START_BUG> return ( ( Boolean ) ( MemberUtils . IS_SYNTHETIC . invoke ( m , null ) ) ) . booleanValue ( ) ; <END_BUG> } catch ( Exception e ) { } } return false ; } static int compareParameterTypes ( Class [ ] left , Class [ ] right , Class [ ] actual ) { } private static float getTotalTransformationCost ( Class [ ] srcArgs , Class [ ] destArgs ) { } private static float getObjectTransformationCost ( Class srcClass , Class destClass ) { } private static float getPrimitivePromotionCost ( final Class srcClass , final Class destClass ) { } }

Fix:
return ( ( Boolean ) ( MemberUtils . IS_SYNTHETIC . invoke ( m , ( ( Object [ ] ) ( null ) ) ) ) ) . booleanValue ( ) ;
Buggy code:
public class BookActivity extends FragmentActivity { @ InjectView ( id . vpBookPager ) ViewPager vpPager ; @ InjectView ( id . tvTitleBook ) public TextView tvTitleBook ; public DialogFragment dialogFragment ; FragmentPagerAdapter adapterViewPager ; TabPageIndicator titleIndicator ; ProgressDialog progressDialog ; private int entityId ; private boolean isBook ; private int classId ; @ Override protected void onCreate ( Bundle savedInstanceState ) { } @ Override public boolean onCreateOptionsMenu ( Menu menu ) { MenuInflater menuInflater = getMenuInflater ( ) ; menuInflater . inflate ( common_menu , menu ) ; MenuItem classTitle = menu . findItem ( number_of_class ) ; int realClassNumber = ( classId ) + 4 ; <START_BUG> if ( realClassNumber > 12 ) <END_BUG> realClassNumber = 5 - ( realClassNumber - 11 ) ; if ( ( classId ) == ( - 1 ) ) classTitle . setVisible ( false ) ; classTitle . setTitle ( ( realClassNumber + "<seq2seq4repair_space>класс" ) ) ; return super . onCreateOptionsMenu ( menu ) ; } @ Override public boolean onOptionsItemSelected ( MenuItem item ) { } @ OnClick ( id . action_info ) public void showInfoDialog ( ) { } @ OnClick ( id . rlBookTitle ) public void goBack ( ) { } private void fillFields ( ) { } private boolean fillFromDB ( ) { } private class EntityResponseHandler extends JsonHttpResponseHandler { Entity entity ; @ Override public void onSuccess ( int statusCode , Header [ ] headers , JSONObject json ) { } @ Override public void onFailure ( int statusCode , Header [ ] headers , byte [ ] errorResponse , Throwable e ) { } } private class OppositeJsonHttpResponseHandler extends JsonHttpResponseHandler { private Entity entity ; public OppositeJsonHttpResponseHandler ( Entity entity ) { } @ Override public void onSuccess ( JSONObject response ) { } @ Override public void onFailure ( int statusCode , Header [ ] headers , byte [ ] errorResponse , Throwable e ) { } @ Override public void onFinish ( ) { } } private void initialize ( Entity entity ) { } private void initialize ( Entity entity , Entity opposite ) { } }

Fix:
if ( realClassNumber > 11 )
Buggy code:
public class NativeManagementAddHandler extends AbstractAddStepHandler { public static final NativeManagementAddHandler INSTANCE = new NativeManagementAddHandler ( ) ; public static final String OPERATION_NAME = ModelDescriptionConstants . ADD ; protected void populateModel ( ModelNode operation , ModelNode model ) throws OperationFailedException { } @ Override protected boolean requiresRuntime ( OperationContext context ) { } @ Override protected void performRuntime ( OperationContext context , ModelNode operation , ModelNode model , ServiceVerificationHandler verificationHandler , List < ServiceController < ? > > newControllers ) throws OperationFailedException { final ServiceTarget serviceTarget = context . getServiceTarget ( ) ; final ServiceName endpointName = ManagementRemotingServices . MANAGEMENT_ENDPOINT ; final String hostName = SecurityActions . getSystemProperty ( NODE_NAME ) ; ManagementRemotingServices . installRemotingEndpoint ( serviceTarget , MANAGEMENT_ENDPOINT , hostName , MANAGEMENT , verificationHandler , newControllers ) ; NativeManagementAddHandler . installNativeManagementConnector ( context , model , endpointName , serviceTarget , verificationHandler , newControllers ) ; <START_BUG> ManagementChannelRegistryService . addService ( serviceTarget ) ; <END_BUG> ManagementRemotingServices . installManagementChannelServices ( serviceTarget , endpointName , new ModelControllerClientOperationHandlerFactoryService ( ) , JBOSS_SERVER_CONTROLLER , MANAGEMENT_CHANNEL , verificationHandler , newControllers ) ; } private static void validateAndSet ( final AttributeDefinition definition , final ModelNode operation , final ModelNode subModel ) throws OperationFailedException { } private static ModelNode validateResolvedModel ( final AttributeDefinition definition , final OperationContext context , final ModelNode subModel ) throws OperationFailedException { } static void installNativeManagementConnector ( final OperationContext context , final ModelNode model , final ServiceName endpointName , final ServiceTarget serviceTarget , final ServiceVerificationHandler verificationHandler , final List < ServiceController < ? > > newControllers ) throws OperationFailedException { } }

Fix:
ManagementChannelRegistryService . addService ( serviceTarget , endpointName ) ;
Buggy code:
public class RestApplication extends Application { private ChallengeAuthenticator authenticatior ; private AuthPara authpara = null ; private Logger logger ; public RestApplication ( ) { } public RestApplication ( AuthPara auth ) { } @ Override public synchronized Restlet createInboundRoot ( ) { } private void setUpRouter ( Router router ) { } private void setUpAuth ( Router router , String path , String resourceKey , Class < ? extends ServerResource > targetClass ) { } private ChallengeAuthenticator createAuthenticator ( ) { ChallengeAuthenticator auth = new ChallengeAuthenticator ( null , ChallengeScheme . HTTP_BASIC , "mcrest" ) ; MapVerifier mapVerifier = new MapVerifier ( ) ; <START_BUG> mapVerifier . getLocalSecrets ( ) . put ( "login" , "secret" . toCharArray ( ) ) ; <END_BUG> auth . setVerifier ( mapVerifier ) ; return auth ; } }

Fix:
mapVerifier . getLocalSecrets ( ) . put ( authpara . getUserId ( ) , authpara . getPassword ( ) . toCharArray ( ) ) ;
Buggy code:
public class TagRenderContext { private final StringBuffer _jsout = new StringBuffer ( ) ; private final List < Boolean > _2ndChild = new LinkedList < Boolean > ( ) ; public TagRenderContext ( ) { } public String complete ( ) { } public void renderBegin ( Component comp , Map clientEvents , String specialRendererOutput , boolean lookup ) { if ( _2ndChild . isEmpty ( ) ) _jsout . append ( "zkx(" ) ; else if ( ( _2ndChild . get ( 0 ) ) == ( Boolean . TRUE ) ) _2ndChild . set ( 0 , Boolean . FALSE ) ; else _jsout . append ( ',' ) ; _2ndChild . add ( 0 , Boolean . TRUE ) ; _jsout . append ( "\n[" ) ; final String wgtcls = ( lookup ) ? "zk.RefWidget" : comp . getWidgetClass ( ) ; if ( ! ( "zhtml.Widget" . equals ( wgtcls ) ) ) _jsout . append ( '\'' ) . append ( wgtcls ) . append ( '\'' ) ; else _jsout . append ( 1 ) ; _jsout . append ( ",'" ) . append ( comp . getUuid ( ) ) . append ( "',{" ) ; if ( ! lookup ) { boolean first = true ; final String id = comp . getId ( ) ; if ( ( id . length ( ) ) > 0 ) { first = false ; _jsout . append ( "id:'" ) . append ( Strings . escape ( id , ESCAPE_JAVASCRIPT ) ) . append ( '\'' ) ; } if ( ! ( comp . isVisible ( ) ) ) { if ( first ) first = false ; else _jsout . append ( ',' ) ; _jsout . append ( "visible:false" ) ; } if ( clientEvents != null ) { for ( Iterator it = clientEvents . entrySet ( ) . iterator ( ) ; it . hasNext ( ) ; ) { final Map . Entry me = ( ( Map . Entry ) ( it . next ( ) ) ) ; final String evtnm = ( ( String ) ( me . getKey ( ) ) ) ; final int flags = ( ( Integer ) ( me . getValue ( ) ) ) . intValue ( ) ; if ( ( ( flags & ( ComponentCtrl . CE_IMPORTANT ) ) != 0 ) || ( Events . isListened ( comp , evtnm , false ) ) ) { if ( first ) first = false ; else _jsout . append ( ',' ) ; _jsout . append ( '$' ) . append ( evtnm ) . append ( ':' ) . append ( Events . isListened ( comp , evtnm , true ) ) ; } } } if ( ! ( Strings . isEmpty ( specialRendererOutput ) ) ) { if ( first ) first = false ; else _jsout . append ( ',' ) ; _jsout . append ( specialRendererOutput ) ; } } else if ( ! ( Strings . isEmpty ( specialRendererOutput ) ) ) { _jsout . append ( specialRendererOutput ) ; } <START_BUG> _jsout . append ( "},[" ) ; <END_BUG> } public void renderEnd ( Component comp ) { } }

Fix:
_jsout . append ( "},{},[" ) ;
Buggy code:
public class AddNewTimeActivity extends ActionBarActivity { private NumberPicker hoursPicker ; private NumberPicker minutesPicker ; private NumberPicker secondsPicker ; private boolean isNewInterval ; private int position ; @ Override protected void onCreate ( Bundle savedInstanceState ) { } @ Override public boolean onCreateOptionsMenu ( Menu menu ) { } @ Override public boolean onOptionsItemSelected ( MenuItem item ) { } private void initNumberPicker ( NumberPicker np , int Value , int min , int max ) { } public void saveNewTime ( View view ) { } public void cancelNewTime ( View view ) { } public static class AdFragment extends Fragment { @ Override public View onCreateView ( LayoutInflater inflater , ViewGroup container , Bundle savedInstanceState ) { } @ Override public void onActivityCreated ( Bundle bundle ) { super . onActivityCreated ( bundle ) ; AdView mAdView = ( ( AdView ) ( getView ( ) . findViewById ( adView ) ) ) ; <START_BUG> AdRequest adRequest = new AdRequest . Builder ( ) . build ( ) ; <END_BUG> mAdView . loadAd ( adRequest ) ; } } }

Fix:
AdRequest adRequest = new AdRequest . Builder ( ) . addTestDevice ( "2A03F21CFB927C7611295A40C8666F5F" ) . build ( ) ;