nus-yam/ex-repair huggingface dataset:
Buggy code:
public class LDAPrintTopics { private static class StringDoublePair implements Comparable < LDAPrintTopics . StringDoublePair > { private final double score ; private final String word ; StringDoublePair ( double score , String word ) { } @ Override public int compareTo ( LDAPrintTopics . StringDoublePair other ) { } @ Override public boolean equals ( Object o ) { } @ Override public int hashCode ( ) { } } private static void ensureQueueSize ( List < PriorityQueue < LDAPrintTopics . StringDoublePair > > queues , int k ) { } public static void main ( String [ ] args ) throws Exception { } private static void maybeEnqueue ( Queue < LDAPrintTopics . StringDoublePair > q , String word , double score , int numWordsToPrint ) { } private static void printTopWords ( List < List < String > > topWords ) { } public static List < List < String > > topWordsForTopics ( String dir , Configuration job , List < String > wordList , int numWordsToPrint ) throws IOException { FileSystem fs = new Path ( dir ) . getFileSystem ( job ) ; List < PriorityQueue < LDAPrintTopics . StringDoublePair > > queues = new ArrayList < PriorityQueue < LDAPrintTopics . StringDoublePair > > ( ) ; IntPairWritable key = new IntPairWritable ( ) ; DoubleWritable value = new DoubleWritable ( ) ; <START_BUG> for ( FileStatus status : fs . globStatus ( new Path ( dir , "*" ) ) ) { <END_BUG> Path path = status . getPath ( ) ; SequenceFile . Reader reader = new SequenceFile . Reader ( fs , path , job ) ; while ( reader . next ( key , value ) ) { int topic = key . getFirst ( ) ; int word = key . getSecond ( ) ; LDAPrintTopics . ensureQueueSize ( queues , topic ) ; if ( ( word >= 0 ) && ( topic >= 0 ) ) { double score = value . get ( ) ; String realWord = wordList . get ( word ) ; LDAPrintTopics . maybeEnqueue ( queues . get ( topic ) , realWord , score , numWordsToPrint ) ; } } reader . close ( ) ; } List < List < String > > result = new ArrayList < List < String > > ( ) ; for ( int i = 0 ; i < ( queues . size ( ) ) ; ++ i ) { result . add ( i , new LinkedList < String > ( ) ) ; for ( LDAPrintTopics . StringDoublePair sdp : queues . get ( i ) ) { result . get ( i ) . add ( 0 , sdp . word ) ; } } return result ; } private static void writeTopWords ( List < List < String > > topWords , File output ) throws IOException { } private LDAPrintTopics ( ) { } }

Fix:
for ( FileStatus status : fs . globStatus ( new Path ( dir , "part-*" ) ) ) {
Buggy code:
public class CircleTitleBar extends RelativeLayout { private ViewGroup leftButton ; private ViewGroup rightButton ; private TextView textView ; private TextView leftTextView ; private TextView rightTextView ; private ImageView leftImageView ; private ImageView rightImageView ; public CircleTitleBar ( Context context ) { } public CircleTitleBar ( Context context , AttributeSet attrs ) { } private void init ( ) { } public void setText ( String text ) { } public void setLeftButton ( String leftText , int resourceId , OnClickListener leftClick ) { if ( ! ( TextUtils . isEmpty ( leftText ) ) ) { this . leftTextView . setVisibility ( VISIBLE ) ; this . leftTextView . setText ( leftText ) ; } if ( resourceId > 0 ) { <START_BUG> this . leftImageView . setImageResource ( resourceId ) ; <END_BUG> } this . leftButton . setOnClickListener ( leftClick ) ; } public void setRightButton ( String rightText , int resourceId , OnClickListener rightClick ) { } public void hideRight ( ) { } public void showRight ( ) { } public void hideAll ( ) { } }

Fix:
this . leftImageView . setBackgroundResource ( resourceId ) ;
Buggy code:
public class MockHttpOutputMessage implements HttpOutputMessage { private static final Charset DEFAULT_CHARSET = Charset . forName ( "UTF-8" ) ; private final HttpHeaders headers = new HttpHeaders ( ) ; private final ByteArrayOutputStream body = new ByteArrayOutputStream ( 1024 ) ; @ Override public HttpHeaders getHeaders ( ) { } @ Override public OutputStream getBody ( ) throws IOException { } public byte [ ] getBodyAsBytes ( ) { } public String getBodyAsString ( ) { } public String getBodyAsString ( Charset charset ) { byte [ ] bytes = getBodyAsBytes ( ) ; try { return new String ( bytes , charset . name ( ) ) ; } catch ( UnsupportedEncodingException ex ) { <START_BUG> throw new InternalError ( ex . getMessage ( ) ) ; <END_BUG> } } }

Fix:
throw new IllegalStateException ( ex ) ;
Buggy code:
public class Tagger { float [ ] [ ] bigramScore ; float [ ] [ ] [ ] trigramScore ; public AveragedPerceptron perceptron ; IndexMaps maps ; public boolean useBeamSearch ; public int beamSize ; public Tagger ( String modelPath ) throws Exception { } public String [ ] tag ( final String line , final String delim , final boolean usePartialInfo ) { } public static int [ ] tag ( final Sentence sentence , final AveragedPerceptron classifier , final boolean isDecode , final boolean useBeamSearch , final int beamSize , final boolean usePartialInfo ) { } public int [ ] tag ( final Sentence sentence , final boolean usePartialInfo ) { } public Pair < int [ ] , Float > tagWithScore ( final Sentence sentence , final boolean usePartialInfo ) { } public void tag ( final String inputPath , final String outputPath , final String delim , final String scoreFile ) throws Exception { BufferedReader reader = new BufferedReader ( new FileReader ( inputPath ) ) ; BufferedWriter writer = new BufferedWriter ( new FileWriter ( outputPath ) ) ; boolean putScore = false ; BufferedWriter scoreWriter = null ; <START_BUG> if ( ( scoreFile != null ) & ( ! ( scoreFile . equals ( "" ) ) ) ) { <END_BUG> putScore = true ; scoreWriter = new BufferedWriter ( new FileWriter ( scoreFile ) ) ; } int ln = 0 ; String line ; while ( ( line = reader . readLine ( ) ) != null ) { ln ++ ; if ( ( ln % 1000 ) == 0 ) System . out . print ( ( ln + "..." ) ) ; String [ ] flds = line . trim ( ) . split ( "<seq2seq4repair_space>" ) ; ArrayList < String > words = new ArrayList < String > ( flds . length ) ; for ( int i = 0 ; i < ( flds . length ) ; i ++ ) { if ( ( flds [ i ] . trim ( ) . length ( ) ) == 0 ) continue ; words . add ( flds [ i ] . trim ( ) ) ; } Sentence sentence = new Sentence ( words , maps ) ; Pair < int [ ] , Float > ts = tagWithScore ( sentence , false ) ; int [ ] t = ts . first ; String [ ] tags = new String [ t . length ] ; for ( int i = 0 ; i < ( tags . length ) ; i ++ ) tags [ i ] = maps . reversedMap [ t [ i ] ] ; StringBuilder output = new StringBuilder ( ) ; for ( int i = 0 ; i < ( tags . length ) ; i ++ ) { output . append ( ( ( ( ( words . get ( i ) ) + delim ) + ( tags [ i ] ) ) + "<seq2seq4repair_space>" ) ) ; } writer . write ( ( ( output . toString ( ) . trim ( ) ) + "\n" ) ) ; if ( putScore ) { float normalizedScore = ( ts . second ) // ( tags . length ) ; scoreWriter . write ( ( normalizedScore + "\n" ) ) ; } } System . out . print ( ( ln + "\n" ) ) ; writer . flush ( ) ; writer . close ( ) ; scoreWriter . flush ( ) ; scoreWriter . close ( ) ; } public ArrayList < Pair < String [ ] , Float > > getPossibleTagReplacements ( Sentence sentence ) { } public void partialTag ( final String inputPath , final String outputPath , final String delim , String scoreFile ) throws Exception { } public IndexMaps getMaps ( ) { } }

Fix:
if ( ( scoreFile != null ) && ( ! ( scoreFile . equals ( "" ) ) ) ) {
Buggy code:
public class EclipseSourceType extends ResolvedTypeX . ConcreteName { protected ResolvedPointcutDefinition [ ] declaredPointcuts = null ; protected ResolvedMember [ ] declaredMethods = null ; protected ResolvedMember [ ] declaredFields = null ; public List declares = new ArrayList ( ) ; public List typeMungers = new ArrayList ( ) ; private EclipseFactory factory ; private SourceTypeBinding binding ; private TypeDeclaration declaration ; protected EclipseFactory eclipseWorld ( ) { } public EclipseSourceType ( ResolvedTypeX . Name resolvedTypeX , EclipseFactory factory , SourceTypeBinding binding , TypeDeclaration declaration ) { } public boolean isAspect ( ) { } public WeaverStateInfo getWeaverState ( ) { } public ResolvedTypeX getSuperclass ( ) { } public ResolvedTypeX [ ] getDeclaredInterfaces ( ) { } protected void fillDeclaredMembers ( ) { } public ResolvedMember [ ] getDeclaredFields ( ) { } public ResolvedMember [ ] getDeclaredMethods ( ) { } public ResolvedMember [ ] getDeclaredPointcuts ( ) { } public int getModifiers ( ) { } public String toString ( ) { } public void checkPointcutDeclarations ( ) { } public boolean isInterface ( ) { } public static final short ACC_ANNOTATION = 8192 ; public static final short ACC_ENUM = 16384 ; public boolean isEnum ( ) { } public boolean isAnnotation ( ) { } <START_BUG> public boolean hasAnnotation ( ResolvedTypeX ofType ) { <END_BUG> throw new RuntimeException ( "How<seq2seq4repair_space>to<seq2seq4repair_space>implement<seq2seq4repair_space>this?<seq2seq4repair_space>Needs<seq2seq4repair_space>to<seq2seq4repair_space>ask<seq2seq4repair_space>eclipse!" ) ; } public ResolvedTypeX [ ] getAnnotationTypes ( ) { } public PerClause getPerClause ( ) { } protected Collection getDeclares ( ) { } protected Collection getPrivilegedAccesses ( ) { } protected Collection getTypeMungers ( ) { } public boolean doesNotExposeShadowMungers ( ) { } }

Fix:
public boolean hasAnnotation ( TypeX ofType ) {
Buggy code:
public class MutableShort extends Number implements Comparable < MutableShort > , Mutable < Number > { private static final long serialVersionUID = - 2135791679L ; private short value ; public MutableShort ( ) { } public MutableShort ( short value ) { } public MutableShort ( Number value ) { } public MutableShort ( String value ) throws NumberFormatException { } public Short getValue ( ) { <START_BUG> return new Short ( this . value ) ; <END_BUG> } public void setValue ( short value ) { } public void setValue ( Number value ) { } public void increment ( ) { } public void decrement ( ) { } public void add ( short operand ) { } public void add ( Number operand ) { } public void subtract ( short operand ) { } public void subtract ( Number operand ) { } @ Override public short shortValue ( ) { } @ Override public int intValue ( ) { } @ Override public long longValue ( ) { } @ Override public float floatValue ( ) { } @ Override public double doubleValue ( ) { } public Short toShort ( ) { } @ Override public boolean equals ( Object obj ) { } @ Override public int hashCode ( ) { } public int compareTo ( MutableShort other ) { } @ Override public String toString ( ) { } }

Fix:
return Short . valueOf ( this . value ) ;
Buggy code:
public class GoogleTest extends TestCase { private Selenium browser ; public void setUp ( ) { <START_BUG> browser = new DefaultSelenium ( "localhost" , 4444 , "foo:*firefox" , "http:////www.google.com" ) ; <END_BUG> browser . start ( ) ; } public void testGoogle ( ) { } public void tearDown ( ) { } }

Fix:
browser = new DefaultSelenium ( "localhost" , 4444 , "*firefox" , "http:////www.google.com" ) ;
Buggy code:
public class TrunkResponse { private static final Logger log = Logger . getLogger ( TrunkResponse . class ) ; static final byte RESULT_VOID = 1 ; static final byte RESULT_OBJECT = 2 ; static final byte RESULT_EXCEPTION = 3 ; private static ClassLoader classLoader = TunkRequest . class . getClassLoader ( ) ; public Integer correlationRequestId ; public MarshalledObject result ; public MarshalledObject exception ; public TrunkResponse ( ) { } public TrunkResponse ( TunkRequest request ) { } public Object evalThrowsException ( ) throws Exception { } public Object evalThrowsThrowable ( ) throws Throwable { } public byte [ ] serialize ( ) throws IOException { <START_BUG> ByteArrayOutputStream baos = new ByteArrayOutputStream ( ) ; <END_BUG> ObjectOutputStream out = new CustomObjectOutputStream ( baos ) ; if ( ( correlationRequestId ) == null ) { out . writeByte ( 0 ) ; } else { out . writeByte ( 1 ) ; out . writeInt ( correlationRequestId . intValue ( ) ) ; } if ( ( exception ) != null ) { out . writeByte ( TrunkResponse . RESULT_EXCEPTION ) ; out . writeObject ( exception ) ; } else if ( ( result ) == null ) { out . writeByte ( TrunkResponse . RESULT_VOID ) ; } else { out . writeByte ( TrunkResponse . RESULT_OBJECT ) ; out . writeObject ( result ) ; } out . close ( ) ; return baos . toByteArray ( ) ; } public void deserialize ( byte [ ] data ) throws IOException , ClassNotFoundException { } public String toString ( ) { } }

Fix:
ByteArrayOutputStream baos = new ByteArrayOutputStream ( 1000 ) ;
Buggy code:
public class HOM2 extends Application { GameController gameController ; NavigationController navController ; BattleController btlController ; SceneController sceneController ; GameMap gameMap ; CharacterRepository characterRepo ; CharacterFactory characterFactory ; @ Override public void start ( Stage stage ) throws Exception { FXMLLoader fxmlLoader = new FXMLLoader ( getClass ( ) . getResource ( "FXML.fxml" ) ) ; Scene scene = new Scene ( ( ( Parent ) ( fxmlLoader . load ( ) ) ) ) ; this . sceneController = fxmlLoader . getController ( ) ; stage . setScene ( scene ) ; stage . setResizable ( false ) ; sceneController . setNavController ( navController ) ; sceneController . setBattleController ( btlController ) ; this . gameController = new GameController ( ) ; this . gameMap = new GameMap ( gameController ) ; this . btlController = new BattleController ( ) ; this . characterRepo = new CharacterRepository ( ) ; this . characterFactory = new CharacterFactory ( gameController ) ; this . navController = new NavigationController ( gameController ) ; gameController . setSceneController ( sceneController ) ; gameController . setNavController ( navController ) ; gameController . setBtlController ( btlController ) ; gameController . setCharacterRepo ( characterRepo ) ; gameController . setCharacterFactory ( characterFactory ) ; gameController . setGameMap ( gameMap ) ; gameController . gameInit ( ) ; HOM2 . MainKeyHandler mainKeyHandler = new HOM2 . MainKeyHandler ( navController ) ; <START_BUG> scene . setOnKeyPressed ( mainKeyHandler ) ; <END_BUG> stage . show ( ) ; sceneController . initMap ( ) ; } private class MainKeyHandler implements EventHandler < KeyEvent > { NavigationController navController ; public MainKeyHandler ( NavigationController nv ) { } @ Override public void handle ( KeyEvent event ) { } } public static void main ( String [ ] args ) { } }

Fix:
scene . setOnKeyReleased ( mainKeyHandler ) ;
Buggy code:
public class CmdSethome implements UltimateCommand { @ Override public String getName ( ) { } @ Override public String getPermission ( ) { } @ Override public List < String > getAliases ( ) { } @ Override public void run ( final CommandSender cs , String label , String [ ] args ) { if ( ! ( r . isPlayer ( cs ) ) ) { return ; } Player p = ( ( Player ) ( cs ) ) ; if ( ! ( r . perm ( p , "uc.sethome" , true , true ) ) ) { return ; } if ( ( r . checkArgs ( args , 0 ) ) && ( args [ 0 ] . contains ( ":" ) ) ) { if ( ! ( r . perm ( p , "uc.sethome.others" , true , true ) ) ) { return ; } OfflinePlayer t = r . searchOfflinePlayer ( args [ 0 ] . split ( ":" ) [ 0 ] ) ; if ( ( t == null ) || ( ( ! ( t . hasPlayedBefore ( ) ) ) && ( ! ( t . isOnline ( ) ) ) ) ) { r . sendMes ( cs , "playerNotFound" , "%Player" , args [ 0 ] . split ( ":" ) [ 0 ] ) ; return ; } List < String > homes = UC . getPlayer ( t ) . getHomeNames ( ) ; if ( homes . contains ( args [ 0 ] ) ) { r . sendMes ( cs , "sethomeMoved" , "%Home" , args [ 0 ] ) ; } else { r . sendMes ( cs , "sethomeSet" , "%Home" , args [ 0 ] ) ; } if ( ! ( homes . contains ( args [ 0 ] . toLowerCase ( ) . split ( ":" ) [ 1 ] ) ) ) { homes . add ( args [ 0 ] . toLowerCase ( ) . split ( ":" ) [ 1 ] ) ; } UC . getPlayer ( t ) . addHome ( args [ 0 ] . toLowerCase ( ) . split ( ":" ) [ 1 ] , p . getLocation ( ) ) ; return ; } Set < String > multihomes = r . getCnfg ( ) . getConfigurationSection ( "Command.HomeLimits" ) . getKeys ( false ) ; Integer limit = 1 ; if ( multihomes != null ) { for ( String s : multihomes ) { if ( r . perm ( cs , ( "uc.sethome." + ( s . toLowerCase ( ) ) ) , false , false ) ) { <START_BUG> if ( limit > ( r . getCnfg ( ) . getInt ( ( "Command.HomeLimits." + s ) ) ) ) { <END_BUG> limit = r . getCnfg ( ) . getInt ( ( "Command.HomeLimits." + s ) ) ; } } } } if ( r . perm ( cs , "uc.sethome.unlimited" , false , false ) ) { limit = 999999 ; } List < String > homes = UC . getPlayer ( p ) . getHomeNames ( ) ; if ( ( homes . size ( ) ) >= limit ) { r . sendMes ( cs , "sethomeMax" , "%Limit" , "%Limit" , limit ) ; return ; } String name = ( r . checkArgs ( args , 0 ) ) ? args [ 0 ] : "home" ; if ( homes . contains ( name ) ) { r . sendMes ( cs , "sethomeMoved" , "%Home" , name ) ; } else { r . sendMes ( cs , "sethomeSet" , "%Home" , name ) ; } if ( ! ( homes . contains ( name . toLowerCase ( ) ) ) ) { homes . add ( name . toLowerCase ( ) ) ; } UC . getPlayer ( p ) . addHome ( name . toLowerCase ( ) , p . getLocation ( ) ) ; } @ Override public List < String > onTabComplete ( CommandSender cs , Command cmd , String alias , String [ ] args , String curs , Integer curn ) { } }

Fix:
if ( limit < ( r . getCnfg ( ) . getInt ( ( "Command.HomeLimits." + s ) ) ) ) {
Buggy code:
public final class ThreadFactoryRemove extends AbstractThreadsSubsystemUpdate < Void > { private static final long serialVersionUID = - 6232099966839106128L ; private final String name ; public ThreadFactoryRemove ( final String name ) { } public ThreadFactoryAdd getCompensatingUpdate ( final ThreadsSubsystemElement original ) { } protected < P > void applyUpdate ( final UpdateContext updateContext , final UpdateResultHandler < ? super Void , P > handler , final P param ) { <START_BUG> final ServiceController < ? > controller = updateContext . getServiceContainer ( ) . getService ( Services . threadFactoryName ( name ) ) ; <END_BUG> if ( controller == null ) { handler . handleSuccess ( null , param ) ; } else { controller . addListener ( new UpdateResultHandler . ServiceRemoveListener < P > ( handler , param ) ) ; controller . setMode ( REMOVE ) ; } } protected void applyUpdate ( final ThreadsSubsystemElement element ) throws UpdateFailedException { } public String getName ( ) { } }

Fix:
final ServiceController < ? > controller = updateContext . getServiceContainer ( ) . getService ( ThreadsServices . threadFactoryName ( name ) ) ;
Buggy code:
public class AddColumnGenerator extends AbstractSqlGenerator < AddColumnStatement > { public ValidationErrors validate ( AddColumnStatement statement , Database database , SqlGeneratorChain sqlGeneratorChain ) { } public Sql [ ] generateSql ( AddColumnStatement statement , Database database , SqlGeneratorChain sqlGeneratorChain ) { } protected void addForeignKeyStatements ( AddColumnStatement statement , Database database , List < Sql > returnSql ) { for ( ColumnConstraint constraint : statement . getConstraints ( ) ) { if ( constraint instanceof ForeignKeyConstraint ) { ForeignKeyConstraint fkConstraint = ( ( ForeignKeyConstraint ) ( constraint ) ) ; Matcher referencesMatcher = Pattern . compile ( "([\\w\\._]+)\\(([\\w_]+)\\)" ) . matcher ( fkConstraint . getReferences ( ) ) ; if ( ! ( referencesMatcher . matches ( ) ) ) { throw new liquibase . exception . UnexpectedLiquibaseException ( ( "Don't<seq2seq4repair_space>know<seq2seq4repair_space>how<seq2seq4repair_space>to<seq2seq4repair_space>find<seq2seq4repair_space>table<seq2seq4repair_space>and<seq2seq4repair_space>column<seq2seq4repair_space>names<seq2seq4repair_space>from<seq2seq4repair_space>" + ( fkConstraint . getReferences ( ) ) ) ) ; } String refSchemaName = null ; String refTableName = referencesMatcher . group ( 1 ) ; if ( ( refTableName . indexOf ( "." ) ) > 0 ) { refSchemaName = refTableName . split ( "\\." ) [ 0 ] ; <START_BUG> refTableName = refTableName . split ( "\\." ) [ 0 ] ; <END_BUG> } String refColName = referencesMatcher . group ( 2 ) ; AddForeignKeyConstraintStatement addForeignKeyConstraintStatement = new AddForeignKeyConstraintStatement ( fkConstraint . getForeignKeyName ( ) , statement . getSchemaName ( ) , statement . getTableName ( ) , statement . getColumnName ( ) , refSchemaName , refTableName , refColName ) ; returnSql . addAll ( Arrays . asList ( SqlGeneratorFactory . getInstance ( ) . generateSql ( addForeignKeyConstraintStatement , database ) ) ) ; } } } private String getDefaultClause ( AddColumnStatement statement , Database database ) { } }

Fix:
refTableName = refTableName . split ( "\\." ) [ 1 ] ;
Buggy code:
public class CircularFifoQueue < E > extends AbstractCollection < E > implements Serializable , Queue < E > , BoundedCollection < E > { private static final long serialVersionUID = - 8423413834657610406L ; private transient E [ ] elements ; private transient int start = 0 ; private transient int end = 0 ; private transient boolean full = false ; private final int maxElements ; public CircularFifoQueue ( ) { } @ SuppressWarnings ( "unchecked" ) public CircularFifoQueue ( final int size ) { } public CircularFifoQueue ( final Collection < E > coll ) { } private void writeObject ( final ObjectOutputStream out ) throws IOException { } @ SuppressWarnings ( "unchecked" ) private void readObject ( final ObjectInputStream in ) throws IOException , ClassNotFoundException { } @ Override public int size ( ) { } @ Override public boolean isEmpty ( ) { } public boolean isFull ( ) { } private boolean isAtFullCapacity ( ) { } public int maxSize ( ) { } @ Override public void clear ( ) { } @ Override public boolean add ( final E element ) { } public E get ( final int index ) { final int sz = size ( ) ; if ( ( index < 0 ) || ( index >= sz ) ) { <START_BUG> throw new NoSuchElementException ( String . format ( "The<seq2seq4repair_space>specified<seq2seq4repair_space>index<seq2seq4repair_space>(%1$d)<seq2seq4repair_space>is<seq2seq4repair_space>outside<seq2seq4repair_space>the<seq2seq4repair_space>available<seq2seq4repair_space>range<seq2seq4repair_space>[0,<seq2seq4repair_space>%2$d)" , index , sz ) ) ; <END_BUG> } final int idx = ( ( start ) + index ) % ( maxElements ) ; return elements [ idx ] ; } public boolean offer ( E element ) { } public E poll ( ) { } public E element ( ) { } public E peek ( ) { } public E remove ( ) { } private int increment ( int index ) { } private int decrement ( int index ) { } @ Override public Iterator < E > iterator ( ) { } }

Fix:
throw new NoSuchElementException ( String . format ( "The<seq2seq4repair_space>specified<seq2seq4repair_space>index<seq2seq4repair_space>(%1$d)<seq2seq4repair_space>is<seq2seq4repair_space>outside<seq2seq4repair_space>the<seq2seq4repair_space>available<seq2seq4repair_space>range<seq2seq4repair_space>[0,<seq2seq4repair_space>%2$d)" , Integer . valueOf ( index ) , Integer . valueOf ( sz ) ) ) ;
Buggy code:
public class HorizontalBarChartActivity extends DemoBase implements OnSeekBarChangeListener , OnChartValueSelectedListener { protected HorizontalBarChart mChart ; private SeekBar mSeekBarX ; private SeekBar mSeekBarY ; private TextView tvX ; private TextView tvY ; @ Override protected void onCreate ( Bundle savedInstanceState ) { } @ Override public void onProgressChanged ( SeekBar seekBar , int progress , boolean fromUser ) { tvX . setText ( ( "" + ( ( mSeekBarX . getProgress ( ) ) + 1 ) ) ) ; tvY . setText ( ( "" + ( mSeekBarY . getProgress ( ) ) ) ) ; <START_BUG> setData ( mSeekBarX . getProgress ( ) , mSeekBarY . getProgress ( ) ) ; <END_BUG> mChart . invalidate ( ) ; } @ Override public void onStartTrackingTouch ( SeekBar seekBar ) { } @ Override public void onStopTrackingTouch ( SeekBar seekBar ) { } private void setData ( int count , float range ) { } @ SuppressLint ( "NewApi" ) @ Override public void onValueSelected ( Entry e , int dataSetIndex ) { } public void onNothingSelected ( ) { } }

Fix:
setData ( ( ( mSeekBarX . getProgress ( ) ) + 1 ) , mSeekBarY . getProgress ( ) ) ;
Buggy code:
public class SimplePageTest extends WicketTestCase { private static final Logger log = LoggerFactory . getLogger ( SimplePageTest . class ) ; public SimplePageTest ( String name ) { } public void testRenderHomePage ( ) throws Exception { } public void testRenderHomePage_2 ( ) throws Exception { } public void testRenderHomePage_2a ( ) throws Exception { } public void testRenderHomePage_2b ( ) throws Exception { } public void testRenderHomePage_3 ( ) throws Exception { } public void testRenderHomePage_4 ( ) throws Exception { boolean hit = false ; try { executeTest ( SimplePage_4 . class , "SimplePageExpectedResult_4.html" ) ; } catch ( MarkupException mex ) { hit = true ; assertNotNull ( mex . getMarkupStream ( ) ) ; assertTrue ( mex . getMessage ( ) . contains ( "<span>" ) ) ; <START_BUG> assertTrue ( mex . getMessage ( ) . contains ( "SimplePage_4.html" ) ) ; <END_BUG> } assertTrue ( "Did<seq2seq4repair_space>expect<seq2seq4repair_space>a<seq2seq4repair_space>MarkupException" , hit ) ; } public void testRenderHomePage_5 ( ) throws Exception { } public void testRenderHomePage_6 ( ) throws Exception { } public void testRenderHomePage_7 ( ) throws Exception { } public void testRenderHomePage_8 ( ) throws Exception { } public void testRenderHomePage_9 ( ) throws Exception { } public void testRenderHomePage_10 ( ) throws Exception { } public void testRenderHomePage_11 ( ) throws Exception { } public void testRenderHomePage_12 ( ) throws Exception { } public void testRenderHomePage_13 ( ) throws Exception { } public void testRenderHomePage_14 ( ) throws Exception { } public void testRenderHomePage_15 ( ) throws Exception { } public void testRenderHomePage_16 ( ) throws Exception { } }

Fix:
assertTrue ( mex . toString ( ) . contains ( "SimplePage_4.html" ) ) ;
Buggy code:
public class OversampleWithDepthTest extends LuceneTestCase { @ Test public void testCountWithdepthUsingSampling ( ) throws IOException , Exception { Directory indexDir = newDirectory ( ) ; Directory taxoDir = newDirectory ( ) ; index100Docs ( indexDir , taxoDir ) ; DirectoryReader r = DirectoryReader . open ( indexDir ) ; TaxonomyReader tr = new org . apache . lucene . facet . taxonomy . directory . DirectoryTaxonomyReader ( taxoDir ) ; FacetSearchParams fsp = new FacetSearchParams ( ) ; CountFacetRequest facetRequest = new CountFacetRequest ( new CategoryPath ( "root" ) , 10 ) ; facetRequest . setDepth ( 2 ) ; facetRequest . setResultMode ( PER_NODE_IN_TREE ) ; fsp . addFacetRequest ( facetRequest ) ; final SamplingParams params = new SamplingParams ( ) ; params . setMinSampleSize ( 2 ) ; params . setMaxSampleSize ( 50 ) ; params . setOversampleFactor ( 5 ) ; <START_BUG> params . setSampingThreshold ( 60 ) ; <END_BUG> params . setSampleRatio ( 0.1 ) ; FacetResult res = searchWithFacets ( r , tr , fsp , params ) ; FacetRequest req = res . getFacetRequest ( ) ; assertEquals ( facetRequest , req ) ; FacetResultNode rootNode = res . getFacetResultNode ( ) ; for ( FacetResultNode node : rootNode . getSubResults ( ) ) { assertTrue ( ( ( "node<seq2seq4repair_space>" + ( node . getLabel ( ) ) ) + "<seq2seq4repair_space>should<seq2seq4repair_space>have<seq2seq4repair_space>had<seq2seq4repair_space>children<seq2seq4repair_space>as<seq2seq4repair_space>the<seq2seq4repair_space>requested<seq2seq4repair_space>depth<seq2seq4repair_space>was<seq2seq4repair_space>'2'" ) , ( ( node . getNumSubResults ( ) ) > 0 ) ) ; } IOUtils . close ( r , tr , indexDir , taxoDir ) ; } private void index100Docs ( Directory indexDir , Directory taxoDir ) throws IOException , CorruptIndexException , LockObtainFailedException { } private FacetResult searchWithFacets ( IndexReader r , TaxonomyReader tr , FacetSearchParams fsp , final SamplingParams params ) throws IOException { } }

Fix:
params . setSamplingThreshold ( 60 ) ;
Buggy code:
public class ServerNetworkListener extends Listener { private RServer server ; private DualHashBidiMap < Integer , Connection > clients = new DualHashBidiMap < Integer , Connection > ( ) ; private HashMap < Integer , Integer > playerIdTypeMap = new HashMap < Integer , Integer > ( ) ; private int id = 0 ; public void init ( RServer server ) { } @ Override public void connected ( Connection connection ) { Log . info ( "Server:<seq2seq4repair_space>Someone<seq2seq4repair_space>is<seq2seq4repair_space>connecting." ) ; Packet . Packet0PlayerID p1 = new Packet . Packet0PlayerID ( ) ; Packet . Packet0PlayerTypeIdMap p2 = new Packet . Packet0PlayerTypeIdMap ( ) ; ( id ) ++ ; clients . put ( id , connection ) ; playerIdTypeMap . put ( id , ( - 1 ) ) ; p1 . id = id ; p2 . map = playerIdTypeMap ; for ( Connection c : clients . values ( ) ) { if ( c . equals ( connection ) ) { c . sendTCP ( p1 ) ; } c . sendTCP ( p2 ) ; } for ( Connection c : clients . values ( ) ) { <START_BUG> if ( ( playerIdTypeMap . keySet ( ) . size ( ) ) > 0 ) { <END_BUG> c . sendTCP ( new Packet . Packet0Start ( ) ) ; } } server . startGame ( playerIdTypeMap ) ; Log . info ( playerIdTypeMap . toString ( ) ) ; } @ Override public void disconnected ( Connection connection ) { } @ Override public void received ( Connection connection , Object object ) { } }

Fix:
if ( ( playerIdTypeMap . keySet ( ) . size ( ) ) > 1 ) {
Buggy code:
public class PermissionsService { private DatabaseService databaseService ; public PermissionsService ( DatabaseService databaseService ) { } public boolean hasPermission ( User user , String permission ) { if ( user == null ) throw new IllegalArgumentException ( "User<seq2seq4repair_space>cannot<seq2seq4repair_space>be<seq2seq4repair_space>null" ) ; if ( permission == null ) throw new IllegalArgumentException ( "Permission<seq2seq4repair_space>cannot<seq2seq4repair_space>be<seq2seq4repair_space>null" ) ; String realName = getAuthedAs ( user ) ; Connection connection = null ; try { connection = databaseService . getConnection ( ) ; PreparedStatement statement = connection . prepareStatement ( "SELECT<seq2seq4repair_space>P.`DefaultValue`,<seq2seq4repair_space>IFNULL((SELECT<seq2seq4repair_space>UP.`Value`<seq2seq4repair_space>FROM<seq2seq4repair_space>`tbot_irc_userstoperms`<seq2seq4repair_space>AS<seq2seq4repair_space>UP<seq2seq4repair_space>WHERE<seq2seq4repair_space>UP.`UserID`<seq2seq4repair_space>=<seq2seq4repair_space>(SELECT<seq2seq4repair_space>U.`UserID`<seq2seq4repair_space>FROM<seq2seq4repair_space>`tbot_ircusers`<seq2seq4repair_space>AS<seq2seq4repair_space>U<seq2seq4repair_space>WHERE<seq2seq4repair_space>U.`Name`<seq2seq4repair_space>=<seq2seq4repair_space>?)<seq2seq4repair_space>AND<seq2seq4repair_space>UP.`PermissionID`<seq2seq4repair_space>=<seq2seq4repair_space>P.`PermissionID`),<seq2seq4repair_space>-1)<seq2seq4repair_space>AS<seq2seq4repair_space>'Value'<seq2seq4repair_space>FROM<seq2seq4repair_space>`tbot_ircperms`<seq2seq4repair_space>AS<seq2seq4repair_space>P<seq2seq4repair_space>WHERE<seq2seq4repair_space>P.`Permission`<seq2seq4repair_space>=<seq2seq4repair_space>?" ) ; statement . setString ( 1 , realName ) ; statement . setString ( 2 , permission ) ; ResultSet set = statement . executeQuery ( ) ; if ( ( set == null ) || ( ! ( set . next ( ) ) ) ) return false ; short def = set . getShort ( 1 ) ; short val = set . getShort ( 2 ) ; <START_BUG> return ( val == ( - 1 ) ? val : def ) == 1 ; <END_BUG> } catch ( SQLException e ) { return false ; } finally { if ( connection != null ) { try { connection . close ( ) ; } catch ( SQLException ignored ) { } } } } public void setPermission ( User user , String permission , boolean value ) { } public void registerPermission ( String permission , boolean def ) { } private String getAuthedAs ( User user ) { } }

Fix:
return ( val == ( - 1 ) ? def : val ) == 1 ;
Buggy code:
public class BasicCraftingTask implements ICraftingTask { private CraftingPattern pattern ; private boolean [ ] satisfied ; private boolean [ ] checked ; private boolean [ ] childTasks ; private List < ItemStack > itemsTook = new ArrayList < ItemStack > ( ) ; public BasicCraftingTask ( CraftingPattern pattern ) { } public CraftingPattern getPattern ( ) { } public boolean update ( TileController controller ) { } @ Override public void onDone ( TileController controller ) { } @ Override public void onCancelled ( TileController controller ) { } @ Override public String getInfo ( ) { StringBuilder builder = new StringBuilder ( ) ; builder . append ( YELLOW ) . append ( "{missing_items}" ) . append ( RESET ) . append ( "\n" ) ; int missingItems = 0 ; for ( int i = 0 ; i < ( pattern . getInputs ( ) . length ) ; ++ i ) { ItemStack input = pattern . getInputs ( ) [ i ] ; if ( ( ( checked [ i ] ) && ( ! ( satisfied [ i ] ) ) ) && ( ! ( childTasks [ i ] ) ) ) { builder . append ( "-<seq2seq4repair_space>" ) . append ( input . getDisplayName ( ) ) . append ( "\n" ) ; missingItems ++ ; } } if ( missingItems == 0 ) { builder . append ( GRAY ) . append ( ITALIC ) . append ( "{none}" ) . append ( RESET ) . append ( "\n" ) ; } builder . append ( YELLOW ) . append ( "{items_crafting}" ) . append ( RESET ) . append ( "\n" ) ; int itemsCrafting = 0 ; for ( int i = 0 ; i < ( pattern . getInputs ( ) . length ) ; ++ i ) { ItemStack input = pattern . getInputs ( ) [ i ] ; if ( ( ! ( satisfied [ i ] ) ) && ( childTasks [ i ] ) ) { <START_BUG> builder . append ( "-<seq2seq4repair_space>" ) . append ( input . getDisplayName ( ) ) . append ( "\n" ) ; <END_BUG> itemsCrafting ++ ; } } if ( itemsCrafting == 0 ) { builder . append ( GRAY ) . append ( ITALIC ) . append ( "{none}" ) . append ( RESET ) . append ( "\n" ) ; } return builder . toString ( ) ; } }

Fix:
builder . append ( "-<seq2seq4repair_space>" ) . append ( input . getUnlocalizedName ( ) ) . append ( ".name" ) . append ( "\n" ) ;
Buggy code:
public class TransactionRecoveryEJBClientContextInitializer implements EJBClientContextInitializer { @ Override public void initialize ( EJBClientContext context ) { context . registerEJBClientContextListener ( INSTANCE ) ; <START_BUG> ROOT_LOGGER . debug ( ( ( ( "Registered<seq2seq4repair_space>" + ( EJBTransactionRecoveryService . INSTANCE ) ) + "<seq2seq4repair_space>as<seq2seq4repair_space>a<seq2seq4repair_space>listener<seq2seq4repair_space>to<seq2seq4repair_space>EJB<seq2seq4repair_space>client<seq2seq4repair_space>context<seq2seq4repair_space>" ) + context ) ) ; <END_BUG> } }

Fix:
ROOT_LOGGER . debugf ( "Registered<seq2seq4repair_space>%s<seq2seq4repair_space>as<seq2seq4repair_space>a<seq2seq4repair_space>listener<seq2seq4repair_space>to<seq2seq4repair_space>EJB<seq2seq4repair_space>client<seq2seq4repair_space>context<seq2seq4repair_space>%s" , INSTANCE , context ) ;
Buggy code:
public class JasonsHugeTheme extends MetalTheme { private final ColorUIResource primary1 = new ColorUIResource ( 102 , 102 , 153 ) ; private final ColorUIResource primary2 = new ColorUIResource ( 153 , 153 , 204 ) ; private final ColorUIResource primary3 = new ColorUIResource ( 204 , 204 , 255 ) ; private final ColorUIResource secondary1 = new ColorUIResource ( 102 , 102 , 102 ) ; private final ColorUIResource secondary2 = new ColorUIResource ( 153 , 153 , 153 ) ; private final ColorUIResource secondary3 = new ColorUIResource ( 204 , 204 , 204 ) ; private final FontUIResource controlFont = new FontUIResource ( "SansSerif" , Font . BOLD , 16 ) ; private final FontUIResource systemFont = new FontUIResource ( "Dialog" , Font . PLAIN , 16 ) ; private final FontUIResource windowTitleFont = new FontUIResource ( "SansSerif" , Font . BOLD , 16 ) ; private final FontUIResource userFont = new FontUIResource ( "SansSerif" , Font . PLAIN , 16 ) ; private final FontUIResource smallFont = new FontUIResource ( "Dialog" , Font . PLAIN , 14 ) ; public String getName ( ) { <START_BUG> return "JasonsHuge" ; <END_BUG> } protected ColorUIResource getPrimary1 ( ) { } protected ColorUIResource getPrimary2 ( ) { } protected ColorUIResource getPrimary3 ( ) { } protected ColorUIResource getSecondary1 ( ) { } protected ColorUIResource getSecondary2 ( ) { } protected ColorUIResource getSecondary3 ( ) { } public FontUIResource getControlTextFont ( ) { } public FontUIResource getSystemTextFont ( ) { } public FontUIResource getUserTextFont ( ) { } public FontUIResource getMenuTextFont ( ) { } public FontUIResource getEmphasisTextFont ( ) { } public FontUIResource getSubTextFont ( ) { } public FontUIResource getWindowTitleFont ( ) { } }

Fix:
return "Very<seq2seq4repair_space>Large<seq2seq4repair_space>Fonts" ;
Buggy code:
public class ListShoutsAdapter extends RootAdapter < Shout > { private Bitmap placeholder = null ; public ListShoutsAdapter ( List < Shout > shouts , Context context ) { } public void revealSpoiler ( int position ) { } @ Override public View doGetView ( final int position , View convertView , ViewGroup parent ) { final ListShoutsAdapter . ViewHolder holder ; if ( convertView == null ) { convertView = LayoutInflater . from ( context ) . inflate ( list_item_shout , null ) ; holder = new ListShoutsAdapter . ViewHolder ( ) ; holder . ivAvatar = ( ( ImageView ) ( convertView . findViewById ( imageViewAvatar ) ) ) ; holder . ivSpoiler = ( ( ImageView ) ( convertView . findViewById ( imageViewSpoiler ) ) ) ; holder . tvUsername = ( ( TextView ) ( convertView . findViewById ( textViewUsername ) ) ) ; holder . tvDate = ( ( TextView ) ( convertView . findViewById ( textViewDate ) ) ) ; holder . tvShout = ( ( TextView ) ( convertView . findViewById ( textViewShout ) ) ) ; convertView . setTag ( holder ) ; } else holder = ( ( ListShoutsAdapter . ViewHolder ) ( convertView . getTag ( ) ) ) ; Shout s = getItem ( position ) ; final AQuery aq = new AQuery ( convertView ) ; BitmapAjaxCallback cb = new BitmapAjaxCallback ( ) { @ Override public void callback ( String url , ImageView iv , Bitmap bm , AjaxStatus status ) { <START_BUG> aq . id ( iv ) . image ( Utils . shadowBitmap ( Utils . roundBitmap ( bm ) ) ) . animate ( fade_in ) ; <END_BUG> } } . url ( s . user . avatar ) . animation ( fade_in ) . fileCache ( false ) . memCache ( true ) ; if ( aq . shouldDelay ( position , convertView , parent , s . user . avatar ) ) aq . id ( holder . ivAvatar ) . image ( placeholder ) ; else aq . id ( holder . ivAvatar ) . image ( cb ) ; holder . tvUsername . setText ( s . user . username ) ; holder . tvDate . setText ( new SimpleDateFormat ( "EEEE<seq2seq4repair_space>dd<seq2seq4repair_space>MMMM<seq2seq4repair_space>yyyy<seq2seq4repair_space>hh:mm" ) . format ( s . inserted . getTime ( ) ) ) ; holder . tvShout . setText ( s . shout ) ; if ( s . spoiler ) { holder . tvShout . setVisibility ( GONE ) ; holder . ivSpoiler . setVisibility ( VISIBLE ) ; } else { holder . tvShout . setVisibility ( VISIBLE ) ; holder . ivSpoiler . setVisibility ( GONE ) ; } return convertView ; } private static class ViewHolder { private ImageView ivAvatar ; private ImageView ivSpoiler ; private TextView tvShout ; private TextView tvUsername ; private TextView tvDate ; } }

Fix:
aq . id ( iv ) . image ( Utils . roundBitmap ( bm ) ) . animate ( fade_in ) ;
Buggy code:
public class C3P0DataSourceGenerator implements LocalDataSourceGenerator { private static final Category LOG = Category . getInstance ( C3P0DataSourceGenerator . class . getName ( ) ) ; @ Override public DataSource findLocalDataSource ( String dbtype , Properties p ) throws ConfigurationException { ComboPooledDataSource cpds = new ComboPooledDataSource ( ) ; try { cpds . setDriverClass ( JRFProperties . resolveRequiredStringProperty ( p , ( dbtype + ".driver" ) , "driver<seq2seq4repair_space>specification<seq2seq4repair_space>class<seq2seq4repair_space>is<seq2seq4repair_space>mandatory." ) ) ; cpds . setJdbcUrl ( JRFProperties . resolveRequiredStringProperty ( p , ( dbtype + ".url" ) , "URL<seq2seq4repair_space>for<seq2seq4repair_space>database<seq2seq4repair_space>is<seq2seq4repair_space>mandatory." ) ) ; cpds . setUser ( JRFProperties . resolveRequiredStringProperty ( p , ( dbtype + ".user" ) , "User<seq2seq4repair_space>name<seq2seq4repair_space>is<seq2seq4repair_space>mandatory" ) ) ; cpds . setPassword ( JRFProperties . resolveStringProperty ( p , ( dbtype + ".password" ) , "" ) ) ; cpds . setMinPoolSize ( JRFProperties . resolveIntProperty ( p , ( dbtype + ".minpoolsize" ) , 1 ) ) ; cpds . setMaxPoolSize ( JRFProperties . resolveIntProperty ( p , ( dbtype + ".maxpoolsize" ) , 10 ) ) ; cpds . setPreferredTestQuery ( JRFProperties . resolveStringProperty ( p , ( dbtype + ".testsql" ) , null ) ) ; cpds . setPrivilegeSpawnedThreads ( JRFProperties . resolveBooleanProperty ( p , ( dbtype + ".c3p0.privilegeSpawnedThreads" ) , false ) ) ; cpds . setContextClassLoaderSource ( JRFProperties . resolveStringProperty ( p , ( dbtype + ".c3p0.contextClassLoaderSource" ) , "caller" ) ) ; cpds . setIdleConnectionTestPeriod ( JRFProperties . resolveIntProperty ( p , ( dbtype + ".c3p0.idleConnectionTestPeriod" ) , 0 ) ) ; cpds . setTestConnectionOnCheckin ( JRFProperties . resolveBooleanProperty ( p , ( dbtype + ".c3p0.testConnectionOnCheckin" ) , false ) ) ; cpds . setMaxIdleTimeExcessConnections ( JRFProperties . resolveIntProperty ( p , ( dbtype + ".c3p0.maxIdleTimeExcessConnections" ) , 0 ) ) ; cpds . setMaxStatements ( JRFProperties . resolveIntProperty ( p , ( dbtype + ".c3p0.maxStatements" ) , 0 ) ) ; cpds . setUnreturnedConnectionTimeout ( JRFProperties . resolveIntProperty ( p , ( dbtype + ".c3p0.unreturnedConnectionTimeout" ) , 0 ) ) ; <START_BUG> cpds . setTestConnectionOnCheckin ( JRFProperties . resolveBooleanProperty ( p , ( dbtype + ".c3p0.debugUnreturnedConnectionStackTraces" ) , false ) ) ; <END_BUG> C3P0DataSourceGenerator . LOG . debug ( cpds . toString ( ) ) ; } catch ( PropertyVetoException pve ) { throw new ConfigurationException ( pve ) ; } return cpds ; } }

Fix:
cpds . setDebugUnreturnedConnectionStackTraces ( JRFProperties . resolveBooleanProperty ( p , ( dbtype + ".c3p0.debugUnreturnedConnectionStackTraces" ) , false ) ) ;
Buggy code:
public class HandshakePacket extends Packet implements DefaultPacket { private int handshakeID ; private int protocolVersion ; public HandshakePacket ( ) { } @ Override public void handle ( DataInputStream in ) throws IOException { } @ Override public PacketWriter prepare ( ) throws IOException { PacketWriter data = new PacketWriter ( getId ( ) ) ; data . writeInt ( handshakeID ) ; <START_BUG> data . write ( protocolVersion ) ; <END_BUG> return data ; } public int getHandshakeID ( ) { } public void setHandshakeID ( int handshakeID ) { } public int getProtocolVersion ( ) { } public void setProtocolVersion ( int protocolVersion ) { } @ Override public short getId ( ) { } @ Override public boolean isCritical ( ) { } }

Fix:
data . writeInt ( protocolVersion ) ;
Buggy code:
public abstract class CollectionMetricsHandler extends AbstractRuntimeOnlyHandler { private final PersistenceUnitServiceRegistry persistenceUnitRegistry ; private CollectionMetricsHandler ( PersistenceUnitServiceRegistry persistenceUnitRegistry ) { } @ Override protected void executeRuntimeStep ( OperationContext context , ModelNode operation ) throws OperationFailedException { CollectionStatistics statistics = collectionStatistics ( operation ) ; if ( statistics != null ) { handle ( statistics , context , operation . require ( NAME ) . asString ( ) ) ; } <START_BUG> context . completeStep ( ) ; <END_BUG> } protected abstract void handle ( CollectionStatistics statistics , OperationContext context , String attributeName ) { } private CollectionStatistics collectionStatistics ( ModelNode operation ) { } static final CollectionMetricsHandler getLoadCount ( final PersistenceUnitServiceRegistry persistenceUnitRegistry ) { } static final CollectionMetricsHandler getFetchCount ( final PersistenceUnitServiceRegistry persistenceUnitRegistry ) { } static final CollectionMetricsHandler getRecreateCount ( final PersistenceUnitServiceRegistry persistenceUnitRegistry ) { } static final CollectionMetricsHandler getRemoveCount ( final PersistenceUnitServiceRegistry persistenceUnitRegistry ) { } static final CollectionMetricsHandler getUpdateCount ( final PersistenceUnitServiceRegistry persistenceUnitRegistry ) { } }

Fix:
context . stepCompleted ( ) ;
Buggy code:
public class RaRemove extends AbstractRaOperation implements NewStepHandler { static final RaRemove INSTANCE = new RaRemove ( ) ; public void execute ( NewOperationContext context , ModelNode operation ) { final ModelNode opAddr = operation . require ( OP_ADDR ) ; final String archive = PathAddress . pathAddress ( opAddr ) . getLastElement ( ) . getValue ( ) ; operation . get ( Constants . ARCHIVE ) . set ( archive ) ; final ModelNode model = context . readModel ( EMPTY_ADDRESS ) ; final ModelNode compensating = Util . getEmptyOperation ( ADD , opAddr ) ; if ( model . hasDefined ( Constants . RESOURCEADAPTERS ) ) { for ( ModelNode raNode : model . get ( Constants . RESOURCEADAPTERS ) . asList ( ) ) { ModelNode raCompensatingNode = raNode . clone ( ) ; compensating . get ( Constants . RESOURCEADAPTERS ) . add ( raCompensatingNode ) ; } } <START_BUG> context . removeModel ( EMPTY_ADDRESS ) ; <END_BUG> context . addStep ( new NewStepHandler ( ) { public void execute ( NewOperationContext context , ModelNode operation ) { context . removeService ( RESOURCEADAPTERS_SERVICE ) ; if ( ( context . completeStep ( ) ) == ( ResultAction . ROLLBACK ) ) { } } } , RUNTIME ) ; context . completeStep ( ) ; } }

Fix:
context . removeResource ( EMPTY_ADDRESS ) ;
Buggy code:
public class SingleTypeReference extends TypeReference { public char [ ] token ; public SingleTypeReference ( char [ ] source , long pos ) { } public TypeReference copyDims ( int dim ) { } protected TypeBinding getTypeBinding ( Scope scope ) { } public char [ ] [ ] getTypeName ( ) { } public StringBuffer printExpression ( int indent , StringBuffer output ) { } public TypeBinding resolveTypeEnclosing ( BlockScope scope , ReferenceBinding enclosingType ) { ReferenceBinding memberType = scope . getMemberType ( token , enclosingType ) ; if ( ! ( memberType . isValidBinding ( ) ) ) { scope . problemReporter ( ) . invalidEnclosingType ( this , memberType , enclosingType ) ; return null ; } if ( isTypeUseDeprecated ( memberType , scope ) ) scope . problemReporter ( ) . deprecatedType ( memberType , this ) ; <START_BUG> return this . resolvedType = convertToRawType ( memberType , scope ) ; <END_BUG> } public void traverse ( ASTVisitor visitor , BlockScope scope ) { } public void traverse ( ASTVisitor visitor , ClassScope scope ) { } }

Fix:
return this . resolvedType = scope . convertToRawType ( memberType ) ;
Buggy code:
public abstract class SimplePaginatedResult < T > extends PaginatedResult < T > { protected final String header ; public SimplePaginatedResult ( String header ) { } public SimplePaginatedResult ( String header , int resultsPerPage ) { } @ Override public String formatHeader ( int page , int maxPages ) { <START_BUG> return ( ( ( ( ( ( ( ( ( ( ( ( ChatColor . AQUA ) + ( this . header ) ) + ( ChatColor . GRAY ) ) + "<seq2seq4repair_space>(" ) + ( ChatColor . DARK_AQUA ) ) + "page" ) + ( ChatColor . AQUA ) ) + page ) + ( ChatColor . DARK_RED ) ) + ( "//" . GREEN ) ) + maxPages ) + ( ChatColor . GRAY ) ) + ")" ; <END_BUG> } }

Fix:
return ( ( ( ( ( ( ( ( ( ( ( ( ChatColor . AQUA ) + ( this . header ) ) + ( ChatColor . GRAY ) ) + "<seq2seq4repair_space>(" ) + ( ChatColor . DARK_AQUA ) ) + "page" ) + ( AQUA . toString ( ) ) ) + page ) + ( ChatColor . DARK_RED ) ) + ( "//" . GREEN . toString ( ) ) ) + maxPages ) + ( ChatColor . GRAY ) ) + ")" ;