nus-yam/ex-repair huggingface dataset:
Buggy code:
public class Applet extends WebComponent implements IResourceListener , IFormSubmitListener { private static final long serialVersionUID = 1L ; private Class appletClass ; private List classes = new ArrayList ( 2 ) ; public Applet ( final String id , final Class appletClass ) { } public Applet ( final String id , final IModel model , final Class appletClass ) { } public void addClass ( final Class c ) { } public Object getAppletModel ( ) { } public void onFormSubmitted ( ) { } public void onResourceRequested ( ) { } public void setAppletModel ( final Object model ) { } protected int getHeight ( ) { } protected int getWidth ( ) { } protected void onComponentTag ( final ComponentTag tag ) { checkComponentTag ( tag , "applet" ) ; tag . put ( "code" , HostApplet . class . getName ( ) ) ; final String jarName = ( appletClass . getName ( ) ) + ".jar" ; final ResourceReference jarResourceReference = new ResourceReference ( jarName ) { protected Resource newResource ( ) { final JarResourceFactory factory = new JarResourceFactory ( ) ; factory . addClassClosures ( classes ) ; return factory . getResource ( ) ; } } ; String servletPath = ( ( wicket . protocol . http . servlet . ServletWebRequest ) ( getRequest ( ) ) ) . getServletPath ( ) ; <START_BUG> tag . put ( "codebase" , ( ( ( servletPath + '//' ) + ( Strings . beforeLastPathComponent ( jarResourceReference . getRelativeUrl ( ) , '//' ) ) ) + "//" ) ) ; <END_BUG> tag . put ( "archive" , jarName ) ; tag . put ( "name" , getPageRelativePath ( ) . replace ( ':' , '_' ) ) ; final int width = getWidth ( ) ; if ( width != ( - 1 ) ) { tag . put ( "width" , width ) ; } final int height = getHeight ( ) ; if ( height != ( - 1 ) ) { tag . put ( "height" , height ) ; } tag . setType ( OPEN ) ; super . onComponentTag ( tag ) ; } protected void onComponentTagBody ( final MarkupStream markupStream , final ComponentTag openTag ) { } private void addAppletClass ( final Class appletClass ) { } }

Fix:
tag . put ( "codebase" , ( ( ( servletPath + '//' ) + ( Strings . beforeLastPathComponent ( jarResourceReference . getSharedResourceKey ( ) , '//' ) ) ) + "//" ) ) ;
Buggy code:
public class ImageButton extends Button implements IResourceListener { private LocalizedImageResource localizedImageResource = new LocalizedImageResource ( this ) ; public ImageButton ( String id ) { } public ImageButton ( final String id , final ImageResource imageResource ) { } public ImageButton ( final String id , final SharedResource namedResource ) { } public ImageButton ( final String id , final String label ) { } public void onResourceRequested ( ) { } protected final void onComponentTag ( final ComponentTag tag ) { } protected void onSessionAttach ( ) { <START_BUG> localizedImageResource . sessionAttach ( ) ; <END_BUG> } }

Fix:
localizedImageResource . bind ( ) ;
Buggy code:
public class HTTPSampleResult extends SampleResult { private static final long serialVersionUID = 240L ; private String cookies = "" ; private String method ; private String redirectLocation ; private String queryString = "" ; private static final String HTTP_NO_CONTENT_CODE = Integer . toString ( HttpURLConnection . HTTP_NO_CONTENT ) ; private static final String HTTP_NO_CONTENT_MSG = "No<seq2seq4repair_space>Content" ; public HTTPSampleResult ( ) { } public HTTPSampleResult ( long elapsed ) { } public HTTPSampleResult ( HTTPSampleResult res ) { } public void setHTTPMethod ( String method ) { } public String getHTTPMethod ( ) { } public void setRedirectLocation ( String redirectLocation ) { } public String getRedirectLocation ( ) { } public boolean isRedirect ( ) { } @ Override public String getSamplerData ( ) { } public String getCookies ( ) { } public void setCookies ( String string ) { } public String getQueryString ( ) { } public void setQueryString ( String string ) { } @ Override public String getDataEncodingWithDefault ( ) { if ( ( ( getDataEncodingNoDefault ( ) ) == null ) && ( getContentType ( ) . startsWith ( "text//html" ) ) ) { byte [ ] bytes = getResponseData ( ) ; String prefix = new String ( bytes , 0 , Math . min ( bytes . length , 2000 ) ) . toLowerCase ( Locale . ENGLISH ) ; final String METATAG = "<meta<seq2seq4repair_space>http-equiv=\"content-type\"<seq2seq4repair_space>content=\"" ; int tagstart = prefix . indexOf ( METATAG ) ; if ( tagstart != ( - 1 ) ) { tagstart += METATAG . length ( ) ; int tagend = prefix . indexOf ( '\"' , tagstart ) ; if ( tagend != ( - 1 ) ) { final String ct = new String ( bytes , tagstart , ( tagend - tagstart ) ) ; setEncodingAndType ( ct ) ; } } } <START_BUG> return super . getDataEncodingWithDefault ( DEFAULT_HTTP_ENCODING ) ; <END_BUG> } public void setResponseNoContent ( ) { } }

Fix:
return super . getDataEncodingWithDefault ( DEFAULT_ENCODING ) ;
Buggy code:
public class BasicDRPCTopology { public static class ExclaimBolt extends BaseBasicBolt { @ Override public void execute ( Tuple tuple , BasicOutputCollector collector ) { } @ Override public void declareOutputFields ( OutputFieldsDeclarer declarer ) { } } public static void main ( String [ ] args ) throws Exception { LinearDRPCTopologyBuilder builder = new LinearDRPCTopologyBuilder ( "exclamation" ) ; builder . addBolt ( new BasicDRPCTopology . ExclaimBolt ( ) , 3 ) ; Config conf = new Config ( ) ; if ( ( args == null ) || ( ( args . length ) == 0 ) ) { LocalDRPC drpc = new LocalDRPC ( ) ; LocalCluster cluster = new LocalCluster ( ) ; cluster . submitTopology ( "drpc-demo" , conf , builder . createLocalTopology ( drpc ) ) ; for ( String word : new String [ ] { "hello" , "goodbye" } ) { System . out . println ( ( ( ( "Result<seq2seq4repair_space>for<seq2seq4repair_space>\"" + word ) + "\":<seq2seq4repair_space>" ) + ( drpc . execute ( "exclamation" , word ) ) ) ) ; } cluster . shutdown ( ) ; drpc . shutdown ( ) ; } else { conf . setNumWorkers ( 3 ) ; <START_BUG> StormSubmitter . submitTopologyWithProgressBar ( args [ 0 ] , conf , builder . createRemoteTopology ( ) ) ; <END_BUG> } } }

Fix:
StormSubmitter . submitTopology ( args [ 0 ] , conf , builder . createRemoteTopology ( ) ) ;
Buggy code:
public class SignInBE { private String username ; private String password ; private Connection conn ; private Statement stmt ; private ResultSet rs ; public SignInBE ( ) { } public void setupDB ( ) { } public void closeDB ( ) { } public void setUsername ( String u ) { } public void setPassword ( String p ) { } public boolean checkPassword ( String username , String password ) { try { <START_BUG> String query = ( ( ( "SELECT<seq2seq4repair_space>COUNT(*)<seq2seq4repair_space>AS<seq2seq4repair_space>Users<seq2seq4repair_space>FROM<seq2seq4repair_space>USERS<seq2seq4repair_space>WHERE<seq2seq4repair_space>USERNAME<seq2seq4repair_space>LIKE<seq2seq4repair_space>'" + username ) + "'<seq2seq4repair_space>AND<seq2seq4repair_space>PASSWORD<seq2seq4repair_space>LIKE<seq2seq4repair_space>'" ) + password ) + "';" ; <END_BUG> rs = stmt . executeQuery ( query ) ; if ( ( rs . getInt ( "Users" ) ) == 1 ) { return true ; } else { return false ; } } catch ( SQLException e ) { e . printStackTrace ( ) ; } return false ; } public boolean checkAdmin ( String username , String password ) { } }

Fix:
String query = ( ( ( "SELECT<seq2seq4repair_space>COUNT(*)<seq2seq4repair_space>AS<seq2seq4repair_space>Users<seq2seq4repair_space>FROM<seq2seq4repair_space>USERS<seq2seq4repair_space>WHERE<seq2seq4repair_space>USERNAME<seq2seq4repair_space>=<seq2seq4repair_space>'" + username ) + "'<seq2seq4repair_space>AND<seq2seq4repair_space>PASSWORD<seq2seq4repair_space>=<seq2seq4repair_space>'" ) + password ) + "';" ;
Buggy code:
public final class Strings { public static String afterFirst ( final String s , final char c ) { } public static String afterFirstPathComponent ( final String path , final char separator ) { } public static String afterLast ( final String s , final char c ) { } public static String beforeFirst ( final String s , final char c ) { } public static String beforeLast ( final String s , final char c ) { } public static String beforeLastPathComponent ( final String path , final char separator ) { } public static String capitalize ( final String s ) { } public static String escapeMarkup ( final String s ) { } public static String escapeMarkup ( final String s , final boolean escapeSpaces ) { } public static String firstPathComponent ( final String path , final char separator ) { } public static boolean isEmpty ( final String string ) { } public static String lastPathComponent ( final String path , final char separator ) { } public static String replaceAll ( final String s , final String searchFor , final String replaceWith ) { } public static String stripEnding ( final String s , final String ending ) { } public static Boolean toBoolean ( final String s ) throws StringValueConversionException { } public static boolean isTrue ( final String s ) throws StringValueConversionException { } public static char toChar ( final String s ) throws StringValueConversionException { } public static String toMultilineMarkup ( final String s ) { } public static String toString ( final Object object ) { } public static String toString ( final Throwable throwable ) { if ( throwable != null ) { final StringWriter stringWriter = new StringWriter ( ) ; throwable . printStackTrace ( new PrintWriter ( stringWriter ) ) ; <START_BUG> return stringWriter . toString ( ) . replaceAll ( "\t" , "<seq2seq4repair_space>" ) ; <END_BUG> } else { return "<Null<seq2seq4repair_space>Throwable>" ; } } private Strings ( ) { } }

Fix:
return Strings . replaceAll ( stringWriter . toString ( ) , "\t" , "<seq2seq4repair_space>" ) ;
Buggy code:
public class ExclamationTopology { public static class ExclamationBolt implements IRichBolt { OutputCollector _collector ; @ Override public void prepare ( Map conf , TopologyContext context , OutputCollector collector ) { } @ Override public void execute ( Tuple tuple ) { } @ Override public void cleanup ( ) { } @ Override public void declareOutputFields ( OutputFieldsDeclarer declarer ) { } } public static void main ( String [ ] args ) throws Exception { TopologyBuilder builder = new TopologyBuilder ( ) ; builder . setSpout ( 1 , new TestWordSpout ( ) , 10 ) ; builder . setBolt ( 2 , new ExclamationTopology . ExclamationBolt ( ) , 3 ) . shuffleGrouping ( 1 ) ; builder . setBolt ( 3 , new ExclamationTopology . ExclamationBolt ( ) , 2 ) . shuffleGrouping ( 2 ) ; Config conf = new Config ( ) ; conf . setDebug ( true ) ; <START_BUG> if ( ( args . length ) > 0 ) { <END_BUG> conf . setNumWorkers ( 3 ) ; StormSubmitter . submitTopology ( args [ 0 ] , conf , builder . createTopology ( ) ) ; } else { LocalCluster cluster = new LocalCluster ( ) ; cluster . submitTopology ( "test" , conf , builder . createTopology ( ) ) ; Utils . sleep ( 10000 ) ; cluster . killTopology ( "test" ) ; cluster . shutdown ( ) ; } } }

Fix:
if ( ( args != null ) && ( ( args . length ) > 0 ) ) {
Buggy code:
public class CallTarget extends Task { private Ant callee ; private String subTarget ; private boolean inheritAll = true ; private boolean inheritRefs = false ; public void setInheritAll ( boolean inherit ) { } public void setInheritRefs ( boolean inheritRefs ) { } public void init ( ) { } public void execute ( ) throws BuildException { if ( ( callee ) == null ) { init ( ) ; } if ( ( subTarget ) == null ) { <START_BUG> throw new BuildException ( "Attribute<seq2seq4repair_space>target<seq2seq4repair_space>is<seq2seq4repair_space>required." , location ) ; <END_BUG> } callee . setAntfile ( getProject ( ) . getProperty ( "ant.file" ) ) ; callee . setTarget ( subTarget ) ; callee . setInheritAll ( inheritAll ) ; callee . setInheritRefs ( inheritRefs ) ; callee . execute ( ) ; } public Property createParam ( ) { } public void addReference ( Ant . Reference r ) { } public void setTarget ( String target ) { } protected void handleOutput ( String line ) { } protected void handleErrorOutput ( String line ) { } }

Fix:
throw new BuildException ( "Attribute<seq2seq4repair_space>target<seq2seq4repair_space>is<seq2seq4repair_space>required." , getLocation ( ) ) ;
Buggy code:
public class GLDecoderRenderer implements GLEventListener , VideoDecoderRenderer { protected int targetFps ; protected int width ; protected int height ; protected Graphics graphics ; protected JFrame frame ; protected BufferedImage image ; protected int [ ] imageBuffer ; protected static final int DECODER_BUFFER_SIZE = 92 * 1024 ; protected ByteBuffer decoderBuffer ; protected long lastRender = System . currentTimeMillis ( ) ; protected final GLProfile glprofile ; protected final GLCapabilities glcapabilities ; protected final GLCanvas glcanvas ; private FPSAnimator animator ; public GLDecoderRenderer ( ) { } @ Override public void setup ( int width , int height , int redrawRate , Object renderTarget , int drFlags ) { this . targetFps = redrawRate ; this . width = width ; this . height = height ; int avcFlags = AvcDecoder . BILINEAR_FILTERING ; int threadCount = 2 ; frame = ( ( JFrame ) ( renderTarget ) ) ; graphics = frame . getGraphics ( ) ; avcFlags |= AvcDecoder . NATIVE_COLOR_ARGB ; image = new BufferedImage ( width , height , BufferedImage . TYPE_INT_ARGB ) ; imageBuffer = ( ( DataBufferInt ) ( image . getRaster ( ) . getDataBuffer ( ) ) ) . getData ( ) ; int err = AvcDecoder . init ( width , height , avcFlags , threadCount ) ; if ( err != 0 ) { throw new IllegalStateException ( ( "AVC<seq2seq4repair_space>decoder<seq2seq4repair_space>initialization<seq2seq4repair_space>failure:<seq2seq4repair_space>" + err ) ) ; } decoderBuffer = ByteBuffer . allocate ( ( ( GLDecoderRenderer . DECODER_BUFFER_SIZE ) + ( AvcDecoder . getInputPaddingSize ( ) ) ) ) ; System . out . println ( "Using<seq2seq4repair_space>OpenGL<seq2seq4repair_space>rendering" ) ; <START_BUG> glcanvas . setSize ( width , height ) ; <END_BUG> glcanvas . addGLEventListener ( this ) ; for ( MouseListener m : frame . getMouseListeners ( ) ) { glcanvas . addMouseListener ( m ) ; } for ( KeyListener k : frame . getKeyListeners ( ) ) { glcanvas . addKeyListener ( k ) ; } for ( MouseMotionListener m : frame . getMouseMotionListeners ( ) ) { glcanvas . addMouseMotionListener ( m ) ; } frame . setLayout ( null ) ; frame . add ( glcanvas , 0 , 0 ) ; animator = new FPSAnimator ( glcanvas , targetFps ) ; } @ Override public void start ( ) { } @ Override public void reshape ( GLAutoDrawable glautodrawable , int x , int y , int width , int height ) { } @ Override public void init ( GLAutoDrawable glautodrawable ) { } @ Override public void dispose ( GLAutoDrawable glautodrawable ) { } @ Override public void display ( GLAutoDrawable glautodrawable ) { } @ Override public void release ( ) { } @ Override public boolean submitDecodeUnit ( DecodeUnit decodeUnit ) { } @ Override public void stop ( ) { } }

Fix:
glcanvas . setSize ( frame . getWidth ( ) , frame . getHeight ( ) ) ;
Buggy code:
public abstract class TLObject implements Serializable { public abstract int getConstructorId ( ) { } public final byte [ ] serialize ( ) throws IOException { <START_BUG> ByteArrayOutputStream stream = new ByteArrayOutputStream ( ) ; <END_BUG> serialize ( stream ) ; return stream . toByteArray ( ) ; } public final void serialize ( OutputStream stream ) throws IOException { } public final void deserialize ( InputStream stream , TLContext context ) throws IOException { } public void serializeBody ( OutputStream stream ) throws IOException { } public void deserializeBody ( InputStream stream , TLContext context ) throws IOException { } public int computeSerializedSize ( ) { } }

Fix:
ByteArrayOutputStream stream = new ByteArrayOutputStream ( computeSerializedSize ( ) ) ;
Buggy code:
public class Test2 { private static int RUNSIZE = 100000 ; private static int MAX_FACTOR = 9772346 // ( Test2 . RUNSIZE ) ; private static String eol = System . getProperty ( "line.separator" ) ; public static void main ( final String [ ] args ) throws Exception { final URL inputFile = Test2 . class . getResource ( "allCountries.txt" ) ; BloomIndexHamming idx ; int maxDensity = 9 ; int [ ] [ ] reportData = new int [ maxDensity ] [ ( NormalBloomFilterFactory . WIDTH ) + 1 ] ; for ( int i = 0 ; i < maxDensity ; i ++ ) { idx = Test2 . createFilters ( ( i + 1 ) , inputFile ) ; BloomIndexHamming . HammingStats stats = idx . getStats ( ) ; <START_BUG> for ( int j = stats . getMinimumHamming ( ) ; j < ( stats . getMinimumHamming ( ) ) ; j ++ ) { <END_BUG> BloomIndexHamming . Block block = stats . getBlock ( j ) ; if ( block != null ) { reportData [ i ] [ j ] = block . getLength ( ) ; } } } Test2 . doReport ( maxDensity , reportData ) ; } private static void doReport ( int maxDensity , int [ ] [ ] reportData ) throws IOException { } private static BloomIndexHamming createFilters ( int density , URL inputFile ) throws IOException { } }

Fix:
for ( int j = stats . getMinimumHamming ( ) ; j < ( stats . getMaximumHamming ( ) ) ; j ++ ) {
Buggy code:
class WxsFileBuilder extends XmlFileBuilder < Msi > { private static final String ICON_ID = "icon.ico" ; private HashSet < String > components = new HashSet < > ( ) ; private HashMap < String , String > ids = new HashMap < > ( ) ; private String jvmDll ; private String javaDir ; private boolean isAddFiles ; WxsFileBuilder ( Msi msi , SetupBuilder setup , File wxsFile , File buildDir , URL template , boolean addFiles ) throws Exception { } void build ( ) throws Exception { } private Element getDirectory ( Element installDir , String [ ] segments ) { } private Element getComponent ( Element dir , String compID ) { } private void addFile ( Element installDir , File file , String [ ] segments ) { Element parent = getDirectory ( installDir , segments ) ; <START_BUG> String pathID = ( ( segments . length ) > 1 ) ? segments [ ( ( segments . length ) - 2 ) ] : "" ; <END_BUG> String compID = "application_" + pathID ; Element component = getComponent ( parent , compID ) ; String name = segments [ ( ( segments . length ) - 1 ) ] ; addFile ( component , file , pathID , name ) ; if ( name . equals ( "jvm.dll" ) ) { StringBuilder jvm = new StringBuilder ( ) ; for ( String segment : segments ) { if ( ( jvm . length ( ) ) > 0 ) { jvm . append ( '\\' ) ; } jvm . append ( segment ) ; } jvmDll = jvm . toString ( ) ; } } private void addFile ( Element component , File file , String pathID , String name ) { } private void addFile ( Element component , File file , String pathID , String name , boolean isAddFiles ) { } private void addDirectory ( Element installDir , File dir , int baseLength , String target ) { } private void addBundleJre ( Element installDir ) { } private static List < File > getDirectories ( File parent , String prefix ) { } private void addGUI ( Element product ) throws Exception { } private void addIcon ( Element product ) throws IOException { } private boolean addLicense ( Element product ) throws Exception { } private void addServices ( Element installDir ) throws IOException { } private void addShortcuts ( Element product ) throws IOException { } private String [ ] getCommandLine ( DesktopStarter starter ) { } private void addRunAfter ( Element product ) { } private void addDeleteFiles ( Element installDir ) { } private Element addRegistryKey ( Element component , String root , String id , String key ) { } private Element addRegistryValue ( Element regkey , String name , String type , String value ) { } private String id ( String [ ] segments , int length ) { } private String id ( String str ) { } String getGuid ( String id ) { } }

Fix:
String pathID = id ( segments , ( ( segments . length ) - 1 ) ) ;
Buggy code:
public class HTTP2Connection extends AbstractConnection implements Connection . UpgradeTo { protected static final Logger LOG = Log . getLogger ( HTTP2Connection . class ) ; private final Queue < Runnable > tasks = new org . eclipse . jetty . util . ConcurrentArrayQueue ( ) ; private final ByteBufferPool byteBufferPool ; private final Parser parser ; private final ISession session ; private final int bufferSize ; private final HTTP2Connection . HTTP2Producer producer = new HTTP2Connection . HTTP2Producer ( ) ; private final ExecutionStrategy executionStrategy ; public HTTP2Connection ( ByteBufferPool byteBufferPool , Executor executor , EndPoint endPoint , Parser parser , ISession session , int bufferSize ) { } protected ISession getSession ( ) { } public void onUpgradeTo ( ByteBuffer prefilled ) { if ( HTTP2Connection . LOG . isDebugEnabled ( ) ) <START_BUG> HTTP2Connection . LOG . debug ( "HTTP2<seq2seq4repair_space>onUpgradeTo<seq2seq4repair_space>{}<seq2seq4repair_space>{}" , this , BufferUtil . toDebugString ( prefilled ) ) ; <END_BUG> producer . prefill ( prefilled ) ; } @ Override public void onOpen ( ) { } @ Override public void onClose ( ) { } @ Override public void onFillable ( ) { } private int fill ( EndPoint endPoint , ByteBuffer buffer ) { } @ Override protected boolean onReadTimeout ( ) { } protected void offerTask ( Runnable task ) { } private class HTTP2Producer implements ExecutionStrategy . Producer { private ByteBuffer buffer ; @ Override public Runnable produce ( ) { } public void prefill ( ByteBuffer prefilledBuffer ) { } private void release ( ) { } } }

Fix:
HTTP2Connection . LOG . debug ( "HTTP2<seq2seq4repair_space>onUpgradeTo<seq2seq4repair_space>{}<seq2seq4repair_space>{}" , this , BufferUtil . toDetailString ( prefilled ) ) ;
Buggy code:
public class ServerStarter { public static void main ( String [ ] args ) { try { ServerModel model = new ServerModel ( ) ; serverUIMainWindow mainWindow = new serverUIMainWindow ( model ) ; <START_BUG> mainWindow . show ( ) ; <END_BUG> } catch ( UnknownHostException ex ) { Logger . getLogger ( ServerStarter . class . getName ( ) ) . log ( Level . SEVERE , null , ex ) ; } } }

Fix:
mainWindow . setVisible ( true ) ;
Buggy code:
public class WildAnnotationTypePattern extends AnnotationTypePattern { private TypePattern typePattern ; private boolean resolved = false ; public WildAnnotationTypePattern ( TypePattern typePattern ) { } public FuzzyBoolean matches ( AnnotatedElement annotated ) { } public AnnotationTypePattern resolveBindings ( IScope scope , Bindings bindings , boolean allowBinding ) { this . typePattern = typePattern . resolveBindings ( scope , bindings , false , false ) ; resolved = true ; if ( ( typePattern ) instanceof ExactTypePattern ) { ExactTypePattern et = ( ( ExactTypePattern ) ( typePattern ) ) ; if ( ! ( et . getExactType ( ) . isAnnotation ( scope . getWorld ( ) ) ) ) { IMessage m = MessageUtil . error ( WeaverMessages . format ( REFERENCE_TO_NON_ANNOTATION_TYPE , et . getExactType ( ) . getName ( ) ) , getSourceLocation ( ) ) ; scope . getWorld ( ) . getMessageHandler ( ) . handleMessage ( m ) ; resolved = false ; } <START_BUG> return new ExactAnnotationTypePattern ( et . getExactType ( ) ) ; <END_BUG> } else { return this ; } } private static final byte VERSION = 1 ; public void write ( DataOutputStream s ) throws IOException { } public static AnnotationTypePattern read ( DataInputStream s , ISourceContext context ) throws IOException { } public boolean equals ( Object obj ) { } public int hashCode ( ) { } public String toString ( ) { } }

Fix:
return new ExactAnnotationTypePattern ( et . getExactType ( ) . resolve ( scope . getWorld ( ) ) ) ;
Buggy code:
public class SpellRegistry { public static void setup ( ) { } public static ArrayList < ISpell > spellbook ; public static ISpell chest ; public static ISpell firebolt ; public static ISpell frostbolt ; public static ISpell ghost ; public static ISpell harvest ; public static ISpell jump ; public static ISpell lightningbolt ; public static ISpell pearl ; public static ISpell phase ; public static ISpell slowfall ; public static ISpell waterwalk ; public static ISpell waterbolt ; public static ISpell soulstone ; public static ISpell torch ; public static ISpell endereye ; public static ISpell haste ; public static ISpell getDefaultSpell ( ) { } public static void cast ( ISpell spell , World world , EntityPlayer player , BlockPos pos ) { } public static void cast ( String spell_id , World world , EntityPlayer player , BlockPos pos ) { } public static void shiftUp ( EntityPlayer player ) { } public static void shiftDown ( EntityPlayer player ) { } private static void setPlayerCurrentSpell ( EntityPlayer player , String current ) { } public static String getPlayerCurrentSpell ( EntityPlayer player ) { PlayerPowerups props = PlayerPowerups . get ( player ) ; <START_BUG> return props . getStringSpell ( ) ; <END_BUG> } public static ISpell getPlayerCurrentISpell ( EntityPlayer player ) { } public static ISpell getSpellFromType ( String next ) { } }

Fix:
return props . getSpell ( ) ;
Buggy code:
@ SuppressWarnings ( "unchecked" ) public class OMultiValue { public static boolean isMultiValue ( final Class < ? > iType ) { } public static boolean isMultiValue ( final Object iObject ) { } public static boolean isIterable ( final Object iObject ) { } public static int getSize ( final Object iObject ) { } public static Object getFirstValue ( final Object iObject ) { } public static Object getLastValue ( final Object iObject ) { } public static Object getValue ( final Object iObject , final int iIndex ) { } public static Iterable < Object > getMultiValueIterable ( final Object iObject ) { if ( iObject == null ) return null ; if ( iObject instanceof Iterable < ? > ) return ( ( Iterable < Object > ) ( iObject ) ) ; else if ( iObject instanceof Collection < ? > ) return ( ( Collection < Object > ) ( iObject ) ) ; else if ( iObject instanceof Map < ? , ? > ) return ( ( Map < ? , Object > ) ( iObject ) ) . values ( ) ; else if ( iObject . getClass ( ) . isArray ( ) ) return new OIterableObjectArray < Object > ( iObject ) ; else if ( iObject instanceof Iterator < ? > ) { final List < Object > temp = new ArrayList < Object > ( ) ; for ( Iterator < Object > it = ( ( Iterator < Object > ) ( iObject ) ) ; it . hasNext ( ) ; ) temp . add ( it . next ( ) ) ; return temp ; } <START_BUG> return null ; <END_BUG> } public static Iterator < Object > getMultiValueIterator ( final Object iObject ) { } public static String toString ( final Object iObject ) { } public static Object add ( final Object iObject , final Object iToAdd ) { } public static Object remove ( Object iObject , Object iToRemove , final boolean iAllOccurrences ) { } protected static void removeFromOCollection ( final Object iObject , final OCollection < Object > coll , final Object iToRemove , final boolean iAllOccurrences ) { } private static void batchRemove ( Collection < Object > coll , Iterator < ? > it ) { } private static Set < ? > prepareBatch ( Iterator < ? > it , int approximateRemainingSize ) { } public static Object [ ] array ( final Object iValue ) { } public static < T > T [ ] array ( final Object iValue , final Class < ? extends T > iClass ) { } public static < T > T [ ] array ( final Object iValue , final Class < ? extends T > iClass , final OCallable < Object , Object > iCallback ) { } public static Object convert ( final Object iObject , final OCallable < Object , Object > iCallback ) { } public static boolean equals ( final Collection < Object > col1 , final Collection < Object > col2 ) { } public static boolean contains ( final Object iObject , final Object iItem ) { } public static int indexOf ( final Object iObject , final Object iItem ) { } }

Fix:
return new OIterableObject < Object > ( iObject ) ;
Buggy code:
public class OnceOnlyControllerGui extends AbstractControllerGui { public OnceOnlyControllerGui ( ) { } public TestElement createTestElement ( ) { } public void modifyTestElement ( TestElement oc ) { } public String getLabelResource ( ) { } private void init ( ) { <START_BUG> setLayout ( new VerticalLayout ( 5 , VerticalLayout . LEFT , VerticalLayout . TOP ) ) ; <END_BUG> setBorder ( makeBorder ( ) ) ; add ( makeTitlePanel ( ) ) ; } }

Fix:
setLayout ( new VerticalLayout ( 5 , VerticalLayout . BOTH , VerticalLayout . TOP ) ) ;
Buggy code:
public class LoginActivity extends AppCompatActivity implements View . OnClickListener { private EditText editTextUsername ; private EditText editTextPassword ; public static final String KEY_USERNAME = "username" ; public static final String KEY_PASSWORD = "password" ; public String username ; private String password ; Button email_sign_in_button ; Button email_register_button ; @ Override protected void onCreate ( Bundle savedInstanceState ) { } private void userLogin ( ) { } private void openProfile ( ) { } @ Override public boolean onCreateOptionsMenu ( Menu menu ) { } @ Override public boolean onOptionsItemSelected ( MenuItem item ) { } private void email_sign_in_buttonClick ( ) { } private void email_register_buttonClick ( ) { } @ Override public void onClick ( View v ) { switch ( v . getId ( ) ) { case id . email_sign_in_button : userLogin ( ) ; break ; case id . email_register_button : <START_BUG> email_sign_in_buttonClick ( ) ; <END_BUG> break ; } } }

Fix:
email_register_buttonClick ( ) ;
Buggy code:
public class PropertyOrFieldReference extends SpelNodeImpl { private final boolean nullSafe ; private final String name ; private volatile PropertyAccessor cachedReadAccessor ; private volatile PropertyAccessor cachedWriteAccessor ; public PropertyOrFieldReference ( boolean nullSafe , String propertyOrFieldName , int pos ) { } public boolean isNullSafe ( ) { } public String getName ( ) { } @ Override public ValueRef getValueRef ( ExpressionState state ) throws EvaluationException { } @ Override public TypedValue getValueInternal ( ExpressionState state ) throws EvaluationException { } private TypedValue getValueInternal ( TypedValue contextObject , EvaluationContext evalContext , boolean isAutoGrowNullReferences ) throws EvaluationException { } @ Override public void setValue ( ExpressionState state , Object newValue ) throws EvaluationException { } @ Override public boolean isWritable ( ExpressionState state ) throws EvaluationException { } @ Override public String toStringAST ( ) { } private TypedValue readProperty ( TypedValue contextObject , EvaluationContext evalContext , String name ) throws EvaluationException { } private void writeProperty ( TypedValue contextObject , EvaluationContext evalContext , String name , Object newValue ) throws EvaluationException { } public boolean isWritableProperty ( String name , TypedValue contextObject , EvaluationContext evalContext ) throws EvaluationException { } private List < PropertyAccessor > getPropertyAccessorsToTry ( Object contextObject , List < PropertyAccessor > propertyAccessors ) { } @ Override public boolean isCompilable ( ) { } @ Override public void generateCode ( MethodVisitor mv , CodeFlow cf ) { } private static class AccessorLValue implements ValueRef { private final PropertyOrFieldReference ref ; private final TypedValue contextObject ; private final EvaluationContext evalContext ; private final boolean autoGrowNullReferences ; public AccessorLValue ( PropertyOrFieldReference propertyOrFieldReference , TypedValue activeContextObject , EvaluationContext evalContext , boolean autoGrowNullReferences ) { } @ Override public TypedValue getValue ( ) { } @ Override public void setValue ( Object newValue ) { } @ Override public boolean isWritable ( ) { <START_BUG> return true ; <END_BUG> } } }

Fix:
return this . ref . isWritableProperty ( this . ref . name , this . contextObject , this . evalContext ) ;
Buggy code:
public class XmlTag extends MarkupElement { public static final XmlTag . Type CLOSE = new XmlTag . Type ( "CLOSE" ) ; public static final XmlTag . Type OPEN = new XmlTag . Type ( "OPEN" ) ; public static final XmlTag . Type OPEN_CLOSE = new XmlTag . Type ( "OPEN_CLOSE" ) ; ValueMap attributes = new ValueMap ( ) ; int columnNumber ; int length ; int lineNumber ; String name ; String namespace ; int pos ; String text ; XmlTag . Type type ; private XmlTag closes ; private XmlTag copyOf = this ; private boolean isMutable = true ; private boolean nameChanged = false ; public static final class Type extends EnumeratedType { Type ( final String name ) { } } public XmlTag ( ) { } public final boolean closes ( final XmlTag open ) { } public final XmlTag closeTag ( ) { } public ValueMap getAttributes ( ) { } public int getColumnNumber ( ) { } public int getLength ( ) { } public int getLineNumber ( ) { } public String getName ( ) { } public boolean getNameChanged ( ) { } public String getNamespace ( ) { } public final XmlTag getOpenTag ( ) { } public int getPos ( ) { } public String getString ( final String key ) { } public XmlTag . Type getType ( ) { } public boolean isClose ( ) { } public final boolean isMutable ( ) { } public boolean isOpen ( ) { } public boolean isOpen ( final String componentName ) { <START_BUG> return ( isOpen ( ) ) && ( componentName . equals ( componentName ) ) ; <END_BUG> } public boolean isOpenClose ( ) { } public boolean isOpenClose ( final String componentName ) { } public void makeImmutable ( ) { } public XmlTag mutable ( ) { } public void put ( final String key , final boolean value ) { } public void put ( final String key , final int value ) { } public void put ( final String key , final String value ) { } public void put ( final String key , final StringValue value ) { } public void putAll ( final Map map ) { } public void remove ( final String key ) { } public void setName ( final String name ) { } public void setOpenTag ( final XmlTag tag ) { } public void setType ( final XmlTag . Type type ) { } public String toDebugString ( ) { } public String toString ( ) { } public String toUserDebugString ( ) { } public String toXmlString ( ) { } }

Fix:
return ( isOpen ( ) ) && ( name . equals ( componentName ) ) ;
Buggy code:
public class DatabaseHandler { private final String TAG = "DatabaseHandler" ; static final String NAME = "name" ; static final String ATTR = "attribute" ; static final String TIME = "timestamp" ; static final String VALUE = "value" ; private DatabaseHelper dbHelper ; private SQLiteDatabase database ; public DatabaseHandler ( Context context ) { } public void openDB ( ) throws SQLException { } public void close ( ) { } public void insertMessage ( String name , FCMessage msg ) { ContentValues cv = new ContentValues ( ) ; cv . put ( DatabaseHandler . NAME , name ) ; cv . put ( DatabaseHandler . TIME , msg . getTimeStamp ( ) ) ; <START_BUG> cv . put ( DatabaseHandler . ATTR , msg . getMessageType ( ) ) ; <END_BUG> cv . put ( DatabaseHandler . VALUE , msg . getContent ( ) ) ; database . insert ( dbHelper . getTableName ( ) , DatabaseHandler . NAME , cv ) ; Log . i ( TAG , "Contact<seq2seq4repair_space>added<seq2seq4repair_space>successfully." ) ; } public void deleteContact ( long id ) { } public List < FCMessage > selectMessageByName ( String name ) { } public List < FCSession > selectAllSession ( ) { } private FCMessage cursorToMessage ( Cursor cursor ) { } private FCSession cursorToSession ( Cursor cursor ) { } }

Fix:
cv . put ( DatabaseHandler . ATTR , msg . getMessageAttr ( ) ) ;
Buggy code:
public class ReduxResourcePack implements IResourcePack { private final ReduxPackModContainer reduxModPack ; public ReduxResourcePack ( ModContainer reduxPackModContainer ) { } @ Override public InputStream getInputStream ( ResourceLocation resource ) throws IOException { } @ Override public boolean resourceExists ( ResourceLocation resource ) { } @ Override public Set getResourceDomains ( ) { } @ Override public IMetadataSection getPackMetadata ( IMetadataSerializer p_135058_1_ , String p_135058_2_ ) throws IOException { } @ Override public BufferedImage getPackImage ( ) throws IOException { } @ Override public String getPackName ( ) { } private boolean checkSandbox ( String resource ) { <START_BUG> if ( ( ( resource . contains ( ".." ) ) || ( resource . startsWith ( "//" ) ) ) || ( ( resource . charAt ( 1 ) ) == ':' ) ) { <END_BUG> instance . getLogger ( ) . warn ( "Critical<seq2seq4repair_space>security<seq2seq4repair_space>error!<seq2seq4repair_space>Tried<seq2seq4repair_space>to<seq2seq4repair_space>access<seq2seq4repair_space>file(s)<seq2seq4repair_space>outside<seq2seq4repair_space>of<seq2seq4repair_space>the<seq2seq4repair_space>Redux<seq2seq4repair_space>config<seq2seq4repair_space>folder<seq2seq4repair_space>with<seq2seq4repair_space>the<seq2seq4repair_space>path<seq2seq4repair_space>of:<seq2seq4repair_space>%s\nWill<seq2seq4repair_space>deny<seq2seq4repair_space>requested<seq2seq4repair_space>file." , resource ) ; return false ; } return true ; } }

Fix:
if ( ( resource . contains ( ".." ) ) || ( resource . startsWith ( "//" ) ) ) {
Buggy code:
@ FixMethodOrder ( MethodSorters . NAME_ASCENDING ) public class CDA100 { private static WebDriver driver ; private static String baseUrl ; private static String downloadDir ; private static String exportFilePath ; private static Logger log = LogManager . getLogger ( CDA100 . class ) ; @ Rule public ScreenshotTestRule screenshotTestRule = new ScreenshotTestRule ( CDA100 . driver ) ; @ BeforeClass public static void setUpClass ( ) { } @ Before public void setUpTestCase ( ) { } @ Test ( timeout = 120000 ) public void tc01_CdaFileViewer_ExcelOutputIndex ( ) { CDA100 . log . info ( "tc01_CdaFileViewer_ExcelOutputIndex" ) ; ElementHelper . WaitForElementPresence ( CDA100 . driver , By . id ( "dataAccessSelector" ) ) ; Select select = new Select ( ElementHelper . FindElement ( CDA100 . driver , By . id ( "dataAccessSelector" ) ) ) ; select . selectByVisibleText ( "Sql<seq2seq4repair_space>Query<seq2seq4repair_space>on<seq2seq4repair_space>SampleData<seq2seq4repair_space>-<seq2seq4repair_space>Jdbc" ) ; ElementHelper . WaitForElementInvisibility ( CDA100 . driver , By . xpath ( "////div[@class='blockUI<seq2seq4repair_space>blockOverlay']" ) ) ; WebElement elemStatus = ElementHelper . FindElement ( CDA100 . driver , By . id ( "status" ) ) ; assertEquals ( "Shipped" , elemStatus . getAttribute ( "value" ) ) ; elemStatus = ElementHelper . FindElement ( CDA100 . driver , By . id ( "orderDate" ) ) ; assertEquals ( "2003-03-01" , elemStatus . getAttribute ( "value" ) ) ; String columnOneRowOne = ElementHelper . GetText ( CDA100 . driver , By . xpath ( "////table[@id='contents']//tbody//tr//td" ) ) ; String columnTwoRowOne = ElementHelper . GetText ( CDA100 . driver , By . xpath ( "////table[@id='contents']//tbody//tr//td[2]" ) ) ; assertEquals ( "S10_1678" , columnOneRowOne ) ; assertEquals ( "10107" , columnTwoRowOne ) ; WebElement buttonExport = ElementHelper . FindElement ( CDA100 . driver , By . id ( "export" ) ) ; assertNotNull ( buttonExport ) ; try { new File ( CDA100 . exportFilePath ) . delete ( ) ; buttonExport . click ( ) ; DirectoryWatcher . WatchForCreate ( CDA100 . downloadDir ) ; File exportFile = new File ( CDA100 . exportFilePath ) ; assertTrue ( exportFile . exists ( ) ) ; for ( int i = 0 ; i < 50 ; i ++ ) { long nSize = FileUtils . sizeOf ( exportFile ) ; if ( nSize >= 249856 ) { break ; } Thread . sleep ( 100 ) ; } String md5 = DigestUtils . md5Hex ( Files . readAllBytes ( exportFile . toPath ( ) ) ) ; <START_BUG> assertEquals ( md5 , "29f8434bd43d75ab5d7dbac3431f5426" ) ; <END_BUG> CDA100 . DeleteFile ( ) ; } catch ( Exception e ) { CDA100 . log . error ( e . getMessage ( ) ) ; } } public static void DeleteFile ( ) { } @ AfterClass public static void tearDownClass ( ) { } }

Fix:
assertEquals ( md5 , "c185607111840543e3cf33b86b4174bc" ) ;
Buggy code:
public class AddNewSoundDialog extends BaseDialog implements View . OnClickListener , View . OnTouchListener { private static final String TAG = AddNewSoundDialog . class . getName ( ) ; private static final String KEY_CALLING_FRAGMENT_TAG = "org.neidhardt.dynamicsoundboard.soundmanagement.views.AddNewSoundDialog.callingFragmentTag" ; private static final String KEY_SOUNDS_URI = "org.neidhardt.dynamicsoundboard.soundmanagement.views.AddNewSoundDialog.soundsToAdd" ; private static final String KEY_SOUNDS_LABEL = "org.neidhardt.dynamicsoundboard.soundmanagement.views.AddNewSoundDialog.soundsToAddLabels" ; private ViewGroup soundsToAddLayout ; private String callingFragmentTag ; private List < Uri > soundsToAdd ; private View addSoundsButton ; public static void showInstance ( FragmentManager manager , String callingFragmentTag ) { } @ Override public void onCreate ( Bundle savedInstanceState ) { } @ Override public Dialog onCreateDialog ( Bundle savedInstanceState ) { @ SuppressLint ( "InflateParams" ) View view = this . getActivity ( ) . getLayoutInflater ( ) . inflate ( dialog_add_new_sound , null ) ; this . addSoundsButton = view . findViewById ( b_ok ) ; this . addSoundsButton . setOnClickListener ( this ) ; this . addSoundsButton . setOnTouchListener ( this ) ; <START_BUG> this . addSoundsButton . setClickable ( false ) ; <END_BUG> view . findViewById ( b_cancel ) . setOnClickListener ( this ) ; view . findViewById ( b_add_another_sound ) . setOnClickListener ( this ) ; this . soundsToAddLayout = ( ( ViewGroup ) ( view . findViewById ( layout_sounds_to_add ) ) ) ; AlertDialog . Builder builder = new AlertDialog . Builder ( this . getActivity ( ) ) ; builder . setView ( view ) ; return builder . create ( ) ; } @ Override public void onActivityCreated ( Bundle savedInstanceState ) { } @ Override public void onClick ( View v ) { } @ Override public boolean onTouch ( View v , MotionEvent event ) { } private void startIntentForNewSound ( ) { } @ Override public void onActivityResult ( int requestCode , int resultCode , Intent data ) { } private void addNewSoundToLoad ( Uri soundUri ) { } @ Override public void onSaveInstanceState ( @ SuppressWarnings ( "NullableProblems" ) Bundle outState ) { } private void returnResultsToCallingFragment ( ) { } private void showRenameDialog ( List < MediaPlayerData > renamedMediaPlayers ) { } private void showInfoToast ( ) { } }

Fix:
this . addSoundsButton . setEnabled ( false ) ;
Buggy code:
public class RegisterCardCompare implements Comparator < RegisterCard > { @ Override public int compare ( RegisterCard o1 , RegisterCard o2 ) { <START_BUG> return ( o1 . getPoints ( ) ) - ( o2 . getPoints ( ) ) ; <END_BUG> } }

Fix:
return ( o2 . getPoints ( ) ) - ( o1 . getPoints ( ) ) ;
Buggy code:
public class TempFolder extends MessageFolder { private static final Logger LOG = Logger . getLogger ( "org.columba.mail.folder.temp" ) ; protected HeaderList headerList ; protected Hashtable messageList ; protected int nextUid = 0 ; protected ColumbaMessage aktMessage ; public TempFolder ( String path ) { } public void clear ( ) { } public Object [ ] getUids ( ) throws Exception { } protected Object generateNextUid ( ) { } public void setNextUid ( int next ) { } public boolean exists ( Object uid ) throws Exception { } public HeaderList getHeaderList ( ) throws Exception { } protected void removeMessage ( Object uid ) throws Exception { } public MimePart getMimePart ( Object uid , Integer [ ] address ) throws Exception { } public MimeTree getMimePartTree ( Object uid ) throws Exception { } public ColumbaHeader getMessageHeader ( Object uid ) throws Exception { } public ColumbaMessage getMessage ( Object uid ) throws Exception { } public Object [ ] searchMessages ( Filter filter , Object [ ] uids ) throws Exception { } public Object [ ] searchMessages ( Filter filter ) throws Exception { } public String getDefaultChild ( ) { } public String getName ( ) { } public String toString ( ) { } public void innerCopy ( MailboxInterface destFolder , Object [ ] uids ) throws Exception { } public Object addMessage ( InputStream in , Attributes attributes , Flags flags ) throws Exception { <START_BUG> Message message = MessageParser . parse ( TempSourceFactory . createTempSource ( in , ( - 1 ) , null ) ) ; <END_BUG> Object newUid = generateNextUid ( ) ; TempFolder . LOG . info ( ( "new<seq2seq4repair_space>UID=" + newUid ) ) ; ColumbaHeader h = new ColumbaHeader ( message . getHeader ( ) ) ; if ( attributes != null ) { h . setAttributes ( ( ( Attributes ) ( attributes . clone ( ) ) ) ) ; } if ( flags != null ) { h . setFlags ( ( ( Flags ) ( flags . clone ( ) ) ) ) ; } h . set ( "columba.uid" , newUid ) ; headerList . add ( h , newUid ) ; messageList . put ( newUid , new ColumbaMessage ( h , message ) ) ; fireMessageAdded ( newUid ) ; return newUid ; } public Object getAttribute ( Object uid , String key ) throws Exception { } public Flags getFlags ( Object uid ) throws Exception { } public Attributes getAttributes ( Object uid ) throws Exception { } public Header getHeaderFields ( Object uid , String [ ] keys ) throws Exception { } public InputStream getMessageSourceStream ( Object uid ) throws Exception { } public InputStream getMimePartBodyStream ( Object uid , Integer [ ] address ) throws Exception { } public InputStream getMimePartSourceStream ( Object uid , Integer [ ] address ) throws Exception { } public void setAttribute ( Object uid , String key , Object value ) throws Exception { } public Object addMessage ( InputStream in ) throws Exception { } public Object addMessage ( ColumbaMessage message ) throws Exception { } public HeaderListStorage getHeaderListStorage ( ) { } public void removeFolder ( ) throws Exception { } }

Fix:
Message message = MessageParser . parse ( TempSourceFactory . createTempSource ( in , ( - 1 ) ) ) ;
Buggy code:
public abstract class CreateTypeMemberOperation extends CreateElementInCUOperation { protected String source = null ; protected String alteredName ; protected ASTNode createdNode ; public CreateTypeMemberOperation ( IJavaElement parentElement , String source , boolean force ) { } protected StructuralPropertyDescriptor getChildPropertyDescriptor ( ASTNode parent ) { } protected ASTNode generateElementAST ( ASTRewrite rewriter , IDocument document , ICompilationUnit cu ) throws JavaModelException { } private String removeIndentAndNewLines ( String code , IDocument document , ICompilationUnit cu ) { IJavaProject project = cu . getJavaProject ( ) ; Map options = project . getOptions ( true ) ; int tabWidth ; try { <START_BUG> tabWidth = Integer . parseInt ( ( ( String ) ( options . get ( DefaultCodeFormatterConstants . FORMATTER_INDENTATION_SIZE ) ) ) ) ; <END_BUG> } catch ( NumberFormatException e ) { tabWidth = 4 ; } int indent = Indents . computeIndent ( code , tabWidth ) ; int firstNonWhiteSpace = - 1 ; int length = code . length ( ) ; while ( firstNonWhiteSpace < ( length - 1 ) ) if ( ! ( Character . isWhitespace ( code . charAt ( ( ++ firstNonWhiteSpace ) ) ) ) ) break ; int lastNonWhiteSpace = length ; while ( lastNonWhiteSpace > 0 ) if ( ! ( Character . isWhitespace ( code . charAt ( ( -- lastNonWhiteSpace ) ) ) ) ) break ; String lineDelimiter = TextUtilities . getDefaultLineDelimiter ( document ) ; return Indents . changeIndent ( code . substring ( firstNonWhiteSpace , ( lastNonWhiteSpace + 1 ) ) , indent , tabWidth , "" , lineDelimiter ) ; } protected abstract SimpleName rename ( ASTNode node , SimpleName newName ) { } protected String generateSyntaxIncorrectAST ( ) { } protected IType getType ( ) { } protected void setAlteredName ( String newName ) { } public IJavaModelStatus verify ( ) { } protected IJavaModelStatus verifyNameCollision ( ) { } }

Fix:
tabWidth = Integer . parseInt ( ( ( String ) ( options . get ( FORMATTER_TAB_LENGTH ) ) ) ) ;
Buggy code:
public class SimpleAdapter extends UltimateViewAdapter { private List < String > stringList ; public SimpleAdapter ( List < String > stringList ) { } @ Override public void onBindViewHolder ( RecyclerView . ViewHolder holder , int position ) { <START_BUG> if ( ( position < ( stringList . size ( ) ) ) && ( position != 0 ) ) { <END_BUG> ( ( SimpleAdapter . ViewHolder ) ( holder ) ) . textViewSample . setText ( stringList . get ( position ) ) ; } } @ Override public int getAdapterItemCount ( ) { } @ Override public RecyclerView . ViewHolder onCreateViewHolder ( ViewGroup parent ) { } public void insert ( String string , int position ) { } public void remove ( int position ) { } public void clear ( ) { } @ Override public void toggleSelection ( int pos ) { } @ Override public void setSelected ( int pos ) { } @ Override public void clearSelection ( int pos ) { } public void swapPositions ( int from , int to ) { } class ViewHolder extends RecyclerView . ViewHolder { TextView textViewSample ; ImageView imageViewSample ; ProgressBar progressBarSample ; public ViewHolder ( View itemView ) { } } }

Fix:
if ( ( position < ( stringList . size ( ) ) ) && ( ( customHeaderView ) != null ? position != 0 : true ) ) {